nightingale-console-output 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 CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "root": true,
3
- "extends": ["@pob/eslint-config/root", "@pob/eslint-config-node"],
3
+ "extends": ["@pob/eslint-config/root-commonjs"],
4
4
  "ignorePatterns": ["*.d.ts", "/dist"]
5
5
  }
package/CHANGELOG.md CHANGED
@@ -3,6 +3,46 @@
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-output
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
+ ### Build System
18
+
19
+ * node 14 and remove dev builds ([432ecd1](https://github.com/christophehurpeau/nightingale/commit/432ecd1faafd0419f57dea00fce560e4cccc207f))
20
+
21
+
22
+ ### BREAKING CHANGES
23
+
24
+ * requires node 14
25
+
26
+
27
+
28
+
29
+
30
+ ## [11.7.4](https://github.com/christophehurpeau/nightingale/compare/v11.7.3...v11.7.4) (2021-11-27)
31
+
32
+ **Note:** Version bump only for package nightingale-console-output
33
+
34
+
35
+
36
+
37
+
38
+ ## [11.7.2](https://github.com/christophehurpeau/nightingale/compare/v11.7.1...v11.7.2) (2021-11-27)
39
+
40
+ **Note:** Version bump only for package nightingale-console-output
41
+
42
+
43
+
44
+
45
+
6
46
  ## [11.7.1](https://github.com/christophehurpeau/nightingale/compare/v11.7.0...v11.7.1) (2021-06-29)
7
47
 
8
48
 
@@ -2,18 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Level = require('nightingale-levels');
6
-
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
8
-
9
- var Level__default = /*#__PURE__*/_interopDefaultLegacy(Level);
5
+ var nightingaleLevels = require('nightingale-levels');
10
6
 
11
7
  /* eslint-disable no-console */
12
8
  function consoleOutput(param, record) {
13
9
  var _console;
14
10
 
15
- (_console = console)[record.level >= Level__default.ERROR ? 'error' : 'log'].apply(_console, param);
11
+ (_console = console)[record.level >= nightingaleLevels.Level.ERROR ? 'error' : 'log'].apply(_console, param);
16
12
  }
17
13
 
18
- exports.default = consoleOutput;
14
+ exports["default"] = consoleOutput;
19
15
  //# sourceMappingURL=index-browser.cjs.js.map
@@ -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,cAAK,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';\nimport 'pob-babel';\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;AAKe,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,4 +1,4 @@
1
- import Level from 'nightingale-levels';
1
+ import { Level } from 'nightingale-levels';
2
2
 
3
3
  /* eslint-disable no-console */
4
4
  function consoleOutput(param, record) {
@@ -7,5 +7,5 @@ function consoleOutput(param, record) {
7
7
  (_console = console)[record.level >= Level.ERROR ? 'error' : 'log'].apply(_console, param);
8
8
  }
9
9
 
10
- export default consoleOutput;
10
+ export { consoleOutput as default };
11
11
  //# sourceMappingURL=index-browser.es.js.map
@@ -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';\nimport 'pob-babel';\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;AAKe,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 +1,9 @@
1
- import Level from 'nightingale-levels';
1
+ import { Level } from 'nightingale-levels';
2
2
 
3
3
  /* eslint-disable no-console */
4
4
  function consoleOutput(param, record) {
5
5
  console[record.level >= Level.ERROR ? 'error' : 'log'](...param);
6
6
  }
7
7
 
8
- export default consoleOutput;
8
+ export { consoleOutput as default };
9
9
  //# sourceMappingURL=index-browsermodern.es.js.map
@@ -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';\nimport 'pob-babel';\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;AAKe,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;;;;"}
@@ -0,0 +1,16 @@
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-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';\nimport 'pob-babel';\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;AAKe,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;;;;"}
@@ -1,4 +1,4 @@
1
- import Level from 'nightingale-levels';
1
+ import { Level } from 'nightingale-levels';
2
2
 
3
3
  /* eslint-disable no-console */
4
4
  function consoleOutput(param, record) {
@@ -8,5 +8,5 @@ function consoleOutput(param, record) {
8
8
  }
9
9
  }
10
10
 
11
- export default consoleOutput;
12
- //# sourceMappingURL=index-node12-dev.mjs.map
11
+ export { consoleOutput as default };
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';\nimport 'pob-babel';\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;AAKe,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;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  import type { LogRecord, Metadata } from 'nightingale-types';
2
+ import 'pob-babel';
2
3
  export default function consoleOutput<T extends Metadata>(param: string | string[], record: LogRecord<T>): void;
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -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;AAC7D,OAAO,WAAW,CAAC;AAEnB,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.1",
3
+ "version": "12.0.1",
4
4
  "description": "Nightingale console output",
5
5
  "keywords": [
6
6
  "nightingale",
@@ -14,8 +14,9 @@
14
14
  "directory": "packages/nightingale-console-output"
15
15
  },
16
16
  "homepage": "https://github.com/christophehurpeau/nightingale",
17
+ "type": "commonjs",
17
18
  "engines": {
18
- "node": ">=12.10.0"
19
+ "node": "^14.13.1 || >=16.0.0"
19
20
  },
20
21
  "browserslist": [
21
22
  "defaults",
@@ -24,49 +25,35 @@
24
25
  "not safari < 10",
25
26
  "not ios_saf < 10"
26
27
  ],
27
- "main": "./index.js",
28
+ "main": "./dist/index-node14.cjs.js",
28
29
  "types": "./dist/index.d.ts",
29
30
  "module": "./dist/index-browser.es.js",
30
31
  "browser": "./dist/index-browser.es.js",
31
32
  "exports": {
33
+ "./package.json": "./package.json",
32
34
  ".": {
33
35
  "node": {
34
- "development": {
35
- "import": "./dist/index-node12-dev.mjs",
36
- "require": "./dist/index-node12-dev.cjs.js"
37
- },
38
- "import": "./dist/index-node12.mjs",
39
- "require": "./dist/index-node12.cjs.js"
36
+ "import": "./dist/index-node14.mjs",
37
+ "require": "./dist/index-node14.cjs.js"
40
38
  },
41
39
  "browser": {
42
40
  "browser:modern": {
43
- "development": {
44
- "import": "./dist/index-browsermodern-dev.es.js"
45
- },
46
41
  "import": "./dist/index-browsermodern.es.js"
47
42
  },
48
- "development": {
49
- "import": "./dist/index-browser-dev.es.js",
50
- "require": "./dist/index-browser-dev.cjs.js"
51
- },
52
43
  "import": "./dist/index-browser.es.js",
53
44
  "require": "./dist/index-browser.cjs.js"
54
45
  }
55
46
  }
56
47
  },
57
- "module:node": "./dist/index-node12.mjs",
58
- "module:node-dev": "./dist/index-node12-dev.mjs",
59
- "module:browser": "./dist/index-browser.es.js",
60
- "module:browser-dev": "./dist/index-browser-dev.es.js",
48
+ "module:node": "./dist/index-node14.mjs",
61
49
  "module:modern-browsers": "./dist/index-browsermodern.es.js",
62
- "module:modern-browsers-dev": "./dist/index-browsermodern-dev.es.js",
63
50
  "sideEffects": false,
64
51
  "scripts": {
65
52
  "build": "pob-build && yarn run build:definitions",
66
53
  "build:definitions": "tsc -p tsconfig.build.json",
67
- "clean": "rm -Rf docs dist test/node6 coverage",
54
+ "clean": "rm -Rf dist",
68
55
  "lint": "yarn run lint:eslint",
69
- "lint:eslint": "yarn --cwd ../.. run eslint --ext .js,.mjs,.ts --report-unused-disable-directives --quiet packages/nightingale-console-output",
56
+ "lint:eslint": "cd ../.. && yarn run eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet packages/nightingale-console-output",
70
57
  "watch": "pob-watch"
71
58
  },
72
59
  "prettier": {
@@ -78,7 +65,7 @@
78
65
  "babelEnvs": [
79
66
  {
80
67
  "target": "node",
81
- "version": "12",
68
+ "version": "14",
82
69
  "formats": [
83
70
  "cjs",
84
71
  "es"
@@ -104,28 +91,16 @@
104
91
  ]
105
92
  },
106
93
  "dependencies": {
107
- "@types/node": ">=12.0.0",
108
- "nightingale-levels": "^11.7.1",
109
- "nightingale-types": "^11.7.1"
94
+ "@types/node": ">=14.0.0",
95
+ "nightingale-levels": "12.0.1",
96
+ "nightingale-types": "12.0.1"
110
97
  },
111
98
  "devDependencies": {
112
- "@babel/core": "7.14.6",
113
- "@babel/preset-env": "7.14.7",
114
- "@pob/eslint-config": "43.2.0",
115
- "@pob/eslint-config-node": "43.2.0",
116
- "@pob/eslint-config-typescript": "43.2.0",
117
- "@typescript-eslint/eslint-plugin": "4.28.1",
118
- "@typescript-eslint/parser": "4.28.1",
119
- "babel-preset-latest-node": "5.5.1",
99
+ "@babel/core": "7.16.0",
100
+ "@babel/preset-env": "7.16.4",
120
101
  "babel-preset-modern-browsers": "15.0.2",
121
- "eslint": "7.29.0",
122
- "eslint-import-resolver-node": "0.3.4",
123
- "eslint-plugin-import": "2.23.4",
124
- "eslint-plugin-node": "11.1.0",
125
- "eslint-plugin-unicorn": "29.0.0",
126
- "pob-babel": "27.0.3",
127
- "rollup": "2.52.3",
128
- "typescript": "4.3.4"
102
+ "pob-babel": "29.4.2",
103
+ "typescript": "4.5.3"
129
104
  },
130
- "gitHead": "325214aa6c7f87ace818389b77ce7b4208005c11"
105
+ "gitHead": "bb3da283ed9e19d2c1dcdb5e130c86b4835d8500"
131
106
  }
@@ -0,0 +1,3 @@
1
+ import createRollupConfig from 'pob-babel/createRollupConfig.js';
2
+
3
+ export default createRollupConfig({});
@@ -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,15 +1,13 @@
1
1
  /* eslint-disable no-console */
2
- /// <reference types="node" />
3
-
4
- import { POB_TARGET } from 'pob-babel';
5
- import Level from 'nightingale-levels';
2
+ import { Level } from 'nightingale-levels';
6
3
  import type { LogRecord, Metadata } from 'nightingale-types';
4
+ import 'pob-babel';
7
5
 
8
6
  export default function consoleOutput<T extends Metadata>(
9
7
  param: string | string[],
10
8
  record: LogRecord<T>,
11
9
  ): void {
12
- if (POB_TARGET !== 'browser') {
10
+ if (__POB_TARGET__ !== 'browser') {
13
11
  const outKey = record.level >= Level.ERROR ? 'stderr' : 'stdout';
14
12
  process[outKey].write(`${param as string}\n`);
15
13
  } else {
@@ -1,19 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var Level = require('nightingale-levels');
6
-
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
8
-
9
- var Level__default = /*#__PURE__*/_interopDefaultLegacy(Level);
10
-
11
- /* eslint-disable no-console */
12
- function consoleOutput(param, record) {
13
- var _console;
14
-
15
- (_console = console)[record.level >= Level__default.ERROR ? 'error' : 'log'].apply(_console, param);
16
- }
17
-
18
- exports.default = consoleOutput;
19
- //# 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,cAAK,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 default consoleOutput;
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 default consoleOutput;
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,20 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const Level = require('nightingale-levels');
6
-
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
8
-
9
- const Level__default = /*#__PURE__*/_interopDefaultLegacy(Level);
10
-
11
- /* eslint-disable no-console */
12
- function consoleOutput(param, record) {
13
- {
14
- const outKey = record.level >= Level__default.ERROR ? 'stderr' : 'stdout';
15
- process[outKey].write(`${param}\n`);
16
- }
17
- }
18
-
19
- exports.default = consoleOutput;
20
- //# 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,cAAK,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-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,20 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const Level = require('nightingale-levels');
6
-
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
8
-
9
- const Level__default = /*#__PURE__*/_interopDefaultLegacy(Level);
10
-
11
- /* eslint-disable no-console */
12
- function consoleOutput(param, record) {
13
- {
14
- const outKey = record.level >= Level__default.ERROR ? 'stderr' : 'stdout';
15
- process[outKey].write(`${param}\n`);
16
- }
17
- }
18
-
19
- exports.default = consoleOutput;
20
- //# sourceMappingURL=index-node12.cjs.js.map
@@ -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,cAAK,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 default consoleOutput;
12
- //# sourceMappingURL=index-node12.mjs.map
@@ -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;;;;"}
package/index.js DELETED
@@ -1,6 +0,0 @@
1
- /* eslint-disable import/no-dynamic-require */
2
-
3
- 'use strict';
4
-
5
- const production = process.env.NODE_ENV === 'production';
6
- module.exports = require(`./dist/index-node12${production ? '' : '-dev'}.cjs`);