Speed up IDE startup time.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
Akos Kitta
2022-05-20 12:11:23 +02:00
committed by Akos Kitta
parent cb50d3a70d
commit 4c55807392
179 changed files with 2692 additions and 2022 deletions

View File

@@ -62,6 +62,12 @@ export class InitRequest extends jspb.Message {
getInstance(): cc_arduino_cli_commands_v1_common_pb.Instance | undefined;
setInstance(value?: cc_arduino_cli_commands_v1_common_pb.Instance): InitRequest;
getProfile(): string;
setProfile(value: string): InitRequest;
getSketchPath(): string;
setSketchPath(value: string): InitRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): InitRequest.AsObject;
@@ -76,6 +82,8 @@ export class InitRequest extends jspb.Message {
export namespace InitRequest {
export type AsObject = {
instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject,
profile: string,
sketchPath: string,
}
}
@@ -93,6 +101,12 @@ export class InitResponse extends jspb.Message {
setError(value?: google_rpc_status_pb.Status): InitResponse;
hasProfile(): boolean;
clearProfile(): void;
getProfile(): cc_arduino_cli_commands_v1_common_pb.Profile | undefined;
setProfile(value?: cc_arduino_cli_commands_v1_common_pb.Profile): InitResponse;
getMessageCase(): InitResponse.MessageCase;
serializeBinary(): Uint8Array;
@@ -109,6 +123,7 @@ export namespace InitResponse {
export type AsObject = {
initProgress?: InitResponse.Progress.AsObject,
error?: google_rpc_status_pb.Status.AsObject,
profile?: cc_arduino_cli_commands_v1_common_pb.Profile.AsObject,
}
@@ -151,6 +166,8 @@ export namespace InitResponse {
ERROR = 2,
PROFILE = 3,
}
}

View File

@@ -866,7 +866,9 @@ proto.cc.arduino.cli.commands.v1.InitRequest.prototype.toObject = function(opt_i
*/
proto.cc.arduino.cli.commands.v1.InitRequest.toObject = function(includeInstance, msg) {
var f, obj = {
instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f)
instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f),
profile: jspb.Message.getFieldWithDefault(msg, 2, ""),
sketchPath: jspb.Message.getFieldWithDefault(msg, 3, "")
};
if (includeInstance) {
@@ -908,6 +910,14 @@ proto.cc.arduino.cli.commands.v1.InitRequest.deserializeBinaryFromReader = funct
reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.Instance.deserializeBinaryFromReader);
msg.setInstance(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setProfile(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setSketchPath(value);
break;
default:
reader.skipField();
break;
@@ -945,6 +955,20 @@ proto.cc.arduino.cli.commands.v1.InitRequest.serializeBinaryToWriter = function(
cc_arduino_cli_commands_v1_common_pb.Instance.serializeBinaryToWriter
);
}
f = message.getProfile();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getSketchPath();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
@@ -985,6 +1009,42 @@ proto.cc.arduino.cli.commands.v1.InitRequest.prototype.hasInstance = function()
};
/**
* optional string profile = 2;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.InitRequest.prototype.getProfile = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.InitRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.InitRequest.prototype.setProfile = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string sketch_path = 3;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.InitRequest.prototype.getSketchPath = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.InitRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.InitRequest.prototype.setSketchPath = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* Oneof group definitions for this message. Each group defines the field
@@ -994,7 +1054,7 @@ proto.cc.arduino.cli.commands.v1.InitRequest.prototype.hasInstance = function()
* @private {!Array<!Array<number>>}
* @const
*/
proto.cc.arduino.cli.commands.v1.InitResponse.oneofGroups_ = [[1,2]];
proto.cc.arduino.cli.commands.v1.InitResponse.oneofGroups_ = [[1,2,3]];
/**
* @enum {number}
@@ -1002,7 +1062,8 @@ proto.cc.arduino.cli.commands.v1.InitResponse.oneofGroups_ = [[1,2]];
proto.cc.arduino.cli.commands.v1.InitResponse.MessageCase = {
MESSAGE_NOT_SET: 0,
INIT_PROGRESS: 1,
ERROR: 2
ERROR: 2,
PROFILE: 3
};
/**
@@ -1044,7 +1105,8 @@ proto.cc.arduino.cli.commands.v1.InitResponse.prototype.toObject = function(opt_
proto.cc.arduino.cli.commands.v1.InitResponse.toObject = function(includeInstance, msg) {
var f, obj = {
initProgress: (f = msg.getInitProgress()) && proto.cc.arduino.cli.commands.v1.InitResponse.Progress.toObject(includeInstance, f),
error: (f = msg.getError()) && google_rpc_status_pb.Status.toObject(includeInstance, f)
error: (f = msg.getError()) && google_rpc_status_pb.Status.toObject(includeInstance, f),
profile: (f = msg.getProfile()) && cc_arduino_cli_commands_v1_common_pb.Profile.toObject(includeInstance, f)
};
if (includeInstance) {
@@ -1091,6 +1153,11 @@ proto.cc.arduino.cli.commands.v1.InitResponse.deserializeBinaryFromReader = func
reader.readMessage(value,google_rpc_status_pb.Status.deserializeBinaryFromReader);
msg.setError(value);
break;
case 3:
var value = new cc_arduino_cli_commands_v1_common_pb.Profile;
reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.Profile.deserializeBinaryFromReader);
msg.setProfile(value);
break;
default:
reader.skipField();
break;
@@ -1136,6 +1203,14 @@ proto.cc.arduino.cli.commands.v1.InitResponse.serializeBinaryToWriter = function
google_rpc_status_pb.Status.serializeBinaryToWriter
);
}
f = message.getProfile();
if (f != null) {
writer.writeMessage(
3,
f,
cc_arduino_cli_commands_v1_common_pb.Profile.serializeBinaryToWriter
);
}
};
@@ -1415,6 +1490,43 @@ proto.cc.arduino.cli.commands.v1.InitResponse.prototype.hasError = function() {
};
/**
* optional Profile profile = 3;
* @return {?proto.cc.arduino.cli.commands.v1.Profile}
*/
proto.cc.arduino.cli.commands.v1.InitResponse.prototype.getProfile = function() {
return /** @type{?proto.cc.arduino.cli.commands.v1.Profile} */ (
jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.Profile, 3));
};
/**
* @param {?proto.cc.arduino.cli.commands.v1.Profile|undefined} value
* @return {!proto.cc.arduino.cli.commands.v1.InitResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.InitResponse.prototype.setProfile = function(value) {
return jspb.Message.setOneofWrapperField(this, 3, proto.cc.arduino.cli.commands.v1.InitResponse.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cc.arduino.cli.commands.v1.InitResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.InitResponse.prototype.clearProfile = function() {
return this.setProfile(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cc.arduino.cli.commands.v1.InitResponse.prototype.hasProfile = function() {
return jspb.Message.getField(this, 3) != null;
};

View File

@@ -185,28 +185,36 @@ export namespace Platform {
}
}
export class PlatformReference extends jspb.Message {
export class InstalledPlatformReference extends jspb.Message {
getId(): string;
setId(value: string): PlatformReference;
setId(value: string): InstalledPlatformReference;
getVersion(): string;
setVersion(value: string): PlatformReference;
setVersion(value: string): InstalledPlatformReference;
getInstallDir(): string;
setInstallDir(value: string): InstalledPlatformReference;
getPackageUrl(): string;
setPackageUrl(value: string): InstalledPlatformReference;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PlatformReference.AsObject;
static toObject(includeInstance: boolean, msg: PlatformReference): PlatformReference.AsObject;
toObject(includeInstance?: boolean): InstalledPlatformReference.AsObject;
static toObject(includeInstance: boolean, msg: InstalledPlatformReference): InstalledPlatformReference.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: PlatformReference, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): PlatformReference;
static deserializeBinaryFromReader(message: PlatformReference, reader: jspb.BinaryReader): PlatformReference;
static serializeBinaryToWriter(message: InstalledPlatformReference, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): InstalledPlatformReference;
static deserializeBinaryFromReader(message: InstalledPlatformReference, reader: jspb.BinaryReader): InstalledPlatformReference;
}
export namespace PlatformReference {
export namespace InstalledPlatformReference {
export type AsObject = {
id: string,
version: string,
installDir: string,
packageUrl: string,
}
}
@@ -234,3 +242,28 @@ export namespace Board {
fqbn: string,
}
}
export class Profile extends jspb.Message {
getName(): string;
setName(value: string): Profile;
getFqbn(): string;
setFqbn(value: string): Profile;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Profile.AsObject;
static toObject(includeInstance: boolean, msg: Profile): Profile.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Profile, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Profile;
static deserializeBinaryFromReader(message: Profile, reader: jspb.BinaryReader): Profile;
}
export namespace Profile {
export type AsObject = {
name: string,
fqbn: string,
}
}

View File

@@ -17,9 +17,10 @@ var global = Function('return this')();
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.Board', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.DownloadProgress', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.InstalledPlatformReference', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.Instance', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.Platform', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.PlatformReference', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.Profile', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.Programmer', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.TaskProgress', null, global);
/**
@@ -137,16 +138,16 @@ if (goog.DEBUG && !COMPILED) {
* @extends {jspb.Message}
* @constructor
*/
proto.cc.arduino.cli.commands.v1.PlatformReference = function(opt_data) {
proto.cc.arduino.cli.commands.v1.InstalledPlatformReference = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.PlatformReference, jspb.Message);
goog.inherits(proto.cc.arduino.cli.commands.v1.InstalledPlatformReference, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cc.arduino.cli.commands.v1.PlatformReference.displayName = 'proto.cc.arduino.cli.commands.v1.PlatformReference';
proto.cc.arduino.cli.commands.v1.InstalledPlatformReference.displayName = 'proto.cc.arduino.cli.commands.v1.InstalledPlatformReference';
}
/**
* Generated by JsPbCodeGenerator.
@@ -169,6 +170,27 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.cc.arduino.cli.commands.v1.Board.displayName = 'proto.cc.arduino.cli.commands.v1.Board';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.cc.arduino.cli.commands.v1.Profile = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.Profile, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cc.arduino.cli.commands.v1.Profile.displayName = 'proto.cc.arduino.cli.commands.v1.Profile';
}
@@ -1405,8 +1427,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.cc.arduino.cli.commands.v1.PlatformReference.prototype.toObject = function(opt_includeInstance) {
return proto.cc.arduino.cli.commands.v1.PlatformReference.toObject(opt_includeInstance, this);
proto.cc.arduino.cli.commands.v1.InstalledPlatformReference.prototype.toObject = function(opt_includeInstance) {
return proto.cc.arduino.cli.commands.v1.InstalledPlatformReference.toObject(opt_includeInstance, this);
};
@@ -1415,14 +1437,16 @@ proto.cc.arduino.cli.commands.v1.PlatformReference.prototype.toObject = function
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.cc.arduino.cli.commands.v1.PlatformReference} msg The msg instance to transform.
* @param {!proto.cc.arduino.cli.commands.v1.InstalledPlatformReference} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cc.arduino.cli.commands.v1.PlatformReference.toObject = function(includeInstance, msg) {
proto.cc.arduino.cli.commands.v1.InstalledPlatformReference.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
version: jspb.Message.getFieldWithDefault(msg, 2, "")
version: jspb.Message.getFieldWithDefault(msg, 2, ""),
installDir: jspb.Message.getFieldWithDefault(msg, 3, ""),
packageUrl: jspb.Message.getFieldWithDefault(msg, 4, "")
};
if (includeInstance) {
@@ -1436,23 +1460,23 @@ proto.cc.arduino.cli.commands.v1.PlatformReference.toObject = function(includeIn
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cc.arduino.cli.commands.v1.PlatformReference}
* @return {!proto.cc.arduino.cli.commands.v1.InstalledPlatformReference}
*/
proto.cc.arduino.cli.commands.v1.PlatformReference.deserializeBinary = function(bytes) {
proto.cc.arduino.cli.commands.v1.InstalledPlatformReference.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cc.arduino.cli.commands.v1.PlatformReference;
return proto.cc.arduino.cli.commands.v1.PlatformReference.deserializeBinaryFromReader(msg, reader);
var msg = new proto.cc.arduino.cli.commands.v1.InstalledPlatformReference;
return proto.cc.arduino.cli.commands.v1.InstalledPlatformReference.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cc.arduino.cli.commands.v1.PlatformReference} msg The message object to deserialize into.
* @param {!proto.cc.arduino.cli.commands.v1.InstalledPlatformReference} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cc.arduino.cli.commands.v1.PlatformReference}
* @return {!proto.cc.arduino.cli.commands.v1.InstalledPlatformReference}
*/
proto.cc.arduino.cli.commands.v1.PlatformReference.deserializeBinaryFromReader = function(msg, reader) {
proto.cc.arduino.cli.commands.v1.InstalledPlatformReference.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
@@ -1467,6 +1491,14 @@ proto.cc.arduino.cli.commands.v1.PlatformReference.deserializeBinaryFromReader =
var value = /** @type {string} */ (reader.readString());
msg.setVersion(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setInstallDir(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setPackageUrl(value);
break;
default:
reader.skipField();
break;
@@ -1480,9 +1512,9 @@ proto.cc.arduino.cli.commands.v1.PlatformReference.deserializeBinaryFromReader =
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cc.arduino.cli.commands.v1.PlatformReference.prototype.serializeBinary = function() {
proto.cc.arduino.cli.commands.v1.InstalledPlatformReference.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cc.arduino.cli.commands.v1.PlatformReference.serializeBinaryToWriter(this, writer);
proto.cc.arduino.cli.commands.v1.InstalledPlatformReference.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
@@ -1490,11 +1522,11 @@ proto.cc.arduino.cli.commands.v1.PlatformReference.prototype.serializeBinary = f
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.cc.arduino.cli.commands.v1.PlatformReference} message
* @param {!proto.cc.arduino.cli.commands.v1.InstalledPlatformReference} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cc.arduino.cli.commands.v1.PlatformReference.serializeBinaryToWriter = function(message, writer) {
proto.cc.arduino.cli.commands.v1.InstalledPlatformReference.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
@@ -1510,6 +1542,20 @@ proto.cc.arduino.cli.commands.v1.PlatformReference.serializeBinaryToWriter = fun
f
);
}
f = message.getInstallDir();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getPackageUrl();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
};
@@ -1517,16 +1563,16 @@ proto.cc.arduino.cli.commands.v1.PlatformReference.serializeBinaryToWriter = fun
* optional string id = 1;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.PlatformReference.prototype.getId = function() {
proto.cc.arduino.cli.commands.v1.InstalledPlatformReference.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.PlatformReference} returns this
* @return {!proto.cc.arduino.cli.commands.v1.InstalledPlatformReference} returns this
*/
proto.cc.arduino.cli.commands.v1.PlatformReference.prototype.setId = function(value) {
proto.cc.arduino.cli.commands.v1.InstalledPlatformReference.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
@@ -1535,20 +1581,56 @@ proto.cc.arduino.cli.commands.v1.PlatformReference.prototype.setId = function(va
* optional string version = 2;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.PlatformReference.prototype.getVersion = function() {
proto.cc.arduino.cli.commands.v1.InstalledPlatformReference.prototype.getVersion = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.PlatformReference} returns this
* @return {!proto.cc.arduino.cli.commands.v1.InstalledPlatformReference} returns this
*/
proto.cc.arduino.cli.commands.v1.PlatformReference.prototype.setVersion = function(value) {
proto.cc.arduino.cli.commands.v1.InstalledPlatformReference.prototype.setVersion = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string install_dir = 3;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.InstalledPlatformReference.prototype.getInstallDir = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.InstalledPlatformReference} returns this
*/
proto.cc.arduino.cli.commands.v1.InstalledPlatformReference.prototype.setInstallDir = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string package_url = 4;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.InstalledPlatformReference.prototype.getPackageUrl = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.InstalledPlatformReference} returns this
*/
proto.cc.arduino.cli.commands.v1.InstalledPlatformReference.prototype.setPackageUrl = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
@@ -1709,4 +1791,164 @@ proto.cc.arduino.cli.commands.v1.Board.prototype.setFqbn = function(value) {
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.cc.arduino.cli.commands.v1.Profile.prototype.toObject = function(opt_includeInstance) {
return proto.cc.arduino.cli.commands.v1.Profile.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.cc.arduino.cli.commands.v1.Profile} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cc.arduino.cli.commands.v1.Profile.toObject = function(includeInstance, msg) {
var f, obj = {
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
fqbn: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cc.arduino.cli.commands.v1.Profile}
*/
proto.cc.arduino.cli.commands.v1.Profile.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cc.arduino.cli.commands.v1.Profile;
return proto.cc.arduino.cli.commands.v1.Profile.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cc.arduino.cli.commands.v1.Profile} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cc.arduino.cli.commands.v1.Profile}
*/
proto.cc.arduino.cli.commands.v1.Profile.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setFqbn(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cc.arduino.cli.commands.v1.Profile.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cc.arduino.cli.commands.v1.Profile.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.cc.arduino.cli.commands.v1.Profile} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cc.arduino.cli.commands.v1.Profile.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getFqbn();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string name = 1;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.Profile.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.Profile} returns this
*/
proto.cc.arduino.cli.commands.v1.Profile.prototype.setName = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string fqbn = 2;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.Profile.prototype.getFqbn = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.Profile} returns this
*/
proto.cc.arduino.cli.commands.v1.Profile.prototype.setFqbn = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
goog.object.extend(exports, proto.cc.arduino.cli.commands.v1);

View File

@@ -86,6 +86,15 @@ export class CompileRequest extends jspb.Message {
setLibraryList(value: Array<string>): CompileRequest;
addLibrary(value: string, index?: number): string;
getKeysKeychain(): string;
setKeysKeychain(value: string): CompileRequest;
getSignKey(): string;
setSignKey(value: string): CompileRequest;
getEncryptKey(): string;
setEncryptKey(value: string): CompileRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): CompileRequest.AsObject;
@@ -121,6 +130,9 @@ export namespace CompileRequest {
sourceOverrideMap: Array<[string, string]>,
exportBinaries?: google_protobuf_wrappers_pb.BoolValue.AsObject,
libraryList: Array<string>,
keysKeychain: string,
signKey: string,
encryptKey: string,
}
}
@@ -151,14 +163,14 @@ export class CompileResponse extends jspb.Message {
hasBoardPlatform(): boolean;
clearBoardPlatform(): void;
getBoardPlatform(): cc_arduino_cli_commands_v1_common_pb.PlatformReference | undefined;
setBoardPlatform(value?: cc_arduino_cli_commands_v1_common_pb.PlatformReference): CompileResponse;
getBoardPlatform(): cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference | undefined;
setBoardPlatform(value?: cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference): CompileResponse;
hasBuildPlatform(): boolean;
clearBuildPlatform(): void;
getBuildPlatform(): cc_arduino_cli_commands_v1_common_pb.PlatformReference | undefined;
setBuildPlatform(value?: cc_arduino_cli_commands_v1_common_pb.PlatformReference): CompileResponse;
getBuildPlatform(): cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference | undefined;
setBuildPlatform(value?: cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference): CompileResponse;
hasProgress(): boolean;
@@ -184,8 +196,8 @@ export namespace CompileResponse {
buildPath: string,
usedLibrariesList: Array<cc_arduino_cli_commands_v1_lib_pb.Library.AsObject>,
executableSectionsSizeList: Array<ExecutableSectionSize.AsObject>,
boardPlatform?: cc_arduino_cli_commands_v1_common_pb.PlatformReference.AsObject,
buildPlatform?: cc_arduino_cli_commands_v1_common_pb.PlatformReference.AsObject,
boardPlatform?: cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference.AsObject,
buildPlatform?: cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference.AsObject,
progress?: cc_arduino_cli_commands_v1_common_pb.TaskProgress.AsObject,
}
}

View File

@@ -146,7 +146,10 @@ proto.cc.arduino.cli.commands.v1.CompileRequest.toObject = function(includeInsta
createCompilationDatabaseOnly: jspb.Message.getBooleanFieldWithDefault(msg, 21, false),
sourceOverrideMap: (f = msg.getSourceOverrideMap()) ? f.toObject(includeInstance, undefined) : [],
exportBinaries: (f = msg.getExportBinaries()) && google_protobuf_wrappers_pb.BoolValue.toObject(includeInstance, f),
libraryList: (f = jspb.Message.getRepeatedField(msg, 24)) == null ? undefined : f
libraryList: (f = jspb.Message.getRepeatedField(msg, 24)) == null ? undefined : f,
keysKeychain: jspb.Message.getFieldWithDefault(msg, 25, ""),
signKey: jspb.Message.getFieldWithDefault(msg, 26, ""),
encryptKey: jspb.Message.getFieldWithDefault(msg, 27, "")
};
if (includeInstance) {
@@ -271,6 +274,18 @@ proto.cc.arduino.cli.commands.v1.CompileRequest.deserializeBinaryFromReader = fu
var value = /** @type {string} */ (reader.readString());
msg.addLibrary(value);
break;
case 25:
var value = /** @type {string} */ (reader.readString());
msg.setKeysKeychain(value);
break;
case 26:
var value = /** @type {string} */ (reader.readString());
msg.setSignKey(value);
break;
case 27:
var value = /** @type {string} */ (reader.readString());
msg.setEncryptKey(value);
break;
default:
reader.skipField();
break;
@@ -446,6 +461,27 @@ proto.cc.arduino.cli.commands.v1.CompileRequest.serializeBinaryToWriter = functi
f
);
}
f = message.getKeysKeychain();
if (f.length > 0) {
writer.writeString(
25,
f
);
}
f = message.getSignKey();
if (f.length > 0) {
writer.writeString(
26,
f
);
}
f = message.getEncryptKey();
if (f.length > 0) {
writer.writeString(
27,
f
);
}
};
@@ -926,6 +962,60 @@ proto.cc.arduino.cli.commands.v1.CompileRequest.prototype.clearLibraryList = fun
};
/**
* optional string keys_keychain = 25;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.CompileRequest.prototype.getKeysKeychain = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 25, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.CompileRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.CompileRequest.prototype.setKeysKeychain = function(value) {
return jspb.Message.setProto3StringField(this, 25, value);
};
/**
* optional string sign_key = 26;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.CompileRequest.prototype.getSignKey = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 26, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.CompileRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.CompileRequest.prototype.setSignKey = function(value) {
return jspb.Message.setProto3StringField(this, 26, value);
};
/**
* optional string encrypt_key = 27;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.CompileRequest.prototype.getEncryptKey = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 27, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.CompileRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.CompileRequest.prototype.setEncryptKey = function(value) {
return jspb.Message.setProto3StringField(this, 27, value);
};
/**
* List of repeated fields within this message type.
@@ -972,8 +1062,8 @@ proto.cc.arduino.cli.commands.v1.CompileResponse.toObject = function(includeInst
cc_arduino_cli_commands_v1_lib_pb.Library.toObject, includeInstance),
executableSectionsSizeList: jspb.Message.toObjectList(msg.getExecutableSectionsSizeList(),
proto.cc.arduino.cli.commands.v1.ExecutableSectionSize.toObject, includeInstance),
boardPlatform: (f = msg.getBoardPlatform()) && cc_arduino_cli_commands_v1_common_pb.PlatformReference.toObject(includeInstance, f),
buildPlatform: (f = msg.getBuildPlatform()) && cc_arduino_cli_commands_v1_common_pb.PlatformReference.toObject(includeInstance, f),
boardPlatform: (f = msg.getBoardPlatform()) && cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference.toObject(includeInstance, f),
buildPlatform: (f = msg.getBuildPlatform()) && cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference.toObject(includeInstance, f),
progress: (f = msg.getProgress()) && cc_arduino_cli_commands_v1_common_pb.TaskProgress.toObject(includeInstance, f)
};
@@ -1034,13 +1124,13 @@ proto.cc.arduino.cli.commands.v1.CompileResponse.deserializeBinaryFromReader = f
msg.addExecutableSectionsSize(value);
break;
case 6:
var value = new cc_arduino_cli_commands_v1_common_pb.PlatformReference;
reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.PlatformReference.deserializeBinaryFromReader);
var value = new cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference;
reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference.deserializeBinaryFromReader);
msg.setBoardPlatform(value);
break;
case 7:
var value = new cc_arduino_cli_commands_v1_common_pb.PlatformReference;
reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.PlatformReference.deserializeBinaryFromReader);
var value = new cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference;
reader.readMessage(value,cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference.deserializeBinaryFromReader);
msg.setBuildPlatform(value);
break;
case 8:
@@ -1119,7 +1209,7 @@ proto.cc.arduino.cli.commands.v1.CompileResponse.serializeBinaryToWriter = funct
writer.writeMessage(
6,
f,
cc_arduino_cli_commands_v1_common_pb.PlatformReference.serializeBinaryToWriter
cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference.serializeBinaryToWriter
);
}
f = message.getBuildPlatform();
@@ -1127,7 +1217,7 @@ proto.cc.arduino.cli.commands.v1.CompileResponse.serializeBinaryToWriter = funct
writer.writeMessage(
7,
f,
cc_arduino_cli_commands_v1_common_pb.PlatformReference.serializeBinaryToWriter
cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference.serializeBinaryToWriter
);
}
f = message.getProgress();
@@ -1320,17 +1410,17 @@ proto.cc.arduino.cli.commands.v1.CompileResponse.prototype.clearExecutableSectio
/**
* optional PlatformReference board_platform = 6;
* @return {?proto.cc.arduino.cli.commands.v1.PlatformReference}
* optional InstalledPlatformReference board_platform = 6;
* @return {?proto.cc.arduino.cli.commands.v1.InstalledPlatformReference}
*/
proto.cc.arduino.cli.commands.v1.CompileResponse.prototype.getBoardPlatform = function() {
return /** @type{?proto.cc.arduino.cli.commands.v1.PlatformReference} */ (
jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.PlatformReference, 6));
return /** @type{?proto.cc.arduino.cli.commands.v1.InstalledPlatformReference} */ (
jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference, 6));
};
/**
* @param {?proto.cc.arduino.cli.commands.v1.PlatformReference|undefined} value
* @param {?proto.cc.arduino.cli.commands.v1.InstalledPlatformReference|undefined} value
* @return {!proto.cc.arduino.cli.commands.v1.CompileResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.CompileResponse.prototype.setBoardPlatform = function(value) {
@@ -1357,17 +1447,17 @@ proto.cc.arduino.cli.commands.v1.CompileResponse.prototype.hasBoardPlatform = fu
/**
* optional PlatformReference build_platform = 7;
* @return {?proto.cc.arduino.cli.commands.v1.PlatformReference}
* optional InstalledPlatformReference build_platform = 7;
* @return {?proto.cc.arduino.cli.commands.v1.InstalledPlatformReference}
*/
proto.cc.arduino.cli.commands.v1.CompileResponse.prototype.getBuildPlatform = function() {
return /** @type{?proto.cc.arduino.cli.commands.v1.PlatformReference} */ (
jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.PlatformReference, 7));
return /** @type{?proto.cc.arduino.cli.commands.v1.InstalledPlatformReference} */ (
jspb.Message.getWrapperField(this, cc_arduino_cli_commands_v1_common_pb.InstalledPlatformReference, 7));
};
/**
* @param {?proto.cc.arduino.cli.commands.v1.PlatformReference|undefined} value
* @param {?proto.cc.arduino.cli.commands.v1.InstalledPlatformReference|undefined} value
* @return {!proto.cc.arduino.cli.commands.v1.CompileResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.CompileResponse.prototype.setBuildPlatform = function(value) {

View File

@@ -93,6 +93,9 @@ export class MonitorResponse extends jspb.Message {
setAppliedSettingsList(value: Array<MonitorPortSetting>): MonitorResponse;
addAppliedSettings(value?: MonitorPortSetting, index?: number): MonitorPortSetting;
getSuccess(): boolean;
setSuccess(value: boolean): MonitorResponse;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): MonitorResponse.AsObject;
@@ -109,6 +112,7 @@ export namespace MonitorResponse {
error: string,
rxData: Uint8Array | string,
appliedSettingsList: Array<MonitorPortSetting.AsObject>,
success: boolean,
}
}

View File

@@ -712,7 +712,8 @@ proto.cc.arduino.cli.commands.v1.MonitorResponse.toObject = function(includeInst
error: jspb.Message.getFieldWithDefault(msg, 1, ""),
rxData: msg.getRxData_asB64(),
appliedSettingsList: jspb.Message.toObjectList(msg.getAppliedSettingsList(),
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.toObject, includeInstance)
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.toObject, includeInstance),
success: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
};
if (includeInstance) {
@@ -762,6 +763,10 @@ proto.cc.arduino.cli.commands.v1.MonitorResponse.deserializeBinaryFromReader = f
reader.readMessage(value,proto.cc.arduino.cli.commands.v1.MonitorPortSetting.deserializeBinaryFromReader);
msg.addAppliedSettings(value);
break;
case 4:
var value = /** @type {boolean} */ (reader.readBool());
msg.setSuccess(value);
break;
default:
reader.skipField();
break;
@@ -813,6 +818,13 @@ proto.cc.arduino.cli.commands.v1.MonitorResponse.serializeBinaryToWriter = funct
proto.cc.arduino.cli.commands.v1.MonitorPortSetting.serializeBinaryToWriter
);
}
f = message.getSuccess();
if (f) {
writer.writeBool(
4,
f
);
}
};
@@ -914,6 +926,24 @@ proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.clearAppliedSettingsL
};
/**
* optional bool success = 4;
* @return {boolean}
*/
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.getSuccess = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
};
/**
* @param {boolean} value
* @return {!proto.cc.arduino.cli.commands.v1.MonitorResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.MonitorResponse.prototype.setSuccess = function(value) {
return jspb.Message.setProto3BooleanField(this, 4, value);
};

View File

@@ -371,9 +371,6 @@ export class SupportedUserFieldsRequest extends jspb.Message {
getProtocol(): string;
setProtocol(value: string): SupportedUserFieldsRequest;
getAddress(): string;
setAddress(value: string): SupportedUserFieldsRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SupportedUserFieldsRequest.AsObject;
@@ -390,7 +387,6 @@ export namespace SupportedUserFieldsRequest {
instance?: cc_arduino_cli_commands_v1_common_pb.Instance.AsObject,
fqbn: string,
protocol: string,
address: string,
}
}

View File

@@ -2718,8 +2718,7 @@ proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.toObject = function(
var f, obj = {
instance: (f = msg.getInstance()) && cc_arduino_cli_commands_v1_common_pb.Instance.toObject(includeInstance, f),
fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""),
protocol: jspb.Message.getFieldWithDefault(msg, 3, ""),
address: jspb.Message.getFieldWithDefault(msg, 4, "")
protocol: jspb.Message.getFieldWithDefault(msg, 3, "")
};
if (includeInstance) {
@@ -2769,10 +2768,6 @@ proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.deserializeBinaryFro
var value = /** @type {string} */ (reader.readString());
msg.setProtocol(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setAddress(value);
break;
default:
reader.skipField();
break;
@@ -2824,13 +2819,6 @@ proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.serializeBinaryToWri
f
);
}
f = message.getAddress();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
};
@@ -2907,24 +2895,6 @@ proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.prototype.setProtoco
};
/**
* optional string address = 4;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.prototype.getAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest} returns this
*/
proto.cc.arduino.cli.commands.v1.SupportedUserFieldsRequest.prototype.setAddress = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};