cojson-storage-sqlite 0.4.1 → 0.4.6
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 -21
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cojson-storage-sqlite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.6",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
-
"types": "
|
|
6
|
+
"types": "src/index.ts",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"better-sqlite3": "^8.5.2",
|
|
10
|
-
"cojson": "^0.4.
|
|
10
|
+
"cojson": "^0.4.6",
|
|
11
11
|
"typescript": "^5.1.6"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"lint": "eslint src/**/*.ts",
|
|
15
|
-
"build": "npm run lint && rm -rf ./dist && tsc --
|
|
15
|
+
"build": "npm run lint && rm -rf ./dist && tsc --sourceMap --outDir dist",
|
|
16
16
|
"prepublishOnly": "npm run build"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/better-sqlite3": "^7.6.4"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "ccebd2447d4a4d1edea8be4f37c1a039ea4e7b64"
|
|
22
22
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SyncMessage, Peer, CojsonInternalTypes } from "cojson";
|
|
2
|
-
import { ReadableStream, WritableStream, ReadableStreamDefaultReader, WritableStreamDefaultWriter } from "isomorphic-streams";
|
|
3
|
-
import { Database as DatabaseT } from "better-sqlite3";
|
|
4
|
-
export declare class SQLiteStorage {
|
|
5
|
-
fromLocalNode: ReadableStreamDefaultReader<SyncMessage>;
|
|
6
|
-
toLocalNode: WritableStreamDefaultWriter<SyncMessage>;
|
|
7
|
-
db: DatabaseT;
|
|
8
|
-
constructor(db: DatabaseT, fromLocalNode: ReadableStream<SyncMessage>, toLocalNode: WritableStream<SyncMessage>);
|
|
9
|
-
static asPeer({ filename, trace, localNodeName, }: {
|
|
10
|
-
filename: string;
|
|
11
|
-
trace?: boolean;
|
|
12
|
-
localNodeName?: string;
|
|
13
|
-
}): Promise<Peer>;
|
|
14
|
-
static open(filename: string, fromLocalNode: ReadableStream<SyncMessage>, toLocalNode: WritableStream<SyncMessage>): Promise<SQLiteStorage>;
|
|
15
|
-
handleSyncMessage(msg: SyncMessage): Promise<void>;
|
|
16
|
-
sendNewContentAfter(theirKnown: CojsonInternalTypes.CoValueKnownState, asDependencyOf?: CojsonInternalTypes.RawCoID): Promise<void>;
|
|
17
|
-
handleLoad(msg: CojsonInternalTypes.LoadMessage): Promise<void>;
|
|
18
|
-
handleContent(msg: CojsonInternalTypes.NewContentMessage): Promise<void>;
|
|
19
|
-
handleKnown(msg: CojsonInternalTypes.KnownStateMessage): Promise<void>;
|
|
20
|
-
handleDone(_msg: CojsonInternalTypes.DoneMessage): void;
|
|
21
|
-
}
|