chore: update gRPC tools

This commit is contained in:
Nex
2021-02-12 21:12:20 +08:00
parent b6ebbaa879
commit 286a348b6f
6 changed files with 3780 additions and 230 deletions

View File

@@ -10,7 +10,7 @@ See [API documentation](..\docs\apis.md)
##### Installling tools
Download the [Protocol Buffers compiler](https://github.com/protocolbuffers/protobuf/releases) (protoc-3.13.0-*) for your platform and add `protoc` to `PATH` environment variable
Download the [Protocol Buffers compiler](https://github.com/protocolbuffers/protobuf/releases) (protoc-3.15.0-*) for your platform and add `protoc` to `PATH` environment variable
For generating Go code, install `protoc-gen-go` (v1.4.3):
```bash
@@ -33,6 +33,11 @@ gobin google.golang.org/grpc/cmd/protoc-gen-go-grpc
For generating HTTP JSON APIs with [grpc-gateway](https://grpc-ecosystem.github.io/grpc-gateway/), follow the [documentation](https://github.com/grpc-ecosystem/grpc-gateway/tree/v2#installation).
For generating validators install [go-proto-validators](https://github.com/mwitkow/go-proto-validators/tree/master/protoc-gen-govalidators):
```bash
go get github.com/mwitkow/go-proto-validators/protoc-gen-govalidators
```
For generating Java code: From `bdledger-sdk-java` run `gradle generateProto`
For generating Node.js code (and TypeScript definitions), install Node.js then run:
@@ -58,7 +63,7 @@ References:
Run:
```bash
./scripts/gen [-a, --async] [go] [gohttp] [nodejs] [ts] [docs]
./scripts/gen [-a, --async] [go] [gohttp] [nodejs] [docs]
```
Use `-a` or `--async` to speed up generation by asynchronously and concurrently generating all code and documentation (script will exit without waiting for completion)
@@ -70,3 +75,4 @@ Install Go then run:
go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
./scripts/gen [-a, --async] docs
```

3454
grpc/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,7 @@
"Node.js"
],
"devDependencies": {
"grpc-tools": "^1.9.1",
"grpc_tools_node_protoc_ts": "^5.0.1"
"grpc_tools_node_protoc_ts": "^5.1.1",
"grpc-tools": "^1.10.0"
}
}