@kumori/kdsl 0.0.15 → 0.0.17
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/dist/build/deployment_spec.d.ts +1133 -19642
- package/dist/build/deployment_spec.js +14 -13
- package/dist/build/deployment_spec.js.map +1 -1
- package/dist/build/helpers/builtin.js +7 -9
- package/dist/build/helpers/builtin.js.map +1 -1
- package/dist/build/helpers/component.d.ts +2 -2
- package/dist/build/helpers/component.js +28 -28
- package/dist/build/helpers/component.js.map +1 -1
- package/dist/build/helpers/connector.js +4 -5
- package/dist/build/helpers/connector.js.map +1 -1
- package/dist/build/helpers/deployment.d.ts +96 -96
- package/dist/build/helpers/deployment.js +8 -9
- package/dist/build/helpers/deployment.js.map +1 -1
- package/dist/build/helpers/resource.d.ts +4 -4
- package/dist/build/helpers/service.d.ts +1 -1
- package/dist/build/helpers/service.js +31 -33
- package/dist/build/helpers/service.js.map +1 -1
- package/dist/build/helpers/utils.d.ts +8 -0
- package/dist/build/helpers/utils.js +23 -1
- package/dist/build/helpers/utils.js.map +1 -1
- package/dist/build/main.js +51 -2
- package/dist/build/main.js.map +1 -1
- package/dist/build/solution.js +2 -3
- package/dist/build/solution.js.map +1 -1
- package/dist/check/main.js +1 -1
- package/dist/check/main.js.map +1 -1
- package/dist/deployment/gen/deployment-template.kumori +33 -0
- package/dist/deployment/gen/main.d.ts +15 -0
- package/dist/deployment/gen/main.js +158 -0
- package/dist/deployment/gen/main.js.map +1 -0
- package/dist/deployment/gen/types.d.ts +27 -0
- package/dist/deployment/gen/types.js +2 -0
- package/dist/deployment/gen/types.js.map +1 -0
- package/dist/deployment/main.d.ts +8 -0
- package/dist/deployment/main.js +17 -0
- package/dist/deployment/main.js.map +1 -0
- package/dist/index/create/main.js +38 -16
- package/dist/index/create/main.js.map +1 -1
- package/dist/lib/build.js +42 -28
- package/dist/lib/build.js.map +1 -1
- package/dist/lib/check.js +45 -15
- package/dist/lib/check.js.map +1 -1
- package/dist/lib/clean.js +39 -1
- package/dist/lib/deployment.d.ts +35 -0
- package/dist/lib/deployment.js +31 -0
- package/dist/lib/deployment.js.map +1 -0
- package/dist/lib/index-cmd.js +60 -57
- package/dist/lib/index-cmd.js.map +1 -1
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.js +54 -117
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/logger.js +1 -1
- package/dist/lib/logger.js.map +1 -1
- package/dist/lib/mod.js +144 -70
- package/dist/lib/mod.js.map +1 -1
- package/dist/lib/registry.d.ts +19 -4
- package/dist/lib/registry.js +67 -1
- package/dist/lib/registry.js.map +1 -1
- package/dist/lib/types.d.ts +5 -0
- package/dist/main.js +7 -1
- package/dist/main.js.map +1 -1
- package/dist/mod/dependency/main.js +17 -10
- package/dist/mod/dependency/main.js.map +1 -1
- package/dist/mod/download/functions.js +5 -5
- package/dist/mod/download/functions.js.map +1 -1
- package/dist/mod/download/main.js +12 -2
- package/dist/mod/download/main.js.map +1 -1
- package/dist/mod/init/main.js +1 -1
- package/dist/mod/init/main.js.map +1 -1
- package/dist/mod/jsonschema/gen/main.js +14 -7
- package/dist/mod/jsonschema/gen/main.js.map +1 -1
- package/dist/mod/jsonschema/get/main.js +10 -2
- package/dist/mod/jsonschema/get/main.js.map +1 -1
- package/dist/mod/update/main.js +3 -4
- package/dist/mod/update/main.js.map +1 -1
- package/dist/registry/add.d.ts +1 -1
- package/dist/registry/add.js +12 -7
- package/dist/registry/add.js.map +1 -1
- package/dist/util/err-format.js +1 -2
- package/dist/util/err-format.js.map +1 -1
- package/dist/version.js +1 -2
- package/dist/version.js.map +1 -1
- package/out/deployment/gen/deployment-template.kumori +33 -0
- package/out/deployment-template.kumori +33 -0
- package/out/main.cjs +378 -209
- package/package.json +21 -15
- package/out/lib/build.cjs +0 -29
- package/out/lib/check.cjs +0 -16
- package/out/lib/clean.cjs +0 -2
- package/out/lib/index-cmd.cjs +0 -58
- package/out/lib/index.cjs +0 -118
- package/out/lib/mod.cjs +0 -71
- package/out/lib/registry.cjs +0 -2
package/dist/lib/index-cmd.js
CHANGED
|
@@ -1,57 +1,60 @@
|
|
|
1
|
-
var vu=Object.create;var Le=Object.defineProperty,Su=Object.defineProperties,Mu=Object.getOwnPropertyDescriptor,Tu=Object.getOwnPropertyDescriptors,Pu=Object.getOwnPropertyNames,St=Object.getOwnPropertySymbols,Ru=Object.getPrototypeOf,Tt=Object.prototype.hasOwnProperty,ku=Object.prototype.propertyIsEnumerable;var Mt=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e);var Je=(e,t,r)=>t in e?Le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))Tt.call(t,r)&&Je(e,r,t[r]);if(St)for(var r of St(t))ku.call(t,r)&&Je(e,r,t[r]);return e},S=(e,t)=>Su(e,Tu(t));var Pt=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var E=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),_u=(e,t)=>{for(var r in t)Le(e,r,{get:t[r],enumerable:!0})},Ou=(e,t,r,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Pu(t))!Tt.call(e,o)&&o!==r&&Le(e,o,{get:()=>t[o],enumerable:!(u=Mu(t,o))||u.enumerable});return e};var Qe=(e,t,r)=>(r=e!=null?vu(Ru(e)):{},Ou(t||!e||!e.__esModule?Le(r,"default",{value:e,enumerable:!0}):r,e));var C=(e,t,r)=>(Je(e,typeof t!="symbol"?t+"":t,r),r),Ze=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var m=(e,t,r)=>(Ze(e,t,"read from private field"),r?r.call(e):t.get(e)),M=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},K=(e,t,r,u)=>(Ze(e,t,"write to private field"),u?u.call(e,r):t.set(e,r),r);var I=(e,t,r)=>(Ze(e,t,"access private method"),r);var Rt=(e,t,r)=>{if(t!=null){if(typeof t!="object"&&typeof t!="function")throw TypeError("Object expected");var u;if(r&&(u=t[Mt("asyncDispose")]),u===void 0&&(u=t[Mt("dispose")]),typeof u!="function")throw TypeError("Object not disposable");e.push([r,u,t])}else r&&e.push([r]);return t},kt=(e,t,r)=>{var u=typeof SuppressedError=="function"?SuppressedError:function(i,s,a,D){return D=Error(a),D.name="SuppressedError",D.error=i,D.suppressed=s,D},o=i=>t=r?new u(i,t,"An error was suppressed during disposal"):(r=!0,i),n=i=>{for(;i=e.pop();)try{var s=i[1]&&i[1].call(i[2]);if(i[0])return Promise.resolve(s).then(n,a=>(o(a),n()))}catch(a){o(a)}if(r)throw t};return n()};var Xe,fe,he,Kt=E(()=>{Xe=e=>e.name==="backspace",fe=e=>e.name==="tab",he=e=>e.name==="enter"||e.name==="return"});var ye,Ae,me,ve,Se,Me=E(()=>{ye=class extends Error{constructor(r){super();C(this,"name","AbortPromptError");C(this,"message","Prompt was aborted");this.cause=r==null?void 0:r.cause}},Ae=class extends Error{constructor(){super(...arguments);C(this,"name","CancelPromptError");C(this,"message","Prompt was canceled")}},me=class extends Error{constructor(){super(...arguments);C(this,"name","ExitPromptError")}},ve=class extends Error{constructor(){super(...arguments);C(this,"name","HookError")}},Se=class extends Error{constructor(){super(...arguments);C(this,"name","ValidationError")}}});import{AsyncLocalStorage as Uu,AsyncResource as Nu}from"async_hooks";function ju(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function qt(e,t){let r=ju(e);return Vt.run(r,()=>{function u(o){r.handleChange=()=>{r.index=0,o()},r.handleChange()}return t(u)})}function J(){let e=Vt.getStore();if(!e)throw new ve("[Inquirer] Hook functions can only be called from within a prompt");return e}function et(){return J().rl}function tt(e){let t=(...r)=>{let u=J(),o=!1,n=u.handleChange;u.handleChange=()=>{o=!0};let i=e(...r);return o&&n(),u.handleChange=n,i};return Nu.bind(t)}function Te(e){let t=J(),{index:r}=t,u={get(){return t.hooks[r]},set(n){t.hooks[r]=n},initialized:r in t.hooks},o=e(u);return t.index++,o}function Wt(){J().handleChange()}var Vt,Y,ie=E(()=>{Me();Vt=new Uu;Y={queue(e){let t=J(),{index:r}=t;t.hooksEffect.push(()=>{var o,n;(n=(o=t.hooksCleanup)[r])==null||n.call(o);let u=e(et());if(u!=null&&typeof u!="function")throw new Se("useEffect return value must be a cleanup function or nothing.");t.hooksCleanup[r]=u})},run(){let e=J();tt(()=>{e.hooksEffect.forEach(t=>{t()}),e.hooksEffect.length=0})()},clearAll(){let e=J();e.hooksCleanup.forEach(t=>{t==null||t()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}}});import{AsyncResource as Ku}from"async_hooks";function P(e){return Te(t=>{let r=Ku.bind(function(n){t.get()!==n&&(t.set(n),Wt())});if(t.initialized)return[t.get(),r];let u=typeof e=="function"?e():e;return t.set(u),[u,r]})}var Pe=E(()=>{ie()});function Q(e,t){Te(r=>{let u=r.get();(!Array.isArray(u)||t.some((n,i)=>!Object.is(n,u[i])))&&Y.queue(e),r.set(t)})}var Re=E(()=>{ie()});import U from"process";function Vu(){return U.platform!=="win32"?U.env.TERM!=="linux":!!U.env.WT_SESSION||!!U.env.TERMINUS_SUBLIME||U.env.ConEmuTask==="{cmd::Cmder}"||U.env.TERM_PROGRAM==="Terminus-Sublime"||U.env.TERM_PROGRAM==="vscode"||U.env.TERM==="xterm-256color"||U.env.TERM==="alacritty"||U.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Gt,Ht,qu,Wu,Gu,Hu,zu,zt,sn,Jt=E(()=>{Gt={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",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"},Ht={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"},qu={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",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"},Wu=p(p({},Gt),Ht),Gu=p(p({},Gt),qu),Hu=Vu(),zu=Hu?Wu:Gu,zt=zu,sn=Object.entries(Ht)});import{styleText as O}from"util";var Yt,Qt=E(()=>{Jt();Yt={prefix:{idle:O("blue","?"),done:O("green",zt.tick)},spinner:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"].map(e=>O("yellow",e))},style:{answer:e=>O("cyan",e),message:e=>O("bold",e),error:e=>O("red",`> ${e}`),defaultAnswer:e=>O("dim",`(${e})`),help:e=>O("dim",e),highlight:e=>O("cyan",e),key:e=>O("cyan",O("bold",`<${e}>`))}}});function Zt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Xt(...e){let t={};for(let r of e)for(let[u,o]of Object.entries(r)){let n=t[u];t[u]=Zt(n)&&Zt(o)?Xt(n,o):o}return t}function Z(...e){let t=[Yt,...e.filter(r=>r!=null)];return Xt(...t)}var rt=E(()=>{Qt()});function ge({status:e="idle",theme:t}){var D;let[r,u]=P(!1),[o,n]=P(0),{prefix:i,spinner:s}=Z(t);return Q(()=>{if(e==="loading"){let c,l=-1,h=setTimeout(()=>{u(!0),c=setInterval(()=>{l=l+1,n(l%s.frames.length)},s.interval)},300);return()=>{clearTimeout(h),clearInterval(c)}}else u(!1)},[e]),r?s.frames[o]:typeof i=="string"?i:(D=i[e==="loading"?"idle":e])!=null?D:i.idle}var er=E(()=>{Pe();Re();rt()});function tr(e){return P({current:e})[0]}var rr=E(()=>{Pe()});function pe(e){let t=tr(e);t.current=e,Q(r=>{let u=!1,o=tt((n,i)=>{u||t.current(i,r)});return r.input.on("keypress",o),()=>{u=!0,r.input.removeListener("keypress",o)}},[])}var ur=E(()=>{rr();Re();ie()});var ir=Ye((Ln,or)=>{"use strict";or.exports=Yu;function Ju(e){let t={defaultWidth:0,output:process.stdout,tty:Pt("tty")};return e?(Object.keys(t).forEach(function(r){e[r]||(e[r]=t[r])}),e):t}function Yu(e){let t=Ju(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){let r=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(r)&&r!==0)return r}return t.defaultWidth}});function ut({onlyFirst:e=!1}={}){let o="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(o,e?void 0:"g")}var nr=E(()=>{});function Ce(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Qu,"")}var Qu,ot=E(()=>{nr();Qu=ut()});function sr(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function ar(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Dr(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var lr=E(()=>{});function Zu(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function cr(e,{ambiguousAsWide:t=!1}={}){return Zu(e),ar(e)||Dr(e)||t&&sr(e)?2:1}var Fr=E(()=>{lr()});var fr=Ye((Rn,dr)=>{dr.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});function X(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:u=!1}=t;if(u||(e=Ce(e)),e.length===0)return 0;let o=0,n={ambiguousAsWide:!r};for(let{segment:i}of Xu.segment(e)){let s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159)&&!(s>=8203&&s<=8207||s===65279)&&!(s>=768&&s<=879||s>=6832&&s<=6911||s>=7616&&s<=7679||s>=8400&&s<=8447||s>=65056&&s<=65071)&&!(s>=55296&&s<=57343)&&!(s>=65024&&s<=65039)&&!eo.test(i)){if((0,hr.default)().test(i)){o+=2;continue}o+=cr(s,n)}}return o}var hr,Xu,eo,mr=E(()=>{ot();Fr();hr=Qe(fr(),1),Xu=new Intl.Segmenter,eo=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u")});function uo(){let e=new Map;for(let[t,r]of Object.entries(x)){for(let[u,o]of Object.entries(r))x[u]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},r[u]=x[u],e.set(o[0],o[1]);Object.defineProperty(x,t,{value:r,enumerable:!1})}return Object.defineProperty(x,"codes",{value:e,enumerable:!1}),x.color.close="\x1B[39m",x.bgColor.close="\x1B[49m",x.color.ansi=gr(),x.color.ansi256=pr(),x.color.ansi16m=Cr(),x.bgColor.ansi=gr(10),x.bgColor.ansi256=pr(10),x.bgColor.ansi16m=Cr(10),Object.defineProperties(x,{rgbToAnsi256:{value(t,r,u){return t===r&&r===u?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(u/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[u]=r;u.length===3&&(u=[...u].map(n=>n+n).join(""));let o=Number.parseInt(u,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:t=>x.rgbToAnsi256(...x.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,u,o;if(t>=232)r=((t-232)*10+8)/255,u=r,o=r;else{t-=16;let s=t%36;r=Math.floor(t/36)/5,u=Math.floor(s/6)/5,o=s%6/5}let n=Math.max(r,u,o)*2;if(n===0)return 30;let i=30+(Math.round(o)<<2|Math.round(u)<<1|Math.round(r));return n===2&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(t,r,u)=>x.ansi256ToAnsi(x.rgbToAnsi256(t,r,u)),enumerable:!1},hexToAnsi:{value:t=>x.ansi256ToAnsi(x.hexToAnsi256(t)),enumerable:!1}}),x}var gr,pr,Cr,x,$n,to,ro,In,oo,Er,Br=E(()=>{gr=(e=0)=>t=>`\x1B[${t+e}m`,pr=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Cr=(e=0)=>(t,r,u)=>`\x1B[${38+e};2;${t};${r};${u}m`,x={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},$n=Object.keys(x.modifier),to=Object.keys(x.color),ro=Object.keys(x.bgColor),In=[...to,...ro];oo=uo(),Er=oo});function st(e,t,r){return String(e).normalize().replaceAll(`\r
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
`.trim(),Ei={Register:xu}});var R=function(e){return e.info="info",e.warn="warn",e.error="error",e.debug="debug",e.trace="trace",e.fatal="fatal",e}({}),xi={[R.trace]:10,[R.debug]:20,[R.info]:30,[R.warn]:40,[R.error]:50,[R.fatal]:60},bi={10:R.trace,20:R.debug,30:R.info,40:R.warn,50:R.error,60:R.fatal};var T=function(e){return e.onBeforeDataOut="onBeforeDataOut",e.shouldSendToLogger="shouldSendToLogger",e.onMetadataCalled="onMetadataCalled",e.onBeforeMessageOut="onBeforeMessageOut",e.onContextCalled="onContextCalled",e}({});var g=function(e){return e.info="info",e.warn="warn",e.error="error",e.debug="debug",e.trace="trace",e.fatal="fatal",e}({}),de={[g.trace]:10,[g.debug]:20,[g.info]:30,[g.warn]:40,[g.error]:50,[g.fatal]:60},vi={10:g.trace,20:g.debug,30:g.info,40:g.warn,50:g.error,60:g.fatal};var _t=class Ot{constructor(){C(this,"context",{});C(this,"hasContext",!1)}setContext(t){if(!t){this.context={},this.hasContext=!1;return}this.context=t,this.hasContext=!0}appendContext(t){this.context=p(p({},this.context),t),this.hasContext=!0}getContext(){return this.context}hasContextData(){return this.hasContext}onChildLoggerCreated({parentContextManager:t,childContextManager:r}){if(t.hasContextData()){let u=t.getContext();r.setContext(p({},u))}}clone(){let t=new Ot;return t.setContext(p({},this.context)),t.hasContext=this.hasContext,t}};var $t=class{constructor(e){C(this,"err");C(this,"metadata");C(this,"structuredLogger");C(this,"hasMetadata");C(this,"pluginManager");this.err=null,this.metadata={},this.structuredLogger=e,this.hasMetadata=!1,this.pluginManager=e.pluginManager}withMetadata(e){let{pluginManager:t,structuredLogger:{_config:{consoleDebug:r}}}=this;if(!e)return r&&console.debug("[LogLayer] withMetadata was called with no metadata; dropping."),this;let u=e;return t.hasPlugins(T.onMetadataCalled)&&(u=t.runOnMetadataCalled(e,this.structuredLogger),!u)?(r&&console.debug("[LogLayer] Metadata was dropped due to plugin returning falsy value."),this):(this.metadata=p(p({},this.metadata),u),this.hasMetadata=!0,this)}withError(e){return this.err=e,this}info(...e){this.structuredLogger.isLevelEnabled(g.info)&&(this.structuredLogger._formatMessage(e),this.formatLog(g.info,e))}warn(...e){this.structuredLogger.isLevelEnabled(g.warn)&&(this.structuredLogger._formatMessage(e),this.formatLog(g.warn,e))}error(...e){this.structuredLogger.isLevelEnabled(g.error)&&(this.structuredLogger._formatMessage(e),this.formatLog(g.error,e))}debug(...e){this.structuredLogger.isLevelEnabled(g.debug)&&(this.structuredLogger._formatMessage(e),this.formatLog(g.debug,e))}trace(...e){this.structuredLogger.isLevelEnabled(g.trace)&&(this.structuredLogger._formatMessage(e),this.formatLog(g.trace,e))}fatal(...e){this.structuredLogger.isLevelEnabled(g.fatal)&&(this.structuredLogger._formatMessage(e),this.formatLog(g.fatal,e))}disableLogging(){return this.structuredLogger.disableLogging(),this}enableLogging(){return this.structuredLogger.enableLogging(),this}formatLog(e,t){let{muteMetadata:r}=this.structuredLogger._config,u=r?!1:this.hasMetadata;this.structuredLogger._formatLog({logLevel:e,params:t,metadata:u?this.metadata:null,err:this.err})}},$u=[T.onBeforeDataOut,T.onMetadataCalled,T.shouldSendToLogger,T.onBeforeMessageOut,T.onContextCalled],It=class{constructor(e){C(this,"idToPlugin");C(this,"onBeforeDataOut",[]);C(this,"shouldSendToLogger",[]);C(this,"onMetadataCalled",[]);C(this,"onBeforeMessageOut",[]);C(this,"onContextCalled",[]);this.idToPlugin={},this.mapPlugins(e),this.indexPlugins()}mapPlugins(e){for(let t of e){if(t.id||(t.id=Date.now().toString()+Math.random().toString()),this.idToPlugin[t.id])throw new Error(`[LogLayer] Plugin with id ${t.id} already exists.`);t.registeredAt=Date.now(),this.idToPlugin[t.id]=t}}indexPlugins(){this.onBeforeDataOut=[],this.shouldSendToLogger=[],this.onMetadataCalled=[],this.onBeforeMessageOut=[],this.onContextCalled=[];let e=Object.values(this.idToPlugin).sort((t,r)=>t.registeredAt-r.registeredAt);for(let t of e){if(t.disabled)return;for(let r of $u)t[r]&&t.id&&this[r].push(t.id)}}hasPlugins(e){return this[e].length>0}countPlugins(e){return e?this[e].length:Object.keys(this.idToPlugin).length}addPlugins(e){this.mapPlugins(e),this.indexPlugins()}enablePlugin(e){let t=this.idToPlugin[e];t&&(t.disabled=!1),this.indexPlugins()}disablePlugin(e){let t=this.idToPlugin[e];t&&(t.disabled=!0),this.indexPlugins()}removePlugin(e){delete this.idToPlugin[e],this.indexPlugins()}runOnBeforeDataOut(e,t){let r=p({},e);for(let u of this.onBeforeDataOut){let o=this.idToPlugin[u];if(o.onBeforeDataOut){let n=o.onBeforeDataOut({data:r.data,logLevel:r.logLevel,error:r.error,metadata:r.metadata,context:r.context},t);n&&(r.data||(r.data={}),Object.assign(r.data,n))}}return r.data}runShouldSendToLogger(e,t){return!this.shouldSendToLogger.some(r=>{var u,o;return!((o=(u=this.idToPlugin[r]).shouldSendToLogger)!=null&&o.call(u,e,t))})}runOnMetadataCalled(e,t){var u,o;let r=p({},e);for(let n of this.onMetadataCalled){let i=(o=(u=this.idToPlugin[n]).onMetadataCalled)==null?void 0:o.call(u,r,t);if(i)r=i;else return null}return r}runOnBeforeMessageOut(e,t){var u,o;let r=[...e.messages];for(let n of this.onBeforeMessageOut){let i=(o=(u=this.idToPlugin[n]).onBeforeMessageOut)==null?void 0:o.call(u,{messages:r,logLevel:e.logLevel},t);i&&(r=i)}return r}runOnContextCalled(e,t){var u,o;let r=p({},e);for(let n of this.onContextCalled){let i=(o=(u=this.idToPlugin[n]).onContextCalled)==null?void 0:o.call(u,r,t);if(i)r=i;else return null}return r}},Ut=class Nt{constructor(t){C(this,"pluginManager");C(this,"idToTransport");C(this,"hasMultipleTransports");C(this,"singleTransport");C(this,"contextManager");C(this,"logLevelEnabledStatus",{info:!0,warn:!0,error:!0,debug:!0,trace:!0,fatal:!0});C(this,"_config");var r;this._config=S(p({},t),{enabled:(r=t.enabled)!=null?r:!0}),this._config.enabled||this.disableLogging(),this.contextManager=new _t,this.pluginManager=new It(t.plugins||[]),this._config.errorFieldName||(this._config.errorFieldName="err"),this._config.copyMsgOnOnlyError||(this._config.copyMsgOnOnlyError=!1),this._initializeTransports(this._config.transport)}withContextManager(t){return this.contextManager&&typeof this.contextManager[Symbol.dispose]=="function"&&this.contextManager[Symbol.dispose](),this.contextManager=t,this}getContextManager(){return this.contextManager}_initializeTransports(t){if(this.idToTransport)for(let r in this.idToTransport)this.idToTransport[r]&&typeof this.idToTransport[r][Symbol.dispose]=="function"&&this.idToTransport[r][Symbol.dispose]();this.hasMultipleTransports=Array.isArray(t)&&t.length>1,this.singleTransport=this.hasMultipleTransports?null:Array.isArray(t)?t[0]:t,Array.isArray(t)?this.idToTransport=t.reduce((r,u)=>(r[u.id]=u,r),{}):this.idToTransport={[t.id]:t}}withPrefix(t){let r=this.child();return r._config.prefix=t,r}withContext(t){let r=t;return t?this.pluginManager.hasPlugins(T.onContextCalled)&&(r=this.pluginManager.runOnContextCalled(t,this),!r)?(this._config.consoleDebug&&console.debug("[LogLayer] Context was dropped due to plugin returning falsy value."),this):(this.contextManager.appendContext(r),this):(this._config.consoleDebug&&console.debug("[LogLayer] withContext was called with no context; dropping."),this)}clearContext(){return this.contextManager.setContext(void 0),this}getContext(){return this.contextManager.getContext()}addPlugins(t){this.pluginManager.addPlugins(t)}enablePlugin(t){this.pluginManager.enablePlugin(t)}disablePlugin(t){this.pluginManager.disablePlugin(t)}removePlugin(t){this.pluginManager.removePlugin(t)}withMetadata(t){return new $t(this).withMetadata(t)}withError(t){return new $t(this).withError(t)}child(){let t=new Nt(S(p({},this._config),{transport:Array.isArray(this._config.transport)?[...this._config.transport]:this._config.transport})).withPluginManager(this.pluginManager).withContextManager(this.contextManager.clone());return this.contextManager.onChildLoggerCreated({parentContextManager:this.contextManager,childContextManager:t.contextManager,parentLogger:this,childLogger:t}),t}withFreshTransports(t){return this._config.transport=t,this._initializeTransports(t),this}withFreshPlugins(t){return this._config.plugins=t,this.pluginManager=new It(t),this}withPluginManager(t){return this.pluginManager=t,this}errorOnly(t,r){let u=(r==null?void 0:r.logLevel)||g.error;if(!this.isLevelEnabled(u))return;let{copyMsgOnOnlyError:o}=this._config,n={logLevel:u,err:t};(o&&(r==null?void 0:r.copyMsg)!==!1||(r==null?void 0:r.copyMsg)===!0)&&(t!=null&&t.message)&&(n.params=[t.message]),this._formatLog(n)}metadataOnly(t,r=g.info){if(!this.isLevelEnabled(r))return;let{muteMetadata:u,consoleDebug:o}=this._config;if(u)return;if(!t){o&&console.debug("[LogLayer] metadataOnly was called with no metadata; dropping.");return}let n=t;if(this.pluginManager.hasPlugins(T.onMetadataCalled)&&(n=this.pluginManager.runOnMetadataCalled(t,this),!n)){o&&console.debug("[LogLayer] Metadata was dropped due to plugin returning falsy value.");return}let i={logLevel:r,metadata:n};this._formatLog(i)}info(...t){this.isLevelEnabled(g.info)&&(this._formatMessage(t),this._formatLog({logLevel:g.info,params:t}))}warn(...t){this.isLevelEnabled(g.warn)&&(this._formatMessage(t),this._formatLog({logLevel:g.warn,params:t}))}error(...t){this.isLevelEnabled(g.error)&&(this._formatMessage(t),this._formatLog({logLevel:g.error,params:t}))}debug(...t){this.isLevelEnabled(g.debug)&&(this._formatMessage(t),this._formatLog({logLevel:g.debug,params:t}))}trace(...t){this.isLevelEnabled(g.trace)&&(this._formatMessage(t),this._formatLog({logLevel:g.trace,params:t}))}fatal(...t){this.isLevelEnabled(g.fatal)&&(this._formatMessage(t),this._formatLog({logLevel:g.fatal,params:t}))}raw(t){if(!this.isLevelEnabled(t.logLevel))return;let r={logLevel:t.logLevel,params:t.messages,metadata:t.metadata,err:t.error,context:t.context};this._formatMessage(t.messages),this._formatLog(r)}disableLogging(){for(let t of Object.keys(this.logLevelEnabledStatus))this.logLevelEnabledStatus[t]=!1;return this}enableLogging(){for(let t of Object.keys(this.logLevelEnabledStatus))this.logLevelEnabledStatus[t]=!0;return this}muteContext(){return this._config.muteContext=!0,this}unMuteContext(){return this._config.muteContext=!1,this}muteMetadata(){return this._config.muteMetadata=!0,this}unMuteMetadata(){return this._config.muteMetadata=!1,this}enableIndividualLevel(t){let r=t;return r in this.logLevelEnabledStatus&&(this.logLevelEnabledStatus[r]=!0),this}disableIndividualLevel(t){let r=t;return r in this.logLevelEnabledStatus&&(this.logLevelEnabledStatus[r]=!1),this}setLevel(t){let r=de[t];for(let u of Object.values(g)){let o=u,n=de[u];this.logLevelEnabledStatus[o]=n>=r}return this}isLevelEnabled(t){let r=t;return this.logLevelEnabledStatus[r]}formatContext(t){let{contextFieldName:r,muteContext:u}=this._config;return t&&Object.keys(t).length>0&&!u?r?{[r]:p({},t)}:p({},t):{}}formatMetadata(t=null){let{metadataFieldName:r,muteMetadata:u}=this._config;return t&&!u?r?{[r]:p({},t)}:p({},t):{}}getLoggerInstance(t){let r=this.idToTransport[t];if(r)return r.getLoggerInstance()}_formatMessage(t=[]){let{prefix:r}=this._config;r&&typeof t[0]=="string"&&(t[0]=`${r} ${t[0]}`)}_formatLog({logLevel:t,params:r=[],metadata:u=null,err:o,context:n=null}){var F;let{errorSerializer:i,errorFieldInMetadata:s,muteContext:a,contextFieldName:D,metadataFieldName:c,errorFieldName:l}=this._config,h=n!==null?n:this.contextManager.getContext(),f=!!u||(a?!1:n!==null?Object.keys(n).length>0:this.contextManager.hasContextData()),d={};if(f)if(D&&D===c){let B=this.formatContext(h)[D],y=this.formatMetadata(u)[c];d={[D]:p(p({},B),y)}}else d=p(p({},this.formatContext(h)),this.formatMetadata(u));if(o){let B=i?i(o):o;s&&u&&c?d!=null&&d[c]?d[c][l]=B:d=S(p({},d),{[c]:{[l]:B}}):s&&!u&&c?d=S(p({},d),{[c]:{[l]:B}}):d=S(p({},d),{[l]:B}),f=!0}if(this.pluginManager.hasPlugins(T.onBeforeDataOut)&&(d=this.pluginManager.runOnBeforeDataOut({data:f?d:void 0,logLevel:t,error:o,metadata:u,context:h},this),d&&!f&&(f=!0)),this.pluginManager.hasPlugins(T.onBeforeMessageOut)&&(r=this.pluginManager.runOnBeforeMessageOut({messages:[...r],logLevel:t},this)),this.hasMultipleTransports){let B=this._config.transport.filter(y=>y.enabled).map(async y=>{if(!(this.pluginManager.hasPlugins(T.shouldSendToLogger)&&!this.pluginManager.runShouldSendToLogger({messages:[...r],data:f?d:void 0,logLevel:t,transportId:y.id,error:o,metadata:u,context:h},this)))return y._sendToLogger({logLevel:t,messages:[...r],data:f?d:void 0,hasData:f,error:o,metadata:u,context:h})});Promise.all(B).catch(y=>{this._config.consoleDebug&&console.error("[LogLayer] Error executing transports:",y)})}else{if(!((F=this.singleTransport)!=null&&F.enabled)||this.pluginManager.hasPlugins(T.shouldSendToLogger)&&!this.pluginManager.runShouldSendToLogger({messages:[...r],data:f?d:void 0,logLevel:t,transportId:this.singleTransport.id,error:o,metadata:u,context:h},this))return;this.singleTransport._sendToLogger({logLevel:t,messages:[...r],data:f?d:void 0,hasData:f,error:o,metadata:u,context:h})}}};function Iu(){let e={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}};return new Ut({transport:e})}function jt(e){return e!=null?e:Iu()}import{Ok as Bi,Err as Au}from"@kumori/kdsl-lsp/util/result.js";async function VD(e){var r,u;let t=jt(e.logger);if(!e.interactive)return Au(["Index create command requires interactive mode. Set interactive: true to use this command programmatically with prompts, or use the CLI directly: kdsl index create"]);try{let{Action:o}=await Promise.resolve().then(()=>(yu(),Lu));return await o(t)({module:(r=e.module)!=null?r:void 0,index:(u=e.indexFile)!=null?u:void 0}),Bi(void 0)}catch(o){return Au([String(o)])}}export{VD as indexCreate};
|
|
1
|
+
import { getLogger } from "./logger.js";
|
|
2
|
+
import { Ok, Err } from "@kumori/kdsl-lsp/util/result.js";
|
|
3
|
+
/**
|
|
4
|
+
* Create an index file entry for a Kumori module.
|
|
5
|
+
*
|
|
6
|
+
* This command generates a new index file entry for the current module or a specified
|
|
7
|
+
* module. The entry includes module metadata, artifacts, and JSON schemas.
|
|
8
|
+
*
|
|
9
|
+
* In non-interactive mode, you can provide all necessary parameters via options.
|
|
10
|
+
* In interactive mode (interactive: true), missing parameters will be prompted.
|
|
11
|
+
*
|
|
12
|
+
* @param options - Index create options
|
|
13
|
+
* @returns Result with index entry object on success, or string[] of errors
|
|
14
|
+
*
|
|
15
|
+
* @example Non-interactive usage (programmatic)
|
|
16
|
+
* ```typescript
|
|
17
|
+
* const result = await indexCreate({
|
|
18
|
+
* services,
|
|
19
|
+
* module: './my-module',
|
|
20
|
+
* indexFile: './index.json',
|
|
21
|
+
* interactive: false
|
|
22
|
+
* })
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @example Interactive usage (CLI-like)
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const result = await indexCreate({
|
|
28
|
+
* services,
|
|
29
|
+
* interactive: true // Will prompt for missing info
|
|
30
|
+
* })
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export async function indexCreate(options) {
|
|
34
|
+
const log = getLogger(options.logger);
|
|
35
|
+
// For now, we'll use the existing implementation from the CLI
|
|
36
|
+
// This command is heavily interactive, so we'll delegate to the CLI action
|
|
37
|
+
if (!options.interactive) {
|
|
38
|
+
return Err([
|
|
39
|
+
"Index create command requires interactive mode. " +
|
|
40
|
+
"Set interactive: true to use this command programmatically with prompts, " +
|
|
41
|
+
"or use the CLI directly: kdsl index create",
|
|
42
|
+
]);
|
|
43
|
+
}
|
|
44
|
+
// Import the action and run it
|
|
45
|
+
try {
|
|
46
|
+
const { Action } = await import("../index/create/main.js");
|
|
47
|
+
const action = Action(log);
|
|
48
|
+
// The Action function takes (options, command) but we cast to bypass type checking
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
50
|
+
await action({
|
|
51
|
+
module: options.module ?? undefined,
|
|
52
|
+
index: options.indexFile ?? undefined,
|
|
53
|
+
});
|
|
54
|
+
return Ok(undefined);
|
|
55
|
+
}
|
|
56
|
+
catch (err) {
|
|
57
|
+
return Err([String(err)]);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=index-cmd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-cmd.js","sourceRoot":"","sources":["../../src/lib/index-cmd.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAA;AA2BzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,OAA2B
|
|
1
|
+
{"version":3,"file":"index-cmd.js","sourceRoot":"","sources":["../../src/lib/index-cmd.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAA;AA2BzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,OAA2B;IAE3B,MAAM,GAAG,GAAG,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;IAErC,8DAA8D;IAC9D,2EAA2E;IAC3E,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;QACzB,OAAO,GAAG,CAAC;YACT,kDAAkD;gBAChD,2EAA2E;gBAC3E,4CAA4C;SAC/C,CAAC,CAAA;IACJ,CAAC;IAED,+BAA+B;IAC/B,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,yBAAyB,CAAC,CAAA;QAC1D,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;QAE1B,mFAAmF;QACnF,8DAA8D;QAC9D,MAAO,MAAc,CAAC;YACpB,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,SAAS;YACnC,KAAK,EAAE,OAAO,CAAC,SAAS,IAAI,SAAS;SACtC,CAAC,CAAA;QAEF,OAAO,EAAE,CAAO,SAAS,CAAC,CAAA;IAC5B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IAC3B,CAAC;AACH,CAAC"}
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -40,6 +40,8 @@
|
|
|
40
40
|
*/
|
|
41
41
|
export { build } from "./build.js";
|
|
42
42
|
export type { BuildOptions } from "./build.js";
|
|
43
|
+
export { generateDeployment } from "./deployment.js";
|
|
44
|
+
export type { DeploymentGenOptions } from "./deployment.js";
|
|
43
45
|
export { check } from "./check.js";
|
|
44
46
|
export type { CheckOptions } from "./check.js";
|
|
45
47
|
export { clean } from "./clean.js";
|