@sentio/runtime 2.59.0-rc.34 → 2.59.0-rc.36
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-QWKQ7U4H.js → chunk-OS67OWYG.js} +11 -6
- package/lib/{chunk-QWKQ7U4H.js.map → chunk-OS67OWYG.js.map} +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +3 -1
- package/lib/index.js.map +1 -1
- package/lib/processor-runner.js +1 -1
- package/lib/service-worker.js +1 -1
- package/package.json +1 -1
- package/src/utils.ts +12 -5
package/lib/index.d.ts
CHANGED
@@ -127,6 +127,7 @@ declare class TemplateInstanceState extends ListStateStorage<TemplateInstance> {
|
|
127
127
|
}
|
128
128
|
|
129
129
|
declare function mergeProcessResults(results: ProcessResult[]): Required<ProcessResult, 'states'>;
|
130
|
+
declare function mergeProcessResultsInPlace(res: ProcessResult, results: ProcessResult[]): Required<ProcessResult, 'states'>;
|
130
131
|
declare function errorString(e: Error): string;
|
131
132
|
declare const USER_PROCESSOR = "user_processor";
|
132
133
|
declare function makeEthCallKey(param: EthCallParam): string;
|
@@ -1292,4 +1293,4 @@ declare const processMetrics: {
|
|
1292
1293
|
};
|
1293
1294
|
declare const metricsStorage: AsyncLocalStorage<string>;
|
1294
1295
|
|
1295
|
-
export { AbstractStoreContext, type ChainConfig, DataBinding, Data_EthBlock, Data_EthLog, Data_EthTrace, Data_EthTransaction, 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 };
|
1296
|
+
export { AbstractStoreContext, type ChainConfig, DataBinding, Data_EthBlock, Data_EthLog, Data_EthTrace, Data_EthTransaction, 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
@@ -22,13 +22,14 @@ import {
|
|
22
22
|
getProvider,
|
23
23
|
makeEthCallKey,
|
24
24
|
mergeProcessResults,
|
25
|
+
mergeProcessResultsInPlace,
|
25
26
|
metricsStorage,
|
26
27
|
parseSemver,
|
27
28
|
processMetrics,
|
28
29
|
providerMetrics,
|
29
30
|
recordRuntimeInfo,
|
30
31
|
timeoutError
|
31
|
-
} from "./chunk-
|
32
|
+
} from "./chunk-OS67OWYG.js";
|
32
33
|
import {
|
33
34
|
Plugin,
|
34
35
|
PluginManager
|
@@ -62,6 +63,7 @@ export {
|
|
62
63
|
getProvider,
|
63
64
|
makeEthCallKey,
|
64
65
|
mergeProcessResults,
|
66
|
+
mergeProcessResultsInPlace,
|
65
67
|
metricsStorage,
|
66
68
|
parseSemver,
|
67
69
|
processMetrics,
|
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'\nexport {\n type DataBinding,\n type Data_EthLog,\n type Data_EthBlock,\n type Data_EthTransaction,\n type Data_EthTrace\n} from './gen/processor/protos/processor.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'\nexport {\n type DataBinding,\n type Data_EthLog,\n type Data_EthBlock,\n type Data_EthTransaction,\n type Data_EthTrace\n} from './gen/processor/protos/processor.js'\n;import(\"node:process\").then((p) => p.stdout.write(\"\"));"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKC,OAAO,cAAc,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,MAAM,EAAE,CAAC;;;ACYrD,OAAO,cAAc,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,MAAM,EAAE,CAAC;","names":[]}
|
package/lib/processor-runner.js
CHANGED
package/lib/service-worker.js
CHANGED
package/package.json
CHANGED
package/src/utils.ts
CHANGED
@@ -10,13 +10,20 @@ export function mergeProcessResults(results: ProcessResult[]): Required<ProcessR
|
|
10
10
|
...ProcessResultFull.create(),
|
11
11
|
states: StateResult.create()
|
12
12
|
}
|
13
|
+
return mergeProcessResultsInPlace(res, results)
|
14
|
+
}
|
13
15
|
|
16
|
+
export function mergeProcessResultsInPlace(
|
17
|
+
res: ProcessResult,
|
18
|
+
results: ProcessResult[]
|
19
|
+
): Required<ProcessResult, 'states'> {
|
20
|
+
res.states = res.states || StateResult.create()
|
14
21
|
for (const r of results) {
|
15
|
-
res.counters
|
16
|
-
res.gauges
|
17
|
-
res.events
|
18
|
-
res.exports
|
19
|
-
res.timeseriesResult
|
22
|
+
res.counters.push(...r.counters)
|
23
|
+
res.gauges.push(...r.gauges)
|
24
|
+
res.events.push(...r.events)
|
25
|
+
res.exports.push(...r.exports)
|
26
|
+
res.timeseriesResult.push(...r.timeseriesResult)
|
20
27
|
res.states = {
|
21
28
|
configUpdated: res.states?.configUpdated || r.states?.configUpdated || false
|
22
29
|
}
|