Skip to content

Commit 14c207e

Browse files
committed
Restructured reusable micromodules
1 parent b510ba2 commit 14c207e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2594
-1365
lines changed

bench/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var protobuf = require("../src/index"),
2222
var root = protobuf.loadSync(require.resolve("./bench.proto"));
2323
var Test = root.lookup("Test");
2424

25-
protobuf.codegen.verbose = true;
25+
protobuf.util.codegen.verbose = true;
2626

2727
var buf = Test.encode(data).finish();
2828

cli/targets/static.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ var Type = protobuf.Type,
99
Service = protobuf.Service,
1010
Enum = protobuf.Enum,
1111
Namespace = protobuf.Namespace,
12-
util = protobuf.util,
13-
codegen = protobuf.codegen;
12+
util = protobuf.util;
1413

1514
var out = [];
1615
var indent = 0;
@@ -232,7 +231,7 @@ function buildType(ref, type) {
232231
"@param {Writer} [writer] Writer to encode to",
233232
"@returns {Writer} Writer"
234233
]);
235-
buildFunction(type, "encode", codegen.encode.generate(type), {
234+
buildFunction(type, "encode", protobuf.encode.generate(type), {
236235
Writer : "$protobuf.Writer",
237236
util : "$protobuf.util"
238237
});
@@ -260,7 +259,7 @@ function buildType(ref, type) {
260259
"@param {number} [length] Message length if known beforehand",
261260
"@returns {" + fullName + "} " + type.name
262261
]);
263-
buildFunction(type, "decode", codegen.decode.generate(type), {
262+
buildFunction(type, "decode", protobuf.decode.generate(type), {
264263
Reader : "$protobuf.Reader",
265264
util : "$protobuf.util"
266265
});
@@ -286,7 +285,7 @@ function buildType(ref, type) {
286285
"@param {" + fullName + "|Object} message " + type.name + " or plain object to verify",
287286
"@returns {?string} `null` if valid, otherwise the reason why it is not"
288287
]);
289-
buildFunction(type, "verify", codegen.verify.generate(type), {
288+
buildFunction(type, "verify", protobuf.verify.generate(type), {
290289
util : "$protobuf.util"
291290
});
292291
}

0 commit comments

Comments
 (0)