From 91613a9648a3c7175a30cafc409c77324258a635 Mon Sep 17 00:00:00 2001 From: develar Date: Fri, 17 Feb 2017 18:00:51 +0100 Subject: [PATCH] feat(electron-updater): abort download Close #1150 --- .babelrc | 4 +- .idea/dictionaries/develar.xml | 1 + .idea/runConfigurations/compile.xml | 12 --- .idea/runConfigurations/lint.xml | 12 --- .idea/runConfigurations/test.xml | 12 --- package.json | 8 +- packages/electron-builder-http/package.json | 2 +- .../src/CancellationToken.ts | 89 +++++++++++++++++-- .../electron-builder-http/src/httpExecutor.ts | 29 +++--- .../electron-builder-publisher/package.json | 4 +- .../src/BintrayPublisher.ts | 2 +- .../src/gitHubPublisher.ts | 2 +- .../package.json | 4 +- .../src/squirrelPack.ts | 12 +-- packages/electron-builder-util/package.json | 4 +- .../electron-builder-util/src/binDownload.ts | 8 +- packages/electron-builder-util/src/fs.ts | 8 +- packages/electron-builder-util/src/log.ts | 4 +- .../src/nodeHttpExecutor.ts | 33 ++++--- packages/electron-builder-util/src/promise.ts | 2 +- packages/electron-builder-util/src/tmp.ts | 6 +- packages/electron-builder-util/src/util.ts | 14 +-- packages/electron-builder/package.json | 4 +- packages/electron-builder/src/asarUtil.ts | 10 +-- packages/electron-builder/src/builder.ts | 17 ++-- .../src/cli/install-app-deps.ts | 4 +- packages/electron-builder/src/codeSign.ts | 16 ++-- packages/electron-builder/src/fileMatcher.ts | 2 +- packages/electron-builder/src/macPackager.ts | 23 +++-- packages/electron-builder/src/packager.ts | 6 +- .../src/packager/dirPackager.ts | 12 +-- packages/electron-builder/src/packager/mac.ts | 14 +-- .../electron-builder/src/platformPackager.ts | 2 +- .../src/publish/PublishManager.ts | 20 ++--- .../electron-builder/src/readInstalled.ts | 4 +- .../electron-builder/src/repositoryInfo.ts | 6 +- .../src/targets/LinuxTargetHelper.ts | 8 +- .../electron-builder/src/targets/appImage.ts | 14 +-- packages/electron-builder/src/targets/appx.ts | 17 ++-- packages/electron-builder/src/targets/dmg.ts | 16 ++-- packages/electron-builder/src/targets/fpm.ts | 19 ++-- packages/electron-builder/src/targets/nsis.ts | 24 ++--- packages/electron-builder/src/targets/pkg.ts | 12 +-- packages/electron-builder/src/winPackager.ts | 20 ++--- packages/electron-builder/src/yarn.ts | 10 +-- packages/electron-publisher-s3/package.json | 6 +- .../electron-publisher-s3/src/s3Publisher.ts | 15 ++-- packages/electron-updater/package.json | 4 +- packages/electron-updater/src/AppUpdater.ts | 27 +++--- packages/electron-updater/src/MacUpdater.ts | 7 +- packages/electron-updater/src/NsisUpdater.ts | 20 +++-- packages/electron-updater/src/api.ts | 11 ++- .../src/electronHttpExecutor.ts | 21 +++-- test/src/BuildTest.ts | 27 ++---- test/src/filesTest.ts | 19 ++-- test/src/globTest.ts | 10 +-- test/src/helpers/checkDeps.ts | 8 +- test/src/helpers/lint.ts | 4 +- test/src/helpers/runTests.ts | 12 +-- test/src/helpers/setVersions.ts | 4 +- test/src/helpers/winHelper.ts | 12 +-- test/src/helpers/wine.ts | 6 +- test/src/ignoreTest.ts | 6 +- test/src/mac/dmgTest.ts | 10 +-- test/src/mac/macArchiveTest.ts | 8 +- test/src/mac/macPackagerTest.ts | 2 +- test/src/mac/masTest.ts | 6 +- test/src/mainEntryTest.ts | 4 +- test/src/nsisUpdaterTest.ts | 37 +++++++- test/src/windows/oneClickInstallerTest.ts | 2 +- test/src/windows/squirrelWindowsTest.ts | 6 +- test/tsconfig.json | 2 +- yarn.lock | 64 +++++++------ 73 files changed, 495 insertions(+), 417 deletions(-) delete mode 100644 .idea/runConfigurations/compile.xml delete mode 100644 .idea/runConfigurations/lint.xml delete mode 100644 .idea/runConfigurations/test.xml diff --git a/.babelrc b/.babelrc index 5c5ae7d7630..31b9cb9b12a 100644 --- a/.babelrc +++ b/.babelrc @@ -5,7 +5,7 @@ [ "transform-async-to-module-method", { - module: "bluebird-lst-c", + module: "bluebird-lst", method: "coroutine" } ], @@ -27,7 +27,7 @@ [ "transform-async-to-module-method", { - module: "bluebird-lst-c", + module: "bluebird-lst", method: "coroutine" } ], diff --git a/.idea/dictionaries/develar.xml b/.idea/dictionaries/develar.xml index c0ee933945b..6ffe85588d2 100644 --- a/.idea/dictionaries/develar.xml +++ b/.idea/dictionaries/develar.xml @@ -181,6 +181,7 @@ srcfolder templating testapp + thenable timestamping tsconfig udbz diff --git a/.idea/runConfigurations/compile.xml b/.idea/runConfigurations/compile.xml deleted file mode 100644 index a6468b5ef66..00000000000 --- a/.idea/runConfigurations/compile.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - -