starpc 0.33.11 → 0.35.0

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.
@@ -16,8 +16,8 @@ export declare class StreamConn implements Duplex<AsyncGenerator<Uint8Array | Ui
16
16
  private _muxer;
17
17
  private _server?;
18
18
  constructor(server?: StreamHandler, connParams?: StreamConnParams);
19
- get sink(): import("it-stream-types").Sink<AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>, unknown>;
20
- get source(): AsyncGenerator<Uint8Array | Uint8ArrayList, any, unknown>;
19
+ get sink(): import("it-stream-types").Sink<AsyncGenerator<Uint8Array | Uint8ArrayList, any, any>, unknown>;
20
+ get source(): AsyncGenerator<Uint8Array | Uint8ArrayList, any, any>;
21
21
  get streams(): Stream[];
22
22
  get muxer(): StreamMuxer;
23
23
  get server(): StreamHandler | undefined;
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
2
+ // protoc-gen-go-lite version: v0.7.0
3
3
  // source: github.com/aperturerobotics/starpc/echo/echo.proto
4
4
 
5
5
  package echo
@@ -170,14 +170,18 @@ func (m *EchoMsg) SizeVT() (n int) {
170
170
 
171
171
  func (x *EchoMsg) MarshalProtoText() string {
172
172
  var sb strings.Builder
173
- sb.WriteString("EchoMsg { ")
173
+ sb.WriteString("EchoMsg {")
174
174
  if x.Body != "" {
175
- sb.WriteString(" body: ")
175
+ if sb.Len() > 9 {
176
+ sb.WriteString(" ")
177
+ }
178
+ sb.WriteString("body: ")
176
179
  sb.WriteString(strconv.Quote(x.Body))
177
180
  }
178
181
  sb.WriteString("}")
179
182
  return sb.String()
180
183
  }
184
+
181
185
  func (x *EchoMsg) String() string {
182
186
  return x.MarshalProtoText()
183
187
  }
package/go.mod CHANGED
@@ -1,50 +1,49 @@
1
1
  module github.com/aperturerobotics/starpc
2
2
 
3
- go 1.22
3
+ go 1.23
4
4
 
5
- replace (
6
- // This fork avoids importing net/http on wasm.
7
- github.com/coder/websocket => github.com/paralin/nhooyr-websocket v1.8.13-0.20240820051708-db89d1b29ef8 // aperture-2
5
+ toolchain go1.23.2
8
6
 
7
+ replace (
9
8
  // This fork uses go-protobuf-lite and adds post-quantum crypto support.
10
- github.com/libp2p/go-libp2p => github.com/aperturerobotics/go-libp2p v0.33.1-0.20240511072027-002c32698a19 // aperture
9
+ github.com/libp2p/go-libp2p => github.com/aperturerobotics/go-libp2p v0.36.3-0.20241002070357-a2e1c3498dd3 // aperture
11
10
 
12
11
  // This fork uses go-protobuf-lite.
13
12
  github.com/libp2p/go-msgio => github.com/aperturerobotics/go-libp2p-msgio v0.0.0-20240511033615-1b69178aa5c8 // aperture
14
13
  )
15
14
 
16
15
  require (
17
- github.com/aperturerobotics/protobuf-go-lite v0.6.5 // latest
18
- github.com/aperturerobotics/util v1.25.8 // latest
16
+ github.com/aperturerobotics/protobuf-go-lite v0.7.0 // latest
17
+ github.com/aperturerobotics/util v1.25.10 // latest
19
18
  )
20
19
 
21
20
  require (
22
21
  github.com/coder/websocket v1.8.12 // latest
23
- github.com/libp2p/go-libp2p v0.36.3 // latest
22
+ github.com/libp2p/go-libp2p v0.36.5 // latest
24
23
  github.com/libp2p/go-yamux/v4 v4.0.2-0.20240826150533-e92055b23e0e // master
25
24
  github.com/pkg/errors v0.9.1 // latest
26
25
  github.com/sirupsen/logrus v1.9.3 // latest
27
- google.golang.org/protobuf v1.34.2 // latest
26
+ google.golang.org/protobuf v1.35.1 // latest
28
27
  )
29
28
 
30
29
  require (
31
30
  github.com/aperturerobotics/json-iterator-lite v1.0.0 // indirect
32
31
  github.com/cloudflare/circl v1.3.8 // indirect
33
32
  github.com/ipfs/go-cid v0.4.1 // indirect
34
- github.com/klauspost/cpuid/v2 v2.2.7 // indirect
33
+ github.com/klauspost/cpuid/v2 v2.2.8 // indirect
35
34
  github.com/libp2p/go-buffer-pool v0.1.0 // indirect
36
35
  github.com/minio/sha256-simd v1.0.1 // indirect
37
36
  github.com/mr-tron/base58 v1.2.0 // indirect
38
37
  github.com/multiformats/go-base32 v0.1.0 // indirect
39
38
  github.com/multiformats/go-base36 v0.2.0 // indirect
40
- github.com/multiformats/go-multiaddr v0.12.3 // indirect
39
+ github.com/multiformats/go-multiaddr v0.13.0 // indirect
41
40
  github.com/multiformats/go-multibase v0.2.0 // indirect
42
41
  github.com/multiformats/go-multihash v0.2.3 // indirect
43
42
  github.com/multiformats/go-multistream v0.5.0 // indirect
44
43
  github.com/multiformats/go-varint v0.0.7 // indirect
45
44
  github.com/spaolacci/murmur3 v1.1.0 // indirect
46
- golang.org/x/crypto v0.19.0 // indirect
47
- golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect
48
- golang.org/x/sys v0.18.0 // indirect
49
- lukechampine.com/blake3 v1.2.1 // indirect
45
+ golang.org/x/crypto v0.25.0 // indirect
46
+ golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
47
+ golang.org/x/sys v0.22.0 // indirect
48
+ lukechampine.com/blake3 v1.3.0 // indirect
50
49
  )
package/go.sum CHANGED
@@ -1,13 +1,15 @@
1
- github.com/aperturerobotics/go-libp2p v0.33.1-0.20240511072027-002c32698a19 h1:ZpnWhPCmYo//h1Jx9iOGPGG1cbFRM7Ij+ms+mCK6RUo=
2
- github.com/aperturerobotics/go-libp2p v0.33.1-0.20240511072027-002c32698a19/go.mod h1:/TIElEA8TzmHQTgGJQyzg0zHNZRCMYbdKyOsKwn9i6E=
1
+ github.com/aperturerobotics/go-libp2p v0.36.3-0.20241002070357-a2e1c3498dd3 h1:ccv8K5Q9zWO8patmC97DjSNU/1eMQ322dKbC1l9pLP4=
2
+ github.com/aperturerobotics/go-libp2p v0.36.3-0.20241002070357-a2e1c3498dd3/go.mod h1:Ii9kaz5Tye5LRRIoQdBUcgtjC7nCrqgvDAdoy2Bdpfc=
3
3
  github.com/aperturerobotics/json-iterator-lite v1.0.0 h1:cihbrYWoK/S2RYXhJLpDZd+GUjVvFJN+D3w1VOqqHRI=
4
4
  github.com/aperturerobotics/json-iterator-lite v1.0.0/go.mod h1:snaApCEDtrHHP6UWSLKiYNOZU9A5NyzccKenx9oZEzg=
5
- github.com/aperturerobotics/protobuf-go-lite v0.6.5 h1:AuPPcZ7ZaJe9ZYYC4gF7/5/Xbn9Mt9uXyV3+ADWy+Ys=
6
- github.com/aperturerobotics/protobuf-go-lite v0.6.5/go.mod h1:YTbfnUj3feSULhs8VgepAHFnF3wUc0CPj4jd2axy21I=
7
- github.com/aperturerobotics/util v1.25.8 h1:ERuWwwrtm1qKO/uIQOIlprmnVd5WRtm8YhDjlpJ0yV0=
8
- github.com/aperturerobotics/util v1.25.8/go.mod h1:Dx1gWoi21JgnWRXfMWjyhInQjulW3OfrcwEVwrxarQQ=
5
+ github.com/aperturerobotics/protobuf-go-lite v0.7.0 h1:dDoOzD0kxx8fshgqyWrJdhZHfeTLAWvMfH6lU458eZg=
6
+ github.com/aperturerobotics/protobuf-go-lite v0.7.0/go.mod h1:MSCkd3x0MtN1WbG5abldAa55AVKHJlOgbZGPDcBauLM=
7
+ github.com/aperturerobotics/util v1.25.10 h1:jA+QVc25RffnplOPKwEwNr+C33S4cpdnVx7BXCnfn9A=
8
+ github.com/aperturerobotics/util v1.25.10/go.mod h1:XG2kImJ8tZ4NOaIs0N2Zd0lPqYkCgSXEExxU2wExwZ8=
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
+ github.com/coder/websocket v1.8.12 h1:5bUXkEPPIbewrnkU8LTCLVaxi4N4J8ahufH2vlo4NAo=
12
+ github.com/coder/websocket v1.8.12/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs=
11
13
  github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
12
14
  github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
13
15
  github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -15,8 +17,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
15
17
  github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
16
18
  github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s=
17
19
  github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk=
18
- github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=
19
- github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
20
+ github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM=
21
+ github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
20
22
  github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8=
21
23
  github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg=
22
24
  github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA=
@@ -31,8 +33,8 @@ github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aG
31
33
  github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI=
32
34
  github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0=
33
35
  github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4=
34
- github.com/multiformats/go-multiaddr v0.12.3 h1:hVBXvPRcKG0w80VinQ23P5t7czWgg65BmIvQKjDydU8=
35
- github.com/multiformats/go-multiaddr v0.12.3/go.mod h1:sBXrNzucqkFJhvKOiwwLyqamGa/P5EIXNPLovyhQCII=
36
+ github.com/multiformats/go-multiaddr v0.13.0 h1:BCBzs61E3AGHcYYTv8dqRH43ZfyrqM8RXVPT8t13tLQ=
37
+ github.com/multiformats/go-multiaddr v0.13.0/go.mod h1:sBXrNzucqkFJhvKOiwwLyqamGa/P5EIXNPLovyhQCII=
36
38
  github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g=
37
39
  github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk=
38
40
  github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U=
@@ -41,8 +43,6 @@ github.com/multiformats/go-multistream v0.5.0 h1:5htLSLl7lvJk3xx3qT/8Zm9J4K8vEOf
41
43
  github.com/multiformats/go-multistream v0.5.0/go.mod h1:n6tMZiwiP2wUsR8DgfDWw1dydlEqV3l6N3/GBsX6ILA=
42
44
  github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8=
43
45
  github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU=
44
- github.com/paralin/nhooyr-websocket v1.8.13-0.20240820051708-db89d1b29ef8 h1:OZrehfqYOUl5q43cd3dvEes1zftihzNb/pN/nhzwdOg=
45
- github.com/paralin/nhooyr-websocket v1.8.13-0.20240820051708-db89d1b29ef8/go.mod h1:LNVeNrXQZfe5qhS9ALED3uA+l5pPqvwXg3CKoDBB2gs=
46
46
  github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
47
47
  github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
48
48
  github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
@@ -55,19 +55,19 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
55
55
  github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
56
56
  github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
57
57
  github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
58
- golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
59
- golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
60
- golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa h1:ELnwvuAXPNtPk1TJRuGkI9fDTwym6AYBu0qzT8AcHdI=
61
- golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ=
58
+ golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30=
59
+ golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=
60
+ golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=
61
+ golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=
62
62
  golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
63
63
  golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
64
- golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
65
- golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
66
- google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
67
- google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
64
+ golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
65
+ golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
66
+ google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
67
+ google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
68
68
  gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
69
69
  gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
70
70
  gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
71
71
  gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
72
- lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI=
73
- lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=
72
+ lukechampine.com/blake3 v1.3.0 h1:sJ3XhFINmHSrYCgl958hscfIa3bw8x4DqMP3u1YvoYE=
73
+ lukechampine.com/blake3 v1.3.0/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=
package/mock/mock.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
2
+ // protoc-gen-go-lite version: v0.7.0
3
3
  // source: github.com/aperturerobotics/starpc/mock/mock.proto
4
4
 
5
5
  package e2e_mock
@@ -168,14 +168,18 @@ func (m *MockMsg) SizeVT() (n int) {
168
168
 
169
169
  func (x *MockMsg) MarshalProtoText() string {
170
170
  var sb strings.Builder
171
- sb.WriteString("MockMsg { ")
171
+ sb.WriteString("MockMsg {")
172
172
  if x.Body != "" {
173
- sb.WriteString(" body: ")
173
+ if sb.Len() > 9 {
174
+ sb.WriteString(" ")
175
+ }
176
+ sb.WriteString("body: ")
174
177
  sb.WriteString(strconv.Quote(x.Body))
175
178
  }
176
179
  sb.WriteString("}")
177
180
  return sb.String()
178
181
  }
182
+
179
183
  func (x *MockMsg) String() string {
180
184
  return x.MarshalProtoText()
181
185
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starpc",
3
- "version": "0.33.11",
3
+ "version": "0.35.0",
4
4
  "description": "Streaming protobuf RPC service protocol over any two-way channel.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -83,32 +83,32 @@
83
83
  "./{srpc,echo,e2e,integration,rpcstream,cmd}/**/(*.ts|*.tsx|*.html|*.css)": "prettier --config .prettierrc.yaml --write"
84
84
  },
85
85
  "devDependencies": {
86
- "@typescript-eslint/eslint-plugin": "^8.0.0",
87
- "@typescript-eslint/parser": "^8.0.0",
86
+ "@typescript-eslint/eslint-plugin": "^8.8.0",
87
+ "@typescript-eslint/parser": "^8.8.0",
88
88
  "depcheck": "^1.4.6",
89
- "esbuild": "^0.23.0",
90
- "eslint": "^9.1.1",
89
+ "esbuild": "^0.24.0",
90
+ "eslint": "^9.11.1",
91
91
  "eslint-config-prettier": "^9.1.0",
92
92
  "lint-staged": "^15.2.2",
93
93
  "pre-commit": "^1.2.2",
94
94
  "prettier": "^3.2.4",
95
95
  "rimraf": "^6.0.1",
96
- "tsx": "^4.15.7",
97
- "typescript": "^5.5.2",
98
- "vitest": "^2.0.2"
96
+ "tsx": "^4.19.1",
97
+ "typescript": "^5.6.2",
98
+ "vitest": "^2.1.2"
99
99
  },
100
100
  "dependencies": {
101
101
  "@aptre/it-ws": "^1.0.1",
102
102
  "@aptre/protobuf-es-lite": "^0.4.6",
103
- "@chainsafe/libp2p-yamux": "^6.0.2",
104
- "@libp2p/interface": "^1.3.1",
105
- "@libp2p/logger": "^4.0.12",
103
+ "@chainsafe/libp2p-yamux": "^7.0.1",
104
+ "@libp2p/interface": "^2.1.2",
105
+ "@libp2p/logger": "^5.1.0",
106
106
  "event-iterator": "^2.0.0",
107
107
  "isomorphic-ws": "^5.0.0",
108
108
  "it-first": "^3.0.6",
109
109
  "it-pipe": "^3.0.1",
110
110
  "it-pushable": "^3.2.3",
111
- "it-stream-types": "^2.0.1",
111
+ "it-stream-types": "^2.0.2",
112
112
  "uint8arraylist": "^2.4.7",
113
113
  "ws": "^8.17.0"
114
114
  },
@@ -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
2
+ // protoc-gen-go-lite version: v0.7.0
3
3
  // source: github.com/aperturerobotics/starpc/srpc/rpcproto.proto
4
4
 
5
5
  package srpc
@@ -983,81 +983,117 @@ func (m *CallData) SizeVT() (n int) {
983
983
 
984
984
  func (x *Packet) MarshalProtoText() string {
985
985
  var sb strings.Builder
986
- sb.WriteString("Packet { ")
986
+ sb.WriteString("Packet {")
987
987
  switch body := x.Body.(type) {
988
988
  case *Packet_CallStart:
989
989
  if body.CallStart != nil {
990
- sb.WriteString(" call_start: ")
990
+ if sb.Len() > 8 {
991
+ sb.WriteString(" ")
992
+ }
993
+ sb.WriteString("call_start: ")
991
994
  sb.WriteString(body.CallStart.MarshalProtoText())
992
995
  }
993
996
  case *Packet_CallData:
994
997
  if body.CallData != nil {
995
- sb.WriteString(" call_data: ")
998
+ if sb.Len() > 8 {
999
+ sb.WriteString(" ")
1000
+ }
1001
+ sb.WriteString("call_data: ")
996
1002
  sb.WriteString(body.CallData.MarshalProtoText())
997
1003
  }
998
1004
  case *Packet_CallCancel:
999
- if body.CallCancel {
1000
- sb.WriteString(" call_cancel: ")
1005
+ if body.CallCancel != false {
1006
+ if sb.Len() > 8 {
1007
+ sb.WriteString(" ")
1008
+ }
1009
+ sb.WriteString("call_cancel: ")
1001
1010
  sb.WriteString(strconv.FormatBool(body.CallCancel))
1002
1011
  }
1003
1012
  }
1004
1013
  sb.WriteString("}")
1005
1014
  return sb.String()
1006
1015
  }
1016
+
1007
1017
  func (x *Packet) String() string {
1008
1018
  return x.MarshalProtoText()
1009
1019
  }
1010
1020
  func (x *CallStart) MarshalProtoText() string {
1011
1021
  var sb strings.Builder
1012
- sb.WriteString("CallStart { ")
1022
+ sb.WriteString("CallStart {")
1013
1023
  if x.RpcService != "" {
1014
- sb.WriteString(" rpc_service: ")
1024
+ if sb.Len() > 11 {
1025
+ sb.WriteString(" ")
1026
+ }
1027
+ sb.WriteString("rpc_service: ")
1015
1028
  sb.WriteString(strconv.Quote(x.RpcService))
1016
1029
  }
1017
1030
  if x.RpcMethod != "" {
1018
- sb.WriteString(" rpc_method: ")
1031
+ if sb.Len() > 11 {
1032
+ sb.WriteString(" ")
1033
+ }
1034
+ sb.WriteString("rpc_method: ")
1019
1035
  sb.WriteString(strconv.Quote(x.RpcMethod))
1020
1036
  }
1021
- if len(x.Data) > 0 {
1022
- sb.WriteString(" data: ")
1037
+ if x.Data != nil {
1038
+ if sb.Len() > 11 {
1039
+ sb.WriteString(" ")
1040
+ }
1041
+ sb.WriteString("data: ")
1023
1042
  sb.WriteString("\"")
1024
1043
  sb.WriteString(base64.StdEncoding.EncodeToString(x.Data))
1025
1044
  sb.WriteString("\"")
1026
1045
  }
1027
- if x.DataIsZero {
1028
- sb.WriteString(" data_is_zero: ")
1046
+ if x.DataIsZero != false {
1047
+ if sb.Len() > 11 {
1048
+ sb.WriteString(" ")
1049
+ }
1050
+ sb.WriteString("data_is_zero: ")
1029
1051
  sb.WriteString(strconv.FormatBool(x.DataIsZero))
1030
1052
  }
1031
1053
  sb.WriteString("}")
1032
1054
  return sb.String()
1033
1055
  }
1056
+
1034
1057
  func (x *CallStart) String() string {
1035
1058
  return x.MarshalProtoText()
1036
1059
  }
1037
1060
  func (x *CallData) MarshalProtoText() string {
1038
1061
  var sb strings.Builder
1039
- sb.WriteString("CallData { ")
1040
- if len(x.Data) > 0 {
1041
- sb.WriteString(" data: ")
1062
+ sb.WriteString("CallData {")
1063
+ if x.Data != nil {
1064
+ if sb.Len() > 10 {
1065
+ sb.WriteString(" ")
1066
+ }
1067
+ sb.WriteString("data: ")
1042
1068
  sb.WriteString("\"")
1043
1069
  sb.WriteString(base64.StdEncoding.EncodeToString(x.Data))
1044
1070
  sb.WriteString("\"")
1045
1071
  }
1046
- if x.DataIsZero {
1047
- sb.WriteString(" data_is_zero: ")
1072
+ if x.DataIsZero != false {
1073
+ if sb.Len() > 10 {
1074
+ sb.WriteString(" ")
1075
+ }
1076
+ sb.WriteString("data_is_zero: ")
1048
1077
  sb.WriteString(strconv.FormatBool(x.DataIsZero))
1049
1078
  }
1050
- if x.Complete {
1051
- sb.WriteString(" complete: ")
1079
+ if x.Complete != false {
1080
+ if sb.Len() > 10 {
1081
+ sb.WriteString(" ")
1082
+ }
1083
+ sb.WriteString("complete: ")
1052
1084
  sb.WriteString(strconv.FormatBool(x.Complete))
1053
1085
  }
1054
1086
  if x.Error != "" {
1055
- sb.WriteString(" error: ")
1087
+ if sb.Len() > 10 {
1088
+ sb.WriteString(" ")
1089
+ }
1090
+ sb.WriteString("error: ")
1056
1091
  sb.WriteString(strconv.Quote(x.Error))
1057
1092
  }
1058
1093
  sb.WriteString("}")
1059
1094
  return sb.String()
1060
1095
  }
1096
+
1061
1097
  func (x *CallData) String() string {
1062
1098
  return x.MarshalProtoText()
1063
1099
  }