protobufjs 3.6.0 → 3.8.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 (99) hide show
  1. package/bin/proto2js +16 -4
  2. package/bower.json +1 -1
  3. package/dist/ProtoBuf.js +645 -441
  4. package/dist/ProtoBuf.min.js +96 -96
  5. package/dist/ProtoBuf.min.js.gz +0 -0
  6. package/dist/ProtoBuf.min.map +2 -2
  7. package/dist/ProtoBuf.noparse.js +520 -357
  8. package/dist/ProtoBuf.noparse.min.js +68 -66
  9. package/dist/ProtoBuf.noparse.min.js.gz +0 -0
  10. package/dist/ProtoBuf.noparse.min.map +3 -3
  11. package/docs/ProtoBuf.Builder.Message.html +673 -135
  12. package/docs/ProtoBuf.Builder.Service.html +58 -19
  13. package/docs/ProtoBuf.Builder.html +374 -46
  14. package/docs/ProtoBuf.DotProto.Parser.html +58 -19
  15. package/docs/ProtoBuf.DotProto.Tokenizer.html +104 -19
  16. package/docs/ProtoBuf.DotProto.html +16 -10
  17. package/docs/ProtoBuf.Reflect.Enum.Value.html +207 -33
  18. package/docs/ProtoBuf.Reflect.Enum.html +318 -56
  19. package/docs/ProtoBuf.Reflect.Extension.html +53 -13
  20. package/docs/ProtoBuf.Reflect.Message.ExtensionField.html +450 -68
  21. package/docs/ProtoBuf.Reflect.Message.Field.html +454 -51
  22. package/docs/ProtoBuf.Reflect.Message.OneOf.html +1044 -0
  23. package/docs/ProtoBuf.Reflect.Message.html +378 -64
  24. package/docs/ProtoBuf.Reflect.Namespace.html +333 -51
  25. package/docs/ProtoBuf.Reflect.Service.Method.html +228 -35
  26. package/docs/ProtoBuf.Reflect.Service.RPCMethod.html +262 -41
  27. package/docs/ProtoBuf.Reflect.Service.html +318 -56
  28. package/docs/ProtoBuf.Reflect.T.html +210 -25
  29. package/docs/ProtoBuf.Reflect.html +17 -11
  30. package/docs/ProtoBuf.Util.html +59 -13
  31. package/docs/ProtoBuf.html +235 -67
  32. package/docs/ProtoBuf.js.html +648 -443
  33. package/docs/index.html +4 -2
  34. package/docs/styles/jsdoc-default.css +2 -2
  35. package/examples/protoify/.npmignore +2 -0
  36. package/examples/protoify/README.md +28 -0
  37. package/examples/protoify/index.js +147 -0
  38. package/examples/protoify/json.js +123 -0
  39. package/examples/protoify/json.json +123 -0
  40. package/examples/protoify/json.proto +30 -0
  41. package/examples/protoify/package.json +15 -0
  42. package/examples/protoify/test.js +56 -0
  43. package/examples/websocket/README.md +1 -0
  44. package/examples/websocket/package.json +1 -1
  45. package/externs/ProtoBuf.js +922 -922
  46. package/package.json +3 -3
  47. package/scripts/build.js +58 -58
  48. package/src/ProtoBuf/Builder/Message.js +107 -77
  49. package/src/ProtoBuf/Builder/Service.js +8 -5
  50. package/src/ProtoBuf/Builder.js +71 -37
  51. package/src/ProtoBuf/DotProto/Parser.js +108 -72
  52. package/src/ProtoBuf/DotProto/Tokenizer.js +17 -11
  53. package/src/ProtoBuf/Lang.js +1 -1
  54. package/src/ProtoBuf/Reflect/Enum/Value.js +3 -2
  55. package/src/ProtoBuf/Reflect/Enum.js +9 -5
  56. package/src/ProtoBuf/Reflect/Extension.js +4 -3
  57. package/src/ProtoBuf/Reflect/Message/ExtensionField.js +4 -3
  58. package/src/ProtoBuf/Reflect/Message/Field.js +45 -26
  59. package/src/ProtoBuf/Reflect/Message/OneOf.js +19 -0
  60. package/src/ProtoBuf/Reflect/Message.js +36 -19
  61. package/src/ProtoBuf/Reflect/Namespace.js +19 -15
  62. package/src/ProtoBuf/Reflect/Service/Method.js +9 -5
  63. package/src/ProtoBuf/Reflect/Service/RPCMethod.js +3 -2
  64. package/src/ProtoBuf/Reflect/Service.js +9 -5
  65. package/src/ProtoBuf/Reflect/T.js +20 -6
  66. package/src/ProtoBuf/Reflect.js +9 -0
  67. package/src/ProtoBuf/Util.js +132 -132
  68. package/src/ProtoBuf.js +15 -17
  69. package/src/google/protobuf/descriptor.json +33 -13
  70. package/tests/bench.txt +373 -373
  71. package/tests/complex.json +8 -4
  72. package/tests/custom-options.json +169 -169
  73. package/tests/extend.json +71 -71
  74. package/tests/nodeunit-browser/nodeunit.css +70 -70
  75. package/tests/nodeunit-browser/nodeunit.js +2108 -2108
  76. package/tests/oneof.proto +6 -0
  77. package/tests/options.json +32 -32
  78. package/tests/options.proto +2 -0
  79. package/tests/proto2js/Bar.json +46 -46
  80. package/tests/suite.js +83 -12
  81. package/.idea/.name +0 -1
  82. package/.idea/ProtoBuf.iml +0 -9
  83. package/.idea/dictionaries/Daniel.xml +0 -7
  84. package/.idea/encodings.xml +0 -5
  85. package/.idea/misc.xml +0 -5
  86. package/.idea/modules.xml +0 -9
  87. package/.idea/scopes/scope_settings.xml +0 -5
  88. package/.idea/vcs.xml +0 -7
  89. package/.idea/workspace.xml +0 -551
  90. package/NOTICE +0 -2
  91. package/sandbox/issue146/MyOptions.proto +0 -28
  92. package/sandbox/issue146/Sample.proto +0 -21
  93. package/sandbox/issue146/main.js +0 -3
  94. package/sandbox/issue147/enum.proto +0 -8
  95. package/sandbox/issue147/main.js +0 -3
  96. package/sandbox/issue42/innerextend.proto +0 -18
  97. package/sandbox/issue42/main.js +0 -8
  98. package/sandbox/issue42/outerextend.proto +0 -17
  99. package/v8.log +0 -3828
@@ -23,26 +23,29 @@
23
23
 
24
24
 
25
25
 
26
+
26
27
  <section>
27
28
 
28
29
  <header>
29
- <h2>
30
- <span class="ancestors"><a href="ProtoBuf.html">ProtoBuf</a><a href="ProtoBuf.Reflect.html">.Reflect</a><a href="ProtoBuf.Reflect.Enum.html">.Enum</a>.</span>
31
30
 
32
- Value
33
- </h2>
31
+ <h2>
32
+ <span class="ancestors"><a href="ProtoBuf.html">ProtoBuf</a><a href="ProtoBuf.Reflect.html">.Reflect</a><a href="ProtoBuf.Reflect.Enum.html">.Enum</a>.</span>
33
+
34
+ Value
35
+ </h2>
36
+
34
37
 
35
38
  </header>
36
39
 
37
40
  <article>
38
41
  <div class="container-overview">
39
42
 
40
-
41
-
42
43
 
43
44
  <dt>
44
- <h4 class="name" id="Value"><span class="type-signature"></span>new Value<span class="signature">(enm<span class="signature-attributes">non-null</span>, name, id)</span><span class="type-signature"></span></h4>
45
+
46
+ <h4 class="name" id="Value"><span class="type-signature"></span>new Value<span class="signature">(builder<span class="signature-attributes">non-null</span>, enm<span class="signature-attributes">non-null</span>, name, id)</span><span class="type-signature"></span></h4>
45
47
 
48
+
46
49
 
47
50
  </dt>
48
51
  <dd>
@@ -58,6 +61,8 @@
58
61
 
59
62
 
60
63
 
64
+
65
+
61
66
  <h5>Parameters:</h5>
62
67
 
63
68
 
@@ -81,6 +86,29 @@
81
86
  <tbody>
82
87
 
83
88
 
89
+ <tr>
90
+
91
+ <td class="name"><code>builder</code></td>
92
+
93
+
94
+ <td class="type">
95
+
96
+
97
+ <span class="param-type"><a href="ProtoBuf.Builder.html">ProtoBuf.Builder</a></span>
98
+
99
+
100
+
101
+ </td>
102
+
103
+
104
+
105
+
106
+
107
+ <td class="description last"><p>Builder reference</p></td>
108
+ </tr>
109
+
110
+
111
+
84
112
  <tr>
85
113
 
86
114
  <td class="name"><code>enm</code></td>
@@ -154,7 +182,14 @@
154
182
 
155
183
 
156
184
 
185
+
186
+
157
187
  <dl class="details">
188
+
189
+
190
+
191
+
192
+
158
193
 
159
194
 
160
195
 
@@ -176,7 +211,7 @@
176
211
 
177
212
  <dt class="tag-source">Source:</dt>
178
213
  <dd class="tag-source"><ul class="dummy"><li>
179
- <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line3112">line 3112</a>
214
+ <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line3270">line 3270</a>
180
215
  </li></ul></dd>
181
216
 
182
217
 
@@ -209,10 +244,13 @@
209
244
 
210
245
  <h3 class="subsection-title">Extends</h3>
211
246
 
212
- <ul>
213
- <li><a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a></li>
214
- </ul>
215
-
247
+
248
+
249
+
250
+ <ul>
251
+ <li><a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a></li>
252
+ </ul>
253
+
216
254
 
217
255
 
218
256
 
@@ -229,6 +267,84 @@
229
267
 
230
268
  <dl>
231
269
 
270
+ <dt>
271
+ <h4 class="name" id="builder"><span class="type-signature">(non-null) </span>builder<span class="type-signature"> :<a href="ProtoBuf.Builder.html">ProtoBuf.Builder</a></span></h4>
272
+
273
+
274
+ </dt>
275
+ <dd>
276
+
277
+ <div class="description">
278
+ <p>Builder reference.</p>
279
+ </div>
280
+
281
+
282
+
283
+ <h5>Type:</h5>
284
+ <ul>
285
+ <li>
286
+
287
+ <span class="param-type"><a href="ProtoBuf.Builder.html">ProtoBuf.Builder</a></span>
288
+
289
+
290
+ </li>
291
+ </ul>
292
+
293
+
294
+
295
+
296
+
297
+ <dl class="details">
298
+
299
+
300
+
301
+
302
+
303
+
304
+ <dt class="inherited-from">Inherited From:</dt>
305
+ <dd class="inherited-from"><ul class="dummy"><li>
306
+ <a href="ProtoBuf.Reflect.T.html#builder">ProtoBuf.Reflect.T#builder</a>
307
+ </li></dd>
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+ <dt class="tag-source">Source:</dt>
328
+ <dd class="tag-source"><ul class="dummy"><li>
329
+ <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line1352">line 1352</a>
330
+ </li></ul></dd>
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+ </dl>
339
+
340
+
341
+
342
+
343
+
344
+ </dd>
345
+
346
+
347
+
232
348
  <dt>
233
349
  <h4 class="name" id="className"><span class="type-signature"></span>className<span class="type-signature"></span></h4>
234
350
 
@@ -240,7 +356,14 @@
240
356
 
241
357
 
242
358
 
359
+
360
+
243
361
  <dl class="details">
362
+
363
+
364
+
365
+
366
+
244
367
 
245
368
 
246
369
 
@@ -262,7 +385,7 @@
262
385
 
263
386
  <dt class="tag-source">Source:</dt>
264
387
  <dd class="tag-source"><ul class="dummy"><li>
265
- <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line3118">line 3118</a>
388
+ <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line3276">line 3276</a>
266
389
  </li></ul></dd>
267
390
 
268
391
 
@@ -306,7 +429,14 @@
306
429
 
307
430
 
308
431
 
432
+
433
+
309
434
  <dl class="details">
435
+
436
+
437
+
438
+
439
+
310
440
 
311
441
 
312
442
 
@@ -328,7 +458,7 @@
328
458
 
329
459
  <dt class="tag-source">Source:</dt>
330
460
  <dd class="tag-source"><ul class="dummy"><li>
331
- <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line3125">line 3125</a>
461
+ <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line3283">line 3283</a>
332
462
  </li></ul></dd>
333
463
 
334
464
 
@@ -372,8 +502,9 @@
372
502
 
373
503
 
374
504
 
505
+
506
+
375
507
  <dl class="details">
376
-
377
508
 
378
509
 
379
510
 
@@ -397,9 +528,15 @@
397
528
 
398
529
 
399
530
 
531
+
532
+
533
+
534
+
535
+
536
+
400
537
  <dt class="tag-source">Source:</dt>
401
538
  <dd class="tag-source"><ul class="dummy"><li>
402
- <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line1316">line 1316</a>
539
+ <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line1366">line 1366</a>
403
540
  </li></ul></dd>
