Skip to content

Commit 0cc287b

Browse files
authored
Support compilation extrafiles on ChromeOS (#541)
Similarly to what has been done in #498, we're adding support to extrafiles compilation on ChromeOS as well.
1 parent 3cd1df3 commit 0cc287b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

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.6.0",
3+
"version": "2.7.0",
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/chrome-app-daemon.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ export default class ChromeOsDaemon extends Daemon {
237237
* data: "compiled sketch"
238238
* }
239239
*/
240-
_upload({
241-
board, port, commandline, data
242-
}) {
240+
_upload(uploadPayload, uploadCommandInfo) {
241+
const { board, port, commandline, data } = uploadPayload;
242+
const extrafiles = uploadCommandInfo && uploadCommandInfo.files && Array.isArray(uploadCommandInfo.files) ? uploadCommandInfo.files : [];
243243
try {
244244
window.oauth.token().then(token => {
245245
this.channel.postMessage({
@@ -249,7 +249,8 @@ export default class ChromeOsDaemon extends Daemon {
249249
port,
250250
commandline,
251251
data,
252-
token: token.token
252+
token: token.token,
253+
extrafiles
253254
}
254255
});
255256
});

0 commit comments

Comments
 (0)