@seidor-cloud-produtos/orbit-backend-lib 2.0.33 → 2.0.34
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.
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Cache } from '../../application/cache/cache';
|
|
2
|
+
import { CacheClient } from '../../application/cache/client';
|
|
3
|
+
declare class LibCache extends Cache {
|
|
4
|
+
protected client: CacheClient;
|
|
5
|
+
}
|
|
6
|
+
declare const libCacheInstance: LibCache;
|
|
7
|
+
export default libCacheInstance;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const cache_1 = require("../../application/cache/cache");
|
|
4
|
+
const node_cache_1 = require("./clients/node-cache");
|
|
5
|
+
class LibCache extends cache_1.Cache {
|
|
6
|
+
client = new node_cache_1.NodeCache();
|
|
7
|
+
}
|
|
8
|
+
const libCacheInstance = new LibCache();
|
|
9
|
+
libCacheInstance.start();
|
|
10
|
+
exports.default = libCacheInstance;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import 'dotenv/config';
|
|
2
2
|
import { ENVIRONMENT_TYPES, LOG_LEVEL } from './types';
|
|
3
3
|
export declare const env: {
|
|
4
|
+
LOG_LEVEL: LOG_LEVEL.debug | LOG_LEVEL.info | LOG_LEVEL.error;
|
|
4
5
|
NODE_ENV: "test" | "production";
|
|
5
6
|
CURRENT_ENVIRONMENT: ENVIRONMENT_TYPES;
|
|
6
|
-
LOG_LEVEL: LOG_LEVEL.debug | LOG_LEVEL.info | LOG_LEVEL.error;
|
|
7
7
|
DEFAULT_CACHE_EXPIRATION: number;
|
|
8
8
|
};
|
|
@@ -4,11 +4,7 @@ exports.LoggerInMemory = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const logger_1 = tslib_1.__importDefault(require("../../application/logger"));
|
|
6
6
|
const types_1 = require("../environment/types");
|
|
7
|
-
const
|
|
8
|
-
const node_cache_1 = require("../cache/clients/node-cache");
|
|
9
|
-
class CacheInMemory extends cache_1.Cache {
|
|
10
|
-
client = new node_cache_1.NodeCache();
|
|
11
|
-
}
|
|
7
|
+
const cache_in_memory_1 = tslib_1.__importDefault(require("../cache/cache-in-memory"));
|
|
12
8
|
class LoggerInMemory extends logger_1.default {
|
|
13
9
|
constructor(cache) {
|
|
14
10
|
super(cache);
|
|
@@ -34,7 +30,5 @@ class LoggerInMemory extends logger_1.default {
|
|
|
34
30
|
}
|
|
35
31
|
}
|
|
36
32
|
exports.LoggerInMemory = LoggerInMemory;
|
|
37
|
-
const
|
|
38
|
-
cache.start();
|
|
39
|
-
const loggerInMemory = new LoggerInMemory(cache);
|
|
33
|
+
const loggerInMemory = new LoggerInMemory(cache_in_memory_1.default);
|
|
40
34
|
exports.default = loggerInMemory;
|