This commit is contained in:
2025-08-23 11:29:22 +00:00
parent 92cbc4e543
commit 234aab74d6
16 changed files with 10068 additions and 2037 deletions

View File

@@ -1,4 +1,4 @@
import * as plugins from './smartipc.plugins';
import * as plugins from './smartipc.plugins.js';
import { EventEmitter } from 'events';
export interface ISmartIpcConstructorOptions {
@@ -49,11 +49,13 @@ export class SmartIpc {
await done.promise;
break;
default:
throw new Error('type of ipc is not valid. Must be "server" or "client"');
throw new Error(
'type of ipc is not valid. Must be "server" or "client"',
);
}
for (const handler of this.handlers) {
ipcEventEmitter.on(handler.keyword, dataArg => {
ipcEventEmitter.on(handler.keyword, (dataArg) => {
handler.handlerFunc(dataArg);
});
}

View File

@@ -1,7 +1,7 @@
// pushrocks scope
import * as smartdelay from '@pushrocks/smartdelay';
import * as smartpromise from '@pushrocks/smartpromise';
import * as smartrx from '@pushrocks/smartrx';
import * as smartdelay from '@push.rocks/smartdelay';
import * as smartpromise from '@push.rocks/smartpromise';
import * as smartrx from '@push.rocks/smartrx';
export { smartdelay, smartpromise, smartrx };