@visulima/pail 2.0.0 → 2.1.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 +12 -0
- package/dist/index.browser.cjs +1 -1
- package/dist/index.browser.mjs +1 -1
- package/dist/index.server.mjs +1 -1
- package/dist/reporter.browser.cjs +1 -1
- package/dist/reporter.browser.d.cts +2 -2
- package/dist/reporter.browser.d.mts +2 -2
- package/dist/reporter.browser.d.ts +2 -2
- package/dist/reporter.browser.mjs +1 -1
- package/dist/reporter.server.cjs +10 -10
- package/dist/reporter.server.d.cts +7 -7
- package/dist/reporter.server.d.mts +7 -7
- package/dist/reporter.server.d.ts +7 -7
- package/dist/reporter.server.mjs +9 -9
- package/dist/shared/{pail.Cmk6qgN4.d.cts → pail.5D809X_A.d.cts} +10 -1
- package/dist/shared/{pail.BD_y_CiZ.d.mts → pail.B3zJX3TP.d.mts} +10 -1
- package/dist/shared/pail.BhNeTL0H.cjs +1 -0
- package/dist/shared/{pail.BPOgzkG1.mjs → pail.C2dcjpQV.mjs} +4 -4
- package/dist/shared/{pail.AIbb1oDp.d.ts → pail.COeqT45B.d.ts} +10 -1
- package/dist/shared/pail.DacemLQD.mjs +1 -0
- package/dist/shared/pail.DumOHFo9.cjs +1 -0
- package/dist/shared/pail.DzwLG-N9.mjs +1 -0
- package/package.json +2 -2
- package/dist/shared/pail.B78_c-y4.cjs +0 -1
- package/dist/shared/pail.Bbo15e5K.mjs +0 -1
- package/dist/shared/pail.DHp7NF7R.cjs +0 -1
- package/dist/shared/pail.DM_CW0V1.mjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## @visulima/pail [2.1.0](https://github.com/visulima/visulima/compare/@visulima/pail@2.0.1...@visulima/pail@2.1.0) (2024-07-10)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **pail:** added new options for the json error serializer ([6df9535](https://github.com/visulima/visulima/commit/6df95355cacc50f420d9fd6c583c13e69da728fb))
|
|
6
|
+
|
|
7
|
+
## @visulima/pail [2.0.1](https://github.com/visulima/visulima/compare/@visulima/pail@2.0.0...@visulima/pail@2.0.1) (2024-07-09)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **fail:** fixed types for error and inspect options ([cc4202c](https://github.com/visulima/visulima/commit/cc4202c22936e2ebd4d640018387e4e5acc3154f))
|
|
12
|
+
|
|
1
13
|
## @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
14
|
|
|
3
15
|
### ⚠ BREAKING CHANGES
|
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 s=require("./shared/pail.CqyBdtm7.cjs"),i=require("./shared/pail.rUW_oLpx.cjs"),c=require("./shared/pail.
|
|
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.BhNeTL0H.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 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.
|
|
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.DacemLQD.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.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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.
|
|
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.C2dcjpQV.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
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
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(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var S=Object.defineProperty;var f=(n,l)=>S(n,"name",{value:l,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("./shared/pail.
|
|
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.BhNeTL0H.cjs"),o=require("@visulima/colorize/browser"),i=require("@visulima/fmt"),q=require("./shared/pail.BjvkVeLq.cjs"),v=require("./shared/pail.BtheZKQt.cjs"),Y=require("./shared/pail.3G15muTS.cjs"),C=f(n=>n&&typeof n=="object"&&"default"in n?n.default:n,"_interopDefaultCompat"),O=C(o);var D=Object.defineProperty,k=f((n,l)=>D(n,"name",{value:l,configurable:!0}),"A");class B extends v.AbstractPrettyReporter{static{f(this,"Y")}static{k(this,"PrettyReporter")}constructor(l={}){super({uppercase:{label:!0,...l.uppercase},...l})}log(l){const t=typeof window<"u"&&typeof window.document<"u",_=Y.t(l.type.level),{badge:w,context:x,date:u,error:A,groups:g,label:y,message:P,prefix:d,repeated:h,scope:a,suffix:m,type:T}=l,{color:L}=this._loggerTypes[T.name],R=L?O[L]:o.white,s=[];if(t&&g.length>0){const e=g.map(()=>" ").join(""),r=o.grey("["+g.at(-1)+"]");s.push(i.format(e+r[0],r.slice(1)))}if(u){const e=o.grey(this._styles.dateFormatter(typeof u=="string"?new Date(u):u));t?s.push(i.format(e[0],e.slice(1))):s.push([e[0]+" ",...e.slice(1)])}if(w){const e=R(w);t?s.push(i.format(e[0],e.slice(1))):s.push([e[0]+" ",...e.slice(1)])}else{const e=v.s(this._loggerTypes);if(e.length>0){const r=o.grey(".".repeat(e.length));t?s.push(i.format(r[0]+" ",r.slice(1))):s.push([r[0]+" ",...r.slice(1)])}}const j=q.s(this._loggerTypes);let b;if(h){const e=o.white("["+h+"x]");b=t?i.format(e[0],e.slice(1)):[e[0],...e.slice(1)]}if(y){const e=R(this._formatLabel(y));t?s.push(i.format(e[0],e.slice(1))):s.push([e[0],...e.slice(1)]),b&&s.push(b);let r=j.length-y.length;if(h?r-=String(h).length+3:r+=1,r>0){const c=o.grey(".".repeat(r));t?s.push(i.format(c[0],c.slice(1))):s.push([" "+c[0],...c.slice(1)])}}else{const e=o.grey(".".repeat(j.length+1));t?s.push(i.format(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(Array.isArray(a)&&a.length>0){const e=o.grey("["+a.join(" > ")+"]");t?s.push(i.format(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(d){const e=o.grey((Array.isArray(a)&&a.length>0?". ":" ")+"["+(this._styles.underline.prefix?o.underline(d):d)+"] ");t?s.push(i.format(e[0],e.slice(1))):s.push([e[0],...e.slice(1)])}if(P!==q.EMPTY_SYMBOL&&s.push(P),x&&s.push(...x),A&&s.push(A,`
|
|
2
2
|
|
|
3
3
|
`),m){const e=o.grey(this._styles.underline.suffix?o.underline(m):m);t?s.push(i.format(`
|
|
4
4
|
`+e[0],e.slice(1))):s.push([`
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { e as LiteralUnion, E as ExtendedRfc5424LogLevels, g as ReadonlyMeta } from './shared/pail.BGWAKixQ.cjs';
|
|
2
|
-
import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.
|
|
2
|
+
import { A as AbstractJsonReporter, a as AbstractJsonReporterOptions, b as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.5D809X_A.cjs';
|
|
3
3
|
import '@visulima/colorize';
|
|
4
4
|
import 'safe-stable-stringify';
|
|
5
5
|
|
|
6
6
|
declare class JsonReporter<L extends string = string> extends AbstractJsonReporter<L> {
|
|
7
|
-
constructor();
|
|
7
|
+
constructor(options?: Partial<AbstractJsonReporterOptions>);
|
|
8
8
|
protected _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { e as LiteralUnion, E as ExtendedRfc5424LogLevels, g as ReadonlyMeta } from './shared/pail.BGWAKixQ.mjs';
|
|
2
|
-
import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.
|
|
2
|
+
import { A as AbstractJsonReporter, a as AbstractJsonReporterOptions, b as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.B3zJX3TP.mjs';
|
|
3
3
|
import '@visulima/colorize';
|
|
4
4
|
import 'safe-stable-stringify';
|
|
5
5
|
|
|
6
6
|
declare class JsonReporter<L extends string = string> extends AbstractJsonReporter<L> {
|
|
7
|
-
constructor();
|
|
7
|
+
constructor(options?: Partial<AbstractJsonReporterOptions>);
|
|
8
8
|
protected _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { e as LiteralUnion, E as ExtendedRfc5424LogLevels, g as ReadonlyMeta } from './shared/pail.BGWAKixQ.js';
|
|
2
|
-
import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.
|
|
2
|
+
import { A as AbstractJsonReporter, a as AbstractJsonReporterOptions, b as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.COeqT45B.js';
|
|
3
3
|
import '@visulima/colorize';
|
|
4
4
|
import 'safe-stable-stringify';
|
|
5
5
|
|
|
6
6
|
declare class JsonReporter<L extends string = string> extends AbstractJsonReporter<L> {
|
|
7
|
-
constructor();
|
|
7
|
+
constructor(options?: Partial<AbstractJsonReporterOptions>);
|
|
8
8
|
protected _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var j=Object.defineProperty;var b=(h,r)=>j(h,"name",{value:r,configurable:!0});import{i as V}from"./shared/pail.
|
|
1
|
+
var j=Object.defineProperty;var b=(h,r)=>j(h,"name",{value:r,configurable:!0});import{i as V}from"./shared/pail.DacemLQD.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([`
|
package/dist/reporter.server.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
`)}}var Q=Object.defineProperty,U=
|
|
3
|
-
`,i)}}const Z=X;var ee=Object.defineProperty,
|
|
1
|
+
"use strict";var $=Object.defineProperty;var n=(t,e)=>$(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("./shared/pail.DumOHFo9.cjs"),f=require("node:process"),c=require("./shared/pail.akgEzola.cjs"),r=require("@visulima/colorize"),S=require("@visulima/error"),L=require("@visulima/inspector"),k=require("./shared/pail.BjvkVeLq.cjs"),J=require("./shared/pail.BtheZKQt.cjs"),I=n(t=>t&&typeof t=="object"&&"default"in t?t.default:t,"_interopDefaultCompat"),z=I(r);var B=Object.defineProperty,V=n((t,e)=>B(t,"name",{value:e,configurable:!0}),"e$1");class W{static{n(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=n((t,e)=>Y(t,"name",{value:e,configurable:!0}),"r$1");class G{static{n(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=n((t,e)=>H(t,"name",{value:e,configurable:!0}),"r");class N extends O.AbstractJsonReporter{static{n(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=n((t,e)=>Q(t,"name",{value:e,configurable:!0}),"e");class X extends O.AbstractJsonReporter{static{n(this,"d")}static{U(this,"JsonReporter")}#e;#t;constructor(e={}){super(e),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;c.n(e+`
|
|
3
|
+
`,i)}}const Z=X;var ee=Object.defineProperty,T=n((t,e)=>ee(t,"name",{value:e,configurable:!0}),"L");const _=T(t=>!/[\\/]pail[\\/]dist/.test(t),"pailFileFilter");class te extends J.AbstractPrettyReporter{static{n(this,"SimpleReporter")}static{T(this,"SimpleReporter")}#e;#t;#r;#i=!1;#s;#o;constructor(e={}){const{error:s,inspect:i,...a}=e;super({uppercase:{label:!0,...a.uppercase},...a}),this.#s={...c.u,indent:void 0,...i},this.#o={...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}=c.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:F}=e,{color:P}=this._loggerTypes[F.name],M=P?z[P]:r.white,l=y.map(()=>" ").join(""),o=[];if(y.length>0&&o.push(l+r.grey("["+y.at(-1)+"]")+" "),u&&o.push(r.grey(this._styles.dateFormatter(typeof u=="string"?new Date(u):u))+" "),a)o.push(r.bold(M(a)));else{const h=J.s(this._loggerTypes);h.length>0&&o.push(r.grey(" ".repeat(h.length)))}const q=k.s(this._loggerTypes);m?o.push(r.bold(M(c.n$1(m,this._styles)))+" "," ".repeat(q.length-c.stringLength(m))):o.push(" ".repeat(q.length+1)),x&&o.push(r.bgGrey.white("["+x+"x]")+" "),Array.isArray(v)&&v.length>0&&o.push(r.grey("["+v.join(" > ")+"]")+" "),b&&o.push(r.grey("["+(this._styles.underline.prefix?r.underline(b):b)+"]")+" ");const A=c.stringLength(o.join(""));if(g!==k.EMPTY_SYMBOL){const h=typeof g=="string"?g:L.inspect(g,this.#s);o.push(l+c.wrapAnsi(h,i-3,{hard:!0,trim:!1,wordWrap:!0}))}if(R){let h=!1;o.push(...R.map(p=>{if(p instanceof Error)return h=!0,`
|
|
4
4
|
|
|
5
|
-
`+S.renderError(p,{...this.#
|
|
5
|
+
`+S.renderError(p,{...this.#o,filterStacktrace:_,prefix:l});if(typeof p=="object")return" "+L.inspect(p,this.#s);const C=(h?`
|
|
6
6
|
|
|
7
|
-
`:" ")+p;return h=!1
|
|
7
|
+
`:" ")+p;return h=!1,C}))}if(j&&o.push(S.renderError(j,{...this.#o,filterStacktrace:_,prefix:l})),E&&o.push(`
|
|
8
8
|
|
|
9
|
-
`+S.renderError(E,{...this.#
|
|
10
|
-
`,r.grey("Caller: ")," ".repeat(
|
|
11
|
-
`)}return
|
|
12
|
-
`),0):
|
|
13
|
-
`,a)}}exports.PrettyReporter=
|
|
9
|
+
`+S.renderError(E,{...this.#o,filterStacktrace:_,hideErrorCauseCodeView:!0,hideErrorCodeView:!0,hideErrorErrorsCodeView:!0,hideMessage:!0,prefix:l})),w&&o.push(" "+l+r.grey(this._styles.underline.suffix?r.underline(w):w)),d){const h=d.name+(d.line?":"+d.line:"");o.push(`
|
|
10
|
+
`,r.grey("Caller: ")," ".repeat(A-8),h,`
|
|
11
|
+
`)}return o.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):c.n(e+`
|
|
13
|
+
`,a)}}exports.PrettyReporter=c.PrettyReporter;exports.JsonFileReporter=N;exports.JsonReporter=Z;exports.SimpleReporter=te;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Options } from 'rotating-file-stream';
|
|
2
|
-
import { A as AbstractJsonReporter, P as PrettyStyleOptions,
|
|
2
|
+
import { a as AbstractJsonReporterOptions, A as AbstractJsonReporter, P as PrettyStyleOptions, b as AbstractPrettyReporter } from './shared/pail.5D809X_A.cjs';
|
|
3
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
4
|
import { RenderErrorOptions } from '@visulima/error/error';
|
|
5
5
|
import { Options as Options$1 } from '@visulima/inspector';
|
|
@@ -14,7 +14,7 @@ declare class RotatingFileStream {
|
|
|
14
14
|
end(): void;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
type FileReporterOptions = Options & {
|
|
17
|
+
type FileReporterOptions = AbstractJsonReporterOptions & Options & {
|
|
18
18
|
filePath: string;
|
|
19
19
|
writeImmediately?: boolean;
|
|
20
20
|
};
|
|
@@ -26,15 +26,15 @@ declare class JsonFileReporter<L extends string = string> extends AbstractJsonRe
|
|
|
26
26
|
|
|
27
27
|
declare class JsonReporter<L extends string = string> extends AbstractJsonReporter<L> implements StreamAwareReporter<L> {
|
|
28
28
|
#private;
|
|
29
|
-
constructor();
|
|
29
|
+
constructor(options?: Partial<AbstractJsonReporterOptions>);
|
|
30
30
|
setStdout(stdout_: NodeJS.WriteStream): void;
|
|
31
31
|
setStderr(stderr_: NodeJS.WriteStream): void;
|
|
32
32
|
protected _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
type PrettyReporterOptions = PrettyStyleOptions & {
|
|
36
|
-
error: Omit<RenderErrorOptions, "color | prefix | indentation"
|
|
37
|
-
inspect: Options$1
|
|
36
|
+
error: Partial<Omit<RenderErrorOptions, "color | prefix | indentation">>;
|
|
37
|
+
inspect: Partial<Options$1>;
|
|
38
38
|
};
|
|
39
39
|
declare class PrettyReporter<T extends string = string, L extends string = string> extends AbstractPrettyReporter<T, L> implements InteractiveStreamReporter<L> {
|
|
40
40
|
#private;
|
|
@@ -49,8 +49,8 @@ declare class PrettyReporter<T extends string = string, L extends string = strin
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
type SimpleReporterOptions = PrettyStyleOptions & {
|
|
52
|
-
error: Omit<RenderErrorOptions$1, "color | prefix | indentation"
|
|
53
|
-
inspect: Options$1
|
|
52
|
+
error: Partial<Omit<RenderErrorOptions$1, "color | prefix | indentation">>;
|
|
53
|
+
inspect: Partial<Options$1>;
|
|
54
54
|
};
|
|
55
55
|
declare class SimpleReporter<T extends string = string, L extends string = string> extends AbstractPrettyReporter<T, L> implements InteractiveStreamReporter<L> {
|
|
56
56
|
#private;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Options } from 'rotating-file-stream';
|
|
2
|
-
import { A as AbstractJsonReporter, P as PrettyStyleOptions,
|
|
2
|
+
import { a as AbstractJsonReporterOptions, A as AbstractJsonReporter, P as PrettyStyleOptions, b as AbstractPrettyReporter } from './shared/pail.B3zJX3TP.mjs';
|
|
3
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
4
|
import { RenderErrorOptions } from '@visulima/error/error';
|
|
5
5
|
import { Options as Options$1 } from '@visulima/inspector';
|
|
@@ -14,7 +14,7 @@ declare class RotatingFileStream {
|
|
|
14
14
|
end(): void;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
type FileReporterOptions = Options & {
|
|
17
|
+
type FileReporterOptions = AbstractJsonReporterOptions & Options & {
|
|
18
18
|
filePath: string;
|
|
19
19
|
writeImmediately?: boolean;
|
|
20
20
|
};
|
|
@@ -26,15 +26,15 @@ declare class JsonFileReporter<L extends string = string> extends AbstractJsonRe
|
|
|
26
26
|
|
|
27
27
|
declare class JsonReporter<L extends string = string> extends AbstractJsonReporter<L> implements StreamAwareReporter<L> {
|
|
28
28
|
#private;
|
|
29
|
-
constructor();
|
|
29
|
+
constructor(options?: Partial<AbstractJsonReporterOptions>);
|
|
30
30
|
setStdout(stdout_: NodeJS.WriteStream): void;
|
|
31
31
|
setStderr(stderr_: NodeJS.WriteStream): void;
|
|
32
32
|
protected _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
type PrettyReporterOptions = PrettyStyleOptions & {
|
|
36
|
-
error: Omit<RenderErrorOptions, "color | prefix | indentation"
|
|
37
|
-
inspect: Options$1
|
|
36
|
+
error: Partial<Omit<RenderErrorOptions, "color | prefix | indentation">>;
|
|
37
|
+
inspect: Partial<Options$1>;
|
|
38
38
|
};
|
|
39
39
|
declare class PrettyReporter<T extends string = string, L extends string = string> extends AbstractPrettyReporter<T, L> implements InteractiveStreamReporter<L> {
|
|
40
40
|
#private;
|
|
@@ -49,8 +49,8 @@ declare class PrettyReporter<T extends string = string, L extends string = strin
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
type SimpleReporterOptions = PrettyStyleOptions & {
|
|
52
|
-
error: Omit<RenderErrorOptions$1, "color | prefix | indentation"
|
|
53
|
-
inspect: Options$1
|
|
52
|
+
error: Partial<Omit<RenderErrorOptions$1, "color | prefix | indentation">>;
|
|
53
|
+
inspect: Partial<Options$1>;
|
|
54
54
|
};
|
|
55
55
|
declare class SimpleReporter<T extends string = string, L extends string = string> extends AbstractPrettyReporter<T, L> implements InteractiveStreamReporter<L> {
|
|
56
56
|
#private;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Options } from 'rotating-file-stream';
|
|
2
|
-
import { A as AbstractJsonReporter, P as PrettyStyleOptions,
|
|
2
|
+
import { a as AbstractJsonReporterOptions, A as AbstractJsonReporter, P as PrettyStyleOptions, b as AbstractPrettyReporter } from './shared/pail.COeqT45B.js';
|
|
3
3
|
import { S as StreamAwareReporter, e as LiteralUnion, E as ExtendedRfc5424LogLevels, i as InteractiveStreamReporter, I as InteractiveManager, g as ReadonlyMeta } from './shared/pail.BGWAKixQ.js';
|
|
4
4
|
import { RenderErrorOptions } from '@visulima/error/error';
|
|
5
5
|
import { Options as Options$1 } from '@visulima/inspector';
|
|
@@ -14,7 +14,7 @@ declare class RotatingFileStream {
|
|
|
14
14
|
end(): void;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
type FileReporterOptions = Options & {
|
|
17
|
+
type FileReporterOptions = AbstractJsonReporterOptions & Options & {
|
|
18
18
|
filePath: string;
|
|
19
19
|
writeImmediately?: boolean;
|
|
20
20
|
};
|
|
@@ -26,15 +26,15 @@ declare class JsonFileReporter<L extends string = string> extends AbstractJsonRe
|
|
|
26
26
|
|
|
27
27
|
declare class JsonReporter<L extends string = string> extends AbstractJsonReporter<L> implements StreamAwareReporter<L> {
|
|
28
28
|
#private;
|
|
29
|
-
constructor();
|
|
29
|
+
constructor(options?: Partial<AbstractJsonReporterOptions>);
|
|
30
30
|
setStdout(stdout_: NodeJS.WriteStream): void;
|
|
31
31
|
setStderr(stderr_: NodeJS.WriteStream): void;
|
|
32
32
|
protected _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
type PrettyReporterOptions = PrettyStyleOptions & {
|
|
36
|
-
error: Omit<RenderErrorOptions, "color | prefix | indentation"
|
|
37
|
-
inspect: Options$1
|
|
36
|
+
error: Partial<Omit<RenderErrorOptions, "color | prefix | indentation">>;
|
|
37
|
+
inspect: Partial<Options$1>;
|
|
38
38
|
};
|
|
39
39
|
declare class PrettyReporter<T extends string = string, L extends string = string> extends AbstractPrettyReporter<T, L> implements InteractiveStreamReporter<L> {
|
|
40
40
|
#private;
|
|
@@ -49,8 +49,8 @@ declare class PrettyReporter<T extends string = string, L extends string = strin
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
type SimpleReporterOptions = PrettyStyleOptions & {
|
|
52
|
-
error: Omit<RenderErrorOptions$1, "color | prefix | indentation"
|
|
53
|
-
inspect: Options$1
|
|
52
|
+
error: Partial<Omit<RenderErrorOptions$1, "color | prefix | indentation">>;
|
|
53
|
+
inspect: Partial<Options$1>;
|
|
54
54
|
};
|
|
55
55
|
declare class SimpleReporter<T extends string = string, L extends string = string> extends AbstractPrettyReporter<T, L> implements InteractiveStreamReporter<L> {
|
|
56
56
|
#private;
|
package/dist/reporter.server.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var V=Object.defineProperty;var a=(e,t)=>V(e,"name",{value:t,configurable:!0});import{
|
|
1
|
+
var V=Object.defineProperty;var a=(e,t)=>V(e,"name",{value:t,configurable:!0});import{A as T}from"./shared/pail.DzwLG-N9.mjs";import{stdout as F,stderr as L}from"node:process";import{n as C,u as W,t as Y,a as q,s as $,w as D}from"./shared/pail.C2dcjpQV.mjs";import{P as Mt}from"./shared/pail.C2dcjpQV.mjs";import G,{green as H,cyan as K,red as v,greenBright as N,white as Q,grey as h,bold as k,bgGrey as U,underline as A}from"@visulima/colorize";import{renderError as b}from"@visulima/error";import{inspect as O}from"@visulima/inspector";import{s as X,E as Z}from"./shared/pail.C1VNf0a-.mjs";import{A as tt,s as et}from"./shared/pail.CeGWBihI.mjs";
|
|
2
2
|
// -- pack CommonJS Shims --
|
|
3
3
|
import __cjs_url__ from "node:url";
|
|
4
4
|
import __cjs_path__ from "node:path";
|
|
@@ -6,16 +6,16 @@ import __cjs_mod__ from "node:module";
|
|
|
6
6
|
const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = __cjs_path__.dirname(__filename);
|
|
8
8
|
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
9
|
-
var rt=Object.defineProperty,st=a((e,t)=>rt(e,"name",{value:t,configurable:!0}),"e");class it{static{a(this,"n")}static{st(this,"SafeStreamHandler")}#t=!0;#e;#r;constructor(t,r){this.#e=t,this.#r=r}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.#r+'. Write will be dropped: "'+t+'"');return}this.#t=!1,this.#e.on("error",r=>{throw r}),this.#e.on("drain",()=>{this.#t=!0}),this.#e.on("finish",()=>{this.#t=!0}),this.#t=this.#e.write(t,()=>{})}}var at=Object.defineProperty,ot=a((e,t)=>at(e,"name",{value:t,configurable:!0}),"r$
|
|
10
|
-
`)}}var pt=Object.defineProperty,ct=a((e,t)=>pt(e,"name",{value:t,configurable:!0}),"
|
|
11
|
-
`,s)}}const
|
|
9
|
+
var rt=Object.defineProperty,st=a((e,t)=>rt(e,"name",{value:t,configurable:!0}),"e$1");class it{static{a(this,"n")}static{st(this,"SafeStreamHandler")}#t=!0;#e;#r;constructor(t,r){this.#e=t,this.#r=r}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.#r+'. Write will be dropped: "'+t+'"');return}this.#t=!1,this.#e.on("error",r=>{throw r}),this.#e.on("drain",()=>{this.#t=!0}),this.#e.on("finish",()=>{this.#t=!0}),this.#t=this.#e.write(t,()=>{})}}var at=Object.defineProperty,ot=a((e,t)=>at(e,"name",{value:t,configurable:!0}),"r$1");class nt{static{a(this,"o")}static{ot(this,"RotatingFileStream")}#t;#e;#r;#i;#s;constructor(t,r=!1,s={}){if(this.#t=t,this.#e=r,this.#i=s,!this.#e){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.#t,s)}}write(t){let r=this.#r;this.#e&&(r=this.#s(this.#t,this.#i));const s=new it(r,this.#t);s.write(t),this.#e&&s.end()}end(){this.#r!==void 0&&this.#r.end()}}var ht=Object.defineProperty,lt=a((e,t)=>ht(e,"name",{value:t,configurable:!0}),"r");class xt extends T{static{a(this,"JsonFileReporter")}static{lt(this,"JsonFileReporter")}stream;constructor(t){super();const{filePath:r,writeImmediately:s=!1,...o}=t;this.stream=new nt(r,s,{compress:"gzip",interval:"1d",size:"10M",...o})}_log(t){this.stream.write(t+`
|
|
10
|
+
`)}}var pt=Object.defineProperty,ct=a((e,t)=>pt(e,"name",{value:t,configurable:!0}),"e");class ut extends T{static{a(this,"d")}static{ct(this,"JsonReporter")}#t;#e;constructor(t={}){super(t),this.#t=F,this.#e=L}setStdout(t){this.#t=t}setStderr(t){this.#e=t}_log(t,r){const s=["error","warn"].includes(r)?this.#e:this.#t;C(t+`
|
|
11
|
+
`,s)}}const Rt=ut;var dt=Object.defineProperty,I=a((e,t)=>dt(e,"name",{value:t,configurable:!0}),"L");const S=I(e=>!/[\\/]pail[\\/]dist/.test(e),"pailFileFilter");class jt extends tt{static{a(this,"SimpleReporter")}static{I(this,"SimpleReporter")}#t;#e;#r;#i=!1;#s;#a;constructor(t={}){const{error:r,inspect:s,...o}=t;super({uppercase:{label:!0,...o.uppercase},...o}),this.#s={...W,indent:void 0,...s},this.#a={...r,color:{fileLine:H,hint:K,marker:v,message:v,method:N,title:v}},this.#t=F,this.#e=L}setStdout(t){this.#t=t}setStderr(t){this.#e=t}setInteractiveManager(t){this.#r=t}setIsInteractive(t){this.#i=t}log(t){this._log(this._formatMessage(t),t.type.level)}_formatMessage(t){const{columns:r}=Y();let s=r;typeof this._styles.messageLength=="number"&&(s=this._styles.messageLength);const{badge:o,context:_,date:c,error:x,file:u,groups:m,label:f,message:d,prefix:g,repeated:R,scope:y,suffix:w,traceError:j,type:J}=t,{color:E}=this._loggerTypes[J.name],P=E?G[E]:Q,l=m.map(()=>" ").join(""),i=[];if(m.length>0&&i.push(l+h("["+m.at(-1)+"]")+" "),c&&i.push(h(this._styles.dateFormatter(typeof c=="string"?new Date(c):c))+" "),o)i.push(k(P(o)));else{const n=et(this._loggerTypes);n.length>0&&i.push(h(" ".repeat(n.length)))}const M=X(this._loggerTypes);f?i.push(k(P(q(f,this._styles)))+" "," ".repeat(M.length-$(f))):i.push(" ".repeat(M.length+1)),R&&i.push(U.white("["+R+"x]")+" "),Array.isArray(y)&&y.length>0&&i.push(h("["+y.join(" > ")+"]")+" "),g&&i.push(h("["+(this._styles.underline.prefix?A(g):g)+"]")+" ");const z=$(i.join(""));if(d!==Z){const n=typeof d=="string"?d:O(d,this.#s);i.push(l+D(n,s-3,{hard:!0,trim:!1,wordWrap:!0}))}if(_){let n=!1;i.push(..._.map(p=>{if(p instanceof Error)return n=!0,`
|
|
12
12
|
|
|
13
|
-
`+b(p,{...this.#a,filterStacktrace:S,prefix:l});if(typeof p=="object")return" "+
|
|
13
|
+
`+b(p,{...this.#a,filterStacktrace:S,prefix:l});if(typeof p=="object")return" "+O(p,this.#s);const B=(n?`
|
|
14
14
|
|
|
15
|
-
`:" ")+p;return n=!1,B}))}if(x&&i.push(b(x,{...this.#a,filterStacktrace:S,prefix:l})),
|
|
15
|
+
`:" ")+p;return n=!1,B}))}if(x&&i.push(b(x,{...this.#a,filterStacktrace:S,prefix:l})),j&&i.push(`
|
|
16
16
|
|
|
17
|
-
`+b(
|
|
18
|
-
`,h("Caller: ")," ".repeat(
|
|
17
|
+
`+b(j,{...this.#a,filterStacktrace:S,hideErrorCauseCodeView:!0,hideErrorCodeView:!0,hideErrorErrorsCodeView:!0,hideMessage:!0,prefix:l})),w&&i.push(" "+l+h(this._styles.underline.suffix?A(w):w)),u){const n=u.name+(u.line?":"+u.line:"");i.push(`
|
|
18
|
+
`,h("Caller: ")," ".repeat(z-8),n,`
|
|
19
19
|
`)}return i.join("")}_log(t,r){const s=["error","trace","warn"].includes(r)?"stderr":"stdout",o=s==="stderr"?this.#e:this.#t;this.#i&&this.#r!==void 0&&o.isTTY?this.#r.update(s,t.split(`
|
|
20
20
|
`),0):C(t+`
|
|
21
|
-
`,o)}}export{xt as JsonFileReporter,
|
|
21
|
+
`,o)}}export{xt as JsonFileReporter,Rt as JsonReporter,Mt as PrettyReporter,jt as SimpleReporter};
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { stringify } from 'safe-stable-stringify';
|
|
2
2
|
import { h as StringifyAwareReporter, g as ReadonlyMeta, e as LiteralUnion, E as ExtendedRfc5424LogLevels, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, a as DefaultLogTypes } from './pail.BGWAKixQ.cjs';
|
|
3
3
|
|
|
4
|
+
type AbstractJsonReporterOptions = {
|
|
5
|
+
error: Partial<{
|
|
6
|
+
exclude?: string[];
|
|
7
|
+
maxDepth?: number;
|
|
8
|
+
useToJSON?: boolean;
|
|
9
|
+
}>;
|
|
10
|
+
};
|
|
4
11
|
declare abstract class AbstractJsonReporter<L extends string = string> implements StringifyAwareReporter<L> {
|
|
5
12
|
protected stringify: typeof stringify | undefined;
|
|
13
|
+
protected errorOptions: AbstractJsonReporterOptions["error"];
|
|
14
|
+
constructor(options?: Partial<AbstractJsonReporterOptions>);
|
|
6
15
|
setStringify(function_: any): void;
|
|
7
16
|
log(meta: ReadonlyMeta<L>): void;
|
|
8
17
|
protected abstract _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
|
|
@@ -31,4 +40,4 @@ type PrettyStyleOptions = {
|
|
|
31
40
|
};
|
|
32
41
|
};
|
|
33
42
|
|
|
34
|
-
export { AbstractJsonReporter as A, type PrettyStyleOptions as P,
|
|
43
|
+
export { AbstractJsonReporter as A, type PrettyStyleOptions as P, type AbstractJsonReporterOptions as a, AbstractPrettyReporter as b };
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { stringify } from 'safe-stable-stringify';
|
|
2
2
|
import { h as StringifyAwareReporter, g as ReadonlyMeta, e as LiteralUnion, E as ExtendedRfc5424LogLevels, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, a as DefaultLogTypes } from './pail.BGWAKixQ.mjs';
|
|
3
3
|
|
|
4
|
+
type AbstractJsonReporterOptions = {
|
|
5
|
+
error: Partial<{
|
|
6
|
+
exclude?: string[];
|
|
7
|
+
maxDepth?: number;
|
|
8
|
+
useToJSON?: boolean;
|
|
9
|
+
}>;
|
|
10
|
+
};
|
|
4
11
|
declare abstract class AbstractJsonReporter<L extends string = string> implements StringifyAwareReporter<L> {
|
|
5
12
|
protected stringify: typeof stringify | undefined;
|
|
13
|
+
protected errorOptions: AbstractJsonReporterOptions["error"];
|
|
14
|
+
constructor(options?: Partial<AbstractJsonReporterOptions>);
|
|
6
15
|
setStringify(function_: any): void;
|
|
7
16
|
log(meta: ReadonlyMeta<L>): void;
|
|
8
17
|
protected abstract _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
|
|
@@ -31,4 +40,4 @@ type PrettyStyleOptions = {
|
|
|
31
40
|
};
|
|
32
41
|
};
|
|
33
42
|
|
|
34
|
-
export { AbstractJsonReporter as A, type PrettyStyleOptions as P,
|
|
43
|
+
export { AbstractJsonReporter as A, type PrettyStyleOptions as P, type AbstractJsonReporterOptions as a, AbstractPrettyReporter as b };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var t=(r,e)=>o(r,"name",{value:e,configurable:!0});const c=require("./pail.3G15muTS.cjs"),n=require("./pail.DumOHFo9.cjs");var a=Object.defineProperty,i=t((r,e)=>a(r,"name",{value:e,configurable:!0}),"e");class u extends n.AbstractJsonReporter{static{t(this,"p")}static{i(this,"JsonReporter")}constructor(e={}){super(e)}_log(e,s){c.t(s)(e)}}const p=u;exports.i=p;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var sD=Object.defineProperty;var C=(D,u)=>sD(D,"name",{value:u,configurable:!0});import b,{stdout as iD,stderr as oD}from"node:process";import aD,{yellow as O,magenta as AD,bold as DD,red as _,cyan as uD,green as R,grey as f,underline as P,greenBright as lD,white as cD,bgGrey as fD}from"@visulima/colorize";import{renderError as I}from"@visulima/error/error";import{inspect as K}from"@visulima/inspector";import{execFileSync as gD}from"node:child_process";import x from"node:fs";import hD from"node:tty";import{s as pD,E as dD}from"./pail.C1VNf0a-.mjs";import{A as mD,s as bD}from"./pail.CeGWBihI.mjs";const FD=80,eD=24,W=C((D,u,{shell:F,env:e}={})=>gD(D,u,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:500,shell:F,env:e}).trim(),"exec$1"),w=C((D,u)=>({columns:Number.parseInt(D,10),rows:Number.parseInt(u,10)}),"create"),ED=C((D,u)=>{const{columns:F,rows:e}=w(D,u);if(!(Number.isNaN(F)||Number.isNaN(e))&&!(F===FD&&e===eD))return{columns:F,rows:e}},"createIfNotDefault");function yD(){const{env:D,stdout:u,stderr:F}=b;if(u?.columns&&u?.rows)return w(u.columns,u.rows);if(F?.columns&&F?.rows)return w(F.columns,F.rows);if(D.COLUMNS&&D.LINES)return w(D.COLUMNS,D.LINES);const e={columns:FD,rows:eD};return b.platform==="win32"?$()??e:b.platform==="darwin"?Z()??$()??e:Z()??$()??xD()??e}C(yD,"terminalSize");const Z=C(()=>{try{const D=b.platform==="darwin"?x.constants.O_EVTONLY|x.constants.O_NONBLOCK:x.constants.O_NONBLOCK,{columns:u,rows:F}=hD.WriteStream(x.openSync("/dev/tty",D));return{columns:u,rows:F}}catch{}},"devTty"),$=C(()=>{try{const D=W("tput",["cols"],{env:{TERM:"dumb",...b.env}}),u=W("tput",["lines"],{env:{TERM:"dumb",...b.env}});if(D&&u)return ED(D,u)}catch{}},"tput"),xD=C(()=>{try{const D=W("resize",["-u"]).match(/\d+/g);if(D.length===2)return ED(D[0],D[1])}catch{}},"resize");function _D({onlyFirst:D=!1}={}){const u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,D?void 0:"g")}C(_D,"ansiRegex");const wD=_D();function z(D){if(typeof D!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(wD,"")}C(z,"stripAnsi");function SD(D){return D===161||D===164||D===167||D===168||D===170||D===173||D===174||D>=176&&D<=180||D>=182&&D<=186||D>=188&&D<=191||D===198||D===208||D===215||D===216||D>=222&&D<=225||D===230||D>=232&&D<=234||D===236||D===237||D===240||D===242||D===243||D>=247&&D<=250||D===252||D===254||D===257||D===273||D===275||D===283||D===294||D===295||D===299||D>=305&&D<=307||D===312||D>=319&&D<=322||D===324||D>=328&&D<=331||D===333||D===338||D===339||D===358||D===359||D===363||D===462||D===464||D===466||D===468||D===470||D===472||D===474||D===476||D===593||D===609||D===708||D===711||D>=713&&D<=715||D===717||D===720||D>=728&&D<=731||D===733||D===735||D>=768&&D<=879||D>=913&&D<=929||D>=931&&D<=937||D>=945&&D<=961||D>=963&&D<=969||D===1025||D>=1040&&D<=1103||D===1105||D===8208||D>=8211&&D<=8214||D===8216||D===8217||D===8220||D===8221||D>=8224&&D<=8226||D>=8228&&D<=8231||D===8240||D===8242||D===8243||D===8245||D===8251||D===8254||D===8308||D===8319||D>=8321&&D<=8324||D===8364||D===8451||D===8453||D===8457||D===8467||D===8470||D===8481||D===8482||D===8486||D===8491||D===8531||D===8532||D>=8539&&D<=8542||D>=8544&&D<=8555||D>=8560&&D<=8569||D===8585||D>=8592&&D<=8601||D===8632||D===8633||D===8658||D===8660||D===8679||D===8704||D===8706||D===8707||D===8711||D===8712||D===8715||D===8719||D===8721||D===8725||D===8730||D>=8733&&D<=8736||D===8739||D===8741||D>=8743&&D<=8748||D===8750||D>=8756&&D<=8759||D===8764||D===8765||D===8776||D===8780||D===8786||D===8800||D===8801||D>=8804&&D<=8807||D===8810||D===8811||D===8814||D===8815||D===8834||D===8835||D===8838||D===8839||D===8853||D===8857||D===8869||D===8895||D===8978||D>=9312&&D<=9449||D>=9451&&D<=9547||D>=9552&&D<=9587||D>=9600&&D<=9615||D>=9618&&D<=9621||D===9632||D===9633||D>=9635&&D<=9641||D===9650||D===9651||D===9654||D===9655||D===9660||D===9661||D===9664||D===9665||D>=9670&&D<=9672||D===9675||D>=9678&&D<=9681||D>=9698&&D<=9701||D===9711||D===9733||D===9734||D===9737||D===9742||D===9743||D===9756||D===9758||D===9792||D===9794||D===9824||D===9825||D>=9827&&D<=9829||D>=9831&&D<=9834||D===9836||D===9837||D===9839||D===9886||D===9887||D===9919||D>=9926&&D<=9933||D>=9935&&D<=9939||D>=9941&&D<=9953||D===9955||D===9960||D===9961||D>=9963&&D<=9969||D===9972||D>=9974&&D<=9977||D===9979||D===9980||D===9982||D===9983||D===10045||D>=10102&&D<=10111||D>=11094&&D<=11097||D>=12872&&D<=12879||D>=57344&&D<=63743||D>=65024&&D<=65039||D===65533||D>=127232&&D<=127242||D>=127248&&D<=127277||D>=127280&&D<=127337||D>=127344&&D<=127373||D===127375||D===127376||D>=127387&&D<=127404||D>=917760&&D<=917999||D>=983040&&D<=1048573||D>=1048576&&D<=1114109}C(SD,"isAmbiguous");function vD(D){return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510}C(vD,"isFullWidth");function ND(D){return D>=4352&&D<=4447||D===8986||D===8987||D===9001||D===9002||D>=9193&&D<=9196||D===9200||D===9203||D===9725||D===9726||D===9748||D===9749||D>=9800&&D<=9811||D===9855||D===9875||D===9889||D===9898||D===9899||D===9917||D===9918||D===9924||D===9925||D===9934||D===9940||D===9962||D===9970||D===9971||D===9973||D===9978||D===9981||D===9989||D===9994||D===9995||D===10024||D===10060||D===10062||D>=10067&&D<=10069||D===10071||D>=10133&&D<=10135||D===10160||D===10175||D===11035||D===11036||D===11088||D===11093||D>=11904&&D<=11929||D>=11931&&D<=12019||D>=12032&&D<=12245||D>=12272&&D<=12287||D>=12289&&D<=12350||D>=12353&&D<=12438||D>=12441&&D<=12543||D>=12549&&D<=12591||D>=12593&&D<=12686||D>=12688&&D<=12771||D>=12783&&D<=12830||D>=12832&&D<=12871||D>=12880&&D<=19903||D>=19968&&D<=42124||D>=42128&&D<=42182||D>=43360&&D<=43388||D>=44032&&D<=55203||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65106||D>=65108&&D<=65126||D>=65128&&D<=65131||D>=94176&&D<=94180||D===94192||D===94193||D>=94208&&D<=100343||D>=100352&&D<=101589||D>=101632&&D<=101640||D>=110576&&D<=110579||D>=110581&&D<=110587||D===110589||D===110590||D>=110592&&D<=110882||D===110898||D>=110928&&D<=110930||D===110933||D>=110948&&D<=110951||D>=110960&&D<=111355||D===126980||D===127183||D===127374||D>=127377&&D<=127386||D>=127488&&D<=127490||D>=127504&&D<=127547||D>=127552&&D<=127560||D===127568||D===127569||D>=127584&&D<=127589||D>=127744&&D<=127776||D>=127789&&D<=127797||D>=127799&&D<=127868||D>=127870&&D<=127891||D>=127904&&D<=127946||D>=127951&&D<=127955||D>=127968&&D<=127984||D===127988||D>=127992&&D<=128062||D===128064||D>=128066&&D<=128252||D>=128255&&D<=128317||D>=128331&&D<=128334||D>=128336&&D<=128359||D===128378||D===128405||D===128406||D===128420||D>=128507&&D<=128591||D>=128640&&D<=128709||D===128716||D>=128720&&D<=128722||D>=128725&&D<=128727||D>=128732&&D<=128735||D===128747||D===128748||D>=128756&&D<=128764||D>=128992&&D<=129003||D===129008||D>=129292&&D<=129338||D>=129340&&D<=129349||D>=129351&&D<=129535||D>=129648&&D<=129660||D>=129664&&D<=129672||D>=129680&&D<=129725||D>=129727&&D<=129733||D>=129742&&D<=129755||D>=129760&&D<=129768||D>=129776&&D<=129784||D>=131072&&D<=196605||D>=196608&&D<=262141}C(ND,"isWide");function TD(D){if(!Number.isSafeInteger(D))throw new TypeError(`Expected a code point, got \`${typeof D}\`.`)}C(TD,"validate");function OD(D,{ambiguousAsWide:u=!1}={}){return TD(D),vD(D)||ND(D)||u&&SD(D)?2:1}C(OD,"eastAsianWidth");const ID=C(()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,"emojiRegex"),$D=new Intl.Segmenter,MD=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function y(D,u={}){if(typeof D!="string"||D.length===0)return 0;const{ambiguousIsNarrow:F=!0,countAnsiEscapeCodes:e=!1}=u;if(e||(D=z(D)),D.length===0)return 0;let t=0;const s={ambiguousAsWide:!F};for(const{segment:r}of $D.segment(D)){const E=r.codePointAt(0);if(!(E<=31||E>=127&&E<=159)&&!(E>=8203&&E<=8207||E===65279)&&!(E>=768&&E<=879||E>=6832&&E<=6911||E>=7616&&E<=7679||E>=8400&&E<=8447||E>=65056&&E<=65071)&&!(E>=55296&&E<=57343)&&!(E>=65024&&E<=65039)&&!MD.test(r)){if(ID().test(r)){t+=2;continue}t+=OD(E,s)}}return t}C(y,"stringWidth");const M=10,q=C((D=0)=>u=>`\x1B[${u+D}m`,"wrapAnsi16"),H=C((D=0)=>u=>`\x1B[${38+D};5;${u}m`,"wrapAnsi256"),J=C((D=0)=>(u,F,e)=>`\x1B[${38+D};2;${u};${F};${e}m`,"wrapAnsi16m"),n={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(n.modifier);const jD=Object.keys(n.color),LD=Object.keys(n.bgColor);[...jD,...LD];function kD(){const D=new Map;for(const[u,F]of Object.entries(n)){for(const[e,t]of Object.entries(F))n[e]={open:`\x1B[${t[0]}m`,close:`\x1B[${t[1]}m`},F[e]=n[e],D.set(t[0],t[1]);Object.defineProperty(n,u,{value:F,enumerable:!1})}return Object.defineProperty(n,"codes",{value:D,enumerable:!1}),n.color.close="\x1B[39m",n.bgColor.close="\x1B[49m",n.color.ansi=q(),n.color.ansi256=H(),n.color.ansi16m=J(),n.bgColor.ansi=q(M),n.bgColor.ansi256=H(M),n.bgColor.ansi16m=J(M),Object.defineProperties(n,{rgbToAnsi256:{value:C((u,F,e)=>u===F&&F===e?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(F/255*5)+Math.round(e/255*5),"value"),enumerable:!1},hexToRgb:{value:C(u=>{const F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!F)return[0,0,0];let[e]=F;e.length===3&&(e=[...e].map(s=>s+s).join(""));const t=Number.parseInt(e,16);return[t>>16&255,t>>8&255,t&255]},"value"),enumerable:!1},hexToAnsi256:{value:C(u=>n.rgbToAnsi256(...n.hexToRgb(u)),"value"),enumerable:!1},ansi256ToAnsi:{value:C(u=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let F,e,t;if(u>=232)F=((u-232)*10+8)/255,e=F,t=F;else{u-=16;const E=u%36;F=Math.floor(u/36)/5,e=Math.floor(E/6)/5,t=E%6/5}const s=Math.max(F,e,t)*2;if(s===0)return 30;let r=30+(Math.round(t)<<2|Math.round(e)<<1|Math.round(F));return s===2&&(r+=60),r},"value"),enumerable:!1},rgbToAnsi:{value:C((u,F,e)=>n.ansi256ToAnsi(n.rgbToAnsi256(u,F,e)),"value"),enumerable:!1},hexToAnsi:{value:C(u=>n.ansi256ToAnsi(n.hexToAnsi256(u)),"value"),enumerable:!1}}),n}C(kD,"assembleStyles");const RD=kD(),v=new Set(["\x1B",""]),PD=39,G="\x07",CD="[",WD="]",tD="m",S=`${WD}8;;`,Q=C(D=>`${v.values().next().value}${CD}${D}${tD}`,"wrapAnsiCode"),X=C(D=>`${v.values().next().value}${S}${D}${G}`,"wrapAnsiHyperlink"),zD=C(D=>D.split(" ").map(u=>y(u)),"wordLengths"),j=C((D,u,F)=>{const e=[...u];let t=!1,s=!1,r=y(z(D.at(-1)));for(const[E,a]of e.entries()){const g=y(a);if(r+g<=F?D[D.length-1]+=a:(D.push(a),r=0),v.has(a)&&(t=!0,s=e.slice(E+1,E+1+S.length).join("")===S),t){s?a===G&&(t=!1,s=!1):a===tD&&(t=!1);continue}r+=g,r===F&&E<e.length-1&&(D.push(""),r=0)}!r&&D.at(-1).length>0&&D.length>1&&(D[D.length-2]+=D.pop())},"wrapWord"),GD=C(D=>{const u=D.split(" ");let F=u.length;for(;F>0&&!(y(u[F-1])>0);)F--;return F===u.length?D:u.slice(0,F).join(" ")+u.slice(F).join("")},"stringVisibleTrimSpacesRight"),VD=C((D,u,F={})=>{if(F.trim!==!1&&D.trim()==="")return"";let e="",t,s;const r=zD(D);let E=[""];for(const[i,A]of D.split(" ").entries()){F.trim!==!1&&(E[E.length-1]=E.at(-1).trimStart());let o=y(E.at(-1));if(i!==0&&(o>=u&&(F.wordWrap===!1||F.trim===!1)&&(E.push(""),o=0),(o>0||F.trim===!1)&&(E[E.length-1]+=" ",o++)),F.hard&&r[i]>u){const l=u-o,h=1+Math.floor((r[i]-l-1)/u);Math.floor((r[i]-1)/u)<h&&E.push(""),j(E,A,u);continue}if(o+r[i]>u&&o>0&&r[i]>0){if(F.wordWrap===!1&&o<u){j(E,A,u);continue}E.push("")}if(o+r[i]>u&&F.wordWrap===!1){j(E,A,u);continue}E[E.length-1]+=A}F.trim!==!1&&(E=E.map(i=>GD(i)));const a=E.join(`
|
|
1
|
+
var sD=Object.defineProperty;var C=(D,u)=>sD(D,"name",{value:u,configurable:!0});import b,{stdout as iD,stderr as oD}from"node:process";import aD,{yellow as O,magenta as AD,bold as DD,red as _,cyan as uD,green as R,grey as f,underline as P,greenBright as lD,white as cD,bgGrey as fD}from"@visulima/colorize";import{renderError as $}from"@visulima/error/error";import{inspect as K}from"@visulima/inspector";import{execFileSync as gD}from"node:child_process";import x from"node:fs";import hD from"node:tty";import{s as pD,E as dD}from"./pail.C1VNf0a-.mjs";import{A as mD,s as bD}from"./pail.CeGWBihI.mjs";const FD=80,eD=24,W=C((D,u,{shell:F,env:e}={})=>gD(D,u,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:500,shell:F,env:e}).trim(),"exec$1"),w=C((D,u)=>({columns:Number.parseInt(D,10),rows:Number.parseInt(u,10)}),"create"),ED=C((D,u)=>{const{columns:F,rows:e}=w(D,u);if(!(Number.isNaN(F)||Number.isNaN(e))&&!(F===FD&&e===eD))return{columns:F,rows:e}},"createIfNotDefault");function yD(){const{env:D,stdout:u,stderr:F}=b;if(u?.columns&&u?.rows)return w(u.columns,u.rows);if(F?.columns&&F?.rows)return w(F.columns,F.rows);if(D.COLUMNS&&D.LINES)return w(D.COLUMNS,D.LINES);const e={columns:FD,rows:eD};return b.platform==="win32"?I()??e:b.platform==="darwin"?Z()??I()??e:Z()??I()??xD()??e}C(yD,"terminalSize");const Z=C(()=>{try{const D=b.platform==="darwin"?x.constants.O_EVTONLY|x.constants.O_NONBLOCK:x.constants.O_NONBLOCK,{columns:u,rows:F}=hD.WriteStream(x.openSync("/dev/tty",D));return{columns:u,rows:F}}catch{}},"devTty"),I=C(()=>{try{const D=W("tput",["cols"],{env:{TERM:"dumb",...b.env}}),u=W("tput",["lines"],{env:{TERM:"dumb",...b.env}});if(D&&u)return ED(D,u)}catch{}},"tput"),xD=C(()=>{try{const D=W("resize",["-u"]).match(/\d+/g);if(D.length===2)return ED(D[0],D[1])}catch{}},"resize");function _D({onlyFirst:D=!1}={}){const u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,D?void 0:"g")}C(_D,"ansiRegex");const wD=_D();function z(D){if(typeof D!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(wD,"")}C(z,"stripAnsi");function SD(D){return D===161||D===164||D===167||D===168||D===170||D===173||D===174||D>=176&&D<=180||D>=182&&D<=186||D>=188&&D<=191||D===198||D===208||D===215||D===216||D>=222&&D<=225||D===230||D>=232&&D<=234||D===236||D===237||D===240||D===242||D===243||D>=247&&D<=250||D===252||D===254||D===257||D===273||D===275||D===283||D===294||D===295||D===299||D>=305&&D<=307||D===312||D>=319&&D<=322||D===324||D>=328&&D<=331||D===333||D===338||D===339||D===358||D===359||D===363||D===462||D===464||D===466||D===468||D===470||D===472||D===474||D===476||D===593||D===609||D===708||D===711||D>=713&&D<=715||D===717||D===720||D>=728&&D<=731||D===733||D===735||D>=768&&D<=879||D>=913&&D<=929||D>=931&&D<=937||D>=945&&D<=961||D>=963&&D<=969||D===1025||D>=1040&&D<=1103||D===1105||D===8208||D>=8211&&D<=8214||D===8216||D===8217||D===8220||D===8221||D>=8224&&D<=8226||D>=8228&&D<=8231||D===8240||D===8242||D===8243||D===8245||D===8251||D===8254||D===8308||D===8319||D>=8321&&D<=8324||D===8364||D===8451||D===8453||D===8457||D===8467||D===8470||D===8481||D===8482||D===8486||D===8491||D===8531||D===8532||D>=8539&&D<=8542||D>=8544&&D<=8555||D>=8560&&D<=8569||D===8585||D>=8592&&D<=8601||D===8632||D===8633||D===8658||D===8660||D===8679||D===8704||D===8706||D===8707||D===8711||D===8712||D===8715||D===8719||D===8721||D===8725||D===8730||D>=8733&&D<=8736||D===8739||D===8741||D>=8743&&D<=8748||D===8750||D>=8756&&D<=8759||D===8764||D===8765||D===8776||D===8780||D===8786||D===8800||D===8801||D>=8804&&D<=8807||D===8810||D===8811||D===8814||D===8815||D===8834||D===8835||D===8838||D===8839||D===8853||D===8857||D===8869||D===8895||D===8978||D>=9312&&D<=9449||D>=9451&&D<=9547||D>=9552&&D<=9587||D>=9600&&D<=9615||D>=9618&&D<=9621||D===9632||D===9633||D>=9635&&D<=9641||D===9650||D===9651||D===9654||D===9655||D===9660||D===9661||D===9664||D===9665||D>=9670&&D<=9672||D===9675||D>=9678&&D<=9681||D>=9698&&D<=9701||D===9711||D===9733||D===9734||D===9737||D===9742||D===9743||D===9756||D===9758||D===9792||D===9794||D===9824||D===9825||D>=9827&&D<=9829||D>=9831&&D<=9834||D===9836||D===9837||D===9839||D===9886||D===9887||D===9919||D>=9926&&D<=9933||D>=9935&&D<=9939||D>=9941&&D<=9953||D===9955||D===9960||D===9961||D>=9963&&D<=9969||D===9972||D>=9974&&D<=9977||D===9979||D===9980||D===9982||D===9983||D===10045||D>=10102&&D<=10111||D>=11094&&D<=11097||D>=12872&&D<=12879||D>=57344&&D<=63743||D>=65024&&D<=65039||D===65533||D>=127232&&D<=127242||D>=127248&&D<=127277||D>=127280&&D<=127337||D>=127344&&D<=127373||D===127375||D===127376||D>=127387&&D<=127404||D>=917760&&D<=917999||D>=983040&&D<=1048573||D>=1048576&&D<=1114109}C(SD,"isAmbiguous");function vD(D){return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510}C(vD,"isFullWidth");function ND(D){return D>=4352&&D<=4447||D===8986||D===8987||D===9001||D===9002||D>=9193&&D<=9196||D===9200||D===9203||D===9725||D===9726||D===9748||D===9749||D>=9800&&D<=9811||D===9855||D===9875||D===9889||D===9898||D===9899||D===9917||D===9918||D===9924||D===9925||D===9934||D===9940||D===9962||D===9970||D===9971||D===9973||D===9978||D===9981||D===9989||D===9994||D===9995||D===10024||D===10060||D===10062||D>=10067&&D<=10069||D===10071||D>=10133&&D<=10135||D===10160||D===10175||D===11035||D===11036||D===11088||D===11093||D>=11904&&D<=11929||D>=11931&&D<=12019||D>=12032&&D<=12245||D>=12272&&D<=12287||D>=12289&&D<=12350||D>=12353&&D<=12438||D>=12441&&D<=12543||D>=12549&&D<=12591||D>=12593&&D<=12686||D>=12688&&D<=12771||D>=12783&&D<=12830||D>=12832&&D<=12871||D>=12880&&D<=19903||D>=19968&&D<=42124||D>=42128&&D<=42182||D>=43360&&D<=43388||D>=44032&&D<=55203||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65106||D>=65108&&D<=65126||D>=65128&&D<=65131||D>=94176&&D<=94180||D===94192||D===94193||D>=94208&&D<=100343||D>=100352&&D<=101589||D>=101632&&D<=101640||D>=110576&&D<=110579||D>=110581&&D<=110587||D===110589||D===110590||D>=110592&&D<=110882||D===110898||D>=110928&&D<=110930||D===110933||D>=110948&&D<=110951||D>=110960&&D<=111355||D===126980||D===127183||D===127374||D>=127377&&D<=127386||D>=127488&&D<=127490||D>=127504&&D<=127547||D>=127552&&D<=127560||D===127568||D===127569||D>=127584&&D<=127589||D>=127744&&D<=127776||D>=127789&&D<=127797||D>=127799&&D<=127868||D>=127870&&D<=127891||D>=127904&&D<=127946||D>=127951&&D<=127955||D>=127968&&D<=127984||D===127988||D>=127992&&D<=128062||D===128064||D>=128066&&D<=128252||D>=128255&&D<=128317||D>=128331&&D<=128334||D>=128336&&D<=128359||D===128378||D===128405||D===128406||D===128420||D>=128507&&D<=128591||D>=128640&&D<=128709||D===128716||D>=128720&&D<=128722||D>=128725&&D<=128727||D>=128732&&D<=128735||D===128747||D===128748||D>=128756&&D<=128764||D>=128992&&D<=129003||D===129008||D>=129292&&D<=129338||D>=129340&&D<=129349||D>=129351&&D<=129535||D>=129648&&D<=129660||D>=129664&&D<=129672||D>=129680&&D<=129725||D>=129727&&D<=129733||D>=129742&&D<=129755||D>=129760&&D<=129768||D>=129776&&D<=129784||D>=131072&&D<=196605||D>=196608&&D<=262141}C(ND,"isWide");function TD(D){if(!Number.isSafeInteger(D))throw new TypeError(`Expected a code point, got \`${typeof D}\`.`)}C(TD,"validate");function OD(D,{ambiguousAsWide:u=!1}={}){return TD(D),vD(D)||ND(D)||u&&SD(D)?2:1}C(OD,"eastAsianWidth");const $D=C(()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,"emojiRegex"),ID=new Intl.Segmenter,MD=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function y(D,u={}){if(typeof D!="string"||D.length===0)return 0;const{ambiguousIsNarrow:F=!0,countAnsiEscapeCodes:e=!1}=u;if(e||(D=z(D)),D.length===0)return 0;let t=0;const s={ambiguousAsWide:!F};for(const{segment:r}of ID.segment(D)){const E=r.codePointAt(0);if(!(E<=31||E>=127&&E<=159)&&!(E>=8203&&E<=8207||E===65279)&&!(E>=768&&E<=879||E>=6832&&E<=6911||E>=7616&&E<=7679||E>=8400&&E<=8447||E>=65056&&E<=65071)&&!(E>=55296&&E<=57343)&&!(E>=65024&&E<=65039)&&!MD.test(r)){if($D().test(r)){t+=2;continue}t+=OD(E,s)}}return t}C(y,"stringWidth");const M=10,q=C((D=0)=>u=>`\x1B[${u+D}m`,"wrapAnsi16"),H=C((D=0)=>u=>`\x1B[${38+D};5;${u}m`,"wrapAnsi256"),J=C((D=0)=>(u,F,e)=>`\x1B[${38+D};2;${u};${F};${e}m`,"wrapAnsi16m"),n={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(n.modifier);const jD=Object.keys(n.color),LD=Object.keys(n.bgColor);[...jD,...LD];function kD(){const D=new Map;for(const[u,F]of Object.entries(n)){for(const[e,t]of Object.entries(F))n[e]={open:`\x1B[${t[0]}m`,close:`\x1B[${t[1]}m`},F[e]=n[e],D.set(t[0],t[1]);Object.defineProperty(n,u,{value:F,enumerable:!1})}return Object.defineProperty(n,"codes",{value:D,enumerable:!1}),n.color.close="\x1B[39m",n.bgColor.close="\x1B[49m",n.color.ansi=q(),n.color.ansi256=H(),n.color.ansi16m=J(),n.bgColor.ansi=q(M),n.bgColor.ansi256=H(M),n.bgColor.ansi16m=J(M),Object.defineProperties(n,{rgbToAnsi256:{value:C((u,F,e)=>u===F&&F===e?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(F/255*5)+Math.round(e/255*5),"value"),enumerable:!1},hexToRgb:{value:C(u=>{const F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!F)return[0,0,0];let[e]=F;e.length===3&&(e=[...e].map(s=>s+s).join(""));const t=Number.parseInt(e,16);return[t>>16&255,t>>8&255,t&255]},"value"),enumerable:!1},hexToAnsi256:{value:C(u=>n.rgbToAnsi256(...n.hexToRgb(u)),"value"),enumerable:!1},ansi256ToAnsi:{value:C(u=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let F,e,t;if(u>=232)F=((u-232)*10+8)/255,e=F,t=F;else{u-=16;const E=u%36;F=Math.floor(u/36)/5,e=Math.floor(E/6)/5,t=E%6/5}const s=Math.max(F,e,t)*2;if(s===0)return 30;let r=30+(Math.round(t)<<2|Math.round(e)<<1|Math.round(F));return s===2&&(r+=60),r},"value"),enumerable:!1},rgbToAnsi:{value:C((u,F,e)=>n.ansi256ToAnsi(n.rgbToAnsi256(u,F,e)),"value"),enumerable:!1},hexToAnsi:{value:C(u=>n.ansi256ToAnsi(n.hexToAnsi256(u)),"value"),enumerable:!1}}),n}C(kD,"assembleStyles");const RD=kD(),v=new Set(["\x1B",""]),PD=39,G="\x07",CD="[",WD="]",tD="m",S=`${WD}8;;`,Q=C(D=>`${v.values().next().value}${CD}${D}${tD}`,"wrapAnsiCode"),X=C(D=>`${v.values().next().value}${S}${D}${G}`,"wrapAnsiHyperlink"),zD=C(D=>D.split(" ").map(u=>y(u)),"wordLengths"),j=C((D,u,F)=>{const e=[...u];let t=!1,s=!1,r=y(z(D.at(-1)));for(const[E,a]of e.entries()){const g=y(a);if(r+g<=F?D[D.length-1]+=a:(D.push(a),r=0),v.has(a)&&(t=!0,s=e.slice(E+1,E+1+S.length).join("")===S),t){s?a===G&&(t=!1,s=!1):a===tD&&(t=!1);continue}r+=g,r===F&&E<e.length-1&&(D.push(""),r=0)}!r&&D.at(-1).length>0&&D.length>1&&(D[D.length-2]+=D.pop())},"wrapWord"),GD=C(D=>{const u=D.split(" ");let F=u.length;for(;F>0&&!(y(u[F-1])>0);)F--;return F===u.length?D:u.slice(0,F).join(" ")+u.slice(F).join("")},"stringVisibleTrimSpacesRight"),VD=C((D,u,F={})=>{if(F.trim!==!1&&D.trim()==="")return"";let e="",t,s;const r=zD(D);let E=[""];for(const[i,A]of D.split(" ").entries()){F.trim!==!1&&(E[E.length-1]=E.at(-1).trimStart());let o=y(E.at(-1));if(i!==0&&(o>=u&&(F.wordWrap===!1||F.trim===!1)&&(E.push(""),o=0),(o>0||F.trim===!1)&&(E[E.length-1]+=" ",o++)),F.hard&&r[i]>u){const l=u-o,h=1+Math.floor((r[i]-l-1)/u);Math.floor((r[i]-1)/u)<h&&E.push(""),j(E,A,u);continue}if(o+r[i]>u&&o>0&&r[i]>0){if(F.wordWrap===!1&&o<u){j(E,A,u);continue}E.push("")}if(o+r[i]>u&&F.wordWrap===!1){j(E,A,u);continue}E[E.length-1]+=A}F.trim!==!1&&(E=E.map(i=>GD(i)));const a=E.join(`
|
|
2
2
|
`),g=[...a];let d=0;for(const[i,A]of g.entries()){if(e+=A,v.has(A)){const{groups:l}=new RegExp(`(?:\\${CD}(?<code>\\d+)m|\\${S}(?<uri>.*)${G})`).exec(a.slice(d))||{groups:{}};if(l.code!==void 0){const h=Number.parseFloat(l.code);t=h===PD?void 0:h}else l.uri!==void 0&&(s=l.uri.length===0?void 0:l.uri)}const o=RD.codes.get(Number(t));g[i+1]===`
|
|
3
3
|
`?(s&&(e+=X("")),t&&o&&(e+=Q(o))):A===`
|
|
4
4
|
`&&(t&&o&&(e+=Q(t)),s&&(e+=X(s))),d+=A.length}return e},"exec");function YD(D,u,F){return String(D).normalize().replaceAll(`\r
|
|
@@ -9,11 +9,11 @@ var sD=Object.defineProperty;var C=(D,u)=>sD(D,"name",{value:u,configurable:!0})
|
|
|
9
9
|
|
|
10
10
|
`),i!==dD){const c=typeof i=="string"?i:K(i,this.#E);B.push(m+YD(c,e-3,{hard:!0,trim:!1,wordWrap:!0}))}if(s){let c=!1;B.push(...s.map(p=>{if(p instanceof Error)return c=!0,`
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
`+$(p,{...this.#D,filterStacktrace:k,prefix:m});if(typeof p=="object")return" "+K(p,this.#E);const BD=(c?`
|
|
13
13
|
|
|
14
|
-
`:" ")+p;return c=!1,BD}))}return E&&B.push(
|
|
14
|
+
`:" ")+p;return c=!1,BD}))}return E&&B.push($(E,{...this.#D,filterStacktrace:k,prefix:m})),N&&B.push(`
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
`+$(N,{...this.#D,filterStacktrace:k,hideErrorCauseCodeView:!0,hideErrorCodeView:!0,hideErrorErrorsCodeView:!0,hideMessage:!0,prefix:m})),h&&B.push(`
|
|
17
17
|
`,m+f(this._styles.underline.suffix?P(h):h)),B.join("")+`
|
|
18
18
|
`}_log(u,F){const e=["error","trace","warn"].includes(F)?"stderr":"stdout",t=e==="stderr"?this.#F:this.#u;this.#C&&this.#e!==void 0&&t.isTTY?this.#e.update(e,u.split(`
|
|
19
19
|
`),0):ZD(u+`
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { stringify } from 'safe-stable-stringify';
|
|
2
2
|
import { h as StringifyAwareReporter, g as ReadonlyMeta, e as LiteralUnion, E as ExtendedRfc5424LogLevels, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, a as DefaultLogTypes } from './pail.BGWAKixQ.js';
|
|
3
3
|
|
|
4
|
+
type AbstractJsonReporterOptions = {
|
|
5
|
+
error: Partial<{
|
|
6
|
+
exclude?: string[];
|
|
7
|
+
maxDepth?: number;
|
|
8
|
+
useToJSON?: boolean;
|
|
9
|
+
}>;
|
|
10
|
+
};
|
|
4
11
|
declare abstract class AbstractJsonReporter<L extends string = string> implements StringifyAwareReporter<L> {
|
|
5
12
|
protected stringify: typeof stringify | undefined;
|
|
13
|
+
protected errorOptions: AbstractJsonReporterOptions["error"];
|
|
14
|
+
constructor(options?: Partial<AbstractJsonReporterOptions>);
|
|
6
15
|
setStringify(function_: any): void;
|
|
7
16
|
log(meta: ReadonlyMeta<L>): void;
|
|
8
17
|
protected abstract _log(message: string, logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>): void;
|
|
@@ -31,4 +40,4 @@ type PrettyStyleOptions = {
|
|
|
31
40
|
};
|
|
32
41
|
};
|
|
33
42
|
|
|
34
|
-
export { AbstractJsonReporter as A, type PrettyStyleOptions as P,
|
|
43
|
+
export { AbstractJsonReporter as A, type PrettyStyleOptions as P, type AbstractJsonReporterOptions as a, AbstractPrettyReporter as b };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var s=Object.defineProperty;var e=(t,r)=>s(t,"name",{value:r,configurable:!0});import{t as a}from"./pail.BP95fgQZ.mjs";import{A as c}from"./pail.DzwLG-N9.mjs";var n=Object.defineProperty,p=e((t,r)=>n(t,"name",{value:r,configurable:!0}),"e");class i extends c{static{e(this,"p")}static{p(this,"JsonReporter")}constructor(r={}){super(r)}_log(r,o){a(o)(r)}}const u=i;export{u as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var u=Object.defineProperty;var n=(s,r)=>u(s,"name",{value:r,configurable:!0});const g=require("@visulima/error/error"),f=require("./pail.BjvkVeLq.cjs");var b=Object.defineProperty,h=n((s,r)=>b(s,"name",{value:r,configurable:!0}),"p");class m{static{n(this,"AbstractJsonReporter")}static{h(this,"AbstractJsonReporter")}stringify;errorOptions;constructor(r={}){this.errorOptions=r.error??{}}setStringify(r){this.stringify=r}log(r){const{context:a,error:l,file:t,message:c,type:p,...e}=r;if(e.label&&(e.label=e.label.trim()),t&&(e.file=t.name+":"+t.line+(t.column?":"+t.column:"")),c===f.EMPTY_SYMBOL?e.message=void 0:e.message=c,l&&(e.error=g.serializeError(l,this.errorOptions)),a){const i=[];for(const o of a)o!==f.EMPTY_SYMBOL&&(o instanceof Error?i.push(g.serializeError(o,this.errorOptions)):i.push(o));e.context=i}this._log(this.stringify(e),p.level)}}exports.AbstractJsonReporter=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var g=Object.defineProperty;var n=(o,r)=>g(o,"name",{value:r,configurable:!0});import{serializeError as f}from"@visulima/error/error";import{E as p}from"./pail.C1VNf0a-.mjs";var h=Object.defineProperty,b=n((o,r)=>h(o,"name",{value:r,configurable:!0}),"p");class v{static{n(this,"AbstractJsonReporter")}static{b(this,"AbstractJsonReporter")}stringify;errorOptions;constructor(r={}){this.errorOptions=r.error??{}}setStringify(r){this.stringify=r}log(r){const{context:a,error:l,file:t,message:c,type:m,...e}=r;if(e.label&&(e.label=e.label.trim()),t&&(e.file=t.name+":"+t.line+(t.column?":"+t.column:"")),c===p?e.message=void 0:e.message=c,l&&(e.error=f(l,this.errorOptions)),a){const i=[];for(const s of a)s!==p&&(s instanceof Error?i.push(f(s,this.errorOptions)):i.push(s));e.context=i}this._log(this.stringify(e),m.level)}}export{v as A};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/pail",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Find a file or directory by walking up parent directories.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ansi",
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
"@secretlint/secretlint-rule-preset-recommend": "^8.2.4",
|
|
205
205
|
"@total-typescript/ts-reset": "^0.5.1",
|
|
206
206
|
"@types/node": "18.19.15",
|
|
207
|
-
"@visulima/packem": "^1.0.0-alpha.
|
|
207
|
+
"@visulima/packem": "^1.0.0-alpha.48",
|
|
208
208
|
"@visulima/redact": "1.0.2",
|
|
209
209
|
"@vitest/coverage-v8": "^1.6.0",
|
|
210
210
|
"@vitest/ui": "^1.6.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var r=(t,e)=>o(t,"name",{value:e,configurable:!0});const n=require("./pail.3G15muTS.cjs"),c=require("./pail.DHp7NF7R.cjs");var i=Object.defineProperty,a=r((t,e)=>i(t,"name",{value:e,configurable:!0}),"t");class u extends c.p{static{r(this,"p")}static{a(this,"JsonReporter")}constructor(){super()}_log(e,s){n.t(s)(e)}}const p=u;exports.i=p;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var g=Object.defineProperty;var l=(s,r)=>g(s,"name",{value:r,configurable:!0});import{serializeError as c}from"@visulima/error/error";import{E as m}from"./pail.C1VNf0a-.mjs";var y=Object.defineProperty,b=l((s,r)=>y(s,"name",{value:r,configurable:!0}),"f");let E=class{static{l(this,"p")}static{b(this,"AbstractJsonReporter")}stringify;setStringify(r){this.stringify=r}log(r){const{context:a,error:n,file:t,message:f,type:p,...e}=r;if(e.label&&(e.label=e.label.trim()),t&&(e.file=t.name+":"+t.line+(t.column?":"+t.column:"")),f===m?e.message=void 0:e.message=f,n&&(e.error=c(n)),a){const o=[];for(const i of a)i!==m&&(i instanceof Error?o.push(c(i)):o.push(i));e.context=o}this._log(this.stringify(e),p.level)}};export{E as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var m=Object.defineProperty;var l=(t,r)=>m(t,"name",{value:r,configurable:!0});const f=require("@visulima/error/error"),g=require("./pail.BjvkVeLq.cjs");var p=Object.defineProperty,b=l((t,r)=>p(t,"name",{value:r,configurable:!0}),"f");let y=class{static{l(this,"p")}static{b(this,"AbstractJsonReporter")}stringify;setStringify(r){this.stringify=r}log(r){const{context:n,error:a,file:s,message:c,type:u,...e}=r;if(e.label&&(e.label=e.label.trim()),s&&(e.file=s.name+":"+s.line+(s.column?":"+s.column:"")),c===g.EMPTY_SYMBOL?e.message=void 0:e.message=c,a&&(e.error=f.serializeError(a)),n){const o=[];for(const i of n)i!==g.EMPTY_SYMBOL&&(i instanceof Error?o.push(f.serializeError(i)):o.push(i));e.context=o}this._log(this.stringify(e),u.level)}};exports.p=y;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s=Object.defineProperty;var e=(r,t)=>s(r,"name",{value:t,configurable:!0});import{t as a}from"./pail.BP95fgQZ.mjs";import{p}from"./pail.Bbo15e5K.mjs";var n=Object.defineProperty,c=e((r,t)=>n(r,"name",{value:t,configurable:!0}),"t");class i extends p{static{e(this,"p")}static{c(this,"JsonReporter")}constructor(){super()}_log(t,o){a(o)(t)}}const u=i;export{u as i};
|