Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hadron-ipc

Package Overview
Dependencies
Maintainers
30
Versions
495
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hadron-ipc - npm Package Compare versions

Comparing version 2.5.0 to 2.6.0

29

index.d.ts

@@ -1,1 +0,28 @@

export = any;
import type { IpcMain, IpcRenderer, BrowserWindow } from 'electron';
export type HadronIpcMain = IpcMain & {
respondTo(
name: string,
handler: (browserWindow: BrowserWindow, ...args: any[]) => any
): void;
respondTo(
handlerMap: Record<
string,
(browserWindow: BrowserWindow, ...args: any[]) => any
>
): void;
broadcast(name: string, ...args: any[]): void;
broadcastFocused(name: string, ...args: any[]): void;
remove: typeof ipcMain['removeListener'];
};
export type HadronIpcRenderer = IpcRenderer & {
call(name: string, ...args: any[]): Promise<any>;
callQuiet(name: string, ...args: any[]): Promise<any>;
};
export type HadronIpc = HadronIpcMain | HadronIpcRenderer;
export = HadronIpc;
export const ipcMain: HadronIpcMain;
export const ipcRenderer: HadronIpcRenderer;

@@ -20,5 +20,13 @@ 'use strict';

return isRenderer ? require('./lib/renderer') : require('./lib/main');
const ipc = isRenderer ? require('./lib/renderer') : require('./lib/main');
module.exports = ipc;
if (isRenderer) {
module.exports.ipcRenderer = ipc;
} else {
module.exports.ipcMain = ipc;
}
}
module.exports = requireExportModule();
requireExportModule();

@@ -6,7 +6,7 @@ 'use strict';

const ipcRenderer = electron.ipcRenderer;
const debug = require('debug')('hadron-ipc:renderer');
const _debug = require('debug')('hadron-ipc:renderer');
exports = ipcRenderer;
exports.call = function(methodName, ...args) {
function call(debug, methodName, ...args) {
debug(`calling ${methodName} with args`, args);

@@ -33,4 +33,12 @@ const responseChannel = getResponseChannel(methodName);

});
}
exports.callQuiet = function(methodName, ...args) {
return call(() => {}, methodName, ...args);
};
exports.call = function(methodName, ...args) {
return call(_debug, methodName, ...args);
};
module.exports = exports;

15

package.json
{
"name": "hadron-ipc",
"description": "Simplified IPC for electron apps.",
"version": "2.5.0",
"version": "2.6.0",
"scripts": {

@@ -18,4 +18,9 @@ "check": "npm run lint && npm run depcheck",

},
"main": "index.js",
"exports": {
"webpack": "./index.js",
"require": "./index.js"
},
"dependencies": {
"debug": "^4.1.1",
"debug": "4.3.0",
"is-electron-renderer": "^2.0.1",

@@ -28,4 +33,4 @@ "is-promise": "^2.1.0",

"depcheck": "^1.4.1",
"electron": "^6.1.12",
"electron-mocha": "^8.2.0",
"electron": "^13.5.1",
"electron-mocha": "^10.1.0",
"eslint": "^7.25.0",

@@ -40,3 +45,3 @@ "eslint-config-mongodb-js": "^5.0.3",

},
"gitHead": "455c6523f99a08c6796480d59727b53bdfa441f0"
"gitHead": "8ef2cccaaab6d84a5fcd633ea8dfc4c7a4db551f"
}
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