starpc 0.32.9 → 0.32.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.
@@ -1,5 +1,5 @@
1
- import type { MessageType } from "@aptre/protobuf-es-lite";
2
- import { Message } from "@aptre/protobuf-es-lite";
1
+ import type { MessageType } from '@aptre/protobuf-es-lite';
2
+ import { Message } from '@aptre/protobuf-es-lite';
3
3
  export declare const protobufPackage = "e2e.mock";
4
4
  /**
5
5
  * MockMsg is the mock message body.
@@ -1,13 +1,13 @@
1
1
  // @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"
2
2
  // @generated from file github.com/aperturerobotics/starpc/e2e/mock/mock.proto (package e2e.mock, syntax proto3)
3
3
  /* eslint-disable */
4
- import { createMessageType, ScalarType } from "@aptre/protobuf-es-lite";
5
- export const protobufPackage = "e2e.mock";
4
+ import { createMessageType, ScalarType } from '@aptre/protobuf-es-lite';
5
+ export const protobufPackage = 'e2e.mock';
6
6
  // MockMsg contains the message type declaration for MockMsg.
7
7
  export const MockMsg = createMessageType({
8
- typeName: "e2e.mock.MockMsg",
8
+ typeName: 'e2e.mock.MockMsg',
9
9
  fields: [
10
- { no: 1, name: "body", kind: "scalar", T: ScalarType.STRING },
10
+ { no: 1, name: 'body', kind: 'scalar', T: ScalarType.STRING },
11
11
  ],
12
12
  packedByDefault: true,
13
13
  });
@@ -1,6 +1,6 @@
1
- import { MockMsg } from "./mock.pb.js";
2
- import { Message, MethodKind } from "@aptre/protobuf-es-lite";
3
- import { ProtoRpc } from "starpc";
1
+ import { MockMsg } from './mock.pb.js';
2
+ import { Message, MethodKind } from '@aptre/protobuf-es-lite';
3
+ import { ProtoRpc } from 'starpc';
4
4
  /**
5
5
  * Mock service mocks some RPCs for the e2e tests.
6
6
  *
@@ -1,15 +1,15 @@
1
1
  // @generated by protoc-gen-es-starpc none with parameter "target=ts,ts_nocheck=false"
2
2
  // @generated from file github.com/aperturerobotics/starpc/e2e/mock/mock.proto (package e2e.mock, syntax proto3)
3
3
  /* eslint-disable */
4
- import { MockMsg } from "./mock.pb.js";
5
- import { MethodKind } from "@aptre/protobuf-es-lite";
4
+ import { MockMsg } from './mock.pb.js';
5
+ import { MethodKind } from '@aptre/protobuf-es-lite';
6
6
  /**
7
7
  * Mock service mocks some RPCs for the e2e tests.
8
8
  *
9
9
  * @generated from service e2e.mock.Mock
10
10
  */
11
11
  export const MockDefinition = {
12
- typeName: "e2e.mock.Mock",
12
+ typeName: 'e2e.mock.Mock',
13
13
  methods: {
14
14
  /**
15
15
  * MockRequest runs a mock unary request.
@@ -17,12 +17,12 @@ export const MockDefinition = {
17
17
  * @generated from rpc e2e.mock.Mock.MockRequest
18
18
  */
19
19
  MockRequest: {
20
- name: "MockRequest",
20
+ name: 'MockRequest',
21
21
  I: MockMsg,
22
22
  O: MockMsg,
23
23
  kind: MethodKind.Unary,
24
24
  },
25
- }
25
+ },
26
26
  };
27
27
  export const MockServiceName = MockDefinition.typeName;
