@bufbuild/protobuf 1.3.2 → 1.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 (62) hide show
  1. package/dist/cjs/codegen-info.d.ts +1 -1
  2. package/dist/cjs/codegen-info.js +1 -0
  3. package/dist/cjs/create-descriptor-set.js +10 -4
  4. package/dist/cjs/create-registry-from-desc.js +7 -7
  5. package/dist/cjs/descriptor-set.d.ts +21 -1
  6. package/dist/cjs/field.d.ts +52 -1
  7. package/dist/cjs/field.js +29 -1
  8. package/dist/cjs/google/protobuf/any_pb.d.ts +2 -1
  9. package/dist/cjs/google/protobuf/any_pb.js +2 -1
  10. package/dist/cjs/google/protobuf/compiler/plugin_pb.d.ts +18 -1
  11. package/dist/cjs/google/protobuf/compiler/plugin_pb.js +19 -0
  12. package/dist/cjs/google/protobuf/descriptor_pb.d.ts +250 -16
  13. package/dist/cjs/google/protobuf/descriptor_pb.js +241 -7
  14. package/dist/cjs/google/protobuf/duration_pb.js +1 -1
  15. package/dist/cjs/google/protobuf/struct_pb.js +1 -1
  16. package/dist/cjs/google/protobuf/type_pb.js +1 -1
  17. package/dist/cjs/index.d.ts +1 -1
  18. package/dist/cjs/index.js +2 -1
  19. package/dist/cjs/json-format.d.ts +3 -1
  20. package/dist/cjs/private/binary-format-common.d.ts +4 -4
  21. package/dist/cjs/private/binary-format-common.js +18 -6
  22. package/dist/cjs/private/json-format-common.d.ts +1 -1
  23. package/dist/cjs/private/json-format-common.js +11 -7
  24. package/dist/cjs/private/scalars.d.ts +2 -2
  25. package/dist/cjs/private/scalars.js +6 -5
  26. package/dist/cjs/proto2.js +6 -2
  27. package/dist/cjs/proto3.js +6 -3
  28. package/dist/cjs/to-plain-message.d.ts +5 -2
  29. package/dist/cjs/to-plain-message.js +7 -1
  30. package/dist/esm/codegen-info.d.ts +1 -1
  31. package/dist/esm/codegen-info.js +1 -0
  32. package/dist/esm/create-descriptor-set.js +13 -7
  33. package/dist/esm/create-registry-from-desc.js +7 -7
  34. package/dist/esm/descriptor-set.d.ts +21 -1
  35. package/dist/esm/field.d.ts +52 -1
  36. package/dist/esm/field.js +28 -0
  37. package/dist/esm/google/protobuf/any_pb.d.ts +2 -1
  38. package/dist/esm/google/protobuf/any_pb.js +2 -1
  39. package/dist/esm/google/protobuf/compiler/plugin_pb.d.ts +18 -1
  40. package/dist/esm/google/protobuf/compiler/plugin_pb.js +19 -0
  41. package/dist/esm/google/protobuf/descriptor_pb.d.ts +250 -16
  42. package/dist/esm/google/protobuf/descriptor_pb.js +238 -6
  43. package/dist/esm/google/protobuf/duration_pb.js +1 -1
  44. package/dist/esm/google/protobuf/struct_pb.js +1 -1
  45. package/dist/esm/google/protobuf/type_pb.js +1 -1
  46. package/dist/esm/index.d.ts +1 -1
  47. package/dist/esm/index.js +1 -1
  48. package/dist/esm/json-format.d.ts +3 -1
  49. package/dist/esm/json-format.js +1 -1
  50. package/dist/esm/private/binary-format-common.d.ts +4 -4
  51. package/dist/esm/private/binary-format-common.js +17 -6
  52. package/dist/esm/private/json-format-common.d.ts +1 -1
  53. package/dist/esm/private/json-format-common.js +12 -8
  54. package/dist/esm/private/scalars.d.ts +2 -2
  55. package/dist/esm/private/scalars.js +7 -6
  56. package/dist/esm/proto2.js +6 -2
  57. package/dist/esm/proto3.js +7 -4
  58. package/dist/esm/to-plain-message.d.ts +5 -2
  59. package/dist/esm/to-plain-message.js +7 -1
  60. package/dist/proxy/index.d.ts +1 -0
  61. package/dist/proxy/index.js +1 -0
  62. package/package.json +17 -12
