@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.
- package/CHANGELOG.md +31 -0
- package/dist/index.browser.cjs +1 -1
- package/dist/index.browser.mjs +1 -1
- package/dist/index.server.cjs +4 -4
- package/dist/index.server.mjs +4 -4
- package/dist/processor.browser.cjs +1 -1
- package/dist/processor.browser.mjs +1 -1
- package/dist/processor.server.cjs +1 -1
- package/dist/processor.server.d.cts +1 -27
- package/dist/processor.server.d.mts +1 -27
- package/dist/processor.server.d.ts +1 -27
- package/dist/processor.server.mjs +1 -1
- package/dist/reporter.browser.cjs +2 -2
- package/dist/reporter.browser.d.cts +1 -1
- package/dist/reporter.browser.d.mts +1 -1
- package/dist/reporter.browser.d.ts +1 -1
- package/dist/reporter.browser.mjs +2 -2
- package/dist/reporter.server.cjs +11 -9
- package/dist/reporter.server.d.cts +21 -25
- package/dist/reporter.server.d.mts +21 -25
- package/dist/reporter.server.d.ts +21 -25
- package/dist/reporter.server.mjs +12 -10
- package/dist/shared/pail.B78_c-y4.cjs +1 -0
- package/dist/shared/pail.BPOgzkG1.mjs +20 -0
- package/dist/shared/pail.Bbo15e5K.mjs +1 -0
- package/dist/shared/{pail.nEbRCLhY.mjs → pail.Bj_SDK4w.mjs} +1 -1
- package/dist/shared/pail.DHp7NF7R.cjs +1 -0
- package/dist/shared/pail.DM_CW0V1.mjs +1 -0
- package/dist/shared/pail.akgEzola.cjs +20 -0
- package/dist/shared/{pail.B85Cx0UJ.cjs → pail.rUW_oLpx.cjs} +1 -1
- package/package.json +6 -5
- package/dist/shared/pail.B0G23Kwv.mjs +0 -21
- package/dist/shared/pail.C0epjAht.cjs +0 -1
- package/dist/shared/pail.CNxJnpWG.mjs +0 -1
- package/dist/shared/pail.D0U9y4qH.cjs +0 -1
- package/dist/shared/pail.Dfpn3AvW.cjs +0 -21
- package/dist/shared/pail.oMoeTQZX.cjs +0 -1
- package/dist/shared/pail.uFyi02gk.mjs +0 -1
- 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
|
package/dist/index.browser.cjs
CHANGED
|
@@ -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
|
|
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;
|
package/dist/index.browser.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
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};
|
package/dist/index.server.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var
|
|
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
|
|
4
|
-
`),this.#e.forEach(e=>{this.write(e)}),this.#e=[]),this.renew()}renew(){this.#s.write=this.#r,this.write(
|
|
5
|
-
`),0):v.n(d+i.join(""),l)}};var
|
|
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;
|
package/dist/index.server.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
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
|
|
4
|
-
`),this.#e.forEach(e=>{this.write(e)}),this.#e=[]),this.renew()}renew(){this.#s.write=this.#r,this.write(
|
|
5
|
-
`),0):
|
|
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.
|
|
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{
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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.
|
|
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.
|
|
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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var j=Object.defineProperty;var b=(h,r)=>j(h,"name",{value:r,configurable:!0});import{
|
|
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
|
|
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};
|
package/dist/reporter.server.cjs
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
`)}}var
|
|
3
|
-
`,
|
|
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
|
-
`+
|
|
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
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import '@visulima/
|
|
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
|
|
12
|
+
constructor(filePath: string, writeImmediately?: boolean, options?: Options);
|
|
11
13
|
write(message: string): void;
|
|
12
14
|
end(): void;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
|
-
type
|
|
17
|
+
type FileReporterOptions = Options & {
|
|
16
18
|
filePath: string;
|
|
17
19
|
writeImmediately?: boolean;
|
|
18
20
|
};
|
|
19
|
-
declare
|
|
21
|
+
declare class JsonFileReporter<L extends string = string> extends AbstractJsonReporter<L> {
|
|
20
22
|
protected stream: RotatingFileStream;
|
|
21
|
-
|
|
22
|
-
|
|
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
|
|
42
|
-
|
|
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
|
|
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
|
|
57
|
-
|
|
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<
|
|
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 {
|
|
67
|
+
export { type FileReporterOptions, JsonFileReporter, JsonReporter, PrettyReporter, type PrettyReporterOptions, SimpleReporter, type SimpleReporterOptions };
|
|
@@ -1,33 +1,27 @@
|
|
|
1
|
-
import { Options
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import '@visulima/
|
|
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
|
|
12
|
+
constructor(filePath: string, writeImmediately?: boolean, options?: Options);
|
|
11
13
|
write(message: string): void;
|
|
12
14
|
end(): void;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
|
-
type
|
|
17
|
+
type FileReporterOptions = Options & {
|
|
16
18
|
filePath: string;
|
|
17
19
|
writeImmediately?: boolean;
|
|
18
20
|
};
|
|
19
|
-
declare
|
|
21
|
+
declare class JsonFileReporter<L extends string = string> extends AbstractJsonReporter<L> {
|
|
20
22
|
protected stream: RotatingFileStream;
|
|
21
|
-
|
|
22
|
-
|
|
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
|
|
42
|
-
|
|
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
|
|
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
|
|
57
|
-
|
|
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<
|
|
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 {
|
|
67
|
+
export { type FileReporterOptions, JsonFileReporter, JsonReporter, PrettyReporter, type PrettyReporterOptions, SimpleReporter, type SimpleReporterOptions };
|