@bufbuild/protobuf 2.2.5 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/cjs/clone.js +4 -6
  2. package/dist/cjs/codegenv1/boot.js +1 -1
  3. package/dist/cjs/codegenv1/embed.js +0 -1
  4. package/dist/cjs/codegenv1/file.js +1 -1
  5. package/dist/cjs/codegenv1/symbols.js +4 -1
  6. package/dist/cjs/create.js +0 -1
  7. package/dist/cjs/equals.js +2 -1
  8. package/dist/cjs/extensions.js +1 -1
  9. package/dist/cjs/from-binary.js +5 -3
  10. package/dist/cjs/from-json.js +8 -10
  11. package/dist/cjs/proto-int64.js +4 -1
  12. package/dist/cjs/reflect/guard.js +2 -1
  13. package/dist/cjs/reflect/index.d.ts +1 -0
  14. package/dist/cjs/reflect/index.js +1 -0
  15. package/dist/cjs/reflect/names.d.ts +8 -0
  16. package/dist/cjs/reflect/names.js +28 -0
  17. package/dist/cjs/reflect/nested-types.d.ts +23 -0
  18. package/dist/cjs/reflect/nested-types.js +40 -0
  19. package/dist/cjs/reflect/path.d.ts +107 -0
  20. package/dist/cjs/reflect/path.js +376 -0
  21. package/dist/cjs/reflect/reflect-check.js +3 -3
  22. package/dist/cjs/reflect/reflect-types.d.ts +1 -1
  23. package/dist/cjs/reflect/reflect.js +9 -7
  24. package/dist/cjs/reflect/scalar.js +4 -5
  25. package/dist/cjs/reflect/unsafe.d.ts +3 -6
  26. package/dist/cjs/reflect/unsafe.js +11 -10
  27. package/dist/cjs/registry.js +24 -30
  28. package/dist/cjs/to-binary.js +1 -1
  29. package/dist/cjs/to-json.d.ts +6 -0
  30. package/dist/cjs/to-json.js +16 -18
  31. package/dist/cjs/wire/base64-encoding.js +4 -3
  32. package/dist/cjs/wire/binary-encoding.js +7 -6
  33. package/dist/cjs/wire/text-encoding.js +1 -1
  34. package/dist/cjs/wire/text-format.js +3 -4
  35. package/dist/cjs/wire/varint.js +0 -1
  36. package/dist/cjs/wkt/gen/google/protobuf/cpp_features_pb.d.ts +89 -0
  37. package/dist/cjs/wkt/gen/google/protobuf/cpp_features_pb.js +60 -0
  38. package/dist/cjs/wkt/gen/google/protobuf/go_features_pb.d.ts +122 -0
  39. package/dist/cjs/wkt/gen/google/protobuf/go_features_pb.js +90 -0
  40. package/dist/cjs/wkt/gen/google/protobuf/java_features_pb.d.ts +113 -0
  41. package/dist/cjs/wkt/gen/google/protobuf/java_features_pb.js +67 -0
  42. package/dist/cjs/wkt/index.d.ts +4 -1
  43. package/dist/cjs/wkt/index.js +4 -1
  44. package/dist/esm/clone.js +4 -6
  45. package/dist/esm/codegenv1/boot.js +1 -1
  46. package/dist/esm/codegenv1/embed.js +0 -1
  47. package/dist/esm/codegenv1/file.js +1 -1
  48. package/dist/esm/codegenv1/symbols.js +4 -1
  49. package/dist/esm/create.js +0 -2
  50. package/dist/esm/equals.js +2 -1
  51. package/dist/esm/extensions.js +1 -1
  52. package/dist/esm/from-binary.js +5 -3
  53. package/dist/esm/from-json.js +8 -10
  54. package/dist/esm/proto-int64.js +4 -1
  55. package/dist/esm/reflect/guard.js +2 -1
  56. package/dist/esm/reflect/index.d.ts +1 -0
  57. package/dist/esm/reflect/index.js +1 -0
  58. package/dist/esm/reflect/names.d.ts +8 -0
  59. package/dist/esm/reflect/names.js +27 -0
  60. package/dist/esm/reflect/nested-types.d.ts +23 -0
  61. package/dist/esm/reflect/nested-types.js +39 -0
  62. package/dist/esm/reflect/path.d.ts +107 -0
  63. package/dist/esm/reflect/path.js +369 -0
  64. package/dist/esm/reflect/reflect-check.js +3 -3
  65. package/dist/esm/reflect/reflect-types.d.ts +1 -1
  66. package/dist/esm/reflect/reflect-types.js +0 -1
  67. package/dist/esm/reflect/reflect.js +9 -7
  68. package/dist/esm/reflect/scalar.js +4 -5
  69. package/dist/esm/reflect/unsafe.d.ts +3 -6
  70. package/dist/esm/reflect/unsafe.js +11 -10
  71. package/dist/esm/registry.js +24 -30
  72. package/dist/esm/to-binary.js +1 -1
  73. package/dist/esm/to-json.d.ts +6 -0
  74. package/dist/esm/to-json.js +16 -18
  75. package/dist/esm/wire/base64-encoding.js +4 -3
  76. package/dist/esm/wire/binary-encoding.js +7 -6
  77. package/dist/esm/wire/text-encoding.js +1 -1
  78. package/dist/esm/wire/text-format.js +3 -4
  79. package/dist/esm/wire/varint.js +0 -1
  80. package/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.d.ts +89 -0
  81. package/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.js +57 -0
  82. package/dist/esm/wkt/gen/google/protobuf/go_features_pb.d.ts +122 -0
  83. package/dist/esm/wkt/gen/google/protobuf/go_features_pb.js +87 -0
  84. package/dist/esm/wkt/gen/google/protobuf/java_features_pb.d.ts +113 -0
  85. package/dist/esm/wkt/gen/google/protobuf/java_features_pb.js +64 -0
  86. package/dist/esm/wkt/index.d.ts +4 -1
  87. package/dist/esm/wkt/index.js +4 -1
  88. package/package.json +9 -24
