@fireproof/core 0.20.0-dev-preview-10 → 0.20.0-dev-preview-12

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/index.cjs CHANGED
@@ -4351,6 +4351,22 @@ var CRDTImpl = class {
4351
4351
  }
4352
4352
  };
4353
4353
 
4354
+ // src/context.ts
4355
+ var Context = class {
4356
+ constructor() {
4357
+ this.ctx = /* @__PURE__ */ new Map();
4358
+ }
4359
+ set(key, value) {
4360
+ this.ctx.set(key, value);
4361
+ }
4362
+ get(key) {
4363
+ return this.ctx.get(key);
4364
+ }
4365
+ delete(key) {
4366
+ this.ctx.delete(key);
4367
+ }
4368
+ };
4369
+
4354
4370
  // src/ledger.ts
4355
4371
  var ledgers = new import_cement19.KeyedResolvOnce();
4356
4372
  function keyConfigOpts(sthis, name, opts) {
@@ -4395,6 +4411,9 @@ var LedgerShell = class {
4395
4411
  this.name = ref.name;
4396
4412
  ref.addShell(this);
4397
4413
  }
4414
+ get context() {
4415
+ return this.ref.context;
4416
+ }
4398
4417
  get id() {
4399
4418
  return this.ref.id;
4400
4419
  }
@@ -4433,6 +4452,7 @@ var LedgerImpl = class {
4433
4452
  this._noupdate_listeners = /* @__PURE__ */ new Set();
4434
4453
  // readonly blockstore: BaseBlockstore;
4435
4454
  this.shells = /* @__PURE__ */ new Set();
4455
+ this.context = new Context();
4436
4456
  this._onClosedFns = /* @__PURE__ */ new Map();
4437
4457
  this._ready = new import_cement19.ResolveOnce();
4438
4458
  this.opts = opts;
@@ -4586,15 +4606,9 @@ function toStoreURIRuntime(sthis, name, sopts) {
4586
4606
  }
4587
4607
  };
4588
4608
  }
4589
- var Fireproof = class {
4590
- Ledger(name, opts) {
4591
- return LedgerFactory(name, opts);
4592
- }
4593
- DB(name, opts) {
4594
- return new DatabaseImpl(this.Ledger(name, opts));
4595
- }
4596
- };
4597
- var fireproof = new Fireproof();
4609
+ function fireproof(name, opts) {
4610
+ return new DatabaseImpl(LedgerFactory(name, opts));
4611
+ }
4598
4612
 
4599
4613
  // src/runtime/index.ts
4600
4614
  var runtime_exports = {};
@@ -4646,6 +4660,6 @@ __export(file_exports, {
4646
4660
 
4647
4661
  // src/version.ts
4648
4662
  var PACKAGE_VERSION = Object.keys({
4649
- "0.20.0-dev-preview-10": "xxxx"
4663
+ "0.20.0-dev-preview-12": "xxxx"
4650
4664
  })[0];
4651
4665
  //# sourceMappingURL=index.cjs.map