nightingale-console 11.7.1 → 12.0.1
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/.eslintrc.json +1 -1
- package/CHANGELOG.md +51 -0
- package/README.md +8 -2
- package/dist/{index-node12.cjs.js → index-node14.cjs.js} +8 -10
- package/dist/index-node14.cjs.js.map +1 -0
- package/dist/{index-node12.mjs → index-node14.mjs} +6 -6
- package/dist/index-node14.mjs.map +1 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/package.json +22 -38
- package/rollup.config.mjs +3 -0
- package/src/.eslintrc.json +19 -2
- package/src/index.ts +4 -8
- package/dist/index-node12-dev.cjs.js +0 -42
- package/dist/index-node12-dev.cjs.js.map +0 -1
- package/dist/index-node12-dev.mjs +0 -30
- package/dist/index-node12-dev.mjs.map +0 -1
- package/dist/index-node12.cjs.js.map +0 -1
- package/dist/index-node12.mjs.map +0 -1
- package/index.js +0 -6
package/.eslintrc.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,57 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [12.0.1](https://github.com/christophehurpeau/nightingale/compare/v12.0.0...v12.0.1) (2021-12-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package nightingale-console
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [12.0.0](https://github.com/christophehurpeau/nightingale/compare/v11.9.0...v12.0.0) (2021-12-11)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* missed legacy pob-babel ([82a38fa](https://github.com/christophehurpeau/nightingale/commit/82a38fa9743cfac3347386800070fea44d533321))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Build System
|
|
23
|
+
|
|
24
|
+
* node 14 and remove dev builds ([432ecd1](https://github.com/christophehurpeau/nightingale/commit/432ecd1faafd0419f57dea00fce560e4cccc207f))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
* drop default exports ([8878e49](https://github.com/christophehurpeau/nightingale/commit/8878e492b94852fcb892fd6d12c02c15c31b38b9))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### BREAKING CHANGES
|
|
33
|
+
|
|
34
|
+
* use named imports instead of default exports
|
|
35
|
+
* requires node 14
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## [11.7.4](https://github.com/christophehurpeau/nightingale/compare/v11.7.3...v11.7.4) (2021-11-27)
|
|
42
|
+
|
|
43
|
+
**Note:** Version bump only for package nightingale-console
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## [11.7.2](https://github.com/christophehurpeau/nightingale/compare/v11.7.1...v11.7.2) (2021-11-27)
|
|
50
|
+
|
|
51
|
+
**Note:** Version bump only for package nightingale-console
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
6
57
|
## [11.7.1](https://github.com/christophehurpeau/nightingale/compare/v11.7.0...v11.7.1) (2021-06-29)
|
|
7
58
|
|
|
8
59
|
|
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ npm install --save nightingale nightingale-console
|
|
|
20
20
|
|
|
21
21
|
```js
|
|
22
22
|
import { configure, levels } from 'nightingale';
|
|
23
|
-
import ConsoleHandler from 'nightingale-console';
|
|
23
|
+
import { ConsoleHandler } from 'nightingale-console';
|
|
24
24
|
|
|
25
25
|
configure([{ handlers: [new ConsoleHandler(Level.INFO)] }]);
|
|
26
26
|
```
|
|
@@ -29,7 +29,7 @@ configure([{ handlers: [new ConsoleHandler(Level.INFO)] }]);
|
|
|
29
29
|
|
|
30
30
|
`DEBUG=* node .`
|
|
31
31
|
|
|
32
|
-
```
|
|
32
|
+
```js
|
|
33
33
|
DEBUG='*'; # debug everything
|
|
34
34
|
DEBUG=app # debug for logger with key 'app'
|
|
35
35
|
DEBUG=app:* # debug for logger with key 'app' and all its children
|
|
@@ -39,3 +39,9 @@ DEBUG=/^(app|nightingale$)/ # debug for logger with key starting with 'app' and
|
|
|
39
39
|
DEBUG='*,-app'; # debug everything except app
|
|
40
40
|
DEBUG='*,-app:*'; # debug everything except app and all its children
|
|
41
41
|
```
|
|
42
|
+
|
|
43
|
+
## Use source maps to display error stack trace
|
|
44
|
+
|
|
45
|
+
Since node 12.12.0, you can use `--enable-source-maps` while running node.
|
|
46
|
+
|
|
47
|
+

|
|
@@ -4,30 +4,29 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const formatterANSI = require('nightingale-ansi-formatter');
|
|
6
6
|
const consoleOutput = require('nightingale-console-output');
|
|
7
|
-
const
|
|
7
|
+
const nightingaleDebug = require('nightingale-debug');
|
|
8
8
|
const formatterJSON = require('nightingale-json-formatter');
|
|
9
|
-
const
|
|
9
|
+
const nightingaleLevels = require('nightingale-levels');
|
|
10
10
|
|
|
11
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e[
|
|
11
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
|
|
12
12
|
|
|
13
13
|
const formatterANSI__default = /*#__PURE__*/_interopDefaultLegacy(formatterANSI);
|
|
14
14
|
const consoleOutput__default = /*#__PURE__*/_interopDefaultLegacy(consoleOutput);
|
|
15
|
-
const createFindDebugLevel__default = /*#__PURE__*/_interopDefaultLegacy(createFindDebugLevel);
|
|
16
15
|
const formatterJSON__default = /*#__PURE__*/_interopDefaultLegacy(formatterJSON);
|
|
17
|
-
const Level__default = /*#__PURE__*/_interopDefaultLegacy(Level);
|
|
18
16
|
|
|
19
17
|
const defaultFormatter = !process.stdout.isTTY && process.env.NIGHTINGALE_CONSOLE_FORMATTER !== 'ansi' ? formatterJSON__default : formatterANSI__default;
|
|
20
18
|
|
|
21
19
|
const createHandle = (formatter = defaultFormatter, output = consoleOutput__default) => {
|
|
22
20
|
return record => {
|
|
23
|
-
|
|
21
|
+
output(formatter(record), record);
|
|
24
22
|
};
|
|
25
23
|
};
|
|
26
24
|
|
|
27
|
-
const findDebugLevel =
|
|
25
|
+
const findDebugLevel = nightingaleDebug.createFindDebugLevel(process.env.DEBUG);
|
|
28
26
|
class ConsoleHandler {
|
|
27
|
+
minLevel = nightingaleLevels.Level.ALL;
|
|
28
|
+
|
|
29
29
|
constructor(minLevel, options = {}) {
|
|
30
|
-
this.minLevel = Level__default.ALL;
|
|
31
30
|
this.minLevel = minLevel;
|
|
32
31
|
|
|
33
32
|
this.isHandling = (level, key) => level >= findDebugLevel(minLevel, key);
|
|
@@ -38,5 +37,4 @@ class ConsoleHandler {
|
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
exports.ConsoleHandler = ConsoleHandler;
|
|
41
|
-
|
|
42
|
-
//# sourceMappingURL=index-node12.cjs.js.map
|
|
40
|
+
//# sourceMappingURL=index-node14.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-node14.cjs.js","sources":["../src/index.ts"],"sourcesContent":["import formatterANSI from 'nightingale-ansi-formatter';\nimport consoleOutput from 'nightingale-console-output';\nimport { createFindDebugLevel } from 'nightingale-debug';\nimport formatterJSON from 'nightingale-json-formatter';\nimport { Level } from 'nightingale-levels';\nimport type {\n IsHandling,\n Handle,\n LogRecord,\n Metadata,\n Handler,\n} from 'nightingale-types';\n\nconst defaultFormatter =\n __POB_TARGET__ === 'node' &&\n !process.stdout.isTTY &&\n process.env.NIGHTINGALE_CONSOLE_FORMATTER !== 'ansi'\n ? formatterJSON\n : formatterANSI;\n\nconst createHandle = (\n formatter = defaultFormatter,\n output = consoleOutput,\n): Handle => {\n return <T extends Metadata>(record: LogRecord<T>): void => {\n output(formatter(record), record);\n };\n};\nconst findDebugLevel = createFindDebugLevel(process.env.DEBUG);\n\ninterface ConsoleHandlerOptions {\n formatter?: <T extends Metadata>(record: LogRecord<T>) => string;\n output?: <T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n ) => void;\n // compat with nightingale-app-console, not used yet\n theme?: 'dark' | 'light';\n}\n\nexport class ConsoleHandler implements Handler {\n minLevel: Level = Level.ALL;\n\n isHandling: IsHandling;\n\n handle: Handle;\n\n constructor(minLevel: Level, options: ConsoleHandlerOptions = {}) {\n this.minLevel = minLevel;\n this.isHandling = (level: Level, key: string) =>\n level >= findDebugLevel(minLevel, key);\n this.handle = createHandle(options.formatter, options.output);\n }\n}\n"],"names":["defaultFormatter","process","stdout","isTTY","env","NIGHTINGALE_CONSOLE_FORMATTER","formatterJSON","formatterANSI","createHandle","formatter","output","consoleOutput","record","findDebugLevel","createFindDebugLevel","DEBUG","ConsoleHandler","minLevel","Level","ALL","constructor","options","isHandling","level","key","handle"],"mappings":";;;;;;;;;;;;;;;;AAaA,MAAMA,gBAAgB,GAEpB,CAACC,OAAO,CAACC,MAAR,CAAeC,KADhB,IAEAF,OAAO,CAACG,GAAR,CAAYC,6BAAZ,KAA8C,MAF9C,GAGIC,sBAHJ,GAIIC,sBALN;;AAOA,MAAMC,YAAY,GAAG,CACnBC,SAAS,GAAGT,gBADO,EAEnBU,MAAM,GAAGC,sBAFU,KAGR;AACX,SAA4BC,MAArB,IAAoD;AACzDF,IAAAA,MAAM,CAACD,SAAS,CAACG,MAAD,CAAV,EAAoBA,MAApB,CAAN;AACD,GAFD;AAGD,CAPD;;AAQA,MAAMC,cAAc,GAAGC,qCAAoB,CAACb,OAAO,CAACG,GAAR,CAAYW,KAAb,CAA3C;AAYO,MAAMC,cAAN,CAAwC;AAC7CC,EAAAA,QAAQ,GAAUC,uBAAK,CAACC,GAAhB;;AAMRC,EAAAA,WAAW,CAACH,QAAD,EAAkBI,OAA8B,GAAG,EAAnD,EAAuD;AAChE,SAAKJ,QAAL,GAAgBA,QAAhB;;AACA,SAAKK,UAAL,GAAkB,CAACC,KAAD,EAAeC,GAAf,KAChBD,KAAK,IAAIV,cAAc,CAACI,QAAD,EAAWO,GAAX,CADzB;;AAEA,SAAKC,MAAL,GAAcjB,YAAY,CAACa,OAAO,CAACZ,SAAT,EAAoBY,OAAO,CAACX,MAA5B,CAA1B;AACD;;AAZ4C;;;;"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import formatterANSI from 'nightingale-ansi-formatter';
|
|
2
2
|
import consoleOutput from 'nightingale-console-output';
|
|
3
|
-
import createFindDebugLevel from 'nightingale-debug';
|
|
3
|
+
import { createFindDebugLevel } from 'nightingale-debug';
|
|
4
4
|
import formatterJSON from 'nightingale-json-formatter';
|
|
5
|
-
import Level from 'nightingale-levels';
|
|
5
|
+
import { Level } from 'nightingale-levels';
|
|
6
6
|
|
|
7
7
|
const defaultFormatter = !process.stdout.isTTY && process.env.NIGHTINGALE_CONSOLE_FORMATTER !== 'ansi' ? formatterJSON : formatterANSI;
|
|
8
8
|
|
|
9
9
|
const createHandle = (formatter = defaultFormatter, output = consoleOutput) => {
|
|
10
10
|
return record => {
|
|
11
|
-
|
|
11
|
+
output(formatter(record), record);
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
const findDebugLevel = createFindDebugLevel(process.env.DEBUG);
|
|
16
16
|
class ConsoleHandler {
|
|
17
|
+
minLevel = Level.ALL;
|
|
18
|
+
|
|
17
19
|
constructor(minLevel, options = {}) {
|
|
18
|
-
this.minLevel = Level.ALL;
|
|
19
20
|
this.minLevel = minLevel;
|
|
20
21
|
|
|
21
22
|
this.isHandling = (level, key) => level >= findDebugLevel(minLevel, key);
|
|
@@ -25,6 +26,5 @@ class ConsoleHandler {
|
|
|
25
26
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
export default ConsoleHandler;
|
|
29
29
|
export { ConsoleHandler };
|
|
30
|
-
//# sourceMappingURL=index-
|
|
30
|
+
//# sourceMappingURL=index-node14.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-node14.mjs","sources":["../src/index.ts"],"sourcesContent":["import formatterANSI from 'nightingale-ansi-formatter';\nimport consoleOutput from 'nightingale-console-output';\nimport { createFindDebugLevel } from 'nightingale-debug';\nimport formatterJSON from 'nightingale-json-formatter';\nimport { Level } from 'nightingale-levels';\nimport type {\n IsHandling,\n Handle,\n LogRecord,\n Metadata,\n Handler,\n} from 'nightingale-types';\n\nconst defaultFormatter =\n __POB_TARGET__ === 'node' &&\n !process.stdout.isTTY &&\n process.env.NIGHTINGALE_CONSOLE_FORMATTER !== 'ansi'\n ? formatterJSON\n : formatterANSI;\n\nconst createHandle = (\n formatter = defaultFormatter,\n output = consoleOutput,\n): Handle => {\n return <T extends Metadata>(record: LogRecord<T>): void => {\n output(formatter(record), record);\n };\n};\nconst findDebugLevel = createFindDebugLevel(process.env.DEBUG);\n\ninterface ConsoleHandlerOptions {\n formatter?: <T extends Metadata>(record: LogRecord<T>) => string;\n output?: <T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n ) => void;\n // compat with nightingale-app-console, not used yet\n theme?: 'dark' | 'light';\n}\n\nexport class ConsoleHandler implements Handler {\n minLevel: Level = Level.ALL;\n\n isHandling: IsHandling;\n\n handle: Handle;\n\n constructor(minLevel: Level, options: ConsoleHandlerOptions = {}) {\n this.minLevel = minLevel;\n this.isHandling = (level: Level, key: string) =>\n level >= findDebugLevel(minLevel, key);\n this.handle = createHandle(options.formatter, options.output);\n }\n}\n"],"names":["defaultFormatter","process","stdout","isTTY","env","NIGHTINGALE_CONSOLE_FORMATTER","formatterJSON","formatterANSI","createHandle","formatter","output","consoleOutput","record","findDebugLevel","createFindDebugLevel","DEBUG","ConsoleHandler","minLevel","Level","ALL","constructor","options","isHandling","level","key","handle"],"mappings":";;;;;;AAaA,MAAMA,gBAAgB,GAEpB,CAACC,OAAO,CAACC,MAAR,CAAeC,KADhB,IAEAF,OAAO,CAACG,GAAR,CAAYC,6BAAZ,KAA8C,MAF9C,GAGIC,aAHJ,GAIIC,aALN;;AAOA,MAAMC,YAAY,GAAG,CACnBC,SAAS,GAAGT,gBADO,EAEnBU,MAAM,GAAGC,aAFU,KAGR;AACX,SAA4BC,MAArB,IAAoD;AACzDF,IAAAA,MAAM,CAACD,SAAS,CAACG,MAAD,CAAV,EAAoBA,MAApB,CAAN;AACD,GAFD;AAGD,CAPD;;AAQA,MAAMC,cAAc,GAAGC,oBAAoB,CAACb,OAAO,CAACG,GAAR,CAAYW,KAAb,CAA3C;AAYO,MAAMC,cAAN,CAAwC;AAC7CC,EAAAA,QAAQ,GAAUC,KAAK,CAACC,GAAhB;;AAMRC,EAAAA,WAAW,CAACH,QAAD,EAAkBI,OAA8B,GAAG,EAAnD,EAAuD;AAChE,SAAKJ,QAAL,GAAgBA,QAAhB;;AACA,SAAKK,UAAL,GAAkB,CAACC,KAAD,EAAeC,GAAf,KAChBD,KAAK,IAAIV,cAAc,CAACI,QAAD,EAAWO,GAAX,CADzB;;AAEA,SAAKC,MAAL,GAAcjB,YAAY,CAACa,OAAO,CAACZ,SAAT,EAAoBY,OAAO,CAACX,MAA5B,CAA1B;AACD;;AAZ4C;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Level from 'nightingale-levels';
|
|
1
|
+
import { Level } from 'nightingale-levels';
|
|
2
2
|
import type { IsHandling, Handle, LogRecord, Metadata, Handler } from 'nightingale-types';
|
|
3
3
|
interface ConsoleHandlerOptions {
|
|
4
4
|
formatter?: <T extends Metadata>(record: LogRecord<T>) => string;
|
|
@@ -11,6 +11,5 @@ export declare class ConsoleHandler implements Handler {
|
|
|
11
11
|
handle: Handle;
|
|
12
12
|
constructor(minLevel: Level, options?: ConsoleHandlerOptions);
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
export default ConsoleHandler;
|
|
14
|
+
export {};
|
|
16
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EACV,UAAU,EACV,MAAM,EACN,SAAS,EACT,QAAQ,EACR,OAAO,EACR,MAAM,mBAAmB,CAAC;AAmB3B,UAAU,qBAAqB;IAC7B,SAAS,CAAC,EAAE,CAAC,CAAC,SAAS,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC;IACjE,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,QAAQ,EAC1B,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EACxB,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,KACjB,IAAI,CAAC;IAEV,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,qBAAa,cAAe,YAAW,OAAO;IAC5C,QAAQ,EAAE,KAAK,CAAa;IAE5B,UAAU,EAAE,UAAU,CAAC;IAEvB,MAAM,EAAE,MAAM,CAAC;gBAEH,QAAQ,EAAE,KAAK,EAAE,OAAO,GAAE,qBAA0B;CAMjE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nightingale-console",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.1",
|
|
4
4
|
"description": "Console handler for nightingale",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nightingale",
|
|
@@ -14,32 +14,29 @@
|
|
|
14
14
|
"directory": "packages/nightingale-console"
|
|
15
15
|
},
|
|
16
16
|
"homepage": "https://github.com/christophehurpeau/nightingale",
|
|
17
|
+
"type": "commonjs",
|
|
17
18
|
"engines": {
|
|
18
|
-
"node": ">=
|
|
19
|
+
"node": "^14.13.1 || >=16.0.0"
|
|
19
20
|
},
|
|
20
|
-
"main": "./index.js",
|
|
21
|
+
"main": "./dist/index-node14.cjs.js",
|
|
21
22
|
"types": "./dist/index.d.ts",
|
|
22
23
|
"exports": {
|
|
24
|
+
"./package.json": "./package.json",
|
|
23
25
|
".": {
|
|
24
26
|
"node": {
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
"require": "./dist/index-node12-dev.cjs.js"
|
|
28
|
-
},
|
|
29
|
-
"import": "./dist/index-node12.mjs",
|
|
30
|
-
"require": "./dist/index-node12.cjs.js"
|
|
27
|
+
"import": "./dist/index-node14.mjs",
|
|
28
|
+
"require": "./dist/index-node14.cjs.js"
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
31
|
},
|
|
34
|
-
"module:node": "./dist/index-
|
|
35
|
-
"module:node-dev": "./dist/index-node12-dev.mjs",
|
|
32
|
+
"module:node": "./dist/index-node14.mjs",
|
|
36
33
|
"sideEffects": false,
|
|
37
34
|
"scripts": {
|
|
38
35
|
"build": "pob-build && yarn run build:definitions",
|
|
39
36
|
"build:definitions": "tsc -p tsconfig.build.json",
|
|
40
|
-
"clean": "rm -Rf
|
|
37
|
+
"clean": "rm -Rf dist",
|
|
41
38
|
"lint": "yarn run lint:eslint",
|
|
42
|
-
"lint:eslint": "
|
|
39
|
+
"lint:eslint": "cd ../.. && yarn run eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet packages/nightingale-console",
|
|
43
40
|
"watch": "pob-watch"
|
|
44
41
|
},
|
|
45
42
|
"prettier": {
|
|
@@ -51,7 +48,7 @@
|
|
|
51
48
|
"babelEnvs": [
|
|
52
49
|
{
|
|
53
50
|
"target": "node",
|
|
54
|
-
"version": "
|
|
51
|
+
"version": "14",
|
|
55
52
|
"formats": [
|
|
56
53
|
"cjs",
|
|
57
54
|
"es"
|
|
@@ -63,31 +60,18 @@
|
|
|
63
60
|
]
|
|
64
61
|
},
|
|
65
62
|
"dependencies": {
|
|
66
|
-
"@types/node": ">=
|
|
67
|
-
"nightingale-ansi-formatter": "
|
|
68
|
-
"nightingale-console-output": "
|
|
69
|
-
"nightingale-debug": "
|
|
70
|
-
"nightingale-json-formatter": "
|
|
71
|
-
"nightingale-levels": "
|
|
72
|
-
"nightingale-types": "
|
|
63
|
+
"@types/node": ">=14.0.0",
|
|
64
|
+
"nightingale-ansi-formatter": "12.0.1",
|
|
65
|
+
"nightingale-console-output": "12.0.1",
|
|
66
|
+
"nightingale-debug": "12.0.1",
|
|
67
|
+
"nightingale-json-formatter": "12.0.1",
|
|
68
|
+
"nightingale-levels": "12.0.1",
|
|
69
|
+
"nightingale-types": "12.0.1"
|
|
73
70
|
},
|
|
74
71
|
"devDependencies": {
|
|
75
|
-
"@babel/core": "7.
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"@pob/eslint-config-typescript": "43.2.0",
|
|
79
|
-
"@pob/eslint-config-typescript-node": "43.2.0",
|
|
80
|
-
"@typescript-eslint/eslint-plugin": "4.28.1",
|
|
81
|
-
"@typescript-eslint/parser": "4.28.1",
|
|
82
|
-
"babel-preset-latest-node": "5.5.1",
|
|
83
|
-
"eslint": "7.29.0",
|
|
84
|
-
"eslint-import-resolver-node": "0.3.4",
|
|
85
|
-
"eslint-plugin-import": "2.23.4",
|
|
86
|
-
"eslint-plugin-node": "11.1.0",
|
|
87
|
-
"eslint-plugin-unicorn": "29.0.0",
|
|
88
|
-
"pob-babel": "27.0.3",
|
|
89
|
-
"rollup": "2.52.3",
|
|
90
|
-
"typescript": "4.3.4"
|
|
72
|
+
"@babel/core": "7.16.0",
|
|
73
|
+
"pob-babel": "29.4.2",
|
|
74
|
+
"typescript": "4.5.3"
|
|
91
75
|
},
|
|
92
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "bb3da283ed9e19d2c1dcdb5e130c86b4835d8500"
|
|
93
77
|
}
|
package/src/.eslintrc.json
CHANGED
|
@@ -7,7 +7,24 @@
|
|
|
7
7
|
"plugins": ["@typescript-eslint"],
|
|
8
8
|
"extends": [
|
|
9
9
|
"@pob/eslint-config-typescript",
|
|
10
|
-
"@pob/eslint-config-typescript
|
|
10
|
+
"@pob/eslint-config-typescript/node"
|
|
11
11
|
],
|
|
12
|
-
"ignorePatterns": ["*.d.ts"]
|
|
12
|
+
"ignorePatterns": ["*.d.ts"],
|
|
13
|
+
"overrides": [
|
|
14
|
+
{
|
|
15
|
+
"files": ["**/*.test.ts", "__tests__/**/*.ts"],
|
|
16
|
+
"extends": ["@pob/eslint-config-typescript/test"],
|
|
17
|
+
"env": {
|
|
18
|
+
"jest": true
|
|
19
|
+
},
|
|
20
|
+
"rules": {
|
|
21
|
+
"import/no-extraneous-dependencies": [
|
|
22
|
+
"error",
|
|
23
|
+
{
|
|
24
|
+
"devDependencies": true
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
]
|
|
13
30
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { POB_TARGET } from 'pob-babel';
|
|
2
1
|
import formatterANSI from 'nightingale-ansi-formatter';
|
|
3
2
|
import consoleOutput from 'nightingale-console-output';
|
|
4
|
-
import createFindDebugLevel from 'nightingale-debug';
|
|
3
|
+
import { createFindDebugLevel } from 'nightingale-debug';
|
|
5
4
|
import formatterJSON from 'nightingale-json-formatter';
|
|
6
|
-
import Level from 'nightingale-levels';
|
|
5
|
+
import { Level } from 'nightingale-levels';
|
|
7
6
|
import type {
|
|
8
7
|
IsHandling,
|
|
9
8
|
Handle,
|
|
@@ -13,7 +12,7 @@ import type {
|
|
|
13
12
|
} from 'nightingale-types';
|
|
14
13
|
|
|
15
14
|
const defaultFormatter =
|
|
16
|
-
|
|
15
|
+
__POB_TARGET__ === 'node' &&
|
|
17
16
|
!process.stdout.isTTY &&
|
|
18
17
|
process.env.NIGHTINGALE_CONSOLE_FORMATTER !== 'ansi'
|
|
19
18
|
? formatterJSON
|
|
@@ -24,7 +23,7 @@ const createHandle = (
|
|
|
24
23
|
output = consoleOutput,
|
|
25
24
|
): Handle => {
|
|
26
25
|
return <T extends Metadata>(record: LogRecord<T>): void => {
|
|
27
|
-
|
|
26
|
+
output(formatter(record), record);
|
|
28
27
|
};
|
|
29
28
|
};
|
|
30
29
|
const findDebugLevel = createFindDebugLevel(process.env.DEBUG);
|
|
@@ -53,6 +52,3 @@ export class ConsoleHandler implements Handler {
|
|
|
53
52
|
this.handle = createHandle(options.formatter, options.output);
|
|
54
53
|
}
|
|
55
54
|
}
|
|
56
|
-
|
|
57
|
-
/** @deprecated use named export instead */
|
|
58
|
-
export default ConsoleHandler;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const formatterANSI = require('nightingale-ansi-formatter');
|
|
6
|
-
const consoleOutput = require('nightingale-console-output');
|
|
7
|
-
const createFindDebugLevel = require('nightingale-debug');
|
|
8
|
-
const formatterJSON = require('nightingale-json-formatter');
|
|
9
|
-
const Level = require('nightingale-levels');
|
|
10
|
-
|
|
11
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
|
|
12
|
-
|
|
13
|
-
const formatterANSI__default = /*#__PURE__*/_interopDefaultLegacy(formatterANSI);
|
|
14
|
-
const consoleOutput__default = /*#__PURE__*/_interopDefaultLegacy(consoleOutput);
|
|
15
|
-
const createFindDebugLevel__default = /*#__PURE__*/_interopDefaultLegacy(createFindDebugLevel);
|
|
16
|
-
const formatterJSON__default = /*#__PURE__*/_interopDefaultLegacy(formatterJSON);
|
|
17
|
-
const Level__default = /*#__PURE__*/_interopDefaultLegacy(Level);
|
|
18
|
-
|
|
19
|
-
const defaultFormatter = !process.stdout.isTTY && process.env.NIGHTINGALE_CONSOLE_FORMATTER !== 'ansi' ? formatterJSON__default : formatterANSI__default;
|
|
20
|
-
|
|
21
|
-
const createHandle = (formatter = defaultFormatter, output = consoleOutput__default) => {
|
|
22
|
-
return record => {
|
|
23
|
-
return output(formatter(record), record);
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const findDebugLevel = createFindDebugLevel__default(process.env.DEBUG);
|
|
28
|
-
class ConsoleHandler {
|
|
29
|
-
constructor(minLevel, options = {}) {
|
|
30
|
-
this.minLevel = Level__default.ALL;
|
|
31
|
-
this.minLevel = minLevel;
|
|
32
|
-
|
|
33
|
-
this.isHandling = (level, key) => level >= findDebugLevel(minLevel, key);
|
|
34
|
-
|
|
35
|
-
this.handle = createHandle(options.formatter, options.output);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
exports.ConsoleHandler = ConsoleHandler;
|
|
41
|
-
exports.default = ConsoleHandler;
|
|
42
|
-
//# sourceMappingURL=index-node12-dev.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-node12-dev.cjs.js","sources":["../src/index.ts"],"sourcesContent":["import { POB_TARGET } from 'pob-babel';\nimport formatterANSI from 'nightingale-ansi-formatter';\nimport consoleOutput from 'nightingale-console-output';\nimport createFindDebugLevel from 'nightingale-debug';\nimport formatterJSON from 'nightingale-json-formatter';\nimport Level from 'nightingale-levels';\nimport type {\n IsHandling,\n Handle,\n LogRecord,\n Metadata,\n Handler,\n} from 'nightingale-types';\n\nconst defaultFormatter =\n POB_TARGET === 'node' &&\n !process.stdout.isTTY &&\n process.env.NIGHTINGALE_CONSOLE_FORMATTER !== 'ansi'\n ? formatterJSON\n : formatterANSI;\n\nconst createHandle = (\n formatter = defaultFormatter,\n output = consoleOutput,\n): Handle => {\n return <T extends Metadata>(record: LogRecord<T>): void => {\n return output(formatter(record), record);\n };\n};\nconst findDebugLevel = createFindDebugLevel(process.env.DEBUG);\n\ninterface ConsoleHandlerOptions {\n formatter?: <T extends Metadata>(record: LogRecord<T>) => string;\n output?: <T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n ) => void;\n // compat with nightingale-app-console, not used yet\n theme?: 'dark' | 'light';\n}\n\nexport class ConsoleHandler implements Handler {\n minLevel: Level = Level.ALL;\n\n isHandling: IsHandling;\n\n handle: Handle;\n\n constructor(minLevel: Level, options: ConsoleHandlerOptions = {}) {\n this.minLevel = minLevel;\n this.isHandling = (level: Level, key: string) =>\n level >= findDebugLevel(minLevel, key);\n this.handle = createHandle(options.formatter, options.output);\n }\n}\n\n/** @deprecated use named export instead */\nexport default ConsoleHandler;\n"],"names":["defaultFormatter","process","stdout","isTTY","env","NIGHTINGALE_CONSOLE_FORMATTER","formatterJSON","formatterANSI","createHandle","formatter","output","consoleOutput","record","findDebugLevel","createFindDebugLevel","DEBUG","ConsoleHandler","constructor","minLevel","options","Level","ALL","isHandling","level","key","handle"],"mappings":";;;;;;;;;;;;;;;;;;AAcA,MAAMA,gBAAgB,GAEpB,CAACC,OAAO,CAACC,MAAR,CAAeC,KADhB,IAEAF,OAAO,CAACG,GAAR,CAAYC,6BAAZ,KAA8C,MAF9C,GAGIC,sBAHJ,GAIIC,sBALN;;AAOA,MAAMC,YAAY,GAAG,CACnBC,SAAS,GAAGT,gBADO,EAEnBU,MAAM,GAAGC,sBAFU,KAGR;AACX,SAA4BC,MAArB,IAAoD;AACzD,WAAOF,MAAM,CAACD,SAAS,CAACG,MAAD,CAAV,EAAoBA,MAApB,CAAb;AACD,GAFD;AAGD,CAPD;;AAQA,MAAMC,cAAc,GAAGC,6BAAoB,CAACb,OAAO,CAACG,GAAR,CAAYW,KAAb,CAA3C;AAYO,MAAMC,cAAN,CAAwC;AAO7CC,EAAAA,WAAW,CAACC,QAAD,EAAkBC,OAA8B,GAAG,EAAnD,EAAuD;AAAA,SANlED,QAMkE,GANhDE,cAAK,CAACC,GAM0C;AAChE,SAAKH,QAAL,GAAgBA,QAAhB;;AACA,SAAKI,UAAL,GAAkB,CAACC,KAAD,EAAeC,GAAf,KAChBD,KAAK,IAAIV,cAAc,CAACK,QAAD,EAAWM,GAAX,CADzB;;AAEA,SAAKC,MAAL,GAAcjB,YAAY,CAACW,OAAO,CAACV,SAAT,EAAoBU,OAAO,CAACT,MAA5B,CAA1B;AACD;;AAZ4C;;;;;"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import formatterANSI from 'nightingale-ansi-formatter';
|
|
2
|
-
import consoleOutput from 'nightingale-console-output';
|
|
3
|
-
import createFindDebugLevel from 'nightingale-debug';
|
|
4
|
-
import formatterJSON from 'nightingale-json-formatter';
|
|
5
|
-
import Level from 'nightingale-levels';
|
|
6
|
-
|
|
7
|
-
const defaultFormatter = !process.stdout.isTTY && process.env.NIGHTINGALE_CONSOLE_FORMATTER !== 'ansi' ? formatterJSON : formatterANSI;
|
|
8
|
-
|
|
9
|
-
const createHandle = (formatter = defaultFormatter, output = consoleOutput) => {
|
|
10
|
-
return record => {
|
|
11
|
-
return output(formatter(record), record);
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const findDebugLevel = createFindDebugLevel(process.env.DEBUG);
|
|
16
|
-
class ConsoleHandler {
|
|
17
|
-
constructor(minLevel, options = {}) {
|
|
18
|
-
this.minLevel = Level.ALL;
|
|
19
|
-
this.minLevel = minLevel;
|
|
20
|
-
|
|
21
|
-
this.isHandling = (level, key) => level >= findDebugLevel(minLevel, key);
|
|
22
|
-
|
|
23
|
-
this.handle = createHandle(options.formatter, options.output);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export default ConsoleHandler;
|
|
29
|
-
export { ConsoleHandler };
|
|
30
|
-
//# sourceMappingURL=index-node12-dev.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-node12-dev.mjs","sources":["../src/index.ts"],"sourcesContent":["import { POB_TARGET } from 'pob-babel';\nimport formatterANSI from 'nightingale-ansi-formatter';\nimport consoleOutput from 'nightingale-console-output';\nimport createFindDebugLevel from 'nightingale-debug';\nimport formatterJSON from 'nightingale-json-formatter';\nimport Level from 'nightingale-levels';\nimport type {\n IsHandling,\n Handle,\n LogRecord,\n Metadata,\n Handler,\n} from 'nightingale-types';\n\nconst defaultFormatter =\n POB_TARGET === 'node' &&\n !process.stdout.isTTY &&\n process.env.NIGHTINGALE_CONSOLE_FORMATTER !== 'ansi'\n ? formatterJSON\n : formatterANSI;\n\nconst createHandle = (\n formatter = defaultFormatter,\n output = consoleOutput,\n): Handle => {\n return <T extends Metadata>(record: LogRecord<T>): void => {\n return output(formatter(record), record);\n };\n};\nconst findDebugLevel = createFindDebugLevel(process.env.DEBUG);\n\ninterface ConsoleHandlerOptions {\n formatter?: <T extends Metadata>(record: LogRecord<T>) => string;\n output?: <T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n ) => void;\n // compat with nightingale-app-console, not used yet\n theme?: 'dark' | 'light';\n}\n\nexport class ConsoleHandler implements Handler {\n minLevel: Level = Level.ALL;\n\n isHandling: IsHandling;\n\n handle: Handle;\n\n constructor(minLevel: Level, options: ConsoleHandlerOptions = {}) {\n this.minLevel = minLevel;\n this.isHandling = (level: Level, key: string) =>\n level >= findDebugLevel(minLevel, key);\n this.handle = createHandle(options.formatter, options.output);\n }\n}\n\n/** @deprecated use named export instead */\nexport default ConsoleHandler;\n"],"names":["defaultFormatter","process","stdout","isTTY","env","NIGHTINGALE_CONSOLE_FORMATTER","formatterJSON","formatterANSI","createHandle","formatter","output","consoleOutput","record","findDebugLevel","createFindDebugLevel","DEBUG","ConsoleHandler","constructor","minLevel","options","Level","ALL","isHandling","level","key","handle"],"mappings":";;;;;;AAcA,MAAMA,gBAAgB,GAEpB,CAACC,OAAO,CAACC,MAAR,CAAeC,KADhB,IAEAF,OAAO,CAACG,GAAR,CAAYC,6BAAZ,KAA8C,MAF9C,GAGIC,aAHJ,GAIIC,aALN;;AAOA,MAAMC,YAAY,GAAG,CACnBC,SAAS,GAAGT,gBADO,EAEnBU,MAAM,GAAGC,aAFU,KAGR;AACX,SAA4BC,MAArB,IAAoD;AACzD,WAAOF,MAAM,CAACD,SAAS,CAACG,MAAD,CAAV,EAAoBA,MAApB,CAAb;AACD,GAFD;AAGD,CAPD;;AAQA,MAAMC,cAAc,GAAGC,oBAAoB,CAACb,OAAO,CAACG,GAAR,CAAYW,KAAb,CAA3C;AAYO,MAAMC,cAAN,CAAwC;AAO7CC,EAAAA,WAAW,CAACC,QAAD,EAAkBC,OAA8B,GAAG,EAAnD,EAAuD;AAAA,SANlED,QAMkE,GANhDE,KAAK,CAACC,GAM0C;AAChE,SAAKH,QAAL,GAAgBA,QAAhB;;AACA,SAAKI,UAAL,GAAkB,CAACC,KAAD,EAAeC,GAAf,KAChBD,KAAK,IAAIV,cAAc,CAACK,QAAD,EAAWM,GAAX,CADzB;;AAEA,SAAKC,MAAL,GAAcjB,YAAY,CAACW,OAAO,CAACV,SAAT,EAAoBU,OAAO,CAACT,MAA5B,CAA1B;AACD;;AAZ4C;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-node12.cjs.js","sources":["../src/index.ts"],"sourcesContent":["import { POB_TARGET } from 'pob-babel';\nimport formatterANSI from 'nightingale-ansi-formatter';\nimport consoleOutput from 'nightingale-console-output';\nimport createFindDebugLevel from 'nightingale-debug';\nimport formatterJSON from 'nightingale-json-formatter';\nimport Level from 'nightingale-levels';\nimport type {\n IsHandling,\n Handle,\n LogRecord,\n Metadata,\n Handler,\n} from 'nightingale-types';\n\nconst defaultFormatter =\n POB_TARGET === 'node' &&\n !process.stdout.isTTY &&\n process.env.NIGHTINGALE_CONSOLE_FORMATTER !== 'ansi'\n ? formatterJSON\n : formatterANSI;\n\nconst createHandle = (\n formatter = defaultFormatter,\n output = consoleOutput,\n): Handle => {\n return <T extends Metadata>(record: LogRecord<T>): void => {\n return output(formatter(record), record);\n };\n};\nconst findDebugLevel = createFindDebugLevel(process.env.DEBUG);\n\ninterface ConsoleHandlerOptions {\n formatter?: <T extends Metadata>(record: LogRecord<T>) => string;\n output?: <T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n ) => void;\n // compat with nightingale-app-console, not used yet\n theme?: 'dark' | 'light';\n}\n\nexport class ConsoleHandler implements Handler {\n minLevel: Level = Level.ALL;\n\n isHandling: IsHandling;\n\n handle: Handle;\n\n constructor(minLevel: Level, options: ConsoleHandlerOptions = {}) {\n this.minLevel = minLevel;\n this.isHandling = (level: Level, key: string) =>\n level >= findDebugLevel(minLevel, key);\n this.handle = createHandle(options.formatter, options.output);\n }\n}\n\n/** @deprecated use named export instead */\nexport default ConsoleHandler;\n"],"names":["defaultFormatter","process","stdout","isTTY","env","NIGHTINGALE_CONSOLE_FORMATTER","formatterJSON","formatterANSI","createHandle","formatter","output","consoleOutput","record","findDebugLevel","createFindDebugLevel","DEBUG","ConsoleHandler","constructor","minLevel","options","Level","ALL","isHandling","level","key","handle"],"mappings":";;;;;;;;;;;;;;;;;;AAcA,MAAMA,gBAAgB,GAEpB,CAACC,OAAO,CAACC,MAAR,CAAeC,KADhB,IAEAF,OAAO,CAACG,GAAR,CAAYC,6BAAZ,KAA8C,MAF9C,GAGIC,sBAHJ,GAIIC,sBALN;;AAOA,MAAMC,YAAY,GAAG,CACnBC,SAAS,GAAGT,gBADO,EAEnBU,MAAM,GAAGC,sBAFU,KAGR;AACX,SAA4BC,MAArB,IAAoD;AACzD,WAAOF,MAAM,CAACD,SAAS,CAACG,MAAD,CAAV,EAAoBA,MAApB,CAAb;AACD,GAFD;AAGD,CAPD;;AAQA,MAAMC,cAAc,GAAGC,6BAAoB,CAACb,OAAO,CAACG,GAAR,CAAYW,KAAb,CAA3C;AAYO,MAAMC,cAAN,CAAwC;AAO7CC,EAAAA,WAAW,CAACC,QAAD,EAAkBC,OAA8B,GAAG,EAAnD,EAAuD;AAAA,SANlED,QAMkE,GANhDE,cAAK,CAACC,GAM0C;AAChE,SAAKH,QAAL,GAAgBA,QAAhB;;AACA,SAAKI,UAAL,GAAkB,CAACC,KAAD,EAAeC,GAAf,KAChBD,KAAK,IAAIV,cAAc,CAACK,QAAD,EAAWM,GAAX,CADzB;;AAEA,SAAKC,MAAL,GAAcjB,YAAY,CAACW,OAAO,CAACV,SAAT,EAAoBU,OAAO,CAACT,MAA5B,CAA1B;AACD;;AAZ4C;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-node12.mjs","sources":["../src/index.ts"],"sourcesContent":["import { POB_TARGET } from 'pob-babel';\nimport formatterANSI from 'nightingale-ansi-formatter';\nimport consoleOutput from 'nightingale-console-output';\nimport createFindDebugLevel from 'nightingale-debug';\nimport formatterJSON from 'nightingale-json-formatter';\nimport Level from 'nightingale-levels';\nimport type {\n IsHandling,\n Handle,\n LogRecord,\n Metadata,\n Handler,\n} from 'nightingale-types';\n\nconst defaultFormatter =\n POB_TARGET === 'node' &&\n !process.stdout.isTTY &&\n process.env.NIGHTINGALE_CONSOLE_FORMATTER !== 'ansi'\n ? formatterJSON\n : formatterANSI;\n\nconst createHandle = (\n formatter = defaultFormatter,\n output = consoleOutput,\n): Handle => {\n return <T extends Metadata>(record: LogRecord<T>): void => {\n return output(formatter(record), record);\n };\n};\nconst findDebugLevel = createFindDebugLevel(process.env.DEBUG);\n\ninterface ConsoleHandlerOptions {\n formatter?: <T extends Metadata>(record: LogRecord<T>) => string;\n output?: <T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n ) => void;\n // compat with nightingale-app-console, not used yet\n theme?: 'dark' | 'light';\n}\n\nexport class ConsoleHandler implements Handler {\n minLevel: Level = Level.ALL;\n\n isHandling: IsHandling;\n\n handle: Handle;\n\n constructor(minLevel: Level, options: ConsoleHandlerOptions = {}) {\n this.minLevel = minLevel;\n this.isHandling = (level: Level, key: string) =>\n level >= findDebugLevel(minLevel, key);\n this.handle = createHandle(options.formatter, options.output);\n }\n}\n\n/** @deprecated use named export instead */\nexport default ConsoleHandler;\n"],"names":["defaultFormatter","process","stdout","isTTY","env","NIGHTINGALE_CONSOLE_FORMATTER","formatterJSON","formatterANSI","createHandle","formatter","output","consoleOutput","record","findDebugLevel","createFindDebugLevel","DEBUG","ConsoleHandler","constructor","minLevel","options","Level","ALL","isHandling","level","key","handle"],"mappings":";;;;;;AAcA,MAAMA,gBAAgB,GAEpB,CAACC,OAAO,CAACC,MAAR,CAAeC,KADhB,IAEAF,OAAO,CAACG,GAAR,CAAYC,6BAAZ,KAA8C,MAF9C,GAGIC,aAHJ,GAIIC,aALN;;AAOA,MAAMC,YAAY,GAAG,CACnBC,SAAS,GAAGT,gBADO,EAEnBU,MAAM,GAAGC,aAFU,KAGR;AACX,SAA4BC,MAArB,IAAoD;AACzD,WAAOF,MAAM,CAACD,SAAS,CAACG,MAAD,CAAV,EAAoBA,MAApB,CAAb;AACD,GAFD;AAGD,CAPD;;AAQA,MAAMC,cAAc,GAAGC,oBAAoB,CAACb,OAAO,CAACG,GAAR,CAAYW,KAAb,CAA3C;AAYO,MAAMC,cAAN,CAAwC;AAO7CC,EAAAA,WAAW,CAACC,QAAD,EAAkBC,OAA8B,GAAG,EAAnD,EAAuD;AAAA,SANlED,QAMkE,GANhDE,KAAK,CAACC,GAM0C;AAChE,SAAKH,QAAL,GAAgBA,QAAhB;;AACA,SAAKI,UAAL,GAAkB,CAACC,KAAD,EAAeC,GAAf,KAChBD,KAAK,IAAIV,cAAc,CAACK,QAAD,EAAWM,GAAX,CADzB;;AAEA,SAAKC,MAAL,GAAcjB,YAAY,CAACW,OAAO,CAACV,SAAT,EAAoBU,OAAO,CAACT,MAA5B,CAA1B;AACD;;AAZ4C;;;;;"}
|