{"id":20863352,"url":"https://github.com/agregoreweb/fetch-to-electron-protocol-handler","last_synced_at":"2025-08-26T02:09:28.460Z","repository":{"id":60091851,"uuid":"540243430","full_name":"AgregoreWeb/fetch-to-electron-protocol-handler","owner":"AgregoreWeb","description":"Generate electron protocol handlers from lazy-loaded fetch API handlers","archived":false,"fork":false,"pushed_at":"2022-09-23T02:21:32.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-20T04:46:20.425Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AgregoreWeb.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}},"created_at":"2022-09-23T02:05:57.000Z","updated_at":"2022-09-23T02:25:46.000Z","dependencies_parsed_at":"2022-09-25T21:56:44.212Z","dependency_job_id":null,"html_url":"https://github.com/AgregoreWeb/fetch-to-electron-protocol-handler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgregoreWeb%2Ffetch-to-electron-protocol-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgregoreWeb%2Ffetch-to-electron-protocol-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgregoreWeb%2Ffetch-to-electron-protocol-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgregoreWeb%2Ffetch-to-electron-protocol-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AgregoreWeb","download_url":"https://codeload.github.com/AgregoreWeb/fetch-to-electron-protocol-handler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243236520,"owners_count":20258850,"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","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":[],"created_at":"2024-11-18T05:28:41.978Z","updated_at":"2025-03-12T14:43:31.595Z","avatar_url":"https://github.com/AgregoreWeb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fetch-to-electron-protocol-handler\nGenerate electron protocol handlers from lazy-loaded fetch API handlers\n\nRefactored from the [Agregore Browser](https://github.com/AgregoreWeb/agregore-browser)\n\n## Usage\n\n```javascript\nconst fetchToHandler = require('fetch-to-electron-protocol-handler')\nconst {protocols, session} = require('electron')\n\nconst {handler} = fetchToHandler(getFetch, session.defaultSession)\n\nprotcols.registerStreamProtocol('example', handler)\n\nasync function getFetch() {\n // Asynchronously initialize your `fetch()` function\n // This is where you can set up your p2p nodes\n // Note that the initializing will happen on the initial invocation\n return async function fetch({url, ...opts}) =\u003e {\n   const convertedURL = new URL(url)\n   url.protocol = 'https:'\n\n   return globalThis.fetch(convertedURL.href, opts)\n }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagregoreweb%2Ffetch-to-electron-protocol-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagregoreweb%2Ffetch-to-electron-protocol-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagregoreweb%2Ffetch-to-electron-protocol-handler/lists"}