cojson-storage-indexeddb 0.4.1 → 0.4.5
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/package.json +5 -5
- package/dist/index.d.ts +0 -30
- package/dist/index.test.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cojson-storage-indexeddb",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.5",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
|
-
"types": "
|
|
5
|
+
"types": "src/index.ts",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"cojson": "^0.4.
|
|
8
|
+
"cojson": "^0.4.5",
|
|
9
9
|
"typescript": "^5.1.6"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"scripts": {
|
|
17
17
|
"test": "vitest --browser chrome",
|
|
18
18
|
"lint": "eslint src/**/*.ts",
|
|
19
|
-
"build": "npm run lint && rm -rf ./dist && tsc --
|
|
19
|
+
"build": "npm run lint && rm -rf ./dist && tsc --sourceMap --outDir dist",
|
|
20
20
|
"prepublishOnly": "npm run build"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "4ee2cad39eed82f89af16d356504d680a7cec824"
|
|
23
23
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { SyncMessage, Peer, CojsonInternalTypes } from "cojson";
|
|
2
|
-
import { ReadableStream, WritableStream, ReadableStreamDefaultReader, WritableStreamDefaultWriter } from "isomorphic-streams";
|
|
3
|
-
export declare class IDBStorage {
|
|
4
|
-
db: IDBDatabase;
|
|
5
|
-
fromLocalNode: ReadableStreamDefaultReader<SyncMessage>;
|
|
6
|
-
toLocalNode: WritableStreamDefaultWriter<SyncMessage>;
|
|
7
|
-
constructor(db: IDBDatabase, fromLocalNode: ReadableStream<SyncMessage>, toLocalNode: WritableStream<SyncMessage>);
|
|
8
|
-
static asPeer({ trace, localNodeName, }?: {
|
|
9
|
-
trace?: boolean;
|
|
10
|
-
localNodeName?: string;
|
|
11
|
-
} | undefined): Promise<Peer>;
|
|
12
|
-
static open(fromLocalNode: ReadableStream<SyncMessage>, toLocalNode: WritableStream<SyncMessage>): Promise<IDBStorage>;
|
|
13
|
-
handleSyncMessage(msg: SyncMessage): Promise<void>;
|
|
14
|
-
sendNewContentAfter(theirKnown: CojsonInternalTypes.CoValueKnownState, { coValues, sessions, transactions, signatureAfter, }: {
|
|
15
|
-
coValues: IDBObjectStore;
|
|
16
|
-
sessions: IDBObjectStore;
|
|
17
|
-
transactions: IDBObjectStore;
|
|
18
|
-
signatureAfter: IDBObjectStore;
|
|
19
|
-
}, asDependencyOf?: CojsonInternalTypes.RawCoID): Promise<void>;
|
|
20
|
-
handleLoad(msg: CojsonInternalTypes.LoadMessage): Promise<void>;
|
|
21
|
-
handleContent(msg: CojsonInternalTypes.NewContentMessage): Promise<void>;
|
|
22
|
-
handleKnown(msg: CojsonInternalTypes.KnownStateMessage): Promise<void>;
|
|
23
|
-
handleDone(_msg: CojsonInternalTypes.DoneMessage): void;
|
|
24
|
-
inTransaction(mode: "readwrite" | "readonly"): {
|
|
25
|
-
coValues: IDBObjectStore;
|
|
26
|
-
sessions: IDBObjectStore;
|
|
27
|
-
transactions: IDBObjectStore;
|
|
28
|
-
signatureAfter: IDBObjectStore;
|
|
29
|
-
};
|
|
30
|
-
}
|
package/dist/index.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|