@sentio/runtime 2.57.12-rc.j → 2.57.13-rc.1

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.
@@ -21,7 +21,7 @@ import {
21
21
  require_roots,
22
22
  require_rpc,
23
23
  require_writer
24
- } from "./chunk-XR3EZ6FB.js";
24
+ } from "./chunk-ZUTD563J.js";
25
25
 
26
26
  // ../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js
27
27
  var require_universalify = __commonJS({
@@ -38157,9 +38157,8 @@ var STORE_BATCH_IDLE = process2.env["STORE_BATCH_MAX_IDLE"] ? parseInt(process2.
38157
38157
  var STORE_BATCH_SIZE = process2.env["STORE_BATCH_SIZE"] ? parseInt(process2.env["STORE_BATCH_SIZE"]) : 10;
38158
38158
  var STORE_UPSERT_NO_WAIT = process2.env["STORE_UPSERT_NO_WAIT"] === "true";
38159
38159
  var timeoutError = new Error("timeout");
38160
- var StoreContext = class _StoreContext {
38161
- constructor(subject, processId) {
38162
- this.subject = subject;
38160
+ var AbstractStoreContext = class {
38161
+ constructor(processId) {
38163
38162
  this.processId = processId;
38164
38163
  }
38165
38164
  static opCounter = 0n;
@@ -38177,7 +38176,7 @@ var StoreContext = class _StoreContext {
38177
38176
  return this.sendUpsertInBatch(request.upsert);
38178
38177
  }
38179
38178
  const requestType = Object.keys(request)[0];
38180
- const opId = _StoreContext.opCounter++;
38179
+ const opId = StoreContext.opCounter++;
38181
38180
  const promise = this.newPromise(opId, requestType);
38182
38181
  const start = Date.now();
38183
38182
  const promises = [promise];
@@ -38186,12 +38185,11 @@ var StoreContext = class _StoreContext {
38186
38185
  const timeoutPromise = new Promise((_r, rej) => timer = setTimeout(rej, timeoutSecs * 1e3, timeoutError));
38187
38186
  promises.push(timeoutPromise);
38188
38187
  }
38189
- this.subject.next({
38188
+ this.doSend({
38190
38189
  dbRequest: {
38191
38190
  ...request,
38192
38191
  opId
38193
- },
38194
- processId: this.processId
38192
+ }
38195
38193
  });
38196
38194
  send_counts[requestType]?.add(1);
38197
38195
  if (requestType === "upsert" && STORE_UPSERT_NO_WAIT) {
@@ -38241,10 +38239,7 @@ var StoreContext = class _StoreContext {
38241
38239
  error: e?.toString()
38242
38240
  }
38243
38241
  });
38244
- this.subject.next({
38245
- result: errorResult,
38246
- processId
38247
- });
38242
+ this.doSend({ result: errorResult, processId });
38248
38243
  }
38249
38244
  close() {
38250
38245
  for (const [opId, defer] of this.defers) {
@@ -38272,7 +38267,7 @@ var StoreContext = class _StoreContext {
38272
38267
  }
38273
38268
  return promise;
38274
38269
  } else {
38275
- const opId = _StoreContext.opCounter++;
38270
+ const opId = StoreContext.opCounter++;
38276
38271
  const timeout = setTimeout(() => {
38277
38272
  this.sendBatch();
38278
38273
  }, STORE_BATCH_IDLE);
@@ -38301,12 +38296,11 @@ var StoreContext = class _StoreContext {
38301
38296
  const { request, opId, timer } = this.upsertBatch;
38302
38297
  clearTimeout(timer);
38303
38298
  this.upsertBatch = void 0;
38304
- this.subject.next({
38299
+ this.doSend({
38305
38300
  dbRequest: {
38306
38301
  upsert: request,
38307
38302
  opId
38308
- },
38309
- processId: this.processId
38303
+ }
38310
38304
  });
38311
38305
  send_counts["upsert"]?.add(1);
38312
38306
  batched_request_count.add(1);
@@ -38317,6 +38311,18 @@ var StoreContext = class _StoreContext {
38317
38311
  await Promise.all(this.pendings);
38318
38312
  }
38319
38313
  };
38314
+ var StoreContext = class extends AbstractStoreContext {
38315
+ constructor(subject, processId) {
38316
+ super(processId);
38317
+ this.subject = subject;
38318
+ }
38319
+ doSend(resp) {
38320
+ this.subject.next({
38321
+ ...resp,
38322
+ processId: this.processId
38323
+ });
38324
+ }
38325
+ };
38320
38326
  import("node:process").then((p) => p.stdout.write(""));
38321
38327
 
38322
38328
  // ../../node_modules/.pnpm/@sentio+ethers@6.13.1-patch.5_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/@sentio/ethers/lib.esm/_version.js
@@ -59597,8 +59603,6 @@ export {
59597
59603
  init_es2 as init_es,
59598
59604
  require_lib3,
59599
59605
  require_lib4,
59600
- from,
59601
- withAbort,
59602
59606
  GLOBAL_CONFIG,
59603
59607
  freezeGlobalConfig,
59604
59608
  DiagLogLevel,
@@ -59628,8 +59632,8 @@ export {
59628
59632
  processMetrics,
59629
59633
  metricsStorage,
59630
59634
  timeoutError,
59635
+ AbstractStoreContext,
59631
59636
  StoreContext,
59632
- require_cjs,
59633
59637
  LRUCache,
59634
59638
  DummyProvider,
59635
59639
  getProvider2 as getProvider,
@@ -59719,4 +59723,4 @@ long/umd/index.js:
59719
59723
  @noble/curves/esm/secp256k1.js:
59720
59724
  (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
59721
59725
  */
59722
- //# sourceMappingURL=chunk-PDTC7P7O.js.map
59726
+ //# sourceMappingURL=chunk-NLEBXJPP.js.map