@visulima/pail 1.2.1 → 1.3.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/README.md +4 -2
- 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.cjs +1 -1
- package/dist/processor.browser.d.cts +9 -2
- package/dist/processor.browser.d.mts +9 -2
- package/dist/processor.browser.d.ts +9 -2
- package/dist/processor.browser.mjs +1 -1
- package/dist/processor.server.cjs +1 -1
- package/dist/processor.server.d.cts +3 -2
- package/dist/processor.server.d.mts +3 -2
- package/dist/processor.server.d.ts +3 -2
- package/dist/processor.server.mjs +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/dist/shared/pail._czpAR0Z.mjs +9 -0
- package/dist/shared/pail.zsOZqsvh.cjs +1 -0
- package/package.json +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## @visulima/pail [1.3.0](https://github.com/visulima/visulima/compare/@visulima/pail@1.2.2...@visulima/pail@1.3.0) (2024-06-14)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **pail:** added new redact processor ([#423](https://github.com/visulima/visulima/issues/423)) ([0614067](https://github.com/visulima/visulima/commit/0614067bec83a46ffe92abfb8a715b2c385b1d7d))
|
|
6
|
+
|
|
7
|
+
## @visulima/pail [1.2.2](https://github.com/visulima/visulima/compare/@visulima/pail@1.2.1...@visulima/pail@1.2.2) (2024-06-14)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **pail:** fixed wrong global import of rotating-file-stream, this did call the require to early ([ac0c8bc](https://github.com/visulima/visulima/commit/ac0c8bcf3dfc5fb197e7b89ab5d32d3dc2ec5abd))
|
|
12
|
+
|
|
1
13
|
## @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
14
|
|
|
3
15
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
- Custom pluggable processors and reporters
|
|
43
43
|
- TypeScript support
|
|
44
44
|
- Interactive and regular modes
|
|
45
|
-
- Secrets & sensitive information filtering
|
|
45
|
+
- Secrets & sensitive information filtering
|
|
46
46
|
- Filename, date and timestamp support
|
|
47
47
|
- Scoped loggers and timers
|
|
48
48
|
- Scaled logging levels mechanism
|
|
@@ -121,7 +121,9 @@ A processor can be added to a logger directly (and is subsequently applied to lo
|
|
|
121
121
|
|
|
122
122
|
- `CallerProcessor` - adds the caller information to the log message
|
|
123
123
|
- The Meta Object is extended with a file name, line number and column number
|
|
124
|
-
- `RedactProcessor` - redacts sensitive information from the log message
|
|
124
|
+
- `RedactProcessor` - redacts sensitive information from the log message
|
|
125
|
+
> The redact processor needs the "@visulima/redact" package to work.
|
|
126
|
+
> Use `npm install @visulima/redact`, `pnpm add @visulima/redact` or `yarn add @visulima/redact` to install it.
|
|
125
127
|
- `MessageFormatterProcessor` - formats the log message (Util.format-like unescaped string formatting utility) [@visulima/fmt][fmt]
|
|
126
128
|
- `ErrorProcessor` - serializes the error with cause object to a std error object that can be serialized.
|
|
127
129
|
|
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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/pail.B85Cx0UJ.cjs");exports.MessageFormatterProcessor=e.g;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./shared/pail.B85Cx0UJ.cjs"),r=require("./shared/pail.zsOZqsvh.cjs");exports.MessageFormatterProcessor=e.g;exports.RedactProcessor=r.n;
|
|
@@ -1,5 +1,6 @@
|
|
|
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, P as Processor } from './shared/pail.DFxpsgpn.cjs';
|
|
3
|
+
import { Rules, RedactOptions } from '@visulima/redact';
|
|
3
4
|
import '@visulima/colorize';
|
|
4
5
|
|
|
5
6
|
declare class MessageFormatterProcessor<L extends string = string> implements StringifyAwareProcessor<L> {
|
|
@@ -12,4 +13,10 @@ declare class MessageFormatterProcessor<L extends string = string> implements St
|
|
|
12
13
|
private _format;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
declare class RedactProcessor<L extends string = string> implements Processor<L> {
|
|
17
|
+
#private;
|
|
18
|
+
constructor(rules?: Rules, options?: RedactOptions);
|
|
19
|
+
process(meta: Meta<L>): Meta<L>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { MessageFormatterProcessor, RedactProcessor };
|
|
@@ -1,5 +1,6 @@
|
|
|
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, P as Processor } from './shared/pail.DFxpsgpn.mjs';
|
|
3
|
+
import { Rules, RedactOptions } from '@visulima/redact';
|
|
3
4
|
import '@visulima/colorize';
|
|
4
5
|
|
|
5
6
|
declare class MessageFormatterProcessor<L extends string = string> implements StringifyAwareProcessor<L> {
|
|
@@ -12,4 +13,10 @@ declare class MessageFormatterProcessor<L extends string = string> implements St
|
|
|
12
13
|
private _format;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
declare class RedactProcessor<L extends string = string> implements Processor<L> {
|
|
17
|
+
#private;
|
|
18
|
+
constructor(rules?: Rules, options?: RedactOptions);
|
|
19
|
+
process(meta: Meta<L>): Meta<L>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { MessageFormatterProcessor, RedactProcessor };
|
|
@@ -1,5 +1,6 @@
|
|
|
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, P as Processor } from './shared/pail.DFxpsgpn.js';
|
|
3
|
+
import { Rules, RedactOptions } from '@visulima/redact';
|
|
3
4
|
import '@visulima/colorize';
|
|
4
5
|
|
|
5
6
|
declare class MessageFormatterProcessor<L extends string = string> implements StringifyAwareProcessor<L> {
|
|
@@ -12,4 +13,10 @@ declare class MessageFormatterProcessor<L extends string = string> implements St
|
|
|
12
13
|
private _format;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
declare class RedactProcessor<L extends string = string> implements Processor<L> {
|
|
17
|
+
#private;
|
|
18
|
+
constructor(rules?: Rules, options?: RedactOptions);
|
|
19
|
+
process(meta: Meta<L>): Meta<L>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { MessageFormatterProcessor, RedactProcessor };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as
|
|
1
|
+
import{g as e}from"./shared/pail.nEbRCLhY.mjs";import{n as a}from"./shared/pail._czpAR0Z.mjs";export{e as MessageFormatterProcessor,a as RedactProcessor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var l=Object.defineProperty;var t=(o,e)=>l(o,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./shared/pail.C0epjAht.cjs"),i=require("./shared/pail.B85Cx0UJ.cjs"),m=require("./shared/pail.zsOZqsvh.cjs");var u=Object.defineProperty,N=t((o,e)=>u(o,"name",{value:e,configurable:!0}),"u");const b=N(()=>{const o=Error.prepareStackTrace;try{let e=[];Error.prepareStackTrace=(s,r)=>{const c=r.slice(1);return e=c,c},new Error().stack;const a=e.reduce((s,r)=>(r.isNative()||r.getFileName()?.includes("pail/dist")||s.push({columnNumber:r.getColumnNumber(),fileName:r.getFileName(),lineNumber:r.getLineNumber()}),s),[])[0];return a?{columnNumber:a.columnNumber??void 0,fileName:a.fileName,lineNumber:a.lineNumber??void 0}:{fileName:"anonymous",lineNumber:void 0}}finally{Error.prepareStackTrace=o}},"getCallerFilename");var d=Object.defineProperty,f=t((o,e)=>d(o,"name",{value:e,configurable:!0}),"r");class g{static{t(this,"a")}static{f(this,"CallerProcessor")}process(e){const{columnNumber:a,fileName:s,lineNumber:r}=b();return e.file={column:a,line:r,name:s},e}}const p=g;exports.ErrorProcessor=n.L;exports.MessageFormatterProcessor=i.g;exports.RedactProcessor=m.n;exports.CallerProcessor=p;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { P as Processor, M as Meta } from './shared/pail.
|
|
2
|
-
export { MessageFormatterProcessor } from './processor.browser.cjs';
|
|
1
|
+
import { P as Processor, M as Meta } from './shared/pail.DFxpsgpn.cjs';
|
|
2
|
+
export { MessageFormatterProcessor, RedactProcessor } from './processor.browser.cjs';
|
|
3
3
|
import '@visulima/colorize';
|
|
4
4
|
import '@visulima/fmt';
|
|
5
|
+
import '@visulima/redact';
|
|
5
6
|
|
|
6
7
|
declare global {
|
|
7
8
|
namespace VisulimaPail {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { P as Processor, M as Meta } from './shared/pail.
|
|
2
|
-
export { MessageFormatterProcessor } from './processor.browser.mjs';
|
|
1
|
+
import { P as Processor, M as Meta } from './shared/pail.DFxpsgpn.mjs';
|
|
2
|
+
export { MessageFormatterProcessor, RedactProcessor } from './processor.browser.mjs';
|
|
3
3
|
import '@visulima/colorize';
|
|
4
4
|
import '@visulima/fmt';
|
|
5
|
+
import '@visulima/redact';
|
|
5
6
|
|
|
6
7
|
declare global {
|
|
7
8
|
namespace VisulimaPail {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { P as Processor, M as Meta } from './shared/pail.
|
|
2
|
-
export { MessageFormatterProcessor } from './processor.browser.js';
|
|
1
|
+
import { P as Processor, M as Meta } from './shared/pail.DFxpsgpn.js';
|
|
2
|
+
export { MessageFormatterProcessor, RedactProcessor } from './processor.browser.js';
|
|
3
3
|
import '@visulima/colorize';
|
|
4
4
|
import '@visulima/fmt';
|
|
5
|
+
import '@visulima/redact';
|
|
5
6
|
|
|
6
7
|
declare global {
|
|
7
8
|
namespace VisulimaPail {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var s=Object.defineProperty;var t=(a,e)=>s(a,"name",{value:e,configurable:!0});import{L as g}from"./shared/pail.CNxJnpWG.mjs";import{g as y}from"./shared/pail.nEbRCLhY.mjs";import{n as k}from"./shared/pail._czpAR0Z.mjs";var m=Object.defineProperty,c=t((a,e)=>m(a,"name",{value:e,configurable:!0}),"u");const i=c(()=>{const a=Error.prepareStackTrace;try{let e=[];Error.prepareStackTrace=(l,r)=>{const n=r.slice(1);return e=n,n},new Error().stack;const o=e.reduce((l,r)=>(r.isNative()||r.getFileName()?.includes("pail/dist")||l.push({columnNumber:r.getColumnNumber(),fileName:r.getFileName(),lineNumber:r.getLineNumber()}),l),[])[0];return o?{columnNumber:o.columnNumber??void 0,fileName:o.fileName,lineNumber:o.lineNumber??void 0}:{fileName:"anonymous",lineNumber:void 0}}finally{Error.prepareStackTrace=a}},"getCallerFilename");var u=Object.defineProperty,N=t((a,e)=>u(a,"name",{value:e,configurable:!0}),"r");class b{static{t(this,"a")}static{N(this,"CallerProcessor")}process(e){const{columnNumber:o,fileName:l,lineNumber:r}=i();return e.file={column:o,line:r,name:l},e}}const f=b;export{f as CallerProcessor,g as ErrorProcessor,y as MessageFormatterProcessor,k as RedactProcessor};
|
|
@@ -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;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
// -- pack CommonJS Shims --
|
|
3
|
+
import __cjs_url__ from "node:url";
|
|
4
|
+
import __cjs_path__ from "node:path";
|
|
5
|
+
import __cjs_mod__ from "node:module";
|
|
6
|
+
const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
7
|
+
const __dirname = __cjs_path__.dirname(__filename);
|
|
8
|
+
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
9
|
+
var i=Object.defineProperty;var s=(t,r)=>i(t,"name",{value:r,configurable:!0});var n=Object.defineProperty,h=s((t,r)=>n(t,"name",{value:r,configurable:!0}),"r");class u{static{s(this,"n")}static{h(this,"RedactProcessor")}#r;constructor(r,e){try{const{redact:a,standardRules:c}=require("@visulima/redact");this.#r=o=>a(o,r||c,e)}catch{throw new Error("The '@visulima/redact' package is missing. Make sure to install the '@visulima/redact' package.")}}process(r){return r.message=this.#r(r.message),r.context=this.#r(r.context),r.error=this.#r(r.error),r}}const d=u;export{d as n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var s=(t,r)=>o(t,"name",{value:r,configurable:!0});var n=Object.defineProperty,u=s((t,r)=>n(t,"name",{value:r,configurable:!0}),"r");class h{static{s(this,"n")}static{u(this,"RedactProcessor")}#r;constructor(r,e){try{const{redact:a,standardRules:c}=require("@visulima/redact");this.#r=i=>a(i,r||c,e)}catch{throw new Error("The '@visulima/redact' package is missing. Make sure to install the '@visulima/redact' package.")}}process(r){return r.message=this.#r(r.message),r.context=this.#r(r.context),r.error=this.#r(r.error),r}}const l=h;exports.n=l;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/pail",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Find a file or directory by walking up parent directories.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ansi",
|
|
@@ -203,6 +203,7 @@
|
|
|
203
203
|
"@total-typescript/ts-reset": "^0.5.1",
|
|
204
204
|
"@types/node": "18.19.15",
|
|
205
205
|
"@visulima/packem": "^1.0.0-alpha.41",
|
|
206
|
+
"@visulima/redact": "1.0.2",
|
|
206
207
|
"@vitest/coverage-v8": "^1.6.0",
|
|
207
208
|
"@vitest/ui": "^1.6.0",
|
|
208
209
|
"conventional-changelog-conventionalcommits": "8.0.0",
|
|
@@ -217,20 +218,24 @@
|
|
|
217
218
|
"eslint-plugin-vitest-globals": "^1.5.0",
|
|
218
219
|
"prettier": "^3.3.2",
|
|
219
220
|
"rimraf": "^5.0.7",
|
|
220
|
-
"type-fest": "^4.20.0",
|
|
221
221
|
"rotating-file-stream": "^3.2.3",
|
|
222
222
|
"secretlint": "8.2.4",
|
|
223
223
|
"semantic-release": "24.0.0",
|
|
224
224
|
"string-length": "^6.0.0",
|
|
225
225
|
"terminal-size": "^4.0.0",
|
|
226
|
+
"type-fest": "^4.20.0",
|
|
226
227
|
"typescript": "^5.4.5",
|
|
227
228
|
"vitest": "^1.6.0",
|
|
228
229
|
"wrap-ansi": "^9.0.0"
|
|
229
230
|
},
|
|
230
231
|
"peerDependencies": {
|
|
232
|
+
"@visulima/redact": "1.0.2",
|
|
231
233
|
"rotating-file-stream": "^3.1.1"
|
|
232
234
|
},
|
|
233
235
|
"peerDependenciesMeta": {
|
|
236
|
+
"@visulima/redact": {
|
|
237
|
+
"optional": true
|
|
238
|
+
},
|
|
234
239
|
"rotating-file-stream": {
|
|
235
240
|
"optional": true
|
|
236
241
|
}
|