@fireproof/core 0.20.0-dev-preview-52 → 0.20.0-dev-preview-54
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/deno.json +1 -3
- package/index.cjs +225 -255
- package/index.cjs.map +1 -1
- package/index.d.cts +17 -17
- package/index.d.ts +17 -17
- package/index.js +169 -199
- package/index.js.map +1 -1
- package/metafile-cjs.json +1 -1
- package/metafile-esm.json +1 -1
- package/package.json +3 -5
- package/react/index.d.cts +1 -1
- package/react/index.d.ts +1 -1
- package/tests/fireproof/database.test.ts +39 -0
package/index.d.cts
CHANGED
@@ -1,11 +1,10 @@
|
|
1
|
-
import { Logger, Future,
|
1
|
+
import { Logger, Future, URI, CryptoRuntime, ResolveOnce, Result, ResolveSeq, CTCryptoKey, CoerceURI, LRUSet, Env, EnvFactoryOpts, runtimeFn } from '@adviser/cement';
|
2
2
|
import { EventLink } from '@fireproof/vendor/@web3-storage/pail/clock/api';
|
3
3
|
import { Operation } from '@fireproof/vendor/@web3-storage/pail/crdt/api';
|
4
4
|
import { Version, Block as Block$1, UnknownLink, CID, ByteView, ArrayBufferView, Link, MultihashHasher, BlockView } from 'multiformats';
|
5
5
|
import { BlockFetcher as BlockFetcher$1 } from '@fireproof/vendor/@web3-storage/pail/api';
|
6
6
|
import { EventBlock } from '@fireproof/vendor/@web3-storage/pail/clock';
|
7
7
|
import { ProllyNode as ProllyNode$1 } from 'prolly-trees/db-index';
|
8
|
-
import { SuperThis as SuperThis$1 } from '@fireproof/core';
|
9
8
|
import { Block as Block$2 } from 'multiformats/block';
|
10
9
|
|
11
10
|
type BlockFetcher = BlockFetcher$1;
|
@@ -521,11 +520,8 @@ interface CryptoAction {
|
|
521
520
|
_decrypt(data: IvAndKeyAndBytes): Promise<Uint8Array>;
|
522
521
|
_encrypt(data: BytesAndKeyWithIv): Promise<Uint8Array>;
|
523
522
|
}
|
524
|
-
interface BlobLike {
|
525
|
-
stream: () => ReadableStream;
|
526
|
-
}
|
527
523
|
interface StoreFactory {
|
528
|
-
encodeFile?: (blob:
|
524
|
+
encodeFile?: (blob: Blob) => Promise<{
|
529
525
|
cid: AnyLink;
|
530
526
|
blocks: AnyBlock[];
|
531
527
|
}>;
|
@@ -538,11 +534,11 @@ interface StoreUrls {
|
|
538
534
|
readonly wal: CoerceURI;
|
539
535
|
}
|
540
536
|
interface StoreEnDeFile {
|
541
|
-
readonly encodeFile: (blob:
|
537
|
+
readonly encodeFile: (blob: Blob) => Promise<{
|
542
538
|
cid: AnyLink;
|
543
539
|
blocks: AnyBlock[];
|
544
540
|
}>;
|
545
|
-
readonly decodeFile: (blocks: unknown, cid: AnyLink, meta: DocFileMeta) => Promise<File
|
541
|
+
readonly decodeFile: (blocks: unknown, cid: AnyLink, meta: DocFileMeta) => Promise<Result<File>>;
|
546
542
|
}
|
547
543
|
interface StoreUrlsOpts {
|
548
544
|
readonly base?: CoerceURI;
|
@@ -569,11 +565,11 @@ interface StoreFactoryItem {
|
|
569
565
|
}
|
570
566
|
interface StoreRuntime {
|
571
567
|
makeStores(sfi: StoreFactoryItem): Promise<DataAndMetaAndWalStore>;
|
572
|
-
encodeFile(blob:
|
568
|
+
encodeFile(blob: Blob): Promise<{
|
573
569
|
cid: AnyLink;
|
574
570
|
blocks: AnyBlock[];
|
575
571
|
}>;
|
576
|
-
decodeFile(blocks: unknown, cid: AnyLink, meta: DocFileMeta): Promise<File
|
572
|
+
decodeFile(blocks: unknown, cid: AnyLink, meta: DocFileMeta): Promise<Result<File>>;
|
577
573
|
}
|
578
574
|
interface CommitOpts {
|
579
575
|
readonly noLoader?: boolean;
|
@@ -951,7 +947,6 @@ type index$5_BaseAttachedStores = BaseAttachedStores;
|
|
951
947
|
type index$5_BaseBlockstoreImpl = BaseBlockstoreImpl;
|
952
948
|
declare const index$5_BaseBlockstoreImpl: typeof BaseBlockstoreImpl;
|
953
949
|
type index$5_BaseStore = BaseStore;
|
954
|
-
type index$5_BlobLike = BlobLike;
|
955
950
|
type index$5_BlockFetcher = BlockFetcher;
|
956
951
|
type index$5_BlockstoreOpts = BlockstoreOpts;
|
957
952
|
type index$5_BlockstoreParams = BlockstoreParams;
|
@@ -1094,7 +1089,7 @@ declare const index$5_registerStoreProtocol: typeof registerStoreProtocol;
|
|
1094
1089
|
declare const index$5_toCIDBlock: typeof toCIDBlock;
|
1095
1090
|
declare const index$5_toStoreRuntime: typeof toStoreRuntime;
|
1096
1091
|
declare namespace index$5 {
|
1097
|
-
export { type index$5_ActiveStore as ActiveStore, 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_AttachedRemotesImpl as AttachedRemotesImpl, type index$5_AttachedStores as AttachedStores, index$5_BaseActiveStore as BaseActiveStore, type index$5_BaseAttachedStores as BaseAttachedStores, index$5_BaseBlockstoreImpl as BaseBlockstoreImpl, type index$5_BaseStore as BaseStore, type index$
|
1092
|
+
export { type index$5_ActiveStore as ActiveStore, 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_AttachedRemotesImpl as AttachedRemotesImpl, type index$5_AttachedStores as AttachedStores, index$5_BaseActiveStore as BaseActiveStore, type index$5_BaseAttachedStores as BaseAttachedStores, index$5_BaseBlockstoreImpl as BaseBlockstoreImpl, type index$5_BaseStore as BaseStore, 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_BytesAndKeyWithIv as BytesAndKeyWithIv, type index$5_CIDActiveStore as CIDActiveStore, type index$5_CIDBlock as CIDBlock, index$5_Car2FPMsg as Car2FPMsg, index$5_CarActiveStore as CarActiveStore, type index$5_CarAttachedStores as CarAttachedStores, type index$5_CarCacheItem as CarCacheItem, type index$5_CarClockHead as CarClockHead, type index$5_CarClockLink as CarClockLink, type index$5_CarGroup as CarGroup, type index$5_CarHeader as CarHeader, index$5_CarLog as CarLog, type index$5_CarMakeable as CarMakeable, type index$5_CarStore as CarStore, 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, type index$5_CryptoAction as CryptoAction, type index$5_DataAndMetaAndWalStore as DataAndMetaAndWalStore, type index$5_DataAndMetaStore as DataAndMetaStore, type index$5_DataSaveOpts as DataSaveOpts, 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, type index$5_FPEnvelopeType as FPEnvelopeType, index$5_FPEnvelopeTypes as FPEnvelopeTypes, type index$5_FPEnvelopeWAL as FPEnvelopeWAL, type index$5_FPWALCarsOps as FPWALCarsOps, index$5_File2FPMsg as File2FPMsg, index$5_FileActiveStore as FileActiveStore, type index$5_FileAttachedStores as FileAttachedStores, type index$5_FileStore as FileStore, type index$5_FroozenCarLog as FroozenCarLog, 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_IvAndKeyAndBytes as IvAndKeyAndBytes, type index$5_IvKeyIdData as IvKeyIdData, type index$5_KeyMaterial as KeyMaterial, type index$5_KeyUpsertResult as KeyUpsertResult, type index$5_KeyWithFingerPrint as KeyWithFingerPrint, type index$5_KeysByFingerprint as KeysByFingerprint, type index$5_LoadHandler as LoadHandler, type index$5_Loadable as Loadable, index$5_Loader as Loader, type index$5_LocalActiveStore as LocalActiveStore, type index$5_LocalDataAndMetaAndWalStore as LocalDataAndMetaAndWalStore, index$5_MetaActiveStore as MetaActiveStore, type index$5_MetaAttachedStores as MetaAttachedStores, 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_SerdeGatewayCtx as SerdeGatewayCtx, 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, index$5_TaskManager as TaskManager, type index$5_TaskManagerParams as TaskManagerParams, type index$5_TransactionMeta as TransactionMeta, type index$5_TransactionWrapper as TransactionWrapper, type index$5_UnsubscribeResult as UnsubscribeResult, type index$5_UrlAndInterceptor as UrlAndInterceptor, type index$5_VoidResult as VoidResult, index$5_WALActiveStore as WALActiveStore, type index$5_WALAttachedStores as WALAttachedStores, type index$5_WALState as WALState, type index$5_WALStore as WALStore, type index$5_WriteableDataAndMetaAndWalStore as WriteableDataAndMetaAndWalStore, type index$5_WriteableDataAndMetaStore as WriteableDataAndMetaStore, index$5_createAttachedStores as createAttachedStores, 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 };
|
1098
1093
|
}
|
1099
1094
|
|
1100
1095
|
interface WriteQueueParams {
|
@@ -1291,6 +1286,7 @@ interface DocFileMeta {
|
|
1291
1286
|
readonly size: number;
|
1292
1287
|
readonly cid: AnyLink;
|
1293
1288
|
readonly car?: AnyLink;
|
1289
|
+
readonly lastModified?: number;
|
1294
1290
|
url?: string;
|
1295
1291
|
file?: () => Promise<File>;
|
1296
1292
|
}
|
@@ -1683,19 +1679,23 @@ declare class CRDTImpl implements CRDT {
|
|
1683
1679
|
compact(): Promise<void>;
|
1684
1680
|
}
|
1685
1681
|
|
1686
|
-
declare function getPath(url: URI, sthis: SuperThis
|
1687
|
-
declare function getFileName(url: URI, sthis: SuperThis
|
1682
|
+
declare function getPath(url: URI, sthis: SuperThis): string;
|
1683
|
+
declare function getFileName(url: URI, sthis: SuperThis): string;
|
1688
1684
|
|
1689
|
-
declare function encodeFile(blob:
|
1685
|
+
declare function encodeFile(blob: Blob): Promise<{
|
1690
1686
|
cid: AnyLink;
|
1691
1687
|
blocks: AnyBlock[];
|
1692
1688
|
}>;
|
1693
|
-
|
1689
|
+
interface BlockGetter {
|
1690
|
+
get(cid: AnyLink): Promise<Uint8Array>;
|
1691
|
+
}
|
1692
|
+
declare function decodeFile(blocks: unknown, cid: AnyLink, meta: DocFileMeta): Promise<Result<File>>;
|
1694
1693
|
|
1694
|
+
type files_BlockGetter = BlockGetter;
|
1695
1695
|
declare const files_decodeFile: typeof decodeFile;
|
1696
1696
|
declare const files_encodeFile: typeof encodeFile;
|
1697
1697
|
declare namespace files {
|
1698
|
-
export { files_decodeFile as decodeFile, files_encodeFile as encodeFile };
|
1698
|
+
export { type files_BlockGetter as BlockGetter, files_decodeFile as decodeFile, files_encodeFile as encodeFile };
|
1699
1699
|
}
|
1700
1700
|
|
1701
1701
|
declare class BlockIvKeyIdCodec implements AsyncBlockCodec<24, Uint8Array, IvKeyIdData> {
|
package/index.d.ts
CHANGED
@@ -1,11 +1,10 @@
|
|
1
|
-
import { Logger, Future,
|
1
|
+
import { Logger, Future, URI, CryptoRuntime, ResolveOnce, Result, ResolveSeq, CTCryptoKey, CoerceURI, LRUSet, Env, EnvFactoryOpts, runtimeFn } from '@adviser/cement';
|
2
2
|
import { EventLink } from '@fireproof/vendor/@web3-storage/pail/clock/api';
|
3
3
|
import { Operation } from '@fireproof/vendor/@web3-storage/pail/crdt/api';
|
4
4
|
import { Version, Block as Block$1, UnknownLink, CID, ByteView, ArrayBufferView, Link, MultihashHasher, BlockView } from 'multiformats';
|
5
5
|
import { BlockFetcher as BlockFetcher$1 } from '@fireproof/vendor/@web3-storage/pail/api';
|
6
6
|
import { EventBlock } from '@fireproof/vendor/@web3-storage/pail/clock';
|
7
7
|
import { ProllyNode as ProllyNode$1 } from 'prolly-trees/db-index';
|
8
|
-
import { SuperThis as SuperThis$1 } from '@fireproof/core';
|
9
8
|
import { Block as Block$2 } from 'multiformats/block';
|
10
9
|
|
11
10
|
type BlockFetcher = BlockFetcher$1;
|
@@ -521,11 +520,8 @@ interface CryptoAction {
|
|
521
520
|
_decrypt(data: IvAndKeyAndBytes): Promise<Uint8Array>;
|
522
521
|
_encrypt(data: BytesAndKeyWithIv): Promise<Uint8Array>;
|
523
522
|
}
|
524
|
-
interface BlobLike {
|
525
|
-
stream: () => ReadableStream;
|
526
|
-
}
|
527
523
|
interface StoreFactory {
|
528
|
-
encodeFile?: (blob:
|
524
|
+
encodeFile?: (blob: Blob) => Promise<{
|
529
525
|
cid: AnyLink;
|
530
526
|
blocks: AnyBlock[];
|
531
527
|
}>;
|
@@ -538,11 +534,11 @@ interface StoreUrls {
|
|
538
534
|
readonly wal: CoerceURI;
|
539
535
|
}
|
540
536
|
interface StoreEnDeFile {
|
541
|
-
readonly encodeFile: (blob:
|
537
|
+
readonly encodeFile: (blob: Blob) => Promise<{
|
542
538
|
cid: AnyLink;
|
543
539
|
blocks: AnyBlock[];
|
544
540
|
}>;
|
545
|
-
readonly decodeFile: (blocks: unknown, cid: AnyLink, meta: DocFileMeta) => Promise<File
|
541
|
+
readonly decodeFile: (blocks: unknown, cid: AnyLink, meta: DocFileMeta) => Promise<Result<File>>;
|
546
542
|
}
|
547
543
|
interface StoreUrlsOpts {
|
548
544
|
readonly base?: CoerceURI;
|
@@ -569,11 +565,11 @@ interface StoreFactoryItem {
|
|
569
565
|
}
|
570
566
|
interface StoreRuntime {
|
571
567
|
makeStores(sfi: StoreFactoryItem): Promise<DataAndMetaAndWalStore>;
|
572
|
-
encodeFile(blob:
|
568
|
+
encodeFile(blob: Blob): Promise<{
|
573
569
|
cid: AnyLink;
|
574
570
|
blocks: AnyBlock[];
|
575
571
|
}>;
|
576
|
-
decodeFile(blocks: unknown, cid: AnyLink, meta: DocFileMeta): Promise<File
|
572
|
+
decodeFile(blocks: unknown, cid: AnyLink, meta: DocFileMeta): Promise<Result<File>>;
|
577
573
|
}
|
578
574
|
interface CommitOpts {
|
579
575
|
readonly noLoader?: boolean;
|
@@ -951,7 +947,6 @@ type index$5_BaseAttachedStores = BaseAttachedStores;
|
|
951
947
|
type index$5_BaseBlockstoreImpl = BaseBlockstoreImpl;
|
952
948
|
declare const index$5_BaseBlockstoreImpl: typeof BaseBlockstoreImpl;
|
953
949
|
type index$5_BaseStore = BaseStore;
|
954
|
-
type index$5_BlobLike = BlobLike;
|
955
950
|
type index$5_BlockFetcher = BlockFetcher;
|
956
951
|
type index$5_BlockstoreOpts = BlockstoreOpts;
|
957
952
|
type index$5_BlockstoreParams = BlockstoreParams;
|
@@ -1094,7 +1089,7 @@ declare const index$5_registerStoreProtocol: typeof registerStoreProtocol;
|
|
1094
1089
|
declare const index$5_toCIDBlock: typeof toCIDBlock;
|
1095
1090
|
declare const index$5_toStoreRuntime: typeof toStoreRuntime;
|
1096
1091
|
declare namespace index$5 {
|
1097
|
-
export { type index$5_ActiveStore as ActiveStore, 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_AttachedRemotesImpl as AttachedRemotesImpl, type index$5_AttachedStores as AttachedStores, index$5_BaseActiveStore as BaseActiveStore, type index$5_BaseAttachedStores as BaseAttachedStores, index$5_BaseBlockstoreImpl as BaseBlockstoreImpl, type index$5_BaseStore as BaseStore, type index$
|
1092
|
+
export { type index$5_ActiveStore as ActiveStore, 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_AttachedRemotesImpl as AttachedRemotesImpl, type index$5_AttachedStores as AttachedStores, index$5_BaseActiveStore as BaseActiveStore, type index$5_BaseAttachedStores as BaseAttachedStores, index$5_BaseBlockstoreImpl as BaseBlockstoreImpl, type index$5_BaseStore as BaseStore, 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_BytesAndKeyWithIv as BytesAndKeyWithIv, type index$5_CIDActiveStore as CIDActiveStore, type index$5_CIDBlock as CIDBlock, index$5_Car2FPMsg as Car2FPMsg, index$5_CarActiveStore as CarActiveStore, type index$5_CarAttachedStores as CarAttachedStores, type index$5_CarCacheItem as CarCacheItem, type index$5_CarClockHead as CarClockHead, type index$5_CarClockLink as CarClockLink, type index$5_CarGroup as CarGroup, type index$5_CarHeader as CarHeader, index$5_CarLog as CarLog, type index$5_CarMakeable as CarMakeable, type index$5_CarStore as CarStore, 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, type index$5_CryptoAction as CryptoAction, type index$5_DataAndMetaAndWalStore as DataAndMetaAndWalStore, type index$5_DataAndMetaStore as DataAndMetaStore, type index$5_DataSaveOpts as DataSaveOpts, 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, type index$5_FPEnvelopeType as FPEnvelopeType, index$5_FPEnvelopeTypes as FPEnvelopeTypes, type index$5_FPEnvelopeWAL as FPEnvelopeWAL, type index$5_FPWALCarsOps as FPWALCarsOps, index$5_File2FPMsg as File2FPMsg, index$5_FileActiveStore as FileActiveStore, type index$5_FileAttachedStores as FileAttachedStores, type index$5_FileStore as FileStore, type index$5_FroozenCarLog as FroozenCarLog, 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_IvAndKeyAndBytes as IvAndKeyAndBytes, type index$5_IvKeyIdData as IvKeyIdData, type index$5_KeyMaterial as KeyMaterial, type index$5_KeyUpsertResult as KeyUpsertResult, type index$5_KeyWithFingerPrint as KeyWithFingerPrint, type index$5_KeysByFingerprint as KeysByFingerprint, type index$5_LoadHandler as LoadHandler, type index$5_Loadable as Loadable, index$5_Loader as Loader, type index$5_LocalActiveStore as LocalActiveStore, type index$5_LocalDataAndMetaAndWalStore as LocalDataAndMetaAndWalStore, index$5_MetaActiveStore as MetaActiveStore, type index$5_MetaAttachedStores as MetaAttachedStores, 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_SerdeGatewayCtx as SerdeGatewayCtx, 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, index$5_TaskManager as TaskManager, type index$5_TaskManagerParams as TaskManagerParams, type index$5_TransactionMeta as TransactionMeta, type index$5_TransactionWrapper as TransactionWrapper, type index$5_UnsubscribeResult as UnsubscribeResult, type index$5_UrlAndInterceptor as UrlAndInterceptor, type index$5_VoidResult as VoidResult, index$5_WALActiveStore as WALActiveStore, type index$5_WALAttachedStores as WALAttachedStores, type index$5_WALState as WALState, type index$5_WALStore as WALStore, type index$5_WriteableDataAndMetaAndWalStore as WriteableDataAndMetaAndWalStore, type index$5_WriteableDataAndMetaStore as WriteableDataAndMetaStore, index$5_createAttachedStores as createAttachedStores, 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 };
|
1098
1093
|
}
|
1099
1094
|
|
1100
1095
|
interface WriteQueueParams {
|
@@ -1291,6 +1286,7 @@ interface DocFileMeta {
|
|
1291
1286
|
readonly size: number;
|
1292
1287
|
readonly cid: AnyLink;
|
1293
1288
|
readonly car?: AnyLink;
|
1289
|
+
readonly lastModified?: number;
|
1294
1290
|
url?: string;
|
1295
1291
|
file?: () => Promise<File>;
|
1296
1292
|
}
|
@@ -1683,19 +1679,23 @@ declare class CRDTImpl implements CRDT {
|
|
1683
1679
|
compact(): Promise<void>;
|
1684
1680
|
}
|
1685
1681
|
|
1686
|
-
declare function getPath(url: URI, sthis: SuperThis
|
1687
|
-
declare function getFileName(url: URI, sthis: SuperThis
|
1682
|
+
declare function getPath(url: URI, sthis: SuperThis): string;
|
1683
|
+
declare function getFileName(url: URI, sthis: SuperThis): string;
|
1688
1684
|
|
1689
|
-
declare function encodeFile(blob:
|
1685
|
+
declare function encodeFile(blob: Blob): Promise<{
|
1690
1686
|
cid: AnyLink;
|
1691
1687
|
blocks: AnyBlock[];
|
1692
1688
|
}>;
|
1693
|
-
|
1689
|
+
interface BlockGetter {
|
1690
|
+
get(cid: AnyLink): Promise<Uint8Array>;
|
1691
|
+
}
|
1692
|
+
declare function decodeFile(blocks: unknown, cid: AnyLink, meta: DocFileMeta): Promise<Result<File>>;
|
1694
1693
|
|
1694
|
+
type files_BlockGetter = BlockGetter;
|
1695
1695
|
declare const files_decodeFile: typeof decodeFile;
|
1696
1696
|
declare const files_encodeFile: typeof encodeFile;
|
1697
1697
|
declare namespace files {
|
1698
|
-
export { files_decodeFile as decodeFile, files_encodeFile as encodeFile };
|
1698
|
+
export { type files_BlockGetter as BlockGetter, files_decodeFile as decodeFile, files_encodeFile as encodeFile };
|
1699
1699
|
}
|
1700
1700
|
|
1701
1701
|
declare class BlockIvKeyIdCodec implements AsyncBlockCodec<24, Uint8Array, IvKeyIdData> {
|