zjinh преди 7 години
родител
ревизия
42bddc7d99
променени са 100 файла, в които са добавени 1220 реда и са изтрити 2172 реда
  1. 1 0
      resources/app/browser.html
  2. 0 15
      resources/app/node_modules/.bin/esparse
  3. 0 7
      resources/app/node_modules/.bin/esparse.cmd
  4. 0 15
      resources/app/node_modules/.bin/esvalidate
  5. 0 7
      resources/app/node_modules/.bin/esvalidate.cmd
  6. 0 15
      resources/app/node_modules/.bin/js-yaml
  7. 0 7
      resources/app/node_modules/.bin/js-yaml.cmd
  8. 20 59
      resources/app/node_modules/argparse/package.json
  9. 9 47
      resources/app/node_modules/bluebird-lst/package.json
  10. 1 1
      resources/app/node_modules/bluebird/LICENSE
  11. 5 0
      resources/app/node_modules/bluebird/README.md
  12. 41 17
      resources/app/node_modules/bluebird/js/browser/bluebird.core.js
  13. 4 4
      resources/app/node_modules/bluebird/js/browser/bluebird.core.min.js
  14. 41 17
      resources/app/node_modules/bluebird/js/browser/bluebird.js
  15. 5 5
      resources/app/node_modules/bluebird/js/browser/bluebird.min.js
  16. 13 9
      resources/app/node_modules/bluebird/js/release/async.js
  17. 17 2
      resources/app/node_modules/bluebird/js/release/debuggability.js
  18. 2 1
      resources/app/node_modules/bluebird/js/release/promise.js
  19. 6 2
      resources/app/node_modules/bluebird/js/release/util.js
  20. 40 67
      resources/app/node_modules/bluebird/package.json
  21. 9 42
      resources/app/node_modules/buffer-from/package.json
  22. 0 12
      resources/app/node_modules/buffer-from/test.js
  23. 2 2
      resources/app/node_modules/builder-util-runtime/out/CancellationToken.d.ts
  24. 1 1
      resources/app/node_modules/builder-util-runtime/out/CancellationToken.js
  25. 1 1
      resources/app/node_modules/builder-util-runtime/out/CancellationToken.js.map
  26. 1 1
      resources/app/node_modules/builder-util-runtime/out/ProgressCallbackTransform.js.map
  27. 1 1
      resources/app/node_modules/builder-util-runtime/out/bintray.d.ts
  28. 1 1
      resources/app/node_modules/builder-util-runtime/out/bintray.js.map
  29. 0 1
      resources/app/node_modules/builder-util-runtime/out/blockMapApi.d.ts
  30. 1 4
      resources/app/node_modules/builder-util-runtime/out/blockMapApi.js
  31. 1 1
      resources/app/node_modules/builder-util-runtime/out/blockMapApi.js.map
  32. 1 1
      resources/app/node_modules/builder-util-runtime/out/httpExecutor.d.ts
  33. 28 6
      resources/app/node_modules/builder-util-runtime/out/httpExecutor.js
  34. 1 1
      resources/app/node_modules/builder-util-runtime/out/httpExecutor.js.map
  35. 3 0
      resources/app/node_modules/builder-util-runtime/out/index.d.ts
  36. 8 0
      resources/app/node_modules/builder-util-runtime/out/index.js
  37. 1 1
      resources/app/node_modules/builder-util-runtime/out/index.js.map
  38. 1 1
      resources/app/node_modules/builder-util-runtime/out/publishOptions.d.ts
  39. 23 21
      resources/app/node_modules/builder-util-runtime/out/publishOptions.js
  40. 1 1
      resources/app/node_modules/builder-util-runtime/out/publishOptions.js.map
  41. 1 1
      resources/app/node_modules/builder-util-runtime/out/rfc2253Parser.js.map
  42. 1 1
      resources/app/node_modules/builder-util-runtime/out/updateInfo.js.map
  43. 1 8
      resources/app/node_modules/builder-util-runtime/out/uuid.d.ts
  44. 2 11
      resources/app/node_modules/builder-util-runtime/out/uuid.js
  45. 1 1
      resources/app/node_modules/builder-util-runtime/out/uuid.js.map
  46. 1 1
      resources/app/node_modules/builder-util-runtime/out/xml.js.map
  47. 15 51
      resources/app/node_modules/builder-util-runtime/package.json
  48. 12 45
      resources/app/node_modules/core-util-is/package.json
  49. 0 3
      resources/app/node_modules/debug/.eslintrc
  50. 4 10
      resources/app/node_modules/debug/.travis.yml
  51. 1 34
      resources/app/node_modules/debug/CHANGELOG.md
  52. 18 26
      resources/app/node_modules/debug/Makefile
  53. 62 118
      resources/app/node_modules/debug/README.md
  54. 22 58
      resources/app/node_modules/debug/package.json
  55. 6 16
      resources/app/node_modules/debug/src/browser.js
  56. 7 30
      resources/app/node_modules/debug/src/debug.js
  57. 1 1
      resources/app/node_modules/debug/src/index.js
  58. 93 31
      resources/app/node_modules/debug/src/node.js
  59. 9 44
      resources/app/node_modules/electron-is-dev/package.json
  60. 55 0
      resources/app/node_modules/electron-updater/CHANGELOG.md
  61. 4 4
      resources/app/node_modules/electron-updater/README.md
  62. 3 2
      resources/app/node_modules/electron-updater/out/AppImageUpdater.d.ts
  63. 10 16
      resources/app/node_modules/electron-updater/out/AppImageUpdater.js
  64. 1 1
      resources/app/node_modules/electron-updater/out/AppImageUpdater.js.map
  65. 33 18
      resources/app/node_modules/electron-updater/out/AppUpdater.d.ts
  66. 246 66
      resources/app/node_modules/electron-updater/out/AppUpdater.js
  67. 1 1
      resources/app/node_modules/electron-updater/out/AppUpdater.js.map
  68. 2 10
      resources/app/node_modules/electron-updater/out/BaseUpdater.d.ts
  69. 9 105
      resources/app/node_modules/electron-updater/out/BaseUpdater.js
  70. 1 1
      resources/app/node_modules/electron-updater/out/BaseUpdater.js.map
  71. 0 10
      resources/app/node_modules/electron-updater/out/BintrayProvider.d.ts
  72. 0 112
      resources/app/node_modules/electron-updater/out/BintrayProvider.js
  73. 0 1
      resources/app/node_modules/electron-updater/out/BintrayProvider.js.map
  74. 5 3
      resources/app/node_modules/electron-updater/out/DownloadedUpdateHelper.d.ts
  75. 89 15
      resources/app/node_modules/electron-updater/out/DownloadedUpdateHelper.js
  76. 1 1
      resources/app/node_modules/electron-updater/out/DownloadedUpdateHelper.js.map
  77. 0 12
      resources/app/node_modules/electron-updater/out/GenericProvider.d.ts
  78. 0 106
      resources/app/node_modules/electron-updater/out/GenericProvider.js
  79. 0 1
      resources/app/node_modules/electron-updater/out/GenericProvider.js.map
  80. 0 22
      resources/app/node_modules/electron-updater/out/GitHubProvider.d.ts
  81. 0 239
      resources/app/node_modules/electron-updater/out/GitHubProvider.js
  82. 0 1
      resources/app/node_modules/electron-updater/out/GitHubProvider.js.map
  83. 4 4
      resources/app/node_modules/electron-updater/out/MacUpdater.d.ts
  84. 92 98
      resources/app/node_modules/electron-updater/out/MacUpdater.js
  85. 1 1
      resources/app/node_modules/electron-updater/out/MacUpdater.js.map
  86. 6 5
      resources/app/node_modules/electron-updater/out/NsisUpdater.d.ts
  87. 55 34
      resources/app/node_modules/electron-updater/out/NsisUpdater.js
  88. 1 1
      resources/app/node_modules/electron-updater/out/NsisUpdater.js.map
  89. 0 24
      resources/app/node_modules/electron-updater/out/PrivateGitHubProvider.d.ts
  90. 0 172
      resources/app/node_modules/electron-updater/out/PrivateGitHubProvider.js
  91. 0 1
      resources/app/node_modules/electron-updater/out/PrivateGitHubProvider.js.map
  92. 0 21
      resources/app/node_modules/electron-updater/out/Provider.d.ts
  93. 0 159
      resources/app/node_modules/electron-updater/out/Provider.js
  94. 0 1
      resources/app/node_modules/electron-updater/out/Provider.js.map
  95. 6 6
      resources/app/node_modules/electron-updater/out/differentialDownloader/DataSplitter.d.ts
  96. 1 1
      resources/app/node_modules/electron-updater/out/differentialDownloader/DataSplitter.js.map
  97. 3 2
      resources/app/node_modules/electron-updater/out/differentialDownloader/DifferentialDownloader.d.ts
  98. 43 8
      resources/app/node_modules/electron-updater/out/differentialDownloader/DifferentialDownloader.js
  99. 1 1
      resources/app/node_modules/electron-updater/out/differentialDownloader/DifferentialDownloader.js.map
  100. 0 0
      resources/app/node_modules/electron-updater/out/differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader.js.map

+ 1 - 0
resources/app/browser.html

@@ -58,6 +58,7 @@
 
 <ul id="US_BookmarkSet" class="US_BookmarkSet">
     <li id="DelectBookmark">删除书签</li>
+    <li id="OpenBookmark">在新的标签页打开</li>
     <!--<li class="MouseMenuMainStep"></li>-->
 </ul>
 

+ 0 - 15
resources/app/node_modules/.bin/esparse

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/../esprima/bin/esparse.js" "$@"
-  ret=$?
-else 
-  node  "$basedir/../esprima/bin/esparse.js" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
resources/app/node_modules/.bin/esparse.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\..\esprima\bin\esparse.js" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\..\esprima\bin\esparse.js" %*
-)

+ 0 - 15
resources/app/node_modules/.bin/esvalidate

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/../esprima/bin/esvalidate.js" "$@"
-  ret=$?
-else 
-  node  "$basedir/../esprima/bin/esvalidate.js" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
resources/app/node_modules/.bin/esvalidate.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\..\esprima\bin\esvalidate.js" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\..\esprima\bin\esvalidate.js" %*
-)

+ 0 - 15
resources/app/node_modules/.bin/js-yaml

@@ -1,15 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  "$basedir/node"  "$basedir/../js-yaml/bin/js-yaml.js" "$@"
-  ret=$?
-else 
-  node  "$basedir/../js-yaml/bin/js-yaml.js" "$@"
-  ret=$?
-fi
-exit $ret

+ 0 - 7
resources/app/node_modules/.bin/js-yaml.cmd

@@ -1,7 +0,0 @@
-@IF EXIST "%~dp0\node.exe" (
-  "%~dp0\node.exe"  "%~dp0\..\js-yaml\bin\js-yaml.js" %*
-) ELSE (
-  @SETLOCAL
-  @SET PATHEXT=%PATHEXT:;.JS;=;%
-  node  "%~dp0\..\js-yaml\bin\js-yaml.js" %*
-)

+ 20 - 59
resources/app/node_modules/argparse/package.json

@@ -1,58 +1,7 @@
 {
-  "_args": [
-    [
-      "argparse@1.0.10",
-      "E:\\Client-Project\\UseStudio.CampusInfo\\resources\\app"
-    ]
-  ],
-  "_from": "argparse@1.0.10",
-  "_id": "argparse@1.0.10",
-  "_inBundle": false,
-  "_integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=",
-  "_location": "/argparse",
-  "_phantomChildren": {},
-  "_requested": {
-    "type": "version",
-    "registry": true,
-    "raw": "argparse@1.0.10",
-    "name": "argparse",
-    "escapedName": "argparse",
-    "rawSpec": "1.0.10",
-    "saveSpec": null,
-    "fetchSpec": "1.0.10"
-  },
-  "_requiredBy": [
-    "/js-yaml"
-  ],
-  "_resolved": "http://registry.npm.taobao.org/argparse/download/argparse-1.0.10.tgz",
-  "_spec": "1.0.10",
-  "_where": "E:\\Client-Project\\UseStudio.CampusInfo\\resources\\app",
-  "bugs": {
-    "url": "https://github.com/nodeca/argparse/issues"
-  },
-  "contributors": [
-    {
-      "name": "Eugene Shkuropat"
-    },
-    {
-      "name": "Paul Jacobson"
-    }
-  ],
-  "dependencies": {
-    "sprintf-js": "~1.0.2"
-  },
+  "name": "argparse",
   "description": "Very powerful CLI arguments parser. Native port of argparse - python's options parsing library",
-  "devDependencies": {
-    "eslint": "^2.13.1",
-    "istanbul": "^0.4.5",
-    "mocha": "^3.1.0",
-    "ndoc": "^5.0.1"
-  },
-  "files": [
-    "index.js",
-    "lib/"
-  ],
-  "homepage": "https://github.com/nodeca/argparse#readme",
+  "version": "1.0.10",
   "keywords": [
     "cli",
     "parser",
@@ -60,14 +9,26 @@
     "option",
     "args"
   ],
+  "contributors": [
+    "Eugene Shkuropat",
+    "Paul Jacobson"
+  ],
+  "files": [
+    "index.js",
+    "lib/"
+  ],
   "license": "MIT",
-  "name": "argparse",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/nodeca/argparse.git"
-  },
+  "repository": "nodeca/argparse",
   "scripts": {
     "test": "make test"
   },
-  "version": "1.0.10"
+  "dependencies": {
+    "sprintf-js": "~1.0.2"
+  },
+  "devDependencies": {
+    "eslint": "^2.13.1",
+    "istanbul": "^0.4.5",
+    "mocha": "^3.1.0",
+    "ndoc": "^5.0.1"
+  }
 }

+ 9 - 47
resources/app/node_modules/bluebird-lst/package.json

@@ -1,54 +1,16 @@
 {
-  "_args": [
-    [
-      "bluebird-lst@1.0.5",
-      "E:\\Client-Project\\UseStudio.CampusInfo\\resources\\app"
-    ]
-  ],
-  "_from": "bluebird-lst@1.0.5",
-  "_id": "bluebird-lst@1.0.5",
-  "_inBundle": false,
-  "_integrity": "sha1-vryDAmt+kqcocaPcWZ4hnL+wAqk=",
-  "_location": "/bluebird-lst",
-  "_phantomChildren": {},
-  "_requested": {
-    "type": "version",
-    "registry": true,
-    "raw": "bluebird-lst@1.0.5",
-    "name": "bluebird-lst",
-    "escapedName": "bluebird-lst",
-    "rawSpec": "1.0.5",
-    "saveSpec": null,
-    "fetchSpec": "1.0.5"
-  },
-  "_requiredBy": [
-    "/builder-util-runtime",
-    "/electron-updater",
-    "/fs-extra-p"
-  ],
-  "_resolved": "http://registry.npm.taobao.org/bluebird-lst/download/bluebird-lst-1.0.5.tgz",
-  "_spec": "1.0.5",
-  "_where": "E:\\Client-Project\\UseStudio.CampusInfo\\resources\\app",
-  "author": {
-    "name": "Vladimir Krivosheev"
-  },
-  "bugs": {
-    "url": "https://github.com/develar/fs-extra-p/issues"
-  },
-  "dependencies": {
-    "bluebird": "^3.5.1"
-  },
+  "name": "bluebird-lst",
+  "version": "1.0.5",
   "description": "Bluebird — longStackTraces: true, cancellation: true",
+  "author": "Vladimir Krivosheev",
+  "license": "MIT",
+  "repository": "develar/fs-extra-p",
+  "homepage": "https://github.com/develar/fs-extra-p",
   "files": [
     "index.*"
   ],
-  "homepage": "https://github.com/develar/fs-extra-p",
-  "license": "MIT",
-  "name": "bluebird-lst",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/develar/fs-extra-p.git"
+  "dependencies": {
+    "bluebird": "^3.5.1"
   },
-  "typings": "./index.d.ts",
-  "version": "1.0.5"
+  "typings": "./index.d.ts"
 }

+ 1 - 1
resources/app/node_modules/bluebird/LICENSE

@@ -1,6 +1,6 @@
 The MIT License (MIT)
 
-Copyright (c) 2013-2017 Petka Antonov
+Copyright (c) 2013-2018 Petka Antonov
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

+ 5 - 0
resources/app/node_modules/bluebird/README.md

@@ -3,6 +3,7 @@
          title="Promises/A+ 1.1 compliant" align="right" />
 </a>
 
