ovi-kit 1.1.12 → 1.1.13
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.
|
@@ -2,10 +2,10 @@ import Redis from 'ioredis';
|
|
|
2
2
|
import { MethodInfo } from 'src/shared/types/method-info';
|
|
3
3
|
export declare class RedisService {
|
|
4
4
|
private readonly redis;
|
|
5
|
-
private readonly logger;
|
|
6
5
|
constructor(redis: Redis);
|
|
7
6
|
set(key: string, params: any, ttlInSec: number): Promise<void>;
|
|
8
7
|
get<T>(key: string): Promise<T | null>;
|
|
9
8
|
setMethod(methodName: string, methodInfo: MethodInfo, ttl?: number): Promise<void>;
|
|
10
9
|
getMethodInfo(methodName: string): Promise<MethodInfo | null>;
|
|
10
|
+
get nativeRedis(): Redis;
|
|
11
11
|
}
|
|
@@ -14,15 +14,13 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
15
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
16
|
};
|
|
17
|
-
var RedisService_1;
|
|
18
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
18
|
exports.RedisService = void 0;
|
|
20
19
|
const common_1 = require("@nestjs/common");
|
|
21
20
|
const ioredis_1 = __importDefault(require("ioredis"));
|
|
22
21
|
const redis_keys_const_1 = require("../../constants/redis-keys.const");
|
|
23
|
-
let RedisService =
|
|
22
|
+
let RedisService = class RedisService {
|
|
24
23
|
redis;
|
|
25
|
-
logger = new common_1.Logger(RedisService_1.name);
|
|
26
24
|
constructor(redis) {
|
|
27
25
|
this.redis = redis;
|
|
28
26
|
}
|
|
@@ -42,9 +40,12 @@ let RedisService = RedisService_1 = class RedisService {
|
|
|
42
40
|
async getMethodInfo(methodName) {
|
|
43
41
|
return await this.get(redis_keys_const_1.METHOD_KEY_FOR_REDIS + methodName);
|
|
44
42
|
}
|
|
43
|
+
get nativeRedis() {
|
|
44
|
+
return this.redis;
|
|
45
|
+
}
|
|
45
46
|
};
|
|
46
47
|
exports.RedisService = RedisService;
|
|
47
|
-
exports.RedisService = RedisService =
|
|
48
|
+
exports.RedisService = RedisService = __decorate([
|
|
48
49
|
(0, common_1.Injectable)(),
|
|
49
50
|
__param(0, (0, common_1.Inject)('REDIS_CLIENT')),
|
|
50
51
|
__metadata("design:paramtypes", [ioredis_1.default])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis.service.js","sourceRoot":"","sources":["../../../../src/shared/modules/redis/redis.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"redis.service.js","sourceRoot":"","sources":["../../../../src/shared/modules/redis/redis.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,sDAA4B;AAC5B,uEAA6E;AAItE,IAAM,YAAY,GAAlB,MAAM,YAAY;IAC8B;IAArD,YAAqD,KAAY;QAAZ,UAAK,GAAL,KAAK,CAAO;IAAG,CAAC;IAErE,KAAK,CAAC,GAAG,CAAC,GAAW,EAAE,MAAW,EAAE,QAAgB;QAClD,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IACpE,CAAC;IAED,KAAK,CAAC,GAAG,CAAI,GAAW;QACtB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAEzC,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAM,CAAC;IACjC,CAAC;IAED,KAAK,CAAC,SAAS,CACb,UAAkB,EAClB,UAAsB,EACtB,MAAc,GAAG;QAEjB,MAAM,IAAI,CAAC,GAAG,CAAC,uCAAoB,GAAG,UAAU,EAAE,UAAU,EAAE,GAAG,CAAC,CAAC;IACrE,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,UAAkB;QACpC,OAAO,MAAM,IAAI,CAAC,GAAG,CAAa,uCAAoB,GAAG,UAAU,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF,CAAA;AAhCY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;IAEE,WAAA,IAAA,eAAM,EAAC,cAAc,CAAC,CAAA;qCAAyB,iBAAK;GADtD,YAAY,CAgCxB"}
|