nightingale-console-output 11.7.4 → 12.0.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 CHANGED
@@ -3,6 +3,22 @@
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.0](https://github.com/christophehurpeau/nightingale/compare/v11.9.0...v12.0.0) (2021-12-11)
7
+
8
+
9
+ ### Build System
10
+
11
+ * node 14 and remove dev builds ([432ecd1](https://github.com/christophehurpeau/nightingale/commit/432ecd1faafd0419f57dea00fce560e4cccc207f))
12
+
13
+
14
+ ### BREAKING CHANGES
15
+
16
+ * requires node 14
17
+
18
+
19
+
20
+
21
+
6
22
  ## [11.7.4](https://github.com/christophehurpeau/nightingale/compare/v11.7.3...v11.7.4) (2021-11-27)
7
23
 
8
24
  **Note:** Version bump only for package nightingale-console-output
@@ -1 +1 @@
1
- {"version":3,"file":"index-browser.cjs.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;;;;;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAAA;;AAKJ,cAAAC,OAAO,EAACD,MAAM,CAACE,KAAP,IAAgBC,uBAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,iBAA0DL,KAA1D;AAEH;;;;"}
1
+ {"version":3,"file":"index-browser.cjs.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (__POB_TARGET__ !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;;;;;AAAA;AAIe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAAA;;AAKJ,cAAAC,OAAO,EAACD,MAAM,CAACE,KAAP,IAAgBC,uBAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,iBAA0DL,KAA1D;AAEH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index-browser.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAAA;;AAKJ,cAAAC,OAAO,EAACD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,iBAA0DL,KAA1D;AAEH;;;;"}
1
+ {"version":3,"file":"index-browser.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (__POB_TARGET__ !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;AAAA;AAIe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAAA;;AAKJ,cAAAC,OAAO,EAACD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,iBAA0DL,KAA1D;AAEH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index-browsermodern.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAKJC,EAAAA,OAAO,CAACD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,CAAuD,GAAGL,KAA1D;AAEH;;;;"}
1
+ {"version":3,"file":"index-browsermodern.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (__POB_TARGET__ !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;AAAA;AAIe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAKJC,EAAAA,OAAO,CAACD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,CAAuD,GAAGL,KAA1D;AAEH;;;;"}
@@ -13,4 +13,4 @@ function consoleOutput(param, record) {
13
13
  }
14
14
 
15
15
  exports["default"] = consoleOutput;
16
- //# sourceMappingURL=index-node12.cjs.js.map
16
+ //# sourceMappingURL=index-node14.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-node14.cjs.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (__POB_TARGET__ !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","outKey","level","Level","ERROR","process","write"],"mappings":";;;;;;AAAA;AAIe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAC4B;AAChC,UAAMC,MAAM,GAAGD,MAAM,CAACE,KAAP,IAAgBC,uBAAK,CAACC,KAAtB,GAA8B,QAA9B,GAAyC,QAAxD;AACAC,IAAAA,OAAO,CAACJ,MAAD,CAAP,CAAgBK,KAAhB,CAAuB,GAAEP,KAAgB,IAAzC;AACD;AAGF;;;;"}
@@ -9,4 +9,4 @@ function consoleOutput(param, record) {
9
9
  }
10
10
 
11
11
  export { consoleOutput as default };
12
- //# sourceMappingURL=index-node12.mjs.map
12
+ //# sourceMappingURL=index-node14.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-node14.mjs","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (__POB_TARGET__ !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","outKey","level","Level","ERROR","process","write"],"mappings":";;AAAA;AAIe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAC4B;AAChC,UAAMC,MAAM,GAAGD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,QAA9B,GAAyC,QAAxD;AACAC,IAAAA,OAAO,CAACJ,MAAD,CAAP,CAAgBK,KAAhB,CAAuB,GAAEP,KAAgB,IAAzC;AACD;AAGF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7D,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,CAAC,SAAS,QAAQ,EACtD,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EACxB,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,GACnB,IAAI,CAON"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7D,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,CAAC,SAAS,QAAQ,EACtD,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EACxB,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,GACnB,IAAI,CAON"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nightingale-console-output",
3
- "version": "11.7.4",
3
+ "version": "12.0.0",
4
4
  "description": "Nightingale console output",
5
5
  "keywords": [
6
6
  "nightingale",
@@ -16,7 +16,7 @@
16
16
  "homepage": "https://github.com/christophehurpeau/nightingale",
17
17
  "type": "commonjs",
18
18
  "engines": {
19
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
19
+ "node": "^14.13.1 || >=16.0.0"
20
20
  },
21
21
  "browserslist": [
22
22
  "defaults",
@@ -25,7 +25,7 @@
25
25
  "not safari < 10",
26
26
  "not ios_saf < 10"
27
27
  ],
28
- "main": "./dist/index-node12.cjs.js",
28
+ "main": "./dist/index-node14.cjs.js",
29
29
  "types": "./dist/index.d.ts",
30
30
  "module": "./dist/index-browser.es.js",
31
31
  "browser": "./dist/index-browser.es.js",
@@ -33,40 +33,25 @@
33
33
  "./package.json": "./package.json",
34
34
  ".": {
35
35
  "node": {
36
- "development": {
37
- "import": "./dist/index-node12-dev.mjs",
38
- "require": "./dist/index-node12-dev.cjs.js"
39
- },
40
- "import": "./dist/index-node12.mjs",
41
- "require": "./dist/index-node12.cjs.js"
36
+ "import": "./dist/index-node14.mjs",
37
+ "require": "./dist/index-node14.cjs.js"
42
38
  },
43
39
  "browser": {
44
40
  "browser:modern": {
45
- "development": {
46
- "import": "./dist/index-browsermodern-dev.es.js"
47
- },
48
41
  "import": "./dist/index-browsermodern.es.js"
49
42
  },
50
- "development": {
51
- "import": "./dist/index-browser-dev.es.js",
52
- "require": "./dist/index-browser-dev.cjs.js"
53
- },
54
43
  "import": "./dist/index-browser.es.js",
55
44
  "require": "./dist/index-browser.cjs.js"
56
45
  }
57
46
  }
58
47
  },
59
- "module:node": "./dist/index-node12.mjs",
60
- "module:node-dev": "./dist/index-node12-dev.mjs",
61
- "module:browser": "./dist/index-browser.es.js",
62
- "module:browser-dev": "./dist/index-browser-dev.es.js",
48
+ "module:node": "./dist/index-node14.mjs",
63
49
  "module:modern-browsers": "./dist/index-browsermodern.es.js",
64
- "module:modern-browsers-dev": "./dist/index-browsermodern-dev.es.js",
65
50
  "sideEffects": false,
66
51
  "scripts": {
67
52
  "build": "pob-build && yarn run build:definitions",
68
53
  "build:definitions": "tsc -p tsconfig.build.json",
69
- "clean": "rm -Rf docs dist test/node6 coverage",
54
+ "clean": "rm -Rf dist",
70
55
  "lint": "yarn run lint:eslint",
71
56
  "lint:eslint": "cd ../.. && yarn run eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet packages/nightingale-console-output",
72
57
  "watch": "pob-watch"
@@ -80,7 +65,7 @@
80
65
  "babelEnvs": [
81
66
  {
82
67
  "target": "node",
83
- "version": "12",
68
+ "version": "14",
84
69
  "formats": [
85
70
  "cjs",
86
71
  "es"
@@ -106,18 +91,16 @@
106
91
  ]
107
92
  },
108
93
  "dependencies": {
109
- "@types/node": ">=12.0.0",
110
- "nightingale-levels": "^11.7.2",
111
- "nightingale-types": "^11.7.4"
94
+ "@types/node": ">=14.0.0",
95
+ "nightingale-levels": "^12.0.0",
96
+ "nightingale-types": "^12.0.0"
112
97
  },
113
98
  "devDependencies": {
114
99
  "@babel/core": "7.16.0",
115
100
  "@babel/preset-env": "7.16.4",
116
- "babel-preset-latest-node": "5.5.1",
117
101
  "babel-preset-modern-browsers": "15.0.2",
118
- "pob-babel": "28.5.0",
119
- "rollup": "2.60.1",
120
- "typescript": "4.5.2"
102
+ "pob-babel": "29.3.0",
103
+ "typescript": "4.5.3"
121
104
  },
122
- "gitHead": "70f6b4ba634ff778fc94bef7e2455e8b6a7db06a"
105
+ "gitHead": "682f57fa30eaca9732681d16008abb2680b24174"
123
106
  }
@@ -6,5 +6,22 @@
6
6
  },
7
7
  "plugins": ["@typescript-eslint"],
8
8
  "extends": ["@pob/eslint-config-typescript"],
9
- "ignorePatterns": ["*.d.ts"]
9
+ "ignorePatterns": ["*.d.ts"],
10
+ "overrides": [
11
+ {
12
+ "files": ["**/*.test.ts", "__tests__/**/*.ts"],
13
+ "extends": ["@pob/eslint-config-typescript/test"],
14
+ "env": {
15
+ "jest": true
16
+ },
17
+ "rules": {
18
+ "import/no-extraneous-dependencies": [
19
+ "error",
20
+ {
21
+ "devDependencies": true
22
+ }
23
+ ]
24
+ }
25
+ }
26
+ ]
10
27
  }
package/src/index.ts CHANGED
@@ -1,7 +1,4 @@
1
1
  /* eslint-disable no-console */
2
- /// <reference types="node" />
3
-
4
- import { POB_TARGET } from 'pob-babel';
5
2
  import { Level } from 'nightingale-levels';
6
3
  import type { LogRecord, Metadata } from 'nightingale-types';
7
4
 
@@ -9,7 +6,7 @@ export default function consoleOutput<T extends Metadata>(
9
6
  param: string | string[],
10
7
  record: LogRecord<T>,
11
8
  ): void {
12
- if (POB_TARGET !== 'browser') {
9
+ if (__POB_TARGET__ !== 'browser') {
13
10
  const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';
14
11
  process[outKey].write(`${param as string}\n`);
15
12
  } else {
@@ -0,0 +1 @@
1
+ /// <reference types="pob-babel" />
@@ -1,15 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var nightingaleLevels = require('nightingale-levels');
6
-
7
- /* eslint-disable no-console */
8
- function consoleOutput(param, record) {
9
- var _console;
10
-
11
- (_console = console)[record.level >= nightingaleLevels.Level.ERROR ? 'error' : 'log'].apply(_console, param);
12
- }
13
-
14
- exports["default"] = consoleOutput;
15
- //# sourceMappingURL=index-browser-dev.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-browser-dev.cjs.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;;;;;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAAA;;AAKJ,cAAAC,OAAO,EAACD,MAAM,CAACE,KAAP,IAAgBC,uBAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,iBAA0DL,KAA1D;AAEH;;;;"}
@@ -1,11 +0,0 @@
1
- import { Level } from 'nightingale-levels';
2
-
3
- /* eslint-disable no-console */
4
- function consoleOutput(param, record) {
5
- var _console;
6
-
7
- (_console = console)[record.level >= Level.ERROR ? 'error' : 'log'].apply(_console, param);
8
- }
9
-
10
- export { consoleOutput as default };
11
- //# sourceMappingURL=index-browser-dev.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-browser-dev.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAAA;;AAKJ,cAAAC,OAAO,EAACD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,iBAA0DL,KAA1D;AAEH;;;;"}
@@ -1,9 +0,0 @@
1
- import { Level } from 'nightingale-levels';
2
-
3
- /* eslint-disable no-console */
4
- function consoleOutput(param, record) {
5
- console[record.level >= Level.ERROR ? 'error' : 'log'](...param);
6
- }
7
-
8
- export { consoleOutput as default };
9
- //# sourceMappingURL=index-browsermodern-dev.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-browsermodern-dev.es.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","console","level","Level","ERROR"],"mappings":";;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AAKJC,EAAAA,OAAO,CAACD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,CAAuD,GAAGL,KAA1D;AAEH;;;;"}
@@ -1,16 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const nightingaleLevels = require('nightingale-levels');
6
-
7
- /* eslint-disable no-console */
8
- function consoleOutput(param, record) {
9
- {
10
- const outKey = record.level >= nightingaleLevels.Level.ERROR ? 'stderr' : 'stdout';
11
- process[outKey].write(`${param}\n`);
12
- }
13
- }
14
-
15
- exports["default"] = consoleOutput;
16
- //# sourceMappingURL=index-node12-dev.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-node12-dev.cjs.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","outKey","level","Level","ERROR","process","write"],"mappings":";;;;;;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AACwB;AAC5B,UAAMC,MAAM,GAAGD,MAAM,CAACE,KAAP,IAAgBC,uBAAK,CAACC,KAAtB,GAA8B,QAA9B,GAAyC,QAAxD;AACAC,IAAAA,OAAO,CAACJ,MAAD,CAAP,CAAgBK,KAAhB,CAAuB,GAAEP,KAAgB,IAAzC;AACD;AAGF;;;;"}
@@ -1,12 +0,0 @@
1
- import { Level } from 'nightingale-levels';
2
-
3
- /* eslint-disable no-console */
4
- function consoleOutput(param, record) {
5
- {
6
- const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';
7
- process[outKey].write(`${param}\n`);
8
- }
9
- }
10
-
11
- export { consoleOutput as default };
12
- //# sourceMappingURL=index-node12-dev.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-node12-dev.mjs","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","outKey","level","Level","ERROR","process","write"],"mappings":";;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AACwB;AAC5B,UAAMC,MAAM,GAAGD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,QAA9B,GAAyC,QAAxD;AACAC,IAAAA,OAAO,CAACJ,MAAD,CAAP,CAAgBK,KAAhB,CAAuB,GAAEP,KAAgB,IAAzC;AACD;AAGF;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-node12.cjs.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","outKey","level","Level","ERROR","process","write"],"mappings":";;;;;;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AACwB;AAC5B,UAAMC,MAAM,GAAGD,MAAM,CAACE,KAAP,IAAgBC,uBAAK,CAACC,KAAtB,GAA8B,QAA9B,GAAyC,QAAxD;AACAC,IAAAA,OAAO,CAACJ,MAAD,CAAP,CAAgBK,KAAhB,CAAuB,GAAEP,KAAgB,IAAzC;AACD;AAGF;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-node12.mjs","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable no-console */\n/// <reference types=\"node\" />\n\nimport { POB_TARGET } from 'pob-babel';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Metadata } from 'nightingale-types';\n\nexport default function consoleOutput<T extends Metadata>(\n param: string | string[],\n record: LogRecord<T>,\n): void {\n if (POB_TARGET !== 'browser') {\n const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';\n process[outKey].write(`${param as string}\\n`);\n } else {\n console[record.level >= Level.ERROR ? 'error' : 'log'](...param);\n }\n}\n"],"names":["consoleOutput","param","record","outKey","level","Level","ERROR","process","write"],"mappings":";;AAAA;AAOe,SAASA,aAAT,CACbC,KADa,EAEbC,MAFa,EAGP;AACwB;AAC5B,UAAMC,MAAM,GAAGD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,QAA9B,GAAyC,QAAxD;AACAC,IAAAA,OAAO,CAACJ,MAAD,CAAP,CAAgBK,KAAhB,CAAuB,GAAEP,KAAgB,IAAzC;AACD;AAGF;;;;"}