nicolaspearson/grpc.ts.health.check

google-protobuf dependency

Closed this issue · 1 comments

Hello,

I integrated this health check into my GRPC application (thanks for providing this btw) and noticed that the lib requires google-protobuf as a dependency (not only as a dev dependency).

In "proto/health_pb.js" google-protobuf is required in the code:

var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();

goog.exportSymbol('proto.grpc.health.v1.HealthCheckRequest', null, global);
goog.exportSymbol('proto.grpc.health.v1.HealthCheckResponse', null, global);
goog.exportSymbol('proto.grpc.health.v1.HealthCheckResponse.ServingStatus', null, global);
goog.exportSymbol('proto.grpc.health.v1.SetStatusRequest', null, global);
goog.exportSymbol('proto.grpc.health.v1.SetStatusResponse', null, global);

...

In my app I'm only using grpc as a dependency (which is not dependent on google-protobuf), as all protofiles are parsed and processed dynamically.

Suggested solution: change google-protobuf into a regular dependency

Thanks & Regards

Hi @Dopingus,

Thanks for the recommendation. I agree, I will make the change and release a new version.