@fireproof/core 0.13.5-dev → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/fireproof.cjs +68 -34
- package/dist/browser/fireproof.cjs.map +4 -4
- package/dist/browser/fireproof.esm.js +68 -34
- package/dist/browser/fireproof.esm.js.map +4 -4
- package/dist/browser/fireproof.iife.js +68 -34
- package/dist/browser/fireproof.iife.js.map +4 -4
- package/dist/node/fireproof.cjs +68 -34
- package/dist/node/fireproof.cjs.map +4 -4
- package/dist/node/fireproof.esm.js +68 -34
- package/dist/node/fireproof.esm.js.map +4 -4
- package/dist/types/apply-head-queue.d.ts +2 -2
- package/dist/types/crdt-clock.d.ts +3 -3
- package/dist/types/crdt-helpers.d.ts +8 -2
- package/dist/types/crdt.d.ts +2 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
@@ -1,5 +1,5 @@
|
|
1
|
-
import { Transaction } from
|
2
|
-
import { ClockHead, DocUpdate } from
|
1
|
+
import { Transaction } from './transaction';
|
2
|
+
import { ClockHead, DocUpdate } from './types';
|
3
3
|
type ApplyHeadWorkerFunction = (id: string, tblocks: Transaction | null, newHead: ClockHead, prevHead: ClockHead, updates: DocUpdate[] | null) => Promise<void>;
|
4
4
|
type ApplyHeadTask = {
|
5
5
|
id: string;
|
@@ -3,9 +3,9 @@ import type { DocUpdate, ClockHead } from './types';
|
|
3
3
|
import { ApplyHeadQueue } from './apply-head-queue';
|
4
4
|
export declare class CRDTClock {
|
5
5
|
head: ClockHead;
|
6
|
-
zoomers: Set<(
|
7
|
-
watchers: Set<(
|
8
|
-
emptyWatchers: Set<(
|
6
|
+
zoomers: Set<() => void>;
|
7
|
+
watchers: Set<(updates: DocUpdate[]) => void>;
|
8
|
+
emptyWatchers: Set<() => void>;
|
9
9
|
blocks: TransactionBlockstore | null;
|
10
10
|
applyHeadQueue: ApplyHeadQueue;
|
11
11
|
constructor();
|
@@ -1,6 +1,7 @@
|
|
1
|
+
import { Block } from 'multiformats/block';
|
1
2
|
import { LoggingFetcher, Transaction } from './transaction';
|
2
3
|
import type { TransactionBlockstore } from './transaction';
|
3
|
-
import type { DocUpdate, ClockHead, AnyLink, DocValue, BulkResult, ChangesOptions } from './types';
|
4
|
+
import type { DocUpdate, ClockHead, AnyLink, DocValue, BulkResult, ChangesOptions, BlockFetcher } from './types';
|
4
5
|
export declare function applyBulkUpdateToCrdt(tblocks: Transaction, head: ClockHead, updates: DocUpdate[], options?: object): Promise<BulkResult>;
|
5
6
|
export declare function getValueFromCrdt(blocks: TransactionBlockstore, head: ClockHead, key: string): Promise<DocValue>;
|
6
7
|
export declare function readFiles(blocks: TransactionBlockstore | LoggingFetcher, { doc }: DocValue): void;
|
@@ -8,6 +9,11 @@ export declare function clockChangesSince(blocks: TransactionBlockstore | Loggin
|
|
8
9
|
result: DocUpdate[];
|
9
10
|
head: ClockHead;
|
10
11
|
}>;
|
11
|
-
export declare function getAllEntries(blocks: TransactionBlockstore, head: ClockHead): AsyncGenerator<DocUpdate, void, unknown>;
|
12
|
+
export declare function getAllEntries(blocks: TransactionBlockstore | LoggingFetcher, head: ClockHead): AsyncGenerator<DocUpdate, void, unknown>;
|
12
13
|
export declare function clockVis(blocks: TransactionBlockstore, head: ClockHead): AsyncGenerator<string, void, unknown>;
|
13
14
|
export declare function doCompact(blocks: TransactionBlockstore, head: ClockHead): Promise<AnyLink | undefined>;
|
15
|
+
export declare function getThatBlock({ bytes }: {
|
16
|
+
cid: string;
|
17
|
+
bytes: string;
|
18
|
+
}): Promise<Block<unknown, 113, 18, 1>>;
|
19
|
+
export declare function getBlock(blocks: BlockFetcher, cidString: string): Promise<Block<unknown, 113, 18, 1>>;
|
package/dist/types/crdt.d.ts
CHANGED
@@ -17,6 +17,8 @@ export declare class CRDT {
|
|
17
17
|
head: ClockHead;
|
18
18
|
}>;
|
19
19
|
vis(): Promise<string>;
|
20
|
+
getBlock(cidString: string): Promise<import("multiformats/dist/types/src/block").Block<unknown, 113, 18, 1>>;
|
21
|
+
getThatBlock(): Promise<import("multiformats/dist/types/src/block").Block<unknown, 113, 18, 1>>;
|
20
22
|
get(key: string): Promise<import("./types").DocValue | null>;
|
21
23
|
changes(since?: ClockHead, opts?: ChangesOptions): Promise<{
|
22
24
|
result: DocUpdate[];
|
package/dist/types/version.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export declare const PACKAGE_VERSION = "0.
|
1
|
+
export declare const PACKAGE_VERSION = "0.14.0";
|