@bufbuild/protobuf 0.0.2-alpha.2 → 0.0.4
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/README.md +5 -2
- package/dist/cjs/descriptor-registry.js +13 -0
- package/dist/cjs/google/protobuf/any_pb.js +19 -39
- package/dist/cjs/google/protobuf/api_pb.js +28 -48
- package/dist/cjs/google/protobuf/compiler/plugin_pb.js +32 -67
- package/dist/cjs/google/protobuf/descriptor_pb.js +161 -187
- package/dist/cjs/google/protobuf/duration_pb.js +21 -41
- package/dist/cjs/google/protobuf/empty_pb.js +16 -36
- package/dist/cjs/google/protobuf/field_mask_pb.js +17 -37
- package/dist/cjs/google/protobuf/source_context_pb.js +16 -36
- package/dist/cjs/google/protobuf/struct_pb.js +31 -51
- package/dist/cjs/google/protobuf/timestamp_pb.js +20 -40
- package/dist/cjs/google/protobuf/type_pb.js +43 -63
- package/dist/cjs/google/protobuf/wrappers_pb.js +76 -105
- package/dist/cjs/index-runtime.js +42 -0
- package/dist/cjs/index-wkt.js +42 -0
- package/dist/cjs/index.js +4 -38
- package/dist/cjs/private/json-format-common.js +3 -3
- package/dist/cjs/private/util-common.js +1 -1
- package/dist/cjs/proto-base64.js +138 -0
- package/dist/esm/descriptor-registry.js +13 -0
- package/dist/esm/google/protobuf/any_pb.js +14 -34
- package/dist/esm/google/protobuf/api_pb.js +11 -31
- package/dist/esm/google/protobuf/compiler/plugin_pb.js +11 -46
- package/dist/esm/google/protobuf/descriptor_pb.js +14 -40
- package/dist/esm/google/protobuf/duration_pb.js +11 -31
- package/dist/esm/google/protobuf/empty_pb.js +11 -31
- package/dist/esm/google/protobuf/field_mask_pb.js +11 -31
- package/dist/esm/google/protobuf/source_context_pb.js +11 -31
- package/dist/esm/google/protobuf/struct_pb.js +11 -31
- package/dist/esm/google/protobuf/timestamp_pb.js +11 -31
- package/dist/esm/google/protobuf/type_pb.js +11 -31
- package/dist/esm/google/protobuf/wrappers_pb.js +11 -40
- package/dist/esm/index-runtime.js +25 -0
- package/dist/esm/index-wkt.js +26 -0
- package/dist/esm/index.js +4 -24
- package/dist/esm/private/json-format-common.js +3 -3
- package/dist/esm/private/util-common.js +1 -1
- package/dist/esm/proto-base64.js +135 -0
- package/dist/types/descriptor-registry.d.ts +7 -0
- package/dist/types/google/protobuf/any_pb.d.ts +5 -5
- package/dist/types/google/protobuf/api_pb.d.ts +2 -2
- package/dist/types/google/protobuf/compiler/plugin_pb.d.ts +2 -2
- package/dist/types/google/protobuf/descriptor_pb.d.ts +18 -5
- package/dist/types/google/protobuf/duration_pb.d.ts +2 -2
- package/dist/types/google/protobuf/empty_pb.d.ts +2 -2
- package/dist/types/google/protobuf/field_mask_pb.d.ts +2 -2
- package/dist/types/google/protobuf/source_context_pb.d.ts +2 -2
- package/dist/types/google/protobuf/struct_pb.d.ts +2 -2
- package/dist/types/google/protobuf/timestamp_pb.d.ts +2 -2
- package/dist/types/google/protobuf/type_pb.d.ts +2 -2
- package/dist/types/google/protobuf/wrappers_pb.d.ts +2 -2
- package/dist/types/index-runtime.d.ts +19 -0
- package/dist/types/index-wkt.d.ts +12 -0
- package/dist/types/index.d.ts +2 -30
- package/dist/types/message-type.d.ts +2 -1
- package/dist/types/message.d.ts +4 -6
- package/dist/types/private/util.d.ts +2 -2
- package/dist/types/proto-base64.d.ts +26 -0
- package/package.json +3 -2
- package/dist/cjs/private/base64.js +0 -132
- package/dist/esm/private/base64.js +0 -127
- package/dist/types/private/base64.d.ts +0 -18
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2021-2022 Buf Technologies, Inc.
|
|
3
|
+
//
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// you may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
//
|
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
//
|
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
// See the License for the specific language governing permissions and
|
|
14
|
+
// limitations under the License.
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.protoBase64 = void 0;
|
|
17
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/no-unnecessary-condition, prefer-const */
|
|
18
|
+
// lookup table from base64 character to byte
|
|
19
|
+
let encTable = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
20
|
+
// lookup table from base64 character *code* to byte because lookup by number is fast
|
|
21
|
+
let decTable = [];
|
|
22
|
+
for (let i = 0; i < encTable.length; i++)
|
|
23
|
+
decTable[encTable[i].charCodeAt(0)] = i;
|
|
24
|
+
// support base64url variants
|
|
25
|
+
decTable["-".charCodeAt(0)] = encTable.indexOf("+");
|
|
26
|
+
decTable["_".charCodeAt(0)] = encTable.indexOf("/");
|
|
27
|
+
exports.protoBase64 = {
|
|
28
|
+
/**
|
|
29
|
+
* Decodes a base64 string to a byte array.
|
|
30
|
+
*
|
|
31
|
+
* - ignores white-space, including line breaks and tabs
|
|
32
|
+
* - allows inner padding (can decode concatenated base64 strings)
|
|
33
|
+
* - does not require padding
|
|
34
|
+
* - understands base64url encoding:
|
|
35
|
+
* "-" instead of "+",
|
|
36
|
+
* "_" instead of "/",
|
|
37
|
+
* no padding
|
|
38
|
+
*/
|
|
39
|
+
dec(base64Str) {
|
|
40
|
+
// estimate byte size, not accounting for inner padding and whitespace
|
|
41
|
+
let es = (base64Str.length * 3) / 4;
|
|
42
|
+
// if (es % 3 !== 0)
|
|
43
|
+
// throw new Error("invalid base64 string");
|
|
44
|
+
if (base64Str[base64Str.length - 2] == "=")
|
|
45
|
+
es -= 2;
|
|
46
|
+
else if (base64Str[base64Str.length - 1] == "=")
|
|
47
|
+
es -= 1;
|
|
48
|
+
let bytes = new Uint8Array(es), bytePos = 0, // position in byte array
|
|
49
|
+
groupPos = 0, // position in base64 group
|
|
50
|
+
b, // current byte
|
|
51
|
+
p = 0; // previous byte
|
|
52
|
+
for (let i = 0; i < base64Str.length; i++) {
|
|
53
|
+
b = decTable[base64Str.charCodeAt(i)];
|
|
54
|
+
if (b === undefined) {
|
|
55
|
+
switch (base64Str[i]) {
|
|
56
|
+
// @ts-ignore TS7029: Fallthrough case in switch
|
|
57
|
+
case "=":
|
|
58
|
+
groupPos = 0; // reset state when padding found
|
|
59
|
+
// @ts-ignore TS7029: Fallthrough case in switch
|
|
60
|
+
case "\n":
|
|
61
|
+
case "\r":
|
|
62
|
+
case "\t":
|
|
63
|
+
case " ":
|
|
64
|
+
continue; // skip white-space, and padding
|
|
65
|
+
default:
|
|
66
|
+
throw Error("invalid base64 string.");
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
switch (groupPos) {
|
|
70
|
+
case 0:
|
|
71
|
+
p = b;
|
|
72
|
+
groupPos = 1;
|
|
73
|
+
break;
|
|
74
|
+
case 1:
|
|
75
|
+
bytes[bytePos++] = (p << 2) | ((b & 48) >> 4);
|
|
76
|
+
p = b;
|
|
77
|
+
groupPos = 2;
|
|
78
|
+
break;
|
|
79
|
+
case 2:
|
|
80
|
+
bytes[bytePos++] = ((p & 15) << 4) | ((b & 60) >> 2);
|
|
81
|
+
p = b;
|
|
82
|
+
groupPos = 3;
|
|
83
|
+
break;
|
|
84
|
+
case 3:
|
|
85
|
+
bytes[bytePos++] = ((p & 3) << 6) | b;
|
|
86
|
+
groupPos = 0;
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (groupPos == 1)
|
|
91
|
+
throw Error("invalid base64 string.");
|
|
92
|
+
return bytes.subarray(0, bytePos);
|
|
93
|
+
},
|
|
94
|
+
/**
|
|
95
|
+
* Decodes a base64 string to a byte array.
|
|
96
|
+
*
|
|
97
|
+
* - ignores white-space, including line breaks and tabs
|
|
98
|
+
* - allows inner padding (can decode concatenated base64 strings)
|
|
99
|
+
* - does not require padding
|
|
100
|
+
* - understands base64url encoding:
|
|
101
|
+
* "-" instead of "+",
|
|
102
|
+
* "_" instead of "/",
|
|
103
|
+
* no padding
|
|
104
|
+
*/
|
|
105
|
+
enc(bytes) {
|
|
106
|
+
let base64 = "", groupPos = 0, // position in base64 group
|
|
107
|
+
b, // current byte
|
|
108
|
+
p = 0; // carry over from previous byte
|
|
109
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
110
|
+
b = bytes[i];
|
|
111
|
+
switch (groupPos) {
|
|
112
|
+
case 0:
|
|
113
|
+
base64 += encTable[b >> 2];
|
|
114
|
+
p = (b & 3) << 4;
|
|
115
|
+
groupPos = 1;
|
|
116
|
+
break;
|
|
117
|
+
case 1:
|
|
118
|
+
base64 += encTable[p | (b >> 4)];
|
|
119
|
+
p = (b & 15) << 2;
|
|
120
|
+
groupPos = 2;
|
|
121
|
+
break;
|
|
122
|
+
case 2:
|
|
123
|
+
base64 += encTable[p | (b >> 6)];
|
|
124
|
+
base64 += encTable[b & 63];
|
|
125
|
+
groupPos = 0;
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
// padding required?
|
|
130
|
+
if (groupPos) {
|
|
131
|
+
base64 += encTable[p];
|
|
132
|
+
base64 += "=";
|
|
133
|
+
if (groupPos == 1)
|
|
134
|
+
base64 += "=";
|
|
135
|
+
}
|
|
136
|
+
return base64;
|
|
137
|
+
},
|
|
138
|
+
};
|
|
@@ -26,6 +26,7 @@ import { FieldMask } from "./google/protobuf/field_mask_pb.js";
|
|
|
26
26
|
import { ListValue, NullValue, Struct, Value, } from "./google/protobuf/struct_pb.js";
|
|
27
27
|
import { getEnumType } from "./private/enum.js";
|
|
28
28
|
import { BoolValue, BytesValue, DoubleValue, FloatValue, Int32Value, Int64Value, StringValue, UInt32Value, UInt64Value, } from "./google/protobuf/wrappers_pb.js";
|
|
29
|
+
import { FileDescriptorSet } from "./google/protobuf/descriptor_pb.js";
|
|
29
30
|
// well-known message types with specialized JSON representation
|
|
30
31
|
const wkMessages = [
|
|
31
32
|
Any,
|
|
@@ -71,6 +72,18 @@ export class DescriptorRegistry {
|
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Conveniently create a DescriptorRegistry from a FileDescriptorSet
|
|
77
|
+
* instance or a FileDescriptorSet in binary format.
|
|
78
|
+
*/
|
|
79
|
+
static fromFileDescriptorSet(bytesOrSet) {
|
|
80
|
+
const set = bytesOrSet instanceof Uint8Array
|
|
81
|
+
? FileDescriptorSet.fromBinary(bytesOrSet)
|
|
82
|
+
: new FileDescriptorSet(bytesOrSet);
|
|
83
|
+
const dr = new DescriptorRegistry();
|
|
84
|
+
dr.add(...set.file);
|
|
85
|
+
return dr;
|
|
86
|
+
}
|
|
74
87
|
/**
|
|
75
88
|
* May raise an error on invalid descriptors.
|
|
76
89
|
*/
|
|
@@ -1,37 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
// @generated by protoc-gen-es v0.0.2-alpha.2 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts"
|
|
3
|
-
// @generated from file google/protobuf/any.proto (package google.protobuf, syntax proto3)
|
|
1
|
+
// Copyright 2021-2022 Buf Technologies, Inc.
|
|
4
2
|
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
8
6
|
//
|
|
9
|
-
//
|
|
10
|
-
// modification, are permitted provided that the following conditions are
|
|
11
|
-
// met:
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
12
8
|
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
// * Neither the name of Google Inc. nor the names of its
|
|
20
|
-
// contributors may be used to endorse or promote products derived from
|
|
21
|
-
// this software without specific prior written permission.
|
|
22
|
-
//
|
|
23
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
24
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
25
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
26
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
27
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
28
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
29
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
30
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
31
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
32
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
33
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
34
|
-
import { Message, proto3 } from "../../index.js";
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { Message, proto3 } from "../../index-runtime.js";
|
|
35
15
|
/**
|
|
36
16
|
* `Any` contains an arbitrary serialized protocol buffer message along with a
|
|
37
17
|
* URL that describes the type of the serialized message.
|
|
@@ -58,7 +38,7 @@ import { Message, proto3 } from "../../index.js";
|
|
|
58
38
|
* foo = any.unpack(Foo.class);
|
|
59
39
|
* }
|
|
60
40
|
*
|
|
61
|
-
*
|
|
41
|
+
* Example 3: Pack and unpack a message in Python.
|
|
62
42
|
*
|
|
63
43
|
* foo = Foo(...)
|
|
64
44
|
* any = Any()
|
|
@@ -68,7 +48,7 @@ import { Message, proto3 } from "../../index.js";
|
|
|
68
48
|
* any.Unpack(foo)
|
|
69
49
|
* ...
|
|
70
50
|
*
|
|
71
|
-
*
|
|
51
|
+
* Example 4: Pack and unpack a message in Go
|
|
72
52
|
*
|
|
73
53
|
* foo := &pb.Foo{...}
|
|
74
54
|
* any, err := anypb.New(foo)
|
|
@@ -89,7 +69,7 @@ import { Message, proto3 } from "../../index.js";
|
|
|
89
69
|
*
|
|
90
70
|
*
|
|
91
71
|
* JSON
|
|
92
|
-
*
|
|
72
|
+
*
|
|
93
73
|
* The JSON representation of an `Any` value uses the regular
|
|
94
74
|
* representation of the deserialized, embedded message, with an
|
|
95
75
|
* additional field `@type` which contains the type URL. Example:
|
|
@@ -1,37 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
// @generated by protoc-gen-es v0.0.2-alpha.2 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts"
|
|
3
|
-
// @generated from file google/protobuf/api.proto (package google.protobuf, syntax proto3)
|
|
1
|
+
// Copyright 2021-2022 Buf Technologies, Inc.
|
|
4
2
|
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
8
6
|
//
|
|
9
|
-
//
|
|
10
|
-
// modification, are permitted provided that the following conditions are
|
|
11
|
-
// met:
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
12
8
|
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
// * Neither the name of Google Inc. nor the names of its
|
|
20
|
-
// contributors may be used to endorse or promote products derived from
|
|
21
|
-
// this software without specific prior written permission.
|
|
22
|
-
//
|
|
23
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
24
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
25
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
26
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
27
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
28
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
29
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
30
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
31
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
32
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
33
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
34
|
-
import { Message, proto3 } from "../../index.js";
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { Message, proto3 } from "../../index-runtime.js";
|
|
35
15
|
import { Option, Syntax } from "./type_pb.js";
|
|
36
16
|
import { SourceContext } from "./source_context_pb.js";
|
|
37
17
|
/**
|
|
@@ -1,52 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
// @generated by protoc-gen-es v0.0.2-alpha.2 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts"
|
|
3
|
-
// @generated from file google/protobuf/compiler/plugin.proto (package google.protobuf.compiler, syntax proto2)
|
|
1
|
+
// Copyright 2021-2022 Buf Technologies, Inc.
|
|
4
2
|
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
8
6
|
//
|
|
9
|
-
//
|
|
10
|
-
// modification, are permitted provided that the following conditions are
|
|
11
|
-
// met:
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
12
8
|
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
// * Neither the name of Google Inc. nor the names of its
|
|
20
|
-
// contributors may be used to endorse or promote products derived from
|
|
21
|
-
// this software without specific prior written permission.
|
|
22
|
-
//
|
|
23
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
24
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
25
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
26
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
27
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
28
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
29
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
30
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
31
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
32
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
33
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
34
|
-
// Author: kenton@google.com (Kenton Varda)
|
|
35
|
-
//
|
|
36
|
-
// WARNING: The plugin interface is currently EXPERIMENTAL and is subject to
|
|
37
|
-
// change.
|
|
38
|
-
//
|
|
39
|
-
// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is
|
|
40
|
-
// just a program that reads a CodeGeneratorRequest from stdin and writes a
|
|
41
|
-
// CodeGeneratorResponse to stdout.
|
|
42
|
-
//
|
|
43
|
-
// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead
|
|
44
|
-
// of dealing with the raw protocol defined here.
|
|
45
|
-
//
|
|
46
|
-
// A plugin executable needs only to be placed somewhere in the path. The
|
|
47
|
-
// plugin should be named "protoc-gen-$NAME", and will then be used when the
|
|
48
|
-
// flag "--${NAME}_out" is passed to protoc.
|
|
49
|
-
import { Message, proto2 } from "../../../index.js";
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { Message, proto2 } from "../../../index-runtime.js";
|
|
50
15
|
import { FileDescriptorProto, GeneratedCodeInfo } from "../descriptor_pb.js";
|
|
51
16
|
/**
|
|
52
17
|
* The version number of protocol compiler.
|
|
@@ -1,44 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
// @generated by protoc-gen-es v0.0.2-alpha.2 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts"
|
|
3
|
-
// @generated from file google/protobuf/descriptor.proto (package google.protobuf, syntax proto2)
|
|
1
|
+
// Copyright 2021-2022 Buf Technologies, Inc.
|
|
4
2
|
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
8
6
|
//
|
|
9
|
-
//
|
|
10
|
-
// modification, are permitted provided that the following conditions are
|
|
11
|
-
// met:
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
12
8
|
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
// * Neither the name of Google Inc. nor the names of its
|
|
20
|
-
// contributors may be used to endorse or promote products derived from
|
|
21
|
-
// this software without specific prior written permission.
|
|
22
|
-
//
|
|
23
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
24
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
25
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
26
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
27
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
28
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
29
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
30
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
31
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
32
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
33
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
34
|
-
// Author: kenton@google.com (Kenton Varda)
|
|
35
|
-
// Based on original Protocol Buffers design by
|
|
36
|
-
// Sanjay Ghemawat, Jeff Dean, and others.
|
|
37
|
-
//
|
|
38
|
-
// The messages in this file describe the definitions found in .proto files.
|
|
39
|
-
// A valid .proto file can be translated directly to a FileDescriptorProto
|
|
40
|
-
// without any other information (e.g. without reading its imports).
|
|
41
|
-
import { Message, proto2 } from "../../index.js";
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { Message, proto2 } from "../../index-runtime.js";
|
|
42
15
|
/**
|
|
43
16
|
* The protocol compiler can output a FileDescriptorSet containing the .proto
|
|
44
17
|
* files it parses.
|
|
@@ -864,6 +837,7 @@ FieldOptions.fields = proto2.util.newFieldList(() => [
|
|
|
864
837
|
{ no: 2, name: "packed", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
865
838
|
{ no: 6, name: "jstype", kind: "enum", T: proto2.getEnumType(FieldOptions_JSType), opt: true, default: FieldOptions_JSType.JS_NORMAL },
|
|
866
839
|
{ no: 5, name: "lazy", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
|
|
840
|
+
{ no: 15, name: "unverified_lazy", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
|
|
867
841
|
{ no: 3, name: "deprecated", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
|
|
868
842
|
{ no: 10, name: "weak", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true, default: false },
|
|
869
843
|
{ no: 999, name: "uninterpreted_option", kind: "message", T: UninterpretedOption, repeated: true },
|
|
@@ -1286,8 +1260,8 @@ export class SourceCodeInfo_Location extends Message {
|
|
|
1286
1260
|
* location.
|
|
1287
1261
|
*
|
|
1288
1262
|
* Each element is a field number or an index. They form a path from
|
|
1289
|
-
* the root FileDescriptorProto to the place where the definition.
|
|
1290
|
-
* example, this path:
|
|
1263
|
+
* the root FileDescriptorProto to the place where the definition occurs.
|
|
1264
|
+
* For example, this path:
|
|
1291
1265
|
* [ 4, 3, 2, 7, 1 ]
|
|
1292
1266
|
* refers to:
|
|
1293
1267
|
* file.message_type(3) // 4, 3
|
|
@@ -1,37 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
// @generated by protoc-gen-es v0.0.2-alpha.2 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts"
|
|
3
|
-
// @generated from file google/protobuf/duration.proto (package google.protobuf, syntax proto3)
|
|
1
|
+
// Copyright 2021-2022 Buf Technologies, Inc.
|
|
4
2
|
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
8
6
|
//
|
|
9
|
-
//
|
|
10
|
-
// modification, are permitted provided that the following conditions are
|
|
11
|
-
// met:
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
12
8
|
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
// * Neither the name of Google Inc. nor the names of its
|
|
20
|
-
// contributors may be used to endorse or promote products derived from
|
|
21
|
-
// this software without specific prior written permission.
|
|
22
|
-
//
|
|
23
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
24
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
25
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
26
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
27
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
28
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
29
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
30
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
31
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
32
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
33
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
34
|
-
import { Message, proto3, protoInt64 } from "../../index.js";
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { Message, proto3, protoInt64 } from "../../index-runtime.js";
|
|
35
15
|
/**
|
|
36
16
|
* A Duration represents a signed, fixed-length span of time represented
|
|
37
17
|
* as a count of seconds and fractions of seconds at nanosecond
|
|
@@ -1,37 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
// @generated by protoc-gen-es v0.0.2-alpha.2 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts"
|
|
3
|
-
// @generated from file google/protobuf/empty.proto (package google.protobuf, syntax proto3)
|
|
1
|
+
// Copyright 2021-2022 Buf Technologies, Inc.
|
|
4
2
|
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
8
6
|
//
|
|
9
|
-
//
|
|
10
|
-
// modification, are permitted provided that the following conditions are
|
|
11
|
-
// met:
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
12
8
|
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
// * Neither the name of Google Inc. nor the names of its
|
|
20
|
-
// contributors may be used to endorse or promote products derived from
|
|
21
|
-
// this software without specific prior written permission.
|
|
22
|
-
//
|
|
23
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
24
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
25
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
26
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
27
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
28
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
29
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
30
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
31
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
32
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
33
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
34
|
-
import { Message, proto3 } from "../../index.js";
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { Message, proto3 } from "../../index-runtime.js";
|
|
35
15
|
/**
|
|
36
16
|
* A generic empty message that you can re-use to avoid defining duplicated
|
|
37
17
|
* empty messages in your APIs. A typical example is to use it as the request
|
|
@@ -1,37 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
// @generated by protoc-gen-es v0.0.2-alpha.2 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts"
|
|
3
|
-
// @generated from file google/protobuf/field_mask.proto (package google.protobuf, syntax proto3)
|
|
1
|
+
// Copyright 2021-2022 Buf Technologies, Inc.
|
|
4
2
|
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
8
6
|
//
|
|
9
|
-
//
|
|
10
|
-
// modification, are permitted provided that the following conditions are
|
|
11
|
-
// met:
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
12
8
|
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
// * Neither the name of Google Inc. nor the names of its
|
|
20
|
-
// contributors may be used to endorse or promote products derived from
|
|
21
|
-
// this software without specific prior written permission.
|
|
22
|
-
//
|
|
23
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
24
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
25
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
26
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
27
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
28
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
29
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
30
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
31
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
32
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
33
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
34
|
-
import { Message, proto3 } from "../../index.js";
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { Message, proto3 } from "../../index-runtime.js";
|
|
35
15
|
/**
|
|
36
16
|
* `FieldMask` represents a set of symbolic field paths, for example:
|
|
37
17
|
*
|