@visulima/pail 1.4.3 → 2.0.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 +31 -0
  2. package/dist/index.browser.cjs +1 -1
  3. package/dist/index.browser.mjs +1 -1
  4. package/dist/index.server.cjs +4 -4
  5. package/dist/index.server.mjs +4 -4
  6. package/dist/processor.browser.cjs +1 -1
  7. package/dist/processor.browser.mjs +1 -1
  8. package/dist/processor.server.cjs +1 -1
  9. package/dist/processor.server.d.cts +1 -27
  10. package/dist/processor.server.d.mts +1 -27
  11. package/dist/processor.server.d.ts +1 -27
  12. package/dist/processor.server.mjs +1 -1
  13. package/dist/reporter.browser.cjs +2 -2
  14. package/dist/reporter.browser.d.cts +1 -1
  15. package/dist/reporter.browser.d.mts +1 -1
  16. package/dist/reporter.browser.d.ts +1 -1
  17. package/dist/reporter.browser.mjs +2 -2
  18. package/dist/reporter.server.cjs +11 -9
  19. package/dist/reporter.server.d.cts +21 -25
  20. package/dist/reporter.server.d.mts +21 -25
  21. package/dist/reporter.server.d.ts +21 -25
  22. package/dist/reporter.server.mjs +12 -10
  23. package/dist/shared/pail.B78_c-y4.cjs +1 -0
  24. package/dist/shared/pail.BPOgzkG1.mjs +20 -0
  25. package/dist/shared/pail.Bbo15e5K.mjs +1 -0
  26. package/dist/shared/{pail.nEbRCLhY.mjs → pail.Bj_SDK4w.mjs} +1 -1
  27. package/dist/shared/pail.DHp7NF7R.cjs +1 -0
  28. package/dist/shared/pail.DM_CW0V1.mjs +1 -0
  29. package/dist/shared/pail.akgEzola.cjs +20 -0
  30. package/dist/shared/{pail.B85Cx0UJ.cjs → pail.rUW_oLpx.cjs} +1 -1
  31. package/package.json +6 -5
  32. package/dist/shared/pail.B0G23Kwv.mjs +0 -21
  33. package/dist/shared/pail.C0epjAht.cjs +0 -1
  34. package/dist/shared/pail.CNxJnpWG.mjs +0 -1
  35. package/dist/shared/pail.D0U9y4qH.cjs +0 -1
  36. package/dist/shared/pail.Dfpn3AvW.cjs +0 -21
  37. package/dist/shared/pail.oMoeTQZX.cjs +0 -1
  38. package/dist/shared/pail.uFyi02gk.mjs +0 -1
  39. package/dist/shared/pail.xIXzgCNy.mjs +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,34 @@
