starpc 0.4.7 → 0.4.8

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/e2e/e2e_test.go CHANGED
@@ -5,6 +5,7 @@ import (
5
5
  "io"
6
6
  "net"
7
7
  "testing"
8
+ "time"
8
9
 
9
10
  "github.com/aperturerobotics/starpc/echo"
10
11
  "github.com/aperturerobotics/starpc/srpc"
@@ -30,17 +31,21 @@ func RunE2E(t *testing.T, cb func(client echo.SRPCEchoerClient) error) {
30
31
  // construct the client
31
32
  clientPipe, serverPipe := net.Pipe()
32
33
 
34
+ clientMp, err := mp.NewMultiplex(clientPipe, false, nil)
35
+ if err != nil {
36
+ t.Fatal(err.Error())
37
+ }
38
+ client := srpc.NewClientWithMuxedConn(mplex.NewMuxedConn(clientMp))
39
+
33
40
  ctx := context.Background()
41
+ serverMp, _ := mp.NewMultiplex(serverPipe, true, nil)
34
42
  go func() {
35
- serverMp, _ := mp.NewMultiplex(serverPipe, false, nil)
36
43
  _ = server.AcceptMuxedConn(ctx, mplex.NewMuxedConn(serverMp))
37
44
  }()
38
45
 
39
- clientMp, err := mp.NewMultiplex(clientPipe, true, nil)
40
- if err != nil {
41
- t.Fatal(err.Error())
42
- }
43
- client := srpc.NewClientWithMuxedConn(mplex.NewMuxedConn(clientMp))
46
+ // TODO: requires a moment for the listener to start: not sure why.
47
+ // the packets /should/ be buffered in the pipe.
48
+ <-time.After(time.Millisecond * 100)
44
49
 
45
50
  // construct the client rpc interface
46
51
  clientEcho := echo.NewSRPCEchoerClient(client)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starpc",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Streaming protobuf RPC service protocol over any two-way channel.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -56,23 +56,23 @@
56
56
  "singleQuote": true
57
57
  },
58
58
  "devDependencies": {
59
- "@typescript-eslint/eslint-plugin": "^5.27.1",
60
- "@typescript-eslint/parser": "^5.27.1",
59
+ "@typescript-eslint/eslint-plugin": "^5.30.0",
60
+ "@typescript-eslint/parser": "^5.30.0",
61
61
  "depcheck": "^1.4.3",
62
- "esbuild": "^0.14.46",
62
+ "esbuild": "^0.14.47",
63
63
  "eslint": "^8.18.0",
64
64
  "eslint-config-prettier": "^8.5.0",
65
65
  "prettier": "^2.7.1",
66
66
  "rimraf": "^3.0.2",
67
- "ts-proto": "^1.115.4",
67
+ "ts-proto": "^1.115.5",
68
68
  "typescript": "^4.7.4"
69
69
  },
70
70
  "dependencies": {
71
- "@libp2p/interface-connection": "^2.0.0",
72
- "@libp2p/interface-stream-muxer": "^1.0.2",
73
- "@libp2p/mplex": "^3.0.0",
71
+ "@libp2p/interface-connection": "^2.1.1",
72
+ "@libp2p/interface-stream-muxer": "^2.0.1",
73
+ "@libp2p/mplex": "^4.0.0",
74
74
  "event-iterator": "^2.0.0",
75
- "isomorphic-ws": "^4.0.1",
75
+ "isomorphic-ws": "^5.0.0",
76
76
  "it-length-prefixed": "^7.0.1",
77
77
  "it-pipe": "^2.0.3",
78
78
  "it-pushable": "^3.0.0",
@@ -1,5 +1,5 @@
1
1
  diff --git a/node_modules/ts-poet/build/Import.js b/node_modules/ts-poet/build/Import.js
2
- index c43569e..a77a1b1 100644
2
+ index fe1f6d2..280df8f 100644
3
3
  --- a/node_modules/ts-poet/build/Import.js
4
4
  +++ b/node_modules/ts-poet/build/Import.js
5
5
  @@ -293,6 +293,14 @@ function emitImports(imports, ourModulePath, importMappings) {