28
28
  export class MockClient {
@@ -1,5 +1,5 @@
1
- import type { MessageType } from "@aptre/protobuf-es-lite";
2
- import { Message } from "@aptre/protobuf-es-lite";
1
+ import type { MessageType } from '@aptre/protobuf-es-lite';
2
+ import { Message } from '@aptre/protobuf-es-lite';
3
3
  export declare const protobufPackage = "echo";
4
4
  /**
5
5
  * EchoMsg is the message body for Echo.
@@ -1,13 +1,13 @@
1
1
  // @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"
2
2
  // @generated from file github.com/aperturerobotics/starpc/echo/echo.proto (package echo, syntax proto3)
3
3
  /* eslint-disable */
4
- import { createMessageType, ScalarType } from "@aptre/protobuf-es-lite";
5
- export const protobufPackage = "echo";
4
+ import { createMessageType, ScalarType } from '@aptre/protobuf-es-lite';
5
+ export const protobufPackage = 'echo';
6
6
  // EchoMsg contains the message type declaration for EchoMsg.
7
7
  export const EchoMsg = createMessageType({
8
- typeName: "echo.EchoMsg",
8
+ typeName: 'echo.EchoMsg',
9
9
  fields: [
10
- { no: 1, name: "body", kind: "scalar", T: ScalarType.STRING },
10
+ { no: 1, name: 'body', kind: 'scalar', T: ScalarType.STRING },
11
11
  ],
12
12
  packedByDefault: true,
13
13
  });
@@ -1,5 +1,5 @@
1
- import type { MessageType } from "@aptre/protobuf-es-lite";
2
- import { Message } from "@aptre/protobuf-es-lite";
1
+ import type { MessageType } from '@aptre/protobuf-es-lite';
2
+ import { Message } from '@aptre/protobuf-es-lite';
3
3
  export declare const protobufPackage = "rpcstream";
4
4
  /**
5
5
  * RpcStreamInit is the first message in a RPC stream.
@@ -49,7 +49,7 @@ export type RpcStreamPacket = Message<{
49
49
  * @generated from field: rpcstream.RpcStreamInit init = 1;
50
50
  */
51
51
  value: RpcStreamInit;
52
- case: "init";
52
+ case: 'init';
53
53
  } | {
54
54
  /**
55
55
  * Ack is sent in response to Init.
@@ -58,7 +58,7 @@ export type RpcStreamPacket = Message<{
58
58
  * @generated from field: rpcstream.RpcAck ack = 2;
59
59
  */
60
60
  value: RpcAck;
61
- case: "ack";
61
+ case: 'ack';
62
62
  } | {
63
63
  /**
64
64
  * Data is the encapsulated data packet.
@@ -66,7 +66,7 @@ export type RpcStreamPacket = Message<{
66
66
  * @generated from field: bytes data = 3;
67
67
  */
68
68
  value: Uint8Array;
69
- case: "data";
69
+ case: 'data';
70
70
  };
71
71
  }>;
72
72
  export declare const RpcStreamPacket: MessageType<RpcStreamPacket>;
@@ -1,31 +1,37 @@
1
1
  // @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"
2
2
  // @generated from file github.com/aperturerobotics/starpc/rpcstream/rpcstream.proto (package rpcstream, syntax proto3)
3
3
  /* eslint-disable */
4
- import { createMessageType, ScalarType } from "@aptre/protobuf-es-lite";
5
- export const protobufPackage = "rpcstream";
4
+ import { createMessageType, ScalarType } from '@aptre/protobuf-es-lite';
5
+ export const protobufPackage = 'rpcstream';
6
6
  // RpcStreamInit contains the message type declaration for RpcStreamInit.
7
7
  export const RpcStreamInit = createMessageType({
8
- typeName: "rpcstream.RpcStreamInit",
8
+ typeName: 'rpcstream.RpcStreamInit',
9
9
  fields: [
10
- { no: 1, name: "component_id", kind: "scalar", T: ScalarType.STRING },
10
+ { no: 1, name: 'component_id', kind: 'scalar', T: ScalarType.STRING },
11
11
  ],
12
12
  packedByDefault: true,
13
13
  });
14
14
  // RpcAck contains the message type declaration for RpcAck.
15
15
  export const RpcAck = createMessageType({
16
- typeName: "rpcstream.RpcAck",
16
+ typeName: 'rpcstream.RpcAck',
17
17
  fields: [
18
- { no: 1, name: "error", kind: "scalar", T: ScalarType.STRING },
18
+ { no: 1, name: 'error', kind: 'scalar', T: ScalarType.STRING },
19
19
  ],
20
20
  packedByDefault: true,
21
21
  });
22
22
  // RpcStreamPacket contains the message type declaration for RpcStreamPacket.
