protobuf.js version: 6.3.3
Hi, This is a Question not an issue..., I'm trying to create a monkey patch to override util.fetch function because I need to load .proto files from a zip bundle. the thing is, I have a .proto with two imports (3 files to load in total) so.. When I check root object after load (promise way), the file's array contains all 3 files which means they are loaded correctly, but when I check all the way through nested objects I can figure out that last imported file wasn't processed. I'm using this function to override util.fetch
BundleCache.prototype.fetchFromSimpleBundle = function (zip) {
return function fetch(filename, options, callback) {
try {
if (typeof options === "function") {
callback = options;
options = {};
} else if (!options)
options = {};
var proto = zip.file(filename);
var content = proto ? proto.asBinary() : null;
callback(null, content);
} catch (error) {
callback(error);
}
};
};
what am I missing or doing wrong?
I'm using nodeJs 4.6.0 btw.
protobuf.js version: 6.3.3
Hi, This is a Question not an issue..., I'm trying to create a monkey patch to override util.fetch function because I need to load .proto files from a zip bundle. the thing is, I have a .proto with two imports (3 files to load in total) so.. When I check root object after load (promise way), the file's array contains all 3 files which means they are loaded correctly, but when I check all the way through nested objects I can figure out that last imported file wasn't processed. I'm using this function to override util.fetch
what am I missing or doing wrong?
I'm using nodeJs 4.6.0 btw.