@fireproof/core 0.20.0-dev-preview-15 → 0.20.0-dev-preview-16

Sign up to get free protection for your applications and to get access to all the features.
package/index.d.cts CHANGED
@@ -1536,6 +1536,26 @@ declare namespace index$2 {
1536
1536
  export { index$2_KeyBagProviderFile as KeyBagProviderFile, index$2_sysFileSystemFactory as sysFileSystemFactory };
1537
1537
  }
1538
1538
 
1539
+ declare class MemoryGateway implements Gateway {
1540
+ readonly memorys: Map<string, Uint8Array>;
1541
+ readonly sthis: SuperThis;
1542
+ constructor(sthis: SuperThis, memorys: Map<string, Uint8Array>);
1543
+ buildUrl(baseUrl: URI, key: string): Promise<Result<URI>>;
1544
+ start(baseUrl: URI): Promise<Result<URI>>;
1545
+ close(baseUrl: URI): Promise<VoidResult>;
1546
+ destroy(baseUrl: URI): Promise<VoidResult>;
1547
+ put(url: URI, bytes: Uint8Array): Promise<VoidResult>;
1548
+ get(url: URI): Promise<GetResult>;
1549
+ delete(url: URI): Promise<VoidResult>;
1550
+ getPlain(url: URI, key: string): Promise<Result<Uint8Array>>;
1551
+ }
1552
+
1553
+ type gateway_MemoryGateway = MemoryGateway;
1554
+ declare const gateway_MemoryGateway: typeof MemoryGateway;
1555
+ declare namespace gateway {
1556
+ export { gateway_MemoryGateway as MemoryGateway };
1557
+ }
1558
+
1539
1559
  declare class DefSerdeGateway implements SerdeGateway {
1540
1560
  readonly gw: Gateway;
1541
1561
  constructor(gw: Gateway);
@@ -1568,7 +1588,7 @@ type index$1_WALEncodeEnvelope = WALEncodeEnvelope;
1568
1588
  declare const index$1_fpDeserialize: typeof fpDeserialize;
1569
1589
  declare const index$1_fpSerialize: typeof fpSerialize;
1570
1590
  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 };
1591
+ 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
1592
  }
1573
1593
 
1574
1594
  declare const FILESTORE_VERSION = "v0.19-file";
package/index.d.ts CHANGED
@@ -1536,6 +1536,26 @@ declare namespace index$2 {
1536
1536
  export { index$2_KeyBagProviderFile as KeyBagProviderFile, index$2_sysFileSystemFactory as sysFileSystemFactory };
1537
1537
  }
1538
1538
 
1539
+ declare class MemoryGateway implements Gateway {
1540
+ readonly memorys: Map<string, Uint8Array>;
1541
+ readonly sthis: SuperThis;
1542
+ constructor(sthis: SuperThis, memorys: Map<string, Uint8Array>);
1543
+ buildUrl(baseUrl: URI, key: string): Promise<Result<URI>>;
1544
+ start(baseUrl: URI): Promise<Result<URI>>;
1545
+ close(baseUrl: URI): Promise<VoidResult>;
1546
+ destroy(baseUrl: URI): Promise<VoidResult>;
1547
+ put(url: URI, bytes: Uint8Array): Promise<VoidResult>;
1548
+ get(url: URI): Promise<GetResult>;
1549
+ delete(url: URI): Promise<VoidResult>;
1550
+ getPlain(url: URI, key: string): Promise<Result<Uint8Array>>;
1551
+ }
1552
+
1553
+ type gateway_MemoryGateway = MemoryGateway;
1554
+ declare const gateway_MemoryGateway: typeof MemoryGateway;
1555
+ declare namespace gateway {
1556
+ export { gateway_MemoryGateway as MemoryGateway };
1557
+ }
1558
+
1539
1559
  declare class DefSerdeGateway implements SerdeGateway {
1540
1560
  readonly gw: Gateway;
1541
1561
  constructor(gw: Gateway);
@@ -1568,7 +1588,7 @@ type index$1_WALEncodeEnvelope = WALEncodeEnvelope;
1568
1588
  declare const index$1_fpDeserialize: typeof fpDeserialize;
1569
1589
  declare const index$1_fpSerialize: typeof fpSerialize;
1570
1590
  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 };
1591
+ 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
1592
  }
1573
1593
 
1574
1594
  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/web");
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/version.ts
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/web");
1353
+ const { GatewayImpl } = await import("@fireproof/core/indexdb");
1350
1354
  return new GatewayImpl();
1351
1355
  }
1352
1356
  });
@@ -4660,7 +4664,8 @@ __export(gateways_exports, {
4660
4664
  DefSerdeGateway: () => DefSerdeGateway,
4661
4665
  file: () => file_exports,
4662
4666
  fpDeserialize: () => fpDeserialize,
4663
- fpSerialize: () => fpSerialize
4667
+ fpSerialize: () => fpSerialize,
4668
+ memory: () => gateway_exports
4664
4669
  });
4665
4670
 
4666
4671
  // src/runtime/gateways/file/index.ts
@@ -4672,7 +4677,7 @@ __export(file_exports, {
4672
4677
 
4673
4678
  // src/version.ts
4674
4679
  var PACKAGE_VERSION = Object.keys({
4675
- "0.20.0-dev-preview-15": "xxxx"
4680
+ "0.20.0-dev-preview-16": "xxxx"
4676
4681
  })[0];
4677
4682
  export {
4678
4683
  CRDTImpl,