@xylabs/storage 4.13.13 → 4.13.15
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,24 @@
|
|
|
1
|
+
import type { Promisable } from '@xylabs/promise';
|
|
2
|
+
/**
|
|
3
|
+
* A readonly storage device.
|
|
4
|
+
*/
|
|
5
|
+
export interface ReadonlyKeyValueStore<TValue, TKey = string> {
|
|
6
|
+
/**
|
|
7
|
+
* Returns a promise that resolves to the value for the given key.
|
|
8
|
+
* @param key The key to get the value for.
|
|
9
|
+
*/
|
|
10
|
+
get(key: TKey): Promisable<TValue | undefined>;
|
|
11
|
+
/**
|
|
12
|
+
* The keys an array of keys.
|
|
13
|
+
*/
|
|
14
|
+
keys?(): Promisable<TKey[]>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A read/write storage device.
|
|
18
|
+
*/
|
|
19
|
+
export interface KeyValueStore<TValue, TKey = string> extends ReadonlyKeyValueStore<TValue, TKey> {
|
|
20
|
+
clear?(): Promisable<void>;
|
|
21
|
+
delete(key: TKey): Promisable<void>;
|
|
22
|
+
set(key: TKey, value: TValue): Promisable<void>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=KeyValueStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyValueStore.d.ts","sourceRoot":"","sources":["../../src/KeyValueStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD;;GAEG;AACH,MAAM,WAAW,qBAAqB,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM;IAC1D;;;OAGG;IACH,GAAG,CAAC,GAAG,EAAE,IAAI,GAAG,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC9C;;OAEG;IACH,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,EAAE,CAAC,CAAA;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,CAAE,SAAQ,qBAAqB,CAAC,MAAM,EAAE,IAAI,CAAC;IAC/F,KAAK,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;IAC1B,MAAM,CAAC,GAAG,EAAE,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;IACnC,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;CAChD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/storage",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.15",
|
|
4
4
|
"description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hex",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"packages/**/*"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@xylabs/promise": "^4.13.
|
|
42
|
+
"@xylabs/promise": "^4.13.15"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.
|
|
46
|
-
"@xylabs/tsconfig": "^7.0.0-rc.
|
|
45
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.20",
|
|
46
|
+
"@xylabs/tsconfig": "^7.0.0-rc.20",
|
|
47
47
|
"typescript": "^5.8.3"
|
|
48
48
|
},
|
|
49
49
|
"engines": {
|