@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
package/dist/esm/registry.js
CHANGED
|
@@ -191,6 +191,8 @@ function initBaseRegistry(inputs) {
|
|
|
191
191
|
const EDITION_PROTO2 = 998;
|
|
192
192
|
// bootstrap-inject google.protobuf.Edition.EDITION_PROTO3: const $name: Edition.$localName = $number;
|
|
193
193
|
const EDITION_PROTO3 = 999;
|
|
194
|
+
// bootstrap-inject google.protobuf.Edition.EDITION_UNSTABLE: const $name: Edition.$localName = $number;
|
|
195
|
+
const EDITION_UNSTABLE = 9999;
|
|
194
196
|
// bootstrap-inject google.protobuf.FieldDescriptorProto.Type.TYPE_STRING: const $name: FieldDescriptorProto_Type.$localName = $number;
|
|
195
197
|
const TYPE_STRING = 9;
|
|
196
198
|
// bootstrap-inject google.protobuf.FieldDescriptorProto.Type.TYPE_GROUP: const $name: FieldDescriptorProto_Type.$localName = $number;
|
|
@@ -221,9 +223,11 @@ const PACKED = 1;
|
|
|
221
223
|
const DELIMITED = 2;
|
|
222
224
|
// bootstrap-inject google.protobuf.FeatureSet.EnumType.OPEN: const $name: FeatureSet_EnumType.$localName = $number;
|
|
223
225
|
const OPEN = 1;
|
|
226
|
+
// bootstrap-inject google.protobuf.FeatureSet.Utf8Validation.VERIFY: const $name: FeatureSet_Utf8Validation.$localName = $number;
|
|
227
|
+
const VERIFY = 2;
|
|
224
228
|
// biome-ignore format: want this to read well
|
|
225
229
|
// bootstrap-inject defaults: EDITION_PROTO2 to EDITION_2024: export const minimumEdition: SupportedEdition = $minimumEdition, maximumEdition: SupportedEdition = $maximumEdition;
|
|
226
|
-
// generated from protoc
|
|
230
|
+
// generated from protoc v34.1
|
|
227
231
|
export const minimumEdition = 998, maximumEdition = 1001;
|
|
228
232
|
const featureDefaults = {
|
|
229
233
|
// EDITION_PROTO2
|
|
@@ -562,6 +566,7 @@ function newField(proto, parentOrFile, reg, oneof, mapEntries) {
|
|
|
562
566
|
message: undefined,
|
|
563
567
|
enum: undefined,
|
|
564
568
|
presence: getFieldPresence(proto, oneof, isExtension, parentOrFile),
|
|
569
|
+
utf8Validation: isUtf8Validated(proto, parentOrFile),
|
|
565
570
|
listKind: undefined,
|
|
566
571
|
mapKind: undefined,
|
|
567
572
|
mapKey: undefined,
|
|
@@ -690,6 +695,12 @@ function getFileEdition(proto) {
|
|
|
690
695
|
case "proto3":
|
|
691
696
|
return EDITION_PROTO3;
|
|
692
697
|
case "editions":
|
|
698
|
+
// EDITION_UNSTABLE is a sandbox for in-development features. Collapse
|
|
699
|
+
// it to maximumEdition so SupportedEdition and feature resolution do
|
|
700
|
+
// not leak the test-only edition to users.
|
|
701
|
+
if (proto.edition === EDITION_UNSTABLE) {
|
|
702
|
+
return maximumEdition;
|
|
703
|
+
}
|
|
693
704
|
if (proto.edition in featureDefaults) {
|
|
694
705
|
return proto.edition;
|
|
695
706
|
}
|
|
@@ -885,6 +896,18 @@ function isDelimitedEncoding(proto, parent) {
|
|
|
885
896
|
parent,
|
|
886
897
|
}));
|
|
887
898
|
}
|
|
899
|
+
/**
|
|
900
|
+
* Reject invalid UTF-8 when reading string fields from the binary wire format?
|
|
901
|
+
* Driven by the resolved `utf8_validation` feature: VERIFY (proto3 / editions
|
|
902
|
+
* 2023+ default) enforces; NONE (proto2 default) does not.
|
|
903
|
+
*/
|
|
904
|
+
function isUtf8Validated(proto, parent) {
|
|
905
|
+
return (VERIFY ==
|
|
906
|
+
resolveFeature("utf8Validation", {
|
|
907
|
+
proto,
|
|
908
|
+
parent,
|
|
909
|
+
}));
|
|
910
|
+
}
|
|
888
911
|
function resolveFeature(name, ref) {
|
|
889
912
|
var _a, _b;
|
|
890
913
|
const featureSet = (_a = ref.proto.options) === null || _a === void 0 ? void 0 : _a.features;
|
package/dist/esm/to-json.d.ts
CHANGED
package/dist/esm/to-json.js
CHANGED
|
@@ -15,7 +15,7 @@ import { ScalarType, } from "./descriptors.js";
|
|
|
15
15
|
import { protoCamelCase, protoSnakeCase } from "./reflect/names.js";
|
|
16
16
|
import { reflect } from "./reflect/reflect.js";
|
|
17
17
|
import { anyUnpack } from "./wkt/index.js";
|
|
18
|
-
import { isWrapperDesc } from "./wkt/wrappers.js";
|
|
18
|
+
import { hasCustomJsonRepresentation, isWrapperDesc } from "./wkt/wrappers.js";
|
|
19
19
|
import { base64Encode } from "./wire/index.js";
|
|
20
20
|
import { createExtensionContainer, getExtension } from "./extensions.js";
|
|
21
21
|
import { checkField, formatVal } from "./reflect/reflect-check.js";
|
|
@@ -221,10 +221,12 @@ function scalarToJson(field, value) {
|
|
|
221
221
|
case ScalarType.INT64:
|
|
222
222
|
case ScalarType.SFIXED64:
|
|
223
223
|
case ScalarType.SINT64:
|
|
224
|
-
if (typeof value
|
|
225
|
-
|
|
224
|
+
if (typeof value == "bigint" ||
|
|
225
|
+
typeof value == "string" ||
|
|
226
|
+
(typeof value == "number" && Number.isInteger(value))) {
|
|
227
|
+
return value.toString();
|
|
226
228
|
}
|
|
227
|
-
|
|
229
|
+
throw new Error(`cannot encode ${field} to JSON: ${(_e = checkField(field, value)) === null || _e === void 0 ? void 0 : _e.message}`);
|
|
228
230
|
// bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings.
|
|
229
231
|
// Either standard or URL-safe base64 encoding with/without paddings are accepted.
|
|
230
232
|
case ScalarType.BYTES:
|
|
@@ -281,13 +283,10 @@ function anyToJson(val, opts) {
|
|
|
281
283
|
if (!desc || !message) {
|
|
282
284
|
throw new Error(`cannot encode message ${val.$typeName} to JSON: "${val.typeUrl}" is not in the type registry`);
|
|
283
285
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
typeof json !== "object") {
|
|
289
|
-
json = { value: json };
|
|
290
|
-
}
|
|
286
|
+
const reflected = reflect(desc, message);
|
|
287
|
+
const json = hasCustomJsonRepresentation(desc)
|
|
288
|
+
? { value: tryWktToJson(reflected, opts) }
|
|
289
|
+
: reflectToJson(reflected, opts);
|
|
291
290
|
json["@type"] = val.typeUrl;
|
|
292
291
|
return json;
|
|
293
292
|
}
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -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.
|
|
@@ -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
|
}
|
|
@@ -178,7 +178,7 @@ export class BinaryWriter {
|
|
|
178
178
|
return this;
|
|
179
179
|
}
|
|
180
180
|
/**
|
|
181
|
-
* Write a `bool` value, a
|
|
181
|
+
* Write a `bool` value, a varint.
|
|
182
182
|
*/
|
|
183
183
|
bool(value) {
|
|
184
184
|
this.buf.push(value ? 1 : 0);
|
|
@@ -245,7 +245,7 @@ export class BinaryWriter {
|
|
|
245
245
|
return this;
|
|
246
246
|
}
|
|
247
247
|
/**
|
|
248
|
-
* Write a `
|
|
248
|
+
* Write a `sfixed64` value, a signed, fixed-length 64-bit integer.
|
|
249
249
|
*/
|
|
250
250
|
sfixed64(value) {
|
|
251
251
|
let chunk = new Uint8Array(8), view = new DataView(chunk.buffer), tc = protoInt64.enc(value);
|
|
@@ -303,21 +303,32 @@ export class BinaryReader {
|
|
|
303
303
|
this.view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength);
|
|
304
304
|
}
|
|
305
305
|
/**
|
|
306
|
-
* Reads a tag - field number and wire type.
|
|
306
|
+
* Reads a tag - field number and wire type. Tags are uint32 varints; values
|
|
307
|
+
* that do not fit in uint32 are rejected.
|
|
307
308
|
*/
|
|
308
309
|
tag() {
|
|
309
|
-
|
|
310
|
-
|
|
310
|
+
const start = this.pos;
|
|
311
|
+
const tag = this.uint32();
|
|
312
|
+
const bytesRead = this.pos - start;
|
|
313
|
+
if (bytesRead > 5 || (bytesRead == 5 && this.buf[this.pos - 1] > 0x0f)) {
|
|
314
|
+
throw new Error("illegal tag: varint overflows uint32");
|
|
315
|
+
}
|
|
316
|
+
const fieldNo = tag >>> 3;
|
|
317
|
+
const wireType = tag & 7;
|
|
318
|
+
if (fieldNo <= 0 || wireType > 5) {
|
|
311
319
|
throw new Error("illegal tag: field no " + fieldNo + " wire type " + wireType);
|
|
320
|
+
}
|
|
312
321
|
return [fieldNo, wireType];
|
|
313
322
|
}
|
|
314
323
|
/**
|
|
315
324
|
* Skip one element and return the skipped data.
|
|
316
325
|
*
|
|
317
326
|
* When skipping StartGroup, provide the tags field number to check for
|
|
318
|
-
* matching field number in the EndGroup tag.
|
|
327
|
+
* matching field number in the EndGroup tag. Recursion into nested groups
|
|
328
|
+
* is guarded by the `recursionLimit` argument: When the limit is reached,
|
|
329
|
+
* this method throws.
|
|
319
330
|
*/
|
|
320
|
-
skip(wireType, fieldNo) {
|
|
331
|
+
skip(wireType, fieldNo, recursionLimit = 100) {
|
|
321
332
|
let start = this.pos;
|
|
322
333
|
switch (wireType) {
|
|
323
334
|
case WireType.Varint:
|
|
@@ -336,6 +347,9 @@ export class BinaryReader {
|
|
|
336
347
|
this.pos += len;
|
|
337
348
|
break;
|
|
338
349
|
case WireType.StartGroup:
|
|
350
|
+
if (recursionLimit <= 0) {
|
|
351
|
+
throw new Error("maximum recursion depth reached");
|
|
352
|
+
}
|
|
339
353
|
for (;;) {
|
|
340
354
|
const [fn, wt] = this.tag();
|
|
341
355
|
if (wt === WireType.EndGroup) {
|
|
@@ -344,7 +358,7 @@ export class BinaryReader {
|
|
|
344
358
|
}
|
|
345
359
|
break;
|
|
346
360
|
}
|
|
347
|
-
this.skip(wt, fn);
|
|
361
|
+
this.skip(wt, fn, recursionLimit - 1);
|
|
348
362
|
}
|
|
349
363
|
break;
|
|
350
364
|
default:
|
|
@@ -454,10 +468,11 @@ export class BinaryReader {
|
|
|
454
468
|
return this.buf.subarray(start, start + len);
|
|
455
469
|
}
|
|
456
470
|
/**
|
|
457
|
-
* Read a `string` field, length-delimited data converted to UTF-8 text.
|
|
471
|
+
* Read a `string` field, length-delimited data converted to UTF-8 text. If
|
|
472
|
+
* `strict` is true, throw on invalid UTF-8 instead of substituting U+FFFD.
|
|
458
473
|
*/
|
|
459
|
-
string() {
|
|
460
|
-
return this.decodeUtf8(this.bytes());
|
|
474
|
+
string(strict) {
|
|
475
|
+
return this.decodeUtf8(this.bytes(), strict);
|
|
461
476
|
}
|
|
462
477
|
}
|
|
463
478
|
/**
|
|
@@ -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
|
|
@@ -28,11 +28,18 @@ export function getTextEncoding() {
|
|
|
28
28
|
if (globalThis[symbol] == undefined) {
|
|
29
29
|
const te = new globalThis.TextEncoder();
|
|
30
30
|
const td = new globalThis.TextDecoder();
|
|
31
|
+
let tdStrict;
|
|
31
32
|
globalThis[symbol] = {
|
|
32
33
|
encodeUtf8(text) {
|
|
33
34
|
return te.encode(text);
|
|
34
35
|
},
|
|
35
|
-
decodeUtf8(bytes) {
|
|
36
|
+
decodeUtf8(bytes, strict) {
|
|
37
|
+
if (strict) {
|
|
38
|
+
if (tdStrict === undefined) {
|
|
39
|
+
tdStrict = new globalThis.TextDecoder("utf-8", { fatal: true });
|
|
40
|
+
}
|
|
41
|
+
return tdStrict.decode(bytes);
|
|
42
|
+
}
|
|
36
43
|
return td.decode(bytes);
|
|
37
44
|
},
|
|
38
45
|
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
|