23
23
  export const RpcStreamPacket = createMessageType({
24
- typeName: "rpcstream.RpcStreamPacket",
24
+ typeName: 'rpcstream.RpcStreamPacket',
25
25
  fields: [
26
- { no: 1, name: "init", kind: "message", T: () => RpcStreamInit, oneof: "body" },
27
- { no: 2, name: "ack", kind: "message", T: () => RpcAck, oneof: "body" },
28
- { no: 3, name: "data", kind: "scalar", T: ScalarType.BYTES, oneof: "body" },
26
+ {
27
+ no: 1,
28
+ name: 'init',
29
+ kind: 'message',
30
+ T: () => RpcStreamInit,
31
+ oneof: 'body',
32
+ },
33
+ { no: 2, name: 'ack', kind: 'message', T: () => RpcAck, oneof: 'body' },
34
+ { no: 3, name: 'data', kind: 'scalar', T: ScalarType.BYTES, oneof: 'body' },
29
35
  ],
30
36
  packedByDefault: true,
31
37
  });
@@ -1,5 +1,5 @@
1
- import type { MessageType } from "@aptre/protobuf-es-lite";
2
- import { Message } from "@aptre/protobuf-es-lite";
1
+ import type { MessageType } from '@aptre/protobuf-es-lite';
2
+ import { Message } from '@aptre/protobuf-es-lite';
3
3
  export declare const protobufPackage = "srpc";
4
4
  /**
5
5
  * CallStart requests starting a new RPC call.
@@ -90,7 +90,7 @@ export type Packet = Message<{
90
90
  * @generated from field: srpc.CallStart call_start = 1;
91
91
  */
92
92
  value: CallStart;
93
- case: "callStart";
93
+ case: 'callStart';
94
94
  } | {
95
95
  /**
96
96
  * CallData is a message in a streaming RPC sequence.
@@ -98,7 +98,7 @@ export type Packet = Message<{
98
98
  * @generated from field: srpc.CallData call_data = 2;
99
99
  */
100
100
  value: CallData;
101
- case: "callData";
101
+ case: 'callData';
102
102
  } | {
103
103
  /**
104
104
  * CallCancel cancels the call.
@@ -106,7 +106,7 @@ export type Packet = Message<{
106
106
  * @generated from field: bool call_cancel = 3;
107
107
  */
108
108
  value: boolean;
109
- case: "callCancel";
109
+ case: 'callCancel';
110
110
  };
111
111
  }>;
112
112
  export declare const Packet: MessageType<Packet>;
@@ -1,37 +1,55 @@
1
1
  // @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"
2
2
  // @generated from file github.com/aperturerobotics/starpc/srpc/rpcproto.proto (package srpc, syntax proto3)
3
3
  /* eslint-disable */
4
- import { createMessageType, ScalarType } from "@aptre/protobuf-es-lite";
5
- export const protobufPackage = "srpc";
4
+ import { createMessageType, ScalarType } from '@aptre/protobuf-es-lite';
5
+ export const protobufPackage = 'srpc';
6
6
  // CallStart contains the message type declaration for CallStart.
7
7
  export const CallStart = createMessageType({
8
- typeName: "srpc.CallStart",
8
+ typeName: 'srpc.CallStart',
9
9
  fields: [
10
- { no: 1, name: "rpc_service", kind: "scalar", T: ScalarType.STRING },
11
- { no: 2, name: "rpc_method", kind: "scalar", T: ScalarType.STRING },
12
- { no: 3, name: "data", kind: "scalar", T: ScalarType.BYTES },
13
- { no: 4, name: "data_is_zero", kind: "scalar", T: ScalarType.BOOL },
10
+ { no: 1, name: 'rpc_service', kind: 'scalar', T: ScalarType.STRING },
11
+ { no: 2, name: 'rpc_method', kind: 'scalar', T: ScalarType.STRING },
12
+ { no: 3, name: 'data', kind: 'scalar', T: ScalarType.BYTES },
13
+ { no: 4, name: 'data_is_zero', kind: 'scalar', T: ScalarType.BOOL },
14
14
  ],
15
15
  packedByDefault: true,
16
16
  });
17
17
  // CallData contains the message type declaration for CallData.
18
18
  export const CallData = createMessageType({
19
- typeName: "srpc.CallData",
19
+ typeName: 'srpc.CallData',
20
20
  fields: [
21
- { no: 1, name: "data", kind: "scalar", T: ScalarType.BYTES },
22
- { no: 2, name: "data_is_zero", kind: "scalar", T: ScalarType.BOOL },
23
- { no: 3, name: "complete", kind: "scalar", T: ScalarType.BOOL },
24
- { no: 4, name: "error", kind: "scalar", T: ScalarType.STRING },
21
+ { no: 1, name: 'data', kind: 'scalar', T: ScalarType.BYTES },
22
+ { no: 2, name: 'data_is_zero', kind: 'scalar', T: ScalarType.BOOL },
23
+ { no: 3, name: 'complete', kind: 'scalar', T: ScalarType.BOOL },
24
+ { no: 4, name: 'error', kind: 'scalar', T: ScalarType.STRING },
25
25
  ],
26
26
  packedByDefault: true,
27
27
  });
