protobufjs 6.11.3 → 7.1.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/README.md +7 -174
- package/dist/light/protobuf.js +77 -29
- package/dist/light/protobuf.js.map +1 -1
- package/dist/light/protobuf.min.js +3 -3
- package/dist/light/protobuf.min.js.map +1 -1
- package/dist/minimal/protobuf.js +27 -10
- package/dist/minimal/protobuf.js.map +1 -1
- package/dist/minimal/protobuf.min.js +3 -3
- package/dist/minimal/protobuf.min.js.map +1 -1
- package/dist/protobuf.js +163 -61
- package/dist/protobuf.js.map +1 -1
- package/dist/protobuf.min.js +3 -3
- package/dist/protobuf.min.js.map +1 -1
- package/index.d.ts +9 -7
- package/package.json +12 -31
- package/scripts/postinstall.js +0 -3
- package/src/converter.js +12 -4
- package/src/decoder.js +4 -3
- package/src/enum.js +24 -7
- package/src/field.js +6 -3
- package/src/namespace.js +3 -3
- package/src/parse.js +55 -16
- package/src/roots.js +1 -1
- package/src/tokenize.js +31 -16
- package/src/util/minimal.js +24 -7
- package/src/wrappers.js +2 -2
- package/tsconfig.json +2 -1
- package/CHANGELOG.md +0 -1027
- package/bin/pbjs +0 -6
- package/bin/pbts +0 -6
- package/cli/LICENSE +0 -33
- package/cli/README.md +0 -174
- package/cli/bin/pbjs +0 -6
- package/cli/bin/pbts +0 -6
- package/cli/index.d.ts +0 -3
- package/cli/index.js +0 -3
- package/cli/lib/tsd-jsdoc/LICENSE +0 -21
- package/cli/lib/tsd-jsdoc/README.md +0 -23
- package/cli/lib/tsd-jsdoc/plugin.js +0 -21
- package/cli/lib/tsd-jsdoc/publish.js +0 -705
- package/cli/lib/tsd-jsdoc.json +0 -18
- package/cli/package.json +0 -8
- package/cli/package.standalone.json +0 -32
- package/cli/pbjs.d.ts +0 -9
- package/cli/pbjs.js +0 -330
- package/cli/pbts.d.ts +0 -9
- package/cli/pbts.js +0 -197
- package/cli/targets/json-module.js +0 -38
- package/cli/targets/json.js +0 -8
- package/cli/targets/proto.js +0 -326
- package/cli/targets/proto2.js +0 -10
- package/cli/targets/proto3.js +0 -10
- package/cli/targets/static-module.js +0 -29
- package/cli/targets/static.js +0 -711
- package/cli/util.js +0 -183
- package/cli/wrappers/amd.js +0 -7
- package/cli/wrappers/closure.js +0 -7
- package/cli/wrappers/commonjs.js +0 -7
- package/cli/wrappers/default.js +0 -15
- package/cli/wrappers/es6.js +0 -5
- package/dist/README.md +0 -31
- package/dist/light/README.md +0 -31
- package/dist/minimal/README.md +0 -31
- package/package-lock.json +0 -7870
- package/scripts/changelog.js +0 -150
package/src/wrappers.js
CHANGED
|
@@ -49,7 +49,7 @@ wrappers[".google.protobuf.Any"] = {
|
|
|
49
49
|
if (type) {
|
|
50
50
|
// type_url does not accept leading "."
|
|
51
51
|
var type_url = object["@type"].charAt(0) === "." ?
|
|
52
|
-
object["@type"].
|
|
52
|
+
object["@type"].slice(1) : object["@type"];
|
|
53
53
|
// type_url prefix is optional, but path seperator is required
|
|
54
54
|
if (type_url.indexOf("/") === -1) {
|
|
55
55
|
type_url = "/" + type_url;
|
|
@@ -87,7 +87,7 @@ wrappers[".google.protobuf.Any"] = {
|
|
|
87
87
|
if (!(message instanceof this.ctor) && message instanceof Message) {
|
|
88
88
|
var object = message.$type.toObject(message, options);
|
|
89
89
|
var messageName = message.$type.fullName[0] === "." ?
|
|
90
|
-
message.$type.fullName.
|
|
90
|
+
message.$type.fullName.slice(1) : message.$type.fullName;
|
|
91
91
|
// Default to type.googleapis.com prefix if no prefix is used
|
|
92
92
|
if (prefix === "") {
|
|
93
93
|
prefix = googleApi;
|