@golemio/core 3.3.0-dev.2629226513 → 3.3.0-dev.2636931178

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,16 @@
1
+ export interface IRedisSettings {
2
+ isKeyConstructedFromData: boolean;
3
+ prefix: string;
4
+ encodeDataBeforeSave?: (raw: any) => any;
5
+ decodeDataAfterGet?: (encoded: any) => any;
6
+ }
7
+ export interface IRedisModel {
8
+ name: string;
9
+ set: (key: string, data: any, ttlSeconds: number, expireTimestamp: number | undefined) => Promise<any>;
10
+ hset: (key: string, data: any) => Promise<any>;
11
+ get: (key: string) => Promise<any>;
12
+ hget: (key: string) => Promise<any>;
13
+ delete: (key: string) => Promise<any>;
14
+ truncate: () => Promise<number>;
15
+ flush: () => Promise<"OK">;
16
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IModel.js","sourceRoot":"","sources":["../../../src/input-gateway/models/IModel.ts"],"names":[],"mappings":""}
@@ -0,0 +1,48 @@
1
+ import { IRedisModel, IRedisSettings } from "./IModel";
2
+ import { IValidator } from "@golemio/validator";
3
+ import { ReadStream } from "fs";
4
+ import { Redis } from "ioredis";
5
+ import { Readable } from "stream";
6
+ /**
7
+ * Input gateway Redis model. Mirrors the integration-engine RedisModel but resolves its connection
8
+ * from the input-gateway container, where the (env-gated) RedisConnector is registered.
9
+ */
10
+ export declare class RedisModel implements IRedisModel {
11
+ /** Model name */
12
+ name: string;
13
+ /** The Redis connection */
14
+ protected connection: Redis;
15
+ /** Defines key construction */
16
+ protected isKeyConstructedFromData: boolean;
17
+ /** Function for encoding data (typically to string) before saving to Redis */
18
+ protected encodeDataBeforeSave: (raw: any) => any;
19
+ /** Function for decoding data (typically from string) after getting from Redis */
20
+ protected decodeDataAfterGet: (encoded: any) => any;
21
+ /** Key namespace prefix to identify model */
22
+ protected prefix: string;
23
+ /** Validation helper */
24
+ protected validator: IValidator | null;
25
+ constructor(name: string, settings: IRedisSettings, validator?: IValidator | null);
26
+ /**
27
+ * Saves data to Redis. The key expires after ttlSeconds seconds, or at the absolute Unix
28
+ * expireTimestamp (milliseconds) when ttlSeconds is not given.
29
+ */
30
+ set: (key: string, data: any, ttlSeconds?: number, expireTimestamp?: number) => Promise<any>;
31
+ hset: (key: string, data: any) => Promise<any>;
32
+ get: (key: string) => Promise<any>;
33
+ hget: (key: string) => Promise<any>;
34
+ mget: <T = object | string>(keys: string[]) => Promise<Array<T | null>>;
35
+ /**
36
+ * Stream data into a key from a file read stream via SET/APPEND.
37
+ */
38
+ pipeStream: (key: string, readStream: ReadStream) => Promise<void>;
39
+ /**
40
+ * Get a readable stream of data from a key via GETRANGE.
41
+ */
42
+ getReadableStream: (key: string) => Readable;
43
+ delete: (key?: string) => Promise<any>;
44
+ truncate: (namespace?: boolean) => Promise<number>;
45
+ flush: () => Promise<"OK">;
46
+ private validate;
47
+ private buildKey;
48
+ }
@@ -0,0 +1,186 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.RedisModel = void 0;
7
+ const utils_1 = require("../../helpers/utils");
8
+ const Logger_1 = require("../helpers/Logger");
9
+ const ioc_1 = require("../ioc");
10
+ const errors_1 = require("@golemio/errors");
11
+ const redis_rstream_1 = __importDefault(require("redis-rstream"));
12
+ const redis_wstream_1 = __importDefault(require("redis-wstream"));
13
+ /**
14
+ * Input gateway Redis model. Mirrors the integration-engine RedisModel but resolves its connection
15
+ * from the input-gateway container, where the (env-gated) RedisConnector is registered.
16
+ */
17
+ class RedisModel {
18
+ constructor(name, settings, validator = null) {
19
+ /**
20
+ * Saves data to Redis. The key expires after ttlSeconds seconds, or at the absolute Unix
21
+ * expireTimestamp (milliseconds) when ttlSeconds is not given.
22
+ */
23
+ this.set = async (key, data, ttlSeconds, expireTimestamp) => {
24
+ await this.validate(data);
25
+ if (Array.isArray(data)) {
26
+ // start the redis transaction
27
+ const multi = this.connection.multi();
28
+ for (const dataItem of data) {
29
+ const redisKey = `${this.prefix}:${this.buildKey(key, dataItem)}`;
30
+ const encodedData = this.encodeDataBeforeSave(dataItem);
31
+ if (ttlSeconds) {
32
+ multi.setex(redisKey, ttlSeconds, encodedData);
33
+ }
34
+ else if (expireTimestamp) {
35
+ // PXAT timestamp in milliseconds
36
+ multi.set(redisKey, encodedData, "PXAT", expireTimestamp);
37
+ }
38
+ else {
39
+ multi.set(redisKey, encodedData);
40
+ }
41
+ }
42
+ // redis transaction commit
43
+ return multi.exec();
44
+ }
45
+ else {
46
+ const redisKey = `${this.prefix}:${this.buildKey(key, data)}`;
47
+ const encodedData = this.encodeDataBeforeSave(data);
48
+ if (ttlSeconds) {
49
+ return this.connection.setex(redisKey, ttlSeconds, encodedData);
50
+ }
51
+ else if (expireTimestamp) {
52
+ // PXAT timestamp in milliseconds
53
+ return this.connection.set(redisKey, encodedData, "PXAT", expireTimestamp);
54
+ }
55
+ else {
56
+ return this.connection.set(redisKey, encodedData);
57
+ }
58
+ }
59
+ };
60
+ this.hset = async (key, data) => {
61
+ await this.validate(data);
62
+ if (Array.isArray(data)) {
63
+ // start the redis transaction
64
+ const multi = this.connection.multi();
65
+ for (const dataItem of data) {
66
+ const k = this.buildKey(key, dataItem);
67
+ // encoding and saving the data as redis hash
68
+ multi.hset(this.prefix, k, this.encodeDataBeforeSave(dataItem));
69
+ }
70
+ // redis transaction commit
71
+ return multi.exec();
72
+ }
73
+ else {
74
+ const k = this.buildKey(key, data);
75
+ // encoding and saving the data as redis hash
76
+ return this.connection.hset(this.prefix, k, this.encodeDataBeforeSave(data));
77
+ }
78
+ };
79
+ this.get = async (key) => {
80
+ // getting and decoding the data from redis hash
81
+ return this.decodeDataAfterGet(await this.connection.get(`${this.prefix}:${key}`));
82
+ };
83
+ this.hget = async (key) => {
84
+ // getting and decoding the data from redis hash
85
+ return this.decodeDataAfterGet(await this.connection.hget(this.prefix, key));
86
+ };
87
+ this.mget = async (keys) => {
88
+ if (keys.length === 0) {
89
+ return [];
90
+ }
91
+ const values = await this.connection.mget(...keys.map((key) => `${this.prefix}:${key}`));
92
+ return values.map((value) => this.decodeDataAfterGet(value));
93
+ };
94
+ /**
95
+ * Stream data into a key from a file read stream via SET/APPEND.
96
+ */
97
+ this.pipeStream = async (key, readStream) => {
98
+ const redisWriteStream = new redis_wstream_1.default(this.connection, `${this.prefix}:${key}`);
99
+ return new Promise((resolve, reject) => {
100
+ redisWriteStream.on("finish", () => {
101
+ resolve();
102
+ });
103
+ redisWriteStream.on("error", (err) => {
104
+ reject(err);
105
+ });
106
+ readStream.pipe(redisWriteStream);
107
+ });
108
+ };
109
+ /**
110
+ * Get a readable stream of data from a key via GETRANGE.
111
+ */
112
+ this.getReadableStream = (key) => {
113
+ return new redis_rstream_1.default(this.connection, `${this.prefix}:${key}`);
114
+ };
115
+ this.delete = async (key) => {
116
+ if (key) {
117
+ return this.connection.del(`${this.prefix}:${key}`);
118
+ }
119
+ return this.connection.del(`${this.prefix}`);
120
+ };
121
+ this.truncate = (namespace = true) => {
122
+ const prefix = `${this.prefix}${namespace ? ":" : ""}*`;
123
+ const stream = this.connection.scanStream({ match: prefix, count: 500 });
124
+ const pipeline = this.connection.pipeline();
125
+ return new Promise((resolve, reject) => {
126
+ stream.on("data", (keys) => {
127
+ if (keys.length > 0) {
128
+ pipeline.unlink(...keys);
129
+ }
130
+ });
131
+ stream.on("error", (err) => {
132
+ Logger_1.log.error(err);
133
+ return reject(err);
134
+ });
135
+ stream.on("end", async () => {
136
+ try {
137
+ const result = await pipeline.exec();
138
+ const deleteCount = result?.reduce((acc, el) => acc + el[1], 0) ?? 0;
139
+ Logger_1.log.info(`Truncate complete for ${prefix}, deleted ${deleteCount} in (${result?.length ?? 0}) batches`);
140
+ resolve(deleteCount);
141
+ }
142
+ catch (err) {
143
+ Logger_1.log.error(err);
144
+ return reject(err);
145
+ }
146
+ });
147
+ });
148
+ };
149
+ this.flush = () => {
150
+ return this.connection.flushdb();
151
+ };
152
+ this.validate = async (data) => {
153
+ // data validation
154
+ if (this.validator) {
155
+ try {
156
+ await this.validator.Validate(data);
157
+ }
158
+ catch (err) {
159
+ throw new errors_1.GeneralError("Error while validating data.", this.name, err);
160
+ }
161
+ }
162
+ else if (this.isKeyConstructedFromData) {
163
+ Logger_1.log.warn(this.name + ": Model validator is not set.");
164
+ }
165
+ };
166
+ this.buildKey = (key, data) => {
167
+ // checking if the value is type of object
168
+ if (this.isKeyConstructedFromData && typeof data !== "object") {
169
+ throw new errors_1.GeneralError("The data must be a type of object.", this.constructor.name);
170
+ }
171
+ return this.isKeyConstructedFromData ? (0, utils_1.getSubProperty)(key, data) : key;
172
+ };
173
+ this.name = name;
174
+ this.connection = ioc_1.InputGatewayContainer.resolve(ioc_1.ContainerToken.RedisConnector).getConnection();
175
+ this.isKeyConstructedFromData = settings.isKeyConstructedFromData;
176
+ this.prefix = settings.prefix;
177
+ this.validator = validator;
178
+ this.encodeDataBeforeSave = settings.encodeDataBeforeSave ? settings.encodeDataBeforeSave : (raw) => raw;
179
+ this.decodeDataAfterGet = settings.decodeDataAfterGet ? settings.decodeDataAfterGet : (raw) => raw;
180
+ if (this.validator?.setLogger) {
181
+ this.validator.setLogger(Logger_1.log);
182
+ }
183
+ }
184
+ }
185
+ exports.RedisModel = RedisModel;
186
+ //# sourceMappingURL=RedisModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RedisModel.js","sourceRoot":"","sources":["../../../src/input-gateway/models/RedisModel.ts"],"names":[],"mappings":";;;;;;AACA,+CAAgD;AAChD,8CAAyC;AACzC,gCAAgE;AAEhE,4CAA+C;AAI/C,kEAAyC;AACzC,kEAAyC;AAGzC;;;GAGG;AACH,MAAa,UAAU;IAgBnB,YAAY,IAAY,EAAE,QAAwB,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C,CAAC,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC;QACzG,IAAI,CAAC,kBAAkB,GAAG,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC;QAEnG,IAAI,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,CAAC;YAC5B,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,YAAG,CAAC,CAAC;QAClC,CAAC;IACL,CAAC;CA6KJ;AA1MD,gCA0MC"}
@@ -0,0 +1,2 @@
1
+ export * from "./IModel";
2
+ export * from "./RedisModel";
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./IModel"), exports);
18
+ __exportStar(require("./RedisModel"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/input-gateway/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,+CAA6B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/core",
3
- "version": "3.3.0-dev.2629226513",
3
+ "version": "3.3.0-dev.2636931178",
4
4
  "description": "Golemio Core Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",