@bufbuild/protobuf 0.0.1-alpha.1 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/README.md +21 -1
  2. package/dist/cjs/binary-encoding.js +402 -410
  3. package/dist/cjs/descriptor-registry.js +407 -449
  4. package/dist/cjs/descriptor-set.js +416 -513
  5. package/dist/cjs/field.js +30 -30
  6. package/dist/cjs/google/protobuf/any_pb.js +122 -140
  7. package/dist/cjs/google/protobuf/api_pb.js +177 -224
  8. package/dist/cjs/google/protobuf/compiler/plugin_pb.js +125 -227
  9. package/dist/cjs/google/protobuf/descriptor_pb.js +1029 -1888
  10. package/dist/cjs/google/protobuf/duration_pb.js +72 -88
  11. package/dist/cjs/google/protobuf/empty_pb.js +17 -17
  12. package/dist/cjs/google/protobuf/field_mask_pb.js +77 -94
  13. package/dist/cjs/google/protobuf/source_context_pb.js +25 -25
  14. package/dist/cjs/google/protobuf/struct_pb.js +144 -181
  15. package/dist/cjs/google/protobuf/timestamp_pb.js +86 -123
  16. package/dist/cjs/google/protobuf/type_pb.js +406 -462
  17. package/dist/cjs/google/protobuf/wrappers_pb.js +407 -470
  18. package/dist/cjs/index.js +24 -122
  19. package/dist/cjs/message.js +81 -89
  20. package/dist/cjs/private/assert.js +20 -26
  21. package/dist/cjs/private/base64.js +79 -78
  22. package/dist/cjs/private/binary-format-common.js +195 -208
  23. package/dist/cjs/private/binary-format-proto2.js +75 -109
  24. package/dist/cjs/private/binary-format-proto3.js +57 -90
  25. package/dist/cjs/private/enum.js +38 -43
  26. package/dist/cjs/private/field-list.js +51 -50
  27. package/dist/cjs/private/field-wrapper.js +8 -10
  28. package/dist/cjs/private/field.js +22 -25
  29. package/dist/cjs/private/goog-varint.js +275 -0
  30. package/dist/cjs/private/json-format-common.js +414 -440
  31. package/dist/cjs/private/json-format-proto2.js +78 -89
  32. package/dist/cjs/private/json-format-proto3.js +69 -93
  33. package/dist/cjs/private/message-type.js +26 -27
  34. package/dist/cjs/private/names.js +58 -62
  35. package/dist/cjs/private/proto-runtime.js +11 -16
  36. package/dist/cjs/private/scalars.js +100 -103
  37. package/dist/cjs/private/util-common.js +180 -210
  38. package/dist/cjs/proto-int64.js +111 -112
  39. package/dist/cjs/proto2.js +50 -63
  40. package/dist/cjs/proto3.js +61 -74
  41. package/dist/cjs/service-type.js +14 -17
  42. package/dist/cjs/type-registry.js +33 -31
  43. package/dist/esm/binary-encoding.js +401 -414
  44. package/dist/esm/descriptor-registry.js +409 -458
  45. package/dist/esm/descriptor-set.js +417 -478
  46. package/dist/esm/field.js +29 -29
  47. package/dist/esm/google/protobuf/any_pb.js +122 -140
  48. package/dist/esm/google/protobuf/api_pb.js +177 -197
  49. package/dist/esm/google/protobuf/compiler/plugin_pb.js +123 -216
  50. package/dist/esm/google/protobuf/descriptor_pb.js +1013 -1804
  51. package/dist/esm/google/protobuf/duration_pb.js +72 -88
  52. package/dist/esm/google/protobuf/empty_pb.js +17 -17
  53. package/dist/esm/google/protobuf/field_mask_pb.js +77 -94
  54. package/dist/esm/google/protobuf/source_context_pb.js +25 -25
  55. package/dist/esm/google/protobuf/struct_pb.js +143 -180
  56. package/dist/esm/google/protobuf/timestamp_pb.js +86 -123
  57. package/dist/esm/google/protobuf/type_pb.js +401 -421
  58. package/dist/esm/google/protobuf/wrappers_pb.js +406 -397
  59. package/dist/esm/index.js +1 -1
  60. package/dist/esm/message.js +81 -89
  61. package/dist/esm/private/assert.js +19 -21
  62. package/dist/esm/private/base64.js +79 -78
  63. package/dist/esm/private/binary-format-common.js +196 -207
  64. package/dist/esm/private/binary-format-proto2.js +76 -81
  65. package/dist/esm/private/binary-format-proto3.js +58 -67
  66. package/dist/esm/private/enum.js +38 -43
  67. package/dist/esm/private/field-list.js +51 -50
  68. package/dist/esm/private/field-wrapper.js +8 -10
  69. package/dist/esm/private/field.js +22 -22
  70. package/dist/esm/private/goog-varint.js +266 -0
  71. package/dist/esm/private/json-format-common.js +414 -435
  72. package/dist/esm/private/json-format-proto2.js +76 -81
  73. package/dist/esm/private/json-format-proto3.js +66 -80
  74. package/dist/esm/private/message-type.js +27 -28
  75. package/dist/esm/private/names.js +57 -57
  76. package/dist/esm/private/proto-runtime.js +11 -11
  77. package/dist/esm/private/scalars.js +99 -99
  78. package/dist/esm/private/util-common.js +180 -192
  79. package/dist/esm/proto-int64.js +111 -112
  80. package/dist/esm/proto2.js +50 -57
  81. package/dist/esm/proto3.js +61 -68
  82. package/dist/esm/service-type.js +12 -12
  83. package/dist/esm/type-registry.js +33 -31
  84. package/dist/types/binary-encoding.d.ts +398 -398
  85. package/dist/types/binary-format.d.ts +69 -91
  86. package/dist/types/descriptor-registry.d.ts +23 -29
  87. package/dist/types/descriptor-set.d.ts +107 -128
  88. package/dist/types/enum.d.ts +21 -21
  89. package/dist/types/field-list.d.ts +21 -21
  90. package/dist/types/field.d.ts +191 -231
  91. package/dist/types/google/protobuf/any_pb.d.ts +56 -77
  92. package/dist/types/google/protobuf/api_pb.d.ts +144 -187
  93. package/dist/types/google/protobuf/compiler/plugin_pb.d.ts +195 -257
  94. package/dist/types/google/protobuf/descriptor_pb.d.ts +1360 -1737
  95. package/dist/types/google/protobuf/duration_pb.d.ts +30 -50
  96. package/dist/types/google/protobuf/empty_pb.d.ts +9 -28
  97. package/dist/types/google/protobuf/field_mask_pb.d.ts +17 -37
  98. package/dist/types/google/protobuf/source_context_pb.d.ts +16 -35
  99. package/dist/types/google/protobuf/struct_pb.d.ts +64 -115
  100. package/dist/types/google/protobuf/timestamp_pb.d.ts +31 -51
  101. package/dist/types/google/protobuf/type_pb.d.ts +355 -422
  102. package/dist/types/google/protobuf/wrappers_pb.d.ts +181 -297
  103. package/dist/types/index.d.ts +4 -27
  104. package/dist/types/json-format.d.ts +70 -89
  105. package/dist/types/message-type.d.ts +38 -46
  106. package/dist/types/message.d.ts +73 -99
  107. package/dist/types/private/assert.d.ts +1 -4
  108. package/dist/types/private/binary-format-common.d.ts +6 -32
  109. package/dist/types/private/enum.d.ts +4 -11
  110. package/dist/types/private/field-list.d.ts +14 -21
  111. package/dist/types/private/field-wrapper.d.ts +5 -11
  112. package/dist/types/private/field.d.ts +12 -12
  113. package/dist/types/{google/varint.d.ts → private/goog-varint.d.ts} +6 -13
  114. package/dist/types/private/json-format-common.d.ts +5 -27
  115. package/dist/types/private/message-type.d.ts +3 -8
  116. package/dist/types/private/names.d.ts +1 -4
  117. package/dist/types/private/options-map.d.ts +1 -1
  118. package/dist/types/private/proto-runtime.d.ts +29 -42
  119. package/dist/types/private/scalars.d.ts +5 -12
  120. package/dist/types/private/util-common.d.ts +1 -4
  121. package/dist/types/private/util.d.ts +29 -41
  122. package/dist/types/proto-int64.d.ts +42 -42
  123. package/dist/types/service-type.d.ts +37 -57
  124. package/dist/types/type-registry.d.ts +13 -15
  125. package/package.json +2 -2
  126. package/dist/cjs/google/varint.js +0 -280
  127. package/dist/esm/google/varint.js +0 -265
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /* eslint-disable */
3
- // @generated by protoc-gen-es v0.0.1-alpha.1 with parameter "bootstrap_wkt=true,ts_nocheck=false"
3
+ // @generated by protoc-gen-es v0.0.1 with parameter "bootstrap_wkt=true,ts_nocheck=false"
4
4
  // @generated from file google/protobuf/duration.proto (package google.protobuf, syntax proto3)
