{"id":18562476,"url":"https://github.com/replit/desktop-releases","last_synced_at":"2025-04-28T14:26:13.313Z","repository":{"id":243258911,"uuid":"635329995","full_name":"replit/desktop-releases","owner":"replit","description":"Update release server for the desktop app","archived":false,"fork":false,"pushed_at":"2025-03-03T21:25:32.000Z","size":690,"stargazers_count":2,"open_issues_count":4,"forks_count":2,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-30T10:33:14.122Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://desktop.replit.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/replit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-05-02T13:14:46.000Z","updated_at":"2025-03-03T21:25:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"fdafcf59-784a-411d-91f6-c2ddf6531391","html_url":"https://github.com/replit/desktop-releases","commit_stats":null,"previous_names":["replit/desktop-releases"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replit%2Fdesktop-releases","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replit%2Fdesktop-releases/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replit%2Fdesktop-releases/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replit%2Fdesktop-releases/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/replit","download_url":"https://codeload.github.com/replit/desktop-releases/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251328429,"owners_count":21571923,"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-06T22:09:52.530Z","updated_at":"2025-04-28T14:26:13.304Z","avatar_url":"https://github.com/replit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Desktop Release Server\n\n\u003cspan\u003e\u003ca href=\"https://replit.com/@util/desktop-releases\" title=\"Run on Replit badge\"\u003e\u003cimg src=\"https://replit.com/badge/github/replit/desktop-releases\" alt=\"Run on Replit badge\" /\u003e\u003c/a\u003e\u003c/span\u003e\n\nUpdate release server based on [Hazel](https://github.com/vercel/hazel) and used by the [desktop app](https://github.com/replit/desktop).\n\n## Usage\n\nDeploy this server to https://desktop.replit.com/ via the deployments pane in the [Repl](https://replit.com/@util/desktop-releases)\n\nThen set the following code in the Electron client:\n\n```js\nconst { app, autoUpdater } = require('electron')\n\nconst server = \"https://desktop.replit.com\"\nconst url = `${server}/update/${process.platform}/${app.getVersion()}`\n\nautoUpdater.setFeedURL({ url })\n```\n\nThat's it! :white_check_mark:\n\nFrom now on, the auto updater will ask your server for updates!\n\n## Env vars\n\nThe following environment variables must be set:\n\n- `ACCOUNT`: The name of the account that owns the repository \n- `REPOSITORY`: The name of the repository\n- `TOKEN`: Your GitHub token (for private repos)\n- `URL`: The server's URL\n\nThe token must be set to a [fine-grained personal access token](https://github.com/settings/tokens?type=beta) with access to the [replit/desktop](https://github.com/replit/desktop) repo and content-read permissions.\n\nSuch tokens have a max expiry date of 1 year so make sure to rotate them accordingly.\n\nYou can view and update the token in the Repl via the secrets pane for development and the deployments pane for production builds.\n\n## Routes\n\n### /\n\nDisplays an overview page showing the cached repository with the different available platforms and file sizes. Links to the repo, releases, specific cached version and direct downloads for each platform are present.\n\n### /latest\n\nReturns metadata about the latest version of the app from the cache.\n\n### /download\n\nAutomatically detects the platform/OS of the visitor by parsing the user agent and then downloads the appropriate copy of your application.\n\nIf the latest version of the application wasn't yet pulled from [GitHub Releases](https://help.github.com/articles/creating-releases/), it will return a message and the status code `404`. The same happens if the latest release doesn't contain a file for the detected platform.\n\n### /download/:platform\n\nAccepts a platform (like \"darwin\" or \"win32\") to download the appropriate copy your app for. I generally suggest using either `process.platform` ([more](https://nodejs.org/api/process.html#process_process_platform)) or `os.platform()` ([more](https://nodejs.org/api/os.html#os_os_platform)) to retrieve this string.\n\nAlso used to download certain platform-specific binaries like `.dmg` and `nupkg` files.\n\nIf the cache isn't filled yet or doesn't contain a download link for the specified platform, it will respond like `/`.\n\n### /update/:platform/:version\n\nChecks if there is an update available by reading from the cache.\n\nIf the latest version of the application wasn't yet pulled from [GitHub Releases](https://help.github.com/articles/creating-releases/), it will return the `204` status code. The same happens if the latest release doesn't contain a file for the specified platform.\n\n### /update/win32/:version/RELEASES\n\nThis endpoint was specifically crafted for the Windows platform (called \"win32\" [in Node.js](https://nodejs.org/api/process.html#process_process_platform)).\n\nSince the [Windows version](https://github.com/Squirrel/Squirrel.Windows) of Squirrel (the software that powers auto updates inside [Electron](https://www.electronjs.org)) requires access to a file named \"RELEASES\" when checking for updates, this endpoint will respond with a cached version of the file that contains a download link to a `.nupkg` file (the application update).\n\n## Testing\n\nTo run the Jest tests under `test/`, simply run `yarn run jest`.\n\nMake sure the `TOKEN` and `URL` env vars are set before doing so as some tests require them.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplit%2Fdesktop-releases","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freplit%2Fdesktop-releases","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplit%2Fdesktop-releases/lists"}