diff --git a/protos/buf.yaml b/protos/buf.yaml new file mode 100644 index 000000000..7f47acfee --- /dev/null +++ b/protos/buf.yaml @@ -0,0 +1,7 @@ +version: v1 +name: "" +deps: [] +build: + excludes: + - google/protobuf/compiler + - google/protobuf/util diff --git a/src/grpc.ts b/src/grpc.ts index defdc63a2..2c78ad889 100644 --- a/src/grpc.ts +++ b/src/grpc.ts @@ -256,6 +256,12 @@ export class GrpcClient { return grpcPackage; } + loadFromPackageDefinition(packageDef: grpcProtoLoader.PackageDefinition) { + const grpcPackage = this.grpc.loadPackageDefinition(packageDef); + console.log('loaded:', grpcPackage); + return grpcPackage; + } + /** * Load gRPC proto service from a filename looking in googleapis common protos * when necessary. Caches the loaded protos so the subsequent loads don't do