Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump grpc-tools to 1.9.0 and add a README #1422

Merged
merged 2 commits into from
May 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions packages/grpc-tools/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 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](https://developers.google.com/protocol-buffers/docs/reference/javascript-generated#commonjs-imports).
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.
4 changes: 4 additions & 0 deletions packages/grpc-tools/build_binaries.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

$ErrorActionPreference = "Stop"

<# https://stackoverflow.com/questions/16657778/install-nuget-via-powershell-script/26421187#comment107976901_48216538 #>

[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls11,Tls12'

Install-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201 -Force
Import-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201
Install-Module -Force -Name 7Zip4Powershell
Expand Down
2 changes: 1 addition & 1 deletion packages/grpc-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "grpc-tools",
"version": "1.8.1",
"version": "1.9.0",
"author": "Google Inc.",
"description": "Tools for developing with gRPC on Node.js",
"homepage": "https://grpc.io/",
Expand Down