diff --git a/go.mod b/go.mod index f64a87a0..9157d499 100644 --- a/go.mod +++ b/go.mod @@ -6,15 +6,16 @@ require ( github.com/aperturerobotics/common v0.15.6 // latest github.com/aperturerobotics/controllerbus v0.45.1 // latest github.com/aperturerobotics/entitygraph v0.9.1 // latest - github.com/aperturerobotics/protobuf-go-lite v0.6.1 // latest - github.com/aperturerobotics/starpc v0.32.4 // latest + github.com/aperturerobotics/protobuf-go-lite v0.6.3 // latest + github.com/aperturerobotics/starpc v0.32.7 // latest github.com/aperturerobotics/util v1.23.1 // master ) // aperture: use compatibility forks replace ( github.com/ipfs/go-log/v2 => github.com/paralin/ipfs-go-logrus v0.0.0-20240410105224-e24cb05f9e98 // master - github.com/libp2p/go-libp2p => github.com/aperturerobotics/go-libp2p v0.33.1-0.20240504075939-591fc65373be // aperture + github.com/libp2p/go-libp2p => github.com/aperturerobotics/go-libp2p v0.33.1-0.20240511033834-ffeaa02fcb76 // aperture + github.com/libp2p/go-msgio => github.com/aperturerobotics/go-libp2p-msgio v0.0.0-20240511033615-1b69178aa5c8 // aperture github.com/multiformats/go-multiaddr => github.com/paralin/go-multiaddr v0.12.4-0.20240407071906-6f0354cc6755 // aperture-4 github.com/nats-io/jwt/v2 => github.com/nats-io/jwt/v2 v2.0.0-20200820224411-1e751ff168ab // indirect: used by bifrost-nats-server github.com/nats-io/nats-server/v2 => github.com/aperturerobotics/bifrost-nats-server/v2 v2.1.8-0.20221228081037-b7c2df0c151f // aperture-2.0 @@ -72,7 +73,6 @@ require ( github.com/multiformats/go-base32 v0.1.0 // indirect github.com/multiformats/go-base36 v0.2.0 // indirect github.com/multiformats/go-multibase v0.2.0 // indirect - github.com/multiformats/go-multicodec v0.9.0 // indirect github.com/multiformats/go-multihash v0.2.3 // indirect github.com/multiformats/go-multistream v0.5.0 // indirect github.com/multiformats/go-varint v0.0.7 // indirect diff --git a/go.sum b/go.sum index 24010b87..24d06e91 100644 --- a/go.sum +++ b/go.sum @@ -4,28 +4,26 @@ github.com/aperturerobotics/bifrost-nats-client v1.10.1-0.20200831103200-24c3d04 github.com/aperturerobotics/bifrost-nats-client v1.10.1-0.20200831103200-24c3d0464e58/go.mod h1:ougcjYEZDYV8pVtaNbA5sgYDukkYHyKtSsW/T3B13j0= github.com/aperturerobotics/bifrost-nats-server/v2 v2.1.8-0.20221228081037-b7c2df0c151f h1:bmScByQNGDPPy9T+zdwu816XaCbFtD5UDyqZMRiHJ80= github.com/aperturerobotics/bifrost-nats-server/v2 v2.1.8-0.20221228081037-b7c2df0c151f/go.mod h1:kIcZtLpq4UIZzOqduYLm1mYU1nuMBtN6XuDCtQ21QT8= -github.com/aperturerobotics/common v0.15.5 h1:6imQU3QlLFR2NW4HrJUmc1fqb9kHArtgf0FP9Ag10XI= -github.com/aperturerobotics/common v0.15.5/go.mod h1:R76WABZ3PDLrAhScLVjnzsI8S0rhIVNowxbzv4f8ZdM= github.com/aperturerobotics/common v0.15.6 h1:HsGGKilMGaDsDgjcU7/JAII6JEvAvf6APD3rUv0PeDs= github.com/aperturerobotics/common v0.15.6/go.mod h1:R76WABZ3PDLrAhScLVjnzsI8S0rhIVNowxbzv4f8ZdM= github.com/aperturerobotics/controllerbus v0.45.1 h1:tMno+Lx4gZVJRp0XUJ7zEcxKJPGntKatoHqYNNLBz0c= github.com/aperturerobotics/controllerbus v0.45.1/go.mod h1:3SfYY1M8jBcfmmegutxfd/+M/aqBqdbhaqTYWrM3G7E= github.com/aperturerobotics/entitygraph v0.9.1 h1:bCl0Q9N1hkQnOtdCYz7pNSYqH+5CY3EUCuD19dQmJeI= github.com/aperturerobotics/entitygraph v0.9.1/go.mod h1:40VoNXSslWQieSS4V3HyzqOOZnRiGxItj/qZYSHg8Rw= -github.com/aperturerobotics/go-libp2p v0.33.1-0.20240504075939-591fc65373be h1:PZi7dbdjWqHa0TE1lD0f5WxzshL/qPp9fZ1K55fGo1c= -github.com/aperturerobotics/go-libp2p v0.33.1-0.20240504075939-591fc65373be/go.mod h1:gA6iEEVpQcx0xpygG/U0wkm+DfII4zoPc3EWViXC5b0= +github.com/aperturerobotics/go-libp2p v0.33.1-0.20240511033834-ffeaa02fcb76 h1:h+VBvwSKvLARXnKgLMy2WUGDJiS1eSlpGRQYkNypync= +github.com/aperturerobotics/go-libp2p v0.33.1-0.20240511033834-ffeaa02fcb76/go.mod h1:bffsvVccfRpqEgAZZHGzTnAxqkUvf9FaKBWh1RXSUbE= +github.com/aperturerobotics/go-libp2p-msgio v0.0.0-20240511033615-1b69178aa5c8 h1:S9prTCDvkYfJ9ATV+B1yoNESE5w5dbFM5GmriXRG0Lk= +github.com/aperturerobotics/go-libp2p-msgio v0.0.0-20240511033615-1b69178aa5c8/go.mod h1:fK2s0Xpx0LYL2YQpYGJ7H+QwrC8+EgZ4Dd4G/vaLMW8= github.com/aperturerobotics/json-iterator-lite v1.0.0 h1:cihbrYWoK/S2RYXhJLpDZd+GUjVvFJN+D3w1VOqqHRI= github.com/aperturerobotics/json-iterator-lite v1.0.0/go.mod h1:snaApCEDtrHHP6UWSLKiYNOZU9A5NyzccKenx9oZEzg= github.com/aperturerobotics/logrus v1.9.4-0.20240119050608-13332fb58195 h1:uyeD1J23j/kFiCFO7rx+GQA4tCqOEy3IJyMK4f6vamE= github.com/aperturerobotics/logrus v1.9.4-0.20240119050608-13332fb58195/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/aperturerobotics/protobuf-go-lite v0.6.1 h1:dN4baS2e2qHhdpX57RJKUEukseXrXtqtiUJxGFFUbRs= -github.com/aperturerobotics/protobuf-go-lite v0.6.1/go.mod h1:6Bp+C+fI1uh0NmIKpxlxyHMkKtCP9Kb3PHkhOzxG4B8= +github.com/aperturerobotics/protobuf-go-lite v0.6.3 h1:AZ821ntYqzCpq6jE5rWJwJLikYbaa63Nka7YfW9EJdE= +github.com/aperturerobotics/protobuf-go-lite v0.6.3/go.mod h1:YTbfnUj3feSULhs8VgepAHFnF3wUc0CPj4jd2axy21I= github.com/aperturerobotics/quic-go v0.43.1-0.20240504081906-25e38f065e10 h1:xtQ4K5XBgTSO47KbLYYEy9Y3HWLGeVNlbJXw1RfAXt4= github.com/aperturerobotics/quic-go v0.43.1-0.20240504081906-25e38f065e10/go.mod h1:IWwvw/rjosC5aPDuEgzbRPNlZSHC4b4ABztoalIe59g= -github.com/aperturerobotics/starpc v0.32.4 h1:d72BujyBGz5+v3ruDRRyqr6/Gl2W7BLPyUzvg5ZgRE4= -github.com/aperturerobotics/starpc v0.32.4/go.mod h1:55y+i/Rjh69+CxZQ3MlFu1qmmjQ0iCU2RSFAO7EXVp0= -github.com/aperturerobotics/util v1.23.0 h1:MW2klko8UN+t1baHiwy0RsEbpz+ZSleSmvZ9M26AQgA= -github.com/aperturerobotics/util v1.23.0/go.mod h1:NaPbGzquoyVaaCLcdxorXjDYrI9Y+FoRNqOfKGUl9EY= +github.com/aperturerobotics/starpc v0.32.7 h1:IPG6efmEs6D/D3BUxTNkCY3p4vAVj6j+NsJnXM5elGw= +github.com/aperturerobotics/starpc v0.32.7/go.mod h1:wKTGKHkd7d+hfMMfzd8ZKYdiPzjC7+f/vfQy/QmVLqY= github.com/aperturerobotics/util v1.23.1 h1:pEeBrN5UUNy83OFyv9d7BQod8O++j5ZwIkEuYGdpRXw= github.com/aperturerobotics/util v1.23.1/go.mod h1:dO8P8Ut5xNPpLrPPpn7kM/aJL+qT20C5Ppcs1GE0VNg= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= @@ -87,8 +85,6 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA= github.com/libp2p/go-libp2p-testing v0.12.0/go.mod h1:KcGDRXyN7sQCllucn1cOOS+Dmm7ujhfEyXQL5lvkcPg= -github.com/libp2p/go-msgio v0.3.0 h1:mf3Z8B1xcFN314sWX+2vOTShIE0Mmn2TXn3YCUQGNj0= -github.com/libp2p/go-msgio v0.3.0/go.mod h1:nyRM819GmVaF9LX3l03RMh10QdOroF++NBbxAb0mmDM= github.com/libp2p/go-yamux/v4 v4.0.2-0.20240322071716-53ef5820bd48 h1:KI65sCCL2h9IyCQwBhBXDgkKt3bmXoTu8T3rLVLZW4I= github.com/libp2p/go-yamux/v4 v4.0.2-0.20240322071716-53ef5820bd48/go.mod h1:PGP+3py2ZWDKABvqstBZtMnixEHNC7U/odnGylzur5o= github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= @@ -104,8 +100,6 @@ github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9 github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4= github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g= github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk= -github.com/multiformats/go-multicodec v0.9.0 h1:pb/dlPnzee/Sxv/j4PmkDRxCOi3hXTz3IbPKOXWJkmg= -github.com/multiformats/go-multicodec v0.9.0/go.mod h1:L3QTQvMIaVBkXOXXtVmYE+LI16i14xuaojr/H7Ai54k= github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U= github.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM= github.com/multiformats/go-multistream v0.5.0 h1:5htLSLl7lvJk3xx3qT/8Zm9J4K8vEOf/QGkvOGQAyiE= @@ -302,8 +296,8 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/http/log/client.go b/http/log/client.go index 2177360a..6852c95e 100644 --- a/http/log/client.go +++ b/http/log/client.go @@ -112,7 +112,7 @@ func DoRequestWithClient(le *logrus.Entry, client HttpClient, req *http.Request, le := le.WithFields(fields) if err != nil { le.WithError(err).Warn("request errored") - } else if resp.StatusCode >= 400 { + } else if resp == nil || resp.StatusCode >= 400 { le.Warn("request failed") } else if verbose { le.Debug("request succeeded") diff --git a/http/log/fetch/fetch_js.go b/http/log/fetch/fetch_js.go index b324fb1f..507c6079 100644 --- a/http/log/fetch/fetch_js.go +++ b/http/log/fetch/fetch_js.go @@ -64,7 +64,7 @@ func Fetch(le *logrus.Entry, url string, opts *fetch.Opts, verbose bool) (*fetch if err != nil { le.WithError(err).Warn("request errored") - } else if resp.Status >= 400 { + } else if resp == nil || resp.Status >= 400 { le.Warn("request failed") } else if verbose { le.Debug("request succeeded") diff --git a/package.json b/package.json index ecd346d9..c6fa878a 100644 --- a/package.json +++ b/package.json @@ -44,15 +44,15 @@ "singleQuote": true }, "devDependencies": { - "@aptre/common": "^0.15.5", + "@aptre/common": "^0.15.6", "depcheck": "^1.4.6", "prettier": "^3.1.1", - "rimraf": "^5.0.5", + "rimraf": "^5.0.6", "typescript": "^5.4.4" }, "dependencies": { "@aptre/protobuf-es-lite": "^0.4.3", - "starpc": "^0.32.4" + "starpc": "^0.32.7" }, "resolutions": { "@aptre/protobuf-es-lite": "0.4.3" diff --git a/peer/api/api_srpc.pb.go b/peer/api/api_srpc.pb.go index f8aa0208..7a6c1998 100644 --- a/peer/api/api_srpc.pb.go +++ b/peer/api/api_srpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-srpc. DO NOT EDIT. -// protoc-gen-srpc version: v0.32.3 +// protoc-gen-srpc version: v0.32.4 // source: github.com/aperturerobotics/bifrost/peer/api/api.proto package peer_api diff --git a/peer/peer_id.go b/peer/id.go similarity index 95% rename from peer/peer_id.go rename to peer/id.go index f35729ed..356c6197 100644 --- a/peer/peer_id.go +++ b/peer/id.go @@ -15,7 +15,7 @@ func IDFromBytes(b []byte) (ID, error) { return ip.IDFromBytes(b) } -// IDB58Decode returns a b58-decoded Peer +// IDB58Decode returns a b58-decoded Peer ID. func IDB58Decode(s string) (ID, error) { return ip.Decode(s) } diff --git a/pubsub/api/api_srpc.pb.go b/pubsub/api/api_srpc.pb.go index 19da0af9..465c3751 100644 --- a/pubsub/api/api_srpc.pb.go +++ b/pubsub/api/api_srpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-srpc. DO NOT EDIT. -// protoc-gen-srpc version: v0.32.3 +// protoc-gen-srpc version: v0.32.4 // source: github.com/aperturerobotics/bifrost/pubsub/api/api.proto package pubsub_api diff --git a/rpc/access/access_srpc.pb.go b/rpc/access/access_srpc.pb.go index ced74040..4797914f 100644 --- a/rpc/access/access_srpc.pb.go +++ b/rpc/access/access_srpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-srpc. DO NOT EDIT. -// protoc-gen-srpc version: v0.32.3 +// protoc-gen-srpc version: v0.32.4 // source: github.com/aperturerobotics/bifrost/rpc/access/access.proto package bifrost_rpc_access diff --git a/signaling/rpc/signaling_srpc.pb.go b/signaling/rpc/signaling_srpc.pb.go index df4e7fb7..98dff003 100644 --- a/signaling/rpc/signaling_srpc.pb.go +++ b/signaling/rpc/signaling_srpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-srpc. DO NOT EDIT. -// protoc-gen-srpc version: v0.32.3 +// protoc-gen-srpc version: v0.32.4 // source: github.com/aperturerobotics/bifrost/signaling/rpc/signaling.proto package signaling_rpc diff --git a/stream/api/api_srpc.pb.go b/stream/api/api_srpc.pb.go index 0220373c..e25ee888 100644 --- a/stream/api/api_srpc.pb.go +++ b/stream/api/api_srpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-srpc. DO NOT EDIT. -// protoc-gen-srpc version: v0.32.3 +// protoc-gen-srpc version: v0.32.4 // source: github.com/aperturerobotics/bifrost/stream/api/api.proto package stream_api diff --git a/yarn.lock b/yarn.lock index 6bc0fd20..c6ad71f9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,7 +2,7 @@ # yarn lockfile v1 -"@aptre/common@^0.15.5": +"@aptre/common@^0.15.6": version "0.15.6" resolved "https://registry.yarnpkg.com/@aptre/common/-/common-0.15.6.tgz#b608667d2329f02cd383761c98669cbe7c48e160" integrity sha512-0NY2BwDMlxrlsWNGdust+Ik6R/igHgWHfm1mqjuUiq5XNgf/UvTVv/c+1ZVtwXZ78/c/5jKvsQZeFH/omZr43A== @@ -1828,7 +1828,7 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^5.0.5: +rimraf@^5.0.6: version "5.0.6" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.6.tgz#f13b90af1794a2e8e1ecd052263bcf688742af88" integrity sha512-X72SgyOf+1lFnGM6gYcmZ4+jMOwuT4E4SajKQzUIlI7EoR5eFHMhS/wf8Ll0mN+w2bxcIVldrJQ6xT7HFQywjg== @@ -1884,10 +1884,29 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== -starpc@^0.32.3, starpc@^0.32.4: - version "0.32.4" - resolved "https://registry.yarnpkg.com/starpc/-/starpc-0.32.4.tgz#5973a277d2505b5aef648280fddc5d3c29166b00" - integrity sha512-l9+GiC1W6zegdIJPw2g+pM2dyn99zc5qQxkB+0Ww0K13PbKdeprGUvz3nbutQJE8Mtc42kLRvdnJAOu3ZWl0Wg== +starpc@^0.32.3: + version "0.32.6" + resolved "https://registry.yarnpkg.com/starpc/-/starpc-0.32.6.tgz#c5c8149393d1e61467317122c00afa428f58fe27" + integrity sha512-wm1X/PmaGVxz9Uw88wX0SNewXUXX/X9CnGjwfGe0euxwSRuj2PTsAs6/8ar69BYhZ65SqAhxCxYo84v0hre4mQ== + dependencies: + "@aptre/it-ws" "^1.0.0" + "@aptre/protobuf-es-lite" "^0.4.3" + "@chainsafe/libp2p-yamux" "^6.0.2" + "@libp2p/interface" "^1.3.1" + "@libp2p/logger" "^4.0.12" + event-iterator "^2.0.0" + isomorphic-ws "^5.0.0" + it-first "^3.0.6" + it-pipe "^3.0.1" + it-pushable "^3.2.3" + it-stream-types "^2.0.1" + uint8arraylist "^2.4.7" + ws "^8.17.0" + +starpc@^0.32.7: + version "0.32.7" + resolved "https://registry.yarnpkg.com/starpc/-/starpc-0.32.7.tgz#775aba6daad31f91553eec4639dbca372a97234e" + integrity sha512-2riwKMZvWa5pmiYxo6hHPOYoWzmmIXtkvMZsfXMDyky1A33LExwUwfPIuCteT8T0iZ/7WKdq6Wk2/JO/r9IFAw== dependencies: "@aptre/it-ws" "^1.0.0" "@aptre/protobuf-es-lite" "^0.4.3" @@ -2030,9 +2049,9 @@ uint8arraylist@^2.0.0, uint8arraylist@^2.4.3, uint8arraylist@^2.4.7, uint8arrayl uint8arrays "^5.0.1" uint8arrays@^5.0.0, uint8arrays@^5.0.1, uint8arrays@^5.0.2, uint8arrays@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-5.0.3.tgz#92b894d9c4269ba97c51544d6e1f279fe6f80d1f" - integrity sha512-6LBuKji28kHjgPJMkQ6GDaBb1lRwIhyOYq6pDGwYMoDPfImE9SkuYENVmR0yu9yGgs2clHUSY9fKDukR+AXfqQ== + version "5.1.0" + resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-5.1.0.tgz#14047c9bdf825d025b7391299436e5e50e7270f1" + integrity sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww== dependencies: multiformats "^13.0.0"