@atproto/repo 0.2.0 → 0.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/data-diff.d.ts +11 -9
- package/dist/index.d.ts +0 -1
- package/dist/index.js +404 -1655
- package/dist/index.js.map +4 -4
- package/dist/mst/mst.d.ts +10 -6
- package/dist/readable-repo.d.ts +1 -1
- package/dist/repo.d.ts +1 -4
- package/dist/storage/index.d.ts +0 -1
- package/dist/storage/memory-blockstore.d.ts +7 -12
- package/dist/storage/types.d.ts +28 -0
- package/dist/sync/consumer.d.ts +13 -17
- package/dist/sync/provider.d.ts +1 -5
- package/dist/types.d.ts +228 -39
- package/dist/util.d.ts +3 -5
- package/package.json +2 -2
- package/src/data-diff.ts +46 -44
- package/src/index.ts +0 -1
- package/src/mst/diff.ts +14 -36
- package/src/mst/mst.ts +14 -4
- package/src/readable-repo.ts +3 -3
- package/src/repo.ts +49 -70
- package/src/storage/index.ts +0 -1
- package/src/storage/memory-blockstore.ts +18 -77
- package/src/storage/types.ts +29 -0
- package/src/sync/consumer.ts +170 -116
- package/src/sync/provider.ts +2 -40
- package/src/types.ts +49 -23
- package/src/util.ts +24 -79
- package/tests/_util.ts +38 -67
- package/tests/mst.test.ts +4 -1
- package/tests/{sync/narrow.test.ts → proofs.test.ts} +9 -20
- package/tests/repo.test.ts +5 -4
- package/tests/sync.test.ts +97 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/dist/src/block-map.d.ts +0 -23
- package/dist/src/blockstore/index.d.ts +0 -2
- package/dist/src/blockstore/ipld-store.d.ts +0 -27
- package/dist/src/blockstore/memory-blockstore.d.ts +0 -13
- package/dist/src/blockstore/persistent-blockstore.d.ts +0 -12
- package/dist/src/cid-set.d.ts +0 -14
- package/dist/src/collection.d.ts +0 -22
- package/dist/src/data-diff.d.ts +0 -34
- package/dist/src/error.d.ts +0 -21
- package/dist/src/index.d.ts +0 -7
- package/dist/src/logger.d.ts +0 -2
- package/dist/src/mst/diff.d.ts +0 -33
- package/dist/src/mst/index.d.ts +0 -4
- package/dist/src/mst/mst.d.ts +0 -106
- package/dist/src/mst/util.d.ts +0 -9
- package/dist/src/mst/walker.d.ts +0 -22
- package/dist/src/parse.d.ts +0 -11
- package/dist/src/readable-repo.d.ts +0 -25
- package/dist/src/repo.d.ts +0 -39
- package/dist/src/storage/error.d.ts +0 -22
- package/dist/src/storage/index.d.ts +0 -1
- package/dist/src/storage/memory-blobstore.d.ts +0 -1
- package/dist/src/storage/memory-blockstore.d.ts +0 -28
- package/dist/src/storage/readable-blockstore.d.ts +0 -21
- package/dist/src/storage/repo-storage.d.ts +0 -18
- package/dist/src/storage/sync-storage.d.ts +0 -15
- package/dist/src/storage/types.d.ts +0 -12
- package/dist/src/storage/util.d.ts +0 -17
- package/dist/src/structure.d.ts +0 -39
- package/dist/src/sync/consumer.d.ts +0 -19
- package/dist/src/sync/index.d.ts +0 -2
- package/dist/src/sync/producer.d.ts +0 -13
- package/dist/src/sync/provider.d.ts +0 -11
- package/dist/src/sync.d.ts +0 -9
- package/dist/src/types.d.ts +0 -368
- package/dist/src/util.d.ts +0 -13
- package/dist/src/verify.d.ts +0 -5
- package/dist/storage/repo-storage.d.ts +0 -19
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/dist/verify.d.ts +0 -32
- package/src/storage/repo-storage.ts +0 -43
- package/src/verify.ts +0 -268
- package/tests/rebase.test.ts +0 -37
- package/tests/sync/checkout.test.ts +0 -75
- package/tests/sync/diff.test.ts +0 -92
package/dist/data-diff.d.ts
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import { CID } from 'multiformats';
|
|
2
2
|
import CidSet from './cid-set';
|
|
3
|
-
import { MST } from './mst';
|
|
3
|
+
import { MST, NodeEntry } from './mst';
|
|
4
|
+
import BlockMap from './block-map';
|
|
4
5
|
export declare class DataDiff {
|
|
5
6
|
adds: Record<string, DataAdd>;
|
|
6
7
|
updates: Record<string, DataUpdate>;
|
|
7
8
|
deletes: Record<string, DataDelete>;
|
|
8
|
-
|
|
9
|
+
newMstBlocks: BlockMap;
|
|
10
|
+
newLeafCids: CidSet;
|
|
9
11
|
removedCids: CidSet;
|
|
10
12
|
static of(curr: MST, prev: MST | null): Promise<DataDiff>;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
nodeAdd(node: NodeEntry): Promise<void>;
|
|
14
|
+
nodeDelete(node: NodeEntry): Promise<void>;
|
|
15
|
+
leafAdd(key: string, cid: CID): void;
|
|
16
|
+
leafUpdate(key: string, prev: CID, cid: CID): void;
|
|
17
|
+
leafDelete(key: string, cid: CID): void;
|
|
18
|
+
treeAdd(cid: CID, bytes: Uint8Array): void;
|
|
19
|
+
treeDelete(cid: CID): void;
|
|
17
20
|
addList(): DataAdd[];
|
|
18
21
|
updateList(): DataUpdate[];
|
|
19
22
|
deleteList(): DataDelete[];
|
|
20
|
-
newCidList(): CID[];
|
|
21
23
|
updatedKeys(): string[];
|
|
22
24
|
}
|
|
23
25
|
export declare type DataAdd = {
|