nightingale-console-output 11.7.0 → 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/.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,49 @@
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
+
22
+ ## [11.7.4](https://github.com/christophehurpeau/nightingale/compare/v11.7.3...v11.7.4) (2021-11-27)
23
+
24
+ **Note:** Version bump only for package nightingale-console-output
25
+
26
+
27
+
28
+
29
+
30
+ ## [11.7.2](https://github.com/christophehurpeau/nightingale/compare/v11.7.1...v11.7.2) (2021-11-27)
31
+
32
+ **Note:** Version bump only for package nightingale-console-output
33
+
34
+
35
+
36
+
37
+
38
+ ## [11.7.1](https://github.com/christophehurpeau/nightingale/compare/v11.7.0...v11.7.1) (2021-06-29)
39
+
40
+
41
+ ### Bug Fixes
42
+
43
+ * update pob-babel to bring back webpack 4 support ([4887431](https://github.com/christophehurpeau/nightingale/commit/4887431b3b272496511f879af022638723b9056e))
44
+
45
+
46
+
47
+
48
+
6
49
  # [11.7.0](https://github.com/christophehurpeau/nightingale/compare/v11.6.0...v11.7.0) (2021-03-29)
7
50
 
8
51
  **Note:** Version bump only for package nightingale-console-output
@@ -2,16 +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
- console[record.level >= Level__default.ERROR ? 'error' : 'log'](...param);
9
+ var _console;
10
+
11
+ (_console = console)[record.level >= nightingaleLevels.Level.ERROR ? 'error' : 'log'].apply(_console, param);
14
12
  }
15
13
 
16
- exports.default = consoleOutput;
14
+ exports["default"] = consoleOutput;
17
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;AAKJC,EAAAA,OAAO,CAACD,MAAM,CAACE,KAAP,IAAgBC,cAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,CAAuD,GAAGL,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,9 +1,11 @@
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
- console[record.level >= Level.ERROR ? 'error' : 'log'](...param);
5
+ var _console;
6
+
7
+ (_console = console)[record.level >= Level.ERROR ? 'error' : 'log'].apply(_console, param);
6
8
  }
7
9
 
8
- export default consoleOutput;
10
+ export { consoleOutput as default };
9
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;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-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,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';\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;;;;"}
@@ -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';\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;;;;"}
@@ -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';\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.0",
3
+ "version": "12.0.0",
4
4
  "description": "Nightingale console output",
5
5
  "keywords": [
6
6
  "nightingale",
@@ -14,64 +14,46 @@
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": [
22
+ "defaults",
21
23
  "> 0.2%",
22
- "Firefox ESR",
23
- "last 2 Chrome versions",
24
- "last 2 iOS versions",
25
- "last 2 Edge versions",
26
- "last 2 Safari versions",
27
24
  "not ie < 12",
28
- "not ios_saf < 10",
29
- "not dead",
30
- "not op_mini all"
25
+ "not safari < 10",
26
+ "not ios_saf < 10"
31
27
  ],
32
- "main": "./index.js",
28
+ "main": "./dist/index-node14.cjs.js",
33
29
  "types": "./dist/index.d.ts",
34
30
  "module": "./dist/index-browser.es.js",
35
31
  "browser": "./dist/index-browser.es.js",
36
32
  "exports": {
33
+ "./package.json": "./package.json",
37
34
  ".": {
38
35
  "node": {
39
- "development": {
40
- "import": "./dist/index-node12-dev.mjs",
41
- "require": "./dist/index-node12-dev.cjs.js"
42
- },
43
- "import": "./dist/index-node12.mjs",
44
- "require": "./dist/index-node12.cjs.js"
36
+ "import": "./dist/index-node14.mjs",
37
+ "require": "./dist/index-node14.cjs.js"
45
38
  },
46
39
  "browser": {
47
40
  "browser:modern": {
48
- "development": {
49
- "import": "./dist/index-browsermodern-dev.es.js"
50
- },
51
41
  "import": "./dist/index-browsermodern.es.js"
52
42
  },
53
- "development": {
54
- "import": "./dist/index-browser-dev.es.js",
55
- "require": "./dist/index-browser-dev.cjs.js"
56
- },
57
43
  "import": "./dist/index-browser.es.js",
58
44
  "require": "./dist/index-browser.cjs.js"
59
45
  }
60
46
  }
61
47
  },
62
- "module:node": "./dist/index-node12.mjs",
63
- "module:node-dev": "./dist/index-node12-dev.mjs",
64
- "module:browser": "./dist/index-browser.es.js",
65
- "module:browser-dev": "./dist/index-browser-dev.es.js",
48
+ "module:node": "./dist/index-node14.mjs",
66
49
  "module:modern-browsers": "./dist/index-browsermodern.es.js",
67
- "module:modern-browsers-dev": "./dist/index-browsermodern-dev.es.js",
68
50
  "sideEffects": false,
69
51
  "scripts": {
70
52
  "build": "pob-build && yarn run build:definitions",
71
53
  "build:definitions": "tsc -p tsconfig.build.json",
72
- "clean": "rm -Rf docs dist test/node6 coverage",
54
+ "clean": "rm -Rf dist",
73
55
  "lint": "yarn run lint:eslint",
74
- "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",
75
57
  "watch": "pob-watch"
76
58
  },
77
59
  "prettier": {
@@ -83,7 +65,7 @@
83
65
  "babelEnvs": [
84
66
  {
85
67
  "target": "node",
86
- "version": "12",
68
+ "version": "14",
87
69
  "formats": [
88
70
  "cjs",
89
71
  "es"
@@ -109,28 +91,16 @@
109
91
  ]
110
92
  },
111
93
  "dependencies": {
112
- "@types/node": ">=12.0.0",
113
- "nightingale-levels": "^11.7.0",
114
- "nightingale-types": "^11.7.0"
94
+ "@types/node": ">=14.0.0",
95
+ "nightingale-levels": "^12.0.0",
96
+ "nightingale-types": "^12.0.0"
115
97
  },
116
98
  "devDependencies": {
117
- "@babel/core": "7.13.10",
118
- "@babel/preset-env": "7.13.10",
119
- "@pob/eslint-config": "43.0.0",
120
- "@pob/eslint-config-node": "43.1.0",
121
- "@pob/eslint-config-typescript": "43.0.0",
122
- "@typescript-eslint/eslint-plugin": "4.19.0",
123
- "@typescript-eslint/parser": "4.19.0",
124
- "babel-preset-latest-node": "5.5.1",
99
+ "@babel/core": "7.16.0",
100
+ "@babel/preset-env": "7.16.4",
125
101
  "babel-preset-modern-browsers": "15.0.2",
126
- "eslint": "7.23.0",
127
- "eslint-import-resolver-node": "0.3.4",
128
- "eslint-plugin-import": "2.22.1",
129
- "eslint-plugin-node": "11.1.0",
130
- "eslint-plugin-unicorn": "25.0.1",
131
- "pob-babel": "26.8.0",
132
- "rollup": "2.43.1",
133
- "typescript": "4.2.3"
102
+ "pob-babel": "29.3.0",
103
+ "typescript": "4.5.3"
134
104
  },
135
- "gitHead": "cc85b26dbfce264e968f288517a1af98d6f5156d"
105
+ "gitHead": "682f57fa30eaca9732681d16008abb2680b24174"
136
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,12 @@
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';
7
4
 
8
5
  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,17 +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
- console[record.level >= Level__default.ERROR ? 'error' : 'log'](...param);
14
- }
15
-
16
- exports.default = consoleOutput;
17
- //# 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;AAKJC,EAAAA,OAAO,CAACD,MAAM,CAACE,KAAP,IAAgBC,cAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,CAAuD,GAAGL,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-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;AAKJC,EAAAA,OAAO,CAACD,MAAM,CAACE,KAAP,IAAgBC,KAAK,CAACC,KAAtB,GAA8B,OAA9B,GAAwC,KAAzC,CAAP,CAAuD,GAAGL,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`);