-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add Wago.io addon source support #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Add foundation types and first API function for Wago.io addon source. This includes WagoGameData, WagoRelease, WagoCategory, WagoAddonSummary interfaces and the getGameData API function to fetch game metadata.
Add search and addon details API functions for Wago integration: - searchAddons: query Wago catalog by name with game version filter - getAddonDetails: fetch addon details by ID with typed result union Both functions require API key authentication (Bearer token) and include runtime validation for API responses.
Add utility functions for Wago addon processing: - getDownloadUrl(): extract download URL from release, handles API field drift - getVersion(): extract version label from release - getBestAvailableStability(): find best available channel (stable > beta > alpha) - getAddonIdFromUrl(): parse addon ID from Wago URLs
Allow users to provide Wago.io API key via environment variable as a fallback when the stored config value is empty. Stored config takes precedence over the env var when both are present.
…llback path The env var fallback was only applied when Zod validation succeeded. Now it's also applied in the fallback path when Zod validation fails, ensuring consistent behavior regardless of config validity.
Implements the command pattern for installing addons from Wago.io. Supports addon ID or full URL input, stability channel selection (stable/beta/alpha with fallback), multi-folder addon handling with ownedFolders, and automatic rollback on failure.
- Add empty-string validation for addon ID - Validate download URL domain is wago.io before downloading
Add a new API Keys section with a Wago API key input field that: - Uses masked input (mask="*") when editing for security - Shows masked display when not editing (up to 16 asterisks) - Shows "Not Configured" when no key is set - Follows existing patterns for text input fields (like destDir)
Add cyan-colored [Wago] badge for Wago addon source type in the repository row component, consistent with existing source type badges. Also update the download status text condition to show "Downloading Zip..." for Wago addons.
Fixes React warning: "Cannot update a component while rendering a different component". The checkStartTimes state was being updated inside the renderItem callback during render. Moved the state tracking to a useEffect that watches query fetching states.
- Accept recent_release in addition to releases field - Normalize recent_release to releases structure - Use owner with fallback to authors array for author field - Make owner and authors optional in type definition
…key in settings screen
- Show "From env WAGO_API_KEY" when key is sourced from environment - Disable editing when key comes from env var - Show hint about WAGO_API_KEY env var when not configured
- Replace manual type guards with Zod schemas and safeParse - Make schema fields permissive with .loose() for API compatibility - Fix download hang by consuming response as arrayBuffer before write
- Add test for updating Wago addon when new version available - Add test for detecting no update needed when version matches - Fix download hang in UpdateAddonCommand (same arrayBuffer fix)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
[Wago]source badge display in cyanChanges
src/core/wago.tsmodule with types, API functions, and helpersInstallWagoCommandfor installing addons by ID or URLInstallFromUrlCommandandUpdateAddonCommandfor Wago supportwagoApiKeywith env var fallback (WAGO_API_KEY)Test Plan
WAGO_API_KEYand install addon from Wago URL