diff --git a/Makefile b/Makefile index 83cdc7a..e898e34 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ install: .PHONY: test test: build cd examples/dummy && make - cd examples/js-grpc && make + cd examples/flow && make .PHONY: docker.build docker.build: diff --git a/examples/js-grpc/Makefile b/examples/flow/Makefile similarity index 100% rename from examples/js-grpc/Makefile rename to examples/flow/Makefile diff --git a/examples/js-grpc/output/test/test_grpc_js.js b/examples/flow/output/test/test_grpc_js.js similarity index 98% rename from examples/js-grpc/output/test/test_grpc_js.js rename to examples/flow/output/test/test_grpc_js.js index dfb27c4..be399ae 100644 --- a/examples/js-grpc/output/test/test_grpc_js.js +++ b/examples/flow/output/test/test_grpc_js.js @@ -3,7 +3,10 @@ import grpc from 'grpc' import pbFile from './pbFile.js' - +type TestEnum = + | 'ELEMENT_A' + | 'ELEMENT_B' +; type TestMessage = {| a?: string; @@ -16,6 +19,10 @@ type TestMessage = {| p?: Array; q?: Array; r?: Array; + s?: + | 'ELEMENT_C' + | 'ELEMENT_D' + ; |}; type TestNoStreamRequest = {| diff --git a/examples/js-grpc/protos/test.proto b/examples/flow/protos/test.proto similarity index 92% rename from examples/js-grpc/protos/test.proto rename to examples/flow/protos/test.proto index cd7ebe7..e15ee88 100644 --- a/examples/js-grpc/protos/test.proto +++ b/examples/flow/protos/test.proto @@ -11,6 +11,11 @@ service TestService { rpc TestStreamBoth(stream TestStreamBothRequest) returns (stream TestStreamBothReply); } +enum TestEnum { + ELEMENT_A = 0; + ELEMENT_B = 1; +} + message TestMessage { string a = 1; int32 b = 2; @@ -22,6 +27,10 @@ message TestMessage { repeated int64 p = 16; repeated float q = 17; repeated double r = 18; + enum s { + ELEMENT_C = 0; + ELEMENT_D = 1; + } } message TestNoStreamRequest { TestMessage message = 1; } diff --git a/examples/js-grpc/templates/{{.File.Package}}/{{.File.Package}}_grpc_js.js.tmpl b/examples/flow/templates/{{.File.Package}}/{{.File.Package}}_grpc_js.js.tmpl similarity index 100% rename from examples/js-grpc/templates/{{.File.Package}}/{{.File.Package}}_grpc_js.js.tmpl rename to examples/flow/templates/{{.File.Package}}/{{.File.Package}}_grpc_js.js.tmpl