@serverless-devs/s3 3.0.3-e73ab915 → 3.0.3-fa642b4d
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/daemon/lib.js +1 -1
- package/lib/index.js +10 -10
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -336,7 +336,7 @@ ${" ".repeat(u)}`))}this._progressContent=`${t.join(`
|
|
|
336
336
|
${qbt("ERROR:")}`),At.write(`
|
|
337
337
|
${t}
|
|
338
338
|
`),r&&At.write(`${Dt.gray(r)}
|
|
339
|
-
`)}},lP=J7e});var fP=N((G_u,Yvn)=>{Yvn.exports={name:"@serverless-devs/s3",version:"3.0.3-
|
|
339
|
+
`)}},lP=J7e});var fP=N((G_u,Yvn)=>{Yvn.exports={name:"@serverless-devs/s3",version:"3.0.3-fa642b4d",description:"Serverless devs tool, serverless developer tool, supports Alibaba cloud, AWS, azure, baidu cloud, Huawei cloud, Google cloud and Tencent cloud.",homepage:"https://www.serverless-devs.com",keywords:["serverless","alibaba","tencent","azure","baidu","huawei","google","function","faas","serverless-devs"],publishConfig:{access:"public",registry:"https://registry.npmjs.org"},license:"Apache 2.0",repository:{type:"git",url:"https://github.com/Serverless-Devs/Serverless-Devs"},bugs:{url:"https://github.com/Serverless-Devs/Serverless-Devs/issues"},scripts:{start:"npm run watch",test:"jest --testTimeout 10000","test:watch":"jest --testTimeout 10000 --watchAll",format:"prettier --write src/ __tests__/**/*.test.ts",watch:"npm run build -- --watch",prebuild:"cross-os prebuild",build:"node ./scripts/build.js",pkg:"pkg . --out-path releases",prepublishOnly:"npm run build",beta:"npm publish --tag=beta",pub:"npm publish"},"cross-os":{prebuild:{darwin:"rm -rf node_modules && npm install --production false",linux:"rm -rf node_modules && npm install --production false",win32:"rmdir /s /q node_modules && npm install --production false"}},pkg:{scripts:["./lib/daemon/**/*.js"]},main:"./lib/index.js",bin:{s:"bin/s"},engines:{node:">=14.14.0"},devDependencies:{"@serverless-devs/core":"^0.1.67-beta.1","@serverless-devs/credential":"^0.0.5","@serverless-devs/engine":"^0.1.0","@serverless-devs/load-application":"^0.0.12","@serverless-devs/load-component":"^0.0.7-beta.1","@serverless-devs/logger":"^0.0.4","@serverless-devs/parse-spec":"^0.0.24","@serverless-devs/registry":"^0.0.8","@serverless-devs/utils":"^0.0.14","@types/fs-extra":"^11.0.4","@types/inquirer":"^9.0.7","@types/jest":"^29.5.8","@types/js-yaml":"^4.0.9","@types/lodash":"^4.14.201","@types/node":"^20.9.1","@types/semver":"^7.5.5",ajv:"^8.12.0",axios:"^1.6.2",boxen:"^7.1.1",chalk:"^5.3.0",commander:"^11.1.0","cross-os":"^1.5.0",dotenv:"^16.3.1","dotenv-expand":"^10.0.0",esbuild:"^0.19.5","fs-extra":"^11.1.1","global-agent":"^3.0.0",inquirer:"^9.2.12","inquirer-autocomplete-prompt":"^3.0.1",jest:"^29.7.0","js-yaml":"^4.1.0","latest-version":"^7.0.0",leven:"^4.0.0",lodash:"^4.17.21",pkg:"^5.8.1",prettier:"^3.1.0",prettyjson:"^1.2.5",rimraf:"^5.0.5",semver:"^7.5.4","semver-diff":"^4.0.0","strip-ansi":"^7.1.0","table-layout":"^3.0.2","ts-jest":"^29.1.1","ts-node":"^10.9.1",typescript:"^5.2.2"},"lint-staged":{"**/*.{js,jsx,ts}":"f2elint exec eslint"}}});var F0,mJ,pP,Hbt,aE,Wbt,Xvn,Vbt,Jvn,Gbt,cd,sg=Bt(()=>{F0=ot(Er());Zn();wr();mJ=ot(require("path")),pP=ot(ji());gn();Hbt=ot(Er()),aE=ot(fr());ig();zbt();Wbt=fP(),Xvn=async(e,t={})=>{At.unsilent();let{silent:r}=(0,Hbt.parseArgv)(process.argv.slice(2)),n=mJ.default.join((0,F0.getRootHome)(),"logs",process.env.serverless_devs_traceid,"error.json");pP.default.ensureFileSync(n),pP.default.writeJSONSync(n,[],{spaces:2});let u=1;if((0,aE.isArray)(e))for(let i of e){Vbt(i,t);let o=(0,aE.get)(i,"exitCode");o&&(u=o)}else{Vbt(e,t);let i=(0,aE.get)(e,"exitCode");i&&(u=i)}At.write(" "),At.write(Kbt([{key:"Env:",value:`${Wbt.name}: ${Wbt.version}, ${process.platform}-${process.arch} node-${process.version}`},{key:"Logs:",value:Dt.underline(mJ.default.join((0,F0.getRootHome)(),"logs",process.env.serverless_devs_traceid))},{key:"Get Help:",value:"DingTalk: 33947367"},{key:"Feedback:",value:Dt.cyan.underline("https://github.com/Serverless-Devs/Serverless-Devs/issues")}])),r&&At.silent(),process.exitCode=u},Vbt=(e,t={})=>{Uc("report.js",{argv:process.argv.slice(2),userAgent:(0,F0.getUserAgent)(),...t,type:(0,aE.get)(e,"trackerType"),message:e.message}),Jvn(e),At.write(" ");let r=e;if(r.CODE===F0.DevsError.CODE){let i=r.prefix?[`${Dt.red("\u2716")} ${r.prefix}`,"===================="]:[];i.push(Dt.red("Error Message:"),Dt.red((0,F0.isDebugMode)()?r.stack:r.message)),r.tips&&i.push(`
|
|
340
340
|
\u{1F37C} Tips`,"====================",Dt.yellow(`${r.tips}`)),At.write(i.join(`
|
|
341
341
|
`)),Gbt(r.stack);return}let n=e,u=[Dt.red("Error Message:"),Dt.red((0,F0.isDebugMode)()?n.stack:n.message)];At.write(u.join(`
|
|
342
342
|
`)),Gbt(n.stack)},Jvn=e=>{let t=u=>{let i=(0,aE.get)(u,"data");if(i)return i;let o=u;return o.CODE===F0.DevsError.CODE?{prefix:o.prefix,message:o.message,exitCode:o.exitCode,tips:o.tips}:{message:o.message}},r=mJ.default.join((0,F0.getRootHome)(),"logs",process.env.serverless_devs_traceid,"error.json"),n=pP.default.readJSONSync(r);n.push(t(e)),pP.default.writeJSONSync(r,n,{spaces:2})},Gbt=e=>{(0,F0.isDebugMode)()||At.debug(e)},cd=Xvn});function Zvn(){let{version:e}=Q7e.default.minVersion(Qvn.engines.node);Q7e.default.gte(process.versions.node,e)||(new lP(`Node.js version must be greater than or equal to ${e}`,`Your current Node.js version is ${process.versions.node}, please upgrade your Node.js version at ${Dt.underline("https://nodejs.org/en")}.`),process.exit(1))}var Q7e,Qvn,Z7e,Ybt=Bt(()=>{sg();wr();Q7e=ot(oE()),Qvn=fP();Z7e=Zvn});var Xbt=N(gJ=>{"use strict";Object.defineProperty(gJ,"__esModule",{value:!0});gJ.boolean=void 0;var eDn=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1"].includes(e.trim().toLowerCase());case"[object Number]":return e.valueOf()===1;case"[object Boolean]":return e.valueOf();default:return!1}};gJ.boolean=eDn});var Jbt=N(vJ=>{"use strict";Object.defineProperty(vJ,"__esModule",{value:!0});vJ.isBooleanable=void 0;var tDn=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1","false","f","no","n","off","0"].includes(e.trim().toLowerCase());case"[object Number]":return[0,1].includes(e.valueOf());case"[object Boolean]":return!0;default:return!1}};vJ.isBooleanable=tDn});var DJ=N(LC=>{"use strict";Object.defineProperty(LC,"__esModule",{value:!0});LC.isBooleanable=LC.boolean=void 0;var rDn=Xbt();Object.defineProperty(LC,"boolean",{enumerable:!0,get:function(){return rDn.boolean}});var nDn=Jbt();Object.defineProperty(LC,"isBooleanable",{enumerable:!0,get:function(){return nDn.isBooleanable}})});var yJ=N((iBu,Qbt)=>{Qbt.exports=Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"});var e9e=N((oBu,eCt)=>{"use strict";var Zbt=Object.prototype.toString;eCt.exports=function(t){var r=Zbt.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Zbt.call(t.callee)==="[object Function]"),n}});var cCt=N((sBu,aCt)=>{"use strict";var sCt;Object.keys||(hP=Object.prototype.hasOwnProperty,t9e=Object.prototype.toString,tCt=e9e(),r9e=Object.prototype.propertyIsEnumerable,rCt=!r9e.call({toString:null},"toString"),nCt=r9e.call(function(){},"prototype"),dP=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],EJ=function(e){var t=e.constructor;return t&&t.prototype===e},uCt={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},iCt=function(){if(typeof window>"u")return!1;for(var e in window)try{if(!uCt["$"+e]&&hP.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{EJ(window[e])}catch{return!0}}catch{return!0}return!1}(),oCt=function(e){if(typeof window>"u"||!iCt)return EJ(e);try{return EJ(e)}catch{return!1}},sCt=function(t){var r=t!==null&&typeof t=="object",n=t9e.call(t)==="[object Function]",u=tCt(t),i=r&&t9e.call(t)==="[object String]",o=[];if(!r&&!n&&!u)throw new TypeError("Object.keys called on a non-object");var s=nCt&&n;if(i&&t.length>0&&!hP.call(t,0))for(var a=0;a<t.length;++a)o.push(String(a));if(u&&t.length>0)for(var c=0;c<t.length;++c)o.push(String(c));else for(var l in t)!(s&&l==="prototype")&&hP.call(t,l)&&o.push(String(l));if(rCt)for(var f=oCt(t),p=0;p<dP.length;++p)!(f&&dP[p]==="constructor")&&hP.call(t,dP[p])&&o.push(dP[p]);return o});var hP,t9e,tCt,r9e,rCt,nCt,dP,EJ,uCt,iCt,oCt;aCt.exports=sCt});var hCt=N((aBu,pCt)=>{"use strict";var uDn=Array.prototype.slice,iDn=e9e(),lCt=Object.keys,bJ=lCt?function(t){return lCt(t)}:cCt(),fCt=Object.keys;bJ.shim=function(){if(Object.keys){var t=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);t||(Object.keys=function(n){return iDn(n)?fCt(uDn.call(n)):fCt(n)})}else Object.keys=bJ;return Object.keys||bJ};pCt.exports=bJ});var mCt=N((cBu,dCt)=>{"use strict";dCt.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var u=42;t[r]=u;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,r);if(o.value!==u||o.enumerable!==!0)return!1}return!0}});var DCt=N((lBu,vCt)=>{"use strict";var gCt=typeof Symbol<"u"&&Symbol,oDn=mCt();vCt.exports=function(){return typeof gCt!="function"||typeof Symbol!="function"||typeof gCt("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:oDn()}});var bCt=N((fBu,ECt)=>{"use strict";var yCt={foo:{}},sDn=Object;ECt.exports=function(){return{__proto__:yCt}.foo===yCt.foo&&!({__proto__:null}instanceof sDn)}});var ACt=N((pBu,xCt)=>{"use strict";var aDn="Function.prototype.bind called on incompatible ",cDn=Object.prototype.toString,lDn=Math.max,fDn="[object Function]",CCt=function(t,r){for(var n=[],u=0;u<t.length;u+=1)n[u]=t[u];for(var i=0;i<r.length;i+=1)n[i+t.length]=r[i];return n},pDn=function(t,r){for(var n=[],u=r||0,i=0;u<t.length;u+=1,i+=1)n[i]=t[u];return n},hDn=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};xCt.exports=function(t){var r=this;if(typeof r!="function"||cDn.apply(r)!==fDn)throw new TypeError(aDn+r);for(var n=pDn(arguments,1),u,i=function(){if(this instanceof u){var l=r.apply(this,CCt(n,arguments));return Object(l)===l?l:this}return r.apply(t,CCt(n,arguments))},o=lDn(0,r.length-n.length),s=[],a=0;a<o;a++)s[a]="$"+a;if(u=Function("binder","return function ("+hDn(s,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var c=function(){};c.prototype=r.prototype,u.prototype=new c,c.prototype=null}return u}});var CJ=N((hBu,FCt)=>{"use strict";var dDn=ACt();FCt.exports=Function.prototype.bind||dDn});var BCt=N((dBu,_Ct)=>{"use strict";var mDn=Function.prototype.call,gDn=Object.prototype.hasOwnProperty,vDn=CJ();_Ct.exports=vDn.call(mDn,gDn)});var $C=N((mBu,PCt)=>{"use strict";var eu,UC=SyntaxError,TCt=Function,MC=TypeError,n9e=function(e){try{return TCt('"use strict"; return ('+e+").constructor;")()}catch{}},cE=Object.getOwnPropertyDescriptor;if(cE)try{cE({},"")}catch{cE=null}var u9e=function(){throw new MC},DDn=cE?function(){try{return arguments.callee,u9e}catch{try{return cE(arguments,"callee").get}catch{return u9e}}}():u9e,NC=DCt()(),yDn=bCt()(),ca=Object.getPrototypeOf||(yDn?function(e){return e.__proto__}:null),qC={},EDn=typeof Uint8Array>"u"||!ca?eu:ca(Uint8Array),lE={"%AggregateError%":typeof AggregateError>"u"?eu:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?eu:ArrayBuffer,"%ArrayIteratorPrototype%":NC&&ca?ca([][Symbol.iterator]()):eu,"%AsyncFromSyncIteratorPrototype%":eu,"%AsyncFunction%":qC,"%AsyncGenerator%":qC,"%AsyncGeneratorFunction%":qC,"%AsyncIteratorPrototype%":qC,"%Atomics%":typeof Atomics>"u"?eu:Atomics,"%BigInt%":typeof BigInt>"u"?eu:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?eu:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?eu:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?eu:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?eu:Float32Array,"%Float64Array%":typeof Float64Array>"u"?eu:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?eu:FinalizationRegistry,"%Function%":TCt,"%GeneratorFunction%":qC,"%Int8Array%":typeof Int8Array>"u"?eu:Int8Array,"%Int16Array%":typeof Int16Array>"u"?eu:Int16Array,"%Int32Array%":typeof Int32Array>"u"?eu:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":NC&&ca?ca(ca([][Symbol.iterator]())):eu,"%JSON%":typeof JSON=="object"?JSON:eu,"%Map%":typeof Map>"u"?eu:Map,"%MapIteratorPrototype%":typeof Map>"u"||!NC||!ca?eu:ca(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?eu:Promise,"%Proxy%":typeof Proxy>"u"?eu:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?eu:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?eu:Set,"%SetIteratorPrototype%":typeof Set>"u"||!NC||!ca?eu:ca(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?eu:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":NC&&ca?ca(""[Symbol.iterator]()):eu,"%Symbol%":NC?Symbol:eu,"%SyntaxError%":UC,"%ThrowTypeError%":DDn,"%TypedArray%":EDn,"%TypeError%":MC,"%Uint8Array%":typeof Uint8Array>"u"?eu:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?eu:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?eu:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?eu:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?eu:WeakMap,"%WeakRef%":typeof WeakRef>"u"?eu:WeakRef,"%WeakSet%":typeof WeakSet>"u"?eu:WeakSet};if(ca)try{null.error}catch(e){wCt=ca(ca(e)),lE["%Error.prototype%"]=wCt}var wCt,bDn=function e(t){var r;if(t==="%AsyncFunction%")r=n9e("async function () {}");else if(t==="%GeneratorFunction%")r=n9e("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=n9e("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var u=e("%AsyncGenerator%");u&&ca&&(r=ca(u.prototype))}return lE[t]=r,r},SCt={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},mP=CJ(),xJ=BCt(),CDn=mP.call(Function.call,Array.prototype.concat),xDn=mP.call(Function.apply,Array.prototype.splice),OCt=mP.call(Function.call,String.prototype.replace),AJ=mP.call(Function.call,String.prototype.slice),ADn=mP.call(Function.call,RegExp.prototype.exec),FDn=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,_Dn=/\\(\\)?/g,BDn=function(t){var r=AJ(t,0,1),n=AJ(t,-1);if(r==="%"&&n!=="%")throw new UC("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new UC("invalid intrinsic syntax, expected opening `%`");var u=[];return OCt(t,FDn,function(i,o,s,a){u[u.length]=s?OCt(a,_Dn,"$1"):o||i}),u},wDn=function(t,r){var n=t,u;if(xJ(SCt,n)&&(u=SCt[n],n="%"+u[0]+"%"),xJ(lE,n)){var i=lE[n];if(i===qC&&(i=bDn(n)),typeof i>"u"&&!r)throw new MC("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:u,name:n,value:i}}throw new UC("intrinsic "+t+" does not exist!")};PCt.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new MC("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new MC('"allowMissing" argument must be a boolean');if(ADn(/^%?[^%]*%?$/,t)===null)throw new UC("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=BDn(t),u=n.length>0?n[0]:"",i=wDn("%"+u+"%",r),o=i.name,s=i.value,a=!1,c=i.alias;c&&(u=c[0],xDn(n,CDn([0,1],c)));for(var l=1,f=!0;l<n.length;l+=1){var p=n[l],h=AJ(p,0,1),d=AJ(p,-1);if((h==='"'||h==="'"||h==="`"||d==='"'||d==="'"||d==="`")&&h!==d)throw new UC("property names with quotes must have matching quotes");if((p==="constructor"||!f)&&(a=!0),u+="."+p,o="%"+u+"%",xJ(lE,o))s=lE[o];else if(s!=null){if(!(p in s)){if(!r)throw new MC("base intrinsic for "+t+" exists, but the property is not available.");return}if(cE&&l+1>=n.length){var m=cE(s,p);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[p]}else f=xJ(s,p),s=s[p];f&&!a&&(lE[o]=s)}}return s}});var FJ=N((gBu,kCt)=>{"use strict";var SDn=$C(),i9e=SDn("%Object.defineProperty%",!0),o9e=function(){if(i9e)try{return i9e({},"a",{value:1}),!0}catch{return!1}return!1};o9e.hasArrayLengthDefineBug=function(){if(!o9e())return null;try{return i9e([],"length",{value:1}).length!==1}catch{return!0}};kCt.exports=o9e});var s9e=N((vBu,RCt)=>{"use strict";var ODn=$C(),_J=ODn("%Object.getOwnPropertyDescriptor%",!0);if(_J)try{_J([],"length")}catch{_J=null}RCt.exports=_J});var c9e=N((DBu,jCt)=>{"use strict";var TDn=FJ()(),a9e=$C(),gP=TDn&&a9e("%Object.defineProperty%",!0);if(gP)try{gP({},"a",{value:1})}catch{gP=!1}var PDn=a9e("%SyntaxError%"),zC=a9e("%TypeError%"),ICt=s9e();jCt.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new zC("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new zC("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new zC("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new zC("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new zC("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new zC("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,a=!!ICt&&ICt(t,r);if(gP)gP(t,r,{configurable:o===null&&a?a.configurable:!o,enumerable:u===null&&a?a.enumerable:!u,value:n,writable:i===null&&a?a.writable:!i});else if(s||!u&&!i&&!o)t[r]=n;else throw new PDn("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var l9e=N((yBu,MCt)=>{"use strict";var kDn=hCt(),RDn=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",IDn=Object.prototype.toString,jDn=Array.prototype.concat,LCt=c9e(),LDn=function(e){return typeof e=="function"&&IDn.call(e)==="[object Function]"},NCt=FJ()(),NDn=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!LDn(n)||!n())return}NCt?LCt(e,t,r,!0):LCt(e,t,r)},qCt=function(e,t){var r=arguments.length>2?arguments[2]:{},n=kDn(t);RDn&&(n=jDn.call(n,Object.getOwnPropertySymbols(t)));for(var u=0;u<n.length;u+=1)NDn(e,n[u],t[n[u]],r[n[u]])};qCt.supportsDescriptors=!!NCt;MCt.exports=qCt});var f9e=N((EBu,UCt)=>{"use strict";UCt.exports=global});var p9e=N((bBu,$Ct)=>{"use strict";var qDn=f9e();$Ct.exports=function(){return typeof global!="object"||!global||global.Math!==Math||global.Array!==Array?qDn:global}});var WCt=N((CBu,zCt)=>{"use strict";var MDn=l9e(),UDn=p9e();zCt.exports=function(){var t=UDn();if(MDn.supportsDescriptors){var r=Object.getOwnPropertyDescriptor(t,"globalThis");(!r||r.configurable&&(r.enumerable||!r.writable||globalThis!==t))&&Object.defineProperty(t,"globalThis",{configurable:!0,enumerable:!1,value:t,writable:!0})}else(typeof globalThis!="object"||globalThis!==t)&&(t.globalThis=t);return t}});var h9e=N((xBu,HCt)=>{"use strict";var $Dn=l9e(),zDn=f9e(),VCt=p9e(),WDn=WCt(),VDn=VCt(),GCt=function(){return VDn};$Dn(GCt,{getPolyfill:VCt,implementation:zDn,shim:WDn});HCt.exports=GCt});var XCt=N((d9e,YCt)=>{d9e=YCt.exports=GDn;d9e.getSerialize=KCt;function GDn(e,t,r,n){return JSON.stringify(e,KCt(t,n),r)}function KCt(e,t){var r=[],n=[];return t==null&&(t=function(u,i){return r[0]===i?"[Circular ~]":"[Circular ~."+n.slice(0,r.indexOf(i)).join(".")+"]"}),function(u,i){if(r.length>0){var o=r.indexOf(this);~o?r.splice(o+1):r.push(this),~o?n.splice(o,1/0,u):n.push(u),~r.indexOf(i)&&(i=t.call(this,u,i))}else r.push(i);return e==null?i:e.call(this,u,i)}}});var JCt=N(BJ=>{(function(){"use strict";var e={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function t(o){return n(i(o),arguments)}function r(o,s){return t.apply(null,[o].concat(s||[]))}function n(o,s){var a=1,c=o.length,l,f="",p,h,d,m,v,y,g,D;for(p=0;p<c;p++)if(typeof o[p]=="string")f+=o[p];else if(typeof o[p]=="object"){if(d=o[p],d.keys)for(l=s[a],h=0;h<d.keys.length;h++){if(l==null)throw new Error(t('[sprintf] Cannot access property "%s" of undefined value "%s"',d.keys[h],d.keys[h-1]));l=l[d.keys[h]]}else d.param_no?l=s[d.param_no]:l=s[a++];if(e.not_type.test(d.type)&&e.not_primitive.test(d.type)&&l instanceof Function&&(l=l()),e.numeric_arg.test(d.type)&&typeof l!="number"&&isNaN(l))throw new TypeError(t("[sprintf] expecting number but found %T",l));switch(e.number.test(d.type)&&(g=l>=0),d.type){case"b":l=parseInt(l,10).toString(2);break;case"c":l=String.fromCharCode(parseInt(l,10));break;case"d":case"i":l=parseInt(l,10);break;case"j":l=JSON.stringify(l,null,d.width?parseInt(d.width):0);break;case"e":l=d.precision?parseFloat(l).toExponential(d.precision):parseFloat(l).toExponential();break;case"f":l=d.precision?parseFloat(l).toFixed(d.precision):parseFloat(l);break;case"g":l=d.precision?String(Number(l.toPrecision(d.precision))):parseFloat(l);break;case"o":l=(parseInt(l,10)>>>0).toString(8);break;case"s":l=String(l),l=d.precision?l.substring(0,d.precision):l;break;case"t":l=String(!!l),l=d.precision?l.substring(0,d.precision):l;break;case"T":l=Object.prototype.toString.call(l).slice(8,-1).toLowerCase(),l=d.precision?l.substring(0,d.precision):l;break;case"u":l=parseInt(l,10)>>>0;break;case"v":l=l.valueOf(),l=d.precision?l.substring(0,d.precision):l;break;case"x":l=(parseInt(l,10)>>>0).toString(16);break;case"X":l=(parseInt(l,10)>>>0).toString(16).toUpperCase();break}e.json.test(d.type)?f+=l:(e.number.test(d.type)&&(!g||d.sign)?(D=g?"+":"-",l=l.toString().replace(e.sign,"")):D="",v=d.pad_char?d.pad_char==="0"?"0":d.pad_char.charAt(1):" ",y=d.width-(D+l).length,m=d.width&&y>0?v.repeat(y):"",f+=d.align?D+l+m:v==="0"?D+m+l:m+D+l)}return f}var u=Object.create(null);function i(o){if(u[o])return u[o];for(var s=o,a,c=[],l=0;s;){if((a=e.text.exec(s))!==null)c.push(a[0]);else if((a=e.modulo.exec(s))!==null)c.push("%");else if((a=e.placeholder.exec(s))!==null){if(a[2]){l|=1;var f=[],p=a[2],h=[];if((h=e.key.exec(p))!==null)for(f.push(h[1]);(p=p.substring(h[0].length))!=="";)if((h=e.key_access.exec(p))!==null)f.push(h[1]);else if((h=e.index_access.exec(p))!==null)f.push(h[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");a[2]=f}else l|=2;if(l===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");c.push({placeholder:a[0],param_no:a[1],keys:a[2],sign:a[3],pad_char:a[4],align:a[5],width:a[6],precision:a[7],type:a[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");s=s.substring(a[0].length)}return u[o]=c}typeof BJ<"u"&&(BJ.sprintf=t,BJ.vsprintf=r),typeof window<"u"&&(window.sprintf=t,window.vsprintf=r,typeof define=="function"&&define.amd&&define(function(){return{sprintf:t,vsprintf:r}}))})()});var m9e=N(wJ=>{"use strict";Object.defineProperty(wJ,"__esModule",{value:!0});wJ.logLevels=void 0;var HDn={debug:20,error:50,fatal:60,info:30,trace:10,warn:40};wJ.logLevels=HDn});var ext=N(OJ=>{"use strict";Object.defineProperty(OJ,"__esModule",{value:!0});OJ.default=void 0;var KDn=y9e(yJ()),YDn=y9e(h9e()),XDn=y9e(XCt()),g9e=JCt(),QCt=m9e();function y9e(e){return e&&e.__esModule?e:{default:e}}function v9e(){return v9e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v9e.apply(this,arguments)}function ZCt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function Bf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZCt(Object(r),!0).forEach(function(n){JDn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZCt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JDn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var QDn=(0,YDn.default)(),vP;KDn.default&&(vP=require("domain"));var ZDn=()=>{if(!vP)return{};let e=[],t=process.domain;if(!t||!t.parentDomain)return{};for(;t&&t.parentDomain;)t=t.parentDomain,t.roarr&&t.roarr.context&&e.push(t.roarr.context);let r={};for(let n of e)r=Bf(Bf({},r),n);return r},SJ=()=>{if(!vP)return{};let e=process.domain;if(e&&e.roarr&&e.roarr.context)return e.roarr.context;if(!e||!e.parentDomain)return{};for(;e&&e.parentDomain;)if(e=e.parentDomain,e.roarr&&e.roarr.context)return e.roarr.context;return{}},D9e=(e,t)=>{let r=(n,u,i,o,s,a,c,l,f,p)=>{let h=Date.now(),d=QDn.ROARR.sequence++,m,v;if(typeof n=="string"){m=Bf(Bf({},SJ()),t||{});let y=v9e({},{a:n,b:u,c:i,d:o,e:s,f:a,g:c,h:l,i:f,k:p});v=Object.keys(y).map(E=>y[E]).reduce((E,b)=>E+=typeof b>"u"?0:1,0)===1?(0,g9e.sprintf)("%s",n):(0,g9e.sprintf)(n,u,i,o,s,a,c,l,f,p)}else{if(typeof u!="string")throw new TypeError("Message must be a string.");m=JSON.parse((0,XDn.default)(Bf(Bf(Bf({},SJ()),t||{}),n))),v=(0,g9e.sprintf)(u,i,o,s,a,c,l,f,p)}e({context:m,message:v,sequence:d,time:h,version:"1.0.0"})};r.child=n=>typeof n=="function"?D9e(u=>{if(typeof n!="function")throw new TypeError("Unexpected state.");e(n(u))},t):D9e(e,Bf(Bf(Bf({},SJ()),t),n)),r.getContext=()=>Bf(Bf({},SJ()),t||{}),r.adopt=async(n,u)=>{if(!vP)return n();let i=vP.create();return i.run(()=>(i.roarr={context:Bf(Bf({},ZDn()),u)},n()))};for(let n of Object.keys(QCt.logLevels))r[n]=(u,i,o,s,a,c,l,f,p,h)=>r.child({logLevel:QCt.logLevels[n]})(u,i,o,s,a,c,l,f,p,h);return r},eyn=D9e;OJ.default=eyn});var nxt=N(TJ=>{"use strict";Object.defineProperty(TJ,"__esModule",{value:!0});TJ.default=void 0;var txt=m9e(),rxt=(e,t)=>{let r=(n,u,i,o,s,a,c,l,f,p)=>{};r.adopt=async n=>n(),r.child=n=>rxt(e,t),r.getContext=()=>({});for(let n of Object.keys(txt.logLevels))r[n]=(u,i,o,s,a,c,l,f,p,h)=>r.child({logLevel:txt.logLevels[n]})(u,i,o,s,a,c,l,f,p,h);return r},tyn=rxt;TJ.default=tyn});var ixt=N((wBu,uxt)=>{uxt.exports=function(t,r){for(var n=t.split("."),u=r.split("."),i=0;i<3;i++){var o=Number(n[i]),s=Number(u[i]);if(o>s)return 1;if(s>o)return-1;if(!isNaN(o)&&isNaN(s))return 1;if(isNaN(o)&&!isNaN(s))return-1}return 0}});var oxt=N((SBu,ryn)=>{ryn.exports={author:{email:"gajus@gajus.com",name:"Gajus Kuizinas",url:"http://gajus.com"},ava:{babel:{compileAsTests:["test/helpers/**/*"]},files:["test/roarr/**/*"],require:["@babel/register"]},dependencies:{boolean:"^3.0.1","detect-node":"^2.0.4",globalthis:"^1.0.1","json-stringify-safe":"^5.0.1","semver-compare":"^1.0.0","sprintf-js":"^1.1.2"},description:"JSON logger for Node.js and browser.",devDependencies:{"@ava/babel":"^1.0.1","@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/node":"^7.10.5","@babel/plugin-transform-flow-strip-types":"^7.10.4","@babel/preset-env":"^7.11.5","@babel/register":"^7.11.5",ava:"^3.12.1","babel-plugin-istanbul":"^6.0.0","babel-plugin-transform-export-default-name":"^2.0.4",coveralls:"^3.1.0","domain-parent":"^1.0.0",eslint:"^7.9.0","eslint-config-canonical":"^24.1.1","flow-bin":"^0.133.0","flow-copy-source":"^2.0.9",gitdown:"^3.1.3",husky:"^4.3.0",nyc:"^15.1.0","semantic-release":"^17.1.1"},engines:{node:">=8.0"},husky:{hooks:{"pre-commit":"npm run lint && npm run test && npm run build","pre-push":"gitdown ./.README/README.md --output-file ./README.md --check"}},keywords:["log","logger","json"],main:"./dist/log.js",name:"roarr",nyc:{include:["src/**/*.js"],instrument:!1,reporter:["text-lcov"],require:["@babel/register"],sourceMap:!1},license:"BSD-3-Clause",repository:{type:"git",url:"git@github.com:gajus/roarr.git"},scripts:{build:"rm -fr ./dist && NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps && flow-copy-source src dist","create-readme":"gitdown ./.README/README.md --output-file ./README.md",dev:"NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps --watch",lint:"eslint ./src ./test && flow",test:"NODE_ENV=test ava --serial --verbose"},version:"2.15.4"}});var sxt=N(PJ=>{"use strict";Object.defineProperty(PJ,"__esModule",{value:!0});PJ.default=void 0;var nyn=e=>({write:t=>{e.write(t+`
|
|
@@ -345,7 +345,7 @@ ${t}
|
|
|
345
345
|
`,t.proxy.authorization&&(u+="Proxy-Authorization: Basic "+Buffer.from(t.proxy.authorization).toString("base64")+`\r
|
|
346
346
|
`),u+=`\r
|
|
347
347
|
`,n.write(u)}},jyn=O9e;qJ.default=jyn});var bxt=N(EP=>{"use strict";Object.defineProperty(EP,"__esModule",{value:!0});Object.defineProperty(EP,"Agent",{enumerable:!0,get:function(){return Lyn.default}});Object.defineProperty(EP,"HttpProxyAgent",{enumerable:!0,get:function(){return Nyn.default}});Object.defineProperty(EP,"HttpsProxyAgent",{enumerable:!0,get:function(){return qyn.default}});var Lyn=P9e(LJ()),Nyn=P9e(yxt()),qyn=P9e(Ext());function P9e(e){return e&&e.__esModule?e:{default:e}}});var Axt=N((MJ,xxt)=>{"use strict";Object.defineProperty(MJ,"__esModule",{value:!0});function Myn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cxt(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function Uyn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function $yn(e){function t(){e.apply(this,arguments)}return t.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}var zyn=function(e){Uyn(t,e);function t(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";Myn(this,t);var n=Cxt(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r));return Object.defineProperty(n,"message",{configurable:!0,enumerable:!1,value:r,writable:!0}),Object.defineProperty(n,"name",{configurable:!0,enumerable:!1,value:n.constructor.name,writable:!0}),Error.hasOwnProperty("captureStackTrace")?(Error.captureStackTrace(n,n.constructor),Cxt(n)):(Object.defineProperty(n,"stack",{configurable:!0,enumerable:!1,value:new Error(r).stack,writable:!0}),n)}return t}($yn(Error));MJ.default=zyn;xxt.exports=MJ.default});var $J=N(UJ=>{"use strict";Object.defineProperty(UJ,"__esModule",{value:!0});UJ.UnexpectedStateError=void 0;var Wyn=Vyn(Axt());function Vyn(e){return e&&e.__esModule?e:{default:e}}var k9e=class extends Wyn.default{constructor(t,r="UNEXPECTED_STATE_ERROR"){super(t),this.code=r}};UJ.UnexpectedStateError=k9e});var _xt=N(zJ=>{"use strict";Object.defineProperty(zJ,"__esModule",{value:!0});zJ.default=void 0;var Gyn=Fxt(require("http")),Hyn=Fxt(require("https"));function Fxt(e){return e&&e.__esModule?e:{default:e}}var Kyn=(e,t,r)=>(...n)=>{let u,i,o;return typeof n[0]=="string"||n[0]instanceof URL?(u=n[0],typeof n[1]=="function"?(i={},o=n[1]):(i={...n[1]},o=n[2])):(i={...n[0]},o=n[1]),r?i.agent=t:(i.agent||(i.agent=t),(i.agent===Gyn.default.globalAgent||i.agent===Hyn.default.globalAgent)&&(i.agent=t)),u?e(u,i,o):e(i,o)},Yyn=Kyn;zJ.default=Yyn});var wxt=N(($Bu,Bxt)=>{"use strict";Bxt.exports=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}});var Oxt=N((zBu,I9e)=>{"use strict";var Xyn=wxt(),R9e=new Map;function Sxt(e,t){t={caseSensitive:!1,...t};let r=e+JSON.stringify(t);if(R9e.has(r))return R9e.get(r);let n=e[0]==="!";n&&(e=e.slice(1)),e=Xyn(e).replace(/\\\*/g,"[\\s\\S]*");let u=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return u.negated=n,R9e.set(r,u),u}I9e.exports=(e,t,r)=>{if(!(Array.isArray(e)&&Array.isArray(t)))throw new TypeError(`Expected two arrays, got ${typeof e} ${typeof t}`);if(t.length===0)return e;let n=t[0][0]==="!";t=t.map(i=>Sxt(i,r));let u=[];for(let i of e){let o=n;for(let s of t)s.test(i)&&(o=!s.negated);o&&u.push(i)}return u};I9e.exports.isMatch=(e,t,r)=>{let n=Array.isArray(e)?e:[e],u=Array.isArray(t)?t:[t];return n.some(i=>u.every(o=>{let s=Sxt(o,r),a=s.test(i);return s.negated?!a:a}))}});var Pxt=N(WJ=>{"use strict";Object.defineProperty(WJ,"__esModule",{value:!0});WJ.default=void 0;var Jyn=require("url"),Qyn=Zyn(Oxt()),Txt=$J();function Zyn(e){return e&&e.__esModule?e:{default:e}}var eEn=(e,t)=>{let r=(0,Jyn.parse)(e),n=t.split(/[\s,]+/);for(let u of n){let i=u.replace(/^(?<leadingDot>\.)/,"*").match(/^(?<hostname>.+?)(?::(?<port>\d+))?$/);if(!i||!i.groups)throw new Txt.UnexpectedStateError("Invalid NO_PROXY pattern.");if(!i.groups.hostname)throw new Txt.UnexpectedStateError("NO_PROXY entry pattern must include hostname. Use * to match any hostname.");if(Qyn.default.isMatch(r.hostname,i.groups.hostname)&&(!i.groups||!i.groups.port||r.port&&r.port===i.groups.port))return!0}return!1},tEn=eEn;WJ.default=tEn});var kxt=N(VJ=>{"use strict";Object.defineProperty(VJ,"__esModule",{value:!0});VJ.default=void 0;var rEn=require("url"),j9e=$J(),nEn=e=>{let t=(0,rEn.parse)(e);if(t.query!==null)throw new j9e.UnexpectedStateError("Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL must not have query.");if(t.hash!==null)throw new j9e.UnexpectedStateError("Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL must not have hash.");if(t.protocol!=="http:")throw new j9e.UnexpectedStateError('Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL protocol must be "http:".');let r=80;return t.port&&(r=Number.parseInt(t.port,10)),{authorization:t.auth||null,hostname:t.hostname,port:r}},uEn=nEn;VJ.default=uEn});var Rxt=N(bP=>{"use strict";Object.defineProperty(bP,"__esModule",{value:!0});Object.defineProperty(bP,"bindHttpMethod",{enumerable:!0,get:function(){return iEn.default}});Object.defineProperty(bP,"isUrlMatchingNoProxy",{enumerable:!0,get:function(){return oEn.default}});Object.defineProperty(bP,"parseProxyUrl",{enumerable:!0,get:function(){return sEn.default}});var iEn=L9e(_xt()),oEn=L9e(Pxt()),sEn=L9e(kxt());function L9e(e){return e&&e.__esModule?e:{default:e}}});var N9e=N(GJ=>{"use strict";Object.defineProperty(GJ,"__esModule",{value:!0});GJ.default=void 0;var aEn=cEn(yP());function cEn(e){return e&&e.__esModule?e:{default:e}}var lEn=aEn.default.child({namespace:"createProxyController"}),fEn=["HTTP_PROXY","HTTPS_PROXY","NO_PROXY"],pEn=()=>new Proxy({HTTP_PROXY:null,HTTPS_PROXY:null,NO_PROXY:null},{set:(e,t,r)=>{if(!fEn.includes(t))throw new Error('Cannot set an unmapped property "'+t+'".');return e[t]=r,lEn.info({change:{name:t,value:r},newConfiguration:e},"configuration changed"),!0}}),hEn=pEn;GJ.default=hEn});var qxt=N(HJ=>{"use strict";Object.defineProperty(HJ,"__esModule",{value:!0});HJ.default=void 0;var GC=CP(require("http")),HC=CP(require("https")),dEn=DJ(),Ixt=CP(oE()),mEn=CP(yP()),jxt=bxt(),gEn=$J(),VC=Rxt(),vEn=CP(N9e());function CP(e){return e&&e.__esModule?e:{default:e}}var DEn=GC.default.get,yEn=GC.default.request,EEn=HC.default.get,bEn=HC.default.request,Lxt=mEn.default.child({namespace:"createGlobalProxyAgent"}),Nxt={environmentVariableNamespace:void 0,forceGlobalAgent:void 0,socketConnectionTimeout:6e4},CEn=e=>{let t=Object.keys(e),r={};for(let n of t){let u=e[n];u!==void 0&&(r[n]=u)}return r},xEn=e=>{let t=process.env;return{...{environmentVariableNamespace:typeof t.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE=="string"?t.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE:"GLOBAL_AGENT_",forceGlobalAgent:typeof t.GLOBAL_AGENT_FORCE_GLOBAL_AGENT=="string"?(0,dEn.boolean)(t.GLOBAL_AGENT_FORCE_GLOBAL_AGENT):!0,socketConnectionTimeout:typeof t.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT=="string"?Number.parseInt(t.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT,10):Nxt.socketConnectionTimeout},...CEn(e)}},AEn=(e=Nxt)=>{let t=xEn(e),r=(0,vEn.default)();r.HTTP_PROXY=process.env[t.environmentVariableNamespace+"HTTP_PROXY"]||null,r.HTTPS_PROXY=process.env[t.environmentVariableNamespace+"HTTPS_PROXY"]||null,r.NO_PROXY=process.env[t.environmentVariableNamespace+"NO_PROXY"]||null,Lxt.info({configuration:t,state:r},"global agent has been initialized");let n=f=>p=>f()?r.NO_PROXY?!(0,VC.isUrlMatchingNoProxy)(p,r.NO_PROXY):!0:!1,u=f=>()=>{let p=f();if(!p)throw new gEn.UnexpectedStateError("HTTP(S) proxy must be configured.");return(0,VC.parseProxyUrl)(p)},i=()=>r.HTTP_PROXY,o=class extends jxt.HttpProxyAgent{constructor(){super(()=>i(),n(i),u(i),GC.default.globalAgent,t.socketConnectionTimeout)}},s=new o,a=()=>r.HTTPS_PROXY||r.HTTP_PROXY,c=class extends jxt.HttpsProxyAgent{constructor(){super(()=>a(),n(a),u(a),HC.default.globalAgent,t.socketConnectionTimeout)}},l=new c;return Ixt.default.gte(process.version,"v11.7.0")&&(GC.default.globalAgent=s,HC.default.globalAgent=l),Ixt.default.gte(process.version,"v10.0.0")?(GC.default.get=(0,VC.bindHttpMethod)(DEn,s,t.forceGlobalAgent),GC.default.request=(0,VC.bindHttpMethod)(yEn,s,t.forceGlobalAgent),HC.default.get=(0,VC.bindHttpMethod)(EEn,l,t.forceGlobalAgent),HC.default.request=(0,VC.bindHttpMethod)(bEn,l,t.forceGlobalAgent)):Lxt.warn("attempt to initialize global-agent in unsupported Node.js version was ignored"),r},FEn=AEn;HJ.default=FEn});var q9e=N(KJ=>{"use strict";Object.defineProperty(KJ,"__esModule",{value:!0});Object.defineProperty(KJ,"createGlobalProxyAgent",{enumerable:!0,get:function(){return _En.default}});Object.defineProperty(KJ,"createProxyController",{enumerable:!0,get:function(){return BEn.default}});var _En=Mxt(qxt()),BEn=Mxt(N9e());function Mxt(e){return e&&e.__esModule?e:{default:e}}});var Uxt=N(YJ=>{"use strict";Object.defineProperty(YJ,"__esModule",{value:!0});YJ.default=void 0;var wEn=OEn(yP()),SEn=q9e();function OEn(e){return e&&e.__esModule?e:{default:e}}var TEn=wEn.default.child({namespace:"bootstrap"}),PEn=e=>global.GLOBAL_AGENT?(TEn.warn("found global.GLOBAL_AGENT; second attempt to bootstrap global-agent was ignored"),!1):(global.GLOBAL_AGENT=(0,SEn.createGlobalProxyAgent)(e),!0),kEn=PEn;YJ.default=kEn});var $xt=N(M9e=>{"use strict";Object.defineProperty(M9e,"__esModule",{value:!0});Object.defineProperty(M9e,"bootstrap",{enumerable:!0,get:function(){return REn.default}});var REn=IEn(Uxt());function IEn(e){return e&&e.__esModule?e:{default:e}}});var zxt=N(XJ=>{"use strict";Object.defineProperty(XJ,"__esModule",{value:!0});Object.defineProperty(XJ,"bootstrap",{enumerable:!0,get:function(){return jEn.bootstrap}});Object.defineProperty(XJ,"createGlobalProxyAgent",{enumerable:!0,get:function(){return LEn.createGlobalProxyAgent}});var jEn=$xt(),LEn=q9e()});var JJ,NEn,qEn,U9e,Wxt=Bt(()=>{JJ=ot(Er()),NEn=zxt(),qEn=()=>{if(!(0,JJ.getGlobalConfig)("proxy_enable"))return;NEn.bootstrap();let t=(0,JJ.getGlobalConfig)("http_proxy"),r=(0,JJ.getGlobalConfig)("https_proxy");t&&(global.GLOBAL_AGENT.HTTP_PROXY=t),r&&(global.GLOBAL_AGENT.HTTPS_PROXY=r),process.env.NODE_TLS_REJECT_UNAUTHORIZED="0"},U9e=qEn});function xP(e,t){if(e===t)return 0;let r=e;e.length>t.length&&(e=t,t=r);let n=e.length,u=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-u);)n--,u--;let i=0;for(;i<n&&e.charCodeAt(i)===t.charCodeAt(i);)i++;if(n-=i,u-=i,n===0)return u;let o,s,a,c,l=0,f=0;for(;l<n;)Vxt[l]=e.charCodeAt(i+l),$9e[l]=++l;for(;f<u;)for(o=t.charCodeAt(i+f),a=f++,s=f,l=0;l<n;l++)c=o===Vxt[l]?a:a+1,a=$9e[l],s=$9e[l]=a>s?c>s?s+1:c:c>a?a+1:c;return s}var $9e,Vxt,Gxt=Bt(()=>{$9e=[],Vxt=[]});var Hxt,MEn,l5,Kxt=Bt(()=>{wr();Gxt();Hxt=ot(fr());sg();MEn=e=>{e.on("command:*",([t])=>{let r=e.commands.map(u=>(0,Hxt.get)(u,"_name")),n="";r.forEach(u=>{let i=xP(u,t)<xP(n,t);xP(u,t)<=3&&i&&(n=u)}),new lP(`Unknown command ${Dt.yellow(t)}.`,n&&`Did you mean ${Dt.yellow(n)}?`),process.env.NODE_ENV!=="test"&&process.exit(1)})},l5=MEn});var ZJ,KC,z9e,QJ,Yxt,UEn,_0,Xxt=Bt(()=>{ZJ=ot(Er()),KC=ot(fr()),z9e=ot(ji());mT();QJ=ot(Cf()),Yxt=ot(sye()),UEn=e=>{if((0,KC.isEmpty)(e))return;let t=process.argv.slice(2),r=ZJ.parseArgv(t),n=(0,KC.get)(r,"output-file");if(!n)return;let u=ZJ.getAbsolutePath(n),i=(0,KC.get)(r,"output"),o={[QJ.IOutput.JSON]:JSON.stringify(e,null,2),[QJ.IOutput.YAML]:Km.dump(e),[QJ.IOutput.RAW]:JSON.stringify(e)},s=Yxt.default.render(e,{keysColor:"bold",emptyArrayMsg:"[]"});z9e.default.writeFileSync(u,(0,KC.get)(o,i,s),"utf-8"),z9e.default.appendFileSync(u,`
|
|
348
|
-
`)},_0=UEn});function Zxt(){return[`${W9e.name}: ${W9e.version}`,`s-home: ${(0,eQ.getRootHome)()}`,`${process.platform}-${process.arch}`,`node-${process.version}`].filter(t=>t).join(", ")}async function tQ(e){let t=new Map;await r(e);async function r(u){let i=J1.default.lstatSync(u);if(typeof i=="object"&&(t.set(i.ino,i.size),i.isDirectory())){let o=J1.default.readdirSync(u);if(typeof o!="object")return;await Promise.all(o.map(s=>r(V9e.default.join(u,s))))}}return Array.from(t.values()).reduce((u,i)=>u+i,0)}var tu,eQ,J1,V9e,wl,ec,G9e,H9e,Jxt,Pt,W9e,K9e,Kbt,Qxt,rQ,eAt,YC,XC,JC,$En,tAt,rAt,gn=Bt(()=>{tu=ot(fr());Ple();eQ=ot(Er()),J1=ot(ji()),V9e=ot(require("path")),wl=ot(Cf());Zn();mT();ec=ot(Er()),G9e=ot(c5());sJ();H9e=ot(Dl()),Jxt=ot(require("assert"));aJ();Ybt();Wxt();Kxt();Xxt();Pt=ot(Er()),W9e=fP(),K9e=(e,t=0)=>{let r=(0,tu.filter)(e,i=>i.command!=="help"),n=(0,tu.maxBy)(r,i=>(0,tu.get)(i,"command.length")).command.length,u=(0,tu.maxBy)(r,i=>(0,tu.get)(i,"description.length")).description.length;return new _B(r,{padding:{left:(0,tu.repeat)(" ",t+2)},columns:[{name:"command",width:n+2>29?n+2:29},{name:"description",width:u+10}]}).toString()},Kbt=e=>{let t=(0,tu.maxBy)(e,n=>(0,tu.get)(n,"key.length")).key.length,r=(0,tu.maxBy)(e,n=>(0,tu.get)(n,"value.length")).value.length;return new _B(e,{padding:{left:""},columns:[{name:"key",width:t+2},{name:"value",width:r+10}]}).toString()},Qxt=e=>W9e[e];rQ=(e,t="-p/--props")=>{try{return JSON.parse(e)}catch{throw new Error(`${t} parameter format error`)}},eAt=e=>(0,tu.cloneDeepWith)(e,t=>{if(!((0,tu.isObject)(t)&&!(0,tu.isArray)(t)&&!(0,tu.isFunction)(t)))return"******"}),YC=e=>{At.unsilent();let{output:t=wl.IOutput.DEFAULT,silent:r}=(0,eQ.parseArgv)(process.argv.slice(2));if(t!==wl.IOutput.DEFAULT){switch((0,tu.isString)(e)&&(e=sE(e)),t){case wl.IOutput.JSON:e=JSON.stringify(e,null,2);break;case wl.IOutput.YAML:e=Km.dump(e);break;case wl.IOutput.RAW:e=JSON.stringify(e);break;default:break}At.write(e)}else At.output(e);r&&At.silent()},XC=async(e,t)=>{let r=ec.getGlobalConfig(oJ,Abt),n=At.loggerInstance.__generate(r),u=await(0,G9e.default)(r,{logger:n});try{return await u.env({cwd:process.cwd(),userAgent:ec.getUserAgent({component:u.__info}),getCredential:async()=>{let o=await new H9e.default({logger:n}).get(t),s=(0,tu.get)(o,"credential",{});return(0,tu.each)(s,a=>{At.loggerInstance.__setSecret([a])}),s},...e})}catch(i){throw new ec.DevsError(i.message,{stack:i.stack,exitCode:101})}},JC=async e=>{try{let t=await new H9e.default({logger:At}).get(e);return(0,tu.get)(t,"credential.AccountID")}catch{}},$En=e=>{let t=process.env[wl.ALIYUN_REMOTE_PROJECT_ENV_PARAM],r,n,u;if(t){if(n=ec.getAbsolutePath(wl.ENVIRONMENT_FILE_NAME),!J1.default.existsSync(n))return null;r=ec.getYamlContent(n),u=t}else{J1.default.existsSync(e)||(e="s.yaml");let i=ec.getAbsolutePath(e);if(At.write(`s.yaml: ${i}`),!J1.default.existsSync(i))return null;let o=ec.getYamlContent(i),s=(0,tu.get)(o,"env",wl.ENVIRONMENT_FILE_NAME);if(n=ec.getAbsolutePath(s),!J1.default.existsSync(n))return null;r=ec.getYamlContent(n),u=(0,tu.get)(o,"name")}if(!u)return null;if(J1.default.existsSync(wl.ENVIRONMENT_FILE_PATH)){let i=require(wl.ENVIRONMENT_FILE_PATH),o=i==null?void 0:i.find(s=>s.project===u&&s.path===n);return!(0,tu.isEmpty)(o)&&J1.default.existsSync(o.path)?o.default:null}else return null},tAt=async(e,t)=>{if(typeof e=="boolean"||(0,tu.isEmpty)(e)&&(e=$En(t),(0,tu.isEmpty)(e)))return;J1.default.existsSync(t)||(t="s.yaml");let r=ec.getAbsolutePath(t),{env:n}=ec.getYamlContent(r),u=V9e.default.join(process.cwd(),n||wl.ENVIRONMENT_FILE_NAME),{environments:i}=ec.getYamlContent(u),o=(0,tu.find)(i,l=>l.name===e);(0,Jxt.default)(o,`The environment ${e} was not found`);let{access:s,...a}=o,c={props:{...a},command:"env",args:["deploy"]};await XC(c,s)},rAt=async e=>{let t=At.loggerInstance.__generate(e),r=await(0,G9e.default)(e,{logger:t});return!r||!r.getSchema?null:r.getSchema()}});var nAt=Bt(()=>{});function Y9e(){return Np.default.platform!=="win32"?Np.default.env.TERM!=="linux":!!Np.default.env.CI||!!Np.default.env.WT_SESSION||!!Np.default.env.TERMINUS_SUBLIME||Np.default.env.ConEmuTask==="{cmd::Cmder}"||Np.default.env.TERM_PROGRAM==="Terminus-Sublime"||Np.default.env.TERM_PROGRAM==="vscode"||Np.default.env.TERM==="xterm-256color"||Np.default.env.TERM==="alacritty"||Np.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Np,uAt=Bt(()=>{Np=ot(require("process"),1)});var iAt,zEn,oAt,WEn,VEn,GEn,HEn,Q1,AP=Bt(()=>{iAt=ot(require("process"),1);nAt();uAt();({platform:zEn}=iAt.default),oAt={square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},WEn={...oAt,...zEn==="linux"?{circleQuestionMark:"?\u20DD",questionMarkPrefix:"?\u20DD"}:{circleQuestionMark:"?",questionMarkPrefix:"?"},tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},VEn={...oAt,tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",circleQuestionMark:"(?)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",questionMarkPrefix:"\uFF1F",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},GEn=Y9e(),HEn=GEn?WEn:VEn,Q1=HEn});var FP=N((Fwu,cAt)=>{"use strict";function sAt(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}var aAt=cAt.exports=function(e,t,r="async"){return typeof t=="string"&&(r=t,t=void 0),t=t||function(){},function(){var n=arguments,u=this,i=new Promise(function(o,s){var a=!1;let c=function(g){a&&console.warn("Run-async promise already resolved."),a=!0,o(g)};var l=!1;let f=function(g){l&&console.warn("Run-async promise already rejected."),l=!0,s(g)};var p=!1,h=!1,d=!1,m=function(){return d?(console.warn("Run-async async() called outside a valid run-async context, callback will be ignored."),function(){}):(h&&console.warn(`Run-async wrapped function (async) returned a promise.
|
|
348
|
+
`)},_0=UEn});function Zxt(){return[`${W9e.name}: ${W9e.version}`,`s-home: ${(0,eQ.getRootHome)()}`,`${process.platform}-${process.arch}`,`node-${process.version}`].filter(t=>t).join(", ")}async function tQ(e){let t=new Map;await r(e);async function r(u){let i=J1.default.lstatSync(u);if(typeof i=="object"&&(t.set(i.ino,i.size),i.isDirectory())){let o=J1.default.readdirSync(u);if(typeof o!="object")return;await Promise.all(o.map(s=>r(V9e.default.join(u,s))))}}return Array.from(t.values()).reduce((u,i)=>u+i,0)}var tu,eQ,J1,V9e,wl,ec,G9e,H9e,Jxt,Pt,W9e,K9e,Kbt,Qxt,rQ,eAt,YC,XC,JC,$En,tAt,rAt,gn=Bt(()=>{tu=ot(fr());Ple();eQ=ot(Er()),J1=ot(ji()),V9e=ot(require("path")),wl=ot(Cf());Zn();mT();ec=ot(Er()),G9e=ot(c5());sJ();H9e=ot(Dl()),Jxt=ot(require("assert"));aJ();Ybt();Wxt();Kxt();Xxt();Pt=ot(Er()),W9e=fP(),K9e=(e,t=0)=>{let r=(0,tu.filter)(e,i=>i.command!=="help"),n=(0,tu.maxBy)(r,i=>(0,tu.get)(i,"command.length")).command.length,u=(0,tu.maxBy)(r,i=>(0,tu.get)(i,"description.length")).description.length;return new _B(r,{padding:{left:(0,tu.repeat)(" ",t+2)},columns:[{name:"command",width:n+2>29?n+2:29},{name:"description",width:u+10}]}).toString()},Kbt=e=>{let t=(0,tu.maxBy)(e,n=>(0,tu.get)(n,"key.length")).key.length,r=(0,tu.maxBy)(e,n=>(0,tu.get)(n,"value.length")).value.length;return new _B(e,{padding:{left:""},columns:[{name:"key",width:t+2},{name:"value",width:r+10}]}).toString()},Qxt=e=>W9e[e];rQ=(e,t="-p/--props")=>{try{return JSON.parse(e)}catch{throw new Error(`${t} parameter format error`)}},eAt=e=>(0,tu.cloneDeepWith)(e,t=>{if(!((0,tu.isObject)(t)&&!(0,tu.isArray)(t)&&!(0,tu.isFunction)(t)))return"******"}),YC=e=>{At.unsilent();let{output:t=wl.IOutput.DEFAULT,silent:r}=(0,eQ.parseArgv)(process.argv.slice(2));if(t!==wl.IOutput.DEFAULT){switch((0,tu.isString)(e)&&(e=sE(e)),t){case wl.IOutput.JSON:e=JSON.stringify(e,null,2);break;case wl.IOutput.YAML:e=Km.dump(e);break;case wl.IOutput.RAW:e=JSON.stringify(e);break;default:break}At.write(e)}else At.output(e);r&&At.silent()},XC=async(e,t)=>{let r=ec.getGlobalConfig(oJ,Abt),n=At.loggerInstance.__generate(r),u=await(0,G9e.default)(r,{logger:n});try{return await u.env({cwd:process.cwd(),userAgent:ec.getUserAgent({component:u.__info}),getCredential:async()=>{let o=await new H9e.default({logger:n}).get(t),s=(0,tu.get)(o,"credential",{});return(0,tu.each)(s,a=>{At.loggerInstance.__setSecret([a])}),s},...e})}catch(i){throw new ec.DevsError(i.message,{stack:i.stack,exitCode:101})}},JC=async e=>{try{let t=await new H9e.default({logger:At}).get(e);return(0,tu.get)(t,"credential.AccountID")}catch{}},$En=e=>{let t=process.env[wl.ALIYUN_REMOTE_PROJECT_ENV_PARAM],r,n,u;if(t){if(n=ec.getAbsolutePath(wl.ENVIRONMENT_FILE_NAME),!J1.default.existsSync(n))return null;r=ec.getYamlContent(n),u=t}else{J1.default.existsSync(e)||(e="s.yaml");let i=ec.getAbsolutePath(e);if(!J1.default.existsSync(i))return null;let o=ec.getYamlContent(i),s=(0,tu.get)(o,"env",wl.ENVIRONMENT_FILE_NAME);if(n=ec.getAbsolutePath(s),!J1.default.existsSync(n))return null;r=ec.getYamlContent(n),u=(0,tu.get)(o,"name")}if(!u)return null;if(J1.default.existsSync(wl.ENVIRONMENT_FILE_PATH)){let i=require(wl.ENVIRONMENT_FILE_PATH),o=i==null?void 0:i.find(s=>s.project===u&&s.path===n);return!(0,tu.isEmpty)(o)&&J1.default.existsSync(o.path)?o.default:null}else return null},tAt=async(e,t)=>{if(typeof e=="boolean"||(0,tu.isEmpty)(e)&&(e=$En(t),(0,tu.isEmpty)(e)))return;J1.default.existsSync(t)||(t="s.yaml");let r=ec.getAbsolutePath(t),{env:n}=ec.getYamlContent(r),u=V9e.default.join(process.cwd(),n||wl.ENVIRONMENT_FILE_NAME),{environments:i}=ec.getYamlContent(u),o=(0,tu.find)(i,l=>l.name===e);(0,Jxt.default)(o,`The environment ${e} was not found`);let{access:s,...a}=o,c={props:{...a},command:"env",args:["deploy"]};await XC(c,s)},rAt=async e=>{let t=At.loggerInstance.__generate(e),r=await(0,G9e.default)(e,{logger:t});return!r||!r.getSchema?null:r.getSchema()}});var nAt=Bt(()=>{});function Y9e(){return Np.default.platform!=="win32"?Np.default.env.TERM!=="linux":!!Np.default.env.CI||!!Np.default.env.WT_SESSION||!!Np.default.env.TERMINUS_SUBLIME||Np.default.env.ConEmuTask==="{cmd::Cmder}"||Np.default.env.TERM_PROGRAM==="Terminus-Sublime"||Np.default.env.TERM_PROGRAM==="vscode"||Np.default.env.TERM==="xterm-256color"||Np.default.env.TERM==="alacritty"||Np.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Np,uAt=Bt(()=>{Np=ot(require("process"),1)});var iAt,zEn,oAt,WEn,VEn,GEn,HEn,Q1,AP=Bt(()=>{iAt=ot(require("process"),1);nAt();uAt();({platform:zEn}=iAt.default),oAt={square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},WEn={...oAt,...zEn==="linux"?{circleQuestionMark:"?\u20DD",questionMarkPrefix:"?\u20DD"}:{circleQuestionMark:"?",questionMarkPrefix:"?"},tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},VEn={...oAt,tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",circleQuestionMark:"(?)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",questionMarkPrefix:"\uFF1F",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},GEn=Y9e(),HEn=GEn?WEn:VEn,Q1=HEn});var FP=N((Fwu,cAt)=>{"use strict";function sAt(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}var aAt=cAt.exports=function(e,t,r="async"){return typeof t=="string"&&(r=t,t=void 0),t=t||function(){},function(){var n=arguments,u=this,i=new Promise(function(o,s){var a=!1;let c=function(g){a&&console.warn("Run-async promise already resolved."),a=!0,o(g)};var l=!1;let f=function(g){l&&console.warn("Run-async promise already rejected."),l=!0,s(g)};var p=!1,h=!1,d=!1,m=function(){return d?(console.warn("Run-async async() called outside a valid run-async context, callback will be ignored."),function(){}):(h&&console.warn(`Run-async wrapped function (async) returned a promise.
|
|
349
349
|
Calls to async() callback can have unexpected results.`),p=!0,function(g,D){g?f(g):c(D)})},v;u&&r&&Proxy?v=new Proxy(u,{get(g,D){return D===r?(D in g&&console.warn(`${r} property is been shadowed by run-sync`),m):Reflect.get(...arguments)}}):v={[r]:m};var y=e.apply(v,Array.prototype.slice.call(n));p?sAt(y)&&console.warn("Run-async wrapped function (sync) returned a promise but async() callback must be executed to resolve."):sAt(y)?(h=!0,y.then(c,f)):c(y),d=!0});return i.then(t.bind(null,null),t),i}};aAt.cb=function(e,t){return aAt(function(){var r=Array.prototype.slice.call(arguments);return r.length===e.length-1&&r.push(this.async()),e.apply(this,r)},t)}});function KEn(e,t){return{value:e,key:t||{}}}function la(e){let t=(0,oo.fromEvent)(e.input,"keypress",KEn).pipe((0,oo.takeUntil)((0,oo.fromEvent)(e,"close"))).pipe((0,oo.filter)(({key:r})=>r.name!=="enter"&&r.name!=="return"));return{line:(0,oo.fromEvent)(e,"line"),keypress:t,normalizedUpKey:t.pipe((0,oo.filter)(({key:r})=>r.name==="up"||r.name==="k"||r.name==="p"&&r.ctrl),(0,oo.share)()),normalizedDownKey:t.pipe((0,oo.filter)(({key:r})=>r.name==="down"||r.name==="j"||r.name==="n"&&r.ctrl),(0,oo.share)()),numberKey:t.pipe((0,oo.filter)(r=>r.value&&"123456789".indexOf(r.value)>=0),(0,oo.map)(r=>Number(r.value)),(0,oo.share)()),spaceKey:t.pipe((0,oo.filter)(({key:r})=>r&&r.name==="space"),(0,oo.share)()),aKey:t.pipe((0,oo.filter)(({key:r})=>r&&r.name==="a"),(0,oo.share)()),iKey:t.pipe((0,oo.filter)(({key:r})=>r&&r.name==="i"),(0,oo.share)())}}var oo,Z1=Bt(()=>{oo=ot(No(),1)});var B0,QC=Bt(()=>{wr();B0=class{constructor(t,r={}){let{isInfinite:n=!0}=r;this.lastIndex=0,this.screen=t,this.isInfinite=n}paginate(t,r,n){n=n||7;let u=t.split(`
|
|
350
350
|
`);if(this.screen&&(u=this.screen.breakLines(u),r=u.map(o=>o.length).splice(0,r).reduce((o,s)=>o+s,0),u=u.flat()),u.length<=n)return t;let i=this.isInfinite?this.getInfiniteLines(u,r,n):this.getFiniteLines(u,r,n);return this.lastIndex=r,i.join(`
|
|
351
351
|
`)+`
|
|
@@ -778,7 +778,7 @@ globstar while`,t,f,r,p,h),this.matchOne(t.slice(f),r.slice(p),n))return this.de
|
|
|
778
778
|
`)+r,u=n+1,n=e.indexOf(`
|
|
779
779
|
`,u)}while(n!==-1);return i+=e.substr(u),i};yGt.exports={stringReplaceAll:tWn,stringEncaseCRLFWithFirstIndex:rWn}});var FGt=N((SVu,AGt)=>{"use strict";var nWn=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,bGt=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,uWn=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,iWn=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,oWn=new Map([["n",`
|
|
780
780
|
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function xGt(e){let t=e[0]==="u",r=e[1]==="{";return t&&!r&&e.length===5||e[0]==="x"&&e.length===3?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):oWn.get(e)||e}function sWn(e,t){let r=[],n=t.trim().split(/\s*,\s*/g),u;for(let i of n){let o=Number(i);if(!Number.isNaN(o))r.push(o);else if(u=i.match(uWn))r.push(u[2].replace(iWn,(s,a,c)=>a?xGt(a):c));else throw new Error(`Invalid Chalk template style argument: ${i} (in style '${e}')`)}return r}function aWn(e){bGt.lastIndex=0;let t=[],r;for(;(r=bGt.exec(e))!==null;){let n=r[1];if(r[2]){let u=sWn(n,r[2]);t.push([n].concat(u))}else t.push([n])}return t}function CGt(e,t){let r={};for(let u of t)for(let i of u.styles)r[i[0]]=u.inverse?null:i.slice(1);let n=e;for(let[u,i]of Object.entries(r))if(Array.isArray(i)){if(!(u in n))throw new Error(`Unknown Chalk style: ${u}`);n=i.length>0?n[u](...i):n[u]}return n}AGt.exports=(e,t)=>{let r=[],n=[],u=[];if(t.replace(nWn,(i,o,s,a,c,l)=>{if(o)u.push(xGt(o));else if(a){let f=u.join("");u=[],n.push(r.length===0?f:CGt(e,r)(f)),r.push({inverse:s,styles:aWn(a)})}else if(c){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(CGt(e,r)(u.join(""))),u=[],r.pop()}else u.push(l)}),n.push(u.join("")),r.length>0){let i=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(i)}return n.join("")}});var PGt=N((OVu,TGt)=>{"use strict";var vj=DGt(),{stdout:aSe,stderr:cSe}=h0(),{stringReplaceAll:cWn,stringEncaseCRLFWithFirstIndex:lWn}=EGt(),{isArray:Ene}=Array,BGt=["ansi","ansi","ansi256","ansi16m"],CF=Object.create(null),fWn=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=aSe?aSe.level:0;e.level=t.level===void 0?r:t.level},lSe=class{constructor(t){return wGt(t)}},wGt=e=>{let t={};return fWn(t,e),t.template=(...r)=>OGt(t.template,...r),Object.setPrototypeOf(t,bne.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=lSe,t.template};function bne(e){return wGt(e)}for(let[e,t]of Object.entries(vj))CF[e]={get(){let r=Cne(this,fSe(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};CF.visible={get(){let e=Cne(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};var SGt=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let e of SGt)CF[e]={get(){let{level:t}=this;return function(...r){let n=fSe(vj.color[BGt[t]][e](...r),vj.color.close,this._styler);return Cne(this,n,this._isEmpty)}}};for(let e of SGt){let t="bg"+e[0].toUpperCase()+e.slice(1);CF[t]={get(){let{level:r}=this;return function(...n){let u=fSe(vj.bgColor[BGt[r]][e](...n),vj.bgColor.close,this._styler);return Cne(this,u,this._isEmpty)}}}}var pWn=Object.defineProperties(()=>{},{...CF,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),fSe=(e,t,r)=>{let n,u;return r===void 0?(n=e,u=t):(n=r.openAll+e,u=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:u,parent:r}},Cne=(e,t,r)=>{let n=(...u)=>Ene(u[0])&&Ene(u[0].raw)?_Gt(n,OGt(n,...u)):_Gt(n,u.length===1?""+u[0]:u.join(" "));return Object.setPrototypeOf(n,pWn),n._generator=e,n._styler=t,n._isEmpty=r,n},_Gt=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(r===void 0)return t;let{openAll:n,closeAll:u}=r;if(t.indexOf("\x1B")!==-1)for(;r!==void 0;)t=cWn(t,r.close,r.open),r=r.parent;let i=t.indexOf(`
|
|
781
|
-
`);return i!==-1&&(t=lWn(t,u,n,i)),n+t+u},sSe,OGt=(e,...t)=>{let[r]=t;if(!Ene(r)||!Ene(r.raw))return t.join(" ");let n=t.slice(1),u=[r.raw[0]];for(let i=1;i<r.length;i++)u.push(String(n[i-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[i]));return sSe===void 0&&(sSe=FGt()),sSe(e,u.join(""))};Object.defineProperties(bne.prototype,CF);var xne=bne();xne.supportsColor=aSe;xne.stderr=bne({level:cSe?cSe.level:0});xne.stderr.supportsColor=cSe;TGt.exports=xne});var kGt=N(dv=>{"use strict";var hWn=dv&&dv.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dv,"__esModule",{value:!0});dv.ProgressType=void 0;var dWn=hWn(uGt()),Ane=PGt(),E3;(function(e){e[e.Bar=0]="Bar",e[e.Loading=1]="Loading"})(E3=dv.ProgressType||(dv.ProgressType={}));var mWn=`Loading ${(0,Ane.green)(":loading")} ((:bar)) :current/:total(Bytes) :percent :etas`,gWn=`Loading ${(0,Ane.green)(":loading")} ((:bar)) :etas`,pSe=class e{constructor(t,r,n){this.type=t,this.options=r,t===E3.Loading&&(r||(r={}),r!=null&&r.total||(r.total=100));let u=e.initProgressBarOptions(t,r),i=e.initFormat(t,n);this.progressType=t;let o=new dWn.default(i,u),s=["\u28F4","\u28C6","\u28BB","\u28AA","\u28AB"],a=o.tick;o.tick=(c,l)=>{let f=Object.assign({loading:s[parseInt(String(Math.random()*5))]},l);a.call(o,c,f)},this.bar=o}static initFormat(t,r){return r||(t===E3.Bar?r=mWn:t===E3.Loading&&(r=gWn)),r}static initProgressBarOptions(t,r){return r.width||(r.width=30),r.complete||(r.complete=(0,Ane.green)("\u2588")),r.incomplete||(t===E3.Loading?r.incomplete="\u2591":r.incomplete=(0,Ane.white)("\u2591")),r.clear||(r.clear=!0),r}update(t){if(this.progressType===E3.Bar){let r=t-this.bar.curr;this.bar.tick(r)}else this.progressType===E3.Loading&&this.bar.tick(t||0)}terminate(){this.bar.terminate()}complete(){return this.bar.complete}curr(){return this.bar.curr}total(){return this.bar.total}interrupt(t){this.bar.interrupt(t||"")}};dv.default=pSe});var jGt=N(M0=>{"use strict";var vWn=M0&&M0.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var u=Object.getOwnPropertyDescriptor(t,r);(!u||("get"in u?!t.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,u)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),DWn=M0&&M0.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),yWn=M0&&M0.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&vWn(t,e,r);return DWn(t,e),t},Fne=M0&&M0.__awaiter||function(e,t,r,n){function u(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function s(l){try{c(n.next(l))}catch(f){o(f)}}function a(l){try{c(n.throw(l))}catch(f){o(f)}}function c(l){l.done?i(l.value):u(l.value).then(s,a)}c((n=n.apply(e,t||[])).next())})},xF=M0&&M0.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(M0,"__esModule",{value:!0});var b3=xF(ji()),C3=xF(fr()),Q5=xF(require("path")),EWn=xF(GVt()),bWn=xF(require("readline")),CWn=xF(ZVt()),RGt=yWn(kGt()),IGt=process.platform==="win32",hSe=class{constructor(t){this.codeUri=t.codeUri,this.ignoreFiles=t.ignoreFiles,this.includes=t.includes,this.outputFileName=t.outputFileName||`${Date.now()}.zip`,this.outputFilePath=t.outputFilePath||process.cwd(),this.level=t.level||9,this.prefix=t.prefix,this.logger=t.logger||console,this.checkOptions()}checkOptions(){if(C3.default.isEmpty(this.codeUri)&&!C3.default.isString(this.codeUri))throw new Error(`CodeUri incorrect format, expected to be string: ${this.codeUri}`);if(!b3.default.pathExistsSync(this.codeUri))throw new Error(`CodeUri: ${this.codeUri} is not exist`);C3.default.isEmpty(this.includes)||C3.default.forIn(this.includes,t=>{if(!b3.default.pathExistsSync(t))throw new Error(`Include codeUri: ${t} is not exist`)})}run(){return Fne(this,void 0,void 0,function*(){let t=Q5.default.join(this.outputFilePath,this.outputFileName);yield b3.default.ensureDir(this.outputFilePath);let r=b3.default.createWriteStream(t),n=(0,EWn.default)("zip",{zlib:{level:this.level}}).on("warning",i=>this.logger.warn(i)).on("error",i=>{throw i});n.pipe(r);let u=yield this.zipTo(n,this.codeUri);if(this.includes)for(let i of this.includes){let o=yield this.zipTo(n,i)}return yield new Promise((i,o)=>{let s;n.on("progress",a=>{let{total:c,size:l,level:f}=this.bytesToSize(C3.default.get(a,"fs.totalBytes"));if(s||(s=new RGt.default(RGt.ProgressType.Bar,{total:Number(c)},`Zipping ((:bar)) :current/:total(${l}) :percent :etas`)),C3.default.get(a,"fs.processedBytes")){let{total:p}=this.bytesToSize(C3.default.get(a,"fs.processedBytes"),f);s.update(p)}}),r.on("close",()=>{let a=n.pointer();this.logger.debug("Package complete."),i({count:u,compressedSize:a,outputFile:t})});try{n.finalize()}catch(a){o(a)}})})}bytesToSize(t,r){let n=["Bytes","KB","MB","GB","TB"];if(t==0)return{total:0,size:"Bytes",level:0};let u=r||Math.floor(Math.log(t)/Math.log(1024));return{total:Math.round(t/Math.pow(1024,u)),size:n[u],level:u}}zipTo(t,r){return Fne(this,void 0,void 0,function*(){let n=Q5.default.resolve(r),u=b3.default.statSync(r);if(u.isFile()){let s=this.isBootstrapPath(n,Q5.default.dirname(n));return t.file(n,{prefix:this.prefix,name:Q5.default.basename(r),mode:s?u.mode|73:u.mode}),1}let i=CWn.default.sync({ignoreFiles:this.ignoreFiles,path:r,includeEmpty:!0}),o=new Date("2023-11-01");for(let s of i){let a=Q5.default.join(r,s),c;try{c=yield b3.default.lstat(a),c.mtime=o}catch(h){this.logger.warn(`Before zip: could not found fPath ${a}, absolute fPath is ${Q5.default.resolve(a)}, exception is ${h}, skipping`);continue}let l=Q5.default.resolve(a),f=Q5.default.relative(n,l),p=this.isBootstrapPath(l,n);if(c.size===1067){let h=yield this.readLines(a);if(h[0]==="XSym"&&h.length===5){let d=h[3];t.symlink(f,d,p||IGt?c.mode|73:c.mode);continue}}t.file(a,{prefix:this.prefix,name:f,mode:p||IGt?c.mode|73:c.mode,stats:c})}return i.length})}isBootstrapPath(t,r){return Q5.default.join(r,"bootstrap")===t}readLines(t){return Fne(this,void 0,void 0,function*(){return new Promise((r,n)=>{let u=[];bWn.default.createInterface({input:b3.default.createReadStream(t)}).on("line",i=>u.push(i)).on("close",()=>r(u)).on("error",n)})})}};M0.default=e=>Fne(void 0,void 0,void 0,function*(){return yield new hSe(e).run()})});var LGt=N(_ne=>{"use strict";Object.defineProperty(_ne,"__esModule",{value:!0});_ne.publishSchema=void 0;_ne.publishSchema={type:"object",required:["Edition","Type","Name","Provider","Version","Description","HomePage","Tags","Category","Service","Effective","Parameters"],properties:{Edition:{type:"string",enum:["3.0.0"]},Type:{type:"string",enum:["Component","Plugin","Project"]},Name:{type:"string"},Provider:{type:"array",items:{type:"string",enum:["\u963F\u91CC\u4E91","\u817E\u8BAF\u4E91","\u534E\u4E3A\u4E91","\u767E\u5EA6\u667A\u80FD\u4E91","AWS","Azure","Google Cloud Platform","\u4E13\u6709\u4E91","\u5176\u5B83","Alibaba Cloud","Tencent Cloud","Huawei Cloud","Baidu Cloud","Private Cloud","Others"]}},Version:{type:"string"},Description:{type:"string"},HomePage:{type:"string"},Tags:{type:"array",items:{type:"string"}},Category:{type:"string",enum:["\u4EBA\u5DE5\u667A\u80FD","Web \u5E94\u7528","\u57FA\u7840\u4E91\u670D\u52A1","\u65B0\u624B\u5165\u95E8","\u5F00\u6E90\u9879\u76EE","Jamstack","\u51FD\u6570Connector","IoT","\u5176\u5B83","\u6570\u636E\u5904\u7406","\u76D1\u63A7\u544A\u8B66","\u56FE\u6587\u5904\u7406","\u97F3\u89C6\u9891\u5904\u7406","\u5168\u6808\u5E94\u7528","Web\u6846\u67B6","\u4E91\u5E94\u7528","\u57FA\u7840\u4E91\u4EA7\u54C1","Artificial Intelligence","Web Appilication","Basic cloud services","onboarding","Open Source","Function Connector","Others","Big Data","Monitoring alarm","Image and text processing","Audio and video processing","Fullstack application","Web Framework","Cloud Application","Basic cloud products"]},Service:{type:"object",patternProperties:{"^(\u51FD\u6570\u8BA1\u7B97|\u5BF9\u8C61\u5B58\u50A8|\u5185\u5BB9\u5206\u53D1\u7F51\u7EDC|\u8D44\u6E90\u7F16\u6392|\u786C\u76D8\u6302\u8F7D|\u4E13\u6709\u7F51\u7EDC|\u65E5\u5FD7\u670D\u52A1|\u5BB9\u5668\u955C\u50CF\u670D\u52A1|\u4E8B\u4EF6\u603B\u7EBF|\u8868\u683C\u5B58\u50A8|Serverless\u5E94\u7528\u5F15\u64CE|\u4E91\u6570\u636E\u5E93RDS MySQL \u7248|\u89C6\u9891\u70B9\u64AD|\u667A\u80FD\u5A92\u4F53\u670D\u52A1|\u5A92\u4F53\u5904\u7406|\u4F4E\u4EE3\u7801\u97F3\u89C6\u9891\u5DE5\u5382|\u97F3\u89C6\u9891\u901A\u4FE1|\u5176\u5B83|FC|OSS|CDN|ROS|NAS|VPC|SLS|CR|EventBridge|Tablestore|SAE|RDS MySQL|VOD|ICE|MTS|IMP|RTC|Other)$":{type:"object",properties:{Authorities:{type:"array",items:{type:"string"}},Runtime:{type:"string"}},required:["Authorities"]}},additionalProperties:!1},Organization:{type:"string"},Effective:{type:"string",enum:["Public","Private","Organization"]},Parameters:{type:"object",properties:{type:{type:"string"},additionalProperties:{type:"boolean"},required:{type:"array"},properties:{type:"object"}}}}}});var Ej=N(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.regexpCode=mu.getEsmExportName=mu.getProperty=mu.safeStringify=mu.stringify=mu.strConcat=mu.addCodeArg=mu.str=mu._=mu.nil=mu._Code=mu.Name=mu.IDENTIFIER=mu._CodeOrName=void 0;var Dj=class{};mu._CodeOrName=Dj;mu.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var x3=class extends Dj{constructor(t){if(super(),!mu.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};mu.Name=x3;var Xp=class extends Dj{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof x3&&(r[n.str]=(r[n.str]||0)+1),r),{})}};mu._Code=Xp;mu.nil=new Xp("");function NGt(e,...t){let r=[e[0]],n=0;for(;n<t.length;)mSe(r,t[n]),r.push(e[++n]);return new Xp(r)}mu._=NGt;var dSe=new Xp("+");function qGt(e,...t){let r=[yj(e[0])],n=0;for(;n<t.length;)r.push(dSe),mSe(r,t[n]),r.push(dSe,yj(e[++n]));return xWn(r),new Xp(r)}mu.str=qGt;function mSe(e,t){t instanceof Xp?e.push(...t._items):t instanceof x3?e.push(t):e.push(_Wn(t))}mu.addCodeArg=mSe;function xWn(e){let t=1;for(;t<e.length-1;){if(e[t]===dSe){let r=AWn(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function AWn(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof x3||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof x3))return`"${e}${t.slice(1)}`}function FWn(e,t){return t.emptyStr()?e:e.emptyStr()?t:qGt`${e}${t}`}mu.strConcat=FWn;function _Wn(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:yj(Array.isArray(e)?e.join(","):e)}function BWn(e){return new Xp(yj(e))}mu.stringify=BWn;function yj(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}mu.safeStringify=yj;function wWn(e){return typeof e=="string"&&mu.IDENTIFIER.test(e)?new Xp(`.${e}`):NGt`[${e}]`}mu.getProperty=wWn;function SWn(e){if(typeof e=="string"&&mu.IDENTIFIER.test(e))return new Xp(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}mu.getEsmExportName=SWn;function OWn(e){return new Xp(e.toString())}mu.regexpCode=OWn});var ySe=N(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});Ml.ValueScope=Ml.ValueScopeName=Ml.Scope=Ml.varKinds=Ml.UsedValueState=void 0;var Rf=Ej(),gSe=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},vSe;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(vSe=Ml.UsedValueState||(Ml.UsedValueState={}));Ml.varKinds={const:new Rf.Name("const"),let:new Rf.Name("let"),var:new Rf.Name("var")};var Bne=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof Rf.Name?t:this.name(t)}name(t){return new Rf.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Ml.Scope=Bne;var wne=class extends Rf.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,Rf._)`.${new Rf.Name(r)}[${n}]`}};Ml.ValueScopeName=wne;var TWn=(0,Rf._)`\n`,DSe=class extends Bne{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?TWn:Rf.nil}}get(){return this._scope}name(t){return new wne(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let u=this.toName(t),{prefix:i}=u,o=(n=r.key)!==null&&n!==void 0?n:r.ref,s=this._values[i];if(s){let l=s.get(o);if(l)return l}else s=this._values[i]=new Map;s.set(o,u);let a=this._scope[i]||(this._scope[i]=[]),c=a.length;return a[c]=r.ref,u.setValue(r,{property:i,itemIndex:c}),u}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Rf._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,u=>{if(u.value===void 0)throw new Error(`CodeGen: name "${u}" has no value`);return u.value.code},r,n)}_reduceValues(t,r,n={},u){let i=Rf.nil;for(let o in t){let s=t[o];if(!s)continue;let a=n[o]=n[o]||new Map;s.forEach(c=>{if(a.has(c))return;a.set(c,vSe.Started);let l=r(c);if(l){let f=this.opts.es5?Ml.varKinds.var:Ml.varKinds.const;i=(0,Rf._)`${i}${f} ${c} = ${l};${this.opts._n}`}else if(l=u==null?void 0:u(c))i=(0,Rf._)`${i}${l}${this.opts._n}`;else throw new gSe(c);a.set(c,vSe.Completed)})}return i}};Ml.ValueScope=DSe});var Mn=N(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.or=Rn.and=Rn.not=Rn.CodeGen=Rn.operators=Rn.varKinds=Rn.ValueScopeName=Rn.ValueScope=Rn.Scope=Rn.Name=Rn.regexpCode=Rn.stringify=Rn.getProperty=Rn.nil=Rn.strConcat=Rn.str=Rn._=void 0;var iu=Ej(),kd=ySe(),mv=Ej();Object.defineProperty(Rn,"_",{enumerable:!0,get:function(){return mv._}});Object.defineProperty(Rn,"str",{enumerable:!0,get:function(){return mv.str}});Object.defineProperty(Rn,"strConcat",{enumerable:!0,get:function(){return mv.strConcat}});Object.defineProperty(Rn,"nil",{enumerable:!0,get:function(){return mv.nil}});Object.defineProperty(Rn,"getProperty",{enumerable:!0,get:function(){return mv.getProperty}});Object.defineProperty(Rn,"stringify",{enumerable:!0,get:function(){return mv.stringify}});Object.defineProperty(Rn,"regexpCode",{enumerable:!0,get:function(){return mv.regexpCode}});Object.defineProperty(Rn,"Name",{enumerable:!0,get:function(){return mv.Name}});var Pne=ySe();Object.defineProperty(Rn,"Scope",{enumerable:!0,get:function(){return Pne.Scope}});Object.defineProperty(Rn,"ValueScope",{enumerable:!0,get:function(){return Pne.ValueScope}});Object.defineProperty(Rn,"ValueScopeName",{enumerable:!0,get:function(){return Pne.ValueScopeName}});Object.defineProperty(Rn,"varKinds",{enumerable:!0,get:function(){return Pne.varKinds}});Rn.operators={GT:new iu._Code(">"),GTE:new iu._Code(">="),LT:new iu._Code("<"),LTE:new iu._Code("<="),EQ:new iu._Code("==="),NEQ:new iu._Code("!=="),NOT:new iu._Code("!"),OR:new iu._Code("||"),AND:new iu._Code("&&"),ADD:new iu._Code("+")};var Z5=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},ESe=class extends Z5{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?kd.varKinds.var:this.varKind,u=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${u};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=FF(this.rhs,t,r)),this}get names(){return this.rhs instanceof iu._CodeOrName?this.rhs.names:{}}},Sne=class extends Z5{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof iu.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=FF(this.rhs,t,r),this}get names(){let t=this.lhs instanceof iu.Name?{}:{...this.lhs.names};return Tne(t,this.rhs)}},bSe=class extends Sne{constructor(t,r,n,u){super(t,n,u),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},CSe=class extends Z5{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},xSe=class extends Z5{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},ASe=class extends Z5{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},FSe=class extends Z5{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=FF(this.code,t,r),this}get names(){return this.code instanceof iu._CodeOrName?this.code.names:{}}},bj=class extends Z5{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,u=n.length;for(;u--;){let i=n[u];i.optimizeNames(t,r)||(PWn(t,i.names),n.splice(u,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>_3(t,r.names),{})}},e6=class extends bj{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},_Se=class extends bj{},AF=class extends e6{};AF.kind="else";var A3=class e extends e6{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new AF(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(MGt(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=FF(this.condition,t,r),this}get names(){let t=super.names;return Tne(t,this.condition),this.else&&_3(t,this.else.names),t}};A3.kind="if";var F3=class extends e6{};F3.kind="for";var BSe=class extends F3{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=FF(this.iteration,t,r),this}get names(){return _3(super.names,this.iteration.names)}},wSe=class extends F3{constructor(t,r,n,u){super(),this.varKind=t,this.name=r,this.from=n,this.to=u}render(t){let r=t.es5?kd.varKinds.var:this.varKind,{name:n,from:u,to:i}=this;return`for(${r} ${n}=${u}; ${n}<${i}; ${n}++)`+super.render(t)}get names(){let t=Tne(super.names,this.from);return Tne(t,this.to)}},One=class extends F3{constructor(t,r,n,u){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=u}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=FF(this.iterable,t,r),this}get names(){return _3(super.names,this.iterable.names)}},Cj=class extends e6{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Cj.kind="func";var xj=class extends bj{render(t){return"return "+super.render(t)}};xj.kind="return";var SSe=class extends e6{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,u;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(u=this.finally)===null||u===void 0||u.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&_3(t,this.catch.names),this.finally&&_3(t,this.finally.names),t}},Aj=class extends e6{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Aj.kind="catch";var Fj=class extends e6{render(t){return"finally"+super.render(t)}};Fj.kind="finally";var OSe=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
781
|
+
`);return i!==-1&&(t=lWn(t,u,n,i)),n+t+u},sSe,OGt=(e,...t)=>{let[r]=t;if(!Ene(r)||!Ene(r.raw))return t.join(" ");let n=t.slice(1),u=[r.raw[0]];for(let i=1;i<r.length;i++)u.push(String(n[i-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[i]));return sSe===void 0&&(sSe=FGt()),sSe(e,u.join(""))};Object.defineProperties(bne.prototype,CF);var xne=bne();xne.supportsColor=aSe;xne.stderr=bne({level:cSe?cSe.level:0});xne.stderr.supportsColor=cSe;TGt.exports=xne});var kGt=N(dv=>{"use strict";var hWn=dv&&dv.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dv,"__esModule",{value:!0});dv.ProgressType=void 0;var dWn=hWn(uGt()),Ane=PGt(),E3;(function(e){e[e.Bar=0]="Bar",e[e.Loading=1]="Loading"})(E3=dv.ProgressType||(dv.ProgressType={}));var mWn=`Loading ${(0,Ane.green)(":loading")} ((:bar)) :current/:total(Bytes) :percent :etas`,gWn=`Loading ${(0,Ane.green)(":loading")} ((:bar)) :etas`,pSe=class e{constructor(t,r,n){this.type=t,this.options=r,t===E3.Loading&&(r||(r={}),r!=null&&r.total||(r.total=100));let u=e.initProgressBarOptions(t,r),i=e.initFormat(t,n);this.progressType=t;let o=new dWn.default(i,u),s=["\u28F4","\u28C6","\u28BB","\u28AA","\u28AB"],a=o.tick;o.tick=(c,l)=>{let f=Object.assign({loading:s[parseInt(String(Math.random()*5))]},l);a.call(o,c,f)},this.bar=o}static initFormat(t,r){return r||(t===E3.Bar?r=mWn:t===E3.Loading&&(r=gWn)),r}static initProgressBarOptions(t,r){return r.width||(r.width=30),r.complete||(r.complete=(0,Ane.green)("\u2588")),r.incomplete||(t===E3.Loading?r.incomplete="\u2591":r.incomplete=(0,Ane.white)("\u2591")),r.clear||(r.clear=!0),r}update(t){if(this.progressType===E3.Bar){let r=t-this.bar.curr;this.bar.tick(r)}else this.progressType===E3.Loading&&this.bar.tick(t||0)}terminate(){this.bar.terminate()}complete(){return this.bar.complete}curr(){return this.bar.curr}total(){return this.bar.total}interrupt(t){this.bar.interrupt(t||"")}};dv.default=pSe});var jGt=N(M0=>{"use strict";var vWn=M0&&M0.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var u=Object.getOwnPropertyDescriptor(t,r);(!u||("get"in u?!t.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,u)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),DWn=M0&&M0.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),yWn=M0&&M0.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&vWn(t,e,r);return DWn(t,e),t},Fne=M0&&M0.__awaiter||function(e,t,r,n){function u(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function s(l){try{c(n.next(l))}catch(f){o(f)}}function a(l){try{c(n.throw(l))}catch(f){o(f)}}function c(l){l.done?i(l.value):u(l.value).then(s,a)}c((n=n.apply(e,t||[])).next())})},xF=M0&&M0.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(M0,"__esModule",{value:!0});var b3=xF(ji()),C3=xF(fr()),Q5=xF(require("path")),EWn=xF(GVt()),bWn=xF(require("readline")),CWn=xF(ZVt()),RGt=yWn(kGt()),IGt=process.platform==="win32",hSe=class{constructor(t){this.codeUri=t.codeUri,this.ignoreFiles=t.ignoreFiles,this.includes=t.includes,this.outputFileName=t.outputFileName||`${Date.now()}.zip`,this.outputFilePath=t.outputFilePath||process.cwd(),this.level=t.level||9,this.prefix=t.prefix,this.logger=t.logger||console,this.checkOptions()}checkOptions(){if(C3.default.isEmpty(this.codeUri)&&!C3.default.isString(this.codeUri))throw new Error(`CodeUri incorrect format, expected to be string: ${this.codeUri}`);if(!b3.default.pathExistsSync(this.codeUri))throw new Error(`CodeUri: ${this.codeUri} is not exist`);C3.default.isEmpty(this.includes)||C3.default.forIn(this.includes,t=>{if(!b3.default.pathExistsSync(t))throw new Error(`Include codeUri: ${t} is not exist`)})}run(){return Fne(this,void 0,void 0,function*(){let t=Q5.default.join(this.outputFilePath,this.outputFileName);yield b3.default.ensureDir(this.outputFilePath);let r=b3.default.createWriteStream(t),n=(0,EWn.default)("zip",{zlib:{level:this.level}}).on("warning",i=>this.logger.warn(i)).on("error",i=>{throw i});n.pipe(r);let u=yield this.zipTo(n,this.codeUri);if(this.includes)for(let i of this.includes){let o=yield this.zipTo(n,i)}return yield new Promise((i,o)=>{let s;n.on("progress",a=>{let{total:c,size:l,level:f}=this.bytesToSize(C3.default.get(a,"fs.totalBytes"));if(s||(s=new RGt.default(RGt.ProgressType.Bar,{total:Number(c)},`Zipping ((:bar)) :current/:total(${l}) :percent :etas`)),C3.default.get(a,"fs.processedBytes")){let{total:p}=this.bytesToSize(C3.default.get(a,"fs.processedBytes"),f);s.update(p)}}),r.on("close",()=>{let a=n.pointer();this.logger.debug("Package complete."),i({count:u,compressedSize:a,outputFile:t})});try{n.finalize()}catch(a){o(a)}})})}bytesToSize(t,r){let n=["Bytes","KB","MB","GB","TB"];if(t==0)return{total:0,size:"Bytes",level:0};let u=r||Math.floor(Math.log(t)/Math.log(1024));return{total:Math.round(t/Math.pow(1024,u)),size:n[u],level:u}}zipTo(t,r){return Fne(this,void 0,void 0,function*(){let n=Q5.default.resolve(r),u=b3.default.statSync(r);if(u.isFile()){let s=this.isBootstrapPath(n,Q5.default.dirname(n));return t.file(n,{prefix:this.prefix,name:Q5.default.basename(r),mode:s?u.mode|73:u.mode}),1}let i=CWn.default.sync({ignoreFiles:this.ignoreFiles,path:r,includeEmpty:!0}),o=new Date("2023-11-01");for(let s of i){let a=Q5.default.join(r,s),c;try{c=yield b3.default.lstat(a),c.mtime=o}catch(h){this.logger.warn(`Before zip: could not found fPath ${a}, absolute fPath is ${Q5.default.resolve(a)}, exception is ${h}, skipping`);continue}let l=Q5.default.resolve(a),f=Q5.default.relative(n,l),p=this.isBootstrapPath(l,n);if(c.size===1067){let h=yield this.readLines(a);if(h[0]==="XSym"&&h.length===5){let d=h[3];t.symlink(f,d,p||IGt?c.mode|73:c.mode);continue}}t.file(a,{prefix:this.prefix,name:f,mode:p||IGt?c.mode|73:c.mode,stats:c})}return i.length})}isBootstrapPath(t,r){return Q5.default.join(r,"bootstrap")===t}readLines(t){return Fne(this,void 0,void 0,function*(){return new Promise((r,n)=>{let u=[];bWn.default.createInterface({input:b3.default.createReadStream(t)}).on("line",i=>u.push(i)).on("close",()=>r(u)).on("error",n)})})}};M0.default=e=>Fne(void 0,void 0,void 0,function*(){return yield new hSe(e).run()})});var LGt=N(_ne=>{"use strict";Object.defineProperty(_ne,"__esModule",{value:!0});_ne.publishSchema=void 0;_ne.publishSchema={type:"object",required:["Edition","Type","Name","Provider","Version","Description","HomePage","Tags","Category","Service","Effective","Parameters"],properties:{Edition:{type:"string",enum:["3.0.0"]},Type:{type:"string",enum:["Component","Plugin","Project"]},Name:{type:"string"},Provider:{type:"array",items:{type:"string",enum:["\u963F\u91CC\u4E91","\u817E\u8BAF\u4E91","\u534E\u4E3A\u4E91","\u767E\u5EA6\u667A\u80FD\u4E91","AWS","Azure","Google Cloud Platform","\u4E13\u6709\u4E91","\u5176\u5B83","Alibaba Cloud","Tencent Cloud","Huawei Cloud","Baidu Cloud","Private Cloud","Others"]}},Version:{type:"string"},Description:{type:"string"},HomePage:{type:"string"},Tags:{type:"array",items:{type:"string"}},Category:{type:"string",enum:["\u4EBA\u5DE5\u667A\u80FD","Web \u5E94\u7528","\u57FA\u7840\u4E91\u670D\u52A1","\u65B0\u624B\u5165\u95E8","\u5F00\u6E90\u9879\u76EE","Jamstack","\u51FD\u6570Connector","IoT","\u5176\u5B83","\u6570\u636E\u5904\u7406","\u76D1\u63A7\u544A\u8B66","\u56FE\u6587\u5904\u7406","\u97F3\u89C6\u9891\u5904\u7406","\u5168\u6808\u5E94\u7528","Web\u6846\u67B6","\u4E91\u5E94\u7528","\u57FA\u7840\u4E91\u4EA7\u54C1","Artificial Intelligence","Web Appilication","Basic cloud services","onboarding","Open Source","Function Connector","Others","Big Data","Monitoring alarm","Image and text processing","Audio and video processing","Fullstack application","Web Framework","Cloud Application","Basic cloud products"]},Service:{type:"object"},Organization:{type:"string"},Effective:{type:"string",enum:["Public","Private","Organization"]},Parameters:{type:"object",properties:{type:{type:"string"},additionalProperties:{type:"boolean"},required:{type:"array"},properties:{type:"object"}}}}}});var Ej=N(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.regexpCode=mu.getEsmExportName=mu.getProperty=mu.safeStringify=mu.stringify=mu.strConcat=mu.addCodeArg=mu.str=mu._=mu.nil=mu._Code=mu.Name=mu.IDENTIFIER=mu._CodeOrName=void 0;var Dj=class{};mu._CodeOrName=Dj;mu.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var x3=class extends Dj{constructor(t){if(super(),!mu.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};mu.Name=x3;var Xp=class extends Dj{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof x3&&(r[n.str]=(r[n.str]||0)+1),r),{})}};mu._Code=Xp;mu.nil=new Xp("");function NGt(e,...t){let r=[e[0]],n=0;for(;n<t.length;)mSe(r,t[n]),r.push(e[++n]);return new Xp(r)}mu._=NGt;var dSe=new Xp("+");function qGt(e,...t){let r=[yj(e[0])],n=0;for(;n<t.length;)r.push(dSe),mSe(r,t[n]),r.push(dSe,yj(e[++n]));return xWn(r),new Xp(r)}mu.str=qGt;function mSe(e,t){t instanceof Xp?e.push(...t._items):t instanceof x3?e.push(t):e.push(_Wn(t))}mu.addCodeArg=mSe;function xWn(e){let t=1;for(;t<e.length-1;){if(e[t]===dSe){let r=AWn(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function AWn(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof x3||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof x3))return`"${e}${t.slice(1)}`}function FWn(e,t){return t.emptyStr()?e:e.emptyStr()?t:qGt`${e}${t}`}mu.strConcat=FWn;function _Wn(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:yj(Array.isArray(e)?e.join(","):e)}function BWn(e){return new Xp(yj(e))}mu.stringify=BWn;function yj(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}mu.safeStringify=yj;function wWn(e){return typeof e=="string"&&mu.IDENTIFIER.test(e)?new Xp(`.${e}`):NGt`[${e}]`}mu.getProperty=wWn;function SWn(e){if(typeof e=="string"&&mu.IDENTIFIER.test(e))return new Xp(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}mu.getEsmExportName=SWn;function OWn(e){return new Xp(e.toString())}mu.regexpCode=OWn});var ySe=N(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});Ml.ValueScope=Ml.ValueScopeName=Ml.Scope=Ml.varKinds=Ml.UsedValueState=void 0;var Rf=Ej(),gSe=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},vSe;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(vSe=Ml.UsedValueState||(Ml.UsedValueState={}));Ml.varKinds={const:new Rf.Name("const"),let:new Rf.Name("let"),var:new Rf.Name("var")};var Bne=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof Rf.Name?t:this.name(t)}name(t){return new Rf.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Ml.Scope=Bne;var wne=class extends Rf.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,Rf._)`.${new Rf.Name(r)}[${n}]`}};Ml.ValueScopeName=wne;var TWn=(0,Rf._)`\n`,DSe=class extends Bne{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?TWn:Rf.nil}}get(){return this._scope}name(t){return new wne(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let u=this.toName(t),{prefix:i}=u,o=(n=r.key)!==null&&n!==void 0?n:r.ref,s=this._values[i];if(s){let l=s.get(o);if(l)return l}else s=this._values[i]=new Map;s.set(o,u);let a=this._scope[i]||(this._scope[i]=[]),c=a.length;return a[c]=r.ref,u.setValue(r,{property:i,itemIndex:c}),u}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Rf._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,u=>{if(u.value===void 0)throw new Error(`CodeGen: name "${u}" has no value`);return u.value.code},r,n)}_reduceValues(t,r,n={},u){let i=Rf.nil;for(let o in t){let s=t[o];if(!s)continue;let a=n[o]=n[o]||new Map;s.forEach(c=>{if(a.has(c))return;a.set(c,vSe.Started);let l=r(c);if(l){let f=this.opts.es5?Ml.varKinds.var:Ml.varKinds.const;i=(0,Rf._)`${i}${f} ${c} = ${l};${this.opts._n}`}else if(l=u==null?void 0:u(c))i=(0,Rf._)`${i}${l}${this.opts._n}`;else throw new gSe(c);a.set(c,vSe.Completed)})}return i}};Ml.ValueScope=DSe});var Mn=N(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.or=Rn.and=Rn.not=Rn.CodeGen=Rn.operators=Rn.varKinds=Rn.ValueScopeName=Rn.ValueScope=Rn.Scope=Rn.Name=Rn.regexpCode=Rn.stringify=Rn.getProperty=Rn.nil=Rn.strConcat=Rn.str=Rn._=void 0;var iu=Ej(),kd=ySe(),mv=Ej();Object.defineProperty(Rn,"_",{enumerable:!0,get:function(){return mv._}});Object.defineProperty(Rn,"str",{enumerable:!0,get:function(){return mv.str}});Object.defineProperty(Rn,"strConcat",{enumerable:!0,get:function(){return mv.strConcat}});Object.defineProperty(Rn,"nil",{enumerable:!0,get:function(){return mv.nil}});Object.defineProperty(Rn,"getProperty",{enumerable:!0,get:function(){return mv.getProperty}});Object.defineProperty(Rn,"stringify",{enumerable:!0,get:function(){return mv.stringify}});Object.defineProperty(Rn,"regexpCode",{enumerable:!0,get:function(){return mv.regexpCode}});Object.defineProperty(Rn,"Name",{enumerable:!0,get:function(){return mv.Name}});var Pne=ySe();Object.defineProperty(Rn,"Scope",{enumerable:!0,get:function(){return Pne.Scope}});Object.defineProperty(Rn,"ValueScope",{enumerable:!0,get:function(){return Pne.ValueScope}});Object.defineProperty(Rn,"ValueScopeName",{enumerable:!0,get:function(){return Pne.ValueScopeName}});Object.defineProperty(Rn,"varKinds",{enumerable:!0,get:function(){return Pne.varKinds}});Rn.operators={GT:new iu._Code(">"),GTE:new iu._Code(">="),LT:new iu._Code("<"),LTE:new iu._Code("<="),EQ:new iu._Code("==="),NEQ:new iu._Code("!=="),NOT:new iu._Code("!"),OR:new iu._Code("||"),AND:new iu._Code("&&"),ADD:new iu._Code("+")};var Z5=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},ESe=class extends Z5{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?kd.varKinds.var:this.varKind,u=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${u};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=FF(this.rhs,t,r)),this}get names(){return this.rhs instanceof iu._CodeOrName?this.rhs.names:{}}},Sne=class extends Z5{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof iu.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=FF(this.rhs,t,r),this}get names(){let t=this.lhs instanceof iu.Name?{}:{...this.lhs.names};return Tne(t,this.rhs)}},bSe=class extends Sne{constructor(t,r,n,u){super(t,n,u),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},CSe=class extends Z5{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},xSe=class extends Z5{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},ASe=class extends Z5{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},FSe=class extends Z5{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=FF(this.code,t,r),this}get names(){return this.code instanceof iu._CodeOrName?this.code.names:{}}},bj=class extends Z5{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,u=n.length;for(;u--;){let i=n[u];i.optimizeNames(t,r)||(PWn(t,i.names),n.splice(u,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>_3(t,r.names),{})}},e6=class extends bj{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},_Se=class extends bj{},AF=class extends e6{};AF.kind="else";var A3=class e extends e6{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new AF(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(MGt(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=FF(this.condition,t,r),this}get names(){let t=super.names;return Tne(t,this.condition),this.else&&_3(t,this.else.names),t}};A3.kind="if";var F3=class extends e6{};F3.kind="for";var BSe=class extends F3{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=FF(this.iteration,t,r),this}get names(){return _3(super.names,this.iteration.names)}},wSe=class extends F3{constructor(t,r,n,u){super(),this.varKind=t,this.name=r,this.from=n,this.to=u}render(t){let r=t.es5?kd.varKinds.var:this.varKind,{name:n,from:u,to:i}=this;return`for(${r} ${n}=${u}; ${n}<${i}; ${n}++)`+super.render(t)}get names(){let t=Tne(super.names,this.from);return Tne(t,this.to)}},One=class extends F3{constructor(t,r,n,u){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=u}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=FF(this.iterable,t,r),this}get names(){return _3(super.names,this.iterable.names)}},Cj=class extends e6{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Cj.kind="func";var xj=class extends bj{render(t){return"return "+super.render(t)}};xj.kind="return";var SSe=class extends e6{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,u;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(u=this.finally)===null||u===void 0||u.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&_3(t,this.catch.names),this.finally&&_3(t,this.finally.names),t}},Aj=class extends e6{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Aj.kind="catch";var Fj=class extends e6{render(t){return"finally"+super.render(t)}};Fj.kind="finally";var OSe=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
782
782
|
`:""},this._extScope=t,this._scope=new kd.Scope({parent:t}),this._nodes=[new _Se]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,u){let i=this._scope.toName(r);return n!==void 0&&u&&(this._constants[i.str]=n),this._leafNode(new ESe(t,i,n)),i}const(t,r,n){return this._def(kd.varKinds.const,t,r,n)}let(t,r,n){return this._def(kd.varKinds.let,t,r,n)}var(t,r,n){return this._def(kd.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new Sne(t,r,n))}add(t,r){return this._leafNode(new bSe(t,Rn.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==iu.nil&&this._leafNode(new FSe(t)),this}object(...t){let r=["{"];for(let[n,u]of t)r.length>1&&r.push(","),r.push(n),(n!==u||this.opts.es5)&&(r.push(":"),(0,iu.addCodeArg)(r,u));return r.push("}"),new iu._Code(r)}if(t,r,n){if(this._blockNode(new A3(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new A3(t))}else(){return this._elseNode(new AF)}endIf(){return this._endBlockNode(A3,AF)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new BSe(t),r)}forRange(t,r,n,u,i=this.opts.es5?kd.varKinds.var:kd.varKinds.let){let o=this._scope.toName(t);return this._for(new wSe(i,o,r,n),()=>u(o))}forOf(t,r,n,u=kd.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let o=r instanceof iu.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,iu._)`${o}.length`,s=>{this.var(i,(0,iu._)`${o}[${s}]`),n(i)})}return this._for(new One("of",u,i,r),()=>n(i))}forIn(t,r,n,u=this.opts.es5?kd.varKinds.var:kd.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,iu._)`Object.keys(${r})`,n);let i=this._scope.toName(t);return this._for(new One("in",u,i,r),()=>n(i))}endFor(){return this._endBlockNode(F3)}label(t){return this._leafNode(new CSe(t))}break(t){return this._leafNode(new xSe(t))}return(t){let r=new xj;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(xj)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let u=new SSe;if(this._blockNode(u),this.code(t),r){let i=this.name("e");this._currNode=u.catch=new Aj(i),r(i)}return n&&(this._currNode=u.finally=new Fj,this.code(n)),this._endBlockNode(Aj,Fj)}throw(t){return this._leafNode(new ASe(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=iu.nil,n,u){return this._blockNode(new Cj(t,r,n)),u&&this.code(u).endFunc(),this}endFunc(){return this._endBlockNode(Cj)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof A3))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};Rn.CodeGen=OSe;function _3(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function Tne(e,t){return t instanceof iu._CodeOrName?_3(e,t.names):e}function FF(e,t,r){if(e instanceof iu.Name)return n(e);if(!u(e))return e;return new iu._Code(e._items.reduce((i,o)=>(o instanceof iu.Name&&(o=n(o)),o instanceof iu._Code?i.push(...o._items):i.push(o),i),[]));function n(i){let o=r[i.str];return o===void 0||t[i.str]!==1?i:(delete t[i.str],o)}function u(i){return i instanceof iu._Code&&i._items.some(o=>o instanceof iu.Name&&t[o.str]===1&&r[o.str]!==void 0)}}function PWn(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function MGt(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,iu._)`!${TSe(e)}`}Rn.not=MGt;var kWn=UGt(Rn.operators.AND);function RWn(...e){return e.reduce(kWn)}Rn.and=RWn;var IWn=UGt(Rn.operators.OR);function jWn(...e){return e.reduce(IWn)}Rn.or=jWn;function UGt(e){return(t,r)=>t===iu.nil?r:r===iu.nil?t:(0,iu._)`${TSe(t)} ${e} ${TSe(r)}`}function TSe(e){return e instanceof iu.Name?e:(0,iu._)`(${e})`}});var gu=N(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.checkStrictMode=In.getErrorPath=In.Type=In.useFunc=In.setEvaluated=In.evaluatedPropsToName=In.mergeEvaluated=In.eachItem=In.unescapeJsonPointer=In.escapeJsonPointer=In.escapeFragment=In.unescapeFragment=In.schemaRefOrVal=In.schemaHasRulesButRef=In.schemaHasRules=In.checkUnknownRules=In.alwaysValidSchema=In.toHash=void 0;var oi=Mn(),LWn=Ej();function NWn(e){let t={};for(let r of e)t[r]=!0;return t}In.toHash=NWn;function qWn(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(WGt(e,t),!VGt(t,e.self.RULES.all))}In.alwaysValidSchema=qWn;function WGt(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let u=n.RULES.keywords;for(let i in t)u[i]||YGt(e,`unknown keyword: "${i}"`)}In.checkUnknownRules=WGt;function VGt(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}In.schemaHasRules=VGt;function MWn(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}In.schemaHasRulesButRef=MWn;function UWn({topSchemaRef:e,schemaPath:t},r,n,u){if(!u){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,oi._)`${r}`}return(0,oi._)`${e}${t}${(0,oi.getProperty)(n)}`}In.schemaRefOrVal=UWn;function $Wn(e){return GGt(decodeURIComponent(e))}In.unescapeFragment=$Wn;function zWn(e){return encodeURIComponent(PSe(e))}In.escapeFragment=zWn;function PSe(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}In.escapeJsonPointer=PSe;function GGt(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}In.unescapeJsonPointer=GGt;function WWn(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}In.eachItem=WWn;function $Gt({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(u,i,o,s)=>{let a=o===void 0?i:o instanceof oi.Name?(i instanceof oi.Name?e(u,i,o):t(u,i,o),o):i instanceof oi.Name?(t(u,o,i),i):r(i,o);return s===oi.Name&&!(a instanceof oi.Name)?n(u,a):a}}In.mergeEvaluated={props:$Gt({mergeNames:(e,t,r)=>e.if((0,oi._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,oi._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,oi._)`${r} || {}`).code((0,oi._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,oi._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,oi._)`${r} || {}`),kSe(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:HGt}),items:$Gt({mergeNames:(e,t,r)=>e.if((0,oi._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,oi._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,oi._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,oi._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function HGt(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,oi._)`{}`);return t!==void 0&&kSe(e,r,t),r}In.evaluatedPropsToName=HGt;function kSe(e,t,r){Object.keys(r).forEach(n=>e.assign((0,oi._)`${t}${(0,oi.getProperty)(n)}`,!0))}In.setEvaluated=kSe;var zGt={};function VWn(e,t){return e.scopeValue("func",{ref:t,code:zGt[t.code]||(zGt[t.code]=new LWn._Code(t.code))})}In.useFunc=VWn;var KGt;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(KGt=In.Type||(In.Type={}));function GWn(e,t,r){if(e instanceof oi.Name){let n=t===KGt.Num;return r?n?(0,oi._)`"[" + ${e} + "]"`:(0,oi._)`"['" + ${e} + "']"`:n?(0,oi._)`"/" + ${e}`:(0,oi._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,oi.getProperty)(e).toString():"/"+PSe(e)}In.getErrorPath=GWn;function YGt(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}In.checkStrictMode=YGt});var t6=N(RSe=>{"use strict";Object.defineProperty(RSe,"__esModule",{value:!0});var Kc=Mn(),HWn={data:new Kc.Name("data"),valCxt:new Kc.Name("valCxt"),instancePath:new Kc.Name("instancePath"),parentData:new Kc.Name("parentData"),parentDataProperty:new Kc.Name("parentDataProperty"),rootData:new Kc.Name("rootData"),dynamicAnchors:new Kc.Name("dynamicAnchors"),vErrors:new Kc.Name("vErrors"),errors:new Kc.Name("errors"),this:new Kc.Name("this"),self:new Kc.Name("self"),scope:new Kc.Name("scope"),json:new Kc.Name("json"),jsonPos:new Kc.Name("jsonPos"),jsonLen:new Kc.Name("jsonLen"),jsonPart:new Kc.Name("jsonPart")};RSe.default=HWn});var _j=N(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});Yc.extendErrors=Yc.resetErrorsCount=Yc.reportExtraError=Yc.reportError=Yc.keyword$DataError=Yc.keywordError=void 0;var au=Mn(),kne=gu(),Ul=t6();Yc.keywordError={message:({keyword:e})=>(0,au.str)`must pass "${e}" keyword validation`};Yc.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,au.str)`"${e}" keyword must be ${t} ($data)`:(0,au.str)`"${e}" keyword is invalid ($data)`};function KWn(e,t=Yc.keywordError,r,n){let{it:u}=e,{gen:i,compositeRule:o,allErrors:s}=u,a=QGt(e,t,r);(n!=null?n:o||s)?XGt(i,a):JGt(u,(0,au._)`[${a}]`)}Yc.reportError=KWn;function YWn(e,t=Yc.keywordError,r){let{it:n}=e,{gen:u,compositeRule:i,allErrors:o}=n,s=QGt(e,t,r);XGt(u,s),i||o||JGt(n,Ul.default.vErrors)}Yc.reportExtraError=YWn;function XWn(e,t){e.assign(Ul.default.errors,t),e.if((0,au._)`${Ul.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,au._)`${Ul.default.vErrors}.length`,t),()=>e.assign(Ul.default.vErrors,null)))}Yc.resetErrorsCount=XWn;function JWn({gen:e,keyword:t,schemaValue:r,data:n,errsCount:u,it:i}){if(u===void 0)throw new Error("ajv implementation error");let o=e.name("err");e.forRange("i",u,Ul.default.errors,s=>{e.const(o,(0,au._)`${Ul.default.vErrors}[${s}]`),e.if((0,au._)`${o}.instancePath === undefined`,()=>e.assign((0,au._)`${o}.instancePath`,(0,au.strConcat)(Ul.default.instancePath,i.errorPath))),e.assign((0,au._)`${o}.schemaPath`,(0,au.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,au._)`${o}.schema`,r),e.assign((0,au._)`${o}.data`,n))})}Yc.extendErrors=JWn;function XGt(e,t){let r=e.const("err",t);e.if((0,au._)`${Ul.default.vErrors} === null`,()=>e.assign(Ul.default.vErrors,(0,au._)`[${r}]`),(0,au._)`${Ul.default.vErrors}.push(${r})`),e.code((0,au._)`${Ul.default.errors}++`)}function JGt(e,t){let{gen:r,validateName:n,schemaEnv:u}=e;u.$async?r.throw((0,au._)`new ${e.ValidationError}(${t})`):(r.assign((0,au._)`${n}.errors`,t),r.return(!1))}var B3={keyword:new au.Name("keyword"),schemaPath:new au.Name("schemaPath"),params:new au.Name("params"),propertyName:new au.Name("propertyName"),message:new au.Name("message"),schema:new au.Name("schema"),parentSchema:new au.Name("parentSchema")};function QGt(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,au._)`{}`:QWn(e,t,r)}function QWn(e,t,r={}){let{gen:n,it:u}=e,i=[ZWn(u,r),eVn(e,r)];return tVn(e,t,i),n.object(...i)}function ZWn({errorPath:e},{instancePath:t}){let r=t?(0,au.str)`${e}${(0,kne.getErrorPath)(t,kne.Type.Str)}`:e;return[Ul.default.instancePath,(0,au.strConcat)(Ul.default.instancePath,r)]}function eVn({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let u=n?t:(0,au.str)`${t}/${e}`;return r&&(u=(0,au.str)`${u}${(0,kne.getErrorPath)(r,kne.Type.Str)}`),[B3.schemaPath,u]}function tVn(e,{params:t,message:r},n){let{keyword:u,data:i,schemaValue:o,it:s}=e,{opts:a,propertyName:c,topSchemaRef:l,schemaPath:f}=s;n.push([B3.keyword,u],[B3.params,typeof t=="function"?t(e):t||(0,au._)`{}`]),a.messages&&n.push([B3.message,typeof r=="function"?r(e):r]),a.verbose&&n.push([B3.schema,o],[B3.parentSchema,(0,au._)`${l}${f}`],[Ul.default.data,i]),c&&n.push([B3.propertyName,c])}});var eHt=N(_F=>{"use strict";Object.defineProperty(_F,"__esModule",{value:!0});_F.boolOrEmptySchema=_F.topBoolOrEmptySchema=void 0;var rVn=_j(),nVn=Mn(),uVn=t6(),iVn={message:"boolean schema is false"};function oVn(e){let{gen:t,schema:r,validateName:n}=e;r===!1?ZGt(e,!1):typeof r=="object"&&r.$async===!0?t.return(uVn.default.data):(t.assign((0,nVn._)`${n}.errors`,null),t.return(!0))}_F.topBoolOrEmptySchema=oVn;function sVn(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),ZGt(e)):r.var(t,!0)}_F.boolOrEmptySchema=sVn;function ZGt(e,t){let{gen:r,data:n}=e,u={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,rVn.reportError)(u,iVn,void 0,t)}});var ISe=N(BF=>{"use strict";Object.defineProperty(BF,"__esModule",{value:!0});BF.getRules=BF.isJSONType=void 0;var aVn=["string","number","integer","boolean","null","object","array"],cVn=new Set(aVn);function lVn(e){return typeof e=="string"&&cVn.has(e)}BF.isJSONType=lVn;function fVn(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}BF.getRules=fVn});var jSe=N(gv=>{"use strict";Object.defineProperty(gv,"__esModule",{value:!0});gv.shouldUseRule=gv.shouldUseGroup=gv.schemaHasRulesForType=void 0;function pVn({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&tHt(e,n)}gv.schemaHasRulesForType=pVn;function tHt(e,t){return t.rules.some(r=>rHt(e,r))}gv.shouldUseGroup=tHt;function rHt(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}gv.shouldUseRule=rHt});var wj=N(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});cc.reportTypeError=cc.checkDataTypes=cc.checkDataType=cc.coerceAndCheckDataType=cc.getJSONTypes=cc.getSchemaTypes=cc.DataType=void 0;var hVn=ISe(),dVn=jSe(),mVn=_j(),wn=Mn(),nHt=gu(),Bj;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Bj=cc.DataType||(cc.DataType={}));function gVn(e){let t=uHt(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}cc.getSchemaTypes=gVn;function uHt(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(hVn.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}cc.getJSONTypes=uHt;function vVn(e,t){let{gen:r,data:n,opts:u}=e,i=DVn(t,u.coerceTypes),o=t.length>0&&!(i.length===0&&t.length===1&&(0,dVn.schemaHasRulesForType)(e,t[0]));if(o){let s=NSe(t,n,u.strictNumbers,Bj.Wrong);r.if(s,()=>{i.length?yVn(e,t,i):qSe(e)})}return o}cc.coerceAndCheckDataType=vVn;var iHt=new Set(["string","number","integer","boolean","null"]);function DVn(e,t){return t?e.filter(r=>iHt.has(r)||t==="array"&&r==="array"):[]}function yVn(e,t,r){let{gen:n,data:u,opts:i}=e,o=n.let("dataType",(0,wn._)`typeof ${u}`),s=n.let("coerced",(0,wn._)`undefined`);i.coerceTypes==="array"&&n.if((0,wn._)`${o} == 'object' && Array.isArray(${u}) && ${u}.length == 1`,()=>n.assign(u,(0,wn._)`${u}[0]`).assign(o,(0,wn._)`typeof ${u}`).if(NSe(t,u,i.strictNumbers),()=>n.assign(s,u))),n.if((0,wn._)`${s} !== undefined`);for(let c of r)(iHt.has(c)||c==="array"&&i.coerceTypes==="array")&&a(c);n.else(),qSe(e),n.endIf(),n.if((0,wn._)`${s} !== undefined`,()=>{n.assign(u,s),EVn(e,s)});function a(c){switch(c){case"string":n.elseIf((0,wn._)`${o} == "number" || ${o} == "boolean"`).assign(s,(0,wn._)`"" + ${u}`).elseIf((0,wn._)`${u} === null`).assign(s,(0,wn._)`""`);return;case"number":n.elseIf((0,wn._)`${o} == "boolean" || ${u} === null
|
|
783
783
|
|| (${o} == "string" && ${u} && ${u} == +${u})`).assign(s,(0,wn._)`+${u}`);return;case"integer":n.elseIf((0,wn._)`${o} === "boolean" || ${u} === null
|
|
784
784
|
|| (${o} === "string" && ${u} && ${u} == +${u} && !(${u} % 1))`).assign(s,(0,wn._)`+${u}`);return;case"boolean":n.elseIf((0,wn._)`${u} === "false" || ${u} === 0 || ${u} === null`).assign(s,!1).elseIf((0,wn._)`${u} === "true" || ${u} === 1`).assign(s,!0);return;case"null":n.elseIf((0,wn._)`${u} === "" || ${u} === 0 || ${u} === false`),n.assign(s,null);return;case"array":n.elseIf((0,wn._)`${o} === "string" || ${o} === "number"
|
|
@@ -786,9 +786,9 @@ globstar while`,t,f,r,p,h),this.matchOne(t.slice(f),r.slice(p),n))return this.de
|
|
|
786
786
|
missingProperty: ${n},
|
|
787
787
|
depsCount: ${t},
|
|
788
788
|
deps: ${r}}`};var cKn={keyword:"dependencies",type:"object",schemaType:"object",error:F2.error,code(e){let[t,r]=lKn(e);xKt(e,t),AKt(e,r)}};function lKn({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let u=Array.isArray(e[n])?t:r;u[n]=e[n]}return[t,r]}function xKt(e,t=e.schema){let{gen:r,data:n,it:u}=e;if(Object.keys(t).length===0)return;let i=r.let("missing");for(let o in t){let s=t[o];if(s.length===0)continue;let a=(0,Wj.propertyInData)(r,n,o,u.opts.ownProperties);e.setParams({property:o,depsCount:s.length,deps:s.join(", ")}),u.allErrors?r.if(a,()=>{for(let c of s)(0,Wj.checkReportMissingProp)(e,c)}):(r.if((0,BOe._)`${a} && (${(0,Wj.checkMissingProp)(e,s,i)})`),(0,Wj.reportMissingProp)(e,i),r.else())}}F2.validatePropertyDeps=xKt;function AKt(e,t=e.schema){let{gen:r,data:n,keyword:u,it:i}=e,o=r.name("valid");for(let s in t)(0,aKn.alwaysValidSchema)(i,t[s])||(r.if((0,Wj.propertyInData)(r,n,s,i.opts.ownProperties),()=>{let a=e.subschema({keyword:u,schemaProp:s},o);e.mergeValidEvaluated(a,o)},()=>r.var(o,!0)),e.ok(o))}F2.validateSchemaDeps=AKt;F2.default=cKn});var BKt=N(wOe=>{"use strict";Object.defineProperty(wOe,"__esModule",{value:!0});var _Kt=Mn(),fKn=gu(),pKn={message:"property name must be valid",params:({params:e})=>(0,_Kt._)`{propertyName: ${e.propertyName}}`},hKn={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:pKn,code(e){let{gen:t,schema:r,data:n,it:u}=e;if((0,fKn.alwaysValidSchema)(u,r))return;let i=t.name("valid");t.forIn("key",n,o=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},i),t.if((0,_Kt.not)(i),()=>{e.error(!0),u.allErrors||t.break()})}),e.ok(i)}};wOe.default=hKn});var OOe=N(SOe=>{"use strict";Object.defineProperty(SOe,"__esModule",{value:!0});var Qne=Jp(),jd=Mn(),dKn=t6(),Zne=gu(),mKn={message:"must NOT have additional properties",params:({params:e})=>(0,jd._)`{additionalProperty: ${e.additionalProperty}}`},gKn={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:mKn,code(e){let{gen:t,schema:r,parentSchema:n,data:u,errsCount:i,it:o}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:s,opts:a}=o;if(o.props=!0,a.removeAdditional!=="all"&&(0,Zne.alwaysValidSchema)(o,r))return;let c=(0,Qne.allSchemaProperties)(n.properties),l=(0,Qne.allSchemaProperties)(n.patternProperties);f(),e.ok((0,jd._)`${i} === ${dKn.default.errors}`);function f(){t.forIn("key",u,v=>{!c.length&&!l.length?d(v):t.if(p(v),()=>d(v))})}function p(v){let y;if(c.length>8){let g=(0,Zne.schemaRefOrVal)(o,n.properties,"properties");y=(0,Qne.isOwnProperty)(t,g,v)}else c.length?y=(0,jd.or)(...c.map(g=>(0,jd._)`${v} === ${g}`)):y=jd.nil;return l.length&&(y=(0,jd.or)(y,...l.map(g=>(0,jd._)`${(0,Qne.usePattern)(e,g)}.test(${v})`))),(0,jd.not)(y)}function h(v){t.code((0,jd._)`delete ${u}[${v}]`)}function d(v){if(a.removeAdditional==="all"||a.removeAdditional&&r===!1){h(v);return}if(r===!1){e.setParams({additionalProperty:v}),e.error(),s||t.break();return}if(typeof r=="object"&&!(0,Zne.alwaysValidSchema)(o,r)){let y=t.name("valid");a.removeAdditional==="failing"?(m(v,y,!1),t.if((0,jd.not)(y),()=>{e.reset(),h(v)})):(m(v,y),s||t.if((0,jd.not)(y),()=>t.break()))}}function m(v,y,g){let D={keyword:"additionalProperties",dataProp:v,dataPropType:Zne.Type.Str};g===!1&&Object.assign(D,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(D,y)}}};SOe.default=gKn});var OKt=N(POe=>{"use strict";Object.defineProperty(POe,"__esModule",{value:!0});var vKn=Pj(),wKt=Jp(),TOe=gu(),SKt=OOe(),DKn={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:u,it:i}=e;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&SKt.default.code(new vKn.KeywordCxt(i,SKt.default,"additionalProperties"));let o=(0,wKt.allSchemaProperties)(r);for(let f of o)i.definedProperties.add(f);i.opts.unevaluated&&o.length&&i.props!==!0&&(i.props=TOe.mergeEvaluated.props(t,(0,TOe.toHash)(o),i.props));let s=o.filter(f=>!(0,TOe.alwaysValidSchema)(i,r[f]));if(s.length===0)return;let a=t.name("valid");for(let f of s)c(f)?l(f):(t.if((0,wKt.propertyInData)(t,u,f,i.opts.ownProperties)),l(f),i.allErrors||t.else().var(a,!0),t.endIf()),e.it.definedProperties.add(f),e.ok(a);function c(f){return i.opts.useDefaults&&!i.compositeRule&&r[f].default!==void 0}function l(f){e.subschema({keyword:"properties",schemaProp:f,dataProp:f},a)}}};POe.default=DKn});var RKt=N(kOe=>{"use strict";Object.defineProperty(kOe,"__esModule",{value:!0});var TKt=Jp(),eue=Mn(),PKt=gu(),kKt=gu(),yKn={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:u,it:i}=e,{opts:o}=i,s=(0,TKt.allSchemaProperties)(r),a=s.filter(m=>(0,PKt.alwaysValidSchema)(i,r[m]));if(s.length===0||a.length===s.length&&(!i.opts.unevaluated||i.props===!0))return;let c=o.strictSchema&&!o.allowMatchingProperties&&u.properties,l=t.name("valid");i.props!==!0&&!(i.props instanceof eue.Name)&&(i.props=(0,kKt.evaluatedPropsToName)(t,i.props));let{props:f}=i;p();function p(){for(let m of s)c&&h(m),i.allErrors?d(m):(t.var(l,!0),d(m),t.if(l))}function h(m){for(let v in c)new RegExp(m).test(v)&&(0,PKt.checkStrictMode)(i,`property ${v} matches pattern ${m} (use allowMatchingProperties)`)}function d(m){t.forIn("key",n,v=>{t.if((0,eue._)`${(0,TKt.usePattern)(e,m)}.test(${v})`,()=>{let y=a.includes(m);y||e.subschema({keyword:"patternProperties",schemaProp:m,dataProp:v,dataPropType:kKt.Type.Str},l),i.opts.unevaluated&&f!==!0?t.assign((0,eue._)`${f}[${v}]`,!0):!y&&!i.allErrors&&t.if((0,eue.not)(l),()=>t.break())})})}}};kOe.default=yKn});var IKt=N(ROe=>{"use strict";Object.defineProperty(ROe,"__esModule",{value:!0});var EKn=gu(),bKn={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,EKn.alwaysValidSchema)(n,r)){e.fail();return}let u=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},u),e.failResult(u,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};ROe.default=bKn});var jKt=N(IOe=>{"use strict";Object.defineProperty(IOe,"__esModule",{value:!0});var CKn=Jp(),xKn={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:CKn.validateUnion,error:{message:"must match a schema in anyOf"}};IOe.default=xKn});var LKt=N(jOe=>{"use strict";Object.defineProperty(jOe,"__esModule",{value:!0});var tue=Mn(),AKn=gu(),FKn={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,tue._)`{passingSchemas: ${e.passing}}`},_Kn={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:FKn,code(e){let{gen:t,schema:r,parentSchema:n,it:u}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(u.opts.discriminator&&n.discriminator)return;let i=r,o=t.let("valid",!1),s=t.let("passing",null),a=t.name("_valid");e.setParams({passing:s}),t.block(c),e.result(o,()=>e.reset(),()=>e.error(!0));function c(){i.forEach((l,f)=>{let p;(0,AKn.alwaysValidSchema)(u,l)?t.var(a,!0):p=e.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},a),f>0&&t.if((0,tue._)`${a} && ${o}`).assign(o,!1).assign(s,(0,tue._)`[${s}, ${f}]`).else(),t.if(a,()=>{t.assign(o,!0),t.assign(s,f),p&&e.mergeEvaluated(p,tue.Name)})})}}};jOe.default=_Kn});var NKt=N(LOe=>{"use strict";Object.defineProperty(LOe,"__esModule",{value:!0});var BKn=gu(),wKn={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let u=t.name("valid");r.forEach((i,o)=>{if((0,BKn.alwaysValidSchema)(n,i))return;let s=e.subschema({keyword:"allOf",schemaProp:o},u);e.ok(u),e.mergeEvaluated(s)})}};LOe.default=wKn});var UKt=N(NOe=>{"use strict";Object.defineProperty(NOe,"__esModule",{value:!0});var rue=Mn(),MKt=gu(),SKn={message:({params:e})=>(0,rue.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,rue._)`{failingKeyword: ${e.ifClause}}`},OKn={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:SKn,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,MKt.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let u=qKt(n,"then"),i=qKt(n,"else");if(!u&&!i)return;let o=t.let("valid",!0),s=t.name("_valid");if(a(),e.reset(),u&&i){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(s,c("then",l),c("else",l))}else u?t.if(s,c("then")):t.if((0,rue.not)(s),c("else"));e.pass(o,()=>e.error(!0));function a(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);e.mergeEvaluated(l)}function c(l,f){return()=>{let p=e.subschema({keyword:l},s);t.assign(o,s),e.mergeValidEvaluated(p,o),f?t.assign(f,(0,rue._)`${l}`):e.setParams({ifClause:l})}}}};function qKt(e,t){let r=e.schema[t];return r!==void 0&&!(0,MKt.alwaysValidSchema)(e,r)}NOe.default=OKn});var $Kt=N(qOe=>{"use strict";Object.defineProperty(qOe,"__esModule",{value:!0});var TKn=gu(),PKn={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,TKn.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};qOe.default=PKn});var zKt=N(MOe=>{"use strict";Object.defineProperty(MOe,"__esModule",{value:!0});var kKn=COe(),RKn=yKt(),IKn=xOe(),jKn=bKt(),LKn=CKt(),NKn=FKt(),qKn=BKt(),MKn=OOe(),UKn=OKt(),$Kn=RKt(),zKn=IKt(),WKn=jKt(),VKn=LKt(),GKn=NKt(),HKn=UKt(),KKn=$Kt();function YKn(e=!1){let t=[zKn.default,WKn.default,VKn.default,GKn.default,HKn.default,KKn.default,qKn.default,MKn.default,NKn.default,UKn.default,$Kn.default];return e?t.push(RKn.default,jKn.default):t.push(kKn.default,IKn.default),t.push(LKn.default),t}MOe.default=YKn});var WKt=N(UOe=>{"use strict";Object.defineProperty(UOe,"__esModule",{value:!0});var Go=Mn(),XKn={message:({schemaCode:e})=>(0,Go.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Go._)`{format: ${e}}`},JKn={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:XKn,code(e,t){let{gen:r,data:n,$data:u,schema:i,schemaCode:o,it:s}=e,{opts:a,errSchemaPath:c,schemaEnv:l,self:f}=s;if(!a.validateFormats)return;u?p():h();function p(){let d=r.scopeValue("formats",{ref:f.formats,code:a.code.formats}),m=r.const("fDef",(0,Go._)`${d}[${o}]`),v=r.let("fType"),y=r.let("format");r.if((0,Go._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(v,(0,Go._)`${m}.type || "string"`).assign(y,(0,Go._)`${m}.validate`),()=>r.assign(v,(0,Go._)`"string"`).assign(y,m)),e.fail$data((0,Go.or)(g(),D()));function g(){return a.strictSchema===!1?Go.nil:(0,Go._)`${o} && !${y}`}function D(){let E=l.$async?(0,Go._)`(${m}.async ? await ${y}(${n}) : ${y}(${n}))`:(0,Go._)`${y}(${n})`,b=(0,Go._)`(typeof ${y} == "function" ? ${E} : ${y}.test(${n}))`;return(0,Go._)`${y} && ${y} !== true && ${v} === ${t} && !${b}`}}function h(){let d=f.formats[i];if(!d){g();return}if(d===!0)return;let[m,v,y]=D(d);m===t&&e.pass(E());function g(){if(a.strictSchema===!1){f.logger.warn(b());return}throw new Error(b());function b(){return`unknown format "${i}" ignored in schema at path "${c}"`}}function D(b){let C=b instanceof RegExp?(0,Go.regexpCode)(b):a.code.formats?(0,Go._)`${a.code.formats}${(0,Go.getProperty)(i)}`:void 0,x=r.scopeValue("formats",{key:i,ref:b,code:C});return typeof b=="object"&&!(b instanceof RegExp)?[b.type||"string",b.validate,(0,Go._)`${x}.validate`]:["string",b,x]}function E(){if(typeof d=="object"&&!(d instanceof RegExp)&&d.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Go._)`await ${y}(${n})`}return typeof v=="function"?(0,Go._)`${y}(${n})`:(0,Go._)`${y}.test(${n})`}}}};UOe.default=JKn});var VKt=N($Oe=>{"use strict";Object.defineProperty($Oe,"__esModule",{value:!0});var QKn=WKt(),ZKn=[QKn.default];$Oe.default=ZKn});var GKt=N(kF=>{"use strict";Object.defineProperty(kF,"__esModule",{value:!0});kF.contentVocabulary=kF.metadataVocabulary=void 0;kF.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];kF.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var KKt=N(zOe=>{"use strict";Object.defineProperty(zOe,"__esModule",{value:!0});var eYn=tKt(),tYn=mKt(),rYn=zKt(),nYn=VKt(),HKt=GKt(),uYn=[eYn.default,tYn.default,(0,rYn.default)(),nYn.default,HKt.metadataVocabulary,HKt.contentVocabulary];zOe.default=uYn});var YKt=N(Vj=>{"use strict";Object.defineProperty(Vj,"__esModule",{value:!0});Vj.DiscrError=void 0;var iYn;(function(e){e.Tag="tag",e.Mapping="mapping"})(iYn=Vj.DiscrError||(Vj.DiscrError={}))});var JKt=N(VOe=>{"use strict";Object.defineProperty(VOe,"__esModule",{value:!0});var RF=Mn(),WOe=YKt(),XKt=Une(),oYn=gu(),sYn={message:({params:{discrError:e,tagName:t}})=>e===WOe.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,RF._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},aYn={keyword:"discriminator",type:"object",schemaType:"object",error:sYn,code(e){let{gen:t,data:r,schema:n,parentSchema:u,it:i}=e,{oneOf:o}=u;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=n.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");let a=t.let("valid",!1),c=t.const("tag",(0,RF._)`${r}${(0,RF.getProperty)(s)}`);t.if((0,RF._)`typeof ${c} == "string"`,()=>l(),()=>e.error(!1,{discrError:WOe.DiscrError.Tag,tag:c,tagName:s})),e.ok(a);function l(){let h=p();t.if(!1);for(let d in h)t.elseIf((0,RF._)`${c} === ${d}`),t.assign(a,f(h[d]));t.else(),e.error(!1,{discrError:WOe.DiscrError.Mapping,tag:c,tagName:s}),t.endIf()}function f(h){let d=t.name("valid"),m=e.subschema({keyword:"oneOf",schemaProp:h},d);return e.mergeEvaluated(m,RF.Name),d}function p(){var h;let d={},m=y(u),v=!0;for(let E=0;E<o.length;E++){let b=o[E];b!=null&&b.$ref&&!(0,oYn.schemaHasRulesButRef)(b,i.self.RULES)&&(b=XKt.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,b==null?void 0:b.$ref),b instanceof XKt.SchemaEnv&&(b=b.schema));let C=(h=b==null?void 0:b.properties)===null||h===void 0?void 0:h[s];if(typeof C!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);v=v&&(m||y(b)),g(C,E)}if(!v)throw new Error(`discriminator: "${s}" must be required`);return d;function y({required:E}){return Array.isArray(E)&&E.includes(s)}function g(E,b){if(E.const)D(E.const,b);else if(E.enum)for(let C of E.enum)D(C,b);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function D(E,b){if(typeof E!="string"||E in d)throw new Error(`discriminator: "${s}" values must be unique strings`);d[E]=b}}}};VOe.default=aYn});var QKt=N((zGu,cYn)=>{cYn.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var iue=N((ao,eYt)=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.MissingRefError=ao.ValidationError=ao.CodeGen=ao.Name=ao.nil=ao.stringify=ao.str=ao._=ao.KeywordCxt=void 0;var lYn=YHt(),fYn=KKt(),pYn=JKt(),ZKt=QKt(),hYn=["/properties"],nue="http://json-schema.org/draft-07/schema",uue=class extends lYn.default{_addVocabularies(){super._addVocabularies(),fYn.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(pYn.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(ZKt,hYn):ZKt;this.addMetaSchema(t,nue,!1),this.refs["http://json-schema.org/schema"]=nue}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(nue)?nue:void 0)}};eYt.exports=ao=uue;Object.defineProperty(ao,"__esModule",{value:!0});ao.default=uue;var dYn=Pj();Object.defineProperty(ao,"KeywordCxt",{enumerable:!0,get:function(){return dYn.KeywordCxt}});var IF=Mn();Object.defineProperty(ao,"_",{enumerable:!0,get:function(){return IF._}});Object.defineProperty(ao,"str",{enumerable:!0,get:function(){return IF.str}});Object.defineProperty(ao,"stringify",{enumerable:!0,get:function(){return IF.stringify}});Object.defineProperty(ao,"nil",{enumerable:!0,get:function(){return IF.nil}});Object.defineProperty(ao,"Name",{enumerable:!0,get:function(){return IF.Name}});Object.defineProperty(ao,"CodeGen",{enumerable:!0,get:function(){return IF.CodeGen}});var mYn=Nne();Object.defineProperty(ao,"ValidationError",{enumerable:!0,get:function(){return mYn.default}});var gYn=qne();Object.defineProperty(ao,"MissingRefError",{enumerable:!0,get:function(){return gYn.default}})});var nYt=N(_2=>{"use strict";var GOe=_2&&_2.__awaiter||function(e,t,r,n){function u(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function s(l){try{c(n.next(l))}catch(f){o(f)}}function a(l){try{c(n.throw(l))}catch(f){o(f)}}function c(l){l.done?i(l.value):u(l.value).then(s,a)}c((n=n.apply(e,t||[])).next())})},Cv=_2&&_2.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_2,"__esModule",{value:!0});_2.publish=_2.list=void 0;var vYn=Cv(jGt()),tYt=Er(),DYn=Cv(require("fs")),U0=LI(),rYt=NI(),th=Cv(VA()),eh=Cv(require("path")),oue=Cv(t9()),yYn=Cv(require("querystring")),jF=fr(),EYn=Cv((wr(),lRe(K7e))),bYn=LGt(),CYn=Cv(iue());function xYn(e){if(!e)throw new Error("Need to publish YAML content");let{Edition:t}=oue.default.load(e);if(t!=="3.0.0"){let r;throw!t||t==="2.0.0"||t==="1.0.0"?r="Edition be 2.0.0 / 1.0.0 version, please use 's cli registry publish'":r="Edition must be 3.0.0 version.",new Error(r)}}function AYn(e,t){if(!e)return{};try{let{resources:r}=oue.default.load(e),n={};if((0,jF.forEach)(r,(i,o)=>{let s=(0,jF.get)(i,"component",""),a=(0,jF.get)(i,"props.definition",""),c=["devsapp/fnf","fnf","devsapp/fnf@dev","fnf@dev"];(0,jF.includes)(c,s)&&a&&(n[o]=a)}),(0,jF.isEmpty)(n))return[];let u=[];return(0,jF.forEach)(n,(i,o)=>{u.push({[o]:(0,U0.getYamlContentText)(eh.default.join(t,"src",i))})}),u}catch{return[]}}function FYn(e){return GOe(this,void 0,void 0,function*(){let t=(0,U0.getYamlContentText)(eh.default.join(e,"publish"));xYn(t);let r=oue.default.load(t),n=`Publish.yaml illegal.
|
|
789
|
-
Application dev: https://
|
|
790
|
-
Component dev: https://
|
|
791
|
-
Plugin dev: https://
|
|
789
|
+
Application dev: https://manual.serverless-devs.com/dev-guide/application/
|
|
790
|
+
Component dev: https://manual.serverless-devs.com/dev-guide/component/
|
|
791
|
+
Plugin dev: https://manual.serverless-devs.com/dev-guide/plugin/
|
|
792
792
|
`,i=new CYn.default({allErrors:!0}).compile(bYn.publishSchema);if(!i(r)){let y=i.errors;if(y)throw y.forEach(g=>{let{schemaPath:D,message:E}=g;th.default.error(`Publish.yaml illegal:
|
|
793
793
|
yamlPath: ${eh.default.join(e,"publish.yaml")}
|
|
794
794
|
schemaPath: ${D}
|
|
@@ -821,7 +821,7 @@ Example:
|
|
|
821
821
|
|
|
822
822
|
${(0,Pt.emoji)("\u{1F4D6}")} Document: ${Dt.underline("https://serverless.help/t/s/registry-delete")}`,SYt=e=>{e.command("delete").usage("[options]").description(QYn).summary(`${(0,Pt.emoji)("\u274C")} Delete specific package`).option("--name <name>","Serverless Package name").option("--version-id <version-id>","Serverless Package version").helpOption("-h, --help","Display help for command").action(async t=>{let{name:r,versionId:n}=t;await new wYt.default({logger:At}).remove(r,n)})}});var ZYn,TYt,PYt=Bt(()=>{gn();wr();vYt();EYt();xYt();BYt();OYt();ZYn=`You can manage Serverless Packages on Serverless Registry.
|
|
823
823
|
|
|
824
|
-
${(0,Pt.emoji)("\u{1F4D6}")} Document: ${Dt.underline("https://serverless.help/t/s/registry")}`,TYt=e=>{let t=e.command("registry");l5(t),t.description(ZYn).usage("[commands] [options]").summary(`${(0,Pt.emoji)("\u{1F6A2}")} Serverless registry platform`).helpOption("-h, --help","Display help for command"),gYt(t),yYt(t),CYt(t),_Yt(t),SYt(t)}});var kYt,j3,RYt,eXn,IYt,jYt=Bt(()=>{wr();gn();kYt=ot(Cf());Zn();j3=ot(fr()),RYt=ot(Er()),eXn=`Application preview.
|
|
824
|
+
${(0,Pt.emoji)("\u{1F4D6}")} Document: ${Dt.underline("https://serverless.help/t/s/registry")}`,TYt=e=>{let t=e.command("registry");l5(t),t.description(ZYn).usage("[commands] [options]").summary(`${(0,Pt.emoji)("\u{1F6A2}")} Serverless registry platform`).addHelpCommand(!1).helpOption("-h, --help","Display help for command"),gYt(t),yYt(t),CYt(t),_Yt(t),SYt(t)}});var kYt,j3,RYt,eXn,IYt,jYt=Bt(()=>{wr();gn();kYt=ot(Cf());Zn();j3=ot(fr()),RYt=ot(Er()),eXn=`Application preview.
|
|
825
825
|
|
|
826
826
|
Example:
|
|
827
827
|
$ s preview
|
|
@@ -1228,7 +1228,7 @@ ${(0,Pt.emoji)("\u{1F4D6}")} Document: ${Dt.underline("https://serverless.help/t
|
|
|
1228
1228
|
${(0,Pt.emoji)("\u{1F50E}")} serverless registry [https://registry.serverless-devs.com]
|
|
1229
1229
|
`);let o=s=>(0,mie.maxBy)(i,a=>(0,mie.get)(a,`${s}.length`))[s].length;At.write(new _B(i,{columns:[{name:"Component",width:o("Component")+4},{name:"Version",width:o("Version")+4},{name:"Size",width:o("Size")+4},{name:"Description",width:o("Description")+10}]}).toString())}});var Ptr,Iv,ktr,Rtr,fcu,Itr,pcu,jtr=Bt(()=>{wr();gn();Ptr=ot(Cf());Zn();Iv=ot(fr()),ktr=ot(iue()),Rtr=ot(Er()),fcu=`Verify Yaml format and values.
|
|
1230
1230
|
|
|
1231
|
-
${(0,Pt.emoji)("\u{1F4D6}")} Document: ${Dt.underline("https://serverless.help/t/s/verify")}`,Itr=e=>{e.command("verify").usage("[
|
|
1231
|
+
${(0,Pt.emoji)("\u{1F4D6}")} Document: ${Dt.underline("https://serverless.help/t/s/verify")}`,Itr=e=>{e.command("verify").usage("[options]").description(fcu).summary(`${(0,Pt.emoji)("\u{1F52D}")} Verify Yaml content`).addHelpCommand(!1).helpOption("-h, --help","Display help for command").action(async t=>{let{template:r}=e.optsWithGlobals(),n=(0,Rtr.parseArgv)(process.argv.slice(2)),u=new ktr.default({allErrors:!0}),i=await new Ptr.default(r,{logger:At}).start();if((0,Iv.get)(i,"yaml.use3x")){let o=await pcu(i,u),s;if((0,Iv.isEmpty)(o))s=Dt.green(`Format verification for [${(0,Iv.get)(i,"yaml.path","").split("/").pop()}] passed.`);else if(n.output)s=o;else throw new Error(u.errorsText(o,{dataVar:"",separator:`
|
|
1232
1232
|
|
|
1233
1233
|
`}));return At.debug(`Template: ${(0,Iv.get)(i,"yaml.path")}`),n["output-file"]?_0(s):YC(s)}At.tips(`Not support template: ${(0,Iv.get)(i,"yaml.path")}, you can update template to 3.x version`)})},pcu=async(e,t)=>{let r=[];for(let n of e.steps){let u=await rAt(n.component);if((0,Iv.isEmpty)(u))continue;let i=t.compile(JSON.parse(u));if(!i(n.props)){let o=i.errors;for(let s of o)s.instancePath=n.projectName+"/props"+s.instancePath,s.keyword==="enum"&&(s.message=s.message+": "+s.params.allowedValues.join(", "));r=r.concat(o)}}return r}});var oh=N(o6=>{"use strict";Object.defineProperty(o6,"__esModule",{value:!0});o6.__assign=function(){return o6.__assign=Object.assign||function(t){for(var r,n=1,u=arguments.length;n<u;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},o6.__assign.apply(this,arguments)};function hcu(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,n=Object.getOwnPropertySymbols(e);u<n.length;u++)t.indexOf(n[u])<0&&Object.prototype.propertyIsEnumerable.call(e,n[u])&&(r[n[u]]=e[n[u]]);return r}function dcu(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function mcu(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),u,i=[],o;try{for(;(t===void 0||t-- >0)&&!(u=n.next()).done;)i.push(u.value)}catch(s){o={error:s}}finally{try{u&&!u.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i}function gcu(e,t,r){if(r||arguments.length===2)for(var n=0,u=t.length,i;n<u;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}o6.__read=mcu;o6.__rest=hcu;o6.__spreadArray=gcu;o6.__values=dcu});var Y3=N(jv=>{"use strict";Object.defineProperty(jv,"__esModule",{value:!0});jv.ActionTypes=void 0;(function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"})(jv.ActionTypes||(jv.ActionTypes={}));jv.SpecialTargets=void 0;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(jv.SpecialTargets||(jv.SpecialTargets={}))});var r_=N(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});var Fa=Y3(),vcu=Fa.ActionTypes.Start,Dcu=Fa.ActionTypes.Stop,ycu=Fa.ActionTypes.Raise,Ecu=Fa.ActionTypes.Send,bcu=Fa.ActionTypes.Cancel,Ccu=Fa.ActionTypes.NullEvent,xcu=Fa.ActionTypes.Assign,Acu=Fa.ActionTypes.After,Fcu=Fa.ActionTypes.DoneState,_cu=Fa.ActionTypes.Log,Bcu=Fa.ActionTypes.Init,wcu=Fa.ActionTypes.Invoke,Scu=Fa.ActionTypes.ErrorExecution,Ocu=Fa.ActionTypes.ErrorPlatform,Tcu=Fa.ActionTypes.ErrorCustom,Pcu=Fa.ActionTypes.Update,kcu=Fa.ActionTypes.Choose,Rcu=Fa.ActionTypes.Pure;xs.after=Acu;xs.assign=xcu;xs.cancel=bcu;xs.choose=kcu;xs.doneState=Fcu;xs.error=Tcu;xs.errorExecution=Scu;xs.errorPlatform=Ocu;xs.init=Bcu;xs.invoke=wcu;xs.log=_cu;xs.nullEvent=Ccu;xs.pure=Rcu;xs.raise=ycu;xs.send=Ecu;xs.start=vcu;xs.stop=Dcu;xs.update=Pcu});var gie=N(n_=>{"use strict";Object.defineProperty(n_,"__esModule",{value:!0});var Icu=".",jcu={},Lcu="xstate.guard",Ncu="";n_.DEFAULT_GUARD_TYPE=Lcu;n_.EMPTY_ACTIVITY_MAP=jcu;n_.STATE_DELIMITER=Icu;n_.TARGETLESS_KEY=Ncu});var s6=N(hke=>{"use strict";Object.defineProperty(hke,"__esModule",{value:!0});var qcu=process.env.NODE_ENV==="production";hke.IS_PRODUCTION=qcu});var Wd=N(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});var Lf=oh(),Mcu=Y3(),Ltr=r_(),wL=gie(),gke=s6(),vie;function Ucu(e){return Object.keys(e)}function Ntr(e,t,r){r===void 0&&(r=wL.STATE_DELIMITER);var n=dke(e,r),u=dke(t,r);return zd(u)?zd(n)?u===n:!1:zd(n)?n in u:Object.keys(n).every(function(i){return i in u?Ntr(n[i],u[i]):!1})}function $cu(e){try{return zd(e)||typeof e=="number"?"".concat(e):e.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function zcu(e){try{return zd(e)||typeof e=="number"?"".concat(e):R2(e)?e.name:e.type}catch{throw new Error("Actions must be strings or objects with a string action.type property.")}}function qtr(e,t){try{return Die(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function Mtr(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function dke(e,t){if(Mtr(e))return e.value;if(Die(e))return mke(e);if(typeof e!="string")return e;var r=qtr(e,t);return mke(r)}function mke(e){if(e.length===1)return e[0];for(var t={},r=t,n=0;n<e.length-1;n++)n===e.length-2?r[e[n]]=e[n+1]:(r[e[n]]={},r=r[e[n]]);return t}function Utr(e,t){for(var r={},n=Object.keys(e),u=0;u<n.length;u++){var i=n[u];r[i]=t(e[i],i,e,u)}return r}function Wcu(e,t,r){var n,u,i={};try{for(var o=Lf.__values(Object.keys(e)),s=o.next();!s.done;s=o.next()){var a=s.value,c=e[a];r(c)&&(i[a]=t(c,a,e))}}catch(l){n={error:l}}finally{try{s&&!s.done&&(u=o.return)&&u.call(o)}finally{if(n)throw n.error}}return i}var Vcu=function(e){return function(t){var r,n,u=t;try{for(var i=Lf.__values(e),o=i.next();!o.done;o=i.next()){var s=o.value;u=u[s]}}catch(a){r={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return u}};function Gcu(e,t){return function(r){var n,u,i=r;try{for(var o=Lf.__values(e),s=o.next();!s.done;s=o.next()){var a=s.value;i=i[t][a]}}catch(c){n={error:c}}finally{try{s&&!s.done&&(u=o.return)&&u.call(o)}finally{if(n)throw n.error}}return i}}function $tr(e){if(!e)return[[]];if(zd(e))return[[e]];var t=ztr(Object.keys(e).map(function(r){var n=e[r];return typeof n!="string"&&(!n||!Object.keys(n).length)?[[r]]:$tr(e[r]).map(function(u){return[r].concat(u)})}));return t}function Hcu(e){var t,r,n={};if(e&&e.length===1&&e[0].length===1)return e[0][0];try{for(var u=Lf.__values(e),i=u.next();!i.done;i=u.next())for(var o=i.value,s=n,a=0;a<o.length;a++){var c=o[a];if(a===o.length-2){s[c]=o[a+1];break}s[c]=s[c]||{},s=s[c]}}catch(l){t={error:l}}finally{try{i&&!i.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return n}function ztr(e){var t;return(t=[]).concat.apply(t,Lf.__spreadArray([],Lf.__read(e),!1))}function vke(e){return Die(e)?e:[e]}function Wtr(e){return e===void 0?[]:vke(e)}function Kcu(e,t,r){var n,u;if(R2(e))return e(t,r.data);var i={};try{for(var o=Lf.__values(Object.keys(e)),s=o.next();!s.done;s=o.next()){var a=s.value,c=e[a];R2(c)?i[a]=c(t,r.data):i[a]=c}}catch(l){n={error:l}}finally{try{s&&!s.done&&(u=o.return)&&u.call(o)}finally{if(n)throw n.error}}return i}function Ycu(e){return/^(done|error)\./.test(e)}function Xcu(e){return!!(e instanceof Promise||e!==null&&(R2(e)||typeof e=="object")&&R2(e.then))}function Jcu(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function Qcu(e,t){var r,n,u=Lf.__read([[],[]],2),i=u[0],o=u[1];try{for(var s=Lf.__values(e),a=s.next();!a.done;a=s.next()){var c=a.value;t(c)?i.push(c):o.push(c)}}catch(l){r={error:l}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return[i,o]}function Dke(e,t){return Utr(e.states,function(r,n){if(r){var u=(zd(t)?void 0:t[n])||(r?r.current:void 0);if(u)return{current:u,states:Dke(r,u)}}})}function Zcu(e,t){return{current:t,states:Dke(e,t)}}function elu(e,t,r,n){gke.IS_PRODUCTION||rn.warn(!!e,"Attempting to update undefined context");var u=e&&r.reduce(function(i,o){var s,a,c=o.assignment,l={state:n,action:o,_event:t},f={};if(R2(c))f=c(i,t.data,l);else try{for(var p=Lf.__values(Object.keys(c)),h=p.next();!h.done;h=p.next()){var d=h.value,m=c[d];f[d]=R2(m)?m(i,t.data,l):m}}catch(v){s={error:v}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(s)throw s.error}}return Object.assign({},i,f)},e);return u}rn.warn=function(){};gke.IS_PRODUCTION||(rn.warn=function(e,t){var r=e instanceof Error?e:void 0;if(!(!r&&e)&&console!==void 0){var n=["Warning: ".concat(t)];r&&n.push(r),console.warn.apply(console,n)}});function Die(e){return Array.isArray(e)}function R2(e){return typeof e=="function"}function zd(e){return typeof e=="string"}function tlu(e,t){if(e)return zd(e)?{type:wL.DEFAULT_GUARD_TYPE,name:e,predicate:t?t[e]:void 0}:R2(e)?{type:wL.DEFAULT_GUARD_TYPE,name:e.name,predicate:e}:e}function rlu(e){try{return"subscribe"in e&&R2(e.subscribe)}catch{return!1}}var Vtr=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),nlu=(vie={},vie[Vtr]=function(){return this},vie[Symbol.observable]=function(){return this},vie);function Gtr(e){return!!e&&"__xstatenode"in e}function ulu(e){return!!e&&typeof e.send=="function"}var ilu=function(){var e=0;return function(){return e++,e.toString(16)}}();function Htr(e,t){return zd(e)||typeof e=="number"?Lf.__assign({type:e},t):e}function olu(e,t){if(!zd(e)&&"$$type"in e&&e.$$type==="scxml")return e;var r=Htr(e);return Lf.__assign({name:r.type,data:r,$$type:"scxml",type:"external"},t)}function slu(e,t){var r=vke(t).map(function(n){return typeof n>"u"||typeof n=="string"||Gtr(n)?{target:n,event:e}:Lf.__assign(Lf.__assign({},n),{event:e})});return r}function alu(e){if(!(e===void 0||e===wL.TARGETLESS_KEY))return Wtr(e)}function clu(e,t,r){if(!gke.IS_PRODUCTION){var n=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(r,"', error was '").concat(e,"'.").concat(n));else{var u=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(r,"'. ")+"Original error: '".concat(e,"'. ").concat(n," Current error is '").concat(t,"'.").concat(u))}}}function llu(e,t,r,n,u){var i=e.options.guards,o={state:u,cond:t,_event:n};if(t.type===wL.DEFAULT_GUARD_TYPE)return((i==null?void 0:i[t.name])||t.predicate)(r,n.data,o);var s=i==null?void 0:i[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(r,n.data,o)}function flu(e){return typeof e=="string"?{type:e}:e}function plu(e,t,r){var n=function(){},u=typeof e=="object",i=u?e:null;return{next:((u?e.next:e)||n).bind(i),error:((u?e.error:t)||n).bind(i),complete:((u?e.complete:r)||n).bind(i)}}function hlu(e,t){return"".concat(e,":invocation[").concat(t,"]")}function dlu(e){return(e.type===Ltr.raise||e.type===Ltr.send&&e.to===Mcu.SpecialTargets.Internal)&&typeof e.delay!="number"}rn.createInvokeId=hlu;rn.evaluateGuard=llu;rn.flatten=ztr;rn.getActionType=zcu;rn.getEventType=$cu;rn.interopSymbols=nlu;rn.isActor=ulu;rn.isArray=Die;rn.isBehavior=Jcu;rn.isBuiltInEvent=Ycu;rn.isFunction=R2;rn.isMachine=Gtr;rn.isObservable=rlu;rn.isPromiseLike=Xcu;rn.isRaisableAction=dlu;rn.isStateLike=Mtr;rn.isString=zd;rn.keys=Ucu;rn.mapContext=Kcu;rn.mapFilterValues=Wcu;rn.mapValues=Utr;rn.matchesState=Ntr;rn.nestedPath=Gcu;rn.normalizeTarget=alu;rn.partition=Qcu;rn.path=Vcu;rn.pathToStateValue=mke;rn.pathsToStateValue=Hcu;rn.reportUnhandledExceptionOnInvocation=clu;rn.symbolObservable=Vtr;rn.toArray=Wtr;rn.toArrayStrict=vke;rn.toEventObject=Htr;rn.toGuard=tlu;rn.toInvokeSource=flu;rn.toObserver=plu;rn.toSCXMLEvent=olu;rn.toStatePath=qtr;rn.toStatePaths=$tr;rn.toStateValue=dke;rn.toTransitionConfigArray=slu;rn.uniqueId=ilu;rn.updateContext=elu;rn.updateHistoryStates=Dke;rn.updateHistoryValue=Zcu});var u_=N(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});var Eu=oh(),sh=Y3(),_a=r_(),ru=Wd(),Ktr=s6(),mlu=ru.toSCXMLEvent({type:_a.init});function yke(e,t){return t&&t[e]||void 0}function yie(e,t){var r;if(ru.isString(e)||typeof e=="number"){var n=yke(e,t);ru.isFunction(n)?r={type:e,exec:n}:n?r=n:r={type:e,exec:void 0}}else if(ru.isFunction(e))r={type:e.name||e.toString(),exec:e};else{var n=yke(e.type,t);if(ru.isFunction(n))r=Eu.__assign(Eu.__assign({},e),{exec:n});else if(n){var u=n.type||e.type;r=Eu.__assign(Eu.__assign(Eu.__assign({},n),e),{type:u})}else r=e}return r}var Eke=function(e,t){if(!e)return[];var r=ru.isArray(e)?e:[e];return r.map(function(n){return yie(n,t)})};function Cke(e){var t=yie(e);return Eu.__assign(Eu.__assign({id:ru.isString(e)?e:t.id},t),{type:t.type})}function glu(e,t){return{type:_a.raise,event:typeof e=="function"?e:ru.toEventObject(e),delay:t?t.delay:void 0,id:t==null?void 0:t.id}}function Ytr(e,t,r,n){var u={_event:r},i=ru.toSCXMLEvent(ru.isFunction(e.event)?e.event(t,r.data,u):e.event),o;if(ru.isString(e.delay)){var s=n&&n[e.delay];o=ru.isFunction(s)?s(t,r.data,u):s}else o=ru.isFunction(e.delay)?e.delay(t,r.data,u):e.delay;return Eu.__assign(Eu.__assign({},e),{type:_a.raise,_event:i,delay:o})}function SL(e,t){return{to:t?t.to:void 0,type:_a.send,event:ru.isFunction(e)?e:ru.toEventObject(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:ru.isFunction(e)?e.name:ru.getEventType(e)}}function Xtr(e,t,r,n){var u={_event:r},i=ru.toSCXMLEvent(ru.isFunction(e.event)?e.event(t,r.data,u):e.event),o;if(ru.isString(e.delay)){var s=n&&n[e.delay];o=ru.isFunction(s)?s(t,r.data,u):s}else o=ru.isFunction(e.delay)?e.delay(t,r.data,u):e.delay;var a=ru.isFunction(e.to)?e.to(t,r.data,u):e.to;return Eu.__assign(Eu.__assign({},e),{to:a,_event:i,event:i.data,delay:o})}function xke(e,t){return SL(e,Eu.__assign(Eu.__assign({},t),{to:sh.SpecialTargets.Parent}))}function vlu(e,t,r){return SL(t,Eu.__assign(Eu.__assign({},r),{to:e}))}function Dlu(){return xke(_a.update)}function ylu(e,t){return SL(e,Eu.__assign(Eu.__assign({},t),{to:function(r,n,u){var i=u._event;return i.origin}}))}var Elu=function(e,t){return{context:e,event:t}};function blu(e,t){return e===void 0&&(e=Elu),{type:_a.log,label:t,expr:e}}var Jtr=function(e,t,r){return Eu.__assign(Eu.__assign({},e),{value:ru.isString(e.expr)?e.expr:e.expr(t,r.data,{_event:r})})},Clu=function(e){return{type:_a.cancel,sendId:e}};function xlu(e){var t=Cke(e);return{type:sh.ActionTypes.Start,activity:t,exec:void 0}}function Alu(e){var t=ru.isFunction(e)?e:Cke(e);return{type:sh.ActionTypes.Stop,activity:t,exec:void 0}}function Qtr(e,t,r){var n=ru.isFunction(e.activity)?e.activity(t,r.data):e.activity,u=typeof n=="string"?{id:n}:n,i={type:sh.ActionTypes.Stop,activity:u};return i}var Flu=function(e){return{type:_a.assign,assignment:e}};function _lu(e){return typeof e=="object"&&"type"in e}function Blu(e,t){var r=t?"#".concat(t):"";return"".concat(sh.ActionTypes.After,"(").concat(e,")").concat(r)}function wlu(e,t){var r="".concat(sh.ActionTypes.DoneState,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function Slu(e,t){var r="".concat(sh.ActionTypes.DoneInvoke,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function Olu(e,t){var r="".concat(sh.ActionTypes.ErrorPlatform,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function Tlu(e){return{type:sh.ActionTypes.Pure,get:e}}function Plu(e,t){if(!Ktr.IS_PRODUCTION&&(!e||typeof e=="function")){var r=e;e=function(){for(var n=[],u=0;u<arguments.length;u++)n[u]=arguments[u];var i=typeof r=="function"?r.apply(void 0,Eu.__spreadArray([],Eu.__read(n),!1)):r;if(!i)throw new Error("Attempted to forward event to undefined actor. This risks an infinite loop in the sender.");return i}}return SL(function(n,u){return u},Eu.__assign(Eu.__assign({},t),{to:e}))}function klu(e,t){return xke(function(r,n,u){return{type:_a.error,data:ru.isFunction(e)?e(r,n,u):e}},Eu.__assign(Eu.__assign({},t),{to:sh.SpecialTargets.Parent}))}function Rlu(e){return{type:sh.ActionTypes.Choose,conds:e}}var Ilu=function(e){var t,r,n=[];try{for(var u=Eu.__values(e),i=u.next();!i.done;i=u.next())for(var o=i.value,s=0;s<o.actions.length;){if(o.actions[s].type===_a.assign){n.push(o.actions[s]),o.actions.splice(s,1);continue}s++}}catch(a){t={error:a}}finally{try{i&&!i.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return n};function bke(e,t,r,n,u,i,o){o===void 0&&(o=!1);var s=o?[]:Ilu(u),a=s.length?ru.updateContext(r,n,s,t):r,c=o?[r]:void 0,l=[];function f(d,m){var v;switch(m.type){case _a.raise:{var y=Ytr(m,a,n,e.options.delays);return i&&typeof y.delay=="number"&&i(y,a,n),y}case _a.send:var g=Xtr(m,a,n,e.options.delays);if(!Ktr.IS_PRODUCTION){var D=m.delay;ru.warn(!ru.isString(D)||typeof g.delay=="number","No delay reference for delay expression '".concat(D,"' was found on machine '").concat(e.id,"'"))}return i&&g.to!==sh.SpecialTargets.Internal&&(d==="entry"?l.push(g):i(g,a,n)),g;case _a.log:{var E=Jtr(m,a,n);return i==null||i(E,a,n),E}case _a.choose:{var b=m,C=(v=b.conds.find(function($){var W=ru.toGuard($.cond,e.options.guards);return!W||ru.evaluateGuard(e,W,a,n,i?void 0:t)}))===null||v===void 0?void 0:v.actions;if(!C)return[];var x=Eu.__read(bke(e,t,a,n,[{type:d,actions:Eke(ru.toArray(C),e.options.actions)}],i,o),2),F=x[0],A=x[1];return a=A,c==null||c.push(a),F}case _a.pure:{var C=m.get(a,n.data);if(!C)return[];var S=Eu.__read(bke(e,t,a,n,[{type:d,actions:Eke(ru.toArray(C),e.options.actions)}],i,o),2),B=S[0],O=S[1];return a=O,c==null||c.push(a),B}case _a.stop:{var E=Qtr(m,a,n);return i==null||i(E,r,n),E}case _a.assign:{a=ru.updateContext(a,n,[m],i?void 0:t),c==null||c.push(a);break}default:var T=yie(m,e.options.actions),P=T.exec;if(i)i(T,a,n);else if(P&&c){var j=c.length-1,L=Eu.__assign(Eu.__assign({},T),{exec:function($){for(var W=[],I=1;I<arguments.length;I++)W[I-1]=arguments[I];P.apply(void 0,Eu.__spreadArray([c[j]],Eu.__read(W),!1))}});T=L}return T}}function p(d){var m,v,y=[];try{for(var g=Eu.__values(d.actions),D=g.next();!D.done;D=g.next()){var E=D.value,b=f(d.type,E);b&&(y=y.concat(b))}}catch(C){m={error:C}}finally{try{D&&!D.done&&(v=g.return)&&v.call(g)}finally{if(m)throw m.error}}return l.forEach(function(C){i(C,a,n)}),l.length=0,y}var h=ru.flatten(u.map(p));return[h,a]}bu.actionTypes=_a;bu.after=Blu;bu.assign=Flu;bu.cancel=Clu;bu.choose=Rlu;bu.done=wlu;bu.doneInvoke=Slu;bu.error=Olu;bu.escalate=klu;bu.forwardTo=Plu;bu.getActionFunction=yke;bu.initEvent=mlu;bu.isActionObject=_lu;bu.log=blu;bu.pure=Tlu;bu.raise=glu;bu.resolveActions=bke;bu.resolveLog=Jtr;bu.resolveRaise=Ytr;bu.resolveSend=Xtr;bu.resolveStop=Qtr;bu.respond=ylu;bu.send=SL;bu.sendParent=xke;bu.sendTo=vlu;bu.sendUpdate=Dlu;bu.start=xlu;bu.stop=Alu;bu.toActionObject=yie;bu.toActionObjects=Eke;bu.toActivityDefinition=Cke});var Ake=N(bie=>{"use strict";Object.defineProperty(bie,"__esModule",{value:!0});var Eie=[],jlu=function(e,t){Eie.push(e);var r=t(e);return Eie.pop(),r},Llu=function(e){return e(Eie[Eie.length-1])};bie.consume=Llu;bie.provide=jlu});var TL=N(Lv=>{"use strict";Object.defineProperty(Lv,"__esModule",{value:!0});var Nlu=oh(),OL=Wd(),qlu=Ake();function Fke(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[OL.symbolObservable]=function(){return this},t}function Mlu(e,t,r,n){var u,i=OL.toInvokeSource(e.src),o=(u=t==null?void 0:t.options.services)===null||u===void 0?void 0:u[i.type],s=e.data?OL.mapContext(e.data,r,n):void 0,a=o?Ztr(o,e.id,s):Fke(e.id);return a.meta=e,a}function Ztr(e,t,r){var n=Fke(t);if(n.deferred=!0,OL.isMachine(e)){var u=n.state=qlu.provide(void 0,function(){return(r?e.withContext(r):e).initialState});n.getSnapshot=function(){return u}}return n}function err(e){try{return typeof e.send=="function"}catch{return!1}}function Ulu(e){return err(e)&&"id"in e}function $lu(e){var t;return Nlu.__assign((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[OL.symbolObservable]=function(){return this},t),e)}Lv.createDeferredActor=Ztr;Lv.createInvocableActor=Mlu;Lv.createNullActor=Fke;Lv.isActor=err;Lv.isSpawnedActor=Ulu;Lv.toActorRef=$lu});var wke=N(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});var a6=oh(),_ke=Wd(),Bke=function(e){return e.type==="atomic"||e.type==="final"};function trr(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function PL(e){return trr(e).filter(function(t){return t.type!=="history"})}function rrr(e){var t=[e];return Bke(e)?t:t.concat(_ke.flatten(PL(e).map(rrr)))}function nrr(e,t){var r,n,u,i,o,s,a,c,l=new Set(e),f=Cie(l),p=new Set(t);try{for(var h=a6.__values(p),d=h.next();!d.done;d=h.next())for(var m=d.value,v=m.parent;v&&!p.has(v);)p.add(v),v=v.parent}catch(A){r={error:A}}finally{try{d&&!d.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}var y=Cie(p);try{for(var g=a6.__values(p),D=g.next();!D.done;D=g.next()){var m=D.value;if(m.type==="compound"&&(!y.get(m)||!y.get(m).length))f.get(m)?f.get(m).forEach(function(S){return p.add(S)}):m.initialStateNodes.forEach(function(S){return p.add(S)});else if(m.type==="parallel")try{for(var E=(o=void 0,a6.__values(PL(m))),b=E.next();!b.done;b=E.next()){var C=b.value;p.has(C)||(p.add(C),f.get(C)?f.get(C).forEach(function(S){return p.add(S)}):C.initialStateNodes.forEach(function(S){return p.add(S)}))}}catch(S){o={error:S}}finally{try{b&&!b.done&&(s=E.return)&&s.call(E)}finally{if(o)throw o.error}}}}catch(A){u={error:A}}finally{try{D&&!D.done&&(i=g.return)&&i.call(g)}finally{if(u)throw u.error}}try{for(var x=a6.__values(p),F=x.next();!F.done;F=x.next())for(var m=F.value,v=m.parent;v&&!p.has(v);)p.add(v),v=v.parent}catch(A){a={error:A}}finally{try{F&&!F.done&&(c=x.return)&&c.call(x)}finally{if(a)throw a.error}}return p}function urr(e,t){var r=t.get(e);if(!r)return{};if(e.type==="compound"){var n=r[0];if(n){if(Bke(n))return n.key}else return{}}var u={};return r.forEach(function(i){u[i.key]=urr(i,t)}),u}function Cie(e){var t,r,n=new Map;try{for(var u=a6.__values(e),i=u.next();!i.done;i=u.next()){var o=i.value;n.has(o)||n.set(o,[]),o.parent&&(n.has(o.parent)||n.set(o.parent,[]),n.get(o.parent).push(o))}}catch(s){t={error:s}}finally{try{i&&!i.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return n}function zlu(e,t){var r=nrr([e],t);return urr(e,Cie(r))}function irr(e,t){return Array.isArray(e)?e.some(function(r){return r===t}):e instanceof Set?e.has(t):!1}function Wlu(e){return a6.__spreadArray([],a6.__read(new Set(_ke.flatten(a6.__spreadArray([],a6.__read(e.map(function(t){return t.ownEvents})),!1)))),!1)}function orr(e,t){return t.type==="compound"?PL(t).some(function(r){return r.type==="final"&&irr(e,r)}):t.type==="parallel"?PL(t).every(function(r){return orr(e,r)}):!1}function Vlu(e){return e===void 0&&(e=[]),e.reduce(function(t,r){return r.meta!==void 0&&(t[r.id]=r.meta),t},{})}function Glu(e){return new Set(_ke.flatten(e.map(function(t){return t.tags})))}Nf.getAdjList=Cie;Nf.getAllChildren=trr;Nf.getAllStateNodes=rrr;Nf.getChildren=PL;Nf.getConfiguration=nrr;Nf.getMeta=Vlu;Nf.getTagsFromConfiguration=Glu;Nf.getValue=zlu;Nf.has=irr;Nf.isInFinalState=orr;Nf.isLeafNode=Bke;Nf.nextEvents=Wlu});var RL=N(J3=>{"use strict";Object.defineProperty(J3,"__esModule",{value:!0});var X3=oh(),srr=gie(),kL=Wd(),arr=wke(),crr=u_(),Hlu=s6();function lrr(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(kL.isString(e)||kL.isString(t))return e===t;var r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(function(u){return lrr(e[u],t[u])})}function frr(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}var Klu=frr;function Ylu(e,t){var r=e.exec,n=X3.__assign(X3.__assign({},e),{exec:r!==void 0?function(){return r(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0});return n}var Xlu=function(){function e(t){var r=this,n;this.actions=[],this.activities=srr.EMPTY_ACTIVITY_MAP,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||srr.EMPTY_ACTIVITY_MAP,this.meta=arr.getMeta(t.configuration),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=(n=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&n!==void 0?n:new Set,this.machine=t.machine,Object.defineProperty(this,"nextEvents",{get:function(){return arr.nextEvents(r.configuration)}})}return e.from=function(t,r){if(t instanceof e)return t.context!==r?new e({value:t.value,context:r,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t;var n=crr.initEvent;return new e({value:t,context:r,_event:n,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,r){if(t instanceof e){if(!t.actions.length)return t;var n=crr.initEvent;return new e({value:t.value,context:r,_event:n,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,r)},e.prototype.toStrings=function(t,r){var n=this;if(t===void 0&&(t=this.value),r===void 0&&(r="."),kL.isString(t))return[t];var u=Object.keys(t);return u.concat.apply(u,X3.__spreadArray([],X3.__read(u.map(function(i){return n.toStrings(t[i],r).map(function(o){return i+r+o})})),!1))},e.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var r=t.tags;t.machine;var n=X3.__rest(t,["configuration","transitions","tags","machine"]);return X3.__assign(X3.__assign({},n),{tags:Array.from(r)})},e.prototype.matches=function(t){return kL.matchesState(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var r;Hlu.IS_PRODUCTION&&kL.warn(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=(r=this.machine)===null||r===void 0?void 0:r.getTransitionData(this,t);return!!(n!=null&&n.transitions.length)&&n.transitions.some(function(u){return u.target!==void 0||u.actions.length})},e}();J3.State=Xlu;J3.bindActionToState=Ylu;J3.isState=Klu;J3.isStateConfig=frr;J3.stateValuesEqual=lrr});var hrr=N(Ske=>{"use strict";Object.defineProperty(Ske,"__esModule",{value:!0});var prr=oh(),Jlu={deferEvents:!1},Qlu=function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=prr.__assign(prr.__assign({},Jlu),t)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(r){throw this.clear(),r}finally{this.processingEvent=!1}},e}();Ske.Scheduler=Qlu});var drr=N(Tke=>{"use strict";Object.defineProperty(Tke,"__esModule",{value:!0});var Oke=new Map,Zlu=0,efu={bookId:function(){return"x:".concat(Zlu++)},register:function(e,t){return Oke.set(e,t),e},get:function(e){return Oke.get(e)},free:function(e){Oke.delete(e)}};Tke.registry=efu});var mrr=N(xie=>{"use strict";Object.defineProperty(xie,"__esModule",{value:!0});var tfu=s6();function Pke(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;tfu.IS_PRODUCTION||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues")}function rfu(){var e=Pke();if(e&&"__xstate__"in e)return e.__xstate__}function nfu(e){if(Pke()){var t=rfu();t&&t.register(e)}}xie.getGlobal=Pke;xie.registerService=nfu});var kke=N(IL=>{"use strict";Object.defineProperty(IL,"__esModule",{value:!0});var grr=u_(),ufu=TL(),ifu=Wd();function ofu(e,t){return{transition:e,initialState:t}}function sfu(e){var t={error:void 0,data:void 0,status:"pending"};return{transition:function(r,n,u){var i=u.parent,o=u.id,s=u.observers;switch(n.type){case"fulfill":return i==null||i.send(grr.doneInvoke(o,n.data)),{error:void 0,data:n.data,status:"fulfilled"};case"reject":return i==null||i.send(grr.error(o,n.error)),s.forEach(function(a){a.error(n.error)}),{error:n.error,data:void 0,status:"rejected"};default:return r}},initialState:t,start:function(r){var n=r.self;return e().then(function(u){n.send({type:"fulfill",data:u})},function(u){n.send({type:"reject",error:u})}),t}}}function afu(e,t){t===void 0&&(t={});var r=e.initialState,n=new Set,u=[],i=!1,o=function(){if(!i){for(i=!0;u.length>0;){var c=u.shift();r=e.transition(r,c,a),n.forEach(function(l){return l.next(r)})}i=!1}},s=ufu.toActorRef({id:t.id,send:function(c){u.push(c),o()},getSnapshot:function(){return r},subscribe:function(c,l,f){var p=ifu.toObserver(c,l,f);return n.add(p),p.next(r),{unsubscribe:function(){n.delete(p)}}}}),a={parent:t.parent,self:s,id:t.id||"anonymous",observers:n};return r=e.start?e.start(a):r,s}IL.fromPromise=sfu;IL.fromReducer=ofu;IL.spawnBehavior=afu});var brr=N(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});var ou=oh(),Rke=Y3(),Aie=RL(),I2=r_(),H0=u_(),c6=s6(),Gr=Wd(),vrr=hrr(),Ike=TL(),jL=drr(),Drr=mrr(),i_=Ake(),cfu=kke(),jke={sync:!1,autoForward:!1};Pi.InterpreterStatus=void 0;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Pi.InterpreterStatus||(Pi.InterpreterStatus={}));var yrr=function(){function e(t,r){r===void 0&&(r=e.defaultOptions);var n=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Pi.InterpreterStatus.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(l,f){if(Gr.isArray(l))return n.batch(l),n.state;var p=Gr.toSCXMLEvent(Gr.toEventObject(l,f));if(n.status===Pi.InterpreterStatus.Stopped)return c6.IS_PRODUCTION||Gr.warn(!1,'Event "'.concat(p.name,'" was sent to stopped service "').concat(n.machine.id,`". This service has already reached its final state, and will not transition.
|
|
1234
1234
|
Event: `).concat(JSON.stringify(p.data))),n.state;if(n.status!==Pi.InterpreterStatus.Running&&!n.options.deferEvents)throw new Error('Event "'.concat(p.name,'" was sent to uninitialized service "').concat(n.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
|
|
@@ -1260,9 +1260,9 @@ ${(0,Pt.emoji)("\u{1F680}")} Result for [${this.spec.command}] of [${(0,yn.get)(
|
|
|
1260
1260
|
${Dt.gray("====================")}`),YC(r)}async processOutput(t){let{steps:r,command:n}=this.spec;if(process.env[$bt]=="true"||(0,qv.isCiCdEnvironment)()){let u=eAt((0,yn.get)(t,"output")),i=(0,yn.cloneDeep)((0,yn.get)(t,"output"));for(let o in u){let s=u[o],a=i[o],c=(0,yn.find)(r,p=>p.projectName===o),l=(0,yn.get)(c,"component"),f=await(0,zie.default)(l,{logger:At});if(f.getShownProps){let p=f.getShownProps(),h=(0,yn.keys)(p),d=(0,yn.find)(h,v=>{try{return new RegExp(v).test(n)}catch{return!1}}),m=(0,yn.get)(p,d);for(let v of m)(0,yn.set)(s,v,(0,yn.get)(a,v))}else{let p="environmentVariables";(0,yn.get)(a,p)&&(0,yn.set)(a,p,(0,yn.get)(s,p)),(0,yn.set)(u,o,(0,yn.cloneDeep)(a))}}return this.parseOutput(u)}return this.parseOutput((0,yn.get)(t,"output"))}async parseSpec(){let t=process.argv.slice(2),{template:r}=Gd.parseArgv(t),n=await new Gnr.default(r,{argv:t,logger:At}).start(),u=new Set;return(0,yn.each)((0,yn.get)(n,"steps",[]),i=>{u.add(i.component)}),{...n,components:Array.from(u)}}}});var Xnr=N((_Ju,Ynr)=>{Lq();gn();VLt();kNt();zNt();KMt();XMt();PYt();jYt();Str();Ttr();jtr();Knr();var W0u=async e=>{e.name("s").option("--debug","Open debug model").option("--skip-actions","Skip the extends section").option("-t, --template <path>","Specify the template file").option("-a, --access <aliasName>","Specify the access alias name").addOption(new jq("-o, --output <outputFormat>","Specify the output format").choices(["default","json","yaml","raw"])).option("--output-file <outputFilePath>","Specify the output file path").option("--env <envName>","Specify the env name").option("--no-verify","Do not verify yaml").option("--silent","Silent mode").configureHelp({showGlobalOptions:!0}).helpOption("-h, --help","Display help for command").addHelpCommand(!1).version(Zxt(),"-v, --version","Output the version number"),WLt(e),PNt(e),$Nt(e),TYt(e),IYt(e),Otr(e),HMt(e),YMt(e),Itr(e),await wtr(e);let t=await new KL(e).init();e.command("<custom>").summary(`${(0,Pt.emoji)("\u{1F9ED}")} Custom Commands`),e.addHelpText("before",`${(0,Pt.emoji)("\u{1F603}")} Welcome to the Serverless Devs
|
|
1261
1261
|
`),e.addHelpText("after",`
|
|
1262
1262
|
${t||""}
|
|
1263
|
-
${(0,Pt.emoji)("\u{1F64C}")} Quick Start: https://
|
|
1263
|
+
${(0,Pt.emoji)("\u{1F64C}")} Quick Start: https://manual.serverless-devs.com/getting-started
|
|
1264
1264
|
${(0,Pt.emoji)("\u{1F31F}")} Github Repo: https://github.com/Serverless-Devs/Serverless-Devs
|
|
1265
|
-
${(0,Pt.emoji)("\u{1F4A1}")} Documentation: https://
|
|
1265
|
+
${(0,Pt.emoji)("\u{1F4A1}")} Documentation: https://manual.serverless-devs.com
|
|
1266
1266
|
${(0,Pt.emoji)("\u{1F680}")} Example Projects: https://registry.serverless-devs.com
|
|
1267
1267
|
${(0,Pt.emoji)("\u{1F4DD}")} Feedback: https://github.com/Serverless-Devs/Serverless-Devs/issues
|
|
1268
1268
|
`)};Ynr.exports=W0u});Lq();gn();Zn();sg();Zxe();jC();ag();var mkt=ot(Er());Zn();wr();gn();async function lBn(){if((0,mkt.getYamlPath)("s.yaml")){let t=[og("A Serverless-Devs project is detected in the current directory, please deploy via 's deploy' or get more information via 's -h'"),`
|