initial commit
This commit is contained in:
16
server/node_modules/proto3-json-serializer/build/src/any.d.ts
generated
vendored
Normal file
16
server/node_modules/proto3-json-serializer/build/src/any.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/// <reference types="node" />
|
||||
import * as protobuf from 'protobufjs';
|
||||
import { ToProto3JSONOptions } from './toproto3json';
|
||||
import { JSONObject, JSONValue } from './types';
|
||||
export interface Any {
|
||||
type_url: string;
|
||||
value: Buffer | Uint8Array;
|
||||
}
|
||||
export declare function googleProtobufAnyToProto3JSON(obj: protobuf.Message & Any, options?: ToProto3JSONOptions): JSONObject;
|
||||
export declare function googleProtobufAnyFromProto3JSON(root: protobuf.Root, json: JSONValue): {
|
||||
type_url: string;
|
||||
value: null;
|
||||
} | {
|
||||
type_url: string;
|
||||
value: string;
|
||||
};
|
||||
95
server/node_modules/proto3-json-serializer/build/src/any.js
generated
vendored
Normal file
95
server/node_modules/proto3-json-serializer/build/src/any.js
generated
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
"use strict";
|
||||
// Copyright 2021 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.googleProtobufAnyFromProto3JSON = exports.googleProtobufAnyToProto3JSON = void 0;
|
||||
const fromproto3json_1 = require("./fromproto3json");
|
||||
const toproto3json_1 = require("./toproto3json");
|
||||
// https://github.com/protocolbuffers/protobuf/blob/ba3836703b4a9e98e474aea2bac8c5b49b6d3b5c/python/google/protobuf/json_format.py#L850
|
||||
const specialJSON = new Set([
|
||||
'google.protobuf.Any',
|
||||
'google.protobuf.Duration',
|
||||
'google.protobuf.FieldMask',
|
||||
'google.protobuf.ListValue',
|
||||
'google.protobuf.Struct',
|
||||
'google.protobuf.Timestamp',
|
||||
'google.protobuf.Value',
|
||||
]);
|
||||
function googleProtobufAnyToProto3JSON(obj, options) {
|
||||
// https://developers.google.com/protocol-buffers/docs/proto3#json
|
||||
// If the Any contains a value that has a special JSON mapping, it will be converted as follows:
|
||||
// {"@type": xxx, "value": yyy}.
|
||||
// Otherwise, the value will be converted into a JSON object, and the "@type" field will be inserted
|
||||
// to indicate the actual data type.
|
||||
const typeName = obj.type_url.replace(/^.*\//, '');
|
||||
let type;
|
||||
try {
|
||||
type = obj.$type.root.lookupType(typeName);
|
||||
}
|
||||
catch (err) {
|
||||
throw new Error(`googleProtobufAnyToProto3JSON: cannot find type ${typeName}: ${err}`);
|
||||
}
|
||||
const valueMessage = type.decode(obj.value);
|
||||
const valueProto3JSON = (0, toproto3json_1.toProto3JSON)(valueMessage, options);
|
||||
if (specialJSON.has(typeName)) {
|
||||
return {
|
||||
'@type': obj.type_url,
|
||||
value: valueProto3JSON,
|
||||
};
|
||||
}
|
||||
valueProto3JSON['@type'] = obj.type_url;
|
||||
return valueProto3JSON;
|
||||
}
|
||||
exports.googleProtobufAnyToProto3JSON = googleProtobufAnyToProto3JSON;
|
||||
function googleProtobufAnyFromProto3JSON(root, json) {
|
||||
// Not all possible JSON values can hold Any, only real objects.
|
||||
if (json === null || typeof json !== 'object' || Array.isArray(json)) {
|
||||
throw new Error('googleProtobufAnyFromProto3JSON: must be an object to decode google.protobuf.Any');
|
||||
}
|
||||
const typeUrl = json['@type'];
|
||||
if (!typeUrl || typeof typeUrl !== 'string') {
|
||||
throw new Error('googleProtobufAnyFromProto3JSON: JSON serialization of google.protobuf.Any must contain @type field');
|
||||
}
|
||||
const typeName = typeUrl.replace(/^.*\//, '');
|
||||
let type;
|
||||
try {
|
||||
type = root.lookupType(typeName);
|
||||
}
|
||||
catch (err) {
|
||||
throw new Error(`googleProtobufAnyFromProto3JSON: cannot find type ${typeName}: ${err}`);
|
||||
}
|
||||
let value = json;
|
||||
if (specialJSON.has(typeName)) {
|
||||
if (!('value' in json)) {
|
||||
throw new Error(`googleProtobufAnyFromProto3JSON: JSON representation of google.protobuf.Any with type ${typeName} must contain the value field`);
|
||||
}
|
||||
value = json.value;
|
||||
}
|
||||
const valueMessage = (0, fromproto3json_1.fromProto3JSON)(type, value);
|
||||
if (valueMessage === null) {
|
||||
return {
|
||||
type_url: typeUrl,
|
||||
value: null,
|
||||
};
|
||||
}
|
||||
const uint8array = type.encode(valueMessage).finish();
|
||||
const buffer = Buffer.from(uint8array, 0, uint8array.byteLength);
|
||||
const base64 = buffer.toString('base64');
|
||||
return {
|
||||
type_url: typeUrl,
|
||||
value: base64,
|
||||
};
|
||||
}
|
||||
exports.googleProtobufAnyFromProto3JSON = googleProtobufAnyFromProto3JSON;
|
||||
//# sourceMappingURL=any.js.map
|
||||
1
server/node_modules/proto3-json-serializer/build/src/any.js.map
generated
vendored
Normal file
1
server/node_modules/proto3-json-serializer/build/src/any.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"any.js","sourceRoot":"","sources":["../../typescript/src/any.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAMjC,qDAAgD;AAChD,iDAAiE;AAGjE,uIAAuI;AACvI,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC;IAC1B,qBAAqB;IACrB,0BAA0B;IAC1B,2BAA2B;IAC3B,2BAA2B;IAC3B,wBAAwB;IACxB,2BAA2B;IAC3B,uBAAuB;CACxB,CAAC,CAAC;AAOH,SAAgB,6BAA6B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;KACH;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC9C,IAAI,IAAmB,CAAC;IACxB,IAAI;QACF,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;KAClC;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,IAAI,KAAK,CACb,qDAAqD,QAAQ,KAAK,GAAG,EAAE,CACxE,CAAC;KACH;IAED,IAAI,KAAK,GAAc,IAAI,CAAC;IAC5B,IAAI,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;QAC7B,IAAI,CAAC,CAAC,OAAO,IAAI,IAAI,CAAC,EAAE;YACtB,MAAM,IAAI,KAAK,CACb,yFAAyF,QAAQ,+BAA+B,CACjI,CAAC;SACH;QACD,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;KACpB;IAED,MAAM,YAAY,GAAG,IAAA,+BAAc,EAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACjD,IAAI,YAAY,KAAK,IAAI,EAAE;QACzB,OAAO;YACL,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,IAAI;SACZ,CAAC;KACH;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,MAAM,EAAE,CAAC;IACtD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IACjE,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAEzC,OAAO;QACL,QAAQ,EAAE,OAAO;QACjB,KAAK,EAAE,MAAM;KACd,CAAC;AACJ,CAAC;AAtDD,0EAsDC"}
|
||||
3
server/node_modules/proto3-json-serializer/build/src/bytes.d.ts
generated
vendored
Normal file
3
server/node_modules/proto3-json-serializer/build/src/bytes.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
export declare function bytesToProto3JSON(obj: Buffer | Uint8Array): string;
|
||||
export declare function bytesFromProto3JSON(json: string): Buffer;
|
||||
30
server/node_modules/proto3-json-serializer/build/src/bytes.js
generated
vendored
Normal file
30
server/node_modules/proto3-json-serializer/build/src/bytes.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
// Copyright 2021 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.bytesFromProto3JSON = exports.bytesToProto3JSON = void 0;
|
||||
function bytesToProto3JSON(obj) {
|
||||
if (Buffer.isBuffer(obj)) {
|
||||
return obj.toString('base64');
|
||||
}
|
||||
else {
|
||||
return Buffer.from(obj.buffer, 0, obj.byteLength).toString('base64');
|
||||
}
|
||||
}
|
||||
exports.bytesToProto3JSON = bytesToProto3JSON;
|
||||
function bytesFromProto3JSON(json) {
|
||||
return Buffer.from(json, 'base64');
|
||||
}
|
||||
exports.bytesFromProto3JSON = bytesFromProto3JSON;
|
||||
//# sourceMappingURL=bytes.js.map
|
||||
1
server/node_modules/proto3-json-serializer/build/src/bytes.js.map
generated
vendored
Normal file
1
server/node_modules/proto3-json-serializer/build/src/bytes.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"bytes.js","sourceRoot":"","sources":["../../typescript/src/bytes.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,SAAgB,iBAAiB,CAAC,GAAwB;IACxD,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACxB,OAAO,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;KAC/B;SAAM;QACL,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;KACtE;AACH,CAAC;AAND,8CAMC;AAED,SAAgB,mBAAmB,CAAC,IAAY;IAC9C,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACrC,CAAC;AAFD,kDAEC"}
|
||||
10
server/node_modules/proto3-json-serializer/build/src/duration.d.ts
generated
vendored
Normal file
10
server/node_modules/proto3-json-serializer/build/src/duration.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import * as protobuf from 'protobufjs';
|
||||
import { FromObjectValue } from './types';
|
||||
export interface Duration {
|
||||
seconds: number;
|
||||
nanos?: number;
|
||||
}
|
||||
export declare function googleProtobufDurationToProto3JSON(obj: protobuf.Message & Duration): string;
|
||||
export declare function googleProtobufDurationFromProto3JSON(json: string): {
|
||||
[key: string]: FromObjectValue;
|
||||
};
|
||||
55
server/node_modules/proto3-json-serializer/build/src/duration.js
generated
vendored
Normal file
55
server/node_modules/proto3-json-serializer/build/src/duration.js
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
// Copyright 2021 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.googleProtobufDurationFromProto3JSON = exports.googleProtobufDurationToProto3JSON = void 0;
|
||||
function googleProtobufDurationToProto3JSON(obj) {
|
||||
// seconds is an instance of Long so it won't be undefined
|
||||
let durationSeconds = obj.seconds.toString();
|
||||
if (typeof obj.nanos === 'number' && obj.nanos > 0) {
|
||||
// nanosStr should contain 3, 6, or 9 fractional digits.
|
||||
const nanosStr = obj.nanos
|
||||
.toString()
|
||||
.padStart(9, '0')
|
||||
.replace(/^((?:\d\d\d)+?)(?:0*)$/, '$1');
|
||||
durationSeconds += '.' + nanosStr;
|
||||
}
|
||||
durationSeconds += 's';
|
||||
return durationSeconds;
|
||||
}
|
||||
exports.googleProtobufDurationToProto3JSON = googleProtobufDurationToProto3JSON;
|
||||
function googleProtobufDurationFromProto3JSON(json) {
|
||||
const match = json.match(/^(\d*)(?:\.(\d*))?s$/);
|
||||
if (!match) {
|
||||
throw new Error(`googleProtobufDurationFromProto3JSON: incorrect value ${json} passed as google.protobuf.Duration`);
|
||||
}
|
||||
let seconds = 0;
|
||||
let nanos = 0;
|
||||
if (typeof match[1] === 'string' && match[1].length > 0) {
|
||||
seconds = parseInt(match[1]);
|
||||
}
|
||||
if (typeof match[2] === 'string' && match[2].length > 0) {
|
||||
nanos = parseInt(match[2].padEnd(9, '0'));
|
||||
}
|
||||
const result = {};
|
||||
if (seconds !== 0) {
|
||||
result.seconds = seconds;
|
||||
}
|
||||
if (nanos !== 0) {
|
||||
result.nanos = nanos;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
exports.googleProtobufDurationFromProto3JSON = googleProtobufDurationFromProto3JSON;
|
||||
//# sourceMappingURL=duration.js.map
|
||||
1
server/node_modules/proto3-json-serializer/build/src/duration.js.map
generated
vendored
Normal file
1
server/node_modules/proto3-json-serializer/build/src/duration.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"duration.js","sourceRoot":"","sources":["../../typescript/src/duration.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAUjC,SAAgB,kCAAkC,CAChD,GAAgC;IAEhC,0DAA0D;IAC1D,IAAI,eAAe,GAAG,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;IAC7C,IAAI,OAAO,GAAG,CAAC,KAAK,KAAK,QAAQ,IAAI,GAAG,CAAC,KAAK,GAAG,CAAC,EAAE;QAClD,wDAAwD;QACxD,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK;aACvB,QAAQ,EAAE;aACV,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;aAChB,OAAO,CAAC,wBAAwB,EAAE,IAAI,CAAC,CAAC;QAC3C,eAAe,IAAI,GAAG,GAAG,QAAQ,CAAC;KACnC;IACD,eAAe,IAAI,GAAG,CAAC;IACvB,OAAO,eAAe,CAAC;AACzB,CAAC;AAfD,gFAeC;AAED,SAAgB,oCAAoC,CAAC,IAAY;IAC/D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACjD,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,KAAK,CACb,yDAAyD,IAAI,qCAAqC,CACnG,CAAC;KACH;IAED,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,IAAI,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;QACvD,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC9B;IAED,IAAI,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;QACvD,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;KAC3C;IAED,MAAM,MAAM,GAAoB,EAAE,CAAC;IACnC,IAAI,OAAO,KAAK,CAAC,EAAE;QACjB,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;KAC1B;IACD,IAAI,KAAK,KAAK,CAAC,EAAE;QACf,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;KACtB;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AA3BD,oFA2BC"}
|
||||
4
server/node_modules/proto3-json-serializer/build/src/enum.d.ts
generated
vendored
Normal file
4
server/node_modules/proto3-json-serializer/build/src/enum.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import * as protobuf from 'protobufjs';
|
||||
import { JSONValue } from './types';
|
||||
export declare function resolveEnumValueToString(enumType: protobuf.Enum, enumValue: JSONValue): string | number;
|
||||
export declare function resolveEnumValueToNumber(enumType: protobuf.Enum, enumValue: JSONValue): string | number;
|
||||
52
server/node_modules/proto3-json-serializer/build/src/enum.js
generated
vendored
Normal file
52
server/node_modules/proto3-json-serializer/build/src/enum.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
// Copyright 2021 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.resolveEnumValueToNumber = exports.resolveEnumValueToString = void 0;
|
||||
function resolveEnumValueToString(enumType, enumValue) {
|
||||
// for unknown enum values, do not fail and try to do the best we could.
|
||||
// protobuf.js fromObject() will likely ignore unknown values, but at least
|
||||
// we won't fail.
|
||||
if (typeof enumValue === 'number') {
|
||||
const value = enumType.valuesById[enumValue];
|
||||
if (typeof value === 'undefined') {
|
||||
// unknown value, cannot convert to string, returning number as is
|
||||
return enumValue;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
if (typeof enumValue === 'string') {
|
||||
// for strings, just accept what we got
|
||||
return enumValue;
|
||||
}
|
||||
throw new Error('resolveEnumValueToString: enum value must be a string or a number');
|
||||
}
|
||||
exports.resolveEnumValueToString = resolveEnumValueToString;
|
||||
function resolveEnumValueToNumber(enumType, enumValue) {
|
||||
if (typeof enumValue === 'number') {
|
||||
// return as is
|
||||
return enumValue;
|
||||
}
|
||||
if (typeof enumValue === 'string') {
|
||||
const num = enumType.values[enumValue];
|
||||
if (typeof num === 'undefined') {
|
||||
// unknown value, cannot convert to number, returning string as is
|
||||
return enumValue;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
throw new Error('resolveEnumValueToNumber: enum value must be a string or a number');
|
||||
}
|
||||
exports.resolveEnumValueToNumber = resolveEnumValueToNumber;
|
||||
//# sourceMappingURL=enum.js.map
|
||||
1
server/node_modules/proto3-json-serializer/build/src/enum.js.map
generated
vendored
Normal file
1
server/node_modules/proto3-json-serializer/build/src/enum.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../typescript/src/enum.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAKjC,SAAgB,wBAAwB,CACtC,QAAuB,EACvB,SAAoB;IAEpB,wEAAwE;IACxE,2EAA2E;IAC3E,iBAAiB;IACjB,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;QACjC,MAAM,KAAK,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAC7C,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;YAChC,kEAAkE;YAClE,OAAO,SAAS,CAAC;SAClB;QACD,OAAO,KAAK,CAAC;KACd;IACD,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;QACjC,uCAAuC;QACvC,OAAO,SAAS,CAAC;KAClB;IACD,MAAM,IAAI,KAAK,CACb,mEAAmE,CACpE,CAAC;AACJ,CAAC;AAtBD,4DAsBC;AAED,SAAgB,wBAAwB,CACtC,QAAuB,EACvB,SAAoB;IAEpB,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;QACjC,eAAe;QACf,OAAO,SAAS,CAAC;KAClB;IACD,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;QACjC,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACvC,IAAI,OAAO,GAAG,KAAK,WAAW,EAAE;YAC9B,kEAAkE;YAClE,OAAO,SAAS,CAAC;SAClB;QACD,OAAO,GAAG,CAAC;KACZ;IACD,MAAM,IAAI,KAAK,CACb,mEAAmE,CACpE,CAAC;AACJ,CAAC;AAnBD,4DAmBC"}
|
||||
8
server/node_modules/proto3-json-serializer/build/src/fieldmask.d.ts
generated
vendored
Normal file
8
server/node_modules/proto3-json-serializer/build/src/fieldmask.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import * as protobuf from 'protobufjs';
|
||||
export interface FieldMask {
|
||||
paths: string[];
|
||||
}
|
||||
export declare function googleProtobufFieldMaskToProto3JSON(obj: protobuf.Message & FieldMask): string;
|
||||
export declare function googleProtobufFieldMaskFromProto3JSON(json: string): {
|
||||
paths: string[];
|
||||
};
|
||||
27
server/node_modules/proto3-json-serializer/build/src/fieldmask.js
generated
vendored
Normal file
27
server/node_modules/proto3-json-serializer/build/src/fieldmask.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
// Copyright 2021 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.googleProtobufFieldMaskFromProto3JSON = exports.googleProtobufFieldMaskToProto3JSON = void 0;
|
||||
function googleProtobufFieldMaskToProto3JSON(obj) {
|
||||
return obj.paths.join(',');
|
||||
}
|
||||
exports.googleProtobufFieldMaskToProto3JSON = googleProtobufFieldMaskToProto3JSON;
|
||||
function googleProtobufFieldMaskFromProto3JSON(json) {
|
||||
return {
|
||||
paths: json.split(','),
|
||||
};
|
||||
}
|
||||
exports.googleProtobufFieldMaskFromProto3JSON = googleProtobufFieldMaskFromProto3JSON;
|
||||
//# sourceMappingURL=fieldmask.js.map
|
||||
1
server/node_modules/proto3-json-serializer/build/src/fieldmask.js.map
generated
vendored
Normal file
1
server/node_modules/proto3-json-serializer/build/src/fieldmask.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"fieldmask.js","sourceRoot":"","sources":["../../typescript/src/fieldmask.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAQjC,SAAgB,mCAAmC,CACjD,GAAiC;IAEjC,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7B,CAAC;AAJD,kFAIC;AAED,SAAgB,qCAAqC,CAAC,IAAY;IAChE,OAAO;QACL,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;KACvB,CAAC;AACJ,CAAC;AAJD,sFAIC"}
|
||||
4
server/node_modules/proto3-json-serializer/build/src/fromproto3json.d.ts
generated
vendored
Normal file
4
server/node_modules/proto3-json-serializer/build/src/fromproto3json.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import * as protobuf from 'protobufjs';
|
||||
import { FromObjectValue, JSONValue } from './types';
|
||||
export declare function fromProto3JSONToInternalRepresentation(type: protobuf.Type | protobuf.Enum | string, json: JSONValue): FromObjectValue;
|
||||
export declare function fromProto3JSON(type: protobuf.Type, json: JSONValue): protobuf.Message<{}> | null;
|
||||
163
server/node_modules/proto3-json-serializer/build/src/fromproto3json.js
generated
vendored
Normal file
163
server/node_modules/proto3-json-serializer/build/src/fromproto3json.js
generated
vendored
Normal file
@@ -0,0 +1,163 @@
|
||||
"use strict";
|
||||
// Copyright 2021 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.fromProto3JSON = exports.fromProto3JSONToInternalRepresentation = void 0;
|
||||
const any_1 = require("./any");
|
||||
const bytes_1 = require("./bytes");
|
||||
const enum_1 = require("./enum");
|
||||
const value_1 = require("./value");
|
||||
const util_1 = require("./util");
|
||||
const duration_1 = require("./duration");
|
||||
const timestamp_1 = require("./timestamp");
|
||||
const wrappers_1 = require("./wrappers");
|
||||
const fieldmask_1 = require("./fieldmask");
|
||||
function fromProto3JSONToInternalRepresentation(type, json) {
|
||||
const fullyQualifiedTypeName = typeof type === 'string' ? type : (0, util_1.getFullyQualifiedTypeName)(type);
|
||||
if (typeof type !== 'string' && 'values' in type) {
|
||||
// type is an Enum
|
||||
if (fullyQualifiedTypeName === '.google.protobuf.NullValue') {
|
||||
return 'NULL_VALUE';
|
||||
}
|
||||
return (0, enum_1.resolveEnumValueToString)(type, json);
|
||||
}
|
||||
if (typeof type !== 'string') {
|
||||
type.resolveAll();
|
||||
}
|
||||
if (typeof type === 'string') {
|
||||
return json;
|
||||
}
|
||||
// Types that require special handling according to
|
||||
// https://developers.google.com/protocol-buffers/docs/proto3#json
|
||||
// Types that can have meaningful "null" value
|
||||
if (fullyQualifiedTypeName === '.google.protobuf.Value') {
|
||||
return (0, value_1.googleProtobufValueFromProto3JSON)(json);
|
||||
}
|
||||
if (util_1.wrapperTypes.has(fullyQualifiedTypeName)) {
|
||||
if ((json !== null && typeof json === 'object') || Array.isArray(json)) {
|
||||
throw new Error(`fromProto3JSONToInternalRepresentation: JSON representation for ${fullyQualifiedTypeName} expects a string, a number, or a boolean, but got ${typeof json}`);
|
||||
}
|
||||
return (0, wrappers_1.wrapperFromProto3JSON)(fullyQualifiedTypeName, json);
|
||||
}
|
||||
if (json === null) {
|
||||
return null;
|
||||
}
|
||||
// Types that cannot be "null"
|
||||
if (fullyQualifiedTypeName === '.google.protobuf.Any') {
|
||||
return (0, any_1.googleProtobufAnyFromProto3JSON)(type.root, json);
|
||||
}
|
||||
if (fullyQualifiedTypeName === '.google.protobuf.Struct') {
|
||||
if (typeof json !== 'object') {
|
||||
throw new Error(`fromProto3JSONToInternalRepresentation: google.protobuf.Struct must be an object but got ${typeof json}`);
|
||||
}
|
||||
if (Array.isArray(json)) {
|
||||
throw new Error('fromProto3JSONToInternalRepresentation: google.protobuf.Struct must be an object but got an array');
|
||||
}
|
||||
return (0, value_1.googleProtobufStructFromProto3JSON)(json);
|
||||
}
|
||||
if (fullyQualifiedTypeName === '.google.protobuf.ListValue') {
|
||||
if (!Array.isArray(json)) {
|
||||
throw new Error(`fromProto3JSONToInternalRepresentation: google.protobuf.ListValue must be an array but got ${typeof json}`);
|
||||
}
|
||||
return (0, value_1.googleProtobufListValueFromProto3JSON)(json);
|
||||
}
|
||||
if (fullyQualifiedTypeName === '.google.protobuf.Duration') {
|
||||
if (typeof json !== 'string') {
|
||||
throw new Error(`fromProto3JSONToInternalRepresentation: google.protobuf.Duration must be a string but got ${typeof json}`);
|
||||
}
|
||||
return (0, duration_1.googleProtobufDurationFromProto3JSON)(json);
|
||||
}
|
||||
if (fullyQualifiedTypeName === '.google.protobuf.Timestamp') {
|
||||
if (typeof json !== 'string') {
|
||||
throw new Error(`fromProto3JSONToInternalRepresentation: google.protobuf.Timestamp must be a string but got ${typeof json}`);
|
||||
}
|
||||
return (0, timestamp_1.googleProtobufTimestampFromProto3JSON)(json);
|
||||
}
|
||||
if (fullyQualifiedTypeName === '.google.protobuf.FieldMask') {
|
||||
if (typeof json !== 'string') {
|
||||
throw new Error(`fromProto3JSONToInternalRepresentation: google.protobuf.FieldMask must be a string but got ${typeof json}`);
|
||||
}
|
||||
return (0, fieldmask_1.googleProtobufFieldMaskFromProto3JSON)(json);
|
||||
}
|
||||
const result = {};
|
||||
for (const [key, value] of Object.entries(json)) {
|
||||
const field = type.fields[key];
|
||||
if (!field) {
|
||||
continue;
|
||||
}
|
||||
const resolvedType = field.resolvedType;
|
||||
const fieldType = field.type;
|
||||
if (field.repeated) {
|
||||
if (value === null) {
|
||||
result[key] = [];
|
||||
}
|
||||
else {
|
||||
if (!Array.isArray(value)) {
|
||||
throw new Error(`fromProto3JSONToInternalRepresentation: expected an array for field ${key}`);
|
||||
}
|
||||
result[key] = value.map(element => fromProto3JSONToInternalRepresentation(resolvedType || fieldType, element));
|
||||
}
|
||||
}
|
||||
else if (field.map) {
|
||||
const map = {};
|
||||
for (const [mapKey, mapValue] of Object.entries(value)) {
|
||||
map[mapKey] = fromProto3JSONToInternalRepresentation(resolvedType || fieldType, mapValue);
|
||||
}
|
||||
result[key] = map;
|
||||
}
|
||||
else if (fieldType.match(/^(?:(?:(?:u?int|fixed)(?:32|64))|float|double)$/)) {
|
||||
if (typeof value !== 'number' && typeof value !== 'string') {
|
||||
throw new Error(`fromProto3JSONToInternalRepresentation: field ${key} of type ${field.type} cannot contain value ${value}`);
|
||||
}
|
||||
result[key] = value;
|
||||
}
|
||||
else if (fieldType === 'string') {
|
||||
if (typeof value !== 'string') {
|
||||
throw new Error(`fromProto3JSONToInternalRepresentation: field ${key} of type ${field.type} cannot contain value ${value}`);
|
||||
}
|
||||
result[key] = value;
|
||||
}
|
||||
else if (fieldType === 'bool') {
|
||||
if (typeof value !== 'boolean') {
|
||||
throw new Error(`fromProto3JSONToInternalRepresentation: field ${key} of type ${field.type} cannot contain value ${value}`);
|
||||
}
|
||||
result[key] = value;
|
||||
}
|
||||
else if (fieldType === 'bytes') {
|
||||
if (typeof value !== 'string') {
|
||||
throw new Error(`fromProto3JSONToInternalRepresentation: field ${key} of type ${field.type} cannot contain value ${value}`);
|
||||
}
|
||||
result[key] = (0, bytes_1.bytesFromProto3JSON)(value);
|
||||
}
|
||||
else {
|
||||
// Message type
|
||||
(0, util_1.assert)(resolvedType !== null, `Expected to be able to resolve type for field ${field.name}`);
|
||||
const deserializedValue = fromProto3JSONToInternalRepresentation(resolvedType, value);
|
||||
result[key] = deserializedValue;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
exports.fromProto3JSONToInternalRepresentation = fromProto3JSONToInternalRepresentation;
|
||||
function fromProto3JSON(type, json) {
|
||||
const internalRepr = fromProto3JSONToInternalRepresentation(type, json);
|
||||
if (internalRepr === null) {
|
||||
return null;
|
||||
}
|
||||
// We only expect a real object here sine all special cases should be already resolved. Everything else is an internal error
|
||||
(0, util_1.assert)(typeof internalRepr === 'object' && !Array.isArray(internalRepr), `fromProto3JSON: expected an object, not ${json}`);
|
||||
return type.fromObject(internalRepr);
|
||||
}
|
||||
exports.fromProto3JSON = fromProto3JSON;
|
||||
//# sourceMappingURL=fromproto3json.js.map
|
||||
1
server/node_modules/proto3-json-serializer/build/src/fromproto3json.js.map
generated
vendored
Normal file
1
server/node_modules/proto3-json-serializer/build/src/fromproto3json.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"fromproto3json.js","sourceRoot":"","sources":["../../typescript/src/fromproto3json.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAGjC,+BAAsD;AACtD,mCAA4C;AAC5C,iCAAgD;AAEhD,mCAIiB;AACjB,iCAAuE;AACvE,yCAAgE;AAChE,2CAAkE;AAClE,yCAAiD;AACjD,2CAAkE;AAElE,SAAgB,sCAAsC,CACpD,IAA4C,EAC5C,IAAe;IAEf,MAAM,sBAAsB,GAC1B,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAA,gCAAyB,EAAC,IAAI,CAAC,CAAC;IAEpE,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,QAAQ,IAAI,IAAI,EAAE;QAChD,kBAAkB;QAClB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AC,UAAU,CAAC,YAAkB,CAAC,CAAC;AAC7C,CAAC;AAXD,wCAWC"}
|
||||
3
server/node_modules/proto3-json-serializer/build/src/index.d.ts
generated
vendored
Normal file
3
server/node_modules/proto3-json-serializer/build/src/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { JSONObject, JSONValue } from './types';
|
||||
export { toProto3JSON, ToProto3JSONOptions } from './toproto3json';
|
||||
export { fromProto3JSON } from './fromproto3json';
|
||||
21
server/node_modules/proto3-json-serializer/build/src/index.js
generated
vendored
Normal file
21
server/node_modules/proto3-json-serializer/build/src/index.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
// Copyright 2021 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.fromProto3JSON = exports.toProto3JSON = void 0;
|
||||
var toproto3json_1 = require("./toproto3json");
|
||||
Object.defineProperty(exports, "toProto3JSON", { enumerable: true, get: function () { return toproto3json_1.toProto3JSON; } });
|
||||
var fromproto3json_1 = require("./fromproto3json");
|
||||
Object.defineProperty(exports, "fromProto3JSON", { enumerable: true, get: function () { return fromproto3json_1.fromProto3JSON; } });
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
server/node_modules/proto3-json-serializer/build/src/index.js.map
generated
vendored
Normal file
1
server/node_modules/proto3-json-serializer/build/src/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../typescript/src/index.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAGjC,+CAAiE;AAAzD,4GAAA,YAAY,OAAA;AACpB,mDAAgD;AAAxC,gHAAA,cAAc,OAAA"}
|
||||
10
server/node_modules/proto3-json-serializer/build/src/timestamp.d.ts
generated
vendored
Normal file
10
server/node_modules/proto3-json-serializer/build/src/timestamp.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import * as protobuf from 'protobufjs';
|
||||
import { FromObjectValue } from './types';
|
||||
export interface Timestamp {
|
||||
seconds: number;
|
||||
nanos?: number;
|
||||
}
|
||||
export declare function googleProtobufTimestampToProto3JSON(obj: protobuf.Message & Timestamp): string;
|
||||
export declare function googleProtobufTimestampFromProto3JSON(json: string): {
|
||||
[key: string]: FromObjectValue;
|
||||
};
|
||||
57
server/node_modules/proto3-json-serializer/build/src/timestamp.js
generated
vendored
Normal file
57
server/node_modules/proto3-json-serializer/build/src/timestamp.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
"use strict";
|
||||
// Copyright 2021 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.googleProtobufTimestampFromProto3JSON = exports.googleProtobufTimestampToProto3JSON = void 0;
|
||||
function googleProtobufTimestampToProto3JSON(obj) {
|
||||
var _a;
|
||||
// seconds is an instance of Long so it won't be undefined
|
||||
const durationSeconds = obj.seconds;
|
||||
const date = new Date(durationSeconds * 1000).toISOString();
|
||||
// Pad leading zeros if nano string length is less than 9.
|
||||
let nanos = (_a = obj.nanos) === null || _a === void 0 ? void 0 : _a.toString().padStart(9, '0');
|
||||
// Trim the unsignificant zeros and keep 3, 6, or 9 decimal digits.
|
||||
while (nanos && nanos.length > 3 && nanos.endsWith('000')) {
|
||||
nanos = nanos.slice(0, -3);
|
||||
}
|
||||
return date.replace(/(?:\.\d{0,9})/, '.' + nanos);
|
||||
}
|
||||
exports.googleProtobufTimestampToProto3JSON = googleProtobufTimestampToProto3JSON;
|
||||
function googleProtobufTimestampFromProto3JSON(json) {
|
||||
const match = json.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?/);
|
||||
if (!match) {
|
||||
throw new Error(`googleProtobufDurationFromProto3JSON: incorrect value ${json} passed as google.protobuf.Duration`);
|
||||
}
|
||||
const date = new Date(json);
|
||||
const millisecondsSinceEpoch = date.getTime();
|
||||
const seconds = Math.floor(millisecondsSinceEpoch / 1000);
|
||||
// The fractional seconds in the JSON timestamps can go up to 9 digits (i.e. up to 1 nanosecond resolution).
|
||||
// However, Javascript Date object represent any date and time to millisecond precision.
|
||||
// To keep the precision, we extract the fractional seconds and append 0 until the length is equal to 9.
|
||||
let nanos = 0;
|
||||
const secondsFromDate = json.split('.')[1];
|
||||
if (secondsFromDate) {
|
||||
nanos = parseInt(secondsFromDate.slice(0, -1).padEnd(9, '0'));
|
||||
}
|
||||
const result = {};
|
||||
if (seconds !== 0) {
|
||||
result.seconds = seconds;
|
||||
}
|
||||
if (nanos !== 0) {
|
||||
result.nanos = nanos;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
exports.googleProtobufTimestampFromProto3JSON = googleProtobufTimestampFromProto3JSON;
|
||||
//# sourceMappingURL=timestamp.js.map
|
||||
1
server/node_modules/proto3-json-serializer/build/src/timestamp.js.map
generated
vendored
Normal file
1
server/node_modules/proto3-json-serializer/build/src/timestamp.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../../typescript/src/timestamp.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAUjC,SAAgB,mCAAmC,CACjD,GAAiC;;IAEjC,0DAA0D;IAC1D,MAAM,eAAe,GAAG,GAAG,CAAC,OAAO,CAAC;IACpC,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;IAC5D,0DAA0D;IAC1D,IAAI,KAAK,GAAG,MAAA,GAAG,CAAC,KAAK,0CAAE,QAAQ,GAAG,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACnD,mEAAmE;IACnE,OAAO,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;QACzD,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KAC5B;IACD,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,GAAG,GAAG,KAAK,CAAC,CAAC;AACpD,CAAC;AAbD,kFAaC;AAED,SAAgB,qCAAqC,CAAC,IAAY;IAChE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAAC;IAC3E,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,KAAK,CACb,yDAAyD,IAAI,qCAAqC,CACnG,CAAC;KACH;IACD,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,MAAM,sBAAsB,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAAC;IAC1D,4GAA4G;IAC5G,wFAAwF;IACxF,wGAAwG;IACxG,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3C,IAAI,eAAe,EAAE;QACnB,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;KAC/D;IACD,MAAM,MAAM,GAAoB,EAAE,CAAC;IACnC,IAAI,OAAO,KAAK,CAAC,EAAE;QACjB,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;KAC1B;IACD,IAAI,KAAK,KAAK,CAAC,EAAE;QACf,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;KACtB;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AA1BD,sFA0BC"}
|
||||
6
server/node_modules/proto3-json-serializer/build/src/toproto3json.d.ts
generated
vendored
Normal file
6
server/node_modules/proto3-json-serializer/build/src/toproto3json.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import * as protobuf from 'protobufjs';
|
||||
import { JSONValue } from './types';
|
||||
export interface ToProto3JSONOptions {
|
||||
numericEnums: boolean;
|
||||
}
|
||||
export declare function toProto3JSON(obj: protobuf.Message, options?: ToProto3JSONOptions): JSONValue;
|
||||
143
server/node_modules/proto3-json-serializer/build/src/toproto3json.js
generated
vendored
Normal file
143
server/node_modules/proto3-json-serializer/build/src/toproto3json.js
generated
vendored
Normal file
@@ -0,0 +1,143 @@
|
||||
"use strict";
|
||||
// Copyright 2021 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.toProto3JSON = void 0;
|
||||
const any_1 = require("./any");
|
||||
const bytes_1 = require("./bytes");
|
||||
const util_1 = require("./util");
|
||||
const enum_1 = require("./enum");
|
||||
const value_1 = require("./value");
|
||||
const duration_1 = require("./duration");
|
||||
const timestamp_1 = require("./timestamp");
|
||||
const wrappers_1 = require("./wrappers");
|
||||
const fieldmask_1 = require("./fieldmask");
|
||||
// Convert a single value, which might happen to be an instance of Long, to JSONValue
|
||||
function convertSingleValue(value) {
|
||||
var _a;
|
||||
if (typeof value === 'object') {
|
||||
if (((_a = value === null || value === void 0 ? void 0 : value.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Long') {
|
||||
return value.toString();
|
||||
}
|
||||
throw new Error(`toProto3JSON: don't know how to convert value ${value}`);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
function toProto3JSON(obj, options) {
|
||||
const objType = obj.$type;
|
||||
if (!objType) {
|
||||
throw new Error('Cannot serialize object to proto3 JSON since its .$type is unknown. Use Type.fromObject(obj) before calling toProto3JSON.');
|
||||
}
|
||||
objType.resolveAll();
|
||||
const typeName = (0, util_1.getFullyQualifiedTypeName)(objType);
|
||||
// Types that require special handling according to
|
||||
// https://developers.google.com/protocol-buffers/docs/proto3#json
|
||||
if (typeName === '.google.protobuf.Any') {
|
||||
return (0, any_1.googleProtobufAnyToProto3JSON)(obj, options);
|
||||
}
|
||||
if (typeName === '.google.protobuf.Value') {
|
||||
return (0, value_1.googleProtobufValueToProto3JSON)(obj);
|
||||
}
|
||||
if (typeName === '.google.protobuf.Struct') {
|
||||
return (0, value_1.googleProtobufStructToProto3JSON)(obj);
|
||||
}
|
||||
if (typeName === '.google.protobuf.ListValue') {
|
||||
return (0, value_1.googleProtobufListValueToProto3JSON)(obj);
|
||||
}
|
||||
if (typeName === '.google.protobuf.Duration') {
|
||||
return (0, duration_1.googleProtobufDurationToProto3JSON)(obj);
|
||||
}
|
||||
if (typeName === '.google.protobuf.Timestamp') {
|
||||
return (0, timestamp_1.googleProtobufTimestampToProto3JSON)(obj);
|
||||
}
|
||||
if (typeName === '.google.protobuf.FieldMask') {
|
||||
return (0, fieldmask_1.googleProtobufFieldMaskToProto3JSON)(obj);
|
||||
}
|
||||
if (util_1.wrapperTypes.has(typeName)) {
|
||||
return (0, wrappers_1.wrapperToProto3JSON)(obj);
|
||||
}
|
||||
const result = {};
|
||||
for (const [key, value] of Object.entries(obj)) {
|
||||
const field = objType.fields[key];
|
||||
const fieldResolvedType = field.resolvedType;
|
||||
const fieldFullyQualifiedTypeName = fieldResolvedType
|
||||
? (0, util_1.getFullyQualifiedTypeName)(fieldResolvedType)
|
||||
: null;
|
||||
if (value === null) {
|
||||
result[key] = null;
|
||||
continue;
|
||||
}
|
||||
if (Array.isArray(value)) {
|
||||
if (value.length === 0) {
|
||||
// ignore repeated fields with no values
|
||||
continue;
|
||||
}
|
||||
// if the repeated value has a complex type, convert it to proto3 JSON, otherwise use as is
|
||||
result[key] = value.map(fieldResolvedType
|
||||
? element => {
|
||||
return toProto3JSON(element, options);
|
||||
}
|
||||
: convertSingleValue);
|
||||
continue;
|
||||
}
|
||||
if (field.map) {
|
||||
const map = {};
|
||||
for (const [mapKey, mapValue] of Object.entries(value)) {
|
||||
// if the map value has a complex type, convert it to proto3 JSON, otherwise use as is
|
||||
map[mapKey] = fieldResolvedType
|
||||
? toProto3JSON(mapValue, options)
|
||||
: convertSingleValue(mapValue);
|
||||
}
|
||||
result[key] = map;
|
||||
continue;
|
||||
}
|
||||
if (fieldFullyQualifiedTypeName === '.google.protobuf.NullValue') {
|
||||
result[key] = null;
|
||||
continue;
|
||||
}
|
||||
if (fieldResolvedType && 'values' in fieldResolvedType && value !== null) {
|
||||
if (options === null || options === void 0 ? void 0 : options.numericEnums) {
|
||||
result[key] = (0, enum_1.resolveEnumValueToNumber)(fieldResolvedType, value);
|
||||
}
|
||||
else {
|
||||
result[key] = (0, enum_1.resolveEnumValueToString)(fieldResolvedType, value);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (fieldResolvedType) {
|
||||
result[key] = toProto3JSON(value, options);
|
||||
continue;
|
||||
}
|
||||
if (typeof value === 'string' ||
|
||||
typeof value === 'number' ||
|
||||
typeof value === 'boolean' ||
|
||||
value === null) {
|
||||
if (typeof value === 'number' && !Number.isFinite(value)) {
|
||||
result[key] = value.toString();
|
||||
continue;
|
||||
}
|
||||
result[key] = value;
|
||||
continue;
|
||||
}
|
||||
if (Buffer.isBuffer(value) || value instanceof Uint8Array) {
|
||||
result[key] = (0, bytes_1.bytesToProto3JSON)(value);
|
||||
continue;
|
||||
}
|
||||
result[key] = convertSingleValue(value);
|
||||
continue;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
exports.toProto3JSON = toProto3JSON;
|
||||
//# sourceMappingURL=toproto3json.js.map
|
||||
1
server/node_modules/proto3-json-serializer/build/src/toproto3json.js.map
generated
vendored
Normal file
1
server/node_modules/proto3-json-serializer/build/src/toproto3json.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"toproto3json.js","sourceRoot":"","sources":["../../typescript/src/toproto3json.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;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,QAAQ,EAAE,CAAC;gBAC/B,SAAS;aACV;YACD,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YACpB,SAAS;SACV;QACD,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,YAAY,UAAU,EAAE;YACzD,MAAM,CAAC,GAAG,CAAC,GAAG,IAAA,yBAAiB,EAAC,KAAK,CAAC,CAAC;YACvC,SAAS;SACV;QACD,MAAM,CAAC,GAAG,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACxC,SAAS;KACV;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAxID,oCAwIC"}
|
||||
13
server/node_modules/proto3-json-serializer/build/src/types.d.ts
generated
vendored
Normal file
13
server/node_modules/proto3-json-serializer/build/src/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/// <reference types="node" />
|
||||
export type JSONValue = string | number | boolean | null | JSONValue[] | {
|
||||
[key: string]: JSONValue;
|
||||
};
|
||||
export interface JSONObject {
|
||||
[key: string]: JSONValue;
|
||||
}
|
||||
export type FromObjectValue = string | number | boolean | null | FromObjectValue[] | Buffer | Uint8Array | {
|
||||
[key: string]: FromObjectValue;
|
||||
};
|
||||
export interface LongStub {
|
||||
toString: () => string;
|
||||
}
|
||||
16
server/node_modules/proto3-json-serializer/build/src/types.js
generated
vendored
Normal file
16
server/node_modules/proto3-json-serializer/build/src/types.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
// Copyright 2021 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=types.js.map
|
||||
1
server/node_modules/proto3-json-serializer/build/src/types.js.map
generated
vendored
Normal file
1
server/node_modules/proto3-json-serializer/build/src/types.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../typescript/src/types.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC"}
|
||||
3
server/node_modules/proto3-json-serializer/build/src/util.d.ts
generated
vendored
Normal file
3
server/node_modules/proto3-json-serializer/build/src/util.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export declare function getFullyQualifiedTypeName(type: protobuf.Type | protobuf.Namespace | protobuf.Enum): string;
|
||||
export declare const wrapperTypes: Set<string>;
|
||||
export declare function assert(assertion: boolean, message: string): void;
|
||||
44
server/node_modules/proto3-json-serializer/build/src/util.js
generated
vendored
Normal file
44
server/node_modules/proto3-json-serializer/build/src/util.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
"use strict";
|
||||
// Copyright 2021 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.assert = exports.wrapperTypes = exports.getFullyQualifiedTypeName = void 0;
|
||||
function getFullyQualifiedTypeName(type) {
|
||||
// We assume that the protobuf package tree cannot have cycles.
|
||||
let fullyQualifiedTypeName = '';
|
||||
while (type.parent) {
|
||||
fullyQualifiedTypeName = `.${type.name}${fullyQualifiedTypeName}`;
|
||||
type = type.parent;
|
||||
}
|
||||
return fullyQualifiedTypeName;
|
||||
}
|
||||
exports.getFullyQualifiedTypeName = getFullyQualifiedTypeName;
|
||||
exports.wrapperTypes = new Set([
|
||||
'.google.protobuf.DoubleValue',
|
||||
'.google.protobuf.FloatValue',
|
||||
'.google.protobuf.Int64Value',
|
||||
'.google.protobuf.UInt64Value',
|
||||
'.google.protobuf.Int32Value',
|
||||
'.google.protobuf.UInt32Value',
|
||||
'.google.protobuf.BoolValue',
|
||||
'.google.protobuf.StringValue',
|
||||
'.google.protobuf.BytesValue',
|
||||
]);
|
||||
function assert(assertion, message) {
|
||||
if (!assertion) {
|
||||
throw new Error(message);
|
||||
}
|
||||
}
|
||||
exports.assert = assert;
|
||||
//# sourceMappingURL=util.js.map
|
||||
1
server/node_modules/proto3-json-serializer/build/src/util.js.map
generated
vendored
Normal file
1
server/node_modules/proto3-json-serializer/build/src/util.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../typescript/src/util.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,SAAgB,yBAAyB,CACvC,IAAwD;IAExD,+DAA+D;IAC/D,IAAI,sBAAsB,GAAG,EAAE,CAAC;IAChC,OAAO,IAAI,CAAC,MAAM,EAAE;QAClB,sBAAsB,GAAG,IAAI,IAAI,CAAC,IAAI,GAAG,sBAAsB,EAAE,CAAC;QAClE,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;KACpB;IACD,OAAO,sBAAsB,CAAC;AAChC,CAAC;AAVD,8DAUC;AAEY,QAAA,YAAY,GAAG,IAAI,GAAG,CAAC;IAClC,8BAA8B;IAC9B,6BAA6B;IAC7B,6BAA6B;IAC7B,8BAA8B;IAC9B,6BAA6B;IAC7B,8BAA8B;IAC9B,4BAA4B;IAC5B,8BAA8B;IAC9B,6BAA6B;CAC9B,CAAC,CAAC;AAEH,SAAgB,MAAM,CAAC,SAAkB,EAAE,OAAe;IACxD,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;KAC1B;AACH,CAAC;AAJD,wBAIC"}
|
||||
23
server/node_modules/proto3-json-serializer/build/src/value.d.ts
generated
vendored
Normal file
23
server/node_modules/proto3-json-serializer/build/src/value.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import { FromObjectValue, JSONObject, JSONValue } from './types';
|
||||
export interface Struct {
|
||||
fields: {
|
||||
[key: string]: Value;
|
||||
};
|
||||
}
|
||||
export interface ListValue {
|
||||
values: Array<Value>;
|
||||
}
|
||||
export interface Value {
|
||||
nullValue?: 0;
|
||||
numberValue?: number;
|
||||
stringValue?: string;
|
||||
boolValue?: boolean;
|
||||
listValue?: ListValue;
|
||||
structValue?: Struct;
|
||||
}
|
||||
export declare function googleProtobufStructToProto3JSON(obj: protobuf.Message & Struct): JSONObject;
|
||||
export declare function googleProtobufListValueToProto3JSON(obj: protobuf.Message & ListValue): JSONValue[];
|
||||
export declare function googleProtobufValueToProto3JSON(obj: protobuf.Message & Value): JSONValue;
|
||||
export declare function googleProtobufStructFromProto3JSON(json: JSONObject): FromObjectValue;
|
||||
export declare function googleProtobufListValueFromProto3JSON(json: JSONValue[]): FromObjectValue;
|
||||
export declare function googleProtobufValueFromProto3JSON(json: JSONValue): FromObjectValue;
|
||||
104
server/node_modules/proto3-json-serializer/build/src/value.js
generated
vendored
Normal file
104
server/node_modules/proto3-json-serializer/build/src/value.js
generated
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
"use strict";
|
||||
// Copyright 2021 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.googleProtobufValueFromProto3JSON = exports.googleProtobufListValueFromProto3JSON = exports.googleProtobufStructFromProto3JSON = exports.googleProtobufValueToProto3JSON = exports.googleProtobufListValueToProto3JSON = exports.googleProtobufStructToProto3JSON = void 0;
|
||||
const util_1 = require("./util");
|
||||
function googleProtobufStructToProto3JSON(obj) {
|
||||
const result = {};
|
||||
const fields = obj.fields;
|
||||
for (const [key, value] of Object.entries(fields)) {
|
||||
result[key] = googleProtobufValueToProto3JSON(value);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
exports.googleProtobufStructToProto3JSON = googleProtobufStructToProto3JSON;
|
||||
function googleProtobufListValueToProto3JSON(obj) {
|
||||
(0, util_1.assert)(Array.isArray(obj.values), 'ListValue internal representation must contain array of values');
|
||||
return obj.values.map(googleProtobufValueToProto3JSON);
|
||||
}
|
||||
exports.googleProtobufListValueToProto3JSON = googleProtobufListValueToProto3JSON;
|
||||
function googleProtobufValueToProto3JSON(obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, 'nullValue')) {
|
||||
return null;
|
||||
}
|
||||
if (Object.prototype.hasOwnProperty.call(obj, 'numberValue') &&
|
||||
typeof obj.numberValue === 'number') {
|
||||
if (!Number.isFinite(obj.numberValue)) {
|
||||
return obj.numberValue.toString();
|
||||
}
|
||||
return obj.numberValue;
|
||||
}
|
||||
if (Object.prototype.hasOwnProperty.call(obj, 'stringValue') &&
|
||||
typeof obj.stringValue === 'string') {
|
||||
return obj.stringValue;
|
||||
}
|
||||
if (Object.prototype.hasOwnProperty.call(obj, 'boolValue') &&
|
||||
typeof obj.boolValue === 'boolean') {
|
||||
return obj.boolValue;
|
||||
}
|
||||
if (Object.prototype.hasOwnProperty.call(obj, 'structValue') &&
|
||||
typeof obj.structValue === 'object') {
|
||||
return googleProtobufStructToProto3JSON(obj.structValue);
|
||||
}
|
||||
if (Object.prototype.hasOwnProperty.call(obj, 'listValue') &&
|
||||
typeof obj === 'object' &&
|
||||
typeof obj.listValue === 'object') {
|
||||
return googleProtobufListValueToProto3JSON(obj.listValue);
|
||||
}
|
||||
// Assuming empty Value to be null
|
||||
return null;
|
||||
}
|
||||
exports.googleProtobufValueToProto3JSON = googleProtobufValueToProto3JSON;
|
||||
function googleProtobufStructFromProto3JSON(json) {
|
||||
const fields = {};
|
||||
for (const [key, value] of Object.entries(json)) {
|
||||
fields[key] = googleProtobufValueFromProto3JSON(value);
|
||||
}
|
||||
return { fields };
|
||||
}
|
||||
exports.googleProtobufStructFromProto3JSON = googleProtobufStructFromProto3JSON;
|
||||
function googleProtobufListValueFromProto3JSON(json) {
|
||||
return {
|
||||
values: json.map(element => googleProtobufValueFromProto3JSON(element)),
|
||||
};
|
||||
}
|
||||
exports.googleProtobufListValueFromProto3JSON = googleProtobufListValueFromProto3JSON;
|
||||
function googleProtobufValueFromProto3JSON(json) {
|
||||
if (json === null) {
|
||||
return { nullValue: 'NULL_VALUE' };
|
||||
}
|
||||
if (typeof json === 'number') {
|
||||
return { numberValue: json };
|
||||
}
|
||||
if (typeof json === 'string') {
|
||||
return { stringValue: json };
|
||||
}
|
||||
if (typeof json === 'boolean') {
|
||||
return { boolValue: json };
|
||||
}
|
||||
if (Array.isArray(json)) {
|
||||
return {
|
||||
listValue: googleProtobufListValueFromProto3JSON(json),
|
||||
};
|
||||
}
|
||||
if (typeof json === 'object') {
|
||||
return {
|
||||
structValue: googleProtobufStructFromProto3JSON(json),
|
||||
};
|
||||
}
|
||||
throw new Error(`googleProtobufValueFromProto3JSON: incorrect parameter type: ${typeof json}`);
|
||||
}
|
||||
exports.googleProtobufValueFromProto3JSON = googleProtobufValueFromProto3JSON;
|
||||
//# sourceMappingURL=value.js.map
|
||||
1
server/node_modules/proto3-json-serializer/build/src/value.js.map
generated
vendored
Normal file
1
server/node_modules/proto3-json-serializer/build/src/value.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"value.js","sourceRoot":"","sources":["../../typescript/src/value.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,iCAA8B;AAsB9B,SAAgB,gCAAgC,CAC9C,GAA8B;IAE9B,MAAM,MAAM,GAAe,EAAE,CAAC;IAC9B,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IAC1B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACjD,MAAM,CAAC,GAAG,CAAC,GAAG,+BAA+B,CAC3C,KAAiC,CAClC,CAAC;KACH;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAXD,4EAWC;AAED,SAAgB,mCAAmC,CACjD,GAAiC;IAEjC,IAAA,aAAM,EACJ,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EACzB,gEAAgE,CACjE,CAAC;IACF,OAAQ,GAAG,CAAC,MAA0C,CAAC,GAAG,CACxD,+BAA+B,CAChC,CAAC;AACJ,CAAC;AAV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b,gEAAgE,OAAO,IAAI,EAAE,CAC9E,CAAC;AACJ,CAAC;AAlCD,8EAkCC"}
|
||||
21
server/node_modules/proto3-json-serializer/build/src/wrappers.d.ts
generated
vendored
Normal file
21
server/node_modules/proto3-json-serializer/build/src/wrappers.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
/// <reference types="node" />
|
||||
export interface NumberValue {
|
||||
value: number | object;
|
||||
}
|
||||
export interface StringValue {
|
||||
value: string;
|
||||
}
|
||||
export interface BoolValue {
|
||||
value: boolean;
|
||||
}
|
||||
export interface BytesValue {
|
||||
value: Buffer | Uint8Array;
|
||||
}
|
||||
export declare function wrapperToProto3JSON(obj: protobuf.Message & (NumberValue | StringValue | BoolValue | BytesValue)): string | number | boolean | null;
|
||||
export declare function wrapperFromProto3JSON(typeName: string, json: number | string | boolean | null): {
|
||||
value: null;
|
||||
} | {
|
||||
value: Buffer;
|
||||
} | {
|
||||
value: string | number | boolean;
|
||||
};
|
||||
56
server/node_modules/proto3-json-serializer/build/src/wrappers.js
generated
vendored
Normal file
56
server/node_modules/proto3-json-serializer/build/src/wrappers.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
"use strict";
|
||||
// Copyright 2021 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.wrapperFromProto3JSON = exports.wrapperToProto3JSON = void 0;
|
||||
const bytes_1 = require("./bytes");
|
||||
const util_1 = require("./util");
|
||||
function wrapperToProto3JSON(obj) {
|
||||
if (!Object.prototype.hasOwnProperty.call(obj, 'value')) {
|
||||
return null;
|
||||
}
|
||||
if (Buffer.isBuffer(obj.value) || obj.value instanceof Uint8Array) {
|
||||
return (0, bytes_1.bytesToProto3JSON)(obj.value);
|
||||
}
|
||||
if (typeof obj.value === 'object') {
|
||||
(0, util_1.assert)(obj.value.constructor.name === 'Long', `wrapperToProto3JSON: expected to see a number, a string, a boolean, or a Long, but got ${obj.value}`);
|
||||
return obj.value.toString();
|
||||
}
|
||||
// JSON accept special string values "NaN", "Infinity", and "-Infinity".
|
||||
if (typeof obj.value === 'number' && !Number.isFinite(obj.value)) {
|
||||
return obj.value.toString();
|
||||
}
|
||||
return obj.value;
|
||||
}
|
||||
exports.wrapperToProto3JSON = wrapperToProto3JSON;
|
||||
function wrapperFromProto3JSON(typeName, json) {
|
||||
if (json === null) {
|
||||
return {
|
||||
value: null,
|
||||
};
|
||||
}
|
||||
if (typeName === '.google.protobuf.BytesValue') {
|
||||
if (typeof json !== 'string') {
|
||||
throw new Error(`numberWrapperFromProto3JSON: expected to get a string for google.protobuf.BytesValue but got ${typeof json}`);
|
||||
}
|
||||
return {
|
||||
value: (0, bytes_1.bytesFromProto3JSON)(json),
|
||||
};
|
||||
}
|
||||
return {
|
||||
value: json,
|
||||
};
|
||||
}
|
||||
exports.wrapperFromProto3JSON = wrapperFromProto3JSON;
|
||||
//# sourceMappingURL=wrappers.js.map
|
||||
1
server/node_modules/proto3-json-serializer/build/src/wrappers.js.map
generated
vendored
Normal file
1
server/node_modules/proto3-json-serializer/build/src/wrappers.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"wrappers.js","sourceRoot":"","sources":["../../typescript/src/wrappers.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;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