{"id":24811647,"url":"https://github.com/sibnerian/electron-promise-ipc","last_synced_at":"2025-10-13T13:31:38.476Z","repository":{"id":17580628,"uuid":"82279183","full_name":"sibnerian/electron-promise-ipc","owner":"sibnerian","description":"Promise-flavored IPC calls in Electron. 100% test coverage.","archived":false,"fork":false,"pushed_at":"2023-03-04T02:44:15.000Z","size":1206,"stargazers_count":69,"open_issues_count":11,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-19T02:59:39.656Z","etag":null,"topics":["electron","ipc","promises"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sibnerian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-17T09:15:40.000Z","updated_at":"2025-04-15T15:37:07.000Z","dependencies_parsed_at":"2024-06-18T17:22:20.745Z","dependency_job_id":null,"html_url":"https://github.com/sibnerian/electron-promise-ipc","commit_stats":{"total_commits":103,"total_committers":7,"mean_commits":"14.714285714285714","dds":"0.35922330097087374","last_synced_commit":"72bb077904aec3113cf20b6924989670a2cb8999"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/sibnerian/electron-promise-ipc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sibnerian%2Felectron-promise-ipc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sibnerian%2Felectron-promise-ipc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sibnerian%2Felectron-promise-ipc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sibnerian%2Felectron-promise-ipc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sibnerian","download_url":"https://codeload.github.com/sibnerian/electron-promise-ipc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sibnerian%2Felectron-promise-ipc/sbom","scorecard":{"id":822190,"data":{"date":"2025-08-11","repo":{"name":"github.com/sibnerian/electron-promise-ipc","commit":"72bb077904aec3113cf20b6924989670a2cb8999"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 21 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"38 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-3p22-ghq8-v749","Warn: Project is vulnerable to: GHSA-77xc-hjv8-ww97","Warn: Project is vulnerable to: GHSA-mq8j-3h7h-p8g7","Warn: Project is vulnerable to: GHSA-p2jh-44qj-pf2v","Warn: Project is vulnerable to: GHSA-p7v2-p9m8-qqg7","Warn: Project is vulnerable to: GHSA-7x97-j373-85x5","Warn: Project is vulnerable to: GHSA-7m48-wc93-9g85","Warn: Project is vulnerable to: GHSA-qqvq-6xgj-jw8g","Warn: Project is vulnerable to: GHSA-6r2x-8pq8-9489","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T15:52:41.801Z","repository_id":17580628,"created_at":"2025-08-23T15:52:41.801Z","updated_at":"2025-08-23T15:52:41.801Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279015312,"owners_count":26085684,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["electron","ipc","promises"],"created_at":"2025-01-30T13:15:40.217Z","updated_at":"2025-10-13T13:31:38.200Z","avatar_url":"https://github.com/sibnerian.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# electron-promise-ipc\n\n[![Build Status](https://travis-ci.org/sibnerian/electron-promise-ipc.svg?branch=master)](https://travis-ci.org/sibnerian/electron-promise-ipc) [![Coverage Status](https://coveralls.io/repos/github/sibnerian/electron-promise-ipc/badge.svg?branch=master)](https://coveralls.io/github/sibnerian/electron-promise-ipc?branch=master) [![npm version](https://badge.fury.io/js/electron-promise-ipc.svg)](https://badge.fury.io/js/electron-promise-ipc)\n\n#### Promise-y IPC calls in Electron.\n\n## Installation\n\n```sh\nnpm install --save electron-promise-ipc\n```\n\n## Usage\n\nThe most common use case: from the renderer, get data from the main process as a promise.\n\n```js\n// in main process\nimport promiseIpc from 'electron-promise-ipc';\nimport fsp from 'fs-promise';\n\npromiseIpc.on('writeSettingsFile', (newSettings, event) =\u003e {\n  return fsp.writeFile('~/.settings', newSettings);\n});\n\n// in renderer\nimport promiseIpc from 'electron-promise-ipc';\n\npromiseIpc\n  .send('writeSettingsFile', '{ \"name\": \"Jeff\" }')\n  .then(() =\u003e console.log('You wrote the settings!'))\n  .catch((e) =\u003e console.error(e));\n```\n\nYou can also send data from the main process to a renderer, if you pass in its [WebContents](http://electron.atom.io/docs/api/web-contents) object.\n\n```js\n// in main process\nimport promiseIpc from 'electron-promise-ipc';\n\npromiseIpc\n  .send('getRendererData', webContentsForRenderer)\n  .then((rendererData) =\u003e console.log(rendererData))\n  .catch((e) =\u003e console.error(e));\n\n// in renderer\nimport promiseIpc from 'electron-promise-ipc';\n\npromiseIpc.on('getRendererData', (event) =\u003e {\n  return getSomeSuperAwesomeRendererData();\n});\n```\n\nAny arguments to `send()` will be passed directly to the event listener from `on()`, followed by the IPC [event](https://electronjs.org/docs/api/ipc-main#event-object) object. If there is an error thrown in the main process's listener, or if the listener returns a rejected promise (e.g., lack of permissions for a file read), then the `send()` promise is rejected with the same error.\n\nNote that because this is IPC, only JSON-serializable values can be passed as arguments or data. Classes and functions will generally not survive a round of serialization/deserialization.\n\n## Preload\n\nAs of Electron 5.0, `nodeIntegration` is _disabled by default._ This means that you cannot import `promiseIpc` directly. Instead, you will need to use a [preload](https://www.electronjs.org/docs/api/browser-window) script when opening a `BrowserWindow`. Preload scripts can access builtins such as `require` even if `nodeIntegration` is disabled.\n\nFor convenience, this library provides a preload script which you can require that sets `window.promiseIpc`.\n\n```js\n// preload.js\nrequire('electron-promise-ipc/preload');\n```\n\n## Advanced usage\n\n#### Timeouts\n\nBy default, the promise will wait forever for the other process to return it some data. If you want to set a timeout (after which the promise will be rejected automatically), you can create another instance of `PromiseIpc` like so:\n\n```js\n// main process code remains the same\nimport promiseIpc from 'electron-promise-ipc';\n\npromiseIpc.on('someRoute', () =\u003e {\n  return someOperationThatNeverCompletesUhOh();\n});\n\n// in renderer - timeout is specified on the side that requests the data\nimport { PromiseIpc } from 'electron-promise-ipc';\n\nconst promiseIpc = new PromiseIpc({ maxTimeoutMs: 2000 });\n\npromiseIpc\n  .send('someRoute', '{ \"name\": \"Jeff\" }')\n  .then(() =\u003e console.log('You wrote the settings!'))\n  .catch((e) =\u003e console.error(e)); // will error out after 2 seconds\n```\n\n#### Removing Listeners\n\nYou can remove a listener with the `off()` method. It's aliased to `removeListener()` as well.\n\n```js\nimport promiseIpc from 'electron-promise-ipc';\n\npromiseIpc.on('someRoute', () =\u003e {\n  return something();\n});\n\npromiseIpc.off('someRoute'); // never mind\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsibnerian%2Felectron-promise-ipc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsibnerian%2Felectron-promise-ipc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsibnerian%2Felectron-promise-ipc/lists"}