@visulima/pail 1.3.1 → 1.4.1

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 (47) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/index.browser.cjs +1 -1
  3. package/dist/index.browser.d.cts +3 -3
  4. package/dist/index.browser.d.mts +3 -3
  5. package/dist/index.browser.d.ts +3 -3
  6. package/dist/index.browser.mjs +1 -1
  7. package/dist/index.server.cjs +4 -4
  8. package/dist/index.server.d.cts +4 -4
  9. package/dist/index.server.d.mts +4 -4
  10. package/dist/index.server.d.ts +4 -4
  11. package/dist/index.server.mjs +4 -4
  12. package/dist/processor.browser.d.cts +1 -1
  13. package/dist/processor.browser.d.mts +1 -1
  14. package/dist/processor.browser.d.ts +1 -1
  15. package/dist/processor.server.d.cts +1 -1
  16. package/dist/processor.server.d.mts +1 -1
  17. package/dist/processor.server.d.ts +1 -1
  18. package/dist/reporter.browser.cjs +1 -1
  19. package/dist/reporter.browser.d.cts +2 -2
  20. package/dist/reporter.browser.d.mts +2 -2
  21. package/dist/reporter.browser.d.ts +2 -2
  22. package/dist/reporter.browser.mjs +1 -1
  23. package/dist/reporter.server.cjs +9 -9
  24. package/dist/reporter.server.d.cts +11 -4
  25. package/dist/reporter.server.d.mts +11 -4
  26. package/dist/reporter.server.d.ts +11 -4
  27. package/dist/reporter.server.mjs +10 -10
  28. package/dist/shared/{pail.Dn8rOK4m.d.ts → pail.AIbb1oDp.d.ts} +2 -4
  29. package/dist/shared/{pail.ULmGeHN5.cjs → pail.B1k-DuKt.cjs} +1 -1
  30. package/dist/shared/{pail.BJCog1dH.d.cts → pail.BD_y_CiZ.d.mts} +2 -4
  31. package/dist/shared/{pail.DFxpsgpn.d.cts → pail.BGWAKixQ.d.cts} +2 -2
  32. package/dist/shared/{pail.DFxpsgpn.d.mts → pail.BGWAKixQ.d.mts} +2 -2
  33. package/dist/shared/{pail.DFxpsgpn.d.ts → pail.BGWAKixQ.d.ts} +2 -2
  34. package/dist/shared/{pail.D2WrlqMf.d.mts → pail.Bn2Vxj-9.d.cts} +1 -1
  35. package/dist/shared/pail.BtheZKQt.cjs +1 -0
  36. package/dist/shared/{pail.Ce96Y7g-.d.cts → pail.CSVyVF2j.d.mts} +1 -1
  37. package/dist/shared/pail.CeGWBihI.mjs +1 -0
  38. package/dist/shared/{pail.CLIvV09S.d.mts → pail.Cmk6qgN4.d.cts} +2 -4
  39. package/dist/shared/{pail.BZABfski.d.ts → pail.D6DRfVG8.d.ts} +1 -1
  40. package/dist/shared/{pail.CknsteA6.mjs → pail.f7bft4o5.mjs} +1 -1
  41. package/dist/shared/pail.hbXo0zpA.mjs +21 -0
  42. package/dist/shared/pail.tB8JSuso.cjs +21 -0
  43. package/package.json +3 -2
  44. package/dist/shared/pail.CO3y9cQW.mjs +0 -21
  45. package/dist/shared/pail.CPcDF5FN.cjs +0 -21
  46. package/dist/shared/pail.CsP1h8ZA.mjs +0 -1
  47. package/dist/shared/pail.DwLTdhaq.cjs +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## @visulima/pail [1.4.1](https://github.com/visulima/visulima/compare/@visulima/pail@1.4.0...@visulima/pail@1.4.1) (2024-06-14)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **pail:** fixed missing warning on timeEnd, added more tests, fixed wrong default of pail server and browser ([a67254d](https://github.com/visulima/visulima/commit/a67254d3fce460b49b41c1183bd8b1cfd4a11a1c))
