konsumer / grpc-dynamic-gateway Goto Github PK
View Code? Open in Web Editor NEWLike grpc-gateway, but written in node and dynamic.
License: MIT License
Like grpc-gateway, but written in node and dynamic.
License: MIT License
12.4.3
to 12.5.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
release-it is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
npm.tag
if provided when resolving tag (fixes #586) (39dcc22)npm.publishPath
(90531ab)/conf
directory (#587) (b90831a)The new version differs by 34 commits.
12c73b4
Release 12.5.0
39dcc22
Always use npm.tag
if provided when resolving tag (fixes #586)
0e62393
Fix prerelease continuation type in interactive mode (fixes #588)
90531ab
Add docs about npm.publishPath
4949a8a
Update dependencies
a11f992
Update/migrate to latest semver
5ad3e18
Update/migrate to latest @octokit/rest
cec2829
Fix links to documentation (#599)
b90831a
Move both auto-changelog recipes to the /conf
directory (#587)
da075e6
Release 12.5.0-next.3
8cc81f1
Simplify/fix debug logic in metrics (related to #574)
f818699
Fix toml example
fd67e6c
Add auto-changelog template file to be used directly from the repository (#583)
47548b5
Release 12.5.0-next.2
923a56c
Authenticate and verify as collaborator with GitLab on init
There are 34 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
It should not be necessary to modify the lib to set config options. Explore this a bit more, and make sure any options we need can be added to instantiation. Maybe a good higher default for message-size is a good idea, too.
See #38
I have found an issue where grpc-dynamic-gateway crashes if the package in the proto file contains a . in it (which is helpful for clean code generation in languages like C++)
i.e. this fails:
syntax = "proto3";
package test.stuff;
import "google/api/annotations.proto";
service TestService
{
rpc TestRpc (TestParams) returns (TestData)
{
option (google.api.http) =
{
post: "/v1/assets/op/execute"
body: "*"
};
}
}
message TestParams
{
string testField = 1;
}
message TestData
{
string myData = 1;
}
With this error:
C:\Users\graham\Documents\Repositories\halcyon>grpc-dynamic-gateway -g 0.0.0.0:50060 -I ./Proto/proto AssetService2.proto
C:\Users\graham\AppData\Roaming\npm\node_modules\grpc-dynamic-gateway\index.js:34
clients[pkg][svc] = new protos[si][pkg][svc](grpcLocation, credentials)
^
TypeError: Cannot read property 'TestService' of undefined
at sch.services.forEach.s (C:\Users\graham\AppData\Roaming\npm\node_modules\grpc-dynamic-gateway\index.js:34:48)
at Array.forEach (native)
at protoFiles.map.map.forEach (C:\Users\graham\AppData\Roaming\npm\node_modules\grpc-dynamic-gateway\index.js:32:20)
at Array.forEach (native)
at middleware (C:\Users\graham\AppData\Roaming\npm\node_modules\grpc-dynamic-gateway\index.js:29:6)
at Object.<anonymous> (C:\Users\graham\AppData\Roaming\npm\node_modules\grpc-dynamic-gateway\cli.js:61:26)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
While this:
syntax = "proto3";
package teststuff;
import "google/api/annotations.proto";
service TestService
{
rpc TestRpc (TestParams) returns (TestData)
{
option (google.api.http) =
{
post: "/v1/assets/op/execute"
body: "*"
};
}
}
message TestParams
{
string testField = 1;
}
message TestData
{
string myData = 1;
}
Works fine:
C:\Users\graham\Documents\Repositories\halcyon>grpc-dynamic-gateway -g 0.0.0.0:50060 -I ./Proto/proto AssetService2.proto
POST /v1/assets/op/execute
Listening on http://0.0.0.0:8080, proxying to gRPC on 0.0.0.0:50060
Thank you,
Graham
How hard would it be to update the grpc load functions?
I'm getting a lot of
(node:1156) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead
But seems like load
doesn't behave like loadPackageDefinition
because when I tried making a quick patch
grpc.load = function(options) {
return grpc.loadPackageDefinition(
loader.loadSync(options.file, {
keepCase: true,
includeDirs: [options.root],
})
);
};
Enumerations stopped serializing as string and turned into numbers in the response's json object
7.6.1
to 7.6.2
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
release-it is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
the protoc compilation support --proto_path=
to be specified multiple times, but this project seems not? because in a real large project, there are multiple proto definition files in a complex hierarchy ...
$ protoc --help
Usage: protoc [OPTION] PROTO_FILES
Parse PROTO_FILES and generate output based on the options given:
-IPATH, --proto_path=PATH Specify the directory in which to search for
imports. May be specified multiple times;
directories will be searched in order. If not
given, the current working directory is used.
-oFILE, Writes a FileDescriptorSet (a protocol buffer,
--descriptor_set_out=FILE defined in descriptor.proto) containing all of
the input files to FILE.
I read the code seems requiring the include
to be one string only?
https://github.com/konsumer/grpc-dynamic-gateway/blob/master/index.js#L37
While, I've tried to touch the code a bit if I can make it working, but the grpc.load({ file: p, root: include })
call seems undocumented? the Documentation will definitely need to be improved, while, do you know if it support multiple include proto path?
https://grpc.io/grpc/node/grpc.html#.load__anchor
Another possibility is I see protoc can compile the complex hierarchy *.proto
into a single protoset binary file, and it's well supported by tools like grpcurl
Are you aware if nodejs-grpc has similar protoset-files support? And add into this tool if possible
8.3.1
to 8.4.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
release-it is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 3 commits.
56ee11f
Release 8.4.0
3abbc73
Try to coerce provided increment into valid semver version
ab4c1e7
Fall back to "0.0.0" if no latest version is found
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
I am having some issues using grpc-dynamic-gateway, and I was hoping to get some ideas or help from you on getting things working (or tell me if Iβm doing something wrong).
My own proto file is failing, but I tried to run it against the example/api.proto file in the repository, and I am getting the same service.children error, as 'children' on the service instance seems to be undefined.
C:\ grpc-dynamic-gateway-master>node example example/api.proto 5050 ./example/api.js
C:\grpc-dynamic-gateway-master\example\index.js:35
**proto[p][t].service.children.forEach(c => {**
^
**TypeError: Cannot read property 'forEach' of undefined**
at Object.keys.forEach.t (C:\Users\graham\Desktop\grpc-dynamic-gateway-master\grpc-dynamic-gateway-master\example\index.js:35:35)
at Array.forEach (native)
at Object.keys.forEach.p (C:\Users\graham\Desktop\grpc-dynamic-gateway-master\grpc-dynamic-gateway-master\example\index.js:32:25)
at Array.forEach (native)
at Object.<anonymous> (C:\Users\graham\Desktop\grpc-dynamic-gateway-master\grpc-dynamic-gateway-master\example\index.js:31:20)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
A few questions:
Thank you,
Graham
13.2.2
to 13.2.4
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
yargs is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
The new version differs by 14 commits.
a6e67f1
chore(release): 13.2.4
fc13476
chore: update standard-verison dependency
bf46813
fix(i18n): rename unclear 'implication failed' to 'missing dependent arguments' (#1317)
a3a5d05
docs: fix a broken link to MS Terminology Search (#1341)
b4f8018
build: add .versionrc that hides test/build
0c39183
chore(release): 13.2.3
08e0746
chore: update deps (#1340)
843e939
docs: make --no-
boolean prefix easier to find in the docs (#1338)
84cac07
docs: restore removed changelog of v13.2.0 (#1337)
b20db65
fix(deps): upgrade cliui for compatibility with latest chalk. (#1330)
c294d1b
test: accept differently formatted output (#1327)
ac3f10c
chore: move .hbs templates into .js to facilitate webpacking (#1320)
0295132
fix: address issues with dutch translation (#1316)
9f2468e
doc: clarify parserConfiguration object structure (#1309)
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
1.15.1
to 1.16.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
grpc is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Hello @konsumer,
I'm looking to run some custom application logic before and after the middleware runs.
Any recommended approaches for this?
Many thanks,
David
Hello,
I'm getting this error 8 RESOURCE_EXHAUSTED: Received message larger than max (7479039 vs. 4194304)
when sending a large request (base64 encoded input string) to my grpc gateway using this library.
I can see this is due to a exceeding a default request size value (of 4MB) set at the grpc server level and I need to pass options to the grpc server as mentioned in this thread (eg options = [('grpc.max_receive_message_length', max_message_length)]
) to override and increase this request size option to fix this issue. However how can I pass options to the grpc server using this library?
Thanks!
3.3.2
to 3.3.3
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
protocol-buffers-schema is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
1.22.1
to 1.22.2
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
grpc is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Though there is a Dockerfile, the Travis CI build does not actually push to Docker Hub so the image is not available as is shown in the readme
This can be rectified by creating a konsumer DockerHub account (if you don't already have one), updating TravisCI with the dockerhub credentials, and updating the travis build to call Docker build and push on the master branch.
There are some problems when trying the express example on README.
I've managed to make it start, but I had to dig into the library code to find out why it was failing.
The problem is here:
Line 25 in 97c61f6
Since there's no default value for include argument it will fail with undefined
errors. It would be better to move include
to the start of the function if there's no way to set a default value like the other arguments.
app.use(grpcGateway(["test.proto"], '0.0.0.0:5051'));
Getting a little more verbose I managed to make it start with
app.use("/", grpcGateway(["test.proto"], "0.0.0.0:5051", undefined, false, __dirname));
We do not support import public
when running grpc-dynamic-gateway
.
After removing the public
, it runs without any problem.
/home/huan/git/grpc-dynamic-gateway/node_modules/protocol-buffers-schema/parse.js:501
if (tokens[0] !== ';') throw new Error('Unexpected token: ' + tokens[0] + '. Expected ";"')
^
Error: Unexpected token: "puppet/base.proto". Expected ";"
Related issue: grpc-ecosystem/grpc-gateway#139
in the current code
Line 229 in 3cb723f
1.18.3
to 1.19.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
body-parser is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
The new version differs by 44 commits.
998b265
1.19.0
40a0e81
deps: type-is@~1.6.17
eda21da
build: support Node.js 12.x
dc7fea4
build: [email protected]
926f8f1
build: [email protected]
cc0cbac
deps: [email protected]
b69292b
build: [email protected]
1c9ed74
build: [email protected]
737cb13
build: [email protected]
93ba395
build: [email protected]
3eb8d29
build: [email protected]
d198d87
deps: [email protected]
91d0232
deps: [email protected]
c9718ce
build: [email protected]
a5701e3
build: [email protected]
There are 44 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.