@naturalcycles/redis-lib 4.1.1 → 4.3.0
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/redisClient.d.ts +2 -1
- package/dist/redisClient.js +1 -1
- package/dist/redisHashKeyValueDB.d.ts +2 -1
- package/dist/redisHashKeyValueDB.js +1 -1
- package/dist/redisKeyValueDB.d.ts +2 -1
- package/dist/redisKeyValueDB.js +3 -2
- package/package.json +3 -3
- package/src/redisClient.ts +3 -3
- package/src/redisHashKeyValueDB.ts +3 -3
- package/src/redisKeyValueDB.ts +5 -4
package/dist/redisClient.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CommonLogger } from '@naturalcycles/js-lib/log';
|
|
2
|
+
import type { AnyObject, NullableBuffer, NullableString, Promisable, UnixTimestamp } from '@naturalcycles/js-lib/types';
|
|
2
3
|
import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream';
|
|
3
4
|
import type { Redis, RedisOptions } from 'ioredis';
|
|
4
5
|
import type { ScanStreamOptions } from 'ioredis/built/types.js';
|
package/dist/redisClient.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { CommonDBCreateOptions
|
|
1
|
+
import type { CommonDBCreateOptions } from '@naturalcycles/db-lib';
|
|
2
|
+
import type { CommonKeyValueDB, CommonKeyValueDBSaveBatchOptions, IncrementTuple, KeyValueDBTuple } from '@naturalcycles/db-lib/kv';
|
|
2
3
|
import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream';
|
|
3
4
|
import type { RedisKeyValueDBCfg } from './redisKeyValueDB.js';
|
|
4
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { commonKeyValueDBFullSupport } from '@naturalcycles/db-lib';
|
|
1
|
+
import { commonKeyValueDBFullSupport } from '@naturalcycles/db-lib/kv';
|
|
2
2
|
/**
|
|
3
3
|
* RedisHashKeyValueDB is a KeyValueDB implementation that uses hash fields to simulate tables.
|
|
4
4
|
* The value in the `table` arguments points to a hash field in Redis.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { CommonDBCreateOptions
|
|
1
|
+
import type { CommonDBCreateOptions } from '@naturalcycles/db-lib';
|
|
2
|
+
import type { CommonKeyValueDB, CommonKeyValueDBSaveBatchOptions, IncrementTuple, KeyValueDBTuple } from '@naturalcycles/db-lib/kv';
|
|
2
3
|
import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream';
|
|
3
4
|
import type { RedisClient } from './redisClient.js';
|
|
4
5
|
export interface RedisKeyValueDBCfg {
|
package/dist/redisKeyValueDB.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { commonKeyValueDBFullSupport } from '@naturalcycles/db-lib';
|
|
2
|
-
import { _isTruthy
|
|
1
|
+
import { commonKeyValueDBFullSupport } from '@naturalcycles/db-lib/kv';
|
|
2
|
+
import { _isTruthy } from '@naturalcycles/js-lib';
|
|
3
|
+
import { _zip } from '@naturalcycles/js-lib/array/array.util.js';
|
|
3
4
|
export class RedisKeyValueDB {
|
|
4
5
|
cfg;
|
|
5
6
|
constructor(cfg) {
|
package/package.json
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"tslib": "^2"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"@
|
|
13
|
-
"@
|
|
12
|
+
"@types/node": "^24",
|
|
13
|
+
"@naturalcycles/dev-lib": "19.11.0"
|
|
14
14
|
},
|
|
15
15
|
"exports": {
|
|
16
16
|
".": "./dist/index.js"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"engines": {
|
|
38
38
|
"node": ">=22.12.0"
|
|
39
39
|
},
|
|
40
|
-
"version": "4.
|
|
40
|
+
"version": "4.3.0",
|
|
41
41
|
"description": "Redis implementation of CommonKeyValueDB interface",
|
|
42
42
|
"author": "Natural Cycles Team",
|
|
43
43
|
"license": "MIT",
|
package/src/redisClient.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Transform } from 'node:stream'
|
|
2
|
+
import type { CommonLogger } from '@naturalcycles/js-lib/log'
|
|
2
3
|
import type {
|
|
3
4
|
AnyObject,
|
|
4
5
|
AsyncFunction,
|
|
5
|
-
CommonLogger,
|
|
6
6
|
NullableBuffer,
|
|
7
7
|
NullableString,
|
|
8
8
|
Promisable,
|
|
9
9
|
StringMap,
|
|
10
10
|
UnixTimestamp,
|
|
11
|
-
} from '@naturalcycles/js-lib'
|
|
12
|
-
import { _stringMapEntries } from '@naturalcycles/js-lib'
|
|
11
|
+
} from '@naturalcycles/js-lib/types'
|
|
12
|
+
import { _stringMapEntries } from '@naturalcycles/js-lib/types'
|
|
13
13
|
import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream'
|
|
14
14
|
import type { Redis, RedisOptions } from 'ioredis'
|
|
15
15
|
import type { ScanStreamOptions } from 'ioredis/built/types.js'
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import type { CommonDBCreateOptions } from '@naturalcycles/db-lib'
|
|
1
2
|
import type {
|
|
2
|
-
CommonDBCreateOptions,
|
|
3
3
|
CommonKeyValueDB,
|
|
4
4
|
CommonKeyValueDBSaveBatchOptions,
|
|
5
5
|
IncrementTuple,
|
|
6
6
|
KeyValueDBTuple,
|
|
7
|
-
} from '@naturalcycles/db-lib'
|
|
8
|
-
import { commonKeyValueDBFullSupport } from '@naturalcycles/db-lib'
|
|
7
|
+
} from '@naturalcycles/db-lib/kv'
|
|
8
|
+
import { commonKeyValueDBFullSupport } from '@naturalcycles/db-lib/kv'
|
|
9
9
|
import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream'
|
|
10
10
|
import type { RedisKeyValueDBCfg } from './redisKeyValueDB.js'
|
|
11
11
|
|
package/src/redisKeyValueDB.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import type { CommonDBCreateOptions } from '@naturalcycles/db-lib'
|
|
1
2
|
import type {
|
|
2
|
-
CommonDBCreateOptions,
|
|
3
3
|
CommonKeyValueDB,
|
|
4
4
|
CommonKeyValueDBSaveBatchOptions,
|
|
5
5
|
IncrementTuple,
|
|
6
6
|
KeyValueDBTuple,
|
|
7
|
-
} from '@naturalcycles/db-lib'
|
|
8
|
-
import { commonKeyValueDBFullSupport } from '@naturalcycles/db-lib'
|
|
9
|
-
import { _isTruthy
|
|
7
|
+
} from '@naturalcycles/db-lib/kv'
|
|
8
|
+
import { commonKeyValueDBFullSupport } from '@naturalcycles/db-lib/kv'
|
|
9
|
+
import { _isTruthy } from '@naturalcycles/js-lib'
|
|
10
|
+
import { _zip } from '@naturalcycles/js-lib/array/array.util.js'
|
|
10
11
|
import type { ReadableTyped } from '@naturalcycles/nodejs-lib/stream'
|
|
11
12
|
import type { RedisClient } from './redisClient.js'
|
|
12
13
|
|