6
+
7
+ ## @visulima/pail [1.4.0](https://github.com/visulima/visulima/compare/@visulima/pail@1.3.1...@visulima/pail@1.4.0) (2024-06-14)
8
+
9
+ ### Features
10
+
11
+ * **pail:** adding inspector into pretty reporters ([#424](https://github.com/visulima/visulima/issues/424)) ([76b1435](https://github.com/visulima/visulima/commit/76b14350904eb9b2e5c3b92b273204db11a2b6f8))
12
+
1
13
  ## @visulima/pail [1.3.1](https://github.com/visulima/visulima/compare/@visulima/pail@1.3.0...@visulima/pail@1.3.1) (2024-06-14)
2
14
 
3
15
  ### 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.ULmGeHN5.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 a=require("./shared/pail.B1k-DuKt.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,6 +1,6 @@
1
- import { P as PailBrowserType } from './shared/pail.Ce96Y7g-.cjs';
2
- import { C as ConstructorOptions } from './shared/pail.DFxpsgpn.cjs';
3
- export { a as DefaultLogTypes, D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, b as LoggerFunction, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, R as Reporter, S as StreamAwareReporter } from './shared/pail.DFxpsgpn.cjs';
1
+ import { P as PailBrowserType } from './shared/pail.Bn2Vxj-9.cjs';
2
+ import { C as ConstructorOptions } from './shared/pail.BGWAKixQ.cjs';
3
+ export { a as DefaultLogTypes, D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, b as LoggerFunction, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, R as Reporter, S as StreamAwareReporter } from './shared/pail.BGWAKixQ.cjs';
4
4
  import 'safe-stable-stringify';
5
5
  import '@visulima/colorize';
6
6
 
@@ -1,6 +1,6 @@
1
- import { P as PailBrowserType } from './shared/pail.D2WrlqMf.mjs';
2
- import { C as ConstructorOptions } from './shared/pail.DFxpsgpn.mjs';
3
- export { a as DefaultLogTypes, D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, b as LoggerFunction, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, R as Reporter, S as StreamAwareReporter } from './shared/pail.DFxpsgpn.mjs';
1
+ import { P as PailBrowserType } from './shared/pail.CSVyVF2j.mjs';
2
+ import { C as ConstructorOptions } from './shared/pail.BGWAKixQ.mjs';
3
+ export { a as DefaultLogTypes, D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, b as LoggerFunction, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, R as Reporter, S as StreamAwareReporter } from './shared/pail.BGWAKixQ.mjs';
4
4
  import 'safe-stable-stringify';
5
5
  import '@visulima/colorize';
6
6
 
@@ -1,6 +1,6 @@
1
- import { P as PailBrowserType } from './shared/pail.BZABfski.js';
2
- import { C as ConstructorOptions } from './shared/pail.DFxpsgpn.js';
3
- export { a as DefaultLogTypes, D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, b as LoggerFunction, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, R as Reporter, S as StreamAwareReporter } from './shared/pail.DFxpsgpn.js';
1
+ import { P as PailBrowserType } from './shared/pail.D6DRfVG8.js';
2
+ import { C as ConstructorOptions } from './shared/pail.BGWAKixQ.js';
3
+ export { a as DefaultLogTypes, D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, b as LoggerFunction, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, R as Reporter, S as StreamAwareReporter } from './shared/pail.BGWAKixQ.js';
4
4
  import 'safe-stable-stringify';
5
5
  import '@visulima/colorize';
6
6
 
@@ -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.CknsteA6.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 t=Object.defineProperty;var o=(r,e)=>t(r,"name",{value:e,configurable:!0});import{P as a}from"./shared/pail.f7bft4o5.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,5 +1,5 @@
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.CPcDF5FN.cjs"),I=require("node:string_decoder"),P=require("./shared/pail.ULmGeHN5.cjs"),j=require("./shared/pail.BjvkVeLq.cjs"),M=require("./shared/pail.C0epjAht.cjs"),O=require("./shared/pail.B85Cx0UJ.cjs");var $=Object.defineProperty,A=n((r,t)=>$(r,"name",{value:t,configurable:!0}),"l$1");let R=class{static{n(this,"v")}static{A(this,"InteractiveManager")}#t;#e=!1;#s=!1;#r=0;#i=0;constructor(t,e){this.#t={stderr:e,stdout:t}}get lastLength(){return this.#r}get outside(){return this.#i}get isHooked(){return this.#e}get isSuspended(){return this.#s}erase(t,e=this.#r){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.#s&&(this.#s=!1,e&&this.erase(t,e),this.#r=0,Object.values(this.#t).forEach(s=>s.active()))}suspend(t,e=!0){this.#s||(this.#s=!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(`
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.B1k-DuKt.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
- `),this.#r=d?d+o.length+1:o.length,this.#i=Math.max(this.lastLength-i,this.outside)}}_clear(t=!1){this.#e=t,this.#r=0,this.#i=0}};var T=Object.defineProperty,m=n((r,t)=>T(r,"name",{value:t,configurable:!0}),"n$1");const c="\x1B[",g=c+"2J",x=c+"2K",N=c+"G",q=m((r=1)=>c+r+"A","cursorUp"),f=process.platform==="win32"?`${g}${c}0f`:`${g}${c}3J${c}H`,D=c+"?25l",B=c+"?25h",k=m(r=>{let t="";for(let e=0;e<r;e++)t+=x+(e<r-1?q():"");return r&&(t+=N),t},"eraseLines");var G=Object.defineProperty,H=n((r,t)=>G(r,"name",{value:t,configurable:!0}),"s$1");let w=class S{static{n(this,"t")}static{H(this,"InteractiveStreamHook")}static DRAIN=!0;#t=new I.StringDecoder;#e=[];#s;#r;constructor(t){this.#s=t.write,this.#r=t}active(){this.write(D),this.#r.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(k(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.#r.write=this.#s,this.write(B)}write(t){this.#s.apply(this.#r,[t])}};var V=Object.defineProperty,Y=n((r,t)=>V(r,"name",{value:t,configurable:!0}),"d");let C=class{static{n(this,"S")}static{Y(this,"RawReporter")}#t;#e;#s;#r;#i=!1;constructor(){this.#e=h.stdout,this.#s=h.stderr}setStdout(t){this.#e=t}setStderr(t){this.#s=t}setStringify(t){this.#t=t}setInteractiveManager(t){this.#r=t}setIsInteractive(t){this.#i=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:this.#t(a);i.push(o+"")}e&&i.push(...e.map(o=>typeof o=="object"?" "+this.#t(o):" "+o));const u=["error","trace","warn"].includes(p.level)?"stderr":"stdout",l=u==="stderr"?this.#s:this.#e,d=s.map(()=>" ").join("");this.#i&&this.#r!==void 0&&l.isTTY?this.#r.update(u,(d+i.join("")).split(`
5
- `),0):v.n(d+i.join(""),l)}};var J=Object.defineProperty,U=n((r,t)=>J(r,"name",{value:t,configurable:!0}),"a");class z 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 w(this.stdout),new w(this.stderr))),Array.isArray(a)&&this.registerReporters(a),this.rawReporter=this.extendReporter(t.rawReporter??new C)}static{U(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 F=z;var K=Object.defineProperty,y=n((r,t)=>K(r,"name",{value:t,configurable:!0}),"t");const W=y(()=>h.env.NODE_ENV==="debug"||h.env.DEBUG!==void 0?"debug":h.env.NODE_ENV==="test"?"warning":"informational","_getDefaultLogLevel"),_=y(r=>{let t=W();return h.env.PAIL_LOG_LEVEL!==void 0&&(t=h.env.PAIL_LOG_LEVEL),new F({logLevel:t,processors:[new O.g,new M.L],reporters:[new v.a],stderr:h.stderr,stdout:h.stdout,...r})},"createPail"),Q=_();exports.createPail=_;exports.pail=Q;
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;
@@ -1,6 +1,6 @@
1
- import { a as DefaultLogTypes, b as LoggerFunction, f as ServerConstructorOptions, I as InteractiveManager, R as Reporter, C as ConstructorOptions } from './shared/pail.DFxpsgpn.cjs';
2
- export { D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, S as StreamAwareReporter } from './shared/pail.DFxpsgpn.cjs';
3
- import { a as PailBrowserImpl } from './shared/pail.Ce96Y7g-.cjs';
1
+ import { a as DefaultLogTypes, b as LoggerFunction, f as ServerConstructorOptions, I as InteractiveManager, R as Reporter, C as ConstructorOptions } from './shared/pail.BGWAKixQ.cjs';
2
+ export { D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, S as StreamAwareReporter } from './shared/pail.BGWAKixQ.cjs';
3
+ import { a as PailBrowserImpl } from './shared/pail.Bn2Vxj-9.cjs';
4
4
  import '@visulima/colorize';
5
5
  import 'safe-stable-stringify';
6
6
 
@@ -10,7 +10,7 @@ declare class PailServerImpl<T extends string = string, L extends string = strin
10
10
  protected readonly stderr: NodeJS.WriteStream;
11
11
  protected interactiveManager: InteractiveManager | undefined;
12
12
  protected readonly interactive: boolean;
13
- constructor(options?: ServerConstructorOptions<T, L>);
13
+ constructor(options: ServerConstructorOptions<T, L>);
14
14
  scope<N extends string = T>(...name: string[]): PailServerType<N, L>;
15
15
  getInteractiveManager(): InteractiveManager | undefined;
16
16
  wrapStd(): void;
@@ -1,6 +1,6 @@
1
- import { a as DefaultLogTypes, b as LoggerFunction, f as ServerConstructorOptions, I as InteractiveManager, R as Reporter, C as ConstructorOptions } from './shared/pail.DFxpsgpn.mjs';
2
- export { D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, S as StreamAwareReporter } from './shared/pail.DFxpsgpn.mjs';
3
- import { a as PailBrowserImpl } from './shared/pail.D2WrlqMf.mjs';
1
+ import { a as DefaultLogTypes, b as LoggerFunction, f as ServerConstructorOptions, I as InteractiveManager, R as Reporter, C as ConstructorOptions } from './shared/pail.BGWAKixQ.mjs';
2
+ export { D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, S as StreamAwareReporter } from './shared/pail.BGWAKixQ.mjs';
3
+ import { a as PailBrowserImpl } from './shared/pail.CSVyVF2j.mjs';
4
4
  import '@visulima/colorize';
5
5
  import 'safe-stable-stringify';
6
6
 
@@ -10,7 +10,7 @@ declare class PailServerImpl<T extends string = string, L extends string = strin
10
10
  protected readonly stderr: NodeJS.WriteStream;
11
11
  protected interactiveManager: InteractiveManager | undefined;
12
12
  protected readonly interactive: boolean;
13
- constructor(options?: ServerConstructorOptions<T, L>);
13
+ constructor(options: ServerConstructorOptions<T, L>);
14
14
  scope<N extends string = T>(...name: string[]): PailServerType<N, L>;
15
15
  getInteractiveManager(): InteractiveManager | undefined;
16
16
  wrapStd(): void;
@@ -1,6 +1,6 @@
1
- import { a as DefaultLogTypes, b as LoggerFunction, f as ServerConstructorOptions, I as InteractiveManager, R as Reporter, C as ConstructorOptions } from './shared/pail.DFxpsgpn.js';
2
- export { D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, S as StreamAwareReporter } from './shared/pail.DFxpsgpn.js';
3
- import { a as PailBrowserImpl } from './shared/pail.BZABfski.js';
1
+ import { a as DefaultLogTypes, b as LoggerFunction, f as ServerConstructorOptions, I as InteractiveManager, R as Reporter, C as ConstructorOptions } from './shared/pail.BGWAKixQ.js';
2
+ export { D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, S as StreamAwareReporter } from './shared/pail.BGWAKixQ.js';
3
+ import { a as PailBrowserImpl } from './shared/pail.D6DRfVG8.js';
4
4
  import '@visulima/colorize';
5
5
  import 'safe-stable-stringify';
6
6
 
@@ -10,7 +10,7 @@ declare class PailServerImpl<T extends string = string, L extends string = strin
10
10
  protected readonly stderr: NodeJS.WriteStream;
11
11
  protected interactiveManager: InteractiveManager | undefined;
12
12
  protected readonly interactive: boolean;
13
- constructor(options?: ServerConstructorOptions<T, L>);
13
+ constructor(options: ServerConstructorOptions<T, L>);
14
14
  scope<N extends string = T>(...name: string[]): PailServerType<N, L>;
15
15
  getInteractiveManager(): InteractiveManager | undefined;
16
16
  wrapStd(): void;
@@ -1,5 +1,5 @@
1
- var E=Object.defineProperty;var n=(r,t)=>E(r,"name",{value:t,configurable:!0});import{stdout as g,stderr as m,env as d}from"node:process";import{t as I,w as $,n as j,a as M}from"./shared/pail.CO3y9cQW.mjs";import{StringDecoder as O}from"node:string_decoder";import{a as P}from"./shared/pail.CknsteA6.mjs";import{E as A}from"./shared/pail.C1VNf0a-.mjs";import{L as R}from"./shared/pail.CNxJnpWG.mjs";import{g as x}from"./shared/pail.nEbRCLhY.mjs";var N=Object.defineProperty,T=n((r,t)=>N(r,"name",{value:t,configurable:!0}),"l$1");let D=class{static{n(this,"v")}static{T(this,"InteractiveManager")}#t;#e=!1;#s=!1;#r=0;#i=0;constructor(t,e){this.#t={stderr:e,stdout:t}}get lastLength(){return this.#r}get outside(){return this.#i}get isHooked(){return this.#e}get isSuspended(){return this.#s}erase(t,e=this.#r){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.#s&&(this.#s=!1,e&&this.erase(t,e),this.#r=0,Object.values(this.#t).forEach(s=>s.active()))}suspend(t,e=!0){this.#s||(this.#s=!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(`
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.f7bft4o5.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
- `),this.#r=u?u+o.length+1:o.length,this.#i=Math.max(this.lastLength-i,this.outside)}}_clear(t=!1){this.#e=t,this.#r=0,this.#i=0}};var B=Object.defineProperty,S=n((r,t)=>B(r,"name",{value:t,configurable:!0}),"n$1");const h="\x1B[",f=h+"2J",k=h+"2K",G=h+"G",H=S((r=1)=>h+r+"A","cursorUp"),v=process.platform==="win32"?`${f}${h}0f`:`${f}${h}3J${h}H`,V=h+"?25l",Y=h+"?25h",C=S(r=>{let t="";for(let e=0;e<r;e++)t+=k+(e<r-1?H():"");return r&&(t+=G),t},"eraseLines");var J=Object.defineProperty,U=n((r,t)=>J(r,"name",{value:t,configurable:!0}),"s$1");let w=class y{static{n(this,"t")}static{U(this,"InteractiveStreamHook")}static DRAIN=!0;#t=new O;#e=[];#s;#r;constructor(t){this.#s=t.write,this.#r=t}active(){this.write(V),this.#r.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(),y.DRAIN}}erase(t){t>0&&this.write(C(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.#r.write=this.#s,this.write(Y)}write(t){this.#s.apply(this.#r,[t])}};var z=Object.defineProperty,K=n((r,t)=>z(r,"name",{value:t,configurable:!0}),"d");let W=class{static{n(this,"S")}static{K(this,"RawReporter")}#t;#e;#s;#r;#i=!1;constructor(){this.#e=g,this.#s=m}setStdout(t){this.#e=t}setStderr(t){this.#s=t}setStringify(t){this.#t=t}setInteractiveManager(t){this.#r=t}setIsInteractive(t){this.#i=t}log(t){const{context:e,groups:s,message:a,type:p}=t,i=[];if(a!==A){const o=typeof a=="string"?a:this.#t(a);i.push(o+"")}e&&i.push(...e.map(o=>typeof o=="object"?" "+this.#t(o):" "+o));const c=["error","trace","warn"].includes(p.level)?"stderr":"stdout",l=c==="stderr"?this.#s:this.#e,u=s.map(()=>" ").join("");this.#i&&this.#r!==void 0&&l.isTTY?this.#r.update(c,(u+i.join("")).split(`
5
- `),0):j(u+i.join(""),l)}};var q=Object.defineProperty,F=n((r,t)=>q(r,"name",{value:t,configurable:!0}),"a");class Q extends P{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 D(new w(this.stdout),new w(this.stderr))),Array.isArray(a)&&this.registerReporters(a),this.rawReporter=this.extendReporter(t.rawReporter??new W)}static{F(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(v),this.stderr.write(v)}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 X=Q;var Z=Object.defineProperty,_=n((r,t)=>Z(r,"name",{value:t,configurable:!0}),"t");const tt=_(()=>d.NODE_ENV==="debug"||d.DEBUG!==void 0?"debug":d.NODE_ENV==="test"?"warning":"informational","_getDefaultLogLevel"),et=_(r=>{let t=tt();return d.PAIL_LOG_LEVEL!==void 0&&(t=d.PAIL_LOG_LEVEL),new X({logLevel:t,processors:[new x,new R],reporters:[new M],stderr:m,stdout:g,...r})},"createPail"),pt=et();export{et as createPail,pt 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 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};
@@ -1,5 +1,5 @@
1
1
  import { FormatterFunction } from '@visulima/fmt';
2
- import { j as StringifyAwareProcessor, M as Meta, P as Processor } from './shared/pail.DFxpsgpn.cjs';
2
+ import { j as StringifyAwareProcessor, M as Meta, P as Processor } from './shared/pail.BGWAKixQ.cjs';
3
3
  import { Rules, RedactOptions } from '@visulima/redact';
4
4
  import '@visulima/colorize';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { FormatterFunction } from '@visulima/fmt';
2
- import { j as StringifyAwareProcessor, M as Meta, P as Processor } from './shared/pail.DFxpsgpn.mjs';
2
+ import { j as StringifyAwareProcessor, M as Meta, P as Processor } from './shared/pail.BGWAKixQ.mjs';
3
3
  import { Rules, RedactOptions } from '@visulima/redact';
4
4
  import '@visulima/colorize';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { FormatterFunction } from '@visulima/fmt';
2
- import { j as StringifyAwareProcessor, M as Meta, P as Processor } from './shared/pail.DFxpsgpn.js';
2
+ import { j as StringifyAwareProcessor, M as Meta, P as Processor } from './shared/pail.BGWAKixQ.js';
3
3
  import { Rules, RedactOptions } from '@visulima/redact';
4
4
  import '@visulima/colorize';
5
5
 
@@ -1,4 +1,4 @@
1
- import { P as Processor, M as Meta } from './shared/pail.DFxpsgpn.cjs';
1
+ import { P as Processor, M as Meta } from './shared/pail.BGWAKixQ.cjs';
2
2
  export { MessageFormatterProcessor, RedactProcessor } from './processor.browser.cjs';
3
3
  import '@visulima/colorize';
4
4
  import '@visulima/fmt';
@@ -1,4 +1,4 @@
1
- import { P as Processor, M as Meta } from './shared/pail.DFxpsgpn.mjs';
1
+ import { P as Processor, M as Meta } from './shared/pail.BGWAKixQ.mjs';
2
2
  export { MessageFormatterProcessor, RedactProcessor } from './processor.browser.mjs';
3
3
  import '@visulima/colorize';
4
4
  import '@visulima/fmt';
@@ -1,4 +1,4 @@
1
- import { P as Processor, M as Meta } from './shared/pail.DFxpsgpn.js';
1
+ import { P as Processor, M as Meta } from './shared/pail.BGWAKixQ.js';
2
2
  export { MessageFormatterProcessor, RedactProcessor } from './processor.browser.js';
3
3
  import '@visulima/colorize';
4
4
  import '@visulima/fmt';
@@ -1,4 +1,4 @@
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.DwLTdhaq.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.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,`
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([`
@@ -1,5 +1,5 @@
1
- import { e as LiteralUnion, E as ExtendedRfc5424LogLevels, g as ReadonlyMeta } from './shared/pail.DFxpsgpn.cjs';
2
- import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.BJCog1dH.cjs';
1
+ import { e as LiteralUnion, E as ExtendedRfc5424LogLevels, g as ReadonlyMeta } from './shared/pail.BGWAKixQ.cjs';
2
+ import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.Cmk6qgN4.cjs';
3
3
  import '@visulima/colorize';
4
4
  import 'safe-stable-stringify';
5
5
 
@@ -1,5 +1,5 @@
1
- import { e as LiteralUnion, E as ExtendedRfc5424LogLevels, g as ReadonlyMeta } from './shared/pail.DFxpsgpn.mjs';
2
- import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.CLIvV09S.mjs';
1
+ import { e as LiteralUnion, E as ExtendedRfc5424LogLevels, g as ReadonlyMeta } from './shared/pail.BGWAKixQ.mjs';
2
+ import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.BD_y_CiZ.mjs';
3
3
  import '@visulima/colorize';
4
4
  import 'safe-stable-stringify';
5
5
 
@@ -1,5 +1,5 @@
1
- import { e as LiteralUnion, E as ExtendedRfc5424LogLevels, g as ReadonlyMeta } from './shared/pail.DFxpsgpn.js';
2
- import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.Dn8rOK4m.js';
1
+ import { e as LiteralUnion, E as ExtendedRfc5424LogLevels, g as ReadonlyMeta } from './shared/pail.BGWAKixQ.js';
2
+ import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.AIbb1oDp.js';
3
3
  import '@visulima/colorize';
4
4
  import 'safe-stable-stringify';
5
5
 
@@ -1,4 +1,4 @@
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.CsP1h8ZA.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{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,`
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([`
@@ -1,11 +1,11 @@
1
- "use strict";var F=Object.defineProperty;var n=(t,e)=>F(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.CPcDF5FN.cjs"),J=require("./shared/pail.D0U9y4qH.cjs"),a=require("@visulima/colorize"),T=require("./shared/pail.DwLTdhaq.cjs"),E=n(t=>t&&typeof t=="object"&&"default"in t?t.default:t,"_interopDefaultCompat"),Y=E(a);var z=Object.defineProperty,I=n((t,e)=>z(t,"name",{value:e,configurable:!0}),"e");class k{static{n(this,"n")}static{I(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 W=Object.defineProperty,B=n((t,e)=>W(t,"name",{value:e,configurable:!0}),"r$3");class C{static{n(this,"o")}static{B(this,"RotatingFileStream")}#e;#t;#s;#r;#i;constructor(e,s=!1,r={}){if(this.#e=e,this.#t=s,this.#r=r,!this.#t){try{this.#i=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.#i(this.#e,r)}}write(e){let s=this.#s;this.#t&&(s=this.#i(this.#e,this.#r));const r=new k(s,this.#e);r.write(e),this.#t&&r.end()}end(){this.#s!==void 0&&this.#s.end()}}var D=Object.defineProperty,G=n((t,e)=>D(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 C(s,r,c)}log(e){this.stream.write(this._formatMessage(e)+`
2
- `)}}var H=Object.defineProperty,K=n((t,e)=>H(t,"name",{value:e,configurable:!0}),"r$1");class N extends q{static{n(this,"f")}static{K(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 Q=N;var U=Object.defineProperty,V=n((t,e)=>U(t,"name",{value:e,configurable:!0}),"r");class X extends J.f{static{n(this,"a")}static{V(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 Z=X;var ee=Object.defineProperty,te=n((t,e)=>ee(t,"name",{value:e,configurable:!0}),"R");class se extends T.AbstractPrettyReporter{static{n(this,"q")}static{te(this,"SimpleReporter")}#e;#t;#s;#r=!1;constructor(e={}){super({uppercase:{label:!0,...e.uppercase},...e}),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.#r=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:O}=e,{color:M}=this._loggerTypes[O.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 L=o.stringLength(i.join(""));if(f!==S.EMPTY_SYMBOL){const l=typeof f=="string"?f:this._stringify(f);i.push(u+o.wrapAnsi(l??"undefined",r-3,{hard:!0,trim:!0,wordWrap:!0}))}if(h){let l=!1;i.push(...h.map(p=>{if(p 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"),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,`
4
4
 
5
- `+o.w(p,r,u);if(typeof p=="object")return" "+this._stringify(p);const A=(l?`
5
+ `+a.w(u,r,p);if(typeof u=="object")return" "+O.inspect(u,this.#r);const F=(l?`
6
6
 
7
- `:" ")+p;return l=!1,A}))}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(L-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.#r&&this.#s!==void 0&&c.isTTY?this.#s.update(r,e.split(`
10
- `),0):o.n(e+`
11
- `,c)}}const re=se;exports.PrettyReporter=o.a;exports.AbstractFileReporter=q;exports.JsonFileReporter=Q;exports.JsonReporter=Z;exports.SimpleReporter=re;
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,`
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;
@@ -1,6 +1,7 @@
1
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.DFxpsgpn.cjs';
3
- import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.BJCog1dH.cjs';
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';
4
5
  import '@visulima/colorize';
5
6
  import 'safe-stable-stringify';
6
7
 
@@ -37,9 +38,12 @@ declare class JsonReporter<L extends string = string> extends AbstractJsonReport
37
38
  protected _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
38
39
  }
39
40
 
41
+ type PrettyReporterOptions$1 = PrettyStyleOptions & {
42
+ inspect: Options$2;
43
+ };
40
44
  declare class PrettyReporter<T extends string = string, L extends string = string> extends AbstractPrettyReporter<T, L> implements InteractiveStreamReporter<L> {
41
45
  #private;
42
- constructor(options?: Partial<PrettyStyleOptions>);
46
+ constructor(options?: Partial<PrettyReporterOptions$1>);
43
47
  setStdout(stdout_: NodeJS.WriteStream): void;
44
48
  setStderr(stderr_: NodeJS.WriteStream): void;
45
49
  setInteractiveManager(manager?: InteractiveManager): void;
@@ -49,9 +53,12 @@ declare class PrettyReporter<T extends string = string, L extends string = strin
49
53
  protected _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
50
54
  }
51
55
 
56
+ type PrettyReporterOptions = PrettyStyleOptions & {
57
+ inspect: Options$2;
58
+ };
52
59
  declare class SimpleReporter<T extends string = string, L extends string = string> extends AbstractPrettyReporter<T, L> implements InteractiveStreamReporter<L> {
53
60
  #private;
54
- constructor(options?: Partial<PrettyStyleOptions>);
61
+ constructor(options?: Partial<PrettyReporterOptions>);
55
62
  setStdout(stdout_: NodeJS.WriteStream): void;
56
63
  setStderr(stderr_: NodeJS.WriteStream): void;
57
64
  setInteractiveManager(manager?: InteractiveManager): void;
@@ -1,6 +1,7 @@
1
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.DFxpsgpn.mjs';
3
- import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.CLIvV09S.mjs';
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';
4
5
  import '@visulima/colorize';
5
6
  import 'safe-stable-stringify';
6
7
 
@@ -37,9 +38,12 @@ declare class JsonReporter<L extends string = string> extends AbstractJsonReport
37
38
  protected _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
38
39
  }
39
40
 
41
+ type PrettyReporterOptions$1 = PrettyStyleOptions & {
42
+ inspect: Options$2;
43
+ };
40
44
  declare class PrettyReporter<T extends string = string, L extends string = string> extends AbstractPrettyReporter<T, L> implements InteractiveStreamReporter<L> {
41
45
  #private;
42
- constructor(options?: Partial<PrettyStyleOptions>);
46
+ constructor(options?: Partial<PrettyReporterOptions$1>);
43
47
  setStdout(stdout_: NodeJS.WriteStream): void;
44
48
  setStderr(stderr_: NodeJS.WriteStream): void;
45
49
  setInteractiveManager(manager?: InteractiveManager): void;
@@ -49,9 +53,12 @@ declare class PrettyReporter<T extends string = string, L extends string = strin
49
53
  protected _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
50
54
  }
51
55
 
56
+ type PrettyReporterOptions = PrettyStyleOptions & {
57
+ inspect: Options$2;
58
+ };
52
59
  declare class SimpleReporter<T extends string = string, L extends string = string> extends AbstractPrettyReporter<T, L> implements InteractiveStreamReporter<L> {
53
60
  #private;
54
- constructor(options?: Partial<PrettyStyleOptions>);
61
+ constructor(options?: Partial<PrettyReporterOptions>);
55
62
  setStdout(stdout_: NodeJS.WriteStream): void;
56
63
  setStderr(stderr_: NodeJS.WriteStream): void;
57
64
  setInteractiveManager(manager?: InteractiveManager): void;
@@ -1,6 +1,7 @@
1
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.DFxpsgpn.js';
3
- import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.Dn8rOK4m.js';
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.js';
3
+ import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.AIbb1oDp.js';
4
+ import { Options as Options$2 } from '@visulima/inspector';
4
5
  import '@visulima/colorize';
5
6
  import 'safe-stable-stringify';
6
7
 
@@ -37,9 +38,12 @@ declare class JsonReporter<L extends string = string> extends AbstractJsonReport
37
38
  protected _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
38
39
  }
39
40
 
41
+ type PrettyReporterOptions$1 = PrettyStyleOptions & {
42
+ inspect: Options$2;
43
+ };
40
44
  declare class PrettyReporter<T extends string = string, L extends string = string> extends AbstractPrettyReporter<T, L> implements InteractiveStreamReporter<L> {
41
45
  #private;
42
- constructor(options?: Partial<PrettyStyleOptions>);
46
+ constructor(options?: Partial<PrettyReporterOptions$1>);
43
47
  setStdout(stdout_: NodeJS.WriteStream): void;
44
48
  setStderr(stderr_: NodeJS.WriteStream): void;
45
49
  setInteractiveManager(manager?: InteractiveManager): void;
@@ -49,9 +53,12 @@ declare class PrettyReporter<T extends string = string, L extends string = strin
49
53
  protected _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
50
54
  }
51
55
 
56
+ type PrettyReporterOptions = PrettyStyleOptions & {
57
+ inspect: Options$2;
58
+ };
52
59
  declare class SimpleReporter<T extends string = string, L extends string = string> extends AbstractPrettyReporter<T, L> implements InteractiveStreamReporter<L> {
53
60
  #private;
54
- constructor(options?: Partial<PrettyStyleOptions>);
61
+ constructor(options?: Partial<PrettyReporterOptions>);
55
62
  setStdout(stdout_: NodeJS.WriteStream): void;
56
63
  setStderr(stderr_: NodeJS.WriteStream): void;
57
64
  setInteractiveManager(manager?: InteractiveManager): void;
@@ -1,4 +1,4 @@
1
- var L=Object.defineProperty;var a=(r,t)=>L(r,"name",{value:t,configurable:!0});import{E as A,s as k}from"./shared/pail.C1VNf0a-.mjs";import{stdout as O,stderr as F}from"node:process";import{n as E,t as q,b as W,s as P,w as Y,c as w}from"./shared/pail.CO3y9cQW.mjs";import{a as Rt}from"./shared/pail.CO3y9cQW.mjs";import{f as B}from"./shared/pail.uFyi02gk.mjs";import C,{white as D,grey as l,bold as M,bgGrey as G,underline as T}from"@visulima/colorize";import{A as H,s as K}from"./shared/pail.CsP1h8ZA.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.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";
2
2
  // -- pack CommonJS Shims --
3
3
  import __cjs_url__ from "node:url";
4
4
  import __cjs_path__ from "node:path";
@@ -6,14 +6,14 @@ import __cjs_mod__ from "node:module";
6
6
  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
- var N=Object.defineProperty,Q=a((r,t)=>N(r,"name",{value:t,configurable:!0}),"e");class U{static{a(this,"n")}static{Q(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 V=Object.defineProperty,X=a((r,t)=>V(r,"name",{value:t,configurable:!0}),"r$3");class Z{static{a(this,"o")}static{X(this,"RotatingFileStream")}#t;#e;#s;#r;#i;constructor(t,e=!1,s={}){if(this.#t=t,this.#e=e,this.#r=s,!this.#e){try{this.#i=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.#i(this.#t,s)}}write(t){let e=this.#s;this.#e&&(e=this.#i(this.#t,this.#r));const s=new U(e,this.#t);s.write(t),this.#e&&s.end()}end(){this.#s!==void 0&&this.#s.end()}}var tt=Object.defineProperty,et=a((r,t)=>tt(r,"name",{value:t,configurable:!0}),"r$2");class st{static{a(this,"AbstractFileReporter")}static{et(this,"AbstractFileReporter")}stream;constructor(t){const{filePath:e,writeImmediately:s=!1,...h}=t;this.stream=new Z(e,s,h)}log(t){this.stream.write(this._formatMessage(t)+`
10
- `)}}var rt=Object.defineProperty,it=a((r,t)=>rt(r,"name",{value:t,configurable:!0}),"r$1");class at extends st{static{a(this,"f")}static{it(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,...n}=t;return n.label&&(n.label=n.label.trim()),e&&(n.file=e.name+":"+e.line+(e.column?":"+e.column:"")),s===A?n.message=void 0:n.message=s,this.#t(n)}}const vt=at;var nt=Object.defineProperty,ot=a((r,t)=>nt(r,"name",{value:t,configurable:!0}),"r");class ht extends B{static{a(this,"a")}static{ot(this,"JsonReporter")}#t;#e;constructor(){super(),this.#t=O,this.#e=F}setStdout(t){this.#t=t}setStderr(t){this.#e=t}_log(t,e){const s=["error","warn"].includes(e)?this.#e:this.#t;E(t+`
11
- `,s)}}const wt=ht;var lt=Object.defineProperty,ct=a((r,t)=>lt(r,"name",{value:t,configurable:!0}),"R");class pt extends H{static{a(this,"q")}static{ct(this,"SimpleReporter")}#t;#e;#s;#r=!1;constructor(t={}){super({uppercase:{label:!0,...t.uppercase},...t}),this.#t=O,this.#e=F}setStdout(t){this.#t=t}setStderr(t){this.#e=t}setInteractiveManager(t){this.#s=t}setIsInteractive(t){this.#r=t}log(t){this._log(this._formatMessage(t),t.type.level)}_formatMessage(t){const{columns:e}=q();let s=e;typeof this._styles.messageLength=="number"&&(s=this._styles.messageLength);const{badge:h,context:n,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?C[R]:D,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 o=K(this._loggerTypes);o.length>0&&i.push(l(" ".repeat(o.length)))}const x=k(this._loggerTypes);d?i.push(M(j(W(d,this._styles)))+" "," ".repeat(x.length-P(d))):i.push(" ".repeat(x.length+1)),S&&i.push(G.white("["+S+"x]")+" "),Array.isArray(b)&&b.length>0&&i.push(l("["+b.join(" > ")+"]")+" "),y&&i.push(l("["+(this._styles.underline.prefix?T(y):y)+"]")+" ");const z=P(i.join(""));if(f!==A){const o=typeof f=="string"?f:this._stringify(f);i.push(c+Y(o??"undefined",s-3,{hard:!0,trim:!0,wordWrap:!0}))}if(n){let o=!1;i.push(...n.map(p=>{if(p instanceof Error)return o=!0,`
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,`
12
12
 
13
- `+w(p,s,c);if(typeof p=="object")return" "+this._stringify(p);const I=(o?`
13
+ `+w(c,s,p);if(typeof c=="object")return" "+O(c,this.#r);const L=(n?`
14
14
 
15
- `:" ")+p;return o=!1,I}))}if(_&&i.push(w(_,s,c)),$&&i.push(w($,s,c,!0)),v&&i.push(" "+c+l(this._styles.underline.suffix?T(v):v)),m){const o=m.name+(m.line?":"+m.line:"");i.push(`
16
- `,l("Caller: ")," ".repeat(z-8),o,`
17
- `)}return i.join("")}_log(t,e){const s=["error","trace","warn"].includes(e)?"stderr":"stdout",h=s==="stderr"?this.#e:this.#t;this.#r&&this.#s!==void 0&&h.isTTY?this.#s.update(s,t.split(`
18
- `),0):E(t+`
19
- `,h)}}const _t=pt;export{st as AbstractFileReporter,vt as JsonFileReporter,wt as JsonReporter,Rt as PrettyReporter,_t as SimpleReporter};
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(`
16
+ `,l("Caller: ")," ".repeat(z-8),n,`
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
+ `),0):I(t+`
19
+ `,h)}}const Rt=mt;export{it as AbstractFileReporter,St as JsonFileReporter,$t as JsonReporter,Pt as PrettyReporter,Rt as SimpleReporter};
@@ -1,5 +1,5 @@
1
1
  import { stringify } from 'safe-stable-stringify';
2
- import { h as StringifyAwareReporter, g as ReadonlyMeta, e as LiteralUnion, E as ExtendedRfc5424LogLevels, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, a as DefaultLogTypes } from './pail.DFxpsgpn.js';
2
+ import { h as StringifyAwareReporter, g as ReadonlyMeta, e as LiteralUnion, E as ExtendedRfc5424LogLevels, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, a as DefaultLogTypes } from './pail.BGWAKixQ.js';
3
3
 
4
4
  declare abstract class AbstractJsonReporter<L extends string = string> implements StringifyAwareReporter<L> {
5
5
  protected stringify: typeof stringify | undefined;
@@ -8,12 +8,10 @@ declare abstract class AbstractJsonReporter<L extends string = string> implement
8
8
  protected abstract _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
9
9
  }
10
10
 
11
- declare abstract class AbstractPrettyReporter<T extends string = string, L extends string = string> implements LoggerTypesAwareReporter<T, L>, StringifyAwareReporter<L> {
11
+ declare abstract class AbstractPrettyReporter<T extends string = string, L extends string = string> implements LoggerTypesAwareReporter<T, L> {
12
12
  protected readonly _styles: PrettyStyleOptions;
13
13
  protected _loggerTypes: LoggerTypesConfig<LiteralUnion<DefaultLogTypes, T>, L>;
14
- protected _stringify: typeof stringify | undefined;
15
14
  protected constructor(options: Partial<PrettyStyleOptions>);
16
- setStringify(function_: any): void;
17
15
  setLoggerTypes(types: LoggerTypesConfig<LiteralUnion<DefaultLogTypes, T>, L>): void;
18
16
  abstract log(meta: ReadonlyMeta<L>): void;
19
17
  }