@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.
- package/lib/chunk-6XHWJ2VS.js +92 -0
- package/lib/chunk-6XHWJ2VS.js.map +1 -0
- package/lib/chunk-BPGFX5S5.js +10975 -0
- package/lib/chunk-BPGFX5S5.js.map +1 -0
- package/lib/{chunk-PDTC7P7O.js → chunk-NLEBXJPP.js} +24 -20
- package/lib/{chunk-PDTC7P7O.js.map → chunk-NLEBXJPP.js.map} +1 -1
- package/lib/{chunk-XR3EZ6FB.js → chunk-ZUTD563J.js} +60 -7
- package/lib/{chunk-XR3EZ6FB.js.map → chunk-ZUTD563J.js.map} +1 -1
- package/lib/index.d.ts +29 -9
- package/lib/index.js +12 -71
- package/lib/index.js.map +1 -1
- package/lib/processor-runner.d.ts +6 -6
- package/lib/processor-runner.js +330 -11308
- package/lib/processor-runner.js.map +1 -1
- package/lib/service-worker.d.ts +4 -1
- package/lib/service-worker.js +37 -10
- package/lib/service-worker.js.map +1 -1
- package/lib/test-processor.test.js.map +1 -1
- package/package.json +1 -1
- package/src/db-context.ts +39 -18
- package/src/logger.ts +3 -2
- package/src/plugin.ts +3 -3
- package/src/processor-runner.ts +3 -5
- package/src/service-manager.ts +110 -137
- package/src/service-worker.ts +52 -9
- package/src/service.ts +1 -1
- package/src/state.ts +19 -0
@@ -21,7 +21,7 @@ import {
|
|
21
21
|
require_roots,
|
22
22
|
require_rpc,
|
23
23
|
require_writer
|
24
|
-
} from "./chunk-
|
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
|
38161
|
-
constructor(
|
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 =
|
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.
|
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.
|
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 =
|
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.
|
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-
|
59726
|
+
//# sourceMappingURL=chunk-NLEBXJPP.js.map
|