@bufbuild/protobuf 0.0.5 → 0.0.6

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 (46) hide show
  1. package/dist/cjs/google/protobuf/any_pb.js +7 -6
  2. package/dist/cjs/google/protobuf/api_pb.js +19 -18
  3. package/dist/cjs/google/protobuf/compiler/plugin_pb.js +23 -22
  4. package/dist/cjs/google/protobuf/descriptor_pb.js +149 -148
  5. package/dist/cjs/google/protobuf/duration_pb.js +13 -11
  6. package/dist/cjs/google/protobuf/empty_pb.js +7 -6
  7. package/dist/cjs/google/protobuf/field_mask_pb.js +8 -7
  8. package/dist/cjs/google/protobuf/source_context_pb.js +7 -6
  9. package/dist/cjs/google/protobuf/struct_pb.js +25 -21
  10. package/dist/cjs/google/protobuf/timestamp_pb.js +12 -10
  11. package/dist/cjs/google/protobuf/type_pb.js +37 -33
  12. package/dist/cjs/google/protobuf/wrappers_pb.js +69 -66
  13. package/dist/cjs/index.js +40 -4
  14. package/dist/esm/google/protobuf/any_pb.js +2 -1
  15. package/dist/esm/google/protobuf/api_pb.js +2 -1
  16. package/dist/esm/google/protobuf/compiler/plugin_pb.js +2 -1
  17. package/dist/esm/google/protobuf/descriptor_pb.js +2 -1
  18. package/dist/esm/google/protobuf/duration_pb.js +3 -1
  19. package/dist/esm/google/protobuf/empty_pb.js +2 -1
  20. package/dist/esm/google/protobuf/field_mask_pb.js +2 -1
  21. package/dist/esm/google/protobuf/source_context_pb.js +2 -1
  22. package/dist/esm/google/protobuf/struct_pb.js +5 -1
  23. package/dist/esm/google/protobuf/timestamp_pb.js +3 -1
  24. package/dist/esm/google/protobuf/type_pb.js +5 -1
  25. package/dist/esm/google/protobuf/wrappers_pb.js +4 -1
  26. package/dist/esm/index.js +25 -4
  27. package/dist/types/google/protobuf/any_pb.d.ts +6 -2
  28. package/dist/types/google/protobuf/api_pb.d.ts +5 -2
  29. package/dist/types/google/protobuf/compiler/plugin_pb.d.ts +5 -2
  30. package/dist/types/google/protobuf/descriptor_pb.d.ts +5 -2
  31. package/dist/types/google/protobuf/duration_pb.d.ts +5 -2
  32. package/dist/types/google/protobuf/empty_pb.d.ts +5 -2
  33. package/dist/types/google/protobuf/field_mask_pb.d.ts +5 -2
  34. package/dist/types/google/protobuf/source_context_pb.d.ts +5 -2
  35. package/dist/types/google/protobuf/struct_pb.d.ts +5 -2
  36. package/dist/types/google/protobuf/timestamp_pb.d.ts +5 -2
  37. package/dist/types/google/protobuf/type_pb.d.ts +5 -2
  38. package/dist/types/google/protobuf/wrappers_pb.d.ts +5 -2
  39. package/dist/types/index.d.ts +31 -2
  40. package/package.json +1 -1
  41. package/dist/cjs/index-runtime.js +0 -42
  42. package/dist/cjs/index-wkt.js +0 -42
  43. package/dist/esm/index-runtime.js +0 -25
  44. package/dist/esm/index-wkt.js +0 -26
  45. package/dist/types/index-runtime.d.ts +0 -19
  46. package/dist/types/index-wkt.d.ts +0 -12
@@ -14,7 +14,10 @@
14
14
  // limitations under the License.
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.BytesValue = exports.StringValue = exports.BoolValue = exports.UInt32Value = exports.Int32Value = exports.UInt64Value = exports.Int64Value = exports.FloatValue = exports.DoubleValue = void 0;
17
- const index_runtime_js_1 = require("../../index-runtime.js");
17
+ const message_js_1 = require("../../message.js");
18
+ const proto3_js_1 = require("../../proto3.js");
19
+ const field_js_1 = require("../../field.js");
20
+ const proto_int64_js_1 = require("../../proto-int64.js");
18
21
  /**
19
22
  * Wrapper message for `double`.
20
23
  *
@@ -22,7 +25,7 @@ const index_runtime_js_1 = require("../../index-runtime.js");
22
25
  *
23
26
  * @generated from message google.protobuf.DoubleValue
24
27
  */
