@visulima/pail 3.0.3 → 3.1.0

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE.md +34 -0
  3. package/README.md +280 -0
  4. package/dist/index.browser.d.ts +4 -3
  5. package/dist/index.server.d.ts +14 -72
  6. package/dist/index.server.js +2 -5
  7. package/dist/interactive/index.d.ts +28 -0
  8. package/dist/interactive/index.js +1 -0
  9. package/dist/object-tree.d.ts +17 -0
  10. package/dist/object-tree.js +2 -0
  11. package/dist/packem_shared/InteractiveManager-CgmJyW9x.js +3 -0
  12. package/dist/packem_shared/InteractiveStreamHook-NtJu71aN.js +1 -0
  13. package/dist/packem_shared/PrettyReporter-Bns0ZWLy.js +12 -0
  14. package/dist/packem_shared/{abstract-json-reporter-wUti0B3k.d.ts → abstract-json-reporter-CPsNkpz8.d.ts} +3 -3
  15. package/dist/packem_shared/{abstract-pretty-reporter-MOYolfGR.d.ts → abstract-pretty-reporter-DB2G-qlI.d.ts} +1 -1
  16. package/dist/packem_shared/format-label-CpyyTBom.js +26 -0
  17. package/dist/packem_shared/index-CysYvHXs.js +8 -0
  18. package/dist/packem_shared/interactive-stream-hook-CeVo4Kth.js +2 -0
  19. package/dist/packem_shared/{pail.browser-Bs2ng_Qj.d.ts → pail.browser-CmWcqnn9.d.ts} +1 -1
  20. package/dist/packem_shared/{types-RidvA4RN.d.ts → types-DVzG8TWL.d.ts} +2 -29
  21. package/dist/processor/caller/caller-processor.d.ts +2 -1
  22. package/dist/processor/message-formatter-processor.d.ts +2 -1
  23. package/dist/processor/redact-processor.d.ts +2 -1
  24. package/dist/progress-bar.d.ts +76 -0
  25. package/dist/progress-bar.js +1 -0
  26. package/dist/reporter/file/json-file-reporter.d.ts +3 -2
  27. package/dist/reporter/json/index.browser.d.ts +3 -2
  28. package/dist/reporter/json/index.d.ts +3 -2
  29. package/dist/reporter/pretty/index.browser.d.ts +3 -2
  30. package/dist/reporter/pretty/index.d.ts +3 -2
  31. package/dist/reporter/pretty/index.js +1 -1
  32. package/dist/reporter/simple/simple-reporter.server.d.ts +3 -2
  33. package/dist/reporter/simple/simple-reporter.server.js +3 -3
  34. package/dist/spinner.d.ts +154 -0
  35. package/dist/spinner.js +1 -0
  36. package/package.json +17 -1
  37. package/dist/packem_shared/PrettyReporter-APmxUrnh.js +0 -12
  38. package/dist/packem_shared/format-label-DqvZRRR6.js +0 -33
  39. package/dist/packem_shared/getBarChar-mKDZW32R.js +0 -1
