@fireproof/core 0.20.0-dev-preview-57 → 0.20.0-dev-preview-58
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 +2 -2
- package/index.cjs +36 -11
- package/index.cjs.map +1 -1
- package/index.d.cts +7 -4
- package/index.d.ts +7 -4
- package/index.js +36 -11
- package/index.js.map +1 -1
- package/metafile-cjs.json +1 -1
- package/metafile-esm.json +1 -1
- package/package.json +3 -3
- package/tests/setup.file.ts +1 -0
- package/tests/setup.indexeddb.ts +9 -0
- package/tests/setup.memory.ts +2 -0
- package/tests/vitest.file.config.ts +14 -0
- package/tests/vitest.indexeddb.config.ts +37 -0
- package/tests/vitest.memory.config.ts +25 -0
package/index.d.cts
CHANGED
@@ -227,6 +227,7 @@ declare function ensureURIDefaults(sthis: SuperThis, name: string, curi: CoerceU
|
|
227
227
|
readonly idx: boolean;
|
228
228
|
readonly file: boolean;
|
229
229
|
}>): URI;
|
230
|
+
declare function setPresetEnv(o: Record<string, string>, symbol?: string): Record<string, string>;
|
230
231
|
|
231
232
|
declare const FPEnvelopeTypes: {
|
232
233
|
readonly CAR: "car";
|
@@ -1249,7 +1250,7 @@ interface SuperThisOpts {
|
|
1249
1250
|
readonly logger: Logger;
|
1250
1251
|
readonly pathOps: PathOps;
|
1251
1252
|
readonly crypto: CryptoRuntime;
|
1252
|
-
readonly env: EnvFactoryOpts
|
1253
|
+
readonly env: Partial<EnvFactoryOpts>;
|
1253
1254
|
readonly txt: TextEndeCoder;
|
1254
1255
|
readonly ctx: Record<string, unknown>;
|
1255
1256
|
}
|
@@ -2132,7 +2133,7 @@ interface KeysResult {
|
|
2132
2133
|
declare class SessionTokenService {
|
2133
2134
|
#private;
|
2134
2135
|
static generateKeyPair(alg?: string, options?: GenerateKeyPairOptions, generateKeyPairFN?: (alg: string, options: GenerateKeyPairOptions) => Promise<jose.GenerateKeyPairResult>): Promise<KeysResult>;
|
2135
|
-
static createFromEnv(
|
2136
|
+
static createFromEnv(sthis: SuperThis, sp?: SessionTokenServiceFromEnvParam): Promise<SessionTokenService>;
|
2136
2137
|
static create(stsparam: SessionTokenServiceParam, sthis?: SuperThis): Promise<SessionTokenService>;
|
2137
2138
|
private constructor();
|
2138
2139
|
get validFor(): number;
|
@@ -2444,6 +2445,7 @@ declare class MsgRawConnectionBase {
|
|
2444
2445
|
}, msg: Partial<MsgBase>, err: Error): ErrorMsg;
|
2445
2446
|
}
|
2446
2447
|
|
2448
|
+
declare function ensurePath(uri: URI, fp: string): string;
|
2447
2449
|
declare class HttpConnection extends MsgRawConnectionBase implements MsgRawConnection {
|
2448
2450
|
#private;
|
2449
2451
|
readonly logger: Logger;
|
@@ -2715,6 +2717,7 @@ declare const index$1_buildResPutWAL: typeof buildResPutWAL;
|
|
2715
2717
|
declare const index$1_coerceFPStoreTypes: typeof coerceFPStoreTypes;
|
2716
2718
|
declare const index$1_defaultGestalt: typeof defaultGestalt;
|
2717
2719
|
declare const index$1_defaultMsgParams: typeof defaultMsgParams;
|
2720
|
+
declare const index$1_ensurePath: typeof ensurePath;
|
2718
2721
|
declare const index$1_isAuthTypeFPCloud: typeof isAuthTypeFPCloud;
|
2719
2722
|
declare const index$1_isAuthTypeFPCloudJWK: typeof isAuthTypeFPCloudJWK;
|
2720
2723
|
declare const index$1_isProtocolCapabilities: typeof isProtocolCapabilities;
|
@@ -2726,7 +2729,7 @@ declare const index$1_resAuth: typeof resAuth;
|
|
2726
2729
|
declare const index$1_selectRandom: typeof selectRandom;
|
2727
2730
|
declare const index$1_timeout: typeof timeout;
|
2728
2731
|
declare namespace index$1 {
|
2729
|
-
export { type index$1_ActiveStream as ActiveStream, type index$1_AuthFactory as AuthFactory, type index$1_AuthType as AuthType, type index$1_BaseTokenParam as BaseTokenParam, type index$1_BindGetMeta as BindGetMeta, type index$1_CalculatePreSignedUrl as CalculatePreSignedUrl, type index$1_ConnInfo as ConnInfo, type index$1_EnDeCoder as EnDeCoder, type index$1_ErrorMsg as ErrorMsg, type index$1_EventGetMeta as EventGetMeta, type index$1_ExchangedGestalt as ExchangedGestalt, type index$1_FPCloudAuthType as FPCloudAuthType, type index$1_FPCloudClaim as FPCloudClaim, type index$1_FPJWKCloudAuthType as FPJWKCloudAuthType, type index$1_FPStoreTypes as FPStoreTypes, type index$1_Gestalt as Gestalt, type index$1_GestaltParam as GestaltParam, type index$1_GwCtx as GwCtx, type index$1_GwCtxConn as GwCtxConn, index$1_HttpConnection as HttpConnection, type index$1_HttpMethods as HttpMethods, type index$1_MethodSignedUrlParam as MethodSignedUrlParam, type index$1_MsgBase as MsgBase, index$1_MsgConnected as MsgConnected, index$1_MsgConnectedAuth as MsgConnectedAuth, index$1_MsgIsBindGetMeta as MsgIsBindGetMeta, index$1_MsgIsConnected as MsgIsConnected, index$1_MsgIsError as MsgIsError, index$1_MsgIsEventGetMeta as MsgIsEventGetMeta, index$1_MsgIsQSError as MsgIsQSError, index$1_MsgIsReqChat as MsgIsReqChat, index$1_MsgIsReqClose as MsgIsReqClose, index$1_MsgIsReqDelData as MsgIsReqDelData, index$1_MsgIsReqDelMeta as MsgIsReqDelMeta, index$1_MsgIsReqDelWAL as MsgIsReqDelWAL, index$1_MsgIsReqGestalt as MsgIsReqGestalt, index$1_MsgIsReqGetData as MsgIsReqGetData, index$1_MsgIsReqGetWAL as MsgIsReqGetWAL, index$1_MsgIsReqOpen as MsgIsReqOpen, index$1_MsgIsReqPutData as MsgIsReqPutData, index$1_MsgIsReqPutMeta as MsgIsReqPutMeta, index$1_MsgIsReqPutWAL as MsgIsReqPutWAL, index$1_MsgIsResChat as MsgIsResChat, index$1_MsgIsResClose as MsgIsResClose, index$1_MsgIsResDelData as MsgIsResDelData, index$1_MsgIsResDelMeta as MsgIsResDelMeta, index$1_MsgIsResDelWAL as MsgIsResDelWAL, index$1_MsgIsResGestalt as MsgIsResGestalt, index$1_MsgIsResGetData as MsgIsResGetData, index$1_MsgIsResGetWAL as MsgIsResGetWAL, index$1_MsgIsResOpen as MsgIsResOpen, index$1_MsgIsResPutData as MsgIsResPutData, index$1_MsgIsResPutMeta as MsgIsResPutMeta, index$1_MsgIsResPutWAL as MsgIsResPutWAL, index$1_MsgIsTenantLedger as MsgIsTenantLedger, index$1_MsgIsTid as MsgIsTid, index$1_MsgIsWithConn as MsgIsWithConn, index$1_MsgIsWithConnAuth as MsgIsWithConnAuth, type index$1_MsgRawConnection as MsgRawConnection, index$1_MsgRawConnectionBase as MsgRawConnectionBase, type index$1_MsgTypesCtx as MsgTypesCtx, type index$1_MsgTypesCtxSync as MsgTypesCtxSync, type index$1_MsgWithConnAuth as MsgWithConnAuth, type index$1_MsgWithError as MsgWithError, type index$1_MsgWithTenantLedger as MsgWithTenantLedger, index$1_Msger as Msger, type index$1_MsgerParams as MsgerParams, type index$1_MsgerParamsWithEnDe as MsgerParamsWithEnDe, type index$1_NextId as NextId, type index$1_OnErrorFn as OnErrorFn, type index$1_OnMsgFn as OnMsgFn, type index$1_OpenParams as OpenParams, type index$1_PreSignedMsg as PreSignedMsg, type index$1_ProtocolCapabilities as ProtocolCapabilities, type index$1_QSId as QSId, type index$1_ReqChat as ReqChat, type index$1_ReqClose as ReqClose, type index$1_ReqDelData as ReqDelData, type index$1_ReqDelMeta as ReqDelMeta, type index$1_ReqDelWAL as ReqDelWAL, type index$1_ReqGestalt as ReqGestalt, type index$1_ReqGetData as ReqGetData, type index$1_ReqGetWAL as ReqGetWAL, type index$1_ReqOpen as ReqOpen, type index$1_ReqOpenConn as ReqOpenConn, type index$1_ReqOpenConnection as ReqOpenConnection, type index$1_ReqPutData as ReqPutData, type index$1_ReqPutMeta as ReqPutMeta, type index$1_ReqPutWAL as ReqPutWAL, type index$1_ReqRes as ReqRes, type index$1_ReqSignedUrl as ReqSignedUrl, type index$1_ReqSignedUrlParam as ReqSignedUrlParam, type index$1_ReqSignedUrlWithoutMethodParams as ReqSignedUrlWithoutMethodParams, type index$1_RequestOpts as RequestOpts, type index$1_ResChat as ResChat, type index$1_ResClose as ResClose, type index$1_ResDelData as ResDelData, type index$1_ResDelMeta as ResDelMeta, type index$1_ResDelWAL as ResDelWAL, type index$1_ResGestalt as ResGestalt, type index$1_ResGetData as ResGetData, type index$1_ResGetWAL as ResGetWAL, type index$1_ResOpen as ResOpen, type index$1_ResOptionalSignedUrl as ResOptionalSignedUrl, type index$1_ResPutData as ResPutData, type index$1_ResPutMeta as ResPutMeta, type index$1_ResPutWAL as ResPutWAL, type index$1_ResSignedUrl as ResSignedUrl, type index$1_SignedUrlParam as SignedUrlParam, type index$1_TenantLedger as TenantLedger, type index$1_TokenForParam as TokenForParam, type index$1_UCanAuth as UCanAuth, type index$1_UnReg as UnReg, type index$1_UpdateReqRes as UpdateReqRes, index$1_VERSION as VERSION, index$1_WSConnection as WSConnection, type index$1_WSReqOpen as WSReqOpen, type index$1_WaitForTid as WaitForTid, index$1_applyStart as applyStart, index$1_authTypeFromUri as authTypeFromUri, index$1_buildBindGetMeta as buildBindGetMeta, index$1_buildErrorMsg as buildErrorMsg, index$1_buildEventGetMeta as buildEventGetMeta, index$1_buildReqChat as buildReqChat, index$1_buildReqClose as buildReqClose, index$1_buildReqDelData as buildReqDelData, index$1_buildReqDelMeta as buildReqDelMeta, index$1_buildReqDelWAL as buildReqDelWAL, index$1_buildReqGestalt as buildReqGestalt, index$1_buildReqGetData as buildReqGetData, index$1_buildReqGetWAL as buildReqGetWAL, index$1_buildReqOpen as buildReqOpen, index$1_buildReqPutData as buildReqPutData, index$1_buildReqPutMeta as buildReqPutMeta, index$1_buildReqPutWAL as buildReqPutWAL, index$1_buildReqSignedUrl as buildReqSignedUrl, index$1_buildRes as buildRes, index$1_buildResChat as buildResChat, index$1_buildResClose as buildResClose, index$1_buildResDelData as buildResDelData, index$1_buildResDelMeta as buildResDelMeta, index$1_buildResDelWAL as buildResDelWAL, index$1_buildResGestalt as buildResGestalt, index$1_buildResGetData as buildResGetData, index$1_buildResGetWAL as buildResGetWAL, index$1_buildResOpen as buildResOpen, index$1_buildResPutData as buildResPutData, index$1_buildResPutMeta as buildResPutMeta, index$1_buildResPutWAL as buildResPutWAL, index$1_coerceFPStoreTypes as coerceFPStoreTypes, index$1_defaultGestalt as defaultGestalt, index$1_defaultMsgParams as defaultMsgParams, index$1_isAuthTypeFPCloud as isAuthTypeFPCloud, index$1_isAuthTypeFPCloudJWK as isAuthTypeFPCloudJWK, index$1_isProtocolCapabilities as isProtocolCapabilities, index$1_jsonEnDe as jsonEnDe, index$1_keyTenantLedger as keyTenantLedger, index$1_qsidEqual as qsidEqual, index$1_qsidKey as qsidKey, index$1_resAuth as resAuth, index$1_selectRandom as selectRandom, index$1_timeout as timeout };
|
2732
|
+
export { type index$1_ActiveStream as ActiveStream, type index$1_AuthFactory as AuthFactory, type index$1_AuthType as AuthType, type index$1_BaseTokenParam as BaseTokenParam, type index$1_BindGetMeta as BindGetMeta, type index$1_CalculatePreSignedUrl as CalculatePreSignedUrl, type index$1_ConnInfo as ConnInfo, type index$1_EnDeCoder as EnDeCoder, type index$1_ErrorMsg as ErrorMsg, type index$1_EventGetMeta as EventGetMeta, type index$1_ExchangedGestalt as ExchangedGestalt, type index$1_FPCloudAuthType as FPCloudAuthType, type index$1_FPCloudClaim as FPCloudClaim, type index$1_FPJWKCloudAuthType as FPJWKCloudAuthType, type index$1_FPStoreTypes as FPStoreTypes, type index$1_Gestalt as Gestalt, type index$1_GestaltParam as GestaltParam, type index$1_GwCtx as GwCtx, type index$1_GwCtxConn as GwCtxConn, index$1_HttpConnection as HttpConnection, type index$1_HttpMethods as HttpMethods, type index$1_MethodSignedUrlParam as MethodSignedUrlParam, type index$1_MsgBase as MsgBase, index$1_MsgConnected as MsgConnected, index$1_MsgConnectedAuth as MsgConnectedAuth, index$1_MsgIsBindGetMeta as MsgIsBindGetMeta, index$1_MsgIsConnected as MsgIsConnected, index$1_MsgIsError as MsgIsError, index$1_MsgIsEventGetMeta as MsgIsEventGetMeta, index$1_MsgIsQSError as MsgIsQSError, index$1_MsgIsReqChat as MsgIsReqChat, index$1_MsgIsReqClose as MsgIsReqClose, index$1_MsgIsReqDelData as MsgIsReqDelData, index$1_MsgIsReqDelMeta as MsgIsReqDelMeta, index$1_MsgIsReqDelWAL as MsgIsReqDelWAL, index$1_MsgIsReqGestalt as MsgIsReqGestalt, index$1_MsgIsReqGetData as MsgIsReqGetData, index$1_MsgIsReqGetWAL as MsgIsReqGetWAL, index$1_MsgIsReqOpen as MsgIsReqOpen, index$1_MsgIsReqPutData as MsgIsReqPutData, index$1_MsgIsReqPutMeta as MsgIsReqPutMeta, index$1_MsgIsReqPutWAL as MsgIsReqPutWAL, index$1_MsgIsResChat as MsgIsResChat, index$1_MsgIsResClose as MsgIsResClose, index$1_MsgIsResDelData as MsgIsResDelData, index$1_MsgIsResDelMeta as MsgIsResDelMeta, index$1_MsgIsResDelWAL as MsgIsResDelWAL, index$1_MsgIsResGestalt as MsgIsResGestalt, index$1_MsgIsResGetData as MsgIsResGetData, index$1_MsgIsResGetWAL as MsgIsResGetWAL, index$1_MsgIsResOpen as MsgIsResOpen, index$1_MsgIsResPutData as MsgIsResPutData, index$1_MsgIsResPutMeta as MsgIsResPutMeta, index$1_MsgIsResPutWAL as MsgIsResPutWAL, index$1_MsgIsTenantLedger as MsgIsTenantLedger, index$1_MsgIsTid as MsgIsTid, index$1_MsgIsWithConn as MsgIsWithConn, index$1_MsgIsWithConnAuth as MsgIsWithConnAuth, type index$1_MsgRawConnection as MsgRawConnection, index$1_MsgRawConnectionBase as MsgRawConnectionBase, type index$1_MsgTypesCtx as MsgTypesCtx, type index$1_MsgTypesCtxSync as MsgTypesCtxSync, type index$1_MsgWithConnAuth as MsgWithConnAuth, type index$1_MsgWithError as MsgWithError, type index$1_MsgWithTenantLedger as MsgWithTenantLedger, index$1_Msger as Msger, type index$1_MsgerParams as MsgerParams, type index$1_MsgerParamsWithEnDe as MsgerParamsWithEnDe, type index$1_NextId as NextId, type index$1_OnErrorFn as OnErrorFn, type index$1_OnMsgFn as OnMsgFn, type index$1_OpenParams as OpenParams, type index$1_PreSignedMsg as PreSignedMsg, type index$1_ProtocolCapabilities as ProtocolCapabilities, type index$1_QSId as QSId, type index$1_ReqChat as ReqChat, type index$1_ReqClose as ReqClose, type index$1_ReqDelData as ReqDelData, type index$1_ReqDelMeta as ReqDelMeta, type index$1_ReqDelWAL as ReqDelWAL, type index$1_ReqGestalt as ReqGestalt, type index$1_ReqGetData as ReqGetData, type index$1_ReqGetWAL as ReqGetWAL, type index$1_ReqOpen as ReqOpen, type index$1_ReqOpenConn as ReqOpenConn, type index$1_ReqOpenConnection as ReqOpenConnection, type index$1_ReqPutData as ReqPutData, type index$1_ReqPutMeta as ReqPutMeta, type index$1_ReqPutWAL as ReqPutWAL, type index$1_ReqRes as ReqRes, type index$1_ReqSignedUrl as ReqSignedUrl, type index$1_ReqSignedUrlParam as ReqSignedUrlParam, type index$1_ReqSignedUrlWithoutMethodParams as ReqSignedUrlWithoutMethodParams, type index$1_RequestOpts as RequestOpts, type index$1_ResChat as ResChat, type index$1_ResClose as ResClose, type index$1_ResDelData as ResDelData, type index$1_ResDelMeta as ResDelMeta, type index$1_ResDelWAL as ResDelWAL, type index$1_ResGestalt as ResGestalt, type index$1_ResGetData as ResGetData, type index$1_ResGetWAL as ResGetWAL, type index$1_ResOpen as ResOpen, type index$1_ResOptionalSignedUrl as ResOptionalSignedUrl, type index$1_ResPutData as ResPutData, type index$1_ResPutMeta as ResPutMeta, type index$1_ResPutWAL as ResPutWAL, type index$1_ResSignedUrl as ResSignedUrl, type index$1_SignedUrlParam as SignedUrlParam, type index$1_TenantLedger as TenantLedger, type index$1_TokenForParam as TokenForParam, type index$1_UCanAuth as UCanAuth, type index$1_UnReg as UnReg, type index$1_UpdateReqRes as UpdateReqRes, index$1_VERSION as VERSION, index$1_WSConnection as WSConnection, type index$1_WSReqOpen as WSReqOpen, type index$1_WaitForTid as WaitForTid, index$1_applyStart as applyStart, index$1_authTypeFromUri as authTypeFromUri, index$1_buildBindGetMeta as buildBindGetMeta, index$1_buildErrorMsg as buildErrorMsg, index$1_buildEventGetMeta as buildEventGetMeta, index$1_buildReqChat as buildReqChat, index$1_buildReqClose as buildReqClose, index$1_buildReqDelData as buildReqDelData, index$1_buildReqDelMeta as buildReqDelMeta, index$1_buildReqDelWAL as buildReqDelWAL, index$1_buildReqGestalt as buildReqGestalt, index$1_buildReqGetData as buildReqGetData, index$1_buildReqGetWAL as buildReqGetWAL, index$1_buildReqOpen as buildReqOpen, index$1_buildReqPutData as buildReqPutData, index$1_buildReqPutMeta as buildReqPutMeta, index$1_buildReqPutWAL as buildReqPutWAL, index$1_buildReqSignedUrl as buildReqSignedUrl, index$1_buildRes as buildRes, index$1_buildResChat as buildResChat, index$1_buildResClose as buildResClose, index$1_buildResDelData as buildResDelData, index$1_buildResDelMeta as buildResDelMeta, index$1_buildResDelWAL as buildResDelWAL, index$1_buildResGestalt as buildResGestalt, index$1_buildResGetData as buildResGetData, index$1_buildResGetWAL as buildResGetWAL, index$1_buildResOpen as buildResOpen, index$1_buildResPutData as buildResPutData, index$1_buildResPutMeta as buildResPutMeta, index$1_buildResPutWAL as buildResPutWAL, index$1_coerceFPStoreTypes as coerceFPStoreTypes, index$1_defaultGestalt as defaultGestalt, index$1_defaultMsgParams as defaultMsgParams, index$1_ensurePath as ensurePath, index$1_isAuthTypeFPCloud as isAuthTypeFPCloud, index$1_isAuthTypeFPCloudJWK as isAuthTypeFPCloudJWK, index$1_isProtocolCapabilities as isProtocolCapabilities, index$1_jsonEnDe as jsonEnDe, index$1_keyTenantLedger as keyTenantLedger, index$1_qsidEqual as qsidEqual, index$1_qsidKey as qsidKey, index$1_resAuth as resAuth, index$1_selectRandom as selectRandom, index$1_timeout as timeout };
|
2730
2733
|
}
|
2731
2734
|
|
2732
2735
|
declare namespace index {
|
@@ -2735,5 +2738,5 @@ declare namespace index {
|
|
2735
2738
|
|
2736
2739
|
declare const PACKAGE_VERSION: string;
|
2737
2740
|
|
2738
|
-
export { type AllDocsQueryOpts, type AllDocsResponse, type Attachable, type Attached, type BaseBlockstore, type BulkResponse, type CRDT, type CRDTClock, type CRDTEntry, CRDTImpl, type CRDTMeta, type CarTransaction, type ChangesOptions, type ChangesResponse, type ChangesResponseRow, type ClockHead, type ClockLink, type CoerceURIandInterceptor, type ConfigOpts, DataAndMetaAndWalAndBaseStore, type Database, DatabaseImpl, type DbMeta, type DocBase, type DocFileMeta, type DocFiles, type DocFragment, type DocLiteral, type DocObject, type DocRecord, type DocResponse, type DocSet, type DocTypes, type DocUpdate, type DocValue, type DocWithId, type FPStats, type Falsy, type FileTransactionMeta, type GatewayUrls, type GatewayUrlsParam, type HasCRDT, type HasLogger, type HasSuperThis, type IdxMeta, type IdxMetaMap, Index, type IndexKey, type IndexKeyType, type IndexRow, type IndexRows, type IndexTransactionMeta, type IndexUpdate, type IndexUpdateString, type Joiner, type KeyLiteral, type Ledger, LedgerFactory, type LedgerOpts, LedgerShell, type ListenerFn, type MapFn, type MetaType, type NoUpdateListenerFn, NotFoundError, PACKAGE_VERSION, PARAM, type PARAMS, type PathOps, type PromiseToUInt8, type QueryOpts, type ReadyCloseDestroy, type RefLedger, type Store, type StoreType, type SuperThis, type SuperThisOpts, type SysFileSystem, type TextEndeCoder, type ToUInt8, UInt8ArrayEqual, type UnReg$1 as UnReg, type UnknownDoc, type Unreg, type UpdateListenerFn, type VoidFn, type WriteQueue, index$8 as blockstore, index$8 as bs, coerceIntoUint8, coercePromiseIntoUint8, defaultWriteQueueOpts, ensureLogger, ensureSuperLog, ensureSuperThis, ensureURIDefaults, exceptionWrapper, falsyToUndef, fireproof, getKey, getName, getStore, index$7 as index, inplaceFilter, isDatabase, isFalsy, isLedger, isNotFoundError, keyConfigOpts, makeName, onSuperThis, index as protocols, index as ps, index$2 as rt, index$2 as runtime, storeType2DataMetaWal, throwFalsy, toSortedArray, toStoreURIRuntime };
|
2741
|
+
export { type AllDocsQueryOpts, type AllDocsResponse, type Attachable, type Attached, type BaseBlockstore, type BulkResponse, type CRDT, type CRDTClock, type CRDTEntry, CRDTImpl, type CRDTMeta, type CarTransaction, type ChangesOptions, type ChangesResponse, type ChangesResponseRow, type ClockHead, type ClockLink, type CoerceURIandInterceptor, type ConfigOpts, DataAndMetaAndWalAndBaseStore, type Database, DatabaseImpl, type DbMeta, type DocBase, type DocFileMeta, type DocFiles, type DocFragment, type DocLiteral, type DocObject, type DocRecord, type DocResponse, type DocSet, type DocTypes, type DocUpdate, type DocValue, type DocWithId, type FPStats, type Falsy, type FileTransactionMeta, type GatewayUrls, type GatewayUrlsParam, type HasCRDT, type HasLogger, type HasSuperThis, type IdxMeta, type IdxMetaMap, Index, type IndexKey, type IndexKeyType, type IndexRow, type IndexRows, type IndexTransactionMeta, type IndexUpdate, type IndexUpdateString, type Joiner, type KeyLiteral, type Ledger, LedgerFactory, type LedgerOpts, LedgerShell, type ListenerFn, type MapFn, type MetaType, type NoUpdateListenerFn, NotFoundError, PACKAGE_VERSION, PARAM, type PARAMS, type PathOps, type PromiseToUInt8, type QueryOpts, type ReadyCloseDestroy, type RefLedger, type Store, type StoreType, type SuperThis, type SuperThisOpts, type SysFileSystem, type TextEndeCoder, type ToUInt8, UInt8ArrayEqual, type UnReg$1 as UnReg, type UnknownDoc, type Unreg, type UpdateListenerFn, type VoidFn, type WriteQueue, index$8 as blockstore, index$8 as bs, coerceIntoUint8, coercePromiseIntoUint8, defaultWriteQueueOpts, ensureLogger, ensureSuperLog, ensureSuperThis, ensureURIDefaults, exceptionWrapper, falsyToUndef, fireproof, getKey, getName, getStore, index$7 as index, inplaceFilter, isDatabase, isFalsy, isLedger, isNotFoundError, keyConfigOpts, makeName, onSuperThis, index as protocols, index as ps, index$2 as rt, index$2 as runtime, setPresetEnv, storeType2DataMetaWal, throwFalsy, toSortedArray, toStoreURIRuntime };
|
2739
2742
|
declare module '@fireproof/core'
|
package/index.d.ts
CHANGED
@@ -227,6 +227,7 @@ declare function ensureURIDefaults(sthis: SuperThis, name: string, curi: CoerceU
|
|
227
227
|
readonly idx: boolean;
|
228
228
|
readonly file: boolean;
|
229
229
|
}>): URI;
|
230
|
+
declare function setPresetEnv(o: Record<string, string>, symbol?: string): Record<string, string>;
|
230
231
|
|
231
232
|
declare const FPEnvelopeTypes: {
|
232
233
|
readonly CAR: "car";
|
@@ -1249,7 +1250,7 @@ interface SuperThisOpts {
|
|
1249
1250
|
readonly logger: Logger;
|
1250
1251
|
readonly pathOps: PathOps;
|
1251
1252
|
readonly crypto: CryptoRuntime;
|
1252
|
-
readonly env: EnvFactoryOpts
|
1253
|
+
readonly env: Partial<EnvFactoryOpts>;
|
1253
1254
|
readonly txt: TextEndeCoder;
|
1254
1255
|
readonly ctx: Record<string, unknown>;
|
1255
1256
|
}
|
@@ -2132,7 +2133,7 @@ interface KeysResult {
|
|
2132
2133
|
declare class SessionTokenService {
|
2133
2134
|
#private;
|
2134
2135
|
static generateKeyPair(alg?: string, options?: GenerateKeyPairOptions, generateKeyPairFN?: (alg: string, options: GenerateKeyPairOptions) => Promise<jose.GenerateKeyPairResult>): Promise<KeysResult>;
|
2135
|
-
static createFromEnv(
|
2136
|
+
static createFromEnv(sthis: SuperThis, sp?: SessionTokenServiceFromEnvParam): Promise<SessionTokenService>;
|
2136
2137
|
static create(stsparam: SessionTokenServiceParam, sthis?: SuperThis): Promise<SessionTokenService>;
|
2137
2138
|
private constructor();
|
2138
2139
|
get validFor(): number;
|
@@ -2444,6 +2445,7 @@ declare class MsgRawConnectionBase {
|
|
2444
2445
|
}, msg: Partial<MsgBase>, err: Error): ErrorMsg;
|
2445
2446
|
}
|
2446
2447
|
|
2448
|
+
declare function ensurePath(uri: URI, fp: string): string;
|
2447
2449
|
declare class HttpConnection extends MsgRawConnectionBase implements MsgRawConnection {
|
2448
2450
|
#private;
|
2449
2451
|
readonly logger: Logger;
|
@@ -2715,6 +2717,7 @@ declare const index$1_buildResPutWAL: typeof buildResPutWAL;
|
|
2715
2717
|
declare const index$1_coerceFPStoreTypes: typeof coerceFPStoreTypes;
|
2716
2718
|
declare const index$1_defaultGestalt: typeof defaultGestalt;
|
2717
2719
|
declare const index$1_defaultMsgParams: typeof defaultMsgParams;
|
2720
|
+
declare const index$1_ensurePath: typeof ensurePath;
|
2718
2721
|
declare const index$1_isAuthTypeFPCloud: typeof isAuthTypeFPCloud;
|
2719
2722
|
declare const index$1_isAuthTypeFPCloudJWK: typeof isAuthTypeFPCloudJWK;
|
2720
2723
|
declare const index$1_isProtocolCapabilities: typeof isProtocolCapabilities;
|
@@ -2726,7 +2729,7 @@ declare const index$1_resAuth: typeof resAuth;
|
|
2726
2729
|
declare const index$1_selectRandom: typeof selectRandom;
|
2727
2730
|
declare const index$1_timeout: typeof timeout;
|
2728
2731
|
declare namespace index$1 {
|
2729
|
-
export { type index$1_ActiveStream as ActiveStream, type index$1_AuthFactory as AuthFactory, type index$1_AuthType as AuthType, type index$1_BaseTokenParam as BaseTokenParam, type index$1_BindGetMeta as BindGetMeta, type index$1_CalculatePreSignedUrl as CalculatePreSignedUrl, type index$1_ConnInfo as ConnInfo, type index$1_EnDeCoder as EnDeCoder, type index$1_ErrorMsg as ErrorMsg, type index$1_EventGetMeta as EventGetMeta, type index$1_ExchangedGestalt as ExchangedGestalt, type index$1_FPCloudAuthType as FPCloudAuthType, type index$1_FPCloudClaim as FPCloudClaim, type index$1_FPJWKCloudAuthType as FPJWKCloudAuthType, type index$1_FPStoreTypes as FPStoreTypes, type index$1_Gestalt as Gestalt, type index$1_GestaltParam as GestaltParam, type index$1_GwCtx as GwCtx, type index$1_GwCtxConn as GwCtxConn, index$1_HttpConnection as HttpConnection, type index$1_HttpMethods as HttpMethods, type index$1_MethodSignedUrlParam as MethodSignedUrlParam, type index$1_MsgBase as MsgBase, index$1_MsgConnected as MsgConnected, index$1_MsgConnectedAuth as MsgConnectedAuth, index$1_MsgIsBindGetMeta as MsgIsBindGetMeta, index$1_MsgIsConnected as MsgIsConnected, index$1_MsgIsError as MsgIsError, index$1_MsgIsEventGetMeta as MsgIsEventGetMeta, index$1_MsgIsQSError as MsgIsQSError, index$1_MsgIsReqChat as MsgIsReqChat, index$1_MsgIsReqClose as MsgIsReqClose, index$1_MsgIsReqDelData as MsgIsReqDelData, index$1_MsgIsReqDelMeta as MsgIsReqDelMeta, index$1_MsgIsReqDelWAL as MsgIsReqDelWAL, index$1_MsgIsReqGestalt as MsgIsReqGestalt, index$1_MsgIsReqGetData as MsgIsReqGetData, index$1_MsgIsReqGetWAL as MsgIsReqGetWAL, index$1_MsgIsReqOpen as MsgIsReqOpen, index$1_MsgIsReqPutData as MsgIsReqPutData, index$1_MsgIsReqPutMeta as MsgIsReqPutMeta, index$1_MsgIsReqPutWAL as MsgIsReqPutWAL, index$1_MsgIsResChat as MsgIsResChat, index$1_MsgIsResClose as MsgIsResClose, index$1_MsgIsResDelData as MsgIsResDelData, index$1_MsgIsResDelMeta as MsgIsResDelMeta, index$1_MsgIsResDelWAL as MsgIsResDelWAL, index$1_MsgIsResGestalt as MsgIsResGestalt, index$1_MsgIsResGetData as MsgIsResGetData, index$1_MsgIsResGetWAL as MsgIsResGetWAL, index$1_MsgIsResOpen as MsgIsResOpen, index$1_MsgIsResPutData as MsgIsResPutData, index$1_MsgIsResPutMeta as MsgIsResPutMeta, index$1_MsgIsResPutWAL as MsgIsResPutWAL, index$1_MsgIsTenantLedger as MsgIsTenantLedger, index$1_MsgIsTid as MsgIsTid, index$1_MsgIsWithConn as MsgIsWithConn, index$1_MsgIsWithConnAuth as MsgIsWithConnAuth, type index$1_MsgRawConnection as MsgRawConnection, index$1_MsgRawConnectionBase as MsgRawConnectionBase, type index$1_MsgTypesCtx as MsgTypesCtx, type index$1_MsgTypesCtxSync as MsgTypesCtxSync, type index$1_MsgWithConnAuth as MsgWithConnAuth, type index$1_MsgWithError as MsgWithError, type index$1_MsgWithTenantLedger as MsgWithTenantLedger, index$1_Msger as Msger, type index$1_MsgerParams as MsgerParams, type index$1_MsgerParamsWithEnDe as MsgerParamsWithEnDe, type index$1_NextId as NextId, type index$1_OnErrorFn as OnErrorFn, type index$1_OnMsgFn as OnMsgFn, type index$1_OpenParams as OpenParams, type index$1_PreSignedMsg as PreSignedMsg, type index$1_ProtocolCapabilities as ProtocolCapabilities, type index$1_QSId as QSId, type index$1_ReqChat as ReqChat, type index$1_ReqClose as ReqClose, type index$1_ReqDelData as ReqDelData, type index$1_ReqDelMeta as ReqDelMeta, type index$1_ReqDelWAL as ReqDelWAL, type index$1_ReqGestalt as ReqGestalt, type index$1_ReqGetData as ReqGetData, type index$1_ReqGetWAL as ReqGetWAL, type index$1_ReqOpen as ReqOpen, type index$1_ReqOpenConn as ReqOpenConn, type index$1_ReqOpenConnection as ReqOpenConnection, type index$1_ReqPutData as ReqPutData, type index$1_ReqPutMeta as ReqPutMeta, type index$1_ReqPutWAL as ReqPutWAL, type index$1_ReqRes as ReqRes, type index$1_ReqSignedUrl as ReqSignedUrl, type index$1_ReqSignedUrlParam as ReqSignedUrlParam, type index$1_ReqSignedUrlWithoutMethodParams as ReqSignedUrlWithoutMethodParams, type index$1_RequestOpts as RequestOpts, type index$1_ResChat as ResChat, type index$1_ResClose as ResClose, type index$1_ResDelData as ResDelData, type index$1_ResDelMeta as ResDelMeta, type index$1_ResDelWAL as ResDelWAL, type index$1_ResGestalt as ResGestalt, type index$1_ResGetData as ResGetData, type index$1_ResGetWAL as ResGetWAL, type index$1_ResOpen as ResOpen, type index$1_ResOptionalSignedUrl as ResOptionalSignedUrl, type index$1_ResPutData as ResPutData, type index$1_ResPutMeta as ResPutMeta, type index$1_ResPutWAL as ResPutWAL, type index$1_ResSignedUrl as ResSignedUrl, type index$1_SignedUrlParam as SignedUrlParam, type index$1_TenantLedger as TenantLedger, type index$1_TokenForParam as TokenForParam, type index$1_UCanAuth as UCanAuth, type index$1_UnReg as UnReg, type index$1_UpdateReqRes as UpdateReqRes, index$1_VERSION as VERSION, index$1_WSConnection as WSConnection, type index$1_WSReqOpen as WSReqOpen, type index$1_WaitForTid as WaitForTid, index$1_applyStart as applyStart, index$1_authTypeFromUri as authTypeFromUri, index$1_buildBindGetMeta as buildBindGetMeta, index$1_buildErrorMsg as buildErrorMsg, index$1_buildEventGetMeta as buildEventGetMeta, index$1_buildReqChat as buildReqChat, index$1_buildReqClose as buildReqClose, index$1_buildReqDelData as buildReqDelData, index$1_buildReqDelMeta as buildReqDelMeta, index$1_buildReqDelWAL as buildReqDelWAL, index$1_buildReqGestalt as buildReqGestalt, index$1_buildReqGetData as buildReqGetData, index$1_buildReqGetWAL as buildReqGetWAL, index$1_buildReqOpen as buildReqOpen, index$1_buildReqPutData as buildReqPutData, index$1_buildReqPutMeta as buildReqPutMeta, index$1_buildReqPutWAL as buildReqPutWAL, index$1_buildReqSignedUrl as buildReqSignedUrl, index$1_buildRes as buildRes, index$1_buildResChat as buildResChat, index$1_buildResClose as buildResClose, index$1_buildResDelData as buildResDelData, index$1_buildResDelMeta as buildResDelMeta, index$1_buildResDelWAL as buildResDelWAL, index$1_buildResGestalt as buildResGestalt, index$1_buildResGetData as buildResGetData, index$1_buildResGetWAL as buildResGetWAL, index$1_buildResOpen as buildResOpen, index$1_buildResPutData as buildResPutData, index$1_buildResPutMeta as buildResPutMeta, index$1_buildResPutWAL as buildResPutWAL, index$1_coerceFPStoreTypes as coerceFPStoreTypes, index$1_defaultGestalt as defaultGestalt, index$1_defaultMsgParams as defaultMsgParams, index$1_isAuthTypeFPCloud as isAuthTypeFPCloud, index$1_isAuthTypeFPCloudJWK as isAuthTypeFPCloudJWK, index$1_isProtocolCapabilities as isProtocolCapabilities, index$1_jsonEnDe as jsonEnDe, index$1_keyTenantLedger as keyTenantLedger, index$1_qsidEqual as qsidEqual, index$1_qsidKey as qsidKey, index$1_resAuth as resAuth, index$1_selectRandom as selectRandom, index$1_timeout as timeout };
|
2732
|
+
export { type index$1_ActiveStream as ActiveStream, type index$1_AuthFactory as AuthFactory, type index$1_AuthType as AuthType, type index$1_BaseTokenParam as BaseTokenParam, type index$1_BindGetMeta as BindGetMeta, type index$1_CalculatePreSignedUrl as CalculatePreSignedUrl, type index$1_ConnInfo as ConnInfo, type index$1_EnDeCoder as EnDeCoder, type index$1_ErrorMsg as ErrorMsg, type index$1_EventGetMeta as EventGetMeta, type index$1_ExchangedGestalt as ExchangedGestalt, type index$1_FPCloudAuthType as FPCloudAuthType, type index$1_FPCloudClaim as FPCloudClaim, type index$1_FPJWKCloudAuthType as FPJWKCloudAuthType, type index$1_FPStoreTypes as FPStoreTypes, type index$1_Gestalt as Gestalt, type index$1_GestaltParam as GestaltParam, type index$1_GwCtx as GwCtx, type index$1_GwCtxConn as GwCtxConn, index$1_HttpConnection as HttpConnection, type index$1_HttpMethods as HttpMethods, type index$1_MethodSignedUrlParam as MethodSignedUrlParam, type index$1_MsgBase as MsgBase, index$1_MsgConnected as MsgConnected, index$1_MsgConnectedAuth as MsgConnectedAuth, index$1_MsgIsBindGetMeta as MsgIsBindGetMeta, index$1_MsgIsConnected as MsgIsConnected, index$1_MsgIsError as MsgIsError, index$1_MsgIsEventGetMeta as MsgIsEventGetMeta, index$1_MsgIsQSError as MsgIsQSError, index$1_MsgIsReqChat as MsgIsReqChat, index$1_MsgIsReqClose as MsgIsReqClose, index$1_MsgIsReqDelData as MsgIsReqDelData, index$1_MsgIsReqDelMeta as MsgIsReqDelMeta, index$1_MsgIsReqDelWAL as MsgIsReqDelWAL, index$1_MsgIsReqGestalt as MsgIsReqGestalt, index$1_MsgIsReqGetData as MsgIsReqGetData, index$1_MsgIsReqGetWAL as MsgIsReqGetWAL, index$1_MsgIsReqOpen as MsgIsReqOpen, index$1_MsgIsReqPutData as MsgIsReqPutData, index$1_MsgIsReqPutMeta as MsgIsReqPutMeta, index$1_MsgIsReqPutWAL as MsgIsReqPutWAL, index$1_MsgIsResChat as MsgIsResChat, index$1_MsgIsResClose as MsgIsResClose, index$1_MsgIsResDelData as MsgIsResDelData, index$1_MsgIsResDelMeta as MsgIsResDelMeta, index$1_MsgIsResDelWAL as MsgIsResDelWAL, index$1_MsgIsResGestalt as MsgIsResGestalt, index$1_MsgIsResGetData as MsgIsResGetData, index$1_MsgIsResGetWAL as MsgIsResGetWAL, index$1_MsgIsResOpen as MsgIsResOpen, index$1_MsgIsResPutData as MsgIsResPutData, index$1_MsgIsResPutMeta as MsgIsResPutMeta, index$1_MsgIsResPutWAL as MsgIsResPutWAL, index$1_MsgIsTenantLedger as MsgIsTenantLedger, index$1_MsgIsTid as MsgIsTid, index$1_MsgIsWithConn as MsgIsWithConn, index$1_MsgIsWithConnAuth as MsgIsWithConnAuth, type index$1_MsgRawConnection as MsgRawConnection, index$1_MsgRawConnectionBase as MsgRawConnectionBase, type index$1_MsgTypesCtx as MsgTypesCtx, type index$1_MsgTypesCtxSync as MsgTypesCtxSync, type index$1_MsgWithConnAuth as MsgWithConnAuth, type index$1_MsgWithError as MsgWithError, type index$1_MsgWithTenantLedger as MsgWithTenantLedger, index$1_Msger as Msger, type index$1_MsgerParams as MsgerParams, type index$1_MsgerParamsWithEnDe as MsgerParamsWithEnDe, type index$1_NextId as NextId, type index$1_OnErrorFn as OnErrorFn, type index$1_OnMsgFn as OnMsgFn, type index$1_OpenParams as OpenParams, type index$1_PreSignedMsg as PreSignedMsg, type index$1_ProtocolCapabilities as ProtocolCapabilities, type index$1_QSId as QSId, type index$1_ReqChat as ReqChat, type index$1_ReqClose as ReqClose, type index$1_ReqDelData as ReqDelData, type index$1_ReqDelMeta as ReqDelMeta, type index$1_ReqDelWAL as ReqDelWAL, type index$1_ReqGestalt as ReqGestalt, type index$1_ReqGetData as ReqGetData, type index$1_ReqGetWAL as ReqGetWAL, type index$1_ReqOpen as ReqOpen, type index$1_ReqOpenConn as ReqOpenConn, type index$1_ReqOpenConnection as ReqOpenConnection, type index$1_ReqPutData as ReqPutData, type index$1_ReqPutMeta as ReqPutMeta, type index$1_ReqPutWAL as ReqPutWAL, type index$1_ReqRes as ReqRes, type index$1_ReqSignedUrl as ReqSignedUrl, type index$1_ReqSignedUrlParam as ReqSignedUrlParam, type index$1_ReqSignedUrlWithoutMethodParams as ReqSignedUrlWithoutMethodParams, type index$1_RequestOpts as RequestOpts, type index$1_ResChat as ResChat, type index$1_ResClose as ResClose, type index$1_ResDelData as ResDelData, type index$1_ResDelMeta as ResDelMeta, type index$1_ResDelWAL as ResDelWAL, type index$1_ResGestalt as ResGestalt, type index$1_ResGetData as ResGetData, type index$1_ResGetWAL as ResGetWAL, type index$1_ResOpen as ResOpen, type index$1_ResOptionalSignedUrl as ResOptionalSignedUrl, type index$1_ResPutData as ResPutData, type index$1_ResPutMeta as ResPutMeta, type index$1_ResPutWAL as ResPutWAL, type index$1_ResSignedUrl as ResSignedUrl, type index$1_SignedUrlParam as SignedUrlParam, type index$1_TenantLedger as TenantLedger, type index$1_TokenForParam as TokenForParam, type index$1_UCanAuth as UCanAuth, type index$1_UnReg as UnReg, type index$1_UpdateReqRes as UpdateReqRes, index$1_VERSION as VERSION, index$1_WSConnection as WSConnection, type index$1_WSReqOpen as WSReqOpen, type index$1_WaitForTid as WaitForTid, index$1_applyStart as applyStart, index$1_authTypeFromUri as authTypeFromUri, index$1_buildBindGetMeta as buildBindGetMeta, index$1_buildErrorMsg as buildErrorMsg, index$1_buildEventGetMeta as buildEventGetMeta, index$1_buildReqChat as buildReqChat, index$1_buildReqClose as buildReqClose, index$1_buildReqDelData as buildReqDelData, index$1_buildReqDelMeta as buildReqDelMeta, index$1_buildReqDelWAL as buildReqDelWAL, index$1_buildReqGestalt as buildReqGestalt, index$1_buildReqGetData as buildReqGetData, index$1_buildReqGetWAL as buildReqGetWAL, index$1_buildReqOpen as buildReqOpen, index$1_buildReqPutData as buildReqPutData, index$1_buildReqPutMeta as buildReqPutMeta, index$1_buildReqPutWAL as buildReqPutWAL, index$1_buildReqSignedUrl as buildReqSignedUrl, index$1_buildRes as buildRes, index$1_buildResChat as buildResChat, index$1_buildResClose as buildResClose, index$1_buildResDelData as buildResDelData, index$1_buildResDelMeta as buildResDelMeta, index$1_buildResDelWAL as buildResDelWAL, index$1_buildResGestalt as buildResGestalt, index$1_buildResGetData as buildResGetData, index$1_buildResGetWAL as buildResGetWAL, index$1_buildResOpen as buildResOpen, index$1_buildResPutData as buildResPutData, index$1_buildResPutMeta as buildResPutMeta, index$1_buildResPutWAL as buildResPutWAL, index$1_coerceFPStoreTypes as coerceFPStoreTypes, index$1_defaultGestalt as defaultGestalt, index$1_defaultMsgParams as defaultMsgParams, index$1_ensurePath as ensurePath, index$1_isAuthTypeFPCloud as isAuthTypeFPCloud, index$1_isAuthTypeFPCloudJWK as isAuthTypeFPCloudJWK, index$1_isProtocolCapabilities as isProtocolCapabilities, index$1_jsonEnDe as jsonEnDe, index$1_keyTenantLedger as keyTenantLedger, index$1_qsidEqual as qsidEqual, index$1_qsidKey as qsidKey, index$1_resAuth as resAuth, index$1_selectRandom as selectRandom, index$1_timeout as timeout };
|
2730
2733
|
}
|
2731
2734
|
|
2732
2735
|
declare namespace index {
|
@@ -2735,5 +2738,5 @@ declare namespace index {
|
|
2735
2738
|
|
2736
2739
|
declare const PACKAGE_VERSION: string;
|
2737
2740
|
|
2738
|
-
export { type AllDocsQueryOpts, type AllDocsResponse, type Attachable, type Attached, type BaseBlockstore, type BulkResponse, type CRDT, type CRDTClock, type CRDTEntry, CRDTImpl, type CRDTMeta, type CarTransaction, type ChangesOptions, type ChangesResponse, type ChangesResponseRow, type ClockHead, type ClockLink, type CoerceURIandInterceptor, type ConfigOpts, DataAndMetaAndWalAndBaseStore, type Database, DatabaseImpl, type DbMeta, type DocBase, type DocFileMeta, type DocFiles, type DocFragment, type DocLiteral, type DocObject, type DocRecord, type DocResponse, type DocSet, type DocTypes, type DocUpdate, type DocValue, type DocWithId, type FPStats, type Falsy, type FileTransactionMeta, type GatewayUrls, type GatewayUrlsParam, type HasCRDT, type HasLogger, type HasSuperThis, type IdxMeta, type IdxMetaMap, Index, type IndexKey, type IndexKeyType, type IndexRow, type IndexRows, type IndexTransactionMeta, type IndexUpdate, type IndexUpdateString, type Joiner, type KeyLiteral, type Ledger, LedgerFactory, type LedgerOpts, LedgerShell, type ListenerFn, type MapFn, type MetaType, type NoUpdateListenerFn, NotFoundError, PACKAGE_VERSION, PARAM, type PARAMS, type PathOps, type PromiseToUInt8, type QueryOpts, type ReadyCloseDestroy, type RefLedger, type Store, type StoreType, type SuperThis, type SuperThisOpts, type SysFileSystem, type TextEndeCoder, type ToUInt8, UInt8ArrayEqual, type UnReg$1 as UnReg, type UnknownDoc, type Unreg, type UpdateListenerFn, type VoidFn, type WriteQueue, index$8 as blockstore, index$8 as bs, coerceIntoUint8, coercePromiseIntoUint8, defaultWriteQueueOpts, ensureLogger, ensureSuperLog, ensureSuperThis, ensureURIDefaults, exceptionWrapper, falsyToUndef, fireproof, getKey, getName, getStore, index$7 as index, inplaceFilter, isDatabase, isFalsy, isLedger, isNotFoundError, keyConfigOpts, makeName, onSuperThis, index as protocols, index as ps, index$2 as rt, index$2 as runtime, storeType2DataMetaWal, throwFalsy, toSortedArray, toStoreURIRuntime };
|
2741
|
+
export { type AllDocsQueryOpts, type AllDocsResponse, type Attachable, type Attached, type BaseBlockstore, type BulkResponse, type CRDT, type CRDTClock, type CRDTEntry, CRDTImpl, type CRDTMeta, type CarTransaction, type ChangesOptions, type ChangesResponse, type ChangesResponseRow, type ClockHead, type ClockLink, type CoerceURIandInterceptor, type ConfigOpts, DataAndMetaAndWalAndBaseStore, type Database, DatabaseImpl, type DbMeta, type DocBase, type DocFileMeta, type DocFiles, type DocFragment, type DocLiteral, type DocObject, type DocRecord, type DocResponse, type DocSet, type DocTypes, type DocUpdate, type DocValue, type DocWithId, type FPStats, type Falsy, type FileTransactionMeta, type GatewayUrls, type GatewayUrlsParam, type HasCRDT, type HasLogger, type HasSuperThis, type IdxMeta, type IdxMetaMap, Index, type IndexKey, type IndexKeyType, type IndexRow, type IndexRows, type IndexTransactionMeta, type IndexUpdate, type IndexUpdateString, type Joiner, type KeyLiteral, type Ledger, LedgerFactory, type LedgerOpts, LedgerShell, type ListenerFn, type MapFn, type MetaType, type NoUpdateListenerFn, NotFoundError, PACKAGE_VERSION, PARAM, type PARAMS, type PathOps, type PromiseToUInt8, type QueryOpts, type ReadyCloseDestroy, type RefLedger, type Store, type StoreType, type SuperThis, type SuperThisOpts, type SysFileSystem, type TextEndeCoder, type ToUInt8, UInt8ArrayEqual, type UnReg$1 as UnReg, type UnknownDoc, type Unreg, type UpdateListenerFn, type VoidFn, type WriteQueue, index$8 as blockstore, index$8 as bs, coerceIntoUint8, coercePromiseIntoUint8, defaultWriteQueueOpts, ensureLogger, ensureSuperLog, ensureSuperThis, ensureURIDefaults, exceptionWrapper, falsyToUndef, fireproof, getKey, getName, getStore, index$7 as index, inplaceFilter, isDatabase, isFalsy, isLedger, isNotFoundError, keyConfigOpts, makeName, onSuperThis, index as protocols, index as ps, index$2 as rt, index$2 as runtime, setPresetEnv, storeType2DataMetaWal, throwFalsy, toSortedArray, toStoreURIRuntime };
|
2739
2742
|
declare module '@fireproof/core'
|
package/index.js
CHANGED
@@ -126,15 +126,21 @@ var SuperThisImpl = class _SuperThisImpl {
|
|
126
126
|
});
|
127
127
|
}
|
128
128
|
};
|
129
|
-
function presetEnv() {
|
129
|
+
function presetEnv(ipreset) {
|
130
|
+
let preset = {};
|
131
|
+
if (ipreset instanceof Map) {
|
132
|
+
preset = Object.fromEntries(ipreset.entries());
|
133
|
+
} else if (typeof ipreset === "object" && ipreset !== null) {
|
134
|
+
preset = ipreset;
|
135
|
+
}
|
130
136
|
const penv = new Map([
|
131
137
|
// ["FP_DEBUG", "xxx"],
|
132
138
|
// ["FP_ENV", "development"],
|
133
139
|
...Array.from(
|
134
|
-
Object.entries(
|
135
|
-
|
136
|
-
|
137
|
-
)
|
140
|
+
Object.entries({
|
141
|
+
...setPresetEnv({}),
|
142
|
+
...preset
|
143
|
+
})
|
138
144
|
)
|
139
145
|
// .map(([k, v]) => [k, v as string])
|
140
146
|
]);
|
@@ -171,7 +177,7 @@ function onSuperThis(fn) {
|
|
171
177
|
function ensureSuperThis(osthis) {
|
172
178
|
const env = envFactory({
|
173
179
|
symbol: osthis?.env?.symbol || "FP_ENV",
|
174
|
-
presetEnv: osthis?.env?.presetEnv
|
180
|
+
presetEnv: presetEnv(osthis?.env?.presetEnv)
|
175
181
|
});
|
176
182
|
const ret = new SuperThisImpl({
|
177
183
|
logger: osthis?.logger || globalLogger(),
|
@@ -437,6 +443,14 @@ function ensureURIDefaults(sthis, name, curi, uri, store, ctx) {
|
|
437
443
|
}
|
438
444
|
return ret.URI();
|
439
445
|
}
|
446
|
+
function setPresetEnv(o, symbol = "FP_PRESET_ENV") {
|
447
|
+
const key = Symbol.for(symbol);
|
448
|
+
const env = globalThis[key] ?? {};
|
449
|
+
for (const [k, v] of Object.entries(o)) {
|
450
|
+
env[k] = v;
|
451
|
+
}
|
452
|
+
return env;
|
453
|
+
}
|
440
454
|
|
441
455
|
// src/write-queue.ts
|
442
456
|
import { Future } from "@adviser/cement";
|
@@ -5283,7 +5297,7 @@ var SessionTokenService = class _SessionTokenService {
|
|
5283
5297
|
}
|
5284
5298
|
};
|
5285
5299
|
}
|
5286
|
-
static async createFromEnv(sp = {}
|
5300
|
+
static async createFromEnv(sthis, sp = {}) {
|
5287
5301
|
let envToken = sthis.env.get(sp.privateEnvKey ?? envKeyDefaults.SECRET);
|
5288
5302
|
if (!envToken) {
|
5289
5303
|
envToken = sthis.env.get(sp.publicEnvKey ?? envKeyDefaults.PUBLIC);
|
@@ -5701,6 +5715,14 @@ function toHttpProtocol(uri) {
|
|
5701
5715
|
}
|
5702
5716
|
return toFix.URI();
|
5703
5717
|
}
|
5718
|
+
function ensurePath(uri, fp) {
|
5719
|
+
const path = uri.pathname.replace(/\/$/, "").replace(/^\//, "");
|
5720
|
+
const buri = uri.build();
|
5721
|
+
if (path === "") {
|
5722
|
+
buri.appendRelative(fp);
|
5723
|
+
}
|
5724
|
+
return buri.toString();
|
5725
|
+
}
|
5704
5726
|
var HttpConnection = class extends MsgRawConnectionBase {
|
5705
5727
|
constructor(sthis, uris, msgP, exGestalt) {
|
5706
5728
|
super(sthis, exGestalt);
|
@@ -5789,7 +5811,7 @@ var HttpConnection = class extends MsgRawConnectionBase {
|
|
5789
5811
|
const rRes = await exception2Result6(
|
5790
5812
|
() => timeout(
|
5791
5813
|
this.msgP.timeout,
|
5792
|
-
fetch(url.cleaned
|
5814
|
+
fetch(ensurePath(url.cleaned, "fp"), {
|
5793
5815
|
method: "PUT",
|
5794
5816
|
headers: headers.AsHeaderInit(),
|
5795
5817
|
body: rReqBody.Ok()
|
@@ -6145,11 +6167,12 @@ var Msger = class _Msger {
|
|
6145
6167
|
static async openWS(sthis, url, msgP, exGestalt) {
|
6146
6168
|
let ws;
|
6147
6169
|
url = url.build().setParam("random", sthis.nextId().str).URI();
|
6170
|
+
const wsUrl = ensurePath(url, "ws");
|
6148
6171
|
if (runtimeFn4().isNodeIsh) {
|
6149
6172
|
const { WebSocket: WebSocket2 } = await import("ws");
|
6150
|
-
ws = new WebSocket2(
|
6173
|
+
ws = new WebSocket2(wsUrl);
|
6151
6174
|
} else {
|
6152
|
-
ws = new WebSocket(
|
6175
|
+
ws = new WebSocket(wsUrl);
|
6153
6176
|
}
|
6154
6177
|
return Result15.Ok(new WSConnection(sthis, ws, msgP, exGestalt));
|
6155
6178
|
}
|
@@ -7125,6 +7148,7 @@ __export(cloud_exports, {
|
|
7125
7148
|
coerceFPStoreTypes: () => coerceFPStoreTypes,
|
7126
7149
|
defaultGestalt: () => defaultGestalt,
|
7127
7150
|
defaultMsgParams: () => defaultMsgParams,
|
7151
|
+
ensurePath: () => ensurePath,
|
7128
7152
|
isAuthTypeFPCloud: () => isAuthTypeFPCloud,
|
7129
7153
|
isAuthTypeFPCloudJWK: () => isAuthTypeFPCloudJWK,
|
7130
7154
|
isProtocolCapabilities: () => isProtocolCapabilities,
|
@@ -7195,7 +7219,7 @@ function buildResDelWAL(msgCtx, req, ctx) {
|
|
7195
7219
|
|
7196
7220
|
// src/version.ts
|
7197
7221
|
var PACKAGE_VERSION = Object.keys({
|
7198
|
-
"0.20.0-dev-preview-
|
7222
|
+
"0.20.0-dev-preview-58": "xxxx"
|
7199
7223
|
})[0];
|
7200
7224
|
export {
|
7201
7225
|
CRDTImpl,
|
@@ -7236,6 +7260,7 @@ export {
|
|
7236
7260
|
protocols_exports as ps,
|
7237
7261
|
runtime_exports as rt,
|
7238
7262
|
runtime_exports as runtime,
|
7263
|
+
setPresetEnv,
|
7239
7264
|
storeType2DataMetaWal,
|
7240
7265
|
throwFalsy,
|
7241
7266
|
toSortedArray,
|