This repository was archived by the owner on May 27, 2026. It is now read-only.
Add auto-updater API to Electron server#213
Merged
Merged
Conversation
Integrates new auto-updater routes for checking updates and installing them. Also includes event listeners to notify Laravel about update states like availability, download completion, and errors. This enhances the app's ability to manage updates seamlessly.
SRWieZ
suggested changes
Apr 28, 2025
Member
SRWieZ
left a comment
There was a problem hiding this comment.
Looks good, but plugin:test seems to be failing. Can you look into it?
Contributor
Author
|
Oh, okay, I'll check that again. |
This commit introduces a new "download-progress" event listener in the autoUpdater module. It forwards progress details, such as percentage and speed, to Laravel via the notifyLaravel function. Additionally, the electron-updater module is now mocked in tests for better coverage.
Contributor
Author
|
@SRWieZ I fixed the test and added the DownloadProgress event |
SRWieZ
approved these changes
Apr 29, 2025
gwleuverink
reviewed
Apr 29, 2025
| const router = express.Router(); | ||
| const { autoUpdater } = electronUpdater; | ||
| router.post("/check-for-updates", (req, res) => { | ||
| autoUpdater.checkForUpdates(); |
Contributor
There was a problem hiding this comment.
Idea: If you add a guard clause here you might be able to prevent the download from happening multiple times.
Set a Boolean & make sure to reset it when the download finishes/fails
Contributor
Author
There was a problem hiding this comment.
I don't think it's such a bad idea, but I don't know how reliably it will work.
Contributor
There was a problem hiding this comment.
Yeah it def needs some manual testing. We can always add it later if we want. What do you think @SRWieZ ?
Simplified the import syntax by directly importing `autoUpdater` from `electron-updater` instead of using the default export. Adjusted related mock implementation and type imports to align with this change, improving code readability and maintainability.
gwleuverink
approved these changes
May 7, 2025
SRWieZ
approved these changes
May 8, 2025
PeteBishwhip
pushed a commit
that referenced
this pull request
May 8, 2025
* Add auto-updater API to Electron server Integrates new auto-updater routes for checking updates and installing them. Also includes event listeners to notify Laravel about update states like availability, download completion, and errors. This enhances the app's ability to manage updates seamlessly. * Add download-progress listener to autoUpdater This commit introduces a new "download-progress" event listener in the autoUpdater module. It forwards progress details, such as percentage and speed, to Laravel via the notifyLaravel function. Additionally, the electron-updater module is now mocked in tests for better coverage. * Update api.test.ts * Refactor electron-updater imports for consistency and clarity Simplified the import syntax by directly importing `autoUpdater` from `electron-updater` instead of using the default export. Adjusted related mock implementation and type imports to align with this change, improving code readability and maintainability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrates new auto-updater routes for checking updates and installing them. Also includes event listeners to notify Laravel about update states like availability, download completion, and errors. This enhances the app's ability to manage updates seamlessly.
PR:
NativePHP/laravel: NativePHP/laravel#570