@@ -0,0 +1,122 @@
1
+ import type { GenEnum, GenExtension, GenFile, GenMessage } from "../../../../codegenv1/types.js";
2
+ import type { FeatureSet } from "./descriptor_pb.js";
3
+ import type { Message } from "../../../../types.js";
4
+ /**
5
+ * Describes the file google/protobuf/go_features.proto.
6
+ */
7
+ export declare const file_google_protobuf_go_features: GenFile;
8
+ /**
9
+ * @generated from message pb.GoFeatures
10
+ */
11
+ export type GoFeatures = Message<"pb.GoFeatures"> & {
12
+ /**
13
+ * Whether or not to generate the deprecated UnmarshalJSON method for enums.
14
+ * Can only be true for proto using the Open Struct api.
15
+ *
16
+ * @generated from field: optional bool legacy_unmarshal_json_enum = 1;
17
+ */
18
+ legacyUnmarshalJsonEnum: boolean;
19
+ /**
20
+ * One of OPEN, HYBRID or OPAQUE.
21
+ *
22
+ * @generated from field: optional pb.GoFeatures.APILevel api_level = 2;
23
+ */
24
+ apiLevel: GoFeatures_APILevel;
25
+ /**
26
+ * @generated from field: optional pb.GoFeatures.StripEnumPrefix strip_enum_prefix = 3;
27
+ */
28
+ stripEnumPrefix: GoFeatures_StripEnumPrefix;
29
+ };
30
+ /**
31
+ * @generated from message pb.GoFeatures
32
+ */
33
+ export type GoFeaturesJson = {
34
+ /**
35
+ * Whether or not to generate the deprecated UnmarshalJSON method for enums.
36
+ * Can only be true for proto using the Open Struct api.
37
+ *
38
+ * @generated from field: optional bool legacy_unmarshal_json_enum = 1;
39
+ */
40
+ legacyUnmarshalJsonEnum?: boolean;
41
+ /**
42
+ * One of OPEN, HYBRID or OPAQUE.
43
+ *
44
+ * @generated from field: optional pb.GoFeatures.APILevel api_level = 2;
45
+ */
46
+ apiLevel?: GoFeatures_APILevelJson;
47
+ /**
48
+ * @generated from field: optional pb.GoFeatures.StripEnumPrefix strip_enum_prefix = 3;
49
+ */
50
+ stripEnumPrefix?: GoFeatures_StripEnumPrefixJson;
51
+ };
52
+ /**
53
+ * Describes the message pb.GoFeatures.
54
+ * Use `create(GoFeaturesSchema)` to create a new message.
55
+ */
56
+ export declare const GoFeaturesSchema: GenMessage<GoFeatures, GoFeaturesJson>;
57
+ /**
58
+ * @generated from enum pb.GoFeatures.APILevel
59
+ */
60
+ export declare enum GoFeatures_APILevel {
61
+ /**
62
+ * API_LEVEL_UNSPECIFIED results in selecting the OPEN API,
63
+ * but needs to be a separate value to distinguish between
64
+ * an explicitly set api level or a missing api level.
65
+ *
66
+ * @generated from enum value: API_LEVEL_UNSPECIFIED = 0;
67
+ */
68
+ API_LEVEL_UNSPECIFIED = 0,
69
+ /**
70
+ * @generated from enum value: API_OPEN = 1;
71
+ */
72
+ API_OPEN = 1,
73
+ /**
74
+ * @generated from enum value: API_HYBRID = 2;
75
+ */
76
+ API_HYBRID = 2,
77
+ /**
78
+ * @generated from enum value: API_OPAQUE = 3;
79
+ */
80
+ API_OPAQUE = 3
81
+ }
82
+ /**
83
+ * @generated from enum pb.GoFeatures.APILevel
84
+ */
85
+ export type GoFeatures_APILevelJson = "API_LEVEL_UNSPECIFIED" | "API_OPEN" | "API_HYBRID" | "API_OPAQUE";
86
+ /**
87
+ * Describes the enum pb.GoFeatures.APILevel.
88
+ */
89
+ export declare const GoFeatures_APILevelSchema: GenEnum<GoFeatures_APILevel, GoFeatures_APILevelJson>;
90
+ /**
91
+ * @generated from enum pb.GoFeatures.StripEnumPrefix
92
+ */
93
+ export declare enum GoFeatures_StripEnumPrefix {
94
+ /**
95
+ * @generated from enum value: STRIP_ENUM_PREFIX_UNSPECIFIED = 0;
96
+ */
97
+ UNSPECIFIED = 0,
98
+ /**
99
+ * @generated from enum value: STRIP_ENUM_PREFIX_KEEP = 1;
100
+ */
101
+ KEEP = 1,
102
+ /**
103
+ * @generated from enum value: STRIP_ENUM_PREFIX_GENERATE_BOTH = 2;
104
+ */
105
+ GENERATE_BOTH = 2,
106
+ /**
107
+ * @generated from enum value: STRIP_ENUM_PREFIX_STRIP = 3;
108
+ */
109
+ STRIP = 3
110
+ }
111
+ /**
112
+ * @generated from enum pb.GoFeatures.StripEnumPrefix
113
+ */
114
+ export type GoFeatures_StripEnumPrefixJson = "STRIP_ENUM_PREFIX_UNSPECIFIED" | "STRIP_ENUM_PREFIX_KEEP" | "STRIP_ENUM_PREFIX_GENERATE_BOTH" | "STRIP_ENUM_PREFIX_STRIP";
115
+ /**
116
+ * Describes the enum pb.GoFeatures.StripEnumPrefix.
117
+ */
118
+ export declare const GoFeatures_StripEnumPrefixSchema: GenEnum<GoFeatures_StripEnumPrefix, GoFeatures_StripEnumPrefixJson>;
119
+ /**
120
+ * @generated from extension: optional pb.GoFeatures go = 1002;
121
+ */
122
+ export declare const go: GenExtension<FeatureSet, GoFeatures>;
@@ -0,0 +1,87 @@
1
+ // Copyright 2021-2025 Buf Technologies, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ import { fileDesc } from "../../../../codegenv1/file.js";
15
+ import { file_google_protobuf_descriptor } from "./descriptor_pb.js";
16
+ import { messageDesc } from "../../../../codegenv1/message.js";
17
+ import { enumDesc } from "../../../../codegenv1/enum.js";
18
+ import { extDesc } from "../../../../codegenv1/extension.js";
19
+ /**
20
+ * Describes the file google/protobuf/go_features.proto.
21
+ */
22
+ export const file_google_protobuf_go_features = /*@__PURE__*/ fileDesc("CiFnb29nbGUvcHJvdG9idWYvZ29fZmVhdHVyZXMucHJvdG8SAnBiIvcECgpHb0ZlYXR1cmVzEqUBChpsZWdhY3lfdW5tYXJzaGFsX2pzb25fZW51bRgBIAEoCEKAAYgBAZgBBpgBAaIBCRIEdHJ1ZRiEB6IBChIFZmFsc2UY5weyAVsI6AcQ6AcaU1RoZSBsZWdhY3kgVW5tYXJzaGFsSlNPTiBBUEkgaXMgZGVwcmVjYXRlZCBhbmQgd2lsbCBiZSByZW1vdmVkIGluIGEgZnV0dXJlIGVkaXRpb24uEmoKCWFwaV9sZXZlbBgCIAEoDjIXLnBiLkdvRmVhdHVyZXMuQVBJTGV2ZWxCPogBAZgBA5gBAaIBGhIVQVBJX0xFVkVMX1VOU1BFQ0lGSUVEGIQHogEPEgpBUElfT1BBUVVFGOkHsgEDCOgHEmsKEXN0cmlwX2VudW1fcHJlZml4GAMgASgOMh4ucGIuR29GZWF0dXJlcy5TdHJpcEVudW1QcmVmaXhCMIgBAZgBBpgBB5gBAaIBGxIWU1RSSVBfRU5VTV9QUkVGSVhfS0VFUBiEB7IBAwjpByJTCghBUElMZXZlbBIZChVBUElfTEVWRUxfVU5TUEVDSUZJRUQQABIMCghBUElfT1BFThABEg4KCkFQSV9IWUJSSUQQAhIOCgpBUElfT1BBUVVFEAMikgEKD1N0cmlwRW51bVByZWZpeBIhCh1TVFJJUF9FTlVNX1BSRUZJWF9VTlNQRUNJRklFRBAAEhoKFlNUUklQX0VOVU1fUFJFRklYX0tFRVAQARIjCh9TVFJJUF9FTlVNX1BSRUZJWF9HRU5FUkFURV9CT1RIEAISGwoXU1RSSVBfRU5VTV9QUkVGSVhfU1RSSVAQAzo8CgJnbxIbLmdvb2dsZS5wcm90b2J1Zi5GZWF0dXJlU2V0GOoHIAEoCzIOLnBiLkdvRmVhdHVyZXNSAmdvQi9aLWdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2dvZmVhdHVyZXNwYg", [file_google_protobuf_descriptor]);
23
+ /**
24
+ * Describes the message pb.GoFeatures.
25
+ * Use `create(GoFeaturesSchema)` to create a new message.
26
+ */
27
+ export const GoFeaturesSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_go_features, 0);
28
+ /**
29
+ * @generated from enum pb.GoFeatures.APILevel
30
+ */
31
+ export var GoFeatures_APILevel;
32
+ (function (GoFeatures_APILevel) {
33
+ /**
34
+ * API_LEVEL_UNSPECIFIED results in selecting the OPEN API,
35
+ * but needs to be a separate value to distinguish between
36
+ * an explicitly set api level or a missing api level.
37
+ *
38
+ * @generated from enum value: API_LEVEL_UNSPECIFIED = 0;
39
+ */
40
+ GoFeatures_APILevel[GoFeatures_APILevel["API_LEVEL_UNSPECIFIED"] = 0] = "API_LEVEL_UNSPECIFIED";
41
+ /**
42
+ * @generated from enum value: API_OPEN = 1;
43
+ */
44
+ GoFeatures_APILevel[GoFeatures_APILevel["API_OPEN"] = 1] = "API_OPEN";
45
+ /**
46
+ * @generated from enum value: API_HYBRID = 2;
47
+ */
48
+ GoFeatures_APILevel[GoFeatures_APILevel["API_HYBRID"] = 2] = "API_HYBRID";
49
+ /**
50
+ * @generated from enum value: API_OPAQUE = 3;
51
+ */
52
+ GoFeatures_APILevel[GoFeatures_APILevel["API_OPAQUE"] = 3] = "API_OPAQUE";
53
+ })(GoFeatures_APILevel || (GoFeatures_APILevel = {}));
54
+ /**
55
+ * Describes the enum pb.GoFeatures.APILevel.
56
+ */
57
+ export const GoFeatures_APILevelSchema = /*@__PURE__*/ enumDesc(file_google_protobuf_go_features, 0, 0);
58
+ /**
59
+ * @generated from enum pb.GoFeatures.StripEnumPrefix
60
+ */
61
+ export var GoFeatures_StripEnumPrefix;
62
+ (function (GoFeatures_StripEnumPrefix) {
63
+ /**
64
+ * @generated from enum value: STRIP_ENUM_PREFIX_UNSPECIFIED = 0;
65
+ */
66
+ GoFeatures_StripEnumPrefix[GoFeatures_StripEnumPrefix["UNSPECIFIED"] = 0] = "UNSPECIFIED";
67
+ /**
68
+ * @generated from enum value: STRIP_ENUM_PREFIX_KEEP = 1;
69
+ */
70
+ GoFeatures_StripEnumPrefix[GoFeatures_StripEnumPrefix["KEEP"] = 1] = "KEEP";
71
+ /**
72
+ * @generated from enum value: STRIP_ENUM_PREFIX_GENERATE_BOTH = 2;
73
+ */
74
+ GoFeatures_StripEnumPrefix[GoFeatures_StripEnumPrefix["GENERATE_BOTH"] = 2] = "GENERATE_BOTH";
75
+ /**
76
+ * @generated from enum value: STRIP_ENUM_PREFIX_STRIP = 3;
77
+ */
78
+ GoFeatures_StripEnumPrefix[GoFeatures_StripEnumPrefix["STRIP"] = 3] = "STRIP";
79
+ })(GoFeatures_StripEnumPrefix || (GoFeatures_StripEnumPrefix = {}));
80
+ /**
81
+ * Describes the enum pb.GoFeatures.StripEnumPrefix.
82
+ */
83
+ export const GoFeatures_StripEnumPrefixSchema = /*@__PURE__*/ enumDesc(file_google_protobuf_go_features, 0, 1);
84
+ /**
85
+ * @generated from extension: optional pb.GoFeatures go = 1002;
86
+ */
87
+ export const go = /*@__PURE__*/ extDesc(file_google_protobuf_go_features, 0);
@@ -0,0 +1,113 @@
1
+ import type { GenEnum, GenExtension, GenFile, GenMessage } from "../../../../codegenv1/types.js";
2
+ import type { FeatureSet } from "./descriptor_pb.js";
3
+ import type { Message } from "../../../../types.js";
4
+ /**
5
+ * Describes the file google/protobuf/java_features.proto.
6
+ */
7
+ export declare const file_google_protobuf_java_features: GenFile;
8
+ /**
9
+ * @generated from message pb.JavaFeatures
10
+ */
11
+ export type JavaFeatures = Message<"pb.JavaFeatures"> & {
12
+ /**
13
+ * Whether or not to treat an enum field as closed. This option is only
14
+ * applicable to enum fields, and will be removed in the future. It is
15
+ * consistent with the legacy behavior of using proto3 enum types for proto2
16
+ * fields.
17
+ *
18
+ * @generated from field: optional bool legacy_closed_enum = 1;
19
+ */
20
+ legacyClosedEnum: boolean;
21
+ /**
22
+ * @generated from field: optional pb.JavaFeatures.Utf8Validation utf8_validation = 2;
23
+ */
24
+ utf8Validation: JavaFeatures_Utf8Validation;
25
+ /**
26
+ * Whether to use the old default outer class name scheme, or the new feature
27
+ * which adds a "Proto" suffix to the outer class name.
28
+ *
29
+ * Users will not be able to set this option, because we removed it in the
30
+ * same edition that it was introduced. But we use it to determine which
31
+ * naming scheme to use for outer class name defaults.
32
+ *
33
+ * @generated from field: optional bool use_old_outer_classname_default = 4;
34
+ */
35
+ useOldOuterClassnameDefault: boolean;
36
+ };
37
+ /**
38
+ * @generated from message pb.JavaFeatures
39
+ */
40
+ export type JavaFeaturesJson = {
41
+ /**
42
+ * Whether or not to treat an enum field as closed. This option is only
43
+ * applicable to enum fields, and will be removed in the future. It is
44
+ * consistent with the legacy behavior of using proto3 enum types for proto2
45
+ * fields.
46
+ *
47
+ * @generated from field: optional bool legacy_closed_enum = 1;
48
+ */
49
+ legacyClosedEnum?: boolean;
50
+ /**
51
+ * @generated from field: optional pb.JavaFeatures.Utf8Validation utf8_validation = 2;
52
+ */
53
+ utf8Validation?: JavaFeatures_Utf8ValidationJson;
54
+ /**
55
+ * Whether to use the old default outer class name scheme, or the new feature
56
+ * which adds a "Proto" suffix to the outer class name.
57
+ *
58
+ * Users will not be able to set this option, because we removed it in the
59
+ * same edition that it was introduced. But we use it to determine which
60
+ * naming scheme to use for outer class name defaults.
61
+ *
62
+ * @generated from field: optional bool use_old_outer_classname_default = 4;
63
+ */
64
+ useOldOuterClassnameDefault?: boolean;
65
+ };
66
+ /**
67
+ * Describes the message pb.JavaFeatures.
68
+ * Use `create(JavaFeaturesSchema)` to create a new message.
69
+ */
70
+ export declare const JavaFeaturesSchema: GenMessage<JavaFeatures, JavaFeaturesJson>;
71
+ /**
72
+ * The UTF8 validation strategy to use. See go/editions-utf8-validation for
73
+ * more information on this feature.
74
+ *
75
+ * @generated from enum pb.JavaFeatures.Utf8Validation
76
+ */
77
+ export declare enum JavaFeatures_Utf8Validation {
78
+ /**
79
+ * Invalid default, which should never be used.
80
+ *
81
+ * @generated from enum value: UTF8_VALIDATION_UNKNOWN = 0;
82
+ */
83
+ UTF8_VALIDATION_UNKNOWN = 0,
84
+ /**
85
+ * Respect the UTF8 validation behavior specified by the global
86
+ * utf8_validation feature.
87
+ *
88
+ * @generated from enum value: DEFAULT = 1;
89
+ */
90
+ DEFAULT = 1,
91
+ /**
92
+ * Verifies UTF8 validity overriding the global utf8_validation
93
+ * feature. This represents the legacy java_string_check_utf8 option.
94
+ *
95
+ * @generated from enum value: VERIFY = 2;
96
+ */
97
+ VERIFY = 2
98
+ }
99
+ /**
100
+ * The UTF8 validation strategy to use. See go/editions-utf8-validation for
101
+ * more information on this feature.
102
+ *
103
+ * @generated from enum pb.JavaFeatures.Utf8Validation
104
+ */
105
+ export type JavaFeatures_Utf8ValidationJson = "UTF8_VALIDATION_UNKNOWN" | "DEFAULT" | "VERIFY";
106
+ /**
107
+ * Describes the enum pb.JavaFeatures.Utf8Validation.
108
+ */
109
+ export declare const JavaFeatures_Utf8ValidationSchema: GenEnum<JavaFeatures_Utf8Validation, JavaFeatures_Utf8ValidationJson>;
110
+ /**
111
+ * @generated from extension: optional pb.JavaFeatures java = 1001;
112
+ */
113
+ export declare const java: GenExtension<FeatureSet, JavaFeatures>;
@@ -0,0 +1,64 @@
1
+ // Copyright 2021-2025 Buf Technologies, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ import { fileDesc } from "../../../../codegenv1/file.js";
15
+ import { file_google_protobuf_descriptor } from "./descriptor_pb.js";
16
+ import { messageDesc } from "../../../../codegenv1/message.js";
17
+ import { enumDesc } from "../../../../codegenv1/enum.js";
18
+ import { extDesc } from "../../../../codegenv1/extension.js";
19
+ /**
20
+ * Describes the file google/protobuf/java_features.proto.
21
+ */
22
+ export const file_google_protobuf_java_features = /*@__PURE__*/ fileDesc("CiNnb29nbGUvcHJvdG9idWYvamF2YV9mZWF0dXJlcy5wcm90bxICcGIizAUKDEphdmFGZWF0dXJlcxL+AQoSbGVnYWN5X2Nsb3NlZF9lbnVtGAEgASgIQuEBiAEBmAEEmAEBogEJEgR0cnVlGIQHogEKEgVmYWxzZRjnB7IBuwEI6AcQ6AcasgFUaGUgbGVnYWN5IGNsb3NlZCBlbnVtIGJlaGF2aW9yIGluIEphdmEgaXMgZGVwcmVjYXRlZCBhbmQgaXMgc2NoZWR1bGVkIHRvIGJlIHJlbW92ZWQgaW4gZWRpdGlvbiAyMDI1LiAgU2VlIGh0dHA6Ly9wcm90b2J1Zi5kZXYvcHJvZ3JhbW1pbmctZ3VpZGVzL2VudW0vI2phdmEgZm9yIG1vcmUgaW5mb3JtYXRpb24uEp8CCg91dGY4X3ZhbGlkYXRpb24YAiABKA4yHy5wYi5KYXZhRmVhdHVyZXMuVXRmOFZhbGlkYXRpb25C5AGIAQGYAQSYAQGiAQwSB0RFRkFVTFQYhAeyAcgBCOgHEOkHGr8BVGhlIEphdmEtc3BlY2lmaWMgdXRmOCB2YWxpZGF0aW9uIGZlYXR1cmUgaXMgZGVwcmVjYXRlZCBhbmQgaXMgc2NoZWR1bGVkIHRvIGJlIHJlbW92ZWQgaW4gZWRpdGlvbiAyMDI1LiAgVXRmOCB2YWxpZGF0aW9uIGJlaGF2aW9yIHNob3VsZCB1c2UgdGhlIGdsb2JhbCBjcm9zcy1sYW5ndWFnZSB1dGY4X3ZhbGlkYXRpb24gZmVhdHVyZS4SUQofdXNlX29sZF9vdXRlcl9jbGFzc25hbWVfZGVmYXVsdBgEIAEoCEIoiAEBmAEBogEJEgR0cnVlGIQHogEKEgVmYWxzZRjpB7IBBgjpByDpByJGCg5VdGY4VmFsaWRhdGlvbhIbChdVVEY4X1ZBTElEQVRJT05fVU5LTk9XThAAEgsKB0RFRkFVTFQQARIKCgZWRVJJRlkQAjpCCgRqYXZhEhsuZ29vZ2xlLnByb3RvYnVmLkZlYXR1cmVTZXQY6QcgASgLMhAucGIuSmF2YUZlYXR1cmVzUgRqYXZhQigKE2NvbS5nb29nbGUucHJvdG9idWZCEUphdmFGZWF0dXJlc1Byb3Rv", [file_google_protobuf_descriptor]);
23
+ /**
24
+ * Describes the message pb.JavaFeatures.
25
+ * Use `create(JavaFeaturesSchema)` to create a new message.
26
+ */
27
+ export const JavaFeaturesSchema = /*@__PURE__*/ messageDesc(file_google_protobuf_java_features, 0);
28
+ /**
29
+ * The UTF8 validation strategy to use. See go/editions-utf8-validation for
30
+ * more information on this feature.
31
+ *
32
+ * @generated from enum pb.JavaFeatures.Utf8Validation
33
+ */
34
+ export var JavaFeatures_Utf8Validation;
35
+ (function (JavaFeatures_Utf8Validation) {
36
+ /**
37
+ * Invalid default, which should never be used.
38
+ *
39
+ * @generated from enum value: UTF8_VALIDATION_UNKNOWN = 0;
40
+ */
41
+ JavaFeatures_Utf8Validation[JavaFeatures_Utf8Validation["UTF8_VALIDATION_UNKNOWN"] = 0] = "UTF8_VALIDATION_UNKNOWN";
42
+ /**
43
+ * Respect the UTF8 validation behavior specified by the global
44
+ * utf8_validation feature.
45
+ *
46
+ * @generated from enum value: DEFAULT = 1;
47
+ */
48
+ JavaFeatures_Utf8Validation[JavaFeatures_Utf8Validation["DEFAULT"] = 1] = "DEFAULT";
49
+ /**
50
+ * Verifies UTF8 validity overriding the global utf8_validation
51
+ * feature. This represents the legacy java_string_check_utf8 option.
52
+ *
53
+ * @generated from enum value: VERIFY = 2;
54
+ */
55
+ JavaFeatures_Utf8Validation[JavaFeatures_Utf8Validation["VERIFY"] = 2] = "VERIFY";
56
+ })(JavaFeatures_Utf8Validation || (JavaFeatures_Utf8Validation = {}));
57
+ /**
58
+ * Describes the enum pb.JavaFeatures.Utf8Validation.
59
+ */
60
+ export const JavaFeatures_Utf8ValidationSchema = /*@__PURE__*/ enumDesc(file_google_protobuf_java_features, 0, 0);
61
+ /**
62
+ * @generated from extension: optional pb.JavaFeatures java = 1001;
63
+ */
64
+ export const java = /*@__PURE__*/ extDesc(file_google_protobuf_java_features, 0);
@@ -1,12 +1,15 @@
1
1
  export * from "./timestamp.js";