1
+ ## @visulima/pail [2.0.0](https://github.com/visulima/visulima/compare/@visulima/pail@1.4.4...@visulima/pail@2.0.0) (2024-07-09)
2
+
3
+ ### ⚠ BREAKING CHANGES
4
+
5
+ * removed abstract-file-reporter - the new base is now the AbstractJsonReporter, removed ErrorProcessor - was replaced with @visulima/error
6
+ Signed-off-by: prisis <d.bannert@anolilab.de>
7
+
8
+ ### Features
9
+
10
+ * switched error serialize to @visulima/error, export type for reporter options ([a761356](https://github.com/visulima/visulima/commit/a761356a9215a8dc72a1477d5b0a493c73aa7b88))
11
+
12
+ ## @visulima/pail [1.4.4](https://github.com/visulima/visulima/compare/@visulima/pail@1.4.3...@visulima/pail@1.4.4) (2024-07-09)
13
+
14
+ ### Bug Fixes
15
+
16
+ * **pail:** adding better error view ([#450](https://github.com/visulima/visulima/issues/450)) ([21f3622](https://github.com/visulima/visulima/commit/21f362256edc903fc2f1ab70f2264fe90234f896))
17
+
18
+ ### Styles
19
+
20
+ * cs fixes ([ee5ed6f](https://github.com/visulima/visulima/commit/ee5ed6f31bdabcfacdb0d1abd1eff2cc6207cefc))
21
+ * cs fixes ([cf19938](https://github.com/visulima/visulima/commit/cf199384f25cd6e97d4041317b35b6a3cc586f88))
22
+ * cs fixes found by eslint and prettier ([69ef744](https://github.com/visulima/visulima/commit/69ef7444c0bfbf1c94763623332e06b7fffc0039))
23
+
24
+ ### Miscellaneous Chores
25
+
26
+ * added private true into fixture package.json files ([4a9494c](https://github.com/visulima/visulima/commit/4a9494c642fa98f224505a1d231b5af4e73d6c79))
27
+ * changed typescript version back to 5.4.5 ([55d28bb](https://github.com/visulima/visulima/commit/55d28bbdc103718d19f844034b38a0e8e5af798a))
28
+ * **pail:** fixed benchmarks ([238aeaf](https://github.com/visulima/visulima/commit/238aeaf550324b19aa4ee9b4b3d5928380abe5ff))
29
+ * updated dev dependencies ([34df456](https://github.com/visulima/visulima/commit/34df4569f2fc074823a406c44a131c8fbae2b147))
30
+ * updated dev dependencies ([c889486](https://github.com/visulima/visulima/commit/c889486f8980741f459b993648c1b6d0815e3d66))
31
+
1
32
  ## @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
33
 
3
34
  ### Bug Fixes
@@ -1 +1 @@
1
- "use strict";var t=Object.defineProperty;var o=(e,r)=>t(e,"name",{value:r,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./shared/pail.CqyBdtm7.cjs"),i=require("./shared/pail.C0epjAht.cjs"),n=require("./shared/pail.B85Cx0UJ.cjs"),c=require("./shared/pail.oMoeTQZX.cjs");var l=Object.defineProperty,u=o((e,r)=>l(e,"name",{value:r,configurable:!0}),"e");const s=u(e=>new a.PailBrowser({processors:[new n.g,...typeof window<"u"?[new i.L]:[]],reporters:[new c.n],...e}),"createPail"),w=s();exports.createPail=s;exports.pail=w;
1
+ "use strict";var t=Object.defineProperty;var o=(e,r)=>t(e,"name",{value:r,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./shared/pail.CqyBdtm7.cjs"),i=require("./shared/pail.rUW_oLpx.cjs"),c=require("./shared/pail.B78_c-y4.cjs");var n=Object.defineProperty,l=o((e,r)=>n(e,"name",{value:r,configurable:!0}),"e");const a=l(e=>new s.PailBrowser({processors:[new i.L],reporters:[new c.i],...e}),"createPail"),u=a();exports.createPail=a;exports.pail=u;
@@ -1 +1 @@
1
- var t=Object.defineProperty;var o=(r,e)=>t(r,"name",{value:e,configurable:!0});import{P as a}from"./shared/pail.Bk25qk8U.mjs";import{L as i}from"./shared/pail.CNxJnpWG.mjs";import{g as n}from"./shared/pail.nEbRCLhY.mjs";import{n as p}from"./shared/pail.xIXzgCNy.mjs";var m=Object.defineProperty,f=o((r,e)=>m(r,"name",{value:e,configurable:!0}),"e");const s=f(r=>new a({processors:[new n,...typeof window<"u"?[new i]:[]],reporters:[new p],...r}),"createPail"),v=s();export{s as createPail,v as pail};
1
+ var a=Object.defineProperty;var o=(r,e)=>a(r,"name",{value:e,configurable:!0});import{P as t}from"./shared/pail.Bk25qk8U.mjs";import{L as i}from"./shared/pail.Bj_SDK4w.mjs";import{i as p}from"./shared/pail.DM_CW0V1.mjs";var m=Object.defineProperty,n=o((r,e)=>m(r,"name",{value:e,configurable:!0}),"e");const s=n(r=>new t({processors:[new i],reporters:[new p],...r}),"createPail"),w=s();export{s as createPail,w as pail};
@@ -1,5 +1,5 @@
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(`
1
+ "use strict";var E=Object.defineProperty;var n=(r,t)=>E(r,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("node:process"),v=require("./shared/pail.akgEzola.cjs"),I=require("node:string_decoder"),P=require("./shared/pail.CqyBdtm7.cjs"),w=require("@visulima/inspector"),$=require("./shared/pail.BjvkVeLq.cjs"),j=require("./shared/pail.rUW_oLpx.cjs");var M=Object.defineProperty,O=n((r,t)=>M(r,"name",{value:t,configurable:!0}),"l$1");let R=class{static{n(this,"v")}static{O(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((b,L)=>[...b,v.wrapAnsi(L,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
- `),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
- `),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(`
5
- `),0):v.n(d+i.join(""),l)}};var U=Object.defineProperty,z=n((r,t)=>U(r,"name",{value:t,configurable:!0}),"a");class F extends $.PailBrowserImpl{static{n(this,"v")}constructor(t){const{interactive:e,rawReporter:s,reporters:a,stderr:p,stdout:i,...u}=t;super(u),this.options=t,this.interactive=e??!1,this.stdout=i,this.stderr=p,this.interactive&&(this.interactiveManager=new T(new m(this.stdout),new m(this.stderr))),Array.isArray(a)&&this.registerReporters(a),this.rawReporter=this.extendReporter(t.rawReporter??new J)}static{z(this,"PailServerImpl")}stdout;stderr;interactiveManager;interactive;scope(...t){if(t.length===0)throw new Error("No scope name was defined.");return this.scopeName=t.flat(),this}getInteractiveManager(){return this.interactiveManager}wrapStd(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}restoreStd(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}clear(){this.stdout.write(f),this.stderr.write(f)}extendReporter(t){return typeof t.setStdout=="function"&&t.setStdout(this.stdout),typeof t.setStderr=="function"&&t.setStderr(this.stderr),typeof t.setLoggerTypes=="function"&&t.setLoggerTypes(this.types),typeof t.setStringify=="function"&&t.setStringify(this.stringify),typeof t.setIsInteractive=="function"&&t.setIsInteractive(this.interactive),this.interactive&&typeof t.setInteractiveManager=="function"&&t.setInteractiveManager(this.interactiveManager),t}_wrapStream(t,e){t&&(t.__write||(t.__write=t.write),t.write=s=>{this[e].log(String(s).trim())})}_restoreStream(t){t&&t.__write&&(t.write=t.__write,delete t.__write)}}const K=F;var W=Object.defineProperty,_=n((r,t)=>W(r,"name",{value:t,configurable:!0}),"t");const Q=_(()=>h.env.NODE_ENV==="debug"||h.env.DEBUG!==void 0?"debug":h.env.NODE_ENV==="test"?"warning":"informational","_getDefaultLogLevel"),b=_(r=>{let t=Q();return h.env.PAIL_LOG_LEVEL!==void 0&&(t=h.env.PAIL_LOG_LEVEL),new K({logLevel:t,processors:[new O.g,new M.L],reporters:[new v.a],stderr:h.stderr,stdout:h.stdout,...r})},"createPail"),X=b();exports.createPail=b;exports.pail=X;
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 A=Object.defineProperty,y=n((r,t)=>A(r,"name",{value:t,configurable:!0}),"n$1");const c="\x1B[",f=c+"2J",T=c+"2K",x=c+"G",N=y((r=1)=>c+r+"A","cursorUp"),m=process.platform==="win32"?`${f}${c}0f`:`${f}${c}3J${c}H`,q=c+"?25l",D=c+"?25h",B=y(r=>{let t="";for(let e=0;e<r;e++)t+=T+(e<r-1?N():"");return r&&(t+=x),t},"eraseLines");var k=Object.defineProperty,G=n((r,t)=>k(r,"name",{value:t,configurable:!0}),"s$1");class g{static{n(this,"t")}static{G(this,"InteractiveStreamHook")}static DRAIN=!0;#t=new I.StringDecoder;#e=[];#r;#s;constructor(t){this.#r=t.write,this.#s=t}active(){this.write(q),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(),g.DRAIN}}erase(t){t>0&&this.write(B(t+1))}inactive(t=!1){this.#e.length>0&&(t&&this.write(`
4
+ `),this.#e.forEach(e=>{this.write(e)}),this.#e=[]),this.renew()}renew(){this.#s.write=this.#r,this.write(D)}write(t){this.#r.apply(this.#s,[t])}}var H=Object.defineProperty,V=n((r,t)=>H(r,"name",{value:t,configurable:!0}),"c");let Y=class{static{n(this,"v")}static{V(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!==$.EMPTY_SYMBOL){const o=typeof a=="string"?a:w.inspect(a,this.#i);i.push(o)}e&&i.push(...e.map(o=>typeof o=="object"?" "+w.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(`
5
+ `),0):v.n(d+i.join(""),l)}};var C=Object.defineProperty,J=n((r,t)=>C(r,"name",{value:t,configurable:!0}),"a$1");class U extends P.PailBrowserImpl{static{n(this,"v")}constructor(t){const{interactive:e,rawReporter:s,reporters:a,stderr:p,stdout:i,...u}=t;super(u),this.options=t,this.interactive=e??!1,this.stdout=i,this.stderr=p,this.interactive&&(this.interactiveManager=new R(new g(this.stdout),new g(this.stderr))),Array.isArray(a)&&this.registerReporters(a),this.rawReporter=this.extendReporter(t.rawReporter??new Y)}static{J(this,"PailServerImpl")}stdout;stderr;interactiveManager;interactive;scope(...t){if(t.length===0)throw new Error("No scope name was defined.");return this.scopeName=t.flat(),this}getInteractiveManager(){return this.interactiveManager}wrapStd(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}restoreStd(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}clear(){this.stdout.write(m),this.stderr.write(m)}extendReporter(t){return typeof t.setStdout=="function"&&t.setStdout(this.stdout),typeof t.setStderr=="function"&&t.setStderr(this.stderr),typeof t.setLoggerTypes=="function"&&t.setLoggerTypes(this.types),typeof t.setStringify=="function"&&t.setStringify(this.stringify),typeof t.setIsInteractive=="function"&&t.setIsInteractive(this.interactive),this.interactive&&typeof t.setInteractiveManager=="function"&&t.setInteractiveManager(this.interactiveManager),t}_wrapStream(t,e){t&&(t.__write||(t.__write=t.write),t.write=s=>{this[e].log(String(s).trim())})}_restoreStream(t){t&&t.__write&&(t.write=t.__write,delete t.__write)}}const z=U;var F=Object.defineProperty,S=n((r,t)=>F(r,"name",{value:t,configurable:!0}),"o");const K=S(()=>h.env.NODE_ENV==="debug"||h.env.DEBUG!==void 0?"debug":h.env.NODE_ENV==="test"?"warning":"informational","_getDefaultLogLevel"),_=S(r=>{let t=K();return h.env.PAIL_LOG_LEVEL!==void 0&&(t=h.env.PAIL_LOG_LEVEL),new z({logLevel:t,processors:[new j.L],reporters:[new v.PrettyReporter],stderr:h.stderr,stdout:h.stdout,...r})},"createPail"),W=_();exports.createPail=_;exports.pail=W;
@@ -1,5 +1,5 @@
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(`
1
+ var E=Object.defineProperty;var n=(r,t)=>E(r,"name",{value:t,configurable:!0});import{stdout as m,stderr as y,env as d}from"node:process";import{t as I,w as $,n as P,P as j}from"./shared/pail.BPOgzkG1.mjs";import{StringDecoder as M}from"node:string_decoder";import{a as O}from"./shared/pail.Bk25qk8U.mjs";import{inspect as f}from"@visulima/inspector";import{E as R}from"./shared/pail.C1VNf0a-.mjs";import{L as A}from"./shared/pail.Bj_SDK4w.mjs";var x=Object.defineProperty,N=n((r,t)=>x(r,"name",{value:t,configurable:!0}),"l$1");let T=class{static{n(this,"v")}static{N(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}=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((b,L)=>[...b,$(L,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
- `),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
- `),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(`
5
- `),0):M(u+i.join(""),l)}};var F=Object.defineProperty,Q=n((r,t)=>F(r,"name",{value:t,configurable:!0}),"a");class X extends A{static{n(this,"v")}constructor(t){const{interactive:e,rawReporter:s,reporters:a,stderr:p,stdout:i,...c}=t;super(c),this.options=t,this.interactive=e??!1,this.stdout=i,this.stderr=p,this.interactive&&(this.interactiveManager=new B(new g(this.stdout),new g(this.stderr))),Array.isArray(a)&&this.registerReporters(a),this.rawReporter=this.extendReporter(t.rawReporter??new q)}static{Q(this,"PailServerImpl")}stdout;stderr;interactiveManager;interactive;scope(...t){if(t.length===0)throw new Error("No scope name was defined.");return this.scopeName=t.flat(),this}getInteractiveManager(){return this.interactiveManager}wrapStd(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}restoreStd(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}clear(){this.stdout.write(w),this.stderr.write(w)}extendReporter(t){return typeof t.setStdout=="function"&&t.setStdout(this.stdout),typeof t.setStderr=="function"&&t.setStderr(this.stderr),typeof t.setLoggerTypes=="function"&&t.setLoggerTypes(this.types),typeof t.setStringify=="function"&&t.setStringify(this.stringify),typeof t.setIsInteractive=="function"&&t.setIsInteractive(this.interactive),this.interactive&&typeof t.setInteractiveManager=="function"&&t.setInteractiveManager(this.interactiveManager),t}_wrapStream(t,e){t&&(t.__write||(t.__write=t.write),t.write=s=>{this[e].log(String(s).trim())})}_restoreStream(t){t&&t.__write&&(t.write=t.__write,delete t.__write)}}const Z=X;var tt=Object.defineProperty,b=n((r,t)=>tt(r,"name",{value:t,configurable:!0}),"t");const et=b(()=>d.NODE_ENV==="debug"||d.DEBUG!==void 0?"debug":d.NODE_ENV==="test"?"warning":"informational","_getDefaultLogLevel"),rt=b(r=>{let t=et();return d.PAIL_LOG_LEVEL!==void 0&&(t=d.PAIL_LOG_LEVEL),new Z({logLevel:t,processors:[new N,new x],reporters:[new O],stderr:S,stdout:m,...r})},"createPail"),ft=rt();export{rt as createPail,ft as pail};
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 D=Object.defineProperty,S=n((r,t)=>D(r,"name",{value:t,configurable:!0}),"n$1");const h="\x1B[",w=h+"2J",B=h+"2K",k=h+"G",G=S((r=1)=>h+r+"A","cursorUp"),g=process.platform==="win32"?`${w}${h}0f`:`${w}${h}3J${h}H`,H=h+"?25l",V=h+"?25h",Y=S(r=>{let t="";for(let e=0;e<r;e++)t+=B+(e<r-1?G():"");return r&&(t+=k),t},"eraseLines");var C=Object.defineProperty,J=n((r,t)=>C(r,"name",{value:t,configurable:!0}),"s$1");class v{static{n(this,"t")}static{J(this,"InteractiveStreamHook")}static DRAIN=!0;#t=new M;#e=[];#r;#s;constructor(t){this.#r=t.write,this.#s=t}active(){this.write(H),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(),v.DRAIN}}erase(t){t>0&&this.write(Y(t+1))}inactive(t=!1){this.#e.length>0&&(t&&this.write(`
4
+ `),this.#e.forEach(e=>{this.write(e)}),this.#e=[]),this.renew()}renew(){this.#s.write=this.#r,this.write(V)}write(t){this.#r.apply(this.#s,[t])}}var U=Object.defineProperty,z=n((r,t)=>U(r,"name",{value:t,configurable:!0}),"c");let K=class{static{n(this,"v")}static{z(this,"RawReporter")}#t;#e;#r;#s=!1;#i;constructor(t={}){this.#t=m,this.#e=y,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(`
5
+ `),0):P(u+i.join(""),l)}};var W=Object.defineProperty,q=n((r,t)=>W(r,"name",{value:t,configurable:!0}),"a$1");class F extends O{static{n(this,"v")}constructor(t){const{interactive:e,rawReporter:s,reporters:a,stderr:p,stdout:i,...c}=t;super(c),this.options=t,this.interactive=e??!1,this.stdout=i,this.stderr=p,this.interactive&&(this.interactiveManager=new T(new v(this.stdout),new v(this.stderr))),Array.isArray(a)&&this.registerReporters(a),this.rawReporter=this.extendReporter(t.rawReporter??new K)}static{q(this,"PailServerImpl")}stdout;stderr;interactiveManager;interactive;scope(...t){if(t.length===0)throw new Error("No scope name was defined.");return this.scopeName=t.flat(),this}getInteractiveManager(){return this.interactiveManager}wrapStd(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}restoreStd(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}clear(){this.stdout.write(g),this.stderr.write(g)}extendReporter(t){return typeof t.setStdout=="function"&&t.setStdout(this.stdout),typeof t.setStderr=="function"&&t.setStderr(this.stderr),typeof t.setLoggerTypes=="function"&&t.setLoggerTypes(this.types),typeof t.setStringify=="function"&&t.setStringify(this.stringify),typeof t.setIsInteractive=="function"&&t.setIsInteractive(this.interactive),this.interactive&&typeof t.setInteractiveManager=="function"&&t.setInteractiveManager(this.interactiveManager),t}_wrapStream(t,e){t&&(t.__write||(t.__write=t.write),t.write=s=>{this[e].log(String(s).trim())})}_restoreStream(t){t&&t.__write&&(t.write=t.__write,delete t.__write)}}const Q=F;var X=Object.defineProperty,_=n((r,t)=>X(r,"name",{value:t,configurable:!0}),"o");const Z=_(()=>d.NODE_ENV==="debug"||d.DEBUG!==void 0?"debug":d.NODE_ENV==="test"?"warning":"informational","_getDefaultLogLevel"),tt=_(r=>{let t=Z();return d.PAIL_LOG_LEVEL!==void 0&&(t=d.PAIL_LOG_LEVEL),new Q({logLevel:t,processors:[new A],reporters:[new j],stderr:y,stdout:m,...r})},"createPail"),ut=tt();export{tt as createPail,ut as pail};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/pail.B85Cx0UJ.cjs"),r=require("./shared/pail.zsOZqsvh.cjs");exports.MessageFormatterProcessor=e.g;exports.RedactProcessor=r.n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/pail.rUW_oLpx.cjs"),r=require("./shared/pail.zsOZqsvh.cjs");exports.MessageFormatterProcessor=e.L;exports.RedactProcessor=r.n;
@@ -1 +1 @@
1
- import{g as e}from"./shared/pail.nEbRCLhY.mjs";import{n as a}from"./shared/pail._czpAR0Z.mjs";export{e as MessageFormatterProcessor,a as RedactProcessor};
1
+ import{L as e}from"./shared/pail.Bj_SDK4w.mjs";import{n as a}from"./shared/pail._czpAR0Z.mjs";export{e as MessageFormatterProcessor,a as RedactProcessor};
@@ -1 +1 @@
1
- "use strict";var l=Object.defineProperty;var t=(o,e)=>l(o,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./shared/pail.C0epjAht.cjs"),i=require("./shared/pail.B85Cx0UJ.cjs"),m=require("./shared/pail.zsOZqsvh.cjs");var u=Object.defineProperty,N=t((o,e)=>u(o,"name",{value:e,configurable:!0}),"u");const b=N(()=>{const o=Error.prepareStackTrace;try{let e=[];Error.prepareStackTrace=(s,r)=>{const c=r.slice(1);return e=c,c},new Error().stack;const a=e.reduce((s,r)=>(r.isNative()||r.getFileName()?.includes("pail/dist")||s.push({columnNumber:r.getColumnNumber(),fileName:r.getFileName(),lineNumber:r.getLineNumber()}),s),[])[0];return a?{columnNumber:a.columnNumber??void 0,fileName:a.fileName,lineNumber:a.lineNumber??void 0}:{fileName:"anonymous",lineNumber:void 0}}finally{Error.prepareStackTrace=o}},"getCallerFilename");var d=Object.defineProperty,f=t((o,e)=>d(o,"name",{value:e,configurable:!0}),"r");class g{static{t(this,"a")}static{f(this,"CallerProcessor")}process(e){const{columnNumber:a,fileName:s,lineNumber:r}=b();return e.file={column:a,line:r,name:s},e}}const p=g;exports.ErrorProcessor=n.L;exports.MessageFormatterProcessor=i.g;exports.RedactProcessor=m.n;exports.CallerProcessor=p;
1
+ "use strict";var n=Object.defineProperty;var l=(a,e)=>n(a,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./shared/pail.rUW_oLpx.cjs"),i=require("./shared/pail.zsOZqsvh.cjs");var m=Object.defineProperty,u=l((a,e)=>m(a,"name",{value:e,configurable:!0}),"u");const N=u(()=>{const a=Error.prepareStackTrace;try{let e=[];Error.prepareStackTrace=(t,r)=>{const c=r.slice(1);return e=c,c},new Error().stack;const o=e.reduce((t,r)=>(r.isNative()||r.getFileName()?.includes("pail/dist")||t.push({columnNumber:r.getColumnNumber(),fileName:r.getFileName(),lineNumber:r.getLineNumber()}),t),[])[0];return o?{columnNumber:o.columnNumber??void 0,fileName:o.fileName,lineNumber:o.lineNumber??void 0}:{fileName:"anonymous",lineNumber:void 0}}finally{Error.prepareStackTrace=a}},"getCallerFilename");var b=Object.defineProperty,d=l((a,e)=>b(a,"name",{value:e,configurable:!0}),"r");class f{static{l(this,"a")}static{d(this,"CallerProcessor")}process(e){const{columnNumber:o,fileName:t,lineNumber:r}=N();return e.file={column:o,line:r,name:t},e}}const p=f;exports.MessageFormatterProcessor=s.L;exports.RedactProcessor=i.n;exports.CallerProcessor=p;
@@ -19,30 +19,4 @@ declare class CallerProcessor<L extends string = string> implements Processor<L>
19
19
  process(meta: Meta<L>): Meta<L>;
20
20
  }
21
21
 
22
- type SerializedError<ErrorType = Error> = Record<PropertyKey, unknown> & {
23
- aggregateErrors?: SerializedError<ErrorType>[];
24
- cause?: unknown;
25
- code?: string;
26
- message: string;
27
- name: string;
28
- raw?: ErrorType;
29
- stack?: string;
30
- };
31
-
32
- declare global {
33
- namespace VisulimaPail {
34
- interface CustomMeta<L> {
35
- error: SerializedError | undefined;
36
- }
37
- }
38
- }
39
- declare class ErrorProcessor<L extends string = string> implements Processor<L> {
40
- private readonly _options;
41
- constructor(options?: {
42
- maxDepth?: number;
43
- useToJSON?: boolean;
44
- });
45
- process(meta: Meta<L>): Meta<L>;
46
- }
47
-
48
- export { CallerProcessor, ErrorProcessor };
22
+ export { CallerProcessor };
@@ -19,30 +19,4 @@ declare class CallerProcessor<L extends string = string> implements Processor<L>
19
19
  process(meta: Meta<L>): Meta<L>;
20
20
  }
21
21
 
22
- type SerializedError<ErrorType = Error> = Record<PropertyKey, unknown> & {
23
- aggregateErrors?: SerializedError<ErrorType>[];
24
- cause?: unknown;
25
- code?: string;
26
- message: string;
27
- name: string;
28
- raw?: ErrorType;
29
- stack?: string;
30
- };
31
-
32
- declare global {
33
- namespace VisulimaPail {
34
- interface CustomMeta<L> {
35
- error: SerializedError | undefined;
36
- }
37
- }
38
- }
39
- declare class ErrorProcessor<L extends string = string> implements Processor<L> {
40
- private readonly _options;
41
- constructor(options?: {
42
- maxDepth?: number;
43
- useToJSON?: boolean;
44
- });
45
- process(meta: Meta<L>): Meta<L>;
46
- }
47
-
48
- export { CallerProcessor, ErrorProcessor };
22
+ export { CallerProcessor };
@@ -19,30 +19,4 @@ declare class CallerProcessor<L extends string = string> implements Processor<L>
19
19
  process(meta: Meta<L>): Meta<L>;
20
20
  }
21
21
 
22
- type SerializedError<ErrorType = Error> = Record<PropertyKey, unknown> & {
23
- aggregateErrors?: SerializedError<ErrorType>[];
24
- cause?: unknown;
25
- code?: string;
26
- message: string;
27
- name: string;
28
- raw?: ErrorType;
29
- stack?: string;
30
- };
31
-
32
- declare global {
33
- namespace VisulimaPail {
34
- interface CustomMeta<L> {
35
- error: SerializedError | undefined;
36
- }
37
- }
38
- }
39
- declare class ErrorProcessor<L extends string = string> implements Processor<L> {
40
- private readonly _options;
41
- constructor(options?: {
42
- maxDepth?: number;
43
- useToJSON?: boolean;
44
- });
45
- process(meta: Meta<L>): Meta<L>;
46
- }
47
-
48
- export { CallerProcessor, ErrorProcessor };
22
+ export { CallerProcessor };
@@ -1 +1 @@
1
- var s=Object.defineProperty;var t=(a,e)=>s(a,"name",{value:e,configurable:!0});import{L as g}from"./shared/pail.CNxJnpWG.mjs";import{g as y}from"./shared/pail.nEbRCLhY.mjs";import{n as k}from"./shared/pail._czpAR0Z.mjs";var m=Object.defineProperty,c=t((a,e)=>m(a,"name",{value:e,configurable:!0}),"u");const i=c(()=>{const a=Error.prepareStackTrace;try{let e=[];Error.prepareStackTrace=(l,r)=>{const n=r.slice(1);return e=n,n},new Error().stack;const o=e.reduce((l,r)=>(r.isNative()||r.getFileName()?.includes("pail/dist")||l.push({columnNumber:r.getColumnNumber(),fileName:r.getFileName(),lineNumber:r.getLineNumber()}),l),[])[0];return o?{columnNumber:o.columnNumber??void 0,fileName:o.fileName,lineNumber:o.lineNumber??void 0}:{fileName:"anonymous",lineNumber:void 0}}finally{Error.prepareStackTrace=a}},"getCallerFilename");var u=Object.defineProperty,N=t((a,e)=>u(a,"name",{value:e,configurable:!0}),"r");class b{static{t(this,"a")}static{N(this,"CallerProcessor")}process(e){const{columnNumber:o,fileName:l,lineNumber:r}=i();return e.file={column:o,line:r,name:l},e}}const f=b;export{f as CallerProcessor,g as ErrorProcessor,y as MessageFormatterProcessor,k as RedactProcessor};
1
+ var i=Object.defineProperty;var n=(a,e)=>i(a,"name",{value:e,configurable:!0});import{L as g}from"./shared/pail.Bj_SDK4w.mjs";import{n as y}from"./shared/pail._czpAR0Z.mjs";var m=Object.defineProperty,c=n((a,e)=>m(a,"name",{value:e,configurable:!0}),"u");const s=c(()=>{const a=Error.prepareStackTrace;try{let e=[];Error.prepareStackTrace=(o,r)=>{const t=r.slice(1);return e=t,t},new Error().stack;const l=e.reduce((o,r)=>(r.isNative()||r.getFileName()?.includes("pail/dist")||o.push({columnNumber:r.getColumnNumber(),fileName:r.getFileName(),lineNumber:r.getLineNumber()}),o),[])[0];return l?{columnNumber:l.columnNumber??void 0,fileName:l.fileName,lineNumber:l.lineNumber??void 0}:{fileName:"anonymous",lineNumber:void 0}}finally{Error.prepareStackTrace=a}},"getCallerFilename");var u=Object.defineProperty,N=n((a,e)=>u(a,"name",{value:e,configurable:!0}),"r");class b{static{n(this,"a")}static{N(this,"CallerProcessor")}process(e){const{columnNumber:l,fileName:o,lineNumber:r}=s();return e.file={column:l,line:r,name:o},e}}const f=b;export{f as CallerProcessor,g as MessageFormatterProcessor,y as RedactProcessor};
@@ -1,5 +1,5 @@
1
- "use strict";var S=Object.defineProperty;var f=(n,l)=>S(n,"name",{value:l,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("./shared/pail.oMoeTQZX.cjs"),o=require("@visulima/colorize/browser"),i=require("@visulima/fmt"),q=require("./shared/pail.BjvkVeLq.cjs"),v=require("./shared/pail.BtheZKQt.cjs"),Y=require("./shared/pail.3G15muTS.cjs"),C=f(n=>n&&typeof n=="object"&&"default"in n?n.default:n,"_interopDefaultCompat"),O=C(o);var D=Object.defineProperty,k=f((n,l)=>D(n,"name",{value:l,configurable:!0}),"A");class B extends v.AbstractPrettyReporter{static{f(this,"Y")}static{k(this,"PrettyReporter")}constructor(l={}){super({uppercase:{label:!0,...l.uppercase},...l})}log(l){const t=typeof window<"u"&&typeof window.document<"u",_=Y.t(l.type.level),{badge:w,context:x,date:u,error:A,groups:g,label:y,message:P,prefix:d,repeated:h,scope:a,suffix:m,type:T}=l,{color:L}=this._loggerTypes[T.name],R=L?O[L]:o.white,s=[];if(t&&g.length>0){const e=g.map(()=>" ").join(""),r=o.grey("["+g.at(-1)+"]");s.push(i.format(e+r[0],r.slice(1)))}if(u){const e=o.grey(this._styles.dateFormatter(typeof u=="string"?new Date(u):u));t?s.push(i.format(e[0],e.slice(1))):s.push([e[0]+" ",...e.slice(1)])}if(w){const e=R(w);t?s.push(i.format(e[0],e.slice(1))):s.push([e[0]+" ",...e.slice(1)])}else{const e=v.s(this._loggerTypes);if(e.length>0){const r=o.grey(".".repeat(e.length));t?s.push(i.format(r[0]+" ",r.slice(1))):s.push([r[0]+" ",...r.slice(1)])}}const j=q.s(this._loggerTypes);let b;if(h){const e=o.white("["+h+"x]");b=t?i.format(e[0],e.slice(1)):[e[0],...e.slice(1)]}if(y){const e=R(this._formatLabel(y));t?s.push(i.format(e[0],e.slice(1))):s.push([e[0],...e.slice(1)]),b&&s.push(b);let r=j.length-y.length;if(h?r-=String(h).length+3:r+=1,r>0){const c=o.grey(".".repeat(r));t?s.push(i.format(c[0],c.slice(1))):s.push([" "+c[0],...c.slice(1)])}}else{const e=o.grey(".".repeat(j.length+1));t?s.push(i.format(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(Array.isArray(a)&&a.length>0){const e=o.grey("["+a.join(" > ")+"]");t?s.push(i.format(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(d){const e=o.grey((Array.isArray(a)&&a.length>0?". ":" ")+"["+(this._styles.underline.prefix?o.underline(d):d)+"] ");t?s.push(i.format(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(P!==q.EMPTY_SYMBOL&&s.push(P),x&&s.push(...x),A&&s.push(A,`
1
+ "use strict";var S=Object.defineProperty;var f=(n,l)=>S(n,"name",{value:l,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("./shared/pail.B78_c-y4.cjs"),o=require("@visulima/colorize/browser"),i=require("@visulima/fmt"),q=require("./shared/pail.BjvkVeLq.cjs"),v=require("./shared/pail.BtheZKQt.cjs"),Y=require("./shared/pail.3G15muTS.cjs"),C=f(n=>n&&typeof n=="object"&&"default"in n?n.default:n,"_interopDefaultCompat"),O=C(o);var D=Object.defineProperty,k=f((n,l)=>D(n,"name",{value:l,configurable:!0}),"A");class B extends v.AbstractPrettyReporter{static{f(this,"Y")}static{k(this,"PrettyReporter")}constructor(l={}){super({uppercase:{label:!0,...l.uppercase},...l})}log(l){const t=typeof window<"u"&&typeof window.document<"u",_=Y.t(l.type.level),{badge:w,context:x,date:u,error:A,groups:g,label:y,message:P,prefix:d,repeated:h,scope:a,suffix:m,type:T}=l,{color:L}=this._loggerTypes[T.name],R=L?O[L]:o.white,s=[];if(t&&g.length>0){const e=g.map(()=>" ").join(""),r=o.grey("["+g.at(-1)+"]");s.push(i.format(e+r[0],r.slice(1)))}if(u){const e=o.grey(this._styles.dateFormatter(typeof u=="string"?new Date(u):u));t?s.push(i.format(e[0],e.slice(1))):s.push([e[0]+" ",...e.slice(1)])}if(w){const e=R(w);t?s.push(i.format(e[0],e.slice(1))):s.push([e[0]+" ",...e.slice(1)])}else{const e=v.s(this._loggerTypes);if(e.length>0){const r=o.grey(".".repeat(e.length));t?s.push(i.format(r[0]+" ",r.slice(1))):s.push([r[0]+" ",...r.slice(1)])}}const j=q.s(this._loggerTypes);let b;if(h){const e=o.white("["+h+"x]");b=t?i.format(e[0],e.slice(1)):[e[0],...e.slice(1)]}if(y){const e=R(this._formatLabel(y));t?s.push(i.format(e[0],e.slice(1))):s.push([e[0],...e.slice(1)]),b&&s.push(b);let r=j.length-y.length;if(h?r-=String(h).length+3:r+=1,r>0){const c=o.grey(".".repeat(r));t?s.push(i.format(c[0],c.slice(1))):s.push([" "+c[0],...c.slice(1)])}}else{const e=o.grey(".".repeat(j.length+1));t?s.push(i.format(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(Array.isArray(a)&&a.length>0){const e=o.grey("["+a.join(" > ")+"]");t?s.push(i.format(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(d){const e=o.grey((Array.isArray(a)&&a.length>0?". ":" ")+"["+(this._styles.underline.prefix?o.underline(d):d)+"] ");t?s.push(i.format(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(P!==q.EMPTY_SYMBOL&&s.push(P),x&&s.push(...x),A&&s.push(A,`
2
2
 
3
3
  `),m){const e=o.grey(this._styles.underline.suffix?o.underline(m):m);t?s.push(i.format(`
4
4
  `+e[0],e.slice(1))):s.push([`
5
- `+e[0],...e.slice(1)])}if(t)_(...s);else{let e="";const r=[],c=[];for(const p of s)Array.isArray(p)&&p.length>1&&p[0].includes("%c")?(e+=p[0],r.push(...p.slice(1))):c.push(p);_(e+"%c",...r,"",...c)}}_formatLabel(l){let t=this._styles.uppercase.label?l.toUpperCase():l;return t=this._styles.underline.label?o.underline(t):t,this._styles.bold.label&&(t=o.bold(t)),t}}const E=B;exports.JsonReporter=M.n;exports.PrettyReporter=E;
5
+ `+e[0],...e.slice(1)])}if(t)_(...s);else{let e="";const r=[],c=[];for(const p of s)Array.isArray(p)&&p.length>1&&p[0].includes("%c")?(e+=p[0],r.push(...p.slice(1))):c.push(p);_(e+"%c",...r,"",...c)}}_formatLabel(l){let t=this._styles.uppercase.label?l.toUpperCase():l;return t=this._styles.underline.label?o.underline(t):t,this._styles.bold.label&&(t=o.bold(t)),t}}const E=B;exports.JsonReporter=M.i;exports.PrettyReporter=E;
@@ -14,4 +14,4 @@ declare class PrettyReporter<T extends string = string, L extends string = strin
14
14
  private _formatLabel;
15
15
  }
16
16
 
17
- export { JsonReporter, PrettyReporter };
17
+ export { JsonReporter, PrettyReporter, PrettyStyleOptions };
@@ -14,4 +14,4 @@ declare class PrettyReporter<T extends string = string, L extends string = strin
14
14
  private _formatLabel;
15
15
  }
16
16
 
17
- export { JsonReporter, PrettyReporter };
17
+ export { JsonReporter, PrettyReporter, PrettyStyleOptions };
@@ -14,4 +14,4 @@ declare class PrettyReporter<T extends string = string, L extends string = strin
14
14
  private _formatLabel;
15
15
  }
16
16
 
17
- export { JsonReporter, PrettyReporter };
17
+ export { JsonReporter, PrettyReporter, PrettyStyleOptions };
@@ -1,5 +1,5 @@
1
- var j=Object.defineProperty;var b=(h,r)=>j(h,"name",{value:r,configurable:!0});import{n as V}from"./shared/pail.xIXzgCNy.mjs";import M,{white as Y,grey as o,underline as _,bold as S}from"@visulima/colorize/browser";import{format as i}from"@visulima/fmt";import{s as E,E as O}from"./shared/pail.C1VNf0a-.mjs";import{A as k,s as B}from"./shared/pail.CeGWBihI.mjs";import{t as C}from"./shared/pail.BP95fgQZ.mjs";var D=Object.defineProperty,F=b((h,r)=>D(h,"name",{value:r,configurable:!0}),"A");class J extends k{static{b(this,"Y")}static{F(this,"PrettyReporter")}constructor(r={}){super({uppercase:{label:!0,...r.uppercase},...r})}log(r){const t=typeof window<"u"&&typeof window.document<"u",x=C(r.type.level),{badge:A,context:w,date:a,error:P,groups:f,label:y,message:v,prefix:g,repeated:u,scope:c,suffix:m,type:$}=r,{color:R}=this._loggerTypes[$.name],T=R?M[R]:Y,s=[];if(t&&f.length>0){const e=f.map(()=>" ").join(""),l=o("["+f.at(-1)+"]");s.push(i(e+l[0],l.slice(1)))}if(a){const e=o(this._styles.dateFormatter(typeof a=="string"?new Date(a):a));t?s.push(i(e[0],e.slice(1))):s.push([e[0]+" ",...e.slice(1)])}if(A){const e=T(A);t?s.push(i(e[0],e.slice(1))):s.push([e[0]+" ",...e.slice(1)])}else{const e=B(this._loggerTypes);if(e.length>0){const l=o(".".repeat(e.length));t?s.push(i(l[0]+" ",l.slice(1))):s.push([l[0]+" ",...l.slice(1)])}}const L=E(this._loggerTypes);let d;if(u){const e=Y("["+u+"x]");d=t?i(e[0],e.slice(1)):[e[0],...e.slice(1)]}if(y){const e=T(this._formatLabel(y));t?s.push(i(e[0],e.slice(1))):s.push([e[0],...e.slice(1)]),d&&s.push(d);let l=L.length-y.length;if(u?l-=String(u).length+3:l+=1,l>0){const p=o(".".repeat(l));t?s.push(i(p[0],p.slice(1))):s.push([" "+p[0],...p.slice(1)])}}else{const e=o(".".repeat(L.length+1));t?s.push(i(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(Array.isArray(c)&&c.length>0){const e=o("["+c.join(" > ")+"]");t?s.push(i(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(g){const e=o((Array.isArray(c)&&c.length>0?". ":" ")+"["+(this._styles.underline.prefix?_(g):g)+"] ");t?s.push(i(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(v!==O&&s.push(v),w&&s.push(...w),P&&s.push(P,`
1
+ var j=Object.defineProperty;var b=(h,r)=>j(h,"name",{value:r,configurable:!0});import{i as V}from"./shared/pail.DM_CW0V1.mjs";import M,{white as Y,grey as o,underline as _,bold as S}from"@visulima/colorize/browser";import{format as i}from"@visulima/fmt";import{s as E,E as O}from"./shared/pail.C1VNf0a-.mjs";import{A as k,s as B}from"./shared/pail.CeGWBihI.mjs";import{t as C}from"./shared/pail.BP95fgQZ.mjs";var D=Object.defineProperty,F=b((h,r)=>D(h,"name",{value:r,configurable:!0}),"A");class J extends k{static{b(this,"Y")}static{F(this,"PrettyReporter")}constructor(r={}){super({uppercase:{label:!0,...r.uppercase},...r})}log(r){const t=typeof window<"u"&&typeof window.document<"u",x=C(r.type.level),{badge:A,context:w,date:a,error:P,groups:f,label:y,message:v,prefix:g,repeated:u,scope:n,suffix:m,type:$}=r,{color:R}=this._loggerTypes[$.name],T=R?M[R]:Y,s=[];if(t&&f.length>0){const e=f.map(()=>" ").join(""),l=o("["+f.at(-1)+"]");s.push(i(e+l[0],l.slice(1)))}if(a){const e=o(this._styles.dateFormatter(typeof a=="string"?new Date(a):a));t?s.push(i(e[0],e.slice(1))):s.push([e[0]+" ",...e.slice(1)])}if(A){const e=T(A);t?s.push(i(e[0],e.slice(1))):s.push([e[0]+" ",...e.slice(1)])}else{const e=B(this._loggerTypes);if(e.length>0){const l=o(".".repeat(e.length));t?s.push(i(l[0]+" ",l.slice(1))):s.push([l[0]+" ",...l.slice(1)])}}const L=E(this._loggerTypes);let d;if(u){const e=Y("["+u+"x]");d=t?i(e[0],e.slice(1)):[e[0],...e.slice(1)]}if(y){const e=T(this._formatLabel(y));t?s.push(i(e[0],e.slice(1))):s.push([e[0],...e.slice(1)]),d&&s.push(d);let l=L.length-y.length;if(u?l-=String(u).length+3:l+=1,l>0){const p=o(".".repeat(l));t?s.push(i(p[0],p.slice(1))):s.push([" "+p[0],...p.slice(1)])}}else{const e=o(".".repeat(L.length+1));t?s.push(i(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(Array.isArray(n)&&n.length>0){const e=o("["+n.join(" > ")+"]");t?s.push(i(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(g){const e=o((Array.isArray(n)&&n.length>0?". ":" ")+"["+(this._styles.underline.prefix?_(g):g)+"] ");t?s.push(i(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(v!==O&&s.push(v),w&&s.push(...w),P&&s.push(P,`
2
2
 
3
3
  `),m){const e=o(this._styles.underline.suffix?_(m):m);t?s.push(i(`
4
4
  `+e[0],e.slice(1))):s.push([`
5
- `+e[0],...e.slice(1)])}if(t)x(...s);else{let e="";const l=[],p=[];for(const n of s)Array.isArray(n)&&n.length>1&&n[0].includes("%c")?(e+=n[0],l.push(...n.slice(1))):p.push(n);x(e+"%c",...l,"",...p)}}_formatLabel(r){let t=this._styles.uppercase.label?r.toUpperCase():r;return t=this._styles.underline.label?_(t):t,this._styles.bold.label&&(t=S(t)),t}}const K=J;export{V as JsonReporter,K as PrettyReporter};
5
+ `+e[0],...e.slice(1)])}if(t)x(...s);else{let e="";const l=[],p=[];for(const c of s)Array.isArray(c)&&c.length>1&&c[0].includes("%c")?(e+=c[0],l.push(...c.slice(1))):p.push(c);x(e+"%c",...l,"",...p)}}_formatLabel(r){let t=this._styles.uppercase.label?r.toUpperCase():r;return t=this._styles.underline.label?_(t):t,this._styles.bold.label&&(t=S(t)),t}}const K=J;export{V as JsonReporter,K as PrettyReporter};
@@ -1,11 +1,13 @@
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,`
1
+ "use strict";var I=Object.defineProperty;var o=(t,e)=>I(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("./shared/pail.DHp7NF7R.cjs"),f=require("node:process"),l=require("./shared/pail.akgEzola.cjs"),r=require("@visulima/colorize"),S=require("@visulima/error"),L=require("@visulima/inspector"),k=require("./shared/pail.BjvkVeLq.cjs"),O=require("./shared/pail.BtheZKQt.cjs"),z=o(t=>t&&typeof t=="object"&&"default"in t?t.default:t,"_interopDefaultCompat"),A=z(r);var B=Object.defineProperty,V=o((t,e)=>B(t,"name",{value:e,configurable:!0}),"e");class W{static{o(this,"n")}static{V(this,"SafeStreamHandler")}#e=!0;#t;#r;constructor(e,s){this.#t=e,this.#r=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.#r+'. 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 Y=Object.defineProperty,D=o((t,e)=>Y(t,"name",{value:e,configurable:!0}),"r$2");class G{static{o(this,"o")}static{D(this,"RotatingFileStream")}#e;#t;#r;#i;#s;constructor(e,s=!1,i={}){if(this.#e=e,this.#t=s,this.#i=i,!this.#t){try{this.#s=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.#r=this.#s(this.#e,i)}}write(e){let s=this.#r;this.#t&&(s=this.#s(this.#e,this.#i));const i=new W(s,this.#e);i.write(e),this.#t&&i.end()}end(){this.#r!==void 0&&this.#r.end()}}var H=Object.defineProperty,K=o((t,e)=>H(t,"name",{value:e,configurable:!0}),"r$1");class N extends T.p{static{o(this,"JsonFileReporter")}static{K(this,"JsonFileReporter")}stream;constructor(e){super();const{filePath:s,writeImmediately:i=!1,...a}=e;this.stream=new G(s,i,{compress:"gzip",interval:"1d",size:"10M",...a})}_log(e){this.stream.write(e+`
2
+ `)}}var Q=Object.defineProperty,U=o((t,e)=>Q(t,"name",{value:e,configurable:!0}),"r");class X extends T.p{static{o(this,"a")}static{U(this,"JsonReporter")}#e;#t;constructor(){super(),this.#e=f.stdout,this.#t=f.stderr}setStdout(e){this.#e=e}setStderr(e){this.#t=e}_log(e,s){const i=["error","warn"].includes(s)?this.#t:this.#e;l.n(e+`
3
+ `,i)}}const Z=X;var ee=Object.defineProperty,F=o((t,e)=>ee(t,"name",{value:e,configurable:!0}),"L");const _=F(t=>!/[\\/]pail[\\/]dist/.test(t),"pailFileFilter");class te extends O.AbstractPrettyReporter{static{o(this,"SimpleReporter")}static{F(this,"SimpleReporter")}#e;#t;#r;#i=!1;#s;#n;constructor(e={}){const{error:s,inspect:i,...a}=e;super({uppercase:{label:!0,...a.uppercase},...a}),this.#s={...l.u,indent:void 0,...i},this.#n={...s,color:{fileLine:r.green,hint:r.cyan,marker:r.red,message:r.red,method:r.greenBright,title:r.red}},this.#e=f.stdout,this.#t=f.stderr}setStdout(e){this.#e=e}setStderr(e){this.#t=e}setInteractiveManager(e){this.#r=e}setIsInteractive(e){this.#i=e}log(e){this._log(this._formatMessage(e),e.type.level)}_formatMessage(e){const{columns:s}=l.terminalSize();let i=s;typeof this._styles.messageLength=="number"&&(i=this._styles.messageLength);const{badge:a,context:R,date:u,error:j,file:d,groups:y,label:m,message:g,prefix:b,repeated:x,scope:v,suffix:w,traceError:E,type:C}=e,{color:P}=this._loggerTypes[C.name],M=P?A[P]:r.white,c=y.map(()=>" ").join(""),n=[];if(y.length>0&&n.push(c+r.grey("["+y.at(-1)+"]")+" "),u&&n.push(r.grey(this._styles.dateFormatter(typeof u=="string"?new Date(u):u))+" "),a)n.push(r.bold(M(a)));else{const h=O.s(this._loggerTypes);h.length>0&&n.push(r.grey(" ".repeat(h.length)))}const q=k.s(this._loggerTypes);m?n.push(r.bold(M(l.n$1(m,this._styles)))+" "," ".repeat(q.length-l.stringLength(m))):n.push(" ".repeat(q.length+1)),x&&n.push(r.bgGrey.white("["+x+"x]")+" "),Array.isArray(v)&&v.length>0&&n.push(r.grey("["+v.join(" > ")+"]")+" "),b&&n.push(r.grey("["+(this._styles.underline.prefix?r.underline(b):b)+"]")+" ");const J=l.stringLength(n.join(""));if(g!==k.EMPTY_SYMBOL){const h=typeof g=="string"?g:L.inspect(g,this.#s);n.push(c+l.wrapAnsi(h,i-3,{hard:!0,trim:!1,wordWrap:!0}))}if(R){let h=!1;n.push(...R.map(p=>{if(p instanceof Error)return h=!0,`
4
4
 
5
- `+o.w(p,r,u);if(typeof p=="object")return" "+O.inspect(p,this.#r);const F=(l?`
5
+ `+S.renderError(p,{...this.#n,filterStacktrace:_,prefix:c});if(typeof p=="object")return" "+L.inspect(p,this.#s);const $=(h?`
6
6
 
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
- `)}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):o.n(e+`
11
- `,c)}}const ie=re;exports.PrettyReporter=o.a;exports.AbstractFileReporter=q;exports.JsonFileReporter=U;exports.JsonReporter=ee;exports.SimpleReporter=ie;
7
+ `:" ")+p;return h=!1,$}))}if(j&&n.push(S.renderError(j,{...this.#n,filterStacktrace:_,prefix:c})),E&&n.push(`
8
+
9
+ `+S.renderError(E,{...this.#n,filterStacktrace:_,hideErrorCauseCodeView:!0,hideErrorCodeView:!0,hideErrorErrorsCodeView:!0,hideMessage:!0,prefix:c})),w&&n.push(" "+c+r.grey(this._styles.underline.suffix?r.underline(w):w)),d){const h=d.name+(d.line?":"+d.line:"");n.push(`
10
+ `,r.grey("Caller: ")," ".repeat(J-8),h,`
11
+ `)}return n.join("")}_log(e,s){const i=["error","trace","warn"].includes(s)?"stderr":"stdout",a=i==="stderr"?this.#t:this.#e;this.#i&&this.#r!==void 0&&a.isTTY?this.#r.update(i,e.split(`
12
+ `),0):l.n(e+`
13
+ `,a)}}exports.PrettyReporter=l.PrettyReporter;exports.JsonFileReporter=N;exports.JsonReporter=Z;exports.SimpleReporter=te;
@@ -1,33 +1,27 @@
1
- import { Options as Options$1 } from 'rotating-file-stream';
2
- import { R as Reporter, g as ReadonlyMeta, S as StreamAwareReporter, e as LiteralUnion, E as ExtendedRfc5424LogLevels, i as InteractiveStreamReporter, I as InteractiveManager } from './shared/pail.BGWAKixQ.cjs';
3
- import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.Cmk6qgN4.cjs';
4
- import { Options as Options$2 } from '@visulima/inspector';
5
- import '@visulima/colorize';
1
+ import { Options } from 'rotating-file-stream';
2
+ import { A as AbstractJsonReporter, P as PrettyStyleOptions, a as AbstractPrettyReporter } from './shared/pail.Cmk6qgN4.cjs';
3
+ import { S as StreamAwareReporter, e as LiteralUnion, E as ExtendedRfc5424LogLevels, i as InteractiveStreamReporter, I as InteractiveManager, g as ReadonlyMeta } from './shared/pail.BGWAKixQ.cjs';
4
+ import { RenderErrorOptions } from '@visulima/error/error';
5
+ import { Options as Options$1 } from '@visulima/inspector';
6
+ import { RenderErrorOptions as RenderErrorOptions$1 } from '@visulima/error';
6
7
  import 'safe-stable-stringify';
8
+ import '@visulima/colorize';
7
9
 
8
10
  declare class RotatingFileStream {
9
11
  #private;
10
- constructor(filePath: string, writeImmediately?: boolean, options?: Options$1);
12
+ constructor(filePath: string, writeImmediately?: boolean, options?: Options);
11
13
  write(message: string): void;
12
14
  end(): void;
13
15
  }
14
16
 
15
- type Options = Options$1 & {
17
+ type FileReporterOptions = Options & {
16
18
  filePath: string;
17
19
  writeImmediately?: boolean;
18
20
  };
19
- declare abstract class AbstractFileReporter<L extends string = string> implements Reporter<L> {
21
+ declare class JsonFileReporter<L extends string = string> extends AbstractJsonReporter<L> {
20
22
  protected stream: RotatingFileStream;
21
- protected constructor(options: Options);
22
- log(meta: ReadonlyMeta<L>): void;
23
- protected abstract _formatMessage(data: ReadonlyMeta<L>): string;
24
- }
25
-
26
- declare class JsonFileReporter<L extends string = string> extends AbstractFileReporter<L> {
27
- #private;
28
- constructor(options: Options);
29
- setStringify(function_: any): void;
30
- protected _formatMessage(meta: ReadonlyMeta<L>): string;
23
+ constructor(options: FileReporterOptions);
24
+ protected _log(message: string): void;
31
25
  }
32
26
 
33
27
  declare class JsonReporter<L extends string = string> extends AbstractJsonReporter<L> implements StreamAwareReporter<L> {
@@ -38,12 +32,13 @@ declare class JsonReporter<L extends string = string> extends AbstractJsonReport
38
32
  protected _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
39
33
  }
40
34
 
41
- type PrettyReporterOptions$1 = PrettyStyleOptions & {
42
- inspect: Options$2;
35
+ type PrettyReporterOptions = PrettyStyleOptions & {
36
+ error: Omit<RenderErrorOptions, "color | prefix | indentation">;
37
+ inspect: Options$1;
43
38
  };
44
39
  declare class PrettyReporter<T extends string = string, L extends string = string> extends AbstractPrettyReporter<T, L> implements InteractiveStreamReporter<L> {
45
40
  #private;
46
- constructor(options?: Partial<PrettyReporterOptions$1>);
41
+ constructor(options?: Partial<PrettyReporterOptions>);
47
42
  setStdout(stdout_: NodeJS.WriteStream): void;
48
43
  setStderr(stderr_: NodeJS.WriteStream): void;
49
44
  setInteractiveManager(manager?: InteractiveManager): void;
@@ -53,12 +48,13 @@ declare class PrettyReporter<T extends string = string, L extends string = strin
53
48
  protected _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
54
49
  }
55
50
 
56
- type PrettyReporterOptions = PrettyStyleOptions & {
57
- inspect: Options$2;
51
+ type SimpleReporterOptions = PrettyStyleOptions & {
52
+ error: Omit<RenderErrorOptions$1, "color | prefix | indentation">;
53
+ inspect: Options$1;
58
54
  };
59
55
  declare class SimpleReporter<T extends string = string, L extends string = string> extends AbstractPrettyReporter<T, L> implements InteractiveStreamReporter<L> {
60
56
  #private;
61
- constructor(options?: Partial<PrettyReporterOptions>);
57
+ constructor(options?: Partial<SimpleReporterOptions>);
62
58
  setStdout(stdout_: NodeJS.WriteStream): void;
63
59
  setStderr(stderr_: NodeJS.WriteStream): void;
64
60
  setInteractiveManager(manager?: InteractiveManager): void;
@@ -68,4 +64,4 @@ declare class SimpleReporter<T extends string = string, L extends string = strin
68
64
  protected _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
69
65
  }
70
66
 
71
- export { AbstractFileReporter, type Options as AbstractFileReporterOptions, JsonFileReporter, JsonReporter, PrettyReporter, SimpleReporter };
67
+ export { type FileReporterOptions, JsonFileReporter, JsonReporter, PrettyReporter, type PrettyReporterOptions, SimpleReporter, type SimpleReporterOptions };
@@ -1,33 +1,27 @@
1
- import { Options as Options$1 } from 'rotating-file-stream';
2
- import { R as Reporter, g as ReadonlyMeta, S as StreamAwareReporter, e as LiteralUnion, E as ExtendedRfc5424LogLevels, i as InteractiveStreamReporter, I as InteractiveManager } from './shared/pail.BGWAKixQ.mjs';
3
- import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.BD_y_CiZ.mjs';
4
- import { Options as Options$2 } from '@visulima/inspector';
5
- import '@visulima/colorize';
1
+ import { Options } from 'rotating-file-stream';
2
+ import { A as AbstractJsonReporter, P as PrettyStyleOptions, a as AbstractPrettyReporter } from './shared/pail.BD_y_CiZ.mjs';
3
+ import { S as StreamAwareReporter, e as LiteralUnion, E as ExtendedRfc5424LogLevels, i as InteractiveStreamReporter, I as InteractiveManager, g as ReadonlyMeta } from './shared/pail.BGWAKixQ.mjs';
4
+ import { RenderErrorOptions } from '@visulima/error/error';
5
+ import { Options as Options$1 } from '@visulima/inspector';
6
+ import { RenderErrorOptions as RenderErrorOptions$1 } from '@visulima/error';
6
7
  import 'safe-stable-stringify';
8
+ import '@visulima/colorize';
7
9
 
8
10
  declare class RotatingFileStream {
9
11
  #private;
10
- constructor(filePath: string, writeImmediately?: boolean, options?: Options$1);
12
+ constructor(filePath: string, writeImmediately?: boolean, options?: Options);
11
13
  write(message: string): void;
12
14
  end(): void;
13
15
  }
14
16
 
15
- type Options = Options$1 & {
17
+ type FileReporterOptions = Options & {
16
18
  filePath: string;
17
19
  writeImmediately?: boolean;
18
20
  };
19
- declare abstract class AbstractFileReporter<L extends string = string> implements Reporter<L> {
21
+ declare class JsonFileReporter<L extends string = string> extends AbstractJsonReporter<L> {
20
22
  protected stream: RotatingFileStream;
21
- protected constructor(options: Options);
22
- log(meta: ReadonlyMeta<L>): void;
23
- protected abstract _formatMessage(data: ReadonlyMeta<L>): string;
24
- }
25
-
26
- declare class JsonFileReporter<L extends string = string> extends AbstractFileReporter<L> {
27
- #private;
28
- constructor(options: Options);
29
- setStringify(function_: any): void;
30
- protected _formatMessage(meta: ReadonlyMeta<L>): string;
23
+ constructor(options: FileReporterOptions);
24
+ protected _log(message: string): void;
31
25
  }
32
26
 
33
27
  declare class JsonReporter<L extends string = string> extends AbstractJsonReporter<L> implements StreamAwareReporter<L> {
@@ -38,12 +32,13 @@ declare class JsonReporter<L extends string = string> extends AbstractJsonReport
38
32
  protected _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
39
33
  }
40
34
 
41
- type PrettyReporterOptions$1 = PrettyStyleOptions & {
42
- inspect: Options$2;
35
+ type PrettyReporterOptions = PrettyStyleOptions & {
36
+ error: Omit<RenderErrorOptions, "color | prefix | indentation">;
37
+ inspect: Options$1;
43
38
  };
44
39
  declare class PrettyReporter<T extends string = string, L extends string = string> extends AbstractPrettyReporter<T, L> implements InteractiveStreamReporter<L> {
45
40
  #private;
46
- constructor(options?: Partial<PrettyReporterOptions$1>);
41
+ constructor(options?: Partial<PrettyReporterOptions>);
47
42
  setStdout(stdout_: NodeJS.WriteStream): void;
48
43
  setStderr(stderr_: NodeJS.WriteStream): void;
49
44
  setInteractiveManager(manager?: InteractiveManager): void;
@@ -53,12 +48,13 @@ declare class PrettyReporter<T extends string = string, L extends string = strin
53
48
  protected _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
54
49
  }
55
50
 
56
- type PrettyReporterOptions = PrettyStyleOptions & {
57
- inspect: Options$2;
51
+ type SimpleReporterOptions = PrettyStyleOptions & {
52
+ error: Omit<RenderErrorOptions$1, "color | prefix | indentation">;
53
+ inspect: Options$1;
58
54
  };
59
55
  declare class SimpleReporter<T extends string = string, L extends string = string> extends AbstractPrettyReporter<T, L> implements InteractiveStreamReporter<L> {
60
56
  #private;
61
- constructor(options?: Partial<PrettyReporterOptions>);
57
+ constructor(options?: Partial<SimpleReporterOptions>);
62
58
  setStdout(stdout_: NodeJS.WriteStream): void;
63
59
  setStderr(stderr_: NodeJS.WriteStream): void;
64
60
  setInteractiveManager(manager?: InteractiveManager): void;
@@ -68,4 +64,4 @@ declare class SimpleReporter<T extends string = string, L extends string = strin
68
64
  protected _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
69
65
  }
70
66
 
71
- export { AbstractFileReporter, type Options as AbstractFileReporterOptions, JsonFileReporter, JsonReporter, PrettyReporter, SimpleReporter };
67
+ export { type FileReporterOptions, JsonFileReporter, JsonReporter, PrettyReporter, type PrettyReporterOptions, SimpleReporter, type SimpleReporterOptions };