Huge News!Announcing our $40M Series B led by Abstract Ventures.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 1.5.7-beta.1 to 1.5.7-beta.2

13

dist/AutoUpdater.js

@@ -29,5 +29,14 @@ "use strict";

this._hasUpdateReadyToInstall = false;
this._isActive = electron.app.isPackaged;
this._isActive = true;
this._pendingCheckSources = [];
this._logger = logger;
let inactiveReason = "";
if (!electron.app.isPackaged) {
this._isActive = false;
inactiveReason = "application is not packaged";
}
if (process.platform === "linux" && !process.env.APPIMAGE) {
this._isActive = false;
inactiveReason = "application is not in AppImage";
}
if (this._isActive) {

@@ -37,3 +46,3 @@ this._initializeUpdaterAgent();

else {
const message = "@todesktop/runtime: skipping autoUpdater initialization because application is not packed.";
const message = `@todesktop/runtime: skipping autoUpdater initialization because ${inactiveReason}.`;
console.log(message);

@@ -40,0 +49,0 @@ this._log("info", message);

@@ -16,2 +16,8 @@ "use strict";

const version_1 = require("./version");
function getCallStack() {
const stackLines = new Error().stack
.split("\n")
.map((line) => line.trim().replace(/^at /, " - "));
return stackLines.slice(3).join("\n");
}
function sendHttpRequest(url, body) {

@@ -109,2 +115,12 @@ return __awaiter(this, void 0, void 0, function* () {

});
const originalProcessExit = process.exit;
process.exit = function patchedProcessExit(code = 0) {
callApi("processExit", { code, stack: getCallStack() });
return originalProcessExit(code);
};
const originalAppQuit = electron_1.app.quit;
electron_1.app.quit = function patchedAppQuit() {
callApi("appQuit", { stack: getCallStack() });
originalAppQuit();
};
patchWritableWrite(process.stdout, (content) => {

@@ -111,0 +127,0 @@ callApi("stdout", { content });

8

dist/updaterAgents.js

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

electronUpdater.autoUpdater.logger = logger;
electronUpdater.autoUpdater.allowDowngrade = true;
const config = (0, getConfig_1.default)();

@@ -69,5 +70,2 @@ /*

});
if (!semver.gt(latestVersion, currentVersion)) {
return null;
}
// if latest version is already downloaded, return it

@@ -77,2 +75,6 @@ if (currentlyDownloadedVersion === latestVersion) {

}
// autoUpdater provides a cancellationToken if an update is available - https://github.com/electron-userland/electron-builder/blob/906ffb1fcebe6aef4dc6c6a3fab10aa7d9378c3f/packages/electron-updater/src/AppUpdater.ts#L422
if (!updateCheckResult.cancellationToken) {
return this.currentTDUpdateInfo;
}
yield electronUpdater.autoUpdater.downloadUpdate(updateCheckResult.cancellationToken);

@@ -79,0 +81,0 @@ this.currentTDUpdateInfo = this._convertToTDUpdateInfo(updateCheckResult);

@@ -7,3 +7,3 @@ {

"name": "@todesktop/runtime",
"version": "1.5.7-beta.1",
"version": "1.5.7-beta.2",
"license": "MIT",

@@ -10,0 +10,0 @@ "author": "ToDesktop <hi@todesktop.com> (https://www.todesktop.com/)",

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