@fireproof/core 0.19.112-dev-iife → 0.19.112-dev-dyn

Sign up to get free protection for your applications and to get access to all the features.
package/index.d.cts CHANGED
@@ -1035,6 +1035,7 @@ declare class Database<DT extends DocTypes = NonNullable<unknown>> implements Co
1035
1035
  declare function fireproof(name: string, opts?: ConfigOpts): Database;
1036
1036
 
1037
1037
  declare function getFileSystem(url: URI): Promise<SysFileSystem>;
1038
+
1038
1039
  declare function getPath(url: URI, sthis: SuperThis): string;
1039
1040
  declare function getFileName(url: URI, sthis: SuperThis): string;
1040
1041
 
package/index.d.ts CHANGED
@@ -1035,6 +1035,7 @@ declare class Database<DT extends DocTypes = NonNullable<unknown>> implements Co
1035
1035
  declare function fireproof(name: string, opts?: ConfigOpts): Database;
1036
1036
 
1037
1037
  declare function getFileSystem(url: URI): Promise<SysFileSystem>;
1038
+
1038
1039
  declare function getPath(url: URI, sthis: SuperThis): string;
1039
1040
  declare function getFileName(url: URI, sthis: SuperThis): string;
1040
1041
 
package/index.global.js CHANGED
@@ -12416,30 +12416,18 @@ ${end.comment}` : end.comment;
12416
12416
  }
12417
12417
  });
12418
12418
 
12419
- // src/bundle-not-impl.ts
12420
- var require_bundle_not_impl = __commonJS({
12421
- "src/bundle-not-impl.ts"() {
12422
- "use strict";
12423
- var err = new Error("store-file not implemented");
12424
- console.error(err.stack);
12425
- throw err;
12426
- }
12427
- });
12428
-
12429
- // src/runtime/gateways/file/utils.ts
12430
- var utils_exports2 = {};
12431
- __export(utils_exports2, {
12432
- getFileName: () => getFileName,
12433
- getFileSystem: () => getFileSystem,
12434
- getPath: () => getPath
12435
- });
12419
+ // src/runtime/gateways/file/get-file-system-dynamic.ts
12436
12420
  async function getFileSystem(url) {
12437
12421
  const name6 = url.getParam("fs", "node");
12438
12422
  let fs;
12439
12423
  switch (name6) {
12440
12424
  case "mem":
12441
12425
  fs = await externalLoaders.get(name6).once(async () => {
12442
- const { MemFileSystem } = await Promise.resolve().then(() => __toESM(require_bundle_not_impl(), 1));
12426
+ const memjs = "./node/mem-filesystem.js";
12427
+ const { MemFileSystem } = await import(
12428
+ /* @vite-ignore */
12429
+ memjs
12430
+ );
12443
12431
  return new MemFileSystem();
12444
12432
  });
12445
12433
  break;
@@ -12450,12 +12438,32 @@ ${end.comment}` : end.comment;
12450
12438
  // }
12451
12439
  default:
12452
12440
  fs = await externalLoaders.get(name6).once(async () => {
12453
- const { NodeFileSystem } = await Promise.resolve().then(() => __toESM(require_bundle_not_impl(), 1));
12441
+ const nodejs = "./node/node-filesystem.js";
12442
+ const { NodeFileSystem } = await import(
12443
+ /* @vite-ignore */
12444
+ nodejs
12445
+ );
12454
12446
  return new NodeFileSystem();
12455
12447
  });
12456
12448
  }
12457
12449
  return fs.start();
12458
12450
  }
