@aptre/protobuf-es-lite 0.2.7 → 0.2.9

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 +2 -2
  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 +9 -3
  46. package/dist/index.js +41 -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,42 @@
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.Any = exports.protobufPackage = void 0;
33
+ const __1 = require("../../");
34
+ exports.protobufPackage = "google.protobuf";
35
+ exports.Any = (0, __1.createMessageType)({
36
+ typeName: "google.protobuf.Any",
37
+ fields: [
38
+ { no: 1, name: "type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
39
+ { no: 2, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
40
+ ],
41
+ packedByDefault: true,
42
+ });
@@ -0,0 +1,252 @@
1
+ import type { MessageType } from "../../";
2
+ import { Message } from "../../";
3
+ import type { Syntax } from "./type.pb.js";
4
+ import { Option } from "./type.pb.js";
5
+ import { SourceContext } from "./source_context.pb.js";
6
+ export declare const protobufPackage = "google.protobuf";
7
+ /**
8
+ * Method represents a method of an API interface.
9
+ *
10
+ *
11
+ * @generated from message google.protobuf.Method
12
+ */
13
+ export type Method = Message<{
14
+ /**
15
+ * The simple name of this method.
16
+ *
17
+ *
18
+ * @generated from field: string name = 1 [packed = false, default = "", jstype = JS_NORMAL];
19
+ */
20
+ name?: string;
21
+ /**
22
+ * A URL of the input message type.
23
+ *
24
+ *
25
+ * @generated from field: string request_type_url = 2 [packed = false, default = "", jstype = JS_NORMAL];
26
+ */
27
+ requestTypeUrl?: string;
28
+ /**
29
+ * If true, the request is streamed.
30
+ *
31
+ *
32
+ * @generated from field: bool request_streaming = 3 [packed = false, default = , jstype = JS_NORMAL];
33
+ */
34
+ requestStreaming?: boolean;
35
+ /**
36
+ * The URL of the output message type.
37
+ *
38
+ *
39
+ * @generated from field: string response_type_url = 4 [packed = false, default = "", jstype = JS_NORMAL];
40
+ */
41
+ responseTypeUrl?: string;
42
+ /**
43
+ * If true, the response is streamed.
44
+ *
45
+ *
46
+ * @generated from field: bool response_streaming = 5 [packed = false, default = , jstype = JS_NORMAL];
47
+ */
48
+ responseStreaming?: boolean;
49
+ /**
50
+ * Any metadata attached to the method.
51
+ *
52
+ *
53
+ * @generated from field: repeated google.protobuf.Option options = 6 [packed = false, default = , jstype = JS_NORMAL];
54
+ */
55
+ options?: Option[];
56
+ /**
57
+ * The source syntax of this method.
58
+ *
59
+ *
60
+ * @generated from field: google.protobuf.Syntax syntax = 7 [packed = false, default = , jstype = JS_NORMAL];
61
+ */
62
+ syntax?: Syntax;
63
+ }>;
64
+ export declare const Method: MessageType<Method>;
65
+ /**
66
+ * Declares an API Interface to be included in this interface. The including
67
+ * interface must redeclare all the methods from the included interface, but
68
+ * documentation and options are inherited as follows:
69
+ *
70
+ * - If after comment and whitespace stripping, the documentation
71
+ * string of the redeclared method is empty, it will be inherited
72
+ * from the original method.
73
+ *
74
+ * - Each annotation belonging to the service config (http,
75
+ * visibility) which is not set in the redeclared method will be
76
+ * inherited.
77
+ *
78
+ * - If an http annotation is inherited, the path pattern will be
79
+ * modified as follows. Any version prefix will be replaced by the
80
+ * version of the including interface plus the [root][] path if
81
+ * specified.
82
+ *
83
+ * Example of a simple mixin:
84
+ *
85
+ * package google.acl.v1;
86
+ * service AccessControl {
87
+ * // Get the underlying ACL object.
88
+ * rpc GetAcl(GetAclRequest) returns (Acl) {
89
+ * option (google.api.http).get = "/v1/{resource=**}:getAcl";
90
+ * }
91
+ * }
92
+ *
93
+ * package google.storage.v2;
94
+ * service Storage {
95
+ * rpc GetAcl(GetAclRequest) returns (Acl);
96
+ *
97
+ * // Get a data record.
98
+ * rpc GetData(GetDataRequest) returns (Data) {
99
+ * option (google.api.http).get = "/v2/{resource=**}";
100
+ * }
101
+ * }
102
+ *
103
+ * Example of a mixin configuration:
104
+ *
105
+ * apis:
106
+ * - name: google.storage.v2.Storage
107
+ * mixins:
108
+ * - name: google.acl.v1.AccessControl
109
+ *
110
+ * The mixin construct implies that all methods in `AccessControl` are
111
+ * also declared with same name and request/response types in
112
+ * `Storage`. A documentation generator or annotation processor will
113
+ * see the effective `Storage.GetAcl` method after inherting
114
+ * documentation and annotations as follows:
115
+ *
116
+ * service Storage {
117
+ * // Get the underlying ACL object.
118
+ * rpc GetAcl(GetAclRequest) returns (Acl) {
119
+ * option (google.api.http).get = "/v2/{resource=**}:getAcl";
120
+ * }
121
+ * ...
122
+ * }
123
+ *
124
+ * Note how the version in the path pattern changed from `v1` to `v2`.
125
+ *
126
+ * If the `root` field in the mixin is specified, it should be a
127
+ * relative path under which inherited HTTP paths are placed. Example:
128
+ *
129
+ * apis:
130
+ * - name: google.storage.v2.Storage
131
+ * mixins:
132
+ * - name: google.acl.v1.AccessControl
133
+ * root: acls
134
+ *
135
+ * This implies the following inherited HTTP annotation:
136
+ *
137
+ * service Storage {
138
+ * // Get the underlying ACL object.
139
+ * rpc GetAcl(GetAclRequest) returns (Acl) {
140
+ * option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
141
+ * }
142
+ * ...
143
+ * }
144
+ *
145
+ *
146
+ * @generated from message google.protobuf.Mixin
147
+ */
148
+ export type Mixin = Message<{
149
+ /**
150
+ * The fully qualified name of the interface which is included.
151
+ *
152
+ *
153
+ * @generated from field: string name = 1 [packed = false, default = "", jstype = JS_NORMAL];
154
+ */
155
+ name?: string;
156
+ /**
157
+ * If non-empty specifies a path under which inherited HTTP paths
158
+ * are rooted.
159
+ *
160
+ *
161
+ * @generated from field: string root = 2 [packed = false, default = "", jstype = JS_NORMAL];
162
+ */
163
+ root?: string;
164
+ }>;
165
+ export declare const Mixin: MessageType<Mixin>;
166
+ /**
167
+ * Api is a light-weight descriptor for an API Interface.
168
+ *
169
+ * Interfaces are also described as "protocol buffer services" in some contexts,
170
+ * such as by the "service" keyword in a .proto file, but they are different
171
+ * from API Services, which represent a concrete implementation of an interface
172
+ * as opposed to simply a description of methods and bindings. They are also
173
+ * sometimes simply referred to as "APIs" in other contexts, such as the name of
174
+ * this message itself. See https://cloud.google.com/apis/design/glossary for
175
+ * detailed terminology.
176
+ *
177
+ *
178
+ * @generated from message google.protobuf.Api
179
+ */
180
+ export type Api = Message<{
181
+ /**
182
+ * The fully qualified name of this interface, including package name
183
+ * followed by the interface's simple name.
184
+ *
185
+ *
186
+ * @generated from field: string name = 1 [packed = false, default = "", jstype = JS_NORMAL];
187
+ */
188
+ name?: string;
189
+ /**
190
+ * The methods of this interface, in unspecified order.
191
+ *
192
+ *
193
+ * @generated from field: repeated google.protobuf.Method methods = 2 [packed = false, default = , jstype = JS_NORMAL];
194
+ */
195
+ methods?: Method[];
196
+ /**
197
+ * Any metadata attached to the interface.
198
+ *
199
+ *
200
+ * @generated from field: repeated google.protobuf.Option options = 3 [packed = false, default = , jstype = JS_NORMAL];
201
+ */
202
+ options?: Option[];
203
+ /**
204
+ * A version string for this interface. If specified, must have the form
205
+ * `major-version.minor-version`, as in `1.10`. If the minor version is
206
+ * omitted, it defaults to zero. If the entire version field is empty, the
207
+ * major version is derived from the package name, as outlined below. If the
208
+ * field is not empty, the version in the package name will be verified to be
209
+ * consistent with what is provided here.
210
+ *
211
+ * The versioning schema uses [semantic
212
+ * versioning](http://semver.org) where the major version number
213
+ * indicates a breaking change and the minor version an additive,
214
+ * non-breaking change. Both version numbers are signals to users
215
+ * what to expect from different versions, and should be carefully
216
+ * chosen based on the product plan.
217
+ *
218
+ * The major version is also reflected in the package name of the
219
+ * interface, which must end in `v<major-version>`, as in
220
+ * `google.feature.v1`. For major versions 0 and 1, the suffix can
221
+ * be omitted. Zero major versions must only be used for
222
+ * experimental, non-GA interfaces.
223
+ *
224
+ *
225
+ *
226
+ * @generated from field: string version = 4 [packed = false, default = "", jstype = JS_NORMAL];
227
+ */
228
+ version?: string;
229
+ /**
230
+ * Source context for the protocol buffer service represented by this
231
+ * message.
232
+ *
233
+ *
234
+ * @generated from field: google.protobuf.SourceContext source_context = 5 [packed = false, default = , jstype = JS_NORMAL];
235
+ */
236
+ sourceContext?: SourceContext;
237
+ /**
238
+ * Included interfaces. See [Mixin][].
239
+ *
240
+ *
241
+ * @generated from field: repeated google.protobuf.Mixin mixins = 6 [packed = false, default = , jstype = JS_NORMAL];
242
+ */
243
+ mixins?: Mixin[];
244
+ /**
245
+ * The source syntax of the service.
246
+ *
247
+ *
248
+ * @generated from field: google.protobuf.Syntax syntax = 7 [packed = false, default = , jstype = JS_NORMAL];
249
+ */
250
+ syntax?: Syntax;
251
+ }>;
252
+ export declare const Api: MessageType<Api>;
@@ -0,0 +1,70 @@
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.Api = exports.Mixin = exports.Method = exports.protobufPackage = void 0;
33
+ const __1 = require("../../");
34
+ const type_pb_js_1 = require("./type.pb.js");
35
+ const source_context_pb_js_1 = require("./source_context.pb.js");
36
+ exports.protobufPackage = "google.protobuf";
37
+ exports.Method = (0, __1.createMessageType)({
38
+ typeName: "google.protobuf.Method",
39
+ fields: [
40
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
41
+ { no: 2, name: "request_type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
42
+ { no: 3, name: "request_streaming", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
43
+ { no: 4, name: "response_type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
44
+ { no: 5, name: "response_streaming", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
45
+ { no: 6, name: "options", kind: "message", T: () => type_pb_js_1.Option, repeated: true },
46
+ { no: 7, name: "syntax", kind: "enum", T: type_pb_js_1.Syntax_Enum },
47
+ ],
48
+ packedByDefault: true,
49
+ });
50
+ exports.Mixin = (0, __1.createMessageType)({
51
+ typeName: "google.protobuf.Mixin",
52
+ fields: [
53
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
54
+ { no: 2, name: "root", kind: "scalar", T: 9 /* ScalarType.STRING */ },
55
+ ],
56
+ packedByDefault: true,
57
+ });
58
+ exports.Api = (0, __1.createMessageType)({
59
+ typeName: "google.protobuf.Api",
60
+ fields: [
61
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
62
+ { no: 2, name: "methods", kind: "message", T: () => exports.Method, repeated: true },
63
+ { no: 3, name: "options", kind: "message", T: () => type_pb_js_1.Option, repeated: true },
64
+ { no: 4, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
65
+ { no: 5, name: "source_context", kind: "message", T: () => source_context_pb_js_1.SourceContext },
66
+ { no: 6, name: "mixins", kind: "message", T: () => exports.Mixin, repeated: true },
67
+ { no: 7, name: "syntax", kind: "enum", T: type_pb_js_1.Syntax_Enum },
68
+ ],
69
+ packedByDefault: true,
70
+ });
@@ -0,0 +1,240 @@
1
+ import { MessageType } from "../../../";
2
+ import { FileDescriptorProto, GeneratedCodeInfo } from "../descriptor.pb.js";
3
+ export declare const protobufPackage = "google.protobuf.compiler";
4
+ /**
5
+ * Sync with code_generator.h.
6
+ *
7
+ * @generated from enum google.protobuf.compiler.CodeGeneratorResponse.Feature
8
+ */
9
+ export declare enum CodeGeneratorResponse_Feature {
10
+ /**
11
+ * @generated from enum value: FEATURE_NONE = 0;
12
+ */
13
+ NONE = 0,
14
+ /**
15
+ * @generated from enum value: FEATURE_PROTO3_OPTIONAL = 1;
16
+ */
17
+ PROTO3_OPTIONAL = 1,
18
+ /**
19
+ * @generated from enum value: FEATURE_SUPPORTS_EDITIONS = 2;
20
+ */
21
+ SUPPORTS_EDITIONS = 2
22
+ }
23
+ export declare const CodeGeneratorResponse_Feature_Enum: import("../../../enum").EnumType;
24
+ /**
25
+ * The version number of protocol compiler.
26
+ *
27
+ * @generated from message google.protobuf.compiler.Version
28
+ */
29
+ export interface Version {
30
+ /**
31
+ * @generated from field: optional int32 major = 1;
32
+ */
33
+ major?: number;
34
+ /**
35
+ * @generated from field: optional int32 minor = 2;
36
+ */
37
+ minor?: number;
38
+ /**
39
+ * @generated from field: optional int32 patch = 3;
40
+ */
41
+ patch?: number;
42
+ /**
43
+ * A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
44
+ * be empty for mainline stable releases.
45
+ *
46
+ * @generated from field: optional string suffix = 4;
47
+ */
48
+ suffix?: string;
49
+ }
50
+ export declare const Version: MessageType<Version>;
51
+ /**
52
+ * An encoded CodeGeneratorRequest is written to the plugin's stdin.
53
+ *
54
+ * @generated from message google.protobuf.compiler.CodeGeneratorRequest
55
+ */
56
+ export interface CodeGeneratorRequest {
57
+ /**
58
+ * The .proto files that were explicitly listed on the command-line. The
59
+ * code generator should generate code only for these files. Each file's
60
+ * descriptor will be included in proto_file, below.
61
+ *
62
+ * @generated from field: repeated string file_to_generate = 1;
63
+ */
64
+ fileToGenerate?: string[];
65
+ /**
66
+ * The generator parameter passed on the command-line.
67
+ *
68
+ * @generated from field: optional string parameter = 2;
69
+ */
70
+ parameter?: string;
71
+ /**
72
+ * FileDescriptorProtos for all files in files_to_generate and everything
73
+ * they import. The files will appear in topological order, so each file
74
+ * appears before any file that imports it.
75
+ *
76
+ * Note: the files listed in files_to_generate will include runtime-retention
77
+ * options only, but all other files will include source-retention options.
78
+ * The source_file_descriptors field below is available in case you need
79
+ * source-retention options for files_to_generate.
80
+ *
81
+ * protoc guarantees that all proto_files will be written after
82
+ * the fields above, even though this is not technically guaranteed by the
83
+ * protobuf wire format. This theoretically could allow a plugin to stream
84
+ * in the FileDescriptorProtos and handle them one by one rather than read
85
+ * the entire set into memory at once. However, as of this writing, this
86
+ * is not similarly optimized on protoc's end -- it will store all fields in
87
+ * memory at once before sending them to the plugin.
88
+ *
89
+ * Type names of fields and extensions in the FileDescriptorProto are always
90
+ * fully qualified.
91
+ *
92
+ * @generated from field: repeated google.protobuf.FileDescriptorProto proto_file = 15;
93
+ */
94
+ protoFile?: FileDescriptorProto[];
95
+ /**
96
+ * File descriptors with all options, including source-retention options.
97
+ * These descriptors are only provided for the files listed in
98
+ * files_to_generate.
99
+ *
100
+ * @generated from field: repeated google.protobuf.FileDescriptorProto source_file_descriptors = 17;
101
+ */
102
+ sourceFileDescriptors?: FileDescriptorProto[];
103
+ /**
104
+ * The version number of protocol compiler.
105
+ *
106
+ * @generated from field: optional google.protobuf.compiler.Version compiler_version = 3;
107
+ */
108
+ compilerVersion?: Version;
109
+ }
110
+ export declare const CodeGeneratorRequest: MessageType<CodeGeneratorRequest>;
111
+ /**
112
+ * Represents a single generated file.
113
+ *
114
+ * @generated from message google.protobuf.compiler.CodeGeneratorResponse.File
115
+ */
116
+ export interface CodeGeneratorResponse_File {
117
+ /**
118
+ * The file name, relative to the output directory. The name must not
119
+ * contain "." or ".." components and must be relative, not be absolute (so,
120
+ * the file cannot lie outside the output directory). "/" must be used as
121
+ * the path separator, not "\".
122
+ *
123
+ * If the name is omitted, the content will be appended to the previous
124
+ * file. This allows the generator to break large files into small chunks,
125
+ * and allows the generated text to be streamed back to protoc so that large
126
+ * files need not reside completely in memory at one time. Note that as of
127
+ * this writing protoc does not optimize for this -- it will read the entire
128
+ * CodeGeneratorResponse before writing files to disk.
129
+ *
130
+ * @generated from field: optional string name = 1;
131
+ */
132
+ name?: string;
133
+ /**
134
+ * If non-empty, indicates that the named file should already exist, and the
135
+ * content here is to be inserted into that file at a defined insertion
136
+ * point. This feature allows a code generator to extend the output
137
+ * produced by another code generator. The original generator may provide
138
+ * insertion points by placing special annotations in the file that look
139
+ * like:
140
+ * @@protoc_insertion_point(NAME)
141
+ * The annotation can have arbitrary text before and after it on the line,
142
+ * which allows it to be placed in a comment. NAME should be replaced with
143
+ * an identifier naming the point -- this is what other generators will use
144
+ * as the insertion_point. Code inserted at this point will be placed
145
+ * immediately above the line containing the insertion point (thus multiple
146
+ * insertions to the same point will come out in the order they were added).
147
+ * The double-@ is intended to make it unlikely that the generated code
148
+ * could contain things that look like insertion points by accident.
149
+ *
150
+ * For example, the C++ code generator places the following line in the
151
+ * .pb.h files that it generates:
152
+ * // @@protoc_insertion_point(namespace_scope)
153
+ * This line appears within the scope of the file's package namespace, but
154
+ * outside of any particular class. Another plugin can then specify the
155
+ * insertion_point "namespace_scope" to generate additional classes or
156
+ * other declarations that should be placed in this scope.
157
+ *
158
+ * Note that if the line containing the insertion point begins with
159
+ * whitespace, the same whitespace will be added to every line of the
160
+ * inserted text. This is useful for languages like Python, where
161
+ * indentation matters. In these languages, the insertion point comment
162
+ * should be indented the same amount as any inserted code will need to be
163
+ * in order to work correctly in that context.
164
+ *
165
+ * The code generator that generates the initial file and the one which
166
+ * inserts into it must both run as part of a single invocation of protoc.
167
+ * Code generators are executed in the order in which they appear on the
168
+ * command line.
169
+ *
170
+ * If |insertion_point| is present, |name| must also be present.
171
+ *
172
+ * @generated from field: optional string insertion_point = 2;
173
+ */
174
+ insertionPoint?: string;
175
+ /**
176
+ * The file contents.
177
+ *
178
+ * @generated from field: optional string content = 15;
179
+ */
180
+ content?: string;
181
+ /**
182
+ * Information describing the file content being inserted. If an insertion
183
+ * point is used, this information will be appropriately offset and inserted
184
+ * into the code generation metadata for the generated files.
185
+ *
186
+ * @generated from field: optional google.protobuf.GeneratedCodeInfo generated_code_info = 16;
187
+ */
188
+ generatedCodeInfo?: GeneratedCodeInfo;
189
+ }
190
+ export declare const CodeGeneratorResponse_File: MessageType<CodeGeneratorResponse_File>;
191
+ /**
192
+ * The plugin writes an encoded CodeGeneratorResponse to stdout.
193
+ *
194
+ * @generated from message google.protobuf.compiler.CodeGeneratorResponse
195
+ */
196
+ export interface CodeGeneratorResponse {
197
+ /**
198
+ * Error message. If non-empty, code generation failed. The plugin process
199
+ * should exit with status code zero even if it reports an error in this way.
200
+ *
201
+ * This should be used to indicate errors in .proto files which prevent the
202
+ * code generator from generating correct code. Errors which indicate a
203
+ * problem in protoc itself -- such as the input CodeGeneratorRequest being
204
+ * unparseable -- should be reported by writing a message to stderr and
205
+ * exiting with a non-zero status code.
206
+ *
207
+ * @generated from field: optional string error = 1;
208
+ */
209
+ error?: string;
210
+ /**
211
+ * A bitmask of supported features that the code generator supports.
212
+ * This is a bitwise "or" of values from the Feature enum.
213
+ *
214
+ * @generated from field: optional uint64 supported_features = 2;
215
+ */
216
+ supportedFeatures?: bigint;
217
+ /**
218
+ * The minimum edition this plugin supports. This will be treated as an
219
+ * Edition enum, but we want to allow unknown values. It should be specified
220
+ * according the edition enum value, *not* the edition number. Only takes
221
+ * effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
222
+ *
223
+ * @generated from field: optional int32 minimum_edition = 3;
224
+ */
225
+ minimumEdition?: number;
226
+ /**
227
+ * The maximum edition this plugin supports. This will be treated as an
228
+ * Edition enum, but we want to allow unknown values. It should be specified
229
+ * according the edition enum value, *not* the edition number. Only takes
230
+ * effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
231
+ *
232
+ * @generated from field: optional int32 maximum_edition = 4;
233
+ */
234
+ maximumEdition?: number;
235
+ /**
236
+ * @generated from field: repeated google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
237
+ */
238
+ file?: CodeGeneratorResponse_File[];
239
+ }
240
+ export declare const CodeGeneratorResponse: MessageType<CodeGeneratorResponse>;