@visulima/pail 1.4.2 → 1.4.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## @visulima/pail [1.4.3](https://github.com/visulima/visulima/compare/@visulima/pail@1.4.2...@visulima/pail@1.4.3) (2024-06-14)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **pail:** fixed striping of spaces from messages ([6d6ae8b](https://github.com/visulima/visulima/commit/6d6ae8baac4844b2b90baee62105fa66e772d529))
6
+
1
7
  ## @visulima/pail [1.4.2](https://github.com/visulima/visulima/compare/@visulima/pail@1.4.1...@visulima/pail@1.4.2) (2024-06-14)
2
8
 
3
9
  ### Bug Fixes
@@ -1,4 +1,4 @@
1
- "use strict";var I=Object.defineProperty;var n=(r,t)=>I(r,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("node:process"),v=require("./shared/pail.tB8JSuso.cjs"),P=require("node:string_decoder"),$=require("./shared/pail.CqyBdtm7.cjs"),g=require("@visulima/inspector"),j=require("./shared/pail.BjvkVeLq.cjs"),M=require("./shared/pail.C0epjAht.cjs"),O=require("./shared/pail.B85Cx0UJ.cjs");var A=Object.defineProperty,R=n((r,t)=>A(r,"name",{value:t,configurable:!0}),"l$1");let T=class{static{n(this,"v")}static{R(this,"InteractiveManager")}#t;#e=!1;#r=!1;#s=0;#i=0;constructor(t,e){this.#t={stderr:e,stdout:t}}get lastLength(){return this.#s}get outside(){return this.#i}get isHooked(){return this.#e}get isSuspended(){return this.#r}erase(t,e=this.#s){if(this.#t[t]===void 0)throw new TypeError(`Stream "${t}" is not available`);this.#t[t].erase(e)}hook(){return this.#e||(Object.values(this.#t).forEach(t=>t.active()),this._clear(!0)),this.#e}resume(t,e){this.#r&&(this.#r=!1,e&&this.erase(t,e),this.#s=0,Object.values(this.#t).forEach(s=>s.active()))}suspend(t,e=!0){this.#r||(this.#r=!0,e&&this.erase(t),Object.values(this.#t).forEach(s=>s.renew()))}unhook(t=!0){return this.#e&&(Object.values(this.#t).forEach(e=>e.inactive(t)),this._clear()),!this.#e}update(t,e,s=0){if(e.length>0){if(this.#t[t]===void 0)throw new TypeError(`Stream "${t}" is not available`);const a=this.#t[t],{columns:p,rows:i}=v.terminalSize(),u=s>i?i-1:Math.max(0,Math.min(i-1,s)),l=this.lastLength-u,d=Math.max(l-i,this.outside);let o=e.reduce((L,E)=>[...L,v.wrapAnsi(E,p,{hard:!0,trim:!1,wordWrap:!0})],[]);i<=l?(a.erase(i),u<d&&(o=o.slice(d-u+1))):l&&a.erase(l),a.write(o.join(`
1
+ "use strict";var I=Object.defineProperty;var n=(r,t)=>I(r,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("node:process"),v=require("./shared/pail.Dfpn3AvW.cjs"),P=require("node:string_decoder"),$=require("./shared/pail.CqyBdtm7.cjs"),g=require("@visulima/inspector"),j=require("./shared/pail.BjvkVeLq.cjs"),M=require("./shared/pail.C0epjAht.cjs"),O=require("./shared/pail.B85Cx0UJ.cjs");var A=Object.defineProperty,R=n((r,t)=>A(r,"name",{value:t,configurable:!0}),"l$1");let T=class{static{n(this,"v")}static{R(this,"InteractiveManager")}#t;#e=!1;#r=!1;#s=0;#i=0;constructor(t,e){this.#t={stderr:e,stdout:t}}get lastLength(){return this.#s}get outside(){return this.#i}get isHooked(){return this.#e}get isSuspended(){return this.#r}erase(t,e=this.#s){if(this.#t[t]===void 0)throw new TypeError(`Stream "${t}" is not available`);this.#t[t].erase(e)}hook(){return this.#e||(Object.values(this.#t).forEach(t=>t.active()),this._clear(!0)),this.#e}resume(t,e){this.#r&&(this.#r=!1,e&&this.erase(t,e),this.#s=0,Object.values(this.#t).forEach(s=>s.active()))}suspend(t,e=!0){this.#r||(this.#r=!0,e&&this.erase(t),Object.values(this.#t).forEach(s=>s.renew()))}unhook(t=!0){return this.#e&&(Object.values(this.#t).forEach(e=>e.inactive(t)),this._clear()),!this.#e}update(t,e,s=0){if(e.length>0){if(this.#t[t]===void 0)throw new TypeError(`Stream "${t}" is not available`);const a=this.#t[t],{columns:p,rows:i}=v.terminalSize(),u=s>i?i-1:Math.max(0,Math.min(i-1,s)),l=this.lastLength-u,d=Math.max(l-i,this.outside);let o=e.reduce((L,E)=>[...L,v.wrapAnsi(E,p,{hard:!0,trim:!1,wordWrap:!0})],[]);i<=l?(a.erase(i),u<d&&(o=o.slice(d-u+1))):l&&a.erase(l),a.write(o.join(`
2
2
  `)+`
3
3
  `),this.#s=d?d+o.length+1:o.length,this.#i=Math.max(this.lastLength-i,this.outside)}}_clear(t=!1){this.#e=t,this.#s=0,this.#i=0}};var q=Object.defineProperty,y=n((r,t)=>q(r,"name",{value:t,configurable:!0}),"n$1");const c="\x1B[",w=c+"2J",x=c+"2K",N=c+"G",D=y((r=1)=>c+r+"A","cursorUp"),f=process.platform==="win32"?`${w}${c}0f`:`${w}${c}3J${c}H`,B=c+"?25l",k=c+"?25h",G=y(r=>{let t="";for(let e=0;e<r;e++)t+=x+(e<r-1?D():"");return r&&(t+=N),t},"eraseLines");var H=Object.defineProperty,V=n((r,t)=>H(r,"name",{value:t,configurable:!0}),"s$1");let m=class S{static{n(this,"t")}static{V(this,"InteractiveStreamHook")}static DRAIN=!0;#t=new P.StringDecoder;#e=[];#r;#s;constructor(t){this.#r=t.write,this.#s=t}active(){this.write(B),this.#s.write=(t,...e)=>{const s=e.at(-1);return this.#e.push(this.#t.write(typeof t=="string"?Buffer.from(t,typeof e[0]=="string"?e[0]:void 0):Buffer.from(t))),typeof s=="function"&&s(),S.DRAIN}}erase(t){t>0&&this.write(G(t+1))}inactive(t=!1){this.#e.length>0&&(t&&this.write(`
4
4
  `),this.#e.forEach(e=>{this.write(e)}),this.#e=[]),this.renew()}renew(){this.#s.write=this.#r,this.write(k)}write(t){this.#r.apply(this.#s,[t])}};var Y=Object.defineProperty,C=n((r,t)=>Y(r,"name",{value:t,configurable:!0}),"c");let J=class{static{n(this,"v")}static{C(this,"RawReporter")}#t;#e;#r;#s=!1;#i;constructor(t={}){this.#t=h.stdout,this.#e=h.stderr,this.#i=t}setStdout(t){this.#t=t}setStderr(t){this.#e=t}setInteractiveManager(t){this.#r=t}setIsInteractive(t){this.#s=t}log(t){const{context:e,groups:s,message:a,type:p}=t,i=[];if(a!==j.EMPTY_SYMBOL){const o=typeof a=="string"?a:g.inspect(a,this.#i);i.push(o)}e&&i.push(...e.map(o=>typeof o=="object"?" "+g.inspect(o,this.#i):" "+o));const u=["error","trace","warn"].includes(p.level)?"stderr":"stdout",l=u==="stderr"?this.#e:this.#t,d=s.map(()=>" ").join("");this.#s&&this.#r!==void 0&&l.isTTY?this.#r.update(u,(d+i.join("")).split(`
@@ -1,4 +1,4 @@
1
- var I=Object.defineProperty;var n=(r,t)=>I(r,"name",{value:t,configurable:!0});import{stdout as m,stderr as S,env as d}from"node:process";import{t as $,w as j,n as M,a as O}from"./shared/pail.hbXo0zpA.mjs";import{StringDecoder as P}from"node:string_decoder";import{a as A}from"./shared/pail.Bk25qk8U.mjs";import{inspect as f}from"@visulima/inspector";import{E as R}from"./shared/pail.C1VNf0a-.mjs";import{L as x}from"./shared/pail.CNxJnpWG.mjs";import{g as N}from"./shared/pail.nEbRCLhY.mjs";var T=Object.defineProperty,D=n((r,t)=>T(r,"name",{value:t,configurable:!0}),"l$1");let B=class{static{n(this,"v")}static{D(this,"InteractiveManager")}#t;#e=!1;#r=!1;#s=0;#i=0;constructor(t,e){this.#t={stderr:e,stdout:t}}get lastLength(){return this.#s}get outside(){return this.#i}get isHooked(){return this.#e}get isSuspended(){return this.#r}erase(t,e=this.#s){if(this.#t[t]===void 0)throw new TypeError(`Stream "${t}" is not available`);this.#t[t].erase(e)}hook(){return this.#e||(Object.values(this.#t).forEach(t=>t.active()),this._clear(!0)),this.#e}resume(t,e){this.#r&&(this.#r=!1,e&&this.erase(t,e),this.#s=0,Object.values(this.#t).forEach(s=>s.active()))}suspend(t,e=!0){this.#r||(this.#r=!0,e&&this.erase(t),Object.values(this.#t).forEach(s=>s.renew()))}unhook(t=!0){return this.#e&&(Object.values(this.#t).forEach(e=>e.inactive(t)),this._clear()),!this.#e}update(t,e,s=0){if(e.length>0){if(this.#t[t]===void 0)throw new TypeError(`Stream "${t}" is not available`);const a=this.#t[t],{columns:p,rows:i}=$(),c=s>i?i-1:Math.max(0,Math.min(i-1,s)),l=this.lastLength-c,u=Math.max(l-i,this.outside);let o=e.reduce((L,E)=>[...L,j(E,p,{hard:!0,trim:!1,wordWrap:!0})],[]);i<=l?(a.erase(i),c<u&&(o=o.slice(u-c+1))):l&&a.erase(l),a.write(o.join(`
1
+ var I=Object.defineProperty;var n=(r,t)=>I(r,"name",{value:t,configurable:!0});import{stdout as m,stderr as S,env as d}from"node:process";import{t as $,w as j,n as M,a as O}from"./shared/pail.B0G23Kwv.mjs";import{StringDecoder as P}from"node:string_decoder";import{a as A}from"./shared/pail.Bk25qk8U.mjs";import{inspect as f}from"@visulima/inspector";import{E as R}from"./shared/pail.C1VNf0a-.mjs";import{L as x}from"./shared/pail.CNxJnpWG.mjs";import{g as N}from"./shared/pail.nEbRCLhY.mjs";var T=Object.defineProperty,D=n((r,t)=>T(r,"name",{value:t,configurable:!0}),"l$1");let B=class{static{n(this,"v")}static{D(this,"InteractiveManager")}#t;#e=!1;#r=!1;#s=0;#i=0;constructor(t,e){this.#t={stderr:e,stdout:t}}get lastLength(){return this.#s}get outside(){return this.#i}get isHooked(){return this.#e}get isSuspended(){return this.#r}erase(t,e=this.#s){if(this.#t[t]===void 0)throw new TypeError(`Stream "${t}" is not available`);this.#t[t].erase(e)}hook(){return this.#e||(Object.values(this.#t).forEach(t=>t.active()),this._clear(!0)),this.#e}resume(t,e){this.#r&&(this.#r=!1,e&&this.erase(t,e),this.#s=0,Object.values(this.#t).forEach(s=>s.active()))}suspend(t,e=!0){this.#r||(this.#r=!0,e&&this.erase(t),Object.values(this.#t).forEach(s=>s.renew()))}unhook(t=!0){return this.#e&&(Object.values(this.#t).forEach(e=>e.inactive(t)),this._clear()),!this.#e}update(t,e,s=0){if(e.length>0){if(this.#t[t]===void 0)throw new TypeError(`Stream "${t}" is not available`);const a=this.#t[t],{columns:p,rows:i}=$(),c=s>i?i-1:Math.max(0,Math.min(i-1,s)),l=this.lastLength-c,u=Math.max(l-i,this.outside);let o=e.reduce((L,E)=>[...L,j(E,p,{hard:!0,trim:!1,wordWrap:!0})],[]);i<=l?(a.erase(i),c<u&&(o=o.slice(u-c+1))):l&&a.erase(l),a.write(o.join(`
2
2
  `)+`
3
3
  `),this.#s=u?u+o.length+1:o.length,this.#i=Math.max(this.lastLength-i,this.outside)}}_clear(t=!1){this.#e=t,this.#s=0,this.#i=0}};var k=Object.defineProperty,y=n((r,t)=>k(r,"name",{value:t,configurable:!0}),"n$1");const h="\x1B[",v=h+"2J",G=h+"2K",H=h+"G",V=y((r=1)=>h+r+"A","cursorUp"),w=process.platform==="win32"?`${v}${h}0f`:`${v}${h}3J${h}H`,Y=h+"?25l",C=h+"?25h",J=y(r=>{let t="";for(let e=0;e<r;e++)t+=G+(e<r-1?V():"");return r&&(t+=H),t},"eraseLines");var U=Object.defineProperty,z=n((r,t)=>U(r,"name",{value:t,configurable:!0}),"s$1");let g=class _{static{n(this,"t")}static{z(this,"InteractiveStreamHook")}static DRAIN=!0;#t=new P;#e=[];#r;#s;constructor(t){this.#r=t.write,this.#s=t}active(){this.write(Y),this.#s.write=(t,...e)=>{const s=e.at(-1);return this.#e.push(this.#t.write(typeof t=="string"?Buffer.from(t,typeof e[0]=="string"?e[0]:void 0):Buffer.from(t))),typeof s=="function"&&s(),_.DRAIN}}erase(t){t>0&&this.write(J(t+1))}inactive(t=!1){this.#e.length>0&&(t&&this.write(`
4
4
  `),this.#e.forEach(e=>{this.write(e)}),this.#e=[]),this.renew()}renew(){this.#s.write=this.#r,this.write(C)}write(t){this.#r.apply(this.#s,[t])}};var K=Object.defineProperty,W=n((r,t)=>K(r,"name",{value:t,configurable:!0}),"c");let q=class{static{n(this,"v")}static{W(this,"RawReporter")}#t;#e;#r;#s=!1;#i;constructor(t={}){this.#t=m,this.#e=S,this.#i=t}setStdout(t){this.#t=t}setStderr(t){this.#e=t}setInteractiveManager(t){this.#r=t}setIsInteractive(t){this.#s=t}log(t){const{context:e,groups:s,message:a,type:p}=t,i=[];if(a!==R){const o=typeof a=="string"?a:f(a,this.#i);i.push(o)}e&&i.push(...e.map(o=>typeof o=="object"?" "+f(o,this.#i):" "+o));const c=["error","trace","warn"].includes(p.level)?"stderr":"stdout",l=c==="stderr"?this.#e:this.#t,u=s.map(()=>" ").join("");this.#s&&this.#r!==void 0&&l.isTTY?this.#r.update(c,(u+i.join("")).split(`
@@ -1,11 +1,11 @@
1
- "use strict";var J=Object.defineProperty;var n=(t,e)=>J(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./shared/pail.BjvkVeLq.cjs"),m=require("node:process"),a=require("./shared/pail.tB8JSuso.cjs"),E=require("./shared/pail.D0U9y4qH.cjs"),o=require("@visulima/colorize"),O=require("@visulima/inspector"),T=require("./shared/pail.BtheZKQt.cjs"),I=n(t=>t&&typeof t=="object"&&"default"in t?t.default:t,"_interopDefaultCompat"),Y=I(o);var z=Object.defineProperty,k=n((t,e)=>z(t,"name",{value:e,configurable:!0}),"e");class W{static{n(this,"n")}static{k(this,"SafeStreamHandler")}#e=!0;#t;#s;constructor(e,s){this.#t=e,this.#s=s}write(e){this.writeStream(e)}end(...e){this.#t.end(...e)}get isReady(){return this.#e}writeStream(e){if(!this.#e){console.warn("Stream busy: "+this.#s+'. Write will be dropped: "'+e+'"');return}this.#e=!1,this.#t.on("error",s=>{throw s}),this.#t.on("drain",()=>{this.#e=!0}),this.#t.on("finish",()=>{this.#e=!0}),this.#e=this.#t.write(e,()=>{})}}var B=Object.defineProperty,C=n((t,e)=>B(t,"name",{value:e,configurable:!0}),"r$3");class D{static{n(this,"o")}static{C(this,"RotatingFileStream")}#e;#t;#s;#i;#r;constructor(e,s=!1,r={}){if(this.#e=e,this.#t=s,this.#i=r,!this.#t){try{this.#r=require("rotating-file-stream").createStream}catch{throw new Error("The 'rotating-file-stream' package is missing. Make sure to install the 'rotating-file-stream' package.")}this.#s=this.#r(this.#e,r)}}write(e){let s=this.#s;this.#t&&(s=this.#r(this.#e,this.#i));const r=new W(s,this.#e);r.write(e),this.#t&&r.end()}end(){this.#s!==void 0&&this.#s.end()}}var K=Object.defineProperty,G=n((t,e)=>K(t,"name",{value:e,configurable:!0}),"r$2");class q{static{n(this,"AbstractFileReporter")}static{G(this,"AbstractFileReporter")}stream;constructor(e){const{filePath:s,writeImmediately:r=!1,...c}=e;this.stream=new D(s,r,c)}log(e){this.stream.write(this._formatMessage(e)+`
2
- `)}}var H=Object.defineProperty,N=n((t,e)=>H(t,"name",{value:e,configurable:!0}),"r$1");class Q extends q{static{n(this,"f")}static{N(this,"JsonFileReporter")}#e;constructor(e){super({compress:"gzip",interval:"1d",size:"10M",...e})}setStringify(e){this.#e=e}_formatMessage(e){const{file:s,message:r,type:c,...h}=e;return h.label&&(h.label=h.label.trim()),s&&(h.file=s.name+":"+s.line+(s.column?":"+s.column:"")),r===S.EMPTY_SYMBOL?h.message=void 0:h.message=r,this.#e(h)}}const U=Q;var V=Object.defineProperty,X=n((t,e)=>V(t,"name",{value:e,configurable:!0}),"r");class Z extends E.f{static{n(this,"a")}static{X(this,"JsonReporter")}#e;#t;constructor(){super(),this.#e=m.stdout,this.#t=m.stderr}setStdout(e){this.#e=e}setStderr(e){this.#t=e}_log(e,s){const r=["error","warn"].includes(s)?this.#t:this.#e;a.n(e+`
3
- `,r)}}const ee=Z;var te=Object.defineProperty,se=n((t,e)=>te(t,"name",{value:e,configurable:!0}),"R");class re extends T.AbstractPrettyReporter{static{n(this,"K")}static{se(this,"SimpleReporter")}#e;#t;#s;#i=!1;#r;constructor(e={}){const{inspect:s,...r}=e;super({uppercase:{label:!0,...r.uppercase},...r}),this.#r={...a.u,indent:void 0,...s},this.#e=m.stdout,this.#t=m.stderr}setStdout(e){this.#e=e}setStderr(e){this.#t=e}setInteractiveManager(e){this.#s=e}setIsInteractive(e){this.#i=e}log(e){this._log(this._formatMessage(e),e.type.level)}_formatMessage(e){const{columns:s}=a.terminalSize();let r=s;typeof this._styles.messageLength=="number"&&(r=this._styles.messageLength);const{badge:c,context:h,date:g,error:R,file:d,groups:y,label:b,message:f,prefix:v,repeated:j,scope:w,suffix:_,traceError:P,type:L}=e,{color:M}=this._loggerTypes[L.name],$=M?Y[M]:o.white,p=y.map(()=>" ").join(""),i=[];if(y.length>0&&i.push(p+o.grey("["+y.at(-1)+"]")+" "),g&&i.push(o.grey(this._styles.dateFormatter(typeof g=="string"?new Date(g):g))+" "),c)i.push(o.bold($(c)));else{const l=T.s(this._loggerTypes);l.length>0&&i.push(o.grey(" ".repeat(l.length)))}const x=S.s(this._loggerTypes);b?i.push(o.bold($(a.n$1(b,this._styles)))+" "," ".repeat(x.length-a.stringLength(b))):i.push(" ".repeat(x.length+1)),j&&i.push(o.bgGrey.white("["+j+"x]")+" "),Array.isArray(w)&&w.length>0&&i.push(o.grey("["+w.join(" > ")+"]")+" "),v&&i.push(o.grey("["+(this._styles.underline.prefix?o.underline(v):v)+"]")+" ");const A=a.stringLength(i.join(""));if(f!==S.EMPTY_SYMBOL){const l=typeof f=="string"?f:O.inspect(f,this.#r);i.push(p+a.wrapAnsi(l,r-3,{hard:!0,trim:!0,wordWrap:!0}))}if(h){let l=!1;i.push(...h.map(u=>{if(u instanceof Error)return l=!0,`
1
+ "use strict";var J=Object.defineProperty;var n=(t,e)=>J(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./shared/pail.BjvkVeLq.cjs"),m=require("node:process"),o=require("./shared/pail.Dfpn3AvW.cjs"),E=require("./shared/pail.D0U9y4qH.cjs"),a=require("@visulima/colorize"),O=require("@visulima/inspector"),T=require("./shared/pail.BtheZKQt.cjs"),I=n(t=>t&&typeof t=="object"&&"default"in t?t.default:t,"_interopDefaultCompat"),Y=I(a);var z=Object.defineProperty,k=n((t,e)=>z(t,"name",{value:e,configurable:!0}),"e");class W{static{n(this,"n")}static{k(this,"SafeStreamHandler")}#e=!0;#t;#s;constructor(e,s){this.#t=e,this.#s=s}write(e){this.writeStream(e)}end(...e){this.#t.end(...e)}get isReady(){return this.#e}writeStream(e){if(!this.#e){console.warn("Stream busy: "+this.#s+'. Write will be dropped: "'+e+'"');return}this.#e=!1,this.#t.on("error",s=>{throw s}),this.#t.on("drain",()=>{this.#e=!0}),this.#t.on("finish",()=>{this.#e=!0}),this.#e=this.#t.write(e,()=>{})}}var B=Object.defineProperty,C=n((t,e)=>B(t,"name",{value:e,configurable:!0}),"r$3");class D{static{n(this,"o")}static{C(this,"RotatingFileStream")}#e;#t;#s;#i;#r;constructor(e,s=!1,r={}){if(this.#e=e,this.#t=s,this.#i=r,!this.#t){try{this.#r=require("rotating-file-stream").createStream}catch{throw new Error("The 'rotating-file-stream' package is missing. Make sure to install the 'rotating-file-stream' package.")}this.#s=this.#r(this.#e,r)}}write(e){let s=this.#s;this.#t&&(s=this.#r(this.#e,this.#i));const r=new W(s,this.#e);r.write(e),this.#t&&r.end()}end(){this.#s!==void 0&&this.#s.end()}}var K=Object.defineProperty,G=n((t,e)=>K(t,"name",{value:e,configurable:!0}),"r$2");class q{static{n(this,"AbstractFileReporter")}static{G(this,"AbstractFileReporter")}stream;constructor(e){const{filePath:s,writeImmediately:r=!1,...c}=e;this.stream=new D(s,r,c)}log(e){this.stream.write(this._formatMessage(e)+`
2
+ `)}}var H=Object.defineProperty,N=n((t,e)=>H(t,"name",{value:e,configurable:!0}),"r$1");class Q extends q{static{n(this,"f")}static{N(this,"JsonFileReporter")}#e;constructor(e){super({compress:"gzip",interval:"1d",size:"10M",...e})}setStringify(e){this.#e=e}_formatMessage(e){const{file:s,message:r,type:c,...h}=e;return h.label&&(h.label=h.label.trim()),s&&(h.file=s.name+":"+s.line+(s.column?":"+s.column:"")),r===S.EMPTY_SYMBOL?h.message=void 0:h.message=r,this.#e(h)}}const U=Q;var V=Object.defineProperty,X=n((t,e)=>V(t,"name",{value:e,configurable:!0}),"r");class Z extends E.f{static{n(this,"a")}static{X(this,"JsonReporter")}#e;#t;constructor(){super(),this.#e=m.stdout,this.#t=m.stderr}setStdout(e){this.#e=e}setStderr(e){this.#t=e}_log(e,s){const r=["error","warn"].includes(s)?this.#t:this.#e;o.n(e+`
3
+ `,r)}}const ee=Z;var te=Object.defineProperty,se=n((t,e)=>te(t,"name",{value:e,configurable:!0}),"R");class re extends T.AbstractPrettyReporter{static{n(this,"K")}static{se(this,"SimpleReporter")}#e;#t;#s;#i=!1;#r;constructor(e={}){const{inspect:s,...r}=e;super({uppercase:{label:!0,...r.uppercase},...r}),this.#r={...o.u,indent:void 0,...s},this.#e=m.stdout,this.#t=m.stderr}setStdout(e){this.#e=e}setStderr(e){this.#t=e}setInteractiveManager(e){this.#s=e}setIsInteractive(e){this.#i=e}log(e){this._log(this._formatMessage(e),e.type.level)}_formatMessage(e){const{columns:s}=o.terminalSize();let r=s;typeof this._styles.messageLength=="number"&&(r=this._styles.messageLength);const{badge:c,context:h,date:g,error:R,file:d,groups:y,label:b,message:f,prefix:v,repeated:j,scope:w,suffix:_,traceError:P,type:L}=e,{color:M}=this._loggerTypes[L.name],$=M?Y[M]:a.white,u=y.map(()=>" ").join(""),i=[];if(y.length>0&&i.push(u+a.grey("["+y.at(-1)+"]")+" "),g&&i.push(a.grey(this._styles.dateFormatter(typeof g=="string"?new Date(g):g))+" "),c)i.push(a.bold($(c)));else{const l=T.s(this._loggerTypes);l.length>0&&i.push(a.grey(" ".repeat(l.length)))}const x=S.s(this._loggerTypes);b?i.push(a.bold($(o.n$1(b,this._styles)))+" "," ".repeat(x.length-o.stringLength(b))):i.push(" ".repeat(x.length+1)),j&&i.push(a.bgGrey.white("["+j+"x]")+" "),Array.isArray(w)&&w.length>0&&i.push(a.grey("["+w.join(" > ")+"]")+" "),v&&i.push(a.grey("["+(this._styles.underline.prefix?a.underline(v):v)+"]")+" ");const A=o.stringLength(i.join(""));if(f!==S.EMPTY_SYMBOL){const l=typeof f=="string"?f:O.inspect(f,this.#r);i.push(u+o.wrapAnsi(l,r-3,{hard:!0,trim:!1,wordWrap:!0}))}if(h){let l=!1;i.push(...h.map(p=>{if(p instanceof Error)return l=!0,`
4
4
 
5
- `+a.w(u,r,p);if(typeof u=="object")return" "+O.inspect(u,this.#r);const F=(l?`
5
+ `+o.w(p,r,u);if(typeof p=="object")return" "+O.inspect(p,this.#r);const F=(l?`
6
6
 
7
- `:" ")+u;return l=!1,F}))}if(R&&i.push(a.w(R,r,p)),P&&i.push(a.w(P,r,p,!0)),_&&i.push(" "+p+o.grey(this._styles.underline.suffix?o.underline(_):_)),d){const l=d.name+(d.line?":"+d.line:"");i.push(`
8
- `,o.grey("Caller: ")," ".repeat(A-8),l,`
7
+ `:" ")+p;return l=!1,F}))}if(R&&i.push(o.w(R,r,u)),P&&i.push(o.w(P,r,u,!0)),_&&i.push(" "+u+a.grey(this._styles.underline.suffix?a.underline(_):_)),d){const l=d.name+(d.line?":"+d.line:"");i.push(`
8
+ `,a.grey("Caller: ")," ".repeat(A-8),l,`
9
9
  `)}return i.join("")}_log(e,s){const r=["error","trace","warn"].includes(s)?"stderr":"stdout",c=r==="stderr"?this.#t:this.#e;this.#i&&this.#s!==void 0&&c.isTTY?this.#s.update(r,e.split(`
10
- `),0):a.n(e+`
11
- `,c)}}const ie=re;exports.PrettyReporter=a.a;exports.AbstractFileReporter=q;exports.JsonFileReporter=U;exports.JsonReporter=ee;exports.SimpleReporter=ie;
10
+ `),0):o.n(e+`
11
+ `,c)}}const ie=re;exports.PrettyReporter=o.a;exports.AbstractFileReporter=q;exports.JsonFileReporter=U;exports.JsonReporter=ee;exports.SimpleReporter=ie;
@@ -1,4 +1,4 @@
1
- var k=Object.defineProperty;var a=(r,t)=>k(r,"name",{value:t,configurable:!0});import{E as T,s as W}from"./shared/pail.C1VNf0a-.mjs";import{stdout as F,stderr as E}from"node:process";import{n as I,u as Y,t as K,b as q,s as P,w as B,c as w}from"./shared/pail.hbXo0zpA.mjs";import{a as Pt}from"./shared/pail.hbXo0zpA.mjs";import{f as C}from"./shared/pail.uFyi02gk.mjs";import D,{white as G,grey as l,bold as M,bgGrey as H,underline as A}from"@visulima/colorize";import{inspect as O}from"@visulima/inspector";import{A as N,s as Q}from"./shared/pail.CeGWBihI.mjs";
1
+ var k=Object.defineProperty;var a=(r,t)=>k(r,"name",{value:t,configurable:!0});import{E as T,s as W}from"./shared/pail.C1VNf0a-.mjs";import{stdout as F,stderr as E}from"node:process";import{n as I,u as Y,t as K,b as q,s as P,w as B,c as w}from"./shared/pail.B0G23Kwv.mjs";import{a as Pt}from"./shared/pail.B0G23Kwv.mjs";import{f as C}from"./shared/pail.uFyi02gk.mjs";import D,{white as G,grey as l,bold as M,bgGrey as H,underline as A}from"@visulima/colorize";import{inspect as O}from"@visulima/inspector";import{A as N,s as Q}from"./shared/pail.CeGWBihI.mjs";
2
2
  // -- pack CommonJS Shims --
3
3
  import __cjs_url__ from "node:url";
4
4
  import __cjs_path__ from "node:path";
@@ -7,12 +7,12 @@ const __filename = __cjs_url__.fileURLToPath(import.meta.url);
7
7
  const __dirname = __cjs_path__.dirname(__filename);
8
8
  const require = __cjs_mod__.createRequire(import.meta.url);
9
9
  var U=Object.defineProperty,V=a((r,t)=>U(r,"name",{value:t,configurable:!0}),"e");class X{static{a(this,"n")}static{V(this,"SafeStreamHandler")}#t=!0;#e;#s;constructor(t,e){this.#e=t,this.#s=e}write(t){this.writeStream(t)}end(...t){this.#e.end(...t)}get isReady(){return this.#t}writeStream(t){if(!this.#t){console.warn("Stream busy: "+this.#s+'. Write will be dropped: "'+t+'"');return}this.#t=!1,this.#e.on("error",e=>{throw e}),this.#e.on("drain",()=>{this.#t=!0}),this.#e.on("finish",()=>{this.#t=!0}),this.#t=this.#e.write(t,()=>{})}}var Z=Object.defineProperty,tt=a((r,t)=>Z(r,"name",{value:t,configurable:!0}),"r$3");class et{static{a(this,"o")}static{tt(this,"RotatingFileStream")}#t;#e;#s;#i;#r;constructor(t,e=!1,s={}){if(this.#t=t,this.#e=e,this.#i=s,!this.#e){try{this.#r=require("rotating-file-stream").createStream}catch{throw new Error("The 'rotating-file-stream' package is missing. Make sure to install the 'rotating-file-stream' package.")}this.#s=this.#r(this.#t,s)}}write(t){let e=this.#s;this.#e&&(e=this.#r(this.#t,this.#i));const s=new X(e,this.#t);s.write(t),this.#e&&s.end()}end(){this.#s!==void 0&&this.#s.end()}}var st=Object.defineProperty,rt=a((r,t)=>st(r,"name",{value:t,configurable:!0}),"r$2");class it{static{a(this,"AbstractFileReporter")}static{rt(this,"AbstractFileReporter")}stream;constructor(t){const{filePath:e,writeImmediately:s=!1,...h}=t;this.stream=new et(e,s,h)}log(t){this.stream.write(this._formatMessage(t)+`
10
- `)}}var at=Object.defineProperty,ot=a((r,t)=>at(r,"name",{value:t,configurable:!0}),"r$1");class nt extends it{static{a(this,"f")}static{ot(this,"JsonFileReporter")}#t;constructor(t){super({compress:"gzip",interval:"1d",size:"10M",...t})}setStringify(t){this.#t=t}_formatMessage(t){const{file:e,message:s,type:h,...o}=t;return o.label&&(o.label=o.label.trim()),e&&(o.file=e.name+":"+e.line+(e.column?":"+e.column:"")),s===T?o.message=void 0:o.message=s,this.#t(o)}}const St=nt;var ht=Object.defineProperty,lt=a((r,t)=>ht(r,"name",{value:t,configurable:!0}),"r");class pt extends C{static{a(this,"a")}static{lt(this,"JsonReporter")}#t;#e;constructor(){super(),this.#t=F,this.#e=E}setStdout(t){this.#t=t}setStderr(t){this.#e=t}_log(t,e){const s=["error","warn"].includes(e)?this.#e:this.#t;I(t+`
11
- `,s)}}const $t=pt;var ct=Object.defineProperty,ut=a((r,t)=>ct(r,"name",{value:t,configurable:!0}),"R");class mt extends N{static{a(this,"K")}static{ut(this,"SimpleReporter")}#t;#e;#s;#i=!1;#r;constructor(t={}){const{inspect:e,...s}=t;super({uppercase:{label:!0,...s.uppercase},...s}),this.#r={...Y,indent:void 0,...e},this.#t=F,this.#e=E}setStdout(t){this.#t=t}setStderr(t){this.#e=t}setInteractiveManager(t){this.#s=t}setIsInteractive(t){this.#i=t}log(t){this._log(this._formatMessage(t),t.type.level)}_formatMessage(t){const{columns:e}=K();let s=e;typeof this._styles.messageLength=="number"&&(s=this._styles.messageLength);const{badge:h,context:o,date:u,error:_,file:m,groups:g,label:d,message:f,prefix:y,repeated:S,scope:b,suffix:v,traceError:$,type:J}=t,{color:R}=this._loggerTypes[J.name],j=R?D[R]:G,p=g.map(()=>" ").join(""),i=[];if(g.length>0&&i.push(p+l("["+g.at(-1)+"]")+" "),u&&i.push(l(this._styles.dateFormatter(typeof u=="string"?new Date(u):u))+" "),h)i.push(M(j(h)));else{const n=Q(this._loggerTypes);n.length>0&&i.push(l(" ".repeat(n.length)))}const x=W(this._loggerTypes);d?i.push(M(j(q(d,this._styles)))+" "," ".repeat(x.length-P(d))):i.push(" ".repeat(x.length+1)),S&&i.push(H.white("["+S+"x]")+" "),Array.isArray(b)&&b.length>0&&i.push(l("["+b.join(" > ")+"]")+" "),y&&i.push(l("["+(this._styles.underline.prefix?A(y):y)+"]")+" ");const z=P(i.join(""));if(f!==T){const n=typeof f=="string"?f:O(f,this.#r);i.push(p+B(n,s-3,{hard:!0,trim:!0,wordWrap:!0}))}if(o){let n=!1;i.push(...o.map(c=>{if(c instanceof Error)return n=!0,`
10
+ `)}}var at=Object.defineProperty,ot=a((r,t)=>at(r,"name",{value:t,configurable:!0}),"r$1");class nt extends it{static{a(this,"f")}static{ot(this,"JsonFileReporter")}#t;constructor(t){super({compress:"gzip",interval:"1d",size:"10M",...t})}setStringify(t){this.#t=t}_formatMessage(t){const{file:e,message:s,type:h,...o}=t;return o.label&&(o.label=o.label.trim()),e&&(o.file=e.name+":"+e.line+(e.column?":"+e.column:"")),s===T?o.message=void 0:o.message=s,this.#t(o)}}const St=nt;var ht=Object.defineProperty,lt=a((r,t)=>ht(r,"name",{value:t,configurable:!0}),"r");class ct extends C{static{a(this,"a")}static{lt(this,"JsonReporter")}#t;#e;constructor(){super(),this.#t=F,this.#e=E}setStdout(t){this.#t=t}setStderr(t){this.#e=t}_log(t,e){const s=["error","warn"].includes(e)?this.#e:this.#t;I(t+`
11
+ `,s)}}const $t=ct;var pt=Object.defineProperty,ut=a((r,t)=>pt(r,"name",{value:t,configurable:!0}),"R");class mt extends N{static{a(this,"K")}static{ut(this,"SimpleReporter")}#t;#e;#s;#i=!1;#r;constructor(t={}){const{inspect:e,...s}=t;super({uppercase:{label:!0,...s.uppercase},...s}),this.#r={...Y,indent:void 0,...e},this.#t=F,this.#e=E}setStdout(t){this.#t=t}setStderr(t){this.#e=t}setInteractiveManager(t){this.#s=t}setIsInteractive(t){this.#i=t}log(t){this._log(this._formatMessage(t),t.type.level)}_formatMessage(t){const{columns:e}=K();let s=e;typeof this._styles.messageLength=="number"&&(s=this._styles.messageLength);const{badge:h,context:o,date:u,error:_,file:m,groups:g,label:d,message:f,prefix:y,repeated:S,scope:b,suffix:v,traceError:$,type:J}=t,{color:R}=this._loggerTypes[J.name],j=R?D[R]:G,c=g.map(()=>" ").join(""),i=[];if(g.length>0&&i.push(c+l("["+g.at(-1)+"]")+" "),u&&i.push(l(this._styles.dateFormatter(typeof u=="string"?new Date(u):u))+" "),h)i.push(M(j(h)));else{const n=Q(this._loggerTypes);n.length>0&&i.push(l(" ".repeat(n.length)))}const x=W(this._loggerTypes);d?i.push(M(j(q(d,this._styles)))+" "," ".repeat(x.length-P(d))):i.push(" ".repeat(x.length+1)),S&&i.push(H.white("["+S+"x]")+" "),Array.isArray(b)&&b.length>0&&i.push(l("["+b.join(" > ")+"]")+" "),y&&i.push(l("["+(this._styles.underline.prefix?A(y):y)+"]")+" ");const z=P(i.join(""));if(f!==T){const n=typeof f=="string"?f:O(f,this.#r);i.push(c+B(n,s-3,{hard:!0,trim:!1,wordWrap:!0}))}if(o){let n=!1;i.push(...o.map(p=>{if(p instanceof Error)return n=!0,`
12
12
 
13
- `+w(c,s,p);if(typeof c=="object")return" "+O(c,this.#r);const L=(n?`
13
+ `+w(p,s,c);if(typeof p=="object")return" "+O(p,this.#r);const L=(n?`
14
14
 
15
- `:" ")+c;return n=!1,L}))}if(_&&i.push(w(_,s,p)),$&&i.push(w($,s,p,!0)),v&&i.push(" "+p+l(this._styles.underline.suffix?A(v):v)),m){const n=m.name+(m.line?":"+m.line:"");i.push(`
15
+ `:" ")+p;return n=!1,L}))}if(_&&i.push(w(_,s,c)),$&&i.push(w($,s,c,!0)),v&&i.push(" "+c+l(this._styles.underline.suffix?A(v):v)),m){const n=m.name+(m.line?":"+m.line:"");i.push(`
16
16
  `,l("Caller: ")," ".repeat(z-8),n,`
17
17
  `)}return i.join("")}_log(t,e){const s=["error","trace","warn"].includes(e)?"stderr":"stdout",h=s==="stderr"?this.#e:this.#t;this.#i&&this.#s!==void 0&&h.isTTY?this.#s.update(s,t.split(`
18
18
  `),0):I(t+`
@@ -5,12 +5,12 @@ var BD=Object.defineProperty;var E=(D,u)=>BD(D,"name",{value:u,configurable:!0})
5
5
  `,`
6
6
  `).split(`
7
7
  `).map(e=>PD(e,u,F)).join(`
8
- `)}E(tD,"wrapAnsi");var zD=Object.defineProperty,GD=E((D,u)=>zD(D,"name",{value:u,configurable:!0}),"r");const YD=GD((D,u)=>(u.__write??u.write).call(u,D),"writeStream"),UD=new Intl.Segmenter;function I(D,{countAnsiEscapeCodes:u=!1}={}){if(D===""||(u||(D=k(D)),D===""))return 0;let F=0;for(const e of UD.segment(D))F++;return F}E(I,"stringLength");var KD=Object.defineProperty,ZD=E((D,u)=>KD(D,"name",{value:u,configurable:!0}),"t");const VD={indent:2,quoteStyle:"single",stylize:ZD((D,u)=>{const F={bigint:O,boolean:O,date:aD,null:Q,number:O,regexp:X,special:DD,string:Y,symbol:Y,undefined:f};return F[u]===void 0?D:F[u](D)},"stylize")};var qD=Object.defineProperty,HD=E((D,u)=>qD(D,"name",{value:u,configurable:!0}),"o$1");const M=HD((D,u,F,e=!1)=>{const{message:t,name:B,stack:r}=D,C=[];if(C.push(...e?[]:[F+X(B),": "],tD(t,u-3,{hard:!0,trim:!0,wordWrap:!0})),r){const o=r.split(`
8
+ `)}E(tD,"wrapAnsi");var zD=Object.defineProperty,GD=E((D,u)=>zD(D,"name",{value:u,configurable:!0}),"r");const YD=GD((D,u)=>(u.__write??u.write).call(u,D),"writeStream"),UD=new Intl.Segmenter;function I(D,{countAnsiEscapeCodes:u=!1}={}){if(D===""||(u||(D=k(D)),D===""))return 0;let F=0;for(const e of UD.segment(D))F++;return F}E(I,"stringLength");var KD=Object.defineProperty,ZD=E((D,u)=>KD(D,"name",{value:u,configurable:!0}),"t");const VD={indent:2,quoteStyle:"single",stylize:ZD((D,u)=>{const F={bigint:O,boolean:O,date:aD,null:Q,number:O,regexp:X,special:DD,string:Y,symbol:Y,undefined:f};return F[u]===void 0?D:F[u](D)},"stylize")};var qD=Object.defineProperty,HD=E((D,u)=>qD(D,"name",{value:u,configurable:!0}),"o$1");const M=HD((D,u,F,e=!1)=>{const{message:t,name:B,stack:r}=D,C=[];if(C.push(...e?[]:[F+X(B),": "],tD(t,u-3,{hard:!0,trim:!1,wordWrap:!0})),r){const o=r.split(`
9
9
  `).splice(1).map(A=>F+A.trim().replace("file://","")).filter(A=>!A.includes("/pail/dist"));C.push(`
10
10
  `,o.map(A=>" "+A.replace(/^at +/,p=>f(p)).replace(/\((.+)\)/,(p,i)=>"("+DD(i)+")")).join(`
11
11
  `))}return C.join("")},"formatError");var JD=Object.defineProperty,QD=E((D,u)=>JD(D,"name",{value:u,configurable:!0}),"o");const XD=QD((D,u)=>{let F=u.uppercase.label?D.toUpperCase():D;return F=u.underline.label?L(F):F,u.bold.label&&(F=Q(F)),F},"formatLabel");var Du=Object.defineProperty,uu=E((D,u)=>Du(D,"name",{value:u,configurable:!0}),"O");class Fu extends hD{static{E(this,"H")}static{uu(this,"PrettyReporter")}#D;#u;#F;#E=!1;#e;constructor(u={}){const{inspect:F,...e}=u;super({uppercase:{label:!0,...e.uppercase},...e}),this.#e={...VD,...F},this.#D=sD,this.#u=iD}setStdout(u){this.#D=u}setStderr(u){this.#u=u}setInteractiveManager(u){this.#F=u}setIsInteractive(u){this.#E=u}log(u){this._log(this._formatMessage(u),u.type.level)}_formatMessage(u){const{columns:F}=dD();let e=F;typeof this._styles.messageLength=="number"&&(e=this._styles.messageLength);const{badge:t,context:B,date:r,error:C,file:o,groups:A,label:p,message:i,prefix:l,repeated:a,scope:c,suffix:h,traceError:N,type:rD}=u,{color:P}=this._loggerTypes[rD.name],z=P?oD[P]:AD,d=A.map(()=>" ").join(""),s=[];if(A.length>0&&s.push(d+f("["+A.at(-1)+"]")+" "),r&&s.push(f(this._styles.dateFormatter(typeof r=="string"?new Date(r):r))+" "),t)s.push(z(t));else{const g=mD(this._loggerTypes);g.length>0&&s.push(f(".".repeat(g.length))+" ")}const G=gD(this._loggerTypes);p?s.push(z(XD(p,this._styles))+" ",f(".".repeat(G.length-I(p)))):s.push(f(".".repeat(G.length+2))),a&&s.push(lD.white("["+a+"x]")+" "),Array.isArray(c)&&c.length>0&&s.push(" "+f("["+c.join(" > ")+"]")+" "),l&&s.push(f((Array.isArray(c)&&c.length>0?". ":" ")+"["+(this._styles.underline.prefix?L(l):l)+"]")+" ");const _=I(s.join(" "));if(o){const g=o.name+(o.line?":"+o.line:""),m=I(g);m+_+2>e?s.push(f(" "+g)):s.push(f(".".repeat(e-_-m-2)+" "+g))}else s.push(f(".".repeat(e-_-1)));if(s.length>0&&s.push(`
12
12
 
13
- `),i!==pD){const g=typeof i=="string"?i:U(i,this.#e);s.push(d+tD(g,e-3,{hard:!0,trim:!0,wordWrap:!0}))}if(B){let g=!1;s.push(...B.map(m=>{if(m instanceof Error)return g=!0,`
13
+ `),i!==pD){const g=typeof i=="string"?i:U(i,this.#e);s.push(d+tD(g,e-3,{hard:!0,trim:!1,wordWrap:!0}))}if(B){let g=!1;s.push(...B.map(m=>{if(m instanceof Error)return g=!0,`
14
14
 
15
15
  `+M(m,e,d);if(typeof m=="object")return" "+U(m,this.#e);const nD=(g?`
16
16
 
@@ -5,12 +5,12 @@
5
5
  `,`
6
6
  `).split(`
7
7
  `).map(e=>LD(e,u,F)).join(`
8
- `)}E(P,"wrapAnsi");var ID=Object.defineProperty,MD=E((D,u)=>ID(D,"name",{value:u,configurable:!0}),"r");const tD=MD((D,u)=>(u.__write??u.write).call(u,D),"writeStream"),RD=new Intl.Segmenter;function _(D,{countAnsiEscapeCodes:u=!1}={}){if(D===""||(u||(D=k(D)),D===""))return 0;let F=0;for(const e of RD.segment(D))F++;return F}E(_,"stringLength");var kD=Object.defineProperty,WD=E((D,u)=>kD(D,"name",{value:u,configurable:!0}),"t");const rD={indent:2,quoteStyle:"single",stylize:WD((D,u)=>{const F={bigint:r.yellow,boolean:r.yellow,date:r.magenta,null:r.bold,number:r.yellow,regexp:r.red,special:r.cyan,string:r.green,symbol:r.green,undefined:r.grey};return F[u]===void 0?D:F[u](D)},"stylize")};var PD=Object.defineProperty,zD=E((D,u)=>PD(D,"name",{value:u,configurable:!0}),"o$1");const v=zD((D,u,F,e=!1)=>{const{message:t,name:B,stack:n}=D,C=[];if(C.push(...e?[]:[F+r.red(B),": "],P(t,u-3,{hard:!0,trim:!0,wordWrap:!0})),n){const a=n.split(`
8
+ `)}E(P,"wrapAnsi");var ID=Object.defineProperty,MD=E((D,u)=>ID(D,"name",{value:u,configurable:!0}),"r");const tD=MD((D,u)=>(u.__write??u.write).call(u,D),"writeStream"),RD=new Intl.Segmenter;function _(D,{countAnsiEscapeCodes:u=!1}={}){if(D===""||(u||(D=k(D)),D===""))return 0;let F=0;for(const e of RD.segment(D))F++;return F}E(_,"stringLength");var kD=Object.defineProperty,WD=E((D,u)=>kD(D,"name",{value:u,configurable:!0}),"t");const rD={indent:2,quoteStyle:"single",stylize:WD((D,u)=>{const F={bigint:r.yellow,boolean:r.yellow,date:r.magenta,null:r.bold,number:r.yellow,regexp:r.red,special:r.cyan,string:r.green,symbol:r.green,undefined:r.grey};return F[u]===void 0?D:F[u](D)},"stylize")};var PD=Object.defineProperty,zD=E((D,u)=>PD(D,"name",{value:u,configurable:!0}),"o$1");const v=zD((D,u,F,e=!1)=>{const{message:t,name:B,stack:n}=D,C=[];if(C.push(...e?[]:[F+r.red(B),": "],P(t,u-3,{hard:!0,trim:!1,wordWrap:!0})),n){const a=n.split(`
9
9
  `).splice(1).map(A=>F+A.trim().replace("file://","")).filter(A=>!A.includes("/pail/dist"));C.push(`
10
10
  `,a.map(A=>" "+A.replace(/^at +/,p=>r.grey(p)).replace(/\((.+)\)/,(p,o)=>"("+r.cyan(o)+")")).join(`
11
11
  `))}return C.join("")},"formatError");var qD=Object.defineProperty,GD=E((D,u)=>qD(D,"name",{value:u,configurable:!0}),"o");const nD=GD((D,u)=>{let F=u.uppercase.label?D.toUpperCase():D;return F=u.underline.label?r.underline(F):F,u.bold.label&&(F=r.bold(F)),F},"formatLabel");var YD=Object.defineProperty,UD=E((D,u)=>YD(D,"name",{value:u,configurable:!0}),"O");class KD extends K.AbstractPrettyReporter{static{E(this,"H")}static{UD(this,"PrettyReporter")}#D;#u;#F;#E=!1;#e;constructor(u={}){const{inspect:F,...e}=u;super({uppercase:{label:!0,...e.uppercase},...e}),this.#e={...rD,...F},this.#D=M.stdout,this.#u=M.stderr}setStdout(u){this.#D=u}setStderr(u){this.#u=u}setInteractiveManager(u){this.#F=u}setIsInteractive(u){this.#E=u}log(u){this._log(this._formatMessage(u),u.type.level)}_formatMessage(u){const{columns:F}=eD();let e=F;typeof this._styles.messageLength=="number"&&(e=this._styles.messageLength);const{badge:t,context:B,date:n,error:C,file:a,groups:A,label:p,message:o,prefix:c,repeated:l,scope:f,suffix:h,traceError:T,type:sD}=u,{color:z}=this._loggerTypes[sD.name],q=z?AD[z]:r.white,m=A.map(()=>" ").join(""),i=[];if(A.length>0&&i.push(m+r.grey("["+A.at(-1)+"]")+" "),n&&i.push(r.grey(this._styles.dateFormatter(typeof n=="string"?new Date(n):n))+" "),t)i.push(q(t));else{const g=K.s(this._loggerTypes);g.length>0&&i.push(r.grey(".".repeat(g.length))+" ")}const G=U.s(this._loggerTypes);p?i.push(q(nD(p,this._styles))+" ",r.grey(".".repeat(G.length-_(p)))):i.push(r.grey(".".repeat(G.length+2))),l&&i.push(r.bgGrey.white("["+l+"x]")+" "),Array.isArray(f)&&f.length>0&&i.push(" "+r.grey("["+f.join(" > ")+"]")+" "),c&&i.push(r.grey((Array.isArray(f)&&f.length>0?". ":" ")+"["+(this._styles.underline.prefix?r.underline(c):c)+"]")+" ");const $=_(i.join(" "));if(a){const g=a.name+(a.line?":"+a.line:""),d=_(g);d+$+2>e?i.push(r.grey(" "+g)):i.push(r.grey(".".repeat(e-$-d-2)+" "+g))}else i.push(r.grey(".".repeat(e-$-1)));if(i.length>0&&i.push(`
12
12
 
13
- `),o!==U.EMPTY_SYMBOL){const g=typeof o=="string"?o:Y.inspect(o,this.#e);i.push(m+P(g,e-3,{hard:!0,trim:!0,wordWrap:!0}))}if(B){let g=!1;i.push(...B.map(d=>{if(d instanceof Error)return g=!0,`
13
+ `),o!==U.EMPTY_SYMBOL){const g=typeof o=="string"?o:Y.inspect(o,this.#e);i.push(m+P(g,e-3,{hard:!0,trim:!1,wordWrap:!0}))}if(B){let g=!1;i.push(...B.map(d=>{if(d instanceof Error)return g=!0,`
14
14
 
15
15
  `+v(d,e,m);if(typeof d=="object")return" "+Y.inspect(d,this.#e);const BD=(g?`
16
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/pail",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "Find a file or directory by walking up parent directories.",
5
5
  "keywords": [
6
6
  "ansi",