protobufjs 5.0.1 → 5.0.2

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.
Files changed (170) hide show
  1. package/.travis.yml +2 -1
  2. package/README.md +144 -22
  3. package/bin/pbjs +2 -2
  4. package/bower.json +2 -2
  5. package/cli/pbjs/targets/amd.js +1 -1
  6. package/cli/pbjs/targets/json.js +8 -0
  7. package/cli/pbjs/util.js +1 -1
  8. package/cli/pbjs.js +1 -1
  9. package/dist/protobuf-light.js +166 -128
  10. package/dist/protobuf-light.min.js +88 -81
  11. package/dist/protobuf-light.min.js.gz +0 -0
  12. package/dist/protobuf-light.min.map +4 -4
  13. package/dist/protobuf.js +171 -129
  14. package/dist/protobuf.min.js +106 -98
  15. package/dist/protobuf.min.js.gz +0 -0
  16. package/dist/protobuf.min.map +4 -4
  17. package/docs/ProtoBuf.Builder.Message.html +1408 -971
  18. package/docs/ProtoBuf.Builder.Service.html +266 -197
  19. package/docs/ProtoBuf.Builder.html +758 -542
  20. package/docs/ProtoBuf.DotProto.Parser.html +223 -161
  21. package/docs/ProtoBuf.DotProto.Tokenizer.html +344 -248
  22. package/docs/ProtoBuf.DotProto.html +20 -12
  23. package/docs/ProtoBuf.Element.html +554 -554
  24. package/docs/ProtoBuf.Map.html +158 -123
  25. package/docs/ProtoBuf.Reflect.Element.html +286 -143
  26. package/docs/ProtoBuf.Reflect.Enum.Value.html +329 -228
  27. package/docs/ProtoBuf.Reflect.Enum.html +757 -537
  28. package/docs/ProtoBuf.Reflect.Extension.html +73 -56
  29. package/docs/ProtoBuf.Reflect.Message.ExtensionField.html +1013 -740
  30. package/docs/ProtoBuf.Reflect.Message.Field.html +926 -649
  31. package/docs/ProtoBuf.Reflect.Message.OneOf.html +327 -245
  32. package/docs/ProtoBuf.Reflect.Message.html +915 -651
  33. package/docs/ProtoBuf.Reflect.Namespace.html +648 -447
  34. package/docs/ProtoBuf.Reflect.Service.Method.html +363 -251
  35. package/docs/ProtoBuf.Reflect.Service.RPCMethod.html +545 -397
  36. package/docs/ProtoBuf.Reflect.Service.html +721 -511
  37. package/docs/ProtoBuf.Reflect.T.html +268 -197
  38. package/docs/ProtoBuf.Reflect.html +20 -12
  39. package/docs/ProtoBuf.Util.html +169 -118
  40. package/docs/ProtoBuf.html +840 -628
  41. package/docs/ProtoBuf.js.html +177 -134
  42. package/docs/fonts/OpenSans-Bold-webfont.eot +0 -0
  43. package/docs/fonts/OpenSans-Bold-webfont.svg +1830 -0
  44. package/docs/fonts/OpenSans-Bold-webfont.woff +0 -0
  45. package/docs/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  46. package/docs/fonts/OpenSans-BoldItalic-webfont.svg +1830 -0
  47. package/docs/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  48. package/docs/fonts/OpenSans-Italic-webfont.eot +0 -0
  49. package/docs/fonts/OpenSans-Italic-webfont.svg +1830 -0
  50. package/docs/fonts/OpenSans-Italic-webfont.woff +0 -0
  51. package/docs/fonts/OpenSans-Light-webfont.eot +0 -0
  52. package/docs/fonts/OpenSans-Light-webfont.svg +1831 -0
  53. package/docs/fonts/OpenSans-Light-webfont.woff +0 -0
  54. package/docs/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  55. package/docs/fonts/OpenSans-LightItalic-webfont.svg +1835 -0
  56. package/docs/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  57. package/docs/fonts/OpenSans-Regular-webfont.eot +0 -0
  58. package/docs/fonts/OpenSans-Regular-webfont.svg +1831 -0
  59. package/docs/fonts/OpenSans-Regular-webfont.woff +0 -0
  60. package/docs/index.html +7 -5
  61. package/docs/styles/jsdoc-default.css +95 -75
  62. package/docs/styles/prettify-tomorrow.css +1 -1
  63. package/examples/protoify/json.js +123 -123
  64. package/examples/protoify/json.json +123 -123
  65. package/examples/websocket/server.js +4 -4
  66. package/externs/protobuf.js +1 -1
  67. package/jsdoc.json +1 -1
  68. package/package.json +2 -2
  69. package/scripts/build.js +53 -53
  70. package/src/ProtoBuf/Builder/Message.js +9 -5
  71. package/src/ProtoBuf/Builder.js +19 -2
  72. package/src/ProtoBuf/DotProto/Parser.js +5 -1
  73. package/src/ProtoBuf/Reflect/Element.js +13 -1
  74. package/src/ProtoBuf/Reflect/Message/Field.js +2 -2
  75. package/src/ProtoBuf/Reflect/Message.js +6 -1
  76. package/src/ProtoBuf/Util.js +116 -116
  77. package/src/bower.json +1 -1
  78. package/src/google/protobuf/descriptor.json +27 -1
  79. package/tests/bench.txt +373 -373
  80. package/tests/complex.json +8 -1
  81. package/tests/custom-options.json +169 -169
  82. package/tests/extend.json +71 -71
  83. package/tests/imports.json +83 -83
  84. package/tests/nodeunit-browser/nodeunit.css +70 -70
  85. package/tests/nodeunit-browser/nodeunit.js +2108 -2108
  86. package/tests/options.json +32 -32
  87. package/tests/proto2js/Bar.json +46 -46
  88. package/tests/suite.js +43 -1
  89. package/sandbox/gapi/googleapis/google/api/annotations.proto +0 -29
  90. package/sandbox/gapi/googleapis/google/api/http.proto +0 -245
  91. package/sandbox/gapi/googleapis/google/datastore/v1beta3/datastore.proto +0 -281
  92. package/sandbox/gapi/googleapis/google/datastore/v1beta3/entity.proto +0 -189
  93. package/sandbox/gapi/googleapis/google/datastore/v1beta3/query.proto +0 -281
  94. package/sandbox/gapi/googleapis/google/longrunning/operations.proto +0 -144
  95. package/sandbox/gapi/googleapis/google/protobuf/any.proto +0 -98
  96. package/sandbox/gapi/googleapis/google/protobuf/any_test.proto +0 -41
  97. package/sandbox/gapi/googleapis/google/protobuf/api.proto +0 -201
  98. package/sandbox/gapi/googleapis/google/protobuf/descriptor.proto +0 -773
  99. package/sandbox/gapi/googleapis/google/protobuf/duration.proto +0 -95
  100. package/sandbox/gapi/googleapis/google/protobuf/empty.proto +0 -50
  101. package/sandbox/gapi/googleapis/google/protobuf/field_mask.proto +0 -167
  102. package/sandbox/gapi/googleapis/google/protobuf/map_lite_unittest.proto +0 -130
  103. package/sandbox/gapi/googleapis/google/protobuf/map_proto2_unittest.proto +0 -60
  104. package/sandbox/gapi/googleapis/google/protobuf/map_unittest.proto +0 -129
  105. package/sandbox/gapi/googleapis/google/protobuf/map_unittest_proto3.proto +0 -120
  106. package/sandbox/gapi/googleapis/google/protobuf/source_context.proto +0 -47
  107. package/sandbox/gapi/googleapis/google/protobuf/struct.proto +0 -94
  108. package/sandbox/gapi/googleapis/google/protobuf/timestamp.proto +0 -107
  109. package/sandbox/gapi/googleapis/google/protobuf/type.proto +0 -176
  110. package/sandbox/gapi/googleapis/google/protobuf/unittest.proto +0 -878
  111. package/sandbox/gapi/googleapis/google/protobuf/unittest_arena.proto +0 -46
  112. package/sandbox/gapi/googleapis/google/protobuf/unittest_custom_options.proto +0 -394
  113. package/sandbox/gapi/googleapis/google/protobuf/unittest_drop_unknown_fields.proto +0 -58
  114. package/sandbox/gapi/googleapis/google/protobuf/unittest_embed_optimize_for.proto +0 -51
  115. package/sandbox/gapi/googleapis/google/protobuf/unittest_empty.proto +0 -38
  116. package/sandbox/gapi/googleapis/google/protobuf/unittest_enormous_descriptor.proto +0 -1048
  117. package/sandbox/gapi/googleapis/google/protobuf/unittest_import.proto +0 -66
  118. package/sandbox/gapi/googleapis/google/protobuf/unittest_import_lite.proto +0 -52
  119. package/sandbox/gapi/googleapis/google/protobuf/unittest_import_proto3.proto +0 -68
  120. package/sandbox/gapi/googleapis/google/protobuf/unittest_import_public.proto +0 -41
  121. package/sandbox/gapi/googleapis/google/protobuf/unittest_import_public_lite.proto +0 -43
  122. package/sandbox/gapi/googleapis/google/protobuf/unittest_import_public_proto3.proto +0 -42
  123. package/sandbox/gapi/googleapis/google/protobuf/unittest_lite.proto +0 -385
  124. package/sandbox/gapi/googleapis/google/protobuf/unittest_lite_imports_nonlite.proto +0 -44
  125. package/sandbox/gapi/googleapis/google/protobuf/unittest_mset.proto +0 -82
  126. package/sandbox/gapi/googleapis/google/protobuf/unittest_mset_wire_format.proto +0 -52
  127. package/sandbox/gapi/googleapis/google/protobuf/unittest_no_arena.proto +0 -202
  128. package/sandbox/gapi/googleapis/google/protobuf/unittest_no_arena_import.proto +0 -37
  129. package/sandbox/gapi/googleapis/google/protobuf/unittest_no_arena_lite.proto +0 -42
  130. package/sandbox/gapi/googleapis/google/protobuf/unittest_no_field_presence.proto +0 -138
  131. package/sandbox/gapi/googleapis/google/protobuf/unittest_no_generic_services.proto +0 -54
  132. package/sandbox/gapi/googleapis/google/protobuf/unittest_optimize_for.proto +0 -67
  133. package/sandbox/gapi/googleapis/google/protobuf/unittest_preserve_unknown_enum.proto +0 -71
  134. package/sandbox/gapi/googleapis/google/protobuf/unittest_preserve_unknown_enum2.proto +0 -50
  135. package/sandbox/gapi/googleapis/google/protobuf/unittest_proto3.proto +0 -388
  136. package/sandbox/gapi/googleapis/google/protobuf/unittest_proto3_arena.proto +0 -206
  137. package/sandbox/gapi/googleapis/google/protobuf/unittest_well_known_types.proto +0 -112
  138. package/sandbox/gapi/googleapis/google/protobuf/unknown_enum_test.proto +0 -62
  139. package/sandbox/gapi/googleapis/google/protobuf/wrappers.proto +0 -117
  140. package/sandbox/gapi/googleapis/google/rpc/code.proto +0 -190
  141. package/sandbox/gapi/googleapis/google/rpc/error_details.proto +0 -157
  142. package/sandbox/gapi/googleapis/google/rpc/status.proto +0 -90
  143. package/sandbox/gapi/googleapis/google/type/color.proto +0 -163
  144. package/sandbox/gapi/googleapis/google/type/date.proto +0 -43
  145. package/sandbox/gapi/googleapis/google/type/dayofweek.proto +0 -50
  146. package/sandbox/gapi/googleapis/google/type/latlng.proto +0 -36
  147. package/sandbox/gapi/googleapis/google/type/money.proto +0 -40
  148. package/sandbox/gapi/googleapis/google/type/timeofday.proto +0 -42
  149. package/sandbox/gapi/test.js +0 -17
  150. package/sandbox/gapi/test.proto +0 -12
  151. package/sandbox/issue146/MyOptions.proto +0 -28
  152. package/sandbox/issue146/Sample.proto +0 -21
  153. package/sandbox/issue146/main.js +0 -3
  154. package/sandbox/issue147/enum.proto +0 -8
  155. package/sandbox/issue147/main.js +0 -3
  156. package/sandbox/issue182/commands.proto +0 -10
  157. package/sandbox/issue182/execute.js +0 -22
  158. package/sandbox/issue182/session_commands.proto +0 -14
  159. package/sandbox/issue289/A.proto +0 -8
  160. package/sandbox/issue289/B.proto +0 -8
  161. package/sandbox/issue289/common.proto +0 -5
  162. package/sandbox/issue289/main.js +0 -7
  163. package/sandbox/issue300/IAuth.proto +0 -14
  164. package/sandbox/issue300/Request.proto +0 -14
  165. package/sandbox/issue300/main.js +0 -26
  166. package/sandbox/issue347/index.js +0 -27
  167. package/sandbox/issue355/main.proto +0 -15
  168. package/sandbox/issue42/innerextend.proto +0 -18
  169. package/sandbox/issue42/main.js +0 -8
  170. package/sandbox/issue42/outerextend.proto +0 -17
