Skip to content

chore: update CLI version, gRPC and bit of documentation #285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions arduino-ide-extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,7 @@ The Config Service knows about your system, like for example the default sketch
### `"arduino"` configuration in the `package.json`:
- `"cli"`:
- `"version"` type `string` | `{ owner: string, repo: string, commitish?: string }`: if the type is a `string` and is a valid semver, it will get the corresponding [released](https://github.com/arduino/arduino-cli/releases) CLI. If the type is `string` and is a [date in `YYYYMMDD`](https://arduino.github.io/arduino-cli/latest/installation/#nightly-builds) format, it will get a nightly CLI. If the type is an object, a CLI, build from the sources in the `owner/repo` will be used. If `commitish` is not defined, the HEAD of the default branch will be used. In any other cases an error is thrown.

#### Rebuild gRPC protocol interfaces
- Some CLI updates can bring changes to the gRPC interfaces, as the API might change. gRPC interfaces can be updated running the command
`yarn --cwd arduino-ide-extension generate-protocol`
2 changes: 1 addition & 1 deletion arduino-ide-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
],
"arduino": {
"cli": {
"version": "0.17.0"
"version": "20210329"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ export class StreamingOpenReq extends jspb.Message {
setData(value: Uint8Array | string): StreamingOpenReq;


hasRecvAcknowledge(): boolean;
clearRecvAcknowledge(): void;
getRecvAcknowledge(): number;
setRecvAcknowledge(value: number): StreamingOpenReq;


getContentCase(): StreamingOpenReq.ContentCase;

serializeBinary(): Uint8Array;
Expand All @@ -39,6 +45,7 @@ export namespace StreamingOpenReq {
export type AsObject = {
monitorconfig?: MonitorConfig.AsObject,
data: Uint8Array | string,
recvAcknowledge: number,
}

export enum ContentCase {
Expand All @@ -48,6 +55,8 @@ export namespace StreamingOpenReq {

DATA = 2,

RECV_ACKNOWLEDGE = 3,

}

}
Expand All @@ -65,6 +74,9 @@ export class MonitorConfig extends jspb.Message {
getAdditionalconfig(): google_protobuf_struct_pb.Struct | undefined;
setAdditionalconfig(value?: google_protobuf_struct_pb.Struct): MonitorConfig;

getRecvRateLimitBuffer(): number;
setRecvRateLimitBuffer(value: number): MonitorConfig;


serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): MonitorConfig.AsObject;
Expand All @@ -81,10 +93,12 @@ export namespace MonitorConfig {
target: string,
type: MonitorConfig.TargetType,
additionalconfig?: google_protobuf_struct_pb.Struct.AsObject,
recvRateLimitBuffer: number,
}

export enum TargetType {
SERIAL = 0,
NULL = 99,
}

}
Expand All @@ -95,6 +109,9 @@ export class StreamingOpenResp extends jspb.Message {
getData_asB64(): string;
setData(value: Uint8Array | string): StreamingOpenResp;

getDropped(): number;
setDropped(value: number): StreamingOpenResp;


serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): StreamingOpenResp.AsObject;
Expand All @@ -109,5 +126,6 @@ export class StreamingOpenResp extends jspb.Message {
export namespace StreamingOpenResp {
export type AsObject = {
data: Uint8Array | string,
dropped: number,
}
}
123 changes: 117 additions & 6 deletions arduino-ide-extension/src/node/cli-protocol/monitor/monitor_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
Expand Down Expand Up @@ -93,15 +94,16 @@ if (goog.DEBUG && !COMPILED) {
* @private {!Array<!Array<number>>}
* @const
*/
proto.cc.arduino.cli.monitor.StreamingOpenReq.oneofGroups_ = [[1,2]];
proto.cc.arduino.cli.monitor.StreamingOpenReq.oneofGroups_ = [[1,2,3]];

/**
* @enum {number}
*/
proto.cc.arduino.cli.monitor.StreamingOpenReq.ContentCase = {
CONTENT_NOT_SET: 0,
MONITORCONFIG: 1,
DATA: 2
DATA: 2,
RECV_ACKNOWLEDGE: 3
};

/**
Expand Down Expand Up @@ -143,7 +145,8 @@ proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.toObject = function(opt_
proto.cc.arduino.cli.monitor.StreamingOpenReq.toObject = function(includeInstance, msg) {
var f, obj = {
monitorconfig: (f = msg.getMonitorconfig()) && proto.cc.arduino.cli.monitor.MonitorConfig.toObject(includeInstance, f),
data: msg.getData_asB64()
data: msg.getData_asB64(),
recvAcknowledge: jspb.Message.getFieldWithDefault(msg, 3, 0)
};

if (includeInstance) {
Expand Down Expand Up @@ -189,6 +192,10 @@ proto.cc.arduino.cli.monitor.StreamingOpenReq.deserializeBinaryFromReader = func
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setData(value);
break;
case 3:
var value = /** @type {number} */ (reader.readInt32());
msg.setRecvAcknowledge(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -233,6 +240,13 @@ proto.cc.arduino.cli.monitor.StreamingOpenReq.serializeBinaryToWriter = function
f
);
}
f = /** @type {number} */ (jspb.Message.getField(message, 3));
if (f != null) {
writer.writeInt32(
3,
f
);
}
};


Expand Down Expand Up @@ -333,6 +347,42 @@ proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.hasData = function() {
};


/**
* optional int32 recv_acknowledge = 3;
* @return {number}
*/
proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.getRecvAcknowledge = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};


/**
* @param {number} value
* @return {!proto.cc.arduino.cli.monitor.StreamingOpenReq} returns this
*/
proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.setRecvAcknowledge = function(value) {
return jspb.Message.setOneofField(this, 3, proto.cc.arduino.cli.monitor.StreamingOpenReq.oneofGroups_[0], value);
};


/**
* Clears the field making it undefined.
* @return {!proto.cc.arduino.cli.monitor.StreamingOpenReq} returns this
*/
proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.clearRecvAcknowledge = function() {
return jspb.Message.setOneofField(this, 3, proto.cc.arduino.cli.monitor.StreamingOpenReq.oneofGroups_[0], undefined);
};


/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cc.arduino.cli.monitor.StreamingOpenReq.prototype.hasRecvAcknowledge = function() {
return jspb.Message.getField(this, 3) != null;
};





Expand Down Expand Up @@ -367,7 +417,8 @@ proto.cc.arduino.cli.monitor.MonitorConfig.toObject = function(includeInstance,
var f, obj = {
target: jspb.Message.getFieldWithDefault(msg, 1, ""),
type: jspb.Message.getFieldWithDefault(msg, 2, 0),
additionalconfig: (f = msg.getAdditionalconfig()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f)
additionalconfig: (f = msg.getAdditionalconfig()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
recvRateLimitBuffer: jspb.Message.getFieldWithDefault(msg, 4, 0)
};

if (includeInstance) {
Expand Down Expand Up @@ -417,6 +468,10 @@ proto.cc.arduino.cli.monitor.MonitorConfig.deserializeBinaryFromReader = functio
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
msg.setAdditionalconfig(value);
break;
case 4:
var value = /** @type {number} */ (reader.readInt32());
msg.setRecvRateLimitBuffer(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -468,14 +523,22 @@ proto.cc.arduino.cli.monitor.MonitorConfig.serializeBinaryToWriter = function(me
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
);
}
f = message.getRecvRateLimitBuffer();
if (f !== 0) {
writer.writeInt32(
4,
f
);
}
};


/**
* @enum {number}
*/
proto.cc.arduino.cli.monitor.MonitorConfig.TargetType = {
SERIAL: 0
SERIAL: 0,
NULL: 99
};

/**
Expand Down Expand Up @@ -551,6 +614,24 @@ proto.cc.arduino.cli.monitor.MonitorConfig.prototype.hasAdditionalconfig = funct
};


/**
* optional int32 recv_rate_limit_buffer = 4;
* @return {number}
*/
proto.cc.arduino.cli.monitor.MonitorConfig.prototype.getRecvRateLimitBuffer = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};


/**
* @param {number} value
* @return {!proto.cc.arduino.cli.monitor.MonitorConfig} returns this
*/
proto.cc.arduino.cli.monitor.MonitorConfig.prototype.setRecvRateLimitBuffer = function(value) {
return jspb.Message.setProto3IntField(this, 4, value);
};





Expand Down Expand Up @@ -583,7 +664,8 @@ proto.cc.arduino.cli.monitor.StreamingOpenResp.prototype.toObject = function(opt
*/
proto.cc.arduino.cli.monitor.StreamingOpenResp.toObject = function(includeInstance, msg) {
var f, obj = {
data: msg.getData_asB64()
data: msg.getData_asB64(),
dropped: jspb.Message.getFieldWithDefault(msg, 2, 0)
};

if (includeInstance) {
Expand Down Expand Up @@ -624,6 +706,10 @@ proto.cc.arduino.cli.monitor.StreamingOpenResp.deserializeBinaryFromReader = fun
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setData(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt32());
msg.setDropped(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -660,6 +746,13 @@ proto.cc.arduino.cli.monitor.StreamingOpenResp.serializeBinaryToWriter = functio
f
);
}
f = message.getDropped();
if (f !== 0) {
writer.writeInt32(
2,
f
);
}
};


Expand Down Expand Up @@ -705,4 +798,22 @@ proto.cc.arduino.cli.monitor.StreamingOpenResp.prototype.setData = function(valu
};


/**
* optional int32 dropped = 2;
* @return {number}
*/
proto.cc.arduino.cli.monitor.StreamingOpenResp.prototype.getDropped = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/**
* @param {number} value
* @return {!proto.cc.arduino.cli.monitor.StreamingOpenResp} returns this
*/
proto.cc.arduino.cli.monitor.StreamingOpenResp.prototype.setDropped = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};


goog.object.extend(exports, proto.cc.arduino.cli.monitor);
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
Expand Down