@sentio/runtime 2.49.0-rc.1 → 2.49.0-rc.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentio/runtime",
3
- "version": "2.49.0-rc.1",
3
+ "version": "2.49.0-rc.3",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -107,18 +107,27 @@ export class FullProcessorServiceImpl implements ProcessorServiceImplementation
107
107
  }
108
108
  }
109
109
 
110
+ async *adjustBindingsStream(requests: AsyncIterable<ProcessStreamRequest>): AsyncIterable<ProcessStreamRequest> {
111
+ for await (const request of requests) {
112
+ this.adjustDataBinding(request.binding)
113
+ yield request
114
+ }
115
+ }
116
+
110
117
  async *processBindingsStream(requests: AsyncIterable<ProcessStreamRequest>, context: CallContext) {
111
- // throw new Error('Not Implemented for streaming')
112
- yield* this.instance.processBindingsStream(requests, context)
118
+ yield* this.instance.processBindingsStream(this.adjustBindingsStream(requests), context)
113
119
  }
114
120
 
115
121
  async *preprocessBindingsStream(requests: AsyncIterable<PreprocessStreamRequest>, context: CallContext) {
116
- yield* this.instance.preprocessBindingsStream(requests, context)
122
+ yield* this.instance.preprocessBindingsStream(this.adjustBindingsStream(requests), context)
117
123
  }
118
124
 
119
125
  private adjustResult(res: ProcessResult): void {}
120
126
 
121
- private adjustDataBinding(dataBinding: DataBinding): void {
127
+ private adjustDataBinding(dataBinding?: DataBinding): void {
128
+ if (!dataBinding) {
129
+ return
130
+ }
122
131
  switch (dataBinding.handlerType) {
123
132
  case HandlerType.APT_EVENT:
124
133
  if (dataBinding.data?.aptEvent) {