@fireproof/core 0.5.11 → 0.5.12
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/src/fireproof.d.ts +12 -11
- package/dist/src/fireproof.js +222 -234
- package/dist/src/fireproof.js.map +1 -1
- package/dist/src/fireproof.mjs +222 -234
- package/dist/src/fireproof.mjs.map +1 -1
- package/package.json +1 -1
- package/src/blockstore.js +2 -2
- package/src/sync.js +40 -18
package/dist/src/fireproof.d.ts
CHANGED
@@ -13,7 +13,7 @@ import { CID } from 'multiformats';
|
|
13
13
|
* @param {object} [authCtx] - Optional authorization context object to use for any authentication checks.
|
14
14
|
*
|
15
15
|
*/
|
16
|
-
declare class Database
|
16
|
+
declare class Database {
|
17
17
|
constructor(blocks: any, clock: any, config?: {});
|
18
18
|
listeners: Set<any>;
|
19
19
|
indexes: Map<any, any>;
|
@@ -217,8 +217,8 @@ declare class DbIndex {
|
|
217
217
|
/**
|
218
218
|
* @param {Database} database
|
219
219
|
*/
|
220
|
-
constructor(database: Database
|
221
|
-
database: Database
|
220
|
+
constructor(database: Database, name: any, mapFn: any, clock?: any, opts?: {});
|
221
|
+
database: Database;
|
222
222
|
indexById: {
|
223
223
|
root: any;
|
224
224
|
cid: any;
|
@@ -331,10 +331,10 @@ declare class Listener {
|
|
331
331
|
* @param {import('./database.js').Database} database
|
332
332
|
* @param {(_: any, emit: any) => void} routingFn
|
333
333
|
*/
|
334
|
-
constructor(database: Database
|
334
|
+
constructor(database: Database, routingFn?: (_: any, emit: any) => void);
|
335
335
|
subcribers: Map<any, any>;
|
336
336
|
doStopListening: any;
|
337
|
-
database: Database
|
337
|
+
database: Database;
|
338
338
|
/**
|
339
339
|
* The map function to apply to each entry in the database.
|
340
340
|
* @type {Function}
|
@@ -368,15 +368,16 @@ declare class Sync {
|
|
368
368
|
* @param {import("./database.js").Database} database
|
369
369
|
* @param {string} key
|
370
370
|
*/
|
371
|
-
static makeCar(database: Database
|
371
|
+
static makeCar(database: Database, key: string, skip?: any[]): Promise<multiformats.BlockView<Uint8Array, 85, 18, 1>>;
|
372
|
+
constructor(database: any, PeerClass?: any);
|
372
373
|
/**
|
373
374
|
* @param {Database} database
|
374
375
|
* @param {typeof SimplePeer} [PeerClass]
|
375
376
|
* @memberof Sync
|
376
377
|
* @static
|
377
378
|
*/
|
378
|
-
|
379
|
-
database:
|
379
|
+
status: string;
|
380
|
+
database: any;
|
380
381
|
PeerClass: any;
|
381
382
|
pushBacklog: Promise<any>;
|
382
383
|
pushBacklogResolve: (value: any) => void;
|
@@ -388,10 +389,10 @@ declare class Sync {
|
|
388
389
|
peer: any;
|
389
390
|
backlog(): Promise<any>;
|
390
391
|
gotData(data: any): Promise<void>;
|
392
|
+
destroy(): void;
|
391
393
|
sendUpdate(blockstore: any): Promise<void>;
|
392
394
|
startSync(): Promise<void>;
|
393
395
|
}
|
394
|
-
type Database = Database$1;
|
395
396
|
|
396
397
|
declare class Fireproof {
|
397
398
|
/**
|
@@ -402,10 +403,10 @@ declare class Fireproof {
|
|
402
403
|
* @static
|
403
404
|
* @returns {Database} - a new Fireproof instance
|
404
405
|
*/
|
405
|
-
static storage: (name?: any, opts?: {}) => Database
|
406
|
+
static storage: (name?: any, opts?: {}) => Database;
|
406
407
|
static fromJSON(json: any, database: any): any;
|
407
408
|
static snapshot(database: any, clock: any): any;
|
408
409
|
static zoom(database: any, clock: any): Promise<any>;
|
409
410
|
}
|
410
411
|
|
411
|
-
export { Database
|
412
|
+
export { Database, Fireproof, DbIndex as Index, Listener, Sync };
|