forked from podman-desktop/extension-bootc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: using simple objects in rpc api (to avoid snapshots)
Moving to svelte 5, state objects are proxied. Normally that's an implementation detail, but when you try to pass the proxies through rpc they can't be cloned and result in errors. We could use $state.snapshot(build) every time we pass objects from the UI to the API, but we really shouldn't be passing whole objects to the backend and blindly trusting that the objects (including all properties) match what the backend knows anyway. This changes the three affected API functions to accept ids instead of objects, and the backend looks up the objects before acting. Although it's slightly more work on the backend, this is a better/more robust API, and also avoids the svelte 5 proxy issue. Fixes podman-desktop#1304. Signed-off-by: Tim deBoer <[email protected]>
- Loading branch information
1 parent
0b8d634
commit f51ae82
Showing
8 changed files
with
32 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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