-
Notifications
You must be signed in to change notification settings - Fork 765
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable ADVANCED_OPTIMIZATIONS in Closure Compiler
- Loading branch information
Showing
11 changed files
with
112 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* @fileoverview Export symbols needed by generated code in CommonJS style. | ||
* | ||
* Note that public methods called by generated code are exposed | ||
* using Closure Compiler's @export annotation | ||
*/ | ||
goog.module('grpc.web.Exports'); | ||
|
||
const AbstractClientBase = goog.require('grpc.web.AbstractClientBase'); | ||
const GrpcWebClientBase = goog.require('grpc.web.GrpcWebClientBase'); | ||
const StatusCode = goog.require('grpc.web.StatusCode'); | ||
|
||
const exports = module['exports']; | ||
|
||
exports['AbstractClientBase'] = {'MethodInfo': AbstractClientBase.MethodInfo}; | ||
exports['GrpcWebClientBase'] = GrpcWebClientBase; | ||
exports['StatusCode'] = StatusCode; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var module; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const assert = require('assert'); | ||
const grpc = {}; | ||
grpc.web = require('grpc-web'); | ||
|
||
describe('grpc-web export test', function() { | ||
it('should have AbstractClientBase.MethodInfo exported', function() { | ||
assert.equal(typeof grpc.web.AbstractClientBase.MethodInfo, 'function'); | ||
}); | ||
|
||
it('should have GrpcWebClientBase#rpcCall() exported', function() { | ||
assert.equal(typeof grpc.web.GrpcWebClientBase.prototype.rpcCall, 'function'); | ||
}); | ||
|
||
it('should have GrpcWebClientBase#serverStreaming() exported', function() { | ||
assert.equal(typeof grpc.web.GrpcWebClientBase.prototype.serverStreaming, 'function'); | ||
}); | ||
|
||
it('should have grpc StatusCode exported', function() { | ||
assert.deepEqual(grpc.web.StatusCode, { | ||
ABORTED: 10, | ||
ALREADY_EXISTS: 6, | ||
CANCELLED: 1, | ||
DATA_LOSS: 15, | ||
DEADLINE_EXCEEDED: 4, | ||
FAILED_PRECONDITION: 9, | ||
INTERNAL: 13, | ||
INVALID_ARGUMENT: 3, | ||
NOT_FOUND: 5, | ||
OK: 0, | ||
OUT_OF_RANGE: 11, | ||
PERMISSION_DENIED: 7, | ||
RESOURCE_EXHAUSTED: 8, | ||
UNAUTHENTICATED: 16, | ||
UNAVAILABLE: 14, | ||
UNIMPLEMENTED: 12, | ||
UNKNOWN: 2 | ||
}); | ||
}); | ||
}); |