@todesktop/runtime
Advanced tools
Comparing version 0.1.0-rc.r to 0.1.0
@@ -252,5 +252,6 @@ "use strict"; | ||
fs.existsSync(path.join(electron.app.getAppPath(), "../Update.exe"))) { | ||
this._log("Setting up SquirrelWindowsUpdaterAgent"); | ||
__classPrivateFieldSet(this, _updaterAgent, new updaterAgents_1.SquirrelWindowsUpdaterAgent({ | ||
log: (...args) => { | ||
this._log("UpdaterAgent:", ...args); | ||
this._log("SquirrelWindowsUpdaterAgent:", ...args); | ||
}, | ||
@@ -260,5 +261,6 @@ })); | ||
} | ||
this._log("Setting up UpdaterAgent"); | ||
__classPrivateFieldSet(this, _updaterAgent, new updaterAgents_1.UpdaterAgent({ | ||
log: (...args) => { | ||
this._log("SquirrelWindowsUpdaterAgent:", ...args); | ||
this._log("UpdaterAgent:", ...args); | ||
}, | ||
@@ -265,0 +267,0 @@ })); |
@@ -37,3 +37,2 @@ "use strict"; | ||
try { | ||
// TODO: disable auto-download | ||
electronUpdater.autoUpdater.autoDownload = false; | ||
@@ -56,3 +55,2 @@ const updateCheckResult = await electronUpdater.autoUpdater.checkForUpdates(); | ||
} | ||
// TODO: manually download the update | ||
await electronUpdater.autoUpdater.downloadUpdate(updateCheckResult.cancellationToken); | ||
@@ -96,2 +94,17 @@ return { | ||
}); | ||
[ | ||
"before-quit-for-update", | ||
"checking-for-update", | ||
"error", | ||
"update-available", | ||
"update-downloaded", | ||
"update-not-available", | ||
].forEach((eventName) => { | ||
// eslint-disable-next-line | ||
// @ts-ignore | ||
electron.autoUpdater.on(eventName, (...args) => __classPrivateFieldGet(this, _log_1).call(this, `autoUpdater event: ${eventName}`, ...args)); | ||
}); | ||
__classPrivateFieldGet(this, _log_1).call(this, "setFeedURL:", { | ||
url: `https://dl.todesktop.com/${config.id}/squirrel?${params}`, | ||
}); | ||
electron.autoUpdater.setFeedURL({ | ||
@@ -98,0 +111,0 @@ url: `https://dl.todesktop.com/${config.id}/squirrel?${params}`, |
{ | ||
"private": false, | ||
"name": "@todesktop/runtime", | ||
"version": "0.1.0-rc.r", | ||
"version": "0.1.0", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "author": "Adam Lynch <contact@adamlynch.com> (http://adamlynch.com/)", |
37432
664