Add ability to export / import packs #426

Merged
LunarTides merged 13 commits from packager into main 2025-12-06 10:26:22 +00:00
LunarTides commented 2025-12-04 22:42:37 +00:00 (Migrated from github.com)

Closes #210

Jesus... This PR has exploded in scope... And has spawned #427 and #428, which are colossal... I'm pretty excited :3

  • Fix importing the same pack twice breaks ids. No longer relevant.
  • If importing a pack removes a card, or if the game adds a new one, the ids will get mismatched.
    • Make ids uuids instead of incrementing numbers.
  • Allow exporting existing packs, or press n to export a new one.
  • Add metadata (JSON).
    • Game version
    • Pack version
    • Name (for looking up, should be unique.)
    • Authors (String list of authors.)
    • Links (Name, link object. E.g. links: { github: "https://github.com/Example/Pack1.hspkg", youtube: "https://youtube.com/@Example" } The youtube one can be a channel name, or a video, it doesn't matter. The links can be whatever.)
    • Requires (Depend on other packs / cards (bp uuids) / custom classes or tribes)
    • Use package.json for reference.
  • Add proper packs README.
  • Make sure it works. (Stress test.)
Closes #210 Jesus... This PR has exploded in scope... *And* has spawned #427 and #428, which are *colossal*... I'm pretty excited :3 - [ ] ~~Fix importing the same pack twice breaks ids.~~ No longer relevant. - [x] If importing a pack removes a card, or if the game adds a new one, the ids will get mismatched. - [x] Make ids uuids instead of incrementing numbers. - [x] Allow exporting existing packs, or press `n` to export a new one. - [x] Add metadata (JSON). - [x] Game version - [x] Pack version - [x] Name (for looking up, should be unique.) - [x] Authors (String list of authors.) - [x] Links (Name, link object. E.g. `links: { github: "https://github.com/Example/Pack1.hspkg", youtube: "https://youtube.com/@Example" }` The youtube one can be a channel name, or a video, it doesn't matter. The links can be whatever.) - [x] Requires (Depend on other packs / cards (bp uuids) / custom classes or tribes) - [x] Use `package.json` for reference. - [x] Add proper packs README. - [x] Make sure it works. (Stress test.)
coderabbitai[bot] commented 2025-12-04 22:42:45 +00:00 (Migrated from github.com)

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

75 files out of 182 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch packager

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

<!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- This is an auto-generated comment: skip review by coderabbit.ai --> > [!IMPORTANT] > ## Review skipped > > More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review. > > 75 files out of 182 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits. > > You can disable this status message by setting the `reviews.review_status` to `false` in the CodeRabbit configuration file. <!-- end of auto-generated comment: skip review by coderabbit.ai --> <!-- finishing_touch_checkbox_start --> <details> <summary>✨ Finishing touches</summary> - [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate docstrings <details> <summary>🧪 Generate unit tests (beta)</summary> - [ ] <!-- {"checkboxId": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Create PR with unit tests - [ ] <!-- {"checkboxId": "07f1e7d6-8a8e-4e23-9900-8731c2c87f58", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Post copyable unit tests in a comment - [ ] <!-- {"checkboxId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Commit unit tests in branch `packager` </details> </details> <!-- finishing_touch_checkbox_end --> <!-- tips_start --> --- Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=LunarTides/Hearthstone.js&utm_content=426)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary>❤️ Share</summary> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </details> <sub>Comment `@coderabbitai help` to get the list of available commands and usage tips.</sub> <!-- tips_end -->
LunarTides commented 2025-12-05 07:06:10 +00:00 (Migrated from github.com)

Because of how much this changes things, especially when I'm so close to 3.0, I can't merge now. I'll move this to 4.0.

Because of how much this changes things, especially when I'm so close to 3.0, I can't merge now. I'll move this to 4.0.
LunarTides commented 2025-12-05 12:22:11 +00:00 (Migrated from github.com)

Rebased on top of ffeecc4. Let's begin!

Rebased on top of ffeecc4. Let's begin!
LunarTides commented 2025-12-06 10:26:18 +00:00 (Migrated from github.com)

YOLO!

YOLO!
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
LunarTides/Hearthstone.js!426
No description provided.