@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,8 @@
14
14
  // limitations under the License.
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.Any = 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");
18
19
  /**
19
20
  * `Any` contains an arbitrary serialized protocol buffer message along with a
20
21
  * URL that describes the type of the serialized message.
@@ -102,7 +103,7 @@ const index_runtime_js_1 = require("../../index-runtime.js");
102
103
  *
103
104
  * @generated from message google.protobuf.Any
104
105
  */
105
- class Any extends index_runtime_js_1.Message {
106
+ class Any extends message_js_1.Message {
106
107
  constructor(data) {
107
108
  super();
108
109
  /**
@@ -144,7 +145,7 @@ class Any extends index_runtime_js_1.Message {
144
145
  * @generated from field: bytes value = 2;
145
146
  */
146
147
  this.value = new Uint8Array(0);
147
- index_runtime_js_1.proto3.util.initPartial(data, this);
148
+ proto3_js_1.proto3.util.initPartial(data, this);
148
149
  }
149
150
  toJson(options) {
150
151
  if (this.typeUrl === "") {
@@ -230,13 +231,13 @@ class Any extends index_runtime_js_1.Message {
230
231
  return new Any().fromJsonString(jsonString, options);
231
232
  }
232
233
  static equals(a, b) {
233
- return index_runtime_js_1.proto3.util.equals(Any, a, b);
234
+ return proto3_js_1.proto3.util.equals(Any, a, b);
234
235
  }
235
236
  }
236
237
  exports.Any = Any;
237
- Any.runtime = index_runtime_js_1.proto3;
238
+ Any.runtime = proto3_js_1.proto3;
238
239
  Any.typeName = "google.protobuf.Any";
239
- Any.fields = index_runtime_js_1.proto3.util.newFieldList(() => [
240
+ Any.fields = proto3_js_1.proto3.util.newFieldList(() => [
240
241
  { no: 1, name: "type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
241
242
  { no: 2, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
242
243
  ]);
@@ -14,9 +14,10 @@
14
14
  // limitations under the License.
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.Mixin = exports.Method = exports.Api = void 0;
17
- const index_runtime_js_1 = require("../../index-runtime.js");
17
+ const message_js_1 = require("../../message.js");
18
18
  const type_pb_js_1 = require("./type_pb.js");
19
19
  const source_context_pb_js_1 = require("./source_context_pb.js");
20
+ const proto3_js_1 = require("../../proto3.js");
20
21
  /**
21
22
  * Api is a light-weight descriptor for an API Interface.
22
23
  *
@@ -30,7 +31,7 @@ const source_context_pb_js_1 = require("./source_context_pb.js");
30
31
  *
31
32
  * @generated from message google.protobuf.Api
32
33
  */
33
- class Api extends index_runtime_js_1.Message {
34
+ class Api extends message_js_1.Message {
34
35
  constructor(data) {
35
36
  super();
36
37
  /**
@@ -90,7 +91,7 @@ class Api extends index_runtime_js_1.Message {
90
91
  * @generated from field: google.protobuf.Syntax syntax = 7;
91
92
  */
92
93
  this.syntax = type_pb_js_1.Syntax.PROTO2;
93
- index_runtime_js_1.proto3.util.initPartial(data, this);
94
+ proto3_js_1.proto3.util.initPartial(data, this);
94
95
  }
95
96
  static fromBinary(bytes, options) {
96
97
  return new Api().fromBinary(bytes, options);
@@ -102,27 +103,27 @@ class Api extends index_runtime_js_1.Message {
102
103
  return new Api().fromJsonString(jsonString, options);
103
104
  }
104
105
  static equals(a, b) {
105
- return index_runtime_js_1.proto3.util.equals(Api, a, b);
106
+ return proto3_js_1.proto3.util.equals(Api, a, b);
106
107
  }
107
108
  }
108
109
  exports.Api = Api;
109
- Api.runtime = index_runtime_js_1.proto3;
110
+ Api.runtime = proto3_js_1.proto3;
110
111
  Api.typeName = "google.protobuf.Api";
111
- Api.fields = index_runtime_js_1.proto3.util.newFieldList(() => [
112
+ Api.fields = proto3_js_1.proto3.util.newFieldList(() => [
112
113
  { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
113
114
  { no: 2, name: "methods", kind: "message", T: Method, repeated: true },
114
115
  { no: 3, name: "options", kind: "message", T: type_pb_js_1.Option, repeated: true },
115
116
  { no: 4, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
116
117
  { no: 5, name: "source_context", kind: "message", T: source_context_pb_js_1.SourceContext },
117
118
  { no: 6, name: "mixins", kind: "message", T: Mixin, repeated: true },
118
- { no: 7, name: "syntax", kind: "enum", T: index_runtime_js_1.proto3.getEnumType(type_pb_js_1.Syntax) },
119
+ { no: 7, name: "syntax", kind: "enum", T: proto3_js_1.proto3.getEnumType(type_pb_js_1.Syntax) },
119
120
  ]);
120
121
  /**
121
122
  * Method represents a method of an API interface.
122
123
  *
123
124
  * @generated from message google.protobuf.Method
124
125
  */
125
- class Method extends index_runtime_js_1.Message {
126
+ class Method extends message_js_1.Message {
126
127
  constructor(data) {
127
128
  super();
128
129
  /**
@@ -167,7 +168,7 @@ class Method extends index_runtime_js_1.Message {
167
168
  * @generated from field: google.protobuf.Syntax syntax = 7;
168
169
  */
169
170
  this.syntax = type_pb_js_1.Syntax.PROTO2;
170
- index_runtime_js_1.proto3.util.initPartial(data, this);
171
+ proto3_js_1.proto3.util.initPartial(data, this);
171
172
  }
172
173
  static fromBinary(bytes, options) {
173
174
  return new Method().fromBinary(bytes, options);
@@ -179,20 +180,20 @@ class Method extends index_runtime_js_1.Message {
179
180
  return new Method().fromJsonString(jsonString, options);
180
181
  }
181
182
  static equals(a, b) {
182
- return index_runtime_js_1.proto3.util.equals(Method, a, b);
183
+ return proto3_js_1.proto3.util.equals(Method, a, b);
183
184
  }
184
185
  }
185
186
  exports.Method = Method;
186
- Method.runtime = index_runtime_js_1.proto3;
187
+ Method.runtime = proto3_js_1.proto3;
187
188
  Method.typeName = "google.protobuf.Method";
188
- Method.fields = index_runtime_js_1.proto3.util.newFieldList(() => [
189
+ Method.fields = proto3_js_1.proto3.util.newFieldList(() => [
189
190
  { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
190
191
  { no: 2, name: "request_type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
191
192
  { no: 3, name: "request_streaming", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
192
193
  { no: 4, name: "response_type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
193
194
  { no: 5, name: "response_streaming", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
194
195
  { no: 6, name: "options", kind: "message", T: type_pb_js_1.Option, repeated: true },
195
- { no: 7, name: "syntax", kind: "enum", T: index_runtime_js_1.proto3.getEnumType(type_pb_js_1.Syntax) },
196
+ { no: 7, name: "syntax", kind: "enum", T: proto3_js_1.proto3.getEnumType(type_pb_js_1.Syntax) },
196
197
  ]);
197
198
  /**
198
199
  * Declares an API Interface to be included in this interface. The including
@@ -276,7 +277,7 @@ Method.fields = index_runtime_js_1.proto3.util.newFieldList(() => [
276
277
  *
277
278
  * @generated from message google.protobuf.Mixin
278
279
  */
279
- class Mixin extends index_runtime_js_1.Message {
280
+ class Mixin extends message_js_1.Message {
280
281
  constructor(data) {
281
282
  super();
282
283
  /**
@@ -292,7 +293,7 @@ class Mixin extends index_runtime_js_1.Message {
292
293
  * @generated from field: string root = 2;
293
294
  */
294
295
  this.root = "";
295
- index_runtime_js_1.proto3.util.initPartial(data, this);
296
+ proto3_js_1.proto3.util.initPartial(data, this);
296
297
  }
297
298
  static fromBinary(bytes, options) {
298
299
  return new Mixin().fromBinary(bytes, options);
@@ -304,13 +305,13 @@ class Mixin extends index_runtime_js_1.Message {
304
305
  return new Mixin().fromJsonString(jsonString, options);
305
306
  }
306
307
  static equals(a, b) {
307
- return index_runtime_js_1.proto3.util.equals(Mixin, a, b);
308
+ return proto3_js_1.proto3.util.equals(Mixin, a, b);
308
309
  }
309
310
  }
310
311
  exports.Mixin = Mixin;
311
- Mixin.runtime = index_runtime_js_1.proto3;
312
+ Mixin.runtime = proto3_js_1.proto3;
312
313
  Mixin.typeName = "google.protobuf.Mixin";
313
- Mixin.fields = index_runtime_js_1.proto3.util.newFieldList(() => [
314
+ Mixin.fields = proto3_js_1.proto3.util.newFieldList(() => [
314
315
  { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
315
316
  { no: 2, name: "root", kind: "scalar", T: 9 /* ScalarType.STRING */ },
316
317
  ]);
@@ -14,17 +14,18 @@
14
14
  // limitations under the License.
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.CodeGeneratorResponse_File = exports.CodeGeneratorResponse_Feature = exports.CodeGeneratorResponse = exports.CodeGeneratorRequest = exports.Version = void 0;
17
- const index_runtime_js_1 = require("../../../index-runtime.js");
17
+ const message_js_1 = require("../../../message.js");
18
+ const proto2_js_1 = require("../../../proto2.js");
18
19
  const descriptor_pb_js_1 = require("../descriptor_pb.js");
19
20
  /**
20
21
  * The version number of protocol compiler.
21
22
  *
22
23
  * @generated from message google.protobuf.compiler.Version
23
24
  */
24
- class Version extends index_runtime_js_1.Message {
25
+ class Version extends message_js_1.Message {
25
26
  constructor(data) {
26
27
  super();
27
- index_runtime_js_1.proto2.util.initPartial(data, this);
28
+ proto2_js_1.proto2.util.initPartial(data, this);
28
29
  }
29
30
  static fromBinary(bytes, options) {
30
31
  return new Version().fromBinary(bytes, options);
@@ -36,13 +37,13 @@ class Version extends index_runtime_js_1.Message {
36
37
  return new Version().fromJsonString(jsonString, options);
37
38
  }
38
39
  static equals(a, b) {
39
- return index_runtime_js_1.proto2.util.equals(Version, a, b);
40
+ return proto2_js_1.proto2.util.equals(Version, a, b);
40
41
  }
41
42
  }
42
43
  exports.Version = Version;
43
- Version.runtime = index_runtime_js_1.proto2;
44
+ Version.runtime = proto2_js_1.proto2;
44
45
  Version.typeName = "google.protobuf.compiler.Version";
45
- Version.fields = index_runtime_js_1.proto2.util.newFieldList(() => [
46
+ Version.fields = proto2_js_1.proto2.util.newFieldList(() => [
46
47
  { no: 1, name: "major", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
47
48
  { no: 2, name: "minor", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
48
49
  { no: 3, name: "patch", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
@@ -53,7 +54,7 @@ Version.fields = index_runtime_js_1.proto2.util.newFieldList(() => [
53
54
  *
54
55
  * @generated from message google.protobuf.compiler.CodeGeneratorRequest
55
56
  */
56
- class CodeGeneratorRequest extends index_runtime_js_1.Message {
57
+ class CodeGeneratorRequest extends message_js_1.Message {
57
58
  constructor(data) {
58
59
  super();
59
60
  /**
@@ -83,7 +84,7 @@ class CodeGeneratorRequest extends index_runtime_js_1.Message {
83
84
  * @generated from field: repeated google.protobuf.FileDescriptorProto proto_file = 15;
84
85
  */
85
86
  this.protoFile = [];
86
- index_runtime_js_1.proto2.util.initPartial(data, this);
87
+ proto2_js_1.proto2.util.initPartial(data, this);
87
88
  }
88
89
  static fromBinary(bytes, options) {
89
90
  return new CodeGeneratorRequest().fromBinary(bytes, options);
@@ -95,13 +96,13 @@ class CodeGeneratorRequest extends index_runtime_js_1.Message {
95
96
  return new CodeGeneratorRequest().fromJsonString(jsonString, options);
96
97
  }
97
98
  static equals(a, b) {
98
- return index_runtime_js_1.proto2.util.equals(CodeGeneratorRequest, a, b);
99
+ return proto2_js_1.proto2.util.equals(CodeGeneratorRequest, a, b);
99
100
  }
100
101
  }
101
102
  exports.CodeGeneratorRequest = CodeGeneratorRequest;
102
- CodeGeneratorRequest.runtime = index_runtime_js_1.proto2;
103
+ CodeGeneratorRequest.runtime = proto2_js_1.proto2;
103
104
  CodeGeneratorRequest.typeName = "google.protobuf.compiler.CodeGeneratorRequest";
104
- CodeGeneratorRequest.fields = index_runtime_js_1.proto2.util.newFieldList(() => [
105
+ CodeGeneratorRequest.fields = proto2_js_1.proto2.util.newFieldList(() => [
105
106
  { no: 1, name: "file_to_generate", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
106
107
  { no: 2, name: "parameter", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
107
108
  { no: 15, name: "proto_file", kind: "message", T: descriptor_pb_js_1.FileDescriptorProto, repeated: true },
@@ -112,14 +113,14 @@ CodeGeneratorRequest.fields = index_runtime_js_1.proto2.util.newFieldList(() =>
112
113
  *
113
114
  * @generated from message google.protobuf.compiler.CodeGeneratorResponse
114
115
  */
115
- class CodeGeneratorResponse extends index_runtime_js_1.Message {
116
+ class CodeGeneratorResponse extends message_js_1.Message {
116
117
  constructor(data) {
117
118
  super();
118
119
  /**
119
120
  * @generated from field: repeated google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
120
121
  */
121
122
  this.file = [];
122
- index_runtime_js_1.proto2.util.initPartial(data, this);
123
+ proto2_js_1.proto2.util.initPartial(data, this);
123
124
  }
124
125
  static fromBinary(bytes, options) {
125
126
  return new CodeGeneratorResponse().fromBinary(bytes, options);
@@ -131,13 +132,13 @@ class CodeGeneratorResponse extends index_runtime_js_1.Message {
131
132
  return new CodeGeneratorResponse().fromJsonString(jsonString, options);
132
133
  }
133
134
  static equals(a, b) {
134
- return index_runtime_js_1.proto2.util.equals(CodeGeneratorResponse, a, b);
135
+ return proto2_js_1.proto2.util.equals(CodeGeneratorResponse, a, b);
135
136
  }
136
137
  }
137
138
  exports.CodeGeneratorResponse = CodeGeneratorResponse;
138
- CodeGeneratorResponse.runtime = index_runtime_js_1.proto2;
139
+ CodeGeneratorResponse.runtime = proto2_js_1.proto2;
139
140
  CodeGeneratorResponse.typeName = "google.protobuf.compiler.CodeGeneratorResponse";
140
- CodeGeneratorResponse.fields = index_runtime_js_1.proto2.util.newFieldList(() => [
141
+ CodeGeneratorResponse.fields = proto2_js_1.proto2.util.newFieldList(() => [
141
142
  { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
142
143
  { no: 2, name: "supported_features", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
143
144
  { no: 15, name: "file", kind: "message", T: CodeGeneratorResponse_File, repeated: true },
@@ -159,7 +160,7 @@ var CodeGeneratorResponse_Feature;
159
160
  CodeGeneratorResponse_Feature[CodeGeneratorResponse_Feature["PROTO3_OPTIONAL"] = 1] = "PROTO3_OPTIONAL";
160
161
  })(CodeGeneratorResponse_Feature = exports.CodeGeneratorResponse_Feature || (exports.CodeGeneratorResponse_Feature = {}));
161
162
  // Retrieve enum metadata with: proto2.getEnumType(CodeGeneratorResponse_Feature)
162
- index_runtime_js_1.proto2.util.setEnumType(CodeGeneratorResponse_Feature, "google.protobuf.compiler.CodeGeneratorResponse.Feature", [
163
+ proto2_js_1.proto2.util.setEnumType(CodeGeneratorResponse_Feature, "google.protobuf.compiler.CodeGeneratorResponse.Feature", [
163
164
  { no: 0, name: "FEATURE_NONE" },
164
165
  { no: 1, name: "FEATURE_PROTO3_OPTIONAL" },
165
166
  ]);
@@ -168,10 +169,10 @@ index_runtime_js_1.proto2.util.setEnumType(CodeGeneratorResponse_Feature, "googl
168
169
  *
169
170
  * @generated from message google.protobuf.compiler.CodeGeneratorResponse.File
170
171
  */
171
- class CodeGeneratorResponse_File extends index_runtime_js_1.Message {
172
+ class CodeGeneratorResponse_File extends message_js_1.Message {
172
173
  constructor(data) {
173
174
  super();
174
- index_runtime_js_1.proto2.util.initPartial(data, this);
175
+ proto2_js_1.proto2.util.initPartial(data, this);
175
176
  }
176
177
  static fromBinary(bytes, options) {
177
178
  return new CodeGeneratorResponse_File().fromBinary(bytes, options);
@@ -183,13 +184,13 @@ class CodeGeneratorResponse_File extends index_runtime_js_1.Message {
183
184
  return new CodeGeneratorResponse_File().fromJsonString(jsonString, options);
184
185
  }
185
186
  static equals(a, b) {
186
- return index_runtime_js_1.proto2.util.equals(CodeGeneratorResponse_File, a, b);
187
+ return proto2_js_1.proto2.util.equals(CodeGeneratorResponse_File, a, b);
187
188
  }
188
189
  }
189
190
  exports.CodeGeneratorResponse_File = CodeGeneratorResponse_File;
190
- CodeGeneratorResponse_File.runtime = index_runtime_js_1.proto2;
191
+ CodeGeneratorResponse_File.runtime = proto2_js_1.proto2;
191
192
  CodeGeneratorResponse_File.typeName = "google.protobuf.compiler.CodeGeneratorResponse.File";
192
- CodeGeneratorResponse_File.fields = index_runtime_js_1.proto2.util.newFieldList(() => [
193
+ CodeGeneratorResponse_File.fields = proto2_js_1.proto2.util.newFieldList(() => [
193
194
  { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
194
195
  { no: 2, name: "insertion_point", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
195
196
  { no: 15, name: "content", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },