Open kkimdev opened 1 year ago
Hey @kkimdev ; that sounds good to me; if you'd like to submit a PR that'd be great.
Not sure the best flag; like grpcWebImpl=improbable-eng | grpc-io
.
Or maybe we should just move completely over to the grpc.io library; that would be a large breaking change, so ideally we could keep both options around.
Would be cool if it would support grpc/grpc-web. Especially considering that grpc-web is now in maintenance mode https://github.com/improbable-eng/grpc-web/commit/1d9bbb09a0990bdaff0e37499570dbc7d6e58ce8
What would it take to implement grpc/grpc-web support @stephenh?
I need this and would be happy to give it a go, but so far I don't understand how this would be implemented properly.
The current grpc-web
generation logic seems to be mostly in main.ts
and generate-services.ts
, is that right?
How would what need to change to fit into the current system?
Hi @flotothemoon ! I believe that main.ts
checks for outputClientImpl=grpc-web
and then calls functions that are defined in generate-grpc-web.ts
for the actual grpc-web-specific output.
In terms of approach, I would probably:
integration/grpc-web
, and copy/paste it over into integration/grpc-js-web
(or some better name?)outputClientImpl=grpc-jc-web
(or again a better name)generate-grpc-web.ts
to generate-grpc-js-web.ts
genericate-grpc-js-web.ts
over to output your desired grpc-web-based outputAs a disclaimer maybe it'd be simpler to start generate-grpc-js-web.ts
as a fresh file, like if it's dramatically different from the current improbably-eng-based output, but I'm not really sure what/how much needs to change.
But that's how I'd approach it!
I just found https://github.com/timostamm/protobuf-ts for generating TS types and it already integrates with grpc/grpc-web, so I'll give that a go instead for now - but thanks for the pointers, I may get back to this!
It seems grpc/grpc-web is more actively maintained nad has more Github Stars than @improbable-eng/grpc-web!