@aptre/protobuf-es-lite 0.2.7 → 0.2.8

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 (121) hide show
  1. package/.ignore +1 -0
  2. package/README.md +23 -24
  3. package/bin/protoc-gen-es-lite +3 -3
  4. package/dist/binary-encoding.d.ts +420 -0
  5. package/dist/binary-encoding.js +437 -0
  6. package/dist/binary.d.ts +35 -2
  7. package/dist/binary.js +64 -65
  8. package/dist/codegen-info.d.ts +43 -0
  9. package/dist/codegen-info.js +72 -0
  10. package/dist/create-descriptor-set.d.ts +36 -0
  11. package/dist/create-descriptor-set.js +936 -0
  12. package/dist/descriptor-set.d.ts +672 -0
  13. package/dist/{editions.js → descriptor-set.js} +0 -11
  14. package/dist/enum.d.ts +35 -1
  15. package/dist/feature-set.d.ts +19 -0
  16. package/dist/feature-set.js +103 -0
  17. package/dist/field-wrapper.d.ts +7 -3
  18. package/dist/field-wrapper.js +30 -1
  19. package/dist/field.d.ts +8 -19
  20. package/dist/field.js +15 -117
  21. package/dist/google/index.d.ts +9 -0
  22. package/dist/google/index.js +41 -0
  23. package/dist/google/protobuf/any.pb.d.ts +139 -0
  24. package/dist/google/protobuf/any.pb.js +42 -0
  25. package/dist/google/protobuf/api.pb.d.ts +252 -0
  26. package/dist/google/protobuf/api.pb.js +70 -0
  27. package/dist/google/protobuf/compiler/plugin.pb.d.ts +240 -0
  28. package/dist/google/protobuf/compiler/plugin.pb.js +203 -0
  29. package/dist/google/protobuf/descriptor.pb.d.ts +2132 -0
  30. package/dist/google/protobuf/descriptor.pb.js +1080 -0
  31. package/dist/google/protobuf/duration.pb.d.ts +92 -0
  32. package/dist/google/protobuf/duration.pb.js +42 -0
  33. package/dist/google/protobuf/empty.pb.d.ts +18 -0
  34. package/dist/google/protobuf/empty.pb.js +39 -0
  35. package/dist/google/protobuf/source_context.pb.d.ts +21 -0
  36. package/dist/google/protobuf/source_context.pb.js +41 -0
  37. package/dist/google/protobuf/struct.pb.d.ts +121 -0
  38. package/dist/google/protobuf/struct.pb.js +83 -0
  39. package/dist/google/protobuf/timestamp.pb.d.ts +121 -0
  40. package/dist/google/protobuf/timestamp.pb.js +42 -0
  41. package/dist/google/protobuf/type.pb.d.ts +464 -0
  42. package/dist/google/protobuf/type.pb.js +338 -0
  43. package/dist/google/protobuf/wrappers.pb.d.ts +183 -0
  44. package/dist/google/protobuf/wrappers.pb.js +107 -0
  45. package/dist/index.d.ts +8 -3
  46. package/dist/index.js +38 -8
  47. package/dist/is-message.d.ts +10 -2
  48. package/dist/is-message.js +74 -3
  49. package/dist/json.d.ts +68 -1
  50. package/dist/json.js +57 -81
  51. package/dist/message.d.ts +30 -61
  52. package/dist/message.js +61 -20
  53. package/dist/names.d.ts +43 -0
  54. package/dist/names.js +276 -0
  55. package/dist/partial.js +14 -15
  56. package/dist/proto-base64.d.ts +18 -0
  57. package/dist/proto-base64.js +128 -0
  58. package/dist/proto-double.d.ts +5 -0
  59. package/dist/proto-double.js +29 -0
  60. package/dist/proto-int64.d.ts +95 -0
  61. package/dist/proto-int64.js +116 -0
  62. package/dist/protoc-gen-es-lite/protoc-gen-es-lite-plugin.d.ts +1 -0
  63. package/dist/{protoc-gen-es-lite-plugin.js → protoc-gen-es-lite/protoc-gen-es-lite-plugin.js} +2 -2
  64. package/dist/{typescript.d.ts → protoc-gen-es-lite/typescript.d.ts} +3 -2
  65. package/dist/{typescript.js → protoc-gen-es-lite/typescript.js} +46 -34
  66. package/dist/protoplugin/create-es-plugin.d.ts +83 -0
  67. package/dist/protoplugin/create-es-plugin.js +119 -0
  68. package/dist/protoplugin/ecmascript/file-preamble.d.ts +2 -0
  69. package/dist/protoplugin/ecmascript/file-preamble.js +74 -0
  70. package/dist/protoplugin/ecmascript/generated-file.d.ts +116 -0
  71. package/dist/protoplugin/ecmascript/generated-file.js +407 -0
  72. package/dist/protoplugin/ecmascript/import-path.d.ts +65 -0
  73. package/dist/protoplugin/ecmascript/import-path.js +156 -0
  74. package/dist/protoplugin/ecmascript/import-symbol.d.ts +39 -0
  75. package/dist/protoplugin/ecmascript/import-symbol.js +37 -0
  76. package/dist/protoplugin/ecmascript/index.d.ts +7 -0
  77. package/dist/protoplugin/ecmascript/index.js +20 -0
  78. package/dist/protoplugin/ecmascript/jsdoc.d.ts +14 -0
  79. package/dist/protoplugin/ecmascript/jsdoc.js +93 -0
  80. package/dist/protoplugin/ecmascript/opaque-printables.d.ts +27 -0
  81. package/dist/protoplugin/ecmascript/opaque-printables.js +15 -0
  82. package/dist/protoplugin/ecmascript/parameter.d.ts +13 -0
  83. package/dist/protoplugin/ecmascript/parameter.js +161 -0
  84. package/dist/protoplugin/ecmascript/reify-wkt.d.ts +100 -0
  85. package/dist/protoplugin/ecmascript/reify-wkt.js +170 -0
  86. package/dist/protoplugin/ecmascript/runtime-imports.d.ts +6 -0
  87. package/dist/protoplugin/ecmascript/runtime-imports.js +28 -0
  88. package/dist/protoplugin/ecmascript/schema.d.ts +43 -0
  89. package/dist/protoplugin/ecmascript/schema.js +73 -0
  90. package/dist/protoplugin/ecmascript/target.d.ts +4 -0
  91. package/dist/protoplugin/ecmascript/target.js +15 -0
  92. package/dist/protoplugin/ecmascript/transpile.d.ts +2 -0
  93. package/dist/protoplugin/ecmascript/transpile.js +149 -0
  94. package/dist/protoplugin/error.d.ts +6 -0
  95. package/dist/protoplugin/error.js +43 -0
  96. package/dist/protoplugin/index.d.ts +8 -0
  97. package/dist/protoplugin/index.js +20 -0
  98. package/dist/protoplugin/plugin.d.ts +18 -0
  99. package/dist/protoplugin/plugin.js +15 -0
  100. package/dist/protoplugin/run-node.d.ts +12 -0
  101. package/dist/protoplugin/run-node.js +83 -0
  102. package/dist/scalar.d.ts +53 -1
  103. package/dist/scalar.js +87 -22
  104. package/dist/service-type.d.ts +95 -0
  105. package/dist/service-type.js +53 -0
  106. package/dist/text-format.d.ts +4 -0
  107. package/dist/text-format.js +189 -0
  108. package/dist/type-registry.d.ts +43 -0
  109. package/dist/type-registry.js +15 -0
  110. package/dist/unknown.d.ts +1 -1
  111. package/dist/util.d.ts +2 -2
  112. package/dist/util.js +46 -44
  113. package/dist/varint.d.ts +70 -0
  114. package/dist/varint.js +324 -0
  115. package/example/example.pb.ts +87 -0
  116. package/example/example.proto +1 -0
  117. package/example/tsconfig.json +8 -2
  118. package/package.json +19 -12
  119. package/tsconfig.json +4 -4
  120. package/dist/editions.d.ts +0 -6
  121. package/dist/protoc-gen-es-lite-plugin.d.ts +0 -1
