woonplan-packages-redishelper 1.0.88 → 1.0.89
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/dist/eventsource.js +7 -13
- package/dist/memdb.js +4 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/eventsource.js
CHANGED
|
@@ -17,19 +17,13 @@ var getStreamInfo = function (config, streamname, count) { return (0, memdb_1.ge
|
|
|
17
17
|
var getEntriesFromStream = function (config, streamname) {
|
|
18
18
|
return getStreamInfo(config, streamname, 0)
|
|
19
19
|
.then(function (result) {
|
|
20
|
-
return result[9].map(function (entry) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
var newStruct = __assign({}, prevValue);
|
|
28
|
-
newStruct[currentValue] = keysandvalues[n + 1];
|
|
29
|
-
return newStruct;
|
|
30
|
-
}, {})
|
|
31
|
-
};
|
|
32
|
-
});
|
|
20
|
+
return result[9].map(function (entry) { return ({
|
|
21
|
+
id: entry[0],
|
|
22
|
+
message: entry[1].reduce(function (prevValue, currentValue, n) {
|
|
23
|
+
var _a;
|
|
24
|
+
return (n % 2 ? __assign({}, prevValue) : __assign(__assign({}, prevValue), (_a = {}, _a[currentValue] = entry[1][n + 1], _a)));
|
|
25
|
+
}, {})
|
|
26
|
+
}); });
|
|
33
27
|
});
|
|
34
28
|
};
|
|
35
29
|
var filterStream = function (config, streamname, key, value) {
|
package/dist/memdb.js
CHANGED
|
@@ -2,5 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRedisClient = void 0;
|
|
4
4
|
var IORedis = require("ioredis");
|
|
5
|
-
var getRedisClient = function (config) { return new IORedis(
|
|
5
|
+
var getRedisClient = function (config) { return new IORedis({
|
|
6
|
+
host: config.REDISURL,
|
|
7
|
+
password: config.REDISPW
|
|
8
|
+
}); };
|
|
6
9
|
exports.getRedisClient = getRedisClient;
|
package/dist/types.d.ts
CHANGED