@sentio/runtime 2.59.0-rc.8 → 2.59.0
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-JPHAFAK7.js +38 -0
- package/lib/{chunk-GD7EL7GH.js.map → chunk-JPHAFAK7.js.map} +1 -1
- package/lib/chunk-UWKXTTDA.js +116 -0
- package/lib/{chunk-J23VJQSB.js.map → chunk-UWKXTTDA.js.map} +1 -1
- package/lib/chunk-VUN3TGG5.js +26 -0
- package/lib/chunk-VUN3TGG5.js.map +1 -0
- package/lib/chunk-WHWNPZZ3.js +3 -0
- package/lib/{chunk-6XHWJ2VS.js.map → chunk-WHWNPZZ3.js.map} +1 -1
- package/lib/index.d.ts +193 -3
- package/lib/index.js +1 -70
- package/lib/index.js.map +1 -1
- package/lib/processor-runner.js +21 -26592
- package/lib/processor-runner.js.map +1 -1
- package/lib/service-worker.d.ts +5 -6
- package/lib/service-worker.js +2 -128
- 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 +2 -4
- package/src/full-service.ts +59 -13
- package/src/gen/processor/protos/processor.ts +1077 -159
- package/src/gen/service/common/protos/common.ts +17 -0
- package/src/metrics.ts +8 -4
- package/src/plugin.ts +24 -0
- package/src/processor-runner.ts +10 -3
- package/src/service-manager.ts +72 -106
- package/src/service-worker.ts +49 -60
- package/src/service.ts +89 -46
- package/src/utils.ts +20 -4
- package/lib/chunk-3T4PWGQU.js +0 -23070
- package/lib/chunk-3T4PWGQU.js.map +0 -1
- package/lib/chunk-6XHWJ2VS.js +0 -92
- package/lib/chunk-GD7EL7GH.js +0 -10975
- package/lib/chunk-J23VJQSB.js +0 -59833
@@ -0,0 +1,3 @@
|
|
1
|
+
import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
|
2
|
+
import{isMainThread as T,parentPort as g,threadId as p}from"node:worker_threads";var r=class e{stateMap=new Map;static INSTANCE=new e;static reset(){e.INSTANCE=new e}},n=class{constructor(){}key(){return this.constructor.name}getOrRegister(){let t=r.INSTANCE.stateMap.get(this.key());return t||(t=this.initValue(),r.INSTANCE.stateMap.set(this.key(),t)),t}unregister(){let t=r.INSTANCE.stateMap.get(this.key());return r.INSTANCE.stateMap.delete(this.key()),t}},c=class extends n{initValue(){return new Map}getValue(t){return this.getOrRegister().get(t)}getValues(){let t=this.getOrRegister();return Array.from(t.values())}getOrSetValue(t,s){let u=this.getOrRegister(),a=u.get(t);return a?(a!==s&&console.warn(t,"has been registered twice, use the previous one"),a):(u.set(t,s),s)}},i=class extends n{initValue(){return[]}getValues(){return this.getOrRegister()}addValue(t){return this.getOrRegister().push(t),t}},o=class e extends i{static INSTANCE=new e;constructor(){super()}addValue(t){return T||g?.postMessage({event:"add_template_instance",value:t,from:p}),super.addValue(t)}};import("node:process").then(e=>e.stdout.write(""));export{r as a,n as b,c,i as d,o as e};
|
3
|
+
//# sourceMappingURL=chunk-WHWNPZZ3.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/state.ts"],"sourcesContent":["import { TemplateInstance } from '@sentio/protos'\nimport { isMainThread, parentPort, threadId } from 'node:worker_threads'\n\nexport class State {\n stateMap = new Map<string, any>()\n\n static INSTANCE = new State()\n\n static reset() {\n State.INSTANCE = new State()\n }\n}\n\nexport abstract class StateStorage<T> {\n // TODO learn how to define single instance for all subclasses\n\n protected constructor() {\n //\n }\n\n abstract initValue(): T\n\n key(): string {\n return this.constructor.name\n }\n\n getOrRegister(): T {\n let metricState: T = State.INSTANCE.stateMap.get(this.key())\n if (!metricState) {\n metricState = this.initValue()\n State.INSTANCE.stateMap.set(this.key(), metricState)\n }\n return metricState\n }\n\n unregister(): T {\n const value = State.INSTANCE.stateMap.get(this.key())\n State.INSTANCE.stateMap.delete(this.key())\n return value\n }\n}\n\nexport abstract class MapStateStorage<T> extends StateStorage<Map<string, T>> {\n initValue() {\n return new Map<string, T>()\n }\n\n getValue(key: string): T | undefined {\n const m = this.getOrRegister()\n return m.get(key)\n }\n\n getValues(): T[] {\n const m = this.getOrRegister()\n return Array.from(m.values())\n }\n\n getOrSetValue(key: string, value: T): T {\n const m = this.getOrRegister()\n const oldValue = m.get(key)\n if (oldValue) {\n if (oldValue !== value) {\n console.warn(key, 'has been registered twice, use the previous one')\n }\n return oldValue\n }\n m.set(key, value)\n return value\n }\n}\n\nexport abstract class ListStateStorage<T> extends StateStorage<T[]> {\n initValue() {\n return []\n }\n\n getValues(): T[] {\n return this.getOrRegister()\n }\n\n addValue(value: T): T {\n const m = this.getOrRegister()\n m.push(value)\n return value\n }\n}\n\nexport class TemplateInstanceState extends ListStateStorage<TemplateInstance> {\n static INSTANCE = new TemplateInstanceState()\n\n constructor() {\n super()\n }\n\n override addValue(value: TemplateInstance): TemplateInstance {\n if (!isMainThread) {\n // I'm worker thread, should notice the main thread\n parentPort?.postMessage({ event: 'add_template_instance', value, from: threadId })\n }\n return super.addValue(value)\n }\n}\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));"],"mappings":"
|
1
|
+
{"version":3,"sources":["../src/state.ts"],"sourcesContent":["import { TemplateInstance } from '@sentio/protos'\nimport { isMainThread, parentPort, threadId } from 'node:worker_threads'\n\nexport class State {\n stateMap = new Map<string, any>()\n\n static INSTANCE = new State()\n\n static reset() {\n State.INSTANCE = new State()\n }\n}\n\nexport abstract class StateStorage<T> {\n // TODO learn how to define single instance for all subclasses\n\n protected constructor() {\n //\n }\n\n abstract initValue(): T\n\n key(): string {\n return this.constructor.name\n }\n\n getOrRegister(): T {\n let metricState: T = State.INSTANCE.stateMap.get(this.key())\n if (!metricState) {\n metricState = this.initValue()\n State.INSTANCE.stateMap.set(this.key(), metricState)\n }\n return metricState\n }\n\n unregister(): T {\n const value = State.INSTANCE.stateMap.get(this.key())\n State.INSTANCE.stateMap.delete(this.key())\n return value\n }\n}\n\nexport abstract class MapStateStorage<T> extends StateStorage<Map<string, T>> {\n initValue() {\n return new Map<string, T>()\n }\n\n getValue(key: string): T | undefined {\n const m = this.getOrRegister()\n return m.get(key)\n }\n\n getValues(): T[] {\n const m = this.getOrRegister()\n return Array.from(m.values())\n }\n\n getOrSetValue(key: string, value: T): T {\n const m = this.getOrRegister()\n const oldValue = m.get(key)\n if (oldValue) {\n if (oldValue !== value) {\n console.warn(key, 'has been registered twice, use the previous one')\n }\n return oldValue\n }\n m.set(key, value)\n return value\n }\n}\n\nexport abstract class ListStateStorage<T> extends StateStorage<T[]> {\n initValue() {\n return []\n }\n\n getValues(): T[] {\n return this.getOrRegister()\n }\n\n addValue(value: T): T {\n const m = this.getOrRegister()\n m.push(value)\n return value\n }\n}\n\nexport class TemplateInstanceState extends ListStateStorage<TemplateInstance> {\n static INSTANCE = new TemplateInstanceState()\n\n constructor() {\n super()\n }\n\n override addValue(value: TemplateInstance): TemplateInstance {\n if (!isMainThread) {\n // I'm worker thread, should notice the main thread\n parentPort?.postMessage({ event: 'add_template_instance', value, from: threadId })\n }\n return super.addValue(value)\n }\n}\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));"],"mappings":";AACA,OAAS,gBAAAA,EAAc,cAAAC,EAAY,YAAAC,MAAgB,sBAE5C,IAAMC,EAAN,MAAMC,CAAM,CACjB,SAAW,IAAI,IAEf,OAAO,SAAW,IAAIA,EAEtB,OAAO,OAAQ,CACbA,EAAM,SAAW,IAAIA,CACvB,CACF,EAEsBC,EAAf,KAA+B,CAG1B,aAAc,CAExB,CAIA,KAAc,CACZ,OAAO,KAAK,YAAY,IAC1B,CAEA,eAAmB,CACjB,IAAIC,EAAiBH,EAAM,SAAS,SAAS,IAAI,KAAK,IAAI,CAAC,EAC3D,OAAKG,IACHA,EAAc,KAAK,UAAU,EAC7BH,EAAM,SAAS,SAAS,IAAI,KAAK,IAAI,EAAGG,CAAW,GAE9CA,CACT,CAEA,YAAgB,CACd,IAAMC,EAAQJ,EAAM,SAAS,SAAS,IAAI,KAAK,IAAI,CAAC,EACpD,OAAAA,EAAM,SAAS,SAAS,OAAO,KAAK,IAAI,CAAC,EAClCI,CACT,CACF,EAEsBC,EAAf,cAA0CH,CAA6B,CAC5E,WAAY,CACV,OAAO,IAAI,GACb,CAEA,SAASI,EAA4B,CAEnC,OADU,KAAK,cAAc,EACpB,IAAIA,CAAG,CAClB,CAEA,WAAiB,CACf,IAAMC,EAAI,KAAK,cAAc,EAC7B,OAAO,MAAM,KAAKA,EAAE,OAAO,CAAC,CAC9B,CAEA,cAAcD,EAAaF,EAAa,CACtC,IAAMG,EAAI,KAAK,cAAc,EACvBC,EAAWD,EAAE,IAAID,CAAG,EAC1B,OAAIE,GACEA,IAAaJ,GACf,QAAQ,KAAKE,EAAK,iDAAiD,EAE9DE,IAETD,EAAE,IAAID,EAAKF,CAAK,EACTA,EACT,CACF,EAEsBK,EAAf,cAA2CP,CAAkB,CAClE,WAAY,CACV,MAAO,CAAC,CACV,CAEA,WAAiB,CACf,OAAO,KAAK,cAAc,CAC5B,CAEA,SAASE,EAAa,CAEpB,OADU,KAAK,cAAc,EAC3B,KAAKA,CAAK,EACLA,CACT,CACF,EAEaM,EAAN,MAAMC,UAA8BF,CAAmC,CAC5E,OAAO,SAAW,IAAIE,EAEtB,aAAc,CACZ,MAAM,CACR,CAES,SAASP,EAA2C,CAC3D,OAAKP,GAEHC,GAAY,YAAY,CAAE,MAAO,wBAAyB,MAAAM,EAAO,KAAML,CAAS,CAAC,EAE5E,MAAM,SAASK,CAAK,CAC7B,CACF,EACC,OAAO,cAAc,EAAE,KAAMQ,GAAMA,EAAE,OAAO,MAAM,EAAE,CAAC","names":["isMainThread","parentPort","threadId","State","_State","StateStorage","metricState","value","MapStateStorage","key","m","oldValue","ListStateStorage","TemplateInstanceState","_TemplateInstanceState","p"]}
|
package/lib/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as _sentio_protos from '@sentio/protos';
|
2
|
-
import { DeepPartial as DeepPartial$1, DBResponse, ProcessStreamResponse, DBRequest_DBUpsert, DBRequest, HandlerType, ProcessConfigResponse, StartRequest, DataBinding, PreparedData, ProcessResult, PreprocessResult, TemplateInstance, EthCallParam, ProcessorServiceImplementation, ProcessConfigRequest, Empty, ProcessBindingsRequest, ProcessBindingResponse, ProcessStreamRequest, PreprocessStreamRequest, PreprocessStreamResponse } from '@sentio/protos';
|
2
|
+
import { DeepPartial as DeepPartial$1, DBResponse, ProcessStreamResponse, DBRequest_DBUpsert, DBRequest, HandlerType, ProcessConfigResponse, StartRequest, DataBinding, PreparedData, ProcessResult, PreprocessResult, ProcessStreamResponse_Partitions, TemplateInstance, EthCallParam, ProcessorServiceImplementation, ProcessConfigRequest, Empty, ProcessBindingsRequest, ProcessBindingResponse, ProcessStreamRequest, PreprocessStreamRequest, PreprocessStreamResponse } from '@sentio/protos';
|
3
3
|
import { Subject } from 'rxjs';
|
4
4
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
5
5
|
import { Required } from 'utility-types';
|
@@ -65,6 +65,7 @@ declare abstract class Plugin {
|
|
65
65
|
preprocessBinding(request: DataBinding, preprocessStore: {
|
66
66
|
[k: string]: any;
|
67
67
|
}): Promise<PreprocessResult>;
|
68
|
+
partition(request: DataBinding): Promise<ProcessStreamResponse_Partitions>;
|
68
69
|
/**
|
69
70
|
* method used by action server only
|
70
71
|
* @param port
|
@@ -90,6 +91,7 @@ declare class PluginManager {
|
|
90
91
|
*/
|
91
92
|
stateDiff(config: ProcessConfigResponse): boolean;
|
92
93
|
processBinding(request: DataBinding, preparedData: PreparedData | undefined, dbContext?: IStoreContext): Promise<ProcessResult>;
|
94
|
+
partition(request: DataBinding): Promise<ProcessStreamResponse_Partitions>;
|
93
95
|
preprocessBinding(request: DataBinding, preprocessStore: {
|
94
96
|
[k: string]: any;
|
95
97
|
}, dbContext?: StoreContext): Promise<PreprocessResult>;
|
@@ -125,6 +127,7 @@ declare class TemplateInstanceState extends ListStateStorage<TemplateInstance> {
|
|
125
127
|
}
|
126
128
|
|
127
129
|
declare function mergeProcessResults(results: ProcessResult[]): Required<ProcessResult, 'states'>;
|
130
|
+
declare function mergeProcessResultsInPlace(res: ProcessResult, results: ProcessResult[]): Required<ProcessResult, 'states'>;
|
128
131
|
declare function errorString(e: Error): string;
|
129
132
|
declare const USER_PROCESSOR = "user_processor";
|
130
133
|
declare function makeEthCallKey(param: EthCallParam): string;
|
@@ -162,7 +165,8 @@ declare class ProcessorServiceImpl implements ProcessorServiceImplementation {
|
|
162
165
|
private readonly shutdownHandler?;
|
163
166
|
private readonly enablePreprocess;
|
164
167
|
private preparedData;
|
165
|
-
|
168
|
+
readonly enablePartition: boolean;
|
169
|
+
constructor(loader: () => Promise<any>, options?: any, shutdownHandler?: () => void);
|
166
170
|
getConfig(request: ProcessConfigRequest, context: CallContext): Promise<ProcessConfigResponse>;
|
167
171
|
start(request: StartRequest, context: CallContext): Promise<Empty>;
|
168
172
|
stop(request: Empty, context: CallContext): Promise<Empty>;
|
@@ -235,6 +239,59 @@ declare class ProcessorServiceImpl implements ProcessorServiceImplementation {
|
|
235
239
|
} | undefined;
|
236
240
|
}[] | undefined;
|
237
241
|
} | undefined;
|
242
|
+
update?: {
|
243
|
+
entity?: string[] | undefined;
|
244
|
+
id?: string[] | undefined;
|
245
|
+
entityData?: {
|
246
|
+
fields?: {
|
247
|
+
[x: string]: {
|
248
|
+
value?: {
|
249
|
+
nullValue?: _sentio_protos.RichValue_NullValue | undefined;
|
250
|
+
intValue?: number | undefined;
|
251
|
+
int64Value?: bigint | undefined;
|
252
|
+
floatValue?: number | undefined;
|
253
|
+
bytesValue?: Uint8Array | undefined;
|
254
|
+
boolValue?: boolean | undefined;
|
255
|
+
stringValue?: string | undefined;
|
256
|
+
timestampValue?: Date | undefined;
|
257
|
+
bigintValue?: {
|
258
|
+
negative?: boolean | undefined;
|
259
|
+
data?: Uint8Array | undefined;
|
260
|
+
} | undefined;
|
261
|
+
bigdecimalValue?: {
|
262
|
+
value?: {
|
263
|
+
negative?: boolean | undefined;
|
264
|
+
data?: Uint8Array | undefined;
|
265
|
+
} | undefined;
|
266
|
+
exp?: number | undefined;
|
267
|
+
} | undefined;
|
268
|
+
listValue?: {
|
269
|
+
values?: any[] | undefined;
|
270
|
+
} | undefined;
|
271
|
+
structValue?: any | undefined;
|
272
|
+
tokenValue?: {
|
273
|
+
token?: {
|
274
|
+
symbol?: string | undefined;
|
275
|
+
address?: {
|
276
|
+
address?: string | undefined;
|
277
|
+
chain?: string | undefined;
|
278
|
+
} | undefined;
|
279
|
+
} | undefined;
|
280
|
+
amount?: {
|
281
|
+
value?: {
|
282
|
+
negative?: boolean | undefined;
|
283
|
+
data?: Uint8Array | undefined;
|
284
|
+
} | undefined;
|
285
|
+
exp?: number | undefined;
|
286
|
+
} | undefined;
|
287
|
+
specifiedAt?: Date | undefined;
|
288
|
+
} | undefined;
|
289
|
+
} | undefined;
|
290
|
+
op?: _sentio_protos.EntityUpdateData_Operator | undefined;
|
291
|
+
} | undefined;
|
292
|
+
} | undefined;
|
293
|
+
}[] | undefined;
|
294
|
+
} | undefined;
|
238
295
|
delete?: {
|
239
296
|
entity?: string[] | undefined;
|
240
297
|
id?: string[] | undefined;
|
@@ -400,6 +457,79 @@ declare class ProcessorServiceImpl implements ProcessorServiceImplementation {
|
|
400
457
|
configUpdated?: boolean | undefined;
|
401
458
|
error?: string | undefined;
|
402
459
|
} | undefined;
|
460
|
+
timeseriesResult?: {
|
461
|
+
metadata?: {
|
462
|
+
address?: string | undefined;
|
463
|
+
contractName?: string | undefined;
|
464
|
+
blockNumber?: bigint | undefined;
|
465
|
+
transactionHash?: string | undefined;
|
466
|
+
chainId?: string | undefined;
|
467
|
+
transactionIndex?: number | undefined;
|
468
|
+
logIndex?: number | undefined;
|
469
|
+
name?: string | undefined;
|
470
|
+
labels?: {
|
471
|
+
[x: string]: string | undefined;
|
472
|
+
} | undefined;
|
473
|
+
} | undefined;
|
474
|
+
type?: _sentio_protos.TimeseriesResult_TimeseriesType | undefined;
|
475
|
+
data?: {
|
476
|
+
fields?: {
|
477
|
+
[x: string]: {
|
478
|
+
nullValue?: _sentio_protos.RichValue_NullValue | undefined;
|
479
|
+
intValue?: number | undefined;
|
480
|
+
int64Value?: bigint | undefined;
|
481
|
+
floatValue?: number | undefined;
|
482
|
+
bytesValue?: Uint8Array | undefined;
|
483
|
+
boolValue?: boolean | undefined;
|
484
|
+
stringValue?: string | undefined;
|
485
|
+
timestampValue?: Date | undefined;
|
486
|
+
bigintValue?: {
|
487
|
+
negative?: boolean | undefined;
|
488
|
+
data?: Uint8Array | undefined;
|
489
|
+
} | undefined;
|
490
|
+
bigdecimalValue?: {
|
491
|
+
value?: {
|
492
|
+
negative?: boolean | undefined;
|
493
|
+
data?: Uint8Array | undefined;
|
494
|
+
} | undefined;
|
495
|
+
exp?: number | undefined;
|
496
|
+
} | undefined;
|
497
|
+
listValue?: {
|
498
|
+
values?: any[] | undefined;
|
499
|
+
} | undefined;
|
500
|
+
structValue?: any | undefined;
|
501
|
+
tokenValue?: {
|
502
|
+
token?: {
|
503
|
+
symbol?: string | undefined;
|
504
|
+
address?: {
|
505
|
+
address?: string | undefined;
|
506
|
+
chain?: string | undefined;
|
507
|
+
} | undefined;
|
508
|
+
} | undefined;
|
509
|
+
amount?: {
|
510
|
+
value?: {
|
511
|
+
negative?: boolean | undefined;
|
512
|
+
data?: Uint8Array | undefined;
|
513
|
+
} | undefined;
|
514
|
+
exp?: number | undefined;
|
515
|
+
} | undefined;
|
516
|
+
specifiedAt?: Date | undefined;
|
517
|
+
} | undefined;
|
518
|
+
} | undefined;
|
519
|
+
} | undefined;
|
520
|
+
} | undefined;
|
521
|
+
runtimeInfo?: {
|
522
|
+
from?: HandlerType | undefined;
|
523
|
+
} | undefined;
|
524
|
+
}[] | undefined;
|
525
|
+
} | undefined;
|
526
|
+
partitions?: {
|
527
|
+
partitions?: {
|
528
|
+
[x: number]: {
|
529
|
+
userValue?: string | undefined;
|
530
|
+
sysValue?: _sentio_protos.ProcessStreamResponse_Partitions_Partition_SysValue | undefined;
|
531
|
+
} | undefined;
|
532
|
+
} | undefined;
|
403
533
|
} | undefined;
|
404
534
|
}, void, undefined>;
|
405
535
|
handlePreprocessRequests(requests: AsyncIterable<PreprocessStreamRequest>, subject: Subject<DeepPartial$1<PreprocessStreamResponse>>): Promise<void>;
|
@@ -464,6 +594,59 @@ declare class ProcessorServiceImpl implements ProcessorServiceImplementation {
|
|
464
594
|
} | undefined;
|
465
595
|
}[] | undefined;
|
466
596
|
} | undefined;
|
597
|
+
update?: {
|
598
|
+
entity?: string[] | undefined;
|
599
|
+
id?: string[] | undefined;
|
600
|
+
entityData?: {
|
601
|
+
fields?: {
|
602
|
+
[x: string]: {
|
603
|
+
value?: {
|
604
|
+
nullValue?: _sentio_protos.RichValue_NullValue | undefined;
|
605
|
+
intValue?: number | undefined;
|
606
|
+
int64Value?: bigint | undefined;
|
607
|
+
floatValue?: number | undefined;
|
608
|
+
bytesValue?: Uint8Array | undefined;
|
609
|
+
boolValue?: boolean | undefined;
|
610
|
+
stringValue?: string | undefined;
|
611
|
+
timestampValue?: Date | undefined;
|
612
|
+
bigintValue?: {
|
613
|
+
negative?: boolean | undefined;
|
614
|
+
data?: Uint8Array | undefined;
|
615
|
+
} | undefined;
|
616
|
+
bigdecimalValue?: {
|
617
|
+
value?: {
|
618
|
+
negative?: boolean | undefined;
|
619
|
+
data?: Uint8Array | undefined;
|
620
|
+
} | undefined;
|
621
|
+
exp?: number | undefined;
|
622
|
+
} | undefined;
|
623
|
+
listValue?: {
|
624
|
+
values?: any[] | undefined;
|
625
|
+
} | undefined;
|
626
|
+
structValue?: any | undefined;
|
627
|
+
tokenValue?: {
|
628
|
+
token?: {
|
629
|
+
symbol?: string | undefined;
|
630
|
+
address?: {
|
631
|
+
address?: string | undefined;
|
632
|
+
chain?: string | undefined;
|
633
|
+
} | undefined;
|
634
|
+
} | undefined;
|
635
|
+
amount?: {
|
636
|
+
value?: {
|
637
|
+
negative?: boolean | undefined;
|
638
|
+
data?: Uint8Array | undefined;
|
639
|
+
} | undefined;
|
640
|
+
exp?: number | undefined;
|
641
|
+
} | undefined;
|
642
|
+
specifiedAt?: Date | undefined;
|
643
|
+
} | undefined;
|
644
|
+
} | undefined;
|
645
|
+
op?: _sentio_protos.EntityUpdateData_Operator | undefined;
|
646
|
+
} | undefined;
|
647
|
+
} | undefined;
|
648
|
+
}[] | undefined;
|
649
|
+
} | undefined;
|
467
650
|
delete?: {
|
468
651
|
entity?: string[] | undefined;
|
469
652
|
id?: string[] | undefined;
|
@@ -482,7 +665,10 @@ declare class ProcessorServiceImpl implements ProcessorServiceImplementation {
|
|
482
665
|
} | undefined;
|
483
666
|
} | undefined;
|
484
667
|
}, void, undefined>;
|
668
|
+
private dbContexts;
|
485
669
|
protected handleRequests(requests: AsyncIterable<ProcessStreamRequest>, subject: Subject<DeepPartial$1<ProcessStreamResponse>>): Promise<void>;
|
670
|
+
handleRequest(request: ProcessStreamRequest, lastBinding: DataBinding | undefined, subject: Subject<DeepPartial$1<ProcessStreamResponse>>): Promise<void>;
|
671
|
+
private startProcess;
|
486
672
|
}
|
487
673
|
declare function recordRuntimeInfo(results: ProcessResult, handlerType: HandlerType): void;
|
488
674
|
|
@@ -568,24 +754,28 @@ declare const dbMetrics: {
|
|
568
754
|
upsert: C;
|
569
755
|
list: C;
|
570
756
|
delete: C;
|
757
|
+
update: C;
|
571
758
|
};
|
572
759
|
recv_counts: {
|
573
760
|
get: C;
|
574
761
|
upsert: C;
|
575
762
|
list: C;
|
576
763
|
delete: C;
|
764
|
+
update: C;
|
577
765
|
};
|
578
766
|
request_times: {
|
579
767
|
get: C;
|
580
768
|
upsert: C;
|
581
769
|
list: C;
|
582
770
|
delete: C;
|
771
|
+
update: C;
|
583
772
|
};
|
584
773
|
request_errors: {
|
585
774
|
get: C;
|
586
775
|
upsert: C;
|
587
776
|
list: C;
|
588
777
|
delete: C;
|
778
|
+
update: C;
|
589
779
|
};
|
590
780
|
batched_total_count: C;
|
591
781
|
batched_request_count: C;
|
@@ -681,4 +871,4 @@ declare const processMetrics: {
|
|
681
871
|
};
|
682
872
|
declare const metricsStorage: AsyncLocalStorage<string>;
|
683
873
|
|
684
|
-
export { AbstractStoreContext, type ChainConfig, DummyProvider, Endpoints, GLOBAL_CONFIG, type GlobalConfig, type IStoreContext, ListStateStorage, MapStateStorage, Plugin, PluginManager, ProcessorServiceImpl, QueuedStaticJsonRpcProvider, type Semver, State, StateStorage, StoreContext, TemplateInstanceState, USER_PROCESSOR, compareSemver, configureEndpoints, dbMetrics, errorString, getProvider, makeEthCallKey, mergeProcessResults, metricsStorage, parseSemver, processMetrics, providerMetrics, recordRuntimeInfo, timeoutError };
|
874
|
+
export { AbstractStoreContext, type ChainConfig, DummyProvider, Endpoints, GLOBAL_CONFIG, type GlobalConfig, type IStoreContext, ListStateStorage, MapStateStorage, Plugin, PluginManager, ProcessorServiceImpl, QueuedStaticJsonRpcProvider, type Semver, State, StateStorage, StoreContext, TemplateInstanceState, USER_PROCESSOR, compareSemver, configureEndpoints, dbMetrics, errorString, getProvider, makeEthCallKey, mergeProcessResults, mergeProcessResultsInPlace, metricsStorage, parseSemver, processMetrics, providerMetrics, recordRuntimeInfo, timeoutError };
|
package/lib/index.js
CHANGED
@@ -1,72 +1,3 @@
|
|
1
1
|
import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
|
2
|
-
import {
|
3
|
-
ListStateStorage,
|
4
|
-
MapStateStorage,
|
5
|
-
State,
|
6
|
-
StateStorage,
|
7
|
-
TemplateInstanceState
|
8
|
-
} from "./chunk-6XHWJ2VS.js";
|
9
|
-
import {
|
10
|
-
AbstractStoreContext,
|
11
|
-
DummyProvider,
|
12
|
-
Endpoints,
|
13
|
-
GLOBAL_CONFIG,
|
14
|
-
ProcessorServiceImpl,
|
15
|
-
QueuedStaticJsonRpcProvider,
|
16
|
-
StoreContext,
|
17
|
-
USER_PROCESSOR,
|
18
|
-
compareSemver,
|
19
|
-
configureEndpoints,
|
20
|
-
dbMetrics,
|
21
|
-
errorString,
|
22
|
-
getProvider,
|
23
|
-
makeEthCallKey,
|
24
|
-
mergeProcessResults,
|
25
|
-
metricsStorage,
|
26
|
-
parseSemver,
|
27
|
-
processMetrics,
|
28
|
-
providerMetrics,
|
29
|
-
recordRuntimeInfo,
|
30
|
-
timeoutError
|
31
|
-
} from "./chunk-J23VJQSB.js";
|
32
|
-
import {
|
33
|
-
Plugin,
|
34
|
-
PluginManager
|
35
|
-
} from "./chunk-3T4PWGQU.js";
|
36
|
-
|
37
|
-
// src/chain-config.ts
|
38
|
-
import("node:process").then((p) => p.stdout.write(""));
|
39
|
-
|
40
|
-
// src/index.ts
|
41
|
-
import("node:process").then((p) => p.stdout.write(""));
|
42
|
-
export {
|
43
|
-
AbstractStoreContext,
|
44
|
-
DummyProvider,
|
45
|
-
Endpoints,
|
46
|
-
GLOBAL_CONFIG,
|
47
|
-
ListStateStorage,
|
48
|
-
MapStateStorage,
|
49
|
-
Plugin,
|
50
|
-
PluginManager,
|
51
|
-
ProcessorServiceImpl,
|
52
|
-
QueuedStaticJsonRpcProvider,
|
53
|
-
State,
|
54
|
-
StateStorage,
|
55
|
-
StoreContext,
|
56
|
-
TemplateInstanceState,
|
57
|
-
USER_PROCESSOR,
|
58
|
-
compareSemver,
|
59
|
-
configureEndpoints,
|
60
|
-
dbMetrics,
|
61
|
-
errorString,
|
62
|
-
getProvider,
|
63
|
-
makeEthCallKey,
|
64
|
-
mergeProcessResults,
|
65
|
-
metricsStorage,
|
66
|
-
parseSemver,
|
67
|
-
processMetrics,
|
68
|
-
providerMetrics,
|
69
|
-
recordRuntimeInfo,
|
70
|
-
timeoutError
|
71
|
-
};
|
2
|
+
import{a as p,b as f,c as i,d as m,e as n}from"./chunk-WHWNPZZ3.js";import{$ as B,P as u,Q as w,R as I,S as L,T as O,U as b,V as c,Y as v,Z as y,_ as A,a as x,aa as D,b as s,c as C,d as a,e as g,f as h,g as G,i as d,j as l,r as o}from"./chunk-UWKXTTDA.js";import{t,u as e}from"./chunk-VUN3TGG5.js";import("node:process").then(r=>r.stdout.write(""));import("node:process").then(r=>r.stdout.write(""));export{b as AbstractStoreContext,v as DummyProvider,d as Endpoints,o as GLOBAL_CONFIG,m as ListStateStorage,i as MapStateStorage,t as Plugin,e as PluginManager,B as ProcessorServiceImpl,A as QueuedStaticJsonRpcProvider,p as State,f as StateStorage,c as StoreContext,n as TemplateInstanceState,a as USER_PROCESSOR,G as compareSemver,l as configureEndpoints,u as dbMetrics,C as errorString,y as getProvider,g as makeEthCallKey,x as mergeProcessResults,s as mergeProcessResultsInPlace,L as metricsStorage,h as parseSemver,I as processMetrics,w as providerMetrics,D as recordRuntimeInfo,O as timeoutError};
|
72
3
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/chain-config.ts","../src/index.ts"],"sourcesContent":["export interface ChainConfig {\n ChainID: string\n Https?: string[]\n ChainServer?: string\n}\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));","export * from './plugin.js'\nexport * from './state.js'\nexport * from './utils.js'\nexport * from './endpoints.js'\nexport * from './chain-config.js'\nexport * from './service.js'\nexport { GLOBAL_CONFIG, type GlobalConfig } from './global-config.js'\nexport * from './db-context.js'\nexport * from './provider.js'\nexport * from './metrics.js'\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));"],"mappings":"
|
1
|
+
{"version":3,"sources":["../src/chain-config.ts","../src/index.ts"],"sourcesContent":["export interface ChainConfig {\n ChainID: string\n Https?: string[]\n ChainServer?: string\n}\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));","export * from './plugin.js'\nexport * from './state.js'\nexport * from './utils.js'\nexport * from './endpoints.js'\nexport * from './chain-config.js'\nexport * from './service.js'\nexport { GLOBAL_CONFIG, type GlobalConfig } from './global-config.js'\nexport * from './db-context.js'\nexport * from './provider.js'\nexport * from './metrics.js'\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));"],"mappings":";0SAKC,OAAO,cAAc,EAAE,KAAMA,GAAMA,EAAE,OAAO,MAAM,EAAE,CAAC,ECKrD,OAAO,cAAc,EAAE,KAAMC,GAAMA,EAAE,OAAO,MAAM,EAAE,CAAC","names":["p","p"]}
|