@aptre/protobuf-es-lite 0.2.6 → 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 +25 -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 +69 -66
  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 +76 -3
  49. package/dist/json.d.ts +68 -1
  50. package/dist/json.js +60 -81
  51. package/dist/message.d.ts +30 -61
  52. package/dist/message.js +63 -18
  53. package/dist/names.d.ts +43 -0
  54. package/dist/names.js +276 -0
  55. package/dist/partial.js +19 -16
  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} +48 -36
  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,203 @@
1
+ "use strict";
2
+ // Protocol Buffers - Google's data interchange format
3
+ // Copyright 2008 Google Inc. All rights reserved.
4
+ //
5
+ // Use of this source code is governed by a BSD-style
6
+ // license that can be found in the LICENSE file or at
7
+ // https://developers.google.com/open-source/licenses/bsd
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.CodeGeneratorResponse = exports.CodeGeneratorResponse_File = exports.CodeGeneratorRequest = exports.Version = exports.CodeGeneratorResponse_Feature_Enum = exports.CodeGeneratorResponse_Feature = exports.protobufPackage = void 0;
10
+ // Author: kenton@google.com (Kenton Varda)
11
+ //
12
+ // protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is
13
+ // just a program that reads a CodeGeneratorRequest from stdin and writes a
14
+ // CodeGeneratorResponse to stdout.
15
+ //
16
+ // Plugins written using C++ can use google/protobuf/compiler/plugin.h instead
17
+ // of dealing with the raw protocol defined here.
18
+ //
19
+ // A plugin executable needs only to be placed somewhere in the path. The
20
+ // plugin should be named "protoc-gen-$NAME", and will then be used when the
21
+ // flag "--${NAME}_out" is passed to protoc.
22
+ // @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"
23
+ // @generated from file google/protobuf/compiler/plugin.proto (package google.protobuf.compiler, syntax proto2)
24
+ /* eslint-disable */
25
+ const __1 = require("../../../");
26
+ const descriptor_pb_js_1 = require("../descriptor.pb.js");
27
+ exports.protobufPackage = "google.protobuf.compiler";
28
+ /**
29
+ * Sync with code_generator.h.
30
+ *
31
+ * @generated from enum google.protobuf.compiler.CodeGeneratorResponse.Feature
32
+ */
33
+ var CodeGeneratorResponse_Feature;
34
+ (function (CodeGeneratorResponse_Feature) {
35
+ /**
36
+ * @generated from enum value: FEATURE_NONE = 0;
37
+ */
38
+ CodeGeneratorResponse_Feature[CodeGeneratorResponse_Feature["NONE"] = 0] = "NONE";
39
+ /**
40
+ * @generated from enum value: FEATURE_PROTO3_OPTIONAL = 1;
41
+ */
42
+ CodeGeneratorResponse_Feature[CodeGeneratorResponse_Feature["PROTO3_OPTIONAL"] = 1] = "PROTO3_OPTIONAL";
43
+ /**
44
+ * @generated from enum value: FEATURE_SUPPORTS_EDITIONS = 2;
45
+ */
46
+ CodeGeneratorResponse_Feature[CodeGeneratorResponse_Feature["SUPPORTS_EDITIONS"] = 2] = "SUPPORTS_EDITIONS";
47
+ })(CodeGeneratorResponse_Feature || (exports.CodeGeneratorResponse_Feature = CodeGeneratorResponse_Feature = {}));
48
+ // CodeGeneratorResponse_Feature_Enum is the enum type for CodeGeneratorResponse_Feature.
49
+ exports.CodeGeneratorResponse_Feature_Enum = (0, __1.createEnumType)("google.protobuf.compiler.CodeGeneratorResponse.Feature", [
50
+ { no: 0, name: "FEATURE_NONE" },
51
+ { no: 1, name: "FEATURE_PROTO3_OPTIONAL" },
52
+ { no: 2, name: "FEATURE_SUPPORTS_EDITIONS" },
53
+ ]);
54
+ exports.Version = (0, __1.createMessageType)({
55
+ typeName: "google.protobuf.compiler.Version",
56
+ fields: [
57
+ {
58
+ no: 1,
59
+ name: "major",
60
+ kind: "scalar",
61
+ T: 5 /* ScalarType.INT32 */,
62
+ opt: true,
63
+ },
64
+ {
65
+ no: 2,
66
+ name: "minor",
67
+ kind: "scalar",
68
+ T: 5 /* ScalarType.INT32 */,
69
+ opt: true,
70
+ },
71
+ {
72
+ no: 3,
73
+ name: "patch",
74
+ kind: "scalar",
75
+ T: 5 /* ScalarType.INT32 */,
76
+ opt: true,
77
+ },
78
+ {
79
+ no: 4,
80
+ name: "suffix",
81
+ kind: "scalar",
82
+ T: 9 /* ScalarType.STRING */,
83
+ opt: true,
84
+ },
85
+ ],
86
+ packedByDefault: false,
87
+ });
88
+ exports.CodeGeneratorRequest = (0, __1.createMessageType)({
89
+ typeName: "google.protobuf.compiler.CodeGeneratorRequest",
90
+ fields: [
91
+ {
92
+ no: 1,
93
+ name: "file_to_generate",
94
+ kind: "scalar",
95
+ T: 9 /* ScalarType.STRING */,
96
+ repeated: true,
97
+ },
98
+ {
99
+ no: 2,
100
+ name: "parameter",
101
+ kind: "scalar",
102
+ T: 9 /* ScalarType.STRING */,
103
+ opt: true,
104
+ },
105
+ {
106
+ no: 15,
107
+ name: "proto_file",
108
+ kind: "message",
109
+ T: () => descriptor_pb_js_1.FileDescriptorProto,
110
+ repeated: true,
111
+ },
112
+ {
113
+ no: 17,
114
+ name: "source_file_descriptors",
115
+ kind: "message",
116
+ T: () => descriptor_pb_js_1.FileDescriptorProto,
117
+ repeated: true,
118
+ },
119
+ {
120
+ no: 3,
121
+ name: "compiler_version",
122
+ kind: "message",
123
+ T: () => exports.Version,
124
+ opt: true,
125
+ },
126
+ ],
127
+ packedByDefault: false,
128
+ });
129
+ exports.CodeGeneratorResponse_File = (0, __1.createMessageType)({
130
+ typeName: "google.protobuf.compiler.CodeGeneratorResponse.File",
131
+ fields: [
132
+ {
133
+ no: 1,
134
+ name: "name",
135
+ kind: "scalar",
136
+ T: 9 /* ScalarType.STRING */,
137
+ opt: true,
138
+ },
139
+ {
140
+ no: 2,
141
+ name: "insertion_point",
142
+ kind: "scalar",
143
+ T: 9 /* ScalarType.STRING */,
144
+ opt: true,
145
+ },
146
+ {
147
+ no: 15,
148
+ name: "content",
149
+ kind: "scalar",
150
+ T: 9 /* ScalarType.STRING */,
151
+ opt: true,
152
+ },
153
+ {
154
+ no: 16,
155
+ name: "generated_code_info",
156
+ kind: "message",
157
+ T: () => descriptor_pb_js_1.GeneratedCodeInfo,
158
+ opt: true,
159
+ },
160
+ ],
161
+ packedByDefault: false,
162
+ });
163
+ exports.CodeGeneratorResponse = (0, __1.createMessageType)({
164
+ typeName: "google.protobuf.compiler.CodeGeneratorResponse",
165
+ fields: [
166
+ {
167
+ no: 1,
168
+ name: "error",
169
+ kind: "scalar",
170
+ T: 9 /* ScalarType.STRING */,
171
+ opt: true,
172
+ },
173
+ {
174
+ no: 2,
175
+ name: "supported_features",
176
+ kind: "scalar",
177
+ T: 4 /* ScalarType.UINT64 */,
178
+ opt: true,
179
+ },
180
+ {
181
+ no: 3,
182
+ name: "minimum_edition",
183
+ kind: "scalar",
184
+ T: 5 /* ScalarType.INT32 */,
185
+ opt: true,
186
+ },
187
+ {
188
+ no: 4,
189
+ name: "maximum_edition",
190
+ kind: "scalar",
191
+ T: 5 /* ScalarType.INT32 */,
192
+ opt: true,
193
+ },
194
+ {
195
+ no: 15,
196
+ name: "file",
197
+ kind: "message",
198
+ T: () => exports.CodeGeneratorResponse_File,
199
+ repeated: true,
200
+ },
201
+ ],
202
+ packedByDefault: false,
203
+ });