@bufbuild/protobuf
Advanced tools
@@ -117,3 +117,3 @@ import type { DescriptorProto, Edition, EnumDescriptorProto, EnumValueDescriptorProto, FeatureSet_FieldPresence, FieldDescriptorProto, FileDescriptorProto, MethodDescriptorProto, MethodOptions_IdempotencyLevel, OneofDescriptorProto, ServiceDescriptorProto } from "./wkt/gen/google/protobuf/descriptor_pb.js"; | ||
| */ | ||
| readonly sharedPrefix?: string; | ||
| readonly sharedPrefix?: string | undefined; | ||
| /** | ||
@@ -196,4 +196,4 @@ * Marked as deprecated in the protobuf source. | ||
| /** | ||
| * Fields and oneof groups for this message, ordered by their appearance in the | ||
| * protobuf source. | ||
| * Standalone fields and oneof groups for this message, ordered by | ||
| * their appearance in the protobuf source. | ||
| */ | ||
@@ -289,2 +289,9 @@ readonly members: (DescField | DescOneof)[]; | ||
| /** | ||
| * Whether to reject invalid UTF-8 when reading this field from the binary | ||
| * wire format. Reflects the resolved `utf8_validation` feature: true for | ||
| * VERIFY (proto3 and editions 2023+ default), false for NONE (proto2 | ||
| * default). | ||
| */ | ||
| readonly utf8Validation: boolean; | ||
| /** | ||
| * The compiler-generated descriptor. | ||
@@ -626,6 +633,6 @@ */ | ||
| readonly leadingDetached: readonly string[]; | ||
| readonly leading?: string; | ||
| readonly trailing?: string; | ||
| readonly leading?: string | undefined; | ||
| readonly trailing?: string | undefined; | ||
| readonly sourcePath: readonly number[]; | ||
| } | ||
| export {}; |
@@ -97,3 +97,3 @@ "use strict"; | ||
| case "scalar": | ||
| message.set(field, readScalar(reader, field.scalar)); | ||
| message.set(field, readScalar(reader, field.scalar, field.utf8Validation)); | ||
| break; | ||
@@ -148,3 +148,3 @@ case "enum": | ||
| case 1: | ||
| key = readScalar(reader, field.mapKey); | ||
| key = readScalar(reader, field.mapKey, field.utf8Validation); | ||
| break; | ||
@@ -154,3 +154,3 @@ case 2: | ||
| case "scalar": | ||
| val = readScalar(reader, field.scalar); | ||
| val = readScalar(reader, field.scalar, field.utf8Validation); | ||
| break; | ||
@@ -197,3 +197,3 @@ case "enum": | ||
| if (!packed) { | ||
| list.add(readScalar(reader, scalarType)); | ||
| list.add(readScalar(reader, scalarType, field.utf8Validation)); | ||
| return; | ||
@@ -203,3 +203,3 @@ } | ||
| while (reader.pos < e) { | ||
| list.add(readScalar(reader, scalarType)); | ||
| list.add(readScalar(reader, scalarType, field.utf8Validation)); | ||
| } | ||
@@ -213,6 +213,6 @@ } | ||
| } | ||
| function readScalar(reader, type) { | ||
| function readScalar(reader, type, validateUtf8 = false) { | ||
| switch (type) { | ||
| case descriptors_js_1.ScalarType.STRING: | ||
| return reader.string(); | ||
| return reader.string(validateUtf8); | ||
| case descriptors_js_1.ScalarType.BOOL: | ||
@@ -219,0 +219,0 @@ return reader.bool(); |
@@ -19,3 +19,3 @@ import { type DescEnum, type DescMessage } from "./descriptors.js"; | ||
| */ | ||
| registry?: Registry; | ||
| registry?: Registry | undefined; | ||
| } | ||
@@ -22,0 +22,0 @@ /** |
@@ -494,3 +494,3 @@ "use strict"; | ||
| const msg = (0, reflect_js_1.reflect)(desc); | ||
| if (typeName.startsWith("google.protobuf.") && | ||
| if ((0, index_js_1.hasCustomJsonRepresentation)(desc) && | ||
| Object.prototype.hasOwnProperty.call(json, "value")) { | ||
@@ -497,0 +497,0 @@ const value = json.value; |
@@ -92,3 +92,3 @@ import { type DescExtension, type DescField, type DescMessage, type DescOneof } from "../descriptors.js"; | ||
| export declare function parsePath(schema: DescMessage, path: string, options?: { | ||
| registry?: Registry; | ||
| registry?: Registry | undefined; | ||
| }): Path; | ||
@@ -95,0 +95,0 @@ /** |
+24
-1
@@ -200,2 +200,4 @@ "use strict"; | ||
| const EDITION_PROTO3 = 999; | ||
| // bootstrap-inject google.protobuf.Edition.EDITION_UNSTABLE: const $name: Edition.$localName = $number; | ||
| const EDITION_UNSTABLE = 9999; | ||
| // bootstrap-inject google.protobuf.FieldDescriptorProto.Type.TYPE_STRING: const $name: FieldDescriptorProto_Type.$localName = $number; | ||
@@ -231,5 +233,7 @@ const TYPE_STRING = 9; | ||
| const OPEN = 1; | ||
| // bootstrap-inject google.protobuf.FeatureSet.Utf8Validation.VERIFY: const $name: FeatureSet_Utf8Validation.$localName = $number; | ||
| const VERIFY = 2; | ||
| // biome-ignore format: want this to read well | ||
| // bootstrap-inject defaults: EDITION_PROTO2 to EDITION_2024: export const minimumEdition: SupportedEdition = $minimumEdition, maximumEdition: SupportedEdition = $maximumEdition; | ||
| // generated from protoc v33.2 | ||
| // generated from protoc v34.0 | ||
| exports.minimumEdition = 998, exports.maximumEdition = 1001; | ||
@@ -573,2 +577,3 @@ const featureDefaults = { | ||
| presence: getFieldPresence(proto, oneof, isExtension, parentOrFile), | ||
| utf8Validation: isUtf8Validated(proto, parentOrFile), | ||
| listKind: undefined, | ||
@@ -702,2 +707,8 @@ mapKind: undefined, | ||
| case "editions": | ||
| // EDITION_UNSTABLE is a sandbox for in-development features. Collapse | ||
| // it to maximumEdition so SupportedEdition and feature resolution do | ||
| // not leak the test-only edition to users. | ||
| if (proto.edition === EDITION_UNSTABLE) { | ||
| return exports.maximumEdition; | ||
| } | ||
| if (proto.edition in featureDefaults) { | ||
@@ -898,2 +909,14 @@ return proto.edition; | ||
| } | ||
| /** | ||
| * Reject invalid UTF-8 when reading string fields from the binary wire format? | ||
| * Driven by the resolved `utf8_validation` feature: VERIFY (proto3 / editions | ||
| * 2023+ default) enforces; NONE (proto2 default) does not. | ||
| */ | ||
| function isUtf8Validated(proto, parent) { | ||
| return (VERIFY == | ||
| resolveFeature("utf8Validation", { | ||
| proto, | ||
| parent, | ||
| })); | ||
| } | ||
| function resolveFeature(name, ref) { | ||
@@ -900,0 +923,0 @@ var _a, _b; |
@@ -35,3 +35,3 @@ import { type DescEnum, type DescMessage } from "./descriptors.js"; | ||
| */ | ||
| registry?: Registry; | ||
| registry?: Registry | undefined; | ||
| } | ||
@@ -38,0 +38,0 @@ /** |
+9
-10
@@ -229,6 +229,8 @@ "use strict"; | ||
| case descriptors_js_1.ScalarType.SINT64: | ||
| if (typeof value != "bigint" && typeof value != "string") { | ||
| 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}`); | ||
| if (typeof value == "bigint" || | ||
| typeof value == "string" || | ||
| (typeof value == "number" && Number.isInteger(value))) { | ||
| return value.toString(); | ||
| } | ||
| return value.toString(); | ||
| 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}`); | ||
| // bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings. | ||
@@ -290,9 +292,6 @@ // Either standard or URL-safe base64 encoding with/without paddings are accepted. | ||
| } | ||
| let json = reflectToJson((0, reflect_js_1.reflect)(desc, message), opts); | ||
| if (desc.typeName.startsWith("google.protobuf.") || | ||
| json === null || | ||
| Array.isArray(json) || | ||
| typeof json !== "object") { | ||
| json = { value: json }; | ||
| } | ||
| const reflected = (0, reflect_js_1.reflect)(desc, message); | ||
| const json = (0, wrappers_js_1.hasCustomJsonRepresentation)(desc) | ||
| ? { value: tryWktToJson(reflected, opts) } | ||
| : reflectToJson(reflected, opts); | ||
| json["@type"] = val.typeUrl; | ||
@@ -299,0 +298,0 @@ return json; |
@@ -18,3 +18,3 @@ import type { GenEnum as GenEnumV1, GenExtension as GenExtensionV1, GenMessage as GenMessageV1 } from "./codegenv1/types.js"; | ||
| */ | ||
| $unknown?: UnknownField[]; | ||
| $unknown?: UnknownField[] | undefined; | ||
| }; | ||
@@ -21,0 +21,0 @@ /** |
@@ -66,3 +66,3 @@ /** | ||
| * We cannot allocate a buffer for the entire output | ||
| * because we don't know it's size. | ||
| * because we don't know its size. | ||
| * | ||
@@ -124,3 +124,3 @@ * So we collect smaller chunks of known size and | ||
| /** | ||
| * Write a `bool` value, a variant. | ||
| * Write a `bool` value, a varint. | ||
| */ | ||
@@ -157,3 +157,3 @@ bool(value: boolean): this; | ||
| /** | ||
| * Write a `fixed64` value, a signed, fixed-length 64-bit integer. | ||
| * Write a `sfixed64` value, a signed, fixed-length 64-bit integer. | ||
| */ | ||
@@ -190,5 +190,6 @@ sfixed64(value: string | number | bigint): this; | ||
| private readonly view; | ||
| constructor(buf: Uint8Array, decodeUtf8?: (bytes: Uint8Array) => string); | ||
| constructor(buf: Uint8Array, decodeUtf8?: (bytes: Uint8Array, strict?: boolean) => string); | ||
| /** | ||
| * Reads a tag - field number and wire type. | ||
| * Reads a tag - field number and wire type. Tags are uint32 varints; values | ||
| * that do not fit in uint32 are rejected. | ||
| */ | ||
@@ -265,5 +266,6 @@ tag(): [number, WireType]; | ||
| /** | ||
| * Read a `string` field, length-delimited data converted to UTF-8 text. | ||
| * Read a `string` field, length-delimited data converted to UTF-8 text. If | ||
| * `strict` is true, throw on invalid UTF-8 instead of substituting U+FFFD. | ||
| */ | ||
| string(): string; | ||
| string(strict?: boolean): string; | ||
| } |
@@ -184,3 +184,3 @@ "use strict"; | ||
| /** | ||
| * Write a `bool` value, a variant. | ||
| * Write a `bool` value, a varint. | ||
| */ | ||
@@ -252,3 +252,3 @@ bool(value) { | ||
| /** | ||
| * Write a `fixed64` value, a signed, fixed-length 64-bit integer. | ||
| * Write a `sfixed64` value, a signed, fixed-length 64-bit integer. | ||
| */ | ||
@@ -312,8 +312,17 @@ sfixed64(value) { | ||
| /** | ||
| * Reads a tag - field number and wire type. | ||
| * Reads a tag - field number and wire type. Tags are uint32 varints; values | ||
| * that do not fit in uint32 are rejected. | ||
| */ | ||
| tag() { | ||
| let tag = this.uint32(), fieldNo = tag >>> 3, wireType = tag & 7; | ||
| if (fieldNo <= 0 || wireType < 0 || wireType > 5) | ||
| const start = this.pos; | ||
| const tag = this.uint32(); | ||
| const bytesRead = this.pos - start; | ||
| if (bytesRead > 5 || (bytesRead == 5 && this.buf[this.pos - 1] > 0x0f)) { | ||
| throw new Error("illegal tag: varint overflows uint32"); | ||
| } | ||
| const fieldNo = tag >>> 3; | ||
| const wireType = tag & 7; | ||
| if (fieldNo <= 0 || wireType > 5) { | ||
| throw new Error("illegal tag: field no " + fieldNo + " wire type " + wireType); | ||
| } | ||
| return [fieldNo, wireType]; | ||
@@ -464,6 +473,7 @@ } | ||
| /** | ||
| * Read a `string` field, length-delimited data converted to UTF-8 text. | ||
| * Read a `string` field, length-delimited data converted to UTF-8 text. If | ||
| * `strict` is true, throw on invalid UTF-8 instead of substituting U+FFFD. | ||
| */ | ||
| string() { | ||
| return this.decodeUtf8(this.bytes()); | ||
| string(strict) { | ||
| return this.decodeUtf8(this.bytes(), strict); | ||
| } | ||
@@ -470,0 +480,0 @@ } |
@@ -11,5 +11,7 @@ interface TextEncoding { | ||
| /** | ||
| * Decode UTF-8 text from binary. | ||
| * Decode UTF-8 text from binary. If `strict` is true, throw on invalid byte | ||
| * sequences instead of silently substituting U+FFFD. Implementations that | ||
| * do not support strict decoding may ignore the flag. | ||
| */ | ||
| decodeUtf8: (bytes: Uint8Array) => string; | ||
| decodeUtf8: (bytes: Uint8Array, strict?: boolean) => string; | ||
| } | ||
@@ -16,0 +18,0 @@ /** |
@@ -35,2 +35,3 @@ "use strict"; | ||
| const td = new globalThis.TextDecoder(); | ||
| let tdStrict; | ||
| globalThis[symbol] = { | ||
@@ -40,3 +41,9 @@ encodeUtf8(text) { | ||
| }, | ||
| decodeUtf8(bytes) { | ||
| decodeUtf8(bytes, strict) { | ||
| if (strict) { | ||
| if (tdStrict === undefined) { | ||
| tdStrict = new globalThis.TextDecoder("utf-8", { fatal: true }); | ||
| } | ||
| return tdStrict.decode(bytes); | ||
| } | ||
| return td.decode(bytes); | ||
@@ -43,0 +50,0 @@ }, |
@@ -78,3 +78,3 @@ import type { GenFile, GenMessage } from "../../../../codegenv2/types.js"; | ||
| */ | ||
| sourceContext?: SourceContext; | ||
| sourceContext?: SourceContext | undefined; | ||
| /** | ||
@@ -81,0 +81,0 @@ * Included interfaces. See [Mixin][]. |
@@ -124,3 +124,3 @@ import type { GenEnum, GenFile, GenMessage } from "../../../../../codegenv2/types.js"; | ||
| */ | ||
| compilerVersion?: Version; | ||
| compilerVersion?: Version | undefined; | ||
| }; | ||
@@ -375,3 +375,3 @@ /** | ||
| */ | ||
| generatedCodeInfo?: GeneratedCodeInfo; | ||
| generatedCodeInfo?: GeneratedCodeInfo | undefined; | ||
| }; | ||
@@ -378,0 +378,0 @@ /** |
@@ -120,20 +120,18 @@ import type { GenFile, GenMessage } from "../../../../codegenv2/types.js"; | ||
| * | ||
| * In order to reset a field's value to the default, the field must | ||
| * be in the mask and set to the default value in the provided resource. | ||
| * Hence, in order to reset all fields of a resource, provide a default | ||
| * instance of the resource and set all fields in the mask, or do | ||
| * not provide a mask as described below. | ||
| * Note that libraries which implement FieldMask resolution have various | ||
| * different behaviors in the face of empty masks or the special "*" mask. | ||
| * When implementing a service you should confirm these cases have the | ||
| * appropriate behavior in the underlying FieldMask library that you desire, | ||
| * and you may need to special case those cases in your application code if | ||
| * the underlying field mask library behavior differs from your intended | ||
| * service semantics. | ||
| * | ||
| * If a field mask is not present on update, the operation applies to | ||
| * all fields (as if a field mask of all fields has been specified). | ||
| * Note that in the presence of schema evolution, this may mean that | ||
| * fields the client does not know and has therefore not filled into | ||
| * the request will be reset to their default. If this is unwanted | ||
| * behavior, a specific service may require a client to always specify | ||
| * a field mask, producing an error if not. | ||
| * Update methods implementing https://google.aip.dev/134 | ||
| * - MUST support the special value * meaning "full replace" | ||
| * - MUST treat an omitted field mask as "replace fields which are present". | ||
| * | ||
| * As with get operations, the location of the resource which | ||
| * describes the updated values in the request message depends on the | ||
| * operation kind. In any case, the effect of the field mask is | ||
| * required to be honored by the API. | ||
| * Other methods implementing https://google.aip.dev/157 | ||
| * - SHOULD support the special value "*" to mean "get all". | ||
| * - MUST treat an omitted field mask to mean "get all", unless otherwise | ||
| * documented. | ||
| * | ||
@@ -332,20 +330,18 @@ * ## Considerations for HTTP REST | ||
| * | ||
| * In order to reset a field's value to the default, the field must | ||
| * be in the mask and set to the default value in the provided resource. | ||
| * Hence, in order to reset all fields of a resource, provide a default | ||
| * instance of the resource and set all fields in the mask, or do | ||
| * not provide a mask as described below. | ||
| * Note that libraries which implement FieldMask resolution have various | ||
| * different behaviors in the face of empty masks or the special "*" mask. | ||
| * When implementing a service you should confirm these cases have the | ||
| * appropriate behavior in the underlying FieldMask library that you desire, | ||
| * and you may need to special case those cases in your application code if | ||
| * the underlying field mask library behavior differs from your intended | ||
| * service semantics. | ||
| * | ||
| * If a field mask is not present on update, the operation applies to | ||
| * all fields (as if a field mask of all fields has been specified). | ||
| * Note that in the presence of schema evolution, this may mean that | ||
| * fields the client does not know and has therefore not filled into | ||
| * the request will be reset to their default. If this is unwanted | ||
| * behavior, a specific service may require a client to always specify | ||
| * a field mask, producing an error if not. | ||
| * Update methods implementing https://google.aip.dev/134 | ||
| * - MUST support the special value * meaning "full replace" | ||
| * - MUST treat an omitted field mask as "replace fields which are present". | ||
| * | ||
| * As with get operations, the location of the resource which | ||
| * describes the updated values in the request message depends on the | ||
| * operation kind. In any case, the effect of the field mask is | ||
| * required to be honored by the API. | ||
| * Other methods implementing https://google.aip.dev/157 | ||
| * - SHOULD support the special value "*" to mean "get all". | ||
| * - MUST treat an omitted field mask to mean "get all", unless otherwise | ||
| * documented. | ||
| * | ||
@@ -352,0 +348,0 @@ * ## Considerations for HTTP REST |
@@ -29,2 +29,6 @@ import type { GenEnum, GenExtension, GenFile, GenMessage } from "../../../../codegenv2/types.js"; | ||
| stripEnumPrefix: GoFeatures_StripEnumPrefix; | ||
| /** | ||
| * @generated from field: optional pb.GoFeatures.OptimizeModeFeature.OptimizeMode optimize_mode = 4; | ||
| */ | ||
| optimizeMode: GoFeatures_OptimizeModeFeature_OptimizeMode; | ||
| }; | ||
@@ -52,2 +56,6 @@ /** | ||
| stripEnumPrefix?: GoFeatures_StripEnumPrefixJson; | ||
| /** | ||
| * @generated from field: optional pb.GoFeatures.OptimizeModeFeature.OptimizeMode optimize_mode = 4; | ||
| */ | ||
| optimizeMode?: GoFeatures_OptimizeModeFeature_OptimizeModeJson; | ||
| }; | ||
@@ -62,2 +70,59 @@ /** | ||
| /** | ||
| * Wrap the OptimizeMode enum in a message for scoping: | ||
| * This way, users can type shorter names (SPEED, CODE_SIZE). | ||
| * | ||
| * @generated from message pb.GoFeatures.OptimizeModeFeature | ||
| */ | ||
| export type GoFeatures_OptimizeModeFeature = Message<"pb.GoFeatures.OptimizeModeFeature"> & {}; | ||
| /** | ||
| * Wrap the OptimizeMode enum in a message for scoping: | ||
| * This way, users can type shorter names (SPEED, CODE_SIZE). | ||
| * | ||
| * @generated from message pb.GoFeatures.OptimizeModeFeature | ||
| */ | ||
| export type GoFeatures_OptimizeModeFeatureJson = {}; | ||
| /** | ||
| * Describes the message pb.GoFeatures.OptimizeModeFeature. | ||
| * Use `create(GoFeatures_OptimizeModeFeatureSchema)` to create a new message. | ||
| */ | ||
| export declare const GoFeatures_OptimizeModeFeatureSchema: GenMessage<GoFeatures_OptimizeModeFeature, { | ||
| jsonType: GoFeatures_OptimizeModeFeatureJson; | ||
| }>; | ||
| /** | ||
| * The name of this enum matches OptimizeMode in descriptor.proto. | ||
| * | ||
| * @generated from enum pb.GoFeatures.OptimizeModeFeature.OptimizeMode | ||
| */ | ||
| export declare enum GoFeatures_OptimizeModeFeature_OptimizeMode { | ||
| /** | ||
| * OPTIMIZE_MODE_UNSPECIFIED results in falling back to the default | ||
| * (optimize for code size), but needs to be a separate value to distinguish | ||
| * between an explicitly set optimize mode or a missing optimize mode. | ||
| * | ||
| * @generated from enum value: OPTIMIZE_MODE_UNSPECIFIED = 0; | ||
| */ | ||
| OPTIMIZE_MODE_UNSPECIFIED = 0, | ||
| /** | ||
| * @generated from enum value: SPEED = 1; | ||
| */ | ||
| SPEED = 1, | ||
| /** | ||
| * There is no enum entry for LITE_RUNTIME (descriptor.proto), | ||
| * because Go Protobuf does not have the concept of a lite runtime. | ||
| * | ||
| * @generated from enum value: CODE_SIZE = 2; | ||
| */ | ||
| CODE_SIZE = 2 | ||
| } | ||
| /** | ||
| * The name of this enum matches OptimizeMode in descriptor.proto. | ||
| * | ||
| * @generated from enum pb.GoFeatures.OptimizeModeFeature.OptimizeMode | ||
| */ | ||
| export type GoFeatures_OptimizeModeFeature_OptimizeModeJson = "OPTIMIZE_MODE_UNSPECIFIED" | "SPEED" | "CODE_SIZE"; | ||
| /** | ||
| * Describes the enum pb.GoFeatures.OptimizeModeFeature.OptimizeMode. | ||
| */ | ||
| export declare const GoFeatures_OptimizeModeFeature_OptimizeModeSchema: GenEnum<GoFeatures_OptimizeModeFeature_OptimizeMode, GoFeatures_OptimizeModeFeature_OptimizeModeJson>; | ||
| /** | ||
| * @generated from enum pb.GoFeatures.APILevel | ||
@@ -64,0 +129,0 @@ */ |
@@ -16,3 +16,3 @@ "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.go = exports.GoFeatures_StripEnumPrefixSchema = exports.GoFeatures_StripEnumPrefix = exports.GoFeatures_APILevelSchema = exports.GoFeatures_APILevel = exports.GoFeaturesSchema = exports.file_google_protobuf_go_features = void 0; | ||
| exports.go = exports.GoFeatures_StripEnumPrefixSchema = exports.GoFeatures_StripEnumPrefix = exports.GoFeatures_APILevelSchema = exports.GoFeatures_APILevel = exports.GoFeatures_OptimizeModeFeature_OptimizeModeSchema = exports.GoFeatures_OptimizeModeFeature_OptimizeMode = exports.GoFeatures_OptimizeModeFeatureSchema = exports.GoFeaturesSchema = exports.file_google_protobuf_go_features = void 0; | ||
| const file_js_1 = require("../../../../codegenv2/file.js"); | ||
@@ -26,3 +26,3 @@ const descriptor_pb_js_1 = require("./descriptor_pb.js"); | ||
| */ | ||
| exports.file_google_protobuf_go_features = (0, file_js_1.fileDesc)("CiFnb29nbGUvcHJvdG9idWYvZ29fZmVhdHVyZXMucHJvdG8SAnBiIvcECgpHb0ZlYXR1cmVzEqUBChpsZWdhY3lfdW5tYXJzaGFsX2pzb25fZW51bRgBIAEoCEKAAYgBAZgBBpgBAaIBCRIEdHJ1ZRiEB6IBChIFZmFsc2UY5weyAVsI6AcQ6AcaU1RoZSBsZWdhY3kgVW5tYXJzaGFsSlNPTiBBUEkgaXMgZGVwcmVjYXRlZCBhbmQgd2lsbCBiZSByZW1vdmVkIGluIGEgZnV0dXJlIGVkaXRpb24uEmoKCWFwaV9sZXZlbBgCIAEoDjIXLnBiLkdvRmVhdHVyZXMuQVBJTGV2ZWxCPogBAZgBA5gBAaIBGhIVQVBJX0xFVkVMX1VOU1BFQ0lGSUVEGIQHogEPEgpBUElfT1BBUVVFGOkHsgEDCOgHEmsKEXN0cmlwX2VudW1fcHJlZml4GAMgASgOMh4ucGIuR29GZWF0dXJlcy5TdHJpcEVudW1QcmVmaXhCMIgBAZgBBpgBB5gBAaIBGxIWU1RSSVBfRU5VTV9QUkVGSVhfS0VFUBiEB7IBAwjpByJTCghBUElMZXZlbBIZChVBUElfTEVWRUxfVU5TUEVDSUZJRUQQABIMCghBUElfT1BFThABEg4KCkFQSV9IWUJSSUQQAhIOCgpBUElfT1BBUVVFEAMikgEKD1N0cmlwRW51bVByZWZpeBIhCh1TVFJJUF9FTlVNX1BSRUZJWF9VTlNQRUNJRklFRBAAEhoKFlNUUklQX0VOVU1fUFJFRklYX0tFRVAQARIjCh9TVFJJUF9FTlVNX1BSRUZJWF9HRU5FUkFURV9CT1RIEAISGwoXU1RSSVBfRU5VTV9QUkVGSVhfU1RSSVAQAzo8CgJnbxIbLmdvb2dsZS5wcm90b2J1Zi5GZWF0dXJlU2V0GOoHIAEoCzIOLnBiLkdvRmVhdHVyZXNSAmdvQi9aLWdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2dvZmVhdHVyZXNwYg", [descriptor_pb_js_1.file_google_protobuf_descriptor]); | ||
| exports.file_google_protobuf_go_features = (0, file_js_1.fileDesc)("CiFnb29nbGUvcHJvdG9idWYvZ29fZmVhdHVyZXMucHJvdG8SAnBiItEGCgpHb0ZlYXR1cmVzEqUBChpsZWdhY3lfdW5tYXJzaGFsX2pzb25fZW51bRgBIAEoCEKAAYgBAZgBBpgBAaIBCRIEdHJ1ZRiEB6IBChIFZmFsc2UY5weyAVsI6AcQ6AcaU1RoZSBsZWdhY3kgVW5tYXJzaGFsSlNPTiBBUEkgaXMgZGVwcmVjYXRlZCBhbmQgd2lsbCBiZSByZW1vdmVkIGluIGEgZnV0dXJlIGVkaXRpb24uEmoKCWFwaV9sZXZlbBgCIAEoDjIXLnBiLkdvRmVhdHVyZXMuQVBJTGV2ZWxCPogBAZgBA5gBAaIBGhIVQVBJX0xFVkVMX1VOU1BFQ0lGSUVEGIQHogEPEgpBUElfT1BBUVVFGOkHsgEDCOgHEmsKEXN0cmlwX2VudW1fcHJlZml4GAMgASgOMh4ucGIuR29GZWF0dXJlcy5TdHJpcEVudW1QcmVmaXhCMIgBAZgBBpgBB5gBAaIBGxIWU1RSSVBfRU5VTV9QUkVGSVhfS0VFUBiEB7IBAwjpBxJ4Cg1vcHRpbWl6ZV9tb2RlGAQgASgOMi8ucGIuR29GZWF0dXJlcy5PcHRpbWl6ZU1vZGVGZWF0dXJlLk9wdGltaXplTW9kZUIwiAEBmAEDmAEBogEeEhlPUFRJTUlaRV9NT0RFX1VOU1BFQ0lGSUVEGIQHsgEDCOkHGl4KE09wdGltaXplTW9kZUZlYXR1cmUiRwoMT3B0aW1pemVNb2RlEh0KGU9QVElNSVpFX01PREVfVU5TUEVDSUZJRUQQABIJCgVTUEVFRBABEg0KCUNPREVfU0laRRACIlMKCEFQSUxldmVsEhkKFUFQSV9MRVZFTF9VTlNQRUNJRklFRBAAEgwKCEFQSV9PUEVOEAESDgoKQVBJX0hZQlJJRBACEg4KCkFQSV9PUEFRVUUQAyKSAQoPU3RyaXBFbnVtUHJlZml4EiEKHVNUUklQX0VOVU1fUFJFRklYX1VOU1BFQ0lGSUVEEAASGgoWU1RSSVBfRU5VTV9QUkVGSVhfS0VFUBABEiMKH1NUUklQX0VOVU1fUFJFRklYX0dFTkVSQVRFX0JPVEgQAhIbChdTVFJJUF9FTlVNX1BSRUZJWF9TVFJJUBADOjwKAmdvEhsuZ29vZ2xlLnByb3RvYnVmLkZlYXR1cmVTZXQY6gcgASgLMg4ucGIuR29GZWF0dXJlc1ICZ29CL1otZ29vZ2xlLmdvbGFuZy5vcmcvcHJvdG9idWYvdHlwZXMvZ29mZWF0dXJlc3Bi", [descriptor_pb_js_1.file_google_protobuf_descriptor]); | ||
| /** | ||
@@ -34,2 +34,38 @@ * Describes the message pb.GoFeatures. | ||
| /** | ||
| * Describes the message pb.GoFeatures.OptimizeModeFeature. | ||
| * Use `create(GoFeatures_OptimizeModeFeatureSchema)` to create a new message. | ||
| */ | ||
| exports.GoFeatures_OptimizeModeFeatureSchema = (0, message_js_1.messageDesc)(exports.file_google_protobuf_go_features, 0, 0); | ||
| /** | ||
| * The name of this enum matches OptimizeMode in descriptor.proto. | ||
| * | ||
| * @generated from enum pb.GoFeatures.OptimizeModeFeature.OptimizeMode | ||
| */ | ||
| var GoFeatures_OptimizeModeFeature_OptimizeMode; | ||
| (function (GoFeatures_OptimizeModeFeature_OptimizeMode) { | ||
| /** | ||
| * OPTIMIZE_MODE_UNSPECIFIED results in falling back to the default | ||
| * (optimize for code size), but needs to be a separate value to distinguish | ||
| * between an explicitly set optimize mode or a missing optimize mode. | ||
| * | ||
| * @generated from enum value: OPTIMIZE_MODE_UNSPECIFIED = 0; | ||
| */ | ||
| GoFeatures_OptimizeModeFeature_OptimizeMode[GoFeatures_OptimizeModeFeature_OptimizeMode["OPTIMIZE_MODE_UNSPECIFIED"] = 0] = "OPTIMIZE_MODE_UNSPECIFIED"; | ||
| /** | ||
| * @generated from enum value: SPEED = 1; | ||
| */ | ||
| GoFeatures_OptimizeModeFeature_OptimizeMode[GoFeatures_OptimizeModeFeature_OptimizeMode["SPEED"] = 1] = "SPEED"; | ||
| /** | ||
| * There is no enum entry for LITE_RUNTIME (descriptor.proto), | ||
| * because Go Protobuf does not have the concept of a lite runtime. | ||
| * | ||
| * @generated from enum value: CODE_SIZE = 2; | ||
| */ | ||
| GoFeatures_OptimizeModeFeature_OptimizeMode[GoFeatures_OptimizeModeFeature_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; | ||
| })(GoFeatures_OptimizeModeFeature_OptimizeMode || (exports.GoFeatures_OptimizeModeFeature_OptimizeMode = GoFeatures_OptimizeModeFeature_OptimizeMode = {})); | ||
| /** | ||
| * Describes the enum pb.GoFeatures.OptimizeModeFeature.OptimizeMode. | ||
| */ | ||
| exports.GoFeatures_OptimizeModeFeature_OptimizeModeSchema = (0, enum_js_1.enumDesc)(exports.file_google_protobuf_go_features, 0, 0, 0); | ||
| /** | ||
| * @generated from enum pb.GoFeatures.APILevel | ||
@@ -36,0 +72,0 @@ */ |
@@ -80,4 +80,4 @@ import type { GenFile, GenMessage } from "../../../../codegenv2/types.js"; | ||
| * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone | ||
| * is required. A proto3 JSON serializer should always use UTC (as indicated by | ||
| * "Z") when printing the Timestamp type and a proto3 JSON parser should be | ||
| * is required. A ProtoJSON serializer should always use UTC (as indicated by | ||
| * "Z") when printing the Timestamp type and a ProtoJSON parser should be | ||
| * able to accept both UTC and other timezones (as indicated by an offset). | ||
@@ -105,3 +105,3 @@ * | ||
| * Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must | ||
| * be between -315576000000 and 315576000000 inclusive (which corresponds to | ||
| * be between -62135596800 and 253402300799 inclusive (which corresponds to | ||
| * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). | ||
@@ -196,4 +196,4 @@ * | ||
| * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone | ||
| * is required. A proto3 JSON serializer should always use UTC (as indicated by | ||
| * "Z") when printing the Timestamp type and a proto3 JSON parser should be | ||
| * is required. A ProtoJSON serializer should always use UTC (as indicated by | ||
| * "Z") when printing the Timestamp type and a ProtoJSON parser should be | ||
| * able to accept both UTC and other timezones (as indicated by an offset). | ||
@@ -200,0 +200,0 @@ * |
@@ -49,3 +49,3 @@ import type { GenEnum, GenFile, GenMessage } from "../../../../codegenv2/types.js"; | ||
| */ | ||
| sourceContext?: SourceContext; | ||
| sourceContext?: SourceContext | undefined; | ||
| /** | ||
@@ -486,3 +486,3 @@ * The source syntax. | ||
| */ | ||
| sourceContext?: SourceContext; | ||
| sourceContext?: SourceContext | undefined; | ||
| /** | ||
@@ -651,3 +651,3 @@ * The source syntax. | ||
| */ | ||
| value?: Any; | ||
| value?: Any | undefined; | ||
| }; | ||
@@ -654,0 +654,0 @@ /** |
@@ -16,1 +16,11 @@ import type { Message } from "../types.js"; | ||
| export declare function isWrapperDesc(messageDesc: DescMessage): messageDesc is WktWrapperDesc; | ||
| /** | ||
| * Returns true if the descriptor is a well-known type with a custom JSON | ||
| * representation per the protobuf JSON spec. Examples: Timestamp as an | ||
| * RFC 3339 string, Duration as "5s", wrappers as the unwrapped scalar. | ||
| * | ||
| * When packed inside `google.protobuf.Any`, these messages are serialized | ||
| * as `{"@type": ..., "value": <custom form>}`; all other messages embed | ||
| * their fields directly. | ||
| */ | ||
| export declare function hasCustomJsonRepresentation(desc: DescMessage): boolean; |
@@ -18,2 +18,3 @@ "use strict"; | ||
| exports.isWrapperDesc = isWrapperDesc; | ||
| exports.hasCustomJsonRepresentation = hasCustomJsonRepresentation; | ||
| function isWrapper(arg) { | ||
@@ -30,2 +31,25 @@ return isWrapperTypeName(arg.$typeName); | ||
| } | ||
| /** | ||
| * Returns true if the descriptor is a well-known type with a custom JSON | ||
| * representation per the protobuf JSON spec. Examples: Timestamp as an | ||
| * RFC 3339 string, Duration as "5s", wrappers as the unwrapped scalar. | ||
| * | ||
| * When packed inside `google.protobuf.Any`, these messages are serialized | ||
| * as `{"@type": ..., "value": <custom form>}`; all other messages embed | ||
| * their fields directly. | ||
| */ | ||
| function hasCustomJsonRepresentation(desc) { | ||
| switch (desc.typeName) { | ||
| case "google.protobuf.Any": | ||
| case "google.protobuf.Timestamp": | ||
| case "google.protobuf.Duration": | ||
| case "google.protobuf.FieldMask": | ||
| case "google.protobuf.Struct": | ||
| case "google.protobuf.Value": | ||
| case "google.protobuf.ListValue": | ||
| return true; | ||
| default: | ||
| return isWrapperDesc(desc); | ||
| } | ||
| } | ||
| function isWrapperTypeName(name) { | ||
@@ -32,0 +56,0 @@ return (name.startsWith("google.protobuf.") && |
@@ -117,3 +117,3 @@ import type { DescriptorProto, Edition, EnumDescriptorProto, EnumValueDescriptorProto, FeatureSet_FieldPresence, FieldDescriptorProto, FileDescriptorProto, MethodDescriptorProto, MethodOptions_IdempotencyLevel, OneofDescriptorProto, ServiceDescriptorProto } from "./wkt/gen/google/protobuf/descriptor_pb.js"; | ||
| */ | ||
| readonly sharedPrefix?: string; | ||
| readonly sharedPrefix?: string | undefined; | ||
| /** | ||
@@ -196,4 +196,4 @@ * Marked as deprecated in the protobuf source. | ||
| /** | ||
| * Fields and oneof groups for this message, ordered by their appearance in the | ||
| * protobuf source. | ||
| * Standalone fields and oneof groups for this message, ordered by | ||
| * their appearance in the protobuf source. | ||
| */ | ||
@@ -289,2 +289,9 @@ readonly members: (DescField | DescOneof)[]; | ||
| /** | ||
| * Whether to reject invalid UTF-8 when reading this field from the binary | ||
| * wire format. Reflects the resolved `utf8_validation` feature: true for | ||
| * VERIFY (proto3 and editions 2023+ default), false for NONE (proto2 | ||
| * default). | ||
| */ | ||
| readonly utf8Validation: boolean; | ||
| /** | ||
| * The compiler-generated descriptor. | ||
@@ -626,6 +633,6 @@ */ | ||
| readonly leadingDetached: readonly string[]; | ||
| readonly leading?: string; | ||
| readonly trailing?: string; | ||
| readonly leading?: string | undefined; | ||
| readonly trailing?: string | undefined; | ||
| readonly sourcePath: readonly number[]; | ||
| } | ||
| export {}; |
@@ -92,3 +92,3 @@ // Copyright 2021-2026 Buf Technologies, Inc. | ||
| case "scalar": | ||
| message.set(field, readScalar(reader, field.scalar)); | ||
| message.set(field, readScalar(reader, field.scalar, field.utf8Validation)); | ||
| break; | ||
@@ -143,3 +143,3 @@ case "enum": | ||
| case 1: | ||
| key = readScalar(reader, field.mapKey); | ||
| key = readScalar(reader, field.mapKey, field.utf8Validation); | ||
| break; | ||
@@ -149,3 +149,3 @@ case 2: | ||
| case "scalar": | ||
| val = readScalar(reader, field.scalar); | ||
| val = readScalar(reader, field.scalar, field.utf8Validation); | ||
| break; | ||
@@ -192,3 +192,3 @@ case "enum": | ||
| if (!packed) { | ||
| list.add(readScalar(reader, scalarType)); | ||
| list.add(readScalar(reader, scalarType, field.utf8Validation)); | ||
| return; | ||
@@ -198,3 +198,3 @@ } | ||
| while (reader.pos < e) { | ||
| list.add(readScalar(reader, scalarType)); | ||
| list.add(readScalar(reader, scalarType, field.utf8Validation)); | ||
| } | ||
@@ -208,6 +208,6 @@ } | ||
| } | ||
| function readScalar(reader, type) { | ||
| function readScalar(reader, type, validateUtf8 = false) { | ||
| switch (type) { | ||
| case ScalarType.STRING: | ||
| return reader.string(); | ||
| return reader.string(validateUtf8); | ||
| case ScalarType.BOOL: | ||
@@ -214,0 +214,0 @@ return reader.bool(); |
@@ -19,3 +19,3 @@ import { type DescEnum, type DescMessage } from "./descriptors.js"; | ||
| */ | ||
| registry?: Registry; | ||
| registry?: Registry | undefined; | ||
| } | ||
@@ -22,0 +22,0 @@ /** |
@@ -22,3 +22,3 @@ // Copyright 2021-2026 Buf Technologies, Inc. | ||
| import { base64Decode } from "./wire/base64-encoding.js"; | ||
| import { isWrapperDesc, anyPack, ListValueSchema, NullValue, StructSchema, ValueSchema, } from "./wkt/index.js"; | ||
| import { hasCustomJsonRepresentation, isWrapperDesc, anyPack, ListValueSchema, NullValue, StructSchema, ValueSchema, } from "./wkt/index.js"; | ||
| import { createExtensionContainer, setExtension } from "./extensions.js"; | ||
@@ -487,3 +487,3 @@ // Default options for parsing JSON. | ||
| const msg = reflect(desc); | ||
| if (typeName.startsWith("google.protobuf.") && | ||
| if (hasCustomJsonRepresentation(desc) && | ||
| Object.prototype.hasOwnProperty.call(json, "value")) { | ||
@@ -490,0 +490,0 @@ const value = json.value; |
@@ -92,3 +92,3 @@ import { type DescExtension, type DescField, type DescMessage, type DescOneof } from "../descriptors.js"; | ||
| export declare function parsePath(schema: DescMessage, path: string, options?: { | ||
| registry?: Registry; | ||
| registry?: Registry | undefined; | ||
| }): Path; | ||
@@ -95,0 +95,0 @@ /** |
+24
-1
@@ -194,2 +194,4 @@ // Copyright 2021-2026 Buf Technologies, Inc. | ||
| const EDITION_PROTO3 = 999; | ||
| // bootstrap-inject google.protobuf.Edition.EDITION_UNSTABLE: const $name: Edition.$localName = $number; | ||
| const EDITION_UNSTABLE = 9999; | ||
| // bootstrap-inject google.protobuf.FieldDescriptorProto.Type.TYPE_STRING: const $name: FieldDescriptorProto_Type.$localName = $number; | ||
@@ -225,5 +227,7 @@ const TYPE_STRING = 9; | ||
| const OPEN = 1; | ||
| // bootstrap-inject google.protobuf.FeatureSet.Utf8Validation.VERIFY: const $name: FeatureSet_Utf8Validation.$localName = $number; | ||
| const VERIFY = 2; | ||
| // biome-ignore format: want this to read well | ||
| // bootstrap-inject defaults: EDITION_PROTO2 to EDITION_2024: export const minimumEdition: SupportedEdition = $minimumEdition, maximumEdition: SupportedEdition = $maximumEdition; | ||
| // generated from protoc v33.2 | ||
| // generated from protoc v34.0 | ||
| export const minimumEdition = 998, maximumEdition = 1001; | ||
@@ -567,2 +571,3 @@ const featureDefaults = { | ||
| presence: getFieldPresence(proto, oneof, isExtension, parentOrFile), | ||
| utf8Validation: isUtf8Validated(proto, parentOrFile), | ||
| listKind: undefined, | ||
@@ -696,2 +701,8 @@ mapKind: undefined, | ||
| case "editions": | ||
| // EDITION_UNSTABLE is a sandbox for in-development features. Collapse | ||
| // it to maximumEdition so SupportedEdition and feature resolution do | ||
| // not leak the test-only edition to users. | ||
| if (proto.edition === EDITION_UNSTABLE) { | ||
| return maximumEdition; | ||
| } | ||
| if (proto.edition in featureDefaults) { | ||
@@ -892,2 +903,14 @@ return proto.edition; | ||
| } | ||
| /** | ||
| * Reject invalid UTF-8 when reading string fields from the binary wire format? | ||
| * Driven by the resolved `utf8_validation` feature: VERIFY (proto3 / editions | ||
| * 2023+ default) enforces; NONE (proto2 default) does not. | ||
| */ | ||
| function isUtf8Validated(proto, parent) { | ||
| return (VERIFY == | ||
| resolveFeature("utf8Validation", { | ||
| proto, | ||
| parent, | ||
| })); | ||
| } | ||
| function resolveFeature(name, ref) { | ||
@@ -894,0 +917,0 @@ var _a, _b; |
@@ -35,3 +35,3 @@ import { type DescEnum, type DescMessage } from "./descriptors.js"; | ||
| */ | ||
| registry?: Registry; | ||
| registry?: Registry | undefined; | ||
| } | ||
@@ -38,0 +38,0 @@ /** |
+10
-11
@@ -18,3 +18,3 @@ // Copyright 2021-2026 Buf Technologies, Inc. | ||
| import { anyUnpack } from "./wkt/index.js"; | ||
| import { isWrapperDesc } from "./wkt/wrappers.js"; | ||
| import { hasCustomJsonRepresentation, isWrapperDesc } from "./wkt/wrappers.js"; | ||
| import { base64Encode } from "./wire/index.js"; | ||
@@ -225,6 +225,8 @@ import { createExtensionContainer, getExtension } from "./extensions.js"; | ||
| case ScalarType.SINT64: | ||
| if (typeof value != "bigint" && typeof value != "string") { | ||
| throw new Error(`cannot encode ${field} to JSON: ${(_e = checkField(field, value)) === null || _e === void 0 ? void 0 : _e.message}`); | ||
| if (typeof value == "bigint" || | ||
| typeof value == "string" || | ||
| (typeof value == "number" && Number.isInteger(value))) { | ||
| return value.toString(); | ||
| } | ||
| return value.toString(); | ||
| throw new Error(`cannot encode ${field} to JSON: ${(_e = checkField(field, value)) === null || _e === void 0 ? void 0 : _e.message}`); | ||
| // bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings. | ||
@@ -286,9 +288,6 @@ // Either standard or URL-safe base64 encoding with/without paddings are accepted. | ||
| } | ||
| let json = reflectToJson(reflect(desc, message), opts); | ||
| if (desc.typeName.startsWith("google.protobuf.") || | ||
| json === null || | ||
| Array.isArray(json) || | ||
| typeof json !== "object") { | ||
| json = { value: json }; | ||
| } | ||
| const reflected = reflect(desc, message); | ||
| const json = hasCustomJsonRepresentation(desc) | ||
| ? { value: tryWktToJson(reflected, opts) } | ||
| : reflectToJson(reflected, opts); | ||
| json["@type"] = val.typeUrl; | ||
@@ -295,0 +294,0 @@ return json; |
@@ -18,3 +18,3 @@ import type { GenEnum as GenEnumV1, GenExtension as GenExtensionV1, GenMessage as GenMessageV1 } from "./codegenv1/types.js"; | ||
| */ | ||
| $unknown?: UnknownField[]; | ||
| $unknown?: UnknownField[] | undefined; | ||
| }; | ||
@@ -21,0 +21,0 @@ /** |
@@ -66,3 +66,3 @@ /** | ||
| * We cannot allocate a buffer for the entire output | ||
| * because we don't know it's size. | ||
| * because we don't know its size. | ||
| * | ||
@@ -124,3 +124,3 @@ * So we collect smaller chunks of known size and | ||
| /** | ||
| * Write a `bool` value, a variant. | ||
| * Write a `bool` value, a varint. | ||
| */ | ||
@@ -157,3 +157,3 @@ bool(value: boolean): this; | ||
| /** | ||
| * Write a `fixed64` value, a signed, fixed-length 64-bit integer. | ||
| * Write a `sfixed64` value, a signed, fixed-length 64-bit integer. | ||
| */ | ||
@@ -190,5 +190,6 @@ sfixed64(value: string | number | bigint): this; | ||
| private readonly view; | ||
| constructor(buf: Uint8Array, decodeUtf8?: (bytes: Uint8Array) => string); | ||
| constructor(buf: Uint8Array, decodeUtf8?: (bytes: Uint8Array, strict?: boolean) => string); | ||
| /** | ||
| * Reads a tag - field number and wire type. | ||
| * Reads a tag - field number and wire type. Tags are uint32 varints; values | ||
| * that do not fit in uint32 are rejected. | ||
| */ | ||
@@ -265,5 +266,6 @@ tag(): [number, WireType]; | ||
| /** | ||
| * Read a `string` field, length-delimited data converted to UTF-8 text. | ||
| * Read a `string` field, length-delimited data converted to UTF-8 text. If | ||
| * `strict` is true, throw on invalid UTF-8 instead of substituting U+FFFD. | ||
| */ | ||
| string(): string; | ||
| string(strict?: boolean): string; | ||
| } |
@@ -181,3 +181,3 @@ // Copyright 2021-2026 Buf Technologies, Inc. | ||
| /** | ||
| * Write a `bool` value, a variant. | ||
| * Write a `bool` value, a varint. | ||
| */ | ||
@@ -249,3 +249,3 @@ bool(value) { | ||
| /** | ||
| * Write a `fixed64` value, a signed, fixed-length 64-bit integer. | ||
| * Write a `sfixed64` value, a signed, fixed-length 64-bit integer. | ||
| */ | ||
@@ -308,8 +308,17 @@ sfixed64(value) { | ||
| /** | ||
| * Reads a tag - field number and wire type. | ||
| * Reads a tag - field number and wire type. Tags are uint32 varints; values | ||
| * that do not fit in uint32 are rejected. | ||
| */ | ||
| tag() { | ||
| let tag = this.uint32(), fieldNo = tag >>> 3, wireType = tag & 7; | ||
| if (fieldNo <= 0 || wireType < 0 || wireType > 5) | ||
| const start = this.pos; | ||
| const tag = this.uint32(); | ||
| const bytesRead = this.pos - start; | ||
| if (bytesRead > 5 || (bytesRead == 5 && this.buf[this.pos - 1] > 0x0f)) { | ||
| throw new Error("illegal tag: varint overflows uint32"); | ||
| } | ||
| const fieldNo = tag >>> 3; | ||
| const wireType = tag & 7; | ||
| if (fieldNo <= 0 || wireType > 5) { | ||
| throw new Error("illegal tag: field no " + fieldNo + " wire type " + wireType); | ||
| } | ||
| return [fieldNo, wireType]; | ||
@@ -460,6 +469,7 @@ } | ||
| /** | ||
| * Read a `string` field, length-delimited data converted to UTF-8 text. | ||
| * Read a `string` field, length-delimited data converted to UTF-8 text. If | ||
| * `strict` is true, throw on invalid UTF-8 instead of substituting U+FFFD. | ||
| */ | ||
| string() { | ||
| return this.decodeUtf8(this.bytes()); | ||
| string(strict) { | ||
| return this.decodeUtf8(this.bytes(), strict); | ||
| } | ||
@@ -466,0 +476,0 @@ } |
@@ -11,5 +11,7 @@ interface TextEncoding { | ||
| /** | ||
| * Decode UTF-8 text from binary. | ||
| * Decode UTF-8 text from binary. If `strict` is true, throw on invalid byte | ||
| * sequences instead of silently substituting U+FFFD. Implementations that | ||
| * do not support strict decoding may ignore the flag. | ||
| */ | ||
| decodeUtf8: (bytes: Uint8Array) => string; | ||
| decodeUtf8: (bytes: Uint8Array, strict?: boolean) => string; | ||
| } | ||
@@ -16,0 +18,0 @@ /** |
@@ -31,2 +31,3 @@ // Copyright 2021-2026 Buf Technologies, Inc. | ||
| const td = new globalThis.TextDecoder(); | ||
| let tdStrict; | ||
| globalThis[symbol] = { | ||
@@ -36,3 +37,9 @@ encodeUtf8(text) { | ||
| }, | ||
| decodeUtf8(bytes) { | ||
| decodeUtf8(bytes, strict) { | ||
| if (strict) { | ||
| if (tdStrict === undefined) { | ||
| tdStrict = new globalThis.TextDecoder("utf-8", { fatal: true }); | ||
| } | ||
| return tdStrict.decode(bytes); | ||
| } | ||
| return td.decode(bytes); | ||
@@ -39,0 +46,0 @@ }, |
@@ -78,3 +78,3 @@ import type { GenFile, GenMessage } from "../../../../codegenv2/types.js"; | ||
| */ | ||
| sourceContext?: SourceContext; | ||
| sourceContext?: SourceContext | undefined; | ||
| /** | ||
@@ -81,0 +81,0 @@ * Included interfaces. See [Mixin][]. |
@@ -124,3 +124,3 @@ import type { GenEnum, GenFile, GenMessage } from "../../../../../codegenv2/types.js"; | ||
| */ | ||
| compilerVersion?: Version; | ||
| compilerVersion?: Version | undefined; | ||
| }; | ||
@@ -375,3 +375,3 @@ /** | ||
| */ | ||
| generatedCodeInfo?: GeneratedCodeInfo; | ||
| generatedCodeInfo?: GeneratedCodeInfo | undefined; | ||
| }; | ||
@@ -378,0 +378,0 @@ /** |
@@ -20,3 +20,3 @@ // Copyright 2021-2026 Buf Technologies, Inc. | ||
| */ | ||
| export const file_google_protobuf_descriptor = /*@__PURE__*/ boot({ "name": "google/protobuf/descriptor.proto", "package": "google.protobuf", "messageType": [{ "name": "FileDescriptorSet", "field": [{ "name": "file", "number": 1, "type": 11, "label": 3, "typeName": ".google.protobuf.FileDescriptorProto" }], "extensionRange": [{ "start": 536000000, "end": 536000001 }] }, { "name": "FileDescriptorProto", "field": [{ "name": "name", "number": 1, "type": 9, "label": 1 }, { "name": "package", "number": 2, "type": 9, "label": 1 }, { "name": "dependency", "number": 3, "type": 9, "label": 3 }, { "name": "public_dependency", "number": 10, "type": 5, "label": 3 }, { "name": "weak_dependency", "number": 11, "type": 5, "label": 3 }, { "name": "option_dependency", "number": 15, "type": 9, "label": 3 }, { "name": "message_type", "number": 4, "type": 11, "label": 3, "typeName": ".google.protobuf.DescriptorProto" }, { "name": "enum_type", "number": 5, "type": 11, "label": 3, "typeName": ".google.protobuf.EnumDescriptorProto" }, { "name": "service", "number": 6, "type": 11, "label": 3, "typeName": ".google.protobuf.ServiceDescriptorProto" }, { "name": "extension", "number": 7, "type": 11, "label": 3, "typeName": ".google.protobuf.FieldDescriptorProto" }, { "name": "options", "number": 8, "type": 11, "label": 1, "typeName": ".google.protobuf.FileOptions" }, { "name": "source_code_info", "number": 9, "type": 11, "label": 1, "typeName": ".google.protobuf.SourceCodeInfo" }, { "name": "syntax", "number": 12, "type": 9, "label": 1 }, { "name": "edition", "number": 14, "type": 14, "label": 1, "typeName": ".google.protobuf.Edition" }] }, { "name": "DescriptorProto", "field": [{ "name": "name", "number": 1, "type": 9, "label": 1 }, { "name": "field", "number": 2, "type": 11, "label": 3, "typeName": ".google.protobuf.FieldDescriptorProto" }, { "name": "extension", "number": 6, "type": 11, "label": 3, "typeName": ".google.protobuf.FieldDescriptorProto" }, { "name": "nested_type", "number": 3, "type": 11, "label": 3, "typeName": ".google.protobuf.DescriptorProto" }, { "name": "enum_type", "number": 4, "type": 11, "label": 3, "typeName": ".google.protobuf.EnumDescriptorProto" }, { "name": "extension_range", "number": 5, "type": 11, "label": 3, "typeName": ".google.protobuf.DescriptorProto.ExtensionRange" }, { "name": "oneof_decl", "number": 8, "type": 11, "label": 3, "typeName": ".google.protobuf.OneofDescriptorProto" }, { "name": "options", "number": 7, "type": 11, "label": 1, "typeName": ".google.protobuf.MessageOptions" }, { "name": "reserved_range", "number": 9, "type": 11, "label": 3, "typeName": ".google.protobuf.DescriptorProto.ReservedRange" }, { "name": "reserved_name", "number": 10, "type": 9, "label": 3 }, { "name": "visibility", "number": 11, "type": 14, "label": 1, "typeName": ".google.protobuf.SymbolVisibility" }], "nestedType": [{ "name": "ExtensionRange", "field": [{ "name": "start", "number": 1, "type": 5, "label": 1 }, { "name": "end", "number": 2, "type": 5, "label": 1 }, { "name": "options", "number": 3, "type": 11, "label": 1, "typeName": ".google.protobuf.ExtensionRangeOptions" }] }, { "name": "ReservedRange", "field": [{ "name": "start", "number": 1, "type": 5, "label": 1 }, { "name": "end", "number": 2, "type": 5, "label": 1 }] }] }, { "name": "ExtensionRangeOptions", "field": [{ "name": "uninterpreted_option", "number": 999, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption" }, { "name": "declaration", "number": 2, "type": 11, "label": 3, "typeName": ".google.protobuf.ExtensionRangeOptions.Declaration", "options": { "retention": 2 } }, { "name": "features", "number": 50, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "verification", "number": 3, "type": 14, "label": 1, "typeName": ".google.protobuf.ExtensionRangeOptions.VerificationState", "defaultValue": "UNVERIFIED", "options": { "retention": 2 } }], "nestedType": [{ "name": "Declaration", "field": [{ "name": "number", "number": 1, "type": 5, "label": 1 }, { "name": "full_name", "number": 2, "type": 9, "label": 1 }, { "name": "type", "number": 3, "type": 9, "label": 1 }, { "name": "reserved", "number": 5, "type": 8, "label": 1 }, { "name": "repeated", "number": 6, "type": 8, "label": 1 }] }], "enumType": [{ "name": "VerificationState", "value": [{ "name": "DECLARATION", "number": 0 }, { "name": "UNVERIFIED", "number": 1 }] }], "extensionRange": [{ "start": 1000, "end": 536870912 }] }, { "name": "FieldDescriptorProto", "field": [{ "name": "name", "number": 1, "type": 9, "label": 1 }, { "name": "number", "number": 3, "type": 5, "label": 1 }, { "name": "label", "number": 4, "type": 14, "label": 1, "typeName": ".google.protobuf.FieldDescriptorProto.Label" }, { "name": "type", "number": 5, "type": 14, "label": 1, "typeName": ".google.protobuf.FieldDescriptorProto.Type" }, { "name": "type_name", "number": 6, "type": 9, "label": 1 }, { "name": "extendee", "number": 2, "type": 9, "label": 1 }, { "name": "default_value", "number": 7, "type": 9, "label": 1 }, { "name": "oneof_index", "number": 9, "type": 5, "label": 1 }, { "name": "json_name", "number": 10, "type": 9, "label": 1 }, { "name": "options", "number": 8, "type": 11, "label": 1, "typeName": ".google.protobuf.FieldOptions" }, { "name": "proto3_optional", "number": 17, "type": 8, "label": 1 }], "enumType": [{ "name": "Type", "value": [{ "name": "TYPE_DOUBLE", "number": 1 }, { "name": "TYPE_FLOAT", "number": 2 }, { "name": "TYPE_INT64", "number": 3 }, { "name": "TYPE_UINT64", "number": 4 }, { "name": "TYPE_INT32", "number": 5 }, { "name": "TYPE_FIXED64", "number": 6 }, { "name": "TYPE_FIXED32", "number": 7 }, { "name": "TYPE_BOOL", "number": 8 }, { "name": "TYPE_STRING", "number": 9 }, { "name": "TYPE_GROUP", "number": 10 }, { "name": "TYPE_MESSAGE", "number": 11 }, { "name": "TYPE_BYTES", "number": 12 }, { "name": "TYPE_UINT32", "number": 13 }, { "name": "TYPE_ENUM", "number": 14 }, { "name": "TYPE_SFIXED32", "number": 15 }, { "name": "TYPE_SFIXED64", "number": 16 }, { "name": "TYPE_SINT32", "number": 17 }, { "name": "TYPE_SINT64", "number": 18 }] }, { "name": "Label", "value": [{ "name": "LABEL_OPTIONAL", "number": 1 }, { "name": "LABEL_REPEATED", "number": 3 }, { "name": "LABEL_REQUIRED", "number": 2 }] }] }, { "name": "OneofDescriptorProto", "field": [{ "name": "name", "number": 1, "type": 9, "label": 1 }, { "name": "options", "number": 2, "type": 11, "label": 1, "typeName": ".google.protobuf.OneofOptions" }] }, { "name": "EnumDescriptorProto", "field": [{ "name": "name", "number": 1, "type": 9, "label": 1 }, { "name": "value", "number": 2, "type": 11, "label": 3, "typeName": ".google.protobuf.EnumValueDescriptorProto" }, { "name": "options", "number": 3, "type": 11, "label": 1, "typeName": ".google.protobuf.EnumOptions" }, { "name": "reserved_range", "number": 4, "type": 11, "label": 3, "typeName": ".google.protobuf.EnumDescriptorProto.EnumReservedRange" }, { "name": "reserved_name", "number": 5, "type": 9, "label": 3 }, { "name": "visibility", "number": 6, "type": 14, "label": 1, "typeName": ".google.protobuf.SymbolVisibility" }], "nestedType": [{ "name": "EnumReservedRange", "field": [{ "name": "start", "number": 1, "type": 5, "label": 1 }, { "name": "end", "number": 2, "type": 5, "label": 1 }] }] }, { "name": "EnumValueDescriptorProto", "field": [{ "name": "name", "number": 1, "type": 9, "label": 1 }, { "name": "number", "number": 2, "type": 5, "label": 1 }, { "name": "options", "number": 3, "type": 11, "label": 1, "typeName": ".google.protobuf.EnumValueOptions" }] }, { "name": "ServiceDescriptorProto", "field": [{ "name": "name", "number": 1, "type": 9, "label": 1 }, { "name": "method", "number": 2, "type": 11, "label": 3, "typeName": ".google.protobuf.MethodDescriptorProto" }, { "name": "options", "number": 3, "type": 11, "label": 1, "typeName": ".google.protobuf.ServiceOptions" }] }, { "name": "MethodDescriptorProto", "field": [{ "name": "name", "number": 1, "type": 9, "label": 1 }, { "name": "input_type", "number": 2, "type": 9, "label": 1 }, { "name": "output_type", "number": 3, "type": 9, "label": 1 }, { "name": "options", "number": 4, "type": 11, "label": 1, "typeName": ".google.protobuf.MethodOptions" }, { "name": "client_streaming", "number": 5, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "server_streaming", "number": 6, "type": 8, "label": 1, "defaultValue": "false" }] }, { "name": "FileOptions", "field": [{ "name": "java_package", "number": 1, "type": 9, "label": 1 }, { "name": "java_outer_classname", "number": 8, "type": 9, "label": 1 }, { "name": "java_multiple_files", "number": 10, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "java_generate_equals_and_hash", "number": 20, "type": 8, "label": 1, "options": { "deprecated": true } }, { "name": "java_string_check_utf8", "number": 27, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "optimize_for", "number": 9, "type": 14, "label": 1, "typeName": ".google.protobuf.FileOptions.OptimizeMode", "defaultValue": "SPEED" }, { "name": "go_package", "number": 11, "type": 9, "label": 1 }, { "name": "cc_generic_services", "number": 16, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "java_generic_services", "number": 17, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "py_generic_services", "number": 18, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "deprecated", "number": 23, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "cc_enable_arenas", "number": 31, "type": 8, "label": 1, "defaultValue": "true" }, { "name": "objc_class_prefix", "number": 36, "type": 9, "label": 1 }, { "name": "csharp_namespace", "number": 37, "type": 9, "label": 1 }, { "name": "swift_prefix", "number": 39, "type": 9, "label": 1 }, { "name": "php_class_prefix", "number": 40, "type": 9, "label": 1 }, { "name": "php_namespace", "number": 41, "type": 9, "label": 1 }, { "name": "php_metadata_namespace", "number": 44, "type": 9, "label": 1 }, { "name": "ruby_package", "number": 45, "type": 9, "label": 1 }, { "name": "features", "number": 50, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "uninterpreted_option", "number": 999, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption" }], "enumType": [{ "name": "OptimizeMode", "value": [{ "name": "SPEED", "number": 1 }, { "name": "CODE_SIZE", "number": 2 }, { "name": "LITE_RUNTIME", "number": 3 }] }], "extensionRange": [{ "start": 1000, "end": 536870912 }] }, { "name": "MessageOptions", "field": [{ "name": "message_set_wire_format", "number": 1, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "no_standard_descriptor_accessor", "number": 2, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "deprecated", "number": 3, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "map_entry", "number": 7, "type": 8, "label": 1 }, { "name": "deprecated_legacy_json_field_conflicts", "number": 11, "type": 8, "label": 1, "options": { "deprecated": true } }, { "name": "features", "number": 12, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "uninterpreted_option", "number": 999, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption" }], "extensionRange": [{ "start": 1000, "end": 536870912 }] }, { "name": "FieldOptions", "field": [{ "name": "ctype", "number": 1, "type": 14, "label": 1, "typeName": ".google.protobuf.FieldOptions.CType", "defaultValue": "STRING" }, { "name": "packed", "number": 2, "type": 8, "label": 1 }, { "name": "jstype", "number": 6, "type": 14, "label": 1, "typeName": ".google.protobuf.FieldOptions.JSType", "defaultValue": "JS_NORMAL" }, { "name": "lazy", "number": 5, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "unverified_lazy", "number": 15, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "deprecated", "number": 3, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "weak", "number": 10, "type": 8, "label": 1, "defaultValue": "false", "options": { "deprecated": true } }, { "name": "debug_redact", "number": 16, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "retention", "number": 17, "type": 14, "label": 1, "typeName": ".google.protobuf.FieldOptions.OptionRetention" }, { "name": "targets", "number": 19, "type": 14, "label": 3, "typeName": ".google.protobuf.FieldOptions.OptionTargetType" }, { "name": "edition_defaults", "number": 20, "type": 11, "label": 3, "typeName": ".google.protobuf.FieldOptions.EditionDefault" }, { "name": "features", "number": 21, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "feature_support", "number": 22, "type": 11, "label": 1, "typeName": ".google.protobuf.FieldOptions.FeatureSupport" }, { "name": "uninterpreted_option", "number": 999, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption" }], "nestedType": [{ "name": "EditionDefault", "field": [{ "name": "edition", "number": 3, "type": 14, "label": 1, "typeName": ".google.protobuf.Edition" }, { "name": "value", "number": 2, "type": 9, "label": 1 }] }, { "name": "FeatureSupport", "field": [{ "name": "edition_introduced", "number": 1, "type": 14, "label": 1, "typeName": ".google.protobuf.Edition" }, { "name": "edition_deprecated", "number": 2, "type": 14, "label": 1, "typeName": ".google.protobuf.Edition" }, { "name": "deprecation_warning", "number": 3, "type": 9, "label": 1 }, { "name": "edition_removed", "number": 4, "type": 14, "label": 1, "typeName": ".google.protobuf.Edition" }] }], "enumType": [{ "name": "CType", "value": [{ "name": "STRING", "number": 0 }, { "name": "CORD", "number": 1 }, { "name": "STRING_PIECE", "number": 2 }] }, { "name": "JSType", "value": [{ "name": "JS_NORMAL", "number": 0 }, { "name": "JS_STRING", "number": 1 }, { "name": "JS_NUMBER", "number": 2 }] }, { "name": "OptionRetention", "value": [{ "name": "RETENTION_UNKNOWN", "number": 0 }, { "name": "RETENTION_RUNTIME", "number": 1 }, { "name": "RETENTION_SOURCE", "number": 2 }] }, { "name": "OptionTargetType", "value": [{ "name": "TARGET_TYPE_UNKNOWN", "number": 0 }, { "name": "TARGET_TYPE_FILE", "number": 1 }, { "name": "TARGET_TYPE_EXTENSION_RANGE", "number": 2 }, { "name": "TARGET_TYPE_MESSAGE", "number": 3 }, { "name": "TARGET_TYPE_FIELD", "number": 4 }, { "name": "TARGET_TYPE_ONEOF", "number": 5 }, { "name": "TARGET_TYPE_ENUM", "number": 6 }, { "name": "TARGET_TYPE_ENUM_ENTRY", "number": 7 }, { "name": "TARGET_TYPE_SERVICE", "number": 8 }, { "name": "TARGET_TYPE_METHOD", "number": 9 }] }], "extensionRange": [{ "start": 1000, "end": 536870912 }] }, { "name": "OneofOptions", "field": [{ "name": "features", "number": 1, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "uninterpreted_option", "number": 999, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption" }], "extensionRange": [{ "start": 1000, "end": 536870912 }] }, { "name": "EnumOptions", "field": [{ "name": "allow_alias", "number": 2, "type": 8, "label": 1 }, { "name": "deprecated", "number": 3, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "deprecated_legacy_json_field_conflicts", "number": 6, "type": 8, "label": 1, "options": { "deprecated": true } }, { "name": "features", "number": 7, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "uninterpreted_option", "number": 999, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption" }], "extensionRange": [{ "start": 1000, "end": 536870912 }] }, { "name": "EnumValueOptions", "field": [{ "name": "deprecated", "number": 1, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "features", "number": 2, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "debug_redact", "number": 3, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "feature_support", "number": 4, "type": 11, "label": 1, "typeName": ".google.protobuf.FieldOptions.FeatureSupport" }, { "name": "uninterpreted_option", "number": 999, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption" }], "extensionRange": [{ "start": 1000, "end": 536870912 }] }, { "name": "ServiceOptions", "field": [{ "name": "features", "number": 34, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "deprecated", "number": 33, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "uninterpreted_option", "number": 999, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption" }], "extensionRange": [{ "start": 1000, "end": 536870912 }] }, { "name": "MethodOptions", "field": [{ "name": "deprecated", "number": 33, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "idempotency_level", "number": 34, "type": 14, "label": 1, "typeName": ".google.protobuf.MethodOptions.IdempotencyLevel", "defaultValue": "IDEMPOTENCY_UNKNOWN" }, { "name": "features", "number": 35, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "uninterpreted_option", "number": 999, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption" }], "enumType": [{ "name": "IdempotencyLevel", "value": [{ "name": "IDEMPOTENCY_UNKNOWN", "number": 0 }, { "name": "NO_SIDE_EFFECTS", "number": 1 }, { "name": "IDEMPOTENT", "number": 2 }] }], "extensionRange": [{ "start": 1000, "end": 536870912 }] }, { "name": "UninterpretedOption", "field": [{ "name": "name", "number": 2, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption.NamePart" }, { "name": "identifier_value", "number": 3, "type": 9, "label": 1 }, { "name": "positive_int_value", "number": 4, "type": 4, "label": 1 }, { "name": "negative_int_value", "number": 5, "type": 3, "label": 1 }, { "name": "double_value", "number": 6, "type": 1, "label": 1 }, { "name": "string_value", "number": 7, "type": 12, "label": 1 }, { "name": "aggregate_value", "number": 8, "type": 9, "label": 1 }], "nestedType": [{ "name": "NamePart", "field": [{ "name": "name_part", "number": 1, "type": 9, "label": 2 }, { "name": "is_extension", "number": 2, "type": 8, "label": 2 }] }] }, { "name": "FeatureSet", "field": [{ "name": "field_presence", "number": 1, "type": 14, "label": 1, "typeName": ".google.protobuf.FeatureSet.FieldPresence", "options": { "retention": 1, "targets": [4, 1], "editionDefaults": [{ "value": "EXPLICIT", "edition": 900 }, { "value": "IMPLICIT", "edition": 999 }, { "value": "EXPLICIT", "edition": 1000 }] } }, { "name": "enum_type", "number": 2, "type": 14, "label": 1, "typeName": ".google.protobuf.FeatureSet.EnumType", "options": { "retention": 1, "targets": [6, 1], "editionDefaults": [{ "value": "CLOSED", "edition": 900 }, { "value": "OPEN", "edition": 999 }] } }, { "name": "repeated_field_encoding", "number": 3, "type": 14, "label": 1, "typeName": ".google.protobuf.FeatureSet.RepeatedFieldEncoding", "options": { "retention": 1, "targets": [4, 1], "editionDefaults": [{ "value": "EXPANDED", "edition": 900 }, { "value": "PACKED", "edition": 999 }] } }, { "name": "utf8_validation", "number": 4, "type": 14, "label": 1, "typeName": ".google.protobuf.FeatureSet.Utf8Validation", "options": { "retention": 1, "targets": [4, 1], "editionDefaults": [{ "value": "NONE", "edition": 900 }, { "value": "VERIFY", "edition": 999 }] } }, { "name": "message_encoding", "number": 5, "type": 14, "label": 1, "typeName": ".google.protobuf.FeatureSet.MessageEncoding", "options": { "retention": 1, "targets": [4, 1], "editionDefaults": [{ "value": "LENGTH_PREFIXED", "edition": 900 }] } }, { "name": "json_format", "number": 6, "type": 14, "label": 1, "typeName": ".google.protobuf.FeatureSet.JsonFormat", "options": { "retention": 1, "targets": [3, 6, 1], "editionDefaults": [{ "value": "LEGACY_BEST_EFFORT", "edition": 900 }, { "value": "ALLOW", "edition": 999 }] } }, { "name": "enforce_naming_style", "number": 7, "type": 14, "label": 1, "typeName": ".google.protobuf.FeatureSet.EnforceNamingStyle", "options": { "retention": 2, "targets": [1, 2, 3, 4, 5, 6, 7, 8, 9], "editionDefaults": [{ "value": "STYLE_LEGACY", "edition": 900 }, { "value": "STYLE2024", "edition": 1001 }] } }, { "name": "default_symbol_visibility", "number": 8, "type": 14, "label": 1, "typeName": ".google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility", "options": { "retention": 2, "targets": [1], "editionDefaults": [{ "value": "EXPORT_ALL", "edition": 900 }, { "value": "EXPORT_TOP_LEVEL", "edition": 1001 }] } }], "nestedType": [{ "name": "VisibilityFeature", "enumType": [{ "name": "DefaultSymbolVisibility", "value": [{ "name": "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN", "number": 0 }, { "name": "EXPORT_ALL", "number": 1 }, { "name": "EXPORT_TOP_LEVEL", "number": 2 }, { "name": "LOCAL_ALL", "number": 3 }, { "name": "STRICT", "number": 4 }] }] }], "enumType": [{ "name": "FieldPresence", "value": [{ "name": "FIELD_PRESENCE_UNKNOWN", "number": 0 }, { "name": "EXPLICIT", "number": 1 }, { "name": "IMPLICIT", "number": 2 }, { "name": "LEGACY_REQUIRED", "number": 3 }] }, { "name": "EnumType", "value": [{ "name": "ENUM_TYPE_UNKNOWN", "number": 0 }, { "name": "OPEN", "number": 1 }, { "name": "CLOSED", "number": 2 }] }, { "name": "RepeatedFieldEncoding", "value": [{ "name": "REPEATED_FIELD_ENCODING_UNKNOWN", "number": 0 }, { "name": "PACKED", "number": 1 }, { "name": "EXPANDED", "number": 2 }] }, { "name": "Utf8Validation", "value": [{ "name": "UTF8_VALIDATION_UNKNOWN", "number": 0 }, { "name": "VERIFY", "number": 2 }, { "name": "NONE", "number": 3 }] }, { "name": "MessageEncoding", "value": [{ "name": "MESSAGE_ENCODING_UNKNOWN", "number": 0 }, { "name": "LENGTH_PREFIXED", "number": 1 }, { "name": "DELIMITED", "number": 2 }] }, { "name": "JsonFormat", "value": [{ "name": "JSON_FORMAT_UNKNOWN", "number": 0 }, { "name": "ALLOW", "number": 1 }, { "name": "LEGACY_BEST_EFFORT", "number": 2 }] }, { "name": "EnforceNamingStyle", "value": [{ "name": "ENFORCE_NAMING_STYLE_UNKNOWN", "number": 0 }, { "name": "STYLE2024", "number": 1 }, { "name": "STYLE_LEGACY", "number": 2 }] }], "extensionRange": [{ "start": 1000, "end": 9995 }, { "start": 9995, "end": 10000 }, { "start": 10000, "end": 10001 }] }, { "name": "FeatureSetDefaults", "field": [{ "name": "defaults", "number": 1, "type": 11, "label": 3, "typeName": ".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault" }, { "name": "minimum_edition", "number": 4, "type": 14, "label": 1, "typeName": ".google.protobuf.Edition" }, { "name": "maximum_edition", "number": 5, "type": 14, "label": 1, "typeName": ".google.protobuf.Edition" }], "nestedType": [{ "name": "FeatureSetEditionDefault", "field": [{ "name": "edition", "number": 3, "type": 14, "label": 1, "typeName": ".google.protobuf.Edition" }, { "name": "overridable_features", "number": 4, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "fixed_features", "number": 5, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }] }] }, { "name": "SourceCodeInfo", "field": [{ "name": "location", "number": 1, "type": 11, "label": 3, "typeName": ".google.protobuf.SourceCodeInfo.Location" }], "nestedType": [{ "name": "Location", "field": [{ "name": "path", "number": 1, "type": 5, "label": 3, "options": { "packed": true } }, { "name": "span", "number": 2, "type": 5, "label": 3, "options": { "packed": true } }, { "name": "leading_comments", "number": 3, "type": 9, "label": 1 }, { "name": "trailing_comments", "number": 4, "type": 9, "label": 1 }, { "name": "leading_detached_comments", "number": 6, "type": 9, "label": 3 }] }], "extensionRange": [{ "start": 536000000, "end": 536000001 }] }, { "name": "GeneratedCodeInfo", "field": [{ "name": "annotation", "number": 1, "type": 11, "label": 3, "typeName": ".google.protobuf.GeneratedCodeInfo.Annotation" }], "nestedType": [{ "name": "Annotation", "field": [{ "name": "path", "number": 1, "type": 5, "label": 3, "options": { "packed": true } }, { "name": "source_file", "number": 2, "type": 9, "label": 1 }, { "name": "begin", "number": 3, "type": 5, "label": 1 }, { "name": "end", "number": 4, "type": 5, "label": 1 }, { "name": "semantic", "number": 5, "type": 14, "label": 1, "typeName": ".google.protobuf.GeneratedCodeInfo.Annotation.Semantic" }], "enumType": [{ "name": "Semantic", "value": [{ "name": "NONE", "number": 0 }, { "name": "SET", "number": 1 }, { "name": "ALIAS", "number": 2 }] }] }] }], "enumType": [{ "name": "Edition", "value": [{ "name": "EDITION_UNKNOWN", "number": 0 }, { "name": "EDITION_LEGACY", "number": 900 }, { "name": "EDITION_PROTO2", "number": 998 }, { "name": "EDITION_PROTO3", "number": 999 }, { "name": "EDITION_2023", "number": 1000 }, { "name": "EDITION_2024", "number": 1001 }, { "name": "EDITION_UNSTABLE", "number": 9999 }, { "name": "EDITION_1_TEST_ONLY", "number": 1 }, { "name": "EDITION_2_TEST_ONLY", "number": 2 }, { "name": "EDITION_99997_TEST_ONLY", "number": 99997 }, { "name": "EDITION_99998_TEST_ONLY", "number": 99998 }, { "name": "EDITION_99999_TEST_ONLY", "number": 99999 }, { "name": "EDITION_MAX", "number": 2147483647 }] }, { "name": "SymbolVisibility", "value": [{ "name": "VISIBILITY_UNSET", "number": 0 }, { "name": "VISIBILITY_LOCAL", "number": 1 }, { "name": "VISIBILITY_EXPORT", "number": 2 }] }] }); | ||
| export const file_google_protobuf_descriptor = /*@__PURE__*/ boot({ "name": "google/protobuf/descriptor.proto", "package": "google.protobuf", "messageType": [{ "name": "FileDescriptorSet", "field": [{ "name": "file", "number": 1, "type": 11, "label": 3, "typeName": ".google.protobuf.FileDescriptorProto" }], "extensionRange": [{ "start": 536000000, "end": 536000001 }] }, { "name": "FileDescriptorProto", "field": [{ "name": "name", "number": 1, "type": 9, "label": 1 }, { "name": "package", "number": 2, "type": 9, "label": 1 }, { "name": "dependency", "number": 3, "type": 9, "label": 3 }, { "name": "public_dependency", "number": 10, "type": 5, "label": 3 }, { "name": "weak_dependency", "number": 11, "type": 5, "label": 3 }, { "name": "option_dependency", "number": 15, "type": 9, "label": 3 }, { "name": "message_type", "number": 4, "type": 11, "label": 3, "typeName": ".google.protobuf.DescriptorProto" }, { "name": "enum_type", "number": 5, "type": 11, "label": 3, "typeName": ".google.protobuf.EnumDescriptorProto" }, { "name": "service", "number": 6, "type": 11, "label": 3, "typeName": ".google.protobuf.ServiceDescriptorProto" }, { "name": "extension", "number": 7, "type": 11, "label": 3, "typeName": ".google.protobuf.FieldDescriptorProto" }, { "name": "options", "number": 8, "type": 11, "label": 1, "typeName": ".google.protobuf.FileOptions" }, { "name": "source_code_info", "number": 9, "type": 11, "label": 1, "typeName": ".google.protobuf.SourceCodeInfo" }, { "name": "syntax", "number": 12, "type": 9, "label": 1 }, { "name": "edition", "number": 14, "type": 14, "label": 1, "typeName": ".google.protobuf.Edition" }] }, { "name": "DescriptorProto", "field": [{ "name": "name", "number": 1, "type": 9, "label": 1 }, { "name": "field", "number": 2, "type": 11, "label": 3, "typeName": ".google.protobuf.FieldDescriptorProto" }, { "name": "extension", "number": 6, "type": 11, "label": 3, "typeName": ".google.protobuf.FieldDescriptorProto" }, { "name": "nested_type", "number": 3, "type": 11, "label": 3, "typeName": ".google.protobuf.DescriptorProto" }, { "name": "enum_type", "number": 4, "type": 11, "label": 3, "typeName": ".google.protobuf.EnumDescriptorProto" }, { "name": "extension_range", "number": 5, "type": 11, "label": 3, "typeName": ".google.protobuf.DescriptorProto.ExtensionRange" }, { "name": "oneof_decl", "number": 8, "type": 11, "label": 3, "typeName": ".google.protobuf.OneofDescriptorProto" }, { "name": "options", "number": 7, "type": 11, "label": 1, "typeName": ".google.protobuf.MessageOptions" }, { "name": "reserved_range", "number": 9, "type": 11, "label": 3, "typeName": ".google.protobuf.DescriptorProto.ReservedRange" }, { "name": "reserved_name", "number": 10, "type": 9, "label": 3 }, { "name": "visibility", "number": 11, "type": 14, "label": 1, "typeName": ".google.protobuf.SymbolVisibility" }], "nestedType": [{ "name": "ExtensionRange", "field": [{ "name": "start", "number": 1, "type": 5, "label": 1 }, { "name": "end", "number": 2, "type": 5, "label": 1 }, { "name": "options", "number": 3, "type": 11, "label": 1, "typeName": ".google.protobuf.ExtensionRangeOptions" }] }, { "name": "ReservedRange", "field": [{ "name": "start", "number": 1, "type": 5, "label": 1 }, { "name": "end", "number": 2, "type": 5, "label": 1 }] }] }, { "name": "ExtensionRangeOptions", "field": [{ "name": "uninterpreted_option", "number": 999, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption" }, { "name": "declaration", "number": 2, "type": 11, "label": 3, "typeName": ".google.protobuf.ExtensionRangeOptions.Declaration", "options": { "retention": 2 } }, { "name": "features", "number": 50, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "verification", "number": 3, "type": 14, "label": 1, "typeName": ".google.protobuf.ExtensionRangeOptions.VerificationState", "defaultValue": "UNVERIFIED", "options": { "retention": 2 } }], "nestedType": [{ "name": "Declaration", "field": [{ "name": "number", "number": 1, "type": 5, "label": 1 }, { "name": "full_name", "number": 2, "type": 9, "label": 1 }, { "name": "type", "number": 3, "type": 9, "label": 1 }, { "name": "reserved", "number": 5, "type": 8, "label": 1 }, { "name": "repeated", "number": 6, "type": 8, "label": 1 }] }], "enumType": [{ "name": "VerificationState", "value": [{ "name": "DECLARATION", "number": 0 }, { "name": "UNVERIFIED", "number": 1 }] }], "extensionRange": [{ "start": 1000, "end": 536870912 }] }, { "name": "FieldDescriptorProto", "field": [{ "name": "name", "number": 1, "type": 9, "label": 1 }, { "name": "number", "number": 3, "type": 5, "label": 1 }, { "name": "label", "number": 4, "type": 14, "label": 1, "typeName": ".google.protobuf.FieldDescriptorProto.Label" }, { "name": "type", "number": 5, "type": 14, "label": 1, "typeName": ".google.protobuf.FieldDescriptorProto.Type" }, { "name": "type_name", "number": 6, "type": 9, "label": 1 }, { "name": "extendee", "number": 2, "type": 9, "label": 1 }, { "name": "default_value", "number": 7, "type": 9, "label": 1 }, { "name": "oneof_index", "number": 9, "type": 5, "label": 1 }, { "name": "json_name", "number": 10, "type": 9, "label": 1 }, { "name": "options", "number": 8, "type": 11, "label": 1, "typeName": ".google.protobuf.FieldOptions" }, { "name": "proto3_optional", "number": 17, "type": 8, "label": 1 }], "enumType": [{ "name": "Type", "value": [{ "name": "TYPE_DOUBLE", "number": 1 }, { "name": "TYPE_FLOAT", "number": 2 }, { "name": "TYPE_INT64", "number": 3 }, { "name": "TYPE_UINT64", "number": 4 }, { "name": "TYPE_INT32", "number": 5 }, { "name": "TYPE_FIXED64", "number": 6 }, { "name": "TYPE_FIXED32", "number": 7 }, { "name": "TYPE_BOOL", "number": 8 }, { "name": "TYPE_STRING", "number": 9 }, { "name": "TYPE_GROUP", "number": 10 }, { "name": "TYPE_MESSAGE", "number": 11 }, { "name": "TYPE_BYTES", "number": 12 }, { "name": "TYPE_UINT32", "number": 13 }, { "name": "TYPE_ENUM", "number": 14 }, { "name": "TYPE_SFIXED32", "number": 15 }, { "name": "TYPE_SFIXED64", "number": 16 }, { "name": "TYPE_SINT32", "number": 17 }, { "name": "TYPE_SINT64", "number": 18 }] }, { "name": "Label", "value": [{ "name": "LABEL_OPTIONAL", "number": 1 }, { "name": "LABEL_REPEATED", "number": 3 }, { "name": "LABEL_REQUIRED", "number": 2 }] }] }, { "name": "OneofDescriptorProto", "field": [{ "name": "name", "number": 1, "type": 9, "label": 1 }, { "name": "options", "number": 2, "type": 11, "label": 1, "typeName": ".google.protobuf.OneofOptions" }] }, { "name": "EnumDescriptorProto", "field": [{ "name": "name", "number": 1, "type": 9, "label": 1 }, { "name": "value", "number": 2, "type": 11, "label": 3, "typeName": ".google.protobuf.EnumValueDescriptorProto" }, { "name": "options", "number": 3, "type": 11, "label": 1, "typeName": ".google.protobuf.EnumOptions" }, { "name": "reserved_range", "number": 4, "type": 11, "label": 3, "typeName": ".google.protobuf.EnumDescriptorProto.EnumReservedRange" }, { "name": "reserved_name", "number": 5, "type": 9, "label": 3 }, { "name": "visibility", "number": 6, "type": 14, "label": 1, "typeName": ".google.protobuf.SymbolVisibility" }], "nestedType": [{ "name": "EnumReservedRange", "field": [{ "name": "start", "number": 1, "type": 5, "label": 1 }, { "name": "end", "number": 2, "type": 5, "label": 1 }] }] }, { "name": "EnumValueDescriptorProto", "field": [{ "name": "name", "number": 1, "type": 9, "label": 1 }, { "name": "number", "number": 2, "type": 5, "label": 1 }, { "name": "options", "number": 3, "type": 11, "label": 1, "typeName": ".google.protobuf.EnumValueOptions" }] }, { "name": "ServiceDescriptorProto", "field": [{ "name": "name", "number": 1, "type": 9, "label": 1 }, { "name": "method", "number": 2, "type": 11, "label": 3, "typeName": ".google.protobuf.MethodDescriptorProto" }, { "name": "options", "number": 3, "type": 11, "label": 1, "typeName": ".google.protobuf.ServiceOptions" }] }, { "name": "MethodDescriptorProto", "field": [{ "name": "name", "number": 1, "type": 9, "label": 1 }, { "name": "input_type", "number": 2, "type": 9, "label": 1 }, { "name": "output_type", "number": 3, "type": 9, "label": 1 }, { "name": "options", "number": 4, "type": 11, "label": 1, "typeName": ".google.protobuf.MethodOptions" }, { "name": "client_streaming", "number": 5, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "server_streaming", "number": 6, "type": 8, "label": 1, "defaultValue": "false" }] }, { "name": "FileOptions", "field": [{ "name": "java_package", "number": 1, "type": 9, "label": 1 }, { "name": "java_outer_classname", "number": 8, "type": 9, "label": 1 }, { "name": "java_multiple_files", "number": 10, "type": 8, "label": 1, "defaultValue": "false", "options": {} }, { "name": "java_generate_equals_and_hash", "number": 20, "type": 8, "label": 1, "options": { "deprecated": true } }, { "name": "java_string_check_utf8", "number": 27, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "optimize_for", "number": 9, "type": 14, "label": 1, "typeName": ".google.protobuf.FileOptions.OptimizeMode", "defaultValue": "SPEED" }, { "name": "go_package", "number": 11, "type": 9, "label": 1 }, { "name": "cc_generic_services", "number": 16, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "java_generic_services", "number": 17, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "py_generic_services", "number": 18, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "deprecated", "number": 23, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "cc_enable_arenas", "number": 31, "type": 8, "label": 1, "defaultValue": "true" }, { "name": "objc_class_prefix", "number": 36, "type": 9, "label": 1 }, { "name": "csharp_namespace", "number": 37, "type": 9, "label": 1 }, { "name": "swift_prefix", "number": 39, "type": 9, "label": 1 }, { "name": "php_class_prefix", "number": 40, "type": 9, "label": 1 }, { "name": "php_namespace", "number": 41, "type": 9, "label": 1 }, { "name": "php_metadata_namespace", "number": 44, "type": 9, "label": 1 }, { "name": "ruby_package", "number": 45, "type": 9, "label": 1 }, { "name": "features", "number": 50, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "uninterpreted_option", "number": 999, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption" }], "enumType": [{ "name": "OptimizeMode", "value": [{ "name": "SPEED", "number": 1 }, { "name": "CODE_SIZE", "number": 2 }, { "name": "LITE_RUNTIME", "number": 3 }] }], "extensionRange": [{ "start": 1000, "end": 536870912 }] }, { "name": "MessageOptions", "field": [{ "name": "message_set_wire_format", "number": 1, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "no_standard_descriptor_accessor", "number": 2, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "deprecated", "number": 3, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "map_entry", "number": 7, "type": 8, "label": 1 }, { "name": "deprecated_legacy_json_field_conflicts", "number": 11, "type": 8, "label": 1, "options": { "deprecated": true } }, { "name": "features", "number": 12, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "uninterpreted_option", "number": 999, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption" }], "extensionRange": [{ "start": 1000, "end": 536870912 }] }, { "name": "FieldOptions", "field": [{ "name": "ctype", "number": 1, "type": 14, "label": 1, "typeName": ".google.protobuf.FieldOptions.CType", "defaultValue": "STRING" }, { "name": "packed", "number": 2, "type": 8, "label": 1 }, { "name": "jstype", "number": 6, "type": 14, "label": 1, "typeName": ".google.protobuf.FieldOptions.JSType", "defaultValue": "JS_NORMAL" }, { "name": "lazy", "number": 5, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "unverified_lazy", "number": 15, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "deprecated", "number": 3, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "weak", "number": 10, "type": 8, "label": 1, "defaultValue": "false", "options": { "deprecated": true } }, { "name": "debug_redact", "number": 16, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "retention", "number": 17, "type": 14, "label": 1, "typeName": ".google.protobuf.FieldOptions.OptionRetention" }, { "name": "targets", "number": 19, "type": 14, "label": 3, "typeName": ".google.protobuf.FieldOptions.OptionTargetType" }, { "name": "edition_defaults", "number": 20, "type": 11, "label": 3, "typeName": ".google.protobuf.FieldOptions.EditionDefault" }, { "name": "features", "number": 21, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "feature_support", "number": 22, "type": 11, "label": 1, "typeName": ".google.protobuf.FieldOptions.FeatureSupport" }, { "name": "uninterpreted_option", "number": 999, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption" }], "nestedType": [{ "name": "EditionDefault", "field": [{ "name": "edition", "number": 3, "type": 14, "label": 1, "typeName": ".google.protobuf.Edition" }, { "name": "value", "number": 2, "type": 9, "label": 1 }] }, { "name": "FeatureSupport", "field": [{ "name": "edition_introduced", "number": 1, "type": 14, "label": 1, "typeName": ".google.protobuf.Edition" }, { "name": "edition_deprecated", "number": 2, "type": 14, "label": 1, "typeName": ".google.protobuf.Edition" }, { "name": "deprecation_warning", "number": 3, "type": 9, "label": 1 }, { "name": "edition_removed", "number": 4, "type": 14, "label": 1, "typeName": ".google.protobuf.Edition" }, { "name": "removal_error", "number": 5, "type": 9, "label": 1 }] }], "enumType": [{ "name": "CType", "value": [{ "name": "STRING", "number": 0 }, { "name": "CORD", "number": 1 }, { "name": "STRING_PIECE", "number": 2 }] }, { "name": "JSType", "value": [{ "name": "JS_NORMAL", "number": 0 }, { "name": "JS_STRING", "number": 1 }, { "name": "JS_NUMBER", "number": 2 }] }, { "name": "OptionRetention", "value": [{ "name": "RETENTION_UNKNOWN", "number": 0 }, { "name": "RETENTION_RUNTIME", "number": 1 }, { "name": "RETENTION_SOURCE", "number": 2 }] }, { "name": "OptionTargetType", "value": [{ "name": "TARGET_TYPE_UNKNOWN", "number": 0 }, { "name": "TARGET_TYPE_FILE", "number": 1 }, { "name": "TARGET_TYPE_EXTENSION_RANGE", "number": 2 }, { "name": "TARGET_TYPE_MESSAGE", "number": 3 }, { "name": "TARGET_TYPE_FIELD", "number": 4 }, { "name": "TARGET_TYPE_ONEOF", "number": 5 }, { "name": "TARGET_TYPE_ENUM", "number": 6 }, { "name": "TARGET_TYPE_ENUM_ENTRY", "number": 7 }, { "name": "TARGET_TYPE_SERVICE", "number": 8 }, { "name": "TARGET_TYPE_METHOD", "number": 9 }] }], "extensionRange": [{ "start": 1000, "end": 536870912 }] }, { "name": "OneofOptions", "field": [{ "name": "features", "number": 1, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "uninterpreted_option", "number": 999, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption" }], "extensionRange": [{ "start": 1000, "end": 536870912 }] }, { "name": "EnumOptions", "field": [{ "name": "allow_alias", "number": 2, "type": 8, "label": 1 }, { "name": "deprecated", "number": 3, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "deprecated_legacy_json_field_conflicts", "number": 6, "type": 8, "label": 1, "options": { "deprecated": true } }, { "name": "features", "number": 7, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "uninterpreted_option", "number": 999, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption" }], "extensionRange": [{ "start": 1000, "end": 536870912 }] }, { "name": "EnumValueOptions", "field": [{ "name": "deprecated", "number": 1, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "features", "number": 2, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "debug_redact", "number": 3, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "feature_support", "number": 4, "type": 11, "label": 1, "typeName": ".google.protobuf.FieldOptions.FeatureSupport" }, { "name": "uninterpreted_option", "number": 999, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption" }], "extensionRange": [{ "start": 1000, "end": 536870912 }] }, { "name": "ServiceOptions", "field": [{ "name": "features", "number": 34, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "deprecated", "number": 33, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "uninterpreted_option", "number": 999, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption" }], "extensionRange": [{ "start": 1000, "end": 536870912 }] }, { "name": "MethodOptions", "field": [{ "name": "deprecated", "number": 33, "type": 8, "label": 1, "defaultValue": "false" }, { "name": "idempotency_level", "number": 34, "type": 14, "label": 1, "typeName": ".google.protobuf.MethodOptions.IdempotencyLevel", "defaultValue": "IDEMPOTENCY_UNKNOWN" }, { "name": "features", "number": 35, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "uninterpreted_option", "number": 999, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption" }], "enumType": [{ "name": "IdempotencyLevel", "value": [{ "name": "IDEMPOTENCY_UNKNOWN", "number": 0 }, { "name": "NO_SIDE_EFFECTS", "number": 1 }, { "name": "IDEMPOTENT", "number": 2 }] }], "extensionRange": [{ "start": 1000, "end": 536870912 }] }, { "name": "UninterpretedOption", "field": [{ "name": "name", "number": 2, "type": 11, "label": 3, "typeName": ".google.protobuf.UninterpretedOption.NamePart" }, { "name": "identifier_value", "number": 3, "type": 9, "label": 1 }, { "name": "positive_int_value", "number": 4, "type": 4, "label": 1 }, { "name": "negative_int_value", "number": 5, "type": 3, "label": 1 }, { "name": "double_value", "number": 6, "type": 1, "label": 1 }, { "name": "string_value", "number": 7, "type": 12, "label": 1 }, { "name": "aggregate_value", "number": 8, "type": 9, "label": 1 }], "nestedType": [{ "name": "NamePart", "field": [{ "name": "name_part", "number": 1, "type": 9, "label": 2 }, { "name": "is_extension", "number": 2, "type": 8, "label": 2 }] }] }, { "name": "FeatureSet", "field": [{ "name": "field_presence", "number": 1, "type": 14, "label": 1, "typeName": ".google.protobuf.FeatureSet.FieldPresence", "options": { "retention": 1, "targets": [4, 1], "editionDefaults": [{ "value": "EXPLICIT", "edition": 900 }, { "value": "IMPLICIT", "edition": 999 }, { "value": "EXPLICIT", "edition": 1000 }] } }, { "name": "enum_type", "number": 2, "type": 14, "label": 1, "typeName": ".google.protobuf.FeatureSet.EnumType", "options": { "retention": 1, "targets": [6, 1], "editionDefaults": [{ "value": "CLOSED", "edition": 900 }, { "value": "OPEN", "edition": 999 }] } }, { "name": "repeated_field_encoding", "number": 3, "type": 14, "label": 1, "typeName": ".google.protobuf.FeatureSet.RepeatedFieldEncoding", "options": { "retention": 1, "targets": [4, 1], "editionDefaults": [{ "value": "EXPANDED", "edition": 900 }, { "value": "PACKED", "edition": 999 }] } }, { "name": "utf8_validation", "number": 4, "type": 14, "label": 1, "typeName": ".google.protobuf.FeatureSet.Utf8Validation", "options": { "retention": 1, "targets": [4, 1], "editionDefaults": [{ "value": "NONE", "edition": 900 }, { "value": "VERIFY", "edition": 999 }] } }, { "name": "message_encoding", "number": 5, "type": 14, "label": 1, "typeName": ".google.protobuf.FeatureSet.MessageEncoding", "options": { "retention": 1, "targets": [4, 1], "editionDefaults": [{ "value": "LENGTH_PREFIXED", "edition": 900 }] } }, { "name": "json_format", "number": 6, "type": 14, "label": 1, "typeName": ".google.protobuf.FeatureSet.JsonFormat", "options": { "retention": 1, "targets": [3, 6, 1], "editionDefaults": [{ "value": "LEGACY_BEST_EFFORT", "edition": 900 }, { "value": "ALLOW", "edition": 999 }] } }, { "name": "enforce_naming_style", "number": 7, "type": 14, "label": 1, "typeName": ".google.protobuf.FeatureSet.EnforceNamingStyle", "options": { "retention": 2, "targets": [1, 2, 3, 4, 5, 6, 7, 8, 9], "editionDefaults": [{ "value": "STYLE_LEGACY", "edition": 900 }, { "value": "STYLE2024", "edition": 1001 }] } }, { "name": "default_symbol_visibility", "number": 8, "type": 14, "label": 1, "typeName": ".google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility", "options": { "retention": 2, "targets": [1], "editionDefaults": [{ "value": "EXPORT_ALL", "edition": 900 }, { "value": "EXPORT_TOP_LEVEL", "edition": 1001 }] } }], "nestedType": [{ "name": "VisibilityFeature", "enumType": [{ "name": "DefaultSymbolVisibility", "value": [{ "name": "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN", "number": 0 }, { "name": "EXPORT_ALL", "number": 1 }, { "name": "EXPORT_TOP_LEVEL", "number": 2 }, { "name": "LOCAL_ALL", "number": 3 }, { "name": "STRICT", "number": 4 }] }] }], "enumType": [{ "name": "FieldPresence", "value": [{ "name": "FIELD_PRESENCE_UNKNOWN", "number": 0 }, { "name": "EXPLICIT", "number": 1 }, { "name": "IMPLICIT", "number": 2 }, { "name": "LEGACY_REQUIRED", "number": 3 }] }, { "name": "EnumType", "value": [{ "name": "ENUM_TYPE_UNKNOWN", "number": 0 }, { "name": "OPEN", "number": 1 }, { "name": "CLOSED", "number": 2 }] }, { "name": "RepeatedFieldEncoding", "value": [{ "name": "REPEATED_FIELD_ENCODING_UNKNOWN", "number": 0 }, { "name": "PACKED", "number": 1 }, { "name": "EXPANDED", "number": 2 }] }, { "name": "Utf8Validation", "value": [{ "name": "UTF8_VALIDATION_UNKNOWN", "number": 0 }, { "name": "VERIFY", "number": 2 }, { "name": "NONE", "number": 3 }] }, { "name": "MessageEncoding", "value": [{ "name": "MESSAGE_ENCODING_UNKNOWN", "number": 0 }, { "name": "LENGTH_PREFIXED", "number": 1 }, { "name": "DELIMITED", "number": 2 }] }, { "name": "JsonFormat", "value": [{ "name": "JSON_FORMAT_UNKNOWN", "number": 0 }, { "name": "ALLOW", "number": 1 }, { "name": "LEGACY_BEST_EFFORT", "number": 2 }] }, { "name": "EnforceNamingStyle", "value": [{ "name": "ENFORCE_NAMING_STYLE_UNKNOWN", "number": 0 }, { "name": "STYLE2024", "number": 1 }, { "name": "STYLE_LEGACY", "number": 2 }] }], "extensionRange": [{ "start": 1000, "end": 9995 }, { "start": 9995, "end": 10000 }, { "start": 10000, "end": 10001 }] }, { "name": "FeatureSetDefaults", "field": [{ "name": "defaults", "number": 1, "type": 11, "label": 3, "typeName": ".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault" }, { "name": "minimum_edition", "number": 4, "type": 14, "label": 1, "typeName": ".google.protobuf.Edition" }, { "name": "maximum_edition", "number": 5, "type": 14, "label": 1, "typeName": ".google.protobuf.Edition" }], "nestedType": [{ "name": "FeatureSetEditionDefault", "field": [{ "name": "edition", "number": 3, "type": 14, "label": 1, "typeName": ".google.protobuf.Edition" }, { "name": "overridable_features", "number": 4, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }, { "name": "fixed_features", "number": 5, "type": 11, "label": 1, "typeName": ".google.protobuf.FeatureSet" }] }] }, { "name": "SourceCodeInfo", "field": [{ "name": "location", "number": 1, "type": 11, "label": 3, "typeName": ".google.protobuf.SourceCodeInfo.Location" }], "nestedType": [{ "name": "Location", "field": [{ "name": "path", "number": 1, "type": 5, "label": 3, "options": { "packed": true } }, { "name": "span", "number": 2, "type": 5, "label": 3, "options": { "packed": true } }, { "name": "leading_comments", "number": 3, "type": 9, "label": 1 }, { "name": "trailing_comments", "number": 4, "type": 9, "label": 1 }, { "name": "leading_detached_comments", "number": 6, "type": 9, "label": 3 }] }], "extensionRange": [{ "start": 536000000, "end": 536000001 }] }, { "name": "GeneratedCodeInfo", "field": [{ "name": "annotation", "number": 1, "type": 11, "label": 3, "typeName": ".google.protobuf.GeneratedCodeInfo.Annotation" }], "nestedType": [{ "name": "Annotation", "field": [{ "name": "path", "number": 1, "type": 5, "label": 3, "options": { "packed": true } }, { "name": "source_file", "number": 2, "type": 9, "label": 1 }, { "name": "begin", "number": 3, "type": 5, "label": 1 }, { "name": "end", "number": 4, "type": 5, "label": 1 }, { "name": "semantic", "number": 5, "type": 14, "label": 1, "typeName": ".google.protobuf.GeneratedCodeInfo.Annotation.Semantic" }], "enumType": [{ "name": "Semantic", "value": [{ "name": "NONE", "number": 0 }, { "name": "SET", "number": 1 }, { "name": "ALIAS", "number": 2 }] }] }] }], "enumType": [{ "name": "Edition", "value": [{ "name": "EDITION_UNKNOWN", "number": 0 }, { "name": "EDITION_LEGACY", "number": 900 }, { "name": "EDITION_PROTO2", "number": 998 }, { "name": "EDITION_PROTO3", "number": 999 }, { "name": "EDITION_2023", "number": 1000 }, { "name": "EDITION_2024", "number": 1001 }, { "name": "EDITION_UNSTABLE", "number": 9999 }, { "name": "EDITION_1_TEST_ONLY", "number": 1 }, { "name": "EDITION_2_TEST_ONLY", "number": 2 }, { "name": "EDITION_99997_TEST_ONLY", "number": 99997 }, { "name": "EDITION_99998_TEST_ONLY", "number": 99998 }, { "name": "EDITION_99999_TEST_ONLY", "number": 99999 }, { "name": "EDITION_MAX", "number": 2147483647 }] }, { "name": "SymbolVisibility", "value": [{ "name": "VISIBILITY_UNSET", "number": 0 }, { "name": "VISIBILITY_LOCAL", "number": 1 }, { "name": "VISIBILITY_EXPORT", "number": 2 }] }] }); | ||
| /** | ||
@@ -23,0 +23,0 @@ * Describes the message google.protobuf.FileDescriptorSet. |
@@ -120,20 +120,18 @@ import type { GenFile, GenMessage } from "../../../../codegenv2/types.js"; | ||
| * | ||
| * In order to reset a field's value to the default, the field must | ||
| * be in the mask and set to the default value in the provided resource. | ||
| * Hence, in order to reset all fields of a resource, provide a default | ||
| * instance of the resource and set all fields in the mask, or do | ||
| * not provide a mask as described below. | ||
| * Note that libraries which implement FieldMask resolution have various | ||
| * different behaviors in the face of empty masks or the special "*" mask. | ||
| * When implementing a service you should confirm these cases have the | ||
| * appropriate behavior in the underlying FieldMask library that you desire, | ||
| * and you may need to special case those cases in your application code if | ||
| * the underlying field mask library behavior differs from your intended | ||
| * service semantics. | ||
| * | ||
| * If a field mask is not present on update, the operation applies to | ||
| * all fields (as if a field mask of all fields has been specified). | ||
| * Note that in the presence of schema evolution, this may mean that | ||
| * fields the client does not know and has therefore not filled into | ||
| * the request will be reset to their default. If this is unwanted | ||
| * behavior, a specific service may require a client to always specify | ||
| * a field mask, producing an error if not. | ||
| * Update methods implementing https://google.aip.dev/134 | ||
| * - MUST support the special value * meaning "full replace" | ||
| * - MUST treat an omitted field mask as "replace fields which are present". | ||
| * | ||
| * As with get operations, the location of the resource which | ||
| * describes the updated values in the request message depends on the | ||
| * operation kind. In any case, the effect of the field mask is | ||
| * required to be honored by the API. | ||
| * Other methods implementing https://google.aip.dev/157 | ||
| * - SHOULD support the special value "*" to mean "get all". | ||
| * - MUST treat an omitted field mask to mean "get all", unless otherwise | ||
| * documented. | ||
| * | ||
@@ -332,20 +330,18 @@ * ## Considerations for HTTP REST | ||
| * | ||
| * In order to reset a field's value to the default, the field must | ||
| * be in the mask and set to the default value in the provided resource. | ||
| * Hence, in order to reset all fields of a resource, provide a default | ||
| * instance of the resource and set all fields in the mask, or do | ||
| * not provide a mask as described below. | ||
| * Note that libraries which implement FieldMask resolution have various | ||
| * different behaviors in the face of empty masks or the special "*" mask. | ||
| * When implementing a service you should confirm these cases have the | ||
| * appropriate behavior in the underlying FieldMask library that you desire, | ||
| * and you may need to special case those cases in your application code if | ||
| * the underlying field mask library behavior differs from your intended | ||
| * service semantics. | ||
| * | ||
| * If a field mask is not present on update, the operation applies to | ||
| * all fields (as if a field mask of all fields has been specified). | ||
| * Note that in the presence of schema evolution, this may mean that | ||
| * fields the client does not know and has therefore not filled into | ||
| * the request will be reset to their default. If this is unwanted | ||
| * behavior, a specific service may require a client to always specify | ||
| * a field mask, producing an error if not. | ||
| * Update methods implementing https://google.aip.dev/134 | ||
| * - MUST support the special value * meaning "full replace" | ||
| * - MUST treat an omitted field mask as "replace fields which are present". | ||
| * | ||
| * As with get operations, the location of the resource which | ||
| * describes the updated values in the request message depends on the | ||
| * operation kind. In any case, the effect of the field mask is | ||
| * required to be honored by the API. | ||
| * Other methods implementing https://google.aip.dev/157 | ||
| * - SHOULD support the special value "*" to mean "get all". | ||
| * - MUST treat an omitted field mask to mean "get all", unless otherwise | ||
| * documented. | ||
| * | ||
@@ -352,0 +348,0 @@ * ## Considerations for HTTP REST |
@@ -29,2 +29,6 @@ import type { GenEnum, GenExtension, GenFile, GenMessage } from "../../../../codegenv2/types.js"; | ||
| stripEnumPrefix: GoFeatures_StripEnumPrefix; | ||
| /** | ||
| * @generated from field: optional pb.GoFeatures.OptimizeModeFeature.OptimizeMode optimize_mode = 4; | ||
| */ | ||
| optimizeMode: GoFeatures_OptimizeModeFeature_OptimizeMode; | ||
| }; | ||
@@ -52,2 +56,6 @@ /** | ||
| stripEnumPrefix?: GoFeatures_StripEnumPrefixJson; | ||
| /** | ||
| * @generated from field: optional pb.GoFeatures.OptimizeModeFeature.OptimizeMode optimize_mode = 4; | ||
| */ | ||
| optimizeMode?: GoFeatures_OptimizeModeFeature_OptimizeModeJson; | ||
| }; | ||
@@ -62,2 +70,59 @@ /** | ||
| /** | ||
| * Wrap the OptimizeMode enum in a message for scoping: | ||
| * This way, users can type shorter names (SPEED, CODE_SIZE). | ||
| * | ||
| * @generated from message pb.GoFeatures.OptimizeModeFeature | ||
| */ | ||
| export type GoFeatures_OptimizeModeFeature = Message<"pb.GoFeatures.OptimizeModeFeature"> & {}; | ||
| /** | ||
| * Wrap the OptimizeMode enum in a message for scoping: | ||
| * This way, users can type shorter names (SPEED, CODE_SIZE). | ||
| * | ||
| * @generated from message pb.GoFeatures.OptimizeModeFeature | ||
| */ | ||
| export type GoFeatures_OptimizeModeFeatureJson = {}; | ||
| /** | ||
| * Describes the message pb.GoFeatures.OptimizeModeFeature. | ||
| * Use `create(GoFeatures_OptimizeModeFeatureSchema)` to create a new message. | ||
| */ | ||
| export declare const GoFeatures_OptimizeModeFeatureSchema: GenMessage<GoFeatures_OptimizeModeFeature, { | ||
| jsonType: GoFeatures_OptimizeModeFeatureJson; | ||
| }>; | ||
| /** | ||
| * The name of this enum matches OptimizeMode in descriptor.proto. | ||
| * | ||
| * @generated from enum pb.GoFeatures.OptimizeModeFeature.OptimizeMode | ||
| */ | ||
| export declare enum GoFeatures_OptimizeModeFeature_OptimizeMode { | ||
| /** | ||
| * OPTIMIZE_MODE_UNSPECIFIED results in falling back to the default | ||
| * (optimize for code size), but needs to be a separate value to distinguish | ||
| * between an explicitly set optimize mode or a missing optimize mode. | ||
| * | ||
| * @generated from enum value: OPTIMIZE_MODE_UNSPECIFIED = 0; | ||
| */ | ||
| OPTIMIZE_MODE_UNSPECIFIED = 0, | ||
| /** | ||
| * @generated from enum value: SPEED = 1; | ||
| */ | ||
| SPEED = 1, | ||
| /** | ||
| * There is no enum entry for LITE_RUNTIME (descriptor.proto), | ||
| * because Go Protobuf does not have the concept of a lite runtime. | ||
| * | ||
| * @generated from enum value: CODE_SIZE = 2; | ||
| */ | ||
| CODE_SIZE = 2 | ||
| } | ||
| /** | ||
| * The name of this enum matches OptimizeMode in descriptor.proto. | ||
| * | ||
| * @generated from enum pb.GoFeatures.OptimizeModeFeature.OptimizeMode | ||
| */ | ||
| export type GoFeatures_OptimizeModeFeature_OptimizeModeJson = "OPTIMIZE_MODE_UNSPECIFIED" | "SPEED" | "CODE_SIZE"; | ||
| /** | ||
| * Describes the enum pb.GoFeatures.OptimizeModeFeature.OptimizeMode. | ||
| */ | ||
| export declare const GoFeatures_OptimizeModeFeature_OptimizeModeSchema: GenEnum<GoFeatures_OptimizeModeFeature_OptimizeMode, GoFeatures_OptimizeModeFeature_OptimizeModeJson>; | ||
| /** | ||
| * @generated from enum pb.GoFeatures.APILevel | ||
@@ -64,0 +129,0 @@ */ |
@@ -22,3 +22,3 @@ // Copyright 2021-2026 Buf Technologies, Inc. | ||
| */ | ||
| export const file_google_protobuf_go_features = /*@__PURE__*/ fileDesc("CiFnb29nbGUvcHJvdG9idWYvZ29fZmVhdHVyZXMucHJvdG8SAnBiIvcECgpHb0ZlYXR1cmVzEqUBChpsZWdhY3lfdW5tYXJzaGFsX2pzb25fZW51bRgBIAEoCEKAAYgBAZgBBpgBAaIBCRIEdHJ1ZRiEB6IBChIFZmFsc2UY5weyAVsI6AcQ6AcaU1RoZSBsZWdhY3kgVW5tYXJzaGFsSlNPTiBBUEkgaXMgZGVwcmVjYXRlZCBhbmQgd2lsbCBiZSByZW1vdmVkIGluIGEgZnV0dXJlIGVkaXRpb24uEmoKCWFwaV9sZXZlbBgCIAEoDjIXLnBiLkdvRmVhdHVyZXMuQVBJTGV2ZWxCPogBAZgBA5gBAaIBGhIVQVBJX0xFVkVMX1VOU1BFQ0lGSUVEGIQHogEPEgpBUElfT1BBUVVFGOkHsgEDCOgHEmsKEXN0cmlwX2VudW1fcHJlZml4GAMgASgOMh4ucGIuR29GZWF0dXJlcy5TdHJpcEVudW1QcmVmaXhCMIgBAZgBBpgBB5gBAaIBGxIWU1RSSVBfRU5VTV9QUkVGSVhfS0VFUBiEB7IBAwjpByJTCghBUElMZXZlbBIZChVBUElfTEVWRUxfVU5TUEVDSUZJRUQQABIMCghBUElfT1BFThABEg4KCkFQSV9IWUJSSUQQAhIOCgpBUElfT1BBUVVFEAMikgEKD1N0cmlwRW51bVByZWZpeBIhCh1TVFJJUF9FTlVNX1BSRUZJWF9VTlNQRUNJRklFRBAAEhoKFlNUUklQX0VOVU1fUFJFRklYX0tFRVAQARIjCh9TVFJJUF9FTlVNX1BSRUZJWF9HRU5FUkFURV9CT1RIEAISGwoXU1RSSVBfRU5VTV9QUkVGSVhfU1RSSVAQAzo8CgJnbxIbLmdvb2dsZS5wcm90b2J1Zi5GZWF0dXJlU2V0GOoHIAEoCzIOLnBiLkdvRmVhdHVyZXNSAmdvQi9aLWdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2dvZmVhdHVyZXNwYg", [file_google_protobuf_descriptor]); | ||
| export const file_google_protobuf_go_features = /*@__PURE__*/ fileDesc("CiFnb29nbGUvcHJvdG9idWYvZ29fZmVhdHVyZXMucHJvdG8SAnBiItEGCgpHb0ZlYXR1cmVzEqUBChpsZWdhY3lfdW5tYXJzaGFsX2pzb25fZW51bRgBIAEoCEKAAYgBAZgBBpgBAaIBCRIEdHJ1ZRiEB6IBChIFZmFsc2UY5weyAVsI6AcQ6AcaU1RoZSBsZWdhY3kgVW5tYXJzaGFsSlNPTiBBUEkgaXMgZGVwcmVjYXRlZCBhbmQgd2lsbCBiZSByZW1vdmVkIGluIGEgZnV0dXJlIGVkaXRpb24uEmoKCWFwaV9sZXZlbBgCIAEoDjIXLnBiLkdvRmVhdHVyZXMuQVBJTGV2ZWxCPogBAZgBA5gBAaIBGhIVQVBJX0xFVkVMX1VOU1BFQ0lGSUVEGIQHogEPEgpBUElfT1BBUVVFGOkHsgEDCOgHEmsKEXN0cmlwX2VudW1fcHJlZml4GAMgASgOMh4ucGIuR29GZWF0dXJlcy5TdHJpcEVudW1QcmVmaXhCMIgBAZgBBpgBB5gBAaIBGxIWU1RSSVBfRU5VTV9QUkVGSVhfS0VFUBiEB7IBAwjpBxJ4Cg1vcHRpbWl6ZV9tb2RlGAQgASgOMi8ucGIuR29GZWF0dXJlcy5PcHRpbWl6ZU1vZGVGZWF0dXJlLk9wdGltaXplTW9kZUIwiAEBmAEDmAEBogEeEhlPUFRJTUlaRV9NT0RFX1VOU1BFQ0lGSUVEGIQHsgEDCOkHGl4KE09wdGltaXplTW9kZUZlYXR1cmUiRwoMT3B0aW1pemVNb2RlEh0KGU9QVElNSVpFX01PREVfVU5TUEVDSUZJRUQQABIJCgVTUEVFRBABEg0KCUNPREVfU0laRRACIlMKCEFQSUxldmVsEhkKFUFQSV9MRVZFTF9VTlNQRUNJRklFRBAAEgwKCEFQSV9PUEVOEAESDgoKQVBJX0hZQlJJRBACEg4KCkFQSV9PUEFRVUUQAyKSAQoPU3RyaXBFbnVtUHJlZml4EiEKHVNUUklQX0VOVU1fUFJFRklYX1VOU1BFQ0lGSUVEEAASGgoWU1RSSVBfRU5VTV9QUkVGSVhfS0VFUBABEiMKH1NUUklQX0VOVU1fUFJFRklYX0dFTkVSQVRFX0JPVEgQAhIbChdTVFJJUF9FTlVNX1BSRUZJWF9TVFJJUBADOjwKAmdvEhsuZ29vZ2xlLnByb3RvYnVmLkZlYXR1cmVTZXQY6gcgASgLMg4ucGIuR29GZWF0dXJlc1ICZ29CL1otZ29vZ2xlLmdvbGFuZy5vcmcvcHJvdG9idWYvdHlwZXMvZ29mZWF0dXJlc3Bi", [file_google_protobuf_descriptor]); | ||
| /** | ||
@@ -30,2 +30,38 @@ * Describes the message pb.GoFeatures. | ||
| /** | ||
| * Describes the message pb.GoFeatures.OptimizeModeFeature. | ||
| * Use `create(GoFeatures_OptimizeModeFeatureSchema)` to create a new message. | ||
| */ | ||
| export const GoFeatures_OptimizeModeFeatureSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_go_features, 0, 0); | ||
| /** | ||
| * The name of this enum matches OptimizeMode in descriptor.proto. | ||
| * | ||
| * @generated from enum pb.GoFeatures.OptimizeModeFeature.OptimizeMode | ||
| */ | ||
| export var GoFeatures_OptimizeModeFeature_OptimizeMode; | ||
| (function (GoFeatures_OptimizeModeFeature_OptimizeMode) { | ||
| /** | ||
| * OPTIMIZE_MODE_UNSPECIFIED results in falling back to the default | ||
| * (optimize for code size), but needs to be a separate value to distinguish | ||
| * between an explicitly set optimize mode or a missing optimize mode. | ||
| * | ||
| * @generated from enum value: OPTIMIZE_MODE_UNSPECIFIED = 0; | ||
| */ | ||
| GoFeatures_OptimizeModeFeature_OptimizeMode[GoFeatures_OptimizeModeFeature_OptimizeMode["OPTIMIZE_MODE_UNSPECIFIED"] = 0] = "OPTIMIZE_MODE_UNSPECIFIED"; | ||
| /** | ||
| * @generated from enum value: SPEED = 1; | ||
| */ | ||
| GoFeatures_OptimizeModeFeature_OptimizeMode[GoFeatures_OptimizeModeFeature_OptimizeMode["SPEED"] = 1] = "SPEED"; | ||
| /** | ||
| * There is no enum entry for LITE_RUNTIME (descriptor.proto), | ||
| * because Go Protobuf does not have the concept of a lite runtime. | ||
| * | ||
| * @generated from enum value: CODE_SIZE = 2; | ||
| */ | ||
| GoFeatures_OptimizeModeFeature_OptimizeMode[GoFeatures_OptimizeModeFeature_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; | ||
| })(GoFeatures_OptimizeModeFeature_OptimizeMode || (GoFeatures_OptimizeModeFeature_OptimizeMode = {})); | ||
| /** | ||
| * Describes the enum pb.GoFeatures.OptimizeModeFeature.OptimizeMode. | ||
| */ | ||
| export const GoFeatures_OptimizeModeFeature_OptimizeModeSchema = /*@__PURE__*/ enumDesc(file_google_protobuf_go_features, 0, 0, 0); | ||
| /** | ||
| * @generated from enum pb.GoFeatures.APILevel | ||
@@ -32,0 +68,0 @@ */ |
@@ -80,4 +80,4 @@ import type { GenFile, GenMessage } from "../../../../codegenv2/types.js"; | ||
| * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone | ||
| * is required. A proto3 JSON serializer should always use UTC (as indicated by | ||
| * "Z") when printing the Timestamp type and a proto3 JSON parser should be | ||
| * is required. A ProtoJSON serializer should always use UTC (as indicated by | ||
| * "Z") when printing the Timestamp type and a ProtoJSON parser should be | ||
| * able to accept both UTC and other timezones (as indicated by an offset). | ||
@@ -105,3 +105,3 @@ * | ||
| * Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must | ||
| * be between -315576000000 and 315576000000 inclusive (which corresponds to | ||
| * be between -62135596800 and 253402300799 inclusive (which corresponds to | ||
| * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). | ||
@@ -196,4 +196,4 @@ * | ||
| * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone | ||
| * is required. A proto3 JSON serializer should always use UTC (as indicated by | ||
| * "Z") when printing the Timestamp type and a proto3 JSON parser should be | ||
| * is required. A ProtoJSON serializer should always use UTC (as indicated by | ||
| * "Z") when printing the Timestamp type and a ProtoJSON parser should be | ||
| * able to accept both UTC and other timezones (as indicated by an offset). | ||
@@ -200,0 +200,0 @@ * |
@@ -49,3 +49,3 @@ import type { GenEnum, GenFile, GenMessage } from "../../../../codegenv2/types.js"; | ||
| */ | ||
| sourceContext?: SourceContext; | ||
| sourceContext?: SourceContext | undefined; | ||
| /** | ||
@@ -486,3 +486,3 @@ * The source syntax. | ||
| */ | ||
| sourceContext?: SourceContext; | ||
| sourceContext?: SourceContext | undefined; | ||
| /** | ||
@@ -651,3 +651,3 @@ * The source syntax. | ||
| */ | ||
| value?: Any; | ||
| value?: Any | undefined; | ||
| }; | ||
@@ -654,0 +654,0 @@ /** |
@@ -16,1 +16,11 @@ import type { Message } from "../types.js"; | ||
| export declare function isWrapperDesc(messageDesc: DescMessage): messageDesc is WktWrapperDesc; | ||
| /** | ||
| * Returns true if the descriptor is a well-known type with a custom JSON | ||
| * representation per the protobuf JSON spec. Examples: Timestamp as an | ||
| * RFC 3339 string, Duration as "5s", wrappers as the unwrapped scalar. | ||
| * | ||
| * When packed inside `google.protobuf.Any`, these messages are serialized | ||
| * as `{"@type": ..., "value": <custom form>}`; all other messages embed | ||
| * their fields directly. | ||
| */ | ||
| export declare function hasCustomJsonRepresentation(desc: DescMessage): boolean; |
@@ -25,2 +25,25 @@ // Copyright 2021-2026 Buf Technologies, Inc. | ||
| } | ||
| /** | ||
| * Returns true if the descriptor is a well-known type with a custom JSON | ||
| * representation per the protobuf JSON spec. Examples: Timestamp as an | ||
| * RFC 3339 string, Duration as "5s", wrappers as the unwrapped scalar. | ||
| * | ||
| * When packed inside `google.protobuf.Any`, these messages are serialized | ||
| * as `{"@type": ..., "value": <custom form>}`; all other messages embed | ||
| * their fields directly. | ||
| */ | ||
| export function hasCustomJsonRepresentation(desc) { | ||
| switch (desc.typeName) { | ||
| case "google.protobuf.Any": | ||
| case "google.protobuf.Timestamp": | ||
| case "google.protobuf.Duration": | ||
| case "google.protobuf.FieldMask": | ||
| case "google.protobuf.Struct": | ||
| case "google.protobuf.Value": | ||
| case "google.protobuf.ListValue": | ||
| return true; | ||
| default: | ||
| return isWrapperDesc(desc); | ||
| } | ||
| } | ||
| function isWrapperTypeName(name) { | ||
@@ -27,0 +50,0 @@ return (name.startsWith("google.protobuf.") && |
+1
-1
| { | ||
| "name": "@bufbuild/protobuf", | ||
| "version": "2.11.0", | ||
| "version": "2.12.0", | ||
| "license": "(Apache-2.0 AND BSD-3-Clause)", | ||
@@ -5,0 +5,0 @@ "description": "A complete implementation of Protocol Buffers in TypeScript, suitable for web browsers and Node.js.", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1610006
1.2%41883
0.94%71
-2.74%