@bufbuild/protobuf 0.0.1-alpha.1 → 0.0.1
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 +21 -1
- package/dist/cjs/binary-encoding.js +402 -410
- package/dist/cjs/descriptor-registry.js +407 -449
- package/dist/cjs/descriptor-set.js +416 -513
- package/dist/cjs/field.js +30 -30
- package/dist/cjs/google/protobuf/any_pb.js +122 -140
- package/dist/cjs/google/protobuf/api_pb.js +177 -224
- package/dist/cjs/google/protobuf/compiler/plugin_pb.js +125 -227
- package/dist/cjs/google/protobuf/descriptor_pb.js +1029 -1888
- package/dist/cjs/google/protobuf/duration_pb.js +72 -88
- package/dist/cjs/google/protobuf/empty_pb.js +17 -17
- package/dist/cjs/google/protobuf/field_mask_pb.js +77 -94
- package/dist/cjs/google/protobuf/source_context_pb.js +25 -25
- package/dist/cjs/google/protobuf/struct_pb.js +144 -181
- package/dist/cjs/google/protobuf/timestamp_pb.js +86 -123
- package/dist/cjs/google/protobuf/type_pb.js +406 -462
- package/dist/cjs/google/protobuf/wrappers_pb.js +407 -470
- package/dist/cjs/index.js +24 -122
- package/dist/cjs/message.js +81 -89
- package/dist/cjs/private/assert.js +20 -26
- package/dist/cjs/private/base64.js +79 -78
- package/dist/cjs/private/binary-format-common.js +195 -208
- package/dist/cjs/private/binary-format-proto2.js +75 -109
- package/dist/cjs/private/binary-format-proto3.js +57 -90
- package/dist/cjs/private/enum.js +38 -43
- package/dist/cjs/private/field-list.js +51 -50
- package/dist/cjs/private/field-wrapper.js +8 -10
- package/dist/cjs/private/field.js +22 -25
- package/dist/cjs/private/goog-varint.js +275 -0
- package/dist/cjs/private/json-format-common.js +414 -440
- package/dist/cjs/private/json-format-proto2.js +78 -89
- package/dist/cjs/private/json-format-proto3.js +69 -93
- package/dist/cjs/private/message-type.js +26 -27
- package/dist/cjs/private/names.js +58 -62
- package/dist/cjs/private/proto-runtime.js +11 -16
- package/dist/cjs/private/scalars.js +100 -103
- package/dist/cjs/private/util-common.js +180 -210
- package/dist/cjs/proto-int64.js +111 -112
- package/dist/cjs/proto2.js +50 -63
- package/dist/cjs/proto3.js +61 -74
- package/dist/cjs/service-type.js +14 -17
- package/dist/cjs/type-registry.js +33 -31
- package/dist/esm/binary-encoding.js +401 -414
- package/dist/esm/descriptor-registry.js +409 -458
- package/dist/esm/descriptor-set.js +417 -478
- package/dist/esm/field.js +29 -29
- package/dist/esm/google/protobuf/any_pb.js +122 -140
- package/dist/esm/google/protobuf/api_pb.js +177 -197
- package/dist/esm/google/protobuf/compiler/plugin_pb.js +123 -216
- package/dist/esm/google/protobuf/descriptor_pb.js +1013 -1804
- package/dist/esm/google/protobuf/duration_pb.js +72 -88
- package/dist/esm/google/protobuf/empty_pb.js +17 -17
- package/dist/esm/google/protobuf/field_mask_pb.js +77 -94
- package/dist/esm/google/protobuf/source_context_pb.js +25 -25
- package/dist/esm/google/protobuf/struct_pb.js +143 -180
- package/dist/esm/google/protobuf/timestamp_pb.js +86 -123
- package/dist/esm/google/protobuf/type_pb.js +401 -421
- package/dist/esm/google/protobuf/wrappers_pb.js +406 -397
- package/dist/esm/index.js +1 -1
- package/dist/esm/message.js +81 -89
- package/dist/esm/private/assert.js +19 -21
- package/dist/esm/private/base64.js +79 -78
- package/dist/esm/private/binary-format-common.js +196 -207
- package/dist/esm/private/binary-format-proto2.js +76 -81
- package/dist/esm/private/binary-format-proto3.js +58 -67
- package/dist/esm/private/enum.js +38 -43
- package/dist/esm/private/field-list.js +51 -50
- package/dist/esm/private/field-wrapper.js +8 -10
- package/dist/esm/private/field.js +22 -22
- package/dist/esm/private/goog-varint.js +266 -0
- package/dist/esm/private/json-format-common.js +414 -435
- package/dist/esm/private/json-format-proto2.js +76 -81
- package/dist/esm/private/json-format-proto3.js +66 -80
- package/dist/esm/private/message-type.js +27 -28
- package/dist/esm/private/names.js +57 -57
- package/dist/esm/private/proto-runtime.js +11 -11
- package/dist/esm/private/scalars.js +99 -99
- package/dist/esm/private/util-common.js +180 -192
- package/dist/esm/proto-int64.js +111 -112
- package/dist/esm/proto2.js +50 -57
- package/dist/esm/proto3.js +61 -68
- package/dist/esm/service-type.js +12 -12
- package/dist/esm/type-registry.js +33 -31
- package/dist/types/binary-encoding.d.ts +398 -398
- package/dist/types/binary-format.d.ts +69 -91
- package/dist/types/descriptor-registry.d.ts +23 -29
- package/dist/types/descriptor-set.d.ts +107 -128
- package/dist/types/enum.d.ts +21 -21
- package/dist/types/field-list.d.ts +21 -21
- package/dist/types/field.d.ts +191 -231
- package/dist/types/google/protobuf/any_pb.d.ts +56 -77
- package/dist/types/google/protobuf/api_pb.d.ts +144 -187
- package/dist/types/google/protobuf/compiler/plugin_pb.d.ts +195 -257
- package/dist/types/google/protobuf/descriptor_pb.d.ts +1360 -1737
- package/dist/types/google/protobuf/duration_pb.d.ts +30 -50
- package/dist/types/google/protobuf/empty_pb.d.ts +9 -28
- package/dist/types/google/protobuf/field_mask_pb.d.ts +17 -37
- package/dist/types/google/protobuf/source_context_pb.d.ts +16 -35
- package/dist/types/google/protobuf/struct_pb.d.ts +64 -115
- package/dist/types/google/protobuf/timestamp_pb.d.ts +31 -51
- package/dist/types/google/protobuf/type_pb.d.ts +355 -422
- package/dist/types/google/protobuf/wrappers_pb.d.ts +181 -297
- package/dist/types/index.d.ts +4 -27
- package/dist/types/json-format.d.ts +70 -89
- package/dist/types/message-type.d.ts +38 -46
- package/dist/types/message.d.ts +73 -99
- package/dist/types/private/assert.d.ts +1 -4
- package/dist/types/private/binary-format-common.d.ts +6 -32
- package/dist/types/private/enum.d.ts +4 -11
- package/dist/types/private/field-list.d.ts +14 -21
- package/dist/types/private/field-wrapper.d.ts +5 -11
- package/dist/types/private/field.d.ts +12 -12
- package/dist/types/{google/varint.d.ts → private/goog-varint.d.ts} +6 -13
- package/dist/types/private/json-format-common.d.ts +5 -27
- package/dist/types/private/message-type.d.ts +3 -8
- package/dist/types/private/names.d.ts +1 -4
- package/dist/types/private/options-map.d.ts +1 -1
- package/dist/types/private/proto-runtime.d.ts +29 -42
- package/dist/types/private/scalars.d.ts +5 -12
- package/dist/types/private/util-common.d.ts +1 -4
- package/dist/types/private/util.d.ts +29 -41
- package/dist/types/proto-int64.d.ts +42 -42
- package/dist/types/service-type.d.ts +37 -57
- package/dist/types/type-registry.d.ts +13 -15
- package/package.json +2 -2
- package/dist/cjs/google/varint.js +0 -280
- package/dist/esm/google/varint.js +0 -265
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// @generated by protoc-gen-es v0.0.1
|
|
2
|
+
// @generated by protoc-gen-es v0.0.1 with parameter "bootstrap_wkt=true,ts_nocheck=false"
|
|
3
3
|
// @generated from file google/protobuf/duration.proto (package google.protobuf, syntax proto3)
|
|
4
4
|
//
|
|
5
5
|
// Protocol Buffers - Google's data interchange format
|
|
@@ -97,101 +97,85 @@ import { Message, proto3, protoInt64 } from "../../index.js";
|
|
|
97
97
|
* @generated from message google.protobuf.Duration
|
|
98
98
|
*/
|
|
99
99
|
export class Duration extends Message {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
fromJson(json, options) {
|
|
124
|
-
if (typeof json !== "string") {
|
|
125
|
-
throw new Error(
|
|
126
|
-
`cannot decode google.protobuf.Duration from JSON: ${proto3.json.debug(
|
|
127
|
-
json
|
|
128
|
-
)}`
|
|
129
|
-
);
|
|
100
|
+
constructor(data) {
|
|
101
|
+
super();
|
|
102
|
+
/**
|
|
103
|
+
* Signed seconds of the span of time. Must be from -315,576,000,000
|
|
104
|
+
* to +315,576,000,000 inclusive. Note: these bounds are computed from:
|
|
105
|
+
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
|
|
106
|
+
*
|
|
107
|
+
* @generated from field: int64 seconds = 1;
|
|
108
|
+
*/
|
|
109
|
+
this.seconds = protoInt64.zero;
|
|
110
|
+
/**
|
|
111
|
+
* Signed fractions of a second at nanosecond resolution of the span
|
|
112
|
+
* of time. Durations less than one second are represented with a 0
|
|
113
|
+
* `seconds` field and a positive or negative `nanos` field. For durations
|
|
114
|
+
* of one second or more, a non-zero value for the `nanos` field must be
|
|
115
|
+
* of the same sign as the `seconds` field. Must be from -999,999,999
|
|
116
|
+
* to +999,999,999 inclusive.
|
|
117
|
+
*
|
|
118
|
+
* @generated from field: int32 nanos = 2;
|
|
119
|
+
*/
|
|
120
|
+
this.nanos = 0;
|
|
121
|
+
proto3.util.initPartial(data, this);
|
|
130
122
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
)
|
|
137
|
-
|
|
123
|
+
fromJson(json, options) {
|
|
124
|
+
if (typeof json !== "string") {
|
|
125
|
+
throw new Error(`cannot decode google.protobuf.Duration from JSON: ${proto3.json.debug(json)}`);
|
|
126
|
+
}
|
|
127
|
+
const match = json.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/);
|
|
128
|
+
if (match === null) {
|
|
129
|
+
throw new Error(`cannot decode google.protobuf.Duration from JSON: ${proto3.json.debug(json)}`);
|
|
130
|
+
}
|
|
131
|
+
const longSeconds = Number(match[1]);
|
|
132
|
+
if (longSeconds > 315576000000 || longSeconds < -315576000000) {
|
|
133
|
+
throw new Error(`cannot decode google.protobuf.Duration from JSON: ${proto3.json.debug(json)}`);
|
|
134
|
+
}
|
|
135
|
+
this.seconds = protoInt64.parse(longSeconds);
|
|
136
|
+
if (typeof match[2] == "string") {
|
|
137
|
+
const nanosStr = match[2] + "0".repeat(9 - match[2].length);
|
|
138
|
+
this.nanos = parseInt(nanosStr);
|
|
139
|
+
if (longSeconds < 0n) {
|
|
140
|
+
this.nanos = -this.nanos;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return this;
|
|
138
144
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
)
|
|
145
|
-
|
|
145
|
+
toJson(options) {
|
|
146
|
+
if (Number(this.seconds) > 315576000000 || Number(this.seconds) < -315576000000) {
|
|
147
|
+
throw new Error(`cannot encode google.protobuf.Duration to JSON: value out of range`);
|
|
148
|
+
}
|
|
149
|
+
let text = this.seconds.toString();
|
|
150
|
+
if (this.nanos !== 0) {
|
|
151
|
+
let nanosStr = Math.abs(this.nanos).toString();
|
|
152
|
+
nanosStr = "0".repeat(9 - nanosStr.length) + nanosStr;
|
|
153
|
+
if (nanosStr.substring(3) === "000000") {
|
|
154
|
+
nanosStr = nanosStr.substring(0, 3);
|
|
155
|
+
}
|
|
156
|
+
else if (nanosStr.substring(6) === "000") {
|
|
157
|
+
nanosStr = nanosStr.substring(0, 6);
|
|
158
|
+
}
|
|
159
|
+
text += "." + nanosStr;
|
|
160
|
+
}
|
|
161
|
+
return text + "s";
|
|
146
162
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
const nanosStr = match[2] + "0".repeat(9 - match[2].length);
|
|
150
|
-
this.nanos = parseInt(nanosStr);
|
|
151
|
-
if (longSeconds < 0n) {
|
|
152
|
-
this.nanos = -this.nanos;
|
|
153
|
-
}
|
|
163
|
+
static fromBinary(bytes, options) {
|
|
164
|
+
return new Duration().fromBinary(bytes, options);
|
|
154
165
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
toJson(options) {
|
|
158
|
-
if (
|
|
159
|
-
Number(this.seconds) > 315576000000 ||
|
|
160
|
-
Number(this.seconds) < -315576000000
|
|
161
|
-
) {
|
|
162
|
-
throw new Error(
|
|
163
|
-
`cannot encode google.protobuf.Duration to JSON: value out of range`
|
|
164
|
-
);
|
|
166
|
+
static fromJson(jsonValue, options) {
|
|
167
|
+
return new Duration().fromJson(jsonValue, options);
|
|
165
168
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
nanosStr = nanosStr.substring(0, 3);
|
|
172
|
-
} else if (nanosStr.substring(6) === "000") {
|
|
173
|
-
nanosStr = nanosStr.substring(0, 6);
|
|
174
|
-
}
|
|
175
|
-
text += "." + nanosStr;
|
|
169
|
+
static fromJsonString(jsonString, options) {
|
|
170
|
+
return new Duration().fromJsonString(jsonString, options);
|
|
171
|
+
}
|
|
172
|
+
static equals(a, b) {
|
|
173
|
+
return proto3.util.equals(Duration, a, b);
|
|
176
174
|
}
|
|
177
|
-
return text + "s";
|
|
178
|
-
}
|
|
179
|
-
static fromBinary(bytes, options) {
|
|
180
|
-
return new Duration().fromBinary(bytes, options);
|
|
181
|
-
}
|
|
182
|
-
static fromJson(jsonValue, options) {
|
|
183
|
-
return new Duration().fromJson(jsonValue, options);
|
|
184
|
-
}
|
|
185
|
-
static fromJsonString(jsonString, options) {
|
|
186
|
-
return new Duration().fromJsonString(jsonString, options);
|
|
187
|
-
}
|
|
188
|
-
static equals(a, b) {
|
|
189
|
-
return proto3.util.equals(Duration, a, b);
|
|
190
|
-
}
|
|
191
175
|
}
|
|
192
176
|
Duration.runtime = proto3;
|
|
193
177
|
Duration.typeName = "google.protobuf.Duration";
|
|
194
178
|
Duration.fields = proto3.util.newFieldList(() => [
|
|
195
|
-
|
|
196
|
-
|
|
179
|
+
{ no: 1, name: "seconds", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
|
|
180
|
+
{ no: 2, name: "nanos", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
197
181
|
]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// @generated by protoc-gen-es v0.0.1
|
|
2
|
+
// @generated by protoc-gen-es v0.0.1 with parameter "bootstrap_wkt=true,ts_nocheck=false"
|
|
3
3
|
// @generated from file google/protobuf/empty.proto (package google.protobuf, syntax proto3)
|
|
4
4
|
//
|
|
5
5
|
// Protocol Buffers - Google's data interchange format
|
|
@@ -46,22 +46,22 @@ import { Message, proto3 } from "../../index.js";
|
|
|
46
46
|
* @generated from message google.protobuf.Empty
|
|
47
47
|
*/
|
|
48
48
|
export class Empty extends Message {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
49
|
+
constructor(data) {
|
|
50
|
+
super();
|
|
51
|
+
proto3.util.initPartial(data, this);
|
|
52
|
+
}
|
|
53
|
+
static fromBinary(bytes, options) {
|
|
54
|
+
return new Empty().fromBinary(bytes, options);
|
|
55
|
+
}
|
|
56
|
+
static fromJson(jsonValue, options) {
|
|
57
|
+
return new Empty().fromJson(jsonValue, options);
|
|
58
|
+
}
|
|
59
|
+
static fromJsonString(jsonString, options) {
|
|
60
|
+
return new Empty().fromJsonString(jsonString, options);
|
|
61
|
+
}
|
|
62
|
+
static equals(a, b) {
|
|
63
|
+
return proto3.util.equals(Empty, a, b);
|
|
64
|
+
}
|
|
65
65
|
}
|
|
66
66
|
Empty.runtime = proto3;
|
|
67
67
|
Empty.typeName = "google.protobuf.Empty";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// @generated by protoc-gen-es v0.0.1
|
|
2
|
+
// @generated by protoc-gen-es v0.0.1 with parameter "bootstrap_wkt=true,ts_nocheck=false"
|
|
3
3
|
// @generated from file google/protobuf/field_mask.proto (package google.protobuf, syntax proto3)
|
|
4
4
|
//
|
|
5
5
|
// Protocol Buffers - Google's data interchange format
|
|
@@ -236,108 +236,91 @@ import { Message, proto3 } from "../../index.js";
|
|
|
236
236
|
* @generated from message google.protobuf.FieldMask
|
|
237
237
|
*/
|
|
238
238
|
export class FieldMask extends Message {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
239
|
+
constructor(data) {
|
|
240
|
+
super();
|
|
241
|
+
/**
|
|
242
|
+
* The set of field mask paths.
|
|
243
|
+
*
|
|
244
|
+
* @generated from field: repeated string paths = 1;
|
|
245
|
+
*/
|
|
246
|
+
this.paths = [];
|
|
247
|
+
proto3.util.initPartial(data, this);
|
|
248
|
+
}
|
|
249
|
+
toJson(options) {
|
|
250
|
+
// Converts snake_case to protoCamelCase according to the convention
|
|
251
|
+
// used by protoc to convert a field name to a JSON name.
|
|
252
|
+
function protoCamelCase(snakeCase) {
|
|
253
|
+
let capNext = false;
|
|
254
|
+
const b = [];
|
|
255
|
+
for (let i = 0; i < snakeCase.length; i++) {
|
|
256
|
+
let c = snakeCase.charAt(i);
|
|
257
|
+
switch (c) {
|
|
258
|
+
case '_':
|
|
259
|
+
capNext = true;
|
|
260
|
+
break;
|
|
261
|
+
case '0':
|
|
262
|
+
case '1':
|
|
263
|
+
case '2':
|
|
264
|
+
case '3':
|
|
265
|
+
case '4':
|
|
266
|
+
case '5':
|
|
267
|
+
case '6':
|
|
268
|
+
case '7':
|
|
269
|
+
case '8':
|
|
270
|
+
case '9':
|
|
271
|
+
b.push(c);
|
|
272
|
+
capNext = false;
|
|
273
|
+
break;
|
|
274
|
+
default:
|
|
275
|
+
if (capNext) {
|
|
276
|
+
capNext = false;
|
|
277
|
+
c = c.toUpperCase();
|
|
278
|
+
}
|
|
279
|
+
b.push(c);
|
|
280
|
+
break;
|
|
281
|
+
}
|
|
278
282
|
}
|
|
279
|
-
b.
|
|
280
|
-
break;
|
|
283
|
+
return b.join('');
|
|
281
284
|
}
|
|
282
|
-
|
|
283
|
-
|
|
285
|
+
return this.paths.map(p => {
|
|
286
|
+
if (p.match(/_[0-9]?_/g) || p.match(/[A-Z]/g)) {
|
|
287
|
+
throw new Error("cannot decode google.protobuf.FieldMask from JSON: lowerCamelCase of path name \"" + p + "\" is irreversible");
|
|
288
|
+
}
|
|
289
|
+
return protoCamelCase(p);
|
|
290
|
+
}).join(",");
|
|
284
291
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
throw new Error(
|
|
289
|
-
'cannot decode google.protobuf.FieldMask from JSON: lowerCamelCase of path name "' +
|
|
290
|
-
p +
|
|
291
|
-
'" is irreversible'
|
|
292
|
-
);
|
|
292
|
+
fromJson(json, options) {
|
|
293
|
+
if (typeof json !== "string") {
|
|
294
|
+
throw new Error("cannot decode google.protobuf.FieldMask from JSON: " + proto3.json.debug(json));
|
|
293
295
|
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
296
|
+
if (json === "") {
|
|
297
|
+
return this;
|
|
298
|
+
}
|
|
299
|
+
function camelToSnake(str) {
|
|
300
|
+
if (str.includes("_")) {
|
|
301
|
+
throw new Error("cannot decode google.protobuf.FieldMask from JSON: path names must be lowerCamelCase");
|
|
302
|
+
}
|
|
303
|
+
const sc = str.replace(/[A-Z]/g, letter => "_" + letter.toLowerCase());
|
|
304
|
+
return (sc[0] === "_") ? sc.substring(1) : sc;
|
|
305
|
+
}
|
|
306
|
+
this.paths = json.split(",").map(camelToSnake);
|
|
307
|
+
return this;
|
|
308
|
+
}
|
|
309
|
+
static fromBinary(bytes, options) {
|
|
310
|
+
return new FieldMask().fromBinary(bytes, options);
|
|
311
|
+
}
|
|
312
|
+
static fromJson(jsonValue, options) {
|
|
313
|
+
return new FieldMask().fromJson(jsonValue, options);
|
|
304
314
|
}
|
|
305
|
-
|
|
306
|
-
|
|
315
|
+
static fromJsonString(jsonString, options) {
|
|
316
|
+
return new FieldMask().fromJsonString(jsonString, options);
|
|
307
317
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
throw new Error(
|
|
311
|
-
"cannot decode google.protobuf.FieldMask from JSON: path names must be lowerCamelCase"
|
|
312
|
-
);
|
|
313
|
-
}
|
|
314
|
-
const sc = str.replace(/[A-Z]/g, (letter) => "_" + letter.toLowerCase());
|
|
315
|
-
return sc[0] === "_" ? sc.substring(1) : sc;
|
|
318
|
+
static equals(a, b) {
|
|
319
|
+
return proto3.util.equals(FieldMask, a, b);
|
|
316
320
|
}
|
|
317
|
-
this.paths = json.split(",").map(camelToSnake);
|
|
318
|
-
return this;
|
|
319
|
-
}
|
|
320
|
-
static fromBinary(bytes, options) {
|
|
321
|
-
return new FieldMask().fromBinary(bytes, options);
|
|
322
|
-
}
|
|
323
|
-
static fromJson(jsonValue, options) {
|
|
324
|
-
return new FieldMask().fromJson(jsonValue, options);
|
|
325
|
-
}
|
|
326
|
-
static fromJsonString(jsonString, options) {
|
|
327
|
-
return new FieldMask().fromJsonString(jsonString, options);
|
|
328
|
-
}
|
|
329
|
-
static equals(a, b) {
|
|
330
|
-
return proto3.util.equals(FieldMask, a, b);
|
|
331
|
-
}
|
|
332
321
|
}
|
|
333
322
|
FieldMask.runtime = proto3;
|
|
334
323
|
FieldMask.typeName = "google.protobuf.FieldMask";
|
|
335
324
|
FieldMask.fields = proto3.util.newFieldList(() => [
|
|
336
|
-
|
|
337
|
-
no: 1,
|
|
338
|
-
name: "paths",
|
|
339
|
-
kind: "scalar",
|
|
340
|
-
T: 9 /* ScalarType.STRING */,
|
|
341
|
-
repeated: true,
|
|
342
|
-
},
|
|
325
|
+
{ no: 1, name: "paths", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
|
|
343
326
|
]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// @generated by protoc-gen-es v0.0.1
|
|
2
|
+
// @generated by protoc-gen-es v0.0.1 with parameter "bootstrap_wkt=true,ts_nocheck=false"
|
|
3
3
|
// @generated from file google/protobuf/source_context.proto (package google.protobuf, syntax proto3)
|
|
4
4
|
//
|
|
5
5
|
// Protocol Buffers - Google's data interchange format
|
|
@@ -39,32 +39,32 @@ import { Message, proto3 } from "../../index.js";
|
|
|
39
39
|
* @generated from message google.protobuf.SourceContext
|
|
40
40
|
*/
|
|
41
41
|
export class SourceContext extends Message {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
42
|
+
constructor(data) {
|
|
43
|
+
super();
|
|
44
|
+
/**
|
|
45
|
+
* The path-qualified name of the .proto file that contained the associated
|
|
46
|
+
* protobuf element. For example: `"google/protobuf/source_context.proto"`.
|
|
47
|
+
*
|
|
48
|
+
* @generated from field: string file_name = 1;
|
|
49
|
+
*/
|
|
50
|
+
this.fileName = "";
|
|
51
|
+
proto3.util.initPartial(data, this);
|
|
52
|
+
}
|
|
53
|
+
static fromBinary(bytes, options) {
|
|
54
|
+
return new SourceContext().fromBinary(bytes, options);
|
|
55
|
+
}
|
|
56
|
+
static fromJson(jsonValue, options) {
|
|
57
|
+
return new SourceContext().fromJson(jsonValue, options);
|
|
58
|
+
}
|
|
59
|
+
static fromJsonString(jsonString, options) {
|
|
60
|
+
return new SourceContext().fromJsonString(jsonString, options);
|
|
61
|
+
}
|
|
62
|
+
static equals(a, b) {
|
|
63
|
+
return proto3.util.equals(SourceContext, a, b);
|
|
64
|
+
}
|
|
65
65
|
}
|
|
66
66
|
SourceContext.runtime = proto3;
|
|
67
67
|
SourceContext.typeName = "google.protobuf.SourceContext";
|
|
68
68
|
SourceContext.fields = proto3.util.newFieldList(() => [
|
|
69
|
-
|
|
69
|
+
{ no: 1, name: "file_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
70
70
|
]);
|