protobufjs 4.1.1 → 5.0.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.
Files changed (72) hide show
  1. package/.travis.yml +2 -1
  2. package/README.md +17 -17
  3. package/bower.json +2 -2
  4. package/cli/pbjs/targets/json.js +3 -2
  5. package/cli/pbjs/targets/proto.js +48 -24
  6. package/cli/pbjs.js +8 -1
  7. package/dist/README.md +10 -10
  8. package/dist/{ProtoBuf-light.js → protobuf-light.js} +49 -43
  9. package/dist/protobuf-light.min.js +87 -0
  10. package/dist/protobuf-light.min.js.gz +0 -0
  11. package/dist/protobuf-light.min.map +8 -0
  12. package/dist/{ProtoBuf.js → protobuf.js} +103 -66
  13. package/dist/protobuf.min.js +108 -0
  14. package/dist/protobuf.min.js.gz +0 -0
  15. package/dist/protobuf.min.map +8 -0
  16. package/docs/ProtoBuf.Builder.Message.html +106 -37
  17. package/docs/ProtoBuf.Builder.Service.html +9 -9
  18. package/docs/ProtoBuf.Builder.html +22 -22
  19. package/docs/ProtoBuf.DotProto.Parser.html +7 -7
  20. package/docs/ProtoBuf.DotProto.Tokenizer.html +11 -11
  21. package/docs/ProtoBuf.DotProto.html +2 -2
  22. package/docs/ProtoBuf.Map.html +6 -6
  23. package/docs/ProtoBuf.Reflect.Element.html +7 -7
  24. package/docs/ProtoBuf.Reflect.Enum.Value.html +10 -10
  25. package/docs/ProtoBuf.Reflect.Enum.html +21 -21
  26. package/docs/ProtoBuf.Reflect.Extension.html +3 -3
  27. package/docs/ProtoBuf.Reflect.Message.ExtensionField.html +29 -29
  28. package/docs/ProtoBuf.Reflect.Message.Field.html +28 -28
  29. package/docs/ProtoBuf.Reflect.Message.OneOf.html +10 -10
  30. package/docs/ProtoBuf.Reflect.Message.html +31 -28
  31. package/docs/ProtoBuf.Reflect.Namespace.html +19 -19
  32. package/docs/ProtoBuf.Reflect.Service.Method.html +11 -11
  33. package/docs/ProtoBuf.Reflect.Service.RPCMethod.html +17 -17
  34. package/docs/ProtoBuf.Reflect.Service.html +20 -20
  35. package/docs/ProtoBuf.Reflect.T.html +9 -9
  36. package/docs/ProtoBuf.Reflect.html +2 -2
  37. package/docs/ProtoBuf.Util.html +2 -151
  38. package/docs/ProtoBuf.html +9 -9
  39. package/docs/ProtoBuf.js.html +104 -67
  40. package/docs/index.html +1 -1
  41. package/donate.png +0 -0
  42. package/externs/{ProtoBuf.js → protobuf.js} +933 -922
  43. package/index.js +1 -18
  44. package/package.json +12 -11
  45. package/protobuf.png +0 -0
  46. package/sandbox/issue347/index.js +27 -0
  47. package/sandbox/issue355/main.proto +15 -0
  48. package/scripts/build.js +4 -9
  49. package/src/ProtoBuf/Builder/Message.js +9 -4
  50. package/src/ProtoBuf/Builder/Service.js +3 -0
  51. package/src/ProtoBuf/Builder.js +17 -10
  52. package/src/ProtoBuf/DotProto/Parser.js +54 -23
  53. package/src/ProtoBuf/Reflect/Element.js +4 -3
  54. package/src/ProtoBuf/Reflect/Message/Field.js +4 -3
  55. package/src/ProtoBuf/Reflect/Message.js +3 -3
  56. package/src/ProtoBuf/Util.js +3 -14
  57. package/src/bower.json +1 -1
  58. package/src/google/protobuf/descriptor.json +28 -14
  59. package/src/{ProtoBuf.js → protobuf.js} +0 -0
  60. package/src/wrap.js +6 -6
  61. package/tests/imports-weak.proto +7 -0
  62. package/tests/suite.js +64 -81
  63. package/ProtoBuf.png +0 -0
  64. package/dist/ProtoBuf-light.min.js +0 -88
  65. package/dist/ProtoBuf-light.min.js.gz +0 -0
  66. package/dist/ProtoBuf-light.min.map +0 -8
  67. package/dist/ProtoBuf.min.js +0 -108
  68. package/dist/ProtoBuf.min.js.gz +0 -0
  69. package/dist/ProtoBuf.min.map +0 -8
  70. package/externs/ByteBuffer.js +0 -767
  71. package/externs/Long.js +0 -328
  72. package/tests/gtfs-realtime.proto +0 -552