5
5
  //
6
6
  // Protocol Buffers - Google's data interchange format
@@ -100,102 +100,86 @@ const index_js_1 = require("../../index.js");
100
100
  * @generated from message google.protobuf.Duration
101
101
  */
102
102
  class Duration extends index_js_1.Message {
103
- constructor(data) {
104
- super();
105
- /**
106
- * Signed seconds of the span of time. Must be from -315,576,000,000
107
- * to +315,576,000,000 inclusive. Note: these bounds are computed from:
108
- * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
109
- *
110
- * @generated from field: int64 seconds = 1;
111
- */
112
- this.seconds = index_js_1.protoInt64.zero;
113
- /**
114
- * Signed fractions of a second at nanosecond resolution of the span
115
- * of time. Durations less than one second are represented with a 0
116
- * `seconds` field and a positive or negative `nanos` field. For durations
117
- * of one second or more, a non-zero value for the `nanos` field must be
118
- * of the same sign as the `seconds` field. Must be from -999,999,999
119
- * to +999,999,999 inclusive.
120
- *
121
- * @generated from field: int32 nanos = 2;
122
- */
123
- this.nanos = 0;
124
- index_js_1.proto3.util.initPartial(data, this);
125
- }
126
- fromJson(json, options) {
127
- if (typeof json !== "string") {
128
- throw new Error(
129
- `cannot decode google.protobuf.Duration from JSON: ${index_js_1.proto3.json.debug(
130
- json
131
- )}`
132
- );
103
+ constructor(data) {
104
+ super();
105
+ /**
106
+ * Signed seconds of the span of time. Must be from -315,576,000,000
107
+ * to +315,576,000,000 inclusive. Note: these bounds are computed from:
108
+ * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
109
+ *
110
+ * @generated from field: int64 seconds = 1;
111
+ */
112
+ this.seconds = index_js_1.protoInt64.zero;
113
+ /**
114
+ * Signed fractions of a second at nanosecond resolution of the span
115
+ * of time. Durations less than one second are represented with a 0
116
+ * `seconds` field and a positive or negative `nanos` field. For durations
117
+ * of one second or more, a non-zero value for the `nanos` field must be
118
+ * of the same sign as the `seconds` field. Must be from -999,999,999
119
+ * to +999,999,999 inclusive.
120
+ *
121
+ * @generated from field: int32 nanos = 2;
122
+ */
123
+ this.nanos = 0;
124
+ index_js_1.proto3.util.initPartial(data, this);
133
125
  }
134
- const match = json.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/);
135
- if (match === null) {
136
- throw new Error(
137
- `cannot decode google.protobuf.Duration from JSON: ${index_js_1.proto3.json.debug(
138
- json
139
- )}`
140
- );
126
+ fromJson(json, options) {
127
+ if (typeof json !== "string") {
128
+ throw new Error(`cannot decode google.protobuf.Duration from JSON: ${index_js_1.proto3.json.debug(json)}`);
129
+ }
130
+ const match = json.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/);
131
+ if (match === null) {
132
+ throw new Error(`cannot decode google.protobuf.Duration from JSON: ${index_js_1.proto3.json.debug(json)}`);
133
+ }
134
+ const longSeconds = Number(match[1]);
135
+ if (longSeconds > 315576000000 || longSeconds < -315576000000) {
136
+ throw new Error(`cannot decode google.protobuf.Duration from JSON: ${index_js_1.proto3.json.debug(json)}`);
137
+ }
138
+ this.seconds = index_js_1.protoInt64.parse(longSeconds);
139
+ if (typeof match[2] == "string") {
140
+ const nanosStr = match[2] + "0".repeat(9 - match[2].length);
141
+ this.nanos = parseInt(nanosStr);
142
+ if (longSeconds < 0n) {
143
+ this.nanos = -this.nanos;
144
+ }
145
+ }
146
+ return this;
141
147
  }
142
- const longSeconds = Number(match[1]);
143
- if (longSeconds > 315576000000 || longSeconds < -315576000000) {
144
- throw new Error(
145
- `cannot decode google.protobuf.Duration from JSON: ${index_js_1.proto3.json.debug(
146
- json
147
- )}`
148
- );
148
+ toJson(options) {
149
+ if (Number(this.seconds) > 315576000000 || Number(this.seconds) < -315576000000) {
150
+ throw new Error(`cannot encode google.protobuf.Duration to JSON: value out of range`);
151
+ }
152
+ let text = this.seconds.toString();
153
+ if (this.nanos !== 0) {
154
+ let nanosStr = Math.abs(this.nanos).toString();
155
+ nanosStr = "0".repeat(9 - nanosStr.length) + nanosStr;
156
+ if (nanosStr.substring(3) === "000000") {
157
+ nanosStr = nanosStr.substring(0, 3);
158
+ }
159
+ else if (nanosStr.substring(6) === "000") {
160
+ nanosStr = nanosStr.substring(0, 6);
161
+ }
162
+ text += "." + nanosStr;
163
+ }
164
+ return text + "s";
149
165
  }
150
- this.seconds = index_js_1.protoInt64.parse(longSeconds);
151
- if (typeof match[2] == "string") {
152
- const nanosStr = match[2] + "0".repeat(9 - match[2].length);
153
- this.nanos = parseInt(nanosStr);
154
- if (longSeconds < 0n) {
155
- this.nanos = -this.nanos;
156
- }
166
+ static fromBinary(bytes, options) {
167
+ return new Duration().fromBinary(bytes, options);
157
168
  }
158
- return this;
159
- }
160
- toJson(options) {
161
- if (
162
- Number(this.seconds) > 315576000000 ||
163
- Number(this.seconds) < -315576000000
164
- ) {
165
- throw new Error(
166
- `cannot encode google.protobuf.Duration to JSON: value out of range`
167
- );
169
+ static fromJson(jsonValue, options) {
170
+ return new Duration().fromJson(jsonValue, options);
168
171
  }
169
- let text = this.seconds.toString();
170
- if (this.nanos !== 0) {
171
- let nanosStr = Math.abs(this.nanos).toString();
172
- nanosStr = "0".repeat(9 - nanosStr.length) + nanosStr;
173
- if (nanosStr.substring(3) === "000000") {
174
- nanosStr = nanosStr.substring(0, 3);
175
- } else if (nanosStr.substring(6) === "000") {
176
- nanosStr = nanosStr.substring(0, 6);
177
- }
178
- text += "." + nanosStr;
172
+ static fromJsonString(jsonString, options) {
173
+ return new Duration().fromJsonString(jsonString, options);
174
+ }
175
+ static equals(a, b) {
176
+ return index_js_1.proto3.util.equals(Duration, a, b);
179
177
  }
180
- return text + "s";
181
- }
182
- static fromBinary(bytes, options) {
183
- return new Duration().fromBinary(bytes, options);
184
- }
185
- static fromJson(jsonValue, options) {
186
- return new Duration().fromJson(jsonValue, options);
187
- }
188
- static fromJsonString(jsonString, options) {
189
- return new Duration().fromJsonString(jsonString, options);
190
- }
191
- static equals(a, b) {
192
- return index_js_1.proto3.util.equals(Duration, a, b);
193
- }
194
178
  }
195
179
  exports.Duration = Duration;
196
180
  Duration.runtime = index_js_1.proto3;
197
181
  Duration.typeName = "google.protobuf.Duration";
198
182
  Duration.fields = index_js_1.proto3.util.newFieldList(() => [
199
- { no: 1, name: "seconds", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
200
- { no: 2, name: "nanos", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
183
+ { no: 1, name: "seconds", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
184
+ { no: 2, name: "nanos", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
201
185
  ]);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /* eslint-disable */
3
- // @generated by protoc-gen-es v0.0.1-alpha.1 with parameter "bootstrap_wkt=true,ts_nocheck=false"
3
+ // @generated by protoc-gen-es v0.0.1 with parameter "bootstrap_wkt=true,ts_nocheck=false"
4
4
  // @generated from file google/protobuf/empty.proto (package google.protobuf, syntax proto3)
5
5
  //
6
6
  // Protocol Buffers - Google's data interchange format
@@ -49,22 +49,22 @@ const index_js_1 = require("../../index.js");
49
49
  * @generated from message google.protobuf.Empty
50
50
  */
51
51
  class Empty extends index_js_1.Message {
52
- constructor(data) {
53
- super();
54
- index_js_1.proto3.util.initPartial(data, this);
55
- }
56
- static fromBinary(bytes, options) {
57
- return new Empty().fromBinary(bytes, options);
58
- }
59
- static fromJson(jsonValue, options) {
60
- return new Empty().fromJson(jsonValue, options);
61
- }
62
- static fromJsonString(jsonString, options) {
63
- return new Empty().fromJsonString(jsonString, options);
64
- }
65
- static equals(a, b) {
66
- return index_js_1.proto3.util.equals(Empty, a, b);
67
- }
52
+ constructor(data) {
53
+ super();
54
+ index_js_1.proto3.util.initPartial(data, this);
55
+ }
56
+ static fromBinary(bytes, options) {
57
+ return new Empty().fromBinary(bytes, options);
58
+ }
59
+ static fromJson(jsonValue, options) {
60
+ return new Empty().fromJson(jsonValue, options);
61
+ }
62
+ static fromJsonString(jsonString, options) {
63
+ return new Empty().fromJsonString(jsonString, options);
64
+ }
65
+ static equals(a, b) {
66
+ return index_js_1.proto3.util.equals(Empty, a, b);
67
+ }
68
68
  }
69
69
  exports.Empty = Empty;
70
70
  Empty.runtime = index_js_1.proto3;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /* eslint-disable */
3
- // @generated by protoc-gen-es v0.0.1-alpha.1 with parameter "bootstrap_wkt=true,ts_nocheck=false"
3
+ // @generated by protoc-gen-es v0.0.1 with parameter "bootstrap_wkt=true,ts_nocheck=false"
4
4
  // @generated from file google/protobuf/field_mask.proto (package google.protobuf, syntax proto3)
5
5
  //
6
6
  // Protocol Buffers - Google's data interchange format
@@ -239,109 +239,92 @@ const index_js_1 = require("../../index.js");
239
239
  * @generated from message google.protobuf.FieldMask
240
240
  */
241
241
  class FieldMask extends index_js_1.Message {
242
- constructor(data) {
243
- super();
244
- /**
245
- * The set of field mask paths.
246
- *
247
- * @generated from field: repeated string paths = 1;
248
- */
249
- this.paths = [];
250
- index_js_1.proto3.util.initPartial(data, this);
251
- }
252
- toJson(options) {
253
- // Converts snake_case to protoCamelCase according to the convention
254
- // used by protoc to convert a field name to a JSON name.
255
- function protoCamelCase(snakeCase) {
256
- let capNext = false;
257
- const b = [];
258
- for (let i = 0; i < snakeCase.length; i++) {
259
- let c = snakeCase.charAt(i);
260
- switch (c) {
261
- case "_":
262
- capNext = true;
263
- break;
264
- case "0":
265
- case "1":
266
- case "2":
267
- case "3":
268
- case "4":
269
- case "5":
270
- case "6":
271
- case "7":
272
- case "8":
273
- case "9":
274
- b.push(c);
275
- capNext = false;
276
- break;
277
- default:
278
- if (capNext) {
279
- capNext = false;
280
- c = c.toUpperCase();
242
+ constructor(data) {
243
+ super();
244
+ /**
245
+ * The set of field mask paths.
246
+ *
247
+ * @generated from field: repeated string paths = 1;
248
+ */
249
+ this.paths = [];
250
+ index_js_1.proto3.util.initPartial(data, this);
251
+ }
252
+ toJson(options) {
253
+ // Converts snake_case to protoCamelCase according to the convention
254
+ // used by protoc to convert a field name to a JSON name.
255
+ function protoCamelCase(snakeCase) {
256
+ let capNext = false;
257
+ const b = [];
258
+ for (let i = 0; i < snakeCase.length; i++) {
259
+ let c = snakeCase.charAt(i);
260
+ switch (c) {
261
+ case '_':
262
+ capNext = true;
263
+ break;
264
+ case '0':
265
+ case '1':
266
+ case '2':
267
+ case '3':
268
+ case '4':
269
+ case '5':
270
+ case '6':
271
+ case '7':
272
+ case '8':
273
+ case '9':
274
+ b.push(c);
275
+ capNext = false;
276
+ break;
277
+ default:
278
+ if (capNext) {
279
+ capNext = false;
280
+ c = c.toUpperCase();
281
+ }
282
+ b.push(c);
283
+ break;
284
+ }
281
285
  }
282
- b.push(c);
283
- break;
286
+ return b.join('');
284
287
  }
285
- }
286
- return b.join("");
288
+ return this.paths.map(p => {
289
+ if (p.match(/_[0-9]?_/g) || p.match(/[A-Z]/g)) {
290
+ throw new Error("cannot decode google.protobuf.FieldMask from JSON: lowerCamelCase of path name \"" + p + "\" is irreversible");
291
+ }
292
+ return protoCamelCase(p);
293
+ }).join(",");
287
294
  }
288
- return this.paths
289
- .map((p) => {
290
- if (p.match(/_[0-9]?_/g) || p.match(/[A-Z]/g)) {
291
- throw new Error(
292
- 'cannot decode google.protobuf.FieldMask from JSON: lowerCamelCase of path name "' +
293
- p +
294
- '" is irreversible'
295
- );
295
+ fromJson(json, options) {
296
+ if (typeof json !== "string") {
297
+ throw new Error("cannot decode google.protobuf.FieldMask from JSON: " + index_js_1.proto3.json.debug(json));
296
298
  }
297
- return protoCamelCase(p);
298
- })
299
- .join(",");
300
- }
301
- fromJson(json, options) {
302
- if (typeof json !== "string") {
303
- throw new Error(
304
- "cannot decode google.protobuf.FieldMask from JSON: " +
305
- index_js_1.proto3.json.debug(json)
306
- );
299
+ if (json === "") {
300
+ return this;
301
+ }
302
+ function camelToSnake(str) {
303
+ if (str.includes("_")) {
304
+ throw new Error("cannot decode google.protobuf.FieldMask from JSON: path names must be lowerCamelCase");
305
+ }
306
+ const sc = str.replace(/[A-Z]/g, letter => "_" + letter.toLowerCase());
307
+ return (sc[0] === "_") ? sc.substring(1) : sc;
308
+ }
309
+ this.paths = json.split(",").map(camelToSnake);
310
+ return this;
311
+ }
312
+ static fromBinary(bytes, options) {
313
+ return new FieldMask().fromBinary(bytes, options);
314
+ }
315
+ static fromJson(jsonValue, options) {
316
+ return new FieldMask().fromJson(jsonValue, options);
307
317
  }
308
- if (json === "") {
309
- return this;
318
+ static fromJsonString(jsonString, options) {
319
+ return new FieldMask().fromJsonString(jsonString, options);
310
320
  }
311
- function camelToSnake(str) {
312
- if (str.includes("_")) {
313
- throw new Error(
314
- "cannot decode google.protobuf.FieldMask from JSON: path names must be lowerCamelCase"
315
- );
316
- }
317
- const sc = str.replace(/[A-Z]/g, (letter) => "_" + letter.toLowerCase());
318
- return sc[0] === "_" ? sc.substring(1) : sc;
321
+ static equals(a, b) {
322
+ return index_js_1.proto3.util.equals(FieldMask, a, b);
319
323
  }
320
- this.paths = json.split(",").map(camelToSnake);
321
- return this;
322
- }
323
- static fromBinary(bytes, options) {
324
- return new FieldMask().fromBinary(bytes, options);
325
- }
326
- static fromJson(jsonValue, options) {
327
- return new FieldMask().fromJson(jsonValue, options);
328
- }
329
- static fromJsonString(jsonString, options) {
330
- return new FieldMask().fromJsonString(jsonString, options);
331
- }
332
- static equals(a, b) {
333
- return index_js_1.proto3.util.equals(FieldMask, a, b);
334
- }
335
324
  }
336
325
  exports.FieldMask = FieldMask;
337
326
  FieldMask.runtime = index_js_1.proto3;
338
327
  FieldMask.typeName = "google.protobuf.FieldMask";
339
328
  FieldMask.fields = index_js_1.proto3.util.newFieldList(() => [
340
- {
341
- no: 1,
342
- name: "paths",
343
- kind: "scalar",
344
- T: 9 /* ScalarType.STRING */,
345
- repeated: true,
346
- },
329
+ { no: 1, name: "paths", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
347
330
  ]);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /* eslint-disable */
3
- // @generated by protoc-gen-es v0.0.1-alpha.1 with parameter "bootstrap_wkt=true,ts_nocheck=false"
3
+ // @generated by protoc-gen-es v0.0.1 with parameter "bootstrap_wkt=true,ts_nocheck=false"
4
4
  // @generated from file google/protobuf/source_context.proto (package google.protobuf, syntax proto3)
5
5
  //
6
6
  // Protocol Buffers - Google's data interchange format
@@ -42,33 +42,33 @@ const index_js_1 = require("../../index.js");
42
42
  * @generated from message google.protobuf.SourceContext
43
43
  */
44
44
  class SourceContext extends index_js_1.Message {
45
- constructor(data) {
46
- super();
47
- /**
48
- * The path-qualified name of the .proto file that contained the associated
49
- * protobuf element. For example: `"google/protobuf/source_context.proto"`.
50
- *
51
- * @generated from field: string file_name = 1;
52
- */
53
- this.fileName = "";
54
- index_js_1.proto3.util.initPartial(data, this);
55
- }
56
- static fromBinary(bytes, options) {
57
- return new SourceContext().fromBinary(bytes, options);
58
- }
59
- static fromJson(jsonValue, options) {
60
- return new SourceContext().fromJson(jsonValue, options);
61
- }
62
- static fromJsonString(jsonString, options) {
63
- return new SourceContext().fromJsonString(jsonString, options);
64
- }
65
- static equals(a, b) {
66
- return index_js_1.proto3.util.equals(SourceContext, a, b);
67
- }
45
+ constructor(data) {
46
+ super();
47
+ /**
48
+ * The path-qualified name of the .proto file that contained the associated
49
+ * protobuf element. For example: `"google/protobuf/source_context.proto"`.
50
+ *
51
+ * @generated from field: string file_name = 1;
52
+ */
53
+ this.fileName = "";
54
+ index_js_1.proto3.util.initPartial(data, this);
55
+ }
56
+ static fromBinary(bytes, options) {
57
+ return new SourceContext().fromBinary(bytes, options);
58
+ }
59
+ static fromJson(jsonValue, options) {
60
+ return new SourceContext().fromJson(jsonValue, options);
61
+ }
62
+ static fromJsonString(jsonString, options) {
63
+ return new SourceContext().fromJsonString(jsonString, options);
64
+ }
65
+ static equals(a, b) {
66
+ return index_js_1.proto3.util.equals(SourceContext, a, b);
67
+ }
68
68
  }
69
69
  exports.SourceContext = SourceContext;
70
70
  SourceContext.runtime = index_js_1.proto3;
71
71
  SourceContext.typeName = "google.protobuf.SourceContext";
72
72
  SourceContext.fields = index_js_1.proto3.util.newFieldList(() => [
73
- { no: 1, name: "file_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
73
+ { no: 1, name: "file_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
74
74
  ]);