exodus-framework 2.0.695 → 2.0.697
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/lib/utils/logger.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAEA,OAAa,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAmDpC,QAAA,MAAM,MAAM,qBAKX,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/lib/utils/logger.js
CHANGED
@@ -11,7 +11,8 @@ var _pinoMultiStream = require("pino-multi-stream");
|
|
11
11
|
var _app = require("../app");
|
12
12
|
var _dateFns = require("date-fns");
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
14
|
-
|
14
|
+
let loggerInstance = null;
|
15
|
+
const createLogger = () => {
|
15
16
|
const basePath = _path.default.resolve(_app.Core.settings.getLogger().path, (0, _dateFns.format)(new Date(), 'dd-MM-yyyy'), (0, _dateFns.format)(new Date(), 'HH_mm'));
|
16
17
|
(0, _fs.mkdirSync)(basePath, {
|
17
18
|
recursive: true
|
@@ -45,4 +46,10 @@ const logger = () => {
|
|
45
46
|
timestamp: () => `,"time":"${new Date().toJSON()}"`
|
46
47
|
}, (0, _pinoMultiStream.multistream)(streams));
|
47
48
|
};
|
49
|
+
const logger = () => {
|
50
|
+
if (!loggerInstance) {
|
51
|
+
loggerInstance = createLogger();
|
52
|
+
}
|
53
|
+
return loggerInstance;
|
54
|
+
};
|
48
55
|
var _default = exports.default = logger;
|
package/lib/utils/session.js
CHANGED
@@ -17,7 +17,7 @@ class SessionAPI extends _api.default {
|
|
17
17
|
return status < 400;
|
18
18
|
}
|
19
19
|
async getCertificate() {
|
20
|
-
return this.request(
|
20
|
+
return this.request('/api/v1/session/certificate', 'get');
|
21
21
|
}
|
22
22
|
}
|
23
23
|
exports.SessionAPI = SessionAPI;
|