@aptre/protobuf-es-lite 0.2.10 → 0.2.11
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.
- package/bin/protoc-gen-es-lite +2 -2
- package/dist/assert.js +4 -11
- package/dist/binary-encoding.js +30 -35
- package/dist/binary.js +84 -96
- package/dist/codegen-info.js +12 -15
- package/dist/create-descriptor-set.js +113 -117
- package/dist/descriptor-set.js +1 -2
- package/dist/enum.js +2 -7
- package/dist/feature-set.js +16 -20
- package/dist/field-wrapper.js +12 -17
- package/dist/field.js +18 -27
- package/dist/google/index.js +9 -41
- package/dist/google/protobuf/any.pb.d.ts +2 -2
- package/dist/google/protobuf/any.pb.js +3 -6
- package/dist/google/protobuf/api.pb.d.ts +2 -2
- package/dist/google/protobuf/api.pb.js +14 -17
- package/dist/google/protobuf/compiler/plugin.pb.d.ts +2 -2
- package/dist/google/protobuf/compiler/plugin.pb.js +15 -18
- package/dist/google/protobuf/descriptor.pb.d.ts +19 -19
- package/dist/google/protobuf/descriptor.pb.js +156 -160
- package/dist/google/protobuf/duration.pb.d.ts +2 -2
- package/dist/google/protobuf/duration.pb.js +3 -6
- package/dist/google/protobuf/empty.pb.d.ts +2 -2
- package/dist/google/protobuf/empty.pb.js +3 -6
- package/dist/google/protobuf/source_context.pb.d.ts +2 -2
- package/dist/google/protobuf/source_context.pb.js +3 -6
- package/dist/google/protobuf/struct.pb.d.ts +3 -3
- package/dist/google/protobuf/struct.pb.js +13 -16
- package/dist/google/protobuf/timestamp.pb.d.ts +2 -2
- package/dist/google/protobuf/timestamp.pb.js +3 -6
- package/dist/google/protobuf/type.pb.d.ts +5 -5
- package/dist/google/protobuf/type.pb.js +31 -34
- package/dist/google/protobuf/wrappers.pb.d.ts +2 -2
- package/dist/google/protobuf/wrappers.pb.js +11 -14
- package/dist/index.js +12 -60
- package/dist/is-message.js +9 -16
- package/dist/json.js +72 -80
- package/dist/message.js +48 -55
- package/dist/names.js +12 -23
- package/dist/partial.js +13 -17
- package/dist/proto-base64.js +1 -4
- package/dist/proto-double.js +1 -4
- package/dist/proto-int64.js +9 -12
- package/dist/protoc-gen-es-lite/protoc-gen-es-lite-plugin.js +4 -7
- package/dist/protoc-gen-es-lite/typescript.js +27 -36
- package/dist/protoplugin/create-es-plugin.js +13 -17
- package/dist/protoplugin/ecmascript/file-preamble.js +5 -9
- package/dist/protoplugin/ecmascript/generated-file.js +16 -20
- package/dist/protoplugin/ecmascript/import-path.js +13 -20
- package/dist/protoplugin/ecmascript/import-symbol.js +1 -5
- package/dist/protoplugin/ecmascript/index.js +2 -7
- package/dist/protoplugin/ecmascript/jsdoc.js +1 -5
- package/dist/protoplugin/ecmascript/opaque-printables.js +1 -2
- package/dist/protoplugin/ecmascript/parameter.js +10 -14
- package/dist/protoplugin/ecmascript/reify-wkt.js +12 -16
- package/dist/protoplugin/ecmascript/runtime-imports.js +5 -9
- package/dist/protoplugin/ecmascript/schema.js +16 -20
- package/dist/protoplugin/ecmascript/target.js +1 -2
- package/dist/protoplugin/ecmascript/transpile.js +15 -42
- package/dist/protoplugin/error.js +3 -9
- package/dist/protoplugin/index.js +2 -7
- package/dist/protoplugin/plugin.js +1 -2
- package/dist/protoplugin/run-node.js +6 -10
- package/dist/scalar.js +9 -15
- package/dist/service-type.js +4 -7
- package/dist/text-format.js +25 -30
- package/dist/type-registry.js +1 -2
- package/dist/unknown.js +7 -12
- package/dist/util.d.ts +1 -1
- package/dist/util.js +49 -55
- package/dist/varint.js +7 -17
- package/package.json +10 -7
- package/tsconfig.base.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MessageType } from "../../";
|
|
2
|
-
import { Message } from "../../";
|
|
1
|
+
import type { MessageType } from "../../index.js";
|
|
2
|
+
import { Message } from "../../index.js";
|
|
3
3
|
export declare const protobufPackage = "google.protobuf";
|
|
4
4
|
/**
|
|
5
5
|
* A Duration represents a signed, fixed-length span of time represented
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Protocol Buffers - Google's data interchange format
|
|
3
2
|
// Copyright 2008 Google Inc. All rights reserved.
|
|
4
3
|
// https://developers.google.com/protocol-buffers/
|
|
@@ -28,11 +27,9 @@
|
|
|
28
27
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
29
28
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
30
29
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
exports.protobufPackage = "google.protobuf";
|
|
35
|
-
exports.Duration = (0, __1.createMessageType)({
|
|
30
|
+
import { createMessageType } from "../../index.js";
|
|
31
|
+
export const protobufPackage = "google.protobuf";
|
|
32
|
+
export const Duration = createMessageType({
|
|
36
33
|
typeName: "google.protobuf.Duration",
|
|
37
34
|
fields: [
|
|
38
35
|
{ no: 1, name: "seconds", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MessageType } from "../../";
|
|
2
|
-
import { Message } from "../../";
|
|
1
|
+
import type { MessageType } from "../../index.js";
|
|
2
|
+
import { Message } from "../../index.js";
|
|
3
3
|
export declare const protobufPackage = "google.protobuf";
|
|
4
4
|
/**
|
|
5
5
|
* A generic empty message that you can re-use to avoid defining duplicated
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Protocol Buffers - Google's data interchange format
|
|
3
2
|
// Copyright 2008 Google Inc. All rights reserved.
|
|
4
3
|
// https://developers.google.com/protocol-buffers/
|
|
@@ -28,11 +27,9 @@
|
|
|
28
27
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
29
28
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
30
29
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
exports.protobufPackage = "google.protobuf";
|
|
35
|
-
exports.Empty = (0, __1.createMessageType)({
|
|
30
|
+
import { createMessageType } from "../../index.js";
|
|
31
|
+
export const protobufPackage = "google.protobuf";
|
|
32
|
+
export const Empty = createMessageType({
|
|
36
33
|
typeName: "google.protobuf.Empty",
|
|
37
34
|
fields: [],
|
|
38
35
|
packedByDefault: true,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MessageType } from "../../";
|
|
2
|
-
import { Message } from "../../";
|
|
1
|
+
import type { MessageType } from "../../index.js";
|
|
2
|
+
import { Message } from "../../index.js";
|
|
3
3
|
export declare const protobufPackage = "google.protobuf";
|
|
4
4
|
/**
|
|
5
5
|
* `SourceContext` represents information about the source of a
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Protocol Buffers - Google's data interchange format
|
|
3
2
|
// Copyright 2008 Google Inc. All rights reserved.
|
|
4
3
|
// https://developers.google.com/protocol-buffers/
|
|
@@ -28,11 +27,9 @@
|
|
|
28
27
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
29
28
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
30
29
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
exports.protobufPackage = "google.protobuf";
|
|
35
|
-
exports.SourceContext = (0, __1.createMessageType)({
|
|
30
|
+
import { createMessageType } from "../../index.js";
|
|
31
|
+
export const protobufPackage = "google.protobuf";
|
|
32
|
+
export const SourceContext = createMessageType({
|
|
36
33
|
typeName: "google.protobuf.SourceContext",
|
|
37
34
|
fields: [
|
|
38
35
|
{ no: 1, name: "file_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MessageType } from "../../";
|
|
2
|
-
import { Message } from "../../";
|
|
1
|
+
import type { MessageType } from "../../index.js";
|
|
2
|
+
import { Message } from "../../index.js";
|
|
3
3
|
export declare const protobufPackage = "google.protobuf";
|
|
4
4
|
/**
|
|
5
5
|
* `NullValue` is a singleton enumeration to represent the null value for the
|
|
@@ -19,7 +19,7 @@ export declare enum NullValue {
|
|
|
19
19
|
*/
|
|
20
20
|
NULL_VALUE = 0
|
|
21
21
|
}
|
|
22
|
-
export declare const NullValue_Enum: import("../../enum").EnumType;
|
|
22
|
+
export declare const NullValue_Enum: import("../../enum.js").EnumType;
|
|
23
23
|
/**
|
|
24
24
|
* `ListValue` is a wrapper around a repeated field of values.
|
|
25
25
|
*
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Protocol Buffers - Google's data interchange format
|
|
3
2
|
// Copyright 2008 Google Inc. All rights reserved.
|
|
4
3
|
// https://developers.google.com/protocol-buffers/
|
|
@@ -28,10 +27,8 @@
|
|
|
28
27
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
29
28
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
30
29
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const __1 = require("../../");
|
|
34
|
-
exports.protobufPackage = "google.protobuf";
|
|
30
|
+
import { createEnumType, createMessageType } from "../../index.js";
|
|
31
|
+
export const protobufPackage = "google.protobuf";
|
|
35
32
|
/**
|
|
36
33
|
* `NullValue` is a singleton enumeration to represent the null value for the
|
|
37
34
|
* `Value` type union.
|
|
@@ -41,7 +38,7 @@ exports.protobufPackage = "google.protobuf";
|
|
|
41
38
|
*
|
|
42
39
|
* @generated from enum google.protobuf.NullValue
|
|
43
40
|
*/
|
|
44
|
-
var NullValue;
|
|
41
|
+
export var NullValue;
|
|
45
42
|
(function (NullValue) {
|
|
46
43
|
/**
|
|
47
44
|
* Null value.
|
|
@@ -50,34 +47,34 @@ var NullValue;
|
|
|
50
47
|
* @generated from enum value: NULL_VALUE = 0;
|
|
51
48
|
*/
|
|
52
49
|
NullValue[NullValue["NULL_VALUE"] = 0] = "NULL_VALUE";
|
|
53
|
-
})(NullValue || (
|
|
50
|
+
})(NullValue || (NullValue = {}));
|
|
54
51
|
// NullValue_Enum is the enum type for NullValue.
|
|
55
|
-
|
|
52
|
+
export const NullValue_Enum = createEnumType("google.protobuf.NullValue", [
|
|
56
53
|
{ no: 0, name: "NULL_VALUE" },
|
|
57
54
|
]);
|
|
58
|
-
|
|
55
|
+
export const ListValue = createMessageType({
|
|
59
56
|
typeName: "google.protobuf.ListValue",
|
|
60
57
|
fields: [
|
|
61
|
-
{ no: 1, name: "values", kind: "message", T: () =>
|
|
58
|
+
{ no: 1, name: "values", kind: "message", T: () => Value, repeated: true },
|
|
62
59
|
],
|
|
63
60
|
packedByDefault: true,
|
|
64
61
|
});
|
|
65
|
-
|
|
62
|
+
export const Value = createMessageType({
|
|
66
63
|
typeName: "google.protobuf.Value",
|
|
67
64
|
fields: [
|
|
68
|
-
{ no: 1, name: "null_value", kind: "enum", T:
|
|
65
|
+
{ no: 1, name: "null_value", kind: "enum", T: NullValue_Enum },
|
|
69
66
|
{ no: 2, name: "number_value", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
|
|
70
67
|
{ no: 3, name: "string_value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
71
68
|
{ no: 4, name: "bool_value", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
|
|
72
|
-
{ no: 5, name: "struct_value", kind: "message", T: () =>
|
|
73
|
-
{ no: 6, name: "list_value", kind: "message", T: () =>
|
|
69
|
+
{ no: 5, name: "struct_value", kind: "message", T: () => Struct },
|
|
70
|
+
{ no: 6, name: "list_value", kind: "message", T: () => ListValue },
|
|
74
71
|
],
|
|
75
72
|
packedByDefault: true,
|
|
76
73
|
});
|
|
77
|
-
|
|
74
|
+
export const Struct = createMessageType({
|
|
78
75
|
typeName: "google.protobuf.Struct",
|
|
79
76
|
fields: [
|
|
80
|
-
{ no: 1, name: "fields", kind: "map", K: 9 /* ScalarType.STRING */, V: { kind: "message", T: () =>
|
|
77
|
+
{ no: 1, name: "fields", kind: "map", K: 9 /* ScalarType.STRING */, V: { kind: "message", T: () => Value } },
|
|
81
78
|
],
|
|
82
79
|
packedByDefault: true,
|
|
83
80
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MessageType } from "../../";
|
|
2
|
-
import { Message } from "../../";
|
|
1
|
+
import type { MessageType } from "../../index.js";
|
|
2
|
+
import { Message } from "../../index.js";
|
|
3
3
|
export declare const protobufPackage = "google.protobuf";
|
|
4
4
|
/**
|
|
5
5
|
* A Timestamp represents a point in time independent of any time zone or local
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Protocol Buffers - Google's data interchange format
|
|
3
2
|
// Copyright 2008 Google Inc. All rights reserved.
|
|
4
3
|
// https://developers.google.com/protocol-buffers/
|
|
@@ -28,11 +27,9 @@
|
|
|
28
27
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
29
28
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
30
29
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
exports.protobufPackage = "google.protobuf";
|
|
35
|
-
exports.Timestamp = (0, __1.createMessageType)({
|
|
30
|
+
import { createMessageType } from "../../index.js";
|
|
31
|
+
export const protobufPackage = "google.protobuf";
|
|
32
|
+
export const Timestamp = createMessageType({
|
|
36
33
|
typeName: "google.protobuf.Timestamp",
|
|
37
34
|
fields: [
|
|
38
35
|
{ no: 1, name: "seconds", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MessageType } from "../../";
|
|
2
|
-
import { Message } from "../../";
|
|
1
|
+
import type { MessageType } from "../../index.js";
|
|
2
|
+
import { Message } from "../../index.js";
|
|
3
3
|
import { Any } from "./any.pb.js";
|
|
4
4
|
import { SourceContext } from "./source_context.pb.js";
|
|
5
5
|
export declare const protobufPackage = "google.protobuf";
|
|
@@ -32,7 +32,7 @@ export declare enum Syntax {
|
|
|
32
32
|
*/
|
|
33
33
|
EDITIONS = 2
|
|
34
34
|
}
|
|
35
|
-
export declare const Syntax_Enum: import("../../enum").EnumType;
|
|
35
|
+
export declare const Syntax_Enum: import("../../enum.js").EnumType;
|
|
36
36
|
/**
|
|
37
37
|
* Basic field types.
|
|
38
38
|
*
|
|
@@ -174,7 +174,7 @@ export declare enum Field_Kind {
|
|
|
174
174
|
*/
|
|
175
175
|
TYPE_SINT64 = 18
|
|
176
176
|
}
|
|
177
|
-
export declare const Field_Kind_Enum: import("../../enum").EnumType;
|
|
177
|
+
export declare const Field_Kind_Enum: import("../../enum.js").EnumType;
|
|
178
178
|
/**
|
|
179
179
|
* Whether a field is optional, required, or repeated.
|
|
180
180
|
*
|
|
@@ -211,7 +211,7 @@ export declare enum Field_Cardinality {
|
|
|
211
211
|
*/
|
|
212
212
|
REPEATED = 3
|
|
213
213
|
}
|
|
214
|
-
export declare const Field_Cardinality_Enum: import("../../enum").EnumType;
|
|
214
|
+
export declare const Field_Cardinality_Enum: import("../../enum.js").EnumType;
|
|
215
215
|
/**
|
|
216
216
|
* A protocol buffer option, which can be attached to a message, field,
|
|
217
217
|
* enumeration, etc.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Protocol Buffers - Google's data interchange format
|
|
3
2
|
// Copyright 2008 Google Inc. All rights reserved.
|
|
4
3
|
// https://developers.google.com/protocol-buffers/
|
|
@@ -28,19 +27,17 @@
|
|
|
28
27
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
29
28
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
30
29
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
const source_context_pb_js_1 = require("./source_context.pb.js");
|
|
36
|
-
exports.protobufPackage = "google.protobuf";
|
|
30
|
+
import { createEnumType, createMessageType } from "../../index.js";
|
|
31
|
+
import { Any } from "./any.pb.js";
|
|
32
|
+
import { SourceContext } from "./source_context.pb.js";
|
|
33
|
+
export const protobufPackage = "google.protobuf";
|
|
37
34
|
/**
|
|
38
35
|
* The syntax in which a protocol buffer element is defined.
|
|
39
36
|
*
|
|
40
37
|
*
|
|
41
38
|
* @generated from enum google.protobuf.Syntax
|
|
42
39
|
*/
|
|
43
|
-
var Syntax;
|
|
40
|
+
export var Syntax;
|
|
44
41
|
(function (Syntax) {
|
|
45
42
|
/**
|
|
46
43
|
* Syntax `proto2`.
|
|
@@ -63,9 +60,9 @@ var Syntax;
|
|
|
63
60
|
* @generated from enum value: SYNTAX_EDITIONS = 2;
|
|
64
61
|
*/
|
|
65
62
|
Syntax[Syntax["EDITIONS"] = 2] = "EDITIONS";
|
|
66
|
-
})(Syntax || (
|
|
63
|
+
})(Syntax || (Syntax = {}));
|
|
67
64
|
// Syntax_Enum is the enum type for Syntax.
|
|
68
|
-
|
|
65
|
+
export const Syntax_Enum = createEnumType("google.protobuf.Syntax", [
|
|
69
66
|
{ no: 0, name: "SYNTAX_PROTO2" },
|
|
70
67
|
{ no: 1, name: "SYNTAX_PROTO3" },
|
|
71
68
|
{ no: 2, name: "SYNTAX_EDITIONS" },
|
|
@@ -76,7 +73,7 @@ exports.Syntax_Enum = (0, __1.createEnumType)("google.protobuf.Syntax", [
|
|
|
76
73
|
*
|
|
77
74
|
* @generated from enum google.protobuf.Field.Kind
|
|
78
75
|
*/
|
|
79
|
-
var Field_Kind;
|
|
76
|
+
export var Field_Kind;
|
|
80
77
|
(function (Field_Kind) {
|
|
81
78
|
/**
|
|
82
79
|
* Field type unknown.
|
|
@@ -211,9 +208,9 @@ var Field_Kind;
|
|
|
211
208
|
* @generated from enum value: TYPE_SINT64 = 18;
|
|
212
209
|
*/
|
|
213
210
|
Field_Kind[Field_Kind["TYPE_SINT64"] = 18] = "TYPE_SINT64";
|
|
214
|
-
})(Field_Kind || (
|
|
211
|
+
})(Field_Kind || (Field_Kind = {}));
|
|
215
212
|
// Field_Kind_Enum is the enum type for Field_Kind.
|
|
216
|
-
|
|
213
|
+
export const Field_Kind_Enum = createEnumType("google.protobuf.Field.Kind", [
|
|
217
214
|
{ no: 0, name: "TYPE_UNKNOWN" },
|
|
218
215
|
{ no: 1, name: "TYPE_DOUBLE" },
|
|
219
216
|
{ no: 2, name: "TYPE_FLOAT" },
|
|
@@ -240,7 +237,7 @@ exports.Field_Kind_Enum = (0, __1.createEnumType)("google.protobuf.Field.Kind",
|
|
|
240
237
|
*
|
|
241
238
|
* @generated from enum google.protobuf.Field.Cardinality
|
|
242
239
|
*/
|
|
243
|
-
var Field_Cardinality;
|
|
240
|
+
export var Field_Cardinality;
|
|
244
241
|
(function (Field_Cardinality) {
|
|
245
242
|
/**
|
|
246
243
|
* For fields with unknown cardinality.
|
|
@@ -270,68 +267,68 @@ var Field_Cardinality;
|
|
|
270
267
|
* @generated from enum value: CARDINALITY_REPEATED = 3;
|
|
271
268
|
*/
|
|
272
269
|
Field_Cardinality[Field_Cardinality["REPEATED"] = 3] = "REPEATED";
|
|
273
|
-
})(Field_Cardinality || (
|
|
270
|
+
})(Field_Cardinality || (Field_Cardinality = {}));
|
|
274
271
|
// Field_Cardinality_Enum is the enum type for Field_Cardinality.
|
|
275
|
-
|
|
272
|
+
export const Field_Cardinality_Enum = createEnumType("google.protobuf.Field.Cardinality", [
|
|
276
273
|
{ no: 0, name: "CARDINALITY_UNKNOWN" },
|
|
277
274
|
{ no: 1, name: "CARDINALITY_OPTIONAL" },
|
|
278
275
|
{ no: 2, name: "CARDINALITY_REQUIRED" },
|
|
279
276
|
{ no: 3, name: "CARDINALITY_REPEATED" },
|
|
280
277
|
]);
|
|
281
|
-
|
|
278
|
+
export const Option = createMessageType({
|
|
282
279
|
typeName: "google.protobuf.Option",
|
|
283
280
|
fields: [
|
|
284
281
|
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
285
|
-
{ no: 2, name: "value", kind: "message", T: () =>
|
|
282
|
+
{ no: 2, name: "value", kind: "message", T: () => Any },
|
|
286
283
|
],
|
|
287
284
|
packedByDefault: true,
|
|
288
285
|
});
|
|
289
|
-
|
|
286
|
+
export const Field = createMessageType({
|
|
290
287
|
typeName: "google.protobuf.Field",
|
|
291
288
|
fields: [
|
|
292
|
-
{ no: 1, name: "kind", kind: "enum", T:
|
|
293
|
-
{ no: 2, name: "cardinality", kind: "enum", T:
|
|
289
|
+
{ no: 1, name: "kind", kind: "enum", T: Field_Kind_Enum },
|
|
290
|
+
{ no: 2, name: "cardinality", kind: "enum", T: Field_Cardinality_Enum },
|
|
294
291
|
{ no: 3, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
295
292
|
{ no: 4, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
296
293
|
{ no: 6, name: "type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
297
294
|
{ no: 7, name: "oneof_index", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
298
295
|
{ no: 8, name: "packed", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
|
|
299
|
-
{ no: 9, name: "options", kind: "message", T: () =>
|
|
296
|
+
{ no: 9, name: "options", kind: "message", T: () => Option, repeated: true },
|
|
300
297
|
{ no: 10, name: "json_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
301
298
|
{ no: 11, name: "default_value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
302
299
|
],
|
|
303
300
|
packedByDefault: true,
|
|
304
301
|
});
|
|
305
|
-
|
|
302
|
+
export const Type = createMessageType({
|
|
306
303
|
typeName: "google.protobuf.Type",
|
|
307
304
|
fields: [
|
|
308
305
|
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
309
|
-
{ no: 2, name: "fields", kind: "message", T: () =>
|
|
306
|
+
{ no: 2, name: "fields", kind: "message", T: () => Field, repeated: true },
|
|
310
307
|
{ no: 3, name: "oneofs", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
|
|
311
|
-
{ no: 4, name: "options", kind: "message", T: () =>
|
|
312
|
-
{ no: 5, name: "source_context", kind: "message", T: () =>
|
|
313
|
-
{ no: 6, name: "syntax", kind: "enum", T:
|
|
308
|
+
{ no: 4, name: "options", kind: "message", T: () => Option, repeated: true },
|
|
309
|
+
{ no: 5, name: "source_context", kind: "message", T: () => SourceContext },
|
|
310
|
+
{ no: 6, name: "syntax", kind: "enum", T: Syntax_Enum },
|
|
314
311
|
{ no: 7, name: "edition", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
315
312
|
],
|
|
316
313
|
packedByDefault: true,
|
|
317
314
|
});
|
|
318
|
-
|
|
315
|
+
export const EnumValue = createMessageType({
|
|
319
316
|
typeName: "google.protobuf.EnumValue",
|
|
320
317
|
fields: [
|
|
321
318
|
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
322
319
|
{ no: 2, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
323
|
-
{ no: 3, name: "options", kind: "message", T: () =>
|
|
320
|
+
{ no: 3, name: "options", kind: "message", T: () => Option, repeated: true },
|
|
324
321
|
],
|
|
325
322
|
packedByDefault: true,
|
|
326
323
|
});
|
|
327
|
-
|
|
324
|
+
export const Enum = createMessageType({
|
|
328
325
|
typeName: "google.protobuf.Enum",
|
|
329
326
|
fields: [
|
|
330
327
|
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
331
|
-
{ no: 2, name: "enumvalue", kind: "message", T: () =>
|
|
332
|
-
{ no: 3, name: "options", kind: "message", T: () =>
|
|
333
|
-
{ no: 4, name: "source_context", kind: "message", T: () =>
|
|
334
|
-
{ no: 5, name: "syntax", kind: "enum", T:
|
|
328
|
+
{ no: 2, name: "enumvalue", kind: "message", T: () => EnumValue, repeated: true },
|
|
329
|
+
{ no: 3, name: "options", kind: "message", T: () => Option, repeated: true },
|
|
330
|
+
{ no: 4, name: "source_context", kind: "message", T: () => SourceContext },
|
|
331
|
+
{ no: 5, name: "syntax", kind: "enum", T: Syntax_Enum },
|
|
335
332
|
{ no: 6, name: "edition", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
336
333
|
],
|
|
337
334
|
packedByDefault: true,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MessageType } from "../../";
|
|
2
|
-
import { Message } from "../../";
|
|
1
|
+
import type { MessageType } from "../../index.js";
|
|
2
|
+
import { Message } from "../../index.js";
|
|
3
3
|
export declare const protobufPackage = "google.protobuf";
|
|
4
4
|
/**
|
|
5
5
|
* Wrapper message for `double`.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Protocol Buffers - Google's data interchange format
|
|
3
2
|
// Copyright 2008 Google Inc. All rights reserved.
|
|
4
3
|
// https://developers.google.com/protocol-buffers/
|
|
@@ -38,67 +37,65 @@
|
|
|
38
37
|
// the ability to detect presence on individual elements.
|
|
39
38
|
// These wrappers have no meaningful use within a map or a oneof since
|
|
40
39
|
// individual entries of a map or fields of a oneof can already detect presence.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
exports.protobufPackage = "google.protobuf";
|
|
45
|
-
exports.DoubleValue = (0, __1.createMessageType)({
|
|
40
|
+
import { createMessageType } from "../../index.js";
|
|
41
|
+
export const protobufPackage = "google.protobuf";
|
|
42
|
+
export const DoubleValue = createMessageType({
|
|
46
43
|
typeName: "google.protobuf.DoubleValue",
|
|
47
44
|
fields: [
|
|
48
45
|
{ no: 1, name: "value", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
|
|
49
46
|
],
|
|
50
47
|
packedByDefault: true,
|
|
51
48
|
});
|
|
52
|
-
|
|
49
|
+
export const FloatValue = createMessageType({
|
|
53
50
|
typeName: "google.protobuf.FloatValue",
|
|
54
51
|
fields: [
|
|
55
52
|
{ no: 1, name: "value", kind: "scalar", T: 2 /* ScalarType.FLOAT */ },
|
|
56
53
|
],
|
|
57
54
|
packedByDefault: true,
|
|
58
55
|
});
|
|
59
|
-
|
|
56
|
+
export const Int64Value = createMessageType({
|
|
60
57
|
typeName: "google.protobuf.Int64Value",
|
|
61
58
|
fields: [
|
|
62
59
|
{ no: 1, name: "value", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
|
|
63
60
|
],
|
|
64
61
|
packedByDefault: true,
|
|
65
62
|
});
|
|
66
|
-
|
|
63
|
+
export const UInt64Value = createMessageType({
|
|
67
64
|
typeName: "google.protobuf.UInt64Value",
|
|
68
65
|
fields: [
|
|
69
66
|
{ no: 1, name: "value", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
|
|
70
67
|
],
|
|
71
68
|
packedByDefault: true,
|
|
72
69
|
});
|
|
73
|
-
|
|
70
|
+
export const Int32Value = createMessageType({
|
|
74
71
|
typeName: "google.protobuf.Int32Value",
|
|
75
72
|
fields: [
|
|
76
73
|
{ no: 1, name: "value", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
77
74
|
],
|
|
78
75
|
packedByDefault: true,
|
|
79
76
|
});
|
|
80
|
-
|
|
77
|
+
export const UInt32Value = createMessageType({
|
|
81
78
|
typeName: "google.protobuf.UInt32Value",
|
|
82
79
|
fields: [
|
|
83
80
|
{ no: 1, name: "value", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
|
|
84
81
|
],
|
|
85
82
|
packedByDefault: true,
|
|
86
83
|
});
|
|
87
|
-
|
|
84
|
+
export const BoolValue = createMessageType({
|
|
88
85
|
typeName: "google.protobuf.BoolValue",
|
|
89
86
|
fields: [
|
|
90
87
|
{ no: 1, name: "value", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
|
|
91
88
|
],
|
|
92
89
|
packedByDefault: true,
|
|
93
90
|
});
|
|
94
|
-
|
|
91
|
+
export const StringValue = createMessageType({
|
|
95
92
|
typeName: "google.protobuf.StringValue",
|
|
96
93
|
fields: [
|
|
97
94
|
{ no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
98
95
|
],
|
|
99
96
|
packedByDefault: true,
|
|
100
97
|
});
|
|
101
|
-
|
|
98
|
+
export const BytesValue = createMessageType({
|
|
102
99
|
typeName: "google.protobuf.BytesValue",
|
|
103
100
|
fields: [
|
|
104
101
|
{ no: 1, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
|
package/dist/index.js
CHANGED
|
@@ -1,60 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var field_js_1 = require("./field.js");
|
|
14
|
-
Object.defineProperty(exports, "newFieldList", { enumerable: true, get: function () { return field_js_1.newFieldList; } });
|
|
15
|
-
Object.defineProperty(exports, "FieldList", { enumerable: true, get: function () { return field_js_1.FieldList; } });
|
|
16
|
-
Object.defineProperty(exports, "fieldJsonName", { enumerable: true, get: function () { return field_js_1.fieldJsonName; } });
|
|
17
|
-
var scalar_js_1 = require("./scalar.js");
|
|
18
|
-
Object.defineProperty(exports, "scalarEquals", { enumerable: true, get: function () { return scalar_js_1.scalarEquals; } });
|
|
19
|
-
Object.defineProperty(exports, "scalarZeroValue", { enumerable: true, get: function () { return scalar_js_1.scalarZeroValue; } });
|
|
20
|
-
Object.defineProperty(exports, "isScalarZeroValue", { enumerable: true, get: function () { return scalar_js_1.isScalarZeroValue; } });
|
|
21
|
-
var enum_js_1 = require("./enum.js");
|
|
22
|
-
Object.defineProperty(exports, "createEnumType", { enumerable: true, get: function () { return enum_js_1.createEnumType; } });
|
|
23
|
-
Object.defineProperty(exports, "normalizeEnumValue", { enumerable: true, get: function () { return enum_js_1.normalizeEnumValue; } });
|
|
24
|
-
var names_js_1 = require("./names.js");
|
|
25
|
-
Object.defineProperty(exports, "localName", { enumerable: true, get: function () { return names_js_1.localName; } });
|
|
26
|
-
Object.defineProperty(exports, "localFieldName", { enumerable: true, get: function () { return names_js_1.localFieldName; } });
|
|
27
|
-
Object.defineProperty(exports, "localOneofName", { enumerable: true, get: function () { return names_js_1.localOneofName; } });
|
|
28
|
-
Object.defineProperty(exports, "findEnumSharedPrefix", { enumerable: true, get: function () { return names_js_1.findEnumSharedPrefix; } });
|
|
29
|
-
Object.defineProperty(exports, "camelToSnakeCase", { enumerable: true, get: function () { return names_js_1.camelToSnakeCase; } });
|
|
30
|
-
Object.defineProperty(exports, "protoCamelCase", { enumerable: true, get: function () { return names_js_1.protoCamelCase; } });
|
|
31
|
-
Object.defineProperty(exports, "safeObjectProperty", { enumerable: true, get: function () { return names_js_1.safeObjectProperty; } });
|
|
32
|
-
Object.defineProperty(exports, "safeIdentifier", { enumerable: true, get: function () { return names_js_1.safeIdentifier; } });
|
|
33
|
-
var varint_js_1 = require("./varint.js");
|
|
34
|
-
Object.defineProperty(exports, "int64FromString", { enumerable: true, get: function () { return varint_js_1.int64FromString; } });
|
|
35
|
-
Object.defineProperty(exports, "int64ToString", { enumerable: true, get: function () { return varint_js_1.int64ToString; } });
|
|
36
|
-
Object.defineProperty(exports, "uInt64ToString", { enumerable: true, get: function () { return varint_js_1.uInt64ToString; } });
|
|
37
|
-
var proto_int64_js_1 = require("./proto-int64.js");
|
|
38
|
-
Object.defineProperty(exports, "protoInt64", { enumerable: true, get: function () { return proto_int64_js_1.protoInt64; } });
|
|
39
|
-
var proto_base64_js_1 = require("./proto-base64.js");
|
|
40
|
-
Object.defineProperty(exports, "protoBase64", { enumerable: true, get: function () { return proto_base64_js_1.protoBase64; } });
|
|
41
|
-
var proto_double_js_1 = require("./proto-double.js");
|
|
42
|
-
Object.defineProperty(exports, "protoDouble", { enumerable: true, get: function () { return proto_double_js_1.protoDouble; } });
|
|
43
|
-
var index_js_1 = require("./google/index.js");
|
|
44
|
-
Object.defineProperty(exports, "Timestamp", { enumerable: true, get: function () { return index_js_1.Timestamp; } });
|
|
45
|
-
Object.defineProperty(exports, "Duration", { enumerable: true, get: function () { return index_js_1.Duration; } });
|
|
46
|
-
Object.defineProperty(exports, "Any", { enumerable: true, get: function () { return index_js_1.Any; } });
|
|
47
|
-
Object.defineProperty(exports, "Empty", { enumerable: true, get: function () { return index_js_1.Empty; } });
|
|
48
|
-
Object.defineProperty(exports, "DoubleValue", { enumerable: true, get: function () { return index_js_1.DoubleValue; } });
|
|
49
|
-
Object.defineProperty(exports, "FloatValue", { enumerable: true, get: function () { return index_js_1.FloatValue; } });
|
|
50
|
-
Object.defineProperty(exports, "Int64Value", { enumerable: true, get: function () { return index_js_1.Int64Value; } });
|
|
51
|
-
Object.defineProperty(exports, "UInt64Value", { enumerable: true, get: function () { return index_js_1.UInt64Value; } });
|
|
52
|
-
Object.defineProperty(exports, "Int32Value", { enumerable: true, get: function () { return index_js_1.Int32Value; } });
|
|
53
|
-
Object.defineProperty(exports, "UInt32Value", { enumerable: true, get: function () { return index_js_1.UInt32Value; } });
|
|
54
|
-
Object.defineProperty(exports, "BoolValue", { enumerable: true, get: function () { return index_js_1.BoolValue; } });
|
|
55
|
-
Object.defineProperty(exports, "StringValue", { enumerable: true, get: function () { return index_js_1.StringValue; } });
|
|
56
|
-
Object.defineProperty(exports, "BytesValue", { enumerable: true, get: function () { return index_js_1.BytesValue; } });
|
|
57
|
-
Object.defineProperty(exports, "Value", { enumerable: true, get: function () { return index_js_1.Value; } });
|
|
58
|
-
Object.defineProperty(exports, "NullValue", { enumerable: true, get: function () { return index_js_1.NullValue; } });
|
|
59
|
-
Object.defineProperty(exports, "ListValue", { enumerable: true, get: function () { return index_js_1.ListValue; } });
|
|
60
|
-
Object.defineProperty(exports, "Struct", { enumerable: true, get: function () { return index_js_1.Struct; } });
|
|
1
|
+
export { compareMessages, createMessageType, } from "./message.js";
|
|
2
|
+
export { MethodKind, MethodIdempotency, } from "./service-type.js";
|
|
3
|
+
export { isCompleteMessage, isCompleteField } from "./is-message.js";
|
|
4
|
+
export { newFieldList, FieldList, fieldJsonName, } from "./field.js";
|
|
5
|
+
export { scalarEquals, scalarZeroValue, isScalarZeroValue } from "./scalar.js";
|
|
6
|
+
export { createEnumType, normalizeEnumValue } from "./enum.js";
|
|
7
|
+
export { localName, localFieldName, localOneofName, findEnumSharedPrefix, camelToSnakeCase, protoCamelCase, safeObjectProperty, safeIdentifier, } from "./names.js";
|
|
8
|
+
export { int64FromString, int64ToString, uInt64ToString } from "./varint.js";
|
|
9
|
+
export { protoInt64 } from "./proto-int64.js";
|
|
10
|
+
export { protoBase64 } from "./proto-base64.js";
|
|
11
|
+
export { protoDouble } from "./proto-double.js";
|
|
12
|
+
export { Timestamp, Duration, Any, Empty, DoubleValue, FloatValue, Int64Value, UInt64Value, Int32Value, UInt32Value, BoolValue, StringValue, BytesValue, Value, NullValue, ListValue, Struct, } from "./google/index.js";
|