@@ -13,7 +13,7 @@ interface CodegenInfo {
13
13
  readonly safeIdentifier: typeof safeIdentifier;
14
14
  readonly safeObjectProperty: typeof safeObjectProperty;
15
15
  }
16
- type RuntimeSymbolName = "proto2" | "proto3" | "Message" | "PartialMessage" | "PlainMessage" | "FieldList" | "MessageType" | "BinaryReadOptions" | "BinaryWriteOptions" | "JsonReadOptions" | "JsonWriteOptions" | "JsonValue" | "JsonObject" | "protoDouble" | "protoInt64" | "ScalarType" | "MethodKind" | "MethodIdempotency" | "IMessageTypeRegistry";
16
+ type RuntimeSymbolName = "proto2" | "proto3" | "Message" | "PartialMessage" | "PlainMessage" | "FieldList" | "MessageType" | "BinaryReadOptions" | "BinaryWriteOptions" | "JsonReadOptions" | "JsonWriteOptions" | "JsonValue" | "JsonObject" | "protoDouble" | "protoInt64" | "ScalarType" | "LongType" | "MethodKind" | "MethodIdempotency" | "IMessageTypeRegistry";
17
17
  type RuntimeSymbolInfo = {
18
18
  typeOnly: boolean;
19
19
  publicImportPath: string;
@@ -45,6 +45,7 @@ exports.codegenInfo = {
45
45
  protoDouble: { typeOnly: false, privateImportPath: "./proto-double.js", publicImportPath: packageName },
46
46
  protoInt64: { typeOnly: false, privateImportPath: "./proto-int64.js", publicImportPath: packageName },
47
47
  ScalarType: { typeOnly: false, privateImportPath: "./field.js", publicImportPath: packageName },
48
+ LongType: { typeOnly: false, privateImportPath: "./field.js", publicImportPath: packageName },
48
49
  MethodKind: { typeOnly: false, privateImportPath: "./service-type.js", publicImportPath: packageName },
49
50
  MethodIdempotency: { typeOnly: false, privateImportPath: "./service-type.js", publicImportPath: packageName },
50
51
  IMessageTypeRegistry: { typeOnly: true, privateImportPath: "./type-registry.js", publicImportPath: packageName },
@@ -397,7 +397,7 @@ function newOneof(proto, parent) {
397
397
  * Create a descriptor for a field.
398
398
  */
399
399
  function newField(proto, file, parent, oneof, cart) {
400
- var _a, _b, _c, _d;
400
+ var _a, _b, _c, _d, _e;
401
401
  (0, assert_js_1.assert)(proto.name, `invalid FieldDescriptorProto: missing name`);
402
402
  (0, assert_js_1.assert)(proto.number, `invalid FieldDescriptorProto: missing number`);
403
403
  (0, assert_js_1.assert)(proto.type, `invalid FieldDescriptorProto: missing type`);
@@ -414,6 +414,7 @@ function newField(proto, file, parent, oneof, cart) {
414
414
  packedByDefault,
415
415
  jsonName: proto.jsonName === (0, names_js_1.fieldJsonName)(proto.name) ? undefined : proto.jsonName,
416
416
  scalar: undefined,
417
+ longType: undefined,
417
418
  message: undefined,
418
419
  enum: undefined,
419
420
  mapKey: undefined,
@@ -459,7 +460,9 @@ function newField(proto, file, parent, oneof, cart) {
459
460
  (0, assert_js_1.assert)(scalar, `invalid FieldDescriptorProto: unknown type ${proto.type}`);
460
461
  return Object.assign(Object.assign({}, common), { kind: "field", fieldKind: "scalar", getDefaultValue,
461
462
  repeated,
462
- scalar });
463
+ scalar, longType: ((_e = proto.options) === null || _e === void 0 ? void 0 : _e.jstype) == descriptor_pb_js_1.FieldOptions_JSType.JS_STRING
464
+ ? field_js_1.LongType.STRING
465
+ : field_js_1.LongType.BIGINT });
463
466
  }
464
467
  }
465
468
  }
@@ -703,7 +706,7 @@ var FieldNumber;
703
706
  * source. Does not take custom options into account.
704
707
  */
705
708
  function declarationString() {
706
- var _a, _b;
709
+ var _a, _b, _c;
707
710
  const parts = [];
708
711
  if (this.repeated) {
709
712
  parts.push("repeated");
@@ -761,7 +764,10 @@ function declarationString() {
761
764
  if (this.jsonName !== undefined) {
762
765
  options.push(`json_name = "${this.jsonName}"`);
763
766
  }
764
- if (((_b = this.proto.options) === null || _b === void 0 ? void 0 : _b.deprecated) === true) {
767
+ if (((_b = this.proto.options) === null || _b === void 0 ? void 0 : _b.jstype) !== undefined) {
768
+ options.push(`jstype = ${descriptor_pb_js_1.FieldOptions_JSType[this.proto.options.jstype]}`);
769
+ }
770
+ if (((_c = this.proto.options) === null || _c === void 0 ? void 0 : _c.deprecated) === true) {
765
771
  options.push(`deprecated = true`);
766
772
  }
767
773
  if (options.length > 0) {
@@ -17,6 +17,7 @@ exports.createRegistryFromDescriptors = void 0;
17
17
  const assert_js_1 = require("./private/assert.js");
18
18
  const proto3_js_1 = require("./proto3.js");
19
19
  const proto2_js_1 = require("./proto2.js");
20
+ const field_js_1 = require("./field.js");
20
21
  const names_js_1 = require("./private/names.js");
21
22
  const timestamp_pb_js_1 = require("./google/protobuf/timestamp_pb.js");
22
23
  const duration_pb_js_1 = require("./google/protobuf/duration_pb.js");
@@ -207,13 +208,12 @@ function makeMapFieldInfo(field, resolver) {
207
208
  } });
208
209
  }
209
210
  function makeScalarFieldInfo(field) {
210
- const base = {
211
- kind: "scalar",
212
- no: field.number,
213
- name: field.name,
214
- jsonName: field.jsonName,
215
- T: field.scalar,
216
- };
211
+ // We are creating _partial_ field info here, so we omit long type bigint,
212
+ // which is the default.
213
+ const longType = field.longType == field_js_1.LongType.STRING
214
+ ? { L: field_js_1.LongType.STRING }
215
+ : {};
216
+ const base = Object.assign({ kind: "scalar", no: field.number, name: field.name, jsonName: field.jsonName, T: field.scalar }, longType);
217
217
  if (field.repeated) {
218
218
  return Object.assign(Object.assign({}, base), { repeated: true, packed: field.packed, oneof: undefined, T: field.scalar });
219
219
  }
@@ -1,5 +1,5 @@
1
1
  import type { DescriptorProto, EnumDescriptorProto, EnumValueDescriptorProto, FieldDescriptorProto, FileDescriptorProto, MethodDescriptorProto, OneofDescriptorProto, ServiceDescriptorProto } from "./google/protobuf/descriptor_pb.js";
2
- import type { ScalarType } from "./field.js";
2
+ import type { ScalarType, LongType } from "./field.js";
3
3
  import type { MethodIdempotency, MethodKind } from "./service-type.js";
4
4
  /**
5
5
  * DescriptorSet provides a convenient interface for working with a set
@@ -330,6 +330,11 @@ interface DescFieldScalar {
330
330
  * Scalar type, if it is a scalar field.
331
331
  */
332
332
  readonly scalar: ScalarType;
333
+ /**
334
+ * JavaScript type for 64 bit integral types (int64, uint64,
335
+ * sint64, fixed64, sfixed64).
336
+ */
337
+ readonly longType: LongType;
333
338
  /**
334
339
  * The message type, if it is a message field.
335
340
  */
@@ -362,6 +367,11 @@ interface DescFieldMessage {
362
367
  * Scalar type, if it is a scalar field.
363
368
  */
364
369
  readonly scalar: undefined;
370
+ /**
371
+ * JavaScript type for 64 bit integral types (int64, uint64,
372
+ * sint64, fixed64, sfixed64).
373
+ */
374
+ readonly longType: undefined;
365
375
  /**
366
376
  * The message type, if it is a message field.
367
377
  */
@@ -389,6 +399,11 @@ interface DescFieldEnum {
389
399
  * Scalar type, if it is a scalar field.
390
400
  */
391
401
  readonly scalar: undefined;
402
+ /**
403
+ * JavaScript type for 64 bit integral types (int64, uint64,
404
+ * sint64, fixed64, sfixed64).
405
+ */
406
+ readonly longType: undefined;
392
407
  /**
393
408
  * The message type, if it is a message field.
394
409
  */
@@ -421,6 +436,11 @@ interface DescFieldMap {
421
436
  * Scalar type, if it is a scalar field.
422
437
  */
423
438
  readonly scalar: undefined;
439
+ /**
440
+ * JavaScript type for 64 bit integral types (int64, uint64,
441
+ * sint64, fixed64, sfixed64).
442
+ */
443
+ readonly longType: undefined;
424
444
  /**
425
445
  * The message type, if it is a message field.
426
446
  */
@@ -80,6 +80,26 @@ interface fiScalar extends fiShared {
80
80
  * Scalar type of the field.
81
81
  */
82
82
  readonly T: ScalarType;
83
+ /**
84
+ * JavaScript representation of 64 bit integral types (int64, uint64,
85
+ * sint64, fixed64, sfixed64).
86
+ *
87
+ * By default, this is LongType.BIGINT. Generated code will use the BigInt
88
+ * primitive.
89
+ *
90
+ * With LongType.STRING, generated code will use the String primitive instead.
91
+ * This can be specified per field with the option `[jstype = JS_STRING]`:
92
+ *
93
+ * ```protobuf
94
+ * uint64 field_a = 1; // BigInt
95
+ * uint64 field_b = 2 [jstype = JS_NORMAL]; // BigInt
96
+ * uint64 field_b = 2 [jstype = JS_NUMBER]; // BigInt
97
+ * uint64 field_b = 2 [jstype = JS_STRING]; // String
98
+ * ```
99
+ *
100
+ * This property is ignored for other scalar types.
101
+ */
102
+ readonly L: LongType;
83
103
  /**
84
104
  * Is the field repeated?
85
105
  */
@@ -201,13 +221,14 @@ type fiRules<T> = Omit<T, "oneof" | "repeat" | "repeated" | "packed" | "opt"> &
201
221
  readonly opt: false;
202
222
  readonly oneof: OneofInfo;
203
223
  });
204
- type fiPartialRules<T extends fiScalar | fiMap | fiEnum | fiMessage> = Omit<T, "jsonName" | "localName" | "oneof" | "repeat" | "repeated" | "packed" | "opt" | "default"> & ({
224
+ type fiPartialRules<T extends fiScalar | fiMap | fiEnum | fiMessage> = Omit<T, "jsonName" | "localName" | "oneof" | "repeat" | "repeated" | "packed" | "opt" | "default" | "L"> & ({
205
225
  readonly jsonName?: string;
206
226
  readonly repeated?: false;
207
227
  readonly packed?: false;
208
228
  readonly opt?: false;
209
229
  readonly oneof?: undefined;
210
230
  default?: T["default"];
231
+ L?: LongType;
211
232
  } | {
212
233
  readonly jsonName?: string;
213
234
  readonly repeated?: false;
@@ -215,6 +236,7 @@ type fiPartialRules<T extends fiScalar | fiMap | fiEnum | fiMessage> = Omit<T, "
215
236
  readonly opt: true;
216
237
  readonly oneof?: undefined;
217
238
  default?: T["default"];
239
+ L?: LongType;
218
240
  } | {
219
241
  readonly jsonName?: string;
220
242
  readonly repeated?: boolean;
@@ -222,6 +244,7 @@ type fiPartialRules<T extends fiScalar | fiMap | fiEnum | fiMessage> = Omit<T, "
222
244
  readonly opt?: false;
223
245
  readonly oneof?: undefined;
224
246
  default?: T["default"];
247
+ L?: LongType;
225
248
  } | {
226
249
  readonly jsonName?: string;
227
250
  readonly repeated?: false;
@@ -229,6 +252,7 @@ type fiPartialRules<T extends fiScalar | fiMap | fiEnum | fiMessage> = Omit<T, "
229
252
  readonly opt?: false;
230
253
  readonly oneof: string;
231
254
  default?: T["default"];
255
+ L?: LongType;
232
256
  });
233
257
  /**
234
258
  * Scalar value types. This is a subset of field types declared by protobuf
@@ -252,4 +276,31 @@ export declare enum ScalarType {
252
276
  SINT32 = 17,
253
277
  SINT64 = 18
254
278
  }
279
+ /**
280
+ * JavaScript representation of fields with 64 bit integral types (int64, uint64,
281
+ * sint64, fixed64, sfixed64).
282
+ *
283
+ * This is a subset of google.protobuf.FieldOptions.JSType, which defines JS_NORMAL,
284
+ * JS_STRING, and JS_NUMBER. Protobuf-ES uses BigInt by default, but will use
285
+ * String if `[jstype = JS_STRING]` is specified.
286
+ *
287
+ * ```protobuf
288
+ * uint64 field_a = 1; // BigInt
289
+ * uint64 field_b = 2 [jstype = JS_NORMAL]; // BigInt
290
+ * uint64 field_b = 2 [jstype = JS_NUMBER]; // BigInt
291
+ * uint64 field_b = 2 [jstype = JS_STRING]; // String
292
+ * ```
293
+ */
294
+ export declare enum LongType {
295
+ /**
296
+ * Use JavaScript BigInt.
297
+ */
298
+ BIGINT = 0,
299
+ /**
300
+ * Use JavaScript String.
301
+ *
302
+ * Field option `[jstype = JS_STRING]`.
303
+ */
304
+ STRING = 1
305
+ }
255
306
  export {};
package/dist/cjs/field.js CHANGED
@@ -13,7 +13,7 @@
13
13
  // See the License for the specific language governing permissions and
14
14
  // limitations under the License.
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.ScalarType = void 0;
16
+ exports.LongType = exports.ScalarType = void 0;
17
17
  /**
18
18
  * Scalar value types. This is a subset of field types declared by protobuf
19
19
  * enum google.protobuf.FieldDescriptorProto.Type The types GROUP and MESSAGE
@@ -51,3 +51,31 @@ var ScalarType;
51
51
  ScalarType[ScalarType["SINT32"] = 17] = "SINT32";
52
52
  ScalarType[ScalarType["SINT64"] = 18] = "SINT64";
53
53
  })(ScalarType || (exports.ScalarType = ScalarType = {}));
54
+ /**
55
+ * JavaScript representation of fields with 64 bit integral types (int64, uint64,
56
+ * sint64, fixed64, sfixed64).
57
+ *
58
+ * This is a subset of google.protobuf.FieldOptions.JSType, which defines JS_NORMAL,
59
+ * JS_STRING, and JS_NUMBER. Protobuf-ES uses BigInt by default, but will use
60
+ * String if `[jstype = JS_STRING]` is specified.
61
+ *
62
+ * ```protobuf
63
+ * uint64 field_a = 1; // BigInt
64
+ * uint64 field_b = 2 [jstype = JS_NORMAL]; // BigInt
65
+ * uint64 field_b = 2 [jstype = JS_NUMBER]; // BigInt
66
+ * uint64 field_b = 2 [jstype = JS_STRING]; // String
67
+ * ```
68
+ */
69
+ var LongType;
70
+ (function (LongType) {
71
+ /**
72
+ * Use JavaScript BigInt.
73
+ */
74
+ LongType[LongType["BIGINT"] = 0] = "BIGINT";
75
+ /**
76
+ * Use JavaScript String.
77
+ *
78
+ * Field option `[jstype = JS_STRING]`.
79
+ */
80
+ LongType[LongType["STRING"] = 1] = "STRING";
81
+ })(LongType || (exports.LongType = LongType = {}));
@@ -121,7 +121,8 @@ export declare class Any extends Message<Any> {
121
121
  *
122
122
  * Note: this functionality is not currently available in the official
123
123
  * protobuf release, and it is not used for type URLs beginning with
124
- * type.googleapis.com.
124
+ * type.googleapis.com. As of May 2023, there are no widely used type server
125
+ * implementations and no plans to implement one.
125
126
  *
126
127
  * Schemes other than `http`, `https` (or the empty scheme) might be
127
128
  * used with implementation specific semantics.
@@ -133,7 +133,8 @@ class Any extends message_js_1.Message {
133
133
  *
134
134
  * Note: this functionality is not currently available in the official
135
135
  * protobuf release, and it is not used for type URLs beginning with
136
- * type.googleapis.com.
136
+ * type.googleapis.com. As of May 2023, there are no widely used type server
137
+ * implementations and no plans to implement one.
137
138
  *
138
139
  * Schemes other than `http`, `https` (or the empty scheme) might be
139
140
  * used with implementation specific semantics.
@@ -64,6 +64,11 @@ export declare class CodeGeneratorRequest extends Message<CodeGeneratorRequest>
64
64
  * they import. The files will appear in topological order, so each file
65
65
  * appears before any file that imports it.
66
66
  *
67
+ * Note: the files listed in files_to_generate will include runtime-retention
68
+ * options only, but all other files will include source-retention options.
69
+ * The source_file_descriptors field below is available in case you need
70
+ * source-retention options for files_to_generate.
71
+ *
67
72
  * protoc guarantees that all proto_files will be written after
68
73
  * the fields above, even though this is not technically guaranteed by the
69
74
  * protobuf wire format. This theoretically could allow a plugin to stream
@@ -78,6 +83,14 @@ export declare class CodeGeneratorRequest extends Message<CodeGeneratorRequest>
78
83
  * @generated from field: repeated google.protobuf.FileDescriptorProto proto_file = 15;
79
84
  */
80
85
  protoFile: FileDescriptorProto[];
86
+ /**
87
+ * File descriptors with all options, including source-retention options.
88
+ * These descriptors are only provided for the files listed in
89
+ * files_to_generate.
90
+ *
91
+ * @generated from field: repeated google.protobuf.FileDescriptorProto source_file_descriptors = 17;
92
+ */
93
+ sourceFileDescriptors: FileDescriptorProto[];
81
94
  /**
82
95
  * The version number of protocol compiler.
83
96
  *
@@ -145,7 +158,11 @@ export declare enum CodeGeneratorResponse_Feature {
145
158
  /**
146
159
  * @generated from enum value: FEATURE_PROTO3_OPTIONAL = 1;
147
160
  */
148
- PROTO3_OPTIONAL = 1
161
+ PROTO3_OPTIONAL = 1,
162
+ /**
163
+ * @generated from enum value: FEATURE_SUPPORTS_EDITIONS = 2;
164
+ */
165
+ SUPPORTS_EDITIONS = 2
149
166
  }
150
167
  /**
151
168
  * Represents a single generated file.
@@ -70,6 +70,11 @@ class CodeGeneratorRequest extends message_js_1.Message {
70
70
  * they import. The files will appear in topological order, so each file
71
71
  * appears before any file that imports it.
72
72
  *
73
+ * Note: the files listed in files_to_generate will include runtime-retention
74
+ * options only, but all other files will include source-retention options.
75
+ * The source_file_descriptors field below is available in case you need
76
+ * source-retention options for files_to_generate.
77
+ *
73
78
  * protoc guarantees that all proto_files will be written after
74
79
  * the fields above, even though this is not technically guaranteed by the
75
80
  * protobuf wire format. This theoretically could allow a plugin to stream
@@ -84,6 +89,14 @@ class CodeGeneratorRequest extends message_js_1.Message {
84
89
  * @generated from field: repeated google.protobuf.FileDescriptorProto proto_file = 15;
85
90
  */
86
91
  this.protoFile = [];
92
+ /**
93
+ * File descriptors with all options, including source-retention options.
94
+ * These descriptors are only provided for the files listed in
95
+ * files_to_generate.
96
+ *
97
+ * @generated from field: repeated google.protobuf.FileDescriptorProto source_file_descriptors = 17;
98
+ */
99
+ this.sourceFileDescriptors = [];
87
100
  proto2_js_1.proto2.util.initPartial(data, this);
88
101
  }
89
102
  static fromBinary(bytes, options) {
@@ -106,6 +119,7 @@ CodeGeneratorRequest.fields = proto2_js_1.proto2.util.newFieldList(() => [
106
119
  { no: 1, name: "file_to_generate", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
107
120
  { no: 2, name: "parameter", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
108
121
  { no: 15, name: "proto_file", kind: "message", T: descriptor_pb_js_1.FileDescriptorProto, repeated: true },
122
+ { no: 17, name: "source_file_descriptors", kind: "message", T: descriptor_pb_js_1.FileDescriptorProto, repeated: true },
109
123
  { no: 3, name: "compiler_version", kind: "message", T: Version, opt: true },
110
124
  ]);
111
125
  /**
@@ -158,11 +172,16 @@ var CodeGeneratorResponse_Feature;
158
172
  * @generated from enum value: FEATURE_PROTO3_OPTIONAL = 1;
159
173
  */
160
174
  CodeGeneratorResponse_Feature[CodeGeneratorResponse_Feature["PROTO3_OPTIONAL"] = 1] = "PROTO3_OPTIONAL";
175
+ /**
176
+ * @generated from enum value: FEATURE_SUPPORTS_EDITIONS = 2;
177
+ */
178
+ CodeGeneratorResponse_Feature[CodeGeneratorResponse_Feature["SUPPORTS_EDITIONS"] = 2] = "SUPPORTS_EDITIONS";
161
179
  })(CodeGeneratorResponse_Feature || (exports.CodeGeneratorResponse_Feature = CodeGeneratorResponse_Feature = {}));
162
180
  // Retrieve enum metadata with: proto2.getEnumType(CodeGeneratorResponse_Feature)
163
181
  proto2_js_1.proto2.util.setEnumType(CodeGeneratorResponse_Feature, "google.protobuf.compiler.CodeGeneratorResponse.Feature", [
164
182
  { no: 0, name: "FEATURE_NONE" },
165
183
  { no: 1, name: "FEATURE_PROTO3_OPTIONAL" },
184
+ { no: 2, name: "FEATURE_SUPPORTS_EDITIONS" },
166
185
  ]);
167
186
  /**
168
187
  * Represents a single generated file.