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

Switch Node.js SDK grpc dependency to grpc-js #1529

Merged
merged 7 commits into from
May 12, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions build/build-sdk-images/node/Dockerfile
Expand Up @@ -17,6 +17,9 @@ FROM $BASE_IMAGE
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && \
apt-get install -y nodejs

# Installing request is to address a bug with node-pre-gyp
RUN npm install --unsafe-perm --global request@2.88.2 grpc-tools@1.8.1

# code generation scripts
COPY *.sh /root/
RUN chmod +x /root/*.sh
4 changes: 2 additions & 2 deletions build/build-sdk-images/node/gen.sh
Expand Up @@ -25,8 +25,8 @@ googleapis=/go/src/agones.dev/agones/proto/googleapis

cd /go/src/agones.dev/agones

protoc -I ${googleapis} -I ${sdk} --grpc_out=minimum_node_version=12:./sdks/nodejs/lib --plugin=protoc-gen-grpc=`which grpc_node_plugin` sdk.proto
protoc -I ${googleapis} -I ${sdk} --js_out=import_style=commonjs,binary:./sdks/nodejs/lib sdk.proto ${googleapis}/google/api/annotations.proto ${googleapis}/google/api/http.proto
grpc_tools_node_protoc --proto_path=${googleapis} --proto_path=${sdk} --js_out=import_style=commonjs,binary:./sdks/nodejs/lib google/api/annotations.proto google/api/http.proto
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generation command makes sense 👍

grpc_tools_node_protoc --proto_path=${googleapis} --proto_path=${sdk} --grpc_out=generate_package_definition:./sdks/nodejs/lib --js_out=import_style=commonjs,binary:./sdks/nodejs/lib sdk.proto

header ./sdks/nodejs/lib/sdk_pb.js
header ./sdks/nodejs/lib/google/api/annotations_pb.js
Expand Down
136 changes: 76 additions & 60 deletions examples/nodejs-simple/package-lock.json

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

2 changes: 1 addition & 1 deletion examples/nodejs-simple/package.json
@@ -1,6 +1,6 @@
{
"dependencies": {
"@google-cloud/agones-sdk": "1.4.0"
"@google-cloud/agones-sdk": "1.5.0"
},
"scripts": {
"start": "node src/index.js"
Expand Down