chore(deps): update dependencies

To fix all security vulnerabilities detected by `Dependabot`.

 - remove `shelljs`. replace with `fs` and `console`.
 - remove `uuid`. replace with `@phosphor/coreutils`.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
Akos Kitta
2023-10-02 18:05:22 +02:00
committed by Akos Kitta
parent ed1cb6bcf9
commit 153e34f11b
17 changed files with 1473 additions and 2749 deletions

View File

@@ -420,6 +420,29 @@ export namespace LoadSketchRequest {
}
}
export class SketchProfile extends jspb.Message {
getName(): string;
setName(value: string): SketchProfile;
getFqbn(): string;
setFqbn(value: string): SketchProfile;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SketchProfile.AsObject;
static toObject(includeInstance: boolean, msg: SketchProfile): SketchProfile.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: SketchProfile, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SketchProfile;
static deserializeBinaryFromReader(message: SketchProfile, reader: jspb.BinaryReader): SketchProfile;
}
export namespace SketchProfile {
export type AsObject = {
name: string,
fqbn: string,
}
}
export class LoadSketchResponse extends jspb.Message {
getMainFile(): string;
setMainFile(value: string): LoadSketchResponse;
@@ -443,6 +466,15 @@ export class LoadSketchResponse extends jspb.Message {
setDefaultPort(value: string): LoadSketchResponse;
getDefaultProtocol(): string;
setDefaultProtocol(value: string): LoadSketchResponse;
clearProfilesList(): void;
getProfilesList(): Array<SketchProfile>;
setProfilesList(value: Array<SketchProfile>): LoadSketchResponse;
addProfiles(value?: SketchProfile, index?: number): SketchProfile;
hasDefaultProfile(): boolean;
clearDefaultProfile(): void;
getDefaultProfile(): SketchProfile | undefined;
setDefaultProfile(value?: SketchProfile): LoadSketchResponse;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): LoadSketchResponse.AsObject;
@@ -464,6 +496,8 @@ export namespace LoadSketchResponse {
defaultFqbn: string,
defaultPort: string,
defaultProtocol: string,
profilesList: Array<SketchProfile.AsObject>,
defaultProfile?: SketchProfile.AsObject,
}
}

View File

@@ -55,6 +55,7 @@ goog.exportSymbol('proto.cc.arduino.cli.commands.v1.NewSketchRequest', null, glo
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.NewSketchResponse', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.SetSketchDefaultsRequest', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.SetSketchDefaultsResponse', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.SketchProfile', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.UpdateIndexRequest', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.UpdateIndexResponse', null, global);
goog.exportSymbol('proto.cc.arduino.cli.commands.v1.UpdateLibrariesIndexRequest', null, global);
@@ -418,6 +419,27 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.cc.arduino.cli.commands.v1.LoadSketchRequest.displayName = 'proto.cc.arduino.cli.commands.v1.LoadSketchRequest';
}
/**
* 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.SketchProfile = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cc.arduino.cli.commands.v1.SketchProfile, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cc.arduino.cli.commands.v1.SketchProfile.displayName = 'proto.cc.arduino.cli.commands.v1.SketchProfile';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@@ -3196,12 +3218,172 @@ proto.cc.arduino.cli.commands.v1.LoadSketchRequest.prototype.setSketchPath = fun
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.SketchProfile.prototype.toObject = function(opt_includeInstance) {
return proto.cc.arduino.cli.commands.v1.SketchProfile.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.SketchProfile} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cc.arduino.cli.commands.v1.SketchProfile.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.SketchProfile}
*/
proto.cc.arduino.cli.commands.v1.SketchProfile.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cc.arduino.cli.commands.v1.SketchProfile;
return proto.cc.arduino.cli.commands.v1.SketchProfile.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.SketchProfile} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cc.arduino.cli.commands.v1.SketchProfile}
*/
proto.cc.arduino.cli.commands.v1.SketchProfile.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.SketchProfile.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.cc.arduino.cli.commands.v1.SketchProfile.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.SketchProfile} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cc.arduino.cli.commands.v1.SketchProfile.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.SketchProfile.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.SketchProfile} returns this
*/
proto.cc.arduino.cli.commands.v1.SketchProfile.prototype.setName = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string fqbn = 2;
* @return {string}
*/
proto.cc.arduino.cli.commands.v1.SketchProfile.prototype.getFqbn = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.cc.arduino.cli.commands.v1.SketchProfile} returns this
*/
proto.cc.arduino.cli.commands.v1.SketchProfile.prototype.setFqbn = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cc.arduino.cli.commands.v1.LoadSketchResponse.repeatedFields_ = [3,4,5];
proto.cc.arduino.cli.commands.v1.LoadSketchResponse.repeatedFields_ = [3,4,5,9];
@@ -3241,7 +3423,10 @@ proto.cc.arduino.cli.commands.v1.LoadSketchResponse.toObject = function(includeI
rootFolderFilesList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f,
defaultFqbn: jspb.Message.getFieldWithDefault(msg, 6, ""),
defaultPort: jspb.Message.getFieldWithDefault(msg, 7, ""),
defaultProtocol: jspb.Message.getFieldWithDefault(msg, 8, "")
defaultProtocol: jspb.Message.getFieldWithDefault(msg, 8, ""),
profilesList: jspb.Message.toObjectList(msg.getProfilesList(),
proto.cc.arduino.cli.commands.v1.SketchProfile.toObject, includeInstance),
defaultProfile: (f = msg.getDefaultProfile()) && proto.cc.arduino.cli.commands.v1.SketchProfile.toObject(includeInstance, f)
};
if (includeInstance) {
@@ -3310,6 +3495,16 @@ proto.cc.arduino.cli.commands.v1.LoadSketchResponse.deserializeBinaryFromReader
var value = /** @type {string} */ (reader.readString());
msg.setDefaultProtocol(value);
break;
case 9:
var value = new proto.cc.arduino.cli.commands.v1.SketchProfile;
reader.readMessage(value,proto.cc.arduino.cli.commands.v1.SketchProfile.deserializeBinaryFromReader);
msg.addProfiles(value);
break;
case 10:
var value = new proto.cc.arduino.cli.commands.v1.SketchProfile;
reader.readMessage(value,proto.cc.arduino.cli.commands.v1.SketchProfile.deserializeBinaryFromReader);
msg.setDefaultProfile(value);
break;
default:
reader.skipField();
break;
@@ -3395,6 +3590,22 @@ proto.cc.arduino.cli.commands.v1.LoadSketchResponse.serializeBinaryToWriter = fu
f
);
}
f = message.getProfilesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
9,
f,
proto.cc.arduino.cli.commands.v1.SketchProfile.serializeBinaryToWriter
);
}
f = message.getDefaultProfile();
if (f != null) {
writer.writeMessage(
10,
f,
proto.cc.arduino.cli.commands.v1.SketchProfile.serializeBinaryToWriter
);
}
};
@@ -3599,6 +3810,81 @@ proto.cc.arduino.cli.commands.v1.LoadSketchResponse.prototype.setDefaultProtocol
};
/**
* repeated SketchProfile profiles = 9;
* @return {!Array<!proto.cc.arduino.cli.commands.v1.SketchProfile>}
*/
proto.cc.arduino.cli.commands.v1.LoadSketchResponse.prototype.getProfilesList = function() {
return /** @type{!Array<!proto.cc.arduino.cli.commands.v1.SketchProfile>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.cc.arduino.cli.commands.v1.SketchProfile, 9));
};
/**
* @param {!Array<!proto.cc.arduino.cli.commands.v1.SketchProfile>} value
* @return {!proto.cc.arduino.cli.commands.v1.LoadSketchResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.LoadSketchResponse.prototype.setProfilesList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 9, value);
};
/**
* @param {!proto.cc.arduino.cli.commands.v1.SketchProfile=} opt_value
* @param {number=} opt_index
* @return {!proto.cc.arduino.cli.commands.v1.SketchProfile}
*/
proto.cc.arduino.cli.commands.v1.LoadSketchResponse.prototype.addProfiles = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.cc.arduino.cli.commands.v1.SketchProfile, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cc.arduino.cli.commands.v1.LoadSketchResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.LoadSketchResponse.prototype.clearProfilesList = function() {
return this.setProfilesList([]);
};
/**
* optional SketchProfile default_profile = 10;
* @return {?proto.cc.arduino.cli.commands.v1.SketchProfile}
*/
proto.cc.arduino.cli.commands.v1.LoadSketchResponse.prototype.getDefaultProfile = function() {
return /** @type{?proto.cc.arduino.cli.commands.v1.SketchProfile} */ (
jspb.Message.getWrapperField(this, proto.cc.arduino.cli.commands.v1.SketchProfile, 10));
};
/**
* @param {?proto.cc.arduino.cli.commands.v1.SketchProfile|undefined} value
* @return {!proto.cc.arduino.cli.commands.v1.LoadSketchResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.LoadSketchResponse.prototype.setDefaultProfile = function(value) {
return jspb.Message.setWrapperField(this, 10, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cc.arduino.cli.commands.v1.LoadSketchResponse} returns this
*/
proto.cc.arduino.cli.commands.v1.LoadSketchResponse.prototype.clearDefaultProfile = function() {
return this.setDefaultProfile(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cc.arduino.cli.commands.v1.LoadSketchResponse.prototype.hasDefaultProfile = function() {
return jspb.Message.getField(this, 10) != null;
};