Yannic Bonenberger
fe3617c511
[generator] Move options parsing into dedicated class
...
*** Note: There is no behavior change from this patch. ***
2020-04-03 13:27:47 -07:00
Stanley Cheung
d2f9e0a1eb
Add Status to UnaryResponse
2020-04-02 16:21:08 -07:00
Stanley Cheung
cc5cbf6e40
Fix BUILD.bazel
2020-03-23 23:20:35 -07:00
Stanley Cheung
508f50a32e
Update generic client
2020-03-23 23:20:35 -07:00
Stanley Cheung
40aeadef9a
Some cleanup
2020-03-19 13:01:27 -07:00
IagoLast
87209cb94b
Disable static checkers on generated js files
2020-03-19 01:06:03 -07:00
Florent Castelli
b7fb330e3e
Enable builder pattern in Typescript protobuf messages.
2020-03-18 23:41:06 -07:00
Yannic Bonenberger
40cbb49772
[bazel] Update rules_closure + fix linter warnings
...
Working towards resolving #744 , #575 , #550 , #700
2020-03-18 22:56:59 -07:00
Florent Castelli
7f9f7e8e5a
Generate Promise based overloads for unary calls in Typescript
...
Fixes #580
2020-03-18 21:26:13 -07:00
travikk
410ca10711
Added @override to address compiler issues
2020-03-18 18:38:41 -07:00
travikk
ebb0ec6549
Added missing semicolons
2020-03-18 18:38:41 -07:00
travikk
4206f4a546
Allow GrpcWebStreamParser to accept Uint8Array
2020-03-18 18:38:41 -07:00
Stanley Cheung
69f23cb5cf
Remove two unused goog.require
2020-01-22 11:55:42 -08:00
Holger Finger
764d5bcd18
fix bug that grpc-status response headers resulted in doubled execution of the callback provided to rpcCall.
2020-01-21 14:34:48 -08:00
Stanley Cheung
d03435fc6e
Do not hardcode CXX to g++
2019-12-06 14:04:14 -08:00
Stanley Cheung
55ebde4719
Revert #683
2019-12-05 11:30:14 -08:00
travikk
5c65dc4a2c
Pass raw buffer to stream parser
2019-12-02 13:22:36 -08:00
travikk
03b73fbe45
Optimise parsing incoming payload
2019-12-02 13:22:36 -08:00
Stanley Cheung
37636129a0
Fix bazel.build
2019-10-29 10:51:42 -07:00
Stanley Cheung
a96b958120
Add metadata to error callback
2019-10-29 10:51:42 -07:00
Stanley Cheung
0f79fb4366
Revert "Add metadata in gRPC error"
...
This reverts commit fe2ea6b351
.
2019-10-29 02:15:14 -07:00
A. Ishikawa
fe2ea6b351
Add metadata in gRPC error
2019-10-29 01:03:38 -07:00
Stanley Cheung
c22f57497b
Remove unused require
2019-10-18 11:23:34 -07:00
Julien Roncaglia
401e54063c
Ensure that the end callback is called
...
Previously the end callback was called by checking the state at the end of
the READY_STATE_CHANGE event. The problem with this approach is that there
are multiple early exit cases in this function and when they happen the
consumer is never informed of the end of the stream.
The new approach is to only dispatch the event when the COMPLETE event is
received (Except if an error is dispatched) so the last event is always
either 'error' or 'end').
2019-10-18 11:23:34 -07:00
Stanley Cheung
ab6ff71786
Fix error callback
2019-10-16 11:13:18 -07:00
Stanley Cheung
06bda9256e
Add CallOptions class
2019-09-30 15:40:48 -07:00
Stanley Cheung
2fa4270334
Fix generated code return type, and remove unused var
2019-09-18 13:10:53 -07:00
Stanley Cheung
8113edeeff
Use nullptr instead
2019-09-09 15:34:04 -07:00
Alexey Smirnov
5ee2126d85
Fix output directory name when using import_style=typescript
2019-09-09 13:37:31 -07:00
Stanley Cheung
ea4f1aa637
Added API for simple unary call
2019-09-09 13:19:11 -07:00
Harman Gakhal
1711674d66
Return specific grpc status code on http error
2019-08-23 16:10:03 -07:00
Stanley Cheung
9365fd62fc
WIP: Generate method descriptors into multiple files
2019-08-22 10:49:30 -07:00
Stanley Cheung
ab906036ea
Add support in code generator for printing only method descriptors
2019-08-20 12:58:50 -07:00
Stanley Cheung
6a3b282fb0
Remove internal frameworks mode
2019-08-17 00:19:50 -07:00
Stanley Cheung
e2f999a0df
Some linter formatting changes
2019-08-05 14:39:48 -07:00
Stanley Cheung
36598a2ab1
Fixed semicolons
2019-08-03 00:09:53 -07:00
Stanley Cheung
3b76ca5810
Fix status and error callbacks
2019-08-03 00:09:53 -07:00
Stanley Cheung
8b501a96f4
Remove trailing whitespace;
2019-07-31 17:42:43 -07:00
Stanley Cheung
365783307e
Add option to set withCredentials to true
2019-07-31 16:53:50 -07:00
Stanley Cheung
2ae8118d78
Adding some groundwork for generic client
2019-07-31 16:22:41 -07:00
lqs
ab242d2bb9
fix wrong package name of input type
2019-07-30 17:51:33 -07:00
Markus Padourek
db6cd68df9
Add missing newline
2019-07-01 11:16:08 -07:00
Markus Padourek
10828d7ccc
Ensure credentials are not undefined in typescript
...
Fixes #581
2019-07-01 11:16:08 -07:00
Ben Foxall
0c24e95a38
Uppercase enum keys
...
To match the generated JS
2019-07-01 10:38:09 -07:00
Stanley Cheung
d16364954a
Make MethodType a separate class
2019-06-06 15:39:50 -07:00
Stanley Cheung
cee964f746
Fix missing bazel def
2019-06-06 15:39:50 -07:00
Stanley Cheung
a8e54b3885
Introducing MethodDescriptor
2019-06-06 15:39:50 -07:00
Henke Adolfsson
968b3d2bb2
Default to no grpc-timeout header when timeout is Infinity
2019-05-19 23:09:38 -07:00
Henke Adolfsson
9e666831d1
Use precalculated number for Infinity
2019-05-19 23:09:38 -07:00
Henke Adolfsson
81426015b3
Remove a isFinite that was already checked for
2019-05-19 23:09:38 -07:00
Henke Adolfsson
d7fac321b6
Add fix for timeout of strings, NaN, Infinity and -Infinity
2019-05-19 23:09:38 -07:00
Stanley Cheung
671255e706
Adding new fields to MethodInfo
2019-05-13 11:22:06 -07:00
Stanley Cheung
15351a0401
Changes to deserializeBinary API;
2019-04-28 22:59:53 -07:00
Jian Yang
ffe8e9c903
remove duplicated has$field$ method for oneof
2019-03-28 15:25:03 -07:00
Jonah Dahlquist
aadfb92bdb
Made constructor arguments `credentials` and `options` optional
...
Currently the TypeScript generated clients require that `null` be passed to `credentials` and `options` if they're not being used. It's easier to simply make those arguments optional. I've left the `null` portion of the type though to maintain backwards compatibility.
2019-03-26 10:43:36 -07:00
Quentin
f9bfe720b5
Remove a return that skip emission of end callback
...
When the connection is closed and there isn't any message sent, the end callback was not called.
Should fix #289 , #384 and #467
2019-03-19 18:17:12 -07:00
Yannic Bonenberger
cb3499c967
[bazel] Migrate protobuf info provider to new-style one
2019-03-18 10:40:06 -07:00
Stanley Cheung
5852e276e0
fix compiler warning
2019-03-01 13:22:03 -08:00
Zbigniew Mandziejewicz
626ce9702b
feature: Typings codegen for bytes field type
2019-02-27 11:31:58 -08:00
Stanley Cheung
459487e050
Add module alias to enums. Fixes #454
2019-02-27 09:45:54 -08:00
Stanley Cheung
c0d3a1d0e5
Fix long line
2019-02-26 15:58:24 -08:00
Jian Yang
cfe789f4f0
add typescript definition for Oneof fields
2019-02-26 15:25:39 -08:00
Stanley Cheung
84e0ea356e
Linter clean up
2019-02-25 22:52:48 -08:00
Zbigniew Mandziejewicz
95aba7c4d2
fix: Prefix reserved fields in AsObject
2019-02-25 22:13:08 -08:00
Zbigniew Mandziejewicz
3c869187d0
refactor: add methods for element type/name
2019-02-25 22:13:08 -08:00
Zbigniew Mandziejewicz
514edc7e27
fix: support jstype option, fix skipping map entry
2019-02-25 22:13:08 -08:00
Zbigniew Mandziejewicz
194c97e650
fix: exclude map entry message from typings, fix optional values
2019-02-25 22:13:08 -08:00
Stanley Cheung
5a296841ce
Code sync
2019-02-22 00:15:36 -08:00
Stanley Cheung
cc7dca23a2
Code sync
2019-02-21 16:02:32 -08:00
Stanley Cheung
d139a6ad99
Code sync
2019-02-20 22:03:48 -08:00
Zbigniew Mandziejewicz
73358722d8
Export Map types correctly, optional getter/setters for message types
2019-02-01 12:31:35 -08:00
Stanley Cheung
30f8b0e183
Fix typo
2019-02-01 10:35:12 -08:00
Zbigniew Mandziejewicz
347cea046c
feature: Messages in typings extending jspb.Message, add missing generated methods
2019-01-30 10:52:16 -08:00
Zbigniew Mandziejewicz
01ed7060f6
Generate typings for protobuf files when no services are present
2019-01-15 10:53:52 -08:00
Zbigniew Mandziejewicz
4feb57a913
Import only messages used by service in grpc-web typings file
2019-01-15 10:53:52 -08:00
Zbigniew Mandziejewicz
8d7e89d34e
Match name nesting and imports in .d.ts with .js files
2019-01-15 10:53:52 -08:00
Jimmy Au
bb3624ea8d
Enable ADVANCED_OPTIMIZATIONS in Closure Compiler
2019-01-09 11:40:36 -08:00
rogchap
c2536577a6
Promise function should use ES5 functions rather than fat arrows
2019-01-08 14:58:59 -08:00
Zbigniew Mandziejewicz
68eeabaf89
Fix kokoro warning for status details
2019-01-08 10:12:08 -08:00
Zbigniew Mandziejewicz
bca630832e
Emit status event on empty stream response
2019-01-08 10:12:08 -08:00
Johan Brandhorst
f181d1efae
Simplify ToCamelCase
2019-01-07 16:03:43 -08:00
Johan Brandhorst
3d280c34be
Use camelCase in AsObject definition
...
Fixes #428
2019-01-07 16:03:43 -08:00
Ben Picolo
09604c4837
Fix metadata typings for TS client
2018-12-14 13:56:49 -08:00
Roger Chapman
1bbfb214c5
Generate Typescript definition for top level Enums ( #404 )
...
* Generate Typescript definition for top level Enums
* Export the top level enums that are use in the messages
* Add test to check compile of typescript
2018-12-06 21:25:05 -08:00
Daniel Bader
d8a828a92a
fix ?Object
2018-11-29 14:12:27 -08:00
Zbigniew Mandziejewicz
30ed257c49
Optional metadata argument
2018-11-28 14:38:14 -08:00
Zbigniew Mandziejewicz
8bcf950813
Fix naming of nested enums/messages, include field message types in typings
2018-11-27 11:01:05 -08:00
Zbigniew Mandziejewicz
3ecf2939e9
Support nested types and enums
2018-11-26 23:25:41 -08:00
Stanley Cheung
def314aec4
Fix response header value with colon
2018-11-09 23:56:20 -08:00
weilip
f28d6cb9ed
Fix rpc method name clashes. When multiple services in the same proto file define same rpc
2018-11-09 13:22:30 -08:00
A. Ishikawa
5d104af9a8
Support sub directories for generated typescript files ( #360 )
2018-11-08 20:18:00 -08:00
A. Ishikawa
3bbc5695dc
[dts] Add PromiseClient type
2018-11-07 13:44:40 -08:00
rybbchao
3ea2ea4798
Fix output dts about 'repeated' for --grpc-web_out=import_style=commonjs+dts
2018-11-05 13:54:35 -08:00
Henrik Sjööh
e02d010bda
update generated typescript files to work in strict mode
2018-11-05 13:54:13 -08:00
Stanley Cheung
4ca20a4f9c
internal sync
2018-10-14 17:37:16 -07:00
Stanley Cheung
f92cedafbf
Show how deadline can be set
2018-10-06 01:10:16 -07:00
Mitar
a312d85d38
Correctly generate code if package name is empty.
...
Fixes #306 .
2018-10-04 22:05:17 -07:00
Mitar
c727bcc6df
Use delegateClient in PromiseClient
2018-10-04 19:49:09 -07:00
Juanjo Diaz
46df515997
Add streaming methods to PromiseClient
2018-10-02 23:55:43 -07:00
Stanley Cheung
3d58487207
Error code should be number
2018-10-02 14:50:42 -07:00
Stanley Cheung
7a241cbc70
Fix plugin compile error
2018-08-30 22:35:44 -07:00
Stanley Cheung
9877e80266
Fix cpp warnings
2018-08-29 11:21:45 -07:00
Stanley Cheung
50917db817
Make sure .ts generated code passes linter
2018-08-27 16:43:41 -07:00
Stanley Cheung
1f45a03110
Experimental Typescript support
2018-08-24 15:34:01 -07:00
Stanley Cheung
01d3b6380b
Default generate file to <proto>_grpc_web_pb.js
2018-08-20 10:21:19 -07:00
Stanley Cheung
f1b89d2271
Various fixes to codegen plugin
2018-08-17 17:42:04 -07:00
Stanley Cheung
b6d553b215
Add generated code unit test
2018-08-14 17:16:21 -07:00
Stanley Cheung
df9ce4bd81
Expose response metadata for unary calls
2018-08-09 00:17:31 -07:00
Stanley Cheung
101049e4dc
Add unit test
2018-08-07 17:12:01 -07:00
Stanley Cheung
efdee49952
Minor edits
2018-08-06 14:22:42 -07:00
Stanley Cheung
c6ceed23a9
Fix lint error from code generator
2018-08-06 11:13:19 -07:00
Stanley Cheung
ef435f1a97
Fixed some lint errors
2018-08-06 10:43:59 -07:00
Yannic Bonenberger
76a4de8a6c
Add bazel rule closure_grpc_web_library
2018-08-05 15:30:57 +02:00
Stanley Cheung
a9aa7dffb0
Added multiple proxies interoperability
2018-08-03 23:49:02 -07:00
zaucy
34450f2b8c
commonjs support with import_style option
2018-07-27 16:57:49 -07:00
Stanley Cheung
20c07feda7
Add build rules for protoc codegen plugin
2018-07-26 19:35:56 -07:00
Stanley Cheung
98b882711f
Add bazel integration and tests
2018-07-26 19:35:56 -07:00
Stanley Cheung
370bec38b3
Surface underlying XHR errors better
2018-07-12 23:11:30 -07:00
Stanley Cheung
73ecb102f4
Minor edits
2018-07-11 11:29:42 -07:00
Stanley Cheung
3f672f95cd
Add options to suppress cors preflight
2018-07-10 10:49:36 -07:00
Stanley Cheung
f02fd2d3cb
Replace default proxy with Envoy to run end-to-end Echo example;
2018-07-02 23:28:43 -07:00
Stanley Cheung
fc49d64b21
Minor code clean up
2018-05-15 17:51:30 -07:00
zaucy
626c185282
Support for proto files without packages
2018-05-13 20:05:13 -07:00
Stanley Cheung
235a788e36
Migrate goog.provide to goog.module
2018-04-02 13:47:47 -07:00
Stanley Cheung
f0a368fd55
Set X-User-Agent header according to spec
2018-03-01 13:23:47 -08:00
Stanley Cheung
fd3aa34b83
Added License headers to all files
2018-02-22 14:09:55 -08:00
Stanley Cheung
41d2e01c67
Update some invalid jsdoc
2018-02-12 10:50:39 -08:00
Stanley Cheung
4b51562ac6
Expose error callback to client
2018-02-08 14:20:05 -08:00
Stanley Cheung
d3a360d454
minor fix
2017-12-14 00:33:25 -08:00
Stanley Cheung
c1f4cdb2dc
Added a new client mode for the application/grpc-web-text format
2017-12-13 23:05:45 -08:00
Stanley Cheung
f9f06ef13a
Expose stream end event to client
2017-12-04 21:38:52 -08:00
Stanley Cheung
bcc89b8856
Minor update to client
2017-11-21 16:49:43 -08:00
Stanley Cheung
6ba2b8bc10
Add genericpbjsclient
2017-08-17 23:48:40 -07:00
Stanley Cheung
2746b47135
Update codegen
2017-04-18 12:50:40 -07:00
Stanley Cheung
46a921638a
Fix make clean
2017-03-23 11:05:13 -07:00
Stanley Cheung
d271ba0a0a
Refactor example
...
grpc backend code
2017-03-22 23:08:44 -07:00
Stanley Cheung
7124fc88b7
Update javascript library to use new headers
2017-03-15 14:03:31 -07:00
Stanley Cheung
b024f276b0
Fix mac install script, and a bug in clientreadablestream
2017-02-16 16:14:02 -08:00
Stanley Cheung
1c76eae425
Fix jsdoc
2017-02-16 11:18:23 -08:00
Stanley Cheung
cea6f9ae8a
Propagate grpc backend status to frontend
2017-02-13 11:11:14 -08:00
Stanley Cheung
ff31531764
Codegen changes
2017-02-04 00:43:00 -08:00
Stanley Cheung
95ab9bc94a
Some frontend changes sync
2017-02-02 16:15:27 -08:00
Stanley Cheung
d12765ff19
Update doc
2017-01-11 16:05:39 -08:00
Stanley Cheung
22a97519ad
Fix grpc-web codegen Makefile
2017-01-10 12:00:38 -08:00
Stanley Cheung
db33790752
Updated codegen
2016-12-21 16:13:38 -08:00
Stanley Cheung
8a72d71d81
Refactor clientbase
2016-12-20 15:55:13 -08:00
Stanley Cheung
22121f67bb
Sync some internal changes
2016-12-07 14:06:31 -08:00
Mark Grimes
e5fe1be838
Switch the link order of the protobuf and protoc libraries to resolve unresolved symbols when linking statically
2016-11-03 09:52:48 +00:00
Stanley Cheung
4dd46b8450
Initial commit for GRPC-Web JS client and example
2016-11-02 15:23:20 -07:00