+
 [![Build Status](https://travis-ci.org/petkaantonov/bluebird.svg?branch=master)](https://travis-ci.org/petkaantonov/bluebird)
 [![coverage-98%](https://img.shields.io/badge/coverage-98%25-brightgreen.svg?style=flat)](http://petkaantonov.github.io/bluebird/coverage/debug/index.html)
 
@@ -16,6 +17,10 @@ See the [**bluebird website**](http://bluebirdjs.com/docs/getting-started.html)
 
 For bluebird 2.x documentation and files, see the [2.x tree](https://github.com/petkaantonov/bluebird/tree/2.x).
 
+### Note 
+
+Promises in Node.js 10 are significantly faster than before. Bluebird still includes a lot of features like cancellation, iteration methods and warnings that native promises don't. If you are using Bluebird for performance rather than for those - please consider giving native promises a shot and running the benchmarks yourself.
+
 # Questions and issues
 
 The [github issue tracker](https://github.com/petkaantonov/bluebird/issues) is **_only_** for bug reports and feature requests. Anything else, such as questions for help in using the library, should be posted in [StackOverflow](http://stackoverflow.com/questions/tagged/bluebird) under tags `promise` and `bluebird`.

+ 41 - 17
resources/app/node_modules/bluebird/js/browser/bluebird.core.js

@@ -1,7 +1,7 @@
 /* @preserve
  * The MIT License (MIT)
  * 
- * Copyright (c) 2013-2017 Petka Antonov
+ * Copyright (c) 2013-2018 Petka Antonov
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -23,7 +23,7 @@
  * 
  */
 /**
- * bluebird build version 3.5.1
+ * bluebird build version 3.5.2
  * Features enabled: core
  * Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each
 */
@@ -156,24 +156,28 @@ if (!util.hasDevTools) {
     };
 }
 
-Async.prototype._drainQueue = function(queue) {
+function _drainQueue(queue) {
     while (queue.length() > 0) {
-        var fn = queue.shift();
-        if (typeof fn !== "function") {
-            fn._settlePromises();
-            continue;
-        }
+        _drainQueueStep(queue);
+    }
+}
+
+function _drainQueueStep(queue) {
+    var fn = queue.shift();
+    if (typeof fn !== "function") {
+        fn._settlePromises();
+    } else {
         var receiver = queue.shift();
         var arg = queue.shift();
         fn.call(receiver, arg);
     }
-};
+}
 
 Async.prototype._drainQueues = function () {
-    this._drainQueue(this._normalQueue);
+    _drainQueue(this._normalQueue);
     this._reset();
     this._haveDrainedQueues = true;
-    this._drainQueue(this._lateQueue);
+    _drainQueue(this._lateQueue);
 };
 
 Async.prototype._queueTick = function () {
@@ -525,6 +529,7 @@ var getDomain = Promise._getDomain;
 var async = Promise._async;
 var Warning = _dereq_("./errors").Warning;
 var util = _dereq_("./util");
+var es5 = _dereq_("./es5");
 var canAttachTrace = util.canAttachTrace;
 var unhandledRejectionHandled;
 var possiblyUnhandledRejection;
@@ -643,6 +648,7 @@ Promise.longStackTraces = function () {
     if (!config.longStackTraces && longStackTracesIsSupported()) {
         var Promise_captureStackTrace = Promise.prototype._captureStackTrace;
         var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace;
+        var Promise_dereferenceTrace = Promise.prototype._dereferenceTrace;
         config.longStackTraces = true;
         disableLongStackTraces = function() {
             if (async.haveItemsQueued() && !config.longStackTraces) {
@@ -650,12 +656,14 @@ Promise.longStackTraces = function () {
             }
             Promise.prototype._captureStackTrace = Promise_captureStackTrace;
             Promise.prototype._attachExtraTrace = Promise_attachExtraTrace;
+            Promise.prototype._dereferenceTrace = Promise_dereferenceTrace;
             Context.deactivateLongStackTraces();
             async.enableTrampoline();
             config.longStackTraces = false;
         };
         Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace;
         Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace;
+        Promise.prototype._dereferenceTrace = longStackTracesDereferenceTrace;
         Context.activateLongStackTraces();
         async.disableTrampolineIfNecessary();
     }
@@ -671,10 +679,14 @@ var fireDomEvent = (function() {
             var event = new CustomEvent("CustomEvent");
             util.global.dispatchEvent(event);
             return function(name, event) {
-                var domEvent = new CustomEvent(name.toLowerCase(), {
+                var eventData = {
                     detail: event,
                     cancelable: true
-                });
+                };
+                es5.defineProperty(
+                    eventData, "promise", {value: event.promise});
+                es5.defineProperty(eventData, "reason", {value: event.reason});
+                var domEvent = new CustomEvent(name.toLowerCase(), eventData);
                 return !util.global.dispatchEvent(domEvent);
             };
         } else if (typeof Event === "function") {
@@ -685,6 +697,8 @@ var fireDomEvent = (function() {
                     cancelable: true
                 });
                 domEvent.detail = event;
+                es5.defineProperty(domEvent, "promise", {value: event.promise});
+                es5.defineProperty(domEvent, "reason", {value: event.reason});
                 return !util.global.dispatchEvent(domEvent);
             };
         } else {
@@ -833,6 +847,7 @@ Promise.prototype._attachCancellationCallback = function(onCancel) {
 };
 Promise.prototype._captureStackTrace = function () {};
 Promise.prototype._attachExtraTrace = function () {};
+Promise.prototype._dereferenceTrace = function () {};
 Promise.prototype._clearCancellationData = function() {};
 Promise.prototype._propagateFrom = function (parent, flags) {
     ;
@@ -938,6 +953,10 @@ function longStackTracesAttachExtraTrace(error, ignoreSelf) {
     }
 }
 
+function longStackTracesDereferenceTrace() {
+    this._trace = undefined;
+}
+
 function checkForgottenReturns(returnValue, promiseCreated, name, promise,
                                parent) {
     if (returnValue === undefined && promiseCreated !== null &&
@@ -1439,7 +1458,7 @@ return {
 };
 };
 
-},{"./errors":9,"./util":21}],8:[function(_dereq_,module,exports){
+},{"./errors":9,"./es5":10,"./util":21}],8:[function(_dereq_,module,exports){
 "use strict";
 module.exports = function(Promise) {
 function returner() {
@@ -2757,6 +2776,7 @@ Promise.prototype._fulfill = function (value) {
         } else {
             async.settlePromises(this);
         }
+        this._dereferenceTrace();
     }
 };
 
@@ -2851,7 +2871,7 @@ _dereq_("./synchronous_inspection")(Promise);
 _dereq_("./join")(
     Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain);
 Promise.Promise = Promise;
-Promise.version = "3.5.1";
+Promise.version = "3.5.2";
                                                          
     util.toFastProperties(Promise);                                          
     util.toFastProperties(Promise.prototype);                                
@@ -3593,8 +3613,12 @@ function toFastProperties(obj) {
     /*jshint -W027,-W055,-W031*/
     function FakeConstructor() {}
     FakeConstructor.prototype = obj;
-    var l = 8;
-    while (l--) new FakeConstructor();
+    var receiver = new FakeConstructor();
+    function ic() {
+        return typeof receiver.foo;
+    }
+    ic();
+    ic();
     return obj;
     eval(obj);
 }

Файловите разлики са ограничени, защото са твърде много
+ 4 - 4
resources/app/node_modules/bluebird/js/browser/bluebird.core.min.js


Файловите разлики са ограничени, защото са твърде много
+ 41 - 17
resources/app/node_modules/bluebird/js/browser/bluebird.js


Файловите разлики са ограничени, защото са твърде много
+ 5 - 5
resources/app/node_modules/bluebird/js/browser/bluebird.min.js


+ 13 - 9
resources/app/node_modules/bluebird/js/release/async.js

@@ -126,24 +126,28 @@ if (!util.hasDevTools) {
     };
 }
 
-Async.prototype._drainQueue = function(queue) {
+function _drainQueue(queue) {
     while (queue.length() > 0) {
-        var fn = queue.shift();
-        if (typeof fn !== "function") {
-            fn._settlePromises();
-            continue;
-        }
+        _drainQueueStep(queue);
+    }
+}
+
+function _drainQueueStep(queue) {
+    var fn = queue.shift();
+    if (typeof fn !== "function") {
+        fn._settlePromises();
+    } else {
         var receiver = queue.shift();
         var arg = queue.shift();
         fn.call(receiver, arg);
     }
-};
+}
 
 Async.prototype._drainQueues = function () {
-    this._drainQueue(this._normalQueue);
+    _drainQueue(this._normalQueue);
     this._reset();
     this._haveDrainedQueues = true;
-    this._drainQueue(this._lateQueue);
+    _drainQueue(this._lateQueue);
 };
 
 Async.prototype._queueTick = function () {

+ 17 - 2
resources/app/node_modules/bluebird/js/release/debuggability.js

@@ -4,6 +4,7 @@ var getDomain = Promise._getDomain;
 var async = Promise._async;
 var Warning = require("./errors").Warning;
 var util = require("./util");
+var es5 = require("./es5");
 var canAttachTrace = util.canAttachTrace;
 var unhandledRejectionHandled;
 var possiblyUnhandledRejection;
@@ -122,6 +123,7 @@ Promise.longStackTraces = function () {
     if (!config.longStackTraces && longStackTracesIsSupported()) {
         var Promise_captureStackTrace = Promise.prototype._captureStackTrace;
         var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace;
+        var Promise_dereferenceTrace = Promise.prototype._dereferenceTrace;
         config.longStackTraces = true;
         disableLongStackTraces = function() {
             if (async.haveItemsQueued() && !config.longStackTraces) {
@@ -129,12 +131,14 @@ Promise.longStackTraces = function () {
             }
             Promise.prototype._captureStackTrace = Promise_captureStackTrace;
             Promise.prototype._attachExtraTrace = Promise_attachExtraTrace;
+            Promise.prototype._dereferenceTrace = Promise_dereferenceTrace;
             Context.deactivateLongStackTraces();
             async.enableTrampoline();
             config.longStackTraces = false;
         };
         Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace;
         Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace;
+        Promise.prototype._dereferenceTrace = longStackTracesDereferenceTrace;
         Context.activateLongStackTraces();
         async.disableTrampolineIfNecessary();
     }
@@ -150,10 +154,14 @@ var fireDomEvent = (function() {
             var event = new CustomEvent("CustomEvent");
             util.global.dispatchEvent(event);
             return function(name, event) {
-                var domEvent = new CustomEvent(name.toLowerCase(), {
+                var eventData = {
                     detail: event,
                     cancelable: true
-                });
+                };
+                es5.defineProperty(
+                    eventData, "promise", {value: event.promise});
+                es5.defineProperty(eventData, "reason", {value: event.reason});
+                var domEvent = new CustomEvent(name.toLowerCase(), eventData);
                 return !util.global.dispatchEvent(domEvent);
             };
         } else if (typeof Event === "function") {
@@ -164,6 +172,8 @@ var fireDomEvent = (function() {
                     cancelable: true
                 });
                 domEvent.detail = event;
+                es5.defineProperty(domEvent, "promise", {value: event.promise});
+                es5.defineProperty(domEvent, "reason", {value: event.reason});
                 return !util.global.dispatchEvent(domEvent);
             };
         } else {
@@ -312,6 +322,7 @@ Promise.prototype._attachCancellationCallback = function(onCancel) {
 };
 Promise.prototype._captureStackTrace = function () {};
 Promise.prototype._attachExtraTrace = function () {};
+Promise.prototype._dereferenceTrace = function () {};
 Promise.prototype._clearCancellationData = function() {};
 Promise.prototype._propagateFrom = function (parent, flags) {
     ;
@@ -417,6 +428,10 @@ function longStackTracesAttachExtraTrace(error, ignoreSelf) {
     }
 }
 
+function longStackTracesDereferenceTrace() {
+    this._trace = undefined;
+}
+
 function checkForgottenReturns(returnValue, promiseCreated, name, promise,
                                parent) {
     if (returnValue === undefined && promiseCreated !== null &&

+ 2 - 1
resources/app/node_modules/bluebird/js/release/promise.js

@@ -639,6 +639,7 @@ Promise.prototype._fulfill = function (value) {
         } else {
             async.settlePromises(this);
         }
+        this._dereferenceTrace();
     }
 };
 
@@ -733,7 +734,7 @@ require("./synchronous_inspection")(Promise);
 require("./join")(
     Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain);
 Promise.Promise = Promise;
-Promise.version = "3.5.1";
+Promise.version = "3.5.2";
 require('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);
 require('./call_get.js')(Promise);
 require('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug);

+ 6 - 2
resources/app/node_modules/bluebird/js/release/util.js

@@ -195,8 +195,12 @@ function toFastProperties(obj) {
     /*jshint -W027,-W055,-W031*/
     function FakeConstructor() {}
     FakeConstructor.prototype = obj;
-    var l = 8;
-    while (l--) new FakeConstructor();
+    var receiver = new FakeConstructor();
+    function ic() {
+        return typeof receiver.foo;
+    }
+    ic();
+    ic();
     return obj;
     eval(obj);
 }

+ 40 - 67
resources/app/node_modules/bluebird/package.json

@@ -1,42 +1,44 @@
 {
-  "_args": [
-    [
-      "bluebird@3.5.1",
-      "E:\\Client-Project\\UseStudio.CampusInfo\\resources\\app"
-    ]
+  "name": "bluebird",
+  "description": "Full featured Promises/A+ implementation with exceptionally good performance",
+  "version": "3.5.2",
+  "keywords": [
+    "promise",
+    "performance",
+    "promises",
+    "promises-a",
+    "promises-aplus",
+    "async",
+    "await",
+    "deferred",
+    "deferreds",
+    "future",
+    "flow control",
+    "dsl",
+    "fluent interface"
   ],
-  "_from": "bluebird@3.5.1",
-  "_id": "bluebird@3.5.1",
-  "_inBundle": false,
-  "_integrity": "sha1-2VUfnemPH82h5oPRfukaBgLuLrk=",
-  "_location": "/bluebird",
-  "_phantomChildren": {},
-  "_requested": {
-    "type": "version",
-    "registry": true,
-    "raw": "bluebird@3.5.1",
-    "name": "bluebird",
-    "escapedName": "bluebird",
-    "rawSpec": "3.5.1",
-    "saveSpec": null,
-    "fetchSpec": "3.5.1"
+  "scripts": {
+    "lint": "node scripts/jshint.js",
+    "test": "node --expose-gc tools/test.js",
+    "istanbul": "istanbul",
+    "prepublish": "npm run generate-browser-core && npm run generate-browser-full",
+    "generate-browser-full": "node tools/build.js --no-clean --no-debug --release --browser --minify",
+    "generate-browser-core": "node tools/build.js --features=core --no-debug --release --zalgo --browser --minify && mv js/browser/bluebird.js js/browser/bluebird.core.js && mv js/browser/bluebird.min.js js/browser/bluebird.core.min.js"
   },
-  "_requiredBy": [
-    "/bluebird-lst"
-  ],
-  "_resolved": "http://registry.npm.taobao.org/bluebird/download/bluebird-3.5.1.tgz",
-  "_spec": "3.5.1",
-  "_where": "E:\\Client-Project\\UseStudio.CampusInfo\\resources\\app",
+  "homepage": "https://github.com/petkaantonov/bluebird",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/petkaantonov/bluebird.git"
+  },
+  "bugs": {
+    "url": "http://github.com/petkaantonov/bluebird/issues"
+  },
+  "license": "MIT",
   "author": {
     "name": "Petka Antonov",
     "email": "petka_antonov@hotmail.com",
     "url": "http://github.com/petkaantonov/"
   },
-  "browser": "./js/browser/bluebird.js",
-  "bugs": {
-    "url": "http://github.com/petkaantonov/bluebird/issues"
-  },
-  "description": "Full featured Promises/A+ implementation with exceptionally good performance",
   "devDependencies": {
     "acorn": "~0.6.0",
     "baconjs": "^0.7.43",
@@ -52,7 +54,6 @@
     "istanbul": "^0.3.5",
     "jshint": "^2.6.0",
     "jshint-stylish": "~0.2.0",
-    "kefir": "^2.4.1",
     "mkdirp": "~0.5.0",
     "mocha": "~2.1",
     "open": "~0.0.5",
@@ -61,44 +62,16 @@
     "rx": "^2.3.25",
     "serve-static": "^1.7.1",
     "sinon": "~1.7.3",
-    "uglify-js": "~2.4.16"
+    "uglify-js": "~2.4.16",
+    "kefir": "^2.4.1"
   },
+  "readmeFilename": "README.md",
+  "main": "./js/release/bluebird.js",
+  "webpack": "./js/release/bluebird.js",
+  "browser": "./js/browser/bluebird.js",
   "files": [
     "js/browser",
     "js/release",
     "LICENSE"
-  ],
-  "homepage": "https://github.com/petkaantonov/bluebird",
-  "keywords": [
-    "promise",
-    "performance",
-    "promises",
-    "promises-a",
-    "promises-aplus",
-    "async",
-    "await",
-    "deferred",
-    "deferreds",
-    "future",
-    "flow control",
-    "dsl",
-    "fluent interface"
-  ],
-  "license": "MIT",
-  "main": "./js/release/bluebird.js",
-  "name": "bluebird",
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/petkaantonov/bluebird.git"
-  },
-  "scripts": {
-    "generate-browser-core": "node tools/build.js --features=core --no-debug --release --zalgo --browser --minify && mv js/browser/bluebird.js js/browser/bluebird.core.js && mv js/browser/bluebird.min.js js/browser/bluebird.core.min.js",
-    "generate-browser-full": "node tools/build.js --no-clean --no-debug --release --browser --minify",
-    "istanbul": "istanbul",
-    "lint": "node scripts/jshint.js",
-    "prepublish": "npm run generate-browser-core && npm run generate-browser-full",
-    "test": "node tools/test.js"
-  },
-  "version": "3.5.1",
-  "webpack": "./js/release/bluebird.js"
+  ]
 }

+ 9 - 42
resources/app/node_modules/buffer-from/package.json

@@ -1,52 +1,19 @@
 {
-  "_args": [
-    [
-      "buffer-from@1.0.0",
-      "E:\\Client-Project\\UseStudio.CampusInfo\\resources\\app"
-    ]
-  ],
-  "_from": "buffer-from@1.0.0",
-  "_id": "buffer-from@1.0.0",
-  "_inBundle": false,
-  "_integrity": "sha1-TLiDLSNhJYmwQG6eKVbBfwb99TE=",
-  "_location": "/buffer-from",
-  "_phantomChildren": {},
-  "_requested": {
-    "type": "version",
-    "registry": true,
-    "raw": "buffer-from@1.0.0",
-    "name": "buffer-from",
-    "escapedName": "buffer-from",
-    "rawSpec": "1.0.0",
-    "saveSpec": null,
-    "fetchSpec": "1.0.0"
-  },
-  "_requiredBy": [
-    "/source-map-support"
+  "name": "buffer-from",
+  "version": "1.1.1",
+  "license": "MIT",
+  "repository": "LinusU/buffer-from",
+  "files": [
+    "index.js"
   ],
-  "_resolved": "http://registry.npm.taobao.org/buffer-from/download/buffer-from-1.0.0.tgz",
-  "_spec": "1.0.0",
-  "_where": "E:\\Client-Project\\UseStudio.CampusInfo\\resources\\app",
-  "bugs": {
-    "url": "https://github.com/LinusU/buffer-from/issues"
+  "scripts": {
+    "test": "standard && node test"
   },
-  "description": "A [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available.",
   "devDependencies": {
     "standard": "^7.1.2"
   },
-  "homepage": "https://github.com/LinusU/buffer-from#readme",
   "keywords": [
     "buffer",
     "buffer from"
-  ],
-  "license": "MIT",
-  "name": "buffer-from",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/LinusU/buffer-from.git"
-  },
-  "scripts": {
-    "test": "standard && node test"
-  },
-  "version": "1.0.0"
+  ]
 }

+ 0 - 12
resources/app/node_modules/buffer-from/test.js

@@ -1,12 +0,0 @@
-var bufferFrom = require('./')
-var assert = require('assert')
-
-assert.equal(bufferFrom([1, 2, 3, 4]).toString('hex'), '01020304')
-
-var arr = new Uint8Array([1, 2, 3, 4])
-assert.equal(bufferFrom(arr.buffer, 1, 2).toString('hex'), '0203')
-
-assert.equal(bufferFrom('test', 'utf8').toString('hex'), '74657374')
-
-var buf = bufferFrom('test')
-assert.equal(bufferFrom(buf).toString('hex'), '74657374')

+ 2 - 2
resources/app/node_modules/builder-util-runtime/out/CancellationToken.d.ts

@@ -8,9 +8,9 @@ export declare class CancellationToken extends EventEmitter {
     parent: CancellationToken;
     constructor(parent?: CancellationToken);
     cancel(): void;
-    private onCancel(handler);
+    private onCancel;
     createPromise<R>(callback: (resolve: (thenableOrResult?: R) => void, reject: (error: Error) => void, onCancel: (callback: () => void) => void) => void): Promise<R>;
-    private removeParentCancelHandler();
+    private removeParentCancelHandler;
     dispose(): void;
 }
 export declare class CancellationError extends Error {

+ 1 - 1
resources/app/node_modules/builder-util-runtime/out/CancellationToken.js

@@ -68,7 +68,7 @@ class CancellationToken extends _events().EventEmitter {
 
   createPromise(callback) {
     if (this.cancelled) {
-      return _bluebirdLst().default.reject(new CancellationError());
+      return Promise.reject(new CancellationError());
     }
 
     let cancelHandler = null;

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
resources/app/node_modules/builder-util-runtime/out/CancellationToken.js.map


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
resources/app/node_modules/builder-util-runtime/out/ProgressCallbackTransform.js.map


+ 1 - 1
resources/app/node_modules/builder-util-runtime/out/bintray.d.ts

@@ -25,7 +25,7 @@ export declare class BintrayClient {
     private requestHeaders;
     setRequestHeaders(value: RequestHeaders | null): void;
     constructor(options: BintrayOptions, httpExecutor: HttpExecutor<any>, cancellationToken: CancellationToken, apiKey?: string | null);
-    private bintrayRequest<T>(path, auth, data, cancellationToken, method?);
+    private bintrayRequest;
     getVersion(version: string): Promise<Version>;
     getVersionFiles(version: string): Promise<Array<File>>;
     createVersion(version: string): Promise<any>;

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
resources/app/node_modules/builder-util-runtime/out/bintray.js.map


+ 0 - 1
resources/app/node_modules/builder-util-runtime/out/blockMapApi.d.ts

@@ -1,4 +1,3 @@
-export declare const BLOCK_MAP_FILE_NAME = "_blockMap.blockmap";
 export interface FileChunks {
     checksums: Array<string>;
     sizes: Array<number>;

+ 1 - 4
resources/app/node_modules/builder-util-runtime/out/blockMapApi.js

@@ -3,7 +3,7 @@
 Object.defineProperty(exports, "__esModule", {
   value: true
 });
-exports.readEmbeddedBlockMapData = exports.BLOCK_MAP_FILE_NAME = void 0;
+exports.readEmbeddedBlockMapData = void 0;
 
 function _bluebirdLst() {
   const data = _interopRequireWildcard(require("bluebird-lst"));
@@ -27,9 +27,6 @@ function _fsExtraP() {
 
 function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
 
-const BLOCK_MAP_FILE_NAME = "_blockMap.blockmap";
-exports.BLOCK_MAP_FILE_NAME = BLOCK_MAP_FILE_NAME;
-
 let readEmbeddedBlockMapData = (() => {
   var _ref = (0, _bluebirdLst().coroutine)(function* (file) {
     const fd = yield (0, _fsExtraP().open)(file, "r");

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
resources/app/node_modules/builder-util-runtime/out/blockMapApi.js.map


+ 1 - 1
resources/app/node_modules/builder-util-runtime/out/httpExecutor.d.ts

@@ -29,7 +29,7 @@ export declare abstract class HttpExecutor<REQUEST> {
     doApiRequest(options: RequestOptions, cancellationToken: CancellationToken, requestProcessor: (request: REQUEST, reject: (error: Error) => void) => void, redirectCount?: number): Promise<string>;
     protected addRedirectHandlers(request: any, options: RequestOptions, reject: (error: Error) => void, redirectCount: number, handler: (options: RequestOptions) => void): void;
     addErrorAndTimeoutHandlers(request: any, reject: (error: Error) => void): void;
-    protected handleResponse(response: IncomingMessage, options: RequestOptions, cancellationToken: CancellationToken, resolve: (data?: any) => void, reject: (error: Error) => void, redirectCount: number, requestProcessor: (request: REQUEST, reject: (error: Error) => void) => void): void;
+    private handleResponse;
     abstract doRequest(options: any, callback: (response: any) => void): any;
     protected doDownload(requestOptions: any, destination: string, redirectCount: number, options: DownloadOptions, callback: (error: Error | null) => void, onCancel: (callback: () => void) => void): void;
     protected addTimeOutHandler(request: any, callback: (error: Error) => void): void;

+ 28 - 6
resources/app/node_modules/builder-util-runtime/out/httpExecutor.js

@@ -83,6 +83,16 @@ function _ProgressCallbackTransform() {
   return data;
 }
 
+function _zlib() {
+  const data = require("zlib");
+
+  _zlib = function () {
+    return data;
+  };
+
+  return data;
+}
+
 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
 const debug = (0, _debug2.default)("electron-builder");
@@ -124,7 +134,9 @@ class HttpExecutor {
       options.headers["Content-Length"] = encodedData.length;
     }
 
-    return this.doApiRequest(options, cancellationToken, it => it.end(encodedData));
+    return this.doApiRequest(options, cancellationToken, it => {
+      it.end(encodedData);
+    });
   }
 
   doApiRequest(options, cancellationToken, requestProcessor, redirectCount = 0) {
@@ -192,10 +204,19 @@ Please double check that your authentication token is correct. Due to security r
       return;
     }
 
+    let stream = response;
+
+    if (options.gzip) {
+      const gUnzip = (0, _zlib().createGunzip)();
+      gUnzip.on("error", reject);
+      response.pipe(gUnzip);
+      stream = gUnzip;
+    }
+
+    stream.setEncoding("utf8");
     let data = "";
-    response.setEncoding("utf8");
-    response.on("data", chunk => data += chunk);
-    response.on("end", () => {
+    stream.on("data", chunk => data += chunk);
+    stream.on("end", () => {
       try {
         if (response.statusCode != null && response.statusCode >= 400) {
           const contentType = safeGetHeader(response, "content-type");
@@ -250,12 +271,13 @@ Please double check that your authentication token is correct. Due to security r
 
   static prepareRedirectUrlOptions(redirectUrl, options) {
     const newOptions = configureRequestOptionsFromUrl(redirectUrl, Object.assign({}, options));
+    const headers = newOptions.headers;
 
-    if (newOptions.headers != null && newOptions.headers.Authorization != null && newOptions.headers.Authorization.startsWith("token")) {
+    if (headers != null && headers.authorization != null && headers.authorization.startsWith("token")) {
       const parsedNewUrl = new (_url().URL)(redirectUrl);
 
       if (parsedNewUrl.hostname.endsWith(".amazonaws.com")) {
-        delete newOptions.headers.Authorization;
+        delete headers.authorization;
       }
     }
 

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
resources/app/node_modules/builder-util-runtime/out/httpExecutor.js.map


+ 3 - 0
resources/app/node_modules/builder-util-runtime/out/index.d.ts

@@ -6,5 +6,8 @@ export { parseDn } from "./rfc2253Parser";
 export { UUID } from "./uuid";
 export { ProgressCallbackTransform, ProgressInfo } from "./ProgressCallbackTransform";
 export { parseXml, XElement } from "./xml";
+export { BlockMap } from "./blockMapApi";
+export declare const CURRENT_APP_INSTALLER_FILE_NAME = "__installer.exe";
+export declare const CURRENT_APP_PACKAGE_FILE_NAME = "__package.7z";
 export declare function asArray<T>(v: null | undefined | T | Array<T>): Array<T>;
 export declare function newError(message: string, code: string): Error;

+ 8 - 0
resources/app/node_modules/builder-util-runtime/out/index.js

@@ -113,6 +113,7 @@ Object.defineProperty(exports, "XElement", {
     return _xml().XElement;
   }
 });
+exports.CURRENT_APP_PACKAGE_FILE_NAME = exports.CURRENT_APP_INSTALLER_FILE_NAME = void 0;
 
 function _CancellationToken() {
   const data = require("./CancellationToken");
@@ -184,6 +185,13 @@ function _xml() {
   return data;
 }
 
+// nsis
+const CURRENT_APP_INSTALLER_FILE_NAME = "__installer.exe"; // nsis-web
+
+exports.CURRENT_APP_INSTALLER_FILE_NAME = CURRENT_APP_INSTALLER_FILE_NAME;
+const CURRENT_APP_PACKAGE_FILE_NAME = "__package.7z";
+exports.CURRENT_APP_PACKAGE_FILE_NAME = CURRENT_APP_PACKAGE_FILE_NAME;
+
 function asArray(v) {
   if (v == null) {
     return [];

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
resources/app/node_modules/builder-util-runtime/out/index.js.map


+ 1 - 1
resources/app/node_modules/builder-util-runtime/out/publishOptions.d.ts

@@ -65,7 +65,7 @@ export interface GithubOptions extends PublishConfiguration {
     /**
      * The type of release. By default `draft` release will be created.
      *
-     * Also you can set release type using environment variable. If `EP_DRAFT`is set to `true` — `draft`, if `EP_PRELEASE`is set to `true` — `prerelease`.
+     * Also you can set release type using environment variable. If `EP_DRAFT`is set to `true` — `draft`, if `EP_PRE_RELEASE`is set to `true` — `prerelease`.
      * @default draft
      */
     releaseType?: "draft" | "prerelease" | "release" | null;

+ 23 - 21
resources/app/node_modules/builder-util-runtime/out/publishOptions.js

@@ -30,25 +30,33 @@ function s3Url(options) {
 
   if (options.endpoint != null) {
     url = `${options.endpoint}/${options.bucket}`;
-  } else {
-    if (!options.bucket.includes(".")) {
-      if (options.region === "cn-north-1") {
-        url = `https://${options.bucket}.s3.${options.region}.amazonaws.com.cn`;
-      } else {
-        url = `https://${options.bucket}.s3.amazonaws.com`;
-      }
-    } else {
-      if (options.region == null) {
-        throw new Error(`Bucket name "${options.bucket}" includes a dot, but S3 region is missing`);
-      } // special case, see http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro
+  } else if (options.bucket.includes(".")) {
+    if (options.region == null) {
+      throw new Error(`Bucket name "${options.bucket}" includes a dot, but S3 region is missing`);
+    } // special case, see http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro
 
 
-      url = options.region === "us-east-1" ? `https://s3.amazonaws.com/${options.bucket}` : `https://s3-${options.region}.amazonaws.com/${options.bucket}`;
+    if (options.region === "us-east-1") {
+      url = `https://s3.amazonaws.com/${options.bucket}`;
+    } else {
+      url = `https://s3-${options.region}.amazonaws.com/${options.bucket}`;
     }
+  } else if (options.region === "cn-north-1") {
+    url = `https://${options.bucket}.s3.${options.region}.amazonaws.com.cn`;
+  } else {
+    url = `https://${options.bucket}.s3.amazonaws.com`;
   }
 
-  if (options.path != null) {
-    url += `/${options.path}`;
+  return appendPath(url, options.path);
+}
+
+function appendPath(url, p) {
+  if (p != null && p.length > 0) {
+    if (!p.startsWith("/")) {
+      url += "/";
+    }
+
+    url += p;
   }
 
   return url;
@@ -63,12 +71,6 @@ function spacesUrl(options) {
     throw new Error(`region is missing`);
   }
 
-  let url = `https://${options.name}.${options.region}.digitaloceanspaces.com`;
-
-  if (options.path != null) {
-    url += `/${options.path}`;
-  }
-
-  return url;
+  return appendPath(`https://${options.name}.${options.region}.digitaloceanspaces.com`, options.path);
 } 
 //# sourceMappingURL=publishOptions.js.map

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
resources/app/node_modules/builder-util-runtime/out/publishOptions.js.map


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
resources/app/node_modules/builder-util-runtime/out/rfc2253Parser.js.map


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
resources/app/node_modules/builder-util-runtime/out/updateInfo.js.map


+ 1 - 8
resources/app/node_modules/builder-util-runtime/out/uuid.d.ts

@@ -1,15 +1,13 @@
 /// <reference types="node" />
 export declare class UUID {
     private ascii;
-    private binary;
+    private readonly binary;
     private readonly version;
-    static readonly URL: UUID;
     static readonly OID: Buffer;
     constructor(uuid: Buffer | string);
     static v1(): any;
     static v5(name: string | Buffer, namespace: Buffer): any;
     toString(): string;
-    toBuffer(): Buffer;
     inspect(): string;
     static check(uuid: Buffer | string, offset?: number): false | {
         version: undefined;
@@ -22,9 +20,4 @@ export declare class UUID {
     };
     static parse(input: string): Buffer;
 }
-export interface UuidOptions {
-    encoding?: string;
-    name?: string;
-    namespace?: string | UUID | Buffer;
-}
 export declare const nil: UUID;

+ 2 - 11
resources/app/node_modules/builder-util-runtime/out/uuid.js

@@ -83,14 +83,6 @@ class UUID {
     return this.ascii;
   }
 
-  toBuffer() {
-    if (this.binary == null) {
-      this.binary = UUID.parse(this.ascii);
-    }
-
-    return Buffer.from(this.binary);
-  }
-
   inspect() {
     return `UUID v${this.version} ${this.toString()}`;
   }
@@ -99,7 +91,7 @@ class UUID {
     if (typeof uuid === "string") {
       uuid = uuid.toLowerCase();
 
-      if (!/^[a-f0-9]{8}(\-[a-f0-9]{4}){3}\-([a-f0-9]{12})$/.test(uuid)) {
+      if (!/^[a-f0-9]{8}(-[a-f0-9]{4}){3}-([a-f0-9]{12})$/.test(uuid)) {
         return false;
       }
 
@@ -169,7 +161,6 @@ class UUID {
 
 
 exports.UUID = UUID;
-UUID.URL = new UUID("6ba7b811-9dad-11d1-80b4-00c04fd430c8");
 UUID.OID = UUID.parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8"); // according to rfc4122#section-4.1.1
 
 function getVariant(bits) {
@@ -273,7 +264,7 @@ function uuidNamed(name, hashMethod, version, namespace, encoding = UuidEncoding
   }
 
   hash.update(namespace);
-  hash.update(name, nameIsNotAString ? "latin1" : "utf8");
+  hash.update(name);
   const buffer = hash.digest();
   let result;
 

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
resources/app/node_modules/builder-util-runtime/out/uuid.js.map


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
resources/app/node_modules/builder-util-runtime/out/xml.js.map


+ 15 - 51
resources/app/node_modules/builder-util-runtime/package.json

@@ -1,59 +1,23 @@
 {
-  "_args": [
-    [
-      "builder-util-runtime@4.2.1",
-      "E:\\Client-Project\\UseStudio.CampusInfo\\resources\\app"
-    ]
-  ],
-  "_from": "builder-util-runtime@4.2.1",
-  "_id": "builder-util-runtime@4.2.1",
-  "_inBundle": false,
-  "_integrity": "sha1-DKo1jxMx1waAAQFBylkZUrabNbw=",
-  "_location": "/builder-util-runtime",
-  "_phantomChildren": {},
-  "_requested": {
-    "type": "version",
-    "registry": true,
-    "raw": "builder-util-runtime@4.2.1",
-    "name": "builder-util-runtime",
-    "escapedName": "builder-util-runtime",
-    "rawSpec": "4.2.1",
-    "saveSpec": null,
-    "fetchSpec": "4.2.1"
-  },
-  "_requiredBy": [
-    "/electron-updater"
+  "name": "builder-util-runtime",
+  "version": "4.4.1",
+  "main": "out/index.js",
+  "author": "Vladimir Krivosheev",
+  "license": "MIT",
+  "repository": "electron-userland/electron-builder",
+  "bugs": "https://github.com/electron-userland/electron-builder/issues",
+  "homepage": "https://github.com/electron-userland/electron-builder",
+  "files": [
+    "out"
   ],
-  "_resolved": "http://registry.npm.taobao.org/builder-util-runtime/download/builder-util-runtime-4.2.1.tgz",
-  "_spec": "4.2.1",
-  "_where": "E:\\Client-Project\\UseStudio.CampusInfo\\resources\\app",
-  "author": {
-    "name": "Vladimir Krivosheev"
-  },
-  "bugs": {
-    "url": "https://github.com/electron-userland/electron-builder/issues"
+  "engines": {
+    "node": ">=6.0.0"
   },
   "dependencies": {
-    "bluebird-lst": "^1.0.5",
     "debug": "^3.1.0",
-    "fs-extra-p": "^4.6.0",
+    "fs-extra-p": "^4.6.1",
+    "bluebird-lst": "^1.0.5",
     "sax": "^1.2.4"
   },
-  "description": "HTTP utilities. Used by [electron-builder](https://github.com/electron-userland/electron-builder).",
-  "engines": {
-    "node": ">=6.0.0"
-  },
-  "files": [
-    "out"
-  ],
-  "homepage": "https://github.com/electron-userland/electron-builder",
-  "license": "MIT",
-  "main": "out/index.js",
-  "name": "builder-util-runtime",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/electron-userland/electron-builder.git"
-  },
-  "types": "./out/index.d.ts",
-  "version": "4.2.1"
+  "types": "./out/index.d.ts"
 }

+ 12 - 45
resources/app/node_modules/core-util-is/package.json

@@ -1,45 +1,12 @@
 {
-  "_args": [
-    [
-      "core-util-is@1.0.2",
-      "E:\\Client-Project\\UseStudio.CampusInfo\\resources\\app"
-    ]
-  ],
-  "_from": "core-util-is@1.0.2",
-  "_id": "core-util-is@1.0.2",
-  "_inBundle": false,
-  "_integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
-  "_location": "/core-util-is",
-  "_phantomChildren": {},
-  "_requested": {
-    "type": "version",
-    "registry": true,
-    "raw": "core-util-is@1.0.2",
-    "name": "core-util-is",
-    "escapedName": "core-util-is",
-    "rawSpec": "1.0.2",
-    "saveSpec": null,
-    "fetchSpec": "1.0.2"
-  },
-  "_requiredBy": [
-    "/readable-stream"
-  ],
-  "_resolved": "http://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz",
-  "_spec": "1.0.2",
-  "_where": "E:\\Client-Project\\UseStudio.CampusInfo\\resources\\app",
-  "author": {
-    "name": "Isaac Z. Schlueter",
-    "email": "i@izs.me",
-    "url": "http://blog.izs.me/"
-  },
-  "bugs": {
-    "url": "https://github.com/isaacs/core-util-is/issues"
-  },
+  "name": "core-util-is",
+  "version": "1.0.2",
   "description": "The `util.is*` functions introduced in Node v0.12.",
-  "devDependencies": {
-    "tap": "^2.3.0"
+  "main": "lib/util.js",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/isaacs/core-util-is"
   },
-  "homepage": "https://github.com/isaacs/core-util-is#readme",
   "keywords": [
     "util",
     "isBuffer",
@@ -51,15 +18,15 @@
     "isThat",
     "polyfill"
   ],
+  "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
   "license": "MIT",
-  "main": "lib/util.js",
-  "name": "core-util-is",
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/isaacs/core-util-is.git"
+  "bugs": {
+    "url": "https://github.com/isaacs/core-util-is/issues"
   },
   "scripts": {
     "test": "tap test.js"
   },
-  "version": "1.0.2"
+  "devDependencies": {
+    "tap": "^2.3.0"
+  }
 }

+ 0 - 3
resources/app/node_modules/debug/.eslintrc

@@ -3,9 +3,6 @@
     "browser": true,
     "node": true
   },
-  "globals": {
-    "chrome": true
-  },
   "rules": {
     "no-console": 0,
     "no-empty": [1, { "allowEmptyCatch": true }]

+ 4 - 10
resources/app/node_modules/debug/.travis.yml

@@ -1,20 +1,14 @@
-sudo: false
 
 language: node_js
-
 node_js:
-  - "4"
   - "6"
-  - "8"
+  - "5"
+  - "4"
 
 install:
-  - make install
+  - make node_modules
 
 script:
   - make lint
   - make test
-
-matrix:
-  include:
-  - node_js: '8'
-    env: BROWSER=1
+  - make coveralls

+ 1 - 34
resources/app/node_modules/debug/CHANGELOG.md

@@ -1,37 +1,4 @@
 
-3.1.0 / 2017-09-26
-==================
-
-  * Add `DEBUG_HIDE_DATE` env var (#486)
-  * Remove ReDoS regexp in %o formatter (#504)
-  * Remove "component" from package.json
-  * Remove `component.json`
-  * Ignore package-lock.json
-  * Examples: fix colors printout
-  * Fix: browser detection
-  * Fix: spelling mistake (#496, @EdwardBetts)
-
-3.0.1 / 2017-08-24
-==================
-
-  * Fix: Disable colors in Edge and Internet Explorer (#489)
-
-3.0.0 / 2017-08-08
-==================
-
-  * Breaking: Remove DEBUG_FD (#406)
-  * Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418)
-  * Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408)
-  * Addition: document `enabled` flag (#465)
-  * Addition: add 256 colors mode (#481)
-  * Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440)
-  * Update: component: update "ms" to v2.0.0
-  * Update: separate the Node and Browser tests in Travis-CI
-  * Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots
-  * Update: separate Node.js and web browser examples for organization
-  * Update: update "browserify" to v14.4.0
-  * Fix: fix Readme typo (#473)
-
 2.6.9 / 2017-09-22
 ==================
 
@@ -60,7 +27,7 @@
 2.6.4 / 2017-04-20
 ==================
 
-  * Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
+  * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
   * Chore: ignore bower.json in npm installations. (#437, @joaovieira)
   * Misc: update "ms" to v0.7.3 (@tootallnate)
 

+ 18 - 26
resources/app/node_modules/debug/Makefile

@@ -15,44 +15,36 @@ YARN ?= $(shell which yarn)
 PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
 BROWSERIFY ?= $(NODE) $(BIN)/browserify
 
-install: node_modules
+.FORCE:
 
-browser: dist/debug.js
+install: node_modules
 
 node_modules: package.json
 	@NODE_ENV= $(PKG) install
 	@touch node_modules
 
-dist/debug.js: src/*.js node_modules
-	@mkdir -p dist
+lint: .FORCE
+	eslint browser.js debug.js index.js node.js
+
+test-node: .FORCE
+	istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
+
+test-browser: .FORCE
+	mkdir -p dist
+
 	@$(BROWSERIFY) \
 		--standalone debug \
 		. > dist/debug.js
 
-lint:
-	@eslint *.js src/*.js
-
-test-node:
-	@istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
-	@cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
+	karma start --single-run
+	rimraf dist
 
-test-browser:
-	@$(MAKE) browser
-	@karma start --single-run
-
-test-all:
-	@concurrently \
+test: .FORCE
+	concurrently \
 		"make test-node" \
 		"make test-browser"
 
-test:
-	@if [ "x$(BROWSER)" = "x" ]; then \
-		$(MAKE) test-node; \
-		else \
-		$(MAKE) test-browser; \
-	fi
-
-clean:
-	rimraf dist coverage
+coveralls:
+	cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
 
-.PHONY: browser install clean lint test test-all test-node test-browser
+.PHONY: all install clean distclean

Файловите разлики са ограничени, защото са твърде много
+ 62 - 118
resources/app/node_modules/debug/README.md


+ 22 - 58
resources/app/node_modules/debug/package.json

@@ -1,57 +1,27 @@
 {
-  "_args": [
-    [
-      "debug@3.1.0",
-      "E:\\Client-Project\\UseStudio.CampusInfo\\resources\\app"
-    ]
-  ],
-  "_from": "debug@3.1.0",
-  "_id": "debug@3.1.0",
-  "_inBundle": false,
-  "_integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=",
-  "_location": "/debug",
-  "_phantomChildren": {},
-  "_requested": {
-    "type": "version",
-    "registry": true,
-    "raw": "debug@3.1.0",
-    "name": "debug",
-    "escapedName": "debug",
-    "rawSpec": "3.1.0",
-    "saveSpec": null,
-    "fetchSpec": "3.1.0"
+  "name": "debug",
+  "version": "2.6.9",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/visionmedia/debug.git"
   },
-  "_requiredBy": [
-    "/builder-util-runtime"
+  "description": "small debugging utility",
+  "keywords": [
+    "debug",
+    "log",
+    "debugger"
   ],
-  "_resolved": "http://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz",
-  "_spec": "3.1.0",
-  "_where": "E:\\Client-Project\\UseStudio.CampusInfo\\resources\\app",
-  "author": {
-    "name": "TJ Holowaychuk",
-    "email": "tj@vision-media.ca"
-  },
-  "browser": "./src/browser.js",
-  "bugs": {
-    "url": "https://github.com/visionmedia/debug/issues"
-  },
+  "author": "TJ Holowaychuk <tj@vision-media.ca>",
   "contributors": [
-    {
-      "name": "Nathan Rajlich",
-      "email": "nathan@tootallnate.net",
-      "url": "http://n8.io"
-    },
-    {
-      "name": "Andrew Rhyne",
-      "email": "rhyneandrew@gmail.com"
-    }
+    "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
+    "Andrew Rhyne <rhyneandrew@gmail.com>"
   ],
+  "license": "MIT",
   "dependencies": {
     "ms": "2.0.0"
   },
-  "description": "small debugging utility",
   "devDependencies": {
-    "browserify": "14.4.0",
+    "browserify": "9.0.3",
     "chai": "^3.5.0",
     "concurrently": "^3.1.0",
     "coveralls": "^2.11.15",
@@ -68,18 +38,12 @@
     "sinon": "^1.17.6",
     "sinon-chai": "^2.8.0"
   },
-  "homepage": "https://github.com/visionmedia/debug#readme",
-  "keywords": [
-    "debug",
-    "log",
-    "debugger"
-  ],
-  "license": "MIT",
   "main": "./src/index.js",
-  "name": "debug",
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/visionmedia/debug.git"
-  },
-  "version": "3.1.0"
+  "browser": "./src/browser.js",
+  "component": {
+    "scripts": {
+      "debug/index.js": "browser.js",
+      "debug/debug.js": "debug.js"
+    }
+  }
 }

+ 6 - 16
resources/app/node_modules/debug/src/browser.js

@@ -20,17 +20,12 @@ exports.storage = 'undefined' != typeof chrome
  */
 
 exports.colors = [
-  '#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC',
-  '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF',
-  '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC',
-  '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF',
-  '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC',
-  '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033',
-  '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366',
-  '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933',
-  '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC',
-  '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF',
-  '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'
+  'lightseagreen',
+  'forestgreen',
+  'goldenrod',
+  'dodgerblue',
+  'darkorchid',
+  'crimson'
 ];
 
 /**
@@ -49,11 +44,6 @@ function useColors() {
     return true;
   }
 
-  // Internet Explorer and Edge do not support colors.
-  if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
-    return false;
-  }
-
   // is webkit? http://stackoverflow.com/a/16459606/376773
   // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
   return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||

+ 7 - 30
resources/app/node_modules/debug/src/debug.js

@@ -14,11 +14,6 @@ exports.enabled = enabled;
 exports.humanize = require('ms');
 
 /**
- * Active `debug` instances.
- */
-exports.instances = [];
-
-/**
  * The currently active debug mode names, and names to skip.
  */
 
@@ -34,6 +29,12 @@ exports.skips = [];
 exports.formatters = {};
 
 /**
+ * Previous log timestamp.
+ */
+
+var prevTime;
+
+/**
  * Select a color.
  * @param {String} namespace
  * @return {Number}
@@ -61,8 +62,6 @@ function selectColor(namespace) {
 
 function createDebug(namespace) {
 
-  var prevTime;
-
   function debug() {
     // disabled?
     if (!debug.enabled) return;
@@ -119,28 +118,15 @@ function createDebug(namespace) {
   debug.enabled = exports.enabled(namespace);
   debug.useColors = exports.useColors();
   debug.color = selectColor(namespace);
-  debug.destroy = destroy;
 
   // env-specific initialization logic for debug instances
   if ('function' === typeof exports.init) {
     exports.init(debug);
   }
 
-  exports.instances.push(debug);
-
   return debug;
 }
 
-function destroy () {
-  var index = exports.instances.indexOf(this);
-  if (index !== -1) {
-    exports.instances.splice(index, 1);
-    return true;
-  } else {
-    return false;
-  }
-}
-
 /**
  * Enables a debug mode by namespaces. This can include modes
  * separated by a colon and wildcards.
@@ -155,11 +141,10 @@ function enable(namespaces) {
   exports.names = [];
   exports.skips = [];
 
-  var i;
   var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
   var len = split.length;
 
-  for (i = 0; i < len; i++) {
+  for (var i = 0; i < len; i++) {
     if (!split[i]) continue; // ignore empty strings
     namespaces = split[i].replace(/\*/g, '.*?');
     if (namespaces[0] === '-') {
@@ -168,11 +153,6 @@ function enable(namespaces) {
       exports.names.push(new RegExp('^' + namespaces + '$'));
     }
   }
-
-  for (i = 0; i < exports.instances.length; i++) {
-    var instance = exports.instances[i];
-    instance.enabled = exports.enabled(instance.namespace);
-  }
 }
 
 /**
@@ -194,9 +174,6 @@ function disable() {
  */
 
 function enabled(name) {
-  if (name[name.length - 1] === '*') {
-    return true;
-  }
   var i, len;
   for (i = 0, len = exports.skips.length; i < len; i++) {
     if (exports.skips[i].test(name)) {

+ 1 - 1
resources/app/node_modules/debug/src/index.js

@@ -3,7 +3,7 @@
  * treat as a browser.
  */
 
-if (typeof process === 'undefined' || process.type === 'renderer') {
+if (typeof process !== 'undefined' && process.type === 'renderer') {
   module.exports = require('./browser.js');
 } else {
   module.exports = require('./node.js');

+ 93 - 31
resources/app/node_modules/debug/src/node.js

@@ -23,22 +23,7 @@ exports.useColors = useColors;
  * Colors.
  */
 
-exports.colors = [ 6, 2, 3, 4, 5, 1 ];
-
-try {
-  var supportsColor = require('supports-color');
-  if (supportsColor && supportsColor.level >= 2) {
-    exports.colors = [
-      20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68,
-      69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134,
-      135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
-      172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204,
-      205, 206, 207, 208, 209, 214, 215, 220, 221
-    ];
-  }
-} catch (err) {
-  // swallow - we only care if `supports-color` is available; it doesn't have to be.
-}
+exports.colors = [6, 2, 3, 4, 5, 1];
 
 /**
  * Build up the default `inspectOpts` object from the environment variables.
@@ -67,13 +52,30 @@ exports.inspectOpts = Object.keys(process.env).filter(function (key) {
 }, {});
 
 /**
+ * The file descriptor to write the `debug()` calls to.
+ * Set the `DEBUG_FD` env variable to override with another value. i.e.:
+ *
+ *   $ DEBUG_FD=3 node script.js 3>debug.log
+ */
+
+var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
+
+if (1 !== fd && 2 !== fd) {
+  util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')()
+}
+
+var stream = 1 === fd ? process.stdout :
+             2 === fd ? process.stderr :
+             createWritableStdioStream(fd);
+
+/**
  * Is stdout a TTY? Colored output is enabled when `true`.
  */
 
 function useColors() {
   return 'colors' in exports.inspectOpts
     ? Boolean(exports.inspectOpts.colors)
-    : tty.isatty(process.stderr.fd);
+    : tty.isatty(fd);
 }
 
 /**
@@ -109,30 +111,22 @@ function formatArgs(args) {
 
   if (useColors) {
     var c = this.color;
-    var colorCode = '\u001b[3' + (c < 8 ? c : '8;5;' + c);
-    var prefix = '  ' + colorCode + ';1m' + name + ' ' + '\u001b[0m';
+    var prefix = '  \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m';
 
     args[0] = prefix + args[0].split('\n').join('\n' + prefix);
-    args.push(colorCode + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
-  } else {
-    args[0] = getDate() + name + ' ' + args[0];
-  }
-}
-
-function getDate() {
-  if (exports.inspectOpts.hideDate) {
-    return '';
+    args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
   } else {
-    return new Date().toISOString() + ' ';
+    args[0] = new Date().toUTCString()
+      + ' ' + name + ' ' + args[0];
   }
 }
 
 /**
- * Invokes `util.format()` with the specified arguments and writes to stderr.
+ * Invokes `util.format()` with the specified arguments and writes to `stream`.
  */
 
 function log() {
-  return process.stderr.write(util.format.apply(util, arguments) + '\n');
+  return stream.write(util.format.apply(util, arguments) + '\n');
 }
 
 /**
@@ -164,6 +158,74 @@ function load() {
 }
 
 /**
+ * Copied from `node/src/node.js`.
+ *
+ * XXX: It's lame that node doesn't expose this API out-of-the-box. It also
+ * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
+ */
+
+function createWritableStdioStream (fd) {
+  var stream;
+  var tty_wrap = process.binding('tty_wrap');
+
+  // Note stream._type is used for test-module-load-list.js
+
+  switch (tty_wrap.guessHandleType(fd)) {
+    case 'TTY':
+      stream = new tty.WriteStream(fd);
+      stream._type = 'tty';
+
+      // Hack to have stream not keep the event loop alive.
+      // See https://github.com/joyent/node/issues/1726
+      if (stream._handle && stream._handle.unref) {
+        stream._handle.unref();
+      }
+      break;
+
+    case 'FILE':
+      var fs = require('fs');
+      stream = new fs.SyncWriteStream(fd, { autoClose: false });
+      stream._type = 'fs';
+      break;
+
+    case 'PIPE':
+    case 'TCP':
+      var net = require('net');
+      stream = new net.Socket({
+        fd: fd,
+        readable: false,
+        writable: true
+      });
+
+      // FIXME Should probably have an option in net.Socket to create a
+      // stream from an existing fd which is writable only. But for now
+      // we'll just add this hack and set the `readable` member to false.
+      // Test: ./node test/fixtures/echo.js < /etc/passwd
+      stream.readable = false;
+      stream.read = null;
+      stream._type = 'pipe';
+
+      // FIXME Hack to have stream not keep the event loop alive.
+      // See https://github.com/joyent/node/issues/1726
+      if (stream._handle && stream._handle.unref) {
+        stream._handle.unref();
+      }
+      break;
+
+    default:
+      // Probably an error on in uv_guess_handle()
+      throw new Error('Implement me. Unknown stream file type!');
+  }
+
+  // For supporting legacy API we put the FD here.
+  stream.fd = fd;
+
+  stream._isStdio = true;
+
+  return stream;
+}
+
+/**
  * Init logic for `debug` instances.
  *
  * Create a new `inspectOpts` object in case `useColors` is set

+ 9 - 44
resources/app/node_modules/electron-is-dev/package.json

@@ -1,48 +1,20 @@
 {
-  "_args": [
-    [
-      "electron-is-dev@0.3.0",
-      "E:\\Client-Project\\UseStudio.CampusInfo\\resources\\app"
-    ]
-  ],
-  "_from": "electron-is-dev@0.3.0",
-  "_id": "electron-is-dev@0.3.0",
-  "_inBundle": false,
-  "_integrity": "sha1-FOb9pcaOnk7L7/nM8DfL18BcWv4=",
-  "_location": "/electron-is-dev",
-  "_phantomChildren": {},
-  "_requested": {
-    "type": "version",
-    "registry": true,
-    "raw": "electron-is-dev@0.3.0",
-    "name": "electron-is-dev",
-    "escapedName": "electron-is-dev",
-    "rawSpec": "0.3.0",
-    "saveSpec": null,
-    "fetchSpec": "0.3.0"
-  },
-  "_requiredBy": [
-    "/electron-updater"
-  ],
-  "_resolved": "http://registry.npm.taobao.org/electron-is-dev/download/electron-is-dev-0.3.0.tgz",
-  "_spec": "0.3.0",
-  "_where": "E:\\Client-Project\\UseStudio.CampusInfo\\resources\\app",
+  "name": "electron-is-dev",
+  "version": "0.3.0",
+  "description": "Check if Electron is running in development",
+  "license": "MIT",
+  "repository": "sindresorhus/electron-is-dev",
   "author": {
     "name": "Sindre Sorhus",
     "email": "sindresorhus@gmail.com",
     "url": "sindresorhus.com"
   },
-  "bugs": {
-    "url": "https://github.com/sindresorhus/electron-is-dev/issues"
-  },
-  "description": "Check if Electron is running in development",
-  "devDependencies": {
-    "xo": "*"
+  "scripts": {
+    "test": "xo"
   },
   "files": [
     "index.js"
   ],
-  "homepage": "https://github.com/sindresorhus/electron-is-dev#readme",
   "keywords": [
     "electron",
     "dev",
@@ -55,16 +27,9 @@
     "debug",
     "app"
   ],
-  "license": "MIT",
-  "name": "electron-is-dev",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/sindresorhus/electron-is-dev.git"
-  },
-  "scripts": {
-    "test": "xo"
+  "devDependencies": {
+    "xo": "*"
   },
-  "version": "0.3.0",
   "xo": {
     "esnext": true,
     "envs": [

Файловите разлики са ограничени, защото са твърде много
+ 55 - 0
resources/app/node_modules/electron-updater/CHANGELOG.md


+ 4 - 4
resources/app/node_modules/electron-updater/README.md

@@ -1,9 +1,9 @@
 # electron-updater
 
-This module allows to automatically update your application. You only need to install this module and write two lines of code!
-To publish your updates you just need a simple file hosting, it does not require a dedicated server.
+This module allows you to automatically update your application. You only need to install this module and write two lines of code!
+To publish your updates you just need simple file hosting, it does not require a dedicated server.
 
-See the [Auto Update](https://electron.build/auto-update) for more information.
+See [Auto Update](https://electron.build/auto-update) for more information.
 
 Supported OS:
  - macOS ([Squirrel.Mac](https://github.com/Squirrel/Squirrel.Mac)).
@@ -12,4 +12,4 @@ Supported OS:
 
 ## Credits
 
-Thanks to [Evolve Labs](https://www.evolvehq.com) for donating the npm package name.
+Thanks to [Evolve Labs](https://www.evolvehq.com) for donating the npm package name.

+ 3 - 2
resources/app/node_modules/electron-updater/out/AppImageUpdater.d.ts

@@ -1,11 +1,12 @@
-import { AllPublishOptions, CancellationToken, UpdateInfo } from "builder-util-runtime";
+import { AllPublishOptions } from "builder-util-runtime";
 import "source-map-support/register";
+import { DownloadUpdateOptions } from "./AppUpdater";
 import { BaseUpdater } from "./BaseUpdater";
 import { UpdateCheckResult } from "./main";
 export declare class AppImageUpdater extends BaseUpdater {
     constructor(options?: AllPublishOptions | null, app?: any);
     checkForUpdatesAndNotify(): Promise<UpdateCheckResult | null>;
     /*** @private */
-    protected doDownloadUpdate(updateInfo: UpdateInfo, cancellationToken: CancellationToken): Promise<Array<string>>;
+    protected doDownloadUpdate(downloadUpdateOptions: DownloadUpdateOptions): Promise<Array<string>>;
     protected doInstall(installerPath: string, isSilent: boolean, isRunAfter: boolean): boolean;
 }

+ 10 - 16
resources/app/node_modules/electron-updater/out/AppImageUpdater.js

@@ -80,7 +80,7 @@ function _FileWithEmbeddedBlockMapDifferentialDownloader() {
 }
 
 function _Provider() {
-  const data = require("./Provider");
+  const data = require("./providers/Provider");
 
   _Provider = function () {
     return data;
@@ -118,26 +118,18 @@ class AppImageUpdater extends _BaseUpdater().BaseUpdater {
   /*** @private */
 
 
-  doDownloadUpdate(updateInfo, cancellationToken) {
+  doDownloadUpdate(downloadUpdateOptions) {
     var _this = this;
 
     return (0, _bluebirdLst().coroutine)(function* () {
       const provider = yield _this.provider;
-      const fileInfo = (0, _Provider().findFile)(provider.resolveFiles(updateInfo), "AppImage");
-      const requestHeaders = yield _this.computeRequestHeaders();
-      const downloadOptions = {
-        skipDirCreation: true,
-        headers: requestHeaders,
-        cancellationToken,
-        sha512: fileInfo.info.sha512
-      };
+      const fileInfo = (0, _Provider().findFile)(provider.resolveFiles(downloadUpdateOptions.updateInfo), "AppImage");
       return yield _this.executeDownload({
         fileExtension: "AppImage",
-        downloadOptions,
         fileInfo,
-        updateInfo,
+        downloadUpdateOptions,
         task: (() => {
-          var _ref = (0, _bluebirdLst().coroutine)(function* (updateFile) {
+          var _ref = (0, _bluebirdLst().coroutine)(function* (updateFile, downloadOptions) {
             const oldFile = process.env.APPIMAGE;
 
             if (oldFile == null) {
@@ -153,7 +145,7 @@ class AppImageUpdater extends _BaseUpdater().BaseUpdater {
                 logger: _this._logger,
                 newFile: updateFile,
                 useMultipleRangeRequest: provider.useMultipleRangeRequest,
-                requestHeaders
+                requestHeaders: downloadUpdateOptions.requestHeaders
               }).download();
             } catch (e) {
               _this._logger.error(`Cannot download differentially, fallback to full download: ${e.stack || e}`); // during test (developer machine mac) we must throw error
@@ -169,7 +161,7 @@ class AppImageUpdater extends _BaseUpdater().BaseUpdater {
             yield (0, _fsExtraP().chmod)(updateFile, 0o755);
           });
 
-          return function task(_x) {
+          return function task(_x, _x2) {
             return _ref.apply(this, arguments);
           };
         })()
@@ -187,8 +179,10 @@ class AppImageUpdater extends _BaseUpdater().BaseUpdater {
 
     (0, _fsExtraP().unlinkSync)(appImageFile);
     let destination;
+    const existingBaseName = path.basename(appImageFile); // https://github.com/electron-userland/electron-builder/issues/2964
+    // if no version in existing file name, it means that user wants to preserve current custom name
 
-    if (path.basename(installerPath) === path.basename(appImageFile)) {
+    if (path.basename(installerPath) === existingBaseName || !/\d+\.\d+\.\d+/.test(existingBaseName)) {
       // no version in the file name, overwrite existing
       destination = appImageFile;
     } else {

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
resources/app/node_modules/electron-updater/out/AppImageUpdater.js.map


+ 33 - 18
resources/app/node_modules/electron-updater/out/AppUpdater.d.ts

@@ -1,11 +1,12 @@
 /// <reference types="node" />
-import { AllPublishOptions, CancellationToken, PublishConfiguration, UpdateInfo } from "builder-util-runtime";
+import { AllPublishOptions, CancellationToken, PublishConfiguration, UpdateInfo, DownloadOptions } from "builder-util-runtime";
 import { EventEmitter } from "events";
 import { OutgoingHttpHeaders } from "http";
 import { Lazy } from "lazy-val";
+import { SemVer } from "semver";
 import "source-map-support/register";
-import { Logger, Provider, UpdateCheckResult, UpdaterSignal } from "./main";
 import { DownloadedUpdateHelper } from "./DownloadedUpdateHelper";
+import { Logger, Provider, ResolvedUpdateFileInfo, UpdateCheckResult, UpdaterSignal } from "./main";
 export declare abstract class AppUpdater extends EventEmitter {
     /**
      * Whether to automatically download an update when it is found.
@@ -30,23 +31,26 @@ export declare abstract class AppUpdater extends EventEmitter {
     fullChangelog: boolean;
     /**
      * Whether to allow version downgrade (when a user from the beta channel wants to go back to the stable channel).
+     *
+     * Taken in account only if channel differs (pre-release version component in terms of semantic versioning).
+     *
      * @default false
      */
     allowDowngrade: boolean;
     /**
      * The current application version.
      */
-    readonly currentVersion: string;
+    readonly currentVersion: SemVer;
     private _channel;
     protected readonly downloadedUpdateHelper: DownloadedUpdateHelper;
     /**
      * Get the update channel. Not applicable for GitHub. Doesn't return `channel` from the update configuration, only if was previously set.
      */
     /**
-     * Set the update channel. Not applicable for GitHub. Overrides `channel` in the update configuration.
-     *
-     * `allowDowngrade` will be automatically set to `true`. If this behavior is not suitable for you, simple set `allowDowngrade` explicitly after.
-     */
+    * Set the update channel. Not applicable for GitHub. Overrides `channel` in the update configuration.
+    *
+    * `allowDowngrade` will be automatically set to `true`. If this behavior is not suitable for you, simple set `allowDowngrade` explicitly after.
+    */
     channel: string | null;
     /**
      *  The request headers.
@@ -68,11 +72,9 @@ export declare abstract class AppUpdater extends EventEmitter {
      * @private
      */
     updateConfigPath: string | null;
-    protected updateAvailable: boolean;
     private clientPromise;
     protected readonly provider: Promise<Provider<any>>;
     protected readonly stagingUserIdPromise: Lazy<string>;
-    configOnDisk: Lazy<any>;
     private readonly untilAppReady;
     private checkForUpdatesPromise;
     protected readonly app: Electron.App;
@@ -89,11 +91,12 @@ export declare abstract class AppUpdater extends EventEmitter {
      */
     checkForUpdates(): Promise<UpdateCheckResult>;
     checkForUpdatesAndNotify(): Promise<UpdateCheckResult | null>;
-    private isStagingMatch(updateInfo);
-    private _checkForUpdates();
-    private computeFinalHeaders(headers);
+    private isStagingMatch;
+    private _checkForUpdates;
+    private computeFinalHeaders;
+    private isUpdateAvailable;
     protected getUpdateInfo(): Promise<UpdateInfo>;
-    private doCheckForUpdates();
+    private doCheckForUpdates;
     protected onUpdateAvailable(updateInfo: UpdateInfo): void;
     /**
      * Start downloading update manually. You can use this method if `autoDownload` option is set to `false`.
@@ -101,7 +104,7 @@ export declare abstract class AppUpdater extends EventEmitter {
      */
     downloadUpdate(cancellationToken?: CancellationToken): Promise<any>;
     protected dispatchError(e: Error): void;
-    protected abstract doDownloadUpdate(updateInfo: UpdateInfo, cancellationToken: CancellationToken): Promise<Array<string>>;
+    protected abstract doDownloadUpdate(downloadUpdateOptions: DownloadUpdateOptions): Promise<Array<string>>;
     /**
      * Restarts the app and installs the update after it has been downloaded.
      * It should only be called after `update-downloaded` has been emitted.
@@ -113,10 +116,15 @@ export declare abstract class AppUpdater extends EventEmitter {
      * @param isForceRunAfter Run the app after finish even on silent install. Not applicable for macOS. Ignored if `isSilent` is set to `false`.
      */
     abstract quitAndInstall(isSilent?: boolean, isForceRunAfter?: boolean): void;
-    private loadUpdateConfig();
-    /*** @private */
-    protected computeRequestHeaders(): Promise<OutgoingHttpHeaders>;
-    private getOrCreateStagingUserId();
+    private loadUpdateConfig;
+    private computeRequestHeaders;
+    private getOrCreateStagingUserId;
+    protected executeDownload(taskOptions: DownloadExecutorTask): Promise<Array<string>>;
+}
+export interface DownloadUpdateOptions {
+    readonly updateInfo: UpdateInfo;
+    readonly requestHeaders: OutgoingHttpHeaders;
+    readonly cancellationToken: CancellationToken;
 }
 /** @private */
 export declare class NoOpLogger implements Logger {
@@ -124,3 +132,10 @@ export declare class NoOpLogger implements Logger {
     warn(message?: any): void;
     error(message?: any): void;
 }
+export interface DownloadExecutorTask {
+    readonly fileExtension: string;
+    readonly fileInfo: ResolvedUpdateFileInfo;
+    readonly downloadUpdateOptions: DownloadUpdateOptions;
+    readonly task: (destinationFile: string, downloadOptions: DownloadOptions, packageFile: string | null, removeTempDirIfAny: () => Promise<any>) => Promise<any>;
+    readonly done?: (destinationFile: string) => Promise<any>;
+}

+ 246 - 66
resources/app/node_modules/electron-updater/out/AppUpdater.js

@@ -109,6 +109,16 @@ function _semver() {
 
 require("source-map-support/register");
 
+function _DownloadedUpdateHelper() {
+  const data = require("./DownloadedUpdateHelper");
+
+  _DownloadedUpdateHelper = function () {
+    return data;
+  };
+
+  return data;
+}
+
 function _electronHttpExecutor() {
   const data = require("./electronHttpExecutor");
 
@@ -120,7 +130,7 @@ function _electronHttpExecutor() {
 }
 
 function _GenericProvider() {
-  const data = require("./GenericProvider");
+  const data = require("./providers/GenericProvider");
 
   _GenericProvider = function () {
     return data;
@@ -149,16 +159,6 @@ function _providerFactory() {
   return data;
 }
 
-function _DownloadedUpdateHelper() {
-  const data = require("./DownloadedUpdateHelper");
-
-  _DownloadedUpdateHelper = function () {
-    return data;
-  };
-
-  return data;
-}
-
 function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
 
 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -193,6 +193,9 @@ class AppUpdater extends _events().EventEmitter {
     this.fullChangelog = false;
     /**
      * Whether to allow version downgrade (when a user from the beta channel wants to go back to the stable channel).
+     *
+     * Taken in account only if channel differs (pre-release version component in terms of semantic versioning).
+     *
      * @default false
      */
 
@@ -203,17 +206,19 @@ class AppUpdater extends _events().EventEmitter {
      */
 
     this.requestHeaders = null;
-    this._logger = console;
+    this._logger = console; // noinspection JSUnusedGlobalSymbols
+
     /**
      * For type safety you can use signals, e.g. `autoUpdater.signals.updateDownloaded(() => {})` instead of `autoUpdater.on('update-available', () => {})`
      */
 
     this.signals = new (_main().UpdaterSignal)(this);
     this._appUpdateConfigPath = null;
-    this.updateAvailable = false;
     this.clientPromise = null;
     this.stagingUserIdPromise = new (_lazyVal().Lazy)(() => this.getOrCreateStagingUserId()); // public, allow to read old config for anyone
 
+    /** @internal */
+
     this.configOnDisk = new (_lazyVal().Lazy)(() => this.loadUpdateConfig());
     this.checkForUpdatesPromise = null;
     this.updateInfo = null;
@@ -237,16 +242,16 @@ class AppUpdater extends _events().EventEmitter {
       });
     }
 
-    this.downloadedUpdateHelper = new (_DownloadedUpdateHelper().DownloadedUpdateHelper)(this.app.getPath("userData"));
+    this.downloadedUpdateHelper = new (_DownloadedUpdateHelper().DownloadedUpdateHelper)(path.join(this.app.getPath("userData"), "__update__"));
     const currentVersionString = this.app.getVersion();
-    const currentVersion = (0, _semver().valid)(currentVersionString);
+    const currentVersion = (0, _semver().parse)(currentVersionString);
 
     if (currentVersion == null) {
-      throw (0, _builderUtilRuntime().newError)(`App version is not a valid semver version: "${currentVersionString}`, "ERR_UPDATER_INVALID_VERSION");
+      throw (0, _builderUtilRuntime().newError)(`App version is not a valid semver version: "${currentVersionString}"`, "ERR_UPDATER_INVALID_VERSION");
     }
 
     this.currentVersion = currentVersion;
-    this.allowPrerelease = hasPrereleaseComponents(this.currentVersion);
+    this.allowPrerelease = hasPrereleaseComponents(currentVersion);
 
     if (options != null) {
       this.setFeedURL(options);
@@ -269,6 +274,7 @@ class AppUpdater extends _events().EventEmitter {
 
   set channel(value) {
     if (this._channel != null) {
+      // noinspection SuspiciousTypeOfGuard
       if (typeof value !== "string") {
         throw (0, _builderUtilRuntime().newError)(`Channel must be a string, but got: ${value}`, "ERR_UPDATER_INVALID_CHANNEL");
       } else if (value.length === 0) {
@@ -327,7 +333,7 @@ class AppUpdater extends _events().EventEmitter {
       provider = new (_GenericProvider().GenericProvider)({
         provider: "generic",
         url: options
-      }, this);
+      }, this, (0, _providerFactory().isUrlProbablySupportMultiRangeRequests)(options));
     } else {
       provider = (0, _providerFactory().createClient)(options, this);
     }
@@ -365,7 +371,11 @@ class AppUpdater extends _events().EventEmitter {
       const downloadPromise = it.downloadPromise;
 
       if (downloadPromise == null) {
-        this._logger.warn("checkForUpdatesAndNotify called, but downloadPromise is null");
+        const debug = this._logger.debug;
+
+        if (debug != null) {
+          debug("checkForUpdatesAndNotify called, downloadPromise is null");
+        }
 
         return;
       }
@@ -441,44 +451,77 @@ class AppUpdater extends _events().EventEmitter {
     return headers;
   }
 
-  getUpdateInfo() {
+  isUpdateAvailable(updateInfo) {
     var _this3 = this;
 
     return (0, _bluebirdLst().coroutine)(function* () {
-      yield _this3.untilAppReady;
+      const latestVersion = (0, _semver().parse)(updateInfo.version);
 
-      if (_this3.clientPromise == null) {
-        _this3.clientPromise = _this3.configOnDisk.value.then(it => (0, _providerFactory().createClient)(it, _this3));
+      if (latestVersion == null) {
+        throw (0, _builderUtilRuntime().newError)(`This file could not be downloaded, or the latest version (from update server) does not have a valid semver version: "${latestVersion}"`, "ERR_UPDATER_INVALID_VERSION");
       }
 
-      const client = yield _this3.clientPromise;
-      const stagingUserId = yield _this3.stagingUserIdPromise.value;
-      client.setRequestHeaders(_this3.computeFinalHeaders({
-        "X-User-Staging-Id": stagingUserId
-      }));
-      return yield client.getLatestVersion();
+      const currentVersion = _this3.currentVersion;
+
+      if ((0, _semver().eq)(latestVersion, currentVersion)) {
+        return false;
+      }
+
+      const isStagingMatch = yield _this3.isStagingMatch(updateInfo);
+
+      if (!isStagingMatch) {
+        return false;
+      } // https://github.com/electron-userland/electron-builder/pull/3111#issuecomment-405033227
+      // https://github.com/electron-userland/electron-builder/pull/3111#issuecomment-405030797
+
+
+      const isLatestVersionNewer = (0, _semver().gt)(latestVersion, currentVersion);
+
+      if (!_this3.allowDowngrade) {
+        return isLatestVersionNewer;
+      }
+
+      const currentVersionPrereleaseComponent = (0, _semver().prerelease)(currentVersion);
+      const latestVersionPrereleaseComponent = (0, _semver().prerelease)(latestVersion);
+
+      if (currentVersionPrereleaseComponent === latestVersionPrereleaseComponent) {
+        // allowDowngrade taken in account only if channel differs
+        return isLatestVersionNewer;
+      }
+
+      return true;
     })();
   }
 
-  doCheckForUpdates() {
+  getUpdateInfo() {
     var _this4 = this;
 
     return (0, _bluebirdLst().coroutine)(function* () {
-      const updateInfo = yield _this4.getUpdateInfo();
-      const latestVersion = (0, _semver().valid)(updateInfo.version);
+      yield _this4.untilAppReady;
 
-      if (latestVersion == null) {
-        throw (0, _builderUtilRuntime().newError)(`Latest version (from update server) is not valid semver version: "${latestVersion}`, "ERR_UPDATER_INVALID_VERSION");
+      if (_this4.clientPromise == null) {
+        _this4.clientPromise = _this4.configOnDisk.value.then(it => (0, _providerFactory().createClient)(it, _this4));
       }
 
-      const isStagingMatch = yield _this4.isStagingMatch(updateInfo);
+      const client = yield _this4.clientPromise;
+      const stagingUserId = yield _this4.stagingUserIdPromise.value;
+      client.setRequestHeaders(_this4.computeFinalHeaders({
+        "x-user-staging-id": stagingUserId
+      }));
+      return yield client.getLatestVersion();
+    })();
+  }
+
+  doCheckForUpdates() {
+    var _this5 = this;
 
-      if (!isStagingMatch || (_this4.allowDowngrade && !hasPrereleaseComponents(latestVersion) ? (0, _semver().eq)(latestVersion, _this4.currentVersion) : !(0, _semver().gt)(latestVersion, _this4.currentVersion))) {
-        _this4.updateAvailable = false;
+    return (0, _bluebirdLst().coroutine)(function* () {
+      const updateInfo = yield _this5.getUpdateInfo();
 
-        _this4._logger.info(`Update for version ${_this4.currentVersion} is not available (latest version: ${updateInfo.version}, downgrade is ${_this4.allowDowngrade ? "allowed" : "disallowed"}).`);
+      if (!(yield _this5.isUpdateAvailable(updateInfo))) {
+        _this5._logger.info(`Update for version ${_this5.currentVersion} is not available (latest version: ${updateInfo.version}, downgrade is ${_this5.allowDowngrade ? "allowed" : "disallowed"}).`);
 
-        _this4.emit("update-not-available", updateInfo);
+        _this5.emit("update-not-available", updateInfo);
 
         return {
           versionInfo: updateInfo,
@@ -486,10 +529,9 @@ class AppUpdater extends _events().EventEmitter {
         };
       }
 
-      _this4.updateAvailable = true;
-      _this4.updateInfo = updateInfo;
+      _this5.updateInfo = updateInfo;
 
-      _this4.onUpdateAvailable(updateInfo);
+      _this5.onUpdateAvailable(updateInfo);
 
       const cancellationToken = new (_builderUtilRuntime().CancellationToken)(); //noinspection ES6MissingAwait
 
@@ -497,7 +539,7 @@ class AppUpdater extends _events().EventEmitter {
         versionInfo: updateInfo,
         updateInfo,
         cancellationToken,
-        downloadPromise: _this4.autoDownload ? _this4.downloadUpdate(cancellationToken) : null
+        downloadPromise: _this5.autoDownload ? _this5.downloadUpdate(cancellationToken) : null
       };
     })();
   }
@@ -514,25 +556,29 @@ class AppUpdater extends _events().EventEmitter {
 
 
   downloadUpdate(cancellationToken = new (_builderUtilRuntime().CancellationToken)()) {
-    var _this5 = this;
+    var _this6 = this;
 
     return (0, _bluebirdLst().coroutine)(function* () {
-      const updateInfo = _this5.updateInfo;
+      const updateInfo = _this6.updateInfo;
 
       if (updateInfo == null) {
         const error = new Error("Please check update first");
 
-        _this5.dispatchError(error);
+        _this6.dispatchError(error);
 
         throw error;
       }
 
-      _this5._logger.info(`Downloading update from ${(0, _builderUtilRuntime().asArray)(updateInfo.files).map(it => it.url).join(", ")}`);
+      _this6._logger.info(`Downloading update from ${(0, _builderUtilRuntime().asArray)(updateInfo.files).map(it => it.url).join(", ")}`);
 
       try {
-        return yield _this5.doDownloadUpdate(updateInfo, cancellationToken);
+        return yield _this6.doDownloadUpdate({
+          updateInfo,
+          requestHeaders: yield _this6.computeRequestHeaders(),
+          cancellationToken
+        });
       } catch (e) {
-        _this5.dispatchError(e);
+        _this6.dispatchError(e);
 
         throw e;
       }
@@ -544,41 +590,39 @@ class AppUpdater extends _events().EventEmitter {
   }
 
   loadUpdateConfig() {
-    var _this6 = this;
+    var _this7 = this;
 
     return (0, _bluebirdLst().coroutine)(function* () {
-      if (_this6._appUpdateConfigPath == null) {
-        _this6._appUpdateConfigPath = _electronIsDev().default ? path.join(_this6.app.getAppPath(), "dev-app-update.yml") : path.join(process.resourcesPath, "app-update.yml");
+      if (_this7._appUpdateConfigPath == null) {
+        _this7._appUpdateConfigPath = _electronIsDev().default ? path.join(_this7.app.getAppPath(), "dev-app-update.yml") : path.join(process.resourcesPath, "app-update.yml");
       }
 
-      return (0, _jsYaml().safeLoad)((yield (0, _fsExtraP().readFile)(_this6._appUpdateConfigPath, "utf-8")));
+      return (0, _jsYaml().safeLoad)((yield (0, _fsExtraP().readFile)(_this7._appUpdateConfigPath, "utf-8")));
     })();
   }
-  /*** @private */
-
 
   computeRequestHeaders() {
-    var _this7 = this;
+    var _this8 = this;
 
     return (0, _bluebirdLst().coroutine)(function* () {
-      const fileExtraDownloadHeaders = (yield _this7.provider).fileExtraDownloadHeaders;
+      const fileExtraDownloadHeaders = (yield _this8.provider).fileExtraDownloadHeaders;
 
       if (fileExtraDownloadHeaders != null) {
-        const requestHeaders = _this7.requestHeaders;
+        const requestHeaders = _this8.requestHeaders;
         return requestHeaders == null ? fileExtraDownloadHeaders : Object.assign({}, fileExtraDownloadHeaders, requestHeaders);
       }
 
-      return _this7.computeFinalHeaders({
-        Accept: "*/*"
+      return _this8.computeFinalHeaders({
+        accept: "*/*"
       });
     })();
   }
 
   getOrCreateStagingUserId() {
-    var _this8 = this;
+    var _this9 = this;
 
     return (0, _bluebirdLst().coroutine)(function* () {
-      const file = path.join(_this8.app.getPath("userData"), ".updaterId");
+      const file = path.join(_this9.app.getPath("userData"), ".updaterId");
 
       try {
         const id = yield (0, _fsExtraP().readFile)(file, "utf-8");
@@ -586,27 +630,163 @@ class AppUpdater extends _events().EventEmitter {
         if (_builderUtilRuntime().UUID.check(id)) {
           return id;
         } else {
-          _this8._logger.warn(`Staging user id file exists, but content was invalid: ${id}`);
+          _this9._logger.warn(`Staging user id file exists, but content was invalid: ${id}`);
         }
       } catch (e) {
         if (e.code !== "ENOENT") {
-          _this8._logger.warn(`Couldn't read staging user ID, creating a blank one: ${e}`);
+          _this9._logger.warn(`Couldn't read staging user ID, creating a blank one: ${e}`);
         }
       }
 
       const id = _builderUtilRuntime().UUID.v5((0, _crypto().randomBytes)(4096), _builderUtilRuntime().UUID.OID);
 
-      _this8._logger.info(`Generated new staging user ID: ${id}`);
+      _this9._logger.info(`Generated new staging user ID: ${id}`);
 
       try {
         yield (0, _fsExtraP().outputFile)(file, id);
       } catch (e) {
-        _this8._logger.warn(`Couldn't write out staging user ID: ${e}`);
+        _this9._logger.warn(`Couldn't write out staging user ID: ${e}`);
       }
 
       return id;
     })();
   }
+  /** @internal */
+
+
+  get isAddNoCacheQuery() {
+    const headers = this.requestHeaders; // https://github.com/electron-userland/electron-builder/issues/3021
+
+    if (headers == null) {
+      return true;
+    }
+
+    for (const headerName of Object.keys(headers)) {
+      const s = headerName.toLowerCase();
+
+      if (s === "authorization" || s === "private-token") {
+        return false;
+      }
+    }
+
+    return true;
+  }
+
+  executeDownload(taskOptions) {
+    var _this10 = this;
+
+    return (0, _bluebirdLst().coroutine)(function* () {
+      const fileInfo = taskOptions.fileInfo;
+      const downloadOptions = {
+        skipDirCreation: true,
+        headers: taskOptions.downloadUpdateOptions.requestHeaders,
+        cancellationToken: taskOptions.downloadUpdateOptions.cancellationToken,
+        sha2: fileInfo.info.sha2,
+        sha512: fileInfo.info.sha512
+      };
+
+      if (_this10.listenerCount(_main().DOWNLOAD_PROGRESS) > 0) {
+        downloadOptions.onProgress = it => _this10.emit(_main().DOWNLOAD_PROGRESS, it);
+      }
+
+      const updateInfo = taskOptions.downloadUpdateOptions.updateInfo;
+      const version = updateInfo.version;
+      const packageInfo = fileInfo.packageInfo;
+
+      function getCacheUpdateFileName() {
+        // bloody NodeJS URL doesn't decode automatically
+        const urlPath = decodeURIComponent(taskOptions.fileInfo.url.pathname);
+
+        if (urlPath.endsWith(`.${taskOptions.fileExtension}`)) {
+          return path.posix.basename(urlPath);
+        } else {
+          // url like /latest, generate name
+          return `update.${taskOptions.fileExtension}`;
+        }
+      }
+
+      const cacheDir = _this10.downloadedUpdateHelper.cacheDir;
+      yield (0, _fsExtraP().ensureDir)(cacheDir);
+      const updateFileName = getCacheUpdateFileName();
+      let updateFile = path.join(cacheDir, updateFileName);
+      const packageFile = packageInfo == null ? null : path.join(cacheDir, `package-${version}${path.extname(packageInfo.path) || ".7z"}`);
+
+      const done = (() => {
+        var _ref = (0, _bluebirdLst().coroutine)(function* (isSaveCache) {
+          _this10.downloadedUpdateHelper.setDownloadedFile(updateFile, packageFile, updateInfo, fileInfo);
+
+          if (isSaveCache) {
+            yield _this10.downloadedUpdateHelper.cacheUpdateInfo(updateFileName);
+          }
+
+          _this10.emit(_main().UPDATE_DOWNLOADED, updateInfo);
+
+          yield taskOptions.done(updateFile);
+          return packageFile == null ? [updateFile] : [updateFile, packageFile];
+        });
+
+        return function done(_x) {
+          return _ref.apply(this, arguments);
+        };
+      })();
+
+      const log = _this10._logger;
+      const cachedUpdateFile = yield _this10.downloadedUpdateHelper.validateDownloadedPath(updateFile, updateInfo, fileInfo, log);
+
+      if (cachedUpdateFile != null) {
+        updateFile = cachedUpdateFile;
+        return yield done(false);
+      }
+
+      const removeFileIfAny = (() => {
+        var _ref2 = (0, _bluebirdLst().coroutine)(function* () {
+          yield _this10.downloadedUpdateHelper.clear().catch(() => {// ignore
+          });
+          return yield (0, _fsExtraP().unlink)(updateFile).catch(() => {// ignore
+          });
+        });
+
+        return function removeFileIfAny() {
+          return _ref2.apply(this, arguments);
+        };
+      })(); // https://github.com/electron-userland/electron-builder/pull/2474#issuecomment-366481912
+
+
+      let nameCounter = 0;
+      let tempUpdateFile = path.join(cacheDir, `temp-${updateFileName}`);
+
+      for (let i = 0; i < 3; i++) {
+        try {
+          yield (0, _fsExtraP().unlink)(tempUpdateFile);
+        } catch (e) {
+          if (e.code === "ENOENT") {
+            break;
+          }
+
+          log.warn(`Error on remove temp update file: ${e}`);
+          tempUpdateFile = path.join(cacheDir, `temp-${nameCounter++}-${updateFileName}`);
+        }
+      }
+
+      try {
+        yield taskOptions.task(tempUpdateFile, downloadOptions, packageFile, removeFileIfAny);
+        yield (0, _fsExtraP().rename)(tempUpdateFile, updateFile);
+      } catch (e) {
+        yield removeFileIfAny();
+
+        if (e instanceof _builderUtilRuntime().CancellationError) {
+          log.info("Cancelled");
+
+          _this10.emit("update-cancelled", updateInfo);
+        }
+
+        throw e;
+      }
+
+      log.info(`New version ${version} has been downloaded to ${updateFile}`);
+      return yield done(true);
+    })();
+  }
 
 }
 

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
resources/app/node_modules/electron-updater/out/AppUpdater.js.map


+ 2 - 10
resources/app/node_modules/electron-updater/out/BaseUpdater.d.ts

@@ -1,6 +1,5 @@
-import { UpdateInfo, AllPublishOptions, DownloadOptions } from "builder-util-runtime";
-import { AppUpdater } from "./AppUpdater";
-import { ResolvedUpdateFileInfo } from "./main";
+import { AllPublishOptions } from "builder-util-runtime";
+import { AppUpdater, DownloadExecutorTask } from "./AppUpdater";
 export declare abstract class BaseUpdater extends AppUpdater {
     protected quitAndInstallCalled: boolean;
     private quitHandlerAdded;
@@ -11,10 +10,3 @@ export declare abstract class BaseUpdater extends AppUpdater {
     protected install(isSilent: boolean, isRunAfter: boolean): Promise<boolean>;
     protected addQuitHandler(): void;
 }
-export interface DownloadExecutorTask {
-    readonly fileExtension: string;
-    readonly downloadOptions: DownloadOptions;
-    readonly fileInfo: ResolvedUpdateFileInfo;
-    readonly updateInfo: UpdateInfo;
-    readonly task: (destinationFile: string, packageFile: string | null, removeTempDirIfAny: () => Promise<any>) => Promise<any>;
-}

+ 9 - 105
resources/app/node_modules/electron-updater/out/BaseUpdater.js

@@ -15,28 +15,6 @@ function _bluebirdLst() {
   return data;
 }
 
-function _builderUtilRuntime() {
-  const data = require("builder-util-runtime");
-
-  _builderUtilRuntime = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _fsExtraP() {
-  const data = require("fs-extra-p");
-
-  _fsExtraP = function () {
-    return data;
-  };
-
-  return data;
-}
-
-var path = _interopRequireWildcard(require("path"));
-
 function _AppUpdater() {
   const data = require("./AppUpdater");
 
@@ -47,18 +25,6 @@ function _AppUpdater() {
   return data;
 }
 
-function _main() {
-  const data = require("./main");
-
-  _main = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
 class BaseUpdater extends _AppUpdater().AppUpdater {
   constructor(options, app) {
     super(options, app);
@@ -89,79 +55,17 @@ class BaseUpdater extends _AppUpdater().AppUpdater {
   executeDownload(taskOptions) {
     var _this2 = this;
 
-    return (0, _bluebirdLst().coroutine)(function* () {
-      if (_this2.listenerCount(_main().DOWNLOAD_PROGRESS) > 0) {
-        taskOptions.downloadOptions.onProgress = it => _this2.emit(_main().DOWNLOAD_PROGRESS, it);
-      }
-
-      const updateInfo = taskOptions.updateInfo;
-      const version = updateInfo.version;
-      const fileInfo = taskOptions.fileInfo;
-      const packageInfo = fileInfo.packageInfo;
-      const cacheDir = _this2.downloadedUpdateHelper.cacheDir;
-      yield (0, _fsExtraP().ensureDir)(cacheDir);
-      const updateFileName = taskOptions.fileExtension === "AppImage" ? path.basename(updateInfo.path) : `installer-${version}.${taskOptions.fileExtension}`;
-      const updateFile = path.join(cacheDir, updateFileName);
-      const packageFile = packageInfo == null ? null : path.join(cacheDir, `package-${version}.${path.extname(packageInfo.path) || "7z"}`);
-
-      const done = () => {
-        _this2.downloadedUpdateHelper.setDownloadedFile(updateFile, packageFile, updateInfo, fileInfo);
-
-        _this2.addQuitHandler();
-
-        _this2.emit(_main().UPDATE_DOWNLOADED, updateInfo);
-
-        return packageFile == null ? [updateFile] : [updateFile, packageFile];
-      };
-
-      const log = _this2._logger;
-
-      if (yield _this2.downloadedUpdateHelper.validateDownloadedPath(updateFile, updateInfo, fileInfo, log)) {
-        return done();
-      }
-
-      const removeFileIfAny = () => {
-        _this2.downloadedUpdateHelper.clear();
-
-        return (0, _fsExtraP().unlink)(updateFile).catch(() => {// ignored
+    return super.executeDownload(Object.assign({}, taskOptions, {
+      done: (() => {
+        var _ref = (0, _bluebirdLst().coroutine)(function* () {
+          _this2.addQuitHandler();
         });
-      }; // https://github.com/electron-userland/electron-builder/pull/2474#issuecomment-366481912
 
-
-      let nameCounter = 0;
-      let tempUpdateFile = path.join(cacheDir, `temp-${updateFileName}`);
-
-      for (let i = 0; i < 3; i++) {
-        try {
-          yield (0, _fsExtraP().unlink)(tempUpdateFile);
-        } catch (e) {
-          if (e.code === "ENOENT") {
-            break;
-          }
-
-          log.warn(`Error on remove temp update file: ${e}`);
-          tempUpdateFile = path.join(cacheDir, `temp-${nameCounter++}-${updateFileName}`);
-        }
-      }
-
-      try {
-        yield taskOptions.task(tempUpdateFile, packageFile, removeFileIfAny);
-        yield (0, _fsExtraP().rename)(tempUpdateFile, updateFile);
-      } catch (e) {
-        yield removeFileIfAny();
-
-        if (e instanceof _builderUtilRuntime().CancellationError) {
-          log.info("Cancelled");
-
-          _this2.emit("update-cancelled", updateInfo);
-        }
-
-        throw e;
-      }
-
-      log.info(`New version ${version} has been downloaded to ${updateFile}`);
-      return done();
-    })();
+        return function done() {
+          return _ref.apply(this, arguments);
+        };
+      })()
+    }));
   }
 
   install(isSilent, isRunAfter) {

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
resources/app/node_modules/electron-updater/out/BaseUpdater.js.map


+ 0 - 10
resources/app/node_modules/electron-updater/out/BintrayProvider.d.ts

@@ -1,10 +0,0 @@
-import { BintrayOptions, HttpExecutor, UpdateInfo } from "builder-util-runtime";
-import { Provider, ResolvedUpdateFileInfo } from "./main";
-export declare class BintrayProvider extends Provider<UpdateInfo> {
-    private client;
-    private readonly baseUrl;
-    constructor(configuration: BintrayOptions, httpExecutor: HttpExecutor<any>);
-    setRequestHeaders(value: any): void;
-    getLatestVersion(): Promise<UpdateInfo>;
-    resolveFiles(updateInfo: UpdateInfo): Array<ResolvedUpdateFileInfo>;
-}

+ 0 - 112
resources/app/node_modules/electron-updater/out/BintrayProvider.js

@@ -1,112 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.BintrayProvider = void 0;
-
-function _bluebirdLst() {
-  const data = require("bluebird-lst");
-
-  _bluebirdLst = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _builderUtilRuntime() {
-  const data = require("builder-util-runtime");
-
-  _builderUtilRuntime = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _bintray() {
-  const data = require("builder-util-runtime/out/bintray");
-
-  _bintray = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _url() {
-  const data = require("url");
-
-  _url = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _main() {
-  const data = require("./main");
-
-  _main = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _Provider() {
-  const data = require("./Provider");
-
-  _Provider = function () {
-    return data;
-  };
-
-  return data;
-}
-
-class BintrayProvider extends _main().Provider {
-  constructor(configuration, httpExecutor) {
-    super(httpExecutor);
-    this.client = new (_bintray().BintrayClient)(configuration, httpExecutor, new (_builderUtilRuntime().CancellationToken)());
-    this.baseUrl = (0, _main().newBaseUrl)(`https://dl.bintray.com/${this.client.owner}/${this.client.repo}`);
-  }
-
-  setRequestHeaders(value) {
-    super.setRequestHeaders(value);
-    this.client.setRequestHeaders(value);
-  }
-
-  getLatestVersion() {
-    var _this = this;
-
-    return (0, _bluebirdLst().coroutine)(function* () {
-      try {
-        const data = yield _this.client.getVersion("_latest");
-        const channelFilename = (0, _main().getChannelFilename)((0, _main().getDefaultChannelName)());
-        const files = yield _this.client.getVersionFiles(data.name);
-        const channelFile = files.find(it => it.name.endsWith(`_${channelFilename}`) || it.name.endsWith(`-${channelFilename}`));
-
-        if (channelFile == null) {
-          // noinspection ExceptionCaughtLocallyJS
-          throw (0, _builderUtilRuntime().newError)(`Cannot find channel file "${channelFilename}", existing files:\n${files.map(it => JSON.stringify(it, null, 2)).join(",\n")}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND");
-        }
-
-        const channelFileUrl = new (_url().URL)(`https://dl.bintray.com/${_this.client.owner}/${_this.client.repo}/${channelFile.name}`);
-        return (0, _Provider().parseUpdateInfo)((yield _this.httpRequest(channelFileUrl)), channelFilename, channelFileUrl);
-      } catch (e) {
-        if ("statusCode" in e && e.statusCode === 404) {
-          throw (0, _builderUtilRuntime().newError)(`No latest version, please ensure that user, package and repository correctly configured. Or at least one version is published. ${e.stack || e.message}`, "ERR_UPDATER_LATEST_VERSION_NOT_FOUND");
-        }
-
-        throw e;
-      }
-    })();
-  }
-
-  resolveFiles(updateInfo) {
-    return (0, _Provider().resolveFiles)(updateInfo, this.baseUrl);
-  }
-
-} exports.BintrayProvider = BintrayProvider;
-//# sourceMappingURL=BintrayProvider.js.map

Файловите разлики са ограничени, защото са твърде много
+ 0 - 1
resources/app/node_modules/electron-updater/out/BintrayProvider.js.map


+ 5 - 3
resources/app/node_modules/electron-updater/out/DownloadedUpdateHelper.d.ts

@@ -10,8 +10,10 @@ export declare class DownloadedUpdateHelper {
     constructor(cacheDir: string);
     readonly file: string | null;
     readonly packageFile: string | null;
-    validateDownloadedPath(updateFile: string, versionInfo: UpdateInfo, fileInfo: ResolvedUpdateFileInfo, logger: Logger): Promise<boolean>;
+    validateDownloadedPath(updateFile: string, versionInfo: UpdateInfo, fileInfo: ResolvedUpdateFileInfo, logger: Logger): Promise<string | null>;
     setDownloadedFile(downloadedFile: string, packageFile: string | null, versionInfo: UpdateInfo, fileInfo: ResolvedUpdateFileInfo): void;
-    clear(): void;
-    private static isUpdateValid(updateFile, fileInfo, logger);
+    cacheUpdateInfo(updateFileName: string): Promise<void>;
+    clear(): Promise<void>;
+    private cleanCacheDir;
+    private getValidCachedUpdateFile;
 }

+ 89 - 15
resources/app/node_modules/electron-updater/out/DownloadedUpdateHelper.js

@@ -55,6 +55,10 @@ function _fsExtraP() {
   return data;
 }
 
+var path = _interopRequireWildcard(require("path"));
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
+
 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
 /** @private **/
@@ -79,19 +83,25 @@ class DownloadedUpdateHelper {
     var _this = this;
 
     return (0, _bluebirdLst().coroutine)(function* () {
-      if (_this.versionInfo != null && _this.file === updateFile) {
+      if (_this.versionInfo != null && _this.file === updateFile && _this.fileInfo != null) {
         // update has already been downloaded from this running instance
         // check here only existence, not checksum
-        return (0, _lodash().default)(_this.versionInfo, versionInfo) && (0, _lodash().default)(_this.fileInfo, fileInfo) && (yield (0, _fsExtraP().pathExists)(updateFile));
+        if ((0, _lodash().default)(_this.versionInfo, versionInfo) && (0, _lodash().default)(_this.fileInfo.info, fileInfo.info) && (yield (0, _fsExtraP().pathExists)(updateFile))) {
+          return updateFile;
+        } else {
+          return null;
+        }
       } // update has already been downloaded from some previous app launch
 
 
-      if (yield DownloadedUpdateHelper.isUpdateValid(updateFile, fileInfo, logger)) {
-        logger.info(`Update has already been downloaded ${updateFile}).`);
-        return true;
+      const cachedUpdateFile = yield _this.getValidCachedUpdateFile(fileInfo, logger);
+
+      if (cachedUpdateFile == null) {
+        return null;
       }
 
-      return false;
+      logger.info(`Update has already been downloaded to ${updateFile}).`);
+      return cachedUpdateFile;
     })();
   }
 
@@ -102,28 +112,92 @@ class DownloadedUpdateHelper {
     this.fileInfo = fileInfo;
   }
 
+  cacheUpdateInfo(updateFileName) {
+    var _this2 = this;
+
+    return (0, _bluebirdLst().coroutine)(function* () {
+      const data = {
+        fileName: updateFileName,
+        sha512: _this2.fileInfo.info.sha512
+      };
+      yield (0, _fsExtraP().outputJson)(path.join(_this2.cacheDir, "update-info.json"), data);
+    })();
+  }
+
   clear() {
-    this._file = null;
-    this._packageFile = null;
-    this.versionInfo = null;
-    this.fileInfo = null;
+    var _this3 = this;
+
+    return (0, _bluebirdLst().coroutine)(function* () {
+      _this3._file = null;
+      _this3._packageFile = null;
+      _this3.versionInfo = null;
+      _this3.fileInfo = null;
+      yield _this3.cleanCacheDir();
+    })();
+  }
+
+  cleanCacheDir() {
+    var _this4 = this;
+
+    return (0, _bluebirdLst().coroutine)(function* () {
+      try {
+        // remove stale data
+        yield (0, _fsExtraP().emptyDir)(_this4.cacheDir);
+      } catch (ignore) {// ignore
+      }
+    })();
   }
 
-  static isUpdateValid(updateFile, fileInfo, logger) {
+  getValidCachedUpdateFile(fileInfo, logger) {
+    var _this5 = this;
+
     return (0, _bluebirdLst().coroutine)(function* () {
+      let cachedInfo;
+      const updateInfoFile = path.join(_this5.cacheDir, "update-info.json");
+
+      try {
+        cachedInfo = yield (0, _fsExtraP().readJson)(updateInfoFile);
+      } catch (e) {
+        let message = `No cached update info available`;
+
+        if (e.code !== "ENOENT") {
+          yield _this5.cleanCacheDir();
+          message += ` (error on read: ${e.message})`;
+        }
+
+        logger.info(message);
+        return null;
+      }
+
+      if (cachedInfo.fileName == null) {
+        logger.warn(`Cached update info is corrupted: no fileName, directory for cached update will be cleaned`);
+        yield _this5.cleanCacheDir();
+        return null;
+      }
+
+      if (fileInfo.info.sha512 !== cachedInfo.sha512) {
+        logger.info(`Cached update sha512 checksum doesn't match the latest available update. New update must be downloaded. Cached: ${cachedInfo.sha512}, expected: ${fileInfo.info.sha512}. Directory for cached update will be cleaned`);
+        yield _this5.cleanCacheDir();
+        return null;
+      }
+
+      const updateFile = path.join(_this5.cacheDir, cachedInfo.fileName);
+
       if (!(yield (0, _fsExtraP().pathExists)(updateFile))) {
-        logger.info("No cached update available");
-        return false;
+        logger.info("Cached update file doesn't exist, directory for cached update will be cleaned");
+        yield _this5.cleanCacheDir();
+        return null;
       }
 
       const sha512 = yield hashFile(updateFile);
 
       if (fileInfo.info.sha512 !== sha512) {
         logger.warn(`Sha512 checksum doesn't match the latest available update. New update must be downloaded. Cached: ${sha512}, expected: ${fileInfo.info.sha512}`);
-        return false;
+        yield _this5.cleanCacheDir();
+        return null;
       }
 
-      return true;
+      return updateFile;
     })();
   }
 

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
resources/app/node_modules/electron-updater/out/DownloadedUpdateHelper.js.map


+ 0 - 12
resources/app/node_modules/electron-updater/out/GenericProvider.d.ts

@@ -1,12 +0,0 @@
-import { GenericServerOptions, UpdateInfo } from "builder-util-runtime";
-import { AppUpdater } from "./AppUpdater";
-import { Provider, ResolvedUpdateFileInfo } from "./main";
-export declare class GenericProvider extends Provider<UpdateInfo> {
-    private readonly configuration;
-    private readonly updater;
-    private readonly baseUrl;
-    constructor(configuration: GenericServerOptions, updater: AppUpdater, useMultipleRangeRequest?: boolean);
-    private readonly channel;
-    getLatestVersion(): Promise<UpdateInfo>;
-    resolveFiles(updateInfo: UpdateInfo): Array<ResolvedUpdateFileInfo>;
-}

+ 0 - 106
resources/app/node_modules/electron-updater/out/GenericProvider.js

@@ -1,106 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.GenericProvider = void 0;
-
-function _bluebirdLst() {
-  const data = require("bluebird-lst");
-
-  _bluebirdLst = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _builderUtilRuntime() {
-  const data = require("builder-util-runtime");
-
-  _builderUtilRuntime = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _main() {
-  const data = require("./main");
-
-  _main = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _Provider() {
-  const data = require("./Provider");
-
-  _Provider = function () {
-    return data;
-  };
-
-  return data;
-}
-
-class GenericProvider extends _main().Provider {
-  constructor(configuration, updater, useMultipleRangeRequest = true) {
-    super(updater.httpExecutor, useMultipleRangeRequest);
-    this.configuration = configuration;
-    this.updater = updater;
-    this.baseUrl = (0, _main().newBaseUrl)(this.configuration.url);
-  }
-
-  get channel() {
-    const result = this.updater.channel || this.configuration.channel;
-    return result == null ? (0, _main().getDefaultChannelName)() : (0, _main().getCustomChannelName)(result);
-  }
-
-  getLatestVersion() {
-    var _this = this;
-
-    return (0, _bluebirdLst().coroutine)(function* () {
-      let result;
-      const channelFile = (0, _main().getChannelFilename)(_this.channel);
-      const channelUrl = (0, _main().newUrlFromBase)(channelFile, _this.baseUrl, true);
-
-      for (let attemptNumber = 0;; attemptNumber++) {
-        try {
-          result = (0, _Provider().parseUpdateInfo)((yield _this.httpRequest(channelUrl)), channelFile, channelUrl);
-          break;
-        } catch (e) {
-          if (e instanceof _builderUtilRuntime().HttpError && e.statusCode === 404) {
-            throw (0, _builderUtilRuntime().newError)(`Cannot find channel "${channelFile}" update info: ${e.stack || e.message}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND");
-          } else if (e.code === "ECONNREFUSED") {
-            if (attemptNumber < 3) {
-              yield new Promise((resolve, reject) => {
-                try {
-                  setTimeout(resolve, 1000 * attemptNumber);
-                } catch (e) {
-                  reject(e);
-                }
-              });
-              continue;
-            }
-          }
-
-          throw e;
-        }
-      }
-
-      if ((0, _main().isUseOldMacProvider)()) {
-        result.releaseJsonUrl = channelUrl.href;
-      }
-
-      return result;
-    })();
-  }
-
-  resolveFiles(updateInfo) {
-    return (0, _Provider().resolveFiles)(updateInfo, this.baseUrl);
-  }
-
-} exports.GenericProvider = GenericProvider;
-//# sourceMappingURL=GenericProvider.js.map

Файловите разлики са ограничени, защото са твърде много
+ 0 - 1
resources/app/node_modules/electron-updater/out/GenericProvider.js.map


+ 0 - 22
resources/app/node_modules/electron-updater/out/GitHubProvider.d.ts

@@ -1,22 +0,0 @@
-import { GithubOptions, HttpExecutor, ReleaseNoteInfo, UpdateInfo, XElement } from "builder-util-runtime";
-import { URL } from "url";
-import { AppUpdater } from "./AppUpdater";
-import { Provider, ResolvedUpdateFileInfo } from "./main";
-export declare abstract class BaseGitHubProvider<T extends UpdateInfo> extends Provider<T> {
-    protected readonly options: GithubOptions;
-    protected readonly baseUrl: URL;
-    protected readonly baseApiUrl: URL;
-    protected constructor(options: GithubOptions, defaultHost: string, executor: HttpExecutor<any>);
-    protected computeGithubBasePath(result: string): string;
-}
-export declare class GitHubProvider extends BaseGitHubProvider<UpdateInfo> {
-    protected readonly options: GithubOptions;
-    private readonly updater;
-    constructor(options: GithubOptions, updater: AppUpdater, executor: HttpExecutor<any>);
-    getLatestVersion(): Promise<UpdateInfo>;
-    private getLatestVersionString(cancellationToken);
-    private readonly basePath;
-    resolveFiles(updateInfo: UpdateInfo): Array<ResolvedUpdateFileInfo>;
-    private getBaseDownloadPath(version, fileName);
-}
-export declare function computeReleaseNotes(currentVersion: string, isFullChangelog: boolean, feed: XElement, latestRelease: any): string | ReleaseNoteInfo[];

+ 0 - 239
resources/app/node_modules/electron-updater/out/GitHubProvider.js

@@ -1,239 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.computeReleaseNotes = computeReleaseNotes;
-exports.GitHubProvider = exports.BaseGitHubProvider = void 0;
-
-function _bluebirdLst() {
-  const data = require("bluebird-lst");
-
-  _bluebirdLst = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _builderUtilRuntime() {
-  const data = require("builder-util-runtime");
-
-  _builderUtilRuntime = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function semver() {
-  const data = _interopRequireWildcard(require("semver"));
-
-  semver = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _url() {
-  const data = require("url");
-
-  _url = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _main() {
-  const data = require("./main");
-
-  _main = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _Provider() {
-  const data = require("./Provider");
-
-  _Provider = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-const hrefRegExp = /\/tag\/v?([^\/]+)$/;
-
-class BaseGitHubProvider extends _main().Provider {
-  constructor(options, defaultHost, executor) {
-    super(executor, false
-    /* because GitHib uses S3 */
-    );
-    this.options = options;
-    this.baseUrl = (0, _main().newBaseUrl)((0, _builderUtilRuntime().githubUrl)(options, defaultHost));
-    const apiHost = defaultHost === "github.com" ? "api.github.com" : defaultHost;
-    this.baseApiUrl = (0, _main().newBaseUrl)((0, _builderUtilRuntime().githubUrl)(options, apiHost));
-  }
-
-  computeGithubBasePath(result) {
-    // https://github.com/electron-userland/electron-builder/issues/1903#issuecomment-320881211
-    const host = this.options.host;
-    return host != null && host !== "github.com" && host !== "api.github.com" ? `/api/v3${result}` : result;
-  }
-
-}
-
-exports.BaseGitHubProvider = BaseGitHubProvider;
-
-class GitHubProvider extends BaseGitHubProvider {
-  constructor(options, updater, executor) {
-    super(options, "github.com", executor);
-    this.options = options;
-    this.updater = updater;
-  }
-
-  getLatestVersion() {
-    var _this = this;
-
-    return (0, _bluebirdLst().coroutine)(function* () {
-      const cancellationToken = new (_builderUtilRuntime().CancellationToken)();
-      const feedXml = yield _this.httpRequest((0, _main().newUrlFromBase)(`${_this.basePath}.atom`, _this.baseUrl), {
-        Accept: "application/xml, application/atom+xml, text/xml, */*"
-      }, cancellationToken);
-      const feed = (0, _builderUtilRuntime().parseXml)(feedXml);
-      let latestRelease = feed.element("entry", false, `No published versions on GitHub`);
-      let version;
-
-      try {
-        if (_this.updater.allowPrerelease) {
-          // noinspection TypeScriptValidateJSTypes
-          version = latestRelease.element("link").attribute("href").match(hrefRegExp)[1];
-        } else {
-          version = yield _this.getLatestVersionString(cancellationToken);
-
-          for (const element of feed.getElements("entry")) {
-            if (element.element("link").attribute("href").match(hrefRegExp)[1] === version) {
-              latestRelease = element;
-              break;
-            }
-          }
-        }
-      } catch (e) {
-        throw (0, _builderUtilRuntime().newError)(`Cannot parse releases feed: ${e.stack || e.message},\nXML:\n${feedXml}`, "ERR_UPDATER_INVALID_RELEASE_FEED");
-      }
-
-      if (version == null) {
-        throw (0, _builderUtilRuntime().newError)(`No published versions on GitHub`, "ERR_UPDATER_NO_PUBLISHED_VERSIONS");
-      }
-
-      const channelFile = (0, _main().getChannelFilename)((0, _main().getDefaultChannelName)());
-      const channelFileUrl = (0, _main().newUrlFromBase)(_this.getBaseDownloadPath(version, channelFile), _this.baseUrl);
-
-      const requestOptions = _this.createRequestOptions(channelFileUrl);
-
-      let rawData;
-
-      try {
-        rawData = yield _this.executor.request(requestOptions, cancellationToken);
-      } catch (e) {
-        if (!_this.updater.allowPrerelease && e instanceof _builderUtilRuntime().HttpError && e.statusCode === 404) {
-          throw (0, _builderUtilRuntime().newError)(`Cannot find ${channelFile} in the latest release artifacts (${channelFileUrl}): ${e.stack || e.message}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND");
-        }
-
-        throw e;
-      }
-
-      const result = (0, _Provider().parseUpdateInfo)(rawData, channelFile, channelFileUrl);
-
-      if ((0, _main().isUseOldMacProvider)()) {
-        result.releaseJsonUrl = `${(0, _builderUtilRuntime().githubUrl)(_this.options)}/${requestOptions.path}`;
-      }
-
-      if (result.releaseName == null) {
-        result.releaseName = latestRelease.elementValueOrEmpty("title");
-      }
-
-      if (result.releaseNotes == null) {
-        result.releaseNotes = computeReleaseNotes(_this.updater.currentVersion, _this.updater.fullChangelog, feed, latestRelease);
-      }
-
-      return result;
-    })();
-  }
-
-  getLatestVersionString(cancellationToken) {
-    var _this2 = this;
-
-    return (0, _bluebirdLst().coroutine)(function* () {
-      const options = _this2.options; // do not use API for GitHub to avoid limit, only for custom host or GitHub Enterprise
-
-      const url = options.host == null || options.host === "github.com" ? (0, _main().newUrlFromBase)(`${_this2.basePath}/latest`, _this2.baseUrl) : new (_url().URL)(`${_this2.computeGithubBasePath(`/repos/${options.owner}/${options.repo}/releases`)}/latest`, _this2.baseApiUrl);
-
-      try {
-        const rawData = yield _this2.httpRequest(url, {
-          Accept: "application/json"
-        }, cancellationToken);
-
-        if (rawData == null) {
-          return null;
-        }
-
-        const releaseInfo = JSON.parse(rawData);
-        return releaseInfo.tag_name.startsWith("v") ? releaseInfo.tag_name.substring(1) : releaseInfo.tag_name;
-      } catch (e) {
-        throw (0, _builderUtilRuntime().newError)(`Unable to find latest version on GitHub (${url}), please ensure a production release exists: ${e.stack || e.message}`, "ERR_UPDATER_LATEST_VERSION_NOT_FOUND");
-      }
-    })();
-  }
-
-  get basePath() {
-    return `/${this.options.owner}/${this.options.repo}/releases`;
-  }
-
-  resolveFiles(updateInfo) {
-    // still replace space to - due to backward compatibility
-    return (0, _Provider().resolveFiles)(updateInfo, this.baseUrl, p => this.getBaseDownloadPath(updateInfo.version, p.replace(/ /g, "-")));
-  }
-
-  getBaseDownloadPath(version, fileName) {
-    return `${this.basePath}/download/${this.options.vPrefixedTagName === false ? "" : "v"}${version}/${fileName}`;
-  }
-
-}
-
-exports.GitHubProvider = GitHubProvider;
-
-function getNoteValue(parent) {
-  const result = parent.elementValueOrEmpty("content"); // GitHub reports empty notes as <content>No content.</content>
-
-  return result === "No content." ? "" : result;
-}
-
-function computeReleaseNotes(currentVersion, isFullChangelog, feed, latestRelease) {
-  if (!isFullChangelog) {
-    return getNoteValue(latestRelease);
-  }
-
-  const releaseNotes = [];
-
-  for (const release of feed.getElements("entry")) {
-    // noinspection TypeScriptValidateJSTypes
-    const versionRelease = release.element("link").attribute("href").match(/\/tag\/v?([^\/]+)$/)[1];
-
-    if (semver().lt(currentVersion, versionRelease)) {
-      releaseNotes.push({
-        version: versionRelease,
-        note: getNoteValue(release)
-      });
-    }
-  }
-
-  return releaseNotes.sort((a, b) => semver().rcompare(a.version, b.version));
-} 
-//# sourceMappingURL=GitHubProvider.js.map

Файловите разлики са ограничени, защото са твърде много
+ 0 - 1
resources/app/node_modules/electron-updater/out/GitHubProvider.js.map


+ 4 - 4
resources/app/node_modules/electron-updater/out/MacUpdater.d.ts

@@ -1,9 +1,9 @@
-import { AllPublishOptions, CancellationToken, UpdateInfo } from "builder-util-runtime";
-import { AppUpdater } from "./AppUpdater";
+import { AllPublishOptions } from "builder-util-runtime";
+import { AppUpdater, DownloadUpdateOptions } from "./AppUpdater";
 export declare class MacUpdater extends AppUpdater {
     private readonly nativeUpdater;
     constructor(options?: AllPublishOptions);
-    protected doDownloadUpdate(updateInfo: UpdateInfo, cancellationToken: CancellationToken): Promise<Array<string>>;
-    private doProxyUpdateFile(nativeResponse, url, headers, sha512, cancellationToken, errorHandler);
+    protected doDownloadUpdate(downloadUpdateOptions: DownloadUpdateOptions): Promise<Array<string>>;
+    private doProxyUpdateFile;
     quitAndInstall(): void;
 }

+ 92 - 98
resources/app/node_modules/electron-updater/out/MacUpdater.js

@@ -56,7 +56,7 @@ function _main() {
 }
 
 function _Provider() {
-  const data = require("./Provider");
+  const data = require("./providers/Provider");
 
   _Provider = function () {
     return data;
@@ -65,6 +65,16 @@ function _Provider() {
   return data;
 }
 
+function _fsExtraP() {
+  const data = require("fs-extra-p");
+
+  _fsExtraP = function () {
+    return data;
+  };
+
+  return data;
+}
+
 class MacUpdater extends _AppUpdater().AppUpdater {
   constructor(options) {
     super(options);
@@ -74,18 +84,13 @@ class MacUpdater extends _AppUpdater().AppUpdater {
 
       this.emit("error", it);
     });
-    this.nativeUpdater.on("update-downloaded", () => {
-      this._logger.info(`New version ${this.updateInfo.version} has been downloaded`);
-
-      this.emit(_main().UPDATE_DOWNLOADED, this.updateInfo);
-    });
   }
 
-  doDownloadUpdate(updateInfo, cancellationToken) {
+  doDownloadUpdate(downloadUpdateOptions) {
     var _this = this;
 
     return (0, _bluebirdLst().coroutine)(function* () {
-      const files = (yield _this.provider).resolveFiles(updateInfo);
+      const files = (yield _this.provider).resolveFiles(downloadUpdateOptions.updateInfo);
       const zipFileInfo = (0, _Provider().findFile)(files, "zip", ["pkg", "dmg"]);
 
       if (zipFileInfo == null) {
@@ -102,67 +107,90 @@ class MacUpdater extends _AppUpdater().AppUpdater {
         return `http://${address.address}:${address.port}`;
       }
 
-      const requestHeaders = yield _this.computeRequestHeaders();
-      return yield new Promise((resolve, reject) => {
-        server.on("request", (request, response) => {
-          const requestUrl = request.url;
-
-          _this._logger.info(`${requestUrl} requested`);
-
-          if (requestUrl === "/") {
-            const data = Buffer.from(`{ "url": "${getServerUrl()}/app.zip" }`);
-            response.writeHead(200, {
-              "Content-Type": "application/json",
-              "Content-Length": data.length
-            });
-            response.end(data);
-          } else if (requestUrl.startsWith("/app.zip")) {
-            const debug = _this._logger.debug;
-            let errorOccurred = false;
-            response.on("finish", () => {
-              try {
-                setImmediate(() => server.close());
-              } finally {
-                if (!errorOccurred) {
-                  _this.nativeUpdater.removeListener("error", reject);
-
-                  resolve([]);
-                }
-              }
-            });
-
-            if (debug != null) {
-              debug(`app.zip requested by Squirrel.Mac, download ${zipFileInfo.url.href}`);
+      return yield _this.executeDownload({
+        fileExtension: "zip",
+        fileInfo: zipFileInfo,
+        downloadUpdateOptions,
+        task: (destinationFile, downloadOptions) => {
+          return _this.httpExecutor.download(zipFileInfo.url.href, destinationFile, downloadOptions);
+        },
+        done: (() => {
+          var _ref = (0, _bluebirdLst().coroutine)(function* (updateFile) {
+            let updateFileSize = zipFileInfo.info.size;
+
+            if (updateFileSize == null) {
+              updateFileSize = (yield (0, _fsExtraP().stat)(updateFile)).size;
             }
 
-            _this.doProxyUpdateFile(response, zipFileInfo.url.href, requestHeaders, zipFileInfo.info.sha512, cancellationToken, error => {
-              errorOccurred = true;
+            return yield new Promise((resolve, reject) => {
+              server.on("request", (request, response) => {
+                const requestUrl = request.url;
+
+                _this._logger.info(`${requestUrl} requested`);
+
+                if (requestUrl === "/") {
+                  const data = Buffer.from(`{ "url": "${getServerUrl()}/app.zip" }`);
+                  response.writeHead(200, {
+                    "Content-Type": "application/json",
+                    "Content-Length": data.length
+                  });
+                  response.end(data);
+                } else if (requestUrl.startsWith("/app.zip")) {
+                  let errorOccurred = false;
+                  response.on("finish", () => {
+                    try {
+                      setImmediate(() => server.close());
+                    } finally {
+                      if (!errorOccurred) {
+                        _this.nativeUpdater.removeListener("error", reject);
+
+                        resolve([]);
+                      }
+                    }
+                  });
+
+                  _this._logger.info(`app.zip requested by Squirrel.Mac, pipe ${updateFile}`);
+
+                  const readStream = (0, _fsExtraP().createReadStream)(updateFile);
+                  readStream.on("error", error => {
+                    try {
+                      response.end();
+                    } catch (e) {
+                      errorOccurred = true;
+
+                      _this.nativeUpdater.removeListener("error", reject);
+
+                      reject(new Error(`Cannot pipe "${updateFile}": ${error}`));
+                    }
+                  });
+                  response.writeHead(200, {
+                    "Content-Type": "application/zip",
+                    "Content-Length": updateFileSize
+                  });
+                  readStream.pipe(response);
+                } else {
+                  _this._logger.warn(`${requestUrl} requested, but not supported`);
+
+                  response.writeHead(404);
+                  response.end();
+                }
+              });
+              server.listen(0, "127.0.0.1", 8, () => {
+                _this.nativeUpdater.setFeedURL(`${getServerUrl()}`, {
+                  "Cache-Control": "no-cache"
+                });
 
-              try {
-                response.writeHead(500);
-                response.end();
-              } finally {
-                _this.nativeUpdater.removeListener("error", reject);
+                _this.nativeUpdater.once("error", reject);
 
-                reject(new Error(`Cannot download "${zipFileInfo.url}": ${error}`));
-              }
+                _this.nativeUpdater.checkForUpdates();
+              });
             });
-          } else {
-            _this._logger.warn(`${requestUrl} requested, but not supported`);
-
-            response.writeHead(404);
-            response.end();
-          }
-        });
-        server.listen(0, "127.0.0.1", 16, () => {
-          _this.nativeUpdater.setFeedURL(`${getServerUrl()}`, {
-            "Cache-Control": "no-cache"
           });
 
-          _this.nativeUpdater.once("error", reject);
-
-          _this.nativeUpdater.checkForUpdates();
-        });
+          return function done(_x) {
+            return _ref.apply(this, arguments);
+          };
+        })()
       });
     })();
   }
@@ -171,29 +199,6 @@ class MacUpdater extends _AppUpdater().AppUpdater {
     const downloadRequest = this.httpExecutor.doRequest((0, _builderUtilRuntime().configureRequestOptionsFromUrl)(url, {
       headers
     }), downloadResponse => {
-      const statusCode = downloadResponse.statusCode;
-
-      if (statusCode >= 400) {
-        this._logger.warn(`Request to ${url} failed, status code: ${statusCode}`);
-
-        try {
-          nativeResponse.writeHead(statusCode);
-          nativeResponse.end();
-        } finally {
-          errorHandler(new Error(`Cannot download "${url}", status ${statusCode}: ${downloadResponse.statusMessage}`));
-        }
-
-        return;
-      } // in tests Electron NET Api is not used, so, we have to handle redirect.
-
-
-      const redirectUrl = (0, _builderUtilRuntime().safeGetHeader)(downloadResponse, "location");
-
-      if (redirectUrl != null) {
-        this.doProxyUpdateFile(nativeResponse, redirectUrl, headers, sha512, cancellationToken, errorHandler);
-        return;
-      }
-
       const nativeHeaders = {
         "Content-Type": "application/zip"
       };
@@ -202,17 +207,6 @@ class MacUpdater extends _AppUpdater().AppUpdater {
 
       this._logger.info(`${_main().DOWNLOAD_PROGRESS} listener count: ${downloadListenerCount}`);
 
-      if (downloadListenerCount > 0) {
-        const contentLength = (0, _builderUtilRuntime().safeGetHeader)(downloadResponse, "content-length");
-
-        this._logger.info(`contentLength: ${contentLength}`);
-
-        if (contentLength != null) {
-          nativeHeaders["Content-Length"] = contentLength;
-          streams.push(new (_builderUtilRuntime().ProgressCallbackTransform)(parseInt(contentLength, 10), cancellationToken, it => this.emit(_main().DOWNLOAD_PROGRESS, it)));
-        }
-      }
-
       nativeResponse.writeHead(200, nativeHeaders); // for mac only sha512 is produced (sha256 is published for windows only to preserve backward compatibility)
 
       if (sha512 != null) {
@@ -229,11 +223,11 @@ class MacUpdater extends _AppUpdater().AppUpdater {
       }
     });
     downloadRequest.on("redirect", (statusCode, method, redirectUrl) => {
-      if (headers.Authorization != null && headers.Authorization.startsWith("token")) {
+      if (headers.authorization != null && headers.authorization.startsWith("token")) {
         const parsedNewUrl = new URL(redirectUrl);
 
         if (parsedNewUrl.hostname.endsWith(".amazonaws.com")) {
-          delete headers.Authorization;
+          delete headers.authorization;
         }
       }
 

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
resources/app/node_modules/electron-updater/out/MacUpdater.js.map


+ 6 - 5
resources/app/node_modules/electron-updater/out/NsisUpdater.d.ts

@@ -1,12 +1,13 @@
-import { AllPublishOptions, CancellationToken, UpdateInfo } from "builder-util-runtime";
+import { AllPublishOptions } from "builder-util-runtime";
 import "source-map-support/register";
+import { DownloadUpdateOptions } from "./AppUpdater";
 import { BaseUpdater } from "./BaseUpdater";
 export declare class NsisUpdater extends BaseUpdater {
     constructor(options?: AllPublishOptions | null, app?: any);
     /*** @private */
-    protected doDownloadUpdate(updateInfo: UpdateInfo, cancellationToken: CancellationToken): Promise<Array<string>>;
-    private verifySignature(tempUpdateFile);
+    protected doDownloadUpdate(downloadUpdateOptions: DownloadUpdateOptions): Promise<Array<string>>;
+    private verifySignature;
     protected doInstall(installerPath: string, isSilent: boolean, isForceRunAfter: boolean): boolean;
-    private differentialDownloadInstaller(fileInfo, installerPath, requestHeaders, provider);
-    private differentialDownloadWebPackage(packageInfo, packagePath, provider);
+    private differentialDownloadInstaller;
+    private differentialDownloadWebPackage;
 }

+ 55 - 34
resources/app/node_modules/electron-updater/out/NsisUpdater.js

@@ -80,7 +80,7 @@ function _main() {
 }
 
 function _Provider() {
-  const data = require("./Provider");
+  const data = require("./providers/Provider");
 
   _Provider = function () {
     return data;
@@ -118,27 +118,22 @@ class NsisUpdater extends _BaseUpdater().BaseUpdater {
   /*** @private */
 
 
-  doDownloadUpdate(updateInfo, cancellationToken) {
+  doDownloadUpdate(downloadUpdateOptions) {
     var _this = this;
 
     return (0, _bluebirdLst().coroutine)(function* () {
       const provider = yield _this.provider;
-      const fileInfo = (0, _Provider().findFile)(provider.resolveFiles(updateInfo), "exe");
-      const requestHeaders = yield _this.computeRequestHeaders();
-      const downloadOptions = {
-        skipDirCreation: true,
-        headers: requestHeaders,
-        cancellationToken,
-        sha512: fileInfo.info.sha512
-      };
+      const fileInfo = (0, _Provider().findFile)(provider.resolveFiles(downloadUpdateOptions.updateInfo), "exe");
       return yield _this.executeDownload({
         fileExtension: "exe",
-        downloadOptions,
+        downloadUpdateOptions,
         fileInfo,
-        updateInfo,
         task: (() => {
-          var _ref = (0, _bluebirdLst().coroutine)(function* (destinationFile, packageFile, removeTempDirIfAny) {
-            if (yield _this.differentialDownloadInstaller(fileInfo, destinationFile, requestHeaders, provider)) {
+          var _ref = (0, _bluebirdLst().coroutine)(function* (destinationFile, downloadOptions, packageFile, removeTempDirIfAny) {
+            const packageInfo = fileInfo.packageInfo;
+            const isWebInstaller = packageInfo != null && packageFile != null;
+
+            if (isWebInstaller || (yield _this.differentialDownloadInstaller(fileInfo, downloadUpdateOptions, destinationFile, downloadUpdateOptions.requestHeaders, provider))) {
               yield _this.httpExecutor.download(fileInfo.url.href, destinationFile, downloadOptions);
             }
 
@@ -147,18 +142,16 @@ class NsisUpdater extends _BaseUpdater().BaseUpdater {
             if (signatureVerificationStatus != null) {
               yield removeTempDirIfAny(); // noinspection ThrowInsideFinallyBlockJS
 
-              throw (0, _builderUtilRuntime().newError)(`New version ${updateInfo.version} is not signed by the application owner: ${signatureVerificationStatus}`, "ERR_UPDATER_INVALID_SIGNATURE");
+              throw (0, _builderUtilRuntime().newError)(`New version ${downloadUpdateOptions.updateInfo.version} is not signed by the application owner: ${signatureVerificationStatus}`, "ERR_UPDATER_INVALID_SIGNATURE");
             }
 
-            const packageInfo = fileInfo.packageInfo;
-
-            if (packageInfo != null && packageFile != null) {
+            if (isWebInstaller) {
               if (yield _this.differentialDownloadWebPackage(packageInfo, packageFile, provider)) {
                 try {
                   yield _this.httpExecutor.download(packageInfo.path, packageFile, {
                     skipDirCreation: true,
-                    headers: requestHeaders,
-                    cancellationToken,
+                    headers: downloadUpdateOptions.requestHeaders,
+                    cancellationToken: downloadUpdateOptions.cancellationToken,
                     sha512: packageInfo.sha512
                   });
                 } catch (e) {
@@ -173,7 +166,7 @@ class NsisUpdater extends _BaseUpdater().BaseUpdater {
             }
           });
 
-          return function task(_x, _x2, _x3) {
+          return function task(_x, _x2, _x3, _x4) {
             return _ref.apply(this, arguments);
           };
         })()
@@ -252,31 +245,59 @@ class NsisUpdater extends _BaseUpdater().BaseUpdater {
     }
 
     return true;
-  }
+  } // private downloadBlockMap(provider: Provider<any>) {
+  //   await provider.getBytes(newBlockMapUrl, cancellationToken)
+  // }
+
 
-  differentialDownloadInstaller(fileInfo, installerPath, requestHeaders, provider) {
+  differentialDownloadInstaller(fileInfo, downloadUpdateOptions, installerPath, requestHeaders, provider) {
     var _this3 = this;
 
     return (0, _bluebirdLst().coroutine)(function* () {
-      if (process.env.__NSIS_DIFFERENTIAL_UPDATE__ == null) {
-        return true;
-      }
-
       try {
-        const blockMapData = JSON.parse((yield provider.httpRequest((0, _main().newUrlFromBase)(`${fileInfo.url.pathname}.blockMap.json`, fileInfo.url, true))));
+        const newBlockMapUrl = (0, _main().newUrlFromBase)(`${fileInfo.url.pathname}.blockmap`, fileInfo.url);
+        const oldBlockMapUrl = (0, _main().newUrlFromBase)(`${fileInfo.url.pathname.replace(new RegExp(downloadUpdateOptions.updateInfo.version, "g"), _this3.currentVersion.version)}.blockmap`, fileInfo.url);
+
+        _this3._logger.info(`Download block maps (old: "${oldBlockMapUrl.href}", new: ${newBlockMapUrl.href})`);
+
+        const downloadBlockMap = (() => {
+          var _ref2 = (0, _bluebirdLst().coroutine)(function* (url) {
+            const requestOptions = (0, _Provider().configureRequestOptionsFromUrl)(url, {
+              headers: downloadUpdateOptions.requestHeaders
+            });
+            requestOptions.gzip = true;
+            const data = yield _this3.httpExecutor.request(requestOptions, downloadUpdateOptions.cancellationToken);
+
+            if (data == null) {
+              throw new Error(`Blockmap "${url.href}" is empty`);
+            }
+
+            try {
+              return JSON.parse(data);
+            } catch (e) {
+              throw new Error(`Cannot parse blockmap "${url.href}", error: ${e}, raw data: ${data}`);
+            }
+          });
+
+          return function downloadBlockMap(_x5) {
+            return _ref2.apply(this, arguments);
+          };
+        })();
+
+        const blockMapData = yield downloadBlockMap(newBlockMapUrl);
+        const oldBlockMapData = yield downloadBlockMap(oldBlockMapUrl);
         yield new (_GenericDifferentialDownloader().GenericDifferentialDownloader)(fileInfo.info, _this3.httpExecutor, {
           newUrl: fileInfo.url.href,
-          oldFile: path.join(_this3.app.getPath("userData"), "installer.exe"),
+          oldFile: path.join(_this3.app.getPath("userData"), _builderUtilRuntime().CURRENT_APP_INSTALLER_FILE_NAME),
           logger: _this3._logger,
           newFile: installerPath,
           useMultipleRangeRequest: provider.useMultipleRangeRequest,
           requestHeaders
-        }).download(blockMapData);
+        }).download(oldBlockMapData, blockMapData);
       } catch (e) {
-        _this3._logger.error(`Cannot download differentially, fallback to full download: ${e.stack || e}`); // during test (developer machine mac) we must throw error
-
+        _this3._logger.error(`Cannot download differentially, fallback to full download: ${e.stack || e}`);
 
-        return process.platform === "win32";
+        return true;
       }
 
       return false;
@@ -294,7 +315,7 @@ class NsisUpdater extends _BaseUpdater().BaseUpdater {
       try {
         yield new (_FileWithEmbeddedBlockMapDifferentialDownloader().FileWithEmbeddedBlockMapDifferentialDownloader)(packageInfo, _this4.httpExecutor, {
           newUrl: packageInfo.path,
-          oldFile: path.join(process.resourcesPath, "..", "package.7z"),
+          oldFile: path.join(_this4.app.getPath("userData"), _builderUtilRuntime().CURRENT_APP_PACKAGE_FILE_NAME),
           logger: _this4._logger,
           newFile: packagePath,
           requestHeaders: _this4.requestHeaders,

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
resources/app/node_modules/electron-updater/out/NsisUpdater.js.map


+ 0 - 24
resources/app/node_modules/electron-updater/out/PrivateGitHubProvider.d.ts

@@ -1,24 +0,0 @@
-/// <reference types="node" />
-import { GithubOptions, HttpExecutor, UpdateInfo } from "builder-util-runtime";
-import { OutgoingHttpHeaders, RequestOptions } from "http";
-import { URL } from "url";
-import { BaseGitHubProvider } from "./GitHubProvider";
-import { ResolvedUpdateFileInfo } from "./main";
-export interface PrivateGitHubUpdateInfo extends UpdateInfo {
-    assets: Array<Asset>;
-}
-export declare class PrivateGitHubProvider extends BaseGitHubProvider<PrivateGitHubUpdateInfo> {
-    private readonly token;
-    constructor(options: GithubOptions, token: string, executor: HttpExecutor<any>);
-    protected createRequestOptions(url: URL, headers?: OutgoingHttpHeaders | null): RequestOptions;
-    getLatestVersion(): Promise<PrivateGitHubUpdateInfo>;
-    readonly fileExtraDownloadHeaders: OutgoingHttpHeaders | null;
-    private configureHeaders(accept);
-    private getLatestVersionInfo(cancellationToken);
-    private readonly basePath;
-    resolveFiles(updateInfo: PrivateGitHubUpdateInfo): Array<ResolvedUpdateFileInfo>;
-}
-export interface Asset {
-    name: string;
-    url: string;
-}

+ 0 - 172
resources/app/node_modules/electron-updater/out/PrivateGitHubProvider.js

@@ -1,172 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.PrivateGitHubProvider = void 0;
-
-function _bluebirdLst() {
-  const data = require("bluebird-lst");
-
-  _bluebirdLst = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _builderUtilRuntime() {
-  const data = require("builder-util-runtime");
-
-  _builderUtilRuntime = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _jsYaml() {
-  const data = require("js-yaml");
-
-  _jsYaml = function () {
-    return data;
-  };
-
-  return data;
-}
-
-var path = _interopRequireWildcard(require("path"));
-
-function _url() {
-  const data = require("url");
-
-  _url = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _GitHubProvider() {
-  const data = require("./GitHubProvider");
-
-  _GitHubProvider = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _main() {
-  const data = require("./main");
-
-  _main = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _Provider() {
-  const data = require("./Provider");
-
-  _Provider = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
-
-class PrivateGitHubProvider extends _GitHubProvider().BaseGitHubProvider {
-  constructor(options, token, executor) {
-    super(options, "api.github.com", executor);
-    this.token = token;
-  }
-
-  createRequestOptions(url, headers) {
-    const result = super.createRequestOptions(url, headers);
-    result.redirect = "manual";
-    return result;
-  }
-
-  getLatestVersion() {
-    var _this = this;
-
-    return (0, _bluebirdLst().coroutine)(function* () {
-      const cancellationToken = new (_builderUtilRuntime().CancellationToken)();
-      const channelFile = (0, _main().getChannelFilename)((0, _main().getDefaultChannelName)());
-      const releaseInfo = yield _this.getLatestVersionInfo(cancellationToken);
-      const asset = releaseInfo.assets.find(it => it.name === channelFile);
-
-      if (asset == null) {
-        // html_url must be always, but just to be sure
-        throw (0, _builderUtilRuntime().newError)(`Cannot find ${channelFile} in the release ${releaseInfo.html_url || releaseInfo.name}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND");
-      }
-
-      const url = new (_url().URL)(asset.url);
-      let result;
-
-      try {
-        result = (0, _jsYaml().safeLoad)((yield _this.httpRequest(url, _this.configureHeaders("application/octet-stream"), cancellationToken)));
-      } catch (e) {
-        if (e instanceof _builderUtilRuntime().HttpError && e.statusCode === 404) {
-          throw (0, _builderUtilRuntime().newError)(`Cannot find ${channelFile} in the latest release artifacts (${url}): ${e.stack || e.message}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND");
-        }
-
-        throw e;
-      }
-
-      result.assets = releaseInfo.assets;
-      return result;
-    })();
-  }
-
-  get fileExtraDownloadHeaders() {
-    return this.configureHeaders("application/octet-stream");
-  }
-
-  configureHeaders(accept) {
-    return {
-      Accept: accept,
-      Authorization: `token ${this.token}`
-    };
-  }
-
-  getLatestVersionInfo(cancellationToken) {
-    var _this2 = this;
-
-    return (0, _bluebirdLst().coroutine)(function* () {
-      const url = (0, _main().newUrlFromBase)(`${_this2.basePath}/latest`, _this2.baseUrl);
-
-      try {
-        return JSON.parse((yield _this2.httpRequest(url, _this2.configureHeaders("application/vnd.github.v3+json"), cancellationToken)));
-      } catch (e) {
-        throw (0, _builderUtilRuntime().newError)(`Unable to find latest version on GitHub (${url}), please ensure a production release exists: ${e.stack || e.message}`, "ERR_UPDATER_LATEST_VERSION_NOT_FOUND");
-      }
-    })();
-  }
-
-  get basePath() {
-    return this.computeGithubBasePath(`/repos/${this.options.owner}/${this.options.repo}/releases`);
-  }
-
-  resolveFiles(updateInfo) {
-    return (0, _Provider().getFileList)(updateInfo).map(it => {
-      const name = path.posix.basename(it.url).replace(/ /g, "-");
-      const asset = updateInfo.assets.find(it => it != null && it.name === name);
-
-      if (asset == null) {
-        throw (0, _builderUtilRuntime().newError)(`Cannot find asset "${name}" in: ${JSON.stringify(updateInfo.assets, null, 2)}`, "ERR_UPDATER_ASSET_NOT_FOUND");
-      }
-
-      return {
-        url: new (_url().URL)(asset.url),
-        info: it
-      };
-    });
-  }
-
-} exports.PrivateGitHubProvider = PrivateGitHubProvider;
-//# sourceMappingURL=PrivateGitHubProvider.js.map

Файловите разлики са ограничени, защото са твърде много
+ 0 - 1
resources/app/node_modules/electron-updater/out/PrivateGitHubProvider.js.map


+ 0 - 21
resources/app/node_modules/electron-updater/out/Provider.d.ts

@@ -1,21 +0,0 @@
-/// <reference types="node" />
-import { CancellationToken, HttpExecutor, UpdateFileInfo, UpdateInfo } from "builder-util-runtime";
-import { OutgoingHttpHeaders, RequestOptions } from "http";
-import { URL } from "url";
-import { ResolvedUpdateFileInfo } from "./main";
-export declare abstract class Provider<T extends UpdateInfo> {
-    protected readonly executor: HttpExecutor<any>;
-    readonly useMultipleRangeRequest: boolean;
-    protected requestHeaders: OutgoingHttpHeaders | null;
-    protected constructor(executor: HttpExecutor<any>, useMultipleRangeRequest?: boolean);
-    readonly fileExtraDownloadHeaders: OutgoingHttpHeaders | null;
-    setRequestHeaders(value: OutgoingHttpHeaders | null): void;
-    abstract getLatestVersion(): Promise<T>;
-    abstract resolveFiles(updateInfo: UpdateInfo): Array<ResolvedUpdateFileInfo>;
-    httpRequest(url: URL, headers?: OutgoingHttpHeaders | null, cancellationToken?: CancellationToken): Promise<string | null>;
-    protected createRequestOptions(url: URL, headers?: OutgoingHttpHeaders | null): RequestOptions;
-}
-export declare function findFile(files: Array<ResolvedUpdateFileInfo>, extension: string, not?: Array<string>): ResolvedUpdateFileInfo | null | undefined;
-export declare function parseUpdateInfo(rawData: string | null, channelFile: string, channelFileUrl: URL): UpdateInfo;
-export declare function getFileList(updateInfo: UpdateInfo): Array<UpdateFileInfo>;
-export declare function resolveFiles(updateInfo: UpdateInfo, baseUrl: URL, pathTransformer?: (p: string) => string): Array<ResolvedUpdateFileInfo>;

+ 0 - 159
resources/app/node_modules/electron-updater/out/Provider.js

@@ -1,159 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.findFile = findFile;
-exports.parseUpdateInfo = parseUpdateInfo;
-exports.getFileList = getFileList;
-exports.resolveFiles = resolveFiles;
-exports.Provider = void 0;
-
-function _builderUtilRuntime() {
-  const data = require("builder-util-runtime");
-
-  _builderUtilRuntime = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _jsYaml() {
-  const data = require("js-yaml");
-
-  _jsYaml = function () {
-    return data;
-  };
-
-  return data;
-}
-
-function _main() {
-  const data = require("./main");
-
-  _main = function () {
-    return data;
-  };
-
-  return data;
-}
-
-class Provider {
-  constructor(executor, useMultipleRangeRequest = true) {
-    this.executor = executor;
-    this.useMultipleRangeRequest = useMultipleRangeRequest;
-    this.requestHeaders = null;
-  }
-
-  get fileExtraDownloadHeaders() {
-    return null;
-  }
-
-  setRequestHeaders(value) {
-    this.requestHeaders = value;
-  }
-
-  httpRequest(url, headers, cancellationToken) {
-    return this.executor.request(this.createRequestOptions(url, headers), cancellationToken);
-  }
-
-  createRequestOptions(url, headers) {
-    const result = {};
-
-    if (this.requestHeaders == null) {
-      if (headers != null) {
-        result.headers = headers;
-      }
-    } else {
-      result.headers = headers == null ? this.requestHeaders : Object.assign({}, this.requestHeaders, headers);
-    }
-
-    result.protocol = url.protocol;
-    result.hostname = url.hostname;
-
-    if (url.port) {
-      result.port = url.port;
-    }
-
-    result.path = url.pathname + url.search;
-    return result;
-  }
-
-}
-
-exports.Provider = Provider;
-
-function findFile(files, extension, not) {
-  if (files.length === 0) {
-    throw (0, _builderUtilRuntime().newError)("No files provided", "ERR_UPDATER_NO_FILES_PROVIDED");
-  }
-
-  const result = files.find(it => it.url.pathname.toLowerCase().endsWith(`.${extension}`));
-
-  if (result != null) {
-    return result;
-  } else if (not == null) {
-    return files[0];
-  } else {
-    return files.find(fileInfo => !not.some(ext => fileInfo.url.pathname.toLowerCase().endsWith(`.${ext}`)));
-  }
-}
-
-function parseUpdateInfo(rawData, channelFile, channelFileUrl) {
-  if (rawData == null) {
-    throw (0, _builderUtilRuntime().newError)(`Cannot parse update info from ${channelFile} in the latest release artifacts (${channelFileUrl}): rawData: null`, "ERR_UPDATER_INVALID_UPDATE_INFO");
-  }
-
-  let result;
-
-  try {
-    result = (0, _jsYaml().safeLoad)(rawData);
-  } catch (e) {
-    throw (0, _builderUtilRuntime().newError)(`Cannot parse update info from ${channelFile} in the latest release artifacts (${channelFileUrl}): ${e.stack || e.message}, rawData: ${rawData}`, "ERR_UPDATER_INVALID_UPDATE_INFO");
-  }
-
-  return result;
-}
-
-function getFileList(updateInfo) {
-  const files = updateInfo.files;
-
-  if (files != null && files.length > 0) {
-    return files;
-  }
-
-  if (updateInfo.path != null) {
-    return [{
-      url: updateInfo.path,
-      sha512: updateInfo.sha512
-    }];
-  } else {
-    throw (0, _builderUtilRuntime().newError)(`No files provided: ${(0, _builderUtilRuntime().safeStringifyJson)(updateInfo)}`, "ERR_UPDATER_NO_FILES_PROVIDED");
-  }
-}
-
-function resolveFiles(updateInfo, baseUrl, pathTransformer = p => p) {
-  const files = getFileList(updateInfo);
-  const result = files.map(fileInfo => {
-    if (fileInfo.sha2 == null && fileInfo.sha512 == null) {
-      throw (0, _builderUtilRuntime().newError)(`Update info doesn't contain nor sha256 neither sha512 checksum: ${(0, _builderUtilRuntime().safeStringifyJson)(fileInfo)}`, "ERR_UPDATER_NO_CHECKSUM");
-    }
-
-    return {
-      url: (0, _main().newUrlFromBase)(pathTransformer(fileInfo.url), baseUrl),
-      info: fileInfo
-    };
-  });
-  const packages = updateInfo.packages;
-  const packageInfo = packages == null ? null : packages[process.arch] || packages.ia32;
-
-  if (packageInfo != null) {
-    result[0].packageInfo = Object.assign({}, packageInfo, {
-      path: (0, _main().newUrlFromBase)(pathTransformer(packageInfo.path), baseUrl).href
-    });
-  }
-
-  return result;
-} 
-//# sourceMappingURL=Provider.js.map

Файловите разлики са ограничени, защото са твърде много
+ 0 - 1
resources/app/node_modules/electron-updater/out/Provider.js.map


+ 6 - 6
resources/app/node_modules/electron-updater/out/differentialDownloader/DataSplitter.d.ts

@@ -23,11 +23,11 @@ export declare class DataSplitter extends Writable {
     constructor(out: Writable, options: PartListDataTask, partIndexToTaskIndex: Map<number, number>, boundary: string, partIndexToLength: Array<number>, finishHandler: () => any);
     readonly isFinished: boolean;
     _write(data: Buffer, encoding: string, callback: (error?: Error) => void): void;
-    private handleData(chunk);
-    private copyExistingData(index, end);
-    private searchHeaderListEnd(chunk, readOffset);
+    private handleData;
+    private copyExistingData;
+    private searchHeaderListEnd;
     private actualPartLength;
-    private onPartEnd();
-    private processPartStarted(data, start, end);
-    private processPartData(data, start, end);
+    private onPartEnd;
+    private processPartStarted;
+    private processPartData;
 }

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
resources/app/node_modules/electron-updater/out/differentialDownloader/DataSplitter.js.map


+ 3 - 2
resources/app/node_modules/electron-updater/out/differentialDownloader/DifferentialDownloader.d.ts

@@ -21,8 +21,9 @@ export declare abstract class DifferentialDownloader {
     constructor(blockAwareFileInfo: BlockMapDataHolder, httpExecutor: HttpExecutor<any>, options: DifferentialDownloaderOptions);
     createRequestOptions(method?: "head" | "get", newUrl?: string | null): RequestOptions;
     protected doDownload(oldBlockMap: BlockMap, newBlockMap: BlockMap): Promise<any>;
-    private downloadFile(tasks);
+    private downloadFile;
+    private doDownloadFile;
     protected readRemoteBytes(start: number, endInclusive: number): Promise<Buffer>;
-    private request(requestOptions, dataHandler);
+    private request;
 }
 export declare function readBlockMap(data: Buffer): Promise<BlockMap>;

+ 43 - 8
resources/app/node_modules/electron-updater/out/differentialDownloader/DifferentialDownloader.js

@@ -84,7 +84,7 @@ class DifferentialDownloader {
     return Object.assign({}, newUrl == null ? this.baseRequestOptions : (0, _builderUtilRuntime().configureRequestOptionsFromUrl)(newUrl, {}), {
       method,
       headers: Object.assign({}, this.options.requestHeaders, {
-        Accept: "*/*"
+        accept: "*/*"
       })
     });
   }
@@ -126,15 +126,54 @@ class DifferentialDownloader {
   }
 
   downloadFile(tasks) {
+    const fdList = [];
+
+    const closeFiles = () => {
+      return _bluebirdLst().default.map(fdList, openedFile => {
+        return (0, _fsExtraP().close)(openedFile.descriptor).catch(e => {
+          this.logger.error(`cannot close file "${openedFile.path}": ${e}`);
+        });
+      });
+    };
+
+    return this.doDownloadFile(tasks, fdList).then(closeFiles).catch(e => {
+      // then must be after catch here (since then always throws error)
+      return closeFiles().catch(closeFilesError => {
+        // closeFiles never throw error, but just to be sure
+        try {
+          this.logger.error(`cannot close files: ${closeFilesError}`);
+        } catch (errorOnLog) {
+          try {
+            console.error(errorOnLog);
+          } catch (ignored) {// ok, give up and ignore error
+          }
+        }
+
+        throw e;
+      }).then(() => {
+        throw e;
+      });
+    });
+  }
+
+  doDownloadFile(tasks, fdList) {
     var _this = this;
 
     return (0, _bluebirdLst().coroutine)(function* () {
       const oldFileFd = yield (0, _fsExtraP().open)(_this.options.oldFile, "r");
+      fdList.push({
+        descriptor: oldFileFd,
+        path: _this.options.oldFile
+      });
       const newFileFd = yield (0, _fsExtraP().open)(_this.options.newFile, "w");
+      fdList.push({
+        descriptor: newFileFd,
+        path: _this.options.newFile
+      });
       const fileOut = (0, _fsExtraP().createWriteStream)(_this.options.newFile, {
         fd: newFileFd
       });
-      yield new (_bluebirdLst().default)((resolve, reject) => {
+      yield new Promise((resolve, reject) => {
         const streams = [];
         const digestTransform = new (_builderUtilRuntime().DigestTransform)(_this.blockAwareFileInfo.sha512); // to simply debug, do manual validation to allow file to be fully written
 
@@ -200,7 +239,7 @@ class DifferentialDownloader {
               const debug = _this.logger.debug;
 
               if (debug != null) {
-                debug(`effective url: ${actualUrl == null ? "" : removeQuery(actualUrl)}, range: ${range}`);
+                debug(`effective url: ${actualUrl == null ? "original" : removeQuery(actualUrl)}, range: ${range}`);
               }
 
               const request = _this.httpExecutor.doRequest(requestOptions, response => {
@@ -237,10 +276,6 @@ class DifferentialDownloader {
         }
 
         w(0);
-      }).then(() => (0, _fsExtraP().close)(oldFileFd)).catch(error => {
-        (0, _fsExtraP().closeSync)(oldFileFd);
-        (0, _fsExtraP().closeSync)(newFileFd);
-        throw error;
       });
     })();
   }
@@ -264,7 +299,7 @@ class DifferentialDownloader {
   }
 
   request(requestOptions, dataHandler) {
-    return new (_bluebirdLst().default)((resolve, reject) => {
+    return new Promise((resolve, reject) => {
       const request = this.httpExecutor.doRequest(requestOptions, response => {
         if (!(0, _multipleRangeDownloader().checkIsRangesSupported)(response, reject)) {
           return;

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
resources/app/node_modules/electron-updater/out/differentialDownloader/DifferentialDownloader.js.map


+ 0 - 0
resources/app/node_modules/electron-updater/out/differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader.js.map


Някои файлове не бяха показани, защото твърде много файлове са промени