From bb4966dca7bf8051ecf58c60f50206abd72ae063 Mon Sep 17 00:00:00 2001 From: Guillaume Jenkins Date: Thu, 14 Jun 2018 13:33:53 -0400 Subject: [PATCH] Bump pxt-core to 3.19.4 + Support drive deploy in Electron offline app (#677) * initial * Bump pxt-core to 3.19.4 for drive deploy --- editor/deploy.ts | 10 ++++++---- package.json | 2 +- pxtarget.json | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/editor/deploy.ts b/editor/deploy.ts index b029790c..bf6a5673 100644 --- a/editor/deploy.ts +++ b/editor/deploy.ts @@ -98,11 +98,13 @@ export function deployCoreAsync(resp: pxtc.CompileResult, isCli = false) { resp.outfiles[pxtc.BINARY_UF2] = btoa(data) let saveUF2Async = () => { - if (isCli || !pxt.commands.saveOnlyAsync) { - return Promise.resolve() - } else { - return pxt.commands.saveOnlyAsync(resp) + if (pxt.commands.electronDeployAsync) { + return pxt.commands.electronDeployAsync(resp); } + if (!isCli && pxt.commands.saveOnlyAsync) { + return pxt.commands.saveOnlyAsync(resp); + } + return Promise.resolve(); } if (noHID) return saveUF2Async() diff --git a/package.json b/package.json index d2c39930..da5bfc25 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ }, "dependencies": { "pxt-common-packages": "0.23.15", - "pxt-core": "3.18.17" + "pxt-core": "3.19.4" }, "scripts": { "test": "node node_modules/pxt-core/built/pxt.js travis" diff --git a/pxtarget.json b/pxtarget.json index 3f951744..80438199 100644 --- a/pxtarget.json +++ b/pxtarget.json @@ -42,7 +42,7 @@ "useUF2": true, "useELF": true, "hasHex": true, - "deployDrives": ".*", + "deployDrives": "EV3", "deployFileMarker": "INFO_UF2.TXT", "driveName": "EV3", "flashCodeAlign": 256,