Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ts-proto-descriptors

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-proto-descriptors - npm Package Compare versions

Comparing version 1.9.0 to 1.10.0

624

dist/google/protobuf/compiler/plugin.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
};
exports.__esModule = true;
exports.CodeGeneratorResponse_File = exports.CodeGeneratorResponse = exports.CodeGeneratorRequest = exports.Version = exports.codeGeneratorResponse_FeatureToJSON = exports.codeGeneratorResponse_FeatureFromJSON = exports.CodeGeneratorResponse_Feature = void 0;
/* eslint-disable */
const Long = require("long");
const _m0 = require("protobufjs/minimal");
const descriptor_1 = require("../descriptor");
var minimal_1 = require("protobufjs/minimal");
var Long = require("long");
var descriptor_1 = require("../../../google/protobuf/descriptor");
/** Sync with code_generator.h. */

@@ -18,9 +49,9 @@ var CodeGeneratorResponse_Feature;

case 0:
case "FEATURE_NONE":
case 'FEATURE_NONE':
return CodeGeneratorResponse_Feature.FEATURE_NONE;
case 1:
case "FEATURE_PROTO3_OPTIONAL":
case 'FEATURE_PROTO3_OPTIONAL':
return CodeGeneratorResponse_Feature.FEATURE_PROTO3_OPTIONAL;
case -1:
case "UNRECOGNIZED":
case 'UNRECOGNIZED':
default:

@@ -34,8 +65,7 @@ return CodeGeneratorResponse_Feature.UNRECOGNIZED;

case CodeGeneratorResponse_Feature.FEATURE_NONE:
return "FEATURE_NONE";
return 'FEATURE_NONE';
case CodeGeneratorResponse_Feature.FEATURE_PROTO3_OPTIONAL:
return "FEATURE_PROTO3_OPTIONAL";
case CodeGeneratorResponse_Feature.UNRECOGNIZED:
return 'FEATURE_PROTO3_OPTIONAL';
default:
return "UNRECOGNIZED";
return 'UNKNOWN';
}

@@ -45,6 +75,8 @@ }

