Skip to content

Commit ec6fa29

Browse files
committed
Added sketch name when uploading via Web Serial API Daemon
1 parent d160155 commit ec6fa29

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
# arduino-create-agent-js-client
55
JS module providing discovery of the [Arduino Create Agent](https://github.com/arduino/arduino-create-agent) and communication with it
66

7+
## Changelog
8+
[2.9.1] - 2022-07-14
9+
10+
### Added
11+
- Added the sketch name (as `filename`) when uploading a sketch with the Web Serial API Daemon
12+
713
## Changelog
814
[2.9.0] - 2022-06-06
915

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "arduino-create-agent-js-client",
3-
"version": "2.9.0",
3+
"version": "2.9.1",
44
"description": "JS module providing discovery of the Arduino Create Plugin and communication with it",
55
"main": "lib/index.js",
66
"module": "es/index.js",

src/web-serial-daemon.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,10 @@ export default class WebSerialDaemon extends Daemon {
227227
});
228228
}
229229

230+
/** Probably this function will be removed, the CDC reset operation
231+
* should not be invoked explicitly, but only as part
232+
* of the upload process.
233+
*/
230234
cdcReset({ fqbn, port }) {
231235
this.uploading.next({ status: this.UPLOAD_IN_PROGRESS, msg: 'CDC reset started' });
232236
this.channel.postMessage({
@@ -254,7 +258,7 @@ export default class WebSerialDaemon extends Daemon {
254258
*/
255259
_upload(uploadPayload, uploadCommandInfo) {
256260
const {
257-
board, port, commandline, data, pid, vid
261+
board, port, commandline, data, pid, vid, filename
258262
} = uploadPayload;
259263
const extrafiles = uploadCommandInfo && uploadCommandInfo.files && Array.isArray(uploadCommandInfo.files) ? uploadCommandInfo.files : [];
260264
try {
@@ -264,6 +268,7 @@ export default class WebSerialDaemon extends Daemon {
264268
data: {
265269
board,
266270
port,
271+
filename,
267272
commandline,
268273
data,
269274
token: token.token,

0 commit comments

Comments
 (0)