2
2
  export * from "./any.js";
3
3
  export * from "./wrappers.js";
4
- export * from "./gen/google/protobuf/api_pb.js";
5
4
  export * from "./gen/google/protobuf/any_pb.js";
5
+ export * from "./gen/google/protobuf/api_pb.js";
6
+ export * from "./gen/google/protobuf/cpp_features_pb.js";
6
7
  export * from "./gen/google/protobuf/descriptor_pb.js";
7
8
  export * from "./gen/google/protobuf/duration_pb.js";
8
9
  export * from "./gen/google/protobuf/empty_pb.js";
9
10
  export * from "./gen/google/protobuf/field_mask_pb.js";
11
+ export * from "./gen/google/protobuf/go_features_pb.js";
12
+ export * from "./gen/google/protobuf/java_features_pb.js";
10
13
  export * from "./gen/google/protobuf/source_context_pb.js";
11
14
  export * from "./gen/google/protobuf/struct_pb.js";
12
15
  export * from "./gen/google/protobuf/timestamp_pb.js";
@@ -14,12 +14,15 @@
14
14
  export * from "./timestamp.js";
15
15
  export * from "./any.js";
16
16
  export * from "./wrappers.js";
17
- export * from "./gen/google/protobuf/api_pb.js";
18
17
  export * from "./gen/google/protobuf/any_pb.js";
