From 9a0f8471050c4cbf91d86de4839a7235d4d430b3 Mon Sep 17 00:00:00 2001 From: Alberto Iannaccone Date: Thu, 12 Jul 2018 18:22:52 +0200 Subject: [PATCH 1/2] 1.0.3 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 896daedb..672b62b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "arduino-create-agent-js-client", - "version": "1.0.2", + "version": "1.0.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 4a1f4d1f..72bb75c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "arduino-create-agent-js-client", - "version": "1.0.2", + "version": "1.0.3", "description": "JS module providing discovery of the Arduino Create Plugin and communication with it", "main": "./src/index.js", "module": "es/index.js", From a2e4f576ffd74eee9ab8a0a5ff9e371b9d050dac Mon Sep 17 00:00:00 2001 From: Alberto Iannaccone Date: Thu, 12 Jul 2018 19:24:28 +0200 Subject: [PATCH 2/2] init upload before subscribing --- src/boardConfiguration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/boardConfiguration.js b/src/boardConfiguration.js index 9d580a9a..6b29aab5 100644 --- a/src/boardConfiguration.js +++ b/src/boardConfiguration.js @@ -165,6 +165,7 @@ export default class BoardConfiguration { * @param {function} createDeviceCb used to create the device associated to the user */ configure(compiledSketch, board, createDeviceCb) { + this.daemon.initUpload(); this.configuring.next({ status: this.CONFIGURE_IN_PROGRESS, msg: 'Uploading provisioning sketch...' }); if (!this.daemon.channelOpen.getValue()) { const errorMessage = `Couldn't configure board at port ${board.port} because we there is no open channel to the Arduino Create Plugin.`; @@ -236,7 +237,6 @@ export default class BoardConfiguration { this.configuring.next({ status: this.CONFIGURE_ERROR, err: `Couldn't configure board at port ${board.port}. Upload failed with error: ${upload.err}` }); }); - this.daemon.initUpload(); this.uploadSketch(compiledSketch, board); } }