@@ -0,0 +1,338 @@
1
+ "use strict";
2
+ // Protocol Buffers - Google's data interchange format
3
+ // Copyright 2008 Google Inc. All rights reserved.
4
+ // https://developers.google.com/protocol-buffers/
5
+ //
6
+ // Redistribution and use in source and binary forms, with or without
7
+ // modification, are permitted provided that the following conditions are
8
+ // met:
9
+ //
10
+ // * Redistributions of source code must retain the above copyright
11
+ // notice, this list of conditions and the following disclaimer.
12
+ // * Redistributions in binary form must reproduce the above
13
+ // copyright notice, this list of conditions and the following disclaimer
14
+ // in the documentation and/or other materials provided with the
15
+ // distribution.
16
+ // * Neither the name of Google Inc. nor the names of its
17
+ // contributors may be used to endorse or promote products derived from
18
+ // this software without specific prior written permission.
19
+ //
20
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.Enum = exports.EnumValue = exports.Type = exports.Field = exports.Option = exports.Field_Cardinality_Enum = exports.Field_Cardinality = exports.Field_Kind_Enum = exports.Field_Kind = exports.Syntax_Enum = exports.Syntax = exports.protobufPackage = void 0;
33
+ const __1 = require("../../");
34
+ const any_pb_js_1 = require("./any.pb.js");
35
+ const source_context_pb_js_1 = require("./source_context.pb.js");
36
+ exports.protobufPackage = "google.protobuf";
37
+ /**
38
+ * The syntax in which a protocol buffer element is defined.
39
+ *
40
+ *
41
+ * @generated from enum google.protobuf.Syntax
42
+ */
43
+ var Syntax;
44
+ (function (Syntax) {
45
+ /**
46
+ * Syntax `proto2`.
47
+ *
48
+ *
49
+ * @generated from enum value: SYNTAX_PROTO2 = 0;
50
+ */
51
+ Syntax[Syntax["PROTO2"] = 0] = "PROTO2";
52
+ /**
53
+ * Syntax `proto3`.
54
+ *
55
+ *
56
+ * @generated from enum value: SYNTAX_PROTO3 = 1;
57
+ */
58
+ Syntax[Syntax["PROTO3"] = 1] = "PROTO3";
59
+ /**
60
+ * Syntax `editions`.
61
+ *
62
+ *
63
+ * @generated from enum value: SYNTAX_EDITIONS = 2;
64
+ */
65
+ Syntax[Syntax["EDITIONS"] = 2] = "EDITIONS";
66
+ })(Syntax || (exports.Syntax = Syntax = {}));
67
+ // Syntax_Enum is the enum type for Syntax.
68
+ exports.Syntax_Enum = (0, __1.createEnumType)("google.protobuf.Syntax", [
69
+ { no: 0, name: "SYNTAX_PROTO2" },
70
+ { no: 1, name: "SYNTAX_PROTO3" },
71
+ { no: 2, name: "SYNTAX_EDITIONS" },
72
+ ]);
73
+ /**
74
+ * Basic field types.
75
+ *
76
+ *
77
+ * @generated from enum google.protobuf.Field.Kind
78
+ */
79
+ var Field_Kind;
80
+ (function (Field_Kind) {
81
+ /**
82
+ * Field type unknown.
83
+ *
84
+ *
85
+ * @generated from enum value: TYPE_UNKNOWN = 0;
86
+ */
87
+ Field_Kind[Field_Kind["TYPE_UNKNOWN"] = 0] = "TYPE_UNKNOWN";
88
+ /**
89
+ * Field type double.
90
+ *
91
+ *
92
+ * @generated from enum value: TYPE_DOUBLE = 1;
93
+ */
94
+ Field_Kind[Field_Kind["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE";
95
+ /**
96
+ * Field type float.
97
+ *
98
+ *
99
+ * @generated from enum value: TYPE_FLOAT = 2;
100
+ */
101
+ Field_Kind[Field_Kind["TYPE_FLOAT"] = 2] = "TYPE_FLOAT";
102
+ /**
103
+ * Field type int64.
104
+ *
105
+ *
106
+ * @generated from enum value: TYPE_INT64 = 3;
107
+ */
108
+ Field_Kind[Field_Kind["TYPE_INT64"] = 3] = "TYPE_INT64";
109
+ /**
110
+ * Field type uint64.
111
+ *
112
+ *
113
+ * @generated from enum value: TYPE_UINT64 = 4;
114
+ */
115
+ Field_Kind[Field_Kind["TYPE_UINT64"] = 4] = "TYPE_UINT64";
116
+ /**
117
+ * Field type int32.
118
+ *
119
+ *
120
+ * @generated from enum value: TYPE_INT32 = 5;
121
+ */
122
+ Field_Kind[Field_Kind["TYPE_INT32"] = 5] = "TYPE_INT32";
123
+ /**
124
+ * Field type fixed64.
125
+ *
126
+ *
127
+ * @generated from enum value: TYPE_FIXED64 = 6;
128
+ */
129
+ Field_Kind[Field_Kind["TYPE_FIXED64"] = 6] = "TYPE_FIXED64";
130
+ /**
131
+ * Field type fixed32.
132
+ *
133
+ *
134
+ * @generated from enum value: TYPE_FIXED32 = 7;
135
+ */
136
+ Field_Kind[Field_Kind["TYPE_FIXED32"] = 7] = "TYPE_FIXED32";
137
+ /**
138
+ * Field type bool.
139
+ *
140
+ *
141
+ * @generated from enum value: TYPE_BOOL = 8;
142
+ */
143
+ Field_Kind[Field_Kind["TYPE_BOOL"] = 8] = "TYPE_BOOL";
144
+ /**
145
+ * Field type string.
146
+ *
147
+ *
148
+ * @generated from enum value: TYPE_STRING = 9;
149
+ */
150
+ Field_Kind[Field_Kind["TYPE_STRING"] = 9] = "TYPE_STRING";
151
+ /**
152
+ * Field type group. Proto2 syntax only, and deprecated.
153
+ *
154
+ *
155
+ * @generated from enum value: TYPE_GROUP = 10;
156
+ */
157
+ Field_Kind[Field_Kind["TYPE_GROUP"] = 10] = "TYPE_GROUP";
158
+ /**
159
+ * Field type message.
160
+ *
161
+ *
162
+ * @generated from enum value: TYPE_MESSAGE = 11;
163
+ */
164
+ Field_Kind[Field_Kind["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE";
165
+ /**
166
+ * Field type bytes.
167
+ *
168
+ *
169
+ * @generated from enum value: TYPE_BYTES = 12;
170
+ */
171
+ Field_Kind[Field_Kind["TYPE_BYTES"] = 12] = "TYPE_BYTES";
172
+ /**
173
+ * Field type uint32.
174
+ *
175
+ *
176
+ * @generated from enum value: TYPE_UINT32 = 13;
177
+ */
178
+ Field_Kind[Field_Kind["TYPE_UINT32"] = 13] = "TYPE_UINT32";
179
+ /**
180
+ * Field type enum.
181
+ *
182
+ *
183
+ * @generated from enum value: TYPE_ENUM = 14;
184
+ */
185
+ Field_Kind[Field_Kind["TYPE_ENUM"] = 14] = "TYPE_ENUM";
186
+ /**
187
+ * Field type sfixed32.
188
+ *
189
+ *
190
+ * @generated from enum value: TYPE_SFIXED32 = 15;
191
+ */
192
+ Field_Kind[Field_Kind["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32";
193
+ /**
194
+ * Field type sfixed64.
195
+ *
196
+ *
197
+ * @generated from enum value: TYPE_SFIXED64 = 16;
198
+ */
199
+ Field_Kind[Field_Kind["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64";
200
+ /**
201
+ * Field type sint32.
202
+ *
203
+ *
204
+ * @generated from enum value: TYPE_SINT32 = 17;
205
+ */
206
+ Field_Kind[Field_Kind["TYPE_SINT32"] = 17] = "TYPE_SINT32";
207
+ /**
208
+ * Field type sint64.
209
+ *
210
+ *
211
+ * @generated from enum value: TYPE_SINT64 = 18;
212
+ */
213
+ Field_Kind[Field_Kind["TYPE_SINT64"] = 18] = "TYPE_SINT64";
214
+ })(Field_Kind || (exports.Field_Kind = Field_Kind = {}));
215
+ // Field_Kind_Enum is the enum type for Field_Kind.
216
+ exports.Field_Kind_Enum = (0, __1.createEnumType)("google.protobuf.Field.Kind", [
217
+ { no: 0, name: "TYPE_UNKNOWN" },
218
+ { no: 1, name: "TYPE_DOUBLE" },
219
+ { no: 2, name: "TYPE_FLOAT" },
220
+ { no: 3, name: "TYPE_INT64" },
221
+ { no: 4, name: "TYPE_UINT64" },
222
+ { no: 5, name: "TYPE_INT32" },
223
+ { no: 6, name: "TYPE_FIXED64" },
224
+ { no: 7, name: "TYPE_FIXED32" },
225
+ { no: 8, name: "TYPE_BOOL" },
226
+ { no: 9, name: "TYPE_STRING" },
227
+ { no: 10, name: "TYPE_GROUP" },
228
+ { no: 11, name: "TYPE_MESSAGE" },
229
+ { no: 12, name: "TYPE_BYTES" },
230
+ { no: 13, name: "TYPE_UINT32" },
231
+ { no: 14, name: "TYPE_ENUM" },
232
+ { no: 15, name: "TYPE_SFIXED32" },
233
+ { no: 16, name: "TYPE_SFIXED64" },
234
+ { no: 17, name: "TYPE_SINT32" },
235
+ { no: 18, name: "TYPE_SINT64" },
236
+ ]);
237
+ /**
238
+ * Whether a field is optional, required, or repeated.
239
+ *
240
+ *
241
+ * @generated from enum google.protobuf.Field.Cardinality
242
+ */
243
+ var Field_Cardinality;
244
+ (function (Field_Cardinality) {
245
+ /**
246
+ * For fields with unknown cardinality.
247
+ *
248
+ *
249
+ * @generated from enum value: CARDINALITY_UNKNOWN = 0;
250
+ */
251
+ Field_Cardinality[Field_Cardinality["UNKNOWN"] = 0] = "UNKNOWN";
252
+ /**
253
+ * For optional fields.
254
+ *
255
+ *
256
+ * @generated from enum value: CARDINALITY_OPTIONAL = 1;
257
+ */
258
+ Field_Cardinality[Field_Cardinality["OPTIONAL"] = 1] = "OPTIONAL";
259
+ /**
260
+ * For required fields. Proto2 syntax only.
261
+ *
262
+ *
263
+ * @generated from enum value: CARDINALITY_REQUIRED = 2;
264
+ */
265
+ Field_Cardinality[Field_Cardinality["REQUIRED"] = 2] = "REQUIRED";
266
+ /**
267
+ * For repeated fields.
268
+ *
269
+ *
270
+ * @generated from enum value: CARDINALITY_REPEATED = 3;
271
+ */
272
+ Field_Cardinality[Field_Cardinality["REPEATED"] = 3] = "REPEATED";
273
+ })(Field_Cardinality || (exports.Field_Cardinality = Field_Cardinality = {}));
274
+ // Field_Cardinality_Enum is the enum type for Field_Cardinality.
275
+ exports.Field_Cardinality_Enum = (0, __1.createEnumType)("google.protobuf.Field.Cardinality", [
276
+ { no: 0, name: "CARDINALITY_UNKNOWN" },
277
+ { no: 1, name: "CARDINALITY_OPTIONAL" },
278
+ { no: 2, name: "CARDINALITY_REQUIRED" },
279
+ { no: 3, name: "CARDINALITY_REPEATED" },
280
+ ]);
281
+ exports.Option = (0, __1.createMessageType)({
282
+ typeName: "google.protobuf.Option",
283
+ fields: [
284
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
285
+ { no: 2, name: "value", kind: "message", T: () => any_pb_js_1.Any },
286
+ ],
287
+ packedByDefault: true,
288
+ });
289
+ exports.Field = (0, __1.createMessageType)({
290
+ typeName: "google.protobuf.Field",
291
+ fields: [
292
+ { no: 1, name: "kind", kind: "enum", T: exports.Field_Kind_Enum },
293
+ { no: 2, name: "cardinality", kind: "enum", T: exports.Field_Cardinality_Enum },
294
+ { no: 3, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
295
+ { no: 4, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
296
+ { no: 6, name: "type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
297
+ { no: 7, name: "oneof_index", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
298
+ { no: 8, name: "packed", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
299
+ { no: 9, name: "options", kind: "message", T: () => exports.Option, repeated: true },
300
+ { no: 10, name: "json_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
301
+ { no: 11, name: "default_value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
302
+ ],
303
+ packedByDefault: true,
304
+ });
305
+ exports.Type = (0, __1.createMessageType)({
306
+ typeName: "google.protobuf.Type",
307
+ fields: [
308
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
309
+ { no: 2, name: "fields", kind: "message", T: () => exports.Field, repeated: true },
310
+ { no: 3, name: "oneofs", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
311
+ { no: 4, name: "options", kind: "message", T: () => exports.Option, repeated: true },
312
+ { no: 5, name: "source_context", kind: "message", T: () => source_context_pb_js_1.SourceContext },
313
+ { no: 6, name: "syntax", kind: "enum", T: exports.Syntax_Enum },
314
+ { no: 7, name: "edition", kind: "scalar", T: 9 /* ScalarType.STRING */ },
315
+ ],
316
+ packedByDefault: true,
317
+ });
318
+ exports.EnumValue = (0, __1.createMessageType)({
319
+ typeName: "google.protobuf.EnumValue",
320
+ fields: [
321
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
322
+ { no: 2, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
323
+ { no: 3, name: "options", kind: "message", T: () => exports.Option, repeated: true },
324
+ ],
325
+ packedByDefault: true,
326
+ });
327
+ exports.Enum = (0, __1.createMessageType)({
328
+ typeName: "google.protobuf.Enum",
329
+ fields: [
330
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
331
+ { no: 2, name: "enumvalue", kind: "message", T: () => exports.EnumValue, repeated: true },
332
+ { no: 3, name: "options", kind: "message", T: () => exports.Option, repeated: true },
333
+ { no: 4, name: "source_context", kind: "message", T: () => source_context_pb_js_1.SourceContext },
334
+ { no: 5, name: "syntax", kind: "enum", T: exports.Syntax_Enum },
335
+ { no: 6, name: "edition", kind: "scalar", T: 9 /* ScalarType.STRING */ },
336
+ ],
337
+ packedByDefault: true,
338
+ });
@@ -0,0 +1,183 @@
1
+ import type { MessageType } from "../../";
2
+ import { Message } from "../../";
3
+ export declare const protobufPackage = "google.protobuf";
4
+ /**
5
+ * Wrapper message for `double`.
6
+ *
7
+ * The JSON representation for `DoubleValue` is JSON number.
8
+ *
9
+ * protobuf-go-lite:disable-text
10
+ *
11
+ *
12
+ * @generated from message google.protobuf.DoubleValue
13
+ */
14
+ export type DoubleValue = Message<{
15
+ /**
16
+ * The double value.
17
+ *
18
+ *
19
+ * @generated from field: double value = 1 [packed = false, default = , jstype = JS_NORMAL];
20
+ */
21
+ value?: number;
22
+ }>;
23
+ export declare const DoubleValue: MessageType<DoubleValue>;
24
+ /**
25
+ * Wrapper message for `float`.
26
+ *
27
+ * The JSON representation for `FloatValue` is JSON number.
28
+ *
29
+ * protobuf-go-lite:disable-text
30
+ *
31
+ *
32
+ * @generated from message google.protobuf.FloatValue
33
+ */
34
+ export type FloatValue = Message<{
35
+ /**
36
+ * The float value.
37
+ *
38
+ *
39
+ * @generated from field: float value = 1 [packed = false, default = , jstype = JS_NORMAL];
40
+ */
41
+ value?: number;
42
+ }>;
43
+ export declare const FloatValue: MessageType<FloatValue>;
44
+ /**
45
+ * Wrapper message for `int64`.
46
+ *
47
+ * The JSON representation for `Int64Value` is JSON string.
48
+ *
49
+ * protobuf-go-lite:disable-text
50
+ *
51
+ *
52
+ * @generated from message google.protobuf.Int64Value
53
+ */
54
+ export type Int64Value = Message<{
55
+ /**
56
+ * The int64 value.
57
+ *
58
+ *
59
+ * @generated from field: int64 value = 1 [packed = false, default = , jstype = JS_NORMAL];
60
+ */
61
+ value?: bigint;
62
+ }>;
63
+ export declare const Int64Value: MessageType<Int64Value>;
64
+ /**
65
+ * Wrapper message for `uint64`.
66
+ *
67
+ * The JSON representation for `UInt64Value` is JSON string.
68
+ *
69
+ * protobuf-go-lite:disable-text
70
+ *
71
+ *
72
+ * @generated from message google.protobuf.UInt64Value
73
+ */
74
+ export type UInt64Value = Message<{
75
+ /**
76
+ * The uint64 value.
77
+ *
78
+ *
79
+ * @generated from field: uint64 value = 1 [packed = false, default = , jstype = JS_NORMAL];
80
+ */
81
+ value?: bigint;
82
+ }>;
83
+ export declare const UInt64Value: MessageType<UInt64Value>;
84
+ /**
85
+ * Wrapper message for `int32`.
86
+ *
87
+ * The JSON representation for `Int32Value` is JSON number.
88
+ *
89
+ * protobuf-go-lite:disable-text
90
+ *
91
+ *
92
+ * @generated from message google.protobuf.Int32Value
93
+ */
94
+ export type Int32Value = Message<{
95
+ /**
96
+ * The int32 value.
97
+ *
98
+ *
99
+ * @generated from field: int32 value = 1 [packed = false, default = , jstype = JS_NORMAL];
100
+ */
101
+ value?: number;
102
+ }>;
103
+ export declare const Int32Value: MessageType<Int32Value>;
104
+ /**
105
+ * Wrapper message for `uint32`.
106
+ *
107
+ * The JSON representation for `UInt32Value` is JSON number.
108
+ *
109
+ * protobuf-go-lite:disable-text
110
+ *
111
+ *
112
+ * @generated from message google.protobuf.UInt32Value
113
+ */
114
+ export type UInt32Value = Message<{
115
+ /**
116
+ * The uint32 value.
117
+ *
118
+ *
119
+ * @generated from field: uint32 value = 1 [packed = false, default = , jstype = JS_NORMAL];
120
+ */
121
+ value?: number;
122
+ }>;
123
+ export declare const UInt32Value: MessageType<UInt32Value>;
124
+ /**
125
+ * Wrapper message for `bool`.
126
+ *
127
+ * The JSON representation for `BoolValue` is JSON `true` and `false`.
128
+ *
129
+ * protobuf-go-lite:disable-text
130
+ *
131
+ *
132
+ * @generated from message google.protobuf.BoolValue
133
+ */
134
+ export type BoolValue = Message<{
135
+ /**
136
+ * The bool value.
137
+ *
138
+ *
139
+ * @generated from field: bool value = 1 [packed = false, default = , jstype = JS_NORMAL];
140
+ */
141
+ value?: boolean;
142
+ }>;
143
+ export declare const BoolValue: MessageType<BoolValue>;
144
+ /**
145
+ * Wrapper message for `string`.
146
+ *
147
+ * The JSON representation for `StringValue` is JSON string.
148
+ *
149
+ * protobuf-go-lite:disable-text
150
+ *
151
+ *
152
+ * @generated from message google.protobuf.StringValue
153
+ */
154
+ export type StringValue = Message<{
155
+ /**
156
+ * The string value.
157
+ *
158
+ *
159
+ * @generated from field: string value = 1 [packed = false, default = "", jstype = JS_NORMAL];
160
+ */
161
+ value?: string;
162
+ }>;
163
+ export declare const StringValue: MessageType<StringValue>;
164
+ /**
165
+ * Wrapper message for `bytes`.
166
+ *
167
+ * The JSON representation for `BytesValue` is JSON string.
168
+ *
169
+ * protobuf-go-lite:disable-text
170
+ *
171
+ *
172
+ * @generated from message google.protobuf.BytesValue
173
+ */
174
+ export type BytesValue = Message<{
175
+ /**
176
+ * The bytes value.
177
+ *
178
+ *
179
+ * @generated from field: bytes value = 1 [packed = false, default = "", jstype = JS_NORMAL];
180
+ */
181
+ value?: Uint8Array;
182
+ }>;
183
+ export declare const BytesValue: MessageType<BytesValue>;
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ // Protocol Buffers - Google's data interchange format
3
+ // Copyright 2008 Google Inc. All rights reserved.
4
+ // https://developers.google.com/protocol-buffers/
5
+ //
6
+ // Redistribution and use in source and binary forms, with or without
7
+ // modification, are permitted provided that the following conditions are
8
+ // met:
9
+ //
10
+ // * Redistributions of source code must retain the above copyright
11
+ // notice, this list of conditions and the following disclaimer.
12
+ // * Redistributions in binary form must reproduce the above
13
+ // copyright notice, this list of conditions and the following disclaimer
14
+ // in the documentation and/or other materials provided with the
15
+ // distribution.
16
+ // * Neither the name of Google Inc. nor the names of its
17
+ // contributors may be used to endorse or promote products derived from
18
+ // this software without specific prior written permission.
19
+ //
20
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ //
32
+ // Wrappers for primitive (non-message) types. These types are useful
33
+ // for embedding primitives in the `google.protobuf.Any` type and for places
34
+ // where we need to distinguish between the absence of a primitive
35
+ // typed field and its default value.
36
+ //
37
+ // These wrappers have no meaningful use within repeated fields as they lack
38
+ // the ability to detect presence on individual elements.
39
+ // These wrappers have no meaningful use within a map or a oneof since
40
+ // individual entries of a map or fields of a oneof can already detect presence.
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.BytesValue = exports.StringValue = exports.BoolValue = exports.UInt32Value = exports.Int32Value = exports.UInt64Value = exports.Int64Value = exports.FloatValue = exports.DoubleValue = exports.protobufPackage = void 0;
43
+ const __1 = require("../../");
44
+ exports.protobufPackage = "google.protobuf";
45
+ exports.DoubleValue = (0, __1.createMessageType)({
46
+ typeName: "google.protobuf.DoubleValue",
47
+ fields: [
48
+ { no: 1, name: "value", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
49
+ ],
50
+ packedByDefault: true,
51
+ });
52
+ exports.FloatValue = (0, __1.createMessageType)({
53
+ typeName: "google.protobuf.FloatValue",
54
+ fields: [
55
+ { no: 1, name: "value", kind: "scalar", T: 2 /* ScalarType.FLOAT */ },
56
+ ],
57
+ packedByDefault: true,
58
+ });
59
+ exports.Int64Value = (0, __1.createMessageType)({
60
+ typeName: "google.protobuf.Int64Value",
61
+ fields: [
62
+ { no: 1, name: "value", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
63
+ ],
64
+ packedByDefault: true,
65
+ });
66
+ exports.UInt64Value = (0, __1.createMessageType)({
67
+ typeName: "google.protobuf.UInt64Value",
68
+ fields: [
69
+ { no: 1, name: "value", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
70
+ ],
71
+ packedByDefault: true,
72
+ });
73
+ exports.Int32Value = (0, __1.createMessageType)({
74
+ typeName: "google.protobuf.Int32Value",
75
+ fields: [
76
+ { no: 1, name: "value", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
77
+ ],
78
+ packedByDefault: true,
79
+ });
80
+ exports.UInt32Value = (0, __1.createMessageType)({
81
+ typeName: "google.protobuf.UInt32Value",
82
+ fields: [
83
+ { no: 1, name: "value", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
84
+ ],
85
+ packedByDefault: true,
86
+ });
87
+ exports.BoolValue = (0, __1.createMessageType)({
88
+ typeName: "google.protobuf.BoolValue",
89
+ fields: [
90
+ { no: 1, name: "value", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
91
+ ],
92
+ packedByDefault: true,
93
+ });
94
+ exports.StringValue = (0, __1.createMessageType)({
95
+ typeName: "google.protobuf.StringValue",
96
+ fields: [
97
+ { no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
98
+ ],
99
+ packedByDefault: true,
100
+ });
101
+ exports.BytesValue = (0, __1.createMessageType)({
102
+ typeName: "google.protobuf.BytesValue",
103
+ fields: [
104
+ { no: 1, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
105
+ ],
106
+ packedByDefault: true,
107
+ });
package/dist/index.d.ts CHANGED
@@ -1,6 +1,11 @@
1
- export { EnumType, EnumValue, EnumValueInfo, ScalarType, WireType, LongType, } from "@bufbuild/protobuf";
2
- export { Message, CompleteMessage, AnyMessage, MessageType, Field, CompleteField, compareMessages, createMessageType, } from "./message.js";
1
+ export { Message, CompleteMessage, AnyMessage, MessageType, Field, compareMessages, createMessageType, } from "./message.js";
3
2
  export { isCompleteMessage, isCompleteField } from "./is-message.js";
4
- export { newFieldList, FieldList, PartialFieldInfo, FieldInfo, OneofInfo, fieldJsonName, localFieldName, localOneofName, } from "./field.js";
3
+ export { newFieldList, FieldList, PartialFieldInfo, FieldInfo, OneofInfo, fieldJsonName, } from "./field.js";
5
4
  export { scalarEquals, scalarZeroValue, isScalarZeroValue } from "./scalar.js";
6
5
  export { createEnumType, normalizeEnumValue } from "./enum.js";
6
+ export { localName, localFieldName, localOneofName, findEnumSharedPrefix, camelToSnakeCase, protoCamelCase, safeObjectProperty, safeIdentifier, } from "./names.js";
7
+ export { int64FromString, int64ToString, uInt64ToString } from "./varint.js";
8
+ export { protoInt64 } from "./proto-int64.js";
9
+ export { protoBase64 } from "./proto-base64.js";
10
+ export { protoDouble } from "./proto-double.js";
11
+ export { Timestamp, Duration, Any, Empty, DoubleValue, FloatValue, Int64Value, UInt64Value, Int32Value, UInt32Value, BoolValue, StringValue, BytesValue, Value, NullValue, ListValue, Struct, } from "./google/index.js";