@golemio/validator 0.2.4 → 0.2.5-dev.694882844
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/dist/Logger.d.ts +7 -8
- package/dist/Logger.js +27 -29
- package/dist/Logger.js.map +1 -1
- package/package.json +3 -4
package/dist/Logger.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
1
|
+
import pino from "pino";
|
|
2
|
+
export declare type ILogger = pino.Logger<{
|
|
3
|
+
customLevels: {
|
|
4
|
+
verbose: number;
|
|
5
|
+
silly: number;
|
|
6
|
+
};
|
|
7
|
+
}>;
|
|
9
8
|
declare const logger: ILogger;
|
|
10
9
|
export { logger as log };
|
package/dist/Logger.js
CHANGED
|
@@ -1,38 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var _a;
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.log = void 0;
|
|
4
|
-
/// Setup for logger - uses Winston logger for standard logging output and debug module for debugging logs
|
|
5
|
-
const config_1 = require("./config");
|
|
6
5
|
const debug = require("debug");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
6
|
+
const pino_1 = require("pino");
|
|
7
|
+
const config_1 = require("./config");
|
|
8
|
+
const logger = (0, pino_1.default)({
|
|
9
|
+
level: ((_a = config_1.default.log_level) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || "info",
|
|
10
|
+
customLevels: {
|
|
11
|
+
silly: 5,
|
|
12
|
+
verbose: 25,
|
|
13
|
+
},
|
|
14
|
+
base: undefined,
|
|
15
|
+
formatters: {
|
|
16
|
+
level: (label) => {
|
|
17
|
+
return { level: label };
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
errorKey: "error",
|
|
21
|
+
messageKey: "message",
|
|
22
|
+
timestamp: pino_1.default.stdTimeFunctions.isoTime,
|
|
23
23
|
});
|
|
24
|
-
const logger = winstonLogger;
|
|
25
24
|
exports.log = logger;
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
logger.silly = (
|
|
30
|
-
debugLog(
|
|
31
|
-
|
|
25
|
+
const loggerDebugLog = logger.debug.bind(logger);
|
|
26
|
+
const loggerSillyLog = logger.silly.bind(logger);
|
|
27
|
+
const debugLog = debug("golemio:errors");
|
|
28
|
+
logger.silly = (...args) => {
|
|
29
|
+
debugLog.apply(null, args);
|
|
30
|
+
loggerSillyLog.apply(null, args);
|
|
32
31
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
winstonDebugLog(formatter);
|
|
32
|
+
logger.debug = (...args) => {
|
|
33
|
+
debugLog.apply(null, args);
|
|
34
|
+
loggerDebugLog.apply(null, args);
|
|
37
35
|
};
|
|
38
36
|
//# sourceMappingURL=Logger.js.map
|
package/dist/Logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logger.js","sourceRoot":"","sources":["../src/Logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Logger.js","sourceRoot":"","sources":["../src/Logger.ts"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAC/B,+BAAwB;AACxB,qCAA8B;AAI9B,MAAM,MAAM,GAAY,IAAA,cAAI,EAAC;IACzB,KAAK,EAAE,CAAA,MAAA,gBAAM,CAAC,SAAS,0CAAE,WAAW,EAAE,KAAI,MAAM;IAChD,YAAY,EAAE;QACV,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,EAAE;KACd;IACD,IAAI,EAAE,SAAS;IACf,UAAU,EAAE;QACR,KAAK,EAAE,CAAC,KAAa,EAAE,EAAE;YACrB,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAC5B,CAAC;KACJ;IACD,QAAQ,EAAE,OAAO;IACjB,UAAU,EAAE,SAAS;IACrB,SAAS,EAAE,cAAI,CAAC,gBAAgB,CAAC,OAAO;CAC3C,CAAC,CAAC;AAiBgB,qBAAG;AAftB,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACjD,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAEjD,MAAM,QAAQ,GAAmB,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAEzD,MAAM,CAAC,KAAK,GAAG,CAAC,GAAG,IAAS,EAAQ,EAAE;IAClC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC3B,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,GAAG,CAAC,GAAG,IAAS,EAAQ,EAAE;IAClC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC3B,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACrC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/validator",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5-dev.694882844",
|
|
4
4
|
"description": "Library of Validator classes of the Golemio Data Platform System",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -47,11 +47,10 @@
|
|
|
47
47
|
"debug": "^4.1.1",
|
|
48
48
|
"dotenv": "^8.0.0",
|
|
49
49
|
"mongoose": "^6.5.3",
|
|
50
|
-
"
|
|
50
|
+
"pino": "^8.7.0"
|
|
51
51
|
},
|
|
52
52
|
"resolutions": {
|
|
53
|
-
"minimist": "^1.2.6"
|
|
54
|
-
"winston": "^3.2.2"
|
|
53
|
+
"minimist": "^1.2.6"
|
|
55
54
|
},
|
|
56
55
|
"nyc": {
|
|
57
56
|
"check-coverage": true,
|