@atproto/repo 0.1.0 → 0.2.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/block-map.d.ts +2 -0
- package/dist/data-diff.d.ts +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12090 -2882
- package/dist/index.js.map +4 -4
- package/dist/mst/mst.d.ts +13 -14
- package/dist/readable-repo.d.ts +4 -3
- package/dist/repo.d.ts +6 -2
- package/dist/src/block-map.d.ts +23 -0
- package/dist/src/blockstore/persistent-blockstore.d.ts +12 -0
- package/dist/src/cid-set.d.ts +14 -0
- package/dist/src/collection.d.ts +22 -0
- package/dist/src/data-diff.d.ts +34 -0
- package/dist/src/error.d.ts +21 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/logger.d.ts +2 -0
- package/dist/src/mst/diff.d.ts +33 -0
- package/dist/src/mst/index.d.ts +4 -0
- package/dist/src/mst/mst.d.ts +106 -0
- package/dist/src/mst/util.d.ts +9 -0
- package/dist/src/mst/walker.d.ts +22 -0
- package/dist/src/parse.d.ts +11 -0
- package/dist/src/readable-repo.d.ts +25 -0
- package/dist/src/repo.d.ts +39 -0
- package/dist/src/storage/error.d.ts +22 -0
- package/dist/src/storage/index.d.ts +1 -0
- package/dist/src/storage/memory-blobstore.d.ts +1 -0
- package/dist/src/storage/memory-blockstore.d.ts +28 -0
- package/dist/src/storage/readable-blockstore.d.ts +21 -0
- package/dist/src/storage/repo-storage.d.ts +18 -0
- package/dist/src/storage/sync-storage.d.ts +15 -0
- package/dist/src/storage/types.d.ts +12 -0
- package/dist/src/storage/util.d.ts +17 -0
- package/dist/src/structure.d.ts +39 -0
- package/dist/src/sync/consumer.d.ts +19 -0
- package/dist/src/sync/index.d.ts +2 -0
- package/dist/src/sync/producer.d.ts +13 -0
- package/dist/src/sync/provider.d.ts +11 -0
- package/dist/src/types.d.ts +368 -0
- package/dist/src/util.d.ts +13 -0
- package/dist/src/verify.d.ts +5 -0
- package/dist/storage/memory-blockstore.d.ts +2 -1
- package/dist/storage/repo-storage.d.ts +2 -1
- package/dist/storage/types.d.ts +1 -0
- package/dist/sync/consumer.d.ts +1 -0
- package/dist/sync/provider.d.ts +4 -4
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/types.d.ts +30 -31
- package/dist/util.d.ts +6 -2
- package/dist/verify.d.ts +6 -1
- package/jest.bench.config.js +2 -1
- package/package.json +11 -6
- package/src/block-map.ts +8 -0
- package/src/data-diff.ts +2 -6
- package/src/index.ts +1 -0
- package/src/mst/mst.ts +1 -10
- package/src/readable-repo.ts +3 -3
- package/src/repo.ts +33 -2
- package/src/storage/memory-blockstore.ts +20 -1
- package/src/storage/repo-storage.ts +2 -1
- package/src/storage/types.ts +1 -0
- package/src/sync/consumer.ts +4 -1
- package/src/sync/provider.ts +11 -11
- package/src/types.ts +19 -21
- package/src/util.ts +34 -13
- package/src/verify.ts +52 -11
- package/tests/rebase.test.ts +37 -0
- package/tests/sync/checkout.test.ts +21 -3
- package/tests/sync/diff.test.ts +9 -4
- package/tests/sync/narrow.test.ts +8 -4
- package/tests/util.test.ts +21 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/tsconfig.json +1 -1
- /package/dist/{blockstore → src/blockstore}/index.d.ts +0 -0
- /package/dist/{blockstore → src/blockstore}/ipld-store.d.ts +0 -0
- /package/dist/{blockstore → src/blockstore}/memory-blockstore.d.ts +0 -0
- /package/dist/{sync.d.ts → src/sync.d.ts} +0 -0
package/dist/block-map.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare class BlockMap {
|
|
|
5
5
|
add(value: LexValue): Promise<CID>;
|
|
6
6
|
set(cid: CID, bytes: Uint8Array): void;
|
|
7
7
|
get(cid: CID): Uint8Array | undefined;
|
|
8
|
+
delete(cid: CID): void;
|
|
8
9
|
getMany(cids: CID[]): {
|
|
9
10
|
blocks: BlockMap;
|
|
10
11
|
missing: CID[];
|
|
@@ -13,6 +14,7 @@ export declare class BlockMap {
|
|
|
13
14
|
clear(): void;
|
|
14
15
|
forEach(cb: (bytes: Uint8Array, cid: CID) => void): void;
|
|
15
16
|
entries(): Entry[];
|
|
17
|
+
cids(): CID[];
|
|
16
18
|
addMap(toAdd: BlockMap): void;
|
|
17
19
|
get size(): number;
|
|
18
20
|
get byteSize(): number;
|
package/dist/data-diff.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { CID } from 'multiformats';
|
|
2
2
|
import CidSet from './cid-set';
|
|
3
|
-
import {
|
|
3
|
+
import { MST } from './mst';
|
|
4
4
|
export declare class DataDiff {
|
|
5
5
|
adds: Record<string, DataAdd>;
|
|
6
6
|
updates: Record<string, DataUpdate>;
|
|
7
7
|
deletes: Record<string, DataDelete>;
|
|
8
8
|
newCids: CidSet;
|
|
9
9
|
removedCids: CidSet;
|
|
10
|
-
static of(curr:
|
|
10
|
+
static of(curr: MST, prev: MST | null): Promise<DataDiff>;
|
|
11
11
|
recordAdd(key: string, cid: CID): void;
|
|
12
12
|
recordUpdate(key: string, prev: CID, cid: CID): void;
|
|
13
13
|
recordDelete(key: string, cid: CID): void;
|