-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add Hearthstone #17952
base: main
Are you sure you want to change the base?
Add Hearthstone #17952
Conversation
Congratulations on your new Raycast extension! 🚀 Due to our current reduced availability, the initial review may take up to 10-15 business days Once the PR is approved and merged, the extension will be available on our Store. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
17 file(s) reviewed, 24 comment(s)
Edit PR Review Bot Settings | Greptile
raycast-env.d.ts | ||
.raycast-swift-build | ||
.swiftpm | ||
compiled_raycast_swift |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: These Swift-related ignore patterns (.raycast-swift-build, .swiftpm, compiled_raycast_swift) seem unnecessary since this appears to be a TypeScript/JavaScript extension. Consider removing them unless Swift functionality is planned.
raycast-env.d.ts | |
.raycast-swift-build | |
.swiftpm | |
compiled_raycast_swift | |
raycast-env.d.ts |
@@ -0,0 +1,21 @@ | |||
MIT License | |||
|
|||
Copyright (c) 2025 Raffe Yang |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Copyright year 2025 is in the future. Should be current year 2024 or earlier.
Copyright (c) 2025 Raffe Yang | |
Copyright (c) 2024 Raffe Yang |
"title": "Decks", | ||
"name": "search-best-decks", | ||
"description": "Search the best Hearthstone decks", | ||
"mode": "view" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Consider adding subtitle 'Hearthstone' to differentiate from other deck-related commands
"title": "Heroes", | ||
"name": "search-class-decks", | ||
"description": "Search the best Hearthstone decks per class", | ||
"mode": "view" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Consider adding subtitle 'Hearthstone' to differentiate from other hero-related commands
"title": "Cards", | ||
"name": "card-list", | ||
"description": "Browse Hearthstone cards", | ||
"mode": "view" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Consider adding subtitle 'Hearthstone' to differentiate from other card-related commands
minGames?: number; | ||
} | ||
|
||
export const CardData: Card[] = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Empty CardData array is exported but never populated - consider removing if unused or document its purpose
|
||
export interface DeckListProps { | ||
className?: ClassName; | ||
format?: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: format is typed as number but should be a union type of valid formats (1 | 2) for better type safety
import { CacheEntry } from "./utils"; | ||
|
||
const CACHE_DURATION_IN_MS = 3600 * 1_000; | ||
export const hsguru_BEST_DECKS_URL = (format: number) => `https://www.hsguru.com/decks/?format=${format}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: variable name should be camelCase (hsguru_BEST_DECKS_URL -> hsguruBestDecksUrl) to match TypeScript conventions
}; | ||
|
||
export const fetchDecks = async (url: string) => { | ||
const response = await axios.get(url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: network request needs error handling - wrap in try/catch and use showFailureToast from @raycast/utils
const response = await axios.get(url); | |
try { | |
const response = await axios.get(url); | |
} catch (error) { | |
showFailureToast("Failed to fetch decks", { description: error instanceof Error ? error.message : String(error) }); | |
return []; | |
} |
return url; | ||
}; | ||
|
||
export const gethsguruBestDecks = async (format: number = 1) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: function name should be camelCase (gethsguruBestDecks -> getHsguruBestDecks)
I added some comments in #17812. Setting the default language value as the preference for the card list grid dropdown would greatly enhance the user experience. |
Description
Hearthstone
⚡ Quickly find top Hearthstone decks and manage card collections directly from Raycast
Features
🃏 Competitive Deck Search
🚀 Quick Actions
(Enter)
(⌘+Enter)
Installation
npm install && npm run dev
Workflow Example
hs
Wild
→ See top 25 wild decksStandard
→ View current meta decks⌘F
⏎
to:(Enter)
(Enter)
(⌘ Enter)
Disclaimer: Not affiliated with Blizzard Entertainment. Card data © respective rights holders.
License: MIT
Checklist
npm run build
and tested this distribution build in Raycastassets
folder are used by the extension itselfREADME
are located outside the metadata folder if they were not generated with our metadata toolGreptile Summary
This PR adds a comprehensive Hearthstone extension for Raycast, enabling users to search decks, browse cards, and manage collections with multi-language support and detailed card views.
view
commands inpackage.json
but missingmetadata
folder with screenshots for store listing - please add it following Raycast DocumentationlaunchCommand
insrc/utils/hsguru.ts
should be wrapped in try-catch blocks when making API calls to HSGurusubtitle
to commands inpackage.json
with "Hearthstone" to help users distinguish them from other card game extensionsisLoading
to avoid empty state flicker per Raycast DocumentationshowFailureToast
from@raycast/utils
instead of manual error handling in try-catch blocks💡 (4/5) You can add custom instructions or style guidelines for the bot here!