@bufbuild/protobuf 2.11.0 → 2.12.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 +3 -3
- package/dist/commonjs/codegenv1/boot.d.ts +1 -0
- package/dist/{cjs/codegenv1/types.js → commonjs/codegenv1/boot.js} +3 -7
- package/dist/{cjs → commonjs}/codegenv1/types.d.ts +9 -5
- package/dist/{cjs → commonjs}/codegenv2/types.d.ts +9 -5
- package/dist/{cjs → commonjs}/descriptors.d.ts +12 -5
- package/dist/{cjs → commonjs}/equals.d.ts +8 -3
- package/dist/{cjs → commonjs}/equals.js +8 -3
- package/dist/{cjs → commonjs}/extensions.d.ts +2 -1
- package/dist/{cjs → commonjs}/extensions.js +3 -4
- package/dist/{cjs → commonjs}/from-binary.d.ts +16 -2
- package/dist/{cjs → commonjs}/from-binary.js +37 -31
- package/dist/{cjs → commonjs}/from-json.d.ts +20 -3
- package/dist/{cjs → commonjs}/from-json.js +175 -55
- package/dist/commonjs/json-value.js +15 -0
- package/dist/commonjs/package.json +4 -0
- package/dist/{cjs → commonjs}/proto-int64.js +1 -0
- package/dist/{cjs → commonjs}/reflect/path.d.ts +1 -1
- package/dist/{cjs → commonjs}/reflect/reflect-check.js +3 -1
- package/dist/commonjs/reflect/scalar.d.ts +43 -0
- package/dist/{cjs → commonjs}/reflect/scalar.js +33 -6
- package/dist/{cjs → commonjs}/registry.js +24 -1
- package/dist/{cjs → commonjs}/to-json.d.ts +1 -1
- package/dist/{cjs → commonjs}/to-json.js +9 -10
- package/dist/{cjs → commonjs}/types.d.ts +1 -1
- package/dist/{cjs/codegenv2 → commonjs}/types.js +0 -7
- package/dist/{cjs → commonjs}/wire/binary-encoding.d.ts +13 -9
- package/dist/{cjs → commonjs}/wire/binary-encoding.js +26 -11
- package/dist/{cjs → commonjs}/wire/size-delimited.d.ts +1 -1
- package/dist/{cjs → commonjs}/wire/text-encoding.d.ts +4 -2
- package/dist/{cjs → commonjs}/wire/text-encoding.js +8 -1
- package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/api_pb.d.ts +1 -1
- package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +2 -2
- package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/descriptor_pb.d.ts +37 -23
- package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/descriptor_pb.js +1 -1
- package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/field_mask_pb.d.ts +32 -36
- package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/go_features_pb.d.ts +65 -0
- package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/go_features_pb.js +38 -2
- package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/timestamp_pb.d.ts +5 -5
- package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/type_pb.d.ts +3 -3
- package/dist/{cjs → commonjs}/wkt/wrappers.d.ts +10 -0
- package/dist/{cjs → commonjs}/wkt/wrappers.js +24 -0
- package/dist/esm/codegenv1/boot.d.ts +1 -0
- package/dist/esm/codegenv1/boot.js +14 -0
- package/dist/esm/codegenv1/types.d.ts +9 -5
- package/dist/esm/codegenv1/types.js +0 -7
- package/dist/esm/codegenv2/types.d.ts +9 -5
- package/dist/esm/codegenv2/types.js +0 -7
- package/dist/esm/descriptors.d.ts +12 -5
- package/dist/esm/equals.d.ts +8 -3
- package/dist/esm/equals.js +8 -3
- package/dist/esm/extensions.d.ts +2 -1
- package/dist/esm/extensions.js +4 -5
- package/dist/esm/from-binary.d.ts +16 -2
- package/dist/esm/from-binary.js +36 -31
- package/dist/esm/from-json.d.ts +20 -3
- package/dist/esm/from-json.js +176 -56
- package/dist/esm/package.json +4 -0
- package/dist/esm/proto-int64.js +1 -0
- package/dist/esm/reflect/path.d.ts +1 -1
- package/dist/esm/reflect/reflect-check.js +3 -1
- package/dist/esm/reflect/scalar.d.ts +27 -5
- package/dist/esm/reflect/scalar.js +33 -6
- package/dist/esm/registry.js +24 -1
- package/dist/esm/to-json.d.ts +1 -1
- package/dist/esm/to-json.js +10 -11
- package/dist/esm/types.d.ts +1 -1
- package/dist/esm/wire/binary-encoding.d.ts +13 -9
- package/dist/esm/wire/binary-encoding.js +26 -11
- package/dist/esm/wire/size-delimited.d.ts +1 -1
- package/dist/esm/wire/text-encoding.d.ts +4 -2
- package/dist/esm/wire/text-encoding.js +8 -1
- package/dist/esm/wkt/gen/google/protobuf/api_pb.d.ts +1 -1
- package/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +2 -2
- package/dist/esm/wkt/gen/google/protobuf/descriptor_pb.d.ts +37 -23
- package/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +1 -1
- package/dist/esm/wkt/gen/google/protobuf/field_mask_pb.d.ts +32 -36
- package/dist/esm/wkt/gen/google/protobuf/go_features_pb.d.ts +65 -0
- package/dist/esm/wkt/gen/google/protobuf/go_features_pb.js +37 -1
- package/dist/esm/wkt/gen/google/protobuf/timestamp_pb.d.ts +5 -5
- package/dist/esm/wkt/gen/google/protobuf/type_pb.d.ts +3 -3
- package/dist/esm/wkt/wrappers.d.ts +10 -0
- package/dist/esm/wkt/wrappers.js +23 -0
- package/package.json +97 -31
- package/dist/cjs/package.json +0 -1
- package/dist/cjs/reflect/scalar.d.ts +0 -21
- /package/dist/{cjs → commonjs}/clone.d.ts +0 -0
- /package/dist/{cjs → commonjs}/clone.js +0 -0
- /package/dist/{cjs → commonjs}/codegenv1/enum.d.ts +0 -0
- /package/dist/{cjs → commonjs}/codegenv1/enum.js +0 -0
- /package/dist/{cjs → commonjs}/codegenv1/extension.d.ts +0 -0
- /package/dist/{cjs → commonjs}/codegenv1/extension.js +0 -0
- /package/dist/{cjs → commonjs}/codegenv1/file.d.ts +0 -0
- /package/dist/{cjs → commonjs}/codegenv1/file.js +0 -0
- /package/dist/{cjs → commonjs}/codegenv1/index.d.ts +0 -0
- /package/dist/{cjs → commonjs}/codegenv1/index.js +0 -0
- /package/dist/{cjs → commonjs}/codegenv1/message.d.ts +0 -0
- /package/dist/{cjs → commonjs}/codegenv1/message.js +0 -0
- /package/dist/{cjs → commonjs}/codegenv1/service.d.ts +0 -0
- /package/dist/{cjs → commonjs}/codegenv1/service.js +0 -0
- /package/dist/{cjs → commonjs}/codegenv1/symbols.d.ts +0 -0
- /package/dist/{cjs → commonjs}/codegenv1/symbols.js +0 -0
- /package/dist/{cjs → commonjs/codegenv1}/types.js +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/boot.d.ts +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/boot.js +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/embed.d.ts +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/embed.js +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/enum.d.ts +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/enum.js +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/extension.d.ts +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/extension.js +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/file.d.ts +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/file.js +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/index.d.ts +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/index.js +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/message.d.ts +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/message.js +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/restore-json-names.d.ts +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/restore-json-names.js +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/scalar.d.ts +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/scalar.js +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/service.d.ts +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/service.js +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/symbols.d.ts +0 -0
- /package/dist/{cjs → commonjs}/codegenv2/symbols.js +0 -0
- /package/dist/{cjs/json-value.js → commonjs/codegenv2/types.js} +0 -0
- /package/dist/{cjs → commonjs}/create.d.ts +0 -0
- /package/dist/{cjs → commonjs}/create.js +0 -0
- /package/dist/{cjs → commonjs}/descriptors.js +0 -0
- /package/dist/{cjs → commonjs}/fields.d.ts +0 -0
- /package/dist/{cjs → commonjs}/fields.js +0 -0
- /package/dist/{cjs → commonjs}/index.d.ts +0 -0
- /package/dist/{cjs → commonjs}/index.js +0 -0
- /package/dist/{cjs → commonjs}/is-message.d.ts +0 -0
- /package/dist/{cjs → commonjs}/is-message.js +0 -0
- /package/dist/{cjs → commonjs}/json-value.d.ts +0 -0
- /package/dist/{cjs → commonjs}/merge.d.ts +0 -0
- /package/dist/{cjs → commonjs}/merge.js +0 -0
- /package/dist/{cjs → commonjs}/proto-int64.d.ts +0 -0
- /package/dist/{cjs → commonjs}/reflect/error.d.ts +0 -0
- /package/dist/{cjs → commonjs}/reflect/error.js +0 -0
- /package/dist/{cjs → commonjs}/reflect/guard.d.ts +0 -0
- /package/dist/{cjs → commonjs}/reflect/guard.js +0 -0
- /package/dist/{cjs → commonjs}/reflect/index.d.ts +0 -0
- /package/dist/{cjs → commonjs}/reflect/index.js +0 -0
- /package/dist/{cjs → commonjs}/reflect/names.d.ts +0 -0
- /package/dist/{cjs → commonjs}/reflect/names.js +0 -0
- /package/dist/{cjs → commonjs}/reflect/nested-types.d.ts +0 -0
- /package/dist/{cjs → commonjs}/reflect/nested-types.js +0 -0
- /package/dist/{cjs → commonjs}/reflect/path.js +0 -0
- /package/dist/{cjs → commonjs}/reflect/reflect-check.d.ts +0 -0
- /package/dist/{cjs → commonjs}/reflect/reflect-types.d.ts +0 -0
- /package/dist/{cjs → commonjs}/reflect/reflect-types.js +0 -0
- /package/dist/{cjs → commonjs}/reflect/reflect.d.ts +0 -0
- /package/dist/{cjs → commonjs}/reflect/reflect.js +0 -0
- /package/dist/{cjs → commonjs}/reflect/unsafe.d.ts +0 -0
- /package/dist/{cjs → commonjs}/reflect/unsafe.js +0 -0
- /package/dist/{cjs → commonjs}/registry.d.ts +0 -0
- /package/dist/{cjs → commonjs}/to-binary.d.ts +0 -0
- /package/dist/{cjs → commonjs}/to-binary.js +0 -0
- /package/dist/{cjs → commonjs}/wire/base64-encoding.d.ts +0 -0
- /package/dist/{cjs → commonjs}/wire/base64-encoding.js +0 -0
- /package/dist/{cjs → commonjs}/wire/index.d.ts +0 -0
- /package/dist/{cjs → commonjs}/wire/index.js +0 -0
- /package/dist/{cjs → commonjs}/wire/size-delimited.js +0 -0
- /package/dist/{cjs → commonjs}/wire/text-format.d.ts +0 -0
- /package/dist/{cjs → commonjs}/wire/text-format.js +0 -0
- /package/dist/{cjs → commonjs}/wire/varint.d.ts +0 -0
- /package/dist/{cjs → commonjs}/wire/varint.js +0 -0
- /package/dist/{cjs → commonjs}/wkt/any.d.ts +0 -0
- /package/dist/{cjs → commonjs}/wkt/any.js +0 -0
- /package/dist/{cjs → commonjs}/wkt/duration.d.ts +0 -0
- /package/dist/{cjs → commonjs}/wkt/duration.js +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/any_pb.d.ts +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/any_pb.js +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/api_pb.js +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/compiler/plugin_pb.js +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/cpp_features_pb.d.ts +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/cpp_features_pb.js +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/duration_pb.d.ts +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/duration_pb.js +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/empty_pb.d.ts +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/empty_pb.js +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/field_mask_pb.js +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/java_features_pb.d.ts +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/java_features_pb.js +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/source_context_pb.d.ts +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/source_context_pb.js +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/struct_pb.d.ts +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/struct_pb.js +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/timestamp_pb.js +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/type_pb.js +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/wrappers_pb.d.ts +0 -0
- /package/dist/{cjs → commonjs}/wkt/gen/google/protobuf/wrappers_pb.js +0 -0
- /package/dist/{cjs → commonjs}/wkt/index.d.ts +0 -0
- /package/dist/{cjs → commonjs}/wkt/index.js +0 -0
- /package/dist/{cjs → commonjs}/wkt/timestamp.d.ts +0 -0
- /package/dist/{cjs → commonjs}/wkt/timestamp.js +0 -0
|
@@ -197,6 +197,8 @@ function initBaseRegistry(inputs) {
|
|
|
197
197
|
const EDITION_PROTO2 = 998;
|
|
198
198
|
// bootstrap-inject google.protobuf.Edition.EDITION_PROTO3: const $name: Edition.$localName = $number;
|
|
199
199
|
const EDITION_PROTO3 = 999;
|
|
200
|
+
// bootstrap-inject google.protobuf.Edition.EDITION_UNSTABLE: const $name: Edition.$localName = $number;
|
|
201
|
+
const EDITION_UNSTABLE = 9999;
|
|
200
202
|
// bootstrap-inject google.protobuf.FieldDescriptorProto.Type.TYPE_STRING: const $name: FieldDescriptorProto_Type.$localName = $number;
|
|
201
203
|
const TYPE_STRING = 9;
|
|
202
204
|
// bootstrap-inject google.protobuf.FieldDescriptorProto.Type.TYPE_GROUP: const $name: FieldDescriptorProto_Type.$localName = $number;
|
|
@@ -227,9 +229,11 @@ const PACKED = 1;
|
|
|
227
229
|
const DELIMITED = 2;
|
|
228
230
|
// bootstrap-inject google.protobuf.FeatureSet.EnumType.OPEN: const $name: FeatureSet_EnumType.$localName = $number;
|
|
229
231
|
const OPEN = 1;
|
|
232
|
+
// bootstrap-inject google.protobuf.FeatureSet.Utf8Validation.VERIFY: const $name: FeatureSet_Utf8Validation.$localName = $number;
|
|
233
|
+
const VERIFY = 2;
|
|
230
234
|
// biome-ignore format: want this to read well
|
|
231
235
|
// bootstrap-inject defaults: EDITION_PROTO2 to EDITION_2024: export const minimumEdition: SupportedEdition = $minimumEdition, maximumEdition: SupportedEdition = $maximumEdition;
|
|
232
|
-
// generated from protoc
|
|
236
|
+
// generated from protoc v34.1
|
|
233
237
|
exports.minimumEdition = 998, exports.maximumEdition = 1001;
|
|
234
238
|
const featureDefaults = {
|
|
235
239
|
// EDITION_PROTO2
|
|
@@ -568,6 +572,7 @@ function newField(proto, parentOrFile, reg, oneof, mapEntries) {
|
|
|
568
572
|
message: undefined,
|
|
569
573
|
enum: undefined,
|
|
570
574
|
presence: getFieldPresence(proto, oneof, isExtension, parentOrFile),
|
|
575
|
+
utf8Validation: isUtf8Validated(proto, parentOrFile),
|
|
571
576
|
listKind: undefined,
|
|
572
577
|
mapKind: undefined,
|
|
573
578
|
mapKey: undefined,
|
|
@@ -696,6 +701,12 @@ function getFileEdition(proto) {
|
|
|
696
701
|
case "proto3":
|
|
697
702
|
return EDITION_PROTO3;
|
|
698
703
|
case "editions":
|
|
704
|
+
// EDITION_UNSTABLE is a sandbox for in-development features. Collapse
|
|
705
|
+
// it to maximumEdition so SupportedEdition and feature resolution do
|
|
706
|
+
// not leak the test-only edition to users.
|
|
707
|
+
if (proto.edition === EDITION_UNSTABLE) {
|
|
708
|
+
return exports.maximumEdition;
|
|
709
|
+
}
|
|
699
710
|
if (proto.edition in featureDefaults) {
|
|
700
711
|
return proto.edition;
|
|
701
712
|
}
|
|
@@ -891,6 +902,18 @@ function isDelimitedEncoding(proto, parent) {
|
|
|
891
902
|
parent,
|
|
892
903
|
}));
|
|
893
904
|
}
|
|
905
|
+
/**
|
|
906
|
+
* Reject invalid UTF-8 when reading string fields from the binary wire format?
|
|
907
|
+
* Driven by the resolved `utf8_validation` feature: VERIFY (proto3 / editions
|
|
908
|
+
* 2023+ default) enforces; NONE (proto2 default) does not.
|
|
909
|
+
*/
|
|
910
|
+
function isUtf8Validated(proto, parent) {
|
|
911
|
+
return (VERIFY ==
|
|
912
|
+
resolveFeature("utf8Validation", {
|
|
913
|
+
proto,
|
|
914
|
+
parent,
|
|
915
|
+
}));
|
|
916
|
+
}
|
|
894
917
|
function resolveFeature(name, ref) {
|
|
895
918
|
var _a, _b;
|
|
896
919
|
const featureSet = (_a = ref.proto.options) === null || _a === void 0 ? void 0 : _a.features;
|
|
@@ -226,10 +226,12 @@ function scalarToJson(field, value) {
|
|
|
226
226
|
case descriptors_js_1.ScalarType.INT64:
|
|
227
227
|
case descriptors_js_1.ScalarType.SFIXED64:
|
|
228
228
|
case descriptors_js_1.ScalarType.SINT64:
|
|
229
|
-
if (typeof value
|
|
230
|
-
|
|
229
|
+
if (typeof value == "bigint" ||
|
|
230
|
+
typeof value == "string" ||
|
|
231
|
+
(typeof value == "number" && Number.isInteger(value))) {
|
|
232
|
+
return value.toString();
|
|
231
233
|
}
|
|
232
|
-
|
|
234
|
+
throw new Error(`cannot encode ${field} to JSON: ${(_e = (0, reflect_check_js_1.checkField)(field, value)) === null || _e === void 0 ? void 0 : _e.message}`);
|
|
233
235
|
// bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings.
|
|
234
236
|
// Either standard or URL-safe base64 encoding with/without paddings are accepted.
|
|
235
237
|
case descriptors_js_1.ScalarType.BYTES:
|
|
@@ -286,13 +288,10 @@ function anyToJson(val, opts) {
|
|
|
286
288
|
if (!desc || !message) {
|
|
287
289
|
throw new Error(`cannot encode message ${val.$typeName} to JSON: "${val.typeUrl}" is not in the type registry`);
|
|
288
290
|
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
typeof json !== "object") {
|
|
294
|
-
json = { value: json };
|
|
295
|
-
}
|
|
291
|
+
const reflected = (0, reflect_js_1.reflect)(desc, message);
|
|
292
|
+
const json = (0, wrappers_js_1.hasCustomJsonRepresentation)(desc)
|
|
293
|
+
? { value: tryWktToJson(reflected, opts) }
|
|
294
|
+
: reflectToJson(reflected, opts);
|
|
296
295
|
json["@type"] = val.typeUrl;
|
|
297
296
|
return json;
|
|
298
297
|
}
|
|
@@ -15,7 +15,7 @@ export type Message<TypeName extends string = string> = {
|
|
|
15
15
|
/**
|
|
16
16
|
* Unknown fields and extensions stored on the message.
|
|
17
17
|
*/
|
|
18
|
-
$unknown?: UnknownField[];
|
|
18
|
+
$unknown?: UnknownField[] | undefined;
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
21
|
* Extract the message type from a message descriptor.
|
|
@@ -13,10 +13,3 @@
|
|
|
13
13
|
// See the License for the specific language governing permissions and
|
|
14
14
|
// limitations under the License.
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
class brandv2 {
|
|
17
|
-
constructor() {
|
|
18
|
-
this.v = "codegenv2";
|
|
19
|
-
this.a = false;
|
|
20
|
-
this.b = false;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -63,7 +63,7 @@ export declare class BinaryWriter {
|
|
|
63
63
|
private readonly encodeUtf8;
|
|
64
64
|
/**
|
|
65
65
|
* We cannot allocate a buffer for the entire output
|
|
66
|
-
* because we don't know
|
|
66
|
+
* because we don't know its size.
|
|
67
67
|
*
|
|
68
68
|
* So we collect smaller chunks of known size and
|
|
69
69
|
* concat them later.
|
|
@@ -120,7 +120,7 @@ export declare class BinaryWriter {
|
|
|
120
120
|
*/
|
|
121
121
|
int32(value: number): this;
|
|
122
122
|
/**
|
|
123
|
-
* Write a `bool` value, a
|
|
123
|
+
* Write a `bool` value, a varint.
|
|
124
124
|
*/
|
|
125
125
|
bool(value: boolean): this;
|
|
126
126
|
/**
|
|
@@ -152,7 +152,7 @@ export declare class BinaryWriter {
|
|
|
152
152
|
*/
|
|
153
153
|
sint32(value: number): this;
|
|
154
154
|
/**
|
|
155
|
-
* Write a `
|
|
155
|
+
* Write a `sfixed64` value, a signed, fixed-length 64-bit integer.
|
|
156
156
|
*/
|
|
157
157
|
sfixed64(value: string | number | bigint): this;
|
|
158
158
|
/**
|
|
@@ -184,18 +184,21 @@ export declare class BinaryReader {
|
|
|
184
184
|
readonly len: number;
|
|
185
185
|
protected readonly buf: Uint8Array;
|
|
186
186
|
private readonly view;
|
|
187
|
-
constructor(buf: Uint8Array, decodeUtf8?: (bytes: Uint8Array) => string);
|
|
187
|
+
constructor(buf: Uint8Array, decodeUtf8?: (bytes: Uint8Array, strict?: boolean) => string);
|
|
188
188
|
/**
|
|
189
|
-
* Reads a tag - field number and wire type.
|
|
189
|
+
* Reads a tag - field number and wire type. Tags are uint32 varints; values
|
|
190
|
+
* that do not fit in uint32 are rejected.
|
|
190
191
|
*/
|
|
191
192
|
tag(): [number, WireType];
|
|
192
193
|
/**
|
|
193
194
|
* Skip one element and return the skipped data.
|
|
194
195
|
*
|
|
195
196
|
* When skipping StartGroup, provide the tags field number to check for
|
|
196
|
-
* matching field number in the EndGroup tag.
|
|
197
|
+
* matching field number in the EndGroup tag. Recursion into nested groups
|
|
198
|
+
* is guarded by the `recursionLimit` argument: When the limit is reached,
|
|
199
|
+
* this method throws.
|
|
197
200
|
*/
|
|
198
|
-
skip(wireType: WireType, fieldNo?: number): Uint8Array;
|
|
201
|
+
skip(wireType: WireType, fieldNo?: number, recursionLimit?: number): Uint8Array;
|
|
199
202
|
protected varint64: () => [number, number];
|
|
200
203
|
/**
|
|
201
204
|
* Throws error if position in byte array is out of range.
|
|
@@ -258,7 +261,8 @@ export declare class BinaryReader {
|
|
|
258
261
|
*/
|
|
259
262
|
bytes(): Uint8Array;
|
|
260
263
|
/**
|
|
261
|
-
* Read a `string` field, length-delimited data converted to UTF-8 text.
|
|
264
|
+
* Read a `string` field, length-delimited data converted to UTF-8 text. If
|
|
265
|
+
* `strict` is true, throw on invalid UTF-8 instead of substituting U+FFFD.
|
|
262
266
|
*/
|
|
263
|
-
string(): string;
|
|
267
|
+
string(strict?: boolean): string;
|
|
264
268
|
}
|
|
@@ -181,7 +181,7 @@ class BinaryWriter {
|
|
|
181
181
|
return this;
|
|
182
182
|
}
|
|
183
183
|
/**
|
|
184
|
-
* Write a `bool` value, a
|
|
184
|
+
* Write a `bool` value, a varint.
|
|
185
185
|
*/
|
|
186
186
|
bool(value) {
|
|
187
187
|
this.buf.push(value ? 1 : 0);
|
|
@@ -248,7 +248,7 @@ class BinaryWriter {
|
|
|
248
248
|
return this;
|
|
249
249
|
}
|
|
250
250
|
/**
|
|
251
|
-
* Write a `
|
|
251
|
+
* Write a `sfixed64` value, a signed, fixed-length 64-bit integer.
|
|
252
252
|
*/
|
|
253
253
|
sfixed64(value) {
|
|
254
254
|
let chunk = new Uint8Array(8), view = new DataView(chunk.buffer), tc = proto_int64_js_1.protoInt64.enc(value);
|
|
@@ -307,21 +307,32 @@ class BinaryReader {
|
|
|
307
307
|
this.view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength);
|
|
308
308
|
}
|
|
309
309
|
/**
|
|
310
|
-
* Reads a tag - field number and wire type.
|
|
310
|
+
* Reads a tag - field number and wire type. Tags are uint32 varints; values
|
|
311
|
+
* that do not fit in uint32 are rejected.
|
|
311
312
|
*/
|
|
312
313
|
tag() {
|
|
313
|
-
|
|
314
|
-
|
|
314
|
+
const start = this.pos;
|
|
315
|
+
const tag = this.uint32();
|
|
316
|
+
const bytesRead = this.pos - start;
|
|
317
|
+
if (bytesRead > 5 || (bytesRead == 5 && this.buf[this.pos - 1] > 0x0f)) {
|
|
318
|
+
throw new Error("illegal tag: varint overflows uint32");
|
|
319
|
+
}
|
|
320
|
+
const fieldNo = tag >>> 3;
|
|
321
|
+
const wireType = tag & 7;
|
|
322
|
+
if (fieldNo <= 0 || wireType > 5) {
|
|
315
323
|
throw new Error("illegal tag: field no " + fieldNo + " wire type " + wireType);
|
|
324
|
+
}
|
|
316
325
|
return [fieldNo, wireType];
|
|
317
326
|
}
|
|
318
327
|
/**
|
|
319
328
|
* Skip one element and return the skipped data.
|
|
320
329
|
*
|
|
321
330
|
* When skipping StartGroup, provide the tags field number to check for
|
|
322
|
-
* matching field number in the EndGroup tag.
|
|
331
|
+
* matching field number in the EndGroup tag. Recursion into nested groups
|
|
332
|
+
* is guarded by the `recursionLimit` argument: When the limit is reached,
|
|
333
|
+
* this method throws.
|
|
323
334
|
*/
|
|
324
|
-
skip(wireType, fieldNo) {
|
|
335
|
+
skip(wireType, fieldNo, recursionLimit = 100) {
|
|
325
336
|
let start = this.pos;
|
|
326
337
|
switch (wireType) {
|
|
327
338
|
case WireType.Varint:
|
|
@@ -340,6 +351,9 @@ class BinaryReader {
|
|
|
340
351
|
this.pos += len;
|
|
341
352
|
break;
|
|
342
353
|
case WireType.StartGroup:
|
|
354
|
+
if (recursionLimit <= 0) {
|
|
355
|
+
throw new Error("maximum recursion depth reached");
|
|
356
|
+
}
|
|
343
357
|
for (;;) {
|
|
344
358
|
const [fn, wt] = this.tag();
|
|
345
359
|
if (wt === WireType.EndGroup) {
|
|
@@ -348,7 +362,7 @@ class BinaryReader {
|
|
|
348
362
|
}
|
|
349
363
|
break;
|
|
350
364
|
}
|
|
351
|
-
this.skip(wt, fn);
|
|
365
|
+
this.skip(wt, fn, recursionLimit - 1);
|
|
352
366
|
}
|
|
353
367
|
break;
|
|
354
368
|
default:
|
|
@@ -458,10 +472,11 @@ class BinaryReader {
|
|
|
458
472
|
return this.buf.subarray(start, start + len);
|
|
459
473
|
}
|
|
460
474
|
/**
|
|
461
|
-
* Read a `string` field, length-delimited data converted to UTF-8 text.
|
|
475
|
+
* Read a `string` field, length-delimited data converted to UTF-8 text. If
|
|
476
|
+
* `strict` is true, throw on invalid UTF-8 instead of substituting U+FFFD.
|
|
462
477
|
*/
|
|
463
|
-
string() {
|
|
464
|
-
return this.decodeUtf8(this.bytes());
|
|
478
|
+
string(strict) {
|
|
479
|
+
return this.decodeUtf8(this.bytes(), strict);
|
|
465
480
|
}
|
|
466
481
|
}
|
|
467
482
|
exports.BinaryReader = BinaryReader;
|
|
@@ -21,7 +21,7 @@ export declare function sizeDelimitedEncode<Desc extends DescMessage>(messageDes
|
|
|
21
21
|
* This size-delimited format is compatible with other implementations.
|
|
22
22
|
* For details, see https://github.com/protocolbuffers/protobuf/issues/10229
|
|
23
23
|
*/
|
|
24
|
-
export declare function sizeDelimitedDecodeStream<Desc extends DescMessage>(messageDesc: Desc, iterable: AsyncIterable<Uint8Array>, options?: BinaryReadOptions): AsyncIterableIterator<MessageShape<Desc>>;
|
|
24
|
+
export declare function sizeDelimitedDecodeStream<Desc extends DescMessage>(messageDesc: Desc, iterable: AsyncIterable<Uint8Array>, options?: Partial<BinaryReadOptions>): AsyncIterableIterator<MessageShape<Desc>>;
|
|
25
25
|
/**
|
|
26
26
|
* Decodes the size from the given size-delimited message, which may be
|
|
27
27
|
* incomplete.
|
|
@@ -8,9 +8,11 @@ interface TextEncoding {
|
|
|
8
8
|
*/
|
|
9
9
|
encodeUtf8: (text: string) => Uint8Array<ArrayBuffer>;
|
|
10
10
|
/**
|
|
11
|
-
* Decode UTF-8 text from binary.
|
|
11
|
+
* Decode UTF-8 text from binary. If `strict` is true, throw on invalid byte
|
|
12
|
+
* sequences instead of silently substituting U+FFFD. Implementations that
|
|
13
|
+
* do not support strict decoding may ignore the flag.
|
|
12
14
|
*/
|
|
13
|
-
decodeUtf8: (bytes: Uint8Array) => string;
|
|
15
|
+
decodeUtf8: (bytes: Uint8Array, strict?: boolean) => string;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
18
|
* Protobuf-ES requires the Text Encoding API to convert UTF-8 from and to
|
|
@@ -32,11 +32,18 @@ function getTextEncoding() {
|
|
|
32
32
|
if (globalThis[symbol] == undefined) {
|
|
33
33
|
const te = new globalThis.TextEncoder();
|
|
34
34
|
const td = new globalThis.TextDecoder();
|
|
35
|
+
let tdStrict;
|
|
35
36
|
globalThis[symbol] = {
|
|
36
37
|
encodeUtf8(text) {
|
|
37
38
|
return te.encode(text);
|
|
38
39
|
},
|
|
39
|
-
decodeUtf8(bytes) {
|
|
40
|
+
decodeUtf8(bytes, strict) {
|
|
41
|
+
if (strict) {
|
|
42
|
+
if (tdStrict === undefined) {
|
|
43
|
+
tdStrict = new globalThis.TextDecoder("utf-8", { fatal: true });
|
|
44
|
+
}
|
|
45
|
+
return tdStrict.decode(bytes);
|
|
46
|
+
}
|
|
40
47
|
return td.decode(bytes);
|
|
41
48
|
},
|
|
42
49
|
checkUtf8(text) {
|
|
@@ -75,7 +75,7 @@ export type Api = Message<"google.protobuf.Api"> & {
|
|
|
75
75
|
*
|
|
76
76
|
* @generated from field: google.protobuf.SourceContext source_context = 5;
|
|
77
77
|
*/
|
|
78
|
-
sourceContext?: SourceContext;
|
|
78
|
+
sourceContext?: SourceContext | undefined;
|
|
79
79
|
/**
|
|
80
80
|
* Included interfaces. See [Mixin][].
|
|
81
81
|
*
|
|
@@ -121,7 +121,7 @@ export type CodeGeneratorRequest = Message<"google.protobuf.compiler.CodeGenerat
|
|
|
121
121
|
*
|
|
122
122
|
* @generated from field: optional google.protobuf.compiler.Version compiler_version = 3;
|
|
123
123
|
*/
|
|
124
|
-
compilerVersion?: Version;
|
|
124
|
+
compilerVersion?: Version | undefined;
|
|
125
125
|
};
|
|
126
126
|
/**
|
|
127
127
|
* An encoded CodeGeneratorRequest is written to the plugin's stdin.
|
|
@@ -371,7 +371,7 @@ export type CodeGeneratorResponse_File = Message<"google.protobuf.compiler.CodeG
|
|
|
371
371
|
*
|
|
372
372
|
* @generated from field: optional google.protobuf.GeneratedCodeInfo generated_code_info = 16;
|
|
373
373
|
*/
|
|
374
|
-
generatedCodeInfo?: GeneratedCodeInfo;
|
|
374
|
+
generatedCodeInfo?: GeneratedCodeInfo | undefined;
|
|
375
375
|
};
|
|
376
376
|
/**
|
|
377
377
|
* Represents a single generated file.
|
|
@@ -100,7 +100,7 @@ export type FileDescriptorProto = Message<"google.protobuf.FileDescriptorProto">
|
|
|
100
100
|
/**
|
|
101
101
|
* @generated from field: optional google.protobuf.FileOptions options = 8;
|
|
102
102
|
*/
|
|
103
|
-
options?: FileOptions;
|
|
103
|
+
options?: FileOptions | undefined;
|
|
104
104
|
/**
|
|
105
105
|
* This field contains optional information about the original source code.
|
|
106
106
|
* You may safely remove this entire field without harming runtime
|
|
@@ -109,7 +109,7 @@ export type FileDescriptorProto = Message<"google.protobuf.FileDescriptorProto">
|
|
|
109
109
|
*
|
|
110
110
|
* @generated from field: optional google.protobuf.SourceCodeInfo source_code_info = 9;
|
|
111
111
|
*/
|
|
112
|
-
sourceCodeInfo?: SourceCodeInfo;
|
|
112
|
+
sourceCodeInfo?: SourceCodeInfo | undefined;
|
|
113
113
|
/**
|
|
114
114
|
* The syntax of the proto file.
|
|
115
115
|
* The supported values are "proto2", "proto3", and "editions".
|
|
@@ -273,7 +273,7 @@ export type DescriptorProto = Message<"google.protobuf.DescriptorProto"> & {
|
|
|
273
273
|
/**
|
|
274
274
|
* @generated from field: optional google.protobuf.MessageOptions options = 7;
|
|
275
275
|
*/
|
|
276
|
-
options?: MessageOptions;
|
|
276
|
+
options?: MessageOptions | undefined;
|
|
277
277
|
/**
|
|
278
278
|
* @generated from field: repeated google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
|
|
279
279
|
*/
|
|
@@ -374,7 +374,7 @@ export type DescriptorProto_ExtensionRange = Message<"google.protobuf.Descriptor
|
|
|
374
374
|
/**
|
|
375
375
|
* @generated from field: optional google.protobuf.ExtensionRangeOptions options = 3;
|
|
376
376
|
*/
|
|
377
|
-
options?: ExtensionRangeOptions;
|
|
377
|
+
options?: ExtensionRangeOptions | undefined;
|
|
378
378
|
};
|
|
379
379
|
/**
|
|
380
380
|
* @generated from message google.protobuf.DescriptorProto.ExtensionRange
|
|
@@ -476,7 +476,7 @@ export type ExtensionRangeOptions = Message<"google.protobuf.ExtensionRangeOptio
|
|
|
476
476
|
*
|
|
477
477
|
* @generated from field: optional google.protobuf.FeatureSet features = 50;
|
|
478
478
|
*/
|
|
479
|
-
features?: FeatureSet;
|
|
479
|
+
features?: FeatureSet | undefined;
|
|
480
480
|
/**
|
|
481
481
|
* The verification state of the range.
|
|
482
482
|
* TODO: flip the default to DECLARATION once all empty ranges
|
|
@@ -712,7 +712,7 @@ export type FieldDescriptorProto = Message<"google.protobuf.FieldDescriptorProto
|
|
|
712
712
|
/**
|
|
713
713
|
* @generated from field: optional google.protobuf.FieldOptions options = 8;
|
|
714
714
|
*/
|
|
715
|
-
options?: FieldOptions;
|
|
715
|
+
options?: FieldOptions | undefined;
|
|
716
716
|
/**
|
|
717
717
|
* If true, this is a proto3 "optional". When a proto3 field is optional, it
|
|
718
718
|
* tracks presence regardless of field type.
|
|
@@ -997,7 +997,7 @@ export type OneofDescriptorProto = Message<"google.protobuf.OneofDescriptorProto
|
|
|
997
997
|
/**
|
|
998
998
|
* @generated from field: optional google.protobuf.OneofOptions options = 2;
|
|
999
999
|
*/
|
|
1000
|
-
options?: OneofOptions;
|
|
1000
|
+
options?: OneofOptions | undefined;
|
|
1001
1001
|
};
|
|
1002
1002
|
/**
|
|
1003
1003
|
* Describes a oneof.
|
|
@@ -1038,7 +1038,7 @@ export type EnumDescriptorProto = Message<"google.protobuf.EnumDescriptorProto">
|
|
|
1038
1038
|
/**
|
|
1039
1039
|
* @generated from field: optional google.protobuf.EnumOptions options = 3;
|
|
1040
1040
|
*/
|
|
1041
|
-
options?: EnumOptions;
|
|
1041
|
+
options?: EnumOptions | undefined;
|
|
1042
1042
|
/**
|
|
1043
1043
|
* Range of reserved numeric values. Reserved numeric values may not be used
|
|
1044
1044
|
* by enum values in the same enum declaration. Reserved ranges may not
|
|
@@ -1180,7 +1180,7 @@ export type EnumValueDescriptorProto = Message<"google.protobuf.EnumValueDescrip
|
|
|
1180
1180
|
/**
|
|
1181
1181
|
* @generated from field: optional google.protobuf.EnumValueOptions options = 3;
|
|
1182
1182
|
*/
|
|
1183
|
-
options?: EnumValueOptions;
|
|
1183
|
+
options?: EnumValueOptions | undefined;
|
|
1184
1184
|
};
|
|
1185
1185
|
/**
|
|
1186
1186
|
* Describes a value within an enum.
|
|
@@ -1225,7 +1225,7 @@ export type ServiceDescriptorProto = Message<"google.protobuf.ServiceDescriptorP
|
|
|
1225
1225
|
/**
|
|
1226
1226
|
* @generated from field: optional google.protobuf.ServiceOptions options = 3;
|
|
1227
1227
|
*/
|
|
1228
|
-
options?: ServiceOptions;
|
|
1228
|
+
options?: ServiceOptions | undefined;
|
|
1229
1229
|
};
|
|
1230
1230
|
/**
|
|
1231
1231
|
* Describes a service.
|
|
@@ -1277,7 +1277,7 @@ export type MethodDescriptorProto = Message<"google.protobuf.MethodDescriptorPro
|
|
|
1277
1277
|
/**
|
|
1278
1278
|
* @generated from field: optional google.protobuf.MethodOptions options = 4;
|
|
1279
1279
|
*/
|
|
1280
|
-
options?: MethodOptions;
|
|
1280
|
+
options?: MethodOptions | undefined;
|
|
1281
1281
|
/**
|
|
1282
1282
|
* Identifies if client streams multiple client messages
|
|
1283
1283
|
*
|
|
@@ -1506,7 +1506,7 @@ export type FileOptions = Message<"google.protobuf.FileOptions"> & {
|
|
|
1506
1506
|
*
|
|
1507
1507
|
* @generated from field: optional google.protobuf.FeatureSet features = 50;
|
|
1508
1508
|
*/
|
|
1509
|
-
features?: FeatureSet;
|
|
1509
|
+
features?: FeatureSet | undefined;
|
|
1510
1510
|
/**
|
|
1511
1511
|
* The parser stores options it doesn't recognize here.
|
|
1512
1512
|
* See the documentation for the "Options" section above.
|
|
@@ -1832,7 +1832,7 @@ export type MessageOptions = Message<"google.protobuf.MessageOptions"> & {
|
|
|
1832
1832
|
*
|
|
1833
1833
|
* @generated from field: optional google.protobuf.FeatureSet features = 12;
|
|
1834
1834
|
*/
|
|
1835
|
-
features?: FeatureSet;
|
|
1835
|
+
features?: FeatureSet | undefined;
|
|
1836
1836
|
/**
|
|
1837
1837
|
* The parser stores options it doesn't recognize here. See above.
|
|
1838
1838
|
*
|
|
@@ -2072,11 +2072,11 @@ export type FieldOptions = Message<"google.protobuf.FieldOptions"> & {
|
|
|
2072
2072
|
*
|
|
2073
2073
|
* @generated from field: optional google.protobuf.FeatureSet features = 21;
|
|
2074
2074
|
*/
|
|
2075
|
-
features?: FeatureSet;
|
|
2075
|
+
features?: FeatureSet | undefined;
|
|
2076
2076
|
/**
|
|
2077
2077
|
* @generated from field: optional google.protobuf.FieldOptions.FeatureSupport feature_support = 22;
|
|
2078
2078
|
*/
|
|
2079
|
-
featureSupport?: FieldOptions_FeatureSupport;
|
|
2079
|
+
featureSupport?: FieldOptions_FeatureSupport | undefined;
|
|
2080
2080
|
/**
|
|
2081
2081
|
* The parser stores options it doesn't recognize here. See above.
|
|
2082
2082
|
*
|
|
@@ -2299,6 +2299,13 @@ export type FieldOptions_FeatureSupport = Message<"google.protobuf.FieldOptions.
|
|
|
2299
2299
|
* @generated from field: optional google.protobuf.Edition edition_removed = 4;
|
|
2300
2300
|
*/
|
|
2301
2301
|
editionRemoved: Edition;
|
|
2302
|
+
/**
|
|
2303
|
+
* The removal error text if this feature is used after the edition it was
|
|
2304
|
+
* removed in.
|
|
2305
|
+
*
|
|
2306
|
+
* @generated from field: optional string removal_error = 5;
|
|
2307
|
+
*/
|
|
2308
|
+
removalError: string;
|
|
2302
2309
|
};
|
|
2303
2310
|
/**
|
|
2304
2311
|
* Information about the support window of a feature.
|
|
@@ -2336,6 +2343,13 @@ export type FieldOptions_FeatureSupportJson = {
|
|
|
2336
2343
|
* @generated from field: optional google.protobuf.Edition edition_removed = 4;
|
|
2337
2344
|
*/
|
|
2338
2345
|
editionRemoved?: EditionJson;
|
|
2346
|
+
/**
|
|
2347
|
+
* The removal error text if this feature is used after the edition it was
|
|
2348
|
+
* removed in.
|
|
2349
|
+
*
|
|
2350
|
+
* @generated from field: optional string removal_error = 5;
|
|
2351
|
+
*/
|
|
2352
|
+
removalError?: string;
|
|
2339
2353
|
};
|
|
2340
2354
|
/**
|
|
2341
2355
|
* Describes the message google.protobuf.FieldOptions.FeatureSupport.
|
|
@@ -2511,7 +2525,7 @@ export type OneofOptions = Message<"google.protobuf.OneofOptions"> & {
|
|
|
2511
2525
|
*
|
|
2512
2526
|
* @generated from field: optional google.protobuf.FeatureSet features = 1;
|
|
2513
2527
|
*/
|
|
2514
|
-
features?: FeatureSet;
|
|
2528
|
+
features?: FeatureSet | undefined;
|
|
2515
2529
|
/**
|
|
2516
2530
|
* The parser stores options it doesn't recognize here. See above.
|
|
2517
2531
|
*
|
|
@@ -2586,7 +2600,7 @@ export type EnumOptions = Message<"google.protobuf.EnumOptions"> & {
|
|
|
2586
2600
|
*
|
|
2587
2601
|
* @generated from field: optional google.protobuf.FeatureSet features = 7;
|
|
2588
2602
|
*/
|
|
2589
|
-
features?: FeatureSet;
|
|
2603
|
+
features?: FeatureSet | undefined;
|
|
2590
2604
|
/**
|
|
2591
2605
|
* The parser stores options it doesn't recognize here. See above.
|
|
2592
2606
|
*
|
|
@@ -2670,7 +2684,7 @@ export type EnumValueOptions = Message<"google.protobuf.EnumValueOptions"> & {
|
|
|
2670
2684
|
*
|
|
2671
2685
|
* @generated from field: optional google.protobuf.FeatureSet features = 2;
|
|
2672
2686
|
*/
|
|
2673
|
-
features?: FeatureSet;
|
|
2687
|
+
features?: FeatureSet | undefined;
|
|
2674
2688
|
/**
|
|
2675
2689
|
* Indicate that fields annotated with this enum value should not be printed
|
|
2676
2690
|
* out when using debug formats, e.g. when the field contains sensitive
|
|
@@ -2684,7 +2698,7 @@ export type EnumValueOptions = Message<"google.protobuf.EnumValueOptions"> & {
|
|
|
2684
2698
|
*
|
|
2685
2699
|
* @generated from field: optional google.protobuf.FieldOptions.FeatureSupport feature_support = 4;
|
|
2686
2700
|
*/
|
|
2687
|
-
featureSupport?: FieldOptions_FeatureSupport;
|
|
2701
|
+
featureSupport?: FieldOptions_FeatureSupport | undefined;
|
|
2688
2702
|
/**
|
|
2689
2703
|
* The parser stores options it doesn't recognize here. See above.
|
|
2690
2704
|
*
|
|
@@ -2754,7 +2768,7 @@ export type ServiceOptions = Message<"google.protobuf.ServiceOptions"> & {
|
|
|
2754
2768
|
*
|
|
2755
2769
|
* @generated from field: optional google.protobuf.FeatureSet features = 34;
|
|
2756
2770
|
*/
|
|
2757
|
-
features?: FeatureSet;
|
|
2771
|
+
features?: FeatureSet | undefined;
|
|
2758
2772
|
/**
|
|
2759
2773
|
* Is this service deprecated?
|
|
2760
2774
|
* Depending on the target platform, this can emit Deprecated annotations
|
|
@@ -2832,7 +2846,7 @@ export type MethodOptions = Message<"google.protobuf.MethodOptions"> & {
|
|
|
2832
2846
|
*
|
|
2833
2847
|
* @generated from field: optional google.protobuf.FeatureSet features = 35;
|
|
2834
2848
|
*/
|
|
2835
|
-
features?: FeatureSet;
|
|
2849
|
+
features?: FeatureSet | undefined;
|
|
2836
2850
|
/**
|
|
2837
2851
|
* The parser stores options it doesn't recognize here. See above.
|
|
2838
2852
|
*
|
|
@@ -3468,13 +3482,13 @@ export type FeatureSetDefaults_FeatureSetEditionDefault = Message<"google.protob
|
|
|
3468
3482
|
*
|
|
3469
3483
|
* @generated from field: optional google.protobuf.FeatureSet overridable_features = 4;
|
|
3470
3484
|
*/
|
|
3471
|
-
overridableFeatures?: FeatureSet;
|
|
3485
|
+
overridableFeatures?: FeatureSet | undefined;
|
|
3472
3486
|
/**
|
|
3473
3487
|
* Defaults of features that can't be overridden in this edition.
|
|
3474
3488
|
*
|
|
3475
3489
|
* @generated from field: optional google.protobuf.FeatureSet fixed_features = 5;
|
|
3476
3490
|
*/
|
|
3477
|
-
fixedFeatures?: FeatureSet;
|
|
3491
|
+
fixedFeatures?: FeatureSet | undefined;
|
|
3478
3492
|
};
|
|
3479
3493
|
/**
|
|
3480
3494
|
* A map from every known edition with a unique set of defaults to its
|