ts-proto 2.7.3 → 2.7.4
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.
|
@@ -72,7 +72,7 @@ exports.Version = {
|
|
|
72
72
|
},
|
|
73
73
|
decode(input, length) {
|
|
74
74
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
75
|
-
|
|
75
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
76
76
|
const message = Object.create(createBaseVersion());
|
|
77
77
|
while (reader.pos < end) {
|
|
78
78
|
const tag = reader.uint32();
|
|
@@ -184,7 +184,7 @@ exports.CodeGeneratorRequest = {
|
|
|
184
184
|
},
|
|
185
185
|
decode(input, length) {
|
|
186
186
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
187
|
-
|
|
187
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
188
188
|
const message = Object.create(createBaseCodeGeneratorRequest());
|
|
189
189
|
while (reader.pos < end) {
|
|
190
190
|
const tag = reader.uint32();
|
|
@@ -299,7 +299,7 @@ exports.CodeGeneratorResponse = {
|
|
|
299
299
|
},
|
|
300
300
|
decode(input, length) {
|
|
301
301
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
302
|
-
|
|
302
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
303
303
|
const message = Object.create(createBaseCodeGeneratorResponse());
|
|
304
304
|
while (reader.pos < end) {
|
|
305
305
|
const tag = reader.uint32();
|
|
@@ -402,7 +402,7 @@ exports.CodeGeneratorResponse_File = {
|
|
|
402
402
|
},
|
|
403
403
|
decode(input, length) {
|
|
404
404
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
405
|
-
|
|
405
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
406
406
|
const message = Object.create(createBaseCodeGeneratorResponse_File());
|
|
407
407
|
while (reader.pos < end) {
|
|
408
408
|
const tag = reader.uint32();
|
|
@@ -390,7 +390,7 @@ exports.FileDescriptorSet = {
|
|
|
390
390
|
},
|
|
391
391
|
decode(input, length) {
|
|
392
392
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
393
|
-
|
|
393
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
394
394
|
const message = Object.create(createBaseFileDescriptorSet());
|
|
395
395
|
while (reader.pos < end) {
|
|
396
396
|
const tag = reader.uint32();
|
|
@@ -510,7 +510,7 @@ exports.FileDescriptorProto = {
|
|
|
510
510
|
},
|
|
511
511
|
decode(input, length) {
|
|
512
512
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
513
|
-
|
|
513
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
514
514
|
const message = Object.create(createBaseFileDescriptorProto());
|
|
515
515
|
while (reader.pos < end) {
|
|
516
516
|
const tag = reader.uint32();
|
|
@@ -771,7 +771,7 @@ exports.DescriptorProto = {
|
|
|
771
771
|
},
|
|
772
772
|
decode(input, length) {
|
|
773
773
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
774
|
-
|
|
774
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
775
775
|
const message = Object.create(createBaseDescriptorProto());
|
|
776
776
|
while (reader.pos < end) {
|
|
777
777
|
const tag = reader.uint32();
|
|
@@ -964,7 +964,7 @@ exports.DescriptorProto_ExtensionRange = {
|
|
|
964
964
|
},
|
|
965
965
|
decode(input, length) {
|
|
966
966
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
967
|
-
|
|
967
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
968
968
|
const message = Object.create(createBaseDescriptorProto_ExtensionRange());
|
|
969
969
|
while (reader.pos < end) {
|
|
970
970
|
const tag = reader.uint32();
|
|
@@ -1061,7 +1061,7 @@ exports.DescriptorProto_ReservedRange = {
|
|
|
1061
1061
|
},
|
|
1062
1062
|
decode(input, length) {
|
|
1063
1063
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1064
|
-
|
|
1064
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1065
1065
|
const message = Object.create(createBaseDescriptorProto_ReservedRange());
|
|
1066
1066
|
while (reader.pos < end) {
|
|
1067
1067
|
const tag = reader.uint32();
|
|
@@ -1157,7 +1157,7 @@ exports.ExtensionRangeOptions = {
|
|
|
1157
1157
|
},
|
|
1158
1158
|
decode(input, length) {
|
|
1159
1159
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1160
|
-
|
|
1160
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1161
1161
|
const message = Object.create(createBaseExtensionRangeOptions());
|
|
1162
1162
|
while (reader.pos < end) {
|
|
1163
1163
|
const tag = reader.uint32();
|
|
@@ -1295,7 +1295,7 @@ exports.FieldDescriptorProto = {
|
|
|
1295
1295
|
},
|
|
1296
1296
|
decode(input, length) {
|
|
1297
1297
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1298
|
-
|
|
1298
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1299
1299
|
const message = Object.create(createBaseFieldDescriptorProto());
|
|
1300
1300
|
while (reader.pos < end) {
|
|
1301
1301
|
const tag = reader.uint32();
|
|
@@ -1480,7 +1480,7 @@ exports.OneofDescriptorProto = {
|
|
|
1480
1480
|
},
|
|
1481
1481
|
decode(input, length) {
|
|
1482
1482
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1483
|
-
|
|
1483
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1484
1484
|
const message = Object.create(createBaseOneofDescriptorProto());
|
|
1485
1485
|
while (reader.pos < end) {
|
|
1486
1486
|
const tag = reader.uint32();
|
|
@@ -1575,7 +1575,7 @@ exports.EnumDescriptorProto = {
|
|
|
1575
1575
|
},
|
|
1576
1576
|
decode(input, length) {
|
|
1577
1577
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1578
|
-
|
|
1578
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1579
1579
|
const message = Object.create(createBaseEnumDescriptorProto());
|
|
1580
1580
|
while (reader.pos < end) {
|
|
1581
1581
|
const tag = reader.uint32();
|
|
@@ -1701,7 +1701,7 @@ exports.EnumDescriptorProto_EnumReservedRange = {
|
|
|
1701
1701
|
},
|
|
1702
1702
|
decode(input, length) {
|
|
1703
1703
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1704
|
-
|
|
1704
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1705
1705
|
const message = Object.create(createBaseEnumDescriptorProto_EnumReservedRange());
|
|
1706
1706
|
while (reader.pos < end) {
|
|
1707
1707
|
const tag = reader.uint32();
|
|
@@ -1788,7 +1788,7 @@ exports.EnumValueDescriptorProto = {
|
|
|
1788
1788
|
},
|
|
1789
1789
|
decode(input, length) {
|
|
1790
1790
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1791
|
-
|
|
1791
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1792
1792
|
const message = Object.create(createBaseEnumValueDescriptorProto());
|
|
1793
1793
|
while (reader.pos < end) {
|
|
1794
1794
|
const tag = reader.uint32();
|
|
@@ -1888,7 +1888,7 @@ exports.ServiceDescriptorProto = {
|
|
|
1888
1888
|
},
|
|
1889
1889
|
decode(input, length) {
|
|
1890
1890
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1891
|
-
|
|
1891
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1892
1892
|
const message = Object.create(createBaseServiceDescriptorProto());
|
|
1893
1893
|
while (reader.pos < end) {
|
|
1894
1894
|
const tag = reader.uint32();
|
|
@@ -2006,7 +2006,7 @@ exports.MethodDescriptorProto = {
|
|
|
2006
2006
|
},
|
|
2007
2007
|
decode(input, length) {
|
|
2008
2008
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2009
|
-
|
|
2009
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2010
2010
|
const message = Object.create(createBaseMethodDescriptorProto());
|
|
2011
2011
|
while (reader.pos < end) {
|
|
2012
2012
|
const tag = reader.uint32();
|
|
@@ -2230,7 +2230,7 @@ exports.FileOptions = {
|
|
|
2230
2230
|
},
|
|
2231
2231
|
decode(input, length) {
|
|
2232
2232
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2233
|
-
|
|
2233
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2234
2234
|
const message = Object.create(createBaseFileOptions());
|
|
2235
2235
|
while (reader.pos < end) {
|
|
2236
2236
|
const tag = reader.uint32();
|
|
@@ -2581,7 +2581,7 @@ exports.MessageOptions = {
|
|
|
2581
2581
|
},
|
|
2582
2582
|
decode(input, length) {
|
|
2583
2583
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2584
|
-
|
|
2584
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2585
2585
|
const message = Object.create(createBaseMessageOptions());
|
|
2586
2586
|
while (reader.pos < end) {
|
|
2587
2587
|
const tag = reader.uint32();
|
|
@@ -2758,7 +2758,7 @@ exports.FieldOptions = {
|
|
|
2758
2758
|
},
|
|
2759
2759
|
decode(input, length) {
|
|
2760
2760
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2761
|
-
|
|
2761
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2762
2762
|
const message = Object.create(createBaseFieldOptions());
|
|
2763
2763
|
while (reader.pos < end) {
|
|
2764
2764
|
const tag = reader.uint32();
|
|
@@ -2935,7 +2935,7 @@ exports.OneofOptions = {
|
|
|
2935
2935
|
},
|
|
2936
2936
|
decode(input, length) {
|
|
2937
2937
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2938
|
-
|
|
2938
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2939
2939
|
const message = Object.create(createBaseOneofOptions());
|
|
2940
2940
|
while (reader.pos < end) {
|
|
2941
2941
|
const tag = reader.uint32();
|
|
@@ -3052,7 +3052,7 @@ exports.EnumOptions = {
|
|
|
3052
3052
|
},
|
|
3053
3053
|
decode(input, length) {
|
|
3054
3054
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3055
|
-
|
|
3055
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3056
3056
|
const message = Object.create(createBaseEnumOptions());
|
|
3057
3057
|
while (reader.pos < end) {
|
|
3058
3058
|
const tag = reader.uint32();
|
|
@@ -3188,7 +3188,7 @@ exports.EnumValueOptions = {
|
|
|
3188
3188
|
},
|
|
3189
3189
|
decode(input, length) {
|
|
3190
3190
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3191
|
-
|
|
3191
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3192
3192
|
const message = Object.create(createBaseEnumValueOptions());
|
|
3193
3193
|
while (reader.pos < end) {
|
|
3194
3194
|
const tag = reader.uint32();
|
|
@@ -3313,7 +3313,7 @@ exports.ServiceOptions = {
|
|
|
3313
3313
|
},
|
|
3314
3314
|
decode(input, length) {
|
|
3315
3315
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3316
|
-
|
|
3316
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3317
3317
|
const message = Object.create(createBaseServiceOptions());
|
|
3318
3318
|
while (reader.pos < end) {
|
|
3319
3319
|
const tag = reader.uint32();
|
|
@@ -3441,7 +3441,7 @@ exports.MethodOptions = {
|
|
|
3441
3441
|
},
|
|
3442
3442
|
decode(input, length) {
|
|
3443
3443
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3444
|
-
|
|
3444
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3445
3445
|
const message = Object.create(createBaseMethodOptions());
|
|
3446
3446
|
while (reader.pos < end) {
|
|
3447
3447
|
const tag = reader.uint32();
|
|
@@ -3587,7 +3587,7 @@ exports.UninterpretedOption = {
|
|
|
3587
3587
|
},
|
|
3588
3588
|
decode(input, length) {
|
|
3589
3589
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3590
|
-
|
|
3590
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3591
3591
|
const message = Object.create(createBaseUninterpretedOption());
|
|
3592
3592
|
while (reader.pos < end) {
|
|
3593
3593
|
const tag = reader.uint32();
|
|
@@ -3728,7 +3728,7 @@ exports.UninterpretedOption_NamePart = {
|
|
|
3728
3728
|
},
|
|
3729
3729
|
decode(input, length) {
|
|
3730
3730
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3731
|
-
|
|
3731
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3732
3732
|
const message = Object.create(createBaseUninterpretedOption_NamePart());
|
|
3733
3733
|
while (reader.pos < end) {
|
|
3734
3734
|
const tag = reader.uint32();
|
|
@@ -3809,7 +3809,7 @@ exports.SourceCodeInfo = {
|
|
|
3809
3809
|
},
|
|
3810
3810
|
decode(input, length) {
|
|
3811
3811
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3812
|
-
|
|
3812
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3813
3813
|
const message = Object.create(createBaseSourceCodeInfo());
|
|
3814
3814
|
while (reader.pos < end) {
|
|
3815
3815
|
const tag = reader.uint32();
|
|
@@ -3897,7 +3897,7 @@ exports.SourceCodeInfo_Location = {
|
|
|
3897
3897
|
},
|
|
3898
3898
|
decode(input, length) {
|
|
3899
3899
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3900
|
-
|
|
3900
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3901
3901
|
const message = Object.create(createBaseSourceCodeInfo_Location());
|
|
3902
3902
|
while (reader.pos < end) {
|
|
3903
3903
|
const tag = reader.uint32();
|
|
@@ -4027,7 +4027,7 @@ exports.GeneratedCodeInfo = {
|
|
|
4027
4027
|
},
|
|
4028
4028
|
decode(input, length) {
|
|
4029
4029
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
4030
|
-
|
|
4030
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4031
4031
|
const message = Object.create(createBaseGeneratedCodeInfo());
|
|
4032
4032
|
while (reader.pos < end) {
|
|
4033
4033
|
const tag = reader.uint32();
|
|
@@ -4110,7 +4110,7 @@ exports.GeneratedCodeInfo_Annotation = {
|
|
|
4110
4110
|
},
|
|
4111
4111
|
decode(input, length) {
|
|
4112
4112
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
4113
|
-
|
|
4113
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4114
4114
|
const message = Object.create(createBaseGeneratedCodeInfo_Annotation());
|
|
4115
4115
|
while (reader.pos < end) {
|
|
4116
4116
|
const tag = reader.uint32();
|
package/build/src/main.js
CHANGED
|
@@ -1035,7 +1035,7 @@ function generateDecode(ctx, fullName, messageDesc) {
|
|
|
1035
1035
|
length?: number,
|
|
1036
1036
|
): ${fullName} {
|
|
1037
1037
|
const reader = input instanceof ${BinaryReader} ? input : new ${BinaryReader}(input);
|
|
1038
|
-
|
|
1038
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1039
1039
|
`);
|
|
1040
1040
|
chunks.push((0, ts_poet_1.code) `const message = ${createBase}${maybeAsAny(options)};`);
|
|
1041
1041
|
// start the tag loop
|
package/build/src/types.js
CHANGED
|
@@ -125,7 +125,7 @@ function basicTypeName(ctx, field, typeOptions = {}) {
|
|
|
125
125
|
case ts_proto_descriptors_1.FieldDescriptorProto_Type.TYPE_FIXED64:
|
|
126
126
|
case ts_proto_descriptors_1.FieldDescriptorProto_Type.TYPE_SFIXED64:
|
|
127
127
|
return isJsTypeFieldOption(options, field)
|
|
128
|
-
? jsTypeName(field) ?? longTypeName(ctx)
|
|
128
|
+
? (jsTypeName(field) ?? longTypeName(ctx))
|
|
129
129
|
: // this handles 2^53, Long is only needed for 2^64; this is effectively pbjs's forceNumber
|
|
130
130
|
longTypeName(ctx);
|
|
131
131
|
case ts_proto_descriptors_1.FieldDescriptorProto_Type.TYPE_BOOL:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-proto",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/src/plugin.js",
|
|
6
6
|
"repository": "github:stephenh/ts-proto",
|
|
@@ -55,15 +55,15 @@
|
|
|
55
55
|
"nano-date": "^4.1.0",
|
|
56
56
|
"nice-grpc": "^2.1.4",
|
|
57
57
|
"object-hash": "^3.0.0",
|
|
58
|
-
"prettier": "^
|
|
58
|
+
"prettier": "^3.5.3",
|
|
59
59
|
"protobufjs": "^7.2.4",
|
|
60
60
|
"protobufjs-cli": "^1.1.1",
|
|
61
61
|
"reflect-metadata": "^0.1.13",
|
|
62
62
|
"rxjs": "^7.8.1",
|
|
63
63
|
"semantic-release": "^24.0.0",
|
|
64
|
-
"ts-jest": "^29.
|
|
65
|
-
"tsx": "^4.
|
|
66
|
-
"typescript": "^5.
|
|
64
|
+
"ts-jest": "^29.3.4",
|
|
65
|
+
"tsx": "^4.19.4",
|
|
66
|
+
"typescript": "^5.8.3",
|
|
67
67
|
"uglify-js": "^3.17.4"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|