18
+ export * from "./gen/google/protobuf/api_pb.js";
19
+ export * from "./gen/google/protobuf/cpp_features_pb.js";
19
20
  export * from "./gen/google/protobuf/descriptor_pb.js";
20
21
  export * from "./gen/google/protobuf/duration_pb.js";
21
22
  export * from "./gen/google/protobuf/empty_pb.js";
22
23
  export * from "./gen/google/protobuf/field_mask_pb.js";
24
+ export * from "./gen/google/protobuf/go_features_pb.js";
25
+ export * from "./gen/google/protobuf/java_features_pb.js";
23
26
  export * from "./gen/google/protobuf/source_context_pb.js";
24
27
  export * from "./gen/google/protobuf/struct_pb.js";
25
28
  export * from "./gen/google/protobuf/timestamp_pb.js";
package/package.json CHANGED
@@ -1,14 +1,9 @@
1
1
  {
2
2
  "name": "@bufbuild/protobuf",
3
- "version": "2.2.5",
3
+ "version": "2.4.0",
4
4
  "license": "(Apache-2.0 AND BSD-3-Clause)",
5
5
  "description": "A complete implementation of Protocol Buffers in TypeScript, suitable for web browsers and Node.js.",
6
- "keywords": [
7
- "protobuf",
8
- "schema",
9
- "typescript",
10
- "ecmascript"
11
- ],
6
+ "keywords": ["protobuf", "schema", "typescript", "ecmascript"],
12
7
  "repository": {
13
8
  "type": "git",
14
9
  "url": "https://github.com/bufbuild/protobuf-es.git",
@@ -21,9 +16,9 @@
21
16
  "build:esm": "../../node_modules/typescript/bin/tsc --project tsconfig.json --outDir ./dist/esm",
22
17
  "bootstrap:inject": "node scripts/bootstrap-inject.mjs src",
23
18
  "bootstrap:wkt": "protoc --es_out=src/wkt/gen --es_opt=bootstrap_wkt=true,target=ts,import_extension=js,json_types=true --proto_path $(upstream-include wkt) $(upstream-files wkt) && license-header src/wkt/gen",
24
- "format": "prettier --write --ignore-unknown '.' '!dist' '!src/wkt/gen'",
19
+ "format": "biome format --write",
25
20
  "license-header": "license-header --ignore 'src/wire/varint.ts'",
26
- "lint": "eslint --max-warnings 0 .",
21
+ "lint": "biome lint --error-on-warnings",
27
22
  "attw": "attw --pack"
28
23
  },
29
24
  "type": "module",
@@ -53,24 +48,14 @@
53
48
  },
54
49
  "typesVersions": {
55
50
  "*": {
56
- "codegenv1": [
57
- "./dist/cjs/codegenv1/index.d.ts"
58
- ],
59
- "reflect": [
60
- "./dist/cjs/reflect/index.d.ts"
61
- ],
62
- "wkt": [
63
- "./dist/cjs/wkt/index.d.ts"
64
- ],
65
- "wire": [
66
- "./dist/cjs/wire/index.d.ts"
67
- ]
51
+ "codegenv1": ["./dist/cjs/codegenv1/index.d.ts"],
52
+ "reflect": ["./dist/cjs/reflect/index.d.ts"],
53
+ "wkt": ["./dist/cjs/wkt/index.d.ts"],
54
+ "wire": ["./dist/cjs/wire/index.d.ts"]
68
55
  }
69
56
  },
70
57
  "devDependencies": {
71
58
  "upstream-protobuf": "*"
72
59
  },
73
- "files": [
74
- "dist/**"
75
- ]
60
+ "files": ["dist/**"]
76
61
  }