@fireproof/core 0.20.0-dev-preview-15 → 0.20.0-dev-preview-17
Sign up to get free protection for your applications and to get access to all the features.
- package/index.cjs +14 -6
- package/index.cjs.map +1 -1
- package/index.d.cts +37 -15
- package/index.d.ts +37 -15
- package/index.js +14 -6
- package/index.js.map +1 -1
- package/{web → indexdb}/index.cjs +5 -5
- package/indexdb/index.cjs.map +1 -0
- package/{web → indexdb}/index.d.cts +1 -1
- package/{web → indexdb}/index.d.ts +1 -1
- package/{web → indexdb}/index.js +4 -4
- package/indexdb/index.js.map +1 -0
- package/indexdb/metafile-cjs.json +1 -0
- package/indexdb/metafile-esm.json +1 -0
- package/metafile-cjs.json +1 -1
- package/metafile-esm.json +1 -1
- package/package.json +10 -10
- package/react/index.d.cts +1 -1
- package/react/index.d.ts +1 -1
- package/tests/blockstore/keyed-crypto-indexdb-file.test.ts +1 -1
- package/tests/blockstore/keyed-crypto.test.ts +1 -1
- package/web/index.cjs.map +0 -1
- package/web/index.js.map +0 -1
- package/web/metafile-cjs.json +0 -1
- package/web/metafile-esm.json +0 -1
package/index.d.cts
CHANGED
@@ -852,6 +852,11 @@ declare namespace index$5 {
|
|
852
852
|
export { type index$5_AnyAnyBlock as AnyAnyBlock, type index$5_AnyAnyLink as AnyAnyLink, type index$5_AnyBlock as AnyBlock, type index$5_AnyDecodedBlock as AnyDecodedBlock, type index$5_AnyLink as AnyLink, type index$5_AnyLinkFn as AnyLinkFn, index$5_BaseBlockstoreImpl as BaseBlockstoreImpl, type index$5_BaseStore as BaseStore, type index$5_BlobLike as BlobLike, type index$5_BlockFetcher as BlockFetcher, type index$5_BlockstoreOpts as BlockstoreOpts, type index$5_BlockstoreParams as BlockstoreParams, type index$5_BlockstoreRuntime as BlockstoreRuntime, type index$5_BytesWithIv as BytesWithIv, type index$5_CIDBlock as CIDBlock, index$5_Car2FPMsg as Car2FPMsg, type index$5_CarClockHead as CarClockHead, type index$5_CarClockLink as CarClockLink, type index$5_CarGroup as CarGroup, type index$5_CarHeader as CarHeader, type index$5_CarLog as CarLog, type index$5_CarMakeable as CarMakeable, index$5_CarTransactionImpl as CarTransactionImpl, type index$5_CarTransactionOpts as CarTransactionOpts, type index$5_CodecOpts as CodecOpts, type index$5_CommitOpts as CommitOpts, type index$5_CompactFetcher as CompactFetcher, type index$5_CompactFn as CompactFn, index$5_CompactionFetcher as CompactionFetcher, type index$5_Connection as Connection, index$5_ConnectionBase as ConnectionBase, type index$5_DataSaveOpts as DataSaveOpts, type index$5_DataStore as DataStore, type index$5_DbMeta as DbMeta, type index$5_DbMetaBinary as DbMetaBinary, type index$5_DbMetaEvent as DbMetaEvent, type index$5_DbMetaEventBlock as DbMetaEventBlock, index$5_DbMetaEventEqual as DbMetaEventEqual, index$5_DbMetaEventsEqual as DbMetaEventsEqual, type index$5_EncryptedBlock as EncryptedBlock, index$5_EncryptedBlockstore as EncryptedBlockstore, type index$5_FPEnvelope as FPEnvelope, type index$5_FPEnvelopeCar as FPEnvelopeCar, type index$5_FPEnvelopeFile as FPEnvelopeFile, type index$5_FPEnvelopeMeta as FPEnvelopeMeta, index$5_FPEnvelopeType as FPEnvelopeType, type index$5_FPEnvelopeWAL as FPEnvelopeWAL, type index$5_FPWALCarsOps as FPWALCarsOps, index$5_File2FPMsg as File2FPMsg, type index$5_Gateway as Gateway, type index$5_GatewayOpts as GatewayOpts, type index$5_GetResult as GetResult, index$5_InterceptorGateway as InterceptorGateway, type index$5_IvAndBytes as IvAndBytes, type index$5_IvKeyIdData as IvKeyIdData, type index$5_KeyMaterial as KeyMaterial, type index$5_KeyWithFingerExtract as KeyWithFingerExtract, type index$5_KeyWithFingerPrint as KeyWithFingerPrint, type index$5_KeyedCrypto as KeyedCrypto, type index$5_LoadHandler as LoadHandler, type index$5_Loadable as Loadable, index$5_Loader as Loader, type index$5_MetaStore as MetaStore, index$5_PassThroughGateway as PassThroughGateway, type index$5_RefBlockstore as RefBlockstore, type index$5_RefLoadable as RefLoadable, type index$5_SerdeGateway as SerdeGateway, type index$5_SerdeGatewayBuildUrlOp as SerdeGatewayBuildUrlOp, type index$5_SerdeGatewayBuildUrlReturn as SerdeGatewayBuildUrlReturn, type index$5_SerdeGatewayCloseOp as SerdeGatewayCloseOp, type index$5_SerdeGatewayCloseReturn as SerdeGatewayCloseReturn, type index$5_SerdeGatewayDeleteOp as SerdeGatewayDeleteOp, type index$5_SerdeGatewayDeleteReturn as SerdeGatewayDeleteReturn, type index$5_SerdeGatewayDestroyOp as SerdeGatewayDestroyOp, type index$5_SerdeGatewayDestroyReturn as SerdeGatewayDestroyReturn, type index$5_SerdeGatewayFactoryItem as SerdeGatewayFactoryItem, type index$5_SerdeGatewayGetOp as SerdeGatewayGetOp, type index$5_SerdeGatewayGetReturn as SerdeGatewayGetReturn, type index$5_SerdeGatewayInterceptor as SerdeGatewayInterceptor, type index$5_SerdeGatewayOpts as SerdeGatewayOpts, type index$5_SerdeGatewayPutOp as SerdeGatewayPutOp, type index$5_SerdeGatewayPutReturn as SerdeGatewayPutReturn, type index$5_SerdeGatewayReturn as SerdeGatewayReturn, type index$5_SerdeGatewayStartOp as SerdeGatewayStartOp, type index$5_SerdeGatewayStartReturn as SerdeGatewayStartReturn, type index$5_SerdeGatewaySubscribeOp as SerdeGatewaySubscribeOp, type index$5_SerdeGatewaySubscribeReturn as SerdeGatewaySubscribeReturn, type index$5_SerdeGetResult as SerdeGetResult, type index$5_SerdeOrGatewayFactoryItem as SerdeOrGatewayFactoryItem, type index$5_StoreEnDeFile as StoreEnDeFile, type index$5_StoreFactory as StoreFactory, type index$5_StoreFactoryItem as StoreFactoryItem, type index$5_StoreRuntime as StoreRuntime, type index$5_StoreRuntimeUrls as StoreRuntimeUrls, type index$5_StoreURIRuntime as StoreURIRuntime, type index$5_StoreURIs as StoreURIs, type index$5_StoreUrls as StoreUrls, type index$5_StoreUrlsOpts as StoreUrlsOpts, type index$5_TransactionMeta as TransactionMeta, type index$5_TransactionWrapper as TransactionWrapper, type index$5_UnsubscribeResult as UnsubscribeResult, type index$5_VoidResult as VoidResult, type index$5_WALState as WALState, type index$5_WALStore as WALStore, index$5_createDbMetaEvent as createDbMetaEvent, index$5_defaultGatewayFactoryItem as defaultGatewayFactoryItem, index$5_ensureStoreEnDeFile as ensureStoreEnDeFile, index$5_getDefaultURI as getDefaultURI, index$5_getGatewayFactoryItem as getGatewayFactoryItem, index$5_getStartedGateway as getStartedGateway, index$5_parseCarFile as parseCarFile, index$5_registerStoreProtocol as registerStoreProtocol, index$5_toCIDBlock as toCIDBlock, index$5_toStoreRuntime as toStoreRuntime };
|
853
853
|
}
|
854
854
|
|
855
|
+
interface WriteQueueParams {
|
856
|
+
readonly chunkSize: number;
|
857
|
+
}
|
858
|
+
declare function defaultWriteQueueOpts(opts?: Partial<WriteQueueParams>): WriteQueueParams;
|
859
|
+
|
855
860
|
declare class IndexTree<K extends IndexKeyType, R extends DocFragment> {
|
856
861
|
cid?: AnyLink;
|
857
862
|
root?: ProllyNode<K, R>;
|
@@ -1253,7 +1258,17 @@ interface WriteQueue<T extends DocUpdate<S>, S extends DocTypes = DocTypes> {
|
|
1253
1258
|
bulk(tasks: T[]): Promise<MetaType>;
|
1254
1259
|
close(): Promise<void>;
|
1255
1260
|
}
|
1261
|
+
interface LedgerOpts {
|
1262
|
+
readonly name?: string;
|
1263
|
+
readonly meta?: DbMeta;
|
1264
|
+
readonly gatewayInterceptor?: SerdeGatewayInterceptor;
|
1265
|
+
readonly writeQueue: WriteQueueParams;
|
1266
|
+
readonly storeUrls: StoreURIRuntime;
|
1267
|
+
readonly storeEnDe: StoreEnDeFile;
|
1268
|
+
readonly keyBag: KeyBagRuntime;
|
1269
|
+
}
|
1256
1270
|
interface Ledger extends HasCRDT {
|
1271
|
+
readonly opts: LedgerOpts;
|
1257
1272
|
readonly writeQueue: WriteQueue<DocUpdate<DocTypes>>;
|
1258
1273
|
readonly logger: Logger;
|
1259
1274
|
readonly sthis: SuperThis;
|
@@ -1267,21 +1282,7 @@ interface Ledger extends HasCRDT {
|
|
1267
1282
|
subscribe<T extends DocTypes>(listener: ListenerFn<T>, updates?: boolean): () => void;
|
1268
1283
|
}
|
1269
1284
|
|
1270
|
-
interface WriteQueueParams {
|
1271
|
-
readonly chunkSize: number;
|
1272
|
-
}
|
1273
|
-
declare function defaultWriteQueueOpts(opts?: Partial<WriteQueueParams>): WriteQueueParams;
|
1274
|
-
|
1275
1285
|
declare function keyConfigOpts(sthis: SuperThis, name?: string, opts?: ConfigOpts): string;
|
1276
|
-
interface LedgerOpts {
|
1277
|
-
readonly name?: string;
|
1278
|
-
readonly meta?: DbMeta;
|
1279
|
-
readonly gatewayInterceptor?: SerdeGatewayInterceptor;
|
1280
|
-
readonly writeQueue: WriteQueueParams;
|
1281
|
-
readonly storeUrls: StoreURIRuntime;
|
1282
|
-
readonly storeEnDe: StoreEnDeFile;
|
1283
|
-
readonly keyBag: KeyBagRuntime;
|
1284
|
-
}
|
1285
1286
|
declare function isLedger(db: unknown): db is Ledger;
|
1286
1287
|
declare function LedgerFactory(name: string | undefined, opts?: ConfigOpts): Ledger;
|
1287
1288
|
declare class LedgerShell implements Ledger {
|
@@ -1289,6 +1290,7 @@ declare class LedgerShell implements Ledger {
|
|
1289
1290
|
readonly writeQueue: WriteQueue<DocUpdate<DocTypes>>;
|
1290
1291
|
readonly name: string;
|
1291
1292
|
constructor(ref: LedgerImpl);
|
1293
|
+
get opts(): LedgerOpts;
|
1292
1294
|
get context(): Context;
|
1293
1295
|
get id(): string;
|
1294
1296
|
get logger(): Logger;
|
@@ -1536,6 +1538,26 @@ declare namespace index$2 {
|
|
1536
1538
|
export { index$2_KeyBagProviderFile as KeyBagProviderFile, index$2_sysFileSystemFactory as sysFileSystemFactory };
|
1537
1539
|
}
|
1538
1540
|
|
1541
|
+
declare class MemoryGateway implements Gateway {
|
1542
|
+
readonly memorys: Map<string, Uint8Array>;
|
1543
|
+
readonly sthis: SuperThis;
|
1544
|
+
constructor(sthis: SuperThis, memorys: Map<string, Uint8Array>);
|
1545
|
+
buildUrl(baseUrl: URI, key: string): Promise<Result<URI>>;
|
1546
|
+
start(baseUrl: URI): Promise<Result<URI>>;
|
1547
|
+
close(baseUrl: URI): Promise<VoidResult>;
|
1548
|
+
destroy(baseUrl: URI): Promise<VoidResult>;
|
1549
|
+
put(url: URI, bytes: Uint8Array): Promise<VoidResult>;
|
1550
|
+
get(url: URI): Promise<GetResult>;
|
1551
|
+
delete(url: URI): Promise<VoidResult>;
|
1552
|
+
getPlain(url: URI, key: string): Promise<Result<Uint8Array>>;
|
1553
|
+
}
|
1554
|
+
|
1555
|
+
type gateway_MemoryGateway = MemoryGateway;
|
1556
|
+
declare const gateway_MemoryGateway: typeof MemoryGateway;
|
1557
|
+
declare namespace gateway {
|
1558
|
+
export { gateway_MemoryGateway as MemoryGateway };
|
1559
|
+
}
|
1560
|
+
|
1539
1561
|
declare class DefSerdeGateway implements SerdeGateway {
|
1540
1562
|
readonly gw: Gateway;
|
1541
1563
|
constructor(gw: Gateway);
|
@@ -1568,7 +1590,7 @@ type index$1_WALEncodeEnvelope = WALEncodeEnvelope;
|
|
1568
1590
|
declare const index$1_fpDeserialize: typeof fpDeserialize;
|
1569
1591
|
declare const index$1_fpSerialize: typeof fpSerialize;
|
1570
1592
|
declare namespace index$1 {
|
1571
|
-
export { type index$1_CARDecodeEnvelope as CARDecodeEnvelope, type index$1_CAREncodeEnvelope as CAREncodeEnvelope, type index$1_Decoder as Decoder, index$1_DefSerdeGateway as DefSerdeGateway, type index$1_Encoder as Encoder, type index$1_FILEDecodeEnvelope as FILEDecodeEnvelope, type index$1_FILEEncodeEnvelope as FILEEncodeEnvelope, type index$1_METADecodeEnvelope as METADecodeEnvelope, type index$1_METAEncodeEnvelope as METAEncodeEnvelope, type index$1_SerializedMeta as SerializedMeta, type index$1_SerializedWAL as SerializedWAL, type index$1_WALDecodeEnvelope as WALDecodeEnvelope, type index$1_WALEncodeEnvelope as WALEncodeEnvelope, index$2 as file, index$1_fpDeserialize as fpDeserialize, index$1_fpSerialize as fpSerialize };
|
1593
|
+
export { type index$1_CARDecodeEnvelope as CARDecodeEnvelope, type index$1_CAREncodeEnvelope as CAREncodeEnvelope, type index$1_Decoder as Decoder, index$1_DefSerdeGateway as DefSerdeGateway, type index$1_Encoder as Encoder, type index$1_FILEDecodeEnvelope as FILEDecodeEnvelope, type index$1_FILEEncodeEnvelope as FILEEncodeEnvelope, type index$1_METADecodeEnvelope as METADecodeEnvelope, type index$1_METAEncodeEnvelope as METAEncodeEnvelope, type index$1_SerializedMeta as SerializedMeta, type index$1_SerializedWAL as SerializedWAL, type index$1_WALDecodeEnvelope as WALDecodeEnvelope, type index$1_WALEncodeEnvelope as WALEncodeEnvelope, index$2 as file, index$1_fpDeserialize as fpDeserialize, index$1_fpSerialize as fpSerialize, gateway as memory };
|
1572
1594
|
}
|
1573
1595
|
|
1574
1596
|
declare const FILESTORE_VERSION = "v0.19-file";
|
package/index.d.ts
CHANGED
@@ -852,6 +852,11 @@ declare namespace index$5 {
|
|
852
852
|
export { type index$5_AnyAnyBlock as AnyAnyBlock, type index$5_AnyAnyLink as AnyAnyLink, type index$5_AnyBlock as AnyBlock, type index$5_AnyDecodedBlock as AnyDecodedBlock, type index$5_AnyLink as AnyLink, type index$5_AnyLinkFn as AnyLinkFn, index$5_BaseBlockstoreImpl as BaseBlockstoreImpl, type index$5_BaseStore as BaseStore, type index$5_BlobLike as BlobLike, type index$5_BlockFetcher as BlockFetcher, type index$5_BlockstoreOpts as BlockstoreOpts, type index$5_BlockstoreParams as BlockstoreParams, type index$5_BlockstoreRuntime as BlockstoreRuntime, type index$5_BytesWithIv as BytesWithIv, type index$5_CIDBlock as CIDBlock, index$5_Car2FPMsg as Car2FPMsg, type index$5_CarClockHead as CarClockHead, type index$5_CarClockLink as CarClockLink, type index$5_CarGroup as CarGroup, type index$5_CarHeader as CarHeader, type index$5_CarLog as CarLog, type index$5_CarMakeable as CarMakeable, index$5_CarTransactionImpl as CarTransactionImpl, type index$5_CarTransactionOpts as CarTransactionOpts, type index$5_CodecOpts as CodecOpts, type index$5_CommitOpts as CommitOpts, type index$5_CompactFetcher as CompactFetcher, type index$5_CompactFn as CompactFn, index$5_CompactionFetcher as CompactionFetcher, type index$5_Connection as Connection, index$5_ConnectionBase as ConnectionBase, type index$5_DataSaveOpts as DataSaveOpts, type index$5_DataStore as DataStore, type index$5_DbMeta as DbMeta, type index$5_DbMetaBinary as DbMetaBinary, type index$5_DbMetaEvent as DbMetaEvent, type index$5_DbMetaEventBlock as DbMetaEventBlock, index$5_DbMetaEventEqual as DbMetaEventEqual, index$5_DbMetaEventsEqual as DbMetaEventsEqual, type index$5_EncryptedBlock as EncryptedBlock, index$5_EncryptedBlockstore as EncryptedBlockstore, type index$5_FPEnvelope as FPEnvelope, type index$5_FPEnvelopeCar as FPEnvelopeCar, type index$5_FPEnvelopeFile as FPEnvelopeFile, type index$5_FPEnvelopeMeta as FPEnvelopeMeta, index$5_FPEnvelopeType as FPEnvelopeType, type index$5_FPEnvelopeWAL as FPEnvelopeWAL, type index$5_FPWALCarsOps as FPWALCarsOps, index$5_File2FPMsg as File2FPMsg, type index$5_Gateway as Gateway, type index$5_GatewayOpts as GatewayOpts, type index$5_GetResult as GetResult, index$5_InterceptorGateway as InterceptorGateway, type index$5_IvAndBytes as IvAndBytes, type index$5_IvKeyIdData as IvKeyIdData, type index$5_KeyMaterial as KeyMaterial, type index$5_KeyWithFingerExtract as KeyWithFingerExtract, type index$5_KeyWithFingerPrint as KeyWithFingerPrint, type index$5_KeyedCrypto as KeyedCrypto, type index$5_LoadHandler as LoadHandler, type index$5_Loadable as Loadable, index$5_Loader as Loader, type index$5_MetaStore as MetaStore, index$5_PassThroughGateway as PassThroughGateway, type index$5_RefBlockstore as RefBlockstore, type index$5_RefLoadable as RefLoadable, type index$5_SerdeGateway as SerdeGateway, type index$5_SerdeGatewayBuildUrlOp as SerdeGatewayBuildUrlOp, type index$5_SerdeGatewayBuildUrlReturn as SerdeGatewayBuildUrlReturn, type index$5_SerdeGatewayCloseOp as SerdeGatewayCloseOp, type index$5_SerdeGatewayCloseReturn as SerdeGatewayCloseReturn, type index$5_SerdeGatewayDeleteOp as SerdeGatewayDeleteOp, type index$5_SerdeGatewayDeleteReturn as SerdeGatewayDeleteReturn, type index$5_SerdeGatewayDestroyOp as SerdeGatewayDestroyOp, type index$5_SerdeGatewayDestroyReturn as SerdeGatewayDestroyReturn, type index$5_SerdeGatewayFactoryItem as SerdeGatewayFactoryItem, type index$5_SerdeGatewayGetOp as SerdeGatewayGetOp, type index$5_SerdeGatewayGetReturn as SerdeGatewayGetReturn, type index$5_SerdeGatewayInterceptor as SerdeGatewayInterceptor, type index$5_SerdeGatewayOpts as SerdeGatewayOpts, type index$5_SerdeGatewayPutOp as SerdeGatewayPutOp, type index$5_SerdeGatewayPutReturn as SerdeGatewayPutReturn, type index$5_SerdeGatewayReturn as SerdeGatewayReturn, type index$5_SerdeGatewayStartOp as SerdeGatewayStartOp, type index$5_SerdeGatewayStartReturn as SerdeGatewayStartReturn, type index$5_SerdeGatewaySubscribeOp as SerdeGatewaySubscribeOp, type index$5_SerdeGatewaySubscribeReturn as SerdeGatewaySubscribeReturn, type index$5_SerdeGetResult as SerdeGetResult, type index$5_SerdeOrGatewayFactoryItem as SerdeOrGatewayFactoryItem, type index$5_StoreEnDeFile as StoreEnDeFile, type index$5_StoreFactory as StoreFactory, type index$5_StoreFactoryItem as StoreFactoryItem, type index$5_StoreRuntime as StoreRuntime, type index$5_StoreRuntimeUrls as StoreRuntimeUrls, type index$5_StoreURIRuntime as StoreURIRuntime, type index$5_StoreURIs as StoreURIs, type index$5_StoreUrls as StoreUrls, type index$5_StoreUrlsOpts as StoreUrlsOpts, type index$5_TransactionMeta as TransactionMeta, type index$5_TransactionWrapper as TransactionWrapper, type index$5_UnsubscribeResult as UnsubscribeResult, type index$5_VoidResult as VoidResult, type index$5_WALState as WALState, type index$5_WALStore as WALStore, index$5_createDbMetaEvent as createDbMetaEvent, index$5_defaultGatewayFactoryItem as defaultGatewayFactoryItem, index$5_ensureStoreEnDeFile as ensureStoreEnDeFile, index$5_getDefaultURI as getDefaultURI, index$5_getGatewayFactoryItem as getGatewayFactoryItem, index$5_getStartedGateway as getStartedGateway, index$5_parseCarFile as parseCarFile, index$5_registerStoreProtocol as registerStoreProtocol, index$5_toCIDBlock as toCIDBlock, index$5_toStoreRuntime as toStoreRuntime };
|
853
853
|
}
|
854
854
|
|
855
|
+
interface WriteQueueParams {
|
856
|
+
readonly chunkSize: number;
|
857
|
+
}
|
858
|
+
declare function defaultWriteQueueOpts(opts?: Partial<WriteQueueParams>): WriteQueueParams;
|
859
|
+
|
855
860
|
declare class IndexTree<K extends IndexKeyType, R extends DocFragment> {
|
856
861
|
cid?: AnyLink;
|
857
862
|
root?: ProllyNode<K, R>;
|
@@ -1253,7 +1258,17 @@ interface WriteQueue<T extends DocUpdate<S>, S extends DocTypes = DocTypes> {
|
|
1253
1258
|
bulk(tasks: T[]): Promise<MetaType>;
|
1254
1259
|
close(): Promise<void>;
|
1255
1260
|
}
|
1261
|
+
interface LedgerOpts {
|
1262
|
+
readonly name?: string;
|
1263
|
+
readonly meta?: DbMeta;
|
1264
|
+
readonly gatewayInterceptor?: SerdeGatewayInterceptor;
|
1265
|
+
readonly writeQueue: WriteQueueParams;
|
1266
|
+
readonly storeUrls: StoreURIRuntime;
|
1267
|
+
readonly storeEnDe: StoreEnDeFile;
|
1268
|
+
readonly keyBag: KeyBagRuntime;
|
1269
|
+
}
|
1256
1270
|
interface Ledger extends HasCRDT {
|
1271
|
+
readonly opts: LedgerOpts;
|
1257
1272
|
readonly writeQueue: WriteQueue<DocUpdate<DocTypes>>;
|
1258
1273
|
readonly logger: Logger;
|
1259
1274
|
readonly sthis: SuperThis;
|
@@ -1267,21 +1282,7 @@ interface Ledger extends HasCRDT {
|
|
1267
1282
|
subscribe<T extends DocTypes>(listener: ListenerFn<T>, updates?: boolean): () => void;
|
1268
1283
|
}
|
1269
1284
|
|
1270
|
-
interface WriteQueueParams {
|
1271
|
-
readonly chunkSize: number;
|
1272
|
-
}
|
1273
|
-
declare function defaultWriteQueueOpts(opts?: Partial<WriteQueueParams>): WriteQueueParams;
|
1274
|
-
|
1275
1285
|
declare function keyConfigOpts(sthis: SuperThis, name?: string, opts?: ConfigOpts): string;
|
1276
|
-
interface LedgerOpts {
|
1277
|
-
readonly name?: string;
|
1278
|
-
readonly meta?: DbMeta;
|
1279
|
-
readonly gatewayInterceptor?: SerdeGatewayInterceptor;
|
1280
|
-
readonly writeQueue: WriteQueueParams;
|
1281
|
-
readonly storeUrls: StoreURIRuntime;
|
1282
|
-
readonly storeEnDe: StoreEnDeFile;
|
1283
|
-
readonly keyBag: KeyBagRuntime;
|
1284
|
-
}
|
1285
1286
|
declare function isLedger(db: unknown): db is Ledger;
|
1286
1287
|
declare function LedgerFactory(name: string | undefined, opts?: ConfigOpts): Ledger;
|
1287
1288
|
declare class LedgerShell implements Ledger {
|
@@ -1289,6 +1290,7 @@ declare class LedgerShell implements Ledger {
|
|
1289
1290
|
readonly writeQueue: WriteQueue<DocUpdate<DocTypes>>;
|
1290
1291
|
readonly name: string;
|
1291
1292
|
constructor(ref: LedgerImpl);
|
1293
|
+
get opts(): LedgerOpts;
|
1292
1294
|
get context(): Context;
|
1293
1295
|
get id(): string;
|
1294
1296
|
get logger(): Logger;
|
@@ -1536,6 +1538,26 @@ declare namespace index$2 {
|
|
1536
1538
|
export { index$2_KeyBagProviderFile as KeyBagProviderFile, index$2_sysFileSystemFactory as sysFileSystemFactory };
|
1537
1539
|
}
|
1538
1540
|
|
1541
|
+
declare class MemoryGateway implements Gateway {
|
1542
|
+
readonly memorys: Map<string, Uint8Array>;
|
1543
|
+
readonly sthis: SuperThis;
|
1544
|
+
constructor(sthis: SuperThis, memorys: Map<string, Uint8Array>);
|
1545
|
+
buildUrl(baseUrl: URI, key: string): Promise<Result<URI>>;
|
1546
|
+
start(baseUrl: URI): Promise<Result<URI>>;
|
1547
|
+
close(baseUrl: URI): Promise<VoidResult>;
|
1548
|
+
destroy(baseUrl: URI): Promise<VoidResult>;
|
1549
|
+
put(url: URI, bytes: Uint8Array): Promise<VoidResult>;
|
1550
|
+
get(url: URI): Promise<GetResult>;
|
1551
|
+
delete(url: URI): Promise<VoidResult>;
|
1552
|
+
getPlain(url: URI, key: string): Promise<Result<Uint8Array>>;
|
1553
|
+
}
|
1554
|
+
|
1555
|
+
type gateway_MemoryGateway = MemoryGateway;
|
1556
|
+
declare const gateway_MemoryGateway: typeof MemoryGateway;
|
1557
|
+
declare namespace gateway {
|
1558
|
+
export { gateway_MemoryGateway as MemoryGateway };
|
1559
|
+
}
|
1560
|
+
|
1539
1561
|
declare class DefSerdeGateway implements SerdeGateway {
|
1540
1562
|
readonly gw: Gateway;
|
1541
1563
|
constructor(gw: Gateway);
|
@@ -1568,7 +1590,7 @@ type index$1_WALEncodeEnvelope = WALEncodeEnvelope;
|
|
1568
1590
|
declare const index$1_fpDeserialize: typeof fpDeserialize;
|
1569
1591
|
declare const index$1_fpSerialize: typeof fpSerialize;
|
1570
1592
|
declare namespace index$1 {
|
1571
|
-
export { type index$1_CARDecodeEnvelope as CARDecodeEnvelope, type index$1_CAREncodeEnvelope as CAREncodeEnvelope, type index$1_Decoder as Decoder, index$1_DefSerdeGateway as DefSerdeGateway, type index$1_Encoder as Encoder, type index$1_FILEDecodeEnvelope as FILEDecodeEnvelope, type index$1_FILEEncodeEnvelope as FILEEncodeEnvelope, type index$1_METADecodeEnvelope as METADecodeEnvelope, type index$1_METAEncodeEnvelope as METAEncodeEnvelope, type index$1_SerializedMeta as SerializedMeta, type index$1_SerializedWAL as SerializedWAL, type index$1_WALDecodeEnvelope as WALDecodeEnvelope, type index$1_WALEncodeEnvelope as WALEncodeEnvelope, index$2 as file, index$1_fpDeserialize as fpDeserialize, index$1_fpSerialize as fpSerialize };
|
1593
|
+
export { type index$1_CARDecodeEnvelope as CARDecodeEnvelope, type index$1_CAREncodeEnvelope as CAREncodeEnvelope, type index$1_Decoder as Decoder, index$1_DefSerdeGateway as DefSerdeGateway, type index$1_Encoder as Encoder, type index$1_FILEDecodeEnvelope as FILEDecodeEnvelope, type index$1_FILEEncodeEnvelope as FILEEncodeEnvelope, type index$1_METADecodeEnvelope as METADecodeEnvelope, type index$1_METAEncodeEnvelope as METAEncodeEnvelope, type index$1_SerializedMeta as SerializedMeta, type index$1_SerializedWAL as SerializedWAL, type index$1_WALDecodeEnvelope as WALDecodeEnvelope, type index$1_WALEncodeEnvelope as WALEncodeEnvelope, index$2 as file, index$1_fpDeserialize as fpDeserialize, index$1_fpSerialize as fpSerialize, gateway as memory };
|
1572
1594
|
}
|
1573
1595
|
|
1574
1596
|
declare const FILESTORE_VERSION = "v0.19-file";
|
package/index.js
CHANGED
@@ -738,7 +738,7 @@ var keyBagProviderFactories = new Map(
|
|
738
738
|
{
|
739
739
|
protocol: "indexdb:",
|
740
740
|
factory: async (url, sthis) => {
|
741
|
-
const { KeyBagProviderImpl } = await import("@fireproof/core/
|
741
|
+
const { KeyBagProviderImpl } = await import("@fireproof/core/indexdb");
|
742
742
|
return new KeyBagProviderImpl(url, sthis);
|
743
743
|
}
|
744
744
|
},
|
@@ -832,7 +832,7 @@ import { BuildURI, runtimeFn as runtimeFn3 } from "@adviser/cement";
|
|
832
832
|
// src/runtime/gateways/file/version.ts
|
833
833
|
var FILESTORE_VERSION = "v0.19-file";
|
834
834
|
|
835
|
-
// src/runtime/gateways/indexdb
|
835
|
+
// src/runtime/gateways/indexdb-version.ts
|
836
836
|
var INDEXDB_VERSION = "v0.19-indexdb";
|
837
837
|
|
838
838
|
// src/runtime/gateways/file/gateway-impl.ts
|
@@ -975,6 +975,10 @@ var FileGateway = class {
|
|
975
975
|
};
|
976
976
|
|
977
977
|
// src/runtime/gateways/memory/gateway.ts
|
978
|
+
var gateway_exports = {};
|
979
|
+
__export(gateway_exports, {
|
980
|
+
MemoryGateway: () => MemoryGateway
|
981
|
+
});
|
978
982
|
import { Result as Result4 } from "@adviser/cement";
|
979
983
|
|
980
984
|
// src/runtime/gateways/memory/version.ts
|
@@ -1346,7 +1350,7 @@ if (runtimeFn3().isBrowser) {
|
|
1346
1350
|
return BuildURI.from("indexdb://").pathname("fp").setParam("version" /* VERSION */, INDEXDB_VERSION).setParam("runtime" /* RUNTIME */, "browser").URI();
|
1347
1351
|
},
|
1348
1352
|
gateway: async () => {
|
1349
|
-
const { GatewayImpl } = await import("@fireproof/core/
|
1353
|
+
const { GatewayImpl } = await import("@fireproof/core/indexdb");
|
1350
1354
|
return new GatewayImpl();
|
1351
1355
|
}
|
1352
1356
|
});
|
@@ -4422,6 +4426,9 @@ var LedgerShell = class {
|
|
4422
4426
|
this.name = ref.name;
|
4423
4427
|
ref.addShell(this);
|
4424
4428
|
}
|
4429
|
+
get opts() {
|
4430
|
+
return this.ref.opts;
|
4431
|
+
}
|
4425
4432
|
get context() {
|
4426
4433
|
return this.ref.context;
|
4427
4434
|
}
|
@@ -4479,7 +4486,7 @@ var LedgerImpl = class {
|
|
4479
4486
|
this.crdt.clock.onTock(() => this._no_update_notify());
|
4480
4487
|
}
|
4481
4488
|
get name() {
|
4482
|
-
return this.opts.storeUrls.data.data.getParam("name" /* NAME */)
|
4489
|
+
return this.opts.storeUrls.data.data.getParam("name" /* NAME */) ?? "default";
|
4483
4490
|
}
|
4484
4491
|
addShell(shell) {
|
4485
4492
|
this.shells.add(shell);
|
@@ -4660,7 +4667,8 @@ __export(gateways_exports, {
|
|
4660
4667
|
DefSerdeGateway: () => DefSerdeGateway,
|
4661
4668
|
file: () => file_exports,
|
4662
4669
|
fpDeserialize: () => fpDeserialize,
|
4663
|
-
fpSerialize: () => fpSerialize
|
4670
|
+
fpSerialize: () => fpSerialize,
|
4671
|
+
memory: () => gateway_exports
|
4664
4672
|
});
|
4665
4673
|
|
4666
4674
|
// src/runtime/gateways/file/index.ts
|
@@ -4672,7 +4680,7 @@ __export(file_exports, {
|
|
4672
4680
|
|
4673
4681
|
// src/version.ts
|
4674
4682
|
var PACKAGE_VERSION = Object.keys({
|
4675
|
-
"0.20.0-dev-preview-
|
4683
|
+
"0.20.0-dev-preview-17": "xxxx"
|
4676
4684
|
})[0];
|
4677
4685
|
export {
|
4678
4686
|
CRDTImpl,
|