28
28
  // Packet contains the message type declaration for Packet.
29
29
  export const Packet = createMessageType({
30
- typeName: "srpc.Packet",
30
+ typeName: 'srpc.Packet',
31
31
  fields: [
32
- { no: 1, name: "call_start", kind: "message", T: () => CallStart, oneof: "body" },
33
- { no: 2, name: "call_data", kind: "message", T: () => CallData, oneof: "body" },
34
- { no: 3, name: "call_cancel", kind: "scalar", T: ScalarType.BOOL, oneof: "body" },
32
+ {
33
+ no: 1,
34
+ name: 'call_start',
35
+ kind: 'message',
36
+ T: () => CallStart,
37
+ oneof: 'body',
38
+ },
39
+ {
40
+ no: 2,
41
+ name: 'call_data',
42
+ kind: 'message',
43
+ T: () => CallData,
44
+ oneof: 'body',
45
+ },
46
+ {
47
+ no: 3,
48
+ name: 'call_cancel',
49
+ kind: 'scalar',
50
+ T: ScalarType.BOOL,
51
+ oneof: 'body',
52
+ },
35
53
  ],
36
54
  packedByDefault: true,
37
55
  });
@@ -1,5 +1,5 @@
1
1
  // Code generated by protoc-gen-go-lite. DO NOT EDIT.
2
- // protoc-gen-go-lite version: v0.6.5-0.20240516053737-24f165191893
2
+ // protoc-gen-go-lite version: v0.6.5
3
3
  // source: github.com/aperturerobotics/starpc/e2e/mock/mock.proto
4
4
 
5
5
  package e2e_mock
@@ -2,10 +2,10 @@
2
2
  // @generated from file github.com/aperturerobotics/starpc/e2e/mock/mock.proto (package e2e.mock, syntax proto3)
3
3
  /* eslint-disable */
4
4
 
5
- import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite";
6
- import { createMessageType, Message, ScalarType } from "@aptre/protobuf-es-lite";
5
+ import type { MessageType, PartialFieldInfo } from '@aptre/protobuf-es-lite'
6
+ import { createMessageType, Message, ScalarType } from '@aptre/protobuf-es-lite'
7
7
 
8
- export const protobufPackage = "e2e.mock";
8
+ export const protobufPackage = 'e2e.mock'
9
9
 
10
10
  /**
11
11
  * MockMsg is the mock message body.
@@ -16,16 +16,14 @@ export type MockMsg = Message<{
16
16
  /**
17
17
  * @generated from field: string body = 1;
18
18
  */
19
- body?: string;
20
-
21
- }>;
19
+ body?: string
20
+ }>
22
21
 
23
22
  // MockMsg contains the message type declaration for MockMsg.
24
23
  export const MockMsg: MessageType<MockMsg> = createMessageType({
25
- typeName: "e2e.mock.MockMsg",
26
- fields: [
27
- { no: 1, name: "body", kind: "scalar", T: ScalarType.STRING },
28
- ] as readonly PartialFieldInfo[],
29
- packedByDefault: true,
30
- });
31
-
24
+ typeName: 'e2e.mock.MockMsg',
25
+ fields: [
26
+ { no: 1, name: 'body', kind: 'scalar', T: ScalarType.STRING },
27
+ ] as readonly PartialFieldInfo[],
28
+ packedByDefault: true,
29
+ })
@@ -2,9 +2,9 @@
2
2
  // @generated from file github.com/aperturerobotics/starpc/e2e/mock/mock.proto (package e2e.mock, syntax proto3)
3
3
  /* eslint-disable */
4
4
 
5
- import { MockMsg } from "./mock.pb.js";
6
- import { Message, MethodKind } from "@aptre/protobuf-es-lite";
7
- import { ProtoRpc } from "starpc";
5
+ import { MockMsg } from './mock.pb.js'
6
+ import { Message, MethodKind } from '@aptre/protobuf-es-lite'
7
+ import { ProtoRpc } from 'starpc'
8
8
 
