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

@el3um4s/ipc-for-electron-auto-updater

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@el3um4s/ipc-for-electron-auto-updater - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

4

lib/IPC/renderer.d.ts

@@ -39,2 +39,6 @@ interface VersionNumber {

}) => Promise<VersionNumber>;
checkingForUpdate: (options: {
callback?: () => void;
apiKey?: string;
}) => Promise<void>;
errorOnAutoUpdate: (options: {

@@ -41,0 +45,0 @@ callback?: ((arg0: Error) => void) | undefined;

@@ -41,2 +41,15 @@ "use strict";

});
const checkingForUpdate = (options) => __awaiter(void 0, void 0, void 0, function* () {
const { callback } = options;
const apiKey = (options === null || options === void 0 ? void 0 : options.apiKey) || defaultApiKey;
const api = globalThis[apiKey][nameAPI];
return new Promise((resolve) => {
api.receive("checkingForUpdate", () => {
if (callback) {
callback();
}
resolve();
});
});
});
const updateAvailable = (options) => __awaiter(void 0, void 0, void 0, function* () {

@@ -125,2 +138,3 @@ const { callback } = options;

getVersionNumber,
checkingForUpdate,
errorOnAutoUpdate,

@@ -127,0 +141,0 @@ updateAvailable,

2

package.json
{
"name": "@el3um4s/ipc-for-electron-auto-updater",
"version": "0.0.4",
"version": "0.0.5",
"description": "Allow the renderer to update electron apps",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -95,3 +95,3 @@ # IPC for Electron: Auto Updater (NOT YET TESTED)

globalThis.api.autoUpdater.send("requestVersionNumber", null);
globalThis.api.systemInfo.receive("getVersionNumber", (data) => {
globalThis.api.autoUpdater.receive("getVersionNumber", (data) => {
version = data.version;

@@ -201,3 +201,3 @@ });

systemInfo.on.errorOnAutoUpdate({
autoUpdater.on.errorOnAutoUpdate({
callback: (data) => {

@@ -210,2 +210,18 @@ console.log("Error on auto update");

`on.checkingForUpdate = async (options: { callback?: () => void; apiKey?: string; }): Promise<void>`
example:
```ts
import autoUpdater from "@el3um4s/renderer-for-electron-auto-updater";
autoUpdater.checkForUpdates();
autoUpdater.on.checkingForUpdate({
callback: () => {
console.log("Checking for update...");
},
});
```
`on.updateAvailable = async (options: { callback?: (arg0: UpdateInfo) => void; apiKey?: string; }): Promise<UpdateInfo>`

@@ -220,3 +236,3 @@

systemInfo.on.updateAvailable({
autoUpdater.on.updateAvailable({
callback: (data) => {

@@ -239,3 +255,3 @@ const { version, releaseName, releaseDate } = data;

systemInfo.on.updateNotAvailable({
autoUpdater.on.updateNotAvailable({
callback: (data) => {

@@ -242,0 +258,0 @@ console.log("Update not available", data);

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