exodus-framework 2.0.9980 → 2.0.9982
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/app/exodus.js
CHANGED
@@ -23,9 +23,9 @@ class Exodus extends _managed.default {
|
|
23
23
|
static startedAt;
|
24
24
|
constructor(settings) {
|
25
25
|
super();
|
26
|
+
_core.default.setSettings(settings);
|
26
27
|
Exodus.startedAt = new Date();
|
27
28
|
new _logger.default();
|
28
|
-
_core.default.setSettings(settings);
|
29
29
|
this.services = [];
|
30
30
|
}
|
31
31
|
async start() {
|
package/lib/services/logger.d.ts
CHANGED
@@ -2,8 +2,9 @@ import { Logger } from 'pino';
|
|
2
2
|
import Managed from '../app/classes/managed';
|
3
3
|
declare class LoggerService extends Managed {
|
4
4
|
private static loggerInstance;
|
5
|
+
onInit(): Promise<void>;
|
5
6
|
onMasterInit(): Promise<void>;
|
6
|
-
private
|
7
|
+
private createLogger;
|
7
8
|
static logger(): Logger<never>;
|
8
9
|
private compressLogFolder;
|
9
10
|
private backupLogs;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/services/logger.ts"],"names":[],"mappings":"AAEA,OAAa,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,OAAO,MAAM,wBAAwB,CAAC;AAQ7C,cAAM,aAAc,SAAQ,OAAO;IACjC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAgB;IAEhC,YAAY;
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/services/logger.ts"],"names":[],"mappings":"AAEA,OAAa,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,OAAO,MAAM,wBAAwB,CAAC;AAQ7C,cAAM,aAAc,SAAQ,OAAO;IACjC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAgB;IAEhC,MAAM;IAON,YAAY;YAOX,YAAY;WA2DZ,MAAM;YAIN,iBAAiB;YA2BjB,UAAU;YAsBV,eAAe;CAoB9B;AACD,eAAe,aAAa,CAAC"}
|
package/lib/services/logger.js
CHANGED
@@ -18,18 +18,21 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
18
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
19
19
|
class LoggerService extends _managed.default {
|
20
20
|
static loggerInstance;
|
21
|
-
async
|
22
|
-
super.
|
21
|
+
async onInit() {
|
22
|
+
super.onInit();
|
23
23
|
if (!LoggerService.loggerInstance) {
|
24
|
-
this.
|
24
|
+
this.createLogger();
|
25
25
|
}
|
26
|
+
}
|
27
|
+
async onMasterInit() {
|
28
|
+
super.onMasterInit();
|
26
29
|
await (0, _promises.mkdir)(_path.default.resolve(_core.default.settings.getLogger().path, 'backups'), {
|
27
30
|
recursive: true
|
28
31
|
});
|
29
32
|
await this.backupLogs();
|
30
33
|
await this.cleanBackupLogs();
|
31
34
|
}
|
32
|
-
async
|
35
|
+
async createLogger() {
|
33
36
|
const basePath = _path.default.resolve(_core.default.settings.getLogger().path, (0, _dateFns.format)(_exodus.default.getStartedAt(), 'dd-MM-yyyy'), (0, _dateFns.format)(_exodus.default.getStartedAt(), 'HH_mm'));
|
34
37
|
await (0, _promises.mkdir)(basePath, {
|
35
38
|
recursive: true
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,cAAc,WAAW,CAAC"}
|
package/lib/utils/index.js
CHANGED
@@ -4,7 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
var _exportNames = {
|
7
|
-
Api: true
|
7
|
+
Api: true,
|
8
|
+
logger: true
|
8
9
|
};
|
9
10
|
Object.defineProperty(exports, "Api", {
|
10
11
|
enumerable: true,
|
@@ -12,6 +13,12 @@ Object.defineProperty(exports, "Api", {
|
|
12
13
|
return _api.default;
|
13
14
|
}
|
14
15
|
});
|
16
|
+
Object.defineProperty(exports, "logger", {
|
17
|
+
enumerable: true,
|
18
|
+
get: function () {
|
19
|
+
return _logger.default;
|
20
|
+
}
|
21
|
+
});
|
15
22
|
var _api = _interopRequireDefault(require("./api"));
|
16
23
|
var _database = require("./database");
|
17
24
|
Object.keys(_database).forEach(function (key) {
|
@@ -37,6 +44,7 @@ Object.keys(_date).forEach(function (key) {
|
|
37
44
|
}
|
38
45
|
});
|
39
46
|
});
|
47
|
+
var _logger = _interopRequireDefault(require("./logger"));
|
40
48
|
var _session = require("./session");
|
41
49
|
Object.keys(_session).forEach(function (key) {
|
42
50
|
if (key === "default" || key === "__esModule") return;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "exodus-framework",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.9982",
|
4
4
|
"description": "Exodus Framework",
|
5
5
|
"author": "jhownpaixao",
|
6
6
|
"license": "ISC",
|
@@ -13,7 +13,7 @@
|
|
13
13
|
"test": "vitest",
|
14
14
|
"build": "rimraf ./lib && npm run build:types && babel src --extensions \".js,.ts\" --out-dir lib --copy-files --no-copy-ignored",
|
15
15
|
"build:types": "tsc --emitDeclarationOnly",
|
16
|
-
"dev": "ts-node-dev -r tsconfig-paths/register --respawn --transpile-only --ignore-watch node_modules src/server.ts",
|
16
|
+
"dev": "ts-node-dev -r tsconfig-paths/register --respawn --transpile-only --ignore-watch node_modules src/server.ts --dev",
|
17
17
|
"start": "node lib/server.js",
|
18
18
|
"update": "npm run build && npm publish",
|
19
19
|
"fix": "npm run fix:eslint && npm run fix:prettier",
|