tchannel 3.9.13 → 3.9.14-uber-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/as/thrift.js +4 -13
- package/package.json +2 -2
- package/test/tcollector-reporter.js +2 -1
- package/.npmignore +0 -9
package/as/thrift.js
CHANGED
|
@@ -54,13 +54,11 @@ function TChannelAsThrift(opts) {
|
|
|
54
54
|
allowIncludeAlias: opts.allowIncludeAlias,
|
|
55
55
|
allowOptionalArguments: opts.allowOptionalArguments,
|
|
56
56
|
defaultAsUndefined: opts.defaultAsUndefined,
|
|
57
|
+
// Release IDL sources, asts after parsing
|
|
58
|
+
releaseSources: true,
|
|
57
59
|
fs: opts.fs
|
|
58
60
|
});
|
|
59
61
|
|
|
60
|
-
var sources = self.spec.getSources();
|
|
61
|
-
self.thriftFileName = sources.entryPoint;
|
|
62
|
-
self.thriftSource = sources.idls[sources.entryPoint];
|
|
63
|
-
|
|
64
62
|
self.logger = opts.logger;
|
|
65
63
|
|
|
66
64
|
var bossMode = opts && opts.bossMode;
|
|
@@ -148,11 +146,11 @@ function registerMeta(metaSource) {
|
|
|
148
146
|
var self = this;
|
|
149
147
|
|
|
150
148
|
var metaSpec = new thriftrw.Thrift({
|
|
151
|
-
source: metaSource
|
|
149
|
+
source: metaSource,
|
|
150
|
+
releaseSources: true
|
|
152
151
|
});
|
|
153
152
|
|
|
154
153
|
self.register(self.channel, 'Meta::health', self, health, metaSpec);
|
|
155
|
-
self.register(self.channel, 'Meta::thriftIDL', self, thriftIDL, metaSpec);
|
|
156
154
|
};
|
|
157
155
|
|
|
158
156
|
TChannelAsThrift.prototype.request = function request(reqOptions) {
|
|
@@ -551,13 +549,6 @@ function health(tchannelThrift, req, head, body, callback) {
|
|
|
551
549
|
});
|
|
552
550
|
}
|
|
553
551
|
|
|
554
|
-
function thriftIDL(tchannelThrift, req, head, body, callback) {
|
|
555
|
-
return callback(null, {
|
|
556
|
-
ok: true,
|
|
557
|
-
body: tchannelThrift.spec.getSources()
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
|
|
561
552
|
// TODO proper Thriftify result union that reifies as the selected field.
|
|
562
553
|
function onlyKey(object) {
|
|
563
554
|
for (var name in object) {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "tchannel",
|
|
3
3
|
"description": "network multiplexing and framing protocol for RPC or parser drag racing",
|
|
4
4
|
"author": "mranney@uber.com",
|
|
5
|
-
"version": "3.9.
|
|
5
|
+
"version": "3.9.14-uber-1",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"lint": "eslint $(git ls-files | grep '.js$')",
|
|
8
8
|
"travis": "npm run check-licence && npm run lint -s && npm run travis-cover -s && npm run check-benchmark -s",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"safe-json-parse": "^4.0.0",
|
|
46
46
|
"sse4_crc32": "^5.3.0",
|
|
47
47
|
"tape-cluster": "2.1.0",
|
|
48
|
-
"thriftrw": "^3.11.
|
|
48
|
+
"thriftrw": "^3.11.4",
|
|
49
49
|
"xorshift": "^0.2.0",
|
|
50
50
|
"xtend": "^4.0.0"
|
|
51
51
|
},
|
|
@@ -39,7 +39,8 @@ var tcollectorSpec = fs.readFileSync(
|
|
|
39
39
|
test('test of thriftify spec', function t1(assert) {
|
|
40
40
|
var thriftSpec = new thriftrw.Thrift({
|
|
41
41
|
source: tcollectorSpec,
|
|
42
|
-
strict: false
|
|
42
|
+
strict: false,
|
|
43
|
+
releaseSources: true
|
|
43
44
|
});
|
|
44
45
|
|
|
45
46
|
var argsType = thriftSpec.getType('TCollector::submit_args');
|