9
9
  /**
10
10
  * Mock service mocks some RPCs for the e2e tests.
@@ -12,7 +12,7 @@ import { ProtoRpc } from "starpc";
12
12
  * @generated from service e2e.mock.Mock
13
13
  */
14
14
  export const MockDefinition = {
15
- typeName: "e2e.mock.Mock",
15
+ typeName: 'e2e.mock.Mock',
16
16
  methods: {
17
17
  /**
18
18
  * MockRequest runs a mock unary request.
@@ -20,13 +20,13 @@ export const MockDefinition = {
20
20
  * @generated from rpc e2e.mock.Mock.MockRequest
21
21
  */
22
22
  MockRequest: {
23
- name: "MockRequest",
23
+ name: 'MockRequest',
24
24
  I: MockMsg,
25
25
  O: MockMsg,
26
26
  kind: MethodKind.Unary,
27
27
  },
28
- }
29
- } as const;
28
+ },
29
+ } as const
30
30
 
31
31
  /**
32
32
  * Mock service mocks some RPCs for the e2e tests.
@@ -40,10 +40,9 @@ export interface Mock {
40
40
  * @generated from rpc e2e.mock.Mock.MockRequest
41
41
  */
42
42
  MockRequest(
43
- request: Message<MockMsg>, abortSignal?: AbortSignal
44
- ):
45
- Promise<Message<MockMsg>>
46
-
43
+ request: Message<MockMsg>,
44
+ abortSignal?: AbortSignal,
45
+ ): Promise<Message<MockMsg>>
47
46
  }
48
47
 
49
48
  export const MockServiceName = MockDefinition.typeName
@@ -62,9 +61,9 @@ export class MockClient implements Mock {
62
61
  * @generated from rpc e2e.mock.Mock.MockRequest
63
62
  */
64
63
  async MockRequest(
65
- request: Message<MockMsg>, abortSignal?: AbortSignal
66
- ):
67
- Promise<Message<MockMsg>> {
64
+ request: Message<MockMsg>,
65
+ abortSignal?: AbortSignal,
66
+ ): Promise<Message<MockMsg>> {
68
67
  const requestMsg = MockMsg.create(request)
69
68
  const result = await this.rpc.request(
70
69
  this.service,
@@ -74,5 +73,4 @@ Promise<Message<MockMsg>> {
74
73
  )
75
74
  return MockMsg.fromBinary(result)
76
75
  }
77
-
78
76
  }
package/echo/echo.pb.go CHANGED
@@ -1,5 +1,5 @@
1
1
  // Code generated by protoc-gen-go-lite. DO NOT EDIT.
2
- // protoc-gen-go-lite version: v0.6.5-0.20240516053737-24f165191893
2
+ // protoc-gen-go-lite version: v0.6.5
3
3
  // source: github.com/aperturerobotics/starpc/echo/echo.proto
4
4
 
5
5
  package echo
package/echo/echo.pb.ts CHANGED
@@ -2,10 +2,10 @@
2
2
  // @generated from file github.com/aperturerobotics/starpc/echo/echo.proto (package echo, syntax proto3)
3
3
  /* eslint-disable */
4
4
 
5
- import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite";
6
- import { createMessageType, Message, ScalarType } from "@aptre/protobuf-es-lite";
5
+ import type { MessageType, PartialFieldInfo } from '@aptre/protobuf-es-lite'
6
+ import { createMessageType, Message, ScalarType } from '@aptre/protobuf-es-lite'
7
7
 
8
- export const protobufPackage = "echo";
8
+ export const protobufPackage = 'echo'
9
9
 
10
10
  /**
11
11
  * EchoMsg is the message body for Echo.
@@ -16,16 +16,14 @@ export type EchoMsg = Message<{
16
16
  /**
17
17
  * @generated from field: string body = 1;
18
18
  */
19
- body?: string;
20
-
21
- }>;
19
+ body?: string
20
+ }>
22
21
 
23
22
  // EchoMsg contains the message type declaration for EchoMsg.
24
23
  export const EchoMsg: MessageType<EchoMsg> = createMessageType({
25
- typeName: "echo.EchoMsg",
26
- fields: [
27
- { no: 1, name: "body", kind: "scalar", T: ScalarType.STRING },
28
- ] as readonly PartialFieldInfo[],
29
- packedByDefault: true,
30
- });
31
-
24
+ typeName: 'echo.EchoMsg',
25
+ fields: [
26
+ { no: 1, name: 'body', kind: 'scalar', T: ScalarType.STRING },
27
+ ] as readonly PartialFieldInfo[],
28
+ packedByDefault: true,
29
+ })
package/go.mod CHANGED
@@ -13,7 +13,7 @@ replace nhooyr.io/websocket => github.com/paralin/nhooyr-websocket v1.8.12-0.202
13
13
 
