New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@todesktop/runtime

Package Overview
Dependencies
Maintainers
3
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@todesktop/runtime - npm Package Compare versions

Comparing version 0.1.0-rc.5 to 0.1.0-rc.6

9

dist/AutoUpdater.js

@@ -20,2 +20,3 @@ "use strict";

const electron = require("electron");
const electron_log_1 = require("electron-log");
const eventemitter2_1 = require("eventemitter2");

@@ -253,5 +254,6 @@ const fs = require("fs");

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);
},

@@ -261,5 +263,6 @@ }));

}
this._log("Setting up UpdaterAgent");
__classPrivateFieldSet(this, _updaterAgent, new updaterAgents_1.UpdaterAgent({
log: (...args) => {
this._log("SquirrelWindowsUpdaterAgent:", ...args);
this._log("UpdaterAgent:", ...args);
},

@@ -282,2 +285,4 @@ }));

args.map((arg) => JSON.stringify(arg)).join(" "));
electron_log_1.default.info(`AutoUpdater (${electron.app.name})${timeSinceCreatedAt}: ` +
args.map((arg) => JSON.stringify(arg)).join(" "));
}

@@ -284,0 +289,0 @@ _subscribeToElectronEvents() {

@@ -37,6 +37,4 @@ "use strict";

try {
// TODO: disable auto-download
electronUpdater.autoUpdater.autoDownload = false;
const updateCheckResult = await electronUpdater.autoUpdater.checkForUpdates();
console.log("UpdaterAgent: ", { updateCheckResult });
// No update available?

@@ -57,4 +55,2 @@ if (!updateCheckResult || !updateCheckResult.updateInfo) {

}
console.log("UpdaterAgent: calling downloadUpdate");
// TODO: manually download the update
await electronUpdater.autoUpdater.downloadUpdate(updateCheckResult.cancellationToken);

@@ -98,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({

@@ -100,0 +111,0 @@ url: `https://dl.todesktop.com/${config.id}/squirrel?${params}`,

{
"private": false,
"name": "@todesktop/runtime",
"version": "0.1.0-rc.5",
"version": "0.1.0-rc.6",
"license": "MIT",

@@ -27,2 +27,3 @@ "author": "Adam Lynch <contact@adamlynch.com> (http://adamlynch.com/)",

"dependencies": {
"electron-log": "^4.1.2",
"electron-updater": "^4.2.2",

@@ -29,0 +30,0 @@ "eventemitter2": "^6.3.1",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc