diff --git a/.eslintrc.js b/.eslintrc.cjs similarity index 100% rename from .eslintrc.js rename to .eslintrc.cjs diff --git a/daemon/api/api.pb.ts b/daemon/api/api.pb.ts new file mode 100644 index 00000000..70d5414e --- /dev/null +++ b/daemon/api/api.pb.ts @@ -0,0 +1,35 @@ +// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" +// @generated from file github.com/aperturerobotics/bifrost/daemon/api/api.proto (package bifrost.api, syntax proto3) +/* eslint-disable */ + +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; +import { Config as Config$1 } from "../../../controllerbus/bus/api/api.pb.js"; + +export const protobufPackage = "bifrost.api"; + +/** + * Config configures the API. + * + * @generated from message bifrost.api.Config + */ +export type Config = Message<{ + /** + * BusConfig configures the bus api. + * + * @generated from field: bus.api.Config bus_config = 1; + */ + busConfig?: Config$1; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "bifrost.api.Config", + fields: [ + { no: 1, name: "bus_config", kind: "message", T: () => Config$1 }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + diff --git a/daemon/api/api_pb.ts b/daemon/api/api_pb.ts deleted file mode 100644 index efe1f128..00000000 --- a/daemon/api/api_pb.ts +++ /dev/null @@ -1,35 +0,0 @@ -// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" -// @generated from file github.com/aperturerobotics/bifrost/daemon/api/api.proto (package bifrost.api, syntax proto3) -/* eslint-disable */ - -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import { Config as Config$1 } from '@go/github.com/aperturerobotics/controllerbus/bus/api/api_pb.js' - -export const protobufPackage = 'bifrost.api' - -/** - * Config configures the API. - * - * @generated from message bifrost.api.Config - */ -export interface Config extends Message { - /** - * BusConfig configures the bus api. - * - * @generated from field: bus.api.Config bus_config = 1; - */ - busConfig?: Config$1 -} - -export const Config: MessageType = createMessageType({ - typeName: 'bifrost.api.Config', - fields: [ - { no: 1, name: 'bus_config', kind: 'message', T: Config$1 }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/daemon/api/controller/controller.pb.ts b/daemon/api/controller/controller.pb.ts new file mode 100644 index 00000000..854d53a6 --- /dev/null +++ b/daemon/api/controller/controller.pb.ts @@ -0,0 +1,58 @@ +// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" +// @generated from file github.com/aperturerobotics/bifrost/daemon/api/controller/controller.proto (package bifrost.api.controller, syntax proto3) +/* eslint-disable */ + +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; +import { Config as Config$1 } from "../api.pb.js"; +import { Config as Config$2 } from "../../../../controllerbus/bus/api/api.pb.js"; + +export const protobufPackage = "bifrost.api.controller"; + +/** + * Config configures the API. + * + * @generated from message bifrost.api.controller.Config + */ +export type Config = Message<{ + /** + * ListenAddr is the address to listen on for connections. + * + * @generated from field: string listen_addr = 1; + */ + listenAddr?: string; + /** + * ApiConfig are api config options. + * + * @generated from field: bifrost.api.Config api_config = 2; + */ + apiConfig?: Config$1; + /** + * DisableBusApi disables the bus api. + * + * @generated from field: bool disable_bus_api = 3; + */ + disableBusApi?: boolean; + /** + * BusApiConfig are controller-bus bus api config options. + * BusApiConfig are options for controller bus api. + * + * @generated from field: bus.api.Config bus_api_config = 4; + */ + busApiConfig?: Config$2; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "bifrost.api.controller.Config", + fields: [ + { no: 1, name: "listen_addr", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "api_config", kind: "message", T: () => Config$1 }, + { no: 3, name: "disable_bus_api", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 4, name: "bus_api_config", kind: "message", T: () => Config$2 }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + diff --git a/daemon/api/controller/controller_pb.ts b/daemon/api/controller/controller_pb.ts deleted file mode 100644 index f4febe12..00000000 --- a/daemon/api/controller/controller_pb.ts +++ /dev/null @@ -1,68 +0,0 @@ -// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" -// @generated from file github.com/aperturerobotics/bifrost/daemon/api/controller/controller.proto (package bifrost.api.controller, syntax proto3) -/* eslint-disable */ - -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import { Config as Config$1 } from '../api_pb.js' -import { Config as Config$2 } from '@go/github.com/aperturerobotics/controllerbus/bus/api/api_pb.js' - -export const protobufPackage = 'bifrost.api.controller' - -/** - * Config configures the API. - * - * @generated from message bifrost.api.controller.Config - */ -export interface Config extends Message { - /** - * ListenAddr is the address to listen on for connections. - * - * @generated from field: string listen_addr = 1; - */ - listenAddr?: string - /** - * ApiConfig are api config options. - * - * @generated from field: bifrost.api.Config api_config = 2; - */ - apiConfig?: Config$1 - /** - * DisableBusApi disables the bus api. - * - * @generated from field: bool disable_bus_api = 3; - */ - disableBusApi?: boolean - /** - * BusApiConfig are controller-bus bus api config options. - * BusApiConfig are options for controller bus api. - * - * @generated from field: bus.api.Config bus_api_config = 4; - */ - busApiConfig?: Config$2 -} - -export const Config: MessageType = createMessageType({ - typeName: 'bifrost.api.controller.Config', - fields: [ - { - no: 1, - name: 'listen_addr', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { no: 2, name: 'api_config', kind: 'message', T: Config$1 }, - { - no: 3, - name: 'disable_bus_api', - kind: 'scalar', - T: 8 /* ScalarType.BOOL */, - }, - { no: 4, name: 'bus_api_config', kind: 'message', T: Config$2 }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/entitygraph/config.pb.ts b/entitygraph/config.pb.ts new file mode 100644 index 00000000..d0345641 --- /dev/null +++ b/entitygraph/config.pb.ts @@ -0,0 +1,27 @@ +// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" +// @generated from file github.com/aperturerobotics/bifrost/entitygraph/config.proto (package bifrost.entitygraph, syntax proto3) +/* eslint-disable */ + +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; + +export const protobufPackage = "bifrost.entitygraph"; + +/** + * Config is the config object for the entitygraph repoter. + * + * @generated from message bifrost.entitygraph.Config + */ +export type Config = Message<{ + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "bifrost.entitygraph.Config", + fields: [ + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + diff --git a/entitygraph/config_pb.ts b/entitygraph/config_pb.ts deleted file mode 100644 index c89af8e1..00000000 --- a/entitygraph/config_pb.ts +++ /dev/null @@ -1,25 +0,0 @@ -// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" -// @generated from file github.com/aperturerobotics/bifrost/entitygraph/config.proto (package bifrost.entitygraph, syntax proto3) -/* eslint-disable */ - -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' - -export const protobufPackage = 'bifrost.entitygraph' - -/** - * Config is the config object for the entitygraph repoter. - * - * @generated from message bifrost.entitygraph.Config - */ -export interface Config extends Message {} - -export const Config: MessageType = createMessageType({ - typeName: 'bifrost.entitygraph.Config', - fields: [] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/go.mod b/go.mod index c95c88f0..89e6ff47 100644 --- a/go.mod +++ b/go.mod @@ -3,12 +3,12 @@ module github.com/aperturerobotics/bifrost go 1.22 require ( - github.com/aperturerobotics/common v0.14.3 // latest + github.com/aperturerobotics/common v0.14.8 // latest github.com/aperturerobotics/controllerbus v0.44.0 // latest github.com/aperturerobotics/entitygraph v0.8.2 // latest github.com/aperturerobotics/protobuf-go-lite v0.6.0 // latest - github.com/aperturerobotics/starpc v0.31.9 // latest - github.com/aperturerobotics/util v1.21.2 // master + github.com/aperturerobotics/starpc v0.31.12 // latest + github.com/aperturerobotics/util v1.21.3 // master ) // aperture: use compatibility forks diff --git a/go.sum b/go.sum index 3286be8c..3cba53a4 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/aperturerobotics/bifrost-nats-client v1.10.1-0.20200831103200-24c3d04 github.com/aperturerobotics/bifrost-nats-client v1.10.1-0.20200831103200-24c3d0464e58/go.mod h1:ougcjYEZDYV8pVtaNbA5sgYDukkYHyKtSsW/T3B13j0= github.com/aperturerobotics/bifrost-nats-server/v2 v2.1.8-0.20221228081037-b7c2df0c151f h1:bmScByQNGDPPy9T+zdwu816XaCbFtD5UDyqZMRiHJ80= github.com/aperturerobotics/bifrost-nats-server/v2 v2.1.8-0.20221228081037-b7c2df0c151f/go.mod h1:kIcZtLpq4UIZzOqduYLm1mYU1nuMBtN6XuDCtQ21QT8= -github.com/aperturerobotics/common v0.14.3 h1:CyIbsjlFcgjNBLT+XshDZcGH1nkrSUSakHMIsaTvm9g= -github.com/aperturerobotics/common v0.14.3/go.mod h1:MkCLl9iUXglujvO9wAbrZ9bm72mesXaAq288HGnzshA= +github.com/aperturerobotics/common v0.14.8 h1:FDbodPzWKdg99ZaCpYY2VOUK0qZatjbuZCW98pjur5M= +github.com/aperturerobotics/common v0.14.8/go.mod h1:MkCLl9iUXglujvO9wAbrZ9bm72mesXaAq288HGnzshA= github.com/aperturerobotics/controllerbus v0.44.0 h1:JpUxy+H1fZkA4OaJWY2ehLM73Y189lMiRz27+W7ovGU= github.com/aperturerobotics/controllerbus v0.44.0/go.mod h1:yhjKBRCLWbaftgHb7xXLq49//VeewOtoLiUAF3zoFuI= github.com/aperturerobotics/entitygraph v0.8.2 h1:pNR5f6DJK+UF0IyXMJwtVXkjDI+KuoJdKiF2QuNH+iE= @@ -18,10 +18,10 @@ github.com/aperturerobotics/protobuf-go-lite v0.6.0 h1:EE168e2oov6wmDv8AdSAlz2G1 github.com/aperturerobotics/protobuf-go-lite v0.6.0/go.mod h1:6Bp+C+fI1uh0NmIKpxlxyHMkKtCP9Kb3PHkhOzxG4B8= github.com/aperturerobotics/quic-go v0.41.1-0.20240125035303-1093432c45e9 h1:QLhCPPV6tnQpbHqJLvU/aOdp9RNajGLDTAwFsKi7Kow= github.com/aperturerobotics/quic-go v0.41.1-0.20240125035303-1093432c45e9/go.mod h1:tY2LVzdNWloFW0Gbg9bK8L49s4UhyUe9uCZIOF6KtuI= -github.com/aperturerobotics/starpc v0.31.9 h1:rx5TWujX97XnFTzCa/nZj2jAaNLYFjqhShxgQBXjino= -github.com/aperturerobotics/starpc v0.31.9/go.mod h1:roNNOXrqxQmmj8gnBDzXNFJN/cvORApXNHRfaPApHAo= -github.com/aperturerobotics/util v1.21.2 h1:8JWrknQX/De3UqWsQhD/GoP+ZejdVqhhqQPnzyxofvc= -github.com/aperturerobotics/util v1.21.2/go.mod h1:recS+Q4YvyWXlJUSSkixLkf+AHxGcjNKHwebDbN0WiI= +github.com/aperturerobotics/starpc v0.31.12 h1:Kpa5/NdTxKPMtIaJkW9ZevX0nOj4yi02wqpgC2JKArc= +github.com/aperturerobotics/starpc v0.31.12/go.mod h1:EhZN09QG2fwCtpmZhVAqpl0I+2Mvu8vEBVR7lbIs5mc= +github.com/aperturerobotics/util v1.21.3 h1:Leg1xpgA6u7rGORjfndlInJkkGoJ2bqQxudym5tsIwY= +github.com/aperturerobotics/util v1.21.3/go.mod h1:pqLfG1F49Z+b9GVavx7RTAyTfkhaj4BZrEvTSuCg8xo= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= @@ -164,8 +164,6 @@ github.com/pion/rtcp v1.2.12/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9 github.com/pion/rtcp v1.2.14 h1:KCkGV3vJ+4DAJmvP0vaQShsb0xkRfWkO540Gy102KyE= github.com/pion/rtcp v1.2.14/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4= github.com/pion/rtp v1.8.3/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= -github.com/pion/rtp v1.8.5 h1:uYzINfaK+9yWs7r537z/Rc1SvT8ILjBcmDOpJcTB+OU= -github.com/pion/rtp v1.8.5/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= github.com/pion/rtp v1.8.6 h1:MTmn/b0aWWsAzux2AmP8WGllusBVw4NPYPVFFd7jUPw= github.com/pion/rtp v1.8.6/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= github.com/pion/sctp v1.8.13/go.mod h1:YKSgO/bO/6aOMP9LCie1DuD7m+GamiK2yIiPM6vH+GA= @@ -185,8 +183,6 @@ github.com/pion/transport/v3 v3.0.2 h1:r+40RJR25S9w3jbA6/5uEPTzcdn7ncyU44RWCbHkL github.com/pion/transport/v3 v3.0.2/go.mod h1:nIToODoOlb5If2jF9y2Igfx3PFYWfuXi37m0IlWa/D0= github.com/pion/turn/v3 v3.0.2 h1:iBonAIIKRwkVUJBFiFd/kSjytP7FlX0HwCyBDJPRDdU= github.com/pion/turn/v3 v3.0.2/go.mod h1:vw0Dz420q7VYAF3J4wJKzReLHIo2LGp4ev8nXQexYsc= -github.com/pion/webrtc/v4 v4.0.0-beta.17 h1:KdAbozM+lQ3Dz1NJ0JATRDQ4W02WUhWwIkvjyBRODL0= -github.com/pion/webrtc/v4 v4.0.0-beta.17/go.mod h1:I/Z0MFtc6Ok7mN7kZmA1xqU7KA9ycZZx/6eXz5+yD+4= github.com/pion/webrtc/v4 v4.0.0-beta.18 h1:qCT7RrVomRu5LBxeoWz8WuJyD8Xt7AxXcJlj81/v4ik= github.com/pion/webrtc/v4 v4.0.0-beta.18/go.mod h1:S9LRG5LIld++K8jfPIlS40EmVVdXuotwEXSp20r+KPs= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= diff --git a/hash/hash_pb.ts b/hash/hash.pb.ts similarity index 62% rename from hash/hash_pb.ts rename to hash/hash.pb.ts index f1590789..8b765669 100644 --- a/hash/hash_pb.ts +++ b/hash/hash.pb.ts @@ -2,15 +2,10 @@ // @generated from file github.com/aperturerobotics/bifrost/hash/hash.proto (package hash, syntax proto3) /* eslint-disable */ -import { - createEnumType, - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createEnumType, createMessageType, Message } from "@aptre/protobuf-es-lite"; -export const protobufPackage = 'hash' +export const protobufPackage = "hash"; /** * HashType identifies the hash type in use. @@ -50,38 +45,42 @@ export enum HashType { } // HashType_Enum is the enum type for HashType. -export const HashType_Enum = createEnumType('hash.HashType', [ - { no: 0, name: 'HashType_UNKNOWN' }, - { no: 1, name: 'HashType_SHA256' }, - { no: 2, name: 'HashType_SHA1' }, - { no: 3, name: 'HashType_BLAKE3' }, -]) +export const HashType_Enum = createEnumType("hash.HashType", [ + { no: 0, name: "HashType_UNKNOWN" }, + { no: 1, name: "HashType_SHA256" }, + { no: 2, name: "HashType_SHA1" }, + { no: 3, name: "HashType_BLAKE3" }, +]); /** * Hash is a hash of a binary blob. * * @generated from message hash.Hash */ -export interface Hash extends Message { +export type Hash = Message<{ /** * HashType is the hash type in use. * * @generated from field: hash.HashType hash_type = 1; */ - hashType?: HashType + hashType?: HashType; /** * Hash is the hash value. * * @generated from field: bytes hash = 2; */ - hash?: Uint8Array -} + hash?: Uint8Array; + +}>; + +export const Hash: MessageType = createMessageType( + { + typeName: "hash.Hash", + fields: [ + { no: 1, name: "hash_type", kind: "enum", T: HashType_Enum }, + { no: 2, name: "hash", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const Hash: MessageType = createMessageType({ - typeName: 'hash.Hash', - fields: [ - { no: 1, name: 'hash_type', kind: 'enum', T: HashType_Enum }, - { no: 2, name: 'hash', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/http/listener/config_pb.ts b/http/listener/config.pb.ts similarity index 57% rename from http/listener/config_pb.ts rename to http/listener/config.pb.ts index 790242dd..d4a3a7a4 100644 --- a/http/listener/config_pb.ts +++ b/http/listener/config.pb.ts @@ -2,14 +2,10 @@ // @generated from file github.com/aperturerobotics/bifrost/http/listener/config.proto (package bifrost.http.listener, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; -export const protobufPackage = 'bifrost.http.listener' +export const protobufPackage = "bifrost.http.listener"; /** * Config configures a http server that listens on a port. @@ -18,7 +14,7 @@ export const protobufPackage = 'bifrost.http.listener' * * @generated from message bifrost.http.listener.Config */ -export interface Config extends Message { +export type Config = Message<{ /** * Addr is the address to listen. * @@ -26,20 +22,20 @@ export interface Config extends Message { * * @generated from field: string addr = 1; */ - addr?: string + addr?: string; /** * ClientId is the client id to set on LookupHTTPHandler. * * @generated from field: string client_id = 2; */ - clientId?: string + clientId?: string; /** * CertFile is the path to the certificate file to use for https. * Can be unset to use HTTP. * * @generated from field: string cert_file = 3; */ - certFile?: string + certFile?: string; /** * KeyFile is the path to the key file to use for https. * Cannot be unset if cert_file is set. @@ -47,24 +43,28 @@ export interface Config extends Message { * * @generated from field: string key_file = 4; */ - keyFile?: string + keyFile?: string; /** * Wait indicates to wait for LookupHTTPHandler even if it becomes idle. * If false: returns 404 not found if LookupHTTPHandler becomes idle. * * @generated from field: bool wait = 5; */ - wait?: boolean -} + wait?: boolean; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "bifrost.http.listener.Config", + fields: [ + { no: 1, name: "addr", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "cert_file", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "key_file", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "wait", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const Config: MessageType = createMessageType({ - typeName: 'bifrost.http.listener.Config', - fields: [ - { no: 1, name: 'addr', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'client_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 3, name: 'cert_file', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 4, name: 'key_file', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 5, name: 'wait', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/link/establish/config_pb.ts b/link/establish/config.pb.ts similarity index 52% rename from link/establish/config_pb.ts rename to link/establish/config.pb.ts index 6f1080ab..463c293b 100644 --- a/link/establish/config_pb.ts +++ b/link/establish/config.pb.ts @@ -2,14 +2,10 @@ // @generated from file github.com/aperturerobotics/bifrost/link/establish/config.proto (package link.establish.controller, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; -export const protobufPackage = 'link.establish.controller' +export const protobufPackage = "link.establish.controller"; /** * Config is the link establish controller config. @@ -17,38 +13,31 @@ export const protobufPackage = 'link.establish.controller' * * @generated from message link.establish.controller.Config */ -export interface Config extends Message { +export type Config = Message<{ /** * PeerIds is the list of peer IDs to attempt to establish links to. * * @generated from field: repeated string peer_ids = 1; */ - peerIds?: string[] + peerIds?: string[]; /** * SrcPeerId is the source peer id to establish links from. * Can be empty. * * @generated from field: string src_peer_id = 2; */ - srcPeerId?: string -} + srcPeerId?: string; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "link.establish.controller.Config", + fields: [ + { no: 1, name: "peer_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 2, name: "src_peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const Config: MessageType = createMessageType({ - typeName: 'link.establish.controller.Config', - fields: [ - { - no: 1, - name: 'peer_ids', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - repeated: true, - }, - { - no: 2, - name: 'src_peer_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/link/hold-open/config.pb.ts b/link/hold-open/config.pb.ts new file mode 100644 index 00000000..276c02a1 --- /dev/null +++ b/link/hold-open/config.pb.ts @@ -0,0 +1,29 @@ +// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" +// @generated from file github.com/aperturerobotics/bifrost/link/hold-open/config.proto (package link.holdopen.controller, syntax proto3) +/* eslint-disable */ + +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; + +export const protobufPackage = "link.holdopen.controller"; + +/** + * Config is the hold-open controller config. + * + * TODO: limit to specific transport ID, etc. + * + * @generated from message link.holdopen.controller.Config + */ +export type Config = Message<{ + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "link.holdopen.controller.Config", + fields: [ + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + diff --git a/link/hold-open/config_pb.ts b/link/hold-open/config_pb.ts deleted file mode 100644 index b441487e..00000000 --- a/link/hold-open/config_pb.ts +++ /dev/null @@ -1,27 +0,0 @@ -// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" -// @generated from file github.com/aperturerobotics/bifrost/link/hold-open/config.proto (package link.holdopen.controller, syntax proto3) -/* eslint-disable */ - -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' - -export const protobufPackage = 'link.holdopen.controller' - -/** - * Config is the hold-open controller config. - * - * TODO: limit to specific transport ID, etc. - * - * @generated from message link.holdopen.controller.Config - */ -export interface Config extends Message {} - -export const Config: MessageType = createMessageType({ - typeName: 'link.holdopen.controller.Config', - fields: [] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/package.json b/package.json index 50a0e35e..031bf846 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,9 @@ "repository": { "url": "git+ssh://git@github.com/aperturerobotics/bifrost.git" }, + "type": "module", "scripts": { - "build": "tsc --project tsconfig.json --noEmit false --module ES6 --target es2022 --outDir ./dist/", + "build": "tsc --project tsconfig.json --noEmit false --outDir ./dist/", "check": "npm run typecheck", "typecheck": "tsc --noEmit", "deps": "depcheck --ignore-patterns=.eslintrc.js,package.json --ignores depcheck,prettier,typescript,starpc,@aperturerobotics/ts-common,@bufbuild/protoc-gen-es,@go/github.com", @@ -34,7 +35,7 @@ "demo": "make demo", "lint": "npm run lint:go && npm run lint:js", "lint:go": "make lint", - "lint:js": "ESLINT_USE_FLAT_CONFIG=false eslint -c .eslintrc.js --ignore-pattern wasm_exec.js ./", + "lint:js": "ESLINT_USE_FLAT_CONFIG=false eslint -c .eslintrc.cjs --ignore-pattern wasm_exec.js ./", "prepare": "go mod vendor && rimraf ./.tools", "precommit": "npm run format" }, @@ -50,8 +51,7 @@ "typescript": "^5.4.4" }, "dependencies": { - "@aptre/protobuf-es-lite": "^0.2.6", - "@bufbuild/protobuf": "^1.9.0", + "@aptre/protobuf-es-lite": "^0.2.14", "starpc": "^0.31.10" } } diff --git a/peer/api/api_pb.ts b/peer/api/api.pb.ts similarity index 50% rename from peer/api/api_pb.ts rename to peer/api/api.pb.ts index 6e43a42e..d5ca0fa0 100644 --- a/peer/api/api_pb.ts +++ b/peer/api/api.pb.ts @@ -2,138 +2,136 @@ // @generated from file github.com/aperturerobotics/bifrost/peer/api/api.proto (package peer.api, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import { Config } from '../controller/config_pb.js' -import type { ControllerStatus } from '@go/github.com/aperturerobotics/controllerbus/controller/exec/exec_pb.js' -import { ControllerStatus_Enum } from '@go/github.com/aperturerobotics/controllerbus/controller/exec/exec_pb.js' - -export const protobufPackage = 'peer.api' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; +import { Config } from "../controller/config.pb.js"; +import type { ControllerStatus } from "../../../controllerbus/controller/exec/exec.pb.js"; +import { ControllerStatus_Enum } from "../../../controllerbus/controller/exec/exec.pb.js"; + +export const protobufPackage = "peer.api"; /** * IdentifyRequest is a request to load an identity. * * @generated from message peer.api.IdentifyRequest */ -export interface IdentifyRequest extends Message { +export type IdentifyRequest = Message<{ /** * Config is the request to configure the peer controller. * * @generated from field: peer.controller.Config config = 1; */ - config?: Config -} + config?: Config; -export const IdentifyRequest: MessageType = createMessageType({ - typeName: 'peer.api.IdentifyRequest', - fields: [ - { no: 1, name: 'config', kind: 'message', T: Config }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) +}>; + +export const IdentifyRequest: MessageType = createMessageType( + { + typeName: "peer.api.IdentifyRequest", + fields: [ + { no: 1, name: "config", kind: "message", T: () => Config }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); /** * IdentifyResponse is a response to an identify request. * * @generated from message peer.api.IdentifyResponse */ -export interface IdentifyResponse extends Message { +export type IdentifyResponse = Message<{ /** * ControllerStatus is the status of the peer controller. * * @generated from field: controller.exec.ControllerStatus controller_status = 1; */ - controllerStatus?: ControllerStatus -} + controllerStatus?: ControllerStatus; + +}>; -export const IdentifyResponse: MessageType = - createMessageType({ - typeName: 'peer.api.IdentifyResponse', +export const IdentifyResponse: MessageType = createMessageType( + { + typeName: "peer.api.IdentifyResponse", fields: [ - { - no: 1, - name: 'controller_status', - kind: 'enum', - T: ControllerStatus_Enum, - }, + { no: 1, name: "controller_status", kind: "enum", T: ControllerStatus_Enum }, ] as readonly PartialFieldInfo[], packedByDefault: true, - }) + }, +); /** * GetPeerInfoRequest is the request type for GetPeerInfo. * * @generated from message peer.api.GetPeerInfoRequest */ -export interface GetPeerInfoRequest extends Message { +export type GetPeerInfoRequest = Message<{ /** * PeerId restricts the response to a specific peer ID. * * @generated from field: string peer_id = 1; */ - peerId?: string -} + peerId?: string; + +}>; -export const GetPeerInfoRequest: MessageType = - createMessageType({ - typeName: 'peer.api.GetPeerInfoRequest', +export const GetPeerInfoRequest: MessageType = createMessageType( + { + typeName: "peer.api.GetPeerInfoRequest", fields: [ - { no: 1, name: 'peer_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ] as readonly PartialFieldInfo[], packedByDefault: true, - }) + }, +); /** * PeerInfo is basic information about a peer. * * @generated from message peer.api.PeerInfo */ -export interface PeerInfo extends Message { +export type PeerInfo = Message<{ /** * PeerId is the b58 peer ID. * * @generated from field: string peer_id = 1; */ - peerId?: string -} + peerId?: string; -export const PeerInfo: MessageType = createMessageType({ - typeName: 'peer.api.PeerInfo', - fields: [ - { no: 1, name: 'peer_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) +}>; + +export const PeerInfo: MessageType = createMessageType( + { + typeName: "peer.api.PeerInfo", + fields: [ + { no: 1, name: "peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); /** * GetPeerInfoResponse is the response type for GetPeerInfo. * * @generated from message peer.api.GetPeerInfoResponse */ -export interface GetPeerInfoResponse extends Message { +export type GetPeerInfoResponse = Message<{ /** * LocalPeers is the set of peers loaded. * * @generated from field: repeated peer.api.PeerInfo local_peers = 1; */ - localPeers?: PeerInfo[] -} + localPeers?: PeerInfo[]; + +}>; -export const GetPeerInfoResponse: MessageType = - createMessageType({ - typeName: 'peer.api.GetPeerInfoResponse', +export const GetPeerInfoResponse: MessageType = createMessageType( + { + typeName: "peer.api.GetPeerInfoResponse", fields: [ - { - no: 1, - name: 'local_peers', - kind: 'message', - T: PeerInfo, - repeated: true, - }, + { no: 1, name: "local_peers", kind: "message", T: () => PeerInfo, repeated: true }, ] as readonly PartialFieldInfo[], packedByDefault: true, - }) + }, +); + diff --git a/peer/api/api_srpc.pb.go b/peer/api/api_srpc.pb.go index aa515a29..8ce2782c 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.31.6 +// protoc-gen-srpc version: v0.31.12 // source: github.com/aperturerobotics/bifrost/peer/api/api.proto package peer_api diff --git a/peer/api/api_srpc.pb.ts b/peer/api/api_srpc.pb.ts index 213edacd..62999953 100644 --- a/peer/api/api_srpc.pb.ts +++ b/peer/api/api_srpc.pb.ts @@ -7,9 +7,8 @@ import { GetPeerInfoResponse, IdentifyRequest, IdentifyResponse, -} from './api_pb.js' -import { MethodKind } from '@bufbuild/protobuf' -import { Message } from '@aptre/protobuf-es-lite' +} from './api.pb.js' +import { Message, MethodKind } from '@aptre/protobuf-es-lite' import { buildDecodeMessageTransform, MessageStream, ProtoRpc } from 'starpc' /** diff --git a/peer/controller/config_pb.ts b/peer/controller/config.pb.ts similarity index 55% rename from peer/controller/config_pb.ts rename to peer/controller/config.pb.ts index 882922f7..6bc21b78 100644 --- a/peer/controller/config_pb.ts +++ b/peer/controller/config.pb.ts @@ -2,21 +2,17 @@ // @generated from file github.com/aperturerobotics/bifrost/peer/controller/config.proto (package peer.controller, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; -export const protobufPackage = 'peer.controller' +export const protobufPackage = "peer.controller"; /** * Config is the peer controller config. * * @generated from message peer.controller.Config */ -export interface Config extends Message { +export type Config = Message<{ /** * PrivKey is the peer private key in either b58 or PEM format. * See confparse.MarshalPrivateKey. @@ -24,14 +20,14 @@ export interface Config extends Message { * * @generated from field: string priv_key = 1; */ - privKey?: string + privKey?: string; /** * PubKey is the peer public key. * Ignored if priv_key is set. * * @generated from field: string pub_key = 2; */ - pubKey?: string + pubKey?: string; /** * PeerId is the peer identifier. * Ignored if priv_key or pub_key are set. @@ -39,15 +35,19 @@ export interface Config extends Message { * * @generated from field: string peer_id = 3; */ - peerId?: string -} + peerId?: string; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "peer.controller.Config", + fields: [ + { no: 1, name: "priv_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "pub_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const Config: MessageType = createMessageType({ - typeName: 'peer.controller.Config', - fields: [ - { no: 1, name: 'priv_key', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'pub_key', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 3, name: 'peer_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/peer/peer_pb.ts b/peer/peer.pb.ts similarity index 54% rename from peer/peer_pb.ts rename to peer/peer.pb.ts index 33c3c26d..2def8952 100644 --- a/peer/peer_pb.ts +++ b/peer/peer.pb.ts @@ -2,94 +2,92 @@ // @generated from file github.com/aperturerobotics/bifrost/peer/peer.proto (package peer, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import type { HashType } from '../hash/hash_pb.js' -import { HashType_Enum } from '../hash/hash_pb.js' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; +import type { HashType } from "../hash/hash.pb.js"; +import { HashType_Enum } from "../hash/hash.pb.js"; -export const protobufPackage = 'peer' +export const protobufPackage = "peer"; /** * Signature contains a signature by a peer. * * @generated from message peer.Signature */ -export interface Signature extends Message { +export type Signature = Message<{ /** * PubKey is the public key of the peer. * May be empty if the public key is to be inferred from context. * * @generated from field: bytes pub_key = 1; */ - pubKey?: Uint8Array + pubKey?: Uint8Array; /** * HashType is the hash type used to hash the data. * The signature is then of the hash bytes (usually 32). * * @generated from field: hash.HashType hash_type = 2; */ - hashType?: HashType + hashType?: HashType; /** * SigData contains the signature data. * The format is defined by the key type. * * @generated from field: bytes sig_data = 3; */ - sigData?: Uint8Array -} + sigData?: Uint8Array; -export const Signature: MessageType = createMessageType({ - typeName: 'peer.Signature', - fields: [ - { no: 1, name: 'pub_key', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, - { no: 2, name: 'hash_type', kind: 'enum', T: HashType_Enum }, - { no: 3, name: 'sig_data', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) +}>; + +export const Signature: MessageType = createMessageType( + { + typeName: "peer.Signature", + fields: [ + { no: 1, name: "pub_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 2, name: "hash_type", kind: "enum", T: HashType_Enum }, + { no: 3, name: "sig_data", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); /** * SignedMsg is a message from a peer with a signature. * * @generated from message peer.SignedMsg */ -export interface SignedMsg extends Message { +export type SignedMsg = Message<{ /** * FromPeerId is the peer identifier of the sender. * * @generated from field: string from_peer_id = 1; */ - fromPeerId?: string + fromPeerId?: string; /** * Signature is the sender signature. * Should not contain PubKey, which is inferred from peer id. * * @generated from field: peer.Signature signature = 2; */ - signature?: Signature + signature?: Signature; /** * Data is the signed data. * * @generated from field: bytes data = 3; */ - data?: Uint8Array -} + data?: Uint8Array; + +}>; + +export const SignedMsg: MessageType = createMessageType( + { + typeName: "peer.SignedMsg", + fields: [ + { no: 1, name: "from_peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "signature", kind: "message", T: () => Signature }, + { no: 3, name: "data", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const SignedMsg: MessageType = createMessageType({ - typeName: 'peer.SignedMsg', - fields: [ - { - no: 1, - name: 'from_peer_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { no: 2, name: 'signature', kind: 'message', T: Signature }, - { no: 3, name: 'data', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/pubsub/api/api_pb.ts b/pubsub/api/api.pb.ts similarity index 55% rename from pubsub/api/api_pb.ts rename to pubsub/api/api.pb.ts index 0cc8e02f..94eb43e8 100644 --- a/pubsub/api/api_pb.ts +++ b/pubsub/api/api.pb.ts @@ -2,56 +2,50 @@ // @generated from file github.com/aperturerobotics/bifrost/pubsub/api/api.proto (package pubsub.api, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; -export const protobufPackage = 'pubsub.api' +export const protobufPackage = "pubsub.api"; /** * PublishRequest is a message published via the subscribe channel. * * @generated from message pubsub.api.PublishRequest */ -export interface PublishRequest extends Message { +export type PublishRequest = Message<{ /** * Data is the published data. * * @generated from field: bytes data = 1; */ - data?: Uint8Array + data?: Uint8Array; /** * Identifier is a uint32 identifier to use for outgoing status. * If zero, no outgoing status response will be sent. * * @generated from field: uint32 identifier = 2; */ - identifier?: number -} - -export const PublishRequest: MessageType = createMessageType({ - typeName: 'pubsub.api.PublishRequest', - fields: [ - { no: 1, name: 'data', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, - { - no: 2, - name: 'identifier', - kind: 'scalar', - T: 13 /* ScalarType.UINT32 */, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) + identifier?: number; + +}>; + +export const PublishRequest: MessageType = createMessageType( + { + typeName: "pubsub.api.PublishRequest", + fields: [ + { no: 1, name: "data", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 2, name: "identifier", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); /** * SubcribeRequest is a pubsub subscription request message. * * @generated from message pubsub.api.SubscribeRequest */ -export interface SubscribeRequest extends Message { +export type SubscribeRequest = Message<{ /** * ChannelId is the channel id to subscribe to. * Must be sent before / with publish. @@ -59,193 +53,176 @@ export interface SubscribeRequest extends Message { * * @generated from field: string channel_id = 1; */ - channelId?: string + channelId?: string; /** * PeerId is the peer identifier of the publisher/subscriber. * The peer ID will be used to acquire the peer private key. * * @generated from field: string peer_id = 2; */ - peerId?: string + peerId?: string; /** * PrivKeyPem is an alternate to PeerId, specify private key inline. * Overrides PeerId if set. * * @generated from field: string priv_key_pem = 3; */ - privKeyPem?: string + privKeyPem?: string; /** * PublishRequest contains a publish message request. * * @generated from field: pubsub.api.PublishRequest publish_request = 4; */ - publishRequest?: PublishRequest -} + publishRequest?: PublishRequest; -export const SubscribeRequest: MessageType = - createMessageType({ - typeName: 'pubsub.api.SubscribeRequest', +}>; + +export const SubscribeRequest: MessageType = createMessageType( + { + typeName: "pubsub.api.SubscribeRequest", fields: [ - { - no: 1, - name: 'channel_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { no: 2, name: 'peer_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { - no: 3, - name: 'priv_key_pem', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { no: 4, name: 'publish_request', kind: 'message', T: PublishRequest }, + { no: 1, name: "channel_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "priv_key_pem", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "publish_request", kind: "message", T: () => PublishRequest }, ] as readonly PartialFieldInfo[], packedByDefault: true, - }) + }, +); /** * IncomingMessage implements Message with a proto object. * * @generated from message pubsub.api.IncomingMessage */ -export interface IncomingMessage extends Message { +export type IncomingMessage = Message<{ /** * FromPeerId is the peer identifier of the sender. * * @generated from field: string from_peer_id = 1; */ - fromPeerId?: string + fromPeerId?: string; /** * Authenticated indicates if the message is verified to be from the sender. * * @generated from field: bool authenticated = 2; */ - authenticated?: boolean + authenticated?: boolean; /** * Data is the inner data. * * @generated from field: bytes data = 3; */ - data?: Uint8Array -} - -export const IncomingMessage: MessageType = createMessageType({ - typeName: 'pubsub.api.IncomingMessage', - fields: [ - { - no: 1, - name: 'from_peer_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { - no: 2, - name: 'authenticated', - kind: 'scalar', - T: 8 /* ScalarType.BOOL */, - }, - { no: 3, name: 'data', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) + data?: Uint8Array; + +}>; + +export const IncomingMessage: MessageType = createMessageType( + { + typeName: "pubsub.api.IncomingMessage", + fields: [ + { no: 1, name: "from_peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "authenticated", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 3, name: "data", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); /** * OutgoingStatus is status of an outgoing message. * * @generated from message pubsub.api.OutgoingStatus */ -export interface OutgoingStatus extends Message { +export type OutgoingStatus = Message<{ /** * Identifier is the request-provided identifier for the message. * * @generated from field: uint32 identifier = 1; */ - identifier?: number + identifier?: number; /** * Sent indicates if the message was sent. * * @generated from field: bool sent = 2; */ - sent?: boolean -} - -export const OutgoingStatus: MessageType = createMessageType({ - typeName: 'pubsub.api.OutgoingStatus', - fields: [ - { - no: 1, - name: 'identifier', - kind: 'scalar', - T: 13 /* ScalarType.UINT32 */, - }, - { no: 2, name: 'sent', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) + sent?: boolean; + +}>; + +export const OutgoingStatus: MessageType = createMessageType( + { + typeName: "pubsub.api.OutgoingStatus", + fields: [ + { no: 1, name: "identifier", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 2, name: "sent", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); /** * SubscripionStatus is the status of the subscription handle. * * @generated from message pubsub.api.SubscriptionStatus */ -export interface SubscriptionStatus extends Message { +export type SubscriptionStatus = Message<{ /** * Subscribed indicates the subscription is established. * * @generated from field: bool subscribed = 1; */ - subscribed?: boolean -} + subscribed?: boolean; + +}>; -export const SubscriptionStatus: MessageType = - createMessageType({ - typeName: 'pubsub.api.SubscriptionStatus', +export const SubscriptionStatus: MessageType = createMessageType( + { + typeName: "pubsub.api.SubscriptionStatus", fields: [ - { no: 1, name: 'subscribed', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, + { no: 1, name: "subscribed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, ] as readonly PartialFieldInfo[], packedByDefault: true, - }) + }, +); /** * SubcribeResponse is a pubsub subscription response message. * * @generated from message pubsub.api.SubscribeResponse */ -export interface SubscribeResponse extends Message { +export type SubscribeResponse = Message<{ /** * IncomingMessage is an incoming message. * * @generated from field: pubsub.api.IncomingMessage incoming_message = 1; */ - incomingMessage?: IncomingMessage + incomingMessage?: IncomingMessage; /** * OutgoingStatus is status of an outgoing message. * Sent when a Publish request finishes. * * @generated from field: pubsub.api.OutgoingStatus outgoing_status = 2; */ - outgoingStatus?: OutgoingStatus + outgoingStatus?: OutgoingStatus; /** * SubscriptionStatus is the status of the subscription * * @generated from field: pubsub.api.SubscriptionStatus subscription_status = 3; */ - subscriptionStatus?: SubscriptionStatus -} + subscriptionStatus?: SubscriptionStatus; -export const SubscribeResponse: MessageType = - createMessageType({ - typeName: 'pubsub.api.SubscribeResponse', +}>; + +export const SubscribeResponse: MessageType = createMessageType( + { + typeName: "pubsub.api.SubscribeResponse", fields: [ - { no: 1, name: 'incoming_message', kind: 'message', T: IncomingMessage }, - { no: 2, name: 'outgoing_status', kind: 'message', T: OutgoingStatus }, - { - no: 3, - name: 'subscription_status', - kind: 'message', - T: SubscriptionStatus, - }, + { no: 1, name: "incoming_message", kind: "message", T: () => IncomingMessage }, + { no: 2, name: "outgoing_status", kind: "message", T: () => OutgoingStatus }, + { no: 3, name: "subscription_status", kind: "message", T: () => SubscriptionStatus }, ] as readonly PartialFieldInfo[], packedByDefault: true, - }) + }, +); + diff --git a/pubsub/api/api_srpc.pb.go b/pubsub/api/api_srpc.pb.go index 47135e9b..15cbf86c 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.31.6 +// protoc-gen-srpc version: v0.31.12 // source: github.com/aperturerobotics/bifrost/pubsub/api/api.proto package pubsub_api diff --git a/pubsub/api/api_srpc.pb.ts b/pubsub/api/api_srpc.pb.ts index b1080a68..92d44029 100644 --- a/pubsub/api/api_srpc.pb.ts +++ b/pubsub/api/api_srpc.pb.ts @@ -2,8 +2,8 @@ // @generated from file github.com/aperturerobotics/bifrost/pubsub/api/api.proto (package pubsub.api, syntax proto3) /* eslint-disable */ -import { SubscribeRequest, SubscribeResponse } from './api_pb.js' -import { MethodKind } from '@bufbuild/protobuf' +import { SubscribeRequest, SubscribeResponse } from './api.pb.js' +import { MethodKind } from '@aptre/protobuf-es-lite' import { buildDecodeMessageTransform, buildEncodeMessageTransform, diff --git a/pubsub/floodsub/controller/config.pb.ts b/pubsub/floodsub/controller/config.pb.ts new file mode 100644 index 00000000..8a0da053 --- /dev/null +++ b/pubsub/floodsub/controller/config.pb.ts @@ -0,0 +1,35 @@ +// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" +// @generated from file github.com/aperturerobotics/bifrost/pubsub/floodsub/controller/config.proto (package floodsub.controller, syntax proto3) +/* eslint-disable */ + +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; +import { Config as Config$1 } from "../floodsub.pb.js"; + +export const protobufPackage = "floodsub.controller"; + +/** + * Config is the floodsub controller config. + * + * @generated from message floodsub.controller.Config + */ +export type Config = Message<{ + /** + * FloodsubConfig are pubsub provider specific configuration variables. + * + * @generated from field: floodsub.Config floodsub_config = 1; + */ + floodsubConfig?: Config$1; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "floodsub.controller.Config", + fields: [ + { no: 1, name: "floodsub_config", kind: "message", T: () => Config$1 }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + diff --git a/pubsub/floodsub/controller/config_pb.ts b/pubsub/floodsub/controller/config_pb.ts deleted file mode 100644 index 97e42162..00000000 --- a/pubsub/floodsub/controller/config_pb.ts +++ /dev/null @@ -1,35 +0,0 @@ -// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" -// @generated from file github.com/aperturerobotics/bifrost/pubsub/floodsub/controller/config.proto (package floodsub.controller, syntax proto3) -/* eslint-disable */ - -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import { Config as Config$1 } from '../floodsub_pb.js' - -export const protobufPackage = 'floodsub.controller' - -/** - * Config is the floodsub controller config. - * - * @generated from message floodsub.controller.Config - */ -export interface Config extends Message { - /** - * FloodsubConfig are pubsub provider specific configuration variables. - * - * @generated from field: floodsub.Config floodsub_config = 1; - */ - floodsubConfig?: Config$1 -} - -export const Config: MessageType = createMessageType({ - typeName: 'floodsub.controller.Config', - fields: [ - { no: 1, name: 'floodsub_config', kind: 'message', T: Config$1 }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/pubsub/floodsub/floodsub.pb.ts b/pubsub/floodsub/floodsub.pb.ts new file mode 100644 index 00000000..9d520248 --- /dev/null +++ b/pubsub/floodsub/floodsub.pb.ts @@ -0,0 +1,102 @@ +// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" +// @generated from file github.com/aperturerobotics/bifrost/pubsub/floodsub/floodsub.proto (package floodsub, syntax proto3) +/* eslint-disable */ + +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; +import type { HashType } from "../../hash/hash.pb.js"; +import { HashType_Enum } from "../../hash/hash.pb.js"; +import { SignedMsg } from "../../peer/peer.pb.js"; + +export const protobufPackage = "floodsub"; + +/** + * Config configures the floodsub router. + * + * @generated from message floodsub.Config + */ +export type Config = Message<{ + /** + * PublishHashType is the hash type to use when signing published messages. + * Defaults to sha256 + * + * @generated from field: hash.HashType publish_hash_type = 1; + */ + publishHashType?: HashType; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "floodsub.Config", + fields: [ + { no: 1, name: "publish_hash_type", kind: "enum", T: HashType_Enum }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + +/** + * SubscriptionOpts are subscription options. + * + * @generated from message floodsub.SubscriptionOpts + */ +export type SubscriptionOpts = Message<{ + /** + * Subscribe indicates if we are subscribing to this channel ID. + * + * @generated from field: bool subscribe = 1; + */ + subscribe?: boolean; + /** + * ChannelId is the channel to subscribe to. + * + * @generated from field: string channel_id = 2; + */ + channelId?: string; + +}>; + +export const SubscriptionOpts: MessageType = createMessageType( + { + typeName: "floodsub.SubscriptionOpts", + fields: [ + { no: 1, name: "subscribe", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 2, name: "channel_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + +/** + * Packet is the floodsub packet. + * + * @generated from message floodsub.Packet + */ +export type Packet = Message<{ + /** + * Subscriptions contains any new subscription changes. + * + * @generated from field: repeated floodsub.SubscriptionOpts subscriptions = 1; + */ + subscriptions?: SubscriptionOpts[]; + /** + * Publish contains messages we are publishing. + * + * @generated from field: repeated peer.SignedMsg publish = 2; + */ + publish?: SignedMsg[]; + +}>; + +export const Packet: MessageType = createMessageType( + { + typeName: "floodsub.Packet", + fields: [ + { no: 1, name: "subscriptions", kind: "message", T: () => SubscriptionOpts, repeated: true }, + { no: 2, name: "publish", kind: "message", T: () => SignedMsg, repeated: true }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + diff --git a/pubsub/floodsub/floodsub_pb.ts b/pubsub/floodsub/floodsub_pb.ts deleted file mode 100644 index 303e1824..00000000 --- a/pubsub/floodsub/floodsub_pb.ts +++ /dev/null @@ -1,108 +0,0 @@ -// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" -// @generated from file github.com/aperturerobotics/bifrost/pubsub/floodsub/floodsub.proto (package floodsub, syntax proto3) -/* eslint-disable */ - -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import type { HashType } from '../../hash/hash_pb.js' -import { HashType_Enum } from '../../hash/hash_pb.js' -import { SignedMsg } from '../../peer/peer_pb.js' - -export const protobufPackage = 'floodsub' - -/** - * Config configures the floodsub router. - * - * @generated from message floodsub.Config - */ -export interface Config extends Message { - /** - * PublishHashType is the hash type to use when signing published messages. - * Defaults to sha256 - * - * @generated from field: hash.HashType publish_hash_type = 1; - */ - publishHashType?: HashType -} - -export const Config: MessageType = createMessageType({ - typeName: 'floodsub.Config', - fields: [ - { no: 1, name: 'publish_hash_type', kind: 'enum', T: HashType_Enum }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) - -/** - * SubscriptionOpts are subscription options. - * - * @generated from message floodsub.SubscriptionOpts - */ -export interface SubscriptionOpts extends Message { - /** - * Subscribe indicates if we are subscribing to this channel ID. - * - * @generated from field: bool subscribe = 1; - */ - subscribe?: boolean - /** - * ChannelId is the channel to subscribe to. - * - * @generated from field: string channel_id = 2; - */ - channelId?: string -} - -export const SubscriptionOpts: MessageType = - createMessageType({ - typeName: 'floodsub.SubscriptionOpts', - fields: [ - { no: 1, name: 'subscribe', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - { - no: 2, - name: 'channel_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, - }) - -/** - * Packet is the floodsub packet. - * - * @generated from message floodsub.Packet - */ -export interface Packet extends Message { - /** - * Subscriptions contains any new subscription changes. - * - * @generated from field: repeated floodsub.SubscriptionOpts subscriptions = 1; - */ - subscriptions?: SubscriptionOpts[] - /** - * Publish contains messages we are publishing. - * - * @generated from field: repeated peer.SignedMsg publish = 2; - */ - publish?: SignedMsg[] -} - -export const Packet: MessageType = createMessageType({ - typeName: 'floodsub.Packet', - fields: [ - { - no: 1, - name: 'subscriptions', - kind: 'message', - T: SubscriptionOpts, - repeated: true, - }, - { no: 2, name: 'publish', kind: 'message', T: SignedMsg, repeated: true }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/pubsub/nats/controller/config.pb.ts b/pubsub/nats/controller/config.pb.ts new file mode 100644 index 00000000..d1dcdaaa --- /dev/null +++ b/pubsub/nats/controller/config.pb.ts @@ -0,0 +1,44 @@ +// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" +// @generated from file github.com/aperturerobotics/bifrost/pubsub/nats/controller/config.proto (package nats.controller, syntax proto3) +/* eslint-disable */ + +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; +import { Config as Config$1 } from "../nats.pb.js"; + +export const protobufPackage = "nats.controller"; + +/** + * Config is the nats controller config. + * + * @generated from message nats.controller.Config + */ +export type Config = Message<{ + /** + * PeerID sets the peer ID to attach the server to. + * Must be set. + * If set to special value: "any" - binds to any peer. + * + * @generated from field: string peer_id = 1; + */ + peerId?: string; + /** + * NatsConfig configures nats. + * + * @generated from field: nats.Config nats_config = 2; + */ + natsConfig?: Config$1; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "nats.controller.Config", + fields: [ + { no: 1, name: "peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "nats_config", kind: "message", T: () => Config$1 }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + diff --git a/pubsub/nats/controller/config_pb.ts b/pubsub/nats/controller/config_pb.ts deleted file mode 100644 index f7232d1c..00000000 --- a/pubsub/nats/controller/config_pb.ts +++ /dev/null @@ -1,44 +0,0 @@ -// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" -// @generated from file github.com/aperturerobotics/bifrost/pubsub/nats/controller/config.proto (package nats.controller, syntax proto3) -/* eslint-disable */ - -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import { Config as Config$1 } from '../nats_pb.js' - -export const protobufPackage = 'nats.controller' - -/** - * Config is the nats controller config. - * - * @generated from message nats.controller.Config - */ -export interface Config extends Message { - /** - * PeerID sets the peer ID to attach the server to. - * Must be set. - * If set to special value: "any" - binds to any peer. - * - * @generated from field: string peer_id = 1; - */ - peerId?: string - /** - * NatsConfig configures nats. - * - * @generated from field: nats.Config nats_config = 2; - */ - natsConfig?: Config$1 -} - -export const Config: MessageType = createMessageType({ - typeName: 'nats.controller.Config', - fields: [ - { no: 1, name: 'peer_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'nats_config', kind: 'message', T: Config$1 }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/pubsub/nats/nats_pb.ts b/pubsub/nats/nats.pb.ts similarity index 59% rename from pubsub/nats/nats_pb.ts rename to pubsub/nats/nats.pb.ts index 0444443f..ee22b657 100644 --- a/pubsub/nats/nats_pb.ts +++ b/pubsub/nats/nats.pb.ts @@ -2,17 +2,12 @@ // @generated from file github.com/aperturerobotics/bifrost/pubsub/nats/nats.proto (package nats, syntax proto3) /* eslint-disable */ -import { - createEnumType, - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import type { HashType } from '../../hash/hash_pb.js' -import { HashType_Enum } from '../../hash/hash_pb.js' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createEnumType, createMessageType, Message } from "@aptre/protobuf-es-lite"; +import type { HashType } from "../../hash/hash.pb.js"; +import { HashType_Enum } from "../../hash/hash.pb.js"; -export const protobufPackage = 'nats' +export const protobufPackage = "nats"; /** * NatsConnType indicates the type of nats conn a stream represents. @@ -45,11 +40,11 @@ export enum NatsConnType { } // NatsConnType_Enum is the enum type for NatsConnType. -export const NatsConnType_Enum = createEnumType('nats.NatsConnType', [ - { no: 0, name: 'NatsConnType_UNKNOWN' }, - { no: 1, name: 'NatsConnType_CLIENT' }, - { no: 2, name: 'NatsConnType_ROUTER' }, -]) +export const NatsConnType_Enum = createEnumType("nats.NatsConnType", [ + { no: 0, name: "NatsConnType_UNKNOWN" }, + { no: 1, name: "NatsConnType_CLIENT" }, + { no: 2, name: "NatsConnType_ROUTER" }, +]); /** * Config configures the nats router, hosting a nats.io routing node. @@ -57,7 +52,7 @@ export const NatsConnType_Enum = createEnumType('nats.NatsConnType', [ * * @generated from message nats.Config */ -export interface Config extends Message { +export type Config = Message<{ /** * ClusterName is the cluster ID string to use. * This must be the same on all nodes. @@ -65,54 +60,48 @@ export interface Config extends Message { * * @generated from field: string cluster_name = 1; */ - clusterName?: string + clusterName?: string; /** * PublishHashType is the hash type to use when signing published messages. * Defaults to sha256 * * @generated from field: hash.HashType publish_hash_type = 2; */ - publishHashType?: HashType + publishHashType?: HashType; /** * LogDebug turns on extended debugging logging. * * @generated from field: bool log_debug = 3; */ - logDebug?: boolean + logDebug?: boolean; /** * LogTrace turns on tracing logging. * implies log_debug. * * @generated from field: bool log_trace = 4; */ - logTrace?: boolean + logTrace?: boolean; /** * LogTraceVrebose turns on verbose tracing logging. * Implies log_trace and log_debug. * * @generated from field: bool log_trace_verbose = 5; */ - logTraceVerbose?: boolean -} + logTraceVerbose?: boolean; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "nats.Config", + fields: [ + { no: 1, name: "cluster_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "publish_hash_type", kind: "enum", T: HashType_Enum }, + { no: 3, name: "log_debug", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 4, name: "log_trace", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 5, name: "log_trace_verbose", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const Config: MessageType = createMessageType({ - typeName: 'nats.Config', - fields: [ - { - no: 1, - name: 'cluster_name', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { no: 2, name: 'publish_hash_type', kind: 'enum', T: HashType_Enum }, - { no: 3, name: 'log_debug', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - { no: 4, name: 'log_trace', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - { - no: 5, - name: 'log_trace_verbose', - kind: 'scalar', - T: 8 /* ScalarType.BOOL */, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/pubsub/relay/config_pb.ts b/pubsub/relay/config.pb.ts similarity index 51% rename from pubsub/relay/config_pb.ts rename to pubsub/relay/config.pb.ts index 10d6fc1e..a46082d1 100644 --- a/pubsub/relay/config_pb.ts +++ b/pubsub/relay/config.pb.ts @@ -2,14 +2,10 @@ // @generated from file github.com/aperturerobotics/bifrost/pubsub/relay/config.proto (package pubsub.relay, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; -export const protobufPackage = 'pubsub.relay' +export const protobufPackage = "pubsub.relay"; /** * Config is the pubsub relay configuration. @@ -17,32 +13,30 @@ export const protobufPackage = 'pubsub.relay' * * @generated from message pubsub.relay.Config */ -export interface Config extends Message { +export type Config = Message<{ /** * PeerId is the peer ID to look up and use private key for. * * @generated from field: string peer_id = 1; */ - peerId?: string + peerId?: string; /** * TopicIds are the list of topic IDs to subscribe to. * * @generated from field: repeated string topic_ids = 2; */ - topicIds?: string[] -} + topicIds?: string[]; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "pubsub.relay.Config", + fields: [ + { no: 1, name: "peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "topic_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const Config: MessageType = createMessageType({ - typeName: 'pubsub.relay.Config', - fields: [ - { no: 1, name: 'peer_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { - no: 2, - name: 'topic_ids', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - repeated: true, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/pubsub/util/pubmessage/pubmessage_pb.ts b/pubsub/util/pubmessage/pubmessage.pb.ts similarity index 51% rename from pubsub/util/pubmessage/pubmessage_pb.ts rename to pubsub/util/pubmessage/pubmessage.pb.ts index 0f175676..be108fb3 100644 --- a/pubsub/util/pubmessage/pubmessage_pb.ts +++ b/pubsub/util/pubmessage/pubmessage.pb.ts @@ -2,48 +2,47 @@ // @generated from file github.com/aperturerobotics/bifrost/pubsub/util/pubmessage/pubmessage.proto (package pubmessage, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import { Timestamp } from '@bufbuild/protobuf' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message, Timestamp } from "@aptre/protobuf-es-lite"; -export const protobufPackage = 'pubmessage' +export const protobufPackage = "pubmessage"; /** * PubMessageInner is the signed inner portion of the message. * * @generated from message pubmessage.PubMessageInner */ -export interface PubMessageInner extends Message { +export type PubMessageInner = Message<{ /** * Data is the message data. * * @generated from field: bytes data = 1; */ - data?: Uint8Array + data?: Uint8Array; /** * Channel is the channel. * * @generated from field: string channel = 2; */ - channel?: string + channel?: string; /** * Timestamp is the message timestamp. * * @generated from field: google.protobuf.Timestamp timestamp = 3; */ - timestamp?: Timestamp -} + timestamp?: Timestamp; + +}>; + +export const PubMessageInner: MessageType = createMessageType( + { + typeName: "pubmessage.PubMessageInner", + fields: [ + { no: 1, name: "data", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 2, name: "channel", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "timestamp", kind: "message", T: () => Timestamp }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const PubMessageInner: MessageType = createMessageType({ - typeName: 'pubmessage.PubMessageInner', - fields: [ - { no: 1, name: 'data', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, - { no: 2, name: 'channel', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 3, name: 'timestamp', kind: 'message', T: Timestamp }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/rpc/access/access_pb.ts b/rpc/access/access.pb.ts similarity index 56% rename from rpc/access/access_pb.ts rename to rpc/access/access.pb.ts index c0ea31cd..7dc77049 100644 --- a/rpc/access/access_pb.ts +++ b/rpc/access/access.pb.ts @@ -2,91 +2,80 @@ // @generated from file github.com/aperturerobotics/bifrost/rpc/access/access.proto (package bifrost.rpc.access, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; -export const protobufPackage = 'bifrost.rpc.access' +export const protobufPackage = "bifrost.rpc.access"; /** * LookupRpcServiceRequest is a request to lookup an rpc service. * * @generated from message bifrost.rpc.access.LookupRpcServiceRequest */ -export interface LookupRpcServiceRequest - extends Message { +export type LookupRpcServiceRequest = Message<{ /** * ServiceId is the service identifier. * * @generated from field: string service_id = 1; */ - serviceId?: string + serviceId?: string; /** * ServerId is the identifier of the server requesting the service. * Can be empty. * * @generated from field: string server_id = 2; */ - serverId?: string -} + serverId?: string; -export const LookupRpcServiceRequest: MessageType = - createMessageType({ - typeName: 'bifrost.rpc.access.LookupRpcServiceRequest', +}>; + +export const LookupRpcServiceRequest: MessageType = createMessageType( + { + typeName: "bifrost.rpc.access.LookupRpcServiceRequest", fields: [ - { - no: 1, - name: 'service_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { - no: 2, - name: 'server_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, + { no: 1, name: "service_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "server_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ] as readonly PartialFieldInfo[], packedByDefault: true, - }) + }, +); /** * LookupRpcServiceResponse is a response to LookupRpcService * * @generated from message bifrost.rpc.access.LookupRpcServiceResponse */ -export interface LookupRpcServiceResponse - extends Message { +export type LookupRpcServiceResponse = Message<{ /** * Idle indicates the directive is now idle. * * @generated from field: bool idle = 1; */ - idle?: boolean + idle?: boolean; /** * Exists indicates we found the service on the remote. * * @generated from field: bool exists = 2; */ - exists?: boolean + exists?: boolean; /** * Removed indicates the value no longer exists. * * @generated from field: bool removed = 3; */ - removed?: boolean -} + removed?: boolean; + +}>; -export const LookupRpcServiceResponse: MessageType = - createMessageType({ - typeName: 'bifrost.rpc.access.LookupRpcServiceResponse', +export const LookupRpcServiceResponse: MessageType = createMessageType( + { + typeName: "bifrost.rpc.access.LookupRpcServiceResponse", fields: [ - { no: 1, name: 'idle', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: 'exists', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - { no: 3, name: 'removed', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, + { no: 1, name: "idle", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 2, name: "exists", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 3, name: "removed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, ] as readonly PartialFieldInfo[], packedByDefault: true, - }) + }, +); + diff --git a/rpc/access/access_srpc.pb.go b/rpc/access/access_srpc.pb.go index e5fdc020..29025db2 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.31.6 +// protoc-gen-srpc version: v0.31.12 // source: github.com/aperturerobotics/bifrost/rpc/access/access.proto package bifrost_rpc_access diff --git a/rpc/access/access_srpc.pb.ts b/rpc/access/access_srpc.pb.ts index cc92c877..8d21e2a4 100644 --- a/rpc/access/access_srpc.pb.ts +++ b/rpc/access/access_srpc.pb.ts @@ -5,10 +5,9 @@ import { LookupRpcServiceRequest, LookupRpcServiceResponse, -} from './access_pb.js' -import { MethodKind } from '@bufbuild/protobuf' -import { RpcStreamPacket } from '@go/github.com/aperturerobotics/starpc/rpcstream/rpcstream_pb.js' -import { Message } from '@aptre/protobuf-es-lite' +} from './access.pb.js' +import { Message, MethodKind } from '@aptre/protobuf-es-lite' +import { RpcStreamPacket } from '@go/github.com/aperturerobotics/starpc/rpcstream/rpcstream.pb.js' import { buildDecodeMessageTransform, buildEncodeMessageTransform, diff --git a/signaling/echo/echo.pb.ts b/signaling/echo/echo.pb.ts new file mode 100644 index 00000000..556e812e --- /dev/null +++ b/signaling/echo/echo.pb.ts @@ -0,0 +1,35 @@ +// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" +// @generated from file github.com/aperturerobotics/bifrost/signaling/echo/echo.proto (package signaling.echo, syntax proto3) +/* eslint-disable */ + +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; + +export const protobufPackage = "signaling.echo"; + +/** + * Config configures the echo controller. + * + * @generated from message signaling.echo.Config + */ +export type Config = Message<{ + /** + * SignalingId is the incoming signaling ID to handle and echo messages. + * Cannot be empty. + * + * @generated from field: string signaling_id = 1; + */ + signalingId?: string; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "signaling.echo.Config", + fields: [ + { no: 1, name: "signaling_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + diff --git a/signaling/echo/echo_pb.ts b/signaling/echo/echo_pb.ts deleted file mode 100644 index f42683f7..00000000 --- a/signaling/echo/echo_pb.ts +++ /dev/null @@ -1,40 +0,0 @@ -// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" -// @generated from file github.com/aperturerobotics/bifrost/signaling/echo/echo.proto (package signaling.echo, syntax proto3) -/* eslint-disable */ - -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' - -export const protobufPackage = 'signaling.echo' - -/** - * Config configures the echo controller. - * - * @generated from message signaling.echo.Config - */ -export interface Config extends Message { - /** - * SignalingId is the incoming signaling ID to handle and echo messages. - * Cannot be empty. - * - * @generated from field: string signaling_id = 1; - */ - signalingId?: string -} - -export const Config: MessageType = createMessageType({ - typeName: 'signaling.echo.Config', - fields: [ - { - no: 1, - name: 'signaling_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/signaling/rpc/client/config_pb.ts b/signaling/rpc/client/config.pb.ts similarity index 57% rename from signaling/rpc/client/config_pb.ts rename to signaling/rpc/client/config.pb.ts index f500cee2..7192277c 100644 --- a/signaling/rpc/client/config_pb.ts +++ b/signaling/rpc/client/config.pb.ts @@ -2,65 +2,61 @@ // @generated from file github.com/aperturerobotics/bifrost/signaling/rpc/client/config.proto (package signaling.rpc.client, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import { Config as Config$1 } from '../../../stream/srpc/client/client_pb.js' -import { Backoff } from '@go/github.com/aperturerobotics/util/backoff/backoff_pb.js' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; +import { Config as Config$1 } from "../../../stream/srpc/client/client.pb.js"; +import { Backoff } from "../../../../util/backoff/backoff.pb.js"; -export const protobufPackage = 'signaling.rpc.client' +export const protobufPackage = "signaling.rpc.client"; /** * Config configures a client for the Signaling SRPC service. * * @generated from message signaling.rpc.client.Config */ -export interface Config extends Message { +export type Config = Message<{ /** * SignalingId is the signaling channel ID. * Filters which SignalPeer directives will be handled. * * @generated from field: string signaling_id = 1; */ - signalingId?: string + signalingId?: string; /** * PeerId is the local peer id to use for the client. * Can be empty to use any local peer. * * @generated from field: string peer_id = 2; */ - peerId?: string + peerId?: string; /** * Client contains srpc.client configuration for the signaling RPC client. * The local peer ID is overridden with the peer ID of the looked-up peer. * * @generated from field: stream.srpc.client.Config client = 3; */ - client?: Config$1 + client?: Config$1; /** * ProtocolId overrides the default protocol id for the signaling client. * Default: bifrost/signaling * * @generated from field: string protocol_id = 4; */ - protocolId?: string + protocolId?: string; /** * ServiceId overrides the default service id for the signaling client. * Default: signaling.rpc.Signaling * * @generated from field: string service_id = 5; */ - serviceId?: string + serviceId?: string; /** * Backoff is the backoff config for connecting to the service. * If unset, defaults to reasonable defaults. * * @generated from field: backoff.Backoff backoff = 6; */ - backoff?: Backoff + backoff?: Backoff; /** * DisableListen disables listening for incoming sessions. * If set, we will only call out, not accept incoming sessions. @@ -68,34 +64,23 @@ export interface Config extends Message { * * @generated from field: bool disable_listen = 7; */ - disableListen?: boolean -} + disableListen?: boolean; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "signaling.rpc.client.Config", + fields: [ + { no: 1, name: "signaling_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "client", kind: "message", T: () => Config$1 }, + { no: 4, name: "protocol_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "service_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "backoff", kind: "message", T: () => Backoff }, + { no: 7, name: "disable_listen", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const Config: MessageType = createMessageType({ - typeName: 'signaling.rpc.client.Config', - fields: [ - { - no: 1, - name: 'signaling_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { no: 2, name: 'peer_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 3, name: 'client', kind: 'message', T: Config$1 }, - { - no: 4, - name: 'protocol_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { no: 5, name: 'service_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 6, name: 'backoff', kind: 'message', T: Backoff }, - { - no: 7, - name: 'disable_listen', - kind: 'scalar', - T: 8 /* ScalarType.BOOL */, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/signaling/rpc/server/server.pb.ts b/signaling/rpc/server/server.pb.ts new file mode 100644 index 00000000..2ef44522 --- /dev/null +++ b/signaling/rpc/server/server.pb.ts @@ -0,0 +1,35 @@ +// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" +// @generated from file github.com/aperturerobotics/bifrost/signaling/rpc/server/server.proto (package signaling.rpc.server, syntax proto3) +/* eslint-disable */ + +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; +import { Config as Config$1 } from "../../../stream/srpc/server/server.pb.js"; + +export const protobufPackage = "signaling.rpc.server"; + +/** + * Config is the configuration for the Signaling RPC server. + * + * @generated from message signaling.rpc.server.Config + */ +export type Config = Message<{ + /** + * Server configures the peer ids and protocol ids to listen on. + * + * @generated from field: stream.srpc.server.Config server = 1; + */ + server?: Config$1; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "signaling.rpc.server.Config", + fields: [ + { no: 1, name: "server", kind: "message", T: () => Config$1 }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + diff --git a/signaling/rpc/server/server_pb.ts b/signaling/rpc/server/server_pb.ts deleted file mode 100644 index c7f8f553..00000000 --- a/signaling/rpc/server/server_pb.ts +++ /dev/null @@ -1,35 +0,0 @@ -// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" -// @generated from file github.com/aperturerobotics/bifrost/signaling/rpc/server/server.proto (package signaling.rpc.server, syntax proto3) -/* eslint-disable */ - -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import { Config as Config$1 } from '../../../stream/srpc/server/server_pb.js' - -export const protobufPackage = 'signaling.rpc.server' - -/** - * Config is the configuration for the Signaling RPC server. - * - * @generated from message signaling.rpc.server.Config - */ -export interface Config extends Message { - /** - * Server configures the peer ids and protocol ids to listen on. - * - * @generated from field: stream.srpc.server.Config server = 1; - */ - server?: Config$1 -} - -export const Config: MessageType = createMessageType({ - typeName: 'signaling.rpc.server.Config', - fields: [ - { no: 1, name: 'server', kind: 'message', T: Config$1 }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/signaling/rpc/signaling.pb.ts b/signaling/rpc/signaling.pb.ts new file mode 100644 index 00000000..9d10b4b8 --- /dev/null +++ b/signaling/rpc/signaling.pb.ts @@ -0,0 +1,290 @@ +// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" +// @generated from file github.com/aperturerobotics/bifrost/signaling/rpc/signaling.proto (package signaling.rpc, syntax proto3) +/* eslint-disable */ + +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; +import { SignedMsg } from "../../peer/peer.pb.js"; + +export const protobufPackage = "signaling.rpc"; + +/** + * ListenRequest is the body of the Listen request. + * + * @generated from message signaling.rpc.ListenRequest + */ +export type ListenRequest = Message<{ + +}>; + +export const ListenRequest: MessageType = createMessageType( + { + typeName: "signaling.rpc.ListenRequest", + fields: [ + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + +/** + * ListenResponse is a message sent in a stream in response to Listen. + * + * @generated from message signaling.rpc.ListenResponse + */ +export type ListenResponse = Message<{ + + /** + * Body is the body of the response. + * + * @generated from oneof signaling.rpc.ListenResponse.body + */ + body?: { + value?: undefined, + case: undefined + } | { + /** + * SetPeer marks that a remote peer wants a session. + * The contents of the string is the encoded peer id of the remote peer. + * + * @generated from field: string set_peer = 1; + */ + value: string; + case: "setPeer"; + } | { + /** + * ClearPeer marks that a remote peer no longer wants a session. + * The contents of the string is the encoded peer id of the remote peer. + * + * @generated from field: string clear_peer = 2; + */ + value: string; + case: "clearPeer"; + }; + +}>; + +export const ListenResponse: MessageType = createMessageType( + { + typeName: "signaling.rpc.ListenResponse", + fields: [ + { no: 1, name: "set_peer", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "body" }, + { no: 2, name: "clear_peer", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "body" }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + +/** + * SessionInit is a message to init a Session. + * + * @generated from message signaling.rpc.SessionInit + */ +export type SessionInit = Message<{ + /** + * PeerId is the remote peer id we want to contact. + * + * @generated from field: string peer_id = 1; + */ + peerId?: string; + +}>; + +export const SessionInit: MessageType = createMessageType( + { + typeName: "signaling.rpc.SessionInit", + fields: [ + { no: 1, name: "peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + +/** + * SessionMsg contains a signed message and a sequence number. + * + * @generated from message signaling.rpc.SessionMsg + */ +export type SessionMsg = Message<{ + /** + * SignedMsg is the signed message body. + * + * @generated from field: peer.SignedMsg signed_msg = 1; + */ + signedMsg?: SignedMsg; + /** + * Seqno is the message sequence number for clear and ack. + * + * @generated from field: uint64 seqno = 2; + */ + seqno?: bigint; + +}>; + +export const SessionMsg: MessageType = createMessageType( + { + typeName: "signaling.rpc.SessionMsg", + fields: [ + { no: 1, name: "signed_msg", kind: "message", T: () => SignedMsg }, + { no: 2, name: "seqno", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + +/** + * SessionRequest is a message sent from the client to the server. + * + * @generated from message signaling.rpc.SessionRequest + */ +export type SessionRequest = Message<{ + /** + * SessionSeqno is the session sequence number. + * If this doesn't match the current session no, this pkt will be dropped. + * This should be zero for the init packet. + * + * @generated from field: uint64 session_seqno = 1; + */ + sessionSeqno?: bigint; + + /** + * Body is the body of the request. + * + * @generated from oneof signaling.rpc.SessionRequest.body + */ + body?: { + value?: undefined, + case: undefined + } | { + /** + * Init initializes the session setting which peer to contact. + * + * @generated from field: signaling.rpc.SessionInit init = 2; + */ + value: SessionInit; + case: "init"; + } | { + /** + * SendMsg sends a signed message to the remote peer. + * The server will buffer at most one message for the remote peer at a time. + * If there is an existing pending outgoing message this will overwrite it. + * Wait for the message received ack before sending again to avoid overwriting. + * The signature must match the peer id associated with the rpc session. + * + * @generated from field: signaling.rpc.SessionMsg send_msg = 3; + */ + value: SessionMsg; + case: "sendMsg"; + } | { + /** + * ClearMsg clears a previously sent message from the outbox. + * If the sequence number does not match, does nothing. + * + * @generated from field: uint64 clear_msg = 4; + */ + value: bigint; + case: "clearMsg"; + } | { + /** + * AckMsg acknowledges that the current incoming message was processed. + * If the id doesn't match the current incoming message seqno, does nothing. + * + * @generated from field: uint64 ack_msg = 5; + */ + value: bigint; + case: "ackMsg"; + }; + +}>; + +export const SessionRequest: MessageType = createMessageType( + { + typeName: "signaling.rpc.SessionRequest", + fields: [ + { no: 1, name: "session_seqno", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 2, name: "init", kind: "message", T: () => SessionInit, oneof: "body" }, + { no: 3, name: "send_msg", kind: "message", T: () => SessionMsg, oneof: "body" }, + { no: 4, name: "clear_msg", kind: "scalar", T: 4 /* ScalarType.UINT64 */, oneof: "body" }, + { no: 5, name: "ack_msg", kind: "scalar", T: 4 /* ScalarType.UINT64 */, oneof: "body" }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + +/** + * SessionResponse is a message sent from the server to the client. + * + * @generated from message signaling.rpc.SessionResponse + */ +export type SessionResponse = Message<{ + + /** + * Body is the body of the request. + * + * @generated from oneof signaling.rpc.SessionResponse.body + */ + body?: { + value?: undefined, + case: undefined + } | { + /** + * Opened indicates the connection w/ the remote peer is open. + * Contains the session nonce, incremented if the peer re-connected. + * If this increments, re-send the outgoing message. + * + * @generated from field: uint64 opened = 1; + */ + value: bigint; + case: "opened"; + } | { + /** + * Closed indicates the connection w/ the remote peer is closed. + * This is the assumed initial state. + * + * @generated from field: bool closed = 2; + */ + value: boolean; + case: "closed"; + } | { + /** + * RecvMsg transfers a message sent by the remote peer. + * Send ACK once the message has been processed. + * + * @generated from field: signaling.rpc.SessionMsg recv_msg = 3; + */ + value: SessionMsg; + case: "recvMsg"; + } | { + /** + * ClearMsg clears a message from the remote peer previously sent with recv_msg. + * This is sent if the remote peer clears their outgoing message before acked. + * + * @generated from field: uint64 clear_msg = 4; + */ + value: bigint; + case: "clearMsg"; + } | { + /** + * AckMsg confirms that the outgoing message was sent and acked. + * + * @generated from field: uint64 ack_msg = 5; + */ + value: bigint; + case: "ackMsg"; + }; + +}>; + +export const SessionResponse: MessageType = createMessageType( + { + typeName: "signaling.rpc.SessionResponse", + fields: [ + { no: 1, name: "opened", kind: "scalar", T: 4 /* ScalarType.UINT64 */, oneof: "body" }, + { no: 2, name: "closed", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "body" }, + { no: 3, name: "recv_msg", kind: "message", T: () => SessionMsg, oneof: "body" }, + { no: 4, name: "clear_msg", kind: "scalar", T: 4 /* ScalarType.UINT64 */, oneof: "body" }, + { no: 5, name: "ack_msg", kind: "scalar", T: 4 /* ScalarType.UINT64 */, oneof: "body" }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + diff --git a/signaling/rpc/signaling_pb.ts b/signaling/rpc/signaling_pb.ts deleted file mode 100644 index fe140a30..00000000 --- a/signaling/rpc/signaling_pb.ts +++ /dev/null @@ -1,338 +0,0 @@ -// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" -// @generated from file github.com/aperturerobotics/bifrost/signaling/rpc/signaling.proto (package signaling.rpc, syntax proto3) -/* eslint-disable */ - -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import { SignedMsg } from '../../peer/peer_pb.js' - -export const protobufPackage = 'signaling.rpc' - -/** - * ListenRequest is the body of the Listen request. - * - * @generated from message signaling.rpc.ListenRequest - */ -export interface ListenRequest extends Message {} - -export const ListenRequest: MessageType = createMessageType({ - typeName: 'signaling.rpc.ListenRequest', - fields: [] as readonly PartialFieldInfo[], - packedByDefault: true, -}) - -/** - * ListenResponse is a message sent in a stream in response to Listen. - * - * @generated from message signaling.rpc.ListenResponse - */ -export interface ListenResponse extends Message { - /** - * Body is the body of the response. - * - * @generated from oneof signaling.rpc.ListenResponse.body - */ - body?: - | { - value?: undefined - case: undefined - } - | { - /** - * SetPeer marks that a remote peer wants a session. - * The contents of the string is the encoded peer id of the remote peer. - * - * @generated from field: string set_peer = 1; - */ - value: string - case: 'setPeer' - } - | { - /** - * ClearPeer marks that a remote peer no longer wants a session. - * The contents of the string is the encoded peer id of the remote peer. - * - * @generated from field: string clear_peer = 2; - */ - value: string - case: 'clearPeer' - } -} - -export const ListenResponse: MessageType = createMessageType({ - typeName: 'signaling.rpc.ListenResponse', - fields: [ - { - no: 1, - name: 'set_peer', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - oneof: 'body', - }, - { - no: 2, - name: 'clear_peer', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - oneof: 'body', - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) - -/** - * SessionInit is a message to init a Session. - * - * @generated from message signaling.rpc.SessionInit - */ -export interface SessionInit extends Message { - /** - * PeerId is the remote peer id we want to contact. - * - * @generated from field: string peer_id = 1; - */ - peerId?: string -} - -export const SessionInit: MessageType = createMessageType({ - typeName: 'signaling.rpc.SessionInit', - fields: [ - { no: 1, name: 'peer_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) - -/** - * SessionMsg contains a signed message and a sequence number. - * - * @generated from message signaling.rpc.SessionMsg - */ -export interface SessionMsg extends Message { - /** - * SignedMsg is the signed message body. - * - * @generated from field: peer.SignedMsg signed_msg = 1; - */ - signedMsg?: SignedMsg - /** - * Seqno is the message sequence number for clear and ack. - * - * @generated from field: uint64 seqno = 2; - */ - seqno?: bigint -} - -export const SessionMsg: MessageType = createMessageType({ - typeName: 'signaling.rpc.SessionMsg', - fields: [ - { no: 1, name: 'signed_msg', kind: 'message', T: SignedMsg }, - { no: 2, name: 'seqno', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) - -/** - * SessionRequest is a message sent from the client to the server. - * - * @generated from message signaling.rpc.SessionRequest - */ -export interface SessionRequest extends Message { - /** - * SessionSeqno is the session sequence number. - * If this doesn't match the current session no, this pkt will be dropped. - * This should be zero for the init packet. - * - * @generated from field: uint64 session_seqno = 1; - */ - sessionSeqno?: bigint - - /** - * Body is the body of the request. - * - * @generated from oneof signaling.rpc.SessionRequest.body - */ - body?: - | { - value?: undefined - case: undefined - } - | { - /** - * Init initializes the session setting which peer to contact. - * - * @generated from field: signaling.rpc.SessionInit init = 2; - */ - value: SessionInit - case: 'init' - } - | { - /** - * SendMsg sends a signed message to the remote peer. - * The server will buffer at most one message for the remote peer at a time. - * If there is an existing pending outgoing message this will overwrite it. - * Wait for the message received ack before sending again to avoid overwriting. - * The signature must match the peer id associated with the rpc session. - * - * @generated from field: signaling.rpc.SessionMsg send_msg = 3; - */ - value: SessionMsg - case: 'sendMsg' - } - | { - /** - * ClearMsg clears a previously sent message from the outbox. - * If the sequence number does not match, does nothing. - * - * @generated from field: uint64 clear_msg = 4; - */ - value: bigint - case: 'clearMsg' - } - | { - /** - * AckMsg acknowledges that the current incoming message was processed. - * If the id doesn't match the current incoming message seqno, does nothing. - * - * @generated from field: uint64 ack_msg = 5; - */ - value: bigint - case: 'ackMsg' - } -} - -export const SessionRequest: MessageType = createMessageType({ - typeName: 'signaling.rpc.SessionRequest', - fields: [ - { - no: 1, - name: 'session_seqno', - kind: 'scalar', - T: 4 /* ScalarType.UINT64 */, - }, - { no: 2, name: 'init', kind: 'message', T: SessionInit, oneof: 'body' }, - { no: 3, name: 'send_msg', kind: 'message', T: SessionMsg, oneof: 'body' }, - { - no: 4, - name: 'clear_msg', - kind: 'scalar', - T: 4 /* ScalarType.UINT64 */, - oneof: 'body', - }, - { - no: 5, - name: 'ack_msg', - kind: 'scalar', - T: 4 /* ScalarType.UINT64 */, - oneof: 'body', - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) - -/** - * SessionResponse is a message sent from the server to the client. - * - * @generated from message signaling.rpc.SessionResponse - */ -export interface SessionResponse extends Message { - /** - * Body is the body of the request. - * - * @generated from oneof signaling.rpc.SessionResponse.body - */ - body?: - | { - value?: undefined - case: undefined - } - | { - /** - * Opened indicates the connection w/ the remote peer is open. - * Contains the session nonce, incremented if the peer re-connected. - * If this increments, re-send the outgoing message. - * - * @generated from field: uint64 opened = 1; - */ - value: bigint - case: 'opened' - } - | { - /** - * Closed indicates the connection w/ the remote peer is closed. - * This is the assumed initial state. - * - * @generated from field: bool closed = 2; - */ - value: boolean - case: 'closed' - } - | { - /** - * RecvMsg transfers a message sent by the remote peer. - * Send ACK once the message has been processed. - * - * @generated from field: signaling.rpc.SessionMsg recv_msg = 3; - */ - value: SessionMsg - case: 'recvMsg' - } - | { - /** - * ClearMsg clears a message from the remote peer previously sent with recv_msg. - * This is sent if the remote peer clears their outgoing message before acked. - * - * @generated from field: uint64 clear_msg = 4; - */ - value: bigint - case: 'clearMsg' - } - | { - /** - * AckMsg confirms that the outgoing message was sent and acked. - * - * @generated from field: uint64 ack_msg = 5; - */ - value: bigint - case: 'ackMsg' - } -} - -export const SessionResponse: MessageType = createMessageType({ - typeName: 'signaling.rpc.SessionResponse', - fields: [ - { - no: 1, - name: 'opened', - kind: 'scalar', - T: 4 /* ScalarType.UINT64 */, - oneof: 'body', - }, - { - no: 2, - name: 'closed', - kind: 'scalar', - T: 8 /* ScalarType.BOOL */, - oneof: 'body', - }, - { no: 3, name: 'recv_msg', kind: 'message', T: SessionMsg, oneof: 'body' }, - { - no: 4, - name: 'clear_msg', - kind: 'scalar', - T: 4 /* ScalarType.UINT64 */, - oneof: 'body', - }, - { - no: 5, - name: 'ack_msg', - kind: 'scalar', - T: 4 /* ScalarType.UINT64 */, - oneof: 'body', - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/signaling/rpc/signaling_srpc.pb.go b/signaling/rpc/signaling_srpc.pb.go index 90c3ea85..798831dd 100644 --- a/signaling/rpc/signaling_srpc.pb.go +++ b/signaling/rpc/signaling_srpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-srpc. DO NOT EDIT. -// protoc-gen-srpc version: v0.31.6 +// protoc-gen-srpc version: v0.31.12 // source: github.com/aperturerobotics/bifrost/signaling/rpc/signaling.proto package signaling_rpc diff --git a/signaling/rpc/signaling_srpc.pb.ts b/signaling/rpc/signaling_srpc.pb.ts index 6bdf4de8..4cf8c1af 100644 --- a/signaling/rpc/signaling_srpc.pb.ts +++ b/signaling/rpc/signaling_srpc.pb.ts @@ -7,9 +7,8 @@ import { ListenResponse, SessionRequest, SessionResponse, -} from './signaling_pb.js' -import { MethodKind } from '@bufbuild/protobuf' -import { Message } from '@aptre/protobuf-es-lite' +} from './signaling.pb.js' +import { Message, MethodKind } from '@aptre/protobuf-es-lite' import { buildDecodeMessageTransform, buildEncodeMessageTransform, diff --git a/stream/api/accept/accept_pb.ts b/stream/api/accept/accept.pb.ts similarity index 50% rename from stream/api/accept/accept_pb.ts rename to stream/api/accept/accept.pb.ts index 28bbc7c5..ad046c21 100644 --- a/stream/api/accept/accept_pb.ts +++ b/stream/api/accept/accept.pb.ts @@ -2,78 +2,57 @@ // @generated from file github.com/aperturerobotics/bifrost/stream/api/accept/accept.proto (package stream.api.accept, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; -export const protobufPackage = 'stream.api.accept' +export const protobufPackage = "stream.api.accept"; /** * Config configures the accept controller. * * @generated from message stream.api.accept.Config */ -export interface Config extends Message { +export type Config = Message<{ /** * LocalPeerId is the peer ID to accept incoming connections with. * Can be empty to accept any peer. * * @generated from field: string local_peer_id = 1; */ - localPeerId?: string + localPeerId?: string; /** * RemotePeerIds are peer IDs to accept incoming connections from. * Can be empty to accept any remote peer IDs. * * @generated from field: repeated string remote_peer_ids = 2; */ - remotePeerIds?: string[] + remotePeerIds?: string[]; /** * ProtocolId is the protocol ID to accept. * * @generated from field: string protocol_id = 3; */ - protocolId?: string + protocolId?: string; /** * TransportId constrains the transport ID to accept from. * Can be empty. * * @generated from field: uint64 transport_id = 4; */ - transportId?: bigint -} + transportId?: bigint; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "stream.api.accept.Config", + fields: [ + { no: 1, name: "local_peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "remote_peer_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 3, name: "protocol_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "transport_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const Config: MessageType = createMessageType({ - typeName: 'stream.api.accept.Config', - fields: [ - { - no: 1, - name: 'local_peer_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { - no: 2, - name: 'remote_peer_ids', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - repeated: true, - }, - { - no: 3, - name: 'protocol_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { - no: 4, - name: 'transport_id', - kind: 'scalar', - T: 4 /* ScalarType.UINT64 */, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/stream/api/api_pb.ts b/stream/api/api.pb.ts similarity index 55% rename from stream/api/api_pb.ts rename to stream/api/api.pb.ts index 8d05fc49..98e7c988 100644 --- a/stream/api/api_pb.ts +++ b/stream/api/api.pb.ts @@ -2,225 +2,227 @@ // @generated from file github.com/aperturerobotics/bifrost/stream/api/api.proto (package stream.api, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import { Config } from '../forwarding/forwarding_pb.js' -import type { ControllerStatus } from '@go/github.com/aperturerobotics/controllerbus/controller/exec/exec_pb.js' -import { ControllerStatus_Enum } from '@go/github.com/aperturerobotics/controllerbus/controller/exec/exec_pb.js' -import { Config as Config$1 } from '../listening/listening_pb.js' -import { Config as Config$2 } from './accept/accept_pb.js' -import { Data } from './rpc/rpc_pb.js' -import { Config as Config$3 } from './dial/dial_pb.js' - -export const protobufPackage = 'stream.api' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; +import { Config } from "../forwarding/forwarding.pb.js"; +import type { ControllerStatus } from "../../../controllerbus/controller/exec/exec.pb.js"; +import { ControllerStatus_Enum } from "../../../controllerbus/controller/exec/exec.pb.js"; +import { Config as Config$1 } from "../listening/listening.pb.js"; +import { Config as Config$2 } from "./accept/accept.pb.js"; +import { Data } from "./rpc/rpc.pb.js"; +import { Config as Config$3 } from "./dial/dial.pb.js"; + +export const protobufPackage = "stream.api"; /** * ForwardStreamsRequest is the request type for ForwardStreams. * * @generated from message stream.api.ForwardStreamsRequest */ -export interface ForwardStreamsRequest extends Message { +export type ForwardStreamsRequest = Message<{ /** * @generated from field: stream.forwarding.Config forwarding_config = 1; */ - forwardingConfig?: Config -} + forwardingConfig?: Config; -export const ForwardStreamsRequest: MessageType = - createMessageType({ - typeName: 'stream.api.ForwardStreamsRequest', +}>; + +export const ForwardStreamsRequest: MessageType = createMessageType( + { + typeName: "stream.api.ForwardStreamsRequest", fields: [ - { no: 1, name: 'forwarding_config', kind: 'message', T: Config }, + { no: 1, name: "forwarding_config", kind: "message", T: () => Config }, ] as readonly PartialFieldInfo[], packedByDefault: true, - }) + }, +); /** * ForwardStreamsResponse is the response type for ForwardStreams. * * @generated from message stream.api.ForwardStreamsResponse */ -export interface ForwardStreamsResponse - extends Message { +export type ForwardStreamsResponse = Message<{ /** * ControllerStatus is the status of the forwarding controller. * * @generated from field: controller.exec.ControllerStatus controller_status = 1; */ - controllerStatus?: ControllerStatus -} + controllerStatus?: ControllerStatus; + +}>; -export const ForwardStreamsResponse: MessageType = - createMessageType({ - typeName: 'stream.api.ForwardStreamsResponse', +export const ForwardStreamsResponse: MessageType = createMessageType( + { + typeName: "stream.api.ForwardStreamsResponse", fields: [ - { - no: 1, - name: 'controller_status', - kind: 'enum', - T: ControllerStatus_Enum, - }, + { no: 1, name: "controller_status", kind: "enum", T: ControllerStatus_Enum }, ] as readonly PartialFieldInfo[], packedByDefault: true, - }) + }, +); /** * ListenStreamsRequest is the request type for ListenStreams. * * @generated from message stream.api.ListenStreamsRequest */ -export interface ListenStreamsRequest extends Message { +export type ListenStreamsRequest = Message<{ /** * @generated from field: stream.listening.Config listening_config = 1; */ - listeningConfig?: Config$1 -} + listeningConfig?: Config$1; + +}>; -export const ListenStreamsRequest: MessageType = - createMessageType({ - typeName: 'stream.api.ListenStreamsRequest', +export const ListenStreamsRequest: MessageType = createMessageType( + { + typeName: "stream.api.ListenStreamsRequest", fields: [ - { no: 1, name: 'listening_config', kind: 'message', T: Config$1 }, + { no: 1, name: "listening_config", kind: "message", T: () => Config$1 }, ] as readonly PartialFieldInfo[], packedByDefault: true, - }) + }, +); /** * ListenStreamsResponse is the response type for ListenStreams. * * @generated from message stream.api.ListenStreamsResponse */ -export interface ListenStreamsResponse extends Message { +export type ListenStreamsResponse = Message<{ /** * ControllerStatus is the status of the forwarding controller. * * @generated from field: controller.exec.ControllerStatus controller_status = 1; */ - controllerStatus?: ControllerStatus -} + controllerStatus?: ControllerStatus; -export const ListenStreamsResponse: MessageType = - createMessageType({ - typeName: 'stream.api.ListenStreamsResponse', +}>; + +export const ListenStreamsResponse: MessageType = createMessageType( + { + typeName: "stream.api.ListenStreamsResponse", fields: [ - { - no: 1, - name: 'controller_status', - kind: 'enum', - T: ControllerStatus_Enum, - }, + { no: 1, name: "controller_status", kind: "enum", T: ControllerStatus_Enum }, ] as readonly PartialFieldInfo[], packedByDefault: true, - }) + }, +); /** * AcceptStreamRequest is the request type for AcceptStream. * * @generated from message stream.api.AcceptStreamRequest */ -export interface AcceptStreamRequest extends Message { +export type AcceptStreamRequest = Message<{ /** * Config is the configuration for the accept. * The first packet will contain this value. * * @generated from field: stream.api.accept.Config config = 1; */ - config?: Config$2 + config?: Config$2; /** * Data is a data packet. * * @generated from field: stream.api.rpc.Data data = 2; */ - data?: Data -} + data?: Data; + +}>; -export const AcceptStreamRequest: MessageType = - createMessageType({ - typeName: 'stream.api.AcceptStreamRequest', +export const AcceptStreamRequest: MessageType = createMessageType( + { + typeName: "stream.api.AcceptStreamRequest", fields: [ - { no: 1, name: 'config', kind: 'message', T: Config$2 }, - { no: 2, name: 'data', kind: 'message', T: Data }, + { no: 1, name: "config", kind: "message", T: () => Config$2 }, + { no: 2, name: "data", kind: "message", T: () => Data }, ] as readonly PartialFieldInfo[], packedByDefault: true, - }) + }, +); /** * AcceptStreamResponse is the response type for AcceptStream. * * @generated from message stream.api.AcceptStreamResponse */ -export interface AcceptStreamResponse extends Message { +export type AcceptStreamResponse = Message<{ /** * Data is a data packet. * * @generated from field: stream.api.rpc.Data data = 1; */ - data?: Data -} + data?: Data; -export const AcceptStreamResponse: MessageType = - createMessageType({ - typeName: 'stream.api.AcceptStreamResponse', +}>; + +export const AcceptStreamResponse: MessageType = createMessageType( + { + typeName: "stream.api.AcceptStreamResponse", fields: [ - { no: 1, name: 'data', kind: 'message', T: Data }, + { no: 1, name: "data", kind: "message", T: () => Data }, ] as readonly PartialFieldInfo[], packedByDefault: true, - }) + }, +); /** * DialStreamRequest is the request type for DialStream. * * @generated from message stream.api.DialStreamRequest */ -export interface DialStreamRequest extends Message { +export type DialStreamRequest = Message<{ /** * Config is the configuration for the dial. * The first packet will contain this value. * * @generated from field: stream.api.dial.Config config = 1; */ - config?: Config$3 + config?: Config$3; /** * Data is a data packet. * * @generated from field: stream.api.rpc.Data data = 2; */ - data?: Data -} + data?: Data; + +}>; -export const DialStreamRequest: MessageType = - createMessageType({ - typeName: 'stream.api.DialStreamRequest', +export const DialStreamRequest: MessageType = createMessageType( + { + typeName: "stream.api.DialStreamRequest", fields: [ - { no: 1, name: 'config', kind: 'message', T: Config$3 }, - { no: 2, name: 'data', kind: 'message', T: Data }, + { no: 1, name: "config", kind: "message", T: () => Config$3 }, + { no: 2, name: "data", kind: "message", T: () => Data }, ] as readonly PartialFieldInfo[], packedByDefault: true, - }) + }, +); /** * DialStreamResponse is the response type for DialStream. * * @generated from message stream.api.DialStreamResponse */ -export interface DialStreamResponse extends Message { +export type DialStreamResponse = Message<{ /** * Data is a data packet. * * @generated from field: stream.api.rpc.Data data = 1; */ - data?: Data -} + data?: Data; -export const DialStreamResponse: MessageType = - createMessageType({ - typeName: 'stream.api.DialStreamResponse', +}>; + +export const DialStreamResponse: MessageType = createMessageType( + { + typeName: "stream.api.DialStreamResponse", fields: [ - { no: 1, name: 'data', kind: 'message', T: Data }, + { no: 1, name: "data", kind: "message", T: () => Data }, ] as readonly PartialFieldInfo[], packedByDefault: true, - }) + }, +); + diff --git a/stream/api/api_srpc.pb.go b/stream/api/api_srpc.pb.go index 869ecac3..bc215ec2 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.31.6 +// protoc-gen-srpc version: v0.31.12 // source: github.com/aperturerobotics/bifrost/stream/api/api.proto package stream_api diff --git a/stream/api/api_srpc.pb.ts b/stream/api/api_srpc.pb.ts index 14e90925..b318f2de 100644 --- a/stream/api/api_srpc.pb.ts +++ b/stream/api/api_srpc.pb.ts @@ -11,9 +11,8 @@ import { ForwardStreamsResponse, ListenStreamsRequest, ListenStreamsResponse, -} from './api_pb.js' -import { MethodKind } from '@bufbuild/protobuf' -import { Message } from '@aptre/protobuf-es-lite' +} from './api.pb.js' +import { Message, MethodKind } from '@aptre/protobuf-es-lite' import { buildDecodeMessageTransform, buildEncodeMessageTransform, diff --git a/stream/api/dial/dial_pb.ts b/stream/api/dial/dial.pb.ts similarity index 50% rename from stream/api/dial/dial_pb.ts rename to stream/api/dial/dial.pb.ts index 4d30367e..f3a70a84 100644 --- a/stream/api/dial/dial_pb.ts +++ b/stream/api/dial/dial.pb.ts @@ -2,85 +2,70 @@ // @generated from file github.com/aperturerobotics/bifrost/stream/api/dial/dial.proto (package stream.api.dial, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; -export const protobufPackage = 'stream.api.dial' +export const protobufPackage = "stream.api.dial"; /** * Config configures the dial controller. * * @generated from message stream.api.dial.Config */ -export interface Config extends Message { +export type Config = Message<{ /** * PeerId is the remote peer ID to dial. * * @generated from field: string peer_id = 1; */ - peerId?: string + peerId?: string; /** * LocalPeerId is the peer ID to dial with. * Can be empty to accept any loaded peer. * * @generated from field: string local_peer_id = 2; */ - localPeerId?: string + localPeerId?: string; /** * ProtocolId is the protocol ID to dial with. * * @generated from field: string protocol_id = 3; */ - protocolId?: string + protocolId?: string; /** * TransportId constrains the transport ID to dial with. * Can be empty. * * @generated from field: uint64 transport_id = 4; */ - transportId?: bigint + transportId?: bigint; /** * Encrypted indicates the stream should be encrypted. * * @generated from field: bool encrypted = 5; */ - encrypted?: boolean + encrypted?: boolean; /** * Reliable indicates the stream should be reliable. * * @generated from field: bool reliable = 6; */ - reliable?: boolean -} + reliable?: boolean; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "stream.api.dial.Config", + fields: [ + { no: 1, name: "peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "local_peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "protocol_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "transport_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 5, name: "encrypted", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 6, name: "reliable", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const Config: MessageType = createMessageType({ - typeName: 'stream.api.dial.Config', - fields: [ - { no: 1, name: 'peer_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { - no: 2, - name: 'local_peer_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { - no: 3, - name: 'protocol_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { - no: 4, - name: 'transport_id', - kind: 'scalar', - T: 4 /* ScalarType.UINT64 */, - }, - { no: 5, name: 'encrypted', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - { no: 6, name: 'reliable', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/stream/api/rpc/rpc_pb.ts b/stream/api/rpc/rpc.pb.ts similarity index 60% rename from stream/api/rpc/rpc_pb.ts rename to stream/api/rpc/rpc.pb.ts index 1b451669..f4ba5803 100644 --- a/stream/api/rpc/rpc_pb.ts +++ b/stream/api/rpc/rpc.pb.ts @@ -2,15 +2,10 @@ // @generated from file github.com/aperturerobotics/bifrost/stream/api/rpc/rpc.proto (package stream.api.rpc, syntax proto3) /* eslint-disable */ -import { - createEnumType, - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createEnumType, createMessageType, Message } from "@aptre/protobuf-es-lite"; -export const protobufPackage = 'stream.api.rpc' +export const protobufPackage = "stream.api.rpc"; /** * StreamState is state for the stream related calls. @@ -41,38 +36,42 @@ export enum StreamState { } // StreamState_Enum is the enum type for StreamState. -export const StreamState_Enum = createEnumType('stream.api.rpc.StreamState', [ - { no: 0, name: 'StreamState_NONE' }, - { no: 1, name: 'StreamState_ESTABLISHING' }, - { no: 2, name: 'StreamState_ESTABLISHED' }, -]) +export const StreamState_Enum = createEnumType("stream.api.rpc.StreamState", [ + { no: 0, name: "StreamState_NONE" }, + { no: 1, name: "StreamState_ESTABLISHING" }, + { no: 2, name: "StreamState_ESTABLISHED" }, +]); /** * Data is a data packet. * * @generated from message stream.api.rpc.Data */ -export interface Data extends Message { +export type Data = Message<{ /** * State indicates stream state in-band. * Data is packet data from the remote. * * @generated from field: bytes data = 1; */ - data?: Uint8Array + data?: Uint8Array; /** * State indicates the stream state. * * @generated from field: stream.api.rpc.StreamState state = 2; */ - state?: StreamState -} + state?: StreamState; + +}>; + +export const Data: MessageType = createMessageType( + { + typeName: "stream.api.rpc.Data", + fields: [ + { no: 1, name: "data", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 2, name: "state", kind: "enum", T: StreamState_Enum }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const Data: MessageType = createMessageType({ - typeName: 'stream.api.rpc.Data', - fields: [ - { no: 1, name: 'data', kind: 'scalar', T: 12 /* ScalarType.BYTES */ }, - { no: 2, name: 'state', kind: 'enum', T: StreamState_Enum }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/stream/echo/echo.pb.ts b/stream/echo/echo.pb.ts new file mode 100644 index 00000000..578f386d --- /dev/null +++ b/stream/echo/echo.pb.ts @@ -0,0 +1,42 @@ +// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" +// @generated from file github.com/aperturerobotics/bifrost/stream/echo/echo.proto (package stream.echo, syntax proto3) +/* eslint-disable */ + +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; + +export const protobufPackage = "stream.echo"; + +/** + * Config configures the echo controller. + * + * @generated from message stream.echo.Config + */ +export type Config = Message<{ + /** + * PeerId is the peer ID to echo for. + * Can be empty. + * + * @generated from field: string peer_id = 1; + */ + peerId?: string; + /** + * ProtocolId is the protocol ID to echo on. + * + * @generated from field: string protocol_id = 2; + */ + protocolId?: string; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "stream.echo.Config", + fields: [ + { no: 1, name: "peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "protocol_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + diff --git a/stream/echo/echo_pb.ts b/stream/echo/echo_pb.ts deleted file mode 100644 index 62f7f25d..00000000 --- a/stream/echo/echo_pb.ts +++ /dev/null @@ -1,47 +0,0 @@ -// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" -// @generated from file github.com/aperturerobotics/bifrost/stream/echo/echo.proto (package stream.echo, syntax proto3) -/* eslint-disable */ - -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' - -export const protobufPackage = 'stream.echo' - -/** - * Config configures the echo controller. - * - * @generated from message stream.echo.Config - */ -export interface Config extends Message { - /** - * PeerId is the peer ID to echo for. - * Can be empty. - * - * @generated from field: string peer_id = 1; - */ - peerId?: string - /** - * ProtocolId is the protocol ID to echo on. - * - * @generated from field: string protocol_id = 2; - */ - protocolId?: string -} - -export const Config: MessageType = createMessageType({ - typeName: 'stream.echo.Config', - fields: [ - { no: 1, name: 'peer_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { - no: 2, - name: 'protocol_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/stream/forwarding/forwarding.pb.ts b/stream/forwarding/forwarding.pb.ts new file mode 100644 index 00000000..ca0990c8 --- /dev/null +++ b/stream/forwarding/forwarding.pb.ts @@ -0,0 +1,49 @@ +// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" +// @generated from file github.com/aperturerobotics/bifrost/stream/forwarding/forwarding.proto (package stream.forwarding, syntax proto3) +/* eslint-disable */ + +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; + +export const protobufPackage = "stream.forwarding"; + +/** + * Config configures the forwarding controller. + * + * @generated from message stream.forwarding.Config + */ +export type Config = Message<{ + /** + * PeerId is the peer ID to forward for. + * Can be empty. + * + * @generated from field: string peer_id = 1; + */ + peerId?: string; + /** + * ProtocolId is the protocol ID to forward for. + * + * @generated from field: string protocol_id = 2; + */ + protocolId?: string; + /** + * TargetMultiaddr is the target multiaddress to dial. + * + * @generated from field: string target_multiaddr = 3; + */ + targetMultiaddr?: string; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "stream.forwarding.Config", + fields: [ + { no: 1, name: "peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "protocol_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "target_multiaddr", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + diff --git a/stream/forwarding/forwarding_pb.ts b/stream/forwarding/forwarding_pb.ts deleted file mode 100644 index 18bcc0ac..00000000 --- a/stream/forwarding/forwarding_pb.ts +++ /dev/null @@ -1,59 +0,0 @@ -// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" -// @generated from file github.com/aperturerobotics/bifrost/stream/forwarding/forwarding.proto (package stream.forwarding, syntax proto3) -/* eslint-disable */ - -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' - -export const protobufPackage = 'stream.forwarding' - -/** - * Config configures the forwarding controller. - * - * @generated from message stream.forwarding.Config - */ -export interface Config extends Message { - /** - * PeerId is the peer ID to forward for. - * Can be empty. - * - * @generated from field: string peer_id = 1; - */ - peerId?: string - /** - * ProtocolId is the protocol ID to forward for. - * - * @generated from field: string protocol_id = 2; - */ - protocolId?: string - /** - * TargetMultiaddr is the target multiaddress to dial. - * - * @generated from field: string target_multiaddr = 3; - */ - targetMultiaddr?: string -} - -export const Config: MessageType = createMessageType({ - typeName: 'stream.forwarding.Config', - fields: [ - { no: 1, name: 'peer_id', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { - no: 2, - name: 'protocol_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { - no: 3, - name: 'target_multiaddr', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/stream/listening/listening_pb.ts b/stream/listening/listening.pb.ts similarity index 50% rename from stream/listening/listening_pb.ts rename to stream/listening/listening.pb.ts index d778171d..af79cbcf 100644 --- a/stream/listening/listening_pb.ts +++ b/stream/listening/listening.pb.ts @@ -2,102 +2,77 @@ // @generated from file github.com/aperturerobotics/bifrost/stream/listening/listening.proto (package stream.listening, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; -export const protobufPackage = 'stream.listening' +export const protobufPackage = "stream.listening"; /** * Config configures the listening controller. * * @generated from message stream.listening.Config */ -export interface Config extends Message { +export type Config = Message<{ /** * LocalPeerId is the peer ID to forward incoming connections with. * Can be empty. * * @generated from field: string local_peer_id = 1; */ - localPeerId?: string + localPeerId?: string; /** * RemotePeerId is the peer ID to forward incoming connections to. * * @generated from field: string remote_peer_id = 2; */ - remotePeerId?: string + remotePeerId?: string; /** * ProtocolId is the protocol ID to assign to incoming connections. * * @generated from field: string protocol_id = 3; */ - protocolId?: string + protocolId?: string; /** * ListenMultiaddr is the listening multiaddress. * * @generated from field: string listen_multiaddr = 4; */ - listenMultiaddr?: string + listenMultiaddr?: string; /** * TransportId sets a transport ID constraint. * Can be empty. * * @generated from field: uint64 transport_id = 5; */ - transportId?: bigint + transportId?: bigint; /** * Reliable indicates the stream should be reliable. * * @generated from field: bool reliable = 6; */ - reliable?: boolean + reliable?: boolean; /** * Encrypted indicates the stream should be encrypted. * * @generated from field: bool encrypted = 7; */ - encrypted?: boolean -} + encrypted?: boolean; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "stream.listening.Config", + fields: [ + { no: 1, name: "local_peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "remote_peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "protocol_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "listen_multiaddr", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "transport_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 6, name: "reliable", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 7, name: "encrypted", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const Config: MessageType = createMessageType({ - typeName: 'stream.listening.Config', - fields: [ - { - no: 1, - name: 'local_peer_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { - no: 2, - name: 'remote_peer_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { - no: 3, - name: 'protocol_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { - no: 4, - name: 'listen_multiaddr', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { - no: 5, - name: 'transport_id', - kind: 'scalar', - T: 4 /* ScalarType.UINT64 */, - }, - { no: 6, name: 'reliable', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - { no: 7, name: 'encrypted', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/stream/srpc/client/client.pb.ts b/stream/srpc/client/client.pb.ts new file mode 100644 index 00000000..4e4c829b --- /dev/null +++ b/stream/srpc/client/client.pb.ts @@ -0,0 +1,67 @@ +// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" +// @generated from file github.com/aperturerobotics/bifrost/stream/srpc/client/client.proto (package stream.srpc.client, syntax proto3) +/* eslint-disable */ + +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; +import { Backoff } from "../../../../util/backoff/backoff.pb.js"; + +export const protobufPackage = "stream.srpc.client"; + +/** + * Config configures a client for a srpc service. + * + * @generated from message stream.srpc.client.Config + */ +export type Config = Message<{ + /** + * ServerPeerIds are the static list of peer IDs to contact. + * + * @generated from field: repeated string server_peer_ids = 1; + */ + serverPeerIds?: string[]; + /** + * PerServerBackoff is the server peer error backoff configuration. + * Can be empty. + * + * @generated from field: backoff.Backoff per_server_backoff = 2; + */ + perServerBackoff?: Backoff; + /** + * SrcPeerId is the source peer id to contact from. + * Can be empty. + * + * @generated from field: string src_peer_id = 3; + */ + srcPeerId?: string; + /** + * TransportId restricts which transport we can dial out from. + * + * @generated from field: uint64 transport_id = 4; + */ + transportId?: bigint; + /** + * TimeoutDur sets the per-server establish timeout. + * If unset, no timeout. + * Example: 15s + * + * @generated from field: string timeout_dur = 5; + */ + timeoutDur?: string; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "stream.srpc.client.Config", + fields: [ + { no: 1, name: "server_peer_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 2, name: "per_server_backoff", kind: "message", T: () => Backoff }, + { no: 3, name: "src_peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "transport_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 5, name: "timeout_dur", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + diff --git a/stream/srpc/client/client_pb.ts b/stream/srpc/client/client_pb.ts deleted file mode 100644 index 3363466f..00000000 --- a/stream/srpc/client/client_pb.ts +++ /dev/null @@ -1,88 +0,0 @@ -// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" -// @generated from file github.com/aperturerobotics/bifrost/stream/srpc/client/client.proto (package stream.srpc.client, syntax proto3) -/* eslint-disable */ - -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import { Backoff } from '@go/github.com/aperturerobotics/util/backoff/backoff_pb.js' - -export const protobufPackage = 'stream.srpc.client' - -/** - * Config configures a client for a srpc service. - * - * @generated from message stream.srpc.client.Config - */ -export interface Config extends Message { - /** - * ServerPeerIds are the static list of peer IDs to contact. - * - * @generated from field: repeated string server_peer_ids = 1; - */ - serverPeerIds?: string[] - /** - * PerServerBackoff is the server peer error backoff configuration. - * Can be empty. - * - * @generated from field: backoff.Backoff per_server_backoff = 2; - */ - perServerBackoff?: Backoff - /** - * SrcPeerId is the source peer id to contact from. - * Can be empty. - * - * @generated from field: string src_peer_id = 3; - */ - srcPeerId?: string - /** - * TransportId restricts which transport we can dial out from. - * - * @generated from field: uint64 transport_id = 4; - */ - transportId?: bigint - /** - * TimeoutDur sets the per-server establish timeout. - * If unset, no timeout. - * Example: 15s - * - * @generated from field: string timeout_dur = 5; - */ - timeoutDur?: string -} - -export const Config: MessageType = createMessageType({ - typeName: 'stream.srpc.client.Config', - fields: [ - { - no: 1, - name: 'server_peer_ids', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - repeated: true, - }, - { no: 2, name: 'per_server_backoff', kind: 'message', T: Backoff }, - { - no: 3, - name: 'src_peer_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { - no: 4, - name: 'transport_id', - kind: 'scalar', - T: 4 /* ScalarType.UINT64 */, - }, - { - no: 5, - name: 'timeout_dur', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/stream/srpc/client/controller/config_pb.ts b/stream/srpc/client/controller/config.pb.ts similarity index 58% rename from stream/srpc/client/controller/config_pb.ts rename to stream/srpc/client/controller/config.pb.ts index fd3e8a8e..da1dba5c 100644 --- a/stream/srpc/client/controller/config_pb.ts +++ b/stream/srpc/client/controller/config.pb.ts @@ -2,15 +2,11 @@ // @generated from file github.com/aperturerobotics/bifrost/stream/srpc/client/controller/config.proto (package stream.srpc.client.controller, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import { Config as Config$1 } from '../client_pb.js' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; +import { Config as Config$1 } from "../client.pb.js"; -export const protobufPackage = 'stream.srpc.client.controller' +export const protobufPackage = "stream.srpc.client.controller"; /** * Config configures mounting a bifrost srpc RPC client to a bus. @@ -18,20 +14,20 @@ export const protobufPackage = 'stream.srpc.client.controller' * * @generated from message stream.srpc.client.controller.Config */ -export interface Config extends Message { +export type Config = Message<{ /** * Client contains srpc.client configuration for the RPC client. * * @generated from field: stream.srpc.client.Config client = 1; */ - client?: Config$1 + client?: Config$1; /** * ProtocolId is the protocol ID to use to contact the remote RPC service. * Must be set. * * @generated from field: string protocol_id = 2; */ - protocolId?: string + protocolId?: string; /** * ServiceIdPrefixes are the service ID prefixes to match. * The prefix will be stripped from the service id before being passed to the client. @@ -42,26 +38,19 @@ export interface Config extends Message { * * @generated from field: repeated string service_id_prefixes = 3; */ - serviceIdPrefixes?: string[] -} + serviceIdPrefixes?: string[]; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "stream.srpc.client.controller.Config", + fields: [ + { no: 1, name: "client", kind: "message", T: () => Config$1 }, + { no: 2, name: "protocol_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "service_id_prefixes", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const Config: MessageType = createMessageType({ - typeName: 'stream.srpc.client.controller.Config', - fields: [ - { no: 1, name: 'client', kind: 'message', T: Config$1 }, - { - no: 2, - name: 'protocol_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { - no: 3, - name: 'service_id_prefixes', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - repeated: true, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/stream/srpc/server/server_pb.ts b/stream/srpc/server/server.pb.ts similarity index 51% rename from stream/srpc/server/server_pb.ts rename to stream/srpc/server/server.pb.ts index 49447b53..eb1ad5d7 100644 --- a/stream/srpc/server/server_pb.ts +++ b/stream/srpc/server/server.pb.ts @@ -2,66 +2,49 @@ // @generated from file github.com/aperturerobotics/bifrost/stream/srpc/server/server.proto (package stream.srpc.server, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; -export const protobufPackage = 'stream.srpc.server' +export const protobufPackage = "stream.srpc.server"; /** * Config configures the server for the srpc service. * * @generated from message stream.srpc.server.Config */ -export interface Config extends Message { +export type Config = Message<{ /** * PeerIds are the list of peer IDs to listen on. * If empty, allows any incoming peer id w/ the protocol id(s). * * @generated from field: repeated string peer_ids = 1; */ - peerIds?: string[] + peerIds?: string[]; /** * ProtocolIds is the list of protocol ids to listen on. * If empty, no incoming streams will be accepted. * * @generated from field: repeated string protocol_ids = 2; */ - protocolIds?: string[] + protocolIds?: string[]; /** * DisableEstablishLink disables adding an EstablishLink directive for each incoming peer. * * @generated from field: bool disable_establish_link = 3; */ - disableEstablishLink?: boolean -} + disableEstablishLink?: boolean; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "stream.srpc.server.Config", + fields: [ + { no: 1, name: "peer_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 2, name: "protocol_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 3, name: "disable_establish_link", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const Config: MessageType = createMessageType({ - typeName: 'stream.srpc.server.Config', - fields: [ - { - no: 1, - name: 'peer_ids', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - repeated: true, - }, - { - no: 2, - name: 'protocol_ids', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - repeated: true, - }, - { - no: 3, - name: 'disable_establish_link', - kind: 'scalar', - T: 8 /* ScalarType.BOOL */, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/tptaddr/controller/config_pb.ts b/tptaddr/controller/config.pb.ts similarity index 51% rename from tptaddr/controller/config_pb.ts rename to tptaddr/controller/config.pb.ts index 8dba16a9..a73e2661 100644 --- a/tptaddr/controller/config_pb.ts +++ b/tptaddr/controller/config.pb.ts @@ -2,14 +2,10 @@ // @generated from file github.com/aperturerobotics/bifrost/tptaddr/controller/config.proto (package tptaddr.controller, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; -export const protobufPackage = 'tptaddr.controller' +export const protobufPackage = "tptaddr.controller"; /** * Config configures the tptaddr dialer controller. @@ -19,10 +15,16 @@ export const protobufPackage = 'tptaddr.controller' * * @generated from message tptaddr.controller.Config */ -export interface Config extends Message {} +export type Config = Message<{ + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "tptaddr.controller.Config", + fields: [ + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const Config: MessageType = createMessageType({ - typeName: 'tptaddr.controller.Config', - fields: [] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/tptaddr/static/static_pb.ts b/tptaddr/static/static.pb.ts similarity index 54% rename from tptaddr/static/static_pb.ts rename to tptaddr/static/static.pb.ts index c24045fe..2d4024a7 100644 --- a/tptaddr/static/static_pb.ts +++ b/tptaddr/static/static.pb.ts @@ -2,14 +2,10 @@ // @generated from file github.com/aperturerobotics/bifrost/tptaddr/static/static.proto (package tptaddr.static, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; -export const protobufPackage = 'tptaddr.static' +export const protobufPackage = "tptaddr.static"; /** * Config configures the static controller. @@ -18,7 +14,7 @@ export const protobufPackage = 'tptaddr.static' * * @generated from message tptaddr.static.Config */ -export interface Config extends Message { +export type Config = Message<{ /** * Addresses is the mapping of peer id to address list. * @@ -27,19 +23,17 @@ export interface Config extends Message { * * @generated from field: repeated string addresses = 1; */ - addresses?: string[] -} + addresses?: string[]; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "tptaddr.static.Config", + fields: [ + { no: 1, name: "addresses", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const Config: MessageType = createMessageType({ - typeName: 'tptaddr.static.Config', - fields: [ - { - no: 1, - name: 'addresses', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - repeated: true, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/transport/common/conn/conn_pb.ts b/transport/common/conn/conn.pb.ts similarity index 51% rename from transport/common/conn/conn_pb.ts rename to transport/common/conn/conn.pb.ts index 0452cb95..ff19cd3a 100644 --- a/transport/common/conn/conn_pb.ts +++ b/transport/common/conn/conn.pb.ts @@ -2,41 +2,37 @@ // @generated from file github.com/aperturerobotics/bifrost/transport/common/conn/conn.proto (package conn, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import { Opts as Opts$1 } from '../quic/quic_pb.js' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; +import { Opts as Opts$1 } from "../quic/quic.pb.js"; -export const protobufPackage = 'conn' +export const protobufPackage = "conn"; /** * Opts are extra options for the reliable conn. * * @generated from message conn.Opts */ -export interface Opts extends Message { +export type Opts = Message<{ /** * Quic are the quic protocol options. * * @generated from field: transport.quic.Opts quic = 1; */ - quic?: Opts$1 + quic?: Opts$1; /** * Verbose turns on verbose debug logging. * * @generated from field: bool verbose = 2; */ - verbose?: boolean + verbose?: boolean; /** * Mtu sets the maximum size for a single packet. * Defaults to 65000. * * @generated from field: uint32 mtu = 3; */ - mtu?: number + mtu?: number; /** * BufSize is the number of packets to buffer. * @@ -45,16 +41,20 @@ export interface Opts extends Message { * * @generated from field: uint32 buf_size = 4; */ - bufSize?: number -} + bufSize?: number; + +}>; + +export const Opts: MessageType = createMessageType( + { + typeName: "conn.Opts", + fields: [ + { no: 1, name: "quic", kind: "message", T: () => Opts$1 }, + { no: 2, name: "verbose", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 3, name: "mtu", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 4, name: "buf_size", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const Opts: MessageType = createMessageType({ - typeName: 'conn.Opts', - fields: [ - { no: 1, name: 'quic', kind: 'message', T: Opts$1 }, - { no: 2, name: 'verbose', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - { no: 3, name: 'mtu', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ }, - { no: 4, name: 'buf_size', kind: 'scalar', T: 13 /* ScalarType.UINT32 */ }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/transport/common/dialer/dialer_pb.ts b/transport/common/dialer/dialer.pb.ts similarity index 54% rename from transport/common/dialer/dialer_pb.ts rename to transport/common/dialer/dialer.pb.ts index eeae32a5..1f38ebb9 100644 --- a/transport/common/dialer/dialer_pb.ts +++ b/transport/common/dialer/dialer.pb.ts @@ -2,42 +2,42 @@ // @generated from file github.com/aperturerobotics/bifrost/transport/common/dialer/dialer.proto (package dialer, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import { Backoff } from '@go/github.com/aperturerobotics/util/backoff/backoff_pb.js' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; +import { Backoff } from "../../../../util/backoff/backoff.pb.js"; -export const protobufPackage = 'dialer' +export const protobufPackage = "dialer"; /** * DialerOpts contains options relating to dialing a statically configured peer. * * @generated from message dialer.DialerOpts */ -export interface DialerOpts extends Message { +export type DialerOpts = Message<{ /** * Address is the address of the peer, in the format expected by the transport. * * @generated from field: string address = 1; */ - address?: string + address?: string; /** * Backoff is the dialing backoff configuration. * Can be empty. * * @generated from field: backoff.Backoff backoff = 2; */ - backoff?: Backoff -} + backoff?: Backoff; + +}>; + +export const DialerOpts: MessageType = createMessageType( + { + typeName: "dialer.DialerOpts", + fields: [ + { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "backoff", kind: "message", T: () => Backoff }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const DialerOpts: MessageType = createMessageType({ - typeName: 'dialer.DialerOpts', - fields: [ - { no: 1, name: 'address', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 2, name: 'backoff', kind: 'message', T: Backoff }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/transport/common/pconn/pconn.pb.ts b/transport/common/pconn/pconn.pb.ts new file mode 100644 index 00000000..10f07fdc --- /dev/null +++ b/transport/common/pconn/pconn.pb.ts @@ -0,0 +1,42 @@ +// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" +// @generated from file github.com/aperturerobotics/bifrost/transport/common/pconn/pconn.proto (package pconn, syntax proto3) +/* eslint-disable */ + +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; +import { Opts as Opts$1 } from "../quic/quic.pb.js"; + +export const protobufPackage = "pconn"; + +/** + * Opts are extra options for the packet conn. + * + * @generated from message pconn.Opts + */ +export type Opts = Message<{ + /** + * Quic are the quic protocol options. + * + * @generated from field: transport.quic.Opts quic = 1; + */ + quic?: Opts$1; + /** + * Verbose turns on verbose debug logging. + * + * @generated from field: bool verbose = 2; + */ + verbose?: boolean; + +}>; + +export const Opts: MessageType = createMessageType( + { + typeName: "pconn.Opts", + fields: [ + { no: 1, name: "quic", kind: "message", T: () => Opts$1 }, + { no: 2, name: "verbose", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + diff --git a/transport/common/pconn/pconn_pb.ts b/transport/common/pconn/pconn_pb.ts deleted file mode 100644 index dbeb9790..00000000 --- a/transport/common/pconn/pconn_pb.ts +++ /dev/null @@ -1,42 +0,0 @@ -// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" -// @generated from file github.com/aperturerobotics/bifrost/transport/common/pconn/pconn.proto (package pconn, syntax proto3) -/* eslint-disable */ - -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import { Opts as Opts$1 } from '../quic/quic_pb.js' - -export const protobufPackage = 'pconn' - -/** - * Opts are extra options for the packet conn. - * - * @generated from message pconn.Opts - */ -export interface Opts extends Message { - /** - * Quic are the quic protocol options. - * - * @generated from field: transport.quic.Opts quic = 1; - */ - quic?: Opts$1 - /** - * Verbose turns on verbose debug logging. - * - * @generated from field: bool verbose = 2; - */ - verbose?: boolean -} - -export const Opts: MessageType = createMessageType({ - typeName: 'pconn.Opts', - fields: [ - { no: 1, name: 'quic', kind: 'message', T: Opts$1 }, - { no: 2, name: 'verbose', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/transport/common/quic/quic_pb.ts b/transport/common/quic/quic.pb.ts similarity index 55% rename from transport/common/quic/quic_pb.ts rename to transport/common/quic/quic.pb.ts index b609f8eb..654391a4 100644 --- a/transport/common/quic/quic_pb.ts +++ b/transport/common/quic/quic.pb.ts @@ -2,19 +2,15 @@ // @generated from file github.com/aperturerobotics/bifrost/transport/common/quic/quic.proto (package transport.quic, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; -export const protobufPackage = 'transport.quic' +export const protobufPackage = "transport.quic"; /** * @generated from message transport.quic.Opts */ -export interface Opts extends Message { +export type Opts = Message<{ /** * MaxIdleTimeoutDur is the duration of idle after which conn is closed. * @@ -22,7 +18,7 @@ export interface Opts extends Message { * * @generated from field: string max_idle_timeout_dur = 1; */ - maxIdleTimeoutDur?: string + maxIdleTimeoutDur?: string; /** * MaxIncomingStreams is the maximum number of concurrent bidirectional * streams that a peer is allowed to open. @@ -31,14 +27,14 @@ export interface Opts extends Message { * * @generated from field: int32 max_incoming_streams = 2; */ - maxIncomingStreams?: number + maxIncomingStreams?: number; /** * DisableKeepAlive disables the keep alive packets. * * * @generated from field: bool disable_keep_alive = 3; */ - disableKeepAlive?: boolean + disableKeepAlive?: boolean; /** * KeepAliveDur is the duration between keep-alive pings. * @@ -47,69 +43,43 @@ export interface Opts extends Message { * * @generated from field: string keep_alive_dur = 7; */ - keepAliveDur?: string + keepAliveDur?: string; /** * DisableDatagrams disables the unreliable datagrams feature. * Both peers must support it for it to be enabled, regardless of this flag. * * @generated from field: bool disable_datagrams = 4; */ - disableDatagrams?: boolean + disableDatagrams?: boolean; /** * DisablePathMtuDiscovery disables sending packets to discover max packet size. * * @generated from field: bool disable_path_mtu_discovery = 5; */ - disablePathMtuDiscovery?: boolean + disablePathMtuDiscovery?: boolean; /** * Verbose indicates to use verbose logging. * Note: this is VERY verbose, logs every packet sent. * * @generated from field: bool verbose = 6; */ - verbose?: boolean -} + verbose?: boolean; + +}>; + +export const Opts: MessageType = createMessageType( + { + typeName: "transport.quic.Opts", + fields: [ + { no: 1, name: "max_idle_timeout_dur", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "max_incoming_streams", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 3, name: "disable_keep_alive", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 7, name: "keep_alive_dur", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "disable_datagrams", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 5, name: "disable_path_mtu_discovery", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 6, name: "verbose", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const Opts: MessageType = createMessageType({ - typeName: 'transport.quic.Opts', - fields: [ - { - no: 1, - name: 'max_idle_timeout_dur', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { - no: 2, - name: 'max_incoming_streams', - kind: 'scalar', - T: 5 /* ScalarType.INT32 */, - }, - { - no: 3, - name: 'disable_keep_alive', - kind: 'scalar', - T: 8 /* ScalarType.BOOL */, - }, - { - no: 7, - name: 'keep_alive_dur', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { - no: 4, - name: 'disable_datagrams', - kind: 'scalar', - T: 8 /* ScalarType.BOOL */, - }, - { - no: 5, - name: 'disable_path_mtu_discovery', - kind: 'scalar', - T: 8 /* ScalarType.BOOL */, - }, - { no: 6, name: 'verbose', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/transport/controller/controller_pb.ts b/transport/controller/controller.pb.ts similarity index 55% rename from transport/controller/controller_pb.ts rename to transport/controller/controller.pb.ts index 660f54d3..9fd9cf67 100644 --- a/transport/controller/controller_pb.ts +++ b/transport/controller/controller.pb.ts @@ -2,14 +2,10 @@ // @generated from file github.com/aperturerobotics/bifrost/transport/controller/controller.proto (package transport.controller, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; -export const protobufPackage = 'transport.controller' +export const protobufPackage = "transport.controller"; /** * StreamEstablish is the first message sent by the initiator of a stream. @@ -18,24 +14,23 @@ export const protobufPackage = 'transport.controller' * * @generated from message transport.controller.StreamEstablish */ -export interface StreamEstablish extends Message { +export type StreamEstablish = Message<{ /** * ProtocolID is the protocol identifier string for the stream. * * @generated from field: string protocol_id = 1; */ - protocolId?: string -} + protocolId?: string; + +}>; + +export const StreamEstablish: MessageType = createMessageType( + { + typeName: "transport.controller.StreamEstablish", + fields: [ + { no: 1, name: "protocol_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const StreamEstablish: MessageType = createMessageType({ - typeName: 'transport.controller.StreamEstablish', - fields: [ - { - no: 1, - name: 'protocol_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/transport/inproc/inproc.pb.ts b/transport/inproc/inproc.pb.ts new file mode 100644 index 00000000..67eb02d7 --- /dev/null +++ b/transport/inproc/inproc.pb.ts @@ -0,0 +1,51 @@ +// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" +// @generated from file github.com/aperturerobotics/bifrost/transport/inproc/inproc.proto (package inproc, syntax proto3) +/* eslint-disable */ + +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; +import { Opts } from "../common/pconn/pconn.pb.js"; +import { DialerOpts } from "../common/dialer/dialer.pb.js"; + +export const protobufPackage = "inproc"; + +/** + * Config is the configuration for the inproc testing transport. + * + * @generated from message inproc.Config + */ +export type Config = Message<{ + /** + * TransportPeerID sets the peer ID to attach the transport to. + * If unset, attaches to any running peer with a private key. + * + * @generated from field: string transport_peer_id = 1; + */ + transportPeerId?: string; + /** + * PacketOpts are options to set on the packet connection. + * + * @generated from field: pconn.Opts packet_opts = 2; + */ + packetOpts?: Opts; + /** + * Dialers maps peer IDs to dialers. + * + * @generated from field: map dialers = 3; + */ + dialers?: { [key: string]: DialerOpts }; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "inproc.Config", + fields: [ + { no: 1, name: "transport_peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "packet_opts", kind: "message", T: () => Opts }, + { no: 3, name: "dialers", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: () => DialerOpts} }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + diff --git a/transport/inproc/inproc_pb.ts b/transport/inproc/inproc_pb.ts deleted file mode 100644 index 74bba385..00000000 --- a/transport/inproc/inproc_pb.ts +++ /dev/null @@ -1,62 +0,0 @@ -// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" -// @generated from file github.com/aperturerobotics/bifrost/transport/inproc/inproc.proto (package inproc, syntax proto3) -/* eslint-disable */ - -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import { Opts } from '../common/pconn/pconn_pb.js' -import { DialerOpts } from '../common/dialer/dialer_pb.js' - -export const protobufPackage = 'inproc' - -/** - * Config is the configuration for the inproc testing transport. - * - * @generated from message inproc.Config - */ -export interface Config extends Message { - /** - * TransportPeerID sets the peer ID to attach the transport to. - * If unset, attaches to any running peer with a private key. - * - * @generated from field: string transport_peer_id = 1; - */ - transportPeerId?: string - /** - * PacketOpts are options to set on the packet connection. - * - * @generated from field: pconn.Opts packet_opts = 2; - */ - packetOpts?: Opts - /** - * Dialers maps peer IDs to dialers. - * - * @generated from field: map dialers = 3; - */ - dialers?: { [key: string]: DialerOpts } -} - -export const Config: MessageType = createMessageType({ - typeName: 'inproc.Config', - fields: [ - { - no: 1, - name: 'transport_peer_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { no: 2, name: 'packet_opts', kind: 'message', T: Opts }, - { - no: 3, - name: 'dialers', - kind: 'map', - K: 9 /* ScalarType.STRING */, - V: { kind: 'message', T: DialerOpts }, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/transport/udp/udp.pb.ts b/transport/udp/udp.pb.ts new file mode 100644 index 00000000..3bf4b194 --- /dev/null +++ b/transport/udp/udp.pb.ts @@ -0,0 +1,59 @@ +// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" +// @generated from file github.com/aperturerobotics/bifrost/transport/udp/udp.proto (package udp, syntax proto3) +/* eslint-disable */ + +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; +import { Opts } from "../common/pconn/pconn.pb.js"; +import { DialerOpts } from "../common/dialer/dialer.pb.js"; + +export const protobufPackage = "udp"; + +/** + * Config is the configuration for the udp transport. + * + * @generated from message udp.Config + */ +export type Config = Message<{ + /** + * TransportPeerID sets the peer ID to attach the transport to. + * If unset, attaches to any running peer with a private key. + * + * @generated from field: string transport_peer_id = 1; + */ + transportPeerId?: string; + /** + * ListenAddr contains the address to listen on. + * Has no effect in the browser. + * + * @generated from field: string listen_addr = 2; + */ + listenAddr?: string; + /** + * PacketOpts are options to set on the packet connection. + * + * @generated from field: pconn.Opts packet_opts = 4; + */ + packetOpts?: Opts; + /** + * Dialers maps peer IDs to dialers. + * + * @generated from field: map dialers = 5; + */ + dialers?: { [key: string]: DialerOpts }; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "udp.Config", + fields: [ + { no: 1, name: "transport_peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "listen_addr", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "packet_opts", kind: "message", T: () => Opts }, + { no: 5, name: "dialers", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: () => DialerOpts} }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + diff --git a/transport/udp/udp_pb.ts b/transport/udp/udp_pb.ts deleted file mode 100644 index 710f0b95..00000000 --- a/transport/udp/udp_pb.ts +++ /dev/null @@ -1,75 +0,0 @@ -// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" -// @generated from file github.com/aperturerobotics/bifrost/transport/udp/udp.proto (package udp, syntax proto3) -/* eslint-disable */ - -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import { Opts } from '../common/pconn/pconn_pb.js' -import { DialerOpts } from '../common/dialer/dialer_pb.js' - -export const protobufPackage = 'udp' - -/** - * Config is the configuration for the udp transport. - * - * @generated from message udp.Config - */ -export interface Config extends Message { - /** - * TransportPeerID sets the peer ID to attach the transport to. - * If unset, attaches to any running peer with a private key. - * - * @generated from field: string transport_peer_id = 1; - */ - transportPeerId?: string - /** - * ListenAddr contains the address to listen on. - * Has no effect in the browser. - * - * @generated from field: string listen_addr = 2; - */ - listenAddr?: string - /** - * PacketOpts are options to set on the packet connection. - * - * @generated from field: pconn.Opts packet_opts = 4; - */ - packetOpts?: Opts - /** - * Dialers maps peer IDs to dialers. - * - * @generated from field: map dialers = 5; - */ - dialers?: { [key: string]: DialerOpts } -} - -export const Config: MessageType = createMessageType({ - typeName: 'udp.Config', - fields: [ - { - no: 1, - name: 'transport_peer_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { - no: 2, - name: 'listen_addr', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { no: 4, name: 'packet_opts', kind: 'message', T: Opts }, - { - no: 5, - name: 'dialers', - kind: 'map', - K: 9 /* ScalarType.STRING */, - V: { kind: 'message', T: DialerOpts }, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/transport/webrtc/webrtc.pb.ts b/transport/webrtc/webrtc.pb.ts new file mode 100644 index 00000000..08adc58e --- /dev/null +++ b/transport/webrtc/webrtc.pb.ts @@ -0,0 +1,408 @@ +// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" +// @generated from file github.com/aperturerobotics/bifrost/transport/webrtc/webrtc.proto (package webrtc, syntax proto3) +/* eslint-disable */ + +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createEnumType, createMessageType, Message } from "@aptre/protobuf-es-lite"; +import { Opts } from "../common/quic/quic.pb.js"; +import { Backoff } from "../../../util/backoff/backoff.pb.js"; +import { DialerOpts } from "../common/dialer/dialer.pb.js"; + +export const protobufPackage = "webrtc"; + +/** + * IceTransportPolicy contains the set of allowed ICE transport policies. + * + * @generated from enum webrtc.IceTransportPolicy + */ +export enum IceTransportPolicy { + /** + * IceTransportPolicy_ALL allows any kind of ICE candidate. + * + * @generated from enum value: IceTransportPolicy_ALL = 0; + */ + IceTransportPolicy_ALL = 0, + + /** + * IceTransportPolicy_RELAY allows only media relay candidates (TURN). + * + * @generated from enum value: IceTransportPolicy_RELAY = 1; + */ + IceTransportPolicy_RELAY = 1, +} + +// IceTransportPolicy_Enum is the enum type for IceTransportPolicy. +export const IceTransportPolicy_Enum = createEnumType("webrtc.IceTransportPolicy", [ + { no: 0, name: "IceTransportPolicy_ALL" }, + { no: 1, name: "IceTransportPolicy_RELAY" }, +]); + +/** + * OauthCredential is an OAuth credential information for the ICE server. + * + * @generated from message webrtc.IceServerConfig.OauthCredential + */ +export type IceServerConfig_OauthCredential = Message<{ + /** + * MacKey is a base64-url format. + * + * @generated from field: string mac_key = 1; + */ + macKey?: string; + /** + * AccessToken is the access token in base64-encoded format. + * + * @generated from field: string access_token = 2; + */ + accessToken?: string; + +}>; + +export const IceServerConfig_OauthCredential: MessageType = createMessageType( + { + typeName: "webrtc.IceServerConfig.OauthCredential", + fields: [ + { no: 1, name: "mac_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "access_token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + +/** + * IceServer is a WebRTC ICE server config. + * + * @generated from message webrtc.IceServerConfig + */ +export type IceServerConfig = Message<{ + /** + * Urls is the list of URLs for the ICE server. + * + * Format: stun:{url} or turn:{url} or turns:{url}?transport=tcp + * Examples: + * - stun:stun.l.google.com:19302 + * - stun:stun.stunprotocol.org:3478 + * - turns:google.de?transport=tcp + * + * @generated from field: repeated string urls = 1; + */ + urls?: string[]; + /** + * Username is the username for the ICE server. + * + * @generated from field: string username = 2; + */ + username?: string; + + /** + * Credential contains the ice server credential, if any. + * + * @generated from oneof webrtc.IceServerConfig.credential + */ + credential?: { + value?: undefined, + case: undefined + } | { + /** + * Password contains the ICE server password. + * + * @generated from field: string password = 3; + */ + value: string; + case: "password"; + } | { + /** + * Oauth contains an OAuth credential. + * + * @generated from field: webrtc.IceServerConfig.OauthCredential oauth = 4; + */ + value: IceServerConfig_OauthCredential; + case: "oauth"; + }; + +}>; + +export const IceServerConfig: MessageType = createMessageType( + { + typeName: "webrtc.IceServerConfig", + fields: [ + { no: 1, name: "urls", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 2, name: "username", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "password", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "credential" }, + { no: 4, name: "oauth", kind: "message", T: () => IceServerConfig_OauthCredential, oneof: "credential" }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + +/** + * WebRtcConfig configures the WebRTC PeerConnection. + * + * @generated from message webrtc.WebRtcConfig + */ +export type WebRtcConfig = Message<{ + /** + * IceServers contains the list of ICE servers to use. + * + * @generated from field: repeated webrtc.IceServerConfig ice_servers = 1; + */ + iceServers?: IceServerConfig[]; + /** + * IceTransportPolicy defines the policy for permitted ICE candidates. + * Optional. + * + * @generated from field: webrtc.IceTransportPolicy ice_transport_policy = 2; + */ + iceTransportPolicy?: IceTransportPolicy; + /** + * IceCandidatePoolSize defines the size of the prefetched ICE pool. + * Optional. + * + * @generated from field: uint32 ice_candidate_pool_size = 3; + */ + iceCandidatePoolSize?: number; + +}>; + +export const WebRtcConfig: MessageType = createMessageType( + { + typeName: "webrtc.WebRtcConfig", + fields: [ + { no: 1, name: "ice_servers", kind: "message", T: () => IceServerConfig, repeated: true }, + { no: 2, name: "ice_transport_policy", kind: "enum", T: IceTransportPolicy_Enum }, + { no: 3, name: "ice_candidate_pool_size", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + +/** + * Config is the configuration for the WebRTC Signal RPC transport. + * + * @generated from message webrtc.Config + */ +export type Config = Message<{ + /** + * SignalingId is the signaling channel identifier. + * Cannot be empty. + * + * @generated from field: string signaling_id = 1; + */ + signalingId?: string; + /** + * TransportPeerId sets the peer ID to attach the transport to. + * If unset, attaches to any running peer with a private key. + * Must match the transport peer ID of the signaling transport. + * + * @generated from field: string transport_peer_id = 2; + */ + transportPeerId?: string; + /** + * TransportType overrides the transport type id for dial addresses. + * Defaults to "webrtc" + * Configures the scheme for addr matching to this transport. + * E.x.: webrtc:// + * + * @generated from field: string transport_type = 3; + */ + transportType?: string; + /** + * Quic contains the quic protocol options. + * + * The WebRTC transport always disables FEC and several other UDP-centric + * features which are unnecessary due to the "reliable" nature of WebRTC. + * + * @generated from field: transport.quic.Opts quic = 4; + */ + quic?: Opts; + /** + * WebRtc contains the WebRTC protocol options. + * + * @generated from field: webrtc.WebRtcConfig web_rtc = 5; + */ + webRtc?: WebRtcConfig; + /** + * Backoff is the backoff config for connecting to a PeerConnection. + * If unset, defaults to reasonable defaults. + * + * @generated from field: backoff.Backoff backoff = 6; + */ + backoff?: Backoff; + /** + * Dialers maps peer IDs to dialers. + * This allows mapping which peer ID should be dialed via this transport. + * + * @generated from field: map dialers = 7; + */ + dialers?: { [key: string]: DialerOpts }; + /** + * AllPeers tells the transport to attempt to negotiate a WebRTC session with + * any peer, even those not listed in the Dialers map. + * + * @generated from field: bool all_peers = 8; + */ + allPeers?: boolean; + /** + * DisableListen disables listening for incoming Links. + * If set, we will only dial out, not accept incoming links. + * + * @generated from field: bool disable_listen = 9; + */ + disableListen?: boolean; + /** + * BlockPeers is a list of peer ids that will not be contacted via this transport. + * + * @generated from field: repeated string block_peers = 10; + */ + blockPeers?: string[]; + /** + * Verbose enables very verbose logging. + * + * @generated from field: bool verbose = 11; + */ + verbose?: boolean; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "webrtc.Config", + fields: [ + { no: 1, name: "signaling_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "transport_peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "transport_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "quic", kind: "message", T: () => Opts }, + { no: 5, name: "web_rtc", kind: "message", T: () => WebRtcConfig }, + { no: 6, name: "backoff", kind: "message", T: () => Backoff }, + { no: 7, name: "dialers", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: () => DialerOpts} }, + { no: 8, name: "all_peers", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 9, name: "disable_listen", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 10, name: "block_peers", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 11, name: "verbose", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + +/** + * WebRtcSdp contains the SDP offer or answer. + * + * @generated from message webrtc.WebRtcSdp + */ +export type WebRtcSdp = Message<{ + /** + * TxSeqno is the sequence number of the transmitting peer. + * The receiver should update the local seqno to match. + * + * @generated from field: uint64 tx_seqno = 1; + */ + txSeqno?: bigint; + /** + * SdpType is the string encoded type of the sdp. + * Examples: "offer" "answer" + * + * @generated from field: string sdp_type = 2; + */ + sdpType?: string; + /** + * Sdp contains the WebRTC session description. + * + * @generated from field: string sdp = 3; + */ + sdp?: string; + +}>; + +export const WebRtcSdp: MessageType = createMessageType( + { + typeName: "webrtc.WebRtcSdp", + fields: [ + { no: 1, name: "tx_seqno", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 2, name: "sdp_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "sdp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + +/** + * WebRtcIce contains an ICE candidate. + * + * @generated from message webrtc.WebRtcIce + */ +export type WebRtcIce = Message<{ + /** + * Candidate contains the JSON-encoded ICE candidate. + * + * @generated from field: string candidate = 1; + */ + candidate?: string; + +}>; + +export const WebRtcIce: MessageType = createMessageType( + { + typeName: "webrtc.WebRtcIce", + fields: [ + { no: 1, name: "candidate", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + +/** + * WebRtcSignal is a WebRTC Signaling message sent via the Signaling channel. + * + * @generated from message webrtc.WebRtcSignal + */ +export type WebRtcSignal = Message<{ + + /** + * Body is the body of the message. + * + * @generated from oneof webrtc.WebRtcSignal.body + */ + body?: { + value?: undefined, + case: undefined + } | { + /** + * RequestOffer requests a new offer from the offerer with the local session seqno. + * Incremented when negotiation is needed (something changes about the session). + * + * @generated from field: uint64 request_offer = 1; + */ + value: bigint; + case: "requestOffer"; + } | { + /** + * Sdp contains the sdp offer or answer. + * + * @generated from field: webrtc.WebRtcSdp sdp = 2; + */ + value: WebRtcSdp; + case: "sdp"; + } | { + /** + * Ice contains an ICE candidate. + * + * @generated from field: webrtc.WebRtcIce ice = 3; + */ + value: WebRtcIce; + case: "ice"; + }; + +}>; + +export const WebRtcSignal: MessageType = createMessageType( + { + typeName: "webrtc.WebRtcSignal", + fields: [ + { no: 1, name: "request_offer", kind: "scalar", T: 4 /* ScalarType.UINT64 */, oneof: "body" }, + { no: 2, name: "sdp", kind: "message", T: () => WebRtcSdp, oneof: "body" }, + { no: 3, name: "ice", kind: "message", T: () => WebRtcIce, oneof: "body" }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); + diff --git a/transport/webrtc/webrtc_pb.ts b/transport/webrtc/webrtc_pb.ts deleted file mode 100644 index 8afd22cd..00000000 --- a/transport/webrtc/webrtc_pb.ts +++ /dev/null @@ -1,479 +0,0 @@ -// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false" -// @generated from file github.com/aperturerobotics/bifrost/transport/webrtc/webrtc.proto (package webrtc, syntax proto3) -/* eslint-disable */ - -import { - createEnumType, - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import { Opts } from '../common/quic/quic_pb.js' -import { Backoff } from '@go/github.com/aperturerobotics/util/backoff/backoff_pb.js' -import { DialerOpts } from '../common/dialer/dialer_pb.js' - -export const protobufPackage = 'webrtc' - -/** - * IceTransportPolicy contains the set of allowed ICE transport policies. - * - * @generated from enum webrtc.IceTransportPolicy - */ -export enum IceTransportPolicy { - /** - * IceTransportPolicy_ALL allows any kind of ICE candidate. - * - * @generated from enum value: IceTransportPolicy_ALL = 0; - */ - IceTransportPolicy_ALL = 0, - - /** - * IceTransportPolicy_RELAY allows only media relay candidates (TURN). - * - * @generated from enum value: IceTransportPolicy_RELAY = 1; - */ - IceTransportPolicy_RELAY = 1, -} - -// IceTransportPolicy_Enum is the enum type for IceTransportPolicy. -export const IceTransportPolicy_Enum = createEnumType( - 'webrtc.IceTransportPolicy', - [ - { no: 0, name: 'IceTransportPolicy_ALL' }, - { no: 1, name: 'IceTransportPolicy_RELAY' }, - ], -) - -/** - * OauthCredential is an OAuth credential information for the ICE server. - * - * @generated from message webrtc.IceServerConfig.OauthCredential - */ -export interface IceServerConfig_OauthCredential - extends Message { - /** - * MacKey is a base64-url format. - * - * @generated from field: string mac_key = 1; - */ - macKey?: string - /** - * AccessToken is the access token in base64-encoded format. - * - * @generated from field: string access_token = 2; - */ - accessToken?: string -} - -export const IceServerConfig_OauthCredential: MessageType = - createMessageType({ - typeName: 'webrtc.IceServerConfig.OauthCredential', - fields: [ - { no: 1, name: 'mac_key', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { - no: 2, - name: 'access_token', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, - }) - -/** - * IceServer is a WebRTC ICE server config. - * - * @generated from message webrtc.IceServerConfig - */ -export interface IceServerConfig extends Message { - /** - * Urls is the list of URLs for the ICE server. - * - * Format: stun:{url} or turn:{url} or turns:{url}?transport=tcp - * Examples: - * - stun:stun.l.google.com:19302 - * - stun:stun.stunprotocol.org:3478 - * - turns:google.de?transport=tcp - * - * @generated from field: repeated string urls = 1; - */ - urls?: string[] - /** - * Username is the username for the ICE server. - * - * @generated from field: string username = 2; - */ - username?: string - - /** - * Credential contains the ice server credential, if any. - * - * @generated from oneof webrtc.IceServerConfig.credential - */ - credential?: - | { - value?: undefined - case: undefined - } - | { - /** - * Password contains the ICE server password. - * - * @generated from field: string password = 3; - */ - value: string - case: 'password' - } - | { - /** - * Oauth contains an OAuth credential. - * - * @generated from field: webrtc.IceServerConfig.OauthCredential oauth = 4; - */ - value: IceServerConfig_OauthCredential - case: 'oauth' - } -} - -export const IceServerConfig: MessageType = createMessageType({ - typeName: 'webrtc.IceServerConfig', - fields: [ - { - no: 1, - name: 'urls', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - repeated: true, - }, - { no: 2, name: 'username', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { - no: 3, - name: 'password', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - oneof: 'credential', - }, - { - no: 4, - name: 'oauth', - kind: 'message', - T: IceServerConfig_OauthCredential, - oneof: 'credential', - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) - -/** - * WebRtcConfig configures the WebRTC PeerConnection. - * - * @generated from message webrtc.WebRtcConfig - */ -export interface WebRtcConfig extends Message { - /** - * IceServers contains the list of ICE servers to use. - * - * @generated from field: repeated webrtc.IceServerConfig ice_servers = 1; - */ - iceServers?: IceServerConfig[] - /** - * IceTransportPolicy defines the policy for permitted ICE candidates. - * Optional. - * - * @generated from field: webrtc.IceTransportPolicy ice_transport_policy = 2; - */ - iceTransportPolicy?: IceTransportPolicy - /** - * IceCandidatePoolSize defines the size of the prefetched ICE pool. - * Optional. - * - * @generated from field: uint32 ice_candidate_pool_size = 3; - */ - iceCandidatePoolSize?: number -} - -export const WebRtcConfig: MessageType = createMessageType({ - typeName: 'webrtc.WebRtcConfig', - fields: [ - { - no: 1, - name: 'ice_servers', - kind: 'message', - T: IceServerConfig, - repeated: true, - }, - { - no: 2, - name: 'ice_transport_policy', - kind: 'enum', - T: IceTransportPolicy_Enum, - }, - { - no: 3, - name: 'ice_candidate_pool_size', - kind: 'scalar', - T: 13 /* ScalarType.UINT32 */, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) - -/** - * Config is the configuration for the WebRTC Signal RPC transport. - * - * @generated from message webrtc.Config - */ -export interface Config extends Message { - /** - * SignalingId is the signaling channel identifier. - * Cannot be empty. - * - * @generated from field: string signaling_id = 1; - */ - signalingId?: string - /** - * TransportPeerId sets the peer ID to attach the transport to. - * If unset, attaches to any running peer with a private key. - * Must match the transport peer ID of the signaling transport. - * - * @generated from field: string transport_peer_id = 2; - */ - transportPeerId?: string - /** - * TransportType overrides the transport type id for dial addresses. - * Defaults to "webrtc" - * Configures the scheme for addr matching to this transport. - * E.x.: webrtc:// - * - * @generated from field: string transport_type = 3; - */ - transportType?: string - /** - * Quic contains the quic protocol options. - * - * The WebRTC transport always disables FEC and several other UDP-centric - * features which are unnecessary due to the "reliable" nature of WebRTC. - * - * @generated from field: transport.quic.Opts quic = 4; - */ - quic?: Opts - /** - * WebRtc contains the WebRTC protocol options. - * - * @generated from field: webrtc.WebRtcConfig web_rtc = 5; - */ - webRtc?: WebRtcConfig - /** - * Backoff is the backoff config for connecting to a PeerConnection. - * If unset, defaults to reasonable defaults. - * - * @generated from field: backoff.Backoff backoff = 6; - */ - backoff?: Backoff - /** - * Dialers maps peer IDs to dialers. - * This allows mapping which peer ID should be dialed via this transport. - * - * @generated from field: map dialers = 7; - */ - dialers?: { [key: string]: DialerOpts } - /** - * AllPeers tells the transport to attempt to negotiate a WebRTC session with - * any peer, even those not listed in the Dialers map. - * - * @generated from field: bool all_peers = 8; - */ - allPeers?: boolean - /** - * DisableListen disables listening for incoming Links. - * If set, we will only dial out, not accept incoming links. - * - * @generated from field: bool disable_listen = 9; - */ - disableListen?: boolean - /** - * BlockPeers is a list of peer ids that will not be contacted via this transport. - * - * @generated from field: repeated string block_peers = 10; - */ - blockPeers?: string[] - /** - * Verbose enables very verbose logging. - * - * @generated from field: bool verbose = 11; - */ - verbose?: boolean -} - -export const Config: MessageType = createMessageType({ - typeName: 'webrtc.Config', - fields: [ - { - no: 1, - name: 'signaling_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { - no: 2, - name: 'transport_peer_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { - no: 3, - name: 'transport_type', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { no: 4, name: 'quic', kind: 'message', T: Opts }, - { no: 5, name: 'web_rtc', kind: 'message', T: WebRtcConfig }, - { no: 6, name: 'backoff', kind: 'message', T: Backoff }, - { - no: 7, - name: 'dialers', - kind: 'map', - K: 9 /* ScalarType.STRING */, - V: { kind: 'message', T: DialerOpts }, - }, - { no: 8, name: 'all_peers', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - { - no: 9, - name: 'disable_listen', - kind: 'scalar', - T: 8 /* ScalarType.BOOL */, - }, - { - no: 10, - name: 'block_peers', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - repeated: true, - }, - { no: 11, name: 'verbose', kind: 'scalar', T: 8 /* ScalarType.BOOL */ }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) - -/** - * WebRtcSdp contains the SDP offer or answer. - * - * @generated from message webrtc.WebRtcSdp - */ -export interface WebRtcSdp extends Message { - /** - * TxSeqno is the sequence number of the transmitting peer. - * The receiver should update the local seqno to match. - * - * @generated from field: uint64 tx_seqno = 1; - */ - txSeqno?: bigint - /** - * SdpType is the string encoded type of the sdp. - * Examples: "offer" "answer" - * - * @generated from field: string sdp_type = 2; - */ - sdpType?: string - /** - * Sdp contains the WebRTC session description. - * - * @generated from field: string sdp = 3; - */ - sdp?: string -} - -export const WebRtcSdp: MessageType = createMessageType({ - typeName: 'webrtc.WebRtcSdp', - fields: [ - { no: 1, name: 'tx_seqno', kind: 'scalar', T: 4 /* ScalarType.UINT64 */ }, - { no: 2, name: 'sdp_type', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { no: 3, name: 'sdp', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) - -/** - * WebRtcIce contains an ICE candidate. - * - * @generated from message webrtc.WebRtcIce - */ -export interface WebRtcIce extends Message { - /** - * Candidate contains the JSON-encoded ICE candidate. - * - * @generated from field: string candidate = 1; - */ - candidate?: string -} - -export const WebRtcIce: MessageType = createMessageType({ - typeName: 'webrtc.WebRtcIce', - fields: [ - { no: 1, name: 'candidate', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) - -/** - * WebRtcSignal is a WebRTC Signaling message sent via the Signaling channel. - * - * @generated from message webrtc.WebRtcSignal - */ -export interface WebRtcSignal extends Message { - /** - * Body is the body of the message. - * - * @generated from oneof webrtc.WebRtcSignal.body - */ - body?: - | { - value?: undefined - case: undefined - } - | { - /** - * RequestOffer requests a new offer from the offerer with the local session seqno. - * Incremented when negotiation is needed (something changes about the session). - * - * @generated from field: uint64 request_offer = 1; - */ - value: bigint - case: 'requestOffer' - } - | { - /** - * Sdp contains the sdp offer or answer. - * - * @generated from field: webrtc.WebRtcSdp sdp = 2; - */ - value: WebRtcSdp - case: 'sdp' - } - | { - /** - * Ice contains an ICE candidate. - * - * @generated from field: webrtc.WebRtcIce ice = 3; - */ - value: WebRtcIce - case: 'ice' - } -} - -export const WebRtcSignal: MessageType = createMessageType({ - typeName: 'webrtc.WebRtcSignal', - fields: [ - { - no: 1, - name: 'request_offer', - kind: 'scalar', - T: 4 /* ScalarType.UINT64 */, - oneof: 'body', - }, - { no: 2, name: 'sdp', kind: 'message', T: WebRtcSdp, oneof: 'body' }, - { no: 3, name: 'ice', kind: 'message', T: WebRtcIce, oneof: 'body' }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/transport/websocket/websocket_pb.ts b/transport/websocket/websocket.pb.ts similarity index 59% rename from transport/websocket/websocket_pb.ts rename to transport/websocket/websocket.pb.ts index 1288fa37..eda12e47 100644 --- a/transport/websocket/websocket_pb.ts +++ b/transport/websocket/websocket.pb.ts @@ -2,16 +2,12 @@ // @generated from file github.com/aperturerobotics/bifrost/transport/websocket/websocket.proto (package websocket, syntax proto3) /* eslint-disable */ -import { - createMessageType, - Message, - MessageType, - PartialFieldInfo, -} from '@aptre/protobuf-es-lite' -import { Opts } from '../common/quic/quic_pb.js' -import { DialerOpts } from '../common/dialer/dialer_pb.js' +import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite"; +import { createMessageType, Message } from "@aptre/protobuf-es-lite"; +import { Opts } from "../common/quic/quic.pb.js"; +import { DialerOpts } from "../common/dialer/dialer.pb.js"; -export const protobufPackage = 'websocket' +export const protobufPackage = "websocket"; /** * Config is the configuration for the Websocket transport. @@ -23,21 +19,21 @@ export const protobufPackage = 'websocket' * * @generated from message websocket.Config */ -export interface Config extends Message { +export type Config = Message<{ /** * TransportPeerID sets the peer ID to attach the transport to. * If unset, attaches to any running peer with a private key. * * @generated from field: string transport_peer_id = 1; */ - transportPeerId?: string + transportPeerId?: string; /** * ListenAddr contains the address to listen on. * Has no effect in the browser. * * @generated from field: string listen_addr = 2; */ - listenAddr?: string + listenAddr?: string; /** * Quic contains the quic protocol options. * @@ -46,20 +42,20 @@ export interface Config extends Message { * * @generated from field: transport.quic.Opts quic = 3; */ - quic?: Opts + quic?: Opts; /** * Dialers maps peer IDs to dialers. * * @generated from field: map dialers = 4; */ - dialers?: { [key: string]: DialerOpts } + dialers?: { [key: string]: DialerOpts }; /** * HttpPath is the http path to expose the websocket. * If unset, ignores the incoming request path. * * @generated from field: string http_path = 5; */ - httpPath?: string + httpPath?: string; /** * DisableServePeerId disables serving the peer id. * If this is unset the peer ID is available at http_path+"/peer" @@ -67,39 +63,22 @@ export interface Config extends Message { * * @generated from field: bool disable_serve_peer_id = 6; */ - disableServePeerId?: boolean -} + disableServePeerId?: boolean; + +}>; + +export const Config: MessageType = createMessageType( + { + typeName: "websocket.Config", + fields: [ + { no: 1, name: "transport_peer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "listen_addr", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "quic", kind: "message", T: () => Opts }, + { no: 4, name: "dialers", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: () => DialerOpts} }, + { no: 5, name: "http_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "disable_serve_peer_id", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ] as readonly PartialFieldInfo[], + packedByDefault: true, + }, +); -export const Config: MessageType = createMessageType({ - typeName: 'websocket.Config', - fields: [ - { - no: 1, - name: 'transport_peer_id', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { - no: 2, - name: 'listen_addr', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - }, - { no: 3, name: 'quic', kind: 'message', T: Opts }, - { - no: 4, - name: 'dialers', - kind: 'map', - K: 9 /* ScalarType.STRING */, - V: { kind: 'message', T: DialerOpts }, - }, - { no: 5, name: 'http_path', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { - no: 6, - name: 'disable_serve_peer_id', - kind: 'scalar', - T: 8 /* ScalarType.BOOL */, - }, - ] as readonly PartialFieldInfo[], - packedByDefault: true, -}) diff --git a/tsconfig.json b/tsconfig.json index d07e50c8..56066481 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { - "module": "esnext", "target": "esnext", - "moduleResolution": "node", + "module": "Node16", + "moduleResolution": "Node16", "jsx": "react", "baseUrl": "./", "paths": { diff --git a/yarn.lock b/yarn.lock index 0638fab2..9e48d90c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,25 +2,19 @@ # yarn lockfile v1 -"@aashutoshrathi/word-wrap@^1.2.3": - version "1.2.6" - resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" - integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== - "@aptre/common@^0.14.3": - version "0.14.3" - resolved "https://registry.yarnpkg.com/@aptre/common/-/common-0.14.3.tgz#410c3c5f7543c8252fea8f760ab8795d112cad95" - integrity sha512-tYhe86jvQUTnp7Jv4VyiDkqs79z59GiRyNJxvvqJI7UPgVMxQAiT4j9TOKQllFk1ZNzfqnRQH4EYme85TkD0fw== - dependencies: - "@aptre/protobuf-es-lite" "^0.2.6" - "@bufbuild/protobuf" "^1.8.0" - "@typescript-eslint/eslint-plugin" "^7.7.0" - "@typescript-eslint/parser" "^7.7.0" + version "0.14.8" + resolved "https://registry.yarnpkg.com/@aptre/common/-/common-0.14.8.tgz#19615abf141f55271cacac879ebb25e7c34bcf1f" + integrity sha512-h080G2NbFkc+NPAWhfmVofmtxo5HpMSaUuYnfX+3YcP6sNQ3YaWk/XIaFJexEEAPMgu1zsQVXS+Rox6XMfl96g== + dependencies: + "@aptre/protobuf-es-lite" "^0.2.14" + "@typescript-eslint/eslint-plugin" "^7.8.0" + "@typescript-eslint/parser" "^7.8.0" eslint "^9.1.0" eslint-config-prettier "^9.0.0" eslint-plugin-react-hooks "^4.6.1" eslint-plugin-unused-imports "^3.0.0" - starpc "^0.31.10" + starpc "^0.31.12" "@aptre/it-ws@^1.0.0": version "1.0.0" @@ -33,15 +27,15 @@ uint8arrays "^5.0.0" ws "^8.4.0" -"@aptre/protobuf-es-lite@^0.2.6": - version "0.2.6" - resolved "https://registry.yarnpkg.com/@aptre/protobuf-es-lite/-/protobuf-es-lite-0.2.6.tgz#4155504b95666f65f9dd13540e731c72bc287f7a" - integrity sha512-JzqoFceAWdm+Hs8XLpXiFHpRgDLTAOafecsXOp0TPeVDs+9ezBw+U9x3CH9AmlZ5cipqlYCu+FlfgWBfiNLgzw== +"@aptre/protobuf-es-lite@^0.2.14": + version "0.2.14" + resolved "https://registry.yarnpkg.com/@aptre/protobuf-es-lite/-/protobuf-es-lite-0.2.14.tgz#7f0008d91ac37769a57a7f7b98190368ed81d3fa" + integrity sha512-ctwZi3FVGqPrOBwDR9C1ljeg1ubppOt3nbQiCP25bw00KcxNiARP1L58AD+fUbnfWTdjWaWiFrWoTIN3MdWQkQ== dependencies: - "@bufbuild/protobuf" "^1.9.0" - "@bufbuild/protoplugin" "1.9.0" + "@typescript/vfs" "^1.5.0" + lz-string "^1.5.0" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.1": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.2": version "7.24.2" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.2.tgz#718b4b19841809a58b29b68cde80bc5e1aa6d9ae" integrity sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ== @@ -49,12 +43,12 @@ "@babel/highlight" "^7.24.2" picocolors "^1.0.0" -"@babel/generator@^7.24.1": - version "7.24.4" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.4.tgz#1fc55532b88adf952025d5d2d1e71f946cb1c498" - integrity sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw== +"@babel/generator@^7.24.5": + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.5.tgz#e5afc068f932f05616b66713e28d0f04e99daeb3" + integrity sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA== dependencies: - "@babel/types" "^7.24.0" + "@babel/types" "^7.24.5" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^2.5.1" @@ -79,37 +73,37 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-split-export-declaration@^7.22.6": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" - integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== +"@babel/helper-split-export-declaration@^7.24.5": + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz#b9a67f06a46b0b339323617c8c6213b9055a78b6" + integrity sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q== dependencies: - "@babel/types" "^7.22.5" + "@babel/types" "^7.24.5" -"@babel/helper-string-parser@^7.23.4": +"@babel/helper-string-parser@^7.24.1": version "7.24.1" resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz#f99c36d3593db9540705d0739a1f10b5e20c696e" integrity sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ== -"@babel/helper-validator-identifier@^7.22.20": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" - integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== +"@babel/helper-validator-identifier@^7.24.5": + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz#918b1a7fa23056603506370089bd990d8720db62" + integrity sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA== "@babel/highlight@^7.24.2": - version "7.24.2" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.2.tgz#3f539503efc83d3c59080a10e6634306e0370d26" - integrity sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA== + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.5.tgz#bc0613f98e1dd0720e99b2a9ee3760194a704b6e" + integrity sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw== dependencies: - "@babel/helper-validator-identifier" "^7.22.20" + "@babel/helper-validator-identifier" "^7.24.5" chalk "^2.4.2" js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/parser@^7.23.0", "@babel/parser@^7.24.0", "@babel/parser@^7.24.1", "@babel/parser@^7.24.4": - version "7.24.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.4.tgz#234487a110d89ad5a3ed4a8a566c36b9453e8c88" - integrity sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg== +"@babel/parser@^7.23.0", "@babel/parser@^7.24.0", "@babel/parser@^7.24.4", "@babel/parser@^7.24.5": + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.5.tgz#4a4d5ab4315579e5398a82dcf636ca80c3392790" + integrity sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg== "@babel/template@^7.22.15": version "7.24.0" @@ -121,44 +115,30 @@ "@babel/types" "^7.24.0" "@babel/traverse@^7.23.2": - version "7.24.1" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.1.tgz#d65c36ac9dd17282175d1e4a3c49d5b7988f530c" - integrity sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ== + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.5.tgz#972aa0bc45f16983bf64aa1f877b2dd0eea7e6f8" + integrity sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA== dependencies: - "@babel/code-frame" "^7.24.1" - "@babel/generator" "^7.24.1" + "@babel/code-frame" "^7.24.2" + "@babel/generator" "^7.24.5" "@babel/helper-environment-visitor" "^7.22.20" "@babel/helper-function-name" "^7.23.0" "@babel/helper-hoist-variables" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/parser" "^7.24.1" - "@babel/types" "^7.24.0" + "@babel/helper-split-export-declaration" "^7.24.5" + "@babel/parser" "^7.24.5" + "@babel/types" "^7.24.5" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.24.0": - version "7.24.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.0.tgz#3b951f435a92e7333eba05b7566fd297960ea1bf" - integrity sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w== +"@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.24.0", "@babel/types@^7.24.5": + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.5.tgz#7661930afc638a5383eb0c4aee59b74f38db84d7" + integrity sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ== dependencies: - "@babel/helper-string-parser" "^7.23.4" - "@babel/helper-validator-identifier" "^7.22.20" + "@babel/helper-string-parser" "^7.24.1" + "@babel/helper-validator-identifier" "^7.24.5" to-fast-properties "^2.0.0" -"@bufbuild/protobuf@1.9.0", "@bufbuild/protobuf@^1.8.0", "@bufbuild/protobuf@^1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@bufbuild/protobuf/-/protobuf-1.9.0.tgz#fffac3183059a41ceef5311e07e3724d426a95c4" - integrity sha512-W7gp8Q/v1NlCZLsv8pQ3Y0uCu/SHgXOVFK+eUluUKWXmsb6VHkpNx0apdOWWcDbB9sJoKeP8uPrjmehJz6xETQ== - -"@bufbuild/protoplugin@1.9.0", "@bufbuild/protoplugin@^1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@bufbuild/protoplugin/-/protoplugin-1.9.0.tgz#a7f3ef12872c392abb38ba6de7639c5a633c0ec3" - integrity sha512-/mxMiGs5h78RUHT7v4+mv0Wt0gyRf/SOS5PLzKEg2sclEAlFPbXfZ8HjlvxJpXZP/YpP3HvsW/mil3E69G0mXg== - dependencies: - "@bufbuild/protobuf" "1.9.0" - "@typescript/vfs" "^1.4.0" - typescript "4.5.2" - "@chainsafe/is-ip@^2.0.1", "@chainsafe/is-ip@^2.0.2": version "2.0.2" resolved "https://registry.yarnpkg.com/@chainsafe/is-ip/-/is-ip-2.0.2.tgz#7311e7403f11d8c5cfa48111f56fcecaac37c9f6" @@ -435,16 +415,16 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^7.7.0": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.1.tgz#50a9044e3e5fe76b22caf64fb7fc1f97614bdbfd" - integrity sha512-KwfdWXJBOviaBVhxO3p5TJiLpNuh2iyXyjmWN0f1nU87pwyvfS0EmjC6ukQVYVFJd/K1+0NWGPDXiyEyQorn0Q== +"@typescript-eslint/eslint-plugin@^7.8.0": + version "7.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.8.0.tgz#c78e309fe967cb4de05b85cdc876fb95f8e01b6f" + integrity sha512-gFTT+ezJmkwutUPmB0skOj3GZJtlEGnlssems4AjkVweUPGj7jRwwqg0Hhg7++kPGJqKtTYx+R05Ftww372aIg== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "7.7.1" - "@typescript-eslint/type-utils" "7.7.1" - "@typescript-eslint/utils" "7.7.1" - "@typescript-eslint/visitor-keys" "7.7.1" + "@typescript-eslint/scope-manager" "7.8.0" + "@typescript-eslint/type-utils" "7.8.0" + "@typescript-eslint/utils" "7.8.0" + "@typescript-eslint/visitor-keys" "7.8.0" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.3.1" @@ -452,47 +432,47 @@ semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/parser@^7.7.0": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.7.1.tgz#f940e9f291cdca40c46cb75916217d3a42d6ceea" - integrity sha512-vmPzBOOtz48F6JAGVS/kZYk4EkXao6iGrD838sp1w3NQQC0W8ry/q641KU4PrG7AKNAf56NOcR8GOpH8l9FPCw== +"@typescript-eslint/parser@^7.8.0": + version "7.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.8.0.tgz#1e1db30c8ab832caffee5f37e677dbcb9357ddc8" + integrity sha512-KgKQly1pv0l4ltcftP59uQZCi4HUYswCLbTqVZEJu7uLX8CTLyswqMLqLN+2QFz4jCptqWVV4SB7vdxcH2+0kQ== dependencies: - "@typescript-eslint/scope-manager" "7.7.1" - "@typescript-eslint/types" "7.7.1" - "@typescript-eslint/typescript-estree" "7.7.1" - "@typescript-eslint/visitor-keys" "7.7.1" + "@typescript-eslint/scope-manager" "7.8.0" + "@typescript-eslint/types" "7.8.0" + "@typescript-eslint/typescript-estree" "7.8.0" + "@typescript-eslint/visitor-keys" "7.8.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.7.1.tgz#07fe59686ca843f66e3e2b5c151522bc38effab2" - integrity sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA== +"@typescript-eslint/scope-manager@7.8.0": + version "7.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.8.0.tgz#bb19096d11ec6b87fb6640d921df19b813e02047" + integrity sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g== dependencies: - "@typescript-eslint/types" "7.7.1" - "@typescript-eslint/visitor-keys" "7.7.1" + "@typescript-eslint/types" "7.8.0" + "@typescript-eslint/visitor-keys" "7.8.0" -"@typescript-eslint/type-utils@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.7.1.tgz#2f8094edca3bebdaad009008929df645ed9c8743" - integrity sha512-ZksJLW3WF7o75zaBPScdW1Gbkwhd/lyeXGf1kQCxJaOeITscoSl0MjynVvCzuV5boUz/3fOI06Lz8La55mu29Q== +"@typescript-eslint/type-utils@7.8.0": + version "7.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.8.0.tgz#9de166f182a6e4d1c5da76e94880e91831e3e26f" + integrity sha512-H70R3AefQDQpz9mGv13Uhi121FNMh+WEaRqcXTX09YEDky21km4dV1ZXJIp8QjXc4ZaVkXVdohvWDzbnbHDS+A== dependencies: - "@typescript-eslint/typescript-estree" "7.7.1" - "@typescript-eslint/utils" "7.7.1" + "@typescript-eslint/typescript-estree" "7.8.0" + "@typescript-eslint/utils" "7.8.0" debug "^4.3.4" ts-api-utils "^1.3.0" -"@typescript-eslint/types@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.7.1.tgz#f903a651fb004c75add08e4e9e207f169d4b98d7" - integrity sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w== +"@typescript-eslint/types@7.8.0": + version "7.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.8.0.tgz#1fd2577b3ad883b769546e2d1ef379f929a7091d" + integrity sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw== -"@typescript-eslint/typescript-estree@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.1.tgz#5cafde48fe390fe1c1b329b2ce0ba8a73c1e87b2" - integrity sha512-CXe0JHCXru8Fa36dteXqmH2YxngKJjkQLjxzoj6LYwzZ7qZvgsLSc+eqItCrqIop8Vl2UKoAi0StVWu97FQZIQ== +"@typescript-eslint/typescript-estree@7.8.0": + version "7.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.8.0.tgz#b028a9226860b66e623c1ee55cc2464b95d2987c" + integrity sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg== dependencies: - "@typescript-eslint/types" "7.7.1" - "@typescript-eslint/visitor-keys" "7.7.1" + "@typescript-eslint/types" "7.8.0" + "@typescript-eslint/visitor-keys" "7.8.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -500,80 +480,80 @@ semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/utils@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.7.1.tgz#5d161f2b4a55e1bc38b634bebb921e4bd4e4a16e" - integrity sha512-QUvBxPEaBXf41ZBbaidKICgVL8Hin0p6prQDu6bbetWo39BKbWJxRsErOzMNT1rXvTll+J7ChrbmMCXM9rsvOQ== +"@typescript-eslint/utils@7.8.0": + version "7.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.8.0.tgz#57a79f9c0c0740ead2f622e444cfaeeb9fd047cd" + integrity sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.15" "@types/semver" "^7.5.8" - "@typescript-eslint/scope-manager" "7.7.1" - "@typescript-eslint/types" "7.7.1" - "@typescript-eslint/typescript-estree" "7.7.1" + "@typescript-eslint/scope-manager" "7.8.0" + "@typescript-eslint/types" "7.8.0" + "@typescript-eslint/typescript-estree" "7.8.0" semver "^7.6.0" -"@typescript-eslint/visitor-keys@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.1.tgz#da2294796220bb0f3b4add5ecbb1b9c3f4f65798" - integrity sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw== +"@typescript-eslint/visitor-keys@7.8.0": + version "7.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.8.0.tgz#7285aab991da8bee411a42edbd5db760d22fdd91" + integrity sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA== dependencies: - "@typescript-eslint/types" "7.7.1" + "@typescript-eslint/types" "7.8.0" eslint-visitor-keys "^3.4.3" -"@typescript/vfs@^1.4.0": +"@typescript/vfs@^1.5.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@typescript/vfs/-/vfs-1.5.0.tgz#ed942922724f9ace8c07c80b006c47e5e3833218" integrity sha512-AJS307bPgbsZZ9ggCT3wwpg3VbTKMFNHfaY/uF0ahSkYYrPF2dSSKDNIDIQAHm9qJqbLvCsSJH7yN4Vs/CsMMg== dependencies: debug "^4.1.1" -"@vue/compiler-core@3.4.25": - version "3.4.25" - resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.4.25.tgz#691f59ee5014f6f2a2488fd4465f892e1e82f729" - integrity sha512-Y2pLLopaElgWnMNolgG8w3C5nNUVev80L7hdQ5iIKPtMJvhVpG0zhnBG/g3UajJmZdvW0fktyZTotEHD1Srhbg== +"@vue/compiler-core@3.4.26": + version "3.4.26" + resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.4.26.tgz#d507886520e83a6f8339ed55ed0b2b5d84b44b73" + integrity sha512-N9Vil6Hvw7NaiyFUFBPXrAyETIGlQ8KcFMkyk6hW1Cl6NvoqvP+Y8p1Eqvx+UdqsnrnI9+HMUEJegzia3mhXmQ== dependencies: "@babel/parser" "^7.24.4" - "@vue/shared" "3.4.25" + "@vue/shared" "3.4.26" entities "^4.5.0" estree-walker "^2.0.2" source-map-js "^1.2.0" -"@vue/compiler-dom@3.4.25": - version "3.4.25" - resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.4.25.tgz#b367e0c84e11d9e9f70beabdd6f6b2277fde375f" - integrity sha512-Ugz5DusW57+HjllAugLci19NsDK+VyjGvmbB2TXaTcSlQxwL++2PETHx/+Qv6qFwNLzSt7HKepPe4DcTE3pBWg== +"@vue/compiler-dom@3.4.26": + version "3.4.26" + resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.4.26.tgz#acc7b788b48152d087d4bb9e655b795e3dbec554" + integrity sha512-4CWbR5vR9fMg23YqFOhr6t6WB1Fjt62d6xdFPyj8pxrYub7d+OgZaObMsoxaF9yBUHPMiPFK303v61PwAuGvZA== dependencies: - "@vue/compiler-core" "3.4.25" - "@vue/shared" "3.4.25" + "@vue/compiler-core" "3.4.26" + "@vue/shared" "3.4.26" "@vue/compiler-sfc@^3.3.4": - version "3.4.25" - resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.4.25.tgz#ceab148f81571c8b251e8a8b75a9972addf1db8b" - integrity sha512-m7rryuqzIoQpOBZ18wKyq05IwL6qEpZxFZfRxlNYuIPDqywrXQxgUwLXIvoU72gs6cRdY6wHD0WVZIFE4OEaAQ== + version "3.4.26" + resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.4.26.tgz#c679f206829954c3c078d8a9be76d0098b8377ae" + integrity sha512-It1dp+FAOCgluYSVYlDn5DtZBxk1NCiJJfu2mlQqa/b+k8GL6NG/3/zRbJnHdhV2VhxFghaDq5L4K+1dakW6cw== dependencies: "@babel/parser" "^7.24.4" - "@vue/compiler-core" "3.4.25" - "@vue/compiler-dom" "3.4.25" - "@vue/compiler-ssr" "3.4.25" - "@vue/shared" "3.4.25" + "@vue/compiler-core" "3.4.26" + "@vue/compiler-dom" "3.4.26" + "@vue/compiler-ssr" "3.4.26" + "@vue/shared" "3.4.26" estree-walker "^2.0.2" magic-string "^0.30.10" postcss "^8.4.38" source-map-js "^1.2.0" -"@vue/compiler-ssr@3.4.25": - version "3.4.25" - resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.4.25.tgz#7fdd540bfdf2d4a3d6cb107b7ba4c77228d36331" - integrity sha512-H2ohvM/Pf6LelGxDBnfbbXFPyM4NE3hrw0e/EpwuSiYu8c819wx+SVGdJ65p/sFrYDd6OnSDxN1MB2mN07hRSQ== +"@vue/compiler-ssr@3.4.26": + version "3.4.26" + resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.4.26.tgz#22842d8adfff972d87bb798b8d496111f7f814b5" + integrity sha512-FNwLfk7LlEPRY/g+nw2VqiDKcnDTVdCfBREekF8X74cPLiWHUX6oldktf/Vx28yh4STNy7t+/yuLoMBBF7YDiQ== dependencies: - "@vue/compiler-dom" "3.4.25" - "@vue/shared" "3.4.25" + "@vue/compiler-dom" "3.4.26" + "@vue/shared" "3.4.26" -"@vue/shared@3.4.25": - version "3.4.25" - resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.4.25.tgz#243ba8543e7401751e0ca319f75a80f153edd273" - integrity sha512-k0yappJ77g2+KNrIaF0FFnzwLvUBLUYr8VOwz+/6vLsmItFp51AcxLL7Ey3iPd7BIRyWPOcqUjMnm7OkahXllA== +"@vue/shared@3.4.26": + version "3.4.26" + resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.4.26.tgz#f17854fb1faf889854aed4b23b60e86a8cab6403" + integrity sha512-Fg4zwR0GNnjzodMt3KRy2AWGMKQXByl56+4HjN87soxLNU9P5xcJkstAlIeEF3cU6UYOzmJl1tV0dVPGIljCnQ== acorn-jsx@^5.3.2: version "5.3.2" @@ -899,9 +879,9 @@ eslint-config-prettier@^9.0.0: integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== eslint-plugin-react-hooks@^4.6.1: - version "4.6.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.1.tgz#85a7e271da14ae4eb4ed717abb4db6e99700550f" - integrity sha512-Ck77j8hF7l9N4S/rzSLOWEKpn994YH6iwUK8fr9mXIaQvGpQYmOnQLbiue1u5kI5T1y+gdgqosnEAO9NCz0DBg== + version "4.6.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz#c829eb06c0e6f484b3fbb85a97e57784f328c596" + integrity sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ== eslint-plugin-unused-imports@^3.0.0: version "3.1.0" @@ -1477,9 +1457,9 @@ lodash@^4.17.21: integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== lru-cache@^10.2.0: - version "10.2.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.1.tgz#e8d901141f22937968e45a6533d52824070151e4" - integrity sha512-tS24spDe/zXhWbNPErCHs/AGOzbKGHT+ybSBqmdLm8WZ1xXLWvH8Qn71QPAlqVhd0qUTWjy+Kl9JmISgDdEjsA== + version "10.2.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.2.tgz#48206bc114c1252940c41b25b41af5b545aca878" + integrity sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ== lru-cache@^6.0.0: version "6.0.0" @@ -1488,6 +1468,11 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +lz-string@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941" + integrity sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ== + magic-string@^0.30.10: version "0.30.10" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.10.tgz#123d9c41a0cb5640c892b041d4cfb3bd0aa4b39e" @@ -1495,11 +1480,6 @@ magic-string@^0.30.10: dependencies: "@jridgewell/sourcemap-codec" "^1.4.15" -memoize-one@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-6.0.0.tgz#b2591b871ed82948aee4727dc6abceeeac8c1045" - integrity sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw== - merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" @@ -1576,16 +1556,16 @@ netmask@^2.0.2: integrity sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg== optionator@^0.9.3: - version "0.9.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" - integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== + version "0.9.4" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" + integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== dependencies: - "@aashutoshrathi/word-wrap" "^1.2.3" deep-is "^0.1.3" fast-levenshtein "^2.0.6" levn "^0.4.1" prelude-ls "^1.2.1" type-check "^0.4.0" + word-wrap "^1.2.5" p-defer@^4.0.0, p-defer@^4.0.1: version "4.0.1" @@ -1837,14 +1817,13 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== -starpc@^0.31.10: - version "0.31.10" - resolved "https://registry.yarnpkg.com/starpc/-/starpc-0.31.10.tgz#384bc4593de6ab8ffb05edaa030cb2874122ceb9" - integrity sha512-vkesgDzoVE9WDEi5tCbi9rqX2ezvMMwCbUfHI1Pn2IBaAMLpO3qcAkMH6P87gKVbr8Ztdfk0asfIRnzeaQrQnA== +starpc@^0.31.10, starpc@^0.31.12: + version "0.31.12" + resolved "https://registry.yarnpkg.com/starpc/-/starpc-0.31.12.tgz#f33a297c63d37c0af2d7930cf2adc4dbf143beba" + integrity sha512-J8ccT+hS0IwTA5pubeFXbpByDOM6WAAmmL+0rU8aX9q/Z/RDzm/EUnly9YsMBQ7pX5kGX5G66Zd83eA8WGeHAQ== dependencies: "@aptre/it-ws" "^1.0.0" - "@aptre/protobuf-es-lite" "^0.2.6" - "@bufbuild/protoplugin" "^1.9.0" + "@aptre/protobuf-es-lite" "^0.2.14" "@chainsafe/libp2p-yamux" "^6.0.2" "@libp2p/interface" "^1.3.0" "@libp2p/logger" "^4.0.11" @@ -1854,9 +1833,8 @@ starpc@^0.31.10: it-pipe "^3.0.1" it-pushable "^3.2.3" it-stream-types "^2.0.1" - memoize-one "^6.0.0" uint8arraylist "^2.4.7" - ws "^8.15.1" + ws "^8.17.0" "string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0: version "4.2.3" @@ -1943,11 +1921,6 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" -typescript@4.5.2: - version "4.5.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.2.tgz#8ac1fba9f52256fdb06fb89e4122fa6a346c2998" - integrity sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw== - typescript@^5.4.4: version "5.4.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" @@ -2001,6 +1974,11 @@ which@^2.0.1: dependencies: isexe "^2.0.0" +word-wrap@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== + "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" @@ -2019,10 +1997,10 @@ wrap-ansi@^8.1.0: string-width "^5.0.1" strip-ansi "^7.0.1" -ws@^8.15.1, ws@^8.4.0: - version "8.16.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.16.0.tgz#d1cd774f36fbc07165066a60e40323eab6446fd4" - integrity sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ== +ws@^8.17.0, ws@^8.4.0: + version "8.17.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.0.tgz#d145d18eca2ed25aaf791a183903f7be5e295fea" + integrity sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow== y18n@^5.0.5: version "5.0.8"