14
14
  require (
15
15
  github.com/aperturerobotics/protobuf-go-lite v0.6.5 // latest
16
- github.com/aperturerobotics/util v1.23.1 // latest
16
+ github.com/aperturerobotics/util v1.23.2 // latest
17
17
  )
18
18
 
19
19
  require (
package/go.sum CHANGED
@@ -4,8 +4,8 @@ github.com/aperturerobotics/json-iterator-lite v1.0.0 h1:cihbrYWoK/S2RYXhJLpDZd+
4
4
  github.com/aperturerobotics/json-iterator-lite v1.0.0/go.mod h1:snaApCEDtrHHP6UWSLKiYNOZU9A5NyzccKenx9oZEzg=
5
5
  github.com/aperturerobotics/protobuf-go-lite v0.6.5 h1:AuPPcZ7ZaJe9ZYYC4gF7/5/Xbn9Mt9uXyV3+ADWy+Ys=
6
6
  github.com/aperturerobotics/protobuf-go-lite v0.6.5/go.mod h1:YTbfnUj3feSULhs8VgepAHFnF3wUc0CPj4jd2axy21I=
7
- github.com/aperturerobotics/util v1.23.1 h1:pEeBrN5UUNy83OFyv9d7BQod8O++j5ZwIkEuYGdpRXw=
8
- github.com/aperturerobotics/util v1.23.1/go.mod h1:dO8P8Ut5xNPpLrPPpn7kM/aJL+qT20C5Ppcs1GE0VNg=
7
+ github.com/aperturerobotics/util v1.23.2 h1:JEQ2y29BLr1sMWLTY12rOPIROCNiaEbdblegOuqBXog=
8
+ github.com/aperturerobotics/util v1.23.2/go.mod h1:CBSuB3PbBl8+uhdJTzj8+/dxEmCklW07FMVRbjFtXoo=
9
9
  github.com/cloudflare/circl v1.3.8 h1:j+V8jJt09PoeMFIu2uh5JUyEaIHTXVOHslFoLNAKqwI=
10
10
  github.com/cloudflare/circl v1.3.8/go.mod h1:PDRU+oXvdD7KCtgKxW95M5Z8BpSCJXQORiZFnBQS5QU=
11
11
  github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starpc",
3
- "version": "0.32.9",
3
+ "version": "0.32.10",
4
4
  "description": "Streaming protobuf RPC service protocol over any two-way channel.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -46,7 +46,7 @@
46
46
  "build": "npm run clean && tsc --project tsconfig.build.json --outDir ./dist/",
47
47
  "check": "npm run typecheck",
48
48
  "typecheck": "tsc --noEmit",
49
- "deps": "depcheck --ignores 'bufferutil,utf-8-validate,rimraf,starpc,@aptre/protobuf-es-lite,tsx'",
49
+ "deps": "depcheck --ignores 'bufferutil,pre-commit,utf-8-validate,rimraf,starpc,@aptre/protobuf-es-lite,tsx'",
50
50
  "codegen": "npm run gen",
51
51
  "ci": "npm run build && npm run lint:js && npm run lint:go",
52
52
  "format": "npm run format:go && npm run format:js && npm run format:config",
@@ -111,6 +111,6 @@
111
111
  "ws": "^8.17.0"
112
112
  },
113
113
  "resolutions": {
114
- "@aptre/protobuf-es-lite": "0.4.3"
114
+ "@aptre/protobuf-es-lite": "0.4.4"
115
115
  }
116
116
  }
@@ -1,5 +1,5 @@
1
1
  // Code generated by protoc-gen-go-lite. DO NOT EDIT.
2
- // protoc-gen-go-lite version: v0.6.5-0.20240516053737-24f165191893
2
+ // protoc-gen-go-lite version: v0.6.5
3
3
  // source: github.com/aperturerobotics/starpc/srpc/rpcproto.proto
4
4
 
5
5
  package srpc
@@ -2,10 +2,10 @@
2
2
  // @generated from file github.com/aperturerobotics/starpc/srpc/rpcproto.proto (package srpc, syntax proto3)