package/externs/Long.js DELETED
@@ -1,328 +0,0 @@
1
- /*
2
- * Copyright 2012 The Closure Compiler Authors.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- /**
18
- * @fileoverview Externs for Long.js.
19
- * @see https://github.com/dcodeIO/Long.js
20
- * @externs
21
- */
22
-
23
- /**
24
- BEGIN_NODE_INCLUDE
25
- var Long = require('long');
26
- END_NODE_INCLUDE
27
- */
28
-
29
- /**
30
- * @param {number} low
31
- * @param {number} high
32
- * @param {boolean=} unsigned
33
- * @constructor
34
- */
35
- var Long = function(low, high, unsigned) {};
36
-
37
- /**
38
- * @param {number} value
39
- * @param {boolean=} unsigned
40
- * @return {!Long}
41
- */
42
- Long.fromInt = function(value, unsigned) {};
43
-
44
- /**
45
- * @param {number} value
46
- * @param {boolean=} unsigned
47
- * @return {!Long}
48
- */
49
- Long.fromNumber = function(value, unsigned) {};
50
-
51
- /**
52
- * @param {number} lowBits
53
- * @param {number} highBits
54
- * @param {boolean=} unsigned
55
- * @return {!Long}
56
- */
57
- Long.fromBits = function(lowBits, highBits, unsigned) {};
58
-
59
- /**
60
- * @param {number} part0
61
- * @param {number} part1
62
- * @param {number} part2
63
- * @param {boolean=} unsigned
64
- * @return {!Long}
65
- */
66
- Long.from28Bits = function(part0, part1, part2, unsigned) {};
67
-
68
- /**
69
- * @param {string} str
70
- * @param {(boolean|number)=} unsigned
71
- * @param {number=} radix
72
- * @return {!Long}
73
- */
74
- Long.fromString = function(str, unsigned, radix) {};
75
-
76
- /**
77
- * @type {!Long}
78
- */
79
- Long.ZERO;
80
-
81
- /**
82
- * @type {!Long}
83
- */
84
- Long.ONE;
85
-
86
- /**
87
- * @type {!Long}
88
- */
89
- Long.NEG_ONE;
90
-
91
- /**
92
- * @type {!Long}
93
- */
94
- Long.MAX_SIGNED_VALUE;
95
-
96
- /**
97
- * @type {!Long}
98
- */
99
- Long.MIN_SIGNED_VALUE;
100
-
101
- /**
102
- * @type {!Long}
103
- */
104
- Long.MAX_UNSIGNED_VALUE;
105
-
106
- /**
107
- * @type {!Long}
108
- */
109
- Long.MIN_UNSIGNED_VALUE;
110
-
111
- /**
112
- * @type {!Long}
113
- */
114
- Long.MAX_VALUE;
115
-
116
- /**
117
- * @type {!Long}
118
- */
119
- Long.MIN_VALUE;
120
-
121
- /**
122
- * @type {number}
123
- */
124
- Long.prototype.low;
125
-
126
- /**
127
- * @type {number}
128
- */
129
- Long.prototype.high;
130
-
131
- /**
132
- * @type {boolean}
133
- */
134
- Long.prototype.unsigned;
135
-
136
- /**
137
- * @return {number}
138
- */
139
- Long.prototype.toInt = function() {};
140
-
141
- /**
142
- * @return {number}
143
- */
144
- Long.prototype.toNumber = function() {};
145
-
146
- /**
147
- * @param {number=} radix
148
- * @return {string}
149
- */
150
- Long.prototype.toString = function(radix) {};
151
-
152
- /**
153
- * @return {number}
154
- */
155
- Long.prototype.getHighBits = function() {};
156
-
157
- /**
158
- * @return {number}
159
- */
160
- Long.prototype.getHighBitsUnsigned = function() {};
161
-
162
- /**
163
- * @return {number}
164
- */
165
- Long.prototype.getLowBits = function() {};
166
-
167
- /**
168
- * @return {number}
169
- */
170
- Long.prototype.getLowBitsUnsigned = function() {};
171
-
172
- /**
173
- * @return {number}
174
- */
175
- Long.prototype.getNumBitsAbs = function() {};
176
-
177
- /**
178
- * @return {boolean}
179
- */
180
- Long.prototype.isZero = function() {};
181
-
182
- /**
183
- * @return {boolean}
184
- */
185
- Long.prototype.isNegative = function() {};
186
-
187
- /**
188
- * @return {boolean}
189
- */
190
- Long.prototype.isOdd = function() {};
191
-
192
- /**
193
- * @return {boolean}
194
- */
195
- Long.prototype.isEven = function() {};
196
-
197
- /**
198
- * @param {Long} other
199
- * @return {boolean}
200
- */
201
- Long.prototype.equals = function(other) {};
202
-
203
- /**
204
- * @param {Long} other
205
- * @return {boolean}
206
- */
207
- Long.prototype.notEquals = function(other) {};
208
-
209
- /**
210
- * @param {Long} other
211
- * @return {boolean}
212
- */
213
- Long.prototype.lessThan = function(other) {};
214
-
215
- /**
216
- * @param {Long} other
217
- * @return {boolean}
218
- */
219
- Long.prototype.lessThanOrEqual = function(other) {};
220
-
221
- /**
222
- * @param {Long} other
223
- * @return {boolean}
224
- */
225
- Long.prototype.greaterThan = function(other) {};
226
-
227
- /**
228
- * @param {Long} other
229
- * @return {boolean}
230
- */
231
- Long.prototype.greaterThanOrEqual = function(other) {};
232
-
233
- /**
234
- * @param {Long} other
235
- * @return {number}
236
- */
237
- Long.prototype.compare = function(other) {};
238
-
239
- /**
240
- * @return {!Long}
241
- */
242
- Long.prototype.negate = function() {};
243
-
244
- /**
245
- * @param {Long} other
246
- * @return {!Long}
247
- */
248
- Long.prototype.add = function(other) {};
249
-
250
- /**
251
- * @param {Long} other
252
- * @return {!Long}
253
- */
254
- Long.prototype.subtract = function(other) {};
255
-
256
- /**
257
- * @param {Long} other
258
- * @return {!Long}
259
- */
260
- Long.prototype.multiply = function(other) {};
261
-
262
- /**
263
- * @param {Long} other
264
- * @return {!Long}
265
- */
266
- Long.prototype.div = function(other) {};
267
-
268
- /**
269
- * @param {Long} other
270
- * @return {!Long}
271
- */
272
- Long.prototype.modulo = function(other) {};
273
-
274
- /**
275
- * @return {!Long}
276
- */
277
- Long.prototype.not = function() {};
278
-
279
- /**
280
- * @param {Long} other
281
- * @return {!Long}
282
- */
283
- Long.prototype.and = function(other) {};
284
-
285
- /**
286
- * @param {Long} other
287
- * @return {!Long}
288
- */
289
- Long.prototype.or = function(other) {};
290
-
291
- /**
292
- * @param {Long} other
293
- * @return {!Long}
294
- */
295
- Long.prototype.xor = function(other) {};
296
-
297
- /**
298
- * @param {number} numBits
299
- * @return {!Long}
300
- */
301
- Long.prototype.shiftLeft = function(numBits) {};
302
-
303
- /**
304
- * @param {number} numBits
305
- * @return {!Long}
306
- */
307
- Long.prototype.shiftRight = function(numBits) {};
308
-
309
- /**
310
- * @param {number} numBits
311
- * @return {!Long}
312
- */
313
- Long.prototype.shiftRightUnsigned = function(numBits) {};
314
-
315
- /**
316
- * @return {!Long}
317
- */
318
- Long.prototype.toSigned = function() {};
319
-
320
- /**
321
- * @return {!Long}
322
- */
323
- Long.prototype.toUnsigned = function() {};
324
-
325
- /**
326
- * @return {!Long}
327
- */
328
- Long.prototype.clone = function() {};