@@ -0,0 +1,26 @@
1
+ var xe=Object.defineProperty;var O=(e,t)=>xe(e,"name",{value:t,configurable:!0});import{createRequire as Ie}from"node:module";import{grey as _e,green as Y,cyan as ze,red as Me,yellow as G,bold as ne,magenta as Le,underline as Be}from"@visulima/colorize";const Te=Ie(import.meta.url),T=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ee=O(e=>{if(typeof T<"u"&&T.versions&&T.versions.node){const[t,r]=T.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return T.getBuiltinModule(e)}return Te(e)},"__cjs_getBuiltinModule"),{createRequire:ke}=Ee("node:module");var Ce=Object.defineProperty,Fe=O((e,t)=>Ce(e,"name",{value:t,configurable:!0}),"A$3"),We=Object.defineProperty,D=Fe((e,t)=>We(e,"name",{value:t,configurable:!0}),"v"),Ve=Object.defineProperty,Ge=D((e,t)=>Ve(e,"name",{value:t,configurable:!0}),"r$1");const Re=Ge(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
2
+ `),"normalizeLF"),De=globalThis.process||Object.create(null),U={versions:{}},H=new Proxy(De,{get(e,t){if(t in e)return e[t];if(t in U)return U[t]}});var qe=Object.defineProperty,Je=D((e,t)=>qe(e,"name",{value:t,configurable:!0}),"b");const Ye=Je((e,t,r,n)=>{const i={column:0,line:-1,...e.start},o={...i,...e.end},l=i.line,a=i.column,s=o.line,c=o.column;let u=Math.max(l-(r+1),0),g=Math.min(t.length,s+n);l===-1&&(u=0),s===-1&&(g=t.length);const m=s-l,f={};if(m)for(let d=0;d<=m;d++){const y=d+l;if(!a)f[y]=!0;else if(d===0){const h=t[y-1]?.length;f[y]=[a,(h??0)-a+1]}else if(d===m)f[y]=[0,c];else{const h=t[y-d]?.length;f[y]=[0,h]}}else a===c?f[l]=a?[a,0]:!0:f[l]=[a,(c??0)-(a??0)];return{end:g,markerLines:f,start:u}},"getMarkerLines");var Ue=Object.defineProperty,z=D((e,t)=>Ue(e,"name",{value:t,configurable:!0}),"o");const He=H.platform==="win32"&&!H.env?.WT_SESSION?">":"❯",Ke=z((e,t,r)=>{const n={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...r,color:{gutter:z(d=>d,"gutter"),marker:z(d=>d,"marker"),message:z(d=>d,"message"),...r?.color}},i=t.start&&typeof t.start.column=="number";let o=Re(e).split(`
3
+ `);typeof n?.tabWidth=="number"&&(o=o.map(d=>d.replaceAll(" "," ".repeat(n.tabWidth))));const{end:l,markerLines:a,start:s}=Ye(t,o,n.linesAbove,n.linesBelow),c=String(l).length,{gutter:u,marker:g,message:m}=n.color;let f=o.slice(s,l).map((d,y)=>{const h=s+1+y,S=a[h],_=` ${h}`.slice(-c),we=!a[h+1],W=` ${_}${n.showGutter?" |":""}`;if(S){let V="";if(Array.isArray(S)){const Pe=d.replaceAll(/[^\t]/g," ").slice(0,Math.max(S[0]-1,0)),Ae=S[1]||1;V=[`
4
+ `,n.prefix+u(W.replaceAll(/\d/g," "))," ",Pe,g("^").repeat(Ae)].join(""),we&&n.message&&(V+=` ${m(n.message)}`)}return[n.prefix+g(He),u(W),d.length>0?` ${d}`:"",V].join("")}return`${n.prefix} ${u(W)}${d.length>0?` ${d}`:""}`}).join(`
5
+ `);return n.message&&!i&&(f=`${n.prefix+" ".repeat(c+1)+n.message}
6
+ ${f}`),f},"codeFrame");var Qe=Object.defineProperty,Xe=O((e,t)=>Qe(e,"name",{value:t,configurable:!0}),"v$1"),Ze=Object.defineProperty,et=Xe((e,t)=>Ze(e,"name",{value:t,configurable:!0}),"v"),tt=Object.defineProperty,N=et((e,t)=>tt(e,"name",{value:t,configurable:!0}),"u");const P=N((e,...t)=>{process.env.DEBUG&&String(process.env.DEBUG)==="true"&&console.debug(`error:parse-stacktrace: ${e}`,...t)},"debugLog"),A="<unknown>",rt=/^.*?\s*at\s(?:(.+?\)(?:\s\[.+\])?|\(?.*?)\s?\((?:address\sat\s)?)?(?:async\s)?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,nt=/\((\S+)\),\s(<[^>]+>)?:(\d+)?:(\d+)?\)?/,it=/(.*?):(\d+):(\d+)(\s<-\s(.+):(\d+):(\d+))?/,ot=/(eval)\sat\s(<anonymous>)\s\((.*)\)?:(\d+)?:(\d+)\),\s*(<anonymous>)?:(\d+)?:(\d+)/,at=/^\s*in\s(?:([^\\/]+(?:\s\[as\s\S+\])?)\s\(?)?\(at?\s?(.*?):(\d+)(?::(\d+))?\)?\s*$/,lt=/in\s(.*)\s\(at\s(.+)\)\sat/,st=/^(?:.*@)?(.*):(\d+):(\d+)$/,ct=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. \/=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ut=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ft=/(\S[^\s[]*\[.*\]|.*?)@(.*):(\d+):(\d+)/,K=/\(error: (.*)\)/,ie=N((e,t)=>{const r=e.includes("safari-extension"),n=e.includes("safari-web-extension");return r||n?[e.includes("@")?e.split("@")[0]:A,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},"extractSafariExtensionDetails"),oe=N((e,t)=>{const r=it.exec(t);r&&(e.file=r[1],e.line=+r[2],e.column=+r[3])},"parseMapped"),dt=N(e=>{const t=lt.exec(e);if(t){P(`parse nested node error stack line: "${e}"`,`found: ${JSON.stringify(t)}`);const n=t[2].split(":");return{column:n[2]?+n[2]:void 0,file:n[0],line:n[1]?+n[1]:void 0,methodName:t[1]||A,raw:e,type:void 0}}const r=at.exec(e);if(r){P(`parse node error stack line: "${e}"`,`found: ${JSON.stringify(r)}`);const n={column:r[4]?+r[4]:void 0,file:r[2]?r[2].replace(/at\s/,""):void 0,line:r[3]?+r[3]:void 0,methodName:r[1]||A,raw:e,type:e.startsWith("internal")?"internal":void 0};return oe(n,`${r[2]}:${r[3]}:${r[4]}`),n}},"parseNode"),pt=N(e=>{const t=rt.exec(e);if(t){P(`parse chrome error stack line: "${e}"`,`found: ${JSON.stringify(t)}`);const r=t[2]?.startsWith("native"),n=t[2]?.startsWith("eval")||t[1]?.startsWith("eval");let i,o;if(n){const c=nt.exec(e);if(c){const u=/^(\S+):(\d+):(\d+)$|^(\S+):(\d+)$/.exec(c[1]);u?(t[2]=u[4]??u[1],t[3]=u[5]??u[2],t[4]=u[3]):c[2]&&(t[2]=c[1]),c[2]&&(i={column:c[4]?+c[4]:void 0,file:c[2],line:c[3]?+c[3]:void 0,methodName:"eval",raw:e,type:"eval"})}else{const u=ot.exec(e);u&&(o={column:u[5]?+u[5]:void 0,file:u[3],line:u[4]?+u[4]:void 0},i={column:u[8]?+u[8]:void 0,file:u[2],line:u[7]?+u[7]:void 0,methodName:"eval",raw:u[0],type:"eval"})}}const[l,a]=ie(t[1]?t[1].replace(/^Anonymous function$/,"<anonymous>"):A,t[2]),s={column:t[4]?+t[4]:void 0,evalOrigin:i,file:a,line:t[3]?+t[3]:void 0,methodName:l,raw:e,type:n?"eval":r?"native":void 0};return o?(s.column=o.column,s.file=o.file,s.line=o.line):oe(s,`${a}:${t[3]}:${t[4]}`),s}},"parseChromium"),gt=N((e,t)=>{const r=ct.exec(e);if(r){P(`parse gecko error stack line: "${e}"`,`found: ${JSON.stringify(r)}`);const n=r[3]?.includes(" > eval"),i=n&&r[3]&&ut.exec(r[3]);let o;n&&i&&(r[3]=i[1],o={column:r[5]?+r[5]:void 0,file:r[3],line:r[4]?+r[4]:void 0,methodName:"eval",raw:e,type:"eval"},r[4]=i[2]);const[l,a]=ie(r[1]?r[1].replace(/^Anonymous function$/,"<anonymous>"):A,r[3]);let s;(t?.type==="safari"||!n&&t?.type==="firefox")&&t.column?s=t.column:!n&&r[5]&&(s=+r[5]);let c;return(t?.type==="safari"||!n&&t?.type==="firefox")&&t.line?c=t.line:r[4]&&(c=+r[4]),{column:s,evalOrigin:o,file:a,line:c,methodName:l,raw:e,type:n?"eval":a.includes("[native code]")?"native":void 0}}},"parseGecko"),mt=N((e,t)=>{const r=ft.exec(e);if(!(r&&r[2].includes(" > eval"))&&r)return P(`parse firefox error stack line: "${e}"`,`found: ${JSON.stringify(r)}`),{column:r[4]?+r[4]:t?.column??void 0,file:r[2],line:r[3]?+r[3]:t?.line??void 0,methodName:r[1]||A,raw:e,type:void 0}},"parseFirefox"),bt=N(e=>{const t=st.exec(e);if(t)return P(`parse react android native error stack line: "${e}"`,`found: ${JSON.stringify(t)}`),{column:t[3]?+t[3]:void 0,file:t[1],line:t[2]?+t[2]:void 0,methodName:A,raw:e,type:void 0}},"parseReactAndroidNative"),ae=N((e,{filter:t,frameLimit:r=50}={})=>{let n=(e.stacktrace??e.stack??"").split(`
7
+ `).map(i=>(K.test(i)?i.replace(K,"$1"):i).replace(/^\s+|\s+$/g,"")).filter(i=>!/\S*(?:Error: |AggregateError:)/.test(i)&&i!=="eval code");return t&&(n=n.filter(i=>t(i))),n=n.slice(0,r),n.reduce((i,o,l)=>{if(!o||o.length>1024)return i;let a;if(/^\s*in\s.*/.test(o))a=dt(o);else if(/^.*?\s*at\s.*/.test(o))a=pt(o);else if(/^.*?\s*@.*|\[native code\]/.test(o)){let s;l===0&&(e.columnNumber||e.lineNumber?s={column:e.columnNumber,line:e.lineNumber,type:"firefox"}:(e.line||e.column)&&(s={column:e.column,line:e.line,type:"safari"})),a=mt(o,s)||gt(o,s)}else a=bt(o);return a?i.push(a):P(`parse error stack line: "${o}"`,"not parser found"),i},[])},"parseStacktrace");var $t=Object.defineProperty,yt=O((e,t)=>$t(e,"name",{value:t,configurable:!0}),"p$1"),vt=Object.defineProperty,le=yt((e,t)=>vt(e,"name",{value:t,configurable:!0}),"m");const ht=ke(import.meta.url),x=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,q=le(e=>{if(typeof x<"u"&&x.versions&&x.versions.node){const[t,r]=x.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return x.getBuiltinModule(e)}return ht(e)},"__cjs_getBuiltinModule"),{existsSync:St,readFileSync:Ot}=q("node:fs"),{relative:jt}=q("node:path"),{cwd:Nt}=x,{fileURLToPath:wt}=q("node:url");var Pt=Object.defineProperty,b=le((e,t)=>Pt(e,"name",{value:t,configurable:!0}),"o");const I=b((e,t,r)=>r===0?e.toString():t===" "?e+" ".repeat(r):e+" ".repeat(t*r),"getPrefix"),At=b((e,t)=>{const r=e.replace("async file:","file:");return jt(t,r.startsWith("file:")?wt(r):r)},"getRelativePath"),xt=b((e,t,r)=>{if(t)return r.title(e.message);const n=e.message?`: ${e.message}`:"";return r.title(e.name+n)},"getTitleText"),se=b((e,{color:t,hideErrorTitle:r,indentation:n,prefix:i},o)=>`${I(i,n,o)}${xt(e,r,t)}
8
+ `,"getMessage"),ce=b((e,{color:t,indentation:r,prefix:n},i)=>{if(e.hint===void 0)return;const o=I(n,r,i);let l="";if(Array.isArray(e.hint))for(const a of e.hint)l+=`${(o+a).toString()}
9
+ `;else l+=o+e.hint;return t.hint(l)},"getHint"),J=b((e,{color:t,cwd:r,displayShortPath:n,indentation:i,prefix:o},l=0)=>{const a=n?At(e.file,r):e.file,{fileLine:s,method:c}=t;return`${I(o,i,l)}at ${e.methodName?`${c(e.methodName)} `:""}${s(a)}:${s(e.line?.toString()??"")}`.toString()},"getMainFrame"),ue=b((e,{color:t,indentation:r,linesAbove:n,linesBelow:i,prefix:o,showGutter:l,showLineNumbers:a,tabWidth:s},c)=>{if(e.file===void 0)return;const u=e.file.replace("file://","");if(!St(u))return;const g=Ot(u,"utf8");return Ke(g,{start:{column:e.column,line:e.line}},{color:t,linesAbove:n,linesBelow:i,prefix:I(o,r,c),showGutter:l,showLineNumbers:a,tabWidth:s})},"getCode"),fe=b((e,t,r)=>{if(e.errors.length===0)return;let n=`${I(t.prefix,t.indentation,r)}Errors:
10
+
11
+ `,i=!0;for(const o of e.errors)i?i=!1:n+=`
12
+
13
+ `,n+=pe(o,{...t,framesMaxLimit:1,hideErrorCodeView:t.hideErrorErrorsCodeView},r+1);return`
14
+ ${n}`},"getErrors"),de=b((e,t,r)=>{let n=`${I(t.prefix,t.indentation,r)}Caused by:
15
+
16
+ `;const i=e.cause;n+=se(i,t,r);const o=ae(i).shift(),l=ce(i,t,r);if(l&&(n+=`${l}
17
+ `),o&&(n+=J(o,t,r),!t.hideErrorCauseCodeView)){const a=ue(o,t,r);a!==void 0&&(n+=`
18
+ ${a}`)}if(i.cause)n+=`
19
+ ${de(i,t,r+1)}`;else if(i instanceof AggregateError){const a=fe(i,t,r);a!==void 0&&(n+=`
20
+ ${a}`)}return`
21
+ ${n}`},"getCause"),It=b((e,t)=>(e.length>0?`
22
+ `:"")+e.map(r=>J(r,t)).join(`
23
+ `),"getStacktrace"),pe=b((e,t,r)=>{const n={cwd:Nt(),displayShortPath:!1,filterStacktrace:void 0,framesMaxLimit:Number.POSITIVE_INFINITY,hideErrorCauseCodeView:!1,hideErrorCodeView:!1,hideErrorErrorsCodeView:!1,hideErrorTitle:!1,hideMessage:!1,indentation:4,linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,showLineNumbers:!0,tabWidth:4,...t,color:{fileLine:b(l=>l,"fileLine"),gutter:b(l=>l,"gutter"),hint:b(l=>l,"hint"),marker:b(l=>l,"marker"),message:b(l=>l,"message"),method:b(l=>l,"method"),title:b(l=>l,"title"),...t.color}},i=ae(e,{filter:t.filterStacktrace,frameLimit:n.framesMaxLimit}),o=i.shift();return[t.hideMessage?void 0:se(e,n,r),ce(e,n,r),o?J(o,n,r):void 0,o&&!n.hideErrorCodeView?ue(o,n,r):void 0,e instanceof AggregateError?fe(e,n,r):void 0,e.cause===void 0?void 0:de(e,n,r),i.length>0?It(i,n):void 0].filter(Boolean).join(`
24
+ `).replaceAll("\\","/")},"internalRenderError"),Ur=b((e,t={})=>{if(t.framesMaxLimit!==void 0&&t.framesMaxLimit<=0)throw new RangeError("The 'framesMaxLimit' option must be a positive number");return pe(e,t,0)},"renderError");var Tt=Object.defineProperty,ge=O((e,t)=>Tt(e,"name",{value:t,configurable:!0}),"w"),Et=Object.defineProperty,p=ge((e,t)=>Et(e,"name",{value:t,configurable:!0}),"l"),kt=Object.defineProperty,_t=p((e,t)=>kt(e,"name",{value:t,configurable:!0}),"L$1");const v=_t((e,t,r,n,i,o=", ")=>{const l=e.length;if(l===0)return"";let a=n;i!==void 0&&(a=i);const s=r.truncate;let c="",u="",g="";for(let m=0;m<l;m+=1){const f=m+1===e.length,d=m+2===e.length;g=`…(${e.length-m})`;let y=e[m];r.truncate=s-c.length-(f?0:o.length);const h=u||a(y,t,r,n)+(f?"":o),S=c.length+h.length,_=S+g.length;if(f&&S>s&&c.length+g.length<=s||!f&&!d&&_>s||(y=e[m+1],u=f?"":a(y,t,r,n)+(d?"":o),!f&&d&&_>s&&S+u.length>s))break;if(c+=h,!f&&!d&&S+u.length>=s){g=`…(${e.length-m-1})`;break}g=""}return`${c}${g}`},"inspectList");var zt=Object.defineProperty,C=p((e,t)=>zt(e,"name",{value:t,configurable:!0}),"s$8");const Mt=C(([e,t],r,n)=>(n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:n.stylize(String(e),"yellow")),"inspectAttribute"),Lt=C((e,t,r)=>{switch(e.nodeType){case 1:return me(e,e,r,t);case 3:return t(e.data,t,r);default:return t(e,t,r)}},"inspectNode"),R=C((e,t,r,n)=>v(e,e,t,r,Lt,`
25
+ `),"inspectNodeCollection"),me=C((e,t,r,n)=>{const i=e.getAttributeNames(),o=e.tagName.toLowerCase(),l=r.stylize(`<${o}`,"special"),a=r.stylize(">","special"),s=r.stylize(`</${o}>`,"special");r.truncate-=o.length*2+5;let c="";i.length>0&&(c+=" ",c+=v(i.map(m=>[m,e.getAttribute(m)]),t,r,n,Mt," ")),r.truncate-=c.length;const{truncate:u}=r;let g=R(e.children,r,n,void 0);return g&&g.length>u&&(g=`…(${e.children.length})`),`${l}${c}${a}${g}${s}`},"inspectHTMLElement");var Bt=Object.defineProperty,Ct=p((e,t)=>Bt(e,"name",{value:t,configurable:!0}),"n$3");const Ft=Ct((e,t,r)=>e.length===0?"Arguments []":(t.truncate-=13,`Arguments [ ${v(e,e,t,r)} ]`),"inspectArguments");var Wt=Object.defineProperty,be=p((e,t)=>Wt(e,"name",{value:t,configurable:!0}),"r$2");const Vt=be((e,t)=>{let r;if(e===" ")r=" ";else if(typeof e=="number"&&e>0)r=Array.from({length:e+1}).join(" ");else return;return{base:r,prev:`
26
+ ${Array.from({length:t+1}).join(r)}`}},"getIndent"),F=be((e,t)=>{if(e.length===0)return"";const r=t.prev+t.base;return r+e.split(", ").join(`,${r}`)+t.prev},"indentedJoin");var Gt=Object.defineProperty,$e=p((e,t)=>Gt(e,"name",{value:t,configurable:!0}),"i$4");const Rt=$e((e,t)=>{if(/^[a-z_]\w*$/i.test(e))return e;const r=JSON.stringify(e);return t.quoteStyle==="double"?r.replaceAll('"',String.raw`\"`):r.replaceAll("'",String.raw`\'`).replaceAll(String.raw`\"`,'"').replaceAll(/^"|"$/g,"'")},"quoteComplexKey"),E=$e(([e,t],r,n,i)=>(n.truncate-=2,typeof e=="string"?e=Rt(e,n):typeof e!="number"&&(e=`[${i(e,r,n)}]`),n.truncate-=e.length,t=i(t,r,n),`${e}: ${t}`),"inspectProperty");var Dt=Object.defineProperty,ye=p((e,t)=>Dt(e,"name",{value:t,configurable:!0}),"p$6");const qt=ye(e=>{for(const t of e)if(Array.isArray(t)||typeof t=="object"&&t!==null)return!0;return!1},"multiLineValues"),Jt=ye((e,t,r,n)=>{const i=Object.keys(e).slice(e.length);if(e.length===0&&i.length===0)return"[]";t.truncate-=4;let o=v(e,e,t,r);t.truncate-=o.length;let l="";i.length>0&&(l=v(i.map(s=>[s,e[s]]),e,t,r,E));const a=n&&qt(e);return a&&(o=F(o,n)),`[${a?"":" "}${o}${l?`, ${l}`:""}${a?"":" "}]`},"inspectArray");var Yt=Object.defineProperty,Ut=p((e,t)=>Yt(e,"name",{value:t,configurable:!0}),"a$4");const ve=Ut((e,t)=>{if(e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY||t.includes("e"))return t;const r=/\d(?=(?:\d{3})+(?!\d))/g;if(typeof e=="number"){const n=e<0?-Math.floor(-e):Math.floor(e);if(n!==e){const i=String(n),o=t.slice(i.length+1);return`${i.replace(r,"$&_")}.${o.replace(/\d{3}/g,"$&_").replace(/_$/,"")}`}}return t.replace(r,"$&_")},"addNumericSeparator");var Ht=Object.defineProperty,he=p((e,t)=>Ht(e,"name",{value:t,configurable:!0}),"i$3");const Kt=he(e=>e>="\uD800"&&e<="\uDBFF","isHighSurrogate"),w=he((e,t,r="…")=>{e=String(e);const n=r.length,i=e.length;if(n>t&&i>n)return r;if(i>t&&i>n){let o=t-n;return o>0&&Kt(e[o-1])&&(o-=1),`${e.slice(0,o)}${r}`}return e},"truncate");var Qt=Object.defineProperty,Xt=p((e,t)=>Qt(e,"name",{value:t,configurable:!0}),"e$5");const Q=Xt((e,t)=>{let r=w(e.toString(),t.truncate-1);return r!=="…"&&(r+="n"),t.stylize(t.numericSeparator?ve(e,r):r,"bigint")},"inspectBigInt");var Zt=Object.defineProperty,er=p((e,t)=>Zt(e,"name",{value:t,configurable:!0}),"g$1");const tr=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null),M=er((e,t,r,n)=>{if(globalThis.window!==void 0&&e===globalThis)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||globalThis.global!==void 0&&e===globalThis)return"{ [object globalThis] }";const i=Object.getOwnPropertyNames(e),o=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[],l=tr(e)===Object.prototype||e.constructor===Object,a=e instanceof Object?"":"null prototype",s=!l&&typeof Symbol<"u"&&Symbol.toStringTag in e?e[Symbol.toStringTag]:a?"Object":"",c=s||a?`[${[s,a].filter(Boolean).join(": ")}] `:"";if(i.length===0&&o.length===0)return`${c}{}`;t.truncate-=4;const u=v(i.map(f=>[f,e[f]]),e,t,r,E),g=v(o.map(f=>[f,e[f]]),e,t,r,E);let m="";return u&&g&&(m=", "),n?`${c}{${F(u+m+g,n)}}`:`${c}{ ${u}${m}${g} }`},"inspectObject");var rr=Object.defineProperty,nr=p((e,t)=>rr(e,"name",{value:t,configurable:!0}),"s$5");const ir=nr((e,t,r,n)=>{let i="";return i=i||e.constructor.name,(!i||i==="_class")&&(i="<Anonymous Class>"),t.truncate-=i.length,`${i} ${M(e,t,r,n)}`},"inspectClass");var or=Object.defineProperty,ar=p((e,t)=>or(e,"name",{value:t,configurable:!0}),"i$2");const lr=ar((e,t)=>{const r=e.toJSON();if(r===null)return"Invalid Date";const n=r.split("T"),i=n[0];return t.stylize(`${i}T${w(n[1],t.truncate-i.length-1)}`,"date")},"inspectDate");var sr=Object.defineProperty,cr=p((e,t)=>sr(e,"name",{value:t,configurable:!0}),"c$4");const ur=new Set(["column","columnNumber","description","fileName","line","lineNumber","message","name","number","stack"]),fr=cr((e,t,r)=>{const n=Object.getOwnPropertyNames(e).filter(a=>!ur.has(a)),{name:i}=e;t.truncate-=i.length;let o="";typeof e.message=="string"?o=w(e.message,t.truncate):n.unshift("message"),o=o?`: ${o}`:"",t.truncate-=o.length+5;const l=v(n.map(a=>[a,e[a]]),e,t,r,E);return`${i}${o}${l?` { ${l} }`:""}`},"inspectObject");var dr=Object.defineProperty,pr=p((e,t)=>dr(e,"name",{value:t,configurable:!0}),"c$3");const X=pr((e,t)=>{const r=e[Symbol.toStringTag]||"Function",n=e.toString();if(n.length<t.truncate-12)return t.stylize(`[${r}: ${n}]`,"special");const{name:i}=e;return i?t.stylize(`[${r} ${w(i,t.truncate-11)}]`,"special"):t.stylize(`[${r}]`,"special")},"inspectFunction");var gr=Object.defineProperty,Se=p((e,t)=>gr(e,"name",{value:t,configurable:!0}),"p$4");const mr=Se(([e,t],r,n,i)=>(n.truncate-=4,e=i(e,r,n),n.truncate-=e.length,`${e} => ${i(t,r,n)}`),"inspectMapEntry"),br=Se((e,t,r,n)=>{if(e.size<=0)return"Map (0) {}";t.truncate-=7;let i=v([...e.entries()],e,t,r,mr);return n&&(i=F(i,n)),`Map (${e.size}) {${n?"":" "}${i}${n?"":" "}}`},"inspectMap");var $r=Object.defineProperty,yr=p((e,t)=>$r(e,"name",{value:t,configurable:!0}),"e$4");function k(e,t){return Number.isNaN(e)?t.stylize("NaN","number"):e===Number.POSITIVE_INFINITY?t.stylize("Infinity","number"):e===Number.NEGATIVE_INFINITY?t.stylize("-Infinity","number"):e===0?t.stylize(1/e===Number.POSITIVE_INFINITY?"+0":"-0","number"):t.stylize(w(t.numericSeparator?ve(e,e.toString()):e.toString(),t.truncate),"number")}O(k,"j");ge(k,"w");p(k,"u$1");yr(k,"inspectNumber");var vr=Object.defineProperty,hr=p((e,t)=>vr(e,"name",{value:t,configurable:!0}),"e$3");const Sr=hr(()=>"Promise{…}","getPromiseValue");var Or=Object.defineProperty,jr=p((e,t)=>Or(e,"name",{value:t,configurable:!0}),"s$2");const Nr=jr((e,t)=>{const r=t.truncate-(2+e.flags.length);return t.stylize(`/${w(e.source,r)}/${e.flags}`,"regexp")},"inspectRegExp");var wr=Object.defineProperty,Pr=p((e,t)=>wr(e,"name",{value:t,configurable:!0}),"p$1");const Ar=Pr((e,t,r,n)=>{if(e.size===0)return"Set (0) {}";t.truncate-=7;let i=v([...e],e,t,r);return n&&(i=F(i,n)),`Set (${e.size}) {${n?"":" "}${i}${n?"":" "}}`},"inspectSet");var xr=Object.defineProperty,Ir=p((e,t)=>xr(e,"name",{value:t,configurable:!0}),"l");const Tr=Ir((e,t)=>{const r=t.quoteStyle==="double"?'"':"'";return t.quoteStyle==="double"&&(e=e.replaceAll('"','"')),r+e+r},"wrapQuotes");var Er=Object.defineProperty,Oe=p((e,t)=>Er(e,"name",{value:t,configurable:!0}),"e$2");const Z=new RegExp(String.raw`['\0-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5`+String.raw`\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]`,"g"),kr={" ":String.raw`\t`,"\n":String.raw`\n`,"\f":String.raw`\f`,"\r":String.raw`\r`,"\b":String.raw`\b`,"'":String.raw`\'`,"\\":"\\\\"},_r=16,zr=Oe(e=>kr[e]||`\\u${`0000${e.codePointAt(0).toString(_r)}`.slice(-4)}`,"escape"),ee=Oe((e,t)=>(Z.test(e)&&(e=e.replaceAll(Z,zr)),t.stylize(Tr(w(e,t.truncate-2),t),"string")),"inspectString");var Mr=Object.defineProperty,Lr=p((e,t)=>Mr(e,"name",{value:t,configurable:!0}),"o");const te=Lr(e=>"description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString(),"inspectSymbol");var Br=Object.defineProperty,je=p((e,t)=>Br(e,"name",{value:t,configurable:!0}),"c");const Cr=je(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName"),j=je((e,t,r)=>{const n=Cr(e);t.truncate-=n.length+4;const i=Object.keys(e).slice(e.length);if(e.length===0&&i.length===0)return`${n}[]`;let o="";for(let a=0;a<e.length;a++){const s=`${t.stylize(w(e[a],t.truncate),"number")}${a===e.length-1?"":", "}`;if(t.truncate-=s.length,e[a]!==e.length&&t.truncate<=3){o+=`…(${e.length-e[a]+1})`;break}o+=s}let l="";return i.length>0&&(l=v(i.map(a=>[a,e[a]]),e,t,r,E)),`${n}[ ${o}${l?`, ${l}`:""} ]`},"inspectTypedArray");var Fr=Object.defineProperty,$=p((e,t)=>Fr(e,"name",{value:t,configurable:!0}),"e");const L=new WeakMap,B={},re={Arguments:Ft,Array:Jt,ArrayBuffer:$(()=>"","ArrayBuffer"),BigInt:Q,bigint:Q,Boolean:$((e,t)=>t.stylize(String(e),"boolean"),"Boolean"),boolean:$((e,t)=>t.stylize(String(e),"boolean"),"boolean"),DataView:$(()=>"","DataView"),Date:lr,Error:fr,Float32Array:j,Float64Array:j,Function:X,function:X,Generator:$(()=>"","Generator"),HTMLCollection:R,Int8Array:j,Int16Array:j,Int32Array:j,Map:br,NodeList:R,null:$((e,t)=>t.stylize("null","null"),"null"),Number:k,number:k,Promise:Sr,RegExp:Nr,Set:Ar,String:ee,string:ee,Symbol:te,symbol:te,Uint8Array:j,Uint8ClampedArray:j,Uint16Array:j,Uint32Array:j,undefined:$((e,t)=>t.stylize("undefined","undefined"),"undefined"),WeakMap:$((e,t)=>t.stylize("WeakMap{…}","special"),"WeakMap"),WeakSet:$((e,t)=>t.stylize("WeakSet{…}","special"),"WeakSet")},Wr=$((e,t,r,n)=>globalThis.window===void 0&&typeof e[Symbol.for("nodejs.util.inspect.custom")]=="function"?e[Symbol.for("nodejs.util.inspect.custom")](n,t):"inspect"in e&&typeof e.inspect=="function"?e.inspect(n,t):"constructor"in e&&L.has(e.constructor)?L.get(e.constructor)?.(e,t)??"unknown":B[r]?B[r](e,t):"","inspectCustom"),Ne=$((e,t,r,n)=>{if(n.includes(e))return"[Circular]";if(r>=t.depth&&t.depth>0&&typeof e=="object")return Array.isArray(e)?"[Array]":"[Object]";const i=$((s,c,u)=>(c&&(n=[...n],n.push(c)),Ne(s,u,r+1,n)),"inspect"),o=t.indent?Vt(t.indent,r):void 0;let l=e===null?"null":typeof e;if(l==="object"&&(l=Object.prototype.toString.call(e).slice(8,-1)),re[l]!==void 0)return re[l](e,t,i,o);if(t.customInspect&&e){const s=Wr(e,t,l,t.depth-r);if(s)return typeof s=="string"?s:i(s,e,t)}const a=e?Object.getPrototypeOf(e):!1;return a===Object.prototype||a===null?M(e,t,i,o):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?me(e,e,t,i):"constructor"in e?e.constructor!==Object?ir(e,t,i,o):M(e,t,i,o):e===Object(e)?M(e,t,i,o):t.stylize(String(e),l)},"internalInspect"),Hr=$((e,t={})=>{const r={breakLength:Number.POSITIVE_INFINITY,customInspect:!0,depth:5,indent:void 0,maxArrayLength:Number.POSITIVE_INFINITY,numericSeparator:!0,quoteStyle:"single",showHidden:!1,showProxy:!1,stylize:$(n=>n.toString(),"stylize"),truncate:Number.POSITIVE_INFINITY,...t};if(r.indent!==void 0&&r.indent!==" "&&!(Number.parseInt(r.indent,10)===r.indent&&r.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `undefined`');return Ne(e,r,0,[])},"inspect");$((e,t)=>L.has(e)?!1:(L.set(e,t),!0),"registerConstructor");$((e,t)=>e in B?!1:(B[e]=t,!0),"registerStringTag");var Vr=Object.defineProperty,Gr=O((e,t)=>Vr(e,"name",{value:t,configurable:!0}),"t");const Kr={indent:2,quoteStyle:"single",stylize:Gr((e,t)=>{const r={bigint:G,boolean:G,date:Le,null:ne,number:G,regexp:Me,special:ze,string:Y,symbol:Y,undefined:_e};return r[t]===void 0?e:r[t](e)},"stylize")};var Rr=Object.defineProperty,Dr=O((e,t)=>Rr(e,"name",{value:t,configurable:!0}),"o");const Qr=Dr((e,t)=>{let r=t.uppercase.label?e.toUpperCase():e;return r=t.underline.label?Be(r):r,t.bold.label&&(r=ne(r)),r},"formatLabel");export{Ur as G,Hr as a,Qr as n,Kr as u};
@@ -0,0 +1,8 @@
1
+ var $e=Object.defineProperty;var g=(e,i)=>$e(e,"name",{value:i,configurable:!0});import{createRequire as Se}from"node:module";const We=Se(import.meta.url),y=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ee=g(e=>{if(typeof y<"u"&&y.versions&&y.versions.node){const[i,r]=y.versions.node.split(".").map(Number);if(i>22||i===22&&r>=3||i===20&&r>=16)return y.getBuiltinModule(e)}return We(e)},"__cjs_getBuiltinModule"),B=y,{execFileSync:ye}=ee("node:child_process"),T=ee("node:fs"),Be=ee("node:tty");var ke=Object.defineProperty,Ie=g((e,i)=>ke(e,"name",{value:i,configurable:!0}),"p$1"),Fe=Object.defineProperty,de=Ie((e,i)=>Fe(e,"name",{value:i,configurable:!0}),"R"),Oe=Object.defineProperty,je=de((e,i)=>Oe(e,"name",{value:i,configurable:!0}),"E");const he=String.raw,ae=he`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,Ne=je(()=>new RegExp(he`\p{RI}{2}|(?![#*\d](?!\uFE0F?\u20E3))${ae}(?:\u200D${ae})*`,"gu"),"default");var Re=Object.defineProperty,Te=de((e,i)=>Re(e,"name",{value:i,configurable:!0}),"p");const k=new Set(["\x1B","›"]),D="\x07",fe="[",ie="m",L="]8;;",_e=39,Ce=/[\u200B\uFEFF\u2060-\u2064]/g,Pe=new RegExp(`(?:\\${fe}(?<code>\\d+)m|\\${L}(?<uri>.*)${D})`),Me=Object.freeze(new Map([[0,0],[1,22],[2,22],[3,23],[4,24],[7,27],[8,28],[9,29],[30,39],[31,39],[32,39],[33,39],[34,39],[35,39],[36,39],[37,39],[40,49],[41,49],[42,49],[43,49],[44,49],[45,49],[46,49],[47,49],[90,39]])),I=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\))/g,_=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,M=Ne();Te(e=>e.replace(M,""),"stripEmoji");var He=Object.defineProperty,x=g((e,i)=>He(e,"name",{value:i,configurable:!0}),"f$1"),qe=Object.defineProperty,b=x((e,i)=>qe(e,"name",{value:i,configurable:!0}),"c"),Le=Object.defineProperty,K=b((e,i)=>Le(e,"name",{value:i,configurable:!0}),"E$1");function F(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}g(F,"M$1");x(F,"M");b(F,"A");K(F,"isAmbiguous");function O(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}g(O,"A$1");x(O,"C");b(O,"D$1");K(O,"isFullWidth");function j(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}g(j,"N$2");x(j,"T");b(j,"C");K(j,"isWide");function V(e){return F(e)?"ambiguous":O(e)?"fullwidth":e===8361||e>=65377&&e<=65470||e>=65474&&e<=65479||e>=65482&&e<=65487||e>=65490&&e<=65495||e>=65498&&e<=65500||e>=65512&&e<=65518?"halfwidth":e>=32&&e<=126||e===162||e===163||e===165||e===166||e===172||e===175||e>=10214&&e<=10221||e===10629||e===10630?"narrow":j(e)?"wide":"neutral"}g(V,"F");x(V,"R");b(V,"t");K(V,"getCategory");var De=Object.defineProperty,re=b((e,i)=>De(e,"name",{value:i,configurable:!0}),"e");function N(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}g(N,"j$1");x(N,"O");b(N,"r");re(N,"validate");function R(e){return N(e),V(e)}g(R,"y$2");x(R,"v");b(R,"eastAsianWidthType");re(R,"eastAsianWidthType");function ne(e,{ambiguousAsWide:i=!1}={}){return N(e),O(e)||j(e)||i&&F(e)?2:1}g(ne,"Y$1");x(ne,"J");b(ne,"eastAsianWidth");re(ne,"eastAsianWidth");var Ke=Object.defineProperty,z=b((e,i)=>Ke(e,"name",{value:i,configurable:!0}),"b");const ue=new Map,C=/(?:[\u0020-\u007E\u00A0-\u00FF](?!\uFE0F)){1,1000}/y,H=z(e=>e>=32&&e<=126?"latin":e===8203||e===8204||e===8205||e===8288?"zero":e<=31||e>=127&&e<=159?"control":e>=160&&e<=255||e>=9472&&e<=9599?"latin":e>=4352&&e<=4607||e>=11904&&e<=40959||e>=44032&&e<=55215||e>=63744&&e<=64255||e>=65280&&e<=65519&&!(e>=65377&&e<=65439)||e>=12352&&e<=12543?"wide":e===8230?"latin":"other","getCharType"),Ve=z((e,i)=>{const r=Math.floor(e/65536),s=e%65536;let l=ue.get(r);if(l||(l=new Map,ue.set(r,l)),l.has(s))return l.get(s);let u;if(H(e)==="latin")u=i.width.regular;else if(H(e)==="control")u=i.width.control;else if(H(e)==="wide")u=i.width.wide;else switch(R(e)){case"ambiguous":{u=i.width.ambiguousIsNarrow?i.width.regular:i.width.wide;break}case"fullwidth":{u=i.width.fullWidth;break}case"wide":{u=i.width.wide;break}default:u=i.width.regular}return l.set(s,u),u},"getCachedCharWidth"),ze=z(e=>e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071||e>=917760&&e<=917999||e>=65024&&e<=65039||e>=3633&&e<=3642||e>=3655&&e<=3662||e>=3761&&e<=3769||e>=3771&&e<=3772||e>=3784&&e<=3789||e>=2304&&e<=2307||e>=2362&&e<=2383||e>=2385&&e<=2391||e>=2402&&e<=2403||e>=2433&&e<=2435||e>=2492&&e<=2500||e>=2509&&e<=2509||e>=2561&&e<=2563||e>=2620&&e<=2637||e>=1611&&e<=1631||e>=1648&&e<=1648||e>=1750&&e<=1773||e>=2276&&e<=2302||e>=1425&&e<=1469||e>=1471&&e<=1471||e>=1473&&e<=1474||e>=1476&&e<=1477||e>=1479&&e<=1479||e>=3893&&e<=3893||e>=3895&&e<=3895||e>=3897&&e<=3897||e>=3953&&e<=3966||e>=3968&&e<=3972||e>=3974&&e<=3975?!0:e>=768&&e<=777||e>=803&&e<=803,"isCombiningCharacter"),Q=z((e,i={})=>{if(!e||e.length===0)return{ellipsed:!1,index:0,truncated:!1,width:0};const r={truncation:{countAnsiEscapeCodes:i.countAnsiEscapeCodes??!1,ellipsis:i.ellipsis??"",ellipsisWidth:i.ellipsisWidth??(i.ellipsis?Q(i.ellipsis,{...i,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width:0),limit:i.limit??Number.POSITIVE_INFINITY},width:{ambiguousIsNarrow:i.ambiguousIsNarrow??!1,ansi:i.ansiWidth??0,control:i.controlWidth??0,emoji:i.emojiWidth??2,fullWidth:i.fullWidth??2,halfWidth:i.halfWidth??1,regular:i.regularWidth??1,tab:i.tabWidth??8,wide:i.wideWidth??2}},s=Math.max(0,r.truncation.limit-r.truncation.ellipsisWidth),{length:l}=e,u=l>1e4;let n=0,a=0,o=l,d=!1;const c=e.includes("\x1B")||e.includes("›");for(;n<l;){if(c&&(e[n]==="\x1B"||e[n]==="›")){if(e.startsWith("\x1B]8;;",n)){const t="\x1B]8;;\x07",A=t.length,G=e.indexOf("\x07",n+5);if(G!==-1){const U=e.indexOf(t,G+1);if(U!==-1){const xe=U+A,Ae=e.slice(G+1,U).replace(I,""),se=Q(Ae,{ambiguousIsNarrow:r.width.ambiguousIsNarrow,ansiWidth:r.width.ansi,controlWidth:r.width.control,countAnsiEscapeCodes:!1,ellipsis:r.truncation.ellipsis,ellipsisWidth:r.truncation.ellipsisWidth,emojiWidth:r.width.emoji,fullWidth:r.width.fullWidth,halfWidth:r.width.halfWidth,limit:Math.max(0,s-a),regularWidth:r.width.regular,tabWidth:r.width.tab,wideWidth:r.width.wide}),Y=se.width;if(se.truncated)d=!0,o=Math.min(o,n);else if(a+Y>s&&(o=Math.min(o,n),d=!0,a+Y>r.truncation.limit))break;if(a+=Y,n=xe,d&&a>=r.truncation.limit)break;continue}}}if(I.lastIndex=n,I.test(e)){const t=I.lastIndex-n,A=r.truncation.countAnsiEscapeCodes?t:r.width.ansi;if(a+A>s&&(o=Math.min(o,n),a+A>r.truncation.limit)){d=!0;break}a+=A,n=I.lastIndex;continue}}const f=e.codePointAt(n);if(f===8203||f===65279||f>=8288&&f<=8292){n+=1;continue}if(f===9){if(a+r.width.tab>s&&(o=Math.min(o,n),a+r.width.tab>r.truncation.limit)){d=!0;break}a+=r.width.tab,n+=1;continue}if(C.lastIndex=n,C.test(e)){const t=(C.lastIndex-n)*r.width.regular;if(a+t>s){const A=Math.floor((s-a)/r.width.regular);if(o=Math.min(o,n+A),a+t>r.truncation.limit){d=!0;break}}a+=t,n=C.lastIndex;continue}if((f<=31||f>=127&&f<=159)&&(_.lastIndex=n,_.test(e))){const t=(_.lastIndex-n)*r.width.control;if(a+t>s&&(o=Math.min(o,n+Math.floor((s-a)/r.width.control)),a+t>r.truncation.limit)){d=!0;break}a+=t,n=_.lastIndex;continue}if(M.lastIndex=n,M.test(e)){if(a+r.width.emoji>s&&(o=Math.min(o,n),a+r.width.emoji>r.truncation.limit)){d=!0;break}a+=r.width.emoji,n=M.lastIndex;continue}const m=e.codePointAt(n)??0;if(ze(m)){n+=m>65535?2:1;continue}let p;if(u)p=Ve(m,r);else switch(H(m)){case"control":{p=r.width.control;break}case"latin":{p=r.width.regular;break}case"wide":{p=r.width.wide;break}case"zero":{p=0;break}default:switch(R(m)){case"ambiguous":{p=r.width.ambiguousIsNarrow?r.width.regular:r.width.wide;break}case"fullwidth":{p=r.width.fullWidth;break}case"wide":{p=r.width.wide;break}default:p=r.width.regular}}if(a+p>s&&(o=Math.min(o,n),a+p>r.truncation.limit)){d=!0;break}a+=p,n+=m>65535?2:1}let h=a,w=!1;return d&&r.truncation.limit>=r.truncation.ellipsisWidth&&(h=r.truncation.limit,w=!0),{ellipsed:w,index:d?o:l,truncated:d,width:h}},"getStringTruncatedWidth");var Ge=Object.defineProperty,Ue=g((e,i)=>Ge(e,"name",{value:i,configurable:!0}),"i$1"),Ye=Object.defineProperty,Je=Ue((e,i)=>Ye(e,"name",{value:i,configurable:!0}),"e"),Ze=Object.defineProperty,Qe=Je((e,i)=>Ze(e,"name",{value:i,configurable:!0}),"r");const v=Qe((e,i={})=>Q(e,{...i,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width,"getStringWidth");var Xe=Object.defineProperty,pe=g((e,i)=>Xe(e,"name",{value:i,configurable:!0}),"x"),ei=Object.defineProperty,S=pe((e,i)=>ei(e,"name",{value:i,configurable:!0}),"m"),ii=Object.defineProperty,ri=S((e,i)=>ii(e,"name",{value:i,configurable:!0}),"n");class me{static{g(this,"T")}static{pe(this,"w")}static{S(this,"u")}static{ri(this,"AnsiStateTracker")}activeForeground=null;activeBackground=null;activeFormatting=[];processEscape(i){const r=/\x1B\[(\d+)m/.exec(i);if(!r)return;const s=Number.parseInt(r[1],10);switch(s){case 0:{this.activeForeground=null,this.activeBackground=null,this.activeFormatting=[];break}case 39:{this.activeForeground=null;break}case 49:{this.activeBackground=null;break}default:if(s>=30&&s<=37||s>=90&&s<=97)this.activeForeground=i;else if(s>=40&&s<=47||s>=100&&s<=107)this.activeBackground=i;else if([1,2,3,4,7,8,9].includes(s))this.activeFormatting.push(i);else if([22,23,24,27,28,29].includes(s)){const l={22:"[1m",23:"[3m",24:"[4m",27:"[7m",28:"[8m",29:"[9m"}[s];l&&(this.activeFormatting=this.activeFormatting.filter(u=>!u.includes(l)))}}}getStartEscapesForAllActiveAttributes(){return[this.activeBackground,this.activeForeground,...this.activeFormatting].filter(Boolean).join("")}getEndEscapesForAllActiveAttributes(){const i=[];if(this.activeFormatting.length>0){const r={"\x1B[1m":"\x1B[22m","\x1B[2m":"\x1B[22m","\x1B[3m":"\x1B[23m","\x1B[4m":"\x1B[24m","\x1B[7m":"\x1B[27m","\x1B[8m":"\x1B[28m","\x1B[9m":"\x1B[29m"};[...this.activeFormatting].reverse().forEach(s=>{const l=r[s];l&&i.push(l)})}return this.activeForeground&&i.push("\x1B[39m"),this.activeBackground&&i.push("\x1B[49m"),i.join("")}}var ni=Object.defineProperty,ge=S((e,i)=>ni(e,"name",{value:i,configurable:!0}),"o");const te=ge((e,i)=>{if(!k.has(e[i]))return{isInsideEscape:!1,isInsideLinkEscape:!1};const r=!0,s=e.slice(i+1,i+1+L.length).join("")===L;return{isInsideEscape:r,isInsideLinkEscape:s}},"checkEscapeSequence"),si=ge((e,i={})=>{const r=new me;let s="",l=!1,u=!1,n="",a="",o=!1;const d=[...e];for(let c=0;c<d.length;c++){const h=d[c];if(h&&k.has(h)){if(s){const m=i.getWidth?.(s)??0,p={isEscapeSequence:!1,isGrapheme:!0,text:s,width:m};if(o&&(p.isHyperlink=!0,p.hyperlinkUrl=a),i.onSegment?.(p,r)===!1)return;s=""}if(l=!0,n=h,u=te(d,c).isInsideLinkEscape,u){let m=c+1;for(a="";m<d.length;){const t=d[m];if(t===D)break;a+=t,m+=1}a=a.slice(4);const p={hyperlinkUrl:a,isEscapeSequence:!0,isGrapheme:!1,isHyperlink:!0,isHyperlinkStart:!0,width:0};if(i.onSegment?.(p,r)===!1)return;c=m,o=!0,l=!1,u=!1,n="";continue}if(c+1<d.length&&d[c+1]==="\\"&&o){const m={isEscapeSequence:!0,isGrapheme:!1,isHyperlink:!0,isHyperlinkEnd:!0,width:0};if(i.onSegment?.(m,r)===!1)return;o=!1,a="",c+=1,l=!1,n="";continue}}if(l){if(n!==h&&(n+=h),h===ie){l=!1,r.processEscape(n);const m={isEscapeSequence:!0,isGrapheme:!1,text:n,width:0};if(i.onSegment?.(m,r)===!1)return;n=""}continue}s+=h;const w=i.getWidth?.(s)??0,f={isEscapeSequence:!1,isGrapheme:!0,text:s,width:w};if(o&&(f.isHyperlink=!0,f.hyperlinkUrl=a),i.onSegment?.(f,r)===!1)return;s=""}if(s){const c=i.getWidth?.(s)??0,h={isEscapeSequence:!1,isGrapheme:!0,text:s,width:c};o&&(h.isHyperlink=!0,h.hyperlinkUrl=a),i.onSegment?.(h,r)}if(n){const c={isEscapeSequence:!0,isGrapheme:!1,text:n,width:0};i.onSegment?.(c,r)}},"processAnsiString");var ai=Object.defineProperty,ui=S((e,i)=>ai(e,"name",{value:i,configurable:!0}),"t$1");const oe=ui(e=>`${k.values().next().value}${fe}${e}${ie}`,"wrapAnsiCode");var oi=Object.defineProperty,li=S((e,i)=>oi(e,"name",{value:i,configurable:!0}),"t");const le=li(e=>`${k.values().next().value}${L}${e}${D}`,"wrapAnsiHyperlink");var ci=Object.defineProperty,di=S((e,i)=>ci(e,"name",{value:i,configurable:!0}),"l");const hi=di(e=>{if(e.length===0)return"";if(e.length===1)return e[0];let i="",r,s;const l=e.join(`
2
+ `),u=[...l];let n=0;for(const[a,o]of u.entries()){if(i+=o,k.has(o)){const c=Pe.exec(l.slice(n))?.groups??{};if(c.code!==void 0){const h=Number.parseFloat(c.code);r=h===_e?void 0:h}else c.uri!==void 0&&(s=c.uri.length===0?void 0:c.uri)}const d=Me.get(Number(r));u[a+1]===`
3
+ `?(s&&(i+=le("")),r&&d&&(i+=oe(d))):o===`
4
+ `&&(r&&d&&(i+=oe(r)),s&&(i+=le(s))),n+=o.length}return i},"preserveAnsi");var fi=Object.defineProperty,E=S((e,i)=>fi(e,"name",{value:i,configurable:!0}),"h");const J=E(e=>{if(!e.includes("\x1B"))return e;let i=e;return e.includes("\x1B[30m")&&(i+="\x1B[39m"),e.includes("\x1B[42m")&&(i+="\x1B[49m"),i},"resetAnsiAtLineBreak"),$=E(e=>{const i=e.split(" ");let r=i.length;for(;r>0&&v(i[r-1])===0;)r--;return r===i.length?e:i.slice(0,r).join(" ")+i.slice(r).join("")},"stringVisibleTrimSpacesRight"),we=E((e,i,r)=>{if(e.length===0)return[""];if(i<=0)return[e];const s=[],l=new me;let u="",n=0,a=!1,o=!1,d="";for(let c=0;c<e.length;c++){const h=e[c];if(k.has(h)){a=!0,d=h,u+=h,o=te([...e],c).isInsideLinkEscape;continue}if(a){d+=h,u+=h,o?h===D&&(a=o=!1):h===ie&&(a=!1,l.processEscape(d));continue}const w=v(h),f=h===" ";if(w===0){u+=h;continue}if(n+w>i&&(u&&s.push(u+l.getEndEscapesForAllActiveAttributes()),u=l.getStartEscapesForAllActiveAttributes(),n=v(u),f&&r)){for(;c<e.length&&e[c]===" "&&(c+=1,!(c>=e.length)););c<e.length&&c--;continue}if(u+=h,n+=w,n===i&&c<e.length-1&&(s.push(u+l.getEndEscapesForAllActiveAttributes()),u=l.getStartEscapesForAllActiveAttributes(),n=v(u),c+1<e.length&&e[c+1]===" "&&r)){for(c+=1;c<e.length&&e[c]===" ";)c+=1;c--}}return u&&s.push(u+l.getEndEscapesForAllActiveAttributes()),r?s.map(c=>$(c)):s},"wrapWithBreakAtWidth"),pi=E((e,i,r)=>{if(e.length===0)return[];const s=r?e.trim():e;if(s.length===0)return[];const l=[];let u="",n=0;return si(s,{getWidth:v,onSegment:E((a,o)=>{if(a.isEscapeSequence)u+=a.text;else{const d=a.text===" ";if(a.width===0)return u+=a.text,!0;if(n+a.width>i&&(u&&l.push(u),u=o.getStartEscapesForAllActiveAttributes(),n=0,d))return r||l.push(o.getStartEscapesForAllActiveAttributes()+a.text),!0;u+=a.text,n+=a.width}return!0},"onSegment")}),u&&l.push(u),r?l.map(a=>$(a)):l},"wrapCharByChar"),mi=E((e,i,r)=>{if(e.length===0)return[];const s=r?e.trim():e;if(s.length===0)return[];const l=s.split(/(?=\s)|(?<=\s)/),u=[];let n="",a=0,o=0;for(;o<l.length;){const d=l[o],c=/^\s+$/.test(d),h=v(d);if(d.length===0){o+=1;continue}if(r&&c&&a===0){o+=1;continue}if(a+h>i&&a>0){r?u.push($(n)):u.push(n),n="",a=0;continue}n+=d,a+=h,o+=1}return n&&(r?u.push($(n)):u.push(n)),u},"wrapWithWordBoundaries"),gi=E((e,i,r)=>{if(e.length===0)return[];const s=r?e.trim():e;if(s.length===0)return[];const l=s.split(/(?=\s)|(?<=\s)/),u=[];let n="",a=0,o=0;for(;o<l.length;){const d=l[o],c=/^\s+$/.test(d),h=v(d);if(d.length===0){o+=1;continue}if(r&&c&&a===0){o+=1;continue}if(h>i){n&&u.push(J(r?$(n):n));const w=we(d,i,r);if(w.length>0){for(let f=0;f<w.length-1;f++)u.push(w[f]);n=w[w.length-1],a=v(n)}else n="",a=0;o+=1;continue}if(a+h>i&&a>0&&(u.push(J(r?$(n):n)),n="",a=0,r&&c)){o+=1;continue}n+=d,a+=h,o+=1}return n&&u.push(J(r?$(n):n)),u},"wrapAndBreakWords"),P={BREAK_AT_CHARACTERS:"BREAK_AT_CHARACTERS",BREAK_WORDS:"BREAK_WORDS",PRESERVE_WORDS:"PRESERVE_WORDS",STRICT_WIDTH:"STRICT_WIDTH"},xi=E((e,i={})=>{const{removeZeroWidthCharacters:r=!0,trim:s=!0,width:l=80,wrapMode:u=P.PRESERVE_WORDS}=i;if(s&&e.trim()==="")return"";let n=String(e).normalize("NFC").replaceAll(`\r
5
+ `,`
6
+ `);return r&&(n=n.replaceAll(Ce,"")),n.split(`
7
+ `).map(a=>{if(s&&a.trim()==="")return"";let o;switch(u){case P.BREAK_AT_CHARACTERS:{o=pi(a,l,s);break}case P.BREAK_WORDS:{o=gi(a,l,s);break}case P.STRICT_WIDTH:{o=we(a,l,s);break}default:o=mi(a,l,s)}return hi(o)}).join(`
8
+ `)},"wordWrap");var ti=Object.defineProperty,W=g((e,i)=>ti(e,"name",{value:i,configurable:!0}),"e");const be=80,ve=24,X=W((e,i,{shell:r,env:s}={})=>ye(e,i,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:500,shell:r,env:s}).trim(),"exec"),q=W((e,i)=>({columns:Number.parseInt(e,10),rows:Number.parseInt(i,10)}),"create"),Ee=W((e,i)=>{const{columns:r,rows:s}=q(e,i);if(!(Number.isNaN(r)||Number.isNaN(s))&&!(r===be&&s===ve))return{columns:r,rows:s}},"createIfNotDefault");function wi(){const{env:e,stdout:i,stderr:r}=B;if(i?.columns&&i?.rows)return q(i.columns,i.rows);if(r?.columns&&r?.rows)return q(r.columns,r.rows);if(e.COLUMNS&&e.LINES)return q(e.COLUMNS,e.LINES);const s={columns:be,rows:ve};return B.platform==="win32"?Z()??s:B.platform==="darwin"?ce()??Z()??s:ce()??Z()??bi()??s}g(wi,"O");W(wi,"terminalSize");const ce=W(()=>{try{const e=B.platform==="darwin"?T.constants.O_EVTONLY|T.constants.O_NONBLOCK:T.constants.O_NONBLOCK,{columns:i,rows:r}=Be.WriteStream(T.openSync("/dev/tty",e));return{columns:i,rows:r}}catch{}},"devTty"),Z=W(()=>{try{const e=X("tput",["cols"],{env:{TERM:"dumb",...B.env}}),i=X("tput",["lines"],{env:{TERM:"dumb",...B.env}});if(e&&i)return Ee(e,i)}catch{}},"tput"),bi=W(()=>{try{const e=X("resize",["-u"]).match(/\d+/g);if(e.length===2)return Ee(e[0],e[1])}catch{}},"resize");export{P as B,wi as O,xi as i,v as o};
@@ -0,0 +1,2 @@
1
+ var u=Object.defineProperty;var s=(t,e)=>u(t,"name",{value:e,configurable:!0});import{createRequire as f}from"node:module";const h=f(import.meta.url),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,l=s(t=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[e,r]=i.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return i.getBuiltinModule(t)}return h(t)},"__cjs_getBuiltinModule"),{StringDecoder:p}=l("node:string_decoder");var d=Object.defineProperty,c=s((t,e)=>d(t,"name",{value:e,configurable:!0}),"t$1");const n="\x1B[2J",w="\x1B[2K",m=c((t=1)=>`${"\x1B["+t}A`,"cursorUp"),j=process.platform==="win32"?`${n}\x1B[0f`:`${n}\x1B[3J\x1B[H`,g="\x1B[?25l",v="\x1B[?25h",B=c(t=>{let e="";for(let r=0;r<t;r++)e+=w+(r<t-1?m():"");return t&&(e+="\x1B[G"),e},"eraseLines");var _=Object.defineProperty,x=s((t,e)=>_(t,"name",{value:e,configurable:!0}),"s");class a{static{s(this,"t")}static{x(this,"InteractiveStreamHook")}static DRAIN=!0;#s=new p;#e=[];#r;#t;constructor(e){this.#r=e.write,this.#t=e}active(){this.write(g),this.#t.write=(e,...r)=>{const o=r.at(-1);return this.#e.push(this.#s.write(typeof e=="string"?Buffer.from(e,typeof r[0]=="string"?r[0]:void 0):Buffer.from(e))),typeof o=="function"&&o(),a.DRAIN}}erase(e){e>0&&this.write(B(e+1))}inactive(e=!1){this.#e.length>0&&(e&&this.write(`
2
+ `),this.#e.forEach(r=>{this.write(r)}),this.#e=[]),this.renew()}renew(){this.#t.write=this.#r,this.write(v)}write(e){this.#r.apply(this.#t,[e])}}export{j as c,a as t};
@@ -1,6 +1,6 @@
1
1
  import { s as stringify } from './index.d-oxZvg_y7.js';
2
2
  import { LiteralUnion } from 'type-fest';
3
- import { C as ConstructorOptions, M as Meta, a as DefaultLogTypes, d as LoggerTypesConfig, P as Processor, E as ExtendedRfc5424LogLevels, R as Reporter, b as LoggerFunction } from './types-RidvA4RN.js';
3
+ import { C as ConstructorOptions, M as Meta, a as DefaultLogTypes, d as LoggerTypesConfig, P as Processor, E as ExtendedRfc5424LogLevels, R as Reporter, b as LoggerFunction } from './types-DVzG8TWL.js';
4
4
 
5
5
  declare class PailBrowserImpl<T extends string = string, L extends string = string> {
6
6
  #private;
@@ -1,32 +1,6 @@
1
1
  import { AnsiColors } from '@visulima/colorize';
2
2
  import { LiteralUnion, Primitive } from 'type-fest';
3
-
4
- declare class InteractiveStreamHook {
5
- #private;
6
- static readonly DRAIN = true;
7
- constructor(stream: NodeJS.WriteStream);
8
- active(): void;
9
- erase(count: number): void;
10
- inactive(separateHistory?: boolean): void;
11
- renew(): void;
12
- write(message: string): void;
13
- }
14
-
15
- type StreamType = "stderr" | "stdout";
16
- declare class InteractiveManager {
17
- #private;
18
- constructor(stdout: InteractiveStreamHook, stderr: InteractiveStreamHook);
19
- get lastLength(): number;
20
- get outside(): number;
21
- get isHooked(): boolean;
22
- get isSuspended(): boolean;
23
- erase(stream: StreamType, count?: number): void;
24
- hook(): boolean;
25
- resume(stream: StreamType, eraseRowCount?: number): void;
26
- suspend(stream: StreamType, erase?: boolean): void;
27
- unhook(separateHistory?: boolean): boolean;
28
- update(stream: StreamType, rows: string[], from?: number): void;
29
- }
3
+ import { InteractiveManager } from '../interactive/index.js';
30
4
 
31
5
  declare global {
32
6
  namespace VisulimaPail {
@@ -118,5 +92,4 @@ type Message = {
118
92
  suffix?: string;
119
93
  };
120
94
 
121
- export { InteractiveManager as I };
122
- export type { ConstructorOptions as C, DefaultLoggerTypes as D, ExtendedRfc5424LogLevels as E, LoggerConfiguration as L, Meta as M, Processor as P, Reporter as R, StreamAwareReporter as S, DefaultLogTypes as a, LoggerFunction as b, LoggerTypesAwareReporter as c, LoggerTypesConfig as d, ServerConstructorOptions as e, StringifyAwareProcessor as f, StringifyAwareReporter as g, ReadonlyMeta as h, InteractiveStreamReporter as i };
95
+ export type { ConstructorOptions as C, DefaultLoggerTypes as D, ExtendedRfc5424LogLevels as E, InteractiveStreamReporter as I, LoggerConfiguration as L, Meta as M, Processor as P, Reporter as R, StreamAwareReporter as S, DefaultLogTypes as a, LoggerFunction as b, LoggerTypesAwareReporter as c, LoggerTypesConfig as d, StringifyAwareReporter as e, ReadonlyMeta as f, ServerConstructorOptions as g, StringifyAwareProcessor as h };
@@ -1,6 +1,7 @@
1
- import { P as Processor, M as Meta } from '../../packem_shared/types-RidvA4RN.js';
1
+ import { P as Processor, M as Meta } from '../../packem_shared/types-DVzG8TWL.js';
2
2
  import '@visulima/colorize';
3
3
  import 'type-fest';
4
+ import '../../interactive/index.js';
4
5
 
5
6
  declare global {
6
7
  namespace VisulimaPail {
@@ -1,6 +1,7 @@
1
- import { f as StringifyAwareProcessor, M as Meta } from '../packem_shared/types-RidvA4RN.js';
1
+ import { h as StringifyAwareProcessor, M as Meta } from '../packem_shared/types-DVzG8TWL.js';
2
2
  import '@visulima/colorize';
3
3
  import 'type-fest';
4
+ import '../interactive/index.js';
4
5
 
5
6
  type FormatterFunction = (argument: any) => string;
6
7
 
@@ -1,7 +1,8 @@
1
1
  import { Rules, RedactOptions } from '@visulima/redact';
2
- import { P as Processor, M as Meta } from '../packem_shared/types-RidvA4RN.js';
2
+ import { P as Processor, M as Meta } from '../packem_shared/types-DVzG8TWL.js';
3
3
  import '@visulima/colorize';
4
4
  import 'type-fest';
5
+ import '../interactive/index.js';
5
6
 
6
7
  declare class RedactProcessor<L extends string = string> implements Processor<L> {
7
8
  #private;
@@ -0,0 +1,76 @@
1
+ import { InteractiveManager } from './interactive/index.js';
2
+
3
+ type ProgressBarStyle = "shades_classic" | "shades_grey" | "rect" | "filled" | "solid" | "ascii" | "custom";
4
+ interface ProgressBarOptions {
5
+ barCompleteChar?: string | string[];
6
+ barGlue?: string;
7
+ barIncompleteChar?: string | string[];
8
+ current?: number;
9
+ format?: string;
10
+ fps?: number;
11
+ style?: ProgressBarStyle;
12
+ total: number;
13
+ width?: number;
14
+ }
15
+ interface SingleBarOptions extends ProgressBarOptions {
16
+ format?: string;
17
+ }
18
+ interface MultiBarOptions {
19
+ barCompleteChar?: string | string[];
20
+ barGlue?: string;
21
+ barIncompleteChar?: string | string[];
22
+ composite?: boolean;
23
+ format?: string;
24
+ fps?: number;
25
+ style?: ProgressBarStyle;
26
+ }
27
+ interface ProgressBarPayload {
28
+ [key: string]: string | number | boolean;
29
+ }
30
+ declare const getBarChar: (char: string | undefined, style: ProgressBarStyle, complete?: boolean) => string;
31
+ declare const applyStyleToOptions: <T extends ProgressBarOptions | MultiBarOptions>(options: T) => T;
32
+ declare class ProgressBar {
33
+ protected options: ProgressBarOptions;
34
+ protected current: number;
35
+ private startTime;
36
+ private interactiveManager?;
37
+ private isActive;
38
+ private payload?;
39
+ constructor(options: ProgressBarOptions, interactiveManager?: InteractiveManager, payload?: ProgressBarPayload);
40
+ update(current: number, payload?: ProgressBarPayload): void;
41
+ increment(step?: number, payload?: ProgressBarPayload): void;
42
+ render(): string;
43
+ start(total?: number, startValue?: number, payload?: ProgressBarPayload): void;
44
+ stop(): void;
45
+ private calculateETA;
46
+ }
47
+ declare class MultiBarInstance extends ProgressBar {
48
+ private multiBar;
49
+ constructor(multiBar: MultiProgressBar, options: ProgressBarOptions, payload?: ProgressBarPayload);
50
+ update(current: number, payload?: ProgressBarPayload): void;
51
+ getBarState(): {
52
+ char: string;
53
+ current: number;
54
+ total: number;
55
+ };
56
+ }
57
+ declare class MultiProgressBar {
58
+ private bars;
59
+ private options;
60
+ private interactiveManager?;
61
+ private isActive;
62
+ private nextBarId;
63
+ private composite;
64
+ private barColors;
65
+ constructor(options?: MultiBarOptions, interactiveManager?: InteractiveManager);
66
+ create(total: number, current?: number, payload?: ProgressBarPayload): ProgressBar;
67
+ remove(bar: ProgressBar): boolean;
68
+ renderAll(): void;
69
+ setBarColor(bar: MultiBarInstance, color: ((text: string) => string) | undefined): void;
70
+ stop(): void;
71
+ private renderComposite;
72
+ private getCompositeChar;
73
+ }
74
+
75
+ export { MultiBarInstance, MultiProgressBar, ProgressBar, applyStyleToOptions, getBarChar };
76
+ export type { MultiBarOptions, ProgressBarOptions, ProgressBarPayload, ProgressBarStyle, SingleBarOptions };
@@ -0,0 +1 @@
1
+ var B=Object.defineProperty;var f=(o,r)=>B(o,"name",{value:r,configurable:!0});var S=Object.defineProperty,d=f((o,r)=>S(o,"name",{value:r,configurable:!0}),"g");const w={default:["█","▓","▒","░"],rect:["▬","▮","▯","▭"]},A=/\[([^[\]]*)\]/u,u=d((o,r,t=!0)=>{if(o)return o;switch(r){case"ascii":return t?"#":"-";case"filled":return t?"█":" ";case"rect":return t?"▬":"▭";case"shades_classic":return t?"█":"░";case"shades_grey":return t?"▓":"░";case"solid":return t?"█":" ";default:return t?"█":"░"}},"getBarChar"),k=d(o=>{if(!o.style)return o;const{style:r}=o,t={...o};return t.barCompleteChar===void 0&&(t.barCompleteChar=u(void 0,r,!0)),t.barIncompleteChar===void 0&&(t.barIncompleteChar=u(void 0,r,!1)),t.barGlue===void 0&&(t.barGlue=""),t},"applyStyleToOptions");class T{static{f(this,"ProgressBar")}static{d(this,"ProgressBar")}options;current;startTime;interactiveManager;isActive=!1;payload;constructor(r,t,e){const a=Array.isArray(r.barCompleteChar),s=Array.isArray(r.barIncompleteChar),n=a||s,l=a?r.barCompleteChar:u(r.barCompleteChar,"shades_classic"),c=s?r.barIncompleteChar:u(r.barIncompleteChar,"shades_classic",!1);this.options={barCompleteChar:l,barIncompleteChar:c,current:0,fps:10,width:40,...r},n&&(Array.isArray(this.options.barCompleteChar)||(this.options.barCompleteChar=[this.options.barCompleteChar]),Array.isArray(this.options.barIncompleteChar)||(this.options.barIncompleteChar=[this.options.barIncompleteChar])),this.current=this.options.current??0,this.startTime=Date.now(),this.interactiveManager=t,this.payload=e}update(r,t){if(this.current=Math.min(r,this.options.total),t&&(this.payload={...this.payload,...t}),this.interactiveManager&&this.isActive){const e=this.render();this.interactiveManager.update("stdout",[e])}}increment(r=1,t){this.update(this.current+r,t)}render(){const r=this.options.total>0?this.options.total:1,t=Math.max(0,this.options.width??40),e=Math.max(0,Math.min(100,Math.round(this.current/r*100))),a=Math.max(0,Math.min(t,Math.round(this.current/r*t))),s=t-a;let n;if(Array.isArray(this.options.barCompleteChar)||Array.isArray(this.options.barIncompleteChar)){const i=Array.isArray(this.options.barCompleteChar)?this.options.barCompleteChar:void 0,h=Array.isArray(this.options.barIncompleteChar)?this.options.barIncompleteChar:void 0,C=i?.[i.length-1]??(typeof this.options.barCompleteChar=="string"?this.options.barCompleteChar:"█"),p=h?.[0]??(typeof this.options.barIncompleteChar=="string"?this.options.barIncompleteChar:"░"),m=i?.length??1,y=this.current/r,M=t*m,v=Math.round(y*M)%m;let g="";for(let b=0;b<t;b+=1)if(b<a){const I=b===a-1&&v>0&&i;g+=I?i[Math.max(0,v-1)]:C}else g+=p;n=g}else{const i=typeof this.options.barCompleteChar=="string"?this.options.barCompleteChar:"█",h=typeof this.options.barIncompleteChar=="string"?this.options.barIncompleteChar:"░";n=i.repeat(a)+h.repeat(s)}let l=this.options.format??"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}";if(this.payload)for(const[i,h]of Object.entries(this.payload))l=l.replaceAll(`{${i}}`,String(h));const c=this.calculateETA();return l.replaceAll("{bar}",n).replaceAll("{percentage}",String(e)).replaceAll("{value}",String(this.current)).replaceAll("{total}",String(this.options.total)).replaceAll("{eta}",String(c))}start(r,t,e){r!==void 0&&(this.options.total=r),t!==void 0&&(this.current=t),this.startTime=Date.now(),this.isActive=!0,this.interactiveManager&&(this.interactiveManager.hook(),this.update(this.current,e))}stop(){this.isActive=!1,this.interactiveManager&&this.interactiveManager.unhook(!1)}calculateETA(){if(this.current===0)return 0;const r=(Date.now()-this.startTime)/1e3;if(r<.1)return 0;const t=this.current/r,e=this.options.total-this.current;return Math.round(e/t)}}class x extends T{static{f(this,"MultiBarInstance")}static{d(this,"MultiBarInstance")}multiBar;constructor(r,t,e){super(t,void 0,e),this.multiBar=r}update(r,t){super.update(r,t),this.multiBar.renderAll()}getBarState(){return{char:(Array.isArray(this.options.barCompleteChar)?this.options.barCompleteChar[this.options.barCompleteChar.length-1]:u(this.options.barCompleteChar,this.options.style??"shades_classic",!0))??"█",current:this.current,total:this.options.total}}}class E{static{f(this,"MultiProgressBar")}static{d(this,"MultiProgressBar")}bars=new Map;options;interactiveManager;isActive=!1;nextBarId=0;composite=!1;barColors=new Map;constructor(r={},t){this.options={barCompleteChar:u(void 0,"shades_classic"),barIncompleteChar:u(void 0,"shades_classic",!1),composite:!1,format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",fps:10,...r},this.composite=this.options.composite??!1,this.interactiveManager=t}create(r,t=0,e){const a=`bar_${this.nextBarId++}`,s=new x(this,{barCompleteChar:this.options.barCompleteChar,barIncompleteChar:this.options.barIncompleteChar,current:t,format:this.options.format,fps:this.options.fps,total:r,width:40},e);return this.bars.set(a,s),!this.isActive&&this.interactiveManager&&(this.interactiveManager.hook(),this.isActive=!0,this.renderAll()),s}remove(r){for(const[t,e]of this.bars.entries())if(e===r)return this.bars.delete(t),this.bars.size===0?(this.interactiveManager&&this.interactiveManager.unhook(!1),this.isActive=!1):this.renderAll(),!0;return!1}renderAll(){if(!this.interactiveManager||!this.isActive)return;const r=[];if(this.composite){const t=[...this.bars.values()];if(t.length>0){const e=this.renderComposite(t);r.push(e)}}else for(const t of this.bars.values())r.push(t.render());this.interactiveManager.update("stdout",r)}setBarColor(r,t){for(const e of this.bars.values())if(e===r){t?this.barColors.set(e,t):this.barColors.delete(e);break}}stop(){this.isActive=!1,this.interactiveManager&&this.interactiveManager.unhook(!1)}renderComposite(r){if(r.length===0)return"";const t=r[0];if(!t)return"";const e=t.render(),a=e.match(A);if(!a||!a[1])return e;const s=a[1].length,n=Array.from({length:s},()=>[]);r.forEach((c,i)=>{const h=c.getBarState(),C=Math.round(h.current/h.total*s);for(let p=0;p<s;p+=1)p<C&&n[p]?.push(i)});const l=Array.from({length:s},(c,i)=>this.getCompositeChar(r,n[i])).join("");return e.replace(A,`[${l}]`)}getCompositeChar(r,t){if(!t||t.length===0)return r[0]?.getBarState().char??"█";const e=w[this.options.style==="rect"?"rect":"default"],a=e?.[Math.min(t.length-1,e.length-1)]??"█";let s,n=100;for(const h of t){const C=r[h];if(!C)continue;const p=C.getBarState(),m=p.current/p.total*100;(m<n||m===n&&(s===void 0||h>s))&&(n=m,s=h)}const l=s??t[0],c=r[l??0];if(!c)return a;const i=this.barColors.get(c);return i?i(a):a}}export{x as MultiBarInstance,E as MultiProgressBar,T as ProgressBar,k as applyStyleToOptions,u as getBarChar};
@@ -1,9 +1,10 @@
1
1
  import { Options } from 'rotating-file-stream';
2
- import { A as AbstractJsonReporterOptions, a as AbstractJsonReporter } from '../../packem_shared/abstract-json-reporter-wUti0B3k.js';
2
+ import { a as AbstractJsonReporterOptions, A as AbstractJsonReporter } from '../../packem_shared/abstract-json-reporter-CPsNkpz8.js';
3
3
  import '../../packem_shared/index.d-oxZvg_y7.js';
4
4
  import 'type-fest';
5
- import '../../packem_shared/types-RidvA4RN.js';
5
+ import '../../packem_shared/types-DVzG8TWL.js';
6
6
  import '@visulima/colorize';
7
+ import '../../interactive/index.js';
7
8
 
8
9
  declare class RotatingFileStream {
9
10
  #private;
@@ -1,8 +1,9 @@
1
- import { a as AbstractJsonReporter, A as AbstractJsonReporterOptions } from '../../packem_shared/abstract-json-reporter-wUti0B3k.js';
1
+ import { A as AbstractJsonReporter, a as AbstractJsonReporterOptions } from '../../packem_shared/abstract-json-reporter-CPsNkpz8.js';
2
2
  import { LiteralUnion } from 'type-fest';
3
- import { E as ExtendedRfc5424LogLevels } from '../../packem_shared/types-RidvA4RN.js';
3
+ import { E as ExtendedRfc5424LogLevels } from '../../packem_shared/types-DVzG8TWL.js';
4
4
  import '../../packem_shared/index.d-oxZvg_y7.js';
5
5
  import '@visulima/colorize';
6
+ import '../../interactive/index.js';
6
7
 
7
8
  declare class JsonReporter<L extends string = string> extends AbstractJsonReporter<L> {
8
9
  constructor(options?: Partial<AbstractJsonReporterOptions>);
@@ -1,8 +1,9 @@
1
- import { a as AbstractJsonReporter, A as AbstractJsonReporterOptions } from '../../packem_shared/abstract-json-reporter-wUti0B3k.js';
1
+ import { A as AbstractJsonReporter, a as AbstractJsonReporterOptions } from '../../packem_shared/abstract-json-reporter-CPsNkpz8.js';
2
2
  import { LiteralUnion } from 'type-fest';
3
- import { S as StreamAwareReporter, E as ExtendedRfc5424LogLevels } from '../../packem_shared/types-RidvA4RN.js';
3
+ import { S as StreamAwareReporter, E as ExtendedRfc5424LogLevels } from '../../packem_shared/types-DVzG8TWL.js';
4
4
  import '../../packem_shared/index.d-oxZvg_y7.js';
5
5
  import '@visulima/colorize';
6
+ import '../../interactive/index.js';
6
7
 
7
8
  declare class JsonReporter<L extends string = string> extends AbstractJsonReporter<L> implements StreamAwareReporter<L> {
8
9
  #private;
@@ -1,7 +1,8 @@
1
- import { A as AbstractPrettyReporter, P as PrettyStyleOptions } from '../../packem_shared/abstract-pretty-reporter-MOYolfGR.js';
2
- import { h as ReadonlyMeta } from '../../packem_shared/types-RidvA4RN.js';
1
+ import { A as AbstractPrettyReporter, P as PrettyStyleOptions } from '../../packem_shared/abstract-pretty-reporter-DB2G-qlI.js';
2
+ import { f as ReadonlyMeta } from '../../packem_shared/types-DVzG8TWL.js';
3
3
  import 'type-fest';
4
4
  import '@visulima/colorize';
5
+ import '../../interactive/index.js';
5
6
 
6
7
  declare class PrettyReporter<T extends string = string, L extends string = string> extends AbstractPrettyReporter<T, L> {
7
8
  #private;
@@ -1,7 +1,8 @@
1
1
  import { O as Options$1, a as Options } from '../../packem_shared/index.d-BR1GjZri.js';
2
2
  import { LiteralUnion } from 'type-fest';
3
- import { i as InteractiveStreamReporter, I as InteractiveManager, h as ReadonlyMeta, E as ExtendedRfc5424LogLevels } from '../../packem_shared/types-RidvA4RN.js';
4
- import { P as PrettyStyleOptions, A as AbstractPrettyReporter } from '../../packem_shared/abstract-pretty-reporter-MOYolfGR.js';
3
+ import { InteractiveManager } from '../../interactive/index.js';
4
+ import { I as InteractiveStreamReporter, f as ReadonlyMeta, E as ExtendedRfc5424LogLevels } from '../../packem_shared/types-DVzG8TWL.js';
5
+ import { P as PrettyStyleOptions, A as AbstractPrettyReporter } from '../../packem_shared/abstract-pretty-reporter-DB2G-qlI.js';
5
6
  import '@visulima/colorize';
6
7
 
7
8
  type PrettyReporterOptions = PrettyStyleOptions & {
@@ -1 +1 @@
1
- import{PrettyReporter as t}from"../../packem_shared/PrettyReporter-APmxUrnh.js";export{t as PrettyReporter};
1
+ import{PrettyReporter as t}from"../../packem_shared/PrettyReporter-Bns0ZWLy.js";export{t as PrettyReporter};
@@ -1,6 +1,7 @@
1
1
  import { O as Options$1, a as Options } from '../../packem_shared/index.d-BR1GjZri.js';
2
- import { i as InteractiveStreamReporter, I as InteractiveManager, h as ReadonlyMeta } from '../../packem_shared/types-RidvA4RN.js';
3
- import { P as PrettyStyleOptions, A as AbstractPrettyReporter } from '../../packem_shared/abstract-pretty-reporter-MOYolfGR.js';
2
+ import { InteractiveManager } from '../../interactive/index.js';
3
+ import { I as InteractiveStreamReporter, f as ReadonlyMeta } from '../../packem_shared/types-DVzG8TWL.js';
4
+ import { P as PrettyStyleOptions, A as AbstractPrettyReporter } from '../../packem_shared/abstract-pretty-reporter-DB2G-qlI.js';
4
5
  import 'type-fest';
5
6
  import '@visulima/colorize';
6
7
 
@@ -1,6 +1,6 @@
1
- var q=Object.defineProperty;var x=(a,e)=>q(a,"name",{value:e,configurable:!0});import{createRequire as F}from"node:module";import G,{red as T,greenBright as z,cyan as H,green as W,grey as o,bold as R,white as J,bgGrey as K,underline as I}from"@visulima/colorize";import{u as N,O as Q,o as d,n as U,a as k,i as X,B as Z,G as _}from"../../packem_shared/format-label-DqvZRRR6.js";import{E as ee}from"../../packem_shared/constants-DKfCaSUR.js";import{A as te,s as re}from"../../packem_shared/abstract-pretty-reporter-CUtSm20r.js";import{s as se}from"../../packem_shared/get-longest-label-B0NrI-o2.js";import{n as ie}from"../../packem_shared/write-stream-CD8XFv1L.js";const pe=F(import.meta.url),V=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,{stdout:Y,stderr:D}=V;var oe=Object.defineProperty,A=x((a,e)=>oe(a,"name",{value:e,configurable:!0}),"b");const j=A(a=>!/[\\/]pail[\\/]dist/.test(a),"pailFileFilter");class me extends te{static{x(this,"SimpleReporter")}static{A(this,"SimpleReporter")}#t;#r;#s;#o=!1;#i;#e;constructor(e={}){const{error:n,inspect:p,...i}=e;super({uppercase:{label:!0,...i.uppercase},...i}),this.#i={...N,indent:void 0,...p},this.#e={...n,color:{fileLine:W,hint:H,marker:T,message:T,method:z,title:T}},this.#t=Y,this.#r=D}setStdout(e){this.#t=e}setStderr(e){this.#r=e}setInteractiveManager(e){this.#s=e}setIsInteractive(e){this.#o=e}log(e){const n=this.formatMessage(e),p=e.type.level,i=["error","trace","warn"].includes(p)?"stderr":"stdout",h=i==="stderr"?this.#r:this.#t;this.#o&&this.#s!==void 0&&h.isTTY?this.#s.update(i,n.split(`
1
+ var q=Object.defineProperty;var x=(a,e)=>q(a,"name",{value:e,configurable:!0});import{createRequire as F}from"node:module";import G,{red as T,greenBright as z,cyan as H,green as W,grey as o,bold as R,white as J,bgGrey as K,underline as I}from"@visulima/colorize";import{u as N,n as Q,a as k,G as _}from"../../packem_shared/format-label-CpyyTBom.js";import{O as U,o as d,i as X,B as Z}from"../../packem_shared/index-CysYvHXs.js";import{E as ee}from"../../packem_shared/constants-DKfCaSUR.js";import{A as te,s as re}from"../../packem_shared/abstract-pretty-reporter-CUtSm20r.js";import{s as se}from"../../packem_shared/get-longest-label-B0NrI-o2.js";import{n as ie}from"../../packem_shared/write-stream-CD8XFv1L.js";const pe=F(import.meta.url),V=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,{stdout:Y,stderr:D}=V;var oe=Object.defineProperty,B=x((a,e)=>oe(a,"name",{value:e,configurable:!0}),"b");const j=B(a=>!/[\\/]pail[\\/]dist/.test(a),"pailFileFilter");class ge extends te{static{x(this,"SimpleReporter")}static{B(this,"SimpleReporter")}#t;#r;#s;#o=!1;#i;#e;constructor(e={}){const{error:n,inspect:p,...i}=e;super({uppercase:{label:!0,...i.uppercase},...i}),this.#i={...N,indent:void 0,...p},this.#e={...n,color:{fileLine:W,hint:H,marker:T,message:T,method:z,title:T}},this.#t=Y,this.#r=D}setStdout(e){this.#t=e}setStderr(e){this.#r=e}setInteractiveManager(e){this.#s=e}setIsInteractive(e){this.#o=e}log(e){const n=this.formatMessage(e),p=e.type.level,i=["error","trace","warn"].includes(p)?"stderr":"stdout",h=i==="stderr"?this.#r:this.#t;this.#o&&this.#s!==void 0&&h.isTTY?this.#s.update(i,n.split(`
2
2
  `),0):ie(`${n}
3
- `,h)}formatMessage(e){const{columns:n}=Q();let p=n;typeof this.styles.messageLength=="number"&&(p=this.styles.messageLength);const{badge:i,context:h,date:c,error:S,file:u,groups:m,label:g,message:f,prefix:y,repeated:v,scope:$,suffix:b,traceError:w,type:B}=e,{color:E}=this.loggerTypes[B.name],M=E?G[E]:J,l=m.map(()=>" ").join(""),t=[];if(m.length>0&&t.push(`${l+o(`[${m.at(-1)}]`)} `),c&&t.push(`${o(this.styles.dateFormatter(typeof c=="string"?new Date(c):c))} `),i)t.push(R(M(i)));else{const r=re(this.loggerTypes);r.length>0&&t.push(o(" ".repeat(r.length)))}const L=se(this.loggerTypes),C=d(L);if(g){const r=d(g),s=Math.max(0,C-r);t.push(`${R(M(U(g,this.styles)))} `," ".repeat(s))}else t.push(" ".repeat(C+1));v&&t.push(`${K.white(`[${v}x]`)} `),Array.isArray($)&&$.length>0&&t.push(`${o(`[${$.join(" > ")}]`)} `),y&&t.push(`${o(`[${this.styles.underline.prefix?I(y):y}]`)} `);const O=d(t.join(""));if(f!==ee){const r=typeof f=="string"?f:k(f,this.#i);t.push(l+X(r,{trim:!1,width:p-3,wrapMode:Z.STRICT_WIDTH}))}if(h){let r=!1;t.push(...h.map(s=>{if(s instanceof Error)return r=!0,`
3
+ `,h)}formatMessage(e){const{columns:n}=U();let p=n;typeof this.styles.messageLength=="number"&&(p=this.styles.messageLength);const{badge:i,context:h,date:c,error:S,file:u,groups:m,label:g,message:f,prefix:y,repeated:v,scope:$,suffix:b,traceError:w,type:L}=e,{color:E}=this.loggerTypes[L.name],M=E?G[E]:J,l=m.map(()=>" ").join(""),t=[];if(m.length>0&&t.push(`${l+o(`[${m.at(-1)}]`)} `),c&&t.push(`${o(this.styles.dateFormatter(typeof c=="string"?new Date(c):c))} `),i)t.push(R(M(i)));else{const r=re(this.loggerTypes);r.length>0&&t.push(o(" ".repeat(r.length)))}const A=se(this.loggerTypes),C=d(A);if(g){const r=d(g),s=Math.max(0,C-r);t.push(`${R(M(Q(g,this.styles)))} `," ".repeat(s))}else t.push(" ".repeat(C+1));v&&t.push(`${K.white(`[${v}x]`)} `),Array.isArray($)&&$.length>0&&t.push(`${o(`[${$.join(" > ")}]`)} `),y&&t.push(`${o(`[${this.styles.underline.prefix?I(y):y}]`)} `);const O=d(t.join(""));if(f!==ee){const r=typeof f=="string"?f:k(f,this.#i);t.push(l+X(r,{trim:!1,width:p-3,wrapMode:Z.STRICT_WIDTH}))}if(h){let r=!1;t.push(...h.map(s=>{if(s instanceof Error)return r=!0,`
4
4
 
5
5
  ${_(s,{...this.#e,filterStacktrace:j,prefix:l})}`;if(typeof s=="object")return` ${k(s,this.#i)}`;const P=(r?`
6
6
 
@@ -8,4 +8,4 @@ ${_(s,{...this.#e,filterStacktrace:j,prefix:l})}`;if(typeof s=="object")return`
8
8
 
9
9
  ${_(w,{...this.#e,filterStacktrace:j,hideErrorCauseCodeView:!0,hideErrorCodeView:!0,hideErrorErrorsCodeView:!0,hideMessage:!0,prefix:l})}`),b&&t.push(` ${l}${o(this.styles.underline.suffix?I(b):b)}`),u){const r=u.name+(u.line?`:${u.line}`:""),s=Math.max(0,O-d("Caller: "));t.push(`
10
10
  `,o("Caller: ")," ".repeat(s),r,`
11
- `)}return t.join("")}}export{me as SimpleReporter};
11
+ `)}return t.join("")}}export{ge as SimpleReporter};
@@ -0,0 +1,154 @@
1
+ import { InteractiveManager } from './interactive/index.js';
2
+
3
+ // TODO: Load the spinner names from the JSON file.
4
+ type SpinnerName =
5
+ | 'dots'
6
+ | 'dots2'
7
+ | 'dots3'
8
+ | 'dots4'
9
+ | 'dots5'
10
+ | 'dots6'
11
+ | 'dots7'
12
+ | 'dots8'
13
+ | 'dots9'
14
+ | 'dots10'
15
+ | 'dots11'
16
+ | 'dots12'
17
+ | 'dots13'
18
+ | 'dots14'
19
+ | 'dots8Bit'
20
+ | 'dotsCircle'
21
+ | 'sand'
22
+ | 'line'
23
+ | 'line2'
24
+ | 'rollingLine'
25
+ | 'pipe'
26
+ | 'simpleDots'
27
+ | 'simpleDotsScrolling'
28
+ | 'star'
29
+ | 'star2'
30
+ | 'flip'
31
+ | 'hamburger'
32
+ | 'growVertical'
33
+ | 'growHorizontal'
34
+ | 'balloon'
35
+ | 'balloon2'
36
+ | 'noise'
37
+ | 'bounce'
38
+ | 'boxBounce'
39
+ | 'boxBounce2'
40
+ | 'binary'
41
+ | 'triangle'
42
+ | 'arc'
43
+ | 'circle'
44
+ | 'squareCorners'
45
+ | 'circleQuarters'
46
+ | 'circleHalves'
47
+ | 'squish'
48
+ | 'toggle'
49
+ | 'toggle2'
50
+ | 'toggle3'
51
+ | 'toggle4'
52
+ | 'toggle5'
53
+ | 'toggle6'
54
+ | 'toggle7'
55
+ | 'toggle8'
56
+ | 'toggle9'
57
+ | 'toggle10'
58
+ | 'toggle11'
59
+ | 'toggle12'
60
+ | 'toggle13'
61
+ | 'arrow'
62
+ | 'arrow2'
63
+ | 'arrow3'
64
+ | 'bouncingBar'
65
+ | 'bouncingBall'
66
+ | 'smiley'
67
+ | 'monkey'
68
+ | 'hearts'
69
+ | 'clock'
70
+ | 'earth'
71
+ | 'material'
72
+ | 'moon'
73
+ | 'runner'
74
+ | 'pong'
75
+ | 'shark'
76
+ | 'dqpb'
77
+ | 'weather'
78
+ | 'christmas'
79
+ | 'grenade'
80
+ | 'point'
81
+ | 'layer'
82
+ | 'betaWave'
83
+ | 'fingerDance'
84
+ | 'fistBump'
85
+ | 'soccerHeader'
86
+ | 'mindblown'
87
+ | 'speaker'
88
+ | 'orangePulse'
89
+ | 'bluePulse'
90
+ | 'orangeBluePulse'
91
+ | 'timeTravel'
92
+ | 'aesthetic'
93
+ | 'dwarfFortress';
94
+
95
+ interface SpinnerStyle {
96
+ bgColor?: string;
97
+ bgHex?: `#${string}`;
98
+ bgRgb?: [number, number, number];
99
+ bold?: boolean;
100
+ color?: string;
101
+ dim?: boolean;
102
+ hex?: `#${string}`;
103
+ inverse?: boolean;
104
+ italic?: boolean;
105
+ overline?: boolean;
106
+ rgb?: [number, number, number];
107
+ strikethrough?: boolean;
108
+ underline?: boolean;
109
+ }
110
+ interface SpinnerIcons {
111
+ error?: string;
112
+ info?: string;
113
+ success?: string;
114
+ warning?: string;
115
+ }
116
+ interface SpinnerOptions {
117
+ icons?: SpinnerIcons;
118
+ name?: SpinnerName;
119
+ prefixText?: string;
120
+ style?: SpinnerStyle;
121
+ verbose?: boolean;
122
+ }
123
+ interface SpinnerStartOptions {
124
+ prefixText?: string;
125
+ }
126
+ declare class Spinner {
127
+ #private;
128
+ constructor(options?: SpinnerOptions, interactiveManager?: InteractiveManager);
129
+ get elapsedTime(): number;
130
+ get getText(): string;
131
+ set text(value: string);
132
+ get getPrefixText(): string;
133
+ set prefixText(value: string);
134
+ get isRunning(): boolean;
135
+ start(text?: string, options?: SpinnerStartOptions): this;
136
+ succeed(text?: string): void;
137
+ failed(text?: string): void;
138
+ warn(text?: string): void;
139
+ info(text?: string): void;
140
+ pause(): void;
141
+ resume(): void;
142
+ }
143
+ declare class MultiSpinner {
144
+ #private;
145
+ constructor(options?: SpinnerOptions, interactiveManager?: InteractiveManager);
146
+ create(text?: string, options?: SpinnerOptions): Spinner;
147
+ remove(spinner: Spinner): boolean;
148
+ stop(): void;
149
+ clear(): void;
150
+ }
151
+ type SpinnerType<T extends string = string, L extends string = string> = Record<T, L> & Spinner;
152
+
153
+ export { MultiSpinner, Spinner };
154
+ export type { SpinnerIcons, SpinnerOptions, SpinnerStartOptions, SpinnerStyle, SpinnerType };