404
541
 
405
542
 
@@ -419,7 +556,7 @@
419
556
 
420
557
 
421
558
  <dt>
422
- <h4 class="name" id="parent"><span class="type-signature"></span>parent<span class="type-signature"> :<a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a>|null</span></h4>
559
+ <h4 class="name" id="parent"><span class="type-signature">(nullable) </span>parent<span class="type-signature"> :<a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a></span></h4>
423
560
 
424
561
 
425
562
  </dt>
@@ -436,9 +573,6 @@
436
573
  <li>
437
574
 
438
575
  <span class="param-type"><a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a></span>
439
- |
440
-
441
- <span class="param-type">null</span>
442
576
 
443
577
 
444
578
  </li>
@@ -446,8 +580,9 @@
446
580
 
447
581
 
448
582
 
583
+
584
+
449
585
  <dl class="details">
450
-
451
586
 
452
587
 
453
588
 
@@ -471,9 +606,15 @@
471
606
 
472
607
 
473
608
 
609
+
610
+
611
+
612
+
613
+
614
+
474
615
  <dt class="tag-source">Source:</dt>
475
616
  <dd class="tag-source"><ul class="dummy"><li>
476
- <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line1309">line 1309</a>
617
+ <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line1359">line 1359</a>
477
618
  </li></ul></dd>
478
619
 
479
620
 
@@ -499,8 +640,10 @@
499
640
  <dl>
500
641
 
501
642
  <dt>
502
- <h4 class="name" id="build"><span class="type-signature"></span>build<span class="signature">()</span><span class="type-signature"></span></h4>
643
+
644
+ <h4 class="name" id="build"><span class="type-signature"></span>build<span class="signature">()</span><span class="type-signature"></span></h4>
503
645
 
646
+
504
647
 
505
648
  </dt>
506
649
  <dd>
@@ -518,9 +661,12 @@
518
661
 
519
662
 
520
663
 
521
- <dl class="details">
664
+
522
665
 
523
666
 
667
+
668
+ <dl class="details">
669
+
524
670
 
525
671
 
526
672
 
@@ -543,9 +689,15 @@
543
689
 
544
690
 
545
691
 
692
+
693
+
694
+
695
+
696
+
697
+
546
698
  <dt class="tag-source">Source:</dt>
547
699
  <dd class="tag-source"><ul class="dummy"><li>
548
- <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line1358">line 1358</a>
700
+ <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line1414">line 1414</a>
549
701
  </li></ul></dd>
550
702
 
551
703
 
@@ -602,8 +754,10 @@
602
754
 
603
755
 
604
756
  <dt>
605
- <h4 class="name" id="fqn"><span class="type-signature"></span>fqn<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
757
+
758
+ <h4 class="name" id="fqn"><span class="type-signature"></span>fqn<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
606
759
 
760
+
607
761
 
608
762
  </dt>
609
763
  <dd>
@@ -621,9 +775,12 @@
621
775
 
622
776
 
623
777
 
624
- <dl class="details">
778
+
625
779
 
626
780
 
781
+
782
+ <dl class="details">
783
+
627
784
 
628
785
 
629
786
 
@@ -646,9 +803,15 @@
646
803
 
647
804
 
648
805
 
806
+
807
+
808
+
809
+
810
+
811
+
649
812
  <dt class="tag-source">Source:</dt>
650
813
  <dd class="tag-source"><ul class="dummy"><li>
651
- <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line1331">line 1331</a>
814
+ <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line1387">line 1387</a>
652
815
  </li></ul></dd>
653
816
 
654
817
 
@@ -700,8 +863,10 @@
700
863
 
701
864
 
702
865
  <dt>