function createBaseVersion() {
return { major: 0, minor: 0, patch: 0, suffix: "" };
return { major: 0, minor: 0, patch: 0, suffix: '' };
}
exports.Version = {
encode(message, writer = _m0.Writer.create()) {
encode: function (message, writer) {
var e_1, _a, e_2, _b;
if (writer === void 0) { writer = minimal_1.Writer.create(); }
if (message.major !== 0) {

@@ -59,69 +91,68 @@ writer.uint32(8).int32(message.major);

}
if (message.suffix !== "") {
if (message.suffix !== '') {
writer.uint32(34).string(message.suffix);
}
if (message._unknownFields !== undefined) {
for (const key in message._unknownFields) {
const values = message._unknownFields[key];
const tag = parseInt(key, 10);
for (const value of values) {
writer.uint32(tag);
writer["_push"]((val, buf, pos) => buf.set(val, pos), value.length, value);
if ('_unknownFields' in message) {
try {
for (var _c = __values(Object.keys(message['_unknownFields'])), _d = _c.next(); !_d.done; _d = _c.next()) {
var key = _d.value;
var values = message['_unknownFields'][key];
try {
for (var values_1 = (e_2 = void 0, __values(values)), values_1_1 = values_1.next(); !values_1_1.done; values_1_1 = values_1.next()) {
var value = values_1_1.value;
writer.uint32(parseInt(key, 10));
writer['_push'](function (val, buf, pos) { return buf.set(val, pos); }, value.length, value);
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (values_1_1 && !values_1_1.done && (_b = values_1["return"])) _b.call(values_1);
}
finally { if (e_2) throw e_2.error; }
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_d && !_d.done && (_a = _c["return"])) _a.call(_c);
}
finally { if (e_1) throw e_1.error; }
}
}
return writer;
},
decode(input, length) {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = Object.create(createBaseVersion());
decode: function (input, length) {
var reader = input instanceof minimal_1.Reader ? input : new minimal_1.Reader(input);
var end = length === undefined ? reader.len : reader.pos + length;
var message = Object.create(createBaseVersion());
message._unknownFields = {};
while (reader.pos < end) {
const tag = reader.uint32();
var tag = reader.uint32();
switch (tag >>> 3) {
case 1:
if (tag != 8) {
break;
}
message.major = reader.int32();
continue;
break;
case 2:
if (tag != 16) {
break;
}
message.minor = reader.int32();
continue;
break;
case 3:
if (tag != 24) {
break;
}
message.patch = reader.int32();
continue;
break;
case 4:
if (tag != 34) {
break;
}
message.suffix = reader.string();
continue;
break;
default:
var startPos = reader.pos;
reader.skipType(tag & 7);
message._unknownFields[tag] = __spread((message._unknownFields[tag] || []), [
reader.buf.slice(startPos, reader.pos),
]);
break;
}
if ((tag & 7) == 4 || tag == 0) {
break;
}
const startPos = reader.pos;
reader.skipType(tag & 7);
const buf = reader.buf.slice(startPos, reader.pos);
if (message._unknownFields === undefined) {
message._unknownFields = {};
}
const list = message._unknownFields[tag];
if (list === undefined) {
message._unknownFields[tag] = [buf];
}
else {
list.push(buf);
}
}
return message;
},
fromJSON(object) {
fromJSON: function (object) {
return {

@@ -131,7 +162,7 @@ major: isSet(object.major) ? Number(object.major) : 0,

patch: isSet(object.patch) ? Number(object.patch) : 0,
suffix: isSet(object.suffix) ? String(object.suffix) : "",
suffix: isSet(object.suffix) ? String(object.suffix) : ''
};
},
toJSON(message) {
const obj = {};
toJSON: function (message) {
var obj = {};
message.major !== undefined && (obj.major = Math.round(message.major));

@@ -143,109 +174,127 @@ message.minor !== undefined && (obj.minor = Math.round(message.minor));

},
create(base) {
return exports.Version.fromPartial(base !== null && base !== void 0 ? base : {});
},
fromPartial(object) {
fromPartial: function (object) {
var _a, _b, _c, _d;
const message = Object.create(createBaseVersion());
var message = Object.create(createBaseVersion());
message.major = (_a = object.major) !== null && _a !== void 0 ? _a : 0;
message.minor = (_b = object.minor) !== null && _b !== void 0 ? _b : 0;
message.patch = (_c = object.patch) !== null && _c !== void 0 ? _c : 0;
message.suffix = (_d = object.suffix) !== null && _d !== void 0 ? _d : "";
message.suffix = (_d = object.suffix) !== null && _d !== void 0 ? _d : '';
return message;
},
}
};
function createBaseCodeGeneratorRequest() {
return { fileToGenerate: [], parameter: "", protoFile: [], compilerVersion: undefined };
return { fileToGenerate: [], parameter: '', protoFile: [], compilerVersion: undefined };
}
exports.CodeGeneratorRequest = {
encode(message, writer = _m0.Writer.create()) {
for (const v of message.fileToGenerate) {
writer.uint32(10).string(v);
encode: function (message, writer) {
var e_3, _a, e_4, _b, e_5, _c, e_6, _d;
if (writer === void 0) { writer = minimal_1.Writer.create(); }
try {
for (var _e = __values(message.fileToGenerate), _f = _e.next(); !_f.done; _f = _e.next()) {
var v = _f.value;
writer.uint32(10).string(v);
}
}
if (message.parameter !== "") {
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (_f && !_f.done && (_a = _e["return"])) _a.call(_e);
}
finally { if (e_3) throw e_3.error; }
}
if (message.parameter !== '') {
writer.uint32(18).string(message.parameter);
}
for (const v of message.protoFile) {
descriptor_1.FileDescriptorProto.encode(v, writer.uint32(122).fork()).ldelim();
try {
for (var _g = __values(message.protoFile), _h = _g.next(); !_h.done; _h = _g.next()) {
var v = _h.value;
descriptor_1.FileDescriptorProto.encode(v, writer.uint32(122).fork()).ldelim();
}
}
catch (e_4_1) { e_4 = { error: e_4_1 }; }
finally {
try {
if (_h && !_h.done && (_b = _g["return"])) _b.call(_g);
}
finally { if (e_4) throw e_4.error; }
}
if (message.compilerVersion !== undefined) {
exports.Version.encode(message.compilerVersion, writer.uint32(26).fork()).ldelim();
}
if (message._unknownFields !== undefined) {
for (const key in message._unknownFields) {
const values = message._unknownFields[key];
const tag = parseInt(key, 10);
for (const value of values) {
writer.uint32(tag);
writer["_push"]((val, buf, pos) => buf.set(val, pos), value.length, value);
if ('_unknownFields' in message) {
try {
for (var _j = __values(Object.keys(message['_unknownFields'])), _k = _j.next(); !_k.done; _k = _j.next()) {
var key = _k.value;
var values = message['_unknownFields'][key];
try {
for (var values_2 = (e_6 = void 0, __values(values)), values_2_1 = values_2.next(); !values_2_1.done; values_2_1 = values_2.next()) {
var value = values_2_1.value;
writer.uint32(parseInt(key, 10));
writer['_push'](function (val, buf, pos) { return buf.set(val, pos); }, value.length, value);
}
}
catch (e_6_1) { e_6 = { error: e_6_1 }; }
finally {
try {
if (values_2_1 && !values_2_1.done && (_d = values_2["return"])) _d.call(values_2);
}
finally { if (e_6) throw e_6.error; }
}
}
}
catch (e_5_1) { e_5 = { error: e_5_1 }; }
finally {
try {
if (_k && !_k.done && (_c = _j["return"])) _c.call(_j);
}
finally { if (e_5) throw e_5.error; }
}
}
return writer;
},
decode(input, length) {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = Object.create(createBaseCodeGeneratorRequest());
decode: function (input, length) {
var reader = input instanceof minimal_1.Reader ? input : new minimal_1.Reader(input);
var end = length === undefined ? reader.len : reader.pos + length;
var message = Object.create(createBaseCodeGeneratorRequest());
message._unknownFields = {};
while (reader.pos < end) {
const tag = reader.uint32();
var tag = reader.uint32();
switch (tag >>> 3) {
case 1:
if (tag != 10) {
break;
}
message.fileToGenerate.push(reader.string());
continue;
break;
case 2:
if (tag != 18) {
break;
}
message.parameter = reader.string();
continue;
break;
case 15:
if (tag != 122) {
break;
}
message.protoFile.push(descriptor_1.FileDescriptorProto.decode(reader, reader.uint32()));
continue;
break;
case 3:
if (tag != 26) {
break;
}
message.compilerVersion = exports.Version.decode(reader, reader.uint32());
continue;
break;
default:
var startPos = reader.pos;
reader.skipType(tag & 7);
message._unknownFields[tag] = __spread((message._unknownFields[tag] || []), [
reader.buf.slice(startPos, reader.pos),
]);
break;
}
if ((tag & 7) == 4 || tag == 0) {
break;
}
const startPos = reader.pos;
reader.skipType(tag & 7);
const buf = reader.buf.slice(startPos, reader.pos);
if (message._unknownFields === undefined) {
message._unknownFields = {};
}
const list = message._unknownFields[tag];
if (list === undefined) {
message._unknownFields[tag] = [buf];
}
else {
list.push(buf);
}
}
return message;
},
fromJSON(object) {
fromJSON: function (object) {
return {
fileToGenerate: Array.isArray(object === null || object === void 0 ? void 0 : object.fileToGenerate) ? object.fileToGenerate.map((e) => String(e)) : [],
parameter: isSet(object.parameter) ? String(object.parameter) : "",
fileToGenerate: Array.isArray(object === null || object === void 0 ? void 0 : object.fileToGenerate) ? object.fileToGenerate.map(function (e) { return String(e); }) : [],
parameter: isSet(object.parameter) ? String(object.parameter) : '',
protoFile: Array.isArray(object === null || object === void 0 ? void 0 : object.protoFile)
? object.protoFile.map((e) => descriptor_1.FileDescriptorProto.fromJSON(e))
? object.protoFile.map(function (e) { return descriptor_1.FileDescriptorProto.fromJSON(e); })
: [],
compilerVersion: isSet(object.compilerVersion) ? exports.Version.fromJSON(object.compilerVersion) : undefined,
compilerVersion: isSet(object.compilerVersion) ? exports.Version.fromJSON(object.compilerVersion) : undefined
};
},
toJSON(message) {
const obj = {};
toJSON: function (message) {
var obj = {};
if (message.fileToGenerate) {
obj.fileToGenerate = message.fileToGenerate.map((e) => e);
obj.fileToGenerate = message.fileToGenerate.map(function (e) { return e; });
}

@@ -257,3 +306,3 @@ else {

if (message.protoFile) {
obj.protoFile = message.protoFile.map((e) => e ? descriptor_1.FileDescriptorProto.toJSON(e) : undefined);
obj.protoFile = message.protoFile.map(function (e) { return (e ? descriptor_1.FileDescriptorProto.toJSON(e) : undefined); });
}

@@ -267,23 +316,23 @@ else {

},
create(base) {
return exports.CodeGeneratorRequest.fromPartial(base !== null && base !== void 0 ? base : {});
},
fromPartial(object) {
fromPartial: function (object) {
var _a, _b, _c;
const message = Object.create(createBaseCodeGeneratorRequest());
message.fileToGenerate = ((_a = object.fileToGenerate) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
message.parameter = (_b = object.parameter) !== null && _b !== void 0 ? _b : "";
message.protoFile = ((_c = object.protoFile) === null || _c === void 0 ? void 0 : _c.map((e) => descriptor_1.FileDescriptorProto.fromPartial(e))) || [];
message.compilerVersion = (object.compilerVersion !== undefined && object.compilerVersion !== null)
? exports.Version.fromPartial(object.compilerVersion)
: undefined;
var message = Object.create(createBaseCodeGeneratorRequest());
message.fileToGenerate = ((_a = object.fileToGenerate) === null || _a === void 0 ? void 0 : _a.map(function (e) { return e; })) || [];
message.parameter = (_b = object.parameter) !== null && _b !== void 0 ? _b : '';
message.protoFile = ((_c = object.protoFile) === null || _c === void 0 ? void 0 : _c.map(function (e) { return descriptor_1.FileDescriptorProto.fromPartial(e); })) || [];
message.compilerVersion =
object.compilerVersion !== undefined && object.compilerVersion !== null
? exports.Version.fromPartial(object.compilerVersion)
: undefined;
return message;
},
}
};
function createBaseCodeGeneratorResponse() {
return { error: "", supportedFeatures: 0, file: [] };
return { error: '', supportedFeatures: 0, file: [] };
}
exports.CodeGeneratorResponse = {
encode(message, writer = _m0.Writer.create()) {
if (message.error !== "") {
encode: function (message, writer) {
var e_7, _a, e_8, _b, e_9, _c;
if (writer === void 0) { writer = minimal_1.Writer.create(); }
if (message.error !== '') {
writer.uint32(10).string(message.error);

@@ -294,75 +343,87 @@ }

}
for (const v of message.file) {
exports.CodeGeneratorResponse_File.encode(v, writer.uint32(122).fork()).ldelim();
try {
for (var _d = __values(message.file), _e = _d.next(); !_e.done; _e = _d.next()) {
var v = _e.value;
exports.CodeGeneratorResponse_File.encode(v, writer.uint32(122).fork()).ldelim();
}
}
if (message._unknownFields !== undefined) {
for (const key in message._unknownFields) {
const values = message._unknownFields[key];
const tag = parseInt(key, 10);
for (const value of values) {
writer.uint32(tag);
writer["_push"]((val, buf, pos) => buf.set(val, pos), value.length, value);
catch (e_7_1) { e_7 = { error: e_7_1 }; }
finally {
try {
if (_e && !_e.done && (_a = _d["return"])) _a.call(_d);
}
finally { if (e_7) throw e_7.error; }
}
if ('_unknownFields' in message) {
try {
for (var _f = __values(Object.keys(message['_unknownFields'])), _g = _f.next(); !_g.done; _g = _f.next()) {
var key = _g.value;
var values = message['_unknownFields'][key];
try {
for (var values_3 = (e_9 = void 0, __values(values)), values_3_1 = values_3.next(); !values_3_1.done; values_3_1 = values_3.next()) {
var value = values_3_1.value;
writer.uint32(parseInt(key, 10));
writer['_push'](function (val, buf, pos) { return buf.set(val, pos); }, value.length, value);
}
}
catch (e_9_1) { e_9 = { error: e_9_1 }; }
finally {
try {
if (values_3_1 && !values_3_1.done && (_c = values_3["return"])) _c.call(values_3);
}
finally { if (e_9) throw e_9.error; }
}
}
}
catch (e_8_1) { e_8 = { error: e_8_1 }; }
finally {
try {
if (_g && !_g.done && (_b = _f["return"])) _b.call(_f);
}
finally { if (e_8) throw e_8.error; }
}
}
return writer;
},
decode(input, length) {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = Object.create(createBaseCodeGeneratorResponse());
decode: function (input, length) {
var reader = input instanceof minimal_1.Reader ? input : new minimal_1.Reader(input);
var end = length === undefined ? reader.len : reader.pos + length;
var message = Object.create(createBaseCodeGeneratorResponse());
message._unknownFields = {};
while (reader.pos < end) {
const tag = reader.uint32();
var tag = reader.uint32();
switch (tag >>> 3) {
case 1:
if (tag != 10) {
break;
}
message.error = reader.string();
continue;
break;
case 2:
if (tag != 16) {
break;
}
message.supportedFeatures = longToNumber(reader.uint64());
continue;
break;
case 15:
if (tag != 122) {
break;
}
message.file.push(exports.CodeGeneratorResponse_File.decode(reader, reader.uint32()));
continue;
break;
default:
var startPos = reader.pos;
reader.skipType(tag & 7);
message._unknownFields[tag] = __spread((message._unknownFields[tag] || []), [
reader.buf.slice(startPos, reader.pos),
]);
break;
}
if ((tag & 7) == 4 || tag == 0) {
break;
}
const startPos = reader.pos;
reader.skipType(tag & 7);
const buf = reader.buf.slice(startPos, reader.pos);
if (message._unknownFields === undefined) {
message._unknownFields = {};
}
const list = message._unknownFields[tag];
if (list === undefined) {
message._unknownFields[tag] = [buf];
}
else {
list.push(buf);
}
}
return message;
},
fromJSON(object) {
fromJSON: function (object) {
return {
error: isSet(object.error) ? String(object.error) : "",
error: isSet(object.error) ? String(object.error) : '',
supportedFeatures: isSet(object.supportedFeatures) ? Number(object.supportedFeatures) : 0,
file: Array.isArray(object === null || object === void 0 ? void 0 : object.file) ? object.file.map((e) => exports.CodeGeneratorResponse_File.fromJSON(e)) : [],
file: Array.isArray(object === null || object === void 0 ? void 0 : object.file) ? object.file.map(function (e) { return exports.CodeGeneratorResponse_File.fromJSON(e); }) : []
};
},
toJSON(message) {
const obj = {};
toJSON: function (message) {
var obj = {};
message.error !== undefined && (obj.error = message.error);
message.supportedFeatures !== undefined && (obj.supportedFeatures = Math.round(message.supportedFeatures));
if (message.file) {
obj.file = message.file.map((e) => e ? exports.CodeGeneratorResponse_File.toJSON(e) : undefined);
obj.file = message.file.map(function (e) { return (e ? exports.CodeGeneratorResponse_File.toJSON(e) : undefined); });
}

@@ -374,26 +435,25 @@ else {

},
create(base) {
return exports.CodeGeneratorResponse.fromPartial(base !== null && base !== void 0 ? base : {});
},
fromPartial(object) {
fromPartial: function (object) {
var _a, _b, _c;
const message = Object.create(createBaseCodeGeneratorResponse());
message.error = (_a = object.error) !== null && _a !== void 0 ? _a : "";
var message = Object.create(createBaseCodeGeneratorResponse());
message.error = (_a = object.error) !== null && _a !== void 0 ? _a : '';
message.supportedFeatures = (_b = object.supportedFeatures) !== null && _b !== void 0 ? _b : 0;
message.file = ((_c = object.file) === null || _c === void 0 ? void 0 : _c.map((e) => exports.CodeGeneratorResponse_File.fromPartial(e))) || [];
message.file = ((_c = object.file) === null || _c === void 0 ? void 0 : _c.map(function (e) { return exports.CodeGeneratorResponse_File.fromPartial(e); })) || [];
return message;
},
}
};
function createBaseCodeGeneratorResponse_File() {
return { name: "", insertionPoint: "", content: "", generatedCodeInfo: undefined };
return { name: '', insertionPoint: '', content: '', generatedCodeInfo: undefined };
}
exports.CodeGeneratorResponse_File = {
encode(message, writer = _m0.Writer.create()) {
if (message.name !== "") {
encode: function (message, writer) {
var e_10, _a, e_11, _b;
if (writer === void 0) { writer = minimal_1.Writer.create(); }
if (message.name !== '') {
writer.uint32(10).string(message.name);
}
if (message.insertionPoint !== "") {
if (message.insertionPoint !== '') {
writer.uint32(18).string(message.insertionPoint);
}
if (message.content !== "") {
if (message.content !== '') {
writer.uint32(122).string(message.content);

@@ -404,118 +464,112 @@ }

}
if (message._unknownFields !== undefined) {
for (const key in message._unknownFields) {
const values = message._unknownFields[key];
const tag = parseInt(key, 10);
for (const value of values) {
writer.uint32(tag);
writer["_push"]((val, buf, pos) => buf.set(val, pos), value.length, value);
if ('_unknownFields' in message) {
try {
for (var _c = __values(Object.keys(message['_unknownFields'])), _d = _c.next(); !_d.done; _d = _c.next()) {
var key = _d.value;
var values = message['_unknownFields'][key];
try {
for (var values_4 = (e_11 = void 0, __values(values)), values_4_1 = values_4.next(); !values_4_1.done; values_4_1 = values_4.next()) {
var value = values_4_1.value;
writer.uint32(parseInt(key, 10));
writer['_push'](function (val, buf, pos) { return buf.set(val, pos); }, value.length, value);
}
}
catch (e_11_1) { e_11 = { error: e_11_1 }; }
finally {
try {
if (values_4_1 && !values_4_1.done && (_b = values_4["return"])) _b.call(values_4);
}
finally { if (e_11) throw e_11.error; }
}
}
}
catch (e_10_1) { e_10 = { error: e_10_1 }; }
finally {
try {
if (_d && !_d.done && (_a = _c["return"])) _a.call(_c);
}
finally { if (e_10) throw e_10.error; }
}
}
return writer;
},
decode(input, length) {
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = Object.create(createBaseCodeGeneratorResponse_File());
decode: function (input, length) {
var reader = input instanceof minimal_1.Reader ? input : new minimal_1.Reader(input);
var end = length === undefined ? reader.len : reader.pos + length;
var message = Object.create(createBaseCodeGeneratorResponse_File());
message._unknownFields = {};
while (reader.pos < end) {
const tag = reader.uint32();
var tag = reader.uint32();
switch (tag >>> 3) {
case 1:
if (tag != 10) {
break;
}
message.name = reader.string();
continue;
break;
case 2:
if (tag != 18) {
break;
}
message.insertionPoint = reader.string();
continue;
break;
case 15:
if (tag != 122) {
break;
}
message.content = reader.string();
continue;
break;
case 16:
if (tag != 130) {
break;
}
message.generatedCodeInfo = descriptor_1.GeneratedCodeInfo.decode(reader, reader.uint32());
continue;
break;
default:
var startPos = reader.pos;
reader.skipType(tag & 7);
message._unknownFields[tag] = __spread((message._unknownFields[tag] || []), [
reader.buf.slice(startPos, reader.pos),
]);
break;
}
if ((tag & 7) == 4 || tag == 0) {
break;
}
const startPos = reader.pos;
reader.skipType(tag & 7);
const buf = reader.buf.slice(startPos, reader.pos);
if (message._unknownFields === undefined) {
message._unknownFields = {};
}
const list = message._unknownFields[tag];
if (list === undefined) {
message._unknownFields[tag] = [buf];
}
else {
list.push(buf);
}
}
return message;
},
fromJSON(object) {
fromJSON: function (object) {
return {
name: isSet(object.name) ? String(object.name) : "",
insertionPoint: isSet(object.insertionPoint) ? String(object.insertionPoint) : "",
content: isSet(object.content) ? String(object.content) : "",
name: isSet(object.name) ? String(object.name) : '',
insertionPoint: isSet(object.insertionPoint) ? String(object.insertionPoint) : '',
content: isSet(object.content) ? String(object.content) : '',
generatedCodeInfo: isSet(object.generatedCodeInfo)
? descriptor_1.GeneratedCodeInfo.fromJSON(object.generatedCodeInfo)
: undefined,
: undefined
};
},
toJSON(message) {
const obj = {};
toJSON: function (message) {
var obj = {};
message.name !== undefined && (obj.name = message.name);
message.insertionPoint !== undefined && (obj.insertionPoint = message.insertionPoint);
message.content !== undefined && (obj.content = message.content);
message.generatedCodeInfo !== undefined && (obj.generatedCodeInfo = message.generatedCodeInfo
? descriptor_1.GeneratedCodeInfo.toJSON(message.generatedCodeInfo)
: undefined);
message.generatedCodeInfo !== undefined &&
(obj.generatedCodeInfo = message.generatedCodeInfo
? descriptor_1.GeneratedCodeInfo.toJSON(message.generatedCodeInfo)
: undefined);
return obj;
},
create(base) {
return exports.CodeGeneratorResponse_File.fromPartial(base !== null && base !== void 0 ? base : {});
},
fromPartial(object) {
fromPartial: function (object) {
var _a, _b, _c;
const message = Object.create(createBaseCodeGeneratorResponse_File());
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
message.insertionPoint = (_b = object.insertionPoint) !== null && _b !== void 0 ? _b : "";
message.content = (_c = object.content) !== null && _c !== void 0 ? _c : "";
message.generatedCodeInfo = (object.generatedCodeInfo !== undefined && object.generatedCodeInfo !== null)
? descriptor_1.GeneratedCodeInfo.fromPartial(object.generatedCodeInfo)
: undefined;
var message = Object.create(createBaseCodeGeneratorResponse_File());
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : '';
message.insertionPoint = (_b = object.insertionPoint) !== null && _b !== void 0 ? _b : '';
message.content = (_c = object.content) !== null && _c !== void 0 ? _c : '';
message.generatedCodeInfo =
object.generatedCodeInfo !== undefined && object.generatedCodeInfo !== null
? descriptor_1.GeneratedCodeInfo.fromPartial(object.generatedCodeInfo)
: undefined;
return message;
},
}
};
var tsProtoGlobalThis = (() => {
if (typeof globalThis !== "undefined") {
var globalThis = (function () {
if (typeof globalThis !== 'undefined')
return globalThis;
}
if (typeof self !== "undefined") {
if (typeof self !== 'undefined')
return self;
}
if (typeof window !== "undefined") {
if (typeof window !== 'undefined')
return window;
}
if (typeof global !== "undefined") {
if (typeof global !== 'undefined')
return global;
}
throw "Unable to locate global object";
throw 'Unable to locate global object';
})();
function longToNumber(long) {
if (long.gt(Number.MAX_SAFE_INTEGER)) {
throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
throw new globalThis.Error('Value is larger than Number.MAX_SAFE_INTEGER');
}

@@ -526,5 +580,5 @@ return long.toNumber();

// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
if (_m0.util.Long !== Long) {
_m0.util.Long = Long;
_m0.configure();
if (minimal_1.util.Long !== Long) {
minimal_1.util.Long = Long;
minimal_1.configure();
}

@@ -531,0 +585,0 @@ function isSet(value) {

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {

@@ -16,4 +12,4 @@ if (k2 === undefined) k2 = k;

};
Object.defineProperty(exports, "__esModule", { value: true });
exports.__esModule = true;
__exportStar(require("./google/protobuf/descriptor"), exports);
__exportStar(require("./google/protobuf/compiler/plugin"), exports);
{
"name": "ts-proto-descriptors",
"version": "1.9.0",
"version": "1.10.0",
"description": "",

@@ -15,9 +15,8 @@ "repository": "github:stephenh/ts-proto",

"dependencies": {
"long": "^4.0.0",
"protobufjs": "^6.8.8"
"protobufjs": "^7.2.4"
},
"devDependencies": {
"ts-proto": "^1.146.0",
"typescript": "^4.7.4"
"typescript": "^5.1.3"
}
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc