const fs = require('fs'),
    protobuf = require('protobufjs');

const builder = protobuf.newBuilder(),
    protoDir = __dirname + '/proto';

fs.readdirSync(protoDir)
    .filter(filename => filename.match(/\.proto$/))
    .forEach(filename => protobuf.loadProtoFile(protoDir + '/' + filename, builder));

module.exports = builder.build("POGOProtos");
@@ -299,16 +299,731 @@
 der));%0A%0A
+// Recursively add the packed=true to all packable repeated fields.%0A// Repeated fields are packed by default in proto3 but protobuf.js incorrectly does not set the option.%0A// See also: https://github.com/dcodeIO/protobuf.js/issues/432%0Afunction addPackedOption(ns) %7B%0A    if (ns instanceof protobuf.Reflect.Message) %7B%0A        ns.getChildren(protobuf.Reflect.Field).forEach(field =%3E %7B%0A            if (field.repeated && protobuf.PACKABLE_WIRE_TYPES.indexOf(field.type.wireType) != -1) %7B%0A                field.options.packed = true;%0A            %7D%0A        %7D);%0A    %7D else if (ns instanceof protobuf.Reflect.Namespace) %7B%0A        ns.children.forEach(addPackedOption);%0A    %7D%0A%7D%0AaddPackedOption(builder.lookup('POGOProtos'));%0A%0A
 module.e

Set packed=true for all repeated packable types