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

fix: update buf and fixing proto generation issue #600

Merged
merged 3 commits into from
Jul 26, 2023
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
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ devtools:
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.12
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
go install github.com/bufbuild/buf/cmd/buf@v1.8
go install github.com/bufbuild/buf/cmd/buf@v1.25.0
go install github.com/rakyll/statik@v0.1

########################################
Expand Down Expand Up @@ -47,11 +47,7 @@ docker:
########################################
### proto
proto:
cd www/grpc/ && rm -rf gen && buf generate \
--path ./proto/blockchain.proto \
--path ./proto/network.proto \
--path ./proto/transaction.proto \
--path ./proto/wallet.proto
cd www/grpc/ && rm -rf gen && buf generate proto

# Generate static assets for Swagger-UI
cd www/grpc/ && statik -m -f -src swagger-ui/
Expand Down
16 changes: 8 additions & 8 deletions www/grpc/buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ plugins:
out: swagger-ui
opt:
- grpc_api_configuration=grpc-gateway.config.yaml
- remote: buf.build/protocolbuffers/plugins/js:v3.20.1-1
- plugin: buf.build/protocolbuffers/js:v3.21.2
out: gen/js
opt:
- import_style=commonjs
- binary
- remote: buf.build/grpc/plugins/node:v1.11.2-1
- plugin: buf.build/grpc/node:v1.11.3
out: gen/js
opt:
- import_style=commonjs
- remote: buf.build/protocolbuffers/plugins/dart:v20.0.1-1
- plugin: buf.build/protocolbuffers/dart:v20.0.1
out: gen/dart
- remote: buf.build/protocolbuffers/plugins/java:v21.8.0-1
- plugin: buf.build/protocolbuffers/java:v21.8
out: gen/java
- remote: buf.build/grpc/plugins/java:v1.50.2-1
- plugin: buf.build/grpc/java:v1.50.2
out: gen/java
- remote: buf.build/protocolbuffers/plugins/python:v21.8.0-1
out: gen/python
- remote: buf.build/grpc/plugins/python:v1.50.0-1
- plugin: buf.build/protocolbuffers/python:v21.8
out: gen/python
- plugin: buf.build/grpc/python:v1.50.0
out: gen/python
2 changes: 1 addition & 1 deletion www/grpc/gen/go/blockchain.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions www/grpc/gen/go/blockchain_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion www/grpc/gen/go/network.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions www/grpc/gen/go/network_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion www/grpc/gen/go/transaction.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions www/grpc/gen/go/transaction_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion www/grpc/gen/go/wallet.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions www/grpc/gen/go/wallet_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion www/grpc/gen/js/blockchain_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@

var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
var global =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();

var transaction_pb = require('./transaction_pb.js');
goog.object.extend(proto, transaction_pb);
Expand Down
8 changes: 7 additions & 1 deletion www/grpc/gen/js/network_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@

var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
var global =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();

goog.exportSymbol('proto.pactus.GetNetworkInfoRequest', null, global);
goog.exportSymbol('proto.pactus.GetNetworkInfoResponse', null, global);
Expand Down
8 changes: 7 additions & 1 deletion www/grpc/gen/js/transaction_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@

var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
var global =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();

goog.exportSymbol('proto.pactus.GetTransactionRequest', null, global);
goog.exportSymbol('proto.pactus.GetTransactionResponse', null, global);
Expand Down
8 changes: 7 additions & 1 deletion www/grpc/gen/js/wallet_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@

var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
var global =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();

goog.exportSymbol('proto.pactus.CreateWalletRequest', null, global);
goog.exportSymbol('proto.pactus.CreateWalletResponse', null, global);
Expand Down
Loading