From 7d61c358a6cfdde57340937039bd1a5f291cbc8a Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Thu, 12 Oct 2023 14:31:00 -0700 Subject: [PATCH] refactor: update deps & regen protos Signed-off-by: Christian Stewart --- agent/controller/config.pb.go | 2 +- agent/controller/config.pb.ts | 22 +-- agent/controller/config_vtproto.pb.go | 2 +- daemon/api/api.pb.go | 2 +- daemon/api/api.pb.ts | 16 +- daemon/api/api_vtproto.pb.go | 2 +- daemon/api/controller/controller.pb.go | 2 +- daemon/api/controller/controller.pb.ts | 22 +-- .../api/controller/controller_vtproto.pb.go | 2 +- entitygraph/config.pb.go | 2 +- entitygraph/config.pb.ts | 16 +- entitygraph/config_vtproto.pb.go | 2 +- go.mod | 4 +- go.sum | 8 +- hack/go.mod | 4 +- hack/go.sum | 8 +- handshake/identity/s2s/s2s.pb.go | 2 +- handshake/identity/s2s/s2s.pb.ts | 99 +++++-------- handshake/identity/s2s/s2s_vtproto.pb.go | 2 +- hash/hash.pb.go | 2 +- hash/hash.pb.ts | 49 ++---- hash/hash_vtproto.pb.go | 2 +- http/listener/config.pb.go | 2 +- http/listener/config.pb.ts | 30 ++-- http/listener/config_vtproto.pb.go | 2 +- link/establish/config.pb.go | 2 +- link/establish/config.pb.ts | 24 +-- link/establish/config_vtproto.pb.go | 2 +- link/hold-open/config.pb.go | 2 +- link/hold-open/config.pb.ts | 16 +- link/hold-open/config_vtproto.pb.go | 2 +- package.json | 2 +- peer/api/api.pb.go | 2 +- peer/api/api.pb.ts | 74 +++++----- peer/api/api_srpc.pb.go | 2 +- peer/api/api_vtproto.pb.go | 2 +- peer/controller/config.pb.go | 2 +- peer/controller/config.pb.ts | 22 +-- peer/controller/config_vtproto.pb.go | 2 +- peer/peer.pb.go | 2 +- peer/peer.pb.ts | 65 +++----- peer/peer_vtproto.pb.go | 2 +- pubsub/api/api.pb.go | 2 +- pubsub/api/api.pb.ts | 139 +++++++++--------- pubsub/api/api_srpc.pb.go | 2 +- pubsub/api/api_vtproto.pb.go | 2 +- pubsub/floodsub/controller/config.pb.go | 2 +- pubsub/floodsub/controller/config.pb.ts | 16 +- .../floodsub/controller/config_vtproto.pb.go | 2 +- pubsub/floodsub/floodsub.pb.go | 2 +- pubsub/floodsub/floodsub.pb.ts | 52 ++++--- pubsub/floodsub/floodsub_vtproto.pb.go | 2 +- pubsub/nats/controller/config.pb.go | 2 +- pubsub/nats/controller/config.pb.ts | 18 +-- pubsub/nats/controller/config_vtproto.pb.go | 2 +- pubsub/nats/nats.pb.go | 2 +- pubsub/nats/nats.pb.ts | 30 ++-- pubsub/nats/nats_vtproto.pb.go | 2 +- pubsub/relay/config.pb.go | 2 +- pubsub/relay/config.pb.ts | 22 +-- pubsub/relay/config_vtproto.pb.go | 2 +- pubsub/util/pubmessage/pubmessage.pb.go | 2 +- pubsub/util/pubmessage/pubmessage.pb.ts | 57 +++---- .../util/pubmessage/pubmessage_vtproto.pb.go | 2 +- rpc/access/access.pb.go | 2 +- rpc/access/access.pb.ts | 44 +++--- rpc/access/access_srpc.pb.go | 2 +- rpc/access/access_vtproto.pb.go | 2 +- stream/api/accept/accept.pb.go | 2 +- stream/api/accept/accept.pb.ts | 28 ++-- stream/api/accept/accept_vtproto.pb.go | 2 +- stream/api/api.pb.go | 2 +- stream/api/api.pb.ts | 100 ++++++------- stream/api/api_srpc.pb.go | 2 +- stream/api/api_vtproto.pb.go | 2 +- stream/api/dial/dial.pb.go | 2 +- stream/api/dial/dial.pb.ts | 34 +++-- stream/api/dial/dial_vtproto.pb.go | 2 +- stream/api/rpc/rpc.pb.go | 2 +- stream/api/rpc/rpc.pb.ts | 49 ++---- stream/api/rpc/rpc_vtproto.pb.go | 2 +- stream/drpc/client/client.pb.go | 2 +- stream/drpc/client/client.pb.ts | 28 ++-- stream/drpc/client/client_vtproto.pb.go | 2 +- stream/drpc/drpc.pb.go | 2 +- stream/drpc/drpc.pb.ts | 50 ++++--- stream/drpc/drpc_vtproto.pb.go | 2 +- stream/drpc/e2e/e2e.pb.go | 2 +- stream/drpc/e2e/e2e.pb.ts | 34 +++-- stream/drpc/e2e/e2e_srpc.pb.go | 2 +- stream/drpc/e2e/e2e_vtproto.pb.go | 2 +- stream/drpc/server/server.pb.go | 2 +- stream/drpc/server/server.pb.ts | 20 +-- stream/drpc/server/server_vtproto.pb.go | 2 +- stream/echo/echo.pb.go | 2 +- stream/echo/echo.pb.ts | 22 +-- stream/echo/echo_vtproto.pb.go | 2 +- stream/forwarding/forwarding.pb.go | 2 +- stream/forwarding/forwarding.pb.ts | 24 +-- stream/forwarding/forwarding_vtproto.pb.go | 2 +- stream/listening/listening.pb.go | 2 +- stream/listening/listening.pb.ts | 36 +++-- stream/listening/listening_vtproto.pb.go | 2 +- stream/srpc/client/client.pb.go | 2 +- stream/srpc/client/client.pb.ts | 28 ++-- stream/srpc/client/client_vtproto.pb.go | 2 +- stream/srpc/server/server.pb.go | 2 +- stream/srpc/server/server.pb.ts | 20 +-- stream/srpc/server/server_vtproto.pb.go | 2 +- tptaddr/controller/config.pb.go | 2 +- tptaddr/controller/config.pb.ts | 16 +- tptaddr/controller/config_vtproto.pb.go | 2 +- tptaddr/static/static.pb.go | 2 +- tptaddr/static/static.pb.ts | 20 +-- tptaddr/static/static_vtproto.pb.go | 2 +- transport/common/conn/conn.pb.go | 2 +- transport/common/conn/conn.pb.ts | 24 +-- transport/common/conn/conn_vtproto.pb.go | 2 +- transport/common/dialer/dialer.pb.go | 2 +- transport/common/dialer/dialer.pb.ts | 18 +-- transport/common/dialer/dialer_vtproto.pb.go | 2 +- transport/common/kcp/coord_stream.pb.go | 2 +- transport/common/kcp/coord_stream.pb.ts | 70 +++++---- .../common/kcp/coord_stream_vtproto.pb.go | 2 +- transport/common/kcp/kcp.pb.go | 2 +- transport/common/kcp/kcp.pb.ts | 24 +-- transport/common/kcp/kcp_handshake.pb.go | 2 +- transport/common/kcp/kcp_handshake.pb.ts | 16 +- .../common/kcp/kcp_handshake_vtproto.pb.go | 2 +- transport/common/kcp/kcp_vtproto.pb.go | 2 +- transport/common/kcp/packet_type.pb.go | 2 +- transport/common/pconn/pconn.pb.go | 2 +- transport/common/pconn/pconn.pb.ts | 20 +-- transport/common/pconn/pconn_vtproto.pb.go | 2 +- transport/common/quic/quic.pb.go | 2 +- transport/common/quic/quic.pb.ts | 32 ++-- transport/common/quic/quic_vtproto.pb.go | 2 +- transport/controller/controller.pb.go | 2 +- transport/controller/controller.pb.ts | 20 +-- transport/controller/controller_vtproto.pb.go | 2 +- transport/inproc/inproc.pb.go | 2 +- transport/inproc/inproc.pb.ts | 32 ++-- transport/inproc/inproc_vtproto.pb.go | 2 +- transport/udp/udp.pb.go | 2 +- transport/udp/udp.pb.ts | 36 ++--- transport/udp/udp_vtproto.pb.go | 2 +- transport/websocket/websocket.pb.go | 2 +- transport/websocket/websocket.pb.ts | 38 ++--- transport/websocket/websocket_vtproto.pb.go | 2 +- transport/xbee/xbee.pb.go | 2 +- transport/xbee/xbee.pb.ts | 40 ++--- transport/xbee/xbee_vtproto.pb.go | 2 +- util/blockcompress/blockcompress.pb.go | 2 +- util/blockcrypt/blockcrypt.pb.go | 2 +- yarn.lock | 8 +- 155 files changed, 971 insertions(+), 979 deletions(-) diff --git a/agent/controller/config.pb.go b/agent/controller/config.pb.go index bbeeee65..a8a4d0ac 100644 --- a/agent/controller/config.pb.go +++ b/agent/controller/config.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/agent/controller/config.proto diff --git a/agent/controller/config.pb.ts b/agent/controller/config.pb.ts index 9c4be6cc..6aaf86d7 100644 --- a/agent/controller/config.pb.ts +++ b/agent/controller/config.pb.ts @@ -74,12 +74,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -92,20 +92,22 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, fromJSON(object: any): Config { return { - privKey: isSet(object.privKey) ? String(object.privKey) : '', - nodePeerId: isSet(object.nodePeerId) ? String(object.nodePeerId) : '', + privKey: isSet(object.privKey) ? globalThis.String(object.privKey) : '', + nodePeerId: isSet(object.nodePeerId) + ? globalThis.String(object.nodePeerId) + : '', } }, @@ -144,8 +146,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/agent/controller/config_vtproto.pb.go b/agent/controller/config_vtproto.pb.go index c98f0834..60953411 100644 --- a/agent/controller/config_vtproto.pb.go +++ b/agent/controller/config_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/agent/controller/config.proto package agent_controller diff --git a/daemon/api/api.pb.go b/daemon/api/api.pb.go index 35a2a2a5..ef3450bc 100644 --- a/daemon/api/api.pb.go +++ b/daemon/api/api.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/daemon/api/api.proto diff --git a/daemon/api/api.pb.ts b/daemon/api/api.pb.ts index 22899e1f..706b6bef 100644 --- a/daemon/api/api.pb.ts +++ b/daemon/api/api.pb.ts @@ -56,12 +56,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -74,12 +74,12 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, @@ -126,8 +126,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/daemon/api/api_vtproto.pb.go b/daemon/api/api_vtproto.pb.go index ee6eec54..4de6574a 100644 --- a/daemon/api/api_vtproto.pb.go +++ b/daemon/api/api_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/daemon/api/api.proto package bifrost_api diff --git a/daemon/api/controller/controller.pb.go b/daemon/api/controller/controller.pb.go index 10cb3db3..677555a7 100644 --- a/daemon/api/controller/controller.pb.go +++ b/daemon/api/controller/controller.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/daemon/api/controller/controller.proto diff --git a/daemon/api/controller/controller.pb.ts b/daemon/api/controller/controller.pb.ts index 2d888712..ce2cb1f1 100644 --- a/daemon/api/controller/controller.pb.ts +++ b/daemon/api/controller/controller.pb.ts @@ -101,12 +101,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -119,24 +119,26 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, fromJSON(object: any): Config { return { - listenAddr: isSet(object.listenAddr) ? String(object.listenAddr) : '', + listenAddr: isSet(object.listenAddr) + ? globalThis.String(object.listenAddr) + : '', apiConfig: isSet(object.apiConfig) ? Config1.fromJSON(object.apiConfig) : undefined, disableBusApi: isSet(object.disableBusApi) - ? Boolean(object.disableBusApi) + ? globalThis.Boolean(object.disableBusApi) : false, busApiConfig: isSet(object.busApiConfig) ? Config2.fromJSON(object.busApiConfig) @@ -193,8 +195,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/daemon/api/controller/controller_vtproto.pb.go b/daemon/api/controller/controller_vtproto.pb.go index 8d312c98..35ab8daf 100644 --- a/daemon/api/controller/controller_vtproto.pb.go +++ b/daemon/api/controller/controller_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/daemon/api/controller/controller.proto package bifrost_api_controller diff --git a/entitygraph/config.pb.go b/entitygraph/config.pb.go index 06135423..4d29d2ab 100644 --- a/entitygraph/config.pb.go +++ b/entitygraph/config.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/entitygraph/config.proto diff --git a/entitygraph/config.pb.ts b/entitygraph/config.pb.ts index 9b162574..3862f52d 100644 --- a/entitygraph/config.pb.ts +++ b/entitygraph/config.pb.ts @@ -39,12 +39,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -57,12 +57,12 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, @@ -98,8 +98,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/entitygraph/config_vtproto.pb.go b/entitygraph/config_vtproto.pb.go index 5c39e28b..33156b90 100644 --- a/entitygraph/config_vtproto.pb.go +++ b/entitygraph/config_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/entitygraph/config.proto package bifrost_entitygraph diff --git a/go.mod b/go.mod index b839b19d..50a28497 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/aperturerobotics/bifrost go 1.20 require ( - github.com/aperturerobotics/controllerbus v0.30.5 // latest + github.com/aperturerobotics/controllerbus v0.30.6 // latest github.com/aperturerobotics/entitygraph v0.4.0 github.com/aperturerobotics/starpc v0.21.2 // latest ) @@ -18,7 +18,7 @@ replace ( github.com/paralin/kcp-go-lite => github.com/paralin/kcp-go-lite v1.0.2-0.20210907043027-271505668bd0 // aperture github.com/quic-go/quic-go => github.com/aperturerobotics/quic-go v0.38.1-0.20231004004015-9ea9492e88bd // aperture github.com/sirupsen/logrus => github.com/aperturerobotics/logrus v1.9.1-0.20221224130652-ff61cbb763af // aperture - google.golang.org/protobuf => github.com/aperturerobotics/protobuf-go v1.31.1-0.20231004004114-bf10d4f3cd42 // aperture + google.golang.org/protobuf => github.com/aperturerobotics/protobuf-go v1.31.1-0.20231012212426-9cf9f0f94f47 // aperture nhooyr.io/websocket => github.com/paralin/nhooyr-websocket v1.8.8-0.20220321125022-7defdf942f07 // aperture storj.io/drpc => github.com/paralin/drpc v0.0.31-0.20220527065730-0e2a1370bccb // aperture ) diff --git a/go.sum b/go.sum index 4be60838..ed7ea544 100644 --- a/go.sum +++ b/go.sum @@ -6,14 +6,14 @@ 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/controllerbus v0.30.5 h1:wq2WJO54RDnLLRLieHFmsjX5U09n4iAMZrCGkkbwnYo= -github.com/aperturerobotics/controllerbus v0.30.5/go.mod h1:Adm1bgElXGFjIKoCdlGWOCgOequKdQN6Soqfkwgi/Hk= +github.com/aperturerobotics/controllerbus v0.30.6 h1:7OtoeCkvd4AVWpNk+8/2fZ+/EOa6mtoOSqmIjxWZv8g= +github.com/aperturerobotics/controllerbus v0.30.6/go.mod h1:jPA4/F6dT3ZvzaOHt0QMSA1RWeL7CdzVQ4DOiVYyK6g= github.com/aperturerobotics/entitygraph v0.4.0 h1:V73zfiFrF6f8tBQ6Lg3YoptciPMFvfO0XySFRODWEuo= github.com/aperturerobotics/entitygraph v0.4.0/go.mod h1:k3re4TkpTDmCA2PVkZ/bGdq5GSG/OFLkeviainSQKFQ= github.com/aperturerobotics/logrus v1.9.1-0.20221224130652-ff61cbb763af h1:nRveANX8PK0j+6M+d6Hyl45W+fQpg6BDBfcrrFMbbrw= github.com/aperturerobotics/logrus v1.9.1-0.20221224130652-ff61cbb763af/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/aperturerobotics/protobuf-go v1.31.1-0.20231004004114-bf10d4f3cd42 h1:umqEpzvBzfVydH+g1xP9WSWsf6AV2n0IjfbGnmZS3PY= -github.com/aperturerobotics/protobuf-go v1.31.1-0.20231004004114-bf10d4f3cd42/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +github.com/aperturerobotics/protobuf-go v1.31.1-0.20231012212426-9cf9f0f94f47 h1:ileI5MiwnrcVzZDUV62Ts0Q+TZt8Cgl1E+Ncr60YLeY= +github.com/aperturerobotics/protobuf-go v1.31.1-0.20231012212426-9cf9f0f94f47/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= github.com/aperturerobotics/quic-go v0.38.1-0.20231004004015-9ea9492e88bd h1:hNBdeeBdIaq7is2YqAs6INyHk4tN8Lh5KJgHc9UTprE= github.com/aperturerobotics/quic-go v0.38.1-0.20231004004015-9ea9492e88bd/go.mod h1:54SZneeKslKqBE5rx+jowQvgocMeDrpCKnLNAfXWm68= github.com/aperturerobotics/starpc v0.21.2 h1:v5P5VttYDeoXlVWKDwEMo9v29dcJEV9dW7n4MeWUbVs= diff --git a/hack/go.mod b/hack/go.mod index 23db2e05..5007b238 100644 --- a/hack/go.mod +++ b/hack/go.mod @@ -6,7 +6,7 @@ replace github.com/aperturerobotics/bifrost => ../ replace ( github.com/sirupsen/logrus => github.com/aperturerobotics/logrus v1.9.1-0.20221224130652-ff61cbb763af // aperture - google.golang.org/protobuf => github.com/aperturerobotics/protobuf-go v1.31.1-0.20231004004114-bf10d4f3cd42 // aperture + google.golang.org/protobuf => github.com/aperturerobotics/protobuf-go v1.31.1-0.20231012212426-9cf9f0f94f47 // aperture ) require ( @@ -42,7 +42,7 @@ require ( github.com/alexkohler/nakedret/v2 v2.0.2 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect github.com/alingse/asasalint v0.0.11 // indirect - github.com/aperturerobotics/controllerbus v0.30.5 // indirect + github.com/aperturerobotics/controllerbus v0.30.6 // indirect github.com/aperturerobotics/entitygraph v0.4.0 // indirect github.com/aperturerobotics/timestamp v0.8.0 // indirect github.com/aperturerobotics/ts-proto-common-types v0.2.0 // indirect diff --git a/hack/go.sum b/hack/go.sum index 7dfe77c6..1d219900 100644 --- a/hack/go.sum +++ b/hack/go.sum @@ -73,16 +73,16 @@ github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pO github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= -github.com/aperturerobotics/controllerbus v0.30.5 h1:wq2WJO54RDnLLRLieHFmsjX5U09n4iAMZrCGkkbwnYo= -github.com/aperturerobotics/controllerbus v0.30.5/go.mod h1:Adm1bgElXGFjIKoCdlGWOCgOequKdQN6Soqfkwgi/Hk= +github.com/aperturerobotics/controllerbus v0.30.6 h1:7OtoeCkvd4AVWpNk+8/2fZ+/EOa6mtoOSqmIjxWZv8g= +github.com/aperturerobotics/controllerbus v0.30.6/go.mod h1:jPA4/F6dT3ZvzaOHt0QMSA1RWeL7CdzVQ4DOiVYyK6g= github.com/aperturerobotics/entitygraph v0.4.0 h1:V73zfiFrF6f8tBQ6Lg3YoptciPMFvfO0XySFRODWEuo= github.com/aperturerobotics/entitygraph v0.4.0/go.mod h1:k3re4TkpTDmCA2PVkZ/bGdq5GSG/OFLkeviainSQKFQ= github.com/aperturerobotics/goprotowrap v0.3.0 h1:JLQ/1zVRdm2qwfeK7bPxWPg5fpTLlzovDUom0vBgcgM= github.com/aperturerobotics/goprotowrap v0.3.0/go.mod h1:ehsRFLviAKk5oiZK+i5oL4juhTYaGhaMrURiqY+ttLo= github.com/aperturerobotics/logrus v1.9.1-0.20221224130652-ff61cbb763af h1:nRveANX8PK0j+6M+d6Hyl45W+fQpg6BDBfcrrFMbbrw= github.com/aperturerobotics/logrus v1.9.1-0.20221224130652-ff61cbb763af/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/aperturerobotics/protobuf-go v1.31.1-0.20231004004114-bf10d4f3cd42 h1:umqEpzvBzfVydH+g1xP9WSWsf6AV2n0IjfbGnmZS3PY= -github.com/aperturerobotics/protobuf-go v1.31.1-0.20231004004114-bf10d4f3cd42/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +github.com/aperturerobotics/protobuf-go v1.31.1-0.20231012212426-9cf9f0f94f47 h1:ileI5MiwnrcVzZDUV62Ts0Q+TZt8Cgl1E+Ncr60YLeY= +github.com/aperturerobotics/protobuf-go v1.31.1-0.20231012212426-9cf9f0f94f47/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= github.com/aperturerobotics/starpc v0.21.2 h1:v5P5VttYDeoXlVWKDwEMo9v29dcJEV9dW7n4MeWUbVs= github.com/aperturerobotics/starpc v0.21.2/go.mod h1:Q3T2anjw2P6gkJq7gp3vAO+pniPgv3Qx1uaX/mOuzWk= github.com/aperturerobotics/timestamp v0.8.0 h1:33HLje1vrCWCOfLLaUi7Lgyz/1U9xTasNCw0PtLiDGc= diff --git a/handshake/identity/s2s/s2s.pb.go b/handshake/identity/s2s/s2s.pb.go index d0127f86..3bf80547 100644 --- a/handshake/identity/s2s/s2s.pb.go +++ b/handshake/identity/s2s/s2s.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/handshake/identity/s2s/s2s.proto diff --git a/handshake/identity/s2s/s2s.pb.ts b/handshake/identity/s2s/s2s.pb.ts index 0b2d1b9d..3054cefa 100644 --- a/handshake/identity/s2s/s2s.pb.ts +++ b/handshake/identity/s2s/s2s.pb.ts @@ -189,12 +189,12 @@ export const Packet = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Packet.encode(p).finish()] } } else { - yield* [Packet.encode(pkt).finish()] + yield* [Packet.encode(pkt as any).finish()] } } }, @@ -207,12 +207,12 @@ export const Packet = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Packet.decode(p)] } } else { - yield* [Packet.decode(pkt)] + yield* [Packet.decode(pkt as any)] } } }, @@ -344,12 +344,12 @@ export const Packet_Init = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Packet_Init.encode(p).finish()] } } else { - yield* [Packet_Init.encode(pkt).finish()] + yield* [Packet_Init.encode(pkt as any).finish()] } } }, @@ -362,12 +362,12 @@ export const Packet_Init = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Packet_Init.decode(p)] } } else { - yield* [Packet_Init.decode(pkt)] + yield* [Packet_Init.decode(pkt as any)] } } }, @@ -471,12 +471,12 @@ export const Packet_InitAck = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Packet_InitAck.encode(p).finish()] } } else { - yield* [Packet_InitAck.encode(pkt).finish()] + yield* [Packet_InitAck.encode(pkt as any).finish()] } } }, @@ -489,12 +489,12 @@ export const Packet_InitAck = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Packet_InitAck.decode(p)] } } else { - yield* [Packet_InitAck.decode(pkt)] + yield* [Packet_InitAck.decode(pkt as any)] } } }, @@ -583,12 +583,12 @@ export const Packet_Complete = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Packet_Complete.encode(p).finish()] } } else { - yield* [Packet_Complete.encode(pkt).finish()] + yield* [Packet_Complete.encode(pkt as any).finish()] } } }, @@ -601,12 +601,12 @@ export const Packet_Complete = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Packet_Complete.decode(p)] } } else { - yield* [Packet_Complete.decode(pkt)] + yield* [Packet_Complete.decode(pkt as any)] } } }, @@ -723,12 +723,12 @@ export const Packet_Ciphertext = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Packet_Ciphertext.encode(p).finish()] } } else { - yield* [Packet_Ciphertext.encode(pkt).finish()] + yield* [Packet_Ciphertext.encode(pkt as any).finish()] } } }, @@ -741,12 +741,12 @@ export const Packet_Ciphertext = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Packet_Ciphertext.decode(p)] } } else { - yield* [Packet_Ciphertext.decode(pkt)] + yield* [Packet_Ciphertext.decode(pkt as any)] } } }, @@ -760,7 +760,7 @@ export const Packet_Ciphertext = { ? bytesFromBase64(object.senderPubKey) : new Uint8Array(0), receiverKeyKnown: isSet(object.receiverKeyKnown) - ? Boolean(object.receiverKeyKnown) + ? globalThis.Boolean(object.receiverKeyKnown) : false, extraInfo: isSet(object.extraInfo) ? bytesFromBase64(object.extraInfo) @@ -802,30 +802,11 @@ export const Packet_Ciphertext = { }, } -declare const self: any | undefined -declare const window: any | undefined -declare const global: any | undefined -const tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== 'undefined') { - return globalThis - } - if (typeof self !== 'undefined') { - return self - } - if (typeof window !== 'undefined') { - return window - } - if (typeof global !== 'undefined') { - return global - } - throw 'Unable to locate global object' -})() - function bytesFromBase64(b64: string): Uint8Array { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, 'base64')) + if (globalThis.Buffer) { + return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')) } else { - const bin = tsProtoGlobalThis.atob(b64) + const bin = globalThis.atob(b64) const arr = new Uint8Array(bin.length) for (let i = 0; i < bin.length; ++i) { arr[i] = bin.charCodeAt(i) @@ -835,14 +816,14 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString('base64') + if (globalThis.Buffer) { + return globalThis.Buffer.from(arr).toString('base64') } else { const bin: string[] = [] arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)) + bin.push(globalThis.String.fromCharCode(byte)) }) - return tsProtoGlobalThis.btoa(bin.join('')) + return globalThis.btoa(bin.join('')) } } @@ -859,8 +840,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/handshake/identity/s2s/s2s_vtproto.pb.go b/handshake/identity/s2s/s2s_vtproto.pb.go index d13a992b..0144d6eb 100644 --- a/handshake/identity/s2s/s2s_vtproto.pb.go +++ b/handshake/identity/s2s/s2s_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/handshake/identity/s2s/s2s.proto package s2s diff --git a/hash/hash.pb.go b/hash/hash.pb.go index 491f1eb3..dc612c37 100644 --- a/hash/hash.pb.go +++ b/hash/hash.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/hash/hash.proto diff --git a/hash/hash.pb.ts b/hash/hash.pb.ts index a07336b3..a748beb4 100644 --- a/hash/hash.pb.ts +++ b/hash/hash.pb.ts @@ -120,12 +120,12 @@ export const Hash = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Hash.encode(p).finish()] } } else { - yield* [Hash.encode(pkt).finish()] + yield* [Hash.encode(pkt as any).finish()] } } }, @@ -138,12 +138,12 @@ export const Hash = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Hash.decode(p)] } } else { - yield* [Hash.decode(pkt)] + yield* [Hash.decode(pkt as any)] } } }, @@ -179,30 +179,11 @@ export const Hash = { }, } -declare const self: any | undefined -declare const window: any | undefined -declare const global: any | undefined -const tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== 'undefined') { - return globalThis - } - if (typeof self !== 'undefined') { - return self - } - if (typeof window !== 'undefined') { - return window - } - if (typeof global !== 'undefined') { - return global - } - throw 'Unable to locate global object' -})() - function bytesFromBase64(b64: string): Uint8Array { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, 'base64')) + if (globalThis.Buffer) { + return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')) } else { - const bin = tsProtoGlobalThis.atob(b64) + const bin = globalThis.atob(b64) const arr = new Uint8Array(bin.length) for (let i = 0; i < bin.length; ++i) { arr[i] = bin.charCodeAt(i) @@ -212,14 +193,14 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString('base64') + if (globalThis.Buffer) { + return globalThis.Buffer.from(arr).toString('base64') } else { const bin: string[] = [] arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)) + bin.push(globalThis.String.fromCharCode(byte)) }) - return tsProtoGlobalThis.btoa(bin.join('')) + return globalThis.btoa(bin.join('')) } } @@ -236,8 +217,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/hash/hash_vtproto.pb.go b/hash/hash_vtproto.pb.go index e7d22ac5..d3205103 100644 --- a/hash/hash_vtproto.pb.go +++ b/hash/hash_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/hash/hash.proto package hash diff --git a/http/listener/config.pb.go b/http/listener/config.pb.go index be089563..78b6ad32 100644 --- a/http/listener/config.pb.go +++ b/http/listener/config.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/http/listener/config.proto diff --git a/http/listener/config.pb.ts b/http/listener/config.pb.ts index 4ca850a7..061aedc4 100644 --- a/http/listener/config.pb.ts +++ b/http/listener/config.pb.ts @@ -121,12 +121,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -139,23 +139,27 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, fromJSON(object: any): Config { return { - addr: isSet(object.addr) ? String(object.addr) : '', - clientId: isSet(object.clientId) ? String(object.clientId) : '', - certFile: isSet(object.certFile) ? String(object.certFile) : '', - keyFile: isSet(object.keyFile) ? String(object.keyFile) : '', - wait: isSet(object.wait) ? Boolean(object.wait) : false, + addr: isSet(object.addr) ? globalThis.String(object.addr) : '', + clientId: isSet(object.clientId) + ? globalThis.String(object.clientId) + : '', + certFile: isSet(object.certFile) + ? globalThis.String(object.certFile) + : '', + keyFile: isSet(object.keyFile) ? globalThis.String(object.keyFile) : '', + wait: isSet(object.wait) ? globalThis.Boolean(object.wait) : false, } }, @@ -206,8 +210,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/http/listener/config_vtproto.pb.go b/http/listener/config_vtproto.pb.go index c25c130b..185b3898 100644 --- a/http/listener/config_vtproto.pb.go +++ b/http/listener/config_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/http/listener/config.proto package bifrost_http_listener diff --git a/link/establish/config.pb.go b/link/establish/config.pb.go index d8a87481..78cb5258 100644 --- a/link/establish/config.pb.go +++ b/link/establish/config.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/link/establish/config.proto diff --git a/link/establish/config.pb.ts b/link/establish/config.pb.ts index 6df01ef0..0f07edf3 100644 --- a/link/establish/config.pb.ts +++ b/link/establish/config.pb.ts @@ -73,12 +73,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -91,22 +91,24 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, fromJSON(object: any): Config { return { - peerIds: Array.isArray(object?.peerIds) - ? object.peerIds.map((e: any) => String(e)) + peerIds: globalThis.Array.isArray(object?.peerIds) + ? object.peerIds.map((e: any) => globalThis.String(e)) : [], - srcPeerId: isSet(object.srcPeerId) ? String(object.srcPeerId) : '', + srcPeerId: isSet(object.srcPeerId) + ? globalThis.String(object.srcPeerId) + : '', } }, @@ -145,8 +147,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/link/establish/config_vtproto.pb.go b/link/establish/config_vtproto.pb.go index 6f314ca1..e57500a8 100644 --- a/link/establish/config_vtproto.pb.go +++ b/link/establish/config_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/link/establish/config.proto package link_establish_controller diff --git a/link/hold-open/config.pb.go b/link/hold-open/config.pb.go index 671bf014..673122d8 100644 --- a/link/hold-open/config.pb.go +++ b/link/hold-open/config.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/link/hold-open/config.proto diff --git a/link/hold-open/config.pb.ts b/link/hold-open/config.pb.ts index bbba32fb..7eee5ad0 100644 --- a/link/hold-open/config.pb.ts +++ b/link/hold-open/config.pb.ts @@ -39,12 +39,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -57,12 +57,12 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, @@ -98,8 +98,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/link/hold-open/config_vtproto.pb.go b/link/hold-open/config_vtproto.pb.go index a1bf57da..39eaaa67 100644 --- a/link/hold-open/config_vtproto.pb.go +++ b/link/hold-open/config_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/link/hold-open/config.proto package link_holdopen_controller diff --git a/package.json b/package.json index df2b7ff9..6cfa29cd 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "eslint-config-prettier": "^9.0.0", "patch-package": "^8.0.0", "prettier": "^3.0.1", - "ts-proto": "^1.160.0", + "ts-proto": "^1.161.1", "typescript": "^5.1.6" }, "dependencies": { diff --git a/peer/api/api.pb.go b/peer/api/api.pb.go index b918c94d..cba638ba 100644 --- a/peer/api/api.pb.go +++ b/peer/api/api.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/peer/api/api.proto diff --git a/peer/api/api.pb.ts b/peer/api/api.pb.ts index 7b90ee9f..b7a6304d 100644 --- a/peer/api/api.pb.ts +++ b/peer/api/api.pb.ts @@ -87,12 +87,12 @@ export const IdentifyRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [IdentifyRequest.encode(p).finish()] } } else { - yield* [IdentifyRequest.encode(pkt).finish()] + yield* [IdentifyRequest.encode(pkt as any).finish()] } } }, @@ -105,12 +105,12 @@ export const IdentifyRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [IdentifyRequest.decode(p)] } } else { - yield* [IdentifyRequest.decode(pkt)] + yield* [IdentifyRequest.decode(pkt as any)] } } }, @@ -193,12 +193,12 @@ export const IdentifyResponse = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [IdentifyResponse.encode(p).finish()] } } else { - yield* [IdentifyResponse.encode(pkt).finish()] + yield* [IdentifyResponse.encode(pkt as any).finish()] } } }, @@ -211,12 +211,12 @@ export const IdentifyResponse = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [IdentifyResponse.decode(p)] } } else { - yield* [IdentifyResponse.decode(pkt)] + yield* [IdentifyResponse.decode(pkt as any)] } } }, @@ -298,12 +298,12 @@ export const GetPeerInfoRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [GetPeerInfoRequest.encode(p).finish()] } } else { - yield* [GetPeerInfoRequest.encode(pkt).finish()] + yield* [GetPeerInfoRequest.encode(pkt as any).finish()] } } }, @@ -316,18 +316,20 @@ export const GetPeerInfoRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [GetPeerInfoRequest.decode(p)] } } else { - yield* [GetPeerInfoRequest.decode(pkt)] + yield* [GetPeerInfoRequest.decode(pkt as any)] } } }, fromJSON(object: any): GetPeerInfoRequest { - return { peerId: isSet(object.peerId) ? String(object.peerId) : '' } + return { + peerId: isSet(object.peerId) ? globalThis.String(object.peerId) : '', + } }, toJSON(message: GetPeerInfoRequest): unknown { @@ -399,12 +401,12 @@ export const PeerInfo = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [PeerInfo.encode(p).finish()] } } else { - yield* [PeerInfo.encode(pkt).finish()] + yield* [PeerInfo.encode(pkt as any).finish()] } } }, @@ -417,18 +419,20 @@ export const PeerInfo = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [PeerInfo.decode(p)] } } else { - yield* [PeerInfo.decode(pkt)] + yield* [PeerInfo.decode(pkt as any)] } } }, fromJSON(object: any): PeerInfo { - return { peerId: isSet(object.peerId) ? String(object.peerId) : '' } + return { + peerId: isSet(object.peerId) ? globalThis.String(object.peerId) : '', + } }, toJSON(message: PeerInfo): unknown { @@ -496,12 +500,12 @@ export const GetPeerInfoResponse = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [GetPeerInfoResponse.encode(p).finish()] } } else { - yield* [GetPeerInfoResponse.encode(pkt).finish()] + yield* [GetPeerInfoResponse.encode(pkt as any).finish()] } } }, @@ -514,19 +518,19 @@ export const GetPeerInfoResponse = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [GetPeerInfoResponse.decode(p)] } } else { - yield* [GetPeerInfoResponse.decode(pkt)] + yield* [GetPeerInfoResponse.decode(pkt as any)] } } }, fromJSON(object: any): GetPeerInfoResponse { return { - localPeers: Array.isArray(object?.localPeers) + localPeers: globalThis.Array.isArray(object?.localPeers) ? object.localPeers.map((e: any) => PeerInfo.fromJSON(e)) : [], } @@ -677,8 +681,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/peer/api/api_srpc.pb.go b/peer/api/api_srpc.pb.go index 669b7092..5ecb69d5 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.20.1 +// protoc-gen-srpc version: v0.21.2 // source: github.com/aperturerobotics/bifrost/peer/api/api.proto package peer_api diff --git a/peer/api/api_vtproto.pb.go b/peer/api/api_vtproto.pb.go index b9d1ef7c..92e94666 100644 --- a/peer/api/api_vtproto.pb.go +++ b/peer/api/api_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/peer/api/api.proto package peer_api diff --git a/peer/controller/config.pb.go b/peer/controller/config.pb.go index 5dd9c0ec..afcc2f25 100644 --- a/peer/controller/config.pb.go +++ b/peer/controller/config.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/peer/controller/config.proto diff --git a/peer/controller/config.pb.ts b/peer/controller/config.pb.ts index 1c26360d..0e8b3966 100644 --- a/peer/controller/config.pb.ts +++ b/peer/controller/config.pb.ts @@ -90,12 +90,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -108,21 +108,21 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, fromJSON(object: any): Config { return { - privKey: isSet(object.privKey) ? String(object.privKey) : '', - pubKey: isSet(object.pubKey) ? String(object.pubKey) : '', - peerId: isSet(object.peerId) ? String(object.peerId) : '', + privKey: isSet(object.privKey) ? globalThis.String(object.privKey) : '', + pubKey: isSet(object.pubKey) ? globalThis.String(object.pubKey) : '', + peerId: isSet(object.peerId) ? globalThis.String(object.peerId) : '', } }, @@ -165,8 +165,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/peer/controller/config_vtproto.pb.go b/peer/controller/config_vtproto.pb.go index bceb3e75..95ab52dd 100644 --- a/peer/controller/config_vtproto.pb.go +++ b/peer/controller/config_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/peer/controller/config.proto package peer_controller diff --git a/peer/peer.pb.go b/peer/peer.pb.go index a2a235a4..82941d69 100644 --- a/peer/peer.pb.go +++ b/peer/peer.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/peer/peer.proto diff --git a/peer/peer.pb.ts b/peer/peer.pb.ts index e1bcb1a6..b293a7ac 100644 --- a/peer/peer.pb.ts +++ b/peer/peer.pb.ts @@ -104,12 +104,12 @@ export const Signature = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Signature.encode(p).finish()] } } else { - yield* [Signature.encode(pkt).finish()] + yield* [Signature.encode(pkt as any).finish()] } } }, @@ -122,12 +122,12 @@ export const Signature = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Signature.decode(p)] } } else { - yield* [Signature.decode(pkt)] + yield* [Signature.decode(pkt as any)] } } }, @@ -239,12 +239,12 @@ export const SignedMsg = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [SignedMsg.encode(p).finish()] } } else { - yield* [SignedMsg.encode(pkt).finish()] + yield* [SignedMsg.encode(pkt as any).finish()] } } }, @@ -257,19 +257,21 @@ export const SignedMsg = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [SignedMsg.decode(p)] } } else { - yield* [SignedMsg.decode(pkt)] + yield* [SignedMsg.decode(pkt as any)] } } }, fromJSON(object: any): SignedMsg { return { - fromPeerId: isSet(object.fromPeerId) ? String(object.fromPeerId) : '', + fromPeerId: isSet(object.fromPeerId) + ? globalThis.String(object.fromPeerId) + : '', signature: isSet(object.signature) ? Signature.fromJSON(object.signature) : undefined, @@ -310,30 +312,11 @@ export const SignedMsg = { }, } -declare const self: any | undefined -declare const window: any | undefined -declare const global: any | undefined -const tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== 'undefined') { - return globalThis - } - if (typeof self !== 'undefined') { - return self - } - if (typeof window !== 'undefined') { - return window - } - if (typeof global !== 'undefined') { - return global - } - throw 'Unable to locate global object' -})() - function bytesFromBase64(b64: string): Uint8Array { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, 'base64')) + if (globalThis.Buffer) { + return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')) } else { - const bin = tsProtoGlobalThis.atob(b64) + const bin = globalThis.atob(b64) const arr = new Uint8Array(bin.length) for (let i = 0; i < bin.length; ++i) { arr[i] = bin.charCodeAt(i) @@ -343,14 +326,14 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString('base64') + if (globalThis.Buffer) { + return globalThis.Buffer.from(arr).toString('base64') } else { const bin: string[] = [] arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)) + bin.push(globalThis.String.fromCharCode(byte)) }) - return tsProtoGlobalThis.btoa(bin.join('')) + return globalThis.btoa(bin.join('')) } } @@ -367,8 +350,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/peer/peer_vtproto.pb.go b/peer/peer_vtproto.pb.go index 15518bb4..b82024c1 100644 --- a/peer/peer_vtproto.pb.go +++ b/peer/peer_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/peer/peer.proto package peer diff --git a/pubsub/api/api.pb.go b/pubsub/api/api.pb.go index 2f429345..8169d0f9 100644 --- a/pubsub/api/api.pb.go +++ b/pubsub/api/api.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/pubsub/api/api.proto diff --git a/pubsub/api/api.pb.ts b/pubsub/api/api.pb.ts index c303d750..027a8c40 100644 --- a/pubsub/api/api.pb.ts +++ b/pubsub/api/api.pb.ts @@ -162,12 +162,12 @@ export const SubscribeRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [SubscribeRequest.encode(p).finish()] } } else { - yield* [SubscribeRequest.encode(pkt).finish()] + yield* [SubscribeRequest.encode(pkt as any).finish()] } } }, @@ -180,21 +180,25 @@ export const SubscribeRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [SubscribeRequest.decode(p)] } } else { - yield* [SubscribeRequest.decode(pkt)] + yield* [SubscribeRequest.decode(pkt as any)] } } }, fromJSON(object: any): SubscribeRequest { return { - channelId: isSet(object.channelId) ? String(object.channelId) : '', - peerId: isSet(object.peerId) ? String(object.peerId) : '', - privKeyPem: isSet(object.privKeyPem) ? String(object.privKeyPem) : '', + channelId: isSet(object.channelId) + ? globalThis.String(object.channelId) + : '', + peerId: isSet(object.peerId) ? globalThis.String(object.peerId) : '', + privKeyPem: isSet(object.privKeyPem) + ? globalThis.String(object.privKeyPem) + : '', publishRequest: isSet(object.publishRequest) ? PublishRequest.fromJSON(object.publishRequest) : undefined, @@ -295,12 +299,12 @@ export const PublishRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [PublishRequest.encode(p).finish()] } } else { - yield* [PublishRequest.encode(pkt).finish()] + yield* [PublishRequest.encode(pkt as any).finish()] } } }, @@ -313,12 +317,12 @@ export const PublishRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [PublishRequest.decode(p)] } } else { - yield* [PublishRequest.decode(pkt)] + yield* [PublishRequest.decode(pkt as any)] } } }, @@ -328,7 +332,9 @@ export const PublishRequest = { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0), - identifier: isSet(object.identifier) ? Number(object.identifier) : 0, + identifier: isSet(object.identifier) + ? globalThis.Number(object.identifier) + : 0, } }, @@ -447,12 +453,12 @@ export const SubscribeResponse = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [SubscribeResponse.encode(p).finish()] } } else { - yield* [SubscribeResponse.encode(pkt).finish()] + yield* [SubscribeResponse.encode(pkt as any).finish()] } } }, @@ -465,12 +471,12 @@ export const SubscribeResponse = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [SubscribeResponse.decode(p)] } } else { - yield* [SubscribeResponse.decode(pkt)] + yield* [SubscribeResponse.decode(pkt as any)] } } }, @@ -578,12 +584,12 @@ export const SubscriptionStatus = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [SubscriptionStatus.encode(p).finish()] } } else { - yield* [SubscriptionStatus.encode(pkt).finish()] + yield* [SubscriptionStatus.encode(pkt as any).finish()] } } }, @@ -596,19 +602,21 @@ export const SubscriptionStatus = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [SubscriptionStatus.decode(p)] } } else { - yield* [SubscriptionStatus.decode(pkt)] + yield* [SubscriptionStatus.decode(pkt as any)] } } }, fromJSON(object: any): SubscriptionStatus { return { - subscribed: isSet(object.subscribed) ? Boolean(object.subscribed) : false, + subscribed: isSet(object.subscribed) + ? globalThis.Boolean(object.subscribed) + : false, } }, @@ -691,12 +699,12 @@ export const OutgoingStatus = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [OutgoingStatus.encode(p).finish()] } } else { - yield* [OutgoingStatus.encode(pkt).finish()] + yield* [OutgoingStatus.encode(pkt as any).finish()] } } }, @@ -709,20 +717,22 @@ export const OutgoingStatus = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [OutgoingStatus.decode(p)] } } else { - yield* [OutgoingStatus.decode(pkt)] + yield* [OutgoingStatus.decode(pkt as any)] } } }, fromJSON(object: any): OutgoingStatus { return { - identifier: isSet(object.identifier) ? Number(object.identifier) : 0, - sent: isSet(object.sent) ? Boolean(object.sent) : false, + identifier: isSet(object.identifier) + ? globalThis.Number(object.identifier) + : 0, + sent: isSet(object.sent) ? globalThis.Boolean(object.sent) : false, } }, @@ -819,12 +829,12 @@ export const IncomingMessage = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [IncomingMessage.encode(p).finish()] } } else { - yield* [IncomingMessage.encode(pkt).finish()] + yield* [IncomingMessage.encode(pkt as any).finish()] } } }, @@ -837,21 +847,23 @@ export const IncomingMessage = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [IncomingMessage.decode(p)] } } else { - yield* [IncomingMessage.decode(pkt)] + yield* [IncomingMessage.decode(pkt as any)] } } }, fromJSON(object: any): IncomingMessage { return { - fromPeerId: isSet(object.fromPeerId) ? String(object.fromPeerId) : '', + fromPeerId: isSet(object.fromPeerId) + ? globalThis.String(object.fromPeerId) + : '', authenticated: isSet(object.authenticated) - ? Boolean(object.authenticated) + ? globalThis.Boolean(object.authenticated) : false, data: isSet(object.data) ? bytesFromBase64(object.data) @@ -973,30 +985,11 @@ interface Rpc { ): AsyncIterable } -declare const self: any | undefined -declare const window: any | undefined -declare const global: any | undefined -const tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== 'undefined') { - return globalThis - } - if (typeof self !== 'undefined') { - return self - } - if (typeof window !== 'undefined') { - return window - } - if (typeof global !== 'undefined') { - return global - } - throw 'Unable to locate global object' -})() - function bytesFromBase64(b64: string): Uint8Array { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, 'base64')) + if (globalThis.Buffer) { + return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')) } else { - const bin = tsProtoGlobalThis.atob(b64) + const bin = globalThis.atob(b64) const arr = new Uint8Array(bin.length) for (let i = 0; i < bin.length; ++i) { arr[i] = bin.charCodeAt(i) @@ -1006,14 +999,14 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString('base64') + if (globalThis.Buffer) { + return globalThis.Buffer.from(arr).toString('base64') } else { const bin: string[] = [] arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)) + bin.push(globalThis.String.fromCharCode(byte)) }) - return tsProtoGlobalThis.btoa(bin.join('')) + return globalThis.btoa(bin.join('')) } } @@ -1030,8 +1023,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/pubsub/api/api_srpc.pb.go b/pubsub/api/api_srpc.pb.go index 4057fe63..caee100c 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.20.1 +// protoc-gen-srpc version: v0.21.2 // source: github.com/aperturerobotics/bifrost/pubsub/api/api.proto package pubsub_api diff --git a/pubsub/api/api_vtproto.pb.go b/pubsub/api/api_vtproto.pb.go index cafea91f..d614e258 100644 --- a/pubsub/api/api_vtproto.pb.go +++ b/pubsub/api/api_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/pubsub/api/api.proto package pubsub_api diff --git a/pubsub/floodsub/controller/config.pb.go b/pubsub/floodsub/controller/config.pb.go index 99bf7476..d25e62a1 100644 --- a/pubsub/floodsub/controller/config.pb.go +++ b/pubsub/floodsub/controller/config.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/pubsub/floodsub/controller/config.proto diff --git a/pubsub/floodsub/controller/config.pb.ts b/pubsub/floodsub/controller/config.pb.ts index 0b60e601..35b73916 100644 --- a/pubsub/floodsub/controller/config.pb.ts +++ b/pubsub/floodsub/controller/config.pb.ts @@ -56,12 +56,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -74,12 +74,12 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, @@ -126,8 +126,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/pubsub/floodsub/controller/config_vtproto.pb.go b/pubsub/floodsub/controller/config_vtproto.pb.go index 6b7de8f3..07623484 100644 --- a/pubsub/floodsub/controller/config_vtproto.pb.go +++ b/pubsub/floodsub/controller/config_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/pubsub/floodsub/controller/config.proto package floodsub_controller diff --git a/pubsub/floodsub/floodsub.pb.go b/pubsub/floodsub/floodsub.pb.go index d7cee226..fa5a87b5 100644 --- a/pubsub/floodsub/floodsub.pb.go +++ b/pubsub/floodsub/floodsub.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/pubsub/floodsub/floodsub.proto diff --git a/pubsub/floodsub/floodsub.pb.ts b/pubsub/floodsub/floodsub.pb.ts index 0e5afc6b..d9766355 100644 --- a/pubsub/floodsub/floodsub.pb.ts +++ b/pubsub/floodsub/floodsub.pb.ts @@ -80,12 +80,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -98,12 +98,12 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, @@ -191,12 +191,12 @@ export const Packet = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Packet.encode(p).finish()] } } else { - yield* [Packet.encode(pkt).finish()] + yield* [Packet.encode(pkt as any).finish()] } } }, @@ -209,22 +209,22 @@ export const Packet = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Packet.decode(p)] } } else { - yield* [Packet.decode(pkt)] + yield* [Packet.decode(pkt as any)] } } }, fromJSON(object: any): Packet { return { - subscriptions: Array.isArray(object?.subscriptions) + subscriptions: globalThis.Array.isArray(object?.subscriptions) ? object.subscriptions.map((e: any) => SubscriptionOpts.fromJSON(e)) : [], - publish: Array.isArray(object?.publish) + publish: globalThis.Array.isArray(object?.publish) ? object.publish.map((e: any) => SignedMsg.fromJSON(e)) : [], } @@ -312,12 +312,12 @@ export const SubscriptionOpts = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [SubscriptionOpts.encode(p).finish()] } } else { - yield* [SubscriptionOpts.encode(pkt).finish()] + yield* [SubscriptionOpts.encode(pkt as any).finish()] } } }, @@ -330,20 +330,24 @@ export const SubscriptionOpts = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [SubscriptionOpts.decode(p)] } } else { - yield* [SubscriptionOpts.decode(pkt)] + yield* [SubscriptionOpts.decode(pkt as any)] } } }, fromJSON(object: any): SubscriptionOpts { return { - subscribe: isSet(object.subscribe) ? Boolean(object.subscribe) : false, - channelId: isSet(object.channelId) ? String(object.channelId) : '', + subscribe: isSet(object.subscribe) + ? globalThis.Boolean(object.subscribe) + : false, + channelId: isSet(object.channelId) + ? globalThis.String(object.channelId) + : '', } }, @@ -386,8 +390,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/pubsub/floodsub/floodsub_vtproto.pb.go b/pubsub/floodsub/floodsub_vtproto.pb.go index 253b986f..7a313ca7 100644 --- a/pubsub/floodsub/floodsub_vtproto.pb.go +++ b/pubsub/floodsub/floodsub_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/pubsub/floodsub/floodsub.proto package floodsub diff --git a/pubsub/nats/controller/config.pb.go b/pubsub/nats/controller/config.pb.go index eab0106e..aeb69c68 100644 --- a/pubsub/nats/controller/config.pb.go +++ b/pubsub/nats/controller/config.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/pubsub/nats/controller/config.proto diff --git a/pubsub/nats/controller/config.pb.ts b/pubsub/nats/controller/config.pb.ts index 3b1791d8..53a69e25 100644 --- a/pubsub/nats/controller/config.pb.ts +++ b/pubsub/nats/controller/config.pb.ts @@ -72,12 +72,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -90,19 +90,19 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, fromJSON(object: any): Config { return { - peerId: isSet(object.peerId) ? String(object.peerId) : '', + peerId: isSet(object.peerId) ? globalThis.String(object.peerId) : '', natsConfig: isSet(object.natsConfig) ? Config1.fromJSON(object.natsConfig) : undefined, @@ -147,8 +147,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/pubsub/nats/controller/config_vtproto.pb.go b/pubsub/nats/controller/config_vtproto.pb.go index 8c249377..631d0a86 100644 --- a/pubsub/nats/controller/config_vtproto.pb.go +++ b/pubsub/nats/controller/config_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/pubsub/nats/controller/config.proto package nats_controller diff --git a/pubsub/nats/nats.pb.go b/pubsub/nats/nats.pb.go index d2c9d0dd..37b35ac7 100644 --- a/pubsub/nats/nats.pb.go +++ b/pubsub/nats/nats.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/pubsub/nats/nats.proto diff --git a/pubsub/nats/nats.pb.ts b/pubsub/nats/nats.pb.ts index 3e3b89d1..a9161750 100644 --- a/pubsub/nats/nats.pb.ts +++ b/pubsub/nats/nats.pb.ts @@ -173,12 +173,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -191,26 +191,32 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, fromJSON(object: any): Config { return { - clusterName: isSet(object.clusterName) ? String(object.clusterName) : '', + clusterName: isSet(object.clusterName) + ? globalThis.String(object.clusterName) + : '', publishHashType: isSet(object.publishHashType) ? hashTypeFromJSON(object.publishHashType) : 0, - logDebug: isSet(object.logDebug) ? Boolean(object.logDebug) : false, - logTrace: isSet(object.logTrace) ? Boolean(object.logTrace) : false, + logDebug: isSet(object.logDebug) + ? globalThis.Boolean(object.logDebug) + : false, + logTrace: isSet(object.logTrace) + ? globalThis.Boolean(object.logTrace) + : false, logTraceVerbose: isSet(object.logTraceVerbose) - ? Boolean(object.logTraceVerbose) + ? globalThis.Boolean(object.logTraceVerbose) : false, } }, @@ -262,8 +268,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/pubsub/nats/nats_vtproto.pb.go b/pubsub/nats/nats_vtproto.pb.go index b37fa309..4f1cd7b8 100644 --- a/pubsub/nats/nats_vtproto.pb.go +++ b/pubsub/nats/nats_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/pubsub/nats/nats.proto package nats diff --git a/pubsub/relay/config.pb.go b/pubsub/relay/config.pb.go index 30c6fe5a..66e35608 100644 --- a/pubsub/relay/config.pb.go +++ b/pubsub/relay/config.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/pubsub/relay/config.proto diff --git a/pubsub/relay/config.pb.ts b/pubsub/relay/config.pb.ts index a6ea9079..55f33e1a 100644 --- a/pubsub/relay/config.pb.ts +++ b/pubsub/relay/config.pb.ts @@ -70,12 +70,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -88,21 +88,21 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, fromJSON(object: any): Config { return { - peerId: isSet(object.peerId) ? String(object.peerId) : '', - topicIds: Array.isArray(object?.topicIds) - ? object.topicIds.map((e: any) => String(e)) + peerId: isSet(object.peerId) ? globalThis.String(object.peerId) : '', + topicIds: globalThis.Array.isArray(object?.topicIds) + ? object.topicIds.map((e: any) => globalThis.String(e)) : [], } }, @@ -142,8 +142,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/pubsub/relay/config_vtproto.pb.go b/pubsub/relay/config_vtproto.pb.go index 3e2993f2..86804ee8 100644 --- a/pubsub/relay/config_vtproto.pb.go +++ b/pubsub/relay/config_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/pubsub/relay/config.proto package pubsub_relay diff --git a/pubsub/util/pubmessage/pubmessage.pb.go b/pubsub/util/pubmessage/pubmessage.pb.go index 85ff63c5..4b2d3fa1 100644 --- a/pubsub/util/pubmessage/pubmessage.pb.go +++ b/pubsub/util/pubmessage/pubmessage.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/pubsub/util/pubmessage/pubmessage.proto diff --git a/pubsub/util/pubmessage/pubmessage.pb.ts b/pubsub/util/pubmessage/pubmessage.pb.ts index 71d81bb9..2edfa89f 100644 --- a/pubsub/util/pubmessage/pubmessage.pb.ts +++ b/pubsub/util/pubmessage/pubmessage.pb.ts @@ -87,12 +87,12 @@ export const PubMessageInner = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [PubMessageInner.encode(p).finish()] } } else { - yield* [PubMessageInner.encode(pkt).finish()] + yield* [PubMessageInner.encode(pkt as any).finish()] } } }, @@ -105,12 +105,12 @@ export const PubMessageInner = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [PubMessageInner.decode(p)] } } else { - yield* [PubMessageInner.decode(pkt)] + yield* [PubMessageInner.decode(pkt as any)] } } }, @@ -120,7 +120,7 @@ export const PubMessageInner = { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0), - channel: isSet(object.channel) ? String(object.channel) : '', + channel: isSet(object.channel) ? globalThis.String(object.channel) : '', timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined, @@ -157,30 +157,11 @@ export const PubMessageInner = { }, } -declare const self: any | undefined -declare const window: any | undefined -declare const global: any | undefined -const tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== 'undefined') { - return globalThis - } - if (typeof self !== 'undefined') { - return self - } - if (typeof window !== 'undefined') { - return window - } - if (typeof global !== 'undefined') { - return global - } - throw 'Unable to locate global object' -})() - function bytesFromBase64(b64: string): Uint8Array { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, 'base64')) + if (globalThis.Buffer) { + return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')) } else { - const bin = tsProtoGlobalThis.atob(b64) + const bin = globalThis.atob(b64) const arr = new Uint8Array(bin.length) for (let i = 0; i < bin.length; ++i) { arr[i] = bin.charCodeAt(i) @@ -190,14 +171,14 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString('base64') + if (globalThis.Buffer) { + return globalThis.Buffer.from(arr).toString('base64') } else { const bin: string[] = [] arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)) + bin.push(globalThis.String.fromCharCode(byte)) }) - return tsProtoGlobalThis.btoa(bin.join('')) + return globalThis.btoa(bin.join('')) } } @@ -214,8 +195,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } @@ -242,14 +223,14 @@ function toTimestamp(date: Date): Timestamp { function fromTimestamp(t: Timestamp): Date { let millis = (t.seconds.toNumber() || 0) * 1_000 millis += (t.nanos || 0) / 1_000_000 - return new Date(millis) + return new globalThis.Date(millis) } function fromJsonTimestamp(o: any): Date { - if (o instanceof Date) { + if (o instanceof globalThis.Date) { return o } else if (typeof o === 'string') { - return new Date(o) + return new globalThis.Date(o) } else { return fromTimestamp(Timestamp.fromJSON(o)) } diff --git a/pubsub/util/pubmessage/pubmessage_vtproto.pb.go b/pubsub/util/pubmessage/pubmessage_vtproto.pb.go index a1ec58ea..56e6a713 100644 --- a/pubsub/util/pubmessage/pubmessage_vtproto.pb.go +++ b/pubsub/util/pubmessage/pubmessage_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/pubsub/util/pubmessage/pubmessage.proto package pubmessage diff --git a/rpc/access/access.pb.go b/rpc/access/access.pb.go index 0349750b..1a5f97f0 100644 --- a/rpc/access/access.pb.go +++ b/rpc/access/access.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/rpc/access/access.proto diff --git a/rpc/access/access.pb.ts b/rpc/access/access.pb.ts index 05e88cac..c9f0c239 100644 --- a/rpc/access/access.pb.ts +++ b/rpc/access/access.pb.ts @@ -86,12 +86,12 @@ export const LookupRpcServiceRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [LookupRpcServiceRequest.encode(p).finish()] } } else { - yield* [LookupRpcServiceRequest.encode(pkt).finish()] + yield* [LookupRpcServiceRequest.encode(pkt as any).finish()] } } }, @@ -104,20 +104,24 @@ export const LookupRpcServiceRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [LookupRpcServiceRequest.decode(p)] } } else { - yield* [LookupRpcServiceRequest.decode(pkt)] + yield* [LookupRpcServiceRequest.decode(pkt as any)] } } }, fromJSON(object: any): LookupRpcServiceRequest { return { - serviceId: isSet(object.serviceId) ? String(object.serviceId) : '', - serverId: isSet(object.serverId) ? String(object.serverId) : '', + serviceId: isSet(object.serviceId) + ? globalThis.String(object.serviceId) + : '', + serverId: isSet(object.serverId) + ? globalThis.String(object.serverId) + : '', } }, @@ -217,12 +221,12 @@ export const LookupRpcServiceResponse = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [LookupRpcServiceResponse.encode(p).finish()] } } else { - yield* [LookupRpcServiceResponse.encode(pkt).finish()] + yield* [LookupRpcServiceResponse.encode(pkt as any).finish()] } } }, @@ -235,21 +239,23 @@ export const LookupRpcServiceResponse = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [LookupRpcServiceResponse.decode(p)] } } else { - yield* [LookupRpcServiceResponse.decode(pkt)] + yield* [LookupRpcServiceResponse.decode(pkt as any)] } } }, fromJSON(object: any): LookupRpcServiceResponse { return { - idle: isSet(object.idle) ? Boolean(object.idle) : false, - exists: isSet(object.exists) ? Boolean(object.exists) : false, - removed: isSet(object.removed) ? Boolean(object.removed) : false, + idle: isSet(object.idle) ? globalThis.Boolean(object.idle) : false, + exists: isSet(object.exists) ? globalThis.Boolean(object.exists) : false, + removed: isSet(object.removed) + ? globalThis.Boolean(object.removed) + : false, } }, @@ -417,8 +423,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/rpc/access/access_srpc.pb.go b/rpc/access/access_srpc.pb.go index bf4e5aa9..22a66d15 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.20.1 +// protoc-gen-srpc version: v0.21.2 // source: github.com/aperturerobotics/bifrost/rpc/access/access.proto package bifrost_rpc_access diff --git a/rpc/access/access_vtproto.pb.go b/rpc/access/access_vtproto.pb.go index 1a6b81fa..f1acbdeb 100644 --- a/rpc/access/access_vtproto.pb.go +++ b/rpc/access/access_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/rpc/access/access.proto package bifrost_rpc_access diff --git a/stream/api/accept/accept.pb.go b/stream/api/accept/accept.pb.go index ce11adba..d9e94158 100644 --- a/stream/api/accept/accept.pb.go +++ b/stream/api/accept/accept.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/stream/api/accept/accept.proto diff --git a/stream/api/accept/accept.pb.ts b/stream/api/accept/accept.pb.ts index 1cab79c6..ce9b8227 100644 --- a/stream/api/accept/accept.pb.ts +++ b/stream/api/accept/accept.pb.ts @@ -105,12 +105,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -123,23 +123,27 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, fromJSON(object: any): Config { return { - localPeerId: isSet(object.localPeerId) ? String(object.localPeerId) : '', - remotePeerIds: Array.isArray(object?.remotePeerIds) - ? object.remotePeerIds.map((e: any) => String(e)) + localPeerId: isSet(object.localPeerId) + ? globalThis.String(object.localPeerId) + : '', + remotePeerIds: globalThis.Array.isArray(object?.remotePeerIds) + ? object.remotePeerIds.map((e: any) => globalThis.String(e)) : [], - protocolId: isSet(object.protocolId) ? String(object.protocolId) : '', + protocolId: isSet(object.protocolId) + ? globalThis.String(object.protocolId) + : '', transportId: isSet(object.transportId) ? Long.fromValue(object.transportId) : Long.UZERO, @@ -192,8 +196,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/stream/api/accept/accept_vtproto.pb.go b/stream/api/accept/accept_vtproto.pb.go index 5272b8da..3e998812 100644 --- a/stream/api/accept/accept_vtproto.pb.go +++ b/stream/api/accept/accept_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/stream/api/accept/accept.proto package stream_api_accept diff --git a/stream/api/api.pb.go b/stream/api/api.pb.go index 417f137f..c2c32d07 100644 --- a/stream/api/api.pb.go +++ b/stream/api/api.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/stream/api/api.proto diff --git a/stream/api/api.pb.ts b/stream/api/api.pb.ts index 54b79b9b..a2c2ad66 100644 --- a/stream/api/api.pb.ts +++ b/stream/api/api.pb.ts @@ -120,12 +120,12 @@ export const ForwardStreamsRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [ForwardStreamsRequest.encode(p).finish()] } } else { - yield* [ForwardStreamsRequest.encode(pkt).finish()] + yield* [ForwardStreamsRequest.encode(pkt as any).finish()] } } }, @@ -138,12 +138,12 @@ export const ForwardStreamsRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [ForwardStreamsRequest.decode(p)] } } else { - yield* [ForwardStreamsRequest.decode(pkt)] + yield* [ForwardStreamsRequest.decode(pkt as any)] } } }, @@ -231,12 +231,12 @@ export const ForwardStreamsResponse = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [ForwardStreamsResponse.encode(p).finish()] } } else { - yield* [ForwardStreamsResponse.encode(pkt).finish()] + yield* [ForwardStreamsResponse.encode(pkt as any).finish()] } } }, @@ -249,12 +249,12 @@ export const ForwardStreamsResponse = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [ForwardStreamsResponse.decode(p)] } } else { - yield* [ForwardStreamsResponse.decode(pkt)] + yield* [ForwardStreamsResponse.decode(pkt as any)] } } }, @@ -339,12 +339,12 @@ export const ListenStreamsRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [ListenStreamsRequest.encode(p).finish()] } } else { - yield* [ListenStreamsRequest.encode(pkt).finish()] + yield* [ListenStreamsRequest.encode(pkt as any).finish()] } } }, @@ -357,12 +357,12 @@ export const ListenStreamsRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [ListenStreamsRequest.decode(p)] } } else { - yield* [ListenStreamsRequest.decode(pkt)] + yield* [ListenStreamsRequest.decode(pkt as any)] } } }, @@ -450,12 +450,12 @@ export const ListenStreamsResponse = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [ListenStreamsResponse.encode(p).finish()] } } else { - yield* [ListenStreamsResponse.encode(pkt).finish()] + yield* [ListenStreamsResponse.encode(pkt as any).finish()] } } }, @@ -468,12 +468,12 @@ export const ListenStreamsResponse = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [ListenStreamsResponse.decode(p)] } } else { - yield* [ListenStreamsResponse.decode(pkt)] + yield* [ListenStreamsResponse.decode(pkt as any)] } } }, @@ -565,12 +565,12 @@ export const AcceptStreamRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [AcceptStreamRequest.encode(p).finish()] } } else { - yield* [AcceptStreamRequest.encode(pkt).finish()] + yield* [AcceptStreamRequest.encode(pkt as any).finish()] } } }, @@ -583,12 +583,12 @@ export const AcceptStreamRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [AcceptStreamRequest.decode(p)] } } else { - yield* [AcceptStreamRequest.decode(pkt)] + yield* [AcceptStreamRequest.decode(pkt as any)] } } }, @@ -684,12 +684,12 @@ export const AcceptStreamResponse = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [AcceptStreamResponse.encode(p).finish()] } } else { - yield* [AcceptStreamResponse.encode(pkt).finish()] + yield* [AcceptStreamResponse.encode(pkt as any).finish()] } } }, @@ -702,12 +702,12 @@ export const AcceptStreamResponse = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [AcceptStreamResponse.decode(p)] } } else { - yield* [AcceptStreamResponse.decode(pkt)] + yield* [AcceptStreamResponse.decode(pkt as any)] } } }, @@ -798,12 +798,12 @@ export const DialStreamRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [DialStreamRequest.encode(p).finish()] } } else { - yield* [DialStreamRequest.encode(pkt).finish()] + yield* [DialStreamRequest.encode(pkt as any).finish()] } } }, @@ -816,12 +816,12 @@ export const DialStreamRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [DialStreamRequest.decode(p)] } } else { - yield* [DialStreamRequest.decode(pkt)] + yield* [DialStreamRequest.decode(pkt as any)] } } }, @@ -914,12 +914,12 @@ export const DialStreamResponse = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [DialStreamResponse.encode(p).finish()] } } else { - yield* [DialStreamResponse.encode(pkt).finish()] + yield* [DialStreamResponse.encode(pkt as any).finish()] } } }, @@ -932,12 +932,12 @@ export const DialStreamResponse = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [DialStreamResponse.decode(p)] } } else { - yield* [DialStreamResponse.decode(pkt)] + yield* [DialStreamResponse.decode(pkt as any)] } } }, @@ -1173,8 +1173,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/stream/api/api_srpc.pb.go b/stream/api/api_srpc.pb.go index 17b886ff..1c164609 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.20.1 +// protoc-gen-srpc version: v0.21.2 // source: github.com/aperturerobotics/bifrost/stream/api/api.proto package stream_api diff --git a/stream/api/api_vtproto.pb.go b/stream/api/api_vtproto.pb.go index d2ded91c..5e42168b 100644 --- a/stream/api/api_vtproto.pb.go +++ b/stream/api/api_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/stream/api/api.proto package stream_api diff --git a/stream/api/dial/dial.pb.go b/stream/api/dial/dial.pb.go index cd3b29c9..984fc632 100644 --- a/stream/api/dial/dial.pb.go +++ b/stream/api/dial/dial.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/stream/api/dial/dial.proto diff --git a/stream/api/dial/dial.pb.ts b/stream/api/dial/dial.pb.ts index 7d8695c6..f2da3c23 100644 --- a/stream/api/dial/dial.pb.ts +++ b/stream/api/dial/dial.pb.ts @@ -128,12 +128,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -146,26 +146,34 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, fromJSON(object: any): Config { return { - peerId: isSet(object.peerId) ? String(object.peerId) : '', - localPeerId: isSet(object.localPeerId) ? String(object.localPeerId) : '', - protocolId: isSet(object.protocolId) ? String(object.protocolId) : '', + peerId: isSet(object.peerId) ? globalThis.String(object.peerId) : '', + localPeerId: isSet(object.localPeerId) + ? globalThis.String(object.localPeerId) + : '', + protocolId: isSet(object.protocolId) + ? globalThis.String(object.protocolId) + : '', transportId: isSet(object.transportId) ? Long.fromValue(object.transportId) : Long.UZERO, - encrypted: isSet(object.encrypted) ? Boolean(object.encrypted) : false, - reliable: isSet(object.reliable) ? Boolean(object.reliable) : false, + encrypted: isSet(object.encrypted) + ? globalThis.Boolean(object.encrypted) + : false, + reliable: isSet(object.reliable) + ? globalThis.Boolean(object.reliable) + : false, } }, @@ -223,8 +231,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/stream/api/dial/dial_vtproto.pb.go b/stream/api/dial/dial_vtproto.pb.go index 17715f3d..64b41464 100644 --- a/stream/api/dial/dial_vtproto.pb.go +++ b/stream/api/dial/dial_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/stream/api/dial/dial.proto package stream_api_dial diff --git a/stream/api/rpc/rpc.pb.go b/stream/api/rpc/rpc.pb.go index 549d0e80..326f7f62 100644 --- a/stream/api/rpc/rpc.pb.go +++ b/stream/api/rpc/rpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/stream/api/rpc/rpc.proto diff --git a/stream/api/rpc/rpc.pb.ts b/stream/api/rpc/rpc.pb.ts index 5d20044a..547927fe 100644 --- a/stream/api/rpc/rpc.pb.ts +++ b/stream/api/rpc/rpc.pb.ts @@ -110,12 +110,12 @@ export const Data = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Data.encode(p).finish()] } } else { - yield* [Data.encode(pkt).finish()] + yield* [Data.encode(pkt as any).finish()] } } }, @@ -128,12 +128,12 @@ export const Data = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Data.decode(p)] } } else { - yield* [Data.decode(pkt)] + yield* [Data.decode(pkt as any)] } } }, @@ -169,30 +169,11 @@ export const Data = { }, } -declare const self: any | undefined -declare const window: any | undefined -declare const global: any | undefined -const tsProtoGlobalThis: any = (() => { - if (typeof globalThis !== 'undefined') { - return globalThis - } - if (typeof self !== 'undefined') { - return self - } - if (typeof window !== 'undefined') { - return window - } - if (typeof global !== 'undefined') { - return global - } - throw 'Unable to locate global object' -})() - function bytesFromBase64(b64: string): Uint8Array { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, 'base64')) + if (globalThis.Buffer) { + return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')) } else { - const bin = tsProtoGlobalThis.atob(b64) + const bin = globalThis.atob(b64) const arr = new Uint8Array(bin.length) for (let i = 0; i < bin.length; ++i) { arr[i] = bin.charCodeAt(i) @@ -202,14 +183,14 @@ function bytesFromBase64(b64: string): Uint8Array { } function base64FromBytes(arr: Uint8Array): string { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString('base64') + if (globalThis.Buffer) { + return globalThis.Buffer.from(arr).toString('base64') } else { const bin: string[] = [] arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)) + bin.push(globalThis.String.fromCharCode(byte)) }) - return tsProtoGlobalThis.btoa(bin.join('')) + return globalThis.btoa(bin.join('')) } } @@ -226,8 +207,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/stream/api/rpc/rpc_vtproto.pb.go b/stream/api/rpc/rpc_vtproto.pb.go index 3635830a..7b3f006f 100644 --- a/stream/api/rpc/rpc_vtproto.pb.go +++ b/stream/api/rpc/rpc_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/stream/api/rpc/rpc.proto package stream_api_rpc diff --git a/stream/drpc/client/client.pb.go b/stream/drpc/client/client.pb.go index ada7d4af..45ddd59a 100644 --- a/stream/drpc/client/client.pb.go +++ b/stream/drpc/client/client.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/stream/drpc/client/client.proto diff --git a/stream/drpc/client/client.pb.ts b/stream/drpc/client/client.pb.ts index 91223453..a3ccd779 100644 --- a/stream/drpc/client/client.pb.ts +++ b/stream/drpc/client/client.pb.ts @@ -137,12 +137,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -155,32 +155,36 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, fromJSON(object: any): Config { return { - serverPeerIds: Array.isArray(object?.serverPeerIds) - ? object.serverPeerIds.map((e: any) => String(e)) + serverPeerIds: globalThis.Array.isArray(object?.serverPeerIds) + ? object.serverPeerIds.map((e: any) => globalThis.String(e)) : [], perServerBackoff: isSet(object.perServerBackoff) ? Backoff.fromJSON(object.perServerBackoff) : undefined, - srcPeerId: isSet(object.srcPeerId) ? String(object.srcPeerId) : '', + srcPeerId: isSet(object.srcPeerId) + ? globalThis.String(object.srcPeerId) + : '', transportId: isSet(object.transportId) ? Long.fromValue(object.transportId) : Long.UZERO, drpcOpts: isSet(object.drpcOpts) ? DrpcOpts.fromJSON(object.drpcOpts) : undefined, - timeoutDur: isSet(object.timeoutDur) ? String(object.timeoutDur) : '', + timeoutDur: isSet(object.timeoutDur) + ? globalThis.String(object.timeoutDur) + : '', } }, @@ -244,8 +248,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/stream/drpc/client/client_vtproto.pb.go b/stream/drpc/client/client_vtproto.pb.go index 97d0be37..c8b64127 100644 --- a/stream/drpc/client/client_vtproto.pb.go +++ b/stream/drpc/client/client_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/stream/drpc/client/client.proto package stream_drpc_client diff --git a/stream/drpc/drpc.pb.go b/stream/drpc/drpc.pb.go index 7d231baf..148d1cd3 100644 --- a/stream/drpc/drpc.pb.go +++ b/stream/drpc/drpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/stream/drpc/drpc.proto diff --git a/stream/drpc/drpc.pb.ts b/stream/drpc/drpc.pb.ts index 2ea63424..3fd0d984 100644 --- a/stream/drpc/drpc.pb.ts +++ b/stream/drpc/drpc.pb.ts @@ -81,12 +81,12 @@ export const DrpcOpts = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [DrpcOpts.encode(p).finish()] } } else { - yield* [DrpcOpts.encode(pkt).finish()] + yield* [DrpcOpts.encode(pkt as any).finish()] } } }, @@ -99,12 +99,12 @@ export const DrpcOpts = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [DrpcOpts.decode(p)] } } else { - yield* [DrpcOpts.decode(pkt)] + yield* [DrpcOpts.decode(pkt as any)] } } }, @@ -205,12 +205,12 @@ export const ManagerOpts = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [ManagerOpts.encode(p).finish()] } } else { - yield* [ManagerOpts.encode(pkt).finish()] + yield* [ManagerOpts.encode(pkt as any).finish()] } } }, @@ -223,12 +223,12 @@ export const ManagerOpts = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [ManagerOpts.decode(p)] } } else { - yield* [ManagerOpts.decode(pkt)] + yield* [ManagerOpts.decode(pkt as any)] } } }, @@ -236,13 +236,13 @@ export const ManagerOpts = { fromJSON(object: any): ManagerOpts { return { writerBufferSize: isSet(object.writerBufferSize) - ? Number(object.writerBufferSize) + ? globalThis.Number(object.writerBufferSize) : 0, streamOpts: isSet(object.streamOpts) ? StreamOpts.fromJSON(object.streamOpts) : undefined, inactivityTimeout: isSet(object.inactivityTimeout) - ? String(object.inactivityTimeout) + ? globalThis.String(object.inactivityTimeout) : '', } }, @@ -325,12 +325,12 @@ export const StreamOpts = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [StreamOpts.encode(p).finish()] } } else { - yield* [StreamOpts.encode(pkt).finish()] + yield* [StreamOpts.encode(pkt as any).finish()] } } }, @@ -343,18 +343,22 @@ export const StreamOpts = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [StreamOpts.decode(p)] } } else { - yield* [StreamOpts.decode(pkt)] + yield* [StreamOpts.decode(pkt as any)] } } }, fromJSON(object: any): StreamOpts { - return { splitSize: isSet(object.splitSize) ? Number(object.splitSize) : 0 } + return { + splitSize: isSet(object.splitSize) + ? globalThis.Number(object.splitSize) + : 0, + } }, toJSON(message: StreamOpts): unknown { @@ -390,8 +394,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/stream/drpc/drpc_vtproto.pb.go b/stream/drpc/drpc_vtproto.pb.go index 23217ca2..5fbcb414 100644 --- a/stream/drpc/drpc_vtproto.pb.go +++ b/stream/drpc/drpc_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/stream/drpc/drpc.proto package stream_drpc diff --git a/stream/drpc/e2e/e2e.pb.go b/stream/drpc/e2e/e2e.pb.go index 5ea90fc1..dbc0a7f8 100644 --- a/stream/drpc/e2e/e2e.pb.go +++ b/stream/drpc/e2e/e2e.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/stream/drpc/e2e/e2e.proto diff --git a/stream/drpc/e2e/e2e.pb.ts b/stream/drpc/e2e/e2e.pb.ts index 074adc58..a88e168c 100644 --- a/stream/drpc/e2e/e2e.pb.ts +++ b/stream/drpc/e2e/e2e.pb.ts @@ -63,12 +63,12 @@ export const MockRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [MockRequest.encode(p).finish()] } } else { - yield* [MockRequest.encode(pkt).finish()] + yield* [MockRequest.encode(pkt as any).finish()] } } }, @@ -81,18 +81,18 @@ export const MockRequest = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [MockRequest.decode(p)] } } else { - yield* [MockRequest.decode(pkt)] + yield* [MockRequest.decode(pkt as any)] } } }, fromJSON(object: any): MockRequest { - return { body: isSet(object.body) ? String(object.body) : '' } + return { body: isSet(object.body) ? globalThis.String(object.body) : '' } }, toJSON(message: MockRequest): unknown { @@ -162,12 +162,12 @@ export const MockResponse = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [MockResponse.encode(p).finish()] } } else { - yield* [MockResponse.encode(pkt).finish()] + yield* [MockResponse.encode(pkt as any).finish()] } } }, @@ -180,18 +180,20 @@ export const MockResponse = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [MockResponse.decode(p)] } } else { - yield* [MockResponse.decode(pkt)] + yield* [MockResponse.decode(pkt as any)] } } }, fromJSON(object: any): MockResponse { - return { reqBody: isSet(object.reqBody) ? String(object.reqBody) : '' } + return { + reqBody: isSet(object.reqBody) ? globalThis.String(object.reqBody) : '', + } }, toJSON(message: MockResponse): unknown { @@ -283,8 +285,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/stream/drpc/e2e/e2e_srpc.pb.go b/stream/drpc/e2e/e2e_srpc.pb.go index 09dcf6a4..35b8ce92 100644 --- a/stream/drpc/e2e/e2e_srpc.pb.go +++ b/stream/drpc/e2e/e2e_srpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-srpc. DO NOT EDIT. -// protoc-gen-srpc version: v0.20.1 +// protoc-gen-srpc version: v0.21.2 // source: github.com/aperturerobotics/bifrost/stream/drpc/e2e/e2e.proto package drpc_e2e diff --git a/stream/drpc/e2e/e2e_vtproto.pb.go b/stream/drpc/e2e/e2e_vtproto.pb.go index de62c14f..a3b1b8f6 100644 --- a/stream/drpc/e2e/e2e_vtproto.pb.go +++ b/stream/drpc/e2e/e2e_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/stream/drpc/e2e/e2e.proto package drpc_e2e diff --git a/stream/drpc/server/server.pb.go b/stream/drpc/server/server.pb.go index b8a7e0b9..7c6dc335 100644 --- a/stream/drpc/server/server.pb.go +++ b/stream/drpc/server/server.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/stream/drpc/server/server.proto diff --git a/stream/drpc/server/server.pb.ts b/stream/drpc/server/server.pb.ts index 1b134b7a..8fb6ae83 100644 --- a/stream/drpc/server/server.pb.ts +++ b/stream/drpc/server/server.pb.ts @@ -71,12 +71,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -89,20 +89,20 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, fromJSON(object: any): Config { return { - peerIds: Array.isArray(object?.peerIds) - ? object.peerIds.map((e: any) => String(e)) + peerIds: globalThis.Array.isArray(object?.peerIds) + ? object.peerIds.map((e: any) => globalThis.String(e)) : [], drpcOpts: isSet(object.drpcOpts) ? DrpcOpts.fromJSON(object.drpcOpts) @@ -148,8 +148,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/stream/drpc/server/server_vtproto.pb.go b/stream/drpc/server/server_vtproto.pb.go index 928e0a64..96b93f2c 100644 --- a/stream/drpc/server/server_vtproto.pb.go +++ b/stream/drpc/server/server_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/stream/drpc/server/server.proto package stream_drpc_server diff --git a/stream/echo/echo.pb.go b/stream/echo/echo.pb.go index 5afc9d94..05701f7d 100644 --- a/stream/echo/echo.pb.go +++ b/stream/echo/echo.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/stream/echo/echo.proto diff --git a/stream/echo/echo.pb.ts b/stream/echo/echo.pb.ts index 6211d210..2cec3efa 100644 --- a/stream/echo/echo.pb.ts +++ b/stream/echo/echo.pb.ts @@ -70,12 +70,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -88,20 +88,22 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, fromJSON(object: any): Config { return { - peerId: isSet(object.peerId) ? String(object.peerId) : '', - protocolId: isSet(object.protocolId) ? String(object.protocolId) : '', + peerId: isSet(object.peerId) ? globalThis.String(object.peerId) : '', + protocolId: isSet(object.protocolId) + ? globalThis.String(object.protocolId) + : '', } }, @@ -140,8 +142,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/stream/echo/echo_vtproto.pb.go b/stream/echo/echo_vtproto.pb.go index 97384c7b..995a5bc0 100644 --- a/stream/echo/echo_vtproto.pb.go +++ b/stream/echo/echo_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/stream/echo/echo.proto package stream_echo diff --git a/stream/forwarding/forwarding.pb.go b/stream/forwarding/forwarding.pb.go index 1458fe73..afb0342b 100644 --- a/stream/forwarding/forwarding.pb.go +++ b/stream/forwarding/forwarding.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/stream/forwarding/forwarding.proto diff --git a/stream/forwarding/forwarding.pb.ts b/stream/forwarding/forwarding.pb.ts index d0bdae88..ec0084ad 100644 --- a/stream/forwarding/forwarding.pb.ts +++ b/stream/forwarding/forwarding.pb.ts @@ -82,12 +82,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -100,22 +100,24 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, fromJSON(object: any): Config { return { - peerId: isSet(object.peerId) ? String(object.peerId) : '', - protocolId: isSet(object.protocolId) ? String(object.protocolId) : '', + peerId: isSet(object.peerId) ? globalThis.String(object.peerId) : '', + protocolId: isSet(object.protocolId) + ? globalThis.String(object.protocolId) + : '', targetMultiaddr: isSet(object.targetMultiaddr) - ? String(object.targetMultiaddr) + ? globalThis.String(object.targetMultiaddr) : '', } }, @@ -159,8 +161,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/stream/forwarding/forwarding_vtproto.pb.go b/stream/forwarding/forwarding_vtproto.pb.go index d6b08033..2fe66983 100644 --- a/stream/forwarding/forwarding_vtproto.pb.go +++ b/stream/forwarding/forwarding_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/stream/forwarding/forwarding.proto package stream_forwarding diff --git a/stream/listening/listening.pb.go b/stream/listening/listening.pb.go index 05c67fa1..40ccb251 100644 --- a/stream/listening/listening.pb.go +++ b/stream/listening/listening.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/stream/listening/listening.proto diff --git a/stream/listening/listening.pb.ts b/stream/listening/listening.pb.ts index cdf63419..07af5c69 100644 --- a/stream/listening/listening.pb.ts +++ b/stream/listening/listening.pb.ts @@ -141,12 +141,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -159,31 +159,39 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, fromJSON(object: any): Config { return { - localPeerId: isSet(object.localPeerId) ? String(object.localPeerId) : '', + localPeerId: isSet(object.localPeerId) + ? globalThis.String(object.localPeerId) + : '', remotePeerId: isSet(object.remotePeerId) - ? String(object.remotePeerId) + ? globalThis.String(object.remotePeerId) + : '', + protocolId: isSet(object.protocolId) + ? globalThis.String(object.protocolId) : '', - protocolId: isSet(object.protocolId) ? String(object.protocolId) : '', listenMultiaddr: isSet(object.listenMultiaddr) - ? String(object.listenMultiaddr) + ? globalThis.String(object.listenMultiaddr) : '', transportId: isSet(object.transportId) ? Long.fromValue(object.transportId) : Long.UZERO, - reliable: isSet(object.reliable) ? Boolean(object.reliable) : false, - encrypted: isSet(object.encrypted) ? Boolean(object.encrypted) : false, + reliable: isSet(object.reliable) + ? globalThis.Boolean(object.reliable) + : false, + encrypted: isSet(object.encrypted) + ? globalThis.Boolean(object.encrypted) + : false, } }, @@ -245,8 +253,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/stream/listening/listening_vtproto.pb.go b/stream/listening/listening_vtproto.pb.go index 2fbc6ac2..be8bfdde 100644 --- a/stream/listening/listening_vtproto.pb.go +++ b/stream/listening/listening_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/stream/listening/listening.proto package stream_listening diff --git a/stream/srpc/client/client.pb.go b/stream/srpc/client/client.pb.go index ad19ea1b..00e63440 100644 --- a/stream/srpc/client/client.pb.go +++ b/stream/srpc/client/client.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/stream/srpc/client/client.proto diff --git a/stream/srpc/client/client.pb.ts b/stream/srpc/client/client.pb.ts index 8bf07e16..c685a1ab 100644 --- a/stream/srpc/client/client.pb.ts +++ b/stream/srpc/client/client.pb.ts @@ -123,12 +123,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -141,29 +141,33 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, fromJSON(object: any): Config { return { - serverPeerIds: Array.isArray(object?.serverPeerIds) - ? object.serverPeerIds.map((e: any) => String(e)) + serverPeerIds: globalThis.Array.isArray(object?.serverPeerIds) + ? object.serverPeerIds.map((e: any) => globalThis.String(e)) : [], perServerBackoff: isSet(object.perServerBackoff) ? Backoff.fromJSON(object.perServerBackoff) : undefined, - srcPeerId: isSet(object.srcPeerId) ? String(object.srcPeerId) : '', + srcPeerId: isSet(object.srcPeerId) + ? globalThis.String(object.srcPeerId) + : '', transportId: isSet(object.transportId) ? Long.fromValue(object.transportId) : Long.UZERO, - timeoutDur: isSet(object.timeoutDur) ? String(object.timeoutDur) : '', + timeoutDur: isSet(object.timeoutDur) + ? globalThis.String(object.timeoutDur) + : '', } }, @@ -220,8 +224,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/stream/srpc/client/client_vtproto.pb.go b/stream/srpc/client/client_vtproto.pb.go index e97d618e..be14f079 100644 --- a/stream/srpc/client/client_vtproto.pb.go +++ b/stream/srpc/client/client_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/stream/srpc/client/client.proto package stream_srpc_client diff --git a/stream/srpc/server/server.pb.go b/stream/srpc/server/server.pb.go index 76dd7880..3aef5448 100644 --- a/stream/srpc/server/server.pb.go +++ b/stream/srpc/server/server.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/stream/srpc/server/server.proto diff --git a/stream/srpc/server/server.pb.ts b/stream/srpc/server/server.pb.ts index 4f9b3f34..efef4ee4 100644 --- a/stream/srpc/server/server.pb.ts +++ b/stream/srpc/server/server.pb.ts @@ -58,12 +58,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -76,20 +76,20 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, fromJSON(object: any): Config { return { - peerIds: Array.isArray(object?.peerIds) - ? object.peerIds.map((e: any) => String(e)) + peerIds: globalThis.Array.isArray(object?.peerIds) + ? object.peerIds.map((e: any) => globalThis.String(e)) : [], } }, @@ -125,8 +125,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/stream/srpc/server/server_vtproto.pb.go b/stream/srpc/server/server_vtproto.pb.go index b83494d1..9ebaaa6d 100644 --- a/stream/srpc/server/server_vtproto.pb.go +++ b/stream/srpc/server/server_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/stream/srpc/server/server.proto package stream_srpc_server diff --git a/tptaddr/controller/config.pb.go b/tptaddr/controller/config.pb.go index 7aa23a2c..6309061c 100644 --- a/tptaddr/controller/config.pb.go +++ b/tptaddr/controller/config.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/tptaddr/controller/config.proto diff --git a/tptaddr/controller/config.pb.ts b/tptaddr/controller/config.pb.ts index a29fe526..c11f4ace 100644 --- a/tptaddr/controller/config.pb.ts +++ b/tptaddr/controller/config.pb.ts @@ -44,12 +44,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -62,12 +62,12 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, @@ -103,8 +103,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/tptaddr/controller/config_vtproto.pb.go b/tptaddr/controller/config_vtproto.pb.go index 68e98959..be699256 100644 --- a/tptaddr/controller/config_vtproto.pb.go +++ b/tptaddr/controller/config_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/tptaddr/controller/config.proto package tptaddr_controller diff --git a/tptaddr/static/static.pb.go b/tptaddr/static/static.pb.go index 781a2854..7f998448 100644 --- a/tptaddr/static/static.pb.go +++ b/tptaddr/static/static.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/tptaddr/static/static.proto diff --git a/tptaddr/static/static.pb.ts b/tptaddr/static/static.pb.ts index 894e14c3..5878af2f 100644 --- a/tptaddr/static/static.pb.ts +++ b/tptaddr/static/static.pb.ts @@ -64,12 +64,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -82,20 +82,20 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, fromJSON(object: any): Config { return { - addresses: Array.isArray(object?.addresses) - ? object.addresses.map((e: any) => String(e)) + addresses: globalThis.Array.isArray(object?.addresses) + ? object.addresses.map((e: any) => globalThis.String(e)) : [], } }, @@ -131,8 +131,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/tptaddr/static/static_vtproto.pb.go b/tptaddr/static/static_vtproto.pb.go index 684b8b96..8b93c465 100644 --- a/tptaddr/static/static_vtproto.pb.go +++ b/tptaddr/static/static_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/tptaddr/static/static.proto package tptaddr_static diff --git a/transport/common/conn/conn.pb.go b/transport/common/conn/conn.pb.go index 05147b88..9c38d2ab 100644 --- a/transport/common/conn/conn.pb.go +++ b/transport/common/conn/conn.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/transport/common/conn/conn.proto diff --git a/transport/common/conn/conn.pb.ts b/transport/common/conn/conn.pb.ts index ce1f8d26..6a38fac2 100644 --- a/transport/common/conn/conn.pb.ts +++ b/transport/common/conn/conn.pb.ts @@ -97,12 +97,12 @@ export const Opts = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Opts.encode(p).finish()] } } else { - yield* [Opts.encode(pkt).finish()] + yield* [Opts.encode(pkt as any).finish()] } } }, @@ -115,12 +115,12 @@ export const Opts = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Opts.decode(p)] } } else { - yield* [Opts.decode(pkt)] + yield* [Opts.decode(pkt as any)] } } }, @@ -128,9 +128,11 @@ export const Opts = { fromJSON(object: any): Opts { return { quic: isSet(object.quic) ? Opts1.fromJSON(object.quic) : undefined, - verbose: isSet(object.verbose) ? Boolean(object.verbose) : false, - mtu: isSet(object.mtu) ? Number(object.mtu) : 0, - bufSize: isSet(object.bufSize) ? Number(object.bufSize) : 0, + verbose: isSet(object.verbose) + ? globalThis.Boolean(object.verbose) + : false, + mtu: isSet(object.mtu) ? globalThis.Number(object.mtu) : 0, + bufSize: isSet(object.bufSize) ? globalThis.Number(object.bufSize) : 0, } }, @@ -180,8 +182,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/transport/common/conn/conn_vtproto.pb.go b/transport/common/conn/conn_vtproto.pb.go index 128f2586..87707d47 100644 --- a/transport/common/conn/conn_vtproto.pb.go +++ b/transport/common/conn/conn_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/transport/common/conn/conn.proto package conn diff --git a/transport/common/dialer/dialer.pb.go b/transport/common/dialer/dialer.pb.go index 4d840803..27fd09f0 100644 --- a/transport/common/dialer/dialer.pb.go +++ b/transport/common/dialer/dialer.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/transport/common/dialer/dialer.proto diff --git a/transport/common/dialer/dialer.pb.ts b/transport/common/dialer/dialer.pb.ts index 5a817607..7abaddfc 100644 --- a/transport/common/dialer/dialer.pb.ts +++ b/transport/common/dialer/dialer.pb.ts @@ -73,12 +73,12 @@ export const DialerOpts = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [DialerOpts.encode(p).finish()] } } else { - yield* [DialerOpts.encode(pkt).finish()] + yield* [DialerOpts.encode(pkt as any).finish()] } } }, @@ -91,19 +91,19 @@ export const DialerOpts = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [DialerOpts.decode(p)] } } else { - yield* [DialerOpts.decode(pkt)] + yield* [DialerOpts.decode(pkt as any)] } } }, fromJSON(object: any): DialerOpts { return { - address: isSet(object.address) ? String(object.address) : '', + address: isSet(object.address) ? globalThis.String(object.address) : '', backoff: isSet(object.backoff) ? Backoff.fromJSON(object.backoff) : undefined, @@ -150,8 +150,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/transport/common/dialer/dialer_vtproto.pb.go b/transport/common/dialer/dialer_vtproto.pb.go index 3bb87142..85419d36 100644 --- a/transport/common/dialer/dialer_vtproto.pb.go +++ b/transport/common/dialer/dialer_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/transport/common/dialer/dialer.proto package dialer diff --git a/transport/common/kcp/coord_stream.pb.go b/transport/common/kcp/coord_stream.pb.go index 32edde88..5139fb99 100644 --- a/transport/common/kcp/coord_stream.pb.go +++ b/transport/common/kcp/coord_stream.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/transport/common/kcp/coord_stream.proto diff --git a/transport/common/kcp/coord_stream.pb.ts b/transport/common/kcp/coord_stream.pb.ts index a2cc7dad..07e11ec3 100644 --- a/transport/common/kcp/coord_stream.pb.ts +++ b/transport/common/kcp/coord_stream.pb.ts @@ -198,12 +198,12 @@ export const CoordinationStreamPacket = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [CoordinationStreamPacket.encode(p).finish()] } } else { - yield* [CoordinationStreamPacket.encode(pkt).finish()] + yield* [CoordinationStreamPacket.encode(pkt as any).finish()] } } }, @@ -216,12 +216,12 @@ export const CoordinationStreamPacket = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [CoordinationStreamPacket.decode(p)] } } else { - yield* [CoordinationStreamPacket.decode(pkt)] + yield* [CoordinationStreamPacket.decode(pkt as any)] } } }, @@ -336,12 +336,12 @@ export const RawStreamEstablish = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [RawStreamEstablish.encode(p).finish()] } } else { - yield* [RawStreamEstablish.encode(pkt).finish()] + yield* [RawStreamEstablish.encode(pkt as any).finish()] } } }, @@ -354,12 +354,12 @@ export const RawStreamEstablish = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [RawStreamEstablish.decode(p)] } } else { - yield* [RawStreamEstablish.decode(pkt)] + yield* [RawStreamEstablish.decode(pkt as any)] } } }, @@ -367,7 +367,7 @@ export const RawStreamEstablish = { fromJSON(object: any): RawStreamEstablish { return { initiatorStreamId: isSet(object.initiatorStreamId) - ? Number(object.initiatorStreamId) + ? globalThis.Number(object.initiatorStreamId) : 0, } }, @@ -461,12 +461,12 @@ export const RawStreamAck = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [RawStreamAck.encode(p).finish()] } } else { - yield* [RawStreamAck.encode(pkt).finish()] + yield* [RawStreamAck.encode(pkt as any).finish()] } } }, @@ -479,12 +479,12 @@ export const RawStreamAck = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [RawStreamAck.decode(p)] } } else { - yield* [RawStreamAck.decode(pkt)] + yield* [RawStreamAck.decode(pkt as any)] } } }, @@ -492,10 +492,14 @@ export const RawStreamAck = { fromJSON(object: any): RawStreamAck { return { initiatorStreamId: isSet(object.initiatorStreamId) - ? Number(object.initiatorStreamId) + ? globalThis.Number(object.initiatorStreamId) : 0, - ackStreamId: isSet(object.ackStreamId) ? Number(object.ackStreamId) : 0, - ackError: isSet(object.ackError) ? String(object.ackError) : '', + ackStreamId: isSet(object.ackStreamId) + ? globalThis.Number(object.ackStreamId) + : 0, + ackError: isSet(object.ackError) + ? globalThis.String(object.ackError) + : '', } }, @@ -586,12 +590,12 @@ export const RawStreamClose = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [RawStreamClose.encode(p).finish()] } } else { - yield* [RawStreamClose.encode(pkt).finish()] + yield* [RawStreamClose.encode(pkt as any).finish()] } } }, @@ -604,20 +608,22 @@ export const RawStreamClose = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [RawStreamClose.decode(p)] } } else { - yield* [RawStreamClose.decode(pkt)] + yield* [RawStreamClose.decode(pkt as any)] } } }, fromJSON(object: any): RawStreamClose { return { - streamId: isSet(object.streamId) ? Number(object.streamId) : 0, - closeError: isSet(object.closeError) ? String(object.closeError) : '', + streamId: isSet(object.streamId) ? globalThis.Number(object.streamId) : 0, + closeError: isSet(object.closeError) + ? globalThis.String(object.closeError) + : '', } }, @@ -660,8 +666,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/transport/common/kcp/coord_stream_vtproto.pb.go b/transport/common/kcp/coord_stream_vtproto.pb.go index fb689e93..e7c10926 100644 --- a/transport/common/kcp/coord_stream_vtproto.pb.go +++ b/transport/common/kcp/coord_stream_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/transport/common/kcp/coord_stream.proto package kcp diff --git a/transport/common/kcp/kcp.pb.go b/transport/common/kcp/kcp.pb.go index 199095be..7d802cdb 100644 --- a/transport/common/kcp/kcp.pb.go +++ b/transport/common/kcp/kcp.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/transport/common/kcp/kcp.proto diff --git a/transport/common/kcp/kcp.pb.ts b/transport/common/kcp/kcp.pb.ts index 2eb650e2..0dfc45d1 100644 --- a/transport/common/kcp/kcp.pb.ts +++ b/transport/common/kcp/kcp.pb.ts @@ -304,12 +304,12 @@ export const Opts = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Opts.encode(p).finish()] } } else { - yield* [Opts.encode(pkt).finish()] + yield* [Opts.encode(pkt as any).finish()] } } }, @@ -322,23 +322,25 @@ export const Opts = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Opts.decode(p)] } } else { - yield* [Opts.decode(pkt)] + yield* [Opts.decode(pkt as any)] } } }, fromJSON(object: any): Opts { return { - dataShards: isSet(object.dataShards) ? Number(object.dataShards) : 0, + dataShards: isSet(object.dataShards) + ? globalThis.Number(object.dataShards) + : 0, parityShards: isSet(object.parityShards) - ? Number(object.parityShards) + ? globalThis.Number(object.parityShards) : 0, - mtu: isSet(object.mtu) ? Number(object.mtu) : 0, + mtu: isSet(object.mtu) ? globalThis.Number(object.mtu) : 0, kcpMode: isSet(object.kcpMode) ? kCPModeFromJSON(object.kcpMode) : 0, blockCrypt: isSet(object.blockCrypt) ? blockCryptFromJSON(object.blockCrypt) @@ -407,8 +409,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/transport/common/kcp/kcp_handshake.pb.go b/transport/common/kcp/kcp_handshake.pb.go index ae6808d9..4c3f3c8c 100644 --- a/transport/common/kcp/kcp_handshake.pb.go +++ b/transport/common/kcp/kcp_handshake.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/transport/common/kcp/kcp_handshake.proto diff --git a/transport/common/kcp/kcp_handshake.pb.ts b/transport/common/kcp/kcp_handshake.pb.ts index 245e7605..a49b3369 100644 --- a/transport/common/kcp/kcp_handshake.pb.ts +++ b/transport/common/kcp/kcp_handshake.pb.ts @@ -61,12 +61,12 @@ export const HandshakeExtraData = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [HandshakeExtraData.encode(p).finish()] } } else { - yield* [HandshakeExtraData.encode(pkt).finish()] + yield* [HandshakeExtraData.encode(pkt as any).finish()] } } }, @@ -79,12 +79,12 @@ export const HandshakeExtraData = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [HandshakeExtraData.decode(p)] } } else { - yield* [HandshakeExtraData.decode(pkt)] + yield* [HandshakeExtraData.decode(pkt as any)] } } }, @@ -138,8 +138,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/transport/common/kcp/kcp_handshake_vtproto.pb.go b/transport/common/kcp/kcp_handshake_vtproto.pb.go index 80519edc..3d5c5c1f 100644 --- a/transport/common/kcp/kcp_handshake_vtproto.pb.go +++ b/transport/common/kcp/kcp_handshake_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/transport/common/kcp/kcp_handshake.proto package kcp diff --git a/transport/common/kcp/kcp_vtproto.pb.go b/transport/common/kcp/kcp_vtproto.pb.go index 9114686e..37f511cc 100644 --- a/transport/common/kcp/kcp_vtproto.pb.go +++ b/transport/common/kcp/kcp_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/transport/common/kcp/kcp.proto package kcp diff --git a/transport/common/kcp/packet_type.pb.go b/transport/common/kcp/packet_type.pb.go index 9ac7644a..257efd25 100644 --- a/transport/common/kcp/packet_type.pb.go +++ b/transport/common/kcp/packet_type.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/transport/common/kcp/packet_type.proto diff --git a/transport/common/pconn/pconn.pb.go b/transport/common/pconn/pconn.pb.go index 4a5ae525..1123f0b5 100644 --- a/transport/common/pconn/pconn.pb.go +++ b/transport/common/pconn/pconn.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/transport/common/pconn/pconn.proto diff --git a/transport/common/pconn/pconn.pb.ts b/transport/common/pconn/pconn.pb.ts index fe2ce945..a85f98c9 100644 --- a/transport/common/pconn/pconn.pb.ts +++ b/transport/common/pconn/pconn.pb.ts @@ -65,12 +65,12 @@ export const Opts = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Opts.encode(p).finish()] } } else { - yield* [Opts.encode(pkt).finish()] + yield* [Opts.encode(pkt as any).finish()] } } }, @@ -83,12 +83,12 @@ export const Opts = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Opts.decode(p)] } } else { - yield* [Opts.decode(pkt)] + yield* [Opts.decode(pkt as any)] } } }, @@ -96,7 +96,9 @@ export const Opts = { fromJSON(object: any): Opts { return { quic: isSet(object.quic) ? Opts1.fromJSON(object.quic) : undefined, - verbose: isSet(object.verbose) ? Boolean(object.verbose) : false, + verbose: isSet(object.verbose) + ? globalThis.Boolean(object.verbose) + : false, } }, @@ -138,8 +140,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/transport/common/pconn/pconn_vtproto.pb.go b/transport/common/pconn/pconn_vtproto.pb.go index 532bf823..e1a444fc 100644 --- a/transport/common/pconn/pconn_vtproto.pb.go +++ b/transport/common/pconn/pconn_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/transport/common/pconn/pconn.proto package pconn diff --git a/transport/common/quic/quic.pb.go b/transport/common/quic/quic.pb.go index 4cf1ae10..7fdf0d02 100644 --- a/transport/common/quic/quic.pb.go +++ b/transport/common/quic/quic.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/transport/common/quic/quic.proto diff --git a/transport/common/quic/quic.pb.ts b/transport/common/quic/quic.pb.ts index aeb50a83..b351cbae 100644 --- a/transport/common/quic/quic.pb.ts +++ b/transport/common/quic/quic.pb.ts @@ -151,12 +151,12 @@ export const Opts = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Opts.encode(p).finish()] } } else { - yield* [Opts.encode(pkt).finish()] + yield* [Opts.encode(pkt as any).finish()] } } }, @@ -169,12 +169,12 @@ export const Opts = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Opts.decode(p)] } } else { - yield* [Opts.decode(pkt)] + yield* [Opts.decode(pkt as any)] } } }, @@ -182,24 +182,26 @@ export const Opts = { fromJSON(object: any): Opts { return { maxIdleTimeoutDur: isSet(object.maxIdleTimeoutDur) - ? String(object.maxIdleTimeoutDur) + ? globalThis.String(object.maxIdleTimeoutDur) : '', maxIncomingStreams: isSet(object.maxIncomingStreams) - ? Number(object.maxIncomingStreams) + ? globalThis.Number(object.maxIncomingStreams) : 0, disableKeepAlive: isSet(object.disableKeepAlive) - ? Boolean(object.disableKeepAlive) + ? globalThis.Boolean(object.disableKeepAlive) : false, keepAliveDur: isSet(object.keepAliveDur) - ? String(object.keepAliveDur) + ? globalThis.String(object.keepAliveDur) : '', disableDatagrams: isSet(object.disableDatagrams) - ? Boolean(object.disableDatagrams) + ? globalThis.Boolean(object.disableDatagrams) : false, disablePathMtuDiscovery: isSet(object.disablePathMtuDiscovery) - ? Boolean(object.disablePathMtuDiscovery) + ? globalThis.Boolean(object.disablePathMtuDiscovery) + : false, + verbose: isSet(object.verbose) + ? globalThis.Boolean(object.verbose) : false, - verbose: isSet(object.verbose) ? Boolean(object.verbose) : false, } }, @@ -258,8 +260,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/transport/common/quic/quic_vtproto.pb.go b/transport/common/quic/quic_vtproto.pb.go index 02adbfc5..b144fcee 100644 --- a/transport/common/quic/quic_vtproto.pb.go +++ b/transport/common/quic/quic_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/transport/common/quic/quic.proto package transport_quic diff --git a/transport/controller/controller.pb.go b/transport/controller/controller.pb.go index 05061c96..6d0e8b77 100644 --- a/transport/controller/controller.pb.go +++ b/transport/controller/controller.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/transport/controller/controller.proto diff --git a/transport/controller/controller.pb.ts b/transport/controller/controller.pb.ts index 1dfd210e..bfc89201 100644 --- a/transport/controller/controller.pb.ts +++ b/transport/controller/controller.pb.ts @@ -61,12 +61,12 @@ export const StreamEstablish = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [StreamEstablish.encode(p).finish()] } } else { - yield* [StreamEstablish.encode(pkt).finish()] + yield* [StreamEstablish.encode(pkt as any).finish()] } } }, @@ -79,19 +79,21 @@ export const StreamEstablish = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [StreamEstablish.decode(p)] } } else { - yield* [StreamEstablish.decode(pkt)] + yield* [StreamEstablish.decode(pkt as any)] } } }, fromJSON(object: any): StreamEstablish { return { - protocolId: isSet(object.protocolId) ? String(object.protocolId) : '', + protocolId: isSet(object.protocolId) + ? globalThis.String(object.protocolId) + : '', } }, @@ -130,8 +132,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/transport/controller/controller_vtproto.pb.go b/transport/controller/controller_vtproto.pb.go index 14fa2425..5d25f575 100644 --- a/transport/controller/controller_vtproto.pb.go +++ b/transport/controller/controller_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/transport/controller/controller.proto package transport_controller diff --git a/transport/inproc/inproc.pb.go b/transport/inproc/inproc.pb.go index 6bd2f550..b9b27121 100644 --- a/transport/inproc/inproc.pb.go +++ b/transport/inproc/inproc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/transport/inproc/inproc.proto diff --git a/transport/inproc/inproc.pb.ts b/transport/inproc/inproc.pb.ts index 03eb9d7b..f16361af 100644 --- a/transport/inproc/inproc.pb.ts +++ b/transport/inproc/inproc.pb.ts @@ -95,12 +95,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -113,12 +113,12 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, @@ -126,7 +126,7 @@ export const Config = { fromJSON(object: any): Config { return { transportPeerId: isSet(object.transportPeerId) - ? String(object.transportPeerId) + ? globalThis.String(object.transportPeerId) : '', packetOpts: isSet(object.packetOpts) ? Opts.fromJSON(object.packetOpts) @@ -242,12 +242,12 @@ export const Config_DialersEntry = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config_DialersEntry.encode(p).finish()] } } else { - yield* [Config_DialersEntry.encode(pkt).finish()] + yield* [Config_DialersEntry.encode(pkt as any).finish()] } } }, @@ -260,19 +260,19 @@ export const Config_DialersEntry = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config_DialersEntry.decode(p)] } } else { - yield* [Config_DialersEntry.decode(pkt)] + yield* [Config_DialersEntry.decode(pkt as any)] } } }, fromJSON(object: any): Config_DialersEntry { return { - key: isSet(object.key) ? String(object.key) : '', + key: isSet(object.key) ? globalThis.String(object.key) : '', value: isSet(object.value) ? DialerOpts.fromJSON(object.value) : undefined, @@ -321,8 +321,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/transport/inproc/inproc_vtproto.pb.go b/transport/inproc/inproc_vtproto.pb.go index edca8383..780efa79 100644 --- a/transport/inproc/inproc_vtproto.pb.go +++ b/transport/inproc/inproc_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/transport/inproc/inproc.proto package inproc diff --git a/transport/udp/udp.pb.go b/transport/udp/udp.pb.go index 27fd1dad..cffd2bfe 100644 --- a/transport/udp/udp.pb.go +++ b/transport/udp/udp.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/transport/udp/udp.proto diff --git a/transport/udp/udp.pb.ts b/transport/udp/udp.pb.ts index 97fe6750..fa4f13aa 100644 --- a/transport/udp/udp.pb.ts +++ b/transport/udp/udp.pb.ts @@ -115,12 +115,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -133,12 +133,12 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, @@ -146,9 +146,11 @@ export const Config = { fromJSON(object: any): Config { return { transportPeerId: isSet(object.transportPeerId) - ? String(object.transportPeerId) + ? globalThis.String(object.transportPeerId) + : '', + listenAddr: isSet(object.listenAddr) + ? globalThis.String(object.listenAddr) : '', - listenAddr: isSet(object.listenAddr) ? String(object.listenAddr) : '', packetOpts: isSet(object.packetOpts) ? Opts.fromJSON(object.packetOpts) : undefined, @@ -267,12 +269,12 @@ export const Config_DialersEntry = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config_DialersEntry.encode(p).finish()] } } else { - yield* [Config_DialersEntry.encode(pkt).finish()] + yield* [Config_DialersEntry.encode(pkt as any).finish()] } } }, @@ -285,19 +287,19 @@ export const Config_DialersEntry = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config_DialersEntry.decode(p)] } } else { - yield* [Config_DialersEntry.decode(pkt)] + yield* [Config_DialersEntry.decode(pkt as any)] } } }, fromJSON(object: any): Config_DialersEntry { return { - key: isSet(object.key) ? String(object.key) : '', + key: isSet(object.key) ? globalThis.String(object.key) : '', value: isSet(object.value) ? DialerOpts.fromJSON(object.value) : undefined, @@ -346,8 +348,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/transport/udp/udp_vtproto.pb.go b/transport/udp/udp_vtproto.pb.go index 70a3e5ba..425849cf 100644 --- a/transport/udp/udp_vtproto.pb.go +++ b/transport/udp/udp_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/transport/udp/udp.proto package udp diff --git a/transport/websocket/websocket.pb.go b/transport/websocket/websocket.pb.go index 012588f0..df59a0d6 100644 --- a/transport/websocket/websocket.pb.go +++ b/transport/websocket/websocket.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/transport/websocket/websocket.proto diff --git a/transport/websocket/websocket.pb.ts b/transport/websocket/websocket.pb.ts index 77e1463d..33510eb9 100644 --- a/transport/websocket/websocket.pb.ts +++ b/transport/websocket/websocket.pb.ts @@ -143,12 +143,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -161,12 +161,12 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, @@ -174,9 +174,11 @@ export const Config = { fromJSON(object: any): Config { return { transportPeerId: isSet(object.transportPeerId) - ? String(object.transportPeerId) + ? globalThis.String(object.transportPeerId) + : '', + listenAddr: isSet(object.listenAddr) + ? globalThis.String(object.listenAddr) : '', - listenAddr: isSet(object.listenAddr) ? String(object.listenAddr) : '', quic: isSet(object.quic) ? Opts.fromJSON(object.quic) : undefined, dialers: isObject(object.dialers) ? Object.entries(object.dialers).reduce<{ [key: string]: DialerOpts }>( @@ -188,7 +190,7 @@ export const Config = { ) : {}, restrictPeerId: isSet(object.restrictPeerId) - ? String(object.restrictPeerId) + ? globalThis.String(object.restrictPeerId) : '', } }, @@ -300,12 +302,12 @@ export const Config_DialersEntry = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config_DialersEntry.encode(p).finish()] } } else { - yield* [Config_DialersEntry.encode(pkt).finish()] + yield* [Config_DialersEntry.encode(pkt as any).finish()] } } }, @@ -318,19 +320,19 @@ export const Config_DialersEntry = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config_DialersEntry.decode(p)] } } else { - yield* [Config_DialersEntry.decode(pkt)] + yield* [Config_DialersEntry.decode(pkt as any)] } } }, fromJSON(object: any): Config_DialersEntry { return { - key: isSet(object.key) ? String(object.key) : '', + key: isSet(object.key) ? globalThis.String(object.key) : '', value: isSet(object.value) ? DialerOpts.fromJSON(object.value) : undefined, @@ -379,8 +381,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/transport/websocket/websocket_vtproto.pb.go b/transport/websocket/websocket_vtproto.pb.go index adf6233b..8a9a4136 100644 --- a/transport/websocket/websocket_vtproto.pb.go +++ b/transport/websocket/websocket_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/transport/websocket/websocket.proto package websocket diff --git a/transport/xbee/xbee.pb.go b/transport/xbee/xbee.pb.go index 30a87848..c49fac26 100644 --- a/transport/xbee/xbee.pb.go +++ b/transport/xbee/xbee.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/transport/xbee/xbee.proto diff --git a/transport/xbee/xbee.pb.ts b/transport/xbee/xbee.pb.ts index c9f889c0..4193b7b1 100644 --- a/transport/xbee/xbee.pb.ts +++ b/transport/xbee/xbee.pb.ts @@ -128,12 +128,12 @@ export const Config = { source: AsyncIterable | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.encode(p).finish()] } } else { - yield* [Config.encode(pkt).finish()] + yield* [Config.encode(pkt as any).finish()] } } }, @@ -146,12 +146,12 @@ export const Config = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config.decode(p)] } } else { - yield* [Config.decode(pkt)] + yield* [Config.decode(pkt as any)] } } }, @@ -159,10 +159,14 @@ export const Config = { fromJSON(object: any): Config { return { transportPeerId: isSet(object.transportPeerId) - ? String(object.transportPeerId) + ? globalThis.String(object.transportPeerId) : '', - devicePath: isSet(object.devicePath) ? String(object.devicePath) : '', - deviceBaud: isSet(object.deviceBaud) ? Number(object.deviceBaud) : 0, + devicePath: isSet(object.devicePath) + ? globalThis.String(object.devicePath) + : '', + deviceBaud: isSet(object.deviceBaud) + ? globalThis.Number(object.deviceBaud) + : 0, packetOpts: isSet(object.packetOpts) ? Opts.fromJSON(object.packetOpts) : undefined, @@ -285,12 +289,12 @@ export const Config_DialersEntry = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config_DialersEntry.encode(p).finish()] } } else { - yield* [Config_DialersEntry.encode(pkt).finish()] + yield* [Config_DialersEntry.encode(pkt as any).finish()] } } }, @@ -303,19 +307,19 @@ export const Config_DialersEntry = { | Iterable, ): AsyncIterable { for await (const pkt of source) { - if (Array.isArray(pkt)) { - for (const p of pkt) { + if (globalThis.Array.isArray(pkt)) { + for (const p of pkt as any) { yield* [Config_DialersEntry.decode(p)] } } else { - yield* [Config_DialersEntry.decode(pkt)] + yield* [Config_DialersEntry.decode(pkt as any)] } } }, fromJSON(object: any): Config_DialersEntry { return { - key: isSet(object.key) ? String(object.key) : '', + key: isSet(object.key) ? globalThis.String(object.key) : '', value: isSet(object.value) ? DialerOpts.fromJSON(object.value) : undefined, @@ -364,8 +368,8 @@ export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long - : T extends Array - ? Array> + : T extends globalThis.Array + ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string } diff --git a/transport/xbee/xbee_vtproto.pb.go b/transport/xbee/xbee_vtproto.pb.go index 5e9586fd..d75cab83 100644 --- a/transport/xbee/xbee_vtproto.pb.go +++ b/transport/xbee/xbee_vtproto.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 +// protoc-gen-go-vtproto version: v0.5.0 // source: github.com/aperturerobotics/bifrost/transport/xbee/xbee.proto package xbee diff --git a/util/blockcompress/blockcompress.pb.go b/util/blockcompress/blockcompress.pb.go index 4b5dfe69..45e34f9a 100644 --- a/util/blockcompress/blockcompress.pb.go +++ b/util/blockcompress/blockcompress.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/util/blockcompress/blockcompress.proto diff --git a/util/blockcrypt/blockcrypt.pb.go b/util/blockcrypt/blockcrypt.pb.go index df2710ce..917b24c6 100644 --- a/util/blockcrypt/blockcrypt.pb.go +++ b/util/blockcrypt/blockcrypt.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0-devel +// protoc-gen-go v1.31.0-devel // protoc v3.21.9 // source: github.com/aperturerobotics/bifrost/util/blockcrypt/blockcrypt.proto diff --git a/yarn.lock b/yarn.lock index 7f6f8637..f9323c35 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2054,10 +2054,10 @@ ts-proto-descriptors@1.15.0: long "^5.2.3" protobufjs "^7.2.4" -ts-proto@^1.160.0: - version "1.160.0" - resolved "https://registry.yarnpkg.com/ts-proto/-/ts-proto-1.160.0.tgz#0ae62b7951c61476a28ce55ca3a964f5d8a0ff33" - integrity sha512-AUJQ0noLEkLew81MYmNPF/z8QDIBxAIJ4UKt9sH2AwdaywOTk1jh1NoluoCr3cGScpVh0GHWCB/UA4V0fOO8fg== +ts-proto@^1.161.1: + version "1.161.1" + resolved "https://registry.yarnpkg.com/ts-proto/-/ts-proto-1.161.1.tgz#592655efa9f325423dd1d126bb166e18e0d07455" + integrity sha512-9hbIJ9RWCeA+GhDrj0lTwgDZn/eergxXXDAqW42xWfMnZTzQbSvapLcgxA7oQtiJFH9b8mLBDSZso0Tv2Rqe5g== dependencies: case-anything "^2.1.13" protobufjs "^7.2.4"