@visulima/pail 2.1.5 → 2.1.7
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 +38 -0
- package/dist/index.browser.cjs +1 -1
- package/dist/index.browser.mjs +1 -1
- package/dist/index.server.cjs +2 -2
- 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.mjs +1 -1
- package/dist/reporter.browser.cjs +1 -1
- package/dist/reporter.browser.mjs +1 -1
- package/dist/reporter.server.cjs +1 -1
- package/dist/reporter.server.mjs +1 -1
- package/dist/shared/CallerProcessor-BSnSafz5.cjs +1 -0
- package/dist/shared/{CallerProcessor-J88C1dmW.mjs → CallerProcessor-BkGBDPIm.mjs} +1 -1
- package/dist/shared/{JsonFileReporter-DtB8t5gN.mjs → JsonFileReporter-lr0s7r9B.mjs} +1 -1
- package/dist/shared/JsonReporter-Be-Pmt7o.cjs +1 -0
- package/dist/shared/{JsonReporter-lK2QQvDy.mjs → JsonReporter-DInAbLuf.mjs} +1 -1
- package/dist/shared/{JsonReporter-Bk9Kz_71.mjs → JsonReporter-J50eZjl2.mjs} +2 -2
- package/dist/shared/JsonReporter-i0KfkPd7.cjs +2 -0
- package/dist/shared/MessageFormatterProcessor-CCRIUIdT.cjs +1 -0
- package/dist/shared/MessageFormatterProcessor-D_XajTuK.mjs +1 -0
- package/dist/shared/PrettyReporter-C9CiOb6F.cjs +5 -0
- package/dist/shared/{PrettyReporter-BqWOG8Uu.mjs → PrettyReporter-CO2PT96t.mjs} +2 -2
- package/dist/shared/{PrettyReporter-ZJDqqbAw.mjs → PrettyReporter-oX3tQP4v.mjs} +2 -2
- package/dist/shared/RedactProcessor-BVZtatWJ.cjs +1 -0
- package/dist/shared/{RedactProcessor-0DHFdHI9.mjs → RedactProcessor-CxKTN42V.mjs} +1 -1
- package/dist/shared/{SimpleReporter-BLkHsEAo.mjs → SimpleReporter-BFw_4kJi.mjs} +5 -5
- package/package.json +27 -10
- package/dist/shared/CallerProcessor-D_s5ROBz.cjs +0 -1
- package/dist/shared/JsonReporter-DnAmJFFq.cjs +0 -1
- package/dist/shared/JsonReporter-LiqNJsVA.cjs +0 -2
- package/dist/shared/MessageFormatterProcessor-B7I6pajc.mjs +0 -1
- package/dist/shared/MessageFormatterProcessor-CkFZxc3_.cjs +0 -1
- package/dist/shared/PrettyReporter-BSjUlCUF.cjs +0 -5
- package/dist/shared/RedactProcessor-D8o1iuQT.cjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,41 @@
|
|
|
1
|
+
## @visulima/pail [2.1.7](https://github.com/visulima/visulima/compare/@visulima/pail@2.1.6...@visulima/pail@2.1.7) (2024-09-07)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* fixed broken chunk splitting from packem ([1aaf277](https://github.com/visulima/visulima/commit/1aaf27779292d637923c5f8a220e18606e78caa2))
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Dependencies
|
|
9
|
+
|
|
10
|
+
* **@visulima/colorize:** upgraded to 1.4.8
|
|
11
|
+
* **@visulima/error:** upgraded to 4.4.3
|
|
12
|
+
* **@visulima/fmt:** upgraded to 1.1.8
|
|
13
|
+
* **@visulima/inspector:** upgraded to 1.0.8
|
|
14
|
+
* **@visulima/redact:** upgraded to 1.0.6
|
|
15
|
+
|
|
16
|
+
## @visulima/pail [2.1.6](https://github.com/visulima/visulima/compare/@visulima/pail@2.1.5...@visulima/pail@2.1.6) (2024-09-07)
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* added types support for node10 ([604583f](https://github.com/visulima/visulima/commit/604583fa3c24b950fafad45d17e7a1333040fd76))
|
|
21
|
+
|
|
22
|
+
### Styles
|
|
23
|
+
|
|
24
|
+
* cs fixes ([f5c4af7](https://github.com/visulima/visulima/commit/f5c4af7cfa9fc79b6d3fa60c1e48d88bffab5a08))
|
|
25
|
+
|
|
26
|
+
### Miscellaneous Chores
|
|
27
|
+
|
|
28
|
+
* update dev dependencies ([0738f98](https://github.com/visulima/visulima/commit/0738f9810478bb215ce4b2571dc8874c4c503089))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Dependencies
|
|
32
|
+
|
|
33
|
+
* **@visulima/colorize:** upgraded to 1.4.7
|
|
34
|
+
* **@visulima/error:** upgraded to 4.4.2
|
|
35
|
+
* **@visulima/fmt:** upgraded to 1.1.7
|
|
36
|
+
* **@visulima/inspector:** upgraded to 1.0.7
|
|
37
|
+
* **@visulima/redact:** upgraded to 1.0.5
|
|
38
|
+
|
|
1
39
|
## @visulima/pail [2.1.5](https://github.com/visulima/visulima/compare/@visulima/pail@2.1.4...@visulima/pail@2.1.5) (2024-08-30)
|
|
2
40
|
|
|
3
41
|
### Bug Fixes
|
package/dist/index.browser.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var o=(e,r)=>a(e,"name",{value:r,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./shared/pail.browser-i0kgt9fE.cjs"),i=require("./shared/MessageFormatterProcessor-
|
|
1
|
+
"use strict";var a=Object.defineProperty;var o=(e,r)=>a(e,"name",{value:r,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./shared/pail.browser-i0kgt9fE.cjs"),i=require("./shared/MessageFormatterProcessor-CCRIUIdT.cjs"),c=require("./shared/JsonReporter-Be-Pmt7o.cjs");var n=Object.defineProperty,l=o((e,r)=>n(e,"name",{value:r,configurable:!0}),"e");const t=l(e=>new s.PailBrowser({processors:[new i],reporters:[new c],...e}),"createPail"),p=t();exports.createPail=t;exports.pail=p;
|
package/dist/index.browser.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var a=Object.defineProperty;var o=(r,e)=>a(r,"name",{value:e,configurable:!0});import{P as
|
|
1
|
+
var a=Object.defineProperty;var o=(r,e)=>a(r,"name",{value:e,configurable:!0});import{P as t}from"./shared/pail.browser-BDLzjsVP.mjs";import p from"./shared/MessageFormatterProcessor-D_XajTuK.mjs";import i from"./shared/JsonReporter-DInAbLuf.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 p],reporters:[new i],...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 P=Object.defineProperty;var n=(r,t)=>P(r,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("node:process"),w=require("./shared/format-label-D6ofFldh.cjs"),E=require("node:string_decoder"),I=require("./shared/pail.browser-i0kgt9fE.cjs"),f=require("@visulima/inspector"),$=require("./shared/constants-BBH2bwRB.cjs"),M=require("./shared/write-stream-Bgxqp0HI.cjs"),j=require("./shared/MessageFormatterProcessor-
|
|
1
|
+
"use strict";var P=Object.defineProperty;var n=(r,t)=>P(r,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("node:process"),w=require("./shared/format-label-D6ofFldh.cjs"),E=require("node:string_decoder"),I=require("./shared/pail.browser-i0kgt9fE.cjs"),f=require("@visulima/inspector"),$=require("./shared/constants-BBH2bwRB.cjs"),M=require("./shared/write-stream-Bgxqp0HI.cjs"),j=require("./shared/MessageFormatterProcessor-CCRIUIdT.cjs"),O=require("./shared/PrettyReporter-DgJa7P23.cjs");var R=Object.defineProperty,A=n((r,t)=>R(r,"name",{value:t,configurable:!0}),"l$1");let q=class{static{n(this,"v")}static{A(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}=w.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,w.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
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 T=Object.defineProperty,y=n((r,t)=>T(r,"name",{value:t,configurable:!0}),"n$1");const c="\x1B[",g=c+"2J",x=c+"2K",N=c+"G",D=y((r=1)=>c+r+"A","cursorUp"),m=process.platform==="win32"?`${g}${c}0f`:`${g}${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");class v{static{n(this,"t")}static{V(this,"InteractiveStreamHook")}static DRAIN=!0;#t=new E.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(),v.DRAIN}}erase(t){t>0&&this.write(G(t+1))}inactive(t=!1){this.#e.length>0&&(t&&this.write(`
|
|
4
4
|
`),this.#e.forEach(e=>{this.write(e)}),this.#e=[]),this.renew()}renew(){this.#s.write=this.#r,this.write(k)}write(t){this.#r.apply(this.#s,[t])}}var Y=Object.defineProperty,C=n((r,t)=>Y(r,"name",{value:t,configurable:!0}),"c");let J=class{static{n(this,"v")}static{C(this,"RawReporter")}#t;#e;#r;#s=!1;#i;constructor(t={}){this.#t=h.stdout,this.#e=h.stderr,this.#i=t}setStdout(t){this.#t=t}setStderr(t){this.#e=t}setInteractiveManager(t){this.#r=t}setIsInteractive(t){this.#s=t}log(t){const{context:e,groups:s,message:a,type:p}=t,i=[];if(a!==$.EMPTY_SYMBOL){const o=typeof a=="string"?a:f.inspect(a,this.#i);i.push(o)}e&&i.push(...e.map(o=>typeof o=="object"?" "+f.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):M.n(d+i.join(""),l)}};var U=Object.defineProperty,z=n((r,t)=>U(r,"name",{value:t,configurable:!0}),"a$1");class F extends I.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 q(new v(this.stdout),new v(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(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 K=F;var W=Object.defineProperty,S=n((r,t)=>W(r,"name",{value:t,configurable:!0}),"o");const Q=S(()=>h.env.NODE_ENV==="debug"||h.env.DEBUG!==void 0?"debug":h.env.NODE_ENV==="test"?"warning":"informational","_getDefaultLogLevel"),_=S(r=>{let t=Q();return h.env.PAIL_LOG_LEVEL!==void 0&&(t=h.env.PAIL_LOG_LEVEL),new K({logLevel:t,processors:[new j
|
|
5
|
+
`),0):M.n(d+i.join(""),l)}};var U=Object.defineProperty,z=n((r,t)=>U(r,"name",{value:t,configurable:!0}),"a$1");class F extends I.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 q(new v(this.stdout),new v(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(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 K=F;var W=Object.defineProperty,S=n((r,t)=>W(r,"name",{value:t,configurable:!0}),"o");const Q=S(()=>h.env.NODE_ENV==="debug"||h.env.DEBUG!==void 0?"debug":h.env.NODE_ENV==="test"?"warning":"informational","_getDefaultLogLevel"),_=S(r=>{let t=Q();return h.env.PAIL_LOG_LEVEL!==void 0&&(t=h.env.PAIL_LOG_LEVEL),new K({logLevel:t,processors:[new j],reporters:[new O.PrettyReporter],stderr:h.stderr,stdout:h.stdout,...r})},"createPail"),X=_();exports.createPail=_;exports.pail=X;
|
package/dist/index.server.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var L=Object.defineProperty;var n=(r,t)=>L(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 $}from"./shared/format-label-CAW3vDTf.mjs";import{StringDecoder as
|
|
1
|
+
var L=Object.defineProperty;var n=(r,t)=>L(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 $}from"./shared/format-label-CAW3vDTf.mjs";import{StringDecoder as j}from"node:string_decoder";import{a as M}from"./shared/pail.browser-BDLzjsVP.mjs";import{inspect as v}from"@visulima/inspector";import{E as O}from"./shared/constants-BMS51p6Y.mjs";import{n as P}from"./shared/write-stream-C17GXSxA.mjs";import R from"./shared/MessageFormatterProcessor-D_XajTuK.mjs";import{PrettyReporter as A}from"./shared/PrettyReporter-CO2PT96t.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:u,rows:i}=I(),c=s>i?i-1:Math.max(0,Math.min(i-1,s)),l=this.lastLength-c,p=Math.max(l-i,this.outside);let o=e.reduce((b,E)=>[...b,$(E,u,{hard:!0,trim:!1,wordWrap:!0})],[]);i<=l?(a.erase(i),c<p&&(o=o.slice(p-c+1))):l&&a.erase(l),a.write(o.join(`
|
|
2
2
|
`)+`
|
|
3
|
-
`),this.#s=p?p+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 f{static{n(this,"t")}static{J(this,"InteractiveStreamHook")}static DRAIN=!0;#t=new
|
|
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:u}=t,i=[];if(a!==
|
|
5
|
-
`),0):
|
|
3
|
+
`),this.#s=p?p+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 f{static{n(this,"t")}static{J(this,"InteractiveStreamHook")}static DRAIN=!0;#t=new j;#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(),f.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:u}=t,i=[];if(a!==O){const o=typeof a=="string"?a:v(a,this.#i);i.push(o)}e&&i.push(...e.map(o=>typeof o=="object"?" "+v(o,this.#i):" "+o));const c=["error","trace","warn"].includes(u.level)?"stderr":"stdout",l=c==="stderr"?this.#e:this.#t,p=s.map(()=>" ").join("");this.#s&&this.#r!==void 0&&l.isTTY?this.#r.update(c,(p+i.join("")).split(`
|
|
5
|
+
`),0):P(p+i.join(""),l)}};var W=Object.defineProperty,q=n((r,t)=>W(r,"name",{value:t,configurable:!0}),"a$1");class F extends M{static{n(this,"v")}constructor(t){const{interactive:e,rawReporter:s,reporters:a,stderr:u,stdout:i,...c}=t;super(c),this.options=t,this.interactive=e??!1,this.stdout=i,this.stderr=u,this.interactive&&(this.interactiveManager=new T(new f(this.stdout),new f(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 R],reporters:[new A],stderr:y,stdout:m,...r})},"createPail"),dt=tt();export{tt as createPail,dt as pail};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/MessageFormatterProcessor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/MessageFormatterProcessor-CCRIUIdT.cjs"),r=require("./shared/RedactProcessor-BVZtatWJ.cjs");exports.MessageFormatterProcessor=e;exports.RedactProcessor=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{default as o}from"./shared/MessageFormatterProcessor-D_XajTuK.mjs";import{default as a}from"./shared/RedactProcessor-CxKTN42V.mjs";export{o as MessageFormatterProcessor,a as RedactProcessor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/CallerProcessor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/CallerProcessor-BSnSafz5.cjs"),r=require("./shared/MessageFormatterProcessor-CCRIUIdT.cjs"),o=require("./shared/RedactProcessor-BVZtatWJ.cjs");exports.CallerProcessor=e;exports.MessageFormatterProcessor=r;exports.RedactProcessor=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{default as o}from"./shared/CallerProcessor-BkGBDPIm.mjs";import{default as a}from"./shared/MessageFormatterProcessor-D_XajTuK.mjs";import{default as f}from"./shared/RedactProcessor-CxKTN42V.mjs";export{o as CallerProcessor,a as MessageFormatterProcessor,f as RedactProcessor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/JsonReporter-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/JsonReporter-Be-Pmt7o.cjs"),r=require("./shared/PrettyReporter-C9CiOb6F.cjs");exports.JsonReporter=e;exports.PrettyReporter=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{default as t}from"./shared/JsonReporter-DInAbLuf.mjs";import{default as a}from"./shared/PrettyReporter-oX3tQP4v.mjs";export{t as JsonReporter,a as PrettyReporter};
|
package/dist/reporter.server.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/JsonFileReporter-CMXak2Df.cjs"),r=require("./shared/JsonReporter-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/JsonFileReporter-CMXak2Df.cjs"),r=require("./shared/JsonReporter-i0KfkPd7.cjs"),t=require("./shared/PrettyReporter-DgJa7P23.cjs"),o=require("./shared/SimpleReporter-rMcYaUVZ.cjs");exports.JsonFileReporter=e.JsonFileReporter;exports.JsonReporter=r;exports.PrettyReporter=t.PrettyReporter;exports.SimpleReporter=o.SimpleReporter;
|
package/dist/reporter.server.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{JsonFileReporter as o}from"./shared/JsonFileReporter-lr0s7r9B.mjs";import{default as p}from"./shared/JsonReporter-J50eZjl2.mjs";import{PrettyReporter as m}from"./shared/PrettyReporter-CO2PT96t.mjs";import{SimpleReporter as R}from"./shared/SimpleReporter-BFw_4kJi.mjs";export{o as JsonFileReporter,p as JsonReporter,m as PrettyReporter,R as SimpleReporter};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var m=Object.defineProperty;var n=(a,e)=>m(a,"name",{value:e,configurable:!0});var u=Object.defineProperty,c=n((a,e)=>u(a,"name",{value:e,configurable:!0}),"u");const o=c(()=>{const a=Error.prepareStackTrace;try{let e=[];Error.prepareStackTrace=(i,r)=>{const t=r.slice(1);return e=t,t},new Error().stack;const l=e.reduce((i,r)=>(r.isNative()||r.getFileName()?.includes("pail/dist")||i.push({columnNumber:r.getColumnNumber(),fileName:r.getFileName(),lineNumber:r.getLineNumber()}),i),[])[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 s=Object.defineProperty,N=n((a,e)=>s(a,"name",{value:e,configurable:!0}),"r");class b{static{n(this,"a")}static{N(this,"CallerProcessor")}process(e){const{columnNumber:l,fileName:i,lineNumber:r}=o();return e.file={column:l,line:r,name:i},e}}module.exports=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var t=Object.defineProperty;var n=(a,e)=>t(a,"name",{value:e,configurable:!0});var u=Object.defineProperty,c=n((a,e)=>u(a,"name",{value:e,configurable:!0}),"u");const o=c(()=>{const a=Error.prepareStackTrace;try{let e=[];Error.prepareStackTrace=(i,r)=>{const m=r.slice(1);return e=m,m},new Error().stack;const l=e.reduce((i,r)=>(r.isNative()||r.getFileName()?.includes("pail/dist")||i.push({columnNumber:r.getColumnNumber(),fileName:r.getFileName(),lineNumber:r.getLineNumber()}),i),[])[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 s=Object.defineProperty,N=n((a,e)=>s(a,"name",{value:e,configurable:!0}),"r");class
|
|
1
|
+
var t=Object.defineProperty;var n=(a,e)=>t(a,"name",{value:e,configurable:!0});var u=Object.defineProperty,c=n((a,e)=>u(a,"name",{value:e,configurable:!0}),"u");const o=c(()=>{const a=Error.prepareStackTrace;try{let e=[];Error.prepareStackTrace=(i,r)=>{const m=r.slice(1);return e=m,m},new Error().stack;const l=e.reduce((i,r)=>(r.isNative()||r.getFileName()?.includes("pail/dist")||i.push({columnNumber:r.getColumnNumber(),fileName:r.getFileName(),lineNumber:r.getLineNumber()}),i),[])[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 s=Object.defineProperty,N=n((a,e)=>s(a,"name",{value:e,configurable:!0}),"r");class f{static{n(this,"a")}static{N(this,"CallerProcessor")}process(e){const{columnNumber:l,fileName:i,lineNumber:r}=o();return e.file={column:l,line:r,name:i},e}}export{f as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var h=Object.defineProperty;var s=(e,t)=>h(e,"name",{value:t,configurable:!0});import{A as n}from"./abstract-json-reporter-29d4dwOH.mjs";import __cjs_mod__ from "node:module"; // -- packem CommonJS require shim --
|
|
2
2
|
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
3
3
|
var o=Object.defineProperty,c=s((e,t)=>o(e,"name",{value:t,configurable:!0}),"e");class l{static{s(this,"n")}static{c(this,"SafeStreamHandler")}#t=!0;#e;#i;constructor(t,i){this.#e=t,this.#i=i}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.#i+'. Write will be dropped: "'+t+'"');return}this.#t=!1,this.#e.on("error",i=>{throw i}),this.#e.on("drain",()=>{this.#t=!0}),this.#e.on("finish",()=>{this.#t=!0}),this.#t=this.#e.write(t,()=>{})}}var m=Object.defineProperty,d=s((e,t)=>m(e,"name",{value:t,configurable:!0}),"r$1");class p{static{s(this,"o")}static{d(this,"RotatingFileStream")}#t;#e;#i;#s;#r;constructor(t,i=!1,r={}){if(this.#t=t,this.#e=i,this.#s=r,!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.#i=this.#r(this.#t,r)}}write(t){let i=this.#i;this.#e&&(i=this.#r(this.#t,this.#s));const r=new l(i,this.#t);r.write(t),this.#e&&r.end()}end(){this.#i!==void 0&&this.#i.end()}}var u=Object.defineProperty,w=s((e,t)=>u(e,"name",{value:t,configurable:!0}),"r");class v extends n{static{s(this,"JsonFileReporter")}static{w(this,"JsonFileReporter")}stream;constructor(t){super();const{filePath:i,writeImmediately:r=!1,...a}=t;this.stream=new p(i,r,{compress:"gzip",interval:"1d",size:"10M",...a})}_log(t){this.stream.write(t+`
|
|
4
|
-
`)}}export{v as
|
|
4
|
+
`)}}export{v as JsonFileReporter};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var t=(r,e)=>o(r,"name",{value:e,configurable:!0});const c=require("./write-console-log-3G15muTS.cjs"),n=require("./abstract-json-reporter-CjTo97r_.cjs");var a=Object.defineProperty,i=t((r,e)=>a(r,"name",{value:e,configurable:!0}),"e");class p extends n.AbstractJsonReporter{static{t(this,"p")}static{i(this,"JsonReporter")}constructor(e={}){super(e)}_log(e,s){c.t(s)(e)}}module.exports=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var s=Object.defineProperty;var t=(e,r)=>s(e,"name",{value:r,configurable:!0});import{t as a}from"./write-console-log-BP95fgQZ.mjs";import{A as p}from"./abstract-json-reporter-29d4dwOH.mjs";var c=Object.defineProperty,n=t((e,r)=>c(e,"name",{value:r,configurable:!0}),"e");class
|
|
1
|
+
var s=Object.defineProperty;var t=(e,r)=>s(e,"name",{value:r,configurable:!0});import{t as a}from"./write-console-log-BP95fgQZ.mjs";import{A as p}from"./abstract-json-reporter-29d4dwOH.mjs";var c=Object.defineProperty,n=t((e,r)=>c(e,"name",{value:r,configurable:!0}),"e");class m extends p{static{t(this,"p")}static{n(this,"JsonReporter")}constructor(r={}){super(r)}_log(r,o){a(o)(r)}}export{m as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var i=Object.defineProperty;var s=(r,t)=>i(r,"name",{value:t,configurable:!0});import{stdout as
|
|
2
|
-
`,o)}}export{b as
|
|
1
|
+
var i=Object.defineProperty;var s=(r,t)=>i(r,"name",{value:t,configurable:!0});import{stdout as a,stderr as n}from"node:process";import{n as c}from"./write-stream-C17GXSxA.mjs";import{A as d}from"./abstract-json-reporter-29d4dwOH.mjs";var p=Object.defineProperty,u=s((r,t)=>p(r,"name",{value:t,configurable:!0}),"e");class b extends d{static{s(this,"d")}static{u(this,"JsonReporter")}#t;#r;constructor(t={}){super(t),this.#t=a,this.#r=n}setStdout(t){this.#t=t}setStderr(t){this.#r=t}_log(t,e){const o=["error","warn"].includes(e)?this.#r:this.#t;c(t+`
|
|
2
|
+
`,o)}}export{b as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var c=Object.defineProperty;var e=(r,t)=>c(r,"name",{value:t,configurable:!0});const s=require("node:process"),n=require("./write-stream-Bgxqp0HI.cjs"),a=require("./abstract-json-reporter-CjTo97r_.cjs");var u=Object.defineProperty,d=e((r,t)=>u(r,"name",{value:t,configurable:!0}),"e");class h extends a.AbstractJsonReporter{static{e(this,"d")}static{d(this,"JsonReporter")}#t;#r;constructor(t={}){super(t),this.#t=s.stdout,this.#r=s.stderr}setStdout(t){this.#t=t}setStderr(t){this.#r=t}_log(t,o){const i=["error","warn"].includes(o)?this.#r:this.#t;n.n(t+`
|
|
2
|
+
`,i)}}module.exports=h;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.defineProperty;var n=(o,t)=>a(o,"name",{value:t,configurable:!0});const c=require("@visulima/fmt");var u=Object.defineProperty,f=n((o,t)=>u(o,"name",{value:t,configurable:!0}),"o");class y{static{n(this,"p")}static{f(this,"MessageFormatterProcessor")}#t;#e;constructor(t={}){this.#e=t.formatters}setStringify(t){this.#t=t}process(t){const e=c.build({formatters:this.#e,stringify:f(s=>{const r=this.#t(s);return r===void 0?(console.warn("Unable to stringify value of type "+typeof s,s),"undefined"):r},"stringify")});return t.message!==void 0&&(t.message=this._format(e,t.message,t.context??[])),t}_format(t,e,s=[]){if(typeof e=="string")return t(e,s);if(typeof e=="object"&&e!==null)for(const r in e){const i=e[r];(typeof i=="string"||Array.isArray(i)||typeof i=="object")&&(e[r]=this._format(t,i,s))}return e}}module.exports=y;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=Object.defineProperty;var a=(o,t)=>n(o,"name",{value:t,configurable:!0});import{build as c}from"@visulima/fmt";var y=Object.defineProperty,f=a((o,t)=>y(o,"name",{value:t,configurable:!0}),"o");class g{static{a(this,"p")}static{f(this,"MessageFormatterProcessor")}#t;#e;constructor(t={}){this.#e=t.formatters}setStringify(t){this.#t=t}process(t){const e=c({formatters:this.#e,stringify:f(s=>{const r=this.#t(s);return r===void 0?(console.warn("Unable to stringify value of type "+typeof s,s),"undefined"):r},"stringify")});return t.message!==void 0&&(t.message=this._format(e,t.message,t.context??[])),t}_format(t,e,s=[]){if(typeof e=="string")return t(e,s);if(typeof e=="object"&&e!==null)for(const r in e){const i=e[r];(typeof i=="string"||Array.isArray(i)||typeof i=="object")&&(e[r]=this._format(t,i,s))}return e}}export{g as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";var j=Object.defineProperty;var f=(n,o)=>j(n,"name",{value:o,configurable:!0});const l=require("@visulima/colorize/browser"),i=require("@visulima/fmt"),C=require("./constants-BBH2bwRB.cjs"),R=require("./abstract-pretty-reporter-B14XYOWC.cjs"),M=require("./get-longest-label-DXpzhu5N.cjs"),S=require("./write-console-log-3G15muTS.cjs"),Y=f(n=>n&&typeof n=="object"&&"default"in n?n.default:n,"_interopDefaultCompat"),D=Y(l);var O=Object.defineProperty,k=f((n,o)=>O(n,"name",{value:o,configurable:!0}),"A");class B extends R.AbstractPrettyReporter{static{f(this,"Y")}static{k(this,"PrettyReporter")}constructor(o={}){super({uppercase:{label:!0,...o.uppercase},...o})}log(o){const t=typeof window<"u"&&typeof window.document<"u",_=S.t(o.type.level),{badge:x,context:w,date:u,error:A,groups:g,label:y,message:L,prefix:d,repeated:h,scope:p,suffix:m,type:T}=o,{color:q}=this._loggerTypes[T.name],P=q?D[q]:l.white,s=[];if(t&&g.length>0){const e=g.map(()=>" ").join(""),r=l.grey("["+g.at(-1)+"]");s.push(i.format(e+r[0],r.slice(1)))}if(u){const e=l.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(x){const e=P(x);t?s.push(i.format(e[0],e.slice(1))):s.push([e[0]+" ",...e.slice(1)])}else{const e=R.s(this._loggerTypes);if(e.length>0){const r=l.grey(".".repeat(e.length));t?s.push(i.format(r[0]+" ",r.slice(1))):s.push([r[0]+" ",...r.slice(1)])}}const v=M.s(this._loggerTypes);let b;if(h){const e=l.white("["+h+"x]");b=t?i.format(e[0],e.slice(1)):[e[0],...e.slice(1)]}if(y){const e=P(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=v.length-y.length;if(h?r-=String(h).length+3:r+=1,r>0){const c=l.grey(".".repeat(r));t?s.push(i.format(c[0],c.slice(1))):s.push([" "+c[0],...c.slice(1)])}}else{const e=l.grey(".".repeat(v.length+1));t?s.push(i.format(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(Array.isArray(p)&&p.length>0){const e=l.grey("["+p.join(" > ")+"]");t?s.push(i.format(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(d){const e=l.grey((Array.isArray(p)&&p.length>0?". ":" ")+"["+(this._styles.underline.prefix?l.underline(d):d)+"] ");t?s.push(i.format(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(L!==C.EMPTY_SYMBOL&&s.push(L),w&&s.push(...w),A&&s.push(A,`
|
|
2
|
+
|
|
3
|
+
`),m){const e=l.grey(this._styles.underline.suffix?l.underline(m):m);t?s.push(i.format(`
|
|
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 a of s)Array.isArray(a)&&a.length>1&&a[0].includes("%c")?(e+=a[0],r.push(...a.slice(1))):c.push(a);_(e+"%c",...r,"",...c)}}_formatLabel(o){let t=this._styles.uppercase.label?o.toUpperCase():o;return t=this._styles.underline.label?l.underline(t):t,this._styles.bold.label&&(t=l.bold(t)),t}}module.exports=B;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var F=Object.defineProperty;var x=(p,e)=>F(p,"name",{value:e,configurable:!0});import{stdout as O,stderr as V}from"node:process";import Y,{green as $,cyan as z,red as w,greenBright as D,white as G,grey as s,bgGrey as W,underline as k}from"@visulima/colorize";import{renderError as E}from"@visulima/error/error";import{inspect as C}from"@visulima/inspector";import{u as q,t as H,n as J,s as b,w as K}from"./format-label-CAW3vDTf.mjs";import{E as N}from"./constants-BMS51p6Y.mjs";import{A as Q,s as U}from"./abstract-pretty-reporter-DgXRHEj-.mjs";import{s as X}from"./get-longest-label-4ISUsE2q.mjs";import{n as Z}from"./write-stream-C17GXSxA.mjs";var ee=Object.defineProperty,I=x((p,e)=>ee(p,"name",{value:e,configurable:!0}),"S");const A=I(p=>!/[\\/]pail[\\/]dist/.test(p),"pailFileFilter");class ue extends Q{static{x(this,"PrettyReporter")}static{I(this,"PrettyReporter")}#t;#r;#s;#o=!1;#i;#e;constructor(e={}){const{error:n,inspect:i,...o}=e;super({uppercase:{label:!0,...o.uppercase},...o}),this.#i={...q,...i},this.#e={...n,color:{fileLine:$,hint:z,marker:w,message:w,method:D,title:w}},this.#t=O,this.#r=V}setStdout(e){this.#t=e}setStderr(e){this.#r=e}setInteractiveManager(e){this.#s=e}setIsInteractive(e){this.#o=e}log(e){this._log(this._formatMessage(e),e.type.level)}_formatMessage(e){const{columns:n}=H();let i=n;typeof this._styles.messageLength=="number"&&(i=this._styles.messageLength);const{badge:o,context:S,date:u,error:j,file:c,groups:f,label:m,message:g,prefix:d,repeated:v,scope:l,suffix:y,traceError:M,type:R}=e,{color:
|
|
1
|
+
var F=Object.defineProperty;var x=(p,e)=>F(p,"name",{value:e,configurable:!0});import{stdout as O,stderr as V}from"node:process";import Y,{green as $,cyan as z,red as w,greenBright as D,white as G,grey as s,bgGrey as W,underline as k}from"@visulima/colorize";import{renderError as E}from"@visulima/error/error";import{inspect as C}from"@visulima/inspector";import{u as q,t as H,n as J,s as b,w as K}from"./format-label-CAW3vDTf.mjs";import{E as N}from"./constants-BMS51p6Y.mjs";import{A as Q,s as U}from"./abstract-pretty-reporter-DgXRHEj-.mjs";import{s as X}from"./get-longest-label-4ISUsE2q.mjs";import{n as Z}from"./write-stream-C17GXSxA.mjs";var ee=Object.defineProperty,I=x((p,e)=>ee(p,"name",{value:e,configurable:!0}),"S");const A=I(p=>!/[\\/]pail[\\/]dist/.test(p),"pailFileFilter");class ue extends Q{static{x(this,"PrettyReporter")}static{I(this,"PrettyReporter")}#t;#r;#s;#o=!1;#i;#e;constructor(e={}){const{error:n,inspect:i,...o}=e;super({uppercase:{label:!0,...o.uppercase},...o}),this.#i={...q,...i},this.#e={...n,color:{fileLine:$,hint:z,marker:w,message:w,method:D,title:w}},this.#t=O,this.#r=V}setStdout(e){this.#t=e}setStderr(e){this.#r=e}setInteractiveManager(e){this.#s=e}setIsInteractive(e){this.#o=e}log(e){this._log(this._formatMessage(e),e.type.level)}_formatMessage(e){const{columns:n}=H();let i=n;typeof this._styles.messageLength=="number"&&(i=this._styles.messageLength);const{badge:o,context:S,date:u,error:j,file:c,groups:f,label:m,message:g,prefix:d,repeated:v,scope:l,suffix:y,traceError:M,type:R}=e,{color:T}=this._loggerTypes[R.name],L=T?Y[T]:G,h=f.map(()=>" ").join(""),t=[];if(f.length>0&&t.push(h+s("["+f.at(-1)+"]")+" "),u&&t.push(s(this._styles.dateFormatter(typeof u=="string"?new Date(u):u))+" "),o)t.push(L(o));else{const r=U(this._loggerTypes);r.length>0&&t.push(s(".".repeat(r.length))+" ")}const P=X(this._loggerTypes);m?t.push(L(J(m,this._styles))+" ",s(".".repeat(P.length-b(m)))):t.push(s(".".repeat(P.length+2))),v&&t.push(W.white("["+v+"x]")+" "),Array.isArray(l)&&l.length>0&&t.push(" "+s("["+l.join(" > ")+"]")+" "),d&&t.push(s((Array.isArray(l)&&l.length>0?". ":" ")+"["+(this._styles.underline.prefix?k(d):d)+"]")+" ");const _=b(t.join(" "));if(c){const r=c.name+(c.line?":"+c.line:""),a=b(r);a+_+2>i?t.push(s(" "+r)):t.push(s(".".repeat(i-_-a-2)+" "+r))}else t.push(s(".".repeat(i-_-1)));if(t.length>0&&t.push(`
|
|
2
2
|
|
|
3
3
|
`),g!==N){const r=typeof g=="string"?g:C(g,this.#i);t.push(h+K(r,i-3,{hard:!0,trim:!1,wordWrap:!0}))}if(S){let r=!1;t.push(...S.map(a=>{if(a instanceof Error)return r=!0,`
|
|
4
4
|
|
|
@@ -10,4 +10,4 @@ var F=Object.defineProperty;var x=(p,e)=>F(p,"name",{value:e,configurable:!0});i
|
|
|
10
10
|
`,h+s(this._styles.underline.suffix?k(y):y)),t.join("")+`
|
|
11
11
|
`}_log(e,n){const i=["error","trace","warn"].includes(n)?"stderr":"stdout",o=i==="stderr"?this.#r:this.#t;this.#o&&this.#s!==void 0&&o.isTTY?this.#s.update(i,e.split(`
|
|
12
12
|
`),0):Z(e+`
|
|
13
|
-
`,o)}}export{ue as
|
|
13
|
+
`,o)}}export{ue as PrettyReporter};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var S=Object.defineProperty;var b=(h,i)=>S(h,"name",{value:i,configurable:!0});import Y,{white as M,grey as o,underline as _,bold as $}from"@visulima/colorize/browser";import{format as r}from"@visulima/fmt";import{E}from"./constants-BMS51p6Y.mjs";import{A as O,s as k}from"./abstract-pretty-reporter-DgXRHEj-.mjs";import{s as B}from"./get-longest-label-4ISUsE2q.mjs";import{t as C}from"./write-console-log-BP95fgQZ.mjs";var D=Object.defineProperty,F=b((h,i)=>D(h,"name",{value:i,configurable:!0}),"A");class K extends O{static{b(this,"Y")}static{F(this,"PrettyReporter")}constructor(i={}){super({uppercase:{label:!0,...i.uppercase},...i})}log(i){const t=typeof window<"u"&&typeof window.document<"u",x=C(i.type.level),{badge:A,context:w,date:
|
|
1
|
+
var S=Object.defineProperty;var b=(h,i)=>S(h,"name",{value:i,configurable:!0});import Y,{white as M,grey as o,underline as _,bold as $}from"@visulima/colorize/browser";import{format as r}from"@visulima/fmt";import{E}from"./constants-BMS51p6Y.mjs";import{A as O,s as k}from"./abstract-pretty-reporter-DgXRHEj-.mjs";import{s as B}from"./get-longest-label-4ISUsE2q.mjs";import{t as C}from"./write-console-log-BP95fgQZ.mjs";var D=Object.defineProperty,F=b((h,i)=>D(h,"name",{value:i,configurable:!0}),"A");class K extends O{static{b(this,"Y")}static{F(this,"PrettyReporter")}constructor(i={}){super({uppercase:{label:!0,...i.uppercase},...i})}log(i){const t=typeof window<"u"&&typeof window.document<"u",x=C(i.type.level),{badge:A,context:w,date:a,error:v,groups:f,label:g,message:P,prefix:y,repeated:u,scope:n,suffix:m,type:R}=i,{color:T}=this._loggerTypes[R.name],L=T?Y[T]:M,e=[];if(t&&f.length>0){const s=f.map(()=>" ").join(""),l=o("["+f.at(-1)+"]");e.push(r(s+l[0],l.slice(1)))}if(a){const s=o(this._styles.dateFormatter(typeof a=="string"?new Date(a):a));t?e.push(r(s[0],s.slice(1))):e.push([s[0]+" ",...s.slice(1)])}if(A){const s=L(A);t?e.push(r(s[0],s.slice(1))):e.push([s[0]+" ",...s.slice(1)])}else{const s=k(this._loggerTypes);if(s.length>0){const l=o(".".repeat(s.length));t?e.push(r(l[0]+" ",l.slice(1))):e.push([l[0]+" ",...l.slice(1)])}}const j=B(this._loggerTypes);let d;if(u){const s=M("["+u+"x]");d=t?r(s[0],s.slice(1)):[s[0],...s.slice(1)]}if(g){const s=L(this._formatLabel(g));t?e.push(r(s[0],s.slice(1))):e.push([s[0],...s.slice(1)]),d&&e.push(d);let l=j.length-g.length;if(u?l-=String(u).length+3:l+=1,l>0){const p=o(".".repeat(l));t?e.push(r(p[0],p.slice(1))):e.push([" "+p[0],...p.slice(1)])}}else{const s=o(".".repeat(j.length+1));t?e.push(r(s[0],s.slice(1))):e.push([s[0],...s.slice(1)])}if(Array.isArray(n)&&n.length>0){const s=o("["+n.join(" > ")+"]");t?e.push(r(s[0],s.slice(1))):e.push([s[0],...s.slice(1)])}if(y){const s=o((Array.isArray(n)&&n.length>0?". ":" ")+"["+(this._styles.underline.prefix?_(y):y)+"] ");t?e.push(r(s[0],s.slice(1))):e.push([s[0],...s.slice(1)])}if(P!==E&&e.push(P),w&&e.push(...w),v&&e.push(v,`
|
|
2
2
|
|
|
3
3
|
`),m){const s=o(this._styles.underline.suffix?_(m):m);t?e.push(r(`
|
|
4
4
|
`+s[0],s.slice(1))):e.push([`
|
|
5
|
-
`+s[0],...s.slice(1)])}if(t)x(...e);else{let s="";const l=[],p=[];for(const c of e)Array.isArray(c)&&c.length>1&&c[0].includes("%c")?(s+=c[0],l.push(...c.slice(1))):p.push(c);x(s+"%c",...l,"",...p)}}_formatLabel(i){let t=this._styles.uppercase.label?i.toUpperCase():i;return t=this._styles.underline.label?_(t):t,this._styles.bold.label&&(t=$(t)),t}}export{K as
|
|
5
|
+
`+s[0],...s.slice(1)])}if(t)x(...e);else{let s="";const l=[],p=[];for(const c of e)Array.isArray(c)&&c.length>1&&c[0].includes("%c")?(s+=c[0],l.push(...c.slice(1))):p.push(c);x(s+"%c",...l,"",...p)}}_formatLabel(i){let t=this._styles.uppercase.label?i.toUpperCase():i;return t=this._styles.underline.label?_(t):t,this._styles.bold.label&&(t=$(t)),t}}export{K as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var s=(t,r)=>o(t,"name",{value:r,configurable:!0});var n=Object.defineProperty,u=s((t,r)=>n(t,"name",{value:r,configurable:!0}),"r");class h{static{s(this,"n")}static{u(this,"RedactProcessor")}#r;constructor(r,e){try{const{redact:a,standardRules:c}=require("@visulima/redact");this.#r=i=>a(i,r||c,e)}catch{throw new Error("The '@visulima/redact' package is missing. Make sure to install the '@visulima/redact' package.")}}process(r){return r.message=this.#r(r.message),r.context=this.#r(r.context),r.error=this.#r(r.error),r}}module.exports=h;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import __cjs_mod__ from "node:module"; // -- packem CommonJS require shim --
|
|
2
2
|
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
3
|
-
var o=Object.defineProperty;var e=(t,r)=>o(t,"name",{value:r,configurable:!0});var n=Object.defineProperty,
|
|
3
|
+
var o=Object.defineProperty;var e=(t,r)=>o(t,"name",{value:r,configurable:!0});var n=Object.defineProperty,u=e((t,r)=>n(t,"name",{value:r,configurable:!0}),"r");class l{static{e(this,"n")}static{u(this,"RedactProcessor")}#r;constructor(r,s){try{const{redact:a,standardRules:c}=require("@visulima/redact");this.#r=i=>a(i,r||c,s)}catch{throw new Error("The '@visulima/redact' package is missing. Make sure to install the '@visulima/redact' package.")}}process(r){return r.message=this.#r(r.message),r.context=this.#r(r.context),r.error=this.#r(r.error),r}}export{l as default};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var O=Object.defineProperty;var _=(
|
|
1
|
+
var O=Object.defineProperty;var _=(n,e)=>O(n,"name",{value:e,configurable:!0});import{stdout as P,stderr as V}from"node:process";import Y,{green as z,cyan as W,red as x,greenBright as D,white as G,grey as o,bold as k,bgGrey as q,underline as A}from"@visulima/colorize";import{renderError as b}from"@visulima/error";import{inspect as C}from"@visulima/inspector";import{u as H,t as J,n as K,s as I,w as N}from"./format-label-CAW3vDTf.mjs";import{E as Q}from"./constants-BMS51p6Y.mjs";import{A as U,s as X}from"./abstract-pretty-reporter-DgXRHEj-.mjs";import{s as Z}from"./get-longest-label-4ISUsE2q.mjs";import{n as ee}from"./write-stream-C17GXSxA.mjs";var te=Object.defineProperty,R=_((n,e)=>te(n,"name",{value:e,configurable:!0}),"L");const w=R(n=>!/[\\/]pail[\\/]dist/.test(n),"pailFileFilter");class ue extends U{static{_(this,"SimpleReporter")}static{R(this,"SimpleReporter")}#t;#r;#s;#o=!1;#i;#e;constructor(e={}){const{error:h,inspect:i,...s}=e;super({uppercase:{label:!0,...s.uppercase},...s}),this.#i={...H,indent:void 0,...i},this.#e={...h,color:{fileLine:z,hint:W,marker:x,message:x,method:D,title:x}},this.#t=P,this.#r=V}setStdout(e){this.#t=e}setStderr(e){this.#r=e}setInteractiveManager(e){this.#s=e}setIsInteractive(e){this.#o=e}log(e){this._log(this._formatMessage(e),e.type.level)}_formatMessage(e){const{columns:h}=J();let i=h;typeof this._styles.messageLength=="number"&&(i=this._styles.messageLength);const{badge:s,context:E,date:l,error:v,file:c,groups:f,label:m,message:u,prefix:g,repeated:S,scope:d,suffix:y,traceError:j,type:$}=e,{color:M}=this._loggerTypes[$.name],L=M?Y[M]:G,a=f.map(()=>" ").join(""),t=[];if(f.length>0&&t.push(a+o("["+f.at(-1)+"]")+" "),l&&t.push(o(this._styles.dateFormatter(typeof l=="string"?new Date(l):l))+" "),s)t.push(k(L(s)));else{const r=X(this._loggerTypes);r.length>0&&t.push(o(" ".repeat(r.length)))}const T=Z(this._loggerTypes);m?t.push(k(L(K(m,this._styles)))+" "," ".repeat(T.length-I(m))):t.push(" ".repeat(T.length+1)),S&&t.push(q.white("["+S+"x]")+" "),Array.isArray(d)&&d.length>0&&t.push(o("["+d.join(" > ")+"]")+" "),g&&t.push(o("["+(this._styles.underline.prefix?A(g):g)+"]")+" ");const B=I(t.join(""));if(u!==Q){const r=typeof u=="string"?u:C(u,this.#i);t.push(a+N(r,i-3,{hard:!0,trim:!1,wordWrap:!0}))}if(E){let r=!1;t.push(...E.map(p=>{if(p instanceof Error)return r=!0,`
|
|
2
2
|
|
|
3
|
-
`+b(p,{...this.#e,filterStacktrace:w,prefix:
|
|
3
|
+
`+b(p,{...this.#e,filterStacktrace:w,prefix:a});if(typeof p=="object")return" "+C(p,this.#i);const F=(r?`
|
|
4
4
|
|
|
5
|
-
`:" ")+p;return r=!1,F}))}if(
|
|
5
|
+
`:" ")+p;return r=!1,F}))}if(v&&t.push(b(v,{...this.#e,filterStacktrace:w,prefix:a})),j&&t.push(`
|
|
6
6
|
|
|
7
|
-
`+b(j,{...this.#e,filterStacktrace:w,hideErrorCauseCodeView:!0,hideErrorCodeView:!0,hideErrorErrorsCodeView:!0,hideMessage:!0,prefix:
|
|
7
|
+
`+b(j,{...this.#e,filterStacktrace:w,hideErrorCauseCodeView:!0,hideErrorCodeView:!0,hideErrorErrorsCodeView:!0,hideMessage:!0,prefix:a})),y&&t.push(" "+a+o(this._styles.underline.suffix?A(y):y)),c){const r=c.name+(c.line?":"+c.line:"");t.push(`
|
|
8
8
|
`,o("Caller: ")," ".repeat(B-8),r,`
|
|
9
9
|
`)}return t.join("")}_log(e,h){const i=["error","trace","warn"].includes(h)?"stderr":"stdout",s=i==="stderr"?this.#r:this.#t;this.#o&&this.#s!==void 0&&s.isTTY?this.#s.update(i,e.split(`
|
|
10
10
|
`),0):ee(e+`
|
|
11
|
-
`,s)}}export{ue as
|
|
11
|
+
`,s)}}export{ue as SimpleReporter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/pail",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.7",
|
|
4
4
|
"description": "Find a file or directory by walking up parent directories.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ansi",
|
|
@@ -56,9 +56,12 @@
|
|
|
56
56
|
"winston"
|
|
57
57
|
],
|
|
58
58
|
"homepage": "https://www.visulima.com/docs/package/pail",
|
|
59
|
+
"bugs": {
|
|
60
|
+
"url": "https://github.com/visulima/visulima/issues"
|
|
61
|
+
},
|
|
59
62
|
"repository": {
|
|
60
63
|
"type": "git",
|
|
61
|
-
"url": "https://github.com/visulima/visulima.git",
|
|
64
|
+
"url": "git+https://github.com/visulima/visulima.git",
|
|
62
65
|
"directory": "packages/pail"
|
|
63
66
|
},
|
|
64
67
|
"funding": [
|
|
@@ -181,6 +184,18 @@
|
|
|
181
184
|
"module": "dist/index.server.mjs",
|
|
182
185
|
"browser": "dist/index.browser.mjs",
|
|
183
186
|
"types": "dist/index.server.d.ts",
|
|
187
|
+
"typesVersions": {
|
|
188
|
+
"*": {
|
|
189
|
+
"*": [
|
|
190
|
+
"./dist/index.browser.d.ts",
|
|
191
|
+
"./dist/index.server.d.ts",
|
|
192
|
+
"./dist/processor.browser.d.ts",
|
|
193
|
+
"./dist/processor.server.d.ts",
|
|
194
|
+
"./dist/reporter.browser.d.ts",
|
|
195
|
+
"./dist/reporter.server.d.ts"
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
},
|
|
184
199
|
"files": [
|
|
185
200
|
"dist/**",
|
|
186
201
|
"README.md",
|
|
@@ -188,10 +203,10 @@
|
|
|
188
203
|
"LICENSE.md"
|
|
189
204
|
],
|
|
190
205
|
"dependencies": {
|
|
191
|
-
"@visulima/colorize": "1.4.
|
|
192
|
-
"@visulima/error": "4.4.
|
|
193
|
-
"@visulima/fmt": "1.1.
|
|
194
|
-
"@visulima/inspector": "1.0.
|
|
206
|
+
"@visulima/colorize": "1.4.8",
|
|
207
|
+
"@visulima/error": "4.4.3",
|
|
208
|
+
"@visulima/fmt": "1.1.8",
|
|
209
|
+
"@visulima/inspector": "1.0.8",
|
|
195
210
|
"safe-stable-stringify": "^2.5.0"
|
|
196
211
|
},
|
|
197
212
|
"devDependencies": {
|
|
@@ -199,13 +214,14 @@
|
|
|
199
214
|
"@anolilab/prettier-config": "^5.0.14",
|
|
200
215
|
"@anolilab/semantic-release-pnpm": "^1.1.3",
|
|
201
216
|
"@anolilab/semantic-release-preset": "^9.0.0",
|
|
217
|
+
"@arethetypeswrong/cli": "^0.15.4",
|
|
202
218
|
"@babel/core": "^7.25.2",
|
|
203
219
|
"@rushstack/eslint-plugin-security": "^0.8.2",
|
|
204
220
|
"@secretlint/secretlint-rule-preset-recommend": "^8.2.4",
|
|
205
|
-
"@total-typescript/ts-reset": "^0.6.
|
|
221
|
+
"@total-typescript/ts-reset": "^0.6.1",
|
|
206
222
|
"@types/node": "18.19.15",
|
|
207
|
-
"@visulima/packem": "^1.0.0-alpha.
|
|
208
|
-
"@visulima/redact": "1.0.
|
|
223
|
+
"@visulima/packem": "^1.0.0-alpha.95",
|
|
224
|
+
"@visulima/redact": "1.0.6",
|
|
209
225
|
"@vitest/coverage-v8": "^2.0.5",
|
|
210
226
|
"@vitest/ui": "^2.0.5",
|
|
211
227
|
"conventional-changelog-conventionalcommits": "8.0.0",
|
|
@@ -231,7 +247,7 @@
|
|
|
231
247
|
"wrap-ansi": "^9.0.0"
|
|
232
248
|
},
|
|
233
249
|
"peerDependencies": {
|
|
234
|
-
"@visulima/redact": "1.0.
|
|
250
|
+
"@visulima/redact": "1.0.6",
|
|
235
251
|
"rotating-file-stream": "^3.1.1"
|
|
236
252
|
},
|
|
237
253
|
"peerDependenciesMeta": {
|
|
@@ -271,6 +287,7 @@
|
|
|
271
287
|
"build:prod": "cross-env NODE_ENV=production packem build",
|
|
272
288
|
"clean": "rimraf node_modules dist .eslintcache",
|
|
273
289
|
"dev": "pnpm run build --watch",
|
|
290
|
+
"lint:attw": "attw --pack",
|
|
274
291
|
"lint:eslint": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs",
|
|
275
292
|
"lint:eslint:fix": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs --fix",
|
|
276
293
|
"lint:package-json": "publint --strict",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var m=Object.defineProperty;var n=(a,e)=>m(a,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var u=Object.defineProperty,o=n((a,e)=>u(a,"name",{value:e,configurable:!0}),"u");const c=o(()=>{const a=Error.prepareStackTrace;try{let e=[];Error.prepareStackTrace=(i,r)=>{const t=r.slice(1);return e=t,t},new Error().stack;const l=e.reduce((i,r)=>(r.isNative()||r.getFileName()?.includes("pail/dist")||i.push({columnNumber:r.getColumnNumber(),fileName:r.getFileName(),lineNumber:r.getLineNumber()}),i),[])[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 s=Object.defineProperty,N=n((a,e)=>s(a,"name",{value:e,configurable:!0}),"r");class b{static{n(this,"a")}static{N(this,"CallerProcessor")}process(e){const{columnNumber:l,fileName:i,lineNumber:r}=c();return e.file={column:l,line:r,name:i},e}}exports.a=b;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var t=(r,e)=>s(r,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./write-console-log-3G15muTS.cjs"),a=require("./abstract-json-reporter-CjTo97r_.cjs");var c=Object.defineProperty,i=t((r,e)=>c(r,"name",{value:e,configurable:!0}),"e");class u extends a.AbstractJsonReporter{static{t(this,"p")}static{i(this,"JsonReporter")}constructor(e={}){super(e)}_log(e,o){n.t(o)(e)}}exports.p=u;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var n=Object.defineProperty;var r=(e,t)=>n(e,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("node:process"),c=require("./write-stream-Bgxqp0HI.cjs"),a=require("./abstract-json-reporter-CjTo97r_.cjs");var u=Object.defineProperty,d=r((e,t)=>u(e,"name",{value:t,configurable:!0}),"e");class l extends a.AbstractJsonReporter{static{r(this,"d")}static{d(this,"JsonReporter")}#t;#e;constructor(t={}){super(t),this.#t=s.stdout,this.#e=s.stderr}setStdout(t){this.#t=t}setStderr(t){this.#e=t}_log(t,o){const i=["error","warn"].includes(o)?this.#e:this.#t;c.n(t+`
|
|
2
|
-
`,i)}}exports.d=l;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var a=Object.defineProperty;var f=(o,t)=>a(o,"name",{value:t,configurable:!0});import{build as c}from"@visulima/fmt";var y=Object.defineProperty,n=f((o,t)=>y(o,"name",{value:t,configurable:!0}),"o");class p{static{f(this,"p")}static{n(this,"MessageFormatterProcessor")}#t;#e;constructor(t={}){this.#e=t.formatters}setStringify(t){this.#t=t}process(t){const e=c({formatters:this.#e,stringify:n(r=>{const s=this.#t(r);return s===void 0?(console.warn("Unable to stringify value of type "+typeof r,r),"undefined"):s},"stringify")});return t.message!==void 0&&(t.message=this._format(e,t.message,t.context??[])),t}_format(t,e,r=[]){if(typeof e=="string")return t(e,r);if(typeof e=="object"&&e!==null)for(const s in e){const i=e[s];(typeof i=="string"||Array.isArray(i)||typeof i=="object")&&(e[s]=this._format(t,i,r))}return e}}export{p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var f=Object.defineProperty;var n=(o,t)=>f(o,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@visulima/fmt");var u=Object.defineProperty,a=n((o,t)=>u(o,"name",{value:t,configurable:!0}),"o");class y{static{n(this,"p")}static{a(this,"MessageFormatterProcessor")}#t;#e;constructor(t={}){this.#e=t.formatters}setStringify(t){this.#t=t}process(t){const e=c.build({formatters:this.#e,stringify:a(r=>{const s=this.#t(r);return s===void 0?(console.warn("Unable to stringify value of type "+typeof r,r),"undefined"):s},"stringify")});return t.message!==void 0&&(t.message=this._format(e,t.message,t.context??[])),t}_format(t,e,r=[]){if(typeof e=="string")return t(e,r);if(typeof e=="object"&&e!==null)for(const s in e){const i=e[s];(typeof i=="string"||Array.isArray(i)||typeof i=="object")&&(e[s]=this._format(t,i,r))}return e}}exports.p=y;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";var R=Object.defineProperty;var f=(n,o)=>R(n,"name",{value:o,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@visulima/colorize/browser"),i=require("@visulima/fmt"),S=require("./constants-BBH2bwRB.cjs"),T=require("./abstract-pretty-reporter-B14XYOWC.cjs"),M=require("./get-longest-label-DXpzhu5N.cjs"),Y=require("./write-console-log-3G15muTS.cjs"),C=f(n=>n&&typeof n=="object"&&"default"in n?n.default:n,"_interopDefaultCompat"),O=C(l);var D=Object.defineProperty,k=f((n,o)=>D(n,"name",{value:o,configurable:!0}),"A");class B extends T.AbstractPrettyReporter{static{f(this,"Y")}static{k(this,"PrettyReporter")}constructor(o={}){super({uppercase:{label:!0,...o.uppercase},...o})}log(o){const t=typeof window<"u"&&typeof window.document<"u",_=Y.t(o.type.level),{badge:w,context:x,date:u,error:A,groups:g,label:y,message:L,prefix:d,repeated:h,scope:p,suffix:m,type:j}=o,{color:P}=this._loggerTypes[j.name],q=P?O[P]:l.white,s=[];if(t&&g.length>0){const e=g.map(()=>" ").join(""),r=l.grey("["+g.at(-1)+"]");s.push(i.format(e+r[0],r.slice(1)))}if(u){const e=l.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=q(w);t?s.push(i.format(e[0],e.slice(1))):s.push([e[0]+" ",...e.slice(1)])}else{const e=T.s(this._loggerTypes);if(e.length>0){const r=l.grey(".".repeat(e.length));t?s.push(i.format(r[0]+" ",r.slice(1))):s.push([r[0]+" ",...r.slice(1)])}}const v=M.s(this._loggerTypes);let b;if(h){const e=l.white("["+h+"x]");b=t?i.format(e[0],e.slice(1)):[e[0],...e.slice(1)]}if(y){const e=q(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=v.length-y.length;if(h?r-=String(h).length+3:r+=1,r>0){const c=l.grey(".".repeat(r));t?s.push(i.format(c[0],c.slice(1))):s.push([" "+c[0],...c.slice(1)])}}else{const e=l.grey(".".repeat(v.length+1));t?s.push(i.format(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(Array.isArray(p)&&p.length>0){const e=l.grey("["+p.join(" > ")+"]");t?s.push(i.format(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(d){const e=l.grey((Array.isArray(p)&&p.length>0?". ":" ")+"["+(this._styles.underline.prefix?l.underline(d):d)+"] ");t?s.push(i.format(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(L!==S.EMPTY_SYMBOL&&s.push(L),x&&s.push(...x),A&&s.push(A,`
|
|
2
|
-
|
|
3
|
-
`),m){const e=l.grey(this._styles.underline.suffix?l.underline(m):m);t?s.push(i.format(`
|
|
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 a of s)Array.isArray(a)&&a.length>1&&a[0].includes("%c")?(e+=a[0],r.push(...a.slice(1))):c.push(a);_(e+"%c",...r,"",...c)}}_formatLabel(o){let t=this._styles.uppercase.label?o.toUpperCase():o;return t=this._styles.underline.label?l.underline(t):t,this._styles.bold.label&&(t=l.bold(t)),t}}exports.Y=B;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var t=(e,r)=>o(e,"name",{value:r,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var n=Object.defineProperty,u=t((e,r)=>n(e,"name",{value:r,configurable:!0}),"r");class l{static{t(this,"n")}static{u(this,"RedactProcessor")}#r;constructor(r,s){try{const{redact:a,standardRules:c}=require("@visulima/redact");this.#r=i=>a(i,r||c,s)}catch{throw new Error("The '@visulima/redact' package is missing. Make sure to install the '@visulima/redact' package.")}}process(r){return r.message=this.#r(r.message),r.context=this.#r(r.context),r.error=this.#r(r.error),r}}exports.n=l;
|