3
3
  /* eslint-disable */
4
4
 
5
- import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite";
6
- import { createMessageType, Message, ScalarType } from "@aptre/protobuf-es-lite";
5
+ import type { MessageType, PartialFieldInfo } from '@aptre/protobuf-es-lite'
6
+ import { createMessageType, Message, ScalarType } from '@aptre/protobuf-es-lite'
7
7
 
8
- export const protobufPackage = "srpc";
8
+ export const protobufPackage = 'srpc'
9
9
 
10
10
  /**
11
11
  * CallStart requests starting a new RPC call.
@@ -19,41 +19,40 @@ export type CallStart = Message<{
19
19
  *
20
20
  * @generated from field: string rpc_service = 1;
21
21
  */
22
- rpcService?: string;
22
+ rpcService?: string
23
23
  /**
24
24
  * RpcMethod is the RPC method to call.
25
25
  * Must be set.
26
26
  *
27
27
  * @generated from field: string rpc_method = 2;
28
28
  */
29
- rpcMethod?: string;
29
+ rpcMethod?: string
30
30
  /**
31
31
  * Data contains the request or the first message in the stream.
32
32
  * Optional if streaming.
33
33
  *
34
34
  * @generated from field: bytes data = 3;
35
35
  */
36
- data?: Uint8Array;
36
+ data?: Uint8Array
37
37
  /**
38
38
  * DataIsZero indicates Data is set with an empty message.
39
39
  *
40
40
  * @generated from field: bool data_is_zero = 4;
41
41
  */
42
- dataIsZero?: boolean;
43
-
44
- }>;
42
+ dataIsZero?: boolean
43
+ }>
45
44
 
46
45
  // CallStart contains the message type declaration for CallStart.
47
46
  export const CallStart: MessageType<CallStart> = createMessageType({
48
- typeName: "srpc.CallStart",
49
- fields: [
50
- { no: 1, name: "rpc_service", kind: "scalar", T: ScalarType.STRING },
51
- { no: 2, name: "rpc_method", kind: "scalar", T: ScalarType.STRING },
52
- { no: 3, name: "data", kind: "scalar", T: ScalarType.BYTES },
53
- { no: 4, name: "data_is_zero", kind: "scalar", T: ScalarType.BOOL },
54
- ] as readonly PartialFieldInfo[],
55
- packedByDefault: true,
56
- });
47
+ typeName: 'srpc.CallStart',
48
+ fields: [
49
+ { no: 1, name: 'rpc_service', kind: 'scalar', T: ScalarType.STRING },
50
+ { no: 2, name: 'rpc_method', kind: 'scalar', T: ScalarType.STRING },
51
+ { no: 3, name: 'data', kind: 'scalar', T: ScalarType.BYTES },
52
+ { no: 4, name: 'data_is_zero', kind: 'scalar', T: ScalarType.BOOL },
53
+ ] as readonly PartialFieldInfo[],
54
+ packedByDefault: true,
55
+ })
57
56
 
58
57
  /**
59
58
  * CallData contains a message in a streaming RPC sequence.
@@ -66,40 +65,39 @@ export type CallData = Message<{
66
65
  *
67
66
  * @generated from field: bytes data = 1;
68
67
  */
69
- data?: Uint8Array;
68
+ data?: Uint8Array
70
69
  /**
71
70
  * DataIsZero indicates Data is set with an empty message.
72
71
  *
73
72
  * @generated from field: bool data_is_zero = 2;
74
73
  */
75
- dataIsZero?: boolean;
74
+ dataIsZero?: boolean
76
75
  /**
77
76
  * Complete indicates the RPC call is completed.
78
77
  *
79
78
  * @generated from field: bool complete = 3;
80
79
  */
81
- complete?: boolean;
80
+ complete?: boolean
82
81
  /**
83
82
  * Error contains any error that caused the RPC to fail.
84
83
  * If set, implies complete=true.
85
84
  *
86
85
  * @generated from field: string error = 4;
87
86
  */
88
- error?: string;
89
-
90
- }>;
87
+ error?: string
88
+ }>
91
89
 
92
90
  // CallData contains the message type declaration for CallData.
