@sentio/runtime 2.54.0-rc.1 → 2.54.0-rc.10
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-ELCJQA22.js +131 -0
- package/lib/{chunk-TFBOZ4CH.js.map → chunk-ELCJQA22.js.map} +1 -1
- package/lib/index.js +1 -1
- package/lib/processor-runner.js +38 -38
- package/lib/processor-runner.js.map +1 -1
- package/package.json +1 -1
- package/src/full-service.ts +24 -5
- package/src/gen/processor/protos/processor.ts +385 -9
- package/src/gen/service/common/protos/common.ts +255 -10
- package/lib/chunk-TFBOZ4CH.js +0 -131
package/package.json
CHANGED
package/src/full-service.ts
CHANGED
@@ -1,19 +1,17 @@
|
|
1
1
|
import { CallContext } from 'nice-grpc'
|
2
2
|
import { createRequire } from 'module'
|
3
|
-
const require = createRequire(import.meta.url)
|
4
|
-
|
5
3
|
// Different than the simple one which
|
6
4
|
import {
|
7
5
|
DataBinding,
|
6
|
+
ExecutionConfig,
|
8
7
|
HandlerType,
|
9
8
|
PreprocessStreamRequest,
|
10
9
|
ProcessBindingsRequest,
|
11
|
-
ProcessStreamRequest,
|
12
10
|
ProcessConfigRequest,
|
13
11
|
ProcessorServiceImplementation,
|
14
|
-
StartRequest,
|
15
12
|
ProcessResult,
|
16
|
-
|
13
|
+
ProcessStreamRequest,
|
14
|
+
StartRequest
|
17
15
|
} from './gen/processor/protos/processor.js'
|
18
16
|
|
19
17
|
import { Empty } from '@sentio/protos'
|
@@ -22,6 +20,8 @@ import path from 'path'
|
|
22
20
|
import os from 'os'
|
23
21
|
import { GLOBAL_CONFIG } from './global-config.js'
|
24
22
|
|
23
|
+
const require = createRequire(import.meta.url)
|
24
|
+
|
25
25
|
function locatePackageJson(pkgId: string) {
|
26
26
|
const m = require.resolve(pkgId)
|
27
27
|
|
@@ -43,10 +43,12 @@ export class FullProcessorServiceImpl implements ProcessorServiceImplementation
|
|
43
43
|
|
44
44
|
const version = sdkPackageJson.version.split('.')
|
45
45
|
this.sdkMinorVersion = parseInt(version[1])
|
46
|
+
this.patchVersion = version[2]
|
46
47
|
}
|
47
48
|
|
48
49
|
instance: ProcessorServiceImplementation
|
49
50
|
sdkMinorVersion: number
|
51
|
+
patchVersion: string
|
50
52
|
|
51
53
|
async getConfig(request: ProcessConfigRequest, context: CallContext) {
|
52
54
|
const config = await this.instance.getConfig(request, context)
|
@@ -129,6 +131,23 @@ export class FullProcessorServiceImpl implements ProcessorServiceImplementation
|
|
129
131
|
return
|
130
132
|
}
|
131
133
|
switch (dataBinding.handlerType) {
|
134
|
+
case HandlerType.FUEL_TRANSACTION:
|
135
|
+
if (this.sdkMinorVersion <= 54 && this.patchVersion < 'rc.7') {
|
136
|
+
dataBinding.handlerType = HandlerType.FUEL_CALL
|
137
|
+
if (dataBinding.data) {
|
138
|
+
dataBinding.data.fuelCall = dataBinding.data?.fuelTransaction
|
139
|
+
}
|
140
|
+
}
|
141
|
+
break
|
142
|
+
case HandlerType.FUEL_RECEIPT:
|
143
|
+
if (this.sdkMinorVersion <= 54 && this.patchVersion < 'rc.7') {
|
144
|
+
dataBinding.handlerType = HandlerType.FUEL_CALL
|
145
|
+
if (dataBinding.data) {
|
146
|
+
dataBinding.data.fuelCall = dataBinding.data?.fuelLog
|
147
|
+
}
|
148
|
+
}
|
149
|
+
|
150
|
+
break
|
132
151
|
case HandlerType.APT_EVENT:
|
133
152
|
if (dataBinding.data?.aptEvent) {
|
134
153
|
if (dataBinding.data.aptEvent.rawTransaction && !dataBinding.data.aptEvent.transaction) {
|