@visulima/pail 1.2.1 → 1.2.2
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 +6 -0
- package/dist/index.browser.d.cts +3 -3
- package/dist/index.browser.d.mts +3 -3
- package/dist/index.browser.d.ts +3 -3
- package/dist/index.server.d.cts +3 -3
- package/dist/index.server.d.mts +3 -3
- package/dist/index.server.d.ts +3 -3
- package/dist/processor.browser.d.cts +1 -1
- package/dist/processor.browser.d.mts +1 -1
- package/dist/processor.browser.d.ts +1 -1
- package/dist/processor.server.d.cts +1 -1
- package/dist/processor.server.d.mts +1 -1
- package/dist/processor.server.d.ts +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.server.cjs +9 -9
- package/dist/reporter.server.d.cts +2 -2
- package/dist/reporter.server.d.mts +2 -2
- package/dist/reporter.server.d.ts +2 -2
- package/dist/reporter.server.mjs +9 -9
- package/dist/shared/{pail.CyfBrVNa.d.mts → pail.BJCog1dH.d.cts} +1 -1
- package/dist/shared/{pail.CQyMoJfJ.d.ts → pail.BZABfski.d.ts} +1 -1
- package/dist/shared/{pail.CW2izieN.d.cts → pail.CLIvV09S.d.mts} +1 -1
- package/dist/shared/{pail.BsONPwkb.d.mts → pail.Ce96Y7g-.d.cts} +1 -1
- package/dist/shared/{pail.CY7GSNwy.d.cts → pail.D2WrlqMf.d.mts} +1 -1
- package/dist/shared/{pail.BxGKtnGM.d.cts → pail.DFxpsgpn.d.cts} +2 -2
- package/dist/shared/{pail.BxGKtnGM.d.mts → pail.DFxpsgpn.d.mts} +2 -2
- package/dist/shared/{pail.BxGKtnGM.d.ts → pail.DFxpsgpn.d.ts} +2 -2
- package/dist/shared/{pail.QGbXqfVW.d.ts → pail.Dn8rOK4m.d.ts} +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## @visulima/pail [1.2.2](https://github.com/visulima/visulima/compare/@visulima/pail@1.2.1...@visulima/pail@1.2.2) (2024-06-14)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **pail:** fixed wrong global import of rotating-file-stream, this did call the require to early ([ac0c8bc](https://github.com/visulima/visulima/commit/ac0c8bcf3dfc5fb197e7b89ab5d32d3dc2ec5abd))
|
|
6
|
+
|
|
1
7
|
## @visulima/pail [1.2.1](https://github.com/visulima/visulima/compare/@visulima/pail@1.2.0...@visulima/pail@1.2.1) (2024-06-13)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/dist/index.browser.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PailBrowserType } from './shared/pail.
|
|
2
|
-
import { C as ConstructorOptions } from './shared/pail.
|
|
3
|
-
export { a as DefaultLogTypes, D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, b as LoggerFunction, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, R as Reporter, S as StreamAwareReporter } from './shared/pail.
|
|
1
|
+
import { P as PailBrowserType } from './shared/pail.Ce96Y7g-.cjs';
|
|
2
|
+
import { C as ConstructorOptions } from './shared/pail.DFxpsgpn.cjs';
|
|
3
|
+
export { a as DefaultLogTypes, D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, b as LoggerFunction, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, R as Reporter, S as StreamAwareReporter } from './shared/pail.DFxpsgpn.cjs';
|
|
4
4
|
import 'safe-stable-stringify';
|
|
5
5
|
import '@visulima/colorize';
|
|
6
6
|
|
package/dist/index.browser.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PailBrowserType } from './shared/pail.
|
|
2
|
-
import { C as ConstructorOptions } from './shared/pail.
|
|
3
|
-
export { a as DefaultLogTypes, D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, b as LoggerFunction, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, R as Reporter, S as StreamAwareReporter } from './shared/pail.
|
|
1
|
+
import { P as PailBrowserType } from './shared/pail.D2WrlqMf.mjs';
|
|
2
|
+
import { C as ConstructorOptions } from './shared/pail.DFxpsgpn.mjs';
|
|
3
|
+
export { a as DefaultLogTypes, D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, b as LoggerFunction, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, R as Reporter, S as StreamAwareReporter } from './shared/pail.DFxpsgpn.mjs';
|
|
4
4
|
import 'safe-stable-stringify';
|
|
5
5
|
import '@visulima/colorize';
|
|
6
6
|
|
package/dist/index.browser.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PailBrowserType } from './shared/pail.
|
|
2
|
-
import { C as ConstructorOptions } from './shared/pail.
|
|
3
|
-
export { a as DefaultLogTypes, D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, b as LoggerFunction, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, R as Reporter, S as StreamAwareReporter } from './shared/pail.
|
|
1
|
+
import { P as PailBrowserType } from './shared/pail.BZABfski.js';
|
|
2
|
+
import { C as ConstructorOptions } from './shared/pail.DFxpsgpn.js';
|
|
3
|
+
export { a as DefaultLogTypes, D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, b as LoggerFunction, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, R as Reporter, S as StreamAwareReporter } from './shared/pail.DFxpsgpn.js';
|
|
4
4
|
import 'safe-stable-stringify';
|
|
5
5
|
import '@visulima/colorize';
|
|
6
6
|
|
package/dist/index.server.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as DefaultLogTypes, b as LoggerFunction, f as ServerConstructorOptions, I as InteractiveManager, R as Reporter, C as ConstructorOptions } from './shared/pail.
|
|
2
|
-
export { D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, S as StreamAwareReporter } from './shared/pail.
|
|
3
|
-
import { a as PailBrowserImpl } from './shared/pail.
|
|
1
|
+
import { a as DefaultLogTypes, b as LoggerFunction, f as ServerConstructorOptions, I as InteractiveManager, R as Reporter, C as ConstructorOptions } from './shared/pail.DFxpsgpn.cjs';
|
|
2
|
+
export { D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, S as StreamAwareReporter } from './shared/pail.DFxpsgpn.cjs';
|
|
3
|
+
import { a as PailBrowserImpl } from './shared/pail.Ce96Y7g-.cjs';
|
|
4
4
|
import '@visulima/colorize';
|
|
5
5
|
import 'safe-stable-stringify';
|
|
6
6
|
|
package/dist/index.server.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as DefaultLogTypes, b as LoggerFunction, f as ServerConstructorOptions, I as InteractiveManager, R as Reporter, C as ConstructorOptions } from './shared/pail.
|
|
2
|
-
export { D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, S as StreamAwareReporter } from './shared/pail.
|
|
3
|
-
import { a as PailBrowserImpl } from './shared/pail.
|
|
1
|
+
import { a as DefaultLogTypes, b as LoggerFunction, f as ServerConstructorOptions, I as InteractiveManager, R as Reporter, C as ConstructorOptions } from './shared/pail.DFxpsgpn.mjs';
|
|
2
|
+
export { D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, S as StreamAwareReporter } from './shared/pail.DFxpsgpn.mjs';
|
|
3
|
+
import { a as PailBrowserImpl } from './shared/pail.D2WrlqMf.mjs';
|
|
4
4
|
import '@visulima/colorize';
|
|
5
5
|
import 'safe-stable-stringify';
|
|
6
6
|
|
package/dist/index.server.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as DefaultLogTypes, b as LoggerFunction, f as ServerConstructorOptions, I as InteractiveManager, R as Reporter, C as ConstructorOptions } from './shared/pail.
|
|
2
|
-
export { D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, S as StreamAwareReporter } from './shared/pail.
|
|
3
|
-
import { a as PailBrowserImpl } from './shared/pail.
|
|
1
|
+
import { a as DefaultLogTypes, b as LoggerFunction, f as ServerConstructorOptions, I as InteractiveManager, R as Reporter, C as ConstructorOptions } from './shared/pail.DFxpsgpn.js';
|
|
2
|
+
export { D as DefaultLoggerTypes, E as ExtendedRfc5424LogLevels, L as LoggerConfiguration, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, P as Processor, S as StreamAwareReporter } from './shared/pail.DFxpsgpn.js';
|
|
3
|
+
import { a as PailBrowserImpl } from './shared/pail.BZABfski.js';
|
|
4
4
|
import '@visulima/colorize';
|
|
5
5
|
import 'safe-stable-stringify';
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormatterFunction } from '@visulima/fmt';
|
|
2
|
-
import { j as StringifyAwareProcessor, M as Meta } from './shared/pail.
|
|
2
|
+
import { j as StringifyAwareProcessor, M as Meta } from './shared/pail.DFxpsgpn.cjs';
|
|
3
3
|
import '@visulima/colorize';
|
|
4
4
|
|
|
5
5
|
declare class MessageFormatterProcessor<L extends string = string> implements StringifyAwareProcessor<L> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormatterFunction } from '@visulima/fmt';
|
|
2
|
-
import { j as StringifyAwareProcessor, M as Meta } from './shared/pail.
|
|
2
|
+
import { j as StringifyAwareProcessor, M as Meta } from './shared/pail.DFxpsgpn.mjs';
|
|
3
3
|
import '@visulima/colorize';
|
|
4
4
|
|
|
5
5
|
declare class MessageFormatterProcessor<L extends string = string> implements StringifyAwareProcessor<L> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormatterFunction } from '@visulima/fmt';
|
|
2
|
-
import { j as StringifyAwareProcessor, M as Meta } from './shared/pail.
|
|
2
|
+
import { j as StringifyAwareProcessor, M as Meta } from './shared/pail.DFxpsgpn.js';
|
|
3
3
|
import '@visulima/colorize';
|
|
4
4
|
|
|
5
5
|
declare class MessageFormatterProcessor<L extends string = string> implements StringifyAwareProcessor<L> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as Processor, M as Meta } from './shared/pail.
|
|
1
|
+
import { P as Processor, M as Meta } from './shared/pail.DFxpsgpn.cjs';
|
|
2
2
|
export { MessageFormatterProcessor } from './processor.browser.cjs';
|
|
3
3
|
import '@visulima/colorize';
|
|
4
4
|
import '@visulima/fmt';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as Processor, M as Meta } from './shared/pail.
|
|
1
|
+
import { P as Processor, M as Meta } from './shared/pail.DFxpsgpn.mjs';
|
|
2
2
|
export { MessageFormatterProcessor } from './processor.browser.mjs';
|
|
3
3
|
import '@visulima/colorize';
|
|
4
4
|
import '@visulima/fmt';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as LiteralUnion, E as ExtendedRfc5424LogLevels, g as ReadonlyMeta } from './shared/pail.
|
|
2
|
-
import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.
|
|
1
|
+
import { e as LiteralUnion, E as ExtendedRfc5424LogLevels, g as ReadonlyMeta } from './shared/pail.DFxpsgpn.cjs';
|
|
2
|
+
import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.BJCog1dH.cjs';
|
|
3
3
|
import '@visulima/colorize';
|
|
4
4
|
import 'safe-stable-stringify';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as LiteralUnion, E as ExtendedRfc5424LogLevels, g as ReadonlyMeta } from './shared/pail.
|
|
2
|
-
import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.
|
|
1
|
+
import { e as LiteralUnion, E as ExtendedRfc5424LogLevels, g as ReadonlyMeta } from './shared/pail.DFxpsgpn.mjs';
|
|
2
|
+
import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.CLIvV09S.mjs';
|
|
3
3
|
import '@visulima/colorize';
|
|
4
4
|
import 'safe-stable-stringify';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as LiteralUnion, E as ExtendedRfc5424LogLevels, g as ReadonlyMeta } from './shared/pail.
|
|
2
|
-
import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.
|
|
1
|
+
import { e as LiteralUnion, E as ExtendedRfc5424LogLevels, g as ReadonlyMeta } from './shared/pail.DFxpsgpn.js';
|
|
2
|
+
import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.Dn8rOK4m.js';
|
|
3
3
|
import '@visulima/colorize';
|
|
4
4
|
import 'safe-stable-stringify';
|
|
5
5
|
|
package/dist/reporter.server.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
`)}}var
|
|
3
|
-
`,
|
|
1
|
+
"use strict";var J=Object.defineProperty;var n=(e,t)=>J(e,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("node:process"),h=require("./shared/pail.NUhULbBB.cjs"),L=require("./shared/pail.DFhaFnnA.cjs"),o=require("@visulima/colorize"),q=require("./shared/pail.nUyAB-mN.cjs"),z=require("./shared/pail.B0AqLGpo.cjs"),I=n(e=>e&&typeof e=="object"&&"default"in e?e.default:e,"_interopDefaultCompat"),k=I(o);var E=Object.defineProperty,W=n((e,t)=>E(e,"name",{value:t,configurable:!0}),"e");let C=class{static{n(this,"n")}static{W(this,"SafeStreamHandler")}#t=!0;#e;#s;constructor(t,s){this.#e=t,this.#s=s}write(t){this.writeStream(t)}end(...t){this.#e.end(...t)}get isReady(){return this.#t}writeStream(t){if(!this.#t){console.warn("Stream busy: "+this.#s+'. Write will be dropped: "'+t+'"');return}this.#t=!1,this.#e.on("error",s=>{throw s}),this.#e.on("drain",()=>{this.#t=!0}),this.#e.on("finish",()=>{this.#t=!0}),this.#t=this.#e.write(t,()=>{})}};var D=Object.defineProperty,N=n((e,t)=>D(e,"name",{value:t,configurable:!0}),"r$2");class G{static{n(this,"o")}static{N(this,"RotatingFileStream")}#t;#e;#s;#r;#i;constructor(t,s=!1,r={}){if(this.#t=t,this.#e=s,this.#r=r,!this.#e){try{this.#i=require("rotating-file-stream").createStream}catch{throw new Error("The 'rotating-file-stream' package is missing. Make sure to install the 'rotating-file-stream' package.")}this.#s=this.#i(this.#t,r)}}write(t){let s=this.#s;this.#e&&(s=this.#i(this.#t,this.#r));const r=new C(s,this.#t);r.write(t),this.#e&&r.end()}end(){this.#s!==void 0&&this.#s.end()}}var H=Object.defineProperty,Y=n((e,t)=>H(e,"name",{value:t,configurable:!0}),"r$1");class M{static{n(this,"AbstractFileReporter")}static{Y(this,"AbstractFileReporter")}stream;constructor(t){const{filePath:s,writeImmediately:r=!1,...a}=t;this.stream=new G(s,r,a)}log(t){this.stream.write(this._formatMessage(t)+`
|
|
2
|
+
`)}}var B=Object.defineProperty,K=n((e,t)=>B(e,"name",{value:t,configurable:!0}),"s");class Q extends M{static{n(this,"p")}static{K(this,"JsonFileReporter")}#t;constructor(t){super({compress:"gzip",interval:"1d",size:"10M",...t})}setStringify(t){this.#t=t}_formatMessage(t){const{file:s,type:r,...a}=t;return a.label&&(a.label=a.label.trim()),s&&(a.file=s.name+":"+s.line+(s.column?":"+s.column:"")),this.#t(a)}}const U=Q;var V=Object.defineProperty,X=n((e,t)=>V(e,"name",{value:t,configurable:!0}),"r");class Z extends L.o{static{n(this,"a")}static{X(this,"JsonReporter")}#t;#e;constructor(){super(),this.#t=d.stdout,this.#e=d.stderr}setStdout(t){this.#t=t}setStderr(t){this.#e=t}_log(t,s){const r=["error","warn"].includes(s)?this.#e:this.#t;h.n(t+`
|
|
3
|
+
`,r)}}const tt=Z;var et=Object.defineProperty,st=n((e,t)=>et(e,"name",{value:t,configurable:!0}),"R");class rt extends q.AbstractPrettyReporter{static{n(this,"q")}static{st(this,"SimpleReporter")}#t;#e;#s;#r=!1;constructor(t={}){super({uppercase:{label:!0,...t.uppercase},...t}),this.#t=d.stdout,this.#e=d.stderr}setStdout(t){this.#t=t}setStderr(t){this.#e=t}setInteractiveManager(t){this.#s=t}setIsInteractive(t){this.#r=t}log(t){this._log(this._formatMessage(t),t.type.level)}_formatMessage(t){const{columns:s}=h.terminalSize();let r=s;typeof this._styles.messageLength=="number"&&(r=this._styles.messageLength);const{badge:a,context:_,date:u,error:S,file:g,groups:f,label:m,message:y,prefix:b,repeated:R,scope:v,suffix:w,traceError:j,type:A}=t,{color:P}=this._loggerTypes[A.name],$=P?k[P]:o.white,c=f.map(()=>" ").join(""),i=[];if(f.length>0&&i.push(c+o.grey("["+f.at(-1)+"]")+" "),u&&i.push(o.grey(this._styles.dateFormatter(typeof u=="string"?new Date(u):u))+" "),a)i.push(o.bold($(a)));else{const l=q.s(this._loggerTypes);l.length>0&&i.push(o.grey(" ".repeat(l.length)))}const x=z.s(this._loggerTypes);m?i.push(o.bold($(h.n$1(m,this._styles)))+" "," ".repeat(x.length-h.stringLength(m))):i.push(" ".repeat(x.length+1)),R&&i.push(o.bgGrey.white("["+R+"x]")+" "),Array.isArray(v)&&v.length>0&&i.push(o.grey("["+v.join(" > ")+"]")+" "),b&&i.push(o.grey("["+(this._styles.underline.prefix?o.underline(b):b)+"]")+" ");const T=h.stringLength(i.join("")),F=typeof y=="string"?y:this._stringify(y);if(i.push(c+h.wrapAnsi(F??"undefined",r-3,{hard:!0,trim:!0,wordWrap:!0})),_){let l=!1;i.push(..._.map(p=>{if(p instanceof Error)return l=!0,`
|
|
4
4
|
|
|
5
|
-
`+
|
|
5
|
+
`+h.w(p,r,c);if(typeof p=="object")return" "+this._stringify(p);const O=(l?`
|
|
6
6
|
|
|
7
|
-
`:" ")+p;return
|
|
8
|
-
`,
|
|
9
|
-
`)}return i.join("")}_log(
|
|
10
|
-
`),0):
|
|
11
|
-
`,
|
|
7
|
+
`:" ")+p;return l=!1,O}))}if(S&&i.push(h.w(S,r,c)),j&&i.push(h.w(j,r,c,!0)),w&&i.push(" "+c+o.grey(this._styles.underline.suffix?o.underline(w):w)),g){const l=g.name+(g.line?":"+g.line:"");i.push(`
|
|
8
|
+
`,o.grey("Caller: ")," ".repeat(T-8),l,`
|
|
9
|
+
`)}return i.join("")}_log(t,s){const r=["error","trace","warn"].includes(s)?"stderr":"stdout",a=r==="stderr"?this.#e:this.#t;this.#r&&this.#s!==void 0&&a.isTTY?this.#s.update(r,t.split(`
|
|
10
|
+
`),0):h.n(t+`
|
|
11
|
+
`,a)}}const it=rt;exports.PrettyReporter=h.a;exports.AbstractFileReporter=M;exports.JsonFileReporter=U;exports.JsonReporter=tt;exports.SimpleReporter=it;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Options as Options$1 } from 'rotating-file-stream';
|
|
2
|
-
import { R as Reporter, g as ReadonlyMeta, M as Meta, S as StreamAwareReporter, e as LiteralUnion, E as ExtendedRfc5424LogLevels, i as InteractiveStreamReporter, I as InteractiveManager } from './shared/pail.
|
|
3
|
-
import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.
|
|
2
|
+
import { R as Reporter, g as ReadonlyMeta, M as Meta, S as StreamAwareReporter, e as LiteralUnion, E as ExtendedRfc5424LogLevels, i as InteractiveStreamReporter, I as InteractiveManager } from './shared/pail.DFxpsgpn.cjs';
|
|
3
|
+
import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.BJCog1dH.cjs';
|
|
4
4
|
import '@visulima/colorize';
|
|
5
5
|
import 'safe-stable-stringify';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Options as Options$1 } from 'rotating-file-stream';
|
|
2
|
-
import { R as Reporter, g as ReadonlyMeta, M as Meta, S as StreamAwareReporter, e as LiteralUnion, E as ExtendedRfc5424LogLevels, i as InteractiveStreamReporter, I as InteractiveManager } from './shared/pail.
|
|
3
|
-
import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.
|
|
2
|
+
import { R as Reporter, g as ReadonlyMeta, M as Meta, S as StreamAwareReporter, e as LiteralUnion, E as ExtendedRfc5424LogLevels, i as InteractiveStreamReporter, I as InteractiveManager } from './shared/pail.DFxpsgpn.mjs';
|
|
3
|
+
import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.CLIvV09S.mjs';
|
|
4
4
|
import '@visulima/colorize';
|
|
5
5
|
import 'safe-stable-stringify';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Options as Options$1 } from 'rotating-file-stream';
|
|
2
|
-
import { R as Reporter, g as ReadonlyMeta, M as Meta, S as StreamAwareReporter, e as LiteralUnion, E as ExtendedRfc5424LogLevels, i as InteractiveStreamReporter, I as InteractiveManager } from './shared/pail.
|
|
3
|
-
import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.
|
|
2
|
+
import { R as Reporter, g as ReadonlyMeta, M as Meta, S as StreamAwareReporter, e as LiteralUnion, E as ExtendedRfc5424LogLevels, i as InteractiveStreamReporter, I as InteractiveManager } from './shared/pail.DFxpsgpn.js';
|
|
3
|
+
import { A as AbstractJsonReporter, a as AbstractPrettyReporter, P as PrettyStyleOptions } from './shared/pail.Dn8rOK4m.js';
|
|
4
4
|
import '@visulima/colorize';
|
|
5
5
|
import 'safe-stable-stringify';
|
|
6
6
|
|
package/dist/reporter.server.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var q=Object.defineProperty;var o=(s,t)=>q(s,"name",{value:t,configurable:!0});import{stdout as T,stderr as F}from"node:process";import{n as O,t as E,b as L,s as P,w as W,c as v}from"./shared/pail.D5MfZlaK.mjs";import{a as jt}from"./shared/pail.D5MfZlaK.mjs";import{o as C}from"./shared/pail.Cn4oOlxI.mjs";import D,{white as G,grey as h,bold as A,bgGrey as H,underline as M}from"@visulima/colorize";import{A as N,s as Y}from"./shared/pail.BlF6_AB7.mjs";import{s as B}from"./shared/pail.CKgnzwt6.mjs";
|
|
2
2
|
// -- pack CommonJS Shims --
|
|
3
3
|
import __cjs_url__ from "node:url";
|
|
4
4
|
import __cjs_path__ from "node:path";
|
|
@@ -6,14 +6,14 @@ import __cjs_mod__ from "node:module";
|
|
|
6
6
|
const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = __cjs_path__.dirname(__filename);
|
|
8
8
|
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
9
|
-
var
|
|
10
|
-
`)}}var
|
|
11
|
-
`,r)}}const
|
|
9
|
+
var K=Object.defineProperty,Q=o((s,t)=>K(s,"name",{value:t,configurable:!0}),"e");let U=class{static{o(this,"n")}static{Q(this,"SafeStreamHandler")}#t=!0;#e;#s;constructor(t,e){this.#e=t,this.#s=e}write(t){this.writeStream(t)}end(...t){this.#e.end(...t)}get isReady(){return this.#t}writeStream(t){if(!this.#t){console.warn("Stream busy: "+this.#s+'. Write will be dropped: "'+t+'"');return}this.#t=!1,this.#e.on("error",e=>{throw e}),this.#e.on("drain",()=>{this.#t=!0}),this.#e.on("finish",()=>{this.#t=!0}),this.#t=this.#e.write(t,()=>{})}};var V=Object.defineProperty,X=o((s,t)=>V(s,"name",{value:t,configurable:!0}),"r$2");class Z{static{o(this,"o")}static{X(this,"RotatingFileStream")}#t;#e;#s;#r;#i;constructor(t,e=!1,r={}){if(this.#t=t,this.#e=e,this.#r=r,!this.#e){try{this.#i=require("rotating-file-stream").createStream}catch{throw new Error("The 'rotating-file-stream' package is missing. Make sure to install the 'rotating-file-stream' package.")}this.#s=this.#i(this.#t,r)}}write(t){let e=this.#s;this.#e&&(e=this.#i(this.#t,this.#r));const r=new U(e,this.#t);r.write(t),this.#e&&r.end()}end(){this.#s!==void 0&&this.#s.end()}}var tt=Object.defineProperty,et=o((s,t)=>tt(s,"name",{value:t,configurable:!0}),"r$1");class st{static{o(this,"AbstractFileReporter")}static{et(this,"AbstractFileReporter")}stream;constructor(t){const{filePath:e,writeImmediately:r=!1,...a}=t;this.stream=new Z(e,r,a)}log(t){this.stream.write(this._formatMessage(t)+`
|
|
10
|
+
`)}}var rt=Object.defineProperty,it=o((s,t)=>rt(s,"name",{value:t,configurable:!0}),"s");class at extends st{static{o(this,"p")}static{it(this,"JsonFileReporter")}#t;constructor(t){super({compress:"gzip",interval:"1d",size:"10M",...t})}setStringify(t){this.#t=t}_formatMessage(t){const{file:e,type:r,...a}=t;return a.label&&(a.label=a.label.trim()),e&&(a.file=e.name+":"+e.line+(e.column?":"+e.column:"")),this.#t(a)}}const wt=at;var ot=Object.defineProperty,nt=o((s,t)=>ot(s,"name",{value:t,configurable:!0}),"r");class ht extends C{static{o(this,"a")}static{nt(this,"JsonReporter")}#t;#e;constructor(){super(),this.#t=T,this.#e=F}setStdout(t){this.#t=t}setStderr(t){this.#e=t}_log(t,e){const r=["error","warn"].includes(e)?this.#e:this.#t;O(t+`
|
|
11
|
+
`,r)}}const _t=ht;var lt=Object.defineProperty,pt=o((s,t)=>lt(s,"name",{value:t,configurable:!0}),"R");class ct extends N{static{o(this,"q")}static{pt(this,"SimpleReporter")}#t;#e;#s;#r=!1;constructor(t={}){super({uppercase:{label:!0,...t.uppercase},...t}),this.#t=T,this.#e=F}setStdout(t){this.#t=t}setStderr(t){this.#e=t}setInteractiveManager(t){this.#s=t}setIsInteractive(t){this.#r=t}log(t){this._log(this._formatMessage(t),t.type.level)}_formatMessage(t){const{columns:e}=E();let r=e;typeof this._styles.messageLength=="number"&&(r=this._styles.messageLength);const{badge:a,context:w,date:c,error:_,file:u,groups:m,label:f,message:g,prefix:d,repeated:S,scope:y,suffix:b,traceError:$,type:J}=t,{color:R}=this._loggerTypes[J.name],j=R?D[R]:G,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))+" "),a)i.push(A(j(a)));else{const n=Y(this._loggerTypes);n.length>0&&i.push(h(" ".repeat(n.length)))}const x=B(this._loggerTypes);f?i.push(A(j(L(f,this._styles)))+" "," ".repeat(x.length-P(f))):i.push(" ".repeat(x.length+1)),S&&i.push(H.white("["+S+"x]")+" "),Array.isArray(y)&&y.length>0&&i.push(h("["+y.join(" > ")+"]")+" "),d&&i.push(h("["+(this._styles.underline.prefix?M(d):d)+"]")+" ");const z=P(i.join("")),I=typeof g=="string"?g:this._stringify(g);if(i.push(l+W(I??"undefined",r-3,{hard:!0,trim:!0,wordWrap:!0})),w){let n=!1;i.push(...w.map(p=>{if(p instanceof Error)return n=!0,`
|
|
12
12
|
|
|
13
|
-
`+
|
|
13
|
+
`+v(p,r,l);if(typeof p=="object")return" "+this._stringify(p);const k=(n?`
|
|
14
14
|
|
|
15
|
-
`:" ")+p;return
|
|
16
|
-
`,h("Caller: ")," ".repeat(
|
|
15
|
+
`:" ")+p;return n=!1,k}))}if(_&&i.push(v(_,r,l)),$&&i.push(v($,r,l,!0)),b&&i.push(" "+l+h(this._styles.underline.suffix?M(b):b)),u){const n=u.name+(u.line?":"+u.line:"");i.push(`
|
|
16
|
+
`,h("Caller: ")," ".repeat(z-8),n,`
|
|
17
17
|
`)}return i.join("")}_log(t,e){const r=["error","trace","warn"].includes(e)?"stderr":"stdout",a=r==="stderr"?this.#e:this.#t;this.#r&&this.#s!==void 0&&a.isTTY?this.#s.update(r,t.split(`
|
|
18
|
-
`),0):
|
|
19
|
-
`,a)}}const
|
|
18
|
+
`),0):O(t+`
|
|
19
|
+
`,a)}}const St=ct;export{st as AbstractFileReporter,wt as JsonFileReporter,_t as JsonReporter,jt as PrettyReporter,St as SimpleReporter};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { stringify } from 'safe-stable-stringify';
|
|
2
|
-
import { h as StringifyAwareReporter, g as ReadonlyMeta, e as LiteralUnion, E as ExtendedRfc5424LogLevels, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, a as DefaultLogTypes } from './pail.
|
|
2
|
+
import { h as StringifyAwareReporter, g as ReadonlyMeta, e as LiteralUnion, E as ExtendedRfc5424LogLevels, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, a as DefaultLogTypes } from './pail.DFxpsgpn.cjs';
|
|
3
3
|
|
|
4
4
|
declare abstract class AbstractJsonReporter<L extends string = string> implements StringifyAwareReporter<L> {
|
|
5
5
|
protected stringify: typeof stringify | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { stringify } from 'safe-stable-stringify';
|
|
2
|
-
import { a as DefaultLogTypes, b as LoggerFunction, C as ConstructorOptions, M as Meta, d as LoggerTypesConfig, e as LiteralUnion, P as Processor, E as ExtendedRfc5424LogLevels, R as Reporter } from './pail.
|
|
2
|
+
import { a as DefaultLogTypes, b as LoggerFunction, C as ConstructorOptions, M as Meta, d as LoggerTypesConfig, e as LiteralUnion, P as Processor, E as ExtendedRfc5424LogLevels, R as Reporter } from './pail.DFxpsgpn.js';
|
|
3
3
|
|
|
4
4
|
declare class PailBrowserImpl<T extends string = string, L extends string = string> {
|
|
5
5
|
protected timersMap: Map<string, number>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { stringify } from 'safe-stable-stringify';
|
|
2
|
-
import { h as StringifyAwareReporter, g as ReadonlyMeta, e as LiteralUnion, E as ExtendedRfc5424LogLevels, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, a as DefaultLogTypes } from './pail.
|
|
2
|
+
import { h as StringifyAwareReporter, g as ReadonlyMeta, e as LiteralUnion, E as ExtendedRfc5424LogLevels, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, a as DefaultLogTypes } from './pail.DFxpsgpn.mjs';
|
|
3
3
|
|
|
4
4
|
declare abstract class AbstractJsonReporter<L extends string = string> implements StringifyAwareReporter<L> {
|
|
5
5
|
protected stringify: typeof stringify | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { stringify } from 'safe-stable-stringify';
|
|
2
|
-
import { a as DefaultLogTypes, b as LoggerFunction, C as ConstructorOptions, M as Meta, d as LoggerTypesConfig, e as LiteralUnion, P as Processor, E as ExtendedRfc5424LogLevels, R as Reporter } from './pail.
|
|
2
|
+
import { a as DefaultLogTypes, b as LoggerFunction, C as ConstructorOptions, M as Meta, d as LoggerTypesConfig, e as LiteralUnion, P as Processor, E as ExtendedRfc5424LogLevels, R as Reporter } from './pail.DFxpsgpn.cjs';
|
|
3
3
|
|
|
4
4
|
declare class PailBrowserImpl<T extends string = string, L extends string = string> {
|
|
5
5
|
protected timersMap: Map<string, number>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { stringify } from 'safe-stable-stringify';
|
|
2
|
-
import { a as DefaultLogTypes, b as LoggerFunction, C as ConstructorOptions, M as Meta, d as LoggerTypesConfig, e as LiteralUnion, P as Processor, E as ExtendedRfc5424LogLevels, R as Reporter } from './pail.
|
|
2
|
+
import { a as DefaultLogTypes, b as LoggerFunction, C as ConstructorOptions, M as Meta, d as LoggerTypesConfig, e as LiteralUnion, P as Processor, E as ExtendedRfc5424LogLevels, R as Reporter } from './pail.DFxpsgpn.mjs';
|
|
3
3
|
|
|
4
4
|
declare class PailBrowserImpl<T extends string = string, L extends string = string> {
|
|
5
5
|
protected timersMap: Map<string, number>;
|
|
@@ -111,7 +111,7 @@ type ExtendedRfc5424LogLevels = "alert" | "critical" | "debug" | "emergency" | "
|
|
|
111
111
|
type DefaultLogTypes = "alert" | "await" | "complete" | "critical" | "debug" | "emergency" | "error" | "info" | "log" | "notice" | "pending" | "start" | "stop" | "success" | "trace" | "wait" | "warn" | "watch";
|
|
112
112
|
interface LoggerFunction {
|
|
113
113
|
(message: Message): void;
|
|
114
|
-
(...message:
|
|
114
|
+
(...message: any[]): void;
|
|
115
115
|
}
|
|
116
116
|
interface LoggerConfiguration<L extends string> {
|
|
117
117
|
badge?: string;
|
|
@@ -168,7 +168,7 @@ interface ServerConstructorOptions<T extends string, L extends string> extends C
|
|
|
168
168
|
}
|
|
169
169
|
type Message = {
|
|
170
170
|
context?: any[] | undefined;
|
|
171
|
-
message:
|
|
171
|
+
message: any;
|
|
172
172
|
prefix?: string;
|
|
173
173
|
suffix?: string;
|
|
174
174
|
};
|
|
@@ -111,7 +111,7 @@ type ExtendedRfc5424LogLevels = "alert" | "critical" | "debug" | "emergency" | "
|
|
|
111
111
|
type DefaultLogTypes = "alert" | "await" | "complete" | "critical" | "debug" | "emergency" | "error" | "info" | "log" | "notice" | "pending" | "start" | "stop" | "success" | "trace" | "wait" | "warn" | "watch";
|
|
112
112
|
interface LoggerFunction {
|
|
113
113
|
(message: Message): void;
|
|
114
|
-
(...message:
|
|
114
|
+
(...message: any[]): void;
|
|
115
115
|
}
|
|
116
116
|
interface LoggerConfiguration<L extends string> {
|
|
117
117
|
badge?: string;
|
|
@@ -168,7 +168,7 @@ interface ServerConstructorOptions<T extends string, L extends string> extends C
|
|
|
168
168
|
}
|
|
169
169
|
type Message = {
|
|
170
170
|
context?: any[] | undefined;
|
|
171
|
-
message:
|
|
171
|
+
message: any;
|
|
172
172
|
prefix?: string;
|
|
173
173
|
suffix?: string;
|
|
174
174
|
};
|
|
@@ -111,7 +111,7 @@ type ExtendedRfc5424LogLevels = "alert" | "critical" | "debug" | "emergency" | "
|
|
|
111
111
|
type DefaultLogTypes = "alert" | "await" | "complete" | "critical" | "debug" | "emergency" | "error" | "info" | "log" | "notice" | "pending" | "start" | "stop" | "success" | "trace" | "wait" | "warn" | "watch";
|
|
112
112
|
interface LoggerFunction {
|
|
113
113
|
(message: Message): void;
|
|
114
|
-
(...message:
|
|
114
|
+
(...message: any[]): void;
|
|
115
115
|
}
|
|
116
116
|
interface LoggerConfiguration<L extends string> {
|
|
117
117
|
badge?: string;
|
|
@@ -168,7 +168,7 @@ interface ServerConstructorOptions<T extends string, L extends string> extends C
|
|
|
168
168
|
}
|
|
169
169
|
type Message = {
|
|
170
170
|
context?: any[] | undefined;
|
|
171
|
-
message:
|
|
171
|
+
message: any;
|
|
172
172
|
prefix?: string;
|
|
173
173
|
suffix?: string;
|
|
174
174
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { stringify } from 'safe-stable-stringify';
|
|
2
|
-
import { h as StringifyAwareReporter, g as ReadonlyMeta, e as LiteralUnion, E as ExtendedRfc5424LogLevels, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, a as DefaultLogTypes } from './pail.
|
|
2
|
+
import { h as StringifyAwareReporter, g as ReadonlyMeta, e as LiteralUnion, E as ExtendedRfc5424LogLevels, c as LoggerTypesAwareReporter, d as LoggerTypesConfig, a as DefaultLogTypes } from './pail.DFxpsgpn.js';
|
|
3
3
|
|
|
4
4
|
declare abstract class AbstractJsonReporter<L extends string = string> implements StringifyAwareReporter<L> {
|
|
5
5
|
protected stringify: typeof stringify | undefined;
|