@@ -1,83 +1,83 @@
1
- {
2
- "package": "My",
3
- "messages": [
4
- {
5
- "name": "Test3",
6
- "fields": [
7
- {
8
- "rule": "required",
9
- "options": {},
10
- "type": "Test1",
11
- "name": "test1",
12
- "id": 1
13
- },
14
- {
15
- "rule": "required",
16
- "options": {},
17
- "type": ".Test2",
18
- "name": "test2",
19
- "id": 2
20
- }
21
- ],
22
- "enums": [],
23
- "messages": [],
24
- "options": {},
25
- "oneofs": {}
26
- }
27
- ],
28
- "enums": [],
29
- "imports": [
30
- {
31
- "package": null,
32
- "messages": [
33
- {
34
- "name": "Test1",
35
- "fields": [
36
- {
37
- "rule": "required",
38
- "options": {},
39
- "type": "int32",
40
- "name": "a",
41
- "id": 1
42
- }
43
- ],
44
- "enums": [],
45
- "messages": [],
46
- "options": {},
47
- "oneofs": {}
48
- }
49
- ],
50
- "enums": [],
51
- "imports": [],
52
- "options": {},
53
- "services": []
54
- },
55
- {
56
- "package": null,
57
- "messages": [
58
- {
59
- "name": "Test2",
60
- "fields": [
61
- {
62
- "rule": "required",
63
- "options": {},
64
- "type": "string",
65
- "name": "b",
66
- "id": 2
67
- }
68
- ],
69
- "enums": [],
70
- "messages": [],
71
- "options": {},
72
- "oneofs": {}
73
- }
74
- ],
75
- "enums": [],
76
- "imports": [],
77
- "options": {},
78
- "services": []
79
- }
80
- ],
81
- "options": {},
82
- "services": []
83
- }
1
+ {
2
+ "package": "My",
3
+ "messages": [
4
+ {
5
+ "name": "Test3",
6
+ "fields": [
7
+ {
8
+ "rule": "required",
9
+ "options": {},
10
+ "type": "Test1",
11
+ "name": "test1",
12
+ "id": 1
13
+ },
14
+ {
15
+ "rule": "required",
16
+ "options": {},
17
+ "type": ".Test2",
18
+ "name": "test2",
19
+ "id": 2
20
+ }
21
+ ],
22
+ "enums": [],
23
+ "messages": [],
24
+ "options": {},
25
+ "oneofs": {}
26
+ }
27
+ ],
28
+ "enums": [],
29
+ "imports": [
30
+ {
31
+ "package": null,
32
+ "messages": [
33
+ {
34
+ "name": "Test1",
35
+ "fields": [
36
+ {
37
+ "rule": "required",
38
+ "options": {},
39
+ "type": "int32",
40
+ "name": "a",
41
+ "id": 1
42
+ }
43
+ ],
44
+ "enums": [],
45
+ "messages": [],
46
+ "options": {},
47
+ "oneofs": {}
48
+ }
49
+ ],
50
+ "enums": [],
51
+ "imports": [],
52
+ "options": {},
53
+ "services": []
54
+ },
55
+ {
56
+ "package": null,
57
+ "messages": [
58
+ {
59
+ "name": "Test2",
60
+ "fields": [
61
+ {
62
+ "rule": "required",
63
+ "options": {},
64
+ "type": "string",
65
+ "name": "b",
66
+ "id": 2
67
+ }
68
+ ],
69
+ "enums": [],
70
+ "messages": [],
71
+ "options": {},
72
+ "oneofs": {}
73
+ }
74
+ ],
75
+ "enums": [],
76
+ "imports": [],
77
+ "options": {},
78
+ "services": []
79
+ }
80
+ ],
81
+ "options": {},
82
+ "services": []
83
+ }
@@ -1,70 +1,70 @@
1
- /*!
2
- * Styles taken from qunit.css
3
- */
4
-
5
- h1#nodeunit-header, h1.nodeunit-header {
6
- padding: 15px;
7
- font-size: large;
8
- background-color: #06b;
9
- color: white;
10
- font-family: 'trebuchet ms', verdana, arial;
11
- margin: 0;
12
- }
13
-
14
- h1#nodeunit-header a {
15
- color: white;
16
- }
17
-
18
- h2#nodeunit-banner {
19
- height: 2em;
20
- border-bottom: 1px solid white;
21
- background-color: #eee;
22
- margin: 0;
23
- font-family: 'trebuchet ms', verdana, arial;
24
- }
25
- h2#nodeunit-banner.pass {
26
- background-color: green;
27
- }
28
- h2#nodeunit-banner.fail {
29
- background-color: red;
30
- }
31
-
32
- h2#nodeunit-userAgent, h2.nodeunit-userAgent {
33
- padding: 10px;
34
- background-color: #eee;
35
- color: black;
36
- margin: 0;
37
- font-size: small;
38
- font-weight: normal;
39
- font-family: 'trebuchet ms', verdana, arial;
40
- font-size: 10pt;
41
- }
42
-
43
- div#nodeunit-testrunner-toolbar {
44
- background: #eee;
45
- border-top: 1px solid black;
46
- padding: 10px;
47
- font-family: 'trebuchet ms', verdana, arial;
48
- margin: 0;
49
- font-size: 10pt;
50
- }
51
-
52
- ol#nodeunit-tests {
53
- font-family: 'trebuchet ms', verdana, arial;
54
- font-size: 10pt;
55
- }
56
- ol#nodeunit-tests li strong {
57
- cursor:pointer;
58
- }
59
- ol#nodeunit-tests .pass {
60
- color: green;
61
- }
62
- ol#nodeunit-tests .fail {
63
- color: red;
64
- }
65
-
66
- p#nodeunit-testresult {
67
- margin-left: 1em;
68
- font-size: 10pt;
69
- font-family: 'trebuchet ms', verdana, arial;
70
- }
1
+ /*!
2
+ * Styles taken from qunit.css
3
+ */
4
+
5
+ h1#nodeunit-header, h1.nodeunit-header {
6
+ padding: 15px;
7
+ font-size: large;
8
+ background-color: #06b;
9
+ color: white;
10
+ font-family: 'trebuchet ms', verdana, arial;
11
+ margin: 0;
12
+ }
13
+
14
+ h1#nodeunit-header a {
15
+ color: white;
16
+ }
17
+
18
+ h2#nodeunit-banner {
19
+ height: 2em;
20
+ border-bottom: 1px solid white;
21
+ background-color: #eee;
22
+ margin: 0;
23
+ font-family: 'trebuchet ms', verdana, arial;
24
+ }
25
+ h2#nodeunit-banner.pass {
26
+ background-color: green;
27
+ }
28
+ h2#nodeunit-banner.fail {
29
+ background-color: red;
30
+ }
31
+
32
+ h2#nodeunit-userAgent, h2.nodeunit-userAgent {
33
+ padding: 10px;
34
+ background-color: #eee;
35
+ color: black;
36
+ margin: 0;
37
+ font-size: small;
38
+ font-weight: normal;
39
+ font-family: 'trebuchet ms', verdana, arial;
40
+ font-size: 10pt;
41
+ }
42
+
43
+ div#nodeunit-testrunner-toolbar {
44
+ background: #eee;
45
+ border-top: 1px solid black;
46
+ padding: 10px;
47
+ font-family: 'trebuchet ms', verdana, arial;
48
+ margin: 0;
49
+ font-size: 10pt;
50
+ }
51
+
52
+ ol#nodeunit-tests {
53
+ font-family: 'trebuchet ms', verdana, arial;
54
+ font-size: 10pt;
55
+ }
56
+ ol#nodeunit-tests li strong {
57
+ cursor:pointer;
58
+ }
59
+ ol#nodeunit-tests .pass {
60
+ color: green;
61
+ }
62
+ ol#nodeunit-tests .fail {
63
+ color: red;
64
+ }
65
+
66
+ p#nodeunit-testresult {
67
+ margin-left: 1em;
68
+ font-size: 10pt;
69
+ font-family: 'trebuchet ms', verdana, arial;
70
+ }