93
91
  export const CallData: MessageType<CallData> = createMessageType({
94
- typeName: "srpc.CallData",
95
- fields: [
96
- { no: 1, name: "data", kind: "scalar", T: ScalarType.BYTES },
97
- { no: 2, name: "data_is_zero", kind: "scalar", T: ScalarType.BOOL },
98
- { no: 3, name: "complete", kind: "scalar", T: ScalarType.BOOL },
99
- { no: 4, name: "error", kind: "scalar", T: ScalarType.STRING },
100
- ] as readonly PartialFieldInfo[],
101
- packedByDefault: true,
102
- });
92
+ typeName: 'srpc.CallData',
93
+ fields: [
94
+ { no: 1, name: 'data', kind: 'scalar', T: ScalarType.BYTES },
95
+ { no: 2, name: 'data_is_zero', kind: 'scalar', T: ScalarType.BOOL },
96
+ { no: 3, name: 'complete', kind: 'scalar', T: ScalarType.BOOL },
97
+ { no: 4, name: 'error', kind: 'scalar', T: ScalarType.STRING },
98
+ ] as readonly PartialFieldInfo[],
99
+ packedByDefault: true,
100
+ })
103
101
 
104
102
  /**
105
103
  * Packet is a message sent over a srpc packet connection.
@@ -107,51 +105,70 @@ export const CallData: MessageType<CallData> = createMessageType({
107
105
  * @generated from message srpc.Packet
108
106
  */
109
107
  export type Packet = Message<{
110
-
111
108
  /**
112
109
  * Body is the packet body.
113
110
  *
114
111
  * @generated from oneof srpc.Packet.body
115
112
  */
116
- body?: {
117
- value?: undefined,
118
- case: undefined
119
- } | {
120
- /**
121
- * CallStart initiates a new call.
122
- *
123
- * @generated from field: srpc.CallStart call_start = 1;
124
- */
125
- value: CallStart;
126
- case: "callStart";
127
- } | {
128
- /**
129
- * CallData is a message in a streaming RPC sequence.
130
- *
131
- * @generated from field: srpc.CallData call_data = 2;
132
- */
133
- value: CallData;
134
- case: "callData";
135
- } | {
136
- /**
137
- * CallCancel cancels the call.
138
- *
139
- * @generated from field: bool call_cancel = 3;
140
- */
141
- value: boolean;
142
- case: "callCancel";
143
- };
144
-
145
- }>;
113
+ body?:
114
+ | {
115
+ value?: undefined
116
+ case: undefined
117
+ }
118
+ | {
119
+ /**
120
+ * CallStart initiates a new call.
121
+ *
122
+ * @generated from field: srpc.CallStart call_start = 1;
123
+ */
124
+ value: CallStart
125
+ case: 'callStart'
126
+ }
127
+ | {
128
+ /**
129
+ * CallData is a message in a streaming RPC sequence.
130
+ *
131
+ * @generated from field: srpc.CallData call_data = 2;
132
+ */
133
+ value: CallData
134
+ case: 'callData'
135
+ }
136
+ | {
137
+ /**
138
+ * CallCancel cancels the call.
139
+ *
140
+ * @generated from field: bool call_cancel = 3;
141
+ */
142
+ value: boolean
143
+ case: 'callCancel'
144
+ }
145
+ }>
146
146
 
147
147
  // Packet contains the message type declaration for Packet.
148
148
  export const Packet: MessageType<Packet> = createMessageType({
149
- typeName: "srpc.Packet",
150
- fields: [
151
- { no: 1, name: "call_start", kind: "message", T: () => CallStart, oneof: "body" },
152
- { no: 2, name: "call_data", kind: "message", T: () => CallData, oneof: "body" },
153
- { no: 3, name: "call_cancel", kind: "scalar", T: ScalarType.BOOL, oneof: "body" },
154
- ] as readonly PartialFieldInfo[],
155
- packedByDefault: true,
156
- });
157
-
149
+ typeName: 'srpc.Packet',
150
+ fields: [
151
+ {
152
+ no: 1,
153
+ name: 'call_start',
154
+ kind: 'message',
155
+ T: () => CallStart,
156
+ oneof: 'body',
157
+ },
158
+ {
159
+ no: 2,
160
+ name: 'call_data',
161
+ kind: 'message',
162
+ T: () => CallData,
163
+ oneof: 'body',
164
+ },
165
+ {
166
+ no: 3,
167
+ name: 'call_cancel',
168
+ kind: 'scalar',
169
+ T: ScalarType.BOOL,
170
+ oneof: 'body',
171
+ },
172
+ ] as readonly PartialFieldInfo[],
173
+ packedByDefault: true,
174
+ })