@sentio/runtime 2.59.0-rc.35 → 2.59.0-rc.37

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.
@@ -10,7 +10,7 @@ import {
10
10
  recordRuntimeInfo,
11
11
  require_lib3 as require_lib,
12
12
  require_lib4 as require_lib2
13
- } from "./chunk-QWKQ7U4H.js";
13
+ } from "./chunk-NVQB62KF.js";
14
14
  import {
15
15
  PluginManager,
16
16
  ProcessConfigResponse,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentio/runtime",
3
- "version": "2.59.0-rc.35",
3
+ "version": "2.59.0-rc.37",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
package/src/db-context.ts CHANGED
@@ -131,7 +131,8 @@ export abstract class AbstractStoreContext implements IStoreContext {
131
131
  }
132
132
 
133
133
  error(processId: number, e: any) {
134
- console.error('process error', processId, e)
134
+ const stack = new Error().stack
135
+ console.error('process error', processId, e, stack)
135
136
  const errorResult = ProcessResult.create({
136
137
  states: {
137
138
  error: e?.toString()
@@ -265,7 +265,8 @@ export class ChannelStoreContext implements IStoreContext {
265
265
  }
266
266
 
267
267
  error(processId: number, e: any): void {
268
- console.error('process error', processId, e)
268
+ const stack = new Error().stack
269
+ console.error('process error', processId, e, stack)
269
270
  const errorResult = ProcessResult.create({
270
271
  states: {
271
272
  error: e?.toString()
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 = res.counters.concat(r.counters)
16
- res.gauges = res.gauges.concat(r.gauges)
17
- res.events = res.events.concat(r.events)
18
- res.exports = res.exports.concat(r.exports)
19
- res.timeseriesResult = res.timeseriesResult.concat(r.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
  }