25
- class DoubleValue extends index_runtime_js_1.Message {
28
+ class DoubleValue extends message_js_1.Message {
26
29
  constructor(data) {
27
30
  super();
28
31
  /**
@@ -31,14 +34,14 @@ class DoubleValue extends index_runtime_js_1.Message {
31
34
  * @generated from field: double value = 1;
32
35
  */
33
36
  this.value = 0;
34
- index_runtime_js_1.proto3.util.initPartial(data, this);
37
+ proto3_js_1.proto3.util.initPartial(data, this);
35
38
  }
36
39
  toJson(options) {
37
- return index_runtime_js_1.proto3.json.writeScalar(index_runtime_js_1.ScalarType.DOUBLE, this.value, true);
40
+ return proto3_js_1.proto3.json.writeScalar(field_js_1.ScalarType.DOUBLE, this.value, true);
38
41
  }
39
42
  fromJson(json, options) {
40
43
  try {
41
- this.value = index_runtime_js_1.proto3.json.readScalar(index_runtime_js_1.ScalarType.DOUBLE, json);
44
+ this.value = proto3_js_1.proto3.json.readScalar(field_js_1.ScalarType.DOUBLE, json);
42
45
  }
43
46
  catch (e) {
44
47
  let m = `cannot decode message google.protobuf.DoubleValue from JSON"`;
@@ -59,13 +62,13 @@ class DoubleValue extends index_runtime_js_1.Message {
59
62
  return new DoubleValue().fromJsonString(jsonString, options);
60
63
  }
61
64
  static equals(a, b) {
62
- return index_runtime_js_1.proto3.util.equals(DoubleValue, a, b);
65
+ return proto3_js_1.proto3.util.equals(DoubleValue, a, b);
63
66
  }
64
67
  }
65
68
  exports.DoubleValue = DoubleValue;
66
- DoubleValue.runtime = index_runtime_js_1.proto3;
69
+ DoubleValue.runtime = proto3_js_1.proto3;
67
70
  DoubleValue.typeName = "google.protobuf.DoubleValue";
68
- DoubleValue.fields = index_runtime_js_1.proto3.util.newFieldList(() => [
71
+ DoubleValue.fields = proto3_js_1.proto3.util.newFieldList(() => [
69
72
  { no: 1, name: "value", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
70
73
  ]);
71
74
  DoubleValue.fieldWrapper = {
@@ -83,7 +86,7 @@ DoubleValue.fieldWrapper = {
83
86
  *
84
87
  * @generated from message google.protobuf.FloatValue
85
88
  */
86
- class FloatValue extends index_runtime_js_1.Message {
89
+ class FloatValue extends message_js_1.Message {
87
90
  constructor(data) {
88
91
  super();
89
92
  /**
@@ -92,14 +95,14 @@ class FloatValue extends index_runtime_js_1.Message {
92
95
  * @generated from field: float value = 1;
93
96
  */
94
97
  this.value = 0;
95
- index_runtime_js_1.proto3.util.initPartial(data, this);
98
+ proto3_js_1.proto3.util.initPartial(data, this);
96
99
  }
97
100
  toJson(options) {
98
- return index_runtime_js_1.proto3.json.writeScalar(index_runtime_js_1.ScalarType.FLOAT, this.value, true);
101
+ return proto3_js_1.proto3.json.writeScalar(field_js_1.ScalarType.FLOAT, this.value, true);
99
102
  }
100
103
  fromJson(json, options) {
101
104
  try {
102
- this.value = index_runtime_js_1.proto3.json.readScalar(index_runtime_js_1.ScalarType.FLOAT, json);
105
+ this.value = proto3_js_1.proto3.json.readScalar(field_js_1.ScalarType.FLOAT, json);
103
106
  }
104
107
  catch (e) {
105
108
  let m = `cannot decode message google.protobuf.FloatValue from JSON"`;
@@ -120,13 +123,13 @@ class FloatValue extends index_runtime_js_1.Message {
120
123
  return new FloatValue().fromJsonString(jsonString, options);
121
124
  }
122
125
  static equals(a, b) {
123
- return index_runtime_js_1.proto3.util.equals(FloatValue, a, b);
126
+ return proto3_js_1.proto3.util.equals(FloatValue, a, b);
124
127
  }
125
128
  }
126
129
  exports.FloatValue = FloatValue;
127
- FloatValue.runtime = index_runtime_js_1.proto3;
130
+ FloatValue.runtime = proto3_js_1.proto3;
128
131
  FloatValue.typeName = "google.protobuf.FloatValue";
129
- FloatValue.fields = index_runtime_js_1.proto3.util.newFieldList(() => [
132
+ FloatValue.fields = proto3_js_1.proto3.util.newFieldList(() => [
130
133
  { no: 1, name: "value", kind: "scalar", T: 2 /* ScalarType.FLOAT */ },
131
134
  ]);
132
135
  FloatValue.fieldWrapper = {
@@ -144,7 +147,7 @@ FloatValue.fieldWrapper = {
144
147
  *
145
148
  * @generated from message google.protobuf.Int64Value
146
149
  */
147
- class Int64Value extends index_runtime_js_1.Message {
150
+ class Int64Value extends message_js_1.Message {
148
151
  constructor(data) {
149
152
  super();
150
153
  /**
@@ -152,15 +155,15 @@ class Int64Value extends index_runtime_js_1.Message {
152
155
  *
153
156
  * @generated from field: int64 value = 1;
154
157
  */
155
- this.value = index_runtime_js_1.protoInt64.zero;
156
- index_runtime_js_1.proto3.util.initPartial(data, this);
158
+ this.value = proto_int64_js_1.protoInt64.zero;
159
+ proto3_js_1.proto3.util.initPartial(data, this);
157
160
  }
158
161
  toJson(options) {
159
- return index_runtime_js_1.proto3.json.writeScalar(index_runtime_js_1.ScalarType.INT64, this.value, true);
162
+ return proto3_js_1.proto3.json.writeScalar(field_js_1.ScalarType.INT64, this.value, true);
160
163
  }
161
164
  fromJson(json, options) {
162
165
  try {
163
- this.value = index_runtime_js_1.proto3.json.readScalar(index_runtime_js_1.ScalarType.INT64, json);
166
+ this.value = proto3_js_1.proto3.json.readScalar(field_js_1.ScalarType.INT64, json);
164
167
  }
165
168
  catch (e) {
166
169
  let m = `cannot decode message google.protobuf.Int64Value from JSON"`;
@@ -181,13 +184,13 @@ class Int64Value extends index_runtime_js_1.Message {
181
184
  return new Int64Value().fromJsonString(jsonString, options);
182
185
  }
183
186
  static equals(a, b) {
184
- return index_runtime_js_1.proto3.util.equals(Int64Value, a, b);
187
+ return proto3_js_1.proto3.util.equals(Int64Value, a, b);
185
188
  }
186
189
  }
187
190
  exports.Int64Value = Int64Value;
188
- Int64Value.runtime = index_runtime_js_1.proto3;
191
+ Int64Value.runtime = proto3_js_1.proto3;
189
192
  Int64Value.typeName = "google.protobuf.Int64Value";
190
- Int64Value.fields = index_runtime_js_1.proto3.util.newFieldList(() => [
193
+ Int64Value.fields = proto3_js_1.proto3.util.newFieldList(() => [
191
194
  { no: 1, name: "value", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
192
195
  ]);
193
196
  Int64Value.fieldWrapper = {
@@ -205,7 +208,7 @@ Int64Value.fieldWrapper = {
205
208
  *
206
209
  * @generated from message google.protobuf.UInt64Value
207
210
  */
208
- class UInt64Value extends index_runtime_js_1.Message {
211
+ class UInt64Value extends message_js_1.Message {
209
212
  constructor(data) {
210
213
  super();
211
214
  /**
@@ -213,15 +216,15 @@ class UInt64Value extends index_runtime_js_1.Message {
213
216
  *
214
217
  * @generated from field: uint64 value = 1;
215
218
  */
216
- this.value = index_runtime_js_1.protoInt64.zero;
217
- index_runtime_js_1.proto3.util.initPartial(data, this);
219
+ this.value = proto_int64_js_1.protoInt64.zero;
220
+ proto3_js_1.proto3.util.initPartial(data, this);
218
221
  }
219
222
  toJson(options) {
220
- return index_runtime_js_1.proto3.json.writeScalar(index_runtime_js_1.ScalarType.UINT64, this.value, true);
223
+ return proto3_js_1.proto3.json.writeScalar(field_js_1.ScalarType.UINT64, this.value, true);
221
224
  }
222
225
  fromJson(json, options) {
223
226
  try {
224
- this.value = index_runtime_js_1.proto3.json.readScalar(index_runtime_js_1.ScalarType.UINT64, json);
227
+ this.value = proto3_js_1.proto3.json.readScalar(field_js_1.ScalarType.UINT64, json);
225
228
  }
226
229
  catch (e) {
227
230
  let m = `cannot decode message google.protobuf.UInt64Value from JSON"`;
@@ -242,13 +245,13 @@ class UInt64Value extends index_runtime_js_1.Message {
242
245
  return new UInt64Value().fromJsonString(jsonString, options);
243
246
  }
244
247
  static equals(a, b) {
245
- return index_runtime_js_1.proto3.util.equals(UInt64Value, a, b);
248
+ return proto3_js_1.proto3.util.equals(UInt64Value, a, b);
246
249
  }
247
250
  }
248
251
  exports.UInt64Value = UInt64Value;
249
- UInt64Value.runtime = index_runtime_js_1.proto3;
252
+ UInt64Value.runtime = proto3_js_1.proto3;
250
253
  UInt64Value.typeName = "google.protobuf.UInt64Value";
251
- UInt64Value.fields = index_runtime_js_1.proto3.util.newFieldList(() => [
254
+ UInt64Value.fields = proto3_js_1.proto3.util.newFieldList(() => [
252
255
  { no: 1, name: "value", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
253
256
  ]);
254
257
  UInt64Value.fieldWrapper = {
@@ -266,7 +269,7 @@ UInt64Value.fieldWrapper = {
266
269
  *
267
270
  * @generated from message google.protobuf.Int32Value
268
271
  */
269
- class Int32Value extends index_runtime_js_1.Message {
272
+ class Int32Value extends message_js_1.Message {
270
273
  constructor(data) {
271
274
  super();
272
275
  /**
@@ -275,14 +278,14 @@ class Int32Value extends index_runtime_js_1.Message {
275
278
  * @generated from field: int32 value = 1;
276
279
  */
277
280
  this.value = 0;
278
- index_runtime_js_1.proto3.util.initPartial(data, this);
281
+ proto3_js_1.proto3.util.initPartial(data, this);
279
282
  }
280
283
  toJson(options) {
281
- return index_runtime_js_1.proto3.json.writeScalar(index_runtime_js_1.ScalarType.INT32, this.value, true);
284
+ return proto3_js_1.proto3.json.writeScalar(field_js_1.ScalarType.INT32, this.value, true);
282
285
  }
283
286
  fromJson(json, options) {
284
287
  try {
285
- this.value = index_runtime_js_1.proto3.json.readScalar(index_runtime_js_1.ScalarType.INT32, json);
288
+ this.value = proto3_js_1.proto3.json.readScalar(field_js_1.ScalarType.INT32, json);
286
289
  }
287
290
  catch (e) {
288
291
  let m = `cannot decode message google.protobuf.Int32Value from JSON"`;
@@ -303,13 +306,13 @@ class Int32Value extends index_runtime_js_1.Message {
303
306
  return new Int32Value().fromJsonString(jsonString, options);
304
307
  }
305
308
  static equals(a, b) {
306
- return index_runtime_js_1.proto3.util.equals(Int32Value, a, b);
309
+ return proto3_js_1.proto3.util.equals(Int32Value, a, b);
307
310
  }
308
311
  }
309
312
  exports.Int32Value = Int32Value;
310
- Int32Value.runtime = index_runtime_js_1.proto3;
313
+ Int32Value.runtime = proto3_js_1.proto3;
311
314
  Int32Value.typeName = "google.protobuf.Int32Value";
312
- Int32Value.fields = index_runtime_js_1.proto3.util.newFieldList(() => [
315
+ Int32Value.fields = proto3_js_1.proto3.util.newFieldList(() => [
313
316
  { no: 1, name: "value", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
314
317
  ]);
315
318
  Int32Value.fieldWrapper = {
@@ -327,7 +330,7 @@ Int32Value.fieldWrapper = {
327
330
  *
328
331
  * @generated from message google.protobuf.UInt32Value
329
332
  */
330
- class UInt32Value extends index_runtime_js_1.Message {
333
+ class UInt32Value extends message_js_1.Message {
331
334
  constructor(data) {
332
335
  super();
333
336
  /**
@@ -336,14 +339,14 @@ class UInt32Value extends index_runtime_js_1.Message {
336
339
  * @generated from field: uint32 value = 1;
337
340
  */
338
341
  this.value = 0;
339
- index_runtime_js_1.proto3.util.initPartial(data, this);
342
+ proto3_js_1.proto3.util.initPartial(data, this);
340
343
  }
341
344
  toJson(options) {
342
- return index_runtime_js_1.proto3.json.writeScalar(index_runtime_js_1.ScalarType.UINT32, this.value, true);
345
+ return proto3_js_1.proto3.json.writeScalar(field_js_1.ScalarType.UINT32, this.value, true);
343
346
  }
344
347
  fromJson(json, options) {
345
348
  try {
346
- this.value = index_runtime_js_1.proto3.json.readScalar(index_runtime_js_1.ScalarType.UINT32, json);
349
+ this.value = proto3_js_1.proto3.json.readScalar(field_js_1.ScalarType.UINT32, json);
347
350
  }
348
351
  catch (e) {
349
352
  let m = `cannot decode message google.protobuf.UInt32Value from JSON"`;
@@ -364,13 +367,13 @@ class UInt32Value extends index_runtime_js_1.Message {
364
367
  return new UInt32Value().fromJsonString(jsonString, options);
365
368
  }
366
369
  static equals(a, b) {
367
- return index_runtime_js_1.proto3.util.equals(UInt32Value, a, b);
370
+ return proto3_js_1.proto3.util.equals(UInt32Value, a, b);
368
371
  }
369
372
  }
370
373
  exports.UInt32Value = UInt32Value;
371
- UInt32Value.runtime = index_runtime_js_1.proto3;
374
+ UInt32Value.runtime = proto3_js_1.proto3;
372
375
  UInt32Value.typeName = "google.protobuf.UInt32Value";
373
- UInt32Value.fields = index_runtime_js_1.proto3.util.newFieldList(() => [
376
+ UInt32Value.fields = proto3_js_1.proto3.util.newFieldList(() => [
374
377
  { no: 1, name: "value", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
375
378
  ]);
376
379
  UInt32Value.fieldWrapper = {
@@ -388,7 +391,7 @@ UInt32Value.fieldWrapper = {
388
391
  *
389
392
  * @generated from message google.protobuf.BoolValue
390
393
  */
391
- class BoolValue extends index_runtime_js_1.Message {
394
+ class BoolValue extends message_js_1.Message {
392
395
  constructor(data) {
393
396
  super();
394
397
  /**
@@ -397,14 +400,14 @@ class BoolValue extends index_runtime_js_1.Message {
397
400
  * @generated from field: bool value = 1;
398
401
  */
399
402
  this.value = false;
400
- index_runtime_js_1.proto3.util.initPartial(data, this);
403
+ proto3_js_1.proto3.util.initPartial(data, this);
401
404
  }
402
405
  toJson(options) {
403
- return index_runtime_js_1.proto3.json.writeScalar(index_runtime_js_1.ScalarType.BOOL, this.value, true);
406
+ return proto3_js_1.proto3.json.writeScalar(field_js_1.ScalarType.BOOL, this.value, true);
404
407
  }
405
408
  fromJson(json, options) {
406
409
  try {
407
- this.value = index_runtime_js_1.proto3.json.readScalar(index_runtime_js_1.ScalarType.BOOL, json);
410
+ this.value = proto3_js_1.proto3.json.readScalar(field_js_1.ScalarType.BOOL, json);
408
411
  }
409
412
  catch (e) {
410
413
  let m = `cannot decode message google.protobuf.BoolValue from JSON"`;
@@ -425,13 +428,13 @@ class BoolValue extends index_runtime_js_1.Message {
425
428
  return new BoolValue().fromJsonString(jsonString, options);
426
429
  }
427
430
  static equals(a, b) {
428
- return index_runtime_js_1.proto3.util.equals(BoolValue, a, b);
431
+ return proto3_js_1.proto3.util.equals(BoolValue, a, b);
429
432
  }
430
433
  }
431
434
  exports.BoolValue = BoolValue;
432
- BoolValue.runtime = index_runtime_js_1.proto3;
435
+ BoolValue.runtime = proto3_js_1.proto3;
433
436
  BoolValue.typeName = "google.protobuf.BoolValue";
434
- BoolValue.fields = index_runtime_js_1.proto3.util.newFieldList(() => [
437
+ BoolValue.fields = proto3_js_1.proto3.util.newFieldList(() => [
435
438
  { no: 1, name: "value", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
436
439
  ]);
437
440
  BoolValue.fieldWrapper = {
@@ -449,7 +452,7 @@ BoolValue.fieldWrapper = {
449
452
  *
450
453
  * @generated from message google.protobuf.StringValue
451
454
  */
452
- class StringValue extends index_runtime_js_1.Message {
455
+ class StringValue extends message_js_1.Message {
453
456
  constructor(data) {
454
457
  super();
455
458
  /**
@@ -458,14 +461,14 @@ class StringValue extends index_runtime_js_1.Message {
458
461
  * @generated from field: string value = 1;
459
462
  */
460
463
  this.value = "";
461
- index_runtime_js_1.proto3.util.initPartial(data, this);
464
+ proto3_js_1.proto3.util.initPartial(data, this);
462
465
  }
463
466
  toJson(options) {
464
- return index_runtime_js_1.proto3.json.writeScalar(index_runtime_js_1.ScalarType.STRING, this.value, true);
467
+ return proto3_js_1.proto3.json.writeScalar(field_js_1.ScalarType.STRING, this.value, true);
465
468
  }
466
469
  fromJson(json, options) {
467
470
  try {
468
- this.value = index_runtime_js_1.proto3.json.readScalar(index_runtime_js_1.ScalarType.STRING, json);
471
+ this.value = proto3_js_1.proto3.json.readScalar(field_js_1.ScalarType.STRING, json);
469
472
  }
470
473
  catch (e) {
471
474
  let m = `cannot decode message google.protobuf.StringValue from JSON"`;
@@ -486,13 +489,13 @@ class StringValue extends index_runtime_js_1.Message {
486
489
  return new StringValue().fromJsonString(jsonString, options);
487
490
  }
488
491
  static equals(a, b) {
489
- return index_runtime_js_1.proto3.util.equals(StringValue, a, b);
492
+ return proto3_js_1.proto3.util.equals(StringValue, a, b);
490
493
  }
491
494
  }
492
495
  exports.StringValue = StringValue;
493
- StringValue.runtime = index_runtime_js_1.proto3;
496
+ StringValue.runtime = proto3_js_1.proto3;
494
497
  StringValue.typeName = "google.protobuf.StringValue";
495
- StringValue.fields = index_runtime_js_1.proto3.util.newFieldList(() => [
498
+ StringValue.fields = proto3_js_1.proto3.util.newFieldList(() => [
496
499
  { no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
497
500
  ]);
498
501
  StringValue.fieldWrapper = {
@@ -510,7 +513,7 @@ StringValue.fieldWrapper = {
510
513
  *
511
514
  * @generated from message google.protobuf.BytesValue
512
515
  */
513
- class BytesValue extends index_runtime_js_1.Message {
516
+ class BytesValue extends message_js_1.Message {
514
517
  constructor(data) {
515
518
  super();
516
519
  /**
@@ -519,14 +522,14 @@ class BytesValue extends index_runtime_js_1.Message {
519
522
  * @generated from field: bytes value = 1;
520
523
  */
521
524
  this.value = new Uint8Array(0);
522
- index_runtime_js_1.proto3.util.initPartial(data, this);
525
+ proto3_js_1.proto3.util.initPartial(data, this);
523
526
  }
524
527
  toJson(options) {
525
- return index_runtime_js_1.proto3.json.writeScalar(index_runtime_js_1.ScalarType.BYTES, this.value, true);
528
+ return proto3_js_1.proto3.json.writeScalar(field_js_1.ScalarType.BYTES, this.value, true);
526
529
  }
527
530
  fromJson(json, options) {
528
531
  try {
529
- this.value = index_runtime_js_1.proto3.json.readScalar(index_runtime_js_1.ScalarType.BYTES, json);
532
+ this.value = proto3_js_1.proto3.json.readScalar(field_js_1.ScalarType.BYTES, json);
530
533
  }
531
534
  catch (e) {
532
535
  let m = `cannot decode message google.protobuf.BytesValue from JSON"`;
@@ -547,13 +550,13 @@ class BytesValue extends index_runtime_js_1.Message {
547
550
  return new BytesValue().fromJsonString(jsonString, options);
548
551
  }
549
552
  static equals(a, b) {
550
- return index_runtime_js_1.proto3.util.equals(BytesValue, a, b);
553
+ return proto3_js_1.proto3.util.equals(BytesValue, a, b);
551
554
  }
552
555
  }
553
556
  exports.BytesValue = BytesValue;
554
- BytesValue.runtime = index_runtime_js_1.proto3;
557
+ BytesValue.runtime = proto3_js_1.proto3;
555
558
  BytesValue.typeName = "google.protobuf.BytesValue";
556
- BytesValue.fields = index_runtime_js_1.proto3.util.newFieldList(() => [
559
+ BytesValue.fields = proto3_js_1.proto3.util.newFieldList(() => [
557
560
  { no: 1, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
558
561
  ]);
559
562
  BytesValue.fieldWrapper = {
package/dist/cjs/index.js CHANGED
@@ -27,7 +27,43 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
27
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
- // To avoid circular imports when the wkt import from ./index.js, we
31
- // use a separate ./index-runtime.js
32
- __exportStar(require("./index-runtime.js"), exports);
33
- __exportStar(require("./index-wkt.js"), exports);
30
+ exports.BinaryReader = exports.BinaryWriter = exports.WireType = exports.DescriptorSet = exports.DescriptorRegistry = exports.TypeRegistry = exports.MethodIdempotency = exports.MethodKind = exports.ScalarType = exports.Message = exports.protoBase64 = exports.protoInt64 = exports.proto2 = exports.proto3 = void 0;
31
+ var proto3_js_1 = require("./proto3.js");
32
+ Object.defineProperty(exports, "proto3", { enumerable: true, get: function () { return proto3_js_1.proto3; } });
33
+ var proto2_js_1 = require("./proto2.js");
34
+ Object.defineProperty(exports, "proto2", { enumerable: true, get: function () { return proto2_js_1.proto2; } });
35
+ var proto_int64_js_1 = require("./proto-int64.js");
36
+ Object.defineProperty(exports, "protoInt64", { enumerable: true, get: function () { return proto_int64_js_1.protoInt64; } });
37
+ var proto_base64_js_1 = require("./proto-base64.js");
38
+ Object.defineProperty(exports, "protoBase64", { enumerable: true, get: function () { return proto_base64_js_1.protoBase64; } });
39
+ var message_js_1 = require("./message.js");
40
+ Object.defineProperty(exports, "Message", { enumerable: true, get: function () { return message_js_1.Message; } });
41
+ var field_js_1 = require("./field.js");
42
+ Object.defineProperty(exports, "ScalarType", { enumerable: true, get: function () { return field_js_1.ScalarType; } });
43
+ var service_type_js_1 = require("./service-type.js");
44
+ Object.defineProperty(exports, "MethodKind", { enumerable: true, get: function () { return service_type_js_1.MethodKind; } });
45
+ Object.defineProperty(exports, "MethodIdempotency", { enumerable: true, get: function () { return service_type_js_1.MethodIdempotency; } });
46
+ var type_registry_js_1 = require("./type-registry.js");
47
+ Object.defineProperty(exports, "TypeRegistry", { enumerable: true, get: function () { return type_registry_js_1.TypeRegistry; } });
48
+ var descriptor_registry_js_1 = require("./descriptor-registry.js");
49
+ Object.defineProperty(exports, "DescriptorRegistry", { enumerable: true, get: function () { return descriptor_registry_js_1.DescriptorRegistry; } });
50
+ var descriptor_set_js_1 = require("./descriptor-set.js");
51
+ Object.defineProperty(exports, "DescriptorSet", { enumerable: true, get: function () { return descriptor_set_js_1.DescriptorSet; } });
52
+ var binary_encoding_js_1 = require("./binary-encoding.js");
53
+ Object.defineProperty(exports, "WireType", { enumerable: true, get: function () { return binary_encoding_js_1.WireType; } });
54
+ Object.defineProperty(exports, "BinaryWriter", { enumerable: true, get: function () { return binary_encoding_js_1.BinaryWriter; } });
55
+ Object.defineProperty(exports, "BinaryReader", { enumerable: true, get: function () { return binary_encoding_js_1.BinaryReader; } });
56
+ var json_format_js_1 = require("./json-format.js");
57
+ // ideally, we would export these types with sub-path exports:
58
+ __exportStar(require("./google/protobuf/compiler/plugin_pb.js"), exports);
59
+ __exportStar(require("./google/protobuf/api_pb.js"), exports);
60
+ __exportStar(require("./google/protobuf/any_pb.js"), exports);
61
+ __exportStar(require("./google/protobuf/descriptor_pb.js"), exports);
62
+ __exportStar(require("./google/protobuf/duration_pb.js"), exports);
63
+ __exportStar(require("./google/protobuf/empty_pb.js"), exports);
64
+ __exportStar(require("./google/protobuf/field_mask_pb.js"), exports);
65
+ __exportStar(require("./google/protobuf/source_context_pb.js"), exports);
66
+ __exportStar(require("./google/protobuf/struct_pb.js"), exports);
67
+ __exportStar(require("./google/protobuf/timestamp_pb.js"), exports);
68
+ __exportStar(require("./google/protobuf/type_pb.js"), exports);
69
+ __exportStar(require("./google/protobuf/wrappers_pb.js"), exports);
@@ -11,7 +11,8 @@
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { Message, proto3 } from "../../index-runtime.js";
14
+ import { Message } from "../../message.js";
15
+ import { proto3 } from "../../proto3.js";
15
16
  /**
16
17
  * `Any` contains an arbitrary serialized protocol buffer message along with a
17
18
  * URL that describes the type of the serialized message.
@@ -11,9 +11,10 @@
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { Message, proto3 } from "../../index-runtime.js";
14
+ import { Message } from "../../message.js";
15
15
  import { Option, Syntax } from "./type_pb.js";
16
16
  import { SourceContext } from "./source_context_pb.js";
17
+ import { proto3 } from "../../proto3.js";
17
18
  /**
18
19
  * Api is a light-weight descriptor for an API Interface.
19
20
  *
@@ -11,7 +11,8 @@
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { Message, proto2 } from "../../../index-runtime.js";
14
+ import { Message } from "../../../message.js";
15
+ import { proto2 } from "../../../proto2.js";
15
16
  import { FileDescriptorProto, GeneratedCodeInfo } from "../descriptor_pb.js";
16
17
  /**
17
18
  * The version number of protocol compiler.
@@ -11,7 +11,8 @@
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { Message, proto2 } from "../../index-runtime.js";
14
+ import { Message } from "../../message.js";
15
+ import { proto2 } from "../../proto2.js";
15
16
  /**
16
17
  * The protocol compiler can output a FileDescriptorSet containing the .proto
17
18
  * files it parses.
@@ -11,7 +11,9 @@
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { Message, proto3, protoInt64 } from "../../index-runtime.js";
14
+ import { Message } from "../../message.js";
15
+ import { protoInt64 } from "../../proto-int64.js";
16
+ import { proto3 } from "../../proto3.js";
15
17
  /**
16
18
  * A Duration represents a signed, fixed-length span of time represented
17
19
  * as a count of seconds and fractions of seconds at nanosecond
@@ -11,7 +11,8 @@
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { Message, proto3 } from "../../index-runtime.js";
14
+ import { Message } from "../../message.js";
15
+ import { proto3 } from "../../proto3.js";
15
16
  /**
16
17
  * A generic empty message that you can re-use to avoid defining duplicated
17
18
  * empty messages in your APIs. A typical example is to use it as the request
@@ -11,7 +11,8 @@
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { Message, proto3 } from "../../index-runtime.js";
14
+ import { Message } from "../../message.js";
15
+ import { proto3 } from "../../proto3.js";
15
16
  /**
16
17
  * `FieldMask` represents a set of symbolic field paths, for example:
17
18
  *
@@ -11,7 +11,8 @@
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { Message, proto3 } from "../../index-runtime.js";
14
+ import { Message } from "../../message.js";
15
+ import { proto3 } from "../../proto3.js";
15
16
  /**
16
17
  * `SourceContext` represents information about the source of a
17
18
  * protobuf element, like the file in which it is defined.
@@ -11,7 +11,11 @@
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { Message, proto3 } from "../../index-runtime.js";
14
+ // @generated by protoc-gen-es v0.0.6 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts"
15
+ // @generated from file google/protobuf/struct.proto (package google.protobuf, syntax proto3)
16
+ /* eslint-disable */
17
+ import { proto3 } from "../../proto3.js";
18
+ import { Message } from "../../message.js";
15
19
  /**
16
20
  * `NullValue` is a singleton enumeration to represent the null value for the
17
21
  * `Value` type union.
@@ -11,7 +11,9 @@
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { Message, proto3, protoInt64 } from "../../index-runtime.js";
14
+ import { Message } from "../../message.js";
15
+ import { protoInt64 } from "../../proto-int64.js";
16
+ import { proto3 } from "../../proto3.js";
15
17
  /**
16
18
  * A Timestamp represents a point in time independent of any time zone or local
17
19
  * calendar, encoded as a count of seconds and fractions of seconds at
@@ -11,7 +11,11 @@
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { Message, proto3 } from "../../index-runtime.js";
14
+ // @generated by protoc-gen-es v0.0.6 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts"
15
+ // @generated from file google/protobuf/type.proto (package google.protobuf, syntax proto3)
16
+ /* eslint-disable */
17
+ import { proto3 } from "../../proto3.js";
18
+ import { Message } from "../../message.js";
15
19
  import { SourceContext } from "./source_context_pb.js";
16
20
  import { Any } from "./any_pb.js";
17
21
  /**
@@ -11,7 +11,10 @@
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { Message, ScalarType, proto3, protoInt64 } from "../../index-runtime.js";
14
+ import { Message } from "../../message.js";
15
+ import { proto3 } from "../../proto3.js";
16
+ import { ScalarType } from "../../field.js";
17
+ import { protoInt64 } from "../../proto-int64.js";
15
18
  /**
16
19
  * Wrapper message for `double`.
17
20
  *
package/dist/esm/index.js CHANGED
@@ -11,7 +11,28 @@
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- // To avoid circular imports when the wkt import from ./index.js, we
15
- // use a separate ./index-runtime.js
16
- export * from "./index-runtime.js";
17
- export * from "./index-wkt.js";
14
+ export { proto3 } from "./proto3.js";
15
+ export { proto2 } from "./proto2.js";
16
+ export { protoInt64 } from "./proto-int64.js";
17
+ export { protoBase64 } from "./proto-base64.js";
18
+ export { Message, } from "./message.js";
19
+ export { ScalarType } from "./field.js";
20
+ export { MethodKind, MethodIdempotency } from "./service-type.js";
21
+ export { TypeRegistry } from "./type-registry.js";
22
+ export { DescriptorRegistry } from "./descriptor-registry.js";
23
+ export { DescriptorSet } from "./descriptor-set.js";
24
+ export { WireType, BinaryWriter, BinaryReader } from "./binary-encoding.js";
25
+ export {} from "./json-format.js";
26
+ // ideally, we would export these types with sub-path exports:
27
+ export * from "./google/protobuf/compiler/plugin_pb.js";
28
+ export * from "./google/protobuf/api_pb.js";
29
+ export * from "./google/protobuf/any_pb.js";
30
+ export * from "./google/protobuf/descriptor_pb.js";
31
+ export * from "./google/protobuf/duration_pb.js";
32
+ export * from "./google/protobuf/empty_pb.js";
33
+ export * from "./google/protobuf/field_mask_pb.js";
34
+ export * from "./google/protobuf/source_context_pb.js";
35
+ export * from "./google/protobuf/struct_pb.js";
36
+ export * from "./google/protobuf/timestamp_pb.js";
37
+ export * from "./google/protobuf/type_pb.js";
38
+ export * from "./google/protobuf/wrappers_pb.js";
@@ -1,5 +1,9 @@
1
- import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, MessageType, PartialMessage, PlainMessage } from "../../index-runtime.js";
2
- import { Message } from "../../index-runtime.js";
1
+ import type { PartialMessage, PlainMessage } from "../../message.js";
2
+ import { Message } from "../../message.js";
3
+ import type { JsonReadOptions, JsonValue, JsonWriteOptions } from "../../json-format.js";
4
+ import type { MessageType } from "../../message-type.js";
5
+ import type { FieldList } from "../../field-list.js";
6
+ import type { BinaryReadOptions } from "../../binary-format.js";
3
7
  /**
4
8
  * `Any` contains an arbitrary serialized protocol buffer message along with a
5
9
  * URL that describes the type of the serialized message.