12451
+ var externalLoaders;
12452
+ var init_get_file_system_dynamic = __esm({
12453
+ "src/runtime/gateways/file/get-file-system-dynamic.ts"() {
12454
+ "use strict";
12455
+ init_cement();
12456
+ externalLoaders = new KeyedResolvOnce();
12457
+ }
12458
+ });
12459
+
12460
+ // src/runtime/gateways/file/utils.ts
12461
+ var utils_exports2 = {};
12462
+ __export(utils_exports2, {
12463
+ getFileName: () => getFileName,
12464
+ getFileSystem: () => getFileSystem,
12465
+ getPath: () => getPath
12466
+ });
12459
12467
  function getPath(url, sthis) {
12460
12468
  const basePath = url.pathname;
12461
12469
  const name6 = url.getParam("name");
@@ -12480,13 +12488,11 @@ ${end.comment}` : end.comment;
12480
12488
  throw sthis.logger.Error().Url(url).Msg(`unsupported store type`).AsError();
12481
12489
  }
12482
12490
  }
12483
- var externalLoaders;
12484
12491
  var init_utils2 = __esm({
12485
12492
  "src/runtime/gateways/file/utils.ts"() {
12486
12493
  "use strict";
12487
- init_cement();
12488
12494
  init_utils();
12489
- externalLoaders = new KeyedResolvOnce();
12495
+ init_get_file_system_dynamic();
12490
12496
  }
12491
12497
  });
12492
12498
 
@@ -13219,6 +13225,20 @@ ${end.comment}` : end.comment;
13219
13225
  }
13220
13226
  });
13221
13227
 
13228
+ // src/runtime/gateways/indexdb/gateway-import-dynamic.ts
13229
+ function gatewayImport() {
13230
+ const gwimpl = "./web/gateway-impl.js";
13231
+ return import(
13232
+ /* @vite-ignore */
13233
+ gwimpl
13234
+ );
13235
+ }
13236
+ var init_gateway_import_dynamic = __esm({
13237
+ "src/runtime/gateways/indexdb/gateway-import-dynamic.ts"() {
13238
+ "use strict";
13239
+ }
13240
+ });
13241
+
13222
13242
  // src/runtime/gateways/indexdb/gateway.ts
13223
13243
  var gateway_exports2 = {};
13224
13244
  __export(gateway_exports2, {
@@ -13230,6 +13250,7 @@ ${end.comment}` : end.comment;
13230
13250
  "src/runtime/gateways/indexdb/gateway.ts"() {
13231
13251
  "use strict";
13232
13252
  init_cement();
13253
+ init_gateway_import_dynamic();
13233
13254
  loadExternal = new ResolveOnce();
13234
13255
  IndexDBGateway = class {
13235
13256
  constructor(sthis) {
@@ -13237,7 +13258,7 @@ ${end.comment}` : end.comment;
13237
13258
  }
13238
13259
  getGateway() {
13239
13260
  return loadExternal.once(() => {
13240
- return Promise.resolve().then(() => __toESM(require_bundle_not_impl(), 1)).then(({ IndexDBGatewayImpl }) => new IndexDBGatewayImpl(this.sthis));
13261
+ return gatewayImport().then(({ IndexDBGatewayImpl }) => new IndexDBGatewayImpl(this.sthis));
13241
13262
  });
13242
13263
  }
13243
13264
  buildUrl(baseUrl, key) {
@@ -13273,7 +13294,7 @@ ${end.comment}` : end.comment;
13273
13294
  }
13274
13295
  getGateway() {
13275
13296
  return this.loadExternal.once(() => {
13276
- return Promise.resolve().then(() => __toESM(require_bundle_not_impl(), 1)).then(({ IndexDBTestStore: IndexDBTestStore2 }) => new IndexDBTestStore2(this.sthis));
13297
+ return gatewayImport().then(({ IndexDBTestStore: IndexDBTestStore2 }) => new IndexDBTestStore2(this.sthis));
13277
13298
  });
13278
13299
  }
13279
13300
  get(url, key) {
@@ -30811,7 +30832,7 @@ You can use close({ resize: true }) to resize header`);
30811
30832
 
30812
30833
  // src/version.ts
30813
30834
  var PACKAGE_VERSION = Object.keys({
30814
- "0.19.112-dev-iife": "xxxx"
30835
+ "0.19.112-dev-dyn": "xxxx"
30815
30836
  })[0];
30816
30837
  return __toCommonJS(src_exports6);
30817
30838
  })();