Ben Sykes e8f7fb5cbd
Update node-pre-gyp to pickup fix for #1362
node-pre-gyp 0.12.0 uses needle 2.4.1 which has the bug in it.
Even with grpc 1.24.3, which refers to the updated version, it seems npm can decide to use the older version referenced by this package.
2020-06-15 09:18:44 -07:00
..
2018-03-26 09:40:20 -04:00
2020-05-11 19:38:29 -06:00

grpc-tools

This package distributes the Protocol Buffers compiler protoc along with the plugin for generating client and service objects for use with the Node gRPC libraries.

Usage

This library exports the grpc_tools_node_protoc executable, which accepts all of the same arguments as protoc itself. For use with Node, you most likely want to use CommonJS-style imports. An example of generating code this way can be found in this guide. The grpc_tools_node_protoc automatically includes the Node gRPC plugin, so it also accepts the --grpc_out=[option:]path argument. The option can be one of the following:

  • grpc_js: Generates code with require('@grpc/grpc-js') instead of require('grpc')
  • generate_package_definition: Generates code that does not require any gRPC library, and instead generates PackageDefinition objects that can be passed to the loadPackageDefinition function provided by both the grpc and @grpc/grpc-js libraries.