703
- <h4 class="name" id="toString"><span class="type-signature"></span>toString<span class="signature">(includeClass<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
866
+
867
+ <h4 class="name" id="toString"><span class="type-signature"></span>toString<span class="signature">(includeClass<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
704
868
 
869
+
705
870
 
706
871
  </dt>
707
872
  <dd>
@@ -717,6 +882,8 @@
717
882
 
718
883
 
719
884
 
885
+
886
+
720
887
  <h5>Parameters:</h5>
721
888
 
722
889
 
@@ -779,8 +946,9 @@
779
946
 
780
947
 
781
948
 
949
+
950
+
782
951
  <dl class="details">
783
-
784
952
 
785
953
 
786
954
 
@@ -804,9 +972,15 @@
804
972
 
805
973
 
806
974
 
975
+
976
+
977
+
978
+
979
+
980
+
807
981
  <dt class="tag-source">Source:</dt>
808
982
  <dd class="tag-source"><ul class="dummy"><li>
809
- <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line1349">line 1349</a>
983
+ <a href="ProtoBuf.js.html">ProtoBuf.js</a>, <a href="ProtoBuf.js.html#line1405">line 1405</a>
810
984
  </li></ul></dd>
811
985
 
812
986
 
@@ -859,13 +1033,13 @@
859
1033
  </div>
860
1034
 
861
1035
  <nav>
862
- <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ProtoBuf.Builder.html">Builder</a></li><li><a href="ProtoBuf.Builder.Message.html">Message</a></li><li><a href="ProtoBuf.Builder.Service.html">Service</a></li><li><a href="ProtoBuf.DotProto.Parser.html">Parser</a></li><li><a href="ProtoBuf.DotProto.Tokenizer.html">Tokenizer</a></li><li><a href="ProtoBuf.Reflect.Enum.html">Enum</a></li><li><a href="ProtoBuf.Reflect.Enum.Value.html">Value</a></li><li><a href="ProtoBuf.Reflect.Extension.html">Extension</a></li><li><a href="ProtoBuf.Reflect.Message.html">Message</a></li><li><a href="ProtoBuf.Reflect.Message.ExtensionField.html">ExtensionField</a></li><li><a href="ProtoBuf.Reflect.Message.Field.html">Field</a></li><li><a href="ProtoBuf.Reflect.Namespace.html">Namespace</a></li><li><a href="ProtoBuf.Reflect.Service.html">Service</a></li><li><a href="ProtoBuf.Reflect.Service.Method.html">Method</a></li><li><a href="ProtoBuf.Reflect.Service.RPCMethod.html">RPCMethod</a></li><li><a href="ProtoBuf.Reflect.T.html">T</a></li></ul><h3>Namespaces</h3><ul><li><a href="ProtoBuf.html">ProtoBuf</a></li><li><a href="ProtoBuf.DotProto.html">DotProto</a></li><li><a href="ProtoBuf.Reflect.html">Reflect</a></li><li><a href="ProtoBuf.Util.html">Util</a></li></ul>
1036
+ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="ProtoBuf.Builder.html">Builder</a></li><li><a href="ProtoBuf.Builder.Message.html">Message</a></li><li><a href="ProtoBuf.Builder.Service.html">Service</a></li><li><a href="ProtoBuf.DotProto.Parser.html">Parser</a></li><li><a href="ProtoBuf.DotProto.Tokenizer.html">Tokenizer</a></li><li><a href="ProtoBuf.Reflect.Enum.html">Enum</a></li><li><a href="ProtoBuf.Reflect.Enum.Value.html">Value</a></li><li><a href="ProtoBuf.Reflect.Extension.html">Extension</a></li><li><a href="ProtoBuf.Reflect.Message.html">Message</a></li><li><a href="ProtoBuf.Reflect.Message.ExtensionField.html">ExtensionField</a></li><li><a href="ProtoBuf.Reflect.Message.Field.html">Field</a></li><li><a href="ProtoBuf.Reflect.Message.OneOf.html">OneOf</a></li><li><a href="ProtoBuf.Reflect.Namespace.html">Namespace</a></li><li><a href="ProtoBuf.Reflect.Service.html">Service</a></li><li><a href="ProtoBuf.Reflect.Service.Method.html">Method</a></li><li><a href="ProtoBuf.Reflect.Service.RPCMethod.html">RPCMethod</a></li><li><a href="ProtoBuf.Reflect.T.html">T</a></li></ul><h3>Namespaces</h3><ul><li><a href="ProtoBuf.html">ProtoBuf</a></li><li><a href="ProtoBuf.DotProto.html">DotProto</a></li><li><a href="ProtoBuf.Reflect.html">Reflect</a></li><li><a href="ProtoBuf.Util.html">Util</a></li></ul>
863
1037
  </nav>
864
1038
 
865
1039
  <br clear="both">
866
1040
 
867
1041
  <footer>
868
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> on Tue Aug 26 2014 22:15:41 GMT+0200 (Mitteleuropäische Sommerzeit)
1042
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha10</a> on Mon Nov 24 2014 18:08:27 GMT+0100 (Mitteleuropäische Zeit)
869
1043
  </footer>
870
1044
 
871
1045
  <script> prettyPrint(); </script>