@sentio/runtime 2.37.3-rc.2 → 2.37.3-rc.4

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.37.3-rc.2",
3
+ "version": "2.37.3-rc.4",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -32,7 +32,7 @@
32
32
  "rxjs": "^7.8.1",
33
33
  "utility-types": "^3.11.0",
34
34
  "winston": "^3.11.0",
35
- "@sentio/protos": "2.37.3-rc.2"
35
+ "@sentio/protos": "2.37.3-rc.4"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/command-line-args": "^5.2.3",
package/src/db-context.ts CHANGED
@@ -36,6 +36,8 @@ export class StoreContext {
36
36
  if (defer) {
37
37
  if (dbResult.error) {
38
38
  defer.reject(dbResult.error)
39
+ } else if (dbResult.list) {
40
+ defer.reject(dbResult.list)
39
41
  } else {
40
42
  defer.resolve(dbResult.data)
41
43
  }
@@ -3,7 +3,7 @@ import Long from "long";
3
3
  import type { CallContext, CallOptions } from "nice-grpc-common";
4
4
  import _m0 from "protobufjs/minimal.js";
5
5
  import { Empty } from "../../google/protobuf/empty.js";
6
- import { Struct } from "../../google/protobuf/struct.js";
6
+ import { ListValue, Struct } from "../../google/protobuf/struct.js";
7
7
  import { Timestamp } from "../../google/protobuf/timestamp.js";
8
8
  import { CoinID } from "../../service/common/protos/common.js";
9
9
 
@@ -741,6 +741,7 @@ export interface ProcessStreamResponse {
741
741
  export interface DBResponse {
742
742
  opId: bigint;
743
743
  data?: { [key: string]: any } | undefined;
744
+ list?: Array<any> | undefined;
744
745
  error?: string | undefined;
745
746
  }
746
747
 
@@ -5676,7 +5677,7 @@ export const ProcessStreamResponse = {
5676
5677
  };
5677
5678
 
5678
5679
  function createBaseDBResponse(): DBResponse {
5679
- return { opId: BigInt("0"), data: undefined, error: undefined };
5680
+ return { opId: BigInt("0"), data: undefined, list: undefined, error: undefined };
5680
5681
  }
5681
5682
 
5682
5683
  export const DBResponse = {
@@ -5690,6 +5691,9 @@ export const DBResponse = {
5690
5691
  if (message.data !== undefined) {
5691
5692
  Struct.encode(Struct.wrap(message.data), writer.uint32(18).fork()).ldelim();
5692
5693
  }
5694
+ if (message.list !== undefined) {
5695
+ ListValue.encode(ListValue.wrap(message.list), writer.uint32(34).fork()).ldelim();
5696
+ }
5693
5697
  if (message.error !== undefined) {
5694
5698
  writer.uint32(26).string(message.error);
5695
5699
  }
@@ -5717,6 +5721,13 @@ export const DBResponse = {
5717
5721
 
5718
5722
  message.data = Struct.unwrap(Struct.decode(reader, reader.uint32()));
5719
5723
  continue;
5724
+ case 4:
5725
+ if (tag !== 34) {
5726
+ break;
5727
+ }
5728
+
5729
+ message.list = ListValue.unwrap(ListValue.decode(reader, reader.uint32()));
5730
+ continue;
5720
5731
  case 3:
5721
5732
  if (tag !== 26) {
5722
5733
  break;
@@ -5737,6 +5748,7 @@ export const DBResponse = {
5737
5748
  return {
5738
5749
  opId: isSet(object.opId) ? BigInt(object.opId) : BigInt("0"),
5739
5750
  data: isObject(object.data) ? object.data : undefined,
5751
+ list: globalThis.Array.isArray(object.list) ? [...object.list] : undefined,
5740
5752
  error: isSet(object.error) ? globalThis.String(object.error) : undefined,
5741
5753
  };
5742
5754
  },
@@ -5749,6 +5761,9 @@ export const DBResponse = {
5749
5761
  if (message.data !== undefined) {
5750
5762
  obj.data = message.data;
5751
5763
  }
5764
+ if (message.list !== undefined) {
5765
+ obj.list = message.list;
5766
+ }
5752
5767
  if (message.error !== undefined) {
5753
5768
  obj.error = message.error;
5754
5769
  }
@@ -5762,6 +5777,7 @@ export const DBResponse = {
5762
5777
  const message = createBaseDBResponse();
5763
5778
  message.opId = object.opId ?? BigInt("0");
5764
5779
  message.data = object.data ?? undefined;
5780
+ message.list = object.list ?? undefined;
5765
5781
  message.error = object.error ?? undefined;
5766
5782
  return message;
5767
5783
  },