@mastra/redis 1.2.0 → 1.2.1
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/CHANGELOG.md +18 -0
- package/dist/cache.d.ts +7 -1
- package/dist/cache.d.ts.map +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +22 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +22 -4
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @mastra/redis
|
|
2
2
|
|
|
3
|
+
## 1.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- `nodeRedisPreset` now adapts the three list operations (`llen`, `rpush`, `lrange`) to their camelCase forms on `node-redis` v4+ clients (`lLen`, `rPush`, `lRange`). Extends the same adapter pattern already used for `set` and `scan`. ioredis and Upstash users are unaffected (defaults remain lowercase, matching their APIs). ([#18408](https://github.com/mastra-ai/mastra/pull/18408))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`86623c1`](https://github.com/mastra-ai/mastra/commit/86623c1adf7d22de32cc916dda17f4155184db36), [`023766f`](https://github.com/mastra-ai/mastra/commit/023766f44d59b30a50f3a381e33eddde8ab56c00), [`0200e75`](https://github.com/mastra-ai/mastra/commit/0200e7552d02d4221cd6040bf4eddf189a97a156), [`7c9dd77`](https://github.com/mastra-ai/mastra/commit/7c9dd77bd18cb8dc72797e25f1a0fbdc71a11347), [`7f9ae70`](https://github.com/mastra-ai/mastra/commit/7f9ae70826b047e5a66218f9e92f20e54a2d791f), [`a0509c7`](https://github.com/mastra-ai/mastra/commit/a0509c731a08aa3ed626557c5338126362856f57), [`06e0d63`](https://github.com/mastra-ai/mastra/commit/06e0d63d42bc2a202e18bc091f3781f409f5e6fb), [`bf3fe49`](https://github.com/mastra-ai/mastra/commit/bf3fe49f9467dbbdb8f9eaf74e0f7971ffb19559), [`01caf93`](https://github.com/mastra-ai/mastra/commit/01caf93d71ae2c1e65f49735cafb531975187426), [`438a971`](https://github.com/mastra-ai/mastra/commit/438a9715c8b4398e5eaf8914a1f19dc8a85dc1de), [`9990965`](https://github.com/mastra-ai/mastra/commit/999096571635a83b42ef40841fd7028cfa630779), [`77518cc`](https://github.com/mastra-ai/mastra/commit/77518ccb5bb8cc684875081e64213dc85cffdbee), [`fbeda0c`](https://github.com/mastra-ai/mastra/commit/fbeda0c0f35def07e6837936dd3a003b2b7c5172), [`8a68844`](https://github.com/mastra-ai/mastra/commit/8a688443013816105a09f89c6afa34b5ff13e26d), [`bb2a13b`](https://github.com/mastra-ai/mastra/commit/bb2a13bb4b32e6bb807200fe7b18ae8fa4322118), [`24ceaea`](https://github.com/mastra-ai/mastra/commit/24ceaea0bdd8609cabbab764380608ca6621a194), [`a73cd1a`](https://github.com/mastra-ai/mastra/commit/a73cd1a62a5e4ca023dcc39ba150029f4f1f74c1), [`c0ffa3c`](https://github.com/mastra-ai/mastra/commit/c0ffa3c897ccd326de880df734740a7f0681a18f), [`462a769`](https://github.com/mastra-ai/mastra/commit/462a769da61850862ca1be3d74134d33078ee6a7), [`0504bf5`](https://github.com/mastra-ai/mastra/commit/0504bf5e8cffc571a4b343326178de371e6f859b), [`0b5cc47`](https://github.com/mastra-ai/mastra/commit/0b5cc4726dc18d9a685a27520db39ff1b36bb89a), [`87f38a3`](https://github.com/mastra-ai/mastra/commit/87f38a3de03e24731f2dd6f8ed6a60b6722b85a1), [`d5fa3cd`](https://github.com/mastra-ai/mastra/commit/d5fa3cda1788c3cb93a361a3c6ec47de6ba21e98), [`fe98ef2`](https://github.com/mastra-ai/mastra/commit/fe98ef2e66dbfcbd7d645c88c9ee1e67b458a136), [`6ccf67b`](https://github.com/mastra-ai/mastra/commit/6ccf67bf075753754927a57bc2e1734ba2c820c5), [`793ea0f`](https://github.com/mastra-ai/mastra/commit/793ea0f52f831178837f21c83af6af93bf4ce638), [`825d8de`](https://github.com/mastra-ai/mastra/commit/825d8def9fa64c2bcc3d8dd6b49e09342c3ac5c7), [`507a5c4`](https://github.com/mastra-ai/mastra/commit/507a5c461bdc3136ad80744c0efbb55ce1f18f97), [`5afe423`](https://github.com/mastra-ai/mastra/commit/5afe423e4badf040f1b0d4525183a856fcb8146e), [`307573b`](https://github.com/mastra-ai/mastra/commit/307573b9ff3149b70c79540dbc86f1319b180f29), [`79b3626`](https://github.com/mastra-ai/mastra/commit/79b3626f8d647307eb07c8da14c9073c2699719d), [`c2c1d7b`](https://github.com/mastra-ai/mastra/commit/c2c1d7bb61d2602955f14ed3952f807c2d6eb576), [`86623c1`](https://github.com/mastra-ai/mastra/commit/86623c1adf7d22de32cc916dda17f4155184db36), [`1505c07`](https://github.com/mastra-ai/mastra/commit/1505c07603f6346bae12aa82f140e8b88ffea9ab), [`f328049`](https://github.com/mastra-ai/mastra/commit/f3280498c324afd2a8d36cd828f5b9f94a2dddc1), [`e545228`](https://github.com/mastra-ai/mastra/commit/e54522856934a5dc030b7b6385771e3548020d59), [`3eb852e`](https://github.com/mastra-ai/mastra/commit/3eb852e5435bc908b800193498103dc724f455b0), [`ffa09e7`](https://github.com/mastra-ai/mastra/commit/ffa09e772a5c92270eabe2090fc42d45bd8ec4b7), [`8c9f1c0`](https://github.com/mastra-ai/mastra/commit/8c9f1c0361d89066f9bcd14a2f69e761b01766c8), [`461a7c5`](https://github.com/mastra-ai/mastra/commit/461a7c501449295287f4f0ee4b0b42344f39fcf8), [`4211472`](https://github.com/mastra-ai/mastra/commit/4211472a5a2bd319c60cd2e42d9109c3eef7ac1c), [`9e45902`](https://github.com/mastra-ai/mastra/commit/9e4590208e745055cecca202e2db0e5c65e17d3c), [`5c0df77`](https://github.com/mastra-ai/mastra/commit/5c0df776c40efa420f8c07a2f3ee66010296618e), [`e940f09`](https://github.com/mastra-ai/mastra/commit/e940f099ef5d18b403e6f2b4937e086a4da857b1)]:
|
|
10
|
+
- @mastra/core@1.47.0
|
|
11
|
+
|
|
12
|
+
## 1.2.1-alpha.0
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- `nodeRedisPreset` now adapts the three list operations (`llen`, `rpush`, `lrange`) to their camelCase forms on `node-redis` v4+ clients (`lLen`, `rPush`, `lRange`). Extends the same adapter pattern already used for `set` and `scan`. ioredis and Upstash users are unaffected (defaults remain lowercase, matching their APIs). ([#18408](https://github.com/mastra-ai/mastra/pull/18408))
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`7f9ae70`](https://github.com/mastra-ai/mastra/commit/7f9ae70826b047e5a66218f9e92f20e54a2d791f), [`1505c07`](https://github.com/mastra-ai/mastra/commit/1505c07603f6346bae12aa82f140e8b88ffea9ab), [`e940f09`](https://github.com/mastra-ai/mastra/commit/e940f099ef5d18b403e6f2b4937e086a4da857b1)]:
|
|
19
|
+
- @mastra/core@1.46.1-alpha.1
|
|
20
|
+
|
|
3
21
|
## 1.2.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
package/dist/cache.d.ts
CHANGED
|
@@ -15,6 +15,9 @@ export interface RedisServerCacheOptions {
|
|
|
15
15
|
ttlSeconds?: number;
|
|
16
16
|
setWithExpiry?: (client: RedisClient, key: string, value: unknown, seconds: number) => Promise<unknown>;
|
|
17
17
|
scanKeys?: (client: RedisClient, cursor: string | number, pattern: string, count: number) => Promise<[string | number, string[]]>;
|
|
18
|
+
getListLength?: (client: RedisClient, key: string) => Promise<number>;
|
|
19
|
+
pushToList?: (client: RedisClient, key: string, value: unknown) => Promise<number>;
|
|
20
|
+
getListRange?: (client: RedisClient, key: string, start: number, stop: number) => Promise<unknown[]>;
|
|
18
21
|
}
|
|
19
22
|
export declare class RedisServerCache extends MastraServerCache {
|
|
20
23
|
private client;
|
|
@@ -22,6 +25,9 @@ export declare class RedisServerCache extends MastraServerCache {
|
|
|
22
25
|
private ttlSeconds;
|
|
23
26
|
private setWithExpiry;
|
|
24
27
|
private scanKeys;
|
|
28
|
+
private getListLength;
|
|
29
|
+
private pushToList;
|
|
30
|
+
private getListRange;
|
|
25
31
|
constructor(config: {
|
|
26
32
|
client: RedisClient;
|
|
27
33
|
}, options?: RedisServerCacheOptions);
|
|
@@ -38,5 +44,5 @@ export declare class RedisServerCache extends MastraServerCache {
|
|
|
38
44
|
increment(key: string): Promise<number>;
|
|
39
45
|
}
|
|
40
46
|
export declare const upstashPreset: Pick<RedisServerCacheOptions, 'setWithExpiry' | 'scanKeys'>;
|
|
41
|
-
export declare const nodeRedisPreset: Pick<RedisServerCacheOptions, 'setWithExpiry' | 'scanKeys'>;
|
|
47
|
+
export declare const nodeRedisPreset: Pick<RedisServerCacheOptions, 'setWithExpiry' | 'scanKeys' | 'getListLength' | 'pushToList' | 'getListRange'>;
|
|
42
48
|
//# sourceMappingURL=cache.d.ts.map
|
package/dist/cache.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACnC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACvE,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACnC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1D,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAA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D,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,GAAE,MAAW,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAM1E,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKlC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAetB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAI9C;AAED,eAAO,MAAM,aAAa,EAAE,IAAI,CAAC,uBAAuB,EAAE,eAAe,GAAG,UAAU,CAIrF,CAAC;AASF,eAAO,MAAM,eAAe,EAAE,IAAI,CAChC,uBAAuB,EACvB,eAAe,GAAG,UAAU,GAAG,eAAe,GAAG,YAAY,GAAG,cAAc,CAQ/E,CAAC"}
|
package/dist/docs/SKILL.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1805,12 +1805,24 @@ var defaultSetWithExpiry = (client, key, value, seconds) => {
|
|
|
1805
1805
|
var defaultScanKeys = (client, cursor, pattern, count) => {
|
|
1806
1806
|
return client.scan(cursor, "MATCH", pattern, "COUNT", count);
|
|
1807
1807
|
};
|
|
1808
|
+
var defaultGetListLength = (client, key) => {
|
|
1809
|
+
return client.llen(key);
|
|
1810
|
+
};
|
|
1811
|
+
var defaultPushToList = (client, key, value) => {
|
|
1812
|
+
return client.rpush(key, value);
|
|
1813
|
+
};
|
|
1814
|
+
var defaultGetListRange = (client, key, start, stop) => {
|
|
1815
|
+
return client.lrange(key, start, stop);
|
|
1816
|
+
};
|
|
1808
1817
|
var RedisServerCache = class extends cache.MastraServerCache {
|
|
1809
1818
|
client;
|
|
1810
1819
|
keyPrefix;
|
|
1811
1820
|
ttlSeconds;
|
|
1812
1821
|
setWithExpiry;
|
|
1813
1822
|
scanKeys;
|
|
1823
|
+
getListLength;
|
|
1824
|
+
pushToList;
|
|
1825
|
+
getListRange;
|
|
1814
1826
|
constructor(config, options = {}) {
|
|
1815
1827
|
super({ name: "RedisServerCache" });
|
|
1816
1828
|
this.client = config.client;
|
|
@@ -1818,6 +1830,9 @@ var RedisServerCache = class extends cache.MastraServerCache {
|
|
|
1818
1830
|
this.ttlSeconds = options.ttlSeconds ?? 300;
|
|
1819
1831
|
this.setWithExpiry = options.setWithExpiry ?? defaultSetWithExpiry;
|
|
1820
1832
|
this.scanKeys = options.scanKeys ?? defaultScanKeys;
|
|
1833
|
+
this.getListLength = options.getListLength ?? defaultGetListLength;
|
|
1834
|
+
this.pushToList = options.pushToList ?? defaultPushToList;
|
|
1835
|
+
this.getListRange = options.getListRange ?? defaultGetListRange;
|
|
1821
1836
|
}
|
|
1822
1837
|
getKey(key) {
|
|
1823
1838
|
return `${this.keyPrefix}${key}`;
|
|
@@ -1856,19 +1871,19 @@ var RedisServerCache = class extends cache.MastraServerCache {
|
|
|
1856
1871
|
}
|
|
1857
1872
|
async listLength(key) {
|
|
1858
1873
|
const fullKey = this.getKey(key);
|
|
1859
|
-
return this.client
|
|
1874
|
+
return this.getListLength(this.client, fullKey);
|
|
1860
1875
|
}
|
|
1861
1876
|
async listPush(key, value) {
|
|
1862
1877
|
const fullKey = this.getKey(key);
|
|
1863
1878
|
const serialized = this.serialize(value);
|
|
1864
|
-
await this.client
|
|
1879
|
+
await this.pushToList(this.client, fullKey, serialized);
|
|
1865
1880
|
if (this.ttlSeconds > 0) {
|
|
1866
1881
|
await this.client.expire(fullKey, this.ttlSeconds);
|
|
1867
1882
|
}
|
|
1868
1883
|
}
|
|
1869
1884
|
async listFromTo(key, from, to = -1) {
|
|
1870
1885
|
const fullKey = this.getKey(key);
|
|
1871
|
-
const values = await this.client
|
|
1886
|
+
const values = await this.getListRange(this.client, fullKey, from, to);
|
|
1872
1887
|
return values.map((v) => this.deserialize(v));
|
|
1873
1888
|
}
|
|
1874
1889
|
async delete(key) {
|
|
@@ -1897,7 +1912,10 @@ var upstashPreset = {
|
|
|
1897
1912
|
};
|
|
1898
1913
|
var nodeRedisPreset = {
|
|
1899
1914
|
setWithExpiry: (client, key, value, seconds) => client.set(key, value, { EX: seconds }),
|
|
1900
|
-
scanKeys: (client, cursor, pattern, count) => client.scan(cursor, { MATCH: pattern, COUNT: count })
|
|
1915
|
+
scanKeys: (client, cursor, pattern, count) => client.scan(cursor, { MATCH: pattern, COUNT: count }),
|
|
1916
|
+
getListLength: (client, key) => client.lLen(key),
|
|
1917
|
+
pushToList: (client, key, value) => client.rPush(key, value),
|
|
1918
|
+
getListRange: (client, key, start, stop) => client.lRange(key, start, stop)
|
|
1901
1919
|
};
|
|
1902
1920
|
|
|
1903
1921
|
exports.RedisServerCache = RedisServerCache;
|