1
0
mirror of https://github.com/tcgdex/cards-database.git synced 2025-08-15 01:41:59 +00:00

Compare commits

..

187 Commits

Author SHA1 Message Date
TCGdex 🤖
e03d66e150 feat: Variants for sv10 (#774)
Co-authored-by: Avior <git@avior.me>
2025-05-30 21:31:14 +00:00
2d5cf729c8 feat: Add sv10 - Destined Rivals (#751) 2025-05-30 20:30:18 +00:00
51da484016 fix: invalid cardcount (#772) 2025-05-29 14:36:59 +00:00
eb93ab4124 feat: Add A3a - Extradimensional Crisis (#752) 2025-05-29 14:18:14 +00:00
082bb77f13 fix: invalid type (#771) 2025-05-29 14:12:50 +00:00
27ae2b025f fix: Boosters werent translated (#745) 2025-05-27 13:28:44 +02:00
TCGdex 🤖
99c0203dc1 fix: changed retreat cost (#770) 2025-05-27 11:23:05 +00:00
8c77025f4e feat: Add remaining Sword & Shield promos (#768) 2025-05-26 11:53:06 +00:00
25df3092d2 feat: Add SV10 (#747) 2025-05-24 20:58:26 +02:00
651313ce70 feat: Add SV9s (#746) 2025-05-24 20:57:29 +02:00
db5863caee feat: Add SV9a (#672) 2025-05-24 20:35:21 +02:00
90d12fc9b6 fix: SV sets now have their illustrator set (#743) 2025-05-24 19:10:13 +02:00
21e158805b fix: SWSH8 attacks in other languages (#742) 2025-05-24 18:12:17 +02:00
kvacquier
3859a2fb71 Fix : Basic Energies and standard legal + repair special energies status from SV Block (#710)
Co-authored-by: Kevin Vacquier <kevin.vacquier@qonto.com>
2025-05-24 13:31:22 +00:00
dependabot[bot]
5f5afdea80 build: bump actions/checkout from 3 to 4 (#730)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-18 12:19:48 +00:00
859f325a20 fix: server runtime error (#741) 2025-05-18 14:11:41 +02:00
0b4796cbb2 chore: optimize github actions runtime (#739) 2025-05-18 01:05:50 +02:00
25117a4141 chore: run comment-pr when it is edited (#738) 2025-05-18 00:59:28 +02:00
c809b14783 feat: add boosters to API (#737) 2025-05-18 00:53:26 +02:00
8ca40f410d feat: Add the TCG Pocket cards in other languages (#734) 2025-05-17 19:27:22 +02:00
c26b91ac85 refactor: get the full list of (#735) 2025-05-15 00:24:48 +02:00
TCGdex 🤖
fa0b9d5f7c 7186 (#733)
Co-authored-by: Avior <git@avior.me>
2025-05-12 11:37:57 +02:00
TCGdex 🤖
860248e5d9 chore: fix infos for two cards (#732)
Co-authored-by: Avior <github@avior.me>
2025-05-07 19:44:06 +00:00
224d9cd1c6 feat: Add openapi explorer (#529) 2025-05-04 01:21:54 +02:00
Khaleeq Ahmad
98bc4db193 Fix: Celestial Guardians corrections (#725)
Co-authored-by: Khaleeq Ahmad <1710642+khaleeqahmad@users.noreply.github.com>
2025-05-03 22:42:16 +00:00
yugi-classic
d169a67833 fix: correct data for sets tk-ex-latia, tk-ex-latio, tk-ex-m, tk-ex-p, tk-bw-e, tk-bw-z (#726)
Co-authored-by: Avior <github@avior.me>
2025-05-04 00:37:30 +02:00
d0c43e5ce6 Update build.yml 2025-05-04 00:31:12 +02:00
61f506ee95 fix: build nor running 2025-05-04 00:28:51 +02:00
651be99b41 fix: build not running on PRs 2025-05-04 00:26:48 +02:00
8a8602da96 fix: url not valid 2025-05-04 00:17:36 +02:00
5b1f0528db fix: use the current user instead of the hardcoded user 2025-05-04 00:15:03 +02:00
2e4e3c25ba fix: change status depending on input 2025-05-04 00:08:53 +02:00
c9021ab8fa fix: comment not made 2025-05-04 00:02:43 +02:00
8feda41809 fix: use another token 2025-05-03 23:48:52 +02:00
1eb4c677a7 chore: Add ability to comment on Prs to simplify checking cards (#729) 2025-05-03 23:33:15 +02:00
yugi-classic
b26236e78c feat: Add missing Cards to tk-dp-l (lucario) and tk-dp-m (manaphy) (#721) 2025-05-02 00:43:52 +02:00
aa07e67c80 fix: allow forks to run the build (#723) 2025-05-02 00:39:07 +02:00
961c75c8a0 fix: dex-id url not returning valid cards & filtering not working using dexId (#722) 2025-05-02 00:31:04 +02:00
509288ad19 fix: lillie's clefairy EX having an additionnal attack (#720) 2025-05-02 00:06:20 +02:00
e23bc6c909 feat: update TCG Pocket Promos and fix some issues (#719) 2025-05-01 23:54:36 +02:00
2ca455a957 feat: Add support for ARM servers (#528) 2025-04-30 22:53:22 +02:00
13ad5fb0a2 Revert "feat: added variants to Journey Together cards (#715)" (#717) 2025-04-30 22:46:43 +02:00
Andre Viermann
17a0e241cc feat: added variants to Journey Together cards (#715) 2025-04-30 22:04:22 +02:00
Khaleeq Ahmad
dc51d5e8a8 Fix: A2b Shining Revelry attack amendments (#698)
* Fix: Shining Revelry - Add missing attack damage symbols

* Fix: Shining Revelry - Add missing energy symbols to attack effects

* Fix: Shining Revelry set setails- add foreign language names and update card counts

---------

Co-authored-by: Khaleeq Ahmad <1710642+khaleeqahmad@users.noreply.github.com>
2025-04-30 09:54:55 +02:00
Khaleeq Ahmad
e1de8e8323 feat: Add data TCGP Promo-A 042-059 (March 2025) (#680)
* Add new PTCGP Promo-A cards for March 2025 (42 through 49)

* Add additional cards Promos-A 050 - 059

---------

Co-authored-by: Khaleeq Ahmad <1710642+khaleeqahmad@users.noreply.github.com>
2025-04-30 09:53:54 +02:00
Khaleeq Ahmad
744ad63e3a fix: Triumphant Light corrections (#679)
* Fix Triumphant Light card data and formatting

Fix card data including attack damage modifiers, Palkia and Dalgia Origin forme names and incorrect weakness for Giratina.
Also remove unnecessary HTML formatting from card descriptions

* Remove HTML anchor tags around referenced Pokemon names

---------

Co-authored-by: Khaleeq Ahmad <1710642+khaleeqahmad@users.noreply.github.com>
2025-04-30 09:53:01 +02:00
Simone Anile
6b223c688d Fix evolveFrom for Card 1 of POP Series 3 set (#700)
Updated 
"evolveFrom": "Unown"
to
"evolveFrom": "Wartortle"
2025-04-30 09:51:44 +02:00
Dizo
e749ed01e2 FIX: Prismatic Evolutions set name (Spanish) (#706) 2025-04-30 09:51:31 +02:00
kvacquier
e4eb25b6ea 2025 Rotation (#709) 2025-04-30 09:51:10 +02:00
Octopixell
814f94be6f fix: Add holo variant for sv03-100 (#713)
* fix: Add holo variant for sv03-100

* feat: Add verbose variants for sv03-100

* Update 100.ts

---------

Co-authored-by: Avior <florian.bouillon@delta-wings.net>
2025-04-30 09:50:55 +02:00
yugi-classic
63790a056c feat: Add 1 Missing card in tk-dp-l (#714) 2025-04-30 09:45:36 +02:00
51e017e9cc feat: add Celestial Guardians (#716) 2025-04-30 09:45:00 +02:00
a550cf079c feat: Add Journey Together (#701)
* feat: Add static data for Journey Together

Signed-off-by: Avior <git@avior.me>

* feat: finish naming

Signed-off-by: Avior <git@avior.me>

* should be done

Signed-off-by: Avior <git@avior.me>

* Update index.ts

---------

Signed-off-by: Avior <git@avior.me>
2025-03-29 12:44:17 +01:00
78366685f8 feat: TCG Pocket A2b (#695)
* feat: TCG Pocket A2b

Signed-off-by: Avior <git@avior.me>

* fix:implement new rarities

Signed-off-by: Avior <git@avior.me>

* fix:implement new rarities

Signed-off-by: Avior <git@avior.me>

---------

Signed-off-by: Avior <git@avior.me>
2025-03-27 01:01:27 +01:00
Octopixell
08971af0bf fix: Add holo variants for sv03-013 and sv03-014 (#690)
* fix: Add holo variant for sv03-013

* fix: Add holo variant for sv03-014
2025-03-26 14:56:46 +01:00
Octopixell
7111c33403 fix: Add normal variant for sv01-190 (#689) 2025-03-26 14:55:04 +01:00
Octopixell
a08b8d8cca fix: Add normal variant for sv03-062 (#688) 2025-03-26 14:54:45 +01:00
c3cfb2607a fix: random exit from worker making server not react (#685) 2025-03-12 08:10:49 +01:00
Octopixell
16caf3384e fix: Add holo variant for sv01-134 (#678) 2025-03-11 10:29:48 +01:00
Ziya Fenn
c5ab6d966b Fix Exeggutor ex attack name (#682) 2025-03-11 10:29:18 +01:00
7e2a3ea30c fix: Find a better image for the serie logo (#671) 2025-02-28 10:16:06 +01:00
ecf4c9f8fa feat: Add Triumphant Light set (#670) 2025-02-28 10:05:02 +01:00
e8e9c23e14 feat: Add SV8s (#675) 2025-02-28 08:44:50 +01:00
e4099defdb feat: Add SV9 (#674) 2025-02-28 08:44:38 +01:00
19dccfd5d7 feat: Add SV8a (#673) 2025-02-28 08:44:24 +01:00
Octopixell
2f9c5814ff fix: Add holo variants for sv03-023 and sv03-027 (#669) 2025-02-27 23:27:15 +01:00
Khaleeq Ahmad
7f95bd3da1 fix: Remove incorrect weaknesses from Pocket A1a and A2 dragons (#667)
Co-authored-by: Khaleeq Ahmad <1710642+khaleeqahmad@users.noreply.github.com>
2025-02-20 09:38:22 +01:00
Helio Filho
0158daf40d add cards svp promos en & pt and add abbreviations official stellar crown (#662) 2025-02-19 23:59:39 +01:00
Khaleeq Ahmad
a597759d9d fix: Pocket card data fixes (#659)
Co-authored-by: Khaleeq Ahmad <1710642+khaleeqahmad@users.noreply.github.com>
2025-02-19 21:52:42 +01:00
Octopixell
28662c55c3 fix: Add holo variants for sv03-148 and sv03-149 (#663) 2025-02-19 21:30:40 +01:00
Octopixell
eca49a1bee fix: add normal variant for swsh9-008 (#661) 2025-02-19 21:30:01 +01:00
Khaleeq Ahmad
de13bb175a feat: Add data for Promo-A cards 034-041 (#660)
Co-authored-by: Khaleeq Ahmad <1710642+khaleeqahmad@users.noreply.github.com>
2025-02-19 21:29:02 +01:00
34dc55b1d7 fix: TCGP promos should have a rarity of None (#657)
Signed-off-by: Avior <git@avior.me>
2025-02-07 00:51:20 +01:00
17ef7efab3 fix: missing 063 in A1a (#656)
Signed-off-by: Avior <git@avior.me>
2025-02-07 00:46:37 +01:00
Adam Woo
b6dab212b7 Fix sv08-106 variants (#651) 2025-02-05 14:49:11 +01:00
ff0cf14773 chore: update README 2025-01-30 23:10:34 +01:00
FalconChipp
2a2b6463ff Added evolveFrom tag to all Genetic Apex cards (#642)
Co-authored-by: Avior <github@avior.me>
2025-01-30 23:03:12 +01:00
Eric Cornely
6b3633e748 Added missing variants (#644)
Co-authored-by: Eric Cornely <eric.cornely@beoogo.be>
Co-authored-by: Avior <github@avior.me>
2025-01-30 23:03:05 +01:00
8fb7f88283 feat: Add Space-Time Smackdown (#648) 2025-01-30 22:53:07 +01:00
Benjamin Rousseliere
366e9e6ea7 feat: add release date to series (#620) 2025-01-27 16:38:57 +01:00
a33629e883 feat: Add Prismatic Evolutions (#637) 2025-01-18 01:56:17 +01:00
33232f1b65 chore : Add test for #566 (#569) 2025-01-10 03:09:38 +01:00
7568334dec chore: add example docker-compose file (#635) 2025-01-10 00:12:11 +01:00
Benjamin Rousseliere
f39956e429 fix: specific request crash (#621) 2025-01-09 23:48:58 +01:00
Duncan
a722ecbbda fix: Paldea Evolved variants are incorrect (#632) 2025-01-09 22:23:02 +01:00
f2a7f09e48 feat: Add the new Pokémon TCG Pocket promos (#627) 2025-01-01 23:29:50 +01:00
Benjamin Rousseliere
60031a9de6 fix: invalid names delta species (#623) 2024-12-19 11:52:36 +01:00
144b794610 fix: test not using the correct param 2024-12-19 01:26:12 +01:00
62f6671b63 feat: Add Mythical Island set (#624)
* feat: Add A1a

Signed-off-by: Avior <git@avior.me>

* fix: test failing

Signed-off-by: Avior <git@avior.me>

---------

Signed-off-by: Avior <git@avior.me>
2024-12-19 01:16:28 +01:00
87d9b16fb8 chore: Add error reporting (#617)
* chore: Add error reporting

Signed-off-by: Avior <git@avior.me>

* fix: test issues

Signed-off-by: Avior <git@avior.me>

---------

Signed-off-by: Avior <git@avior.me>
2024-12-12 00:20:58 +01:00
0616b98038 fix: variable not found 2024-12-10 13:47:43 +01:00
Duncan
a8f8b29340 fix: Add missing reverse holo variants to SV03 Obsidian Flames holo rare cards (#611) 2024-12-10 13:38:12 +01:00
Duncan
2813d77f92 fix: Add missing reverse holo variants to 151 holo rare cards (#609) 2024-12-10 13:37:54 +01:00
ebc2bb28bf feat: Allow to customize number of workers (#616) 2024-12-10 13:34:57 +01:00
c52ed815bb feat: Add Scarlet & Violet Promos (#607)
* feat: ADd set datas

Signed-off-by: Avior <git@avior.me>

* feat: Add cards

Signed-off-by: Avior <git@avior.me>

---------

Signed-off-by: Avior <git@avior.me>
2024-12-03 09:32:33 +01:00
5e1ba9ee8d chore: update CODE_OF_CONDUCT.md (#593) 2024-12-01 23:36:54 +01:00
David Leiva
121db30389 feat: Add firstSet and lastSet properties to Serie interface (#591) 2024-12-01 23:35:26 +01:00
Richie Moon
48a984ef50 fix: Added the illustrator field to TCGP A1 cards. (#604) 2024-12-01 23:26:53 +01:00
Duncan
2b6d06184d fix: Add SV08 Surging Sparks card variants (#592)
* fix: Add SV08 Surging Sparks card variants

* fix: Fix validate by adding 'abbreviation' to Set interface
2024-12-01 23:26:45 +01:00
Duncan
109921761e fix: Enable reverse variant for SV05 Temporal Forces holo rare cards (#596) 2024-12-01 23:25:31 +01:00
Duncan
3b02e9be81 fix: Add SV06.5 Shrouded Fable card variants (#598) 2024-12-01 23:25:10 +01:00
Duncan
eaf5935a0f fix: Enable reverse variant for SV06 Twilight Masquerade holo rare cards (#600) 2024-12-01 23:24:51 +01:00
Duncan
878c0dc83a fix: Enable reverse variant for SV04.5 Paldean Fates holo rare cards (#603) 2024-12-01 23:24:21 +01:00
usullu
aeaa784100 fix: Fixed new added "Apex" Cards (#590)
Co-authored-by: yusullu <yusullu@gwh-digital.de>
2024-11-28 00:34:09 +01:00
Duncan
fabb829169 fix: Add SV07 Stellar Crown card variants (#588) 2024-11-28 00:25:43 +01:00
d291c692d9 fix: random card not respecting format (#589) 2024-11-27 23:55:07 +01:00
8610bd60fe feat: Add TCG Pocket promos A (#587) 2024-11-26 00:44:07 +01:00
TCGdex [Bot]
89e0b8d367 editor: fix some other rarities (#584)
Co-authored-by: Avior <git@avior.me>
2024-11-21 01:52:48 +01:00
TCGdex [Bot]
660cccbe97 editor: Edited some rarities (#583)
Co-authored-by: Avior <git@avior.me>
2024-11-21 01:26:29 +01:00
8eb9131f60 feat: Add series names
Signed-off-by: Avior <git@avior.me>
2024-11-12 11:09:04 +01:00
041572da85 fix: missing one
Signed-off-by: Avior <git@avior.me>
2024-11-12 10:53:12 +01:00
982e0dd8f0 chore: Add Dutch sets names (#580) 2024-11-12 10:48:49 +01:00
207a18fec6 chore: Add polish sets names (#579) 2024-11-12 10:42:15 +01:00
ac83a0ebdb chore: Add russian set names (#578) 2024-11-12 10:42:04 +01:00
45f7db66d7 feat: Add Surging Sparks (#576) 2024-11-12 01:16:52 +01:00
14ed8ee912 feat: Genetic Apex (A1) (English Only) (#573) 2024-11-06 02:16:30 +01:00
bf8f610c04 feat: Add chinese SV08 (#572) 2024-11-06 02:10:26 +01:00
8231f45f81 feat: Add abbreviations to the database (#534) 2024-11-06 02:10:06 +01:00
e30d54469d feat: add the Japanese SV8 (#559) 2024-11-06 00:58:08 +01:00
c1d83caca0 feat: Update asian sets (#554) 2024-11-05 23:46:04 +01:00
64bcd0524d fix: no data was returned when filtering with set (#568) 2024-11-05 19:03:12 +01:00
07a8ad0b8e fix: Add missing multi value filtering (#564) 2024-10-29 14:52:11 +01:00
4c96331b93 fix: set id not taking into account in set search (#563) 2024-10-17 23:33:34 +02:00
1a52a6f29a chore: Add sponsors segment (#549) 2024-10-10 02:49:52 +02:00
1d14078dd8 feat(asian): Updated SV6 and added SV6a & SV6s (#502) 2024-10-10 00:44:36 +02:00
4f2c27937a feat: Add Stellar Crown (#533) 2024-10-09 23:30:26 +02:00
bbd5d28dc6 fix: missing deletion 2024-09-26 00:43:22 +02:00
ce8d5590ef chore: Remove unused logs 2024-09-26 00:37:22 +02:00
b9dae445b1 fix: sets not working when fetching with name 2024-09-26 00:31:10 +02:00
4700618047 feat: Add advanced filtering capabilities (#522) 2024-09-26 00:11:48 +02:00
5899083e5d perfs: speedup Git file last edit lookup (#531) 2024-08-30 16:19:48 +02:00
ae6ed3cdaa feat: setup clustering (#530) 2024-08-30 12:10:05 +02:00
5928a1dd25 chore: tag no displaying correctly 2024-08-25 19:16:27 +02:00
Felipe Contreras Salinas
5fbcd82457 fix: add missing retreat cost and weakness for some cards (#527)
Co-authored-by: Felipe Contreras Salinas <felipe@bstr.cl>
2024-08-25 02:45:45 +02:00
cfd6d5c0e8 feat: Add shrouded fable cards (#525) 2024-08-25 02:44:42 +02:00
Felipe Contreras Salinas
80f483ab66 fix: Reversal Energy type should be "Special" (#526)
Co-authored-by: Felipe Contreras Salinas <felipe@bstr.cl>
2024-08-24 17:02:42 +02:00
31b1ae566e feat: Add standard Error reporting to user through RFC9457 (#519) 2024-07-25 12:29:06 +02:00
698f66cf55 chore: change favicon/robots/sitemap (#523) 2024-07-24 16:20:13 +02:00
c8ec4c88a7 feat: update format rotation to 2024 (#521) 2024-07-24 15:06:00 +02:00
68e363bfaa fix: Add missing codes of tcgOnline
Signed-off-by: Avior <git@avior.me>
2024-07-24 12:24:29 +02:00
TCGdex [Bot]
ab265c6c41 editor: misc fixes for variants (#517)
Co-authored-by: Avior <git@avior.me>
2024-07-03 22:44:31 +02:00
TCGdex [Bot]
c10020a9a9 editor: change Twilight Masquerade variants (#516)
Co-authored-by: Avior <git@avior.me>
2024-07-03 22:16:16 +02:00
TCGdex [Bot]
e36865e971 editor: fix temporal forces variants (#515)
Co-authored-by: Avior <git@avior.me>
2024-07-03 22:09:57 +02:00
TCGdex [Bot]
5b32edb5bf editor: fix Paldean Fates variants (#514)
Co-authored-by: Avior <git@avior.me>
2024-07-03 22:09:49 +02:00
TCGdex [Bot]
e7ceb7ac59 editor: correct variants for Paradox Rift (#513)
Co-authored-by: Avior <git@avior.me>
2024-07-03 22:09:39 +02:00
TCGdex [Bot]
629ab06c4c editor: add the correct variants for Obsidian Flames (#512) 2024-07-03 21:30:08 +02:00
TCGdex [Bot]
7e3cf7aa08 editor: fix Paldea Evolved variants (#510)
Co-authored-by: Aviortheking <git@avior.me>
2024-07-03 16:28:15 +02:00
TCGdex [Bot]
0475848425 editor: fix Scarlet & Violet variants (#508)
Co-authored-by: Avior <git@avior.me>
2024-07-03 15:53:00 +02:00
TCGdex [Bot]
eea5c5147b editor: add rarities for 151 set (#507)
Co-authored-by: Avior <git@avior.me>
2024-07-03 12:38:33 +02:00
3d58d92db7 chore: Remove error sub repository
Signed-off-by: Avior <github@avior.me>
2024-06-27 00:49:41 +02:00
dependabot[bot]
d0b4071ff9 build: bump docker/build-push-action from 5 to 6 (#496)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 12:33:44 +02:00
dependabot[bot]
661edcf790 build: bump oven-sh/setup-bun from 1 to 2 (#499)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 10:13:20 +02:00
27521b92ad fix: dependabot still has permission (#501) 2024-06-25 10:04:42 +02:00
6751deb9d0 chore: disable push to Docker for forks (#500) 2024-06-25 10:00:48 +02:00
2e8c843c5a chore: unused text (#497) 2024-06-19 23:35:44 +02:00
allcontributors[bot]
d75b756bac docs: add Reloadaxe as a contributor for data (#495)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-06-18 00:36:35 +02:00
Benjamin Rousseliere
91dc66a494 Add missing pokemon card dex ids (#494)
Co-authored-by: Benjamin Rousseliere <benjamin.r@galadrim.fr>
2024-06-18 00:34:39 +02:00
a26ef0e5eb feat: Add support for Asians Pokémon Cards (#481) 2024-06-07 12:53:08 +02:00
allcontributors[bot]
a35fadd50c docs: add spyworldxp as a contributor for data (#493)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-05-28 14:19:55 +02:00
Clement Yuan
f2c664badc Update 1.ts (#492) 2024-05-28 14:19:12 +02:00
8a4a93af8f feat: Add Twilight Masquerade (#491) 2024-05-24 08:48:44 +02:00
d48971c95e fix: Ordering failing when one value is null (#490) 2024-05-19 01:32:23 +02:00
16fe072e7e fix: Updated field not working as intended (#488) 2024-05-12 02:32:58 +02:00
c476d82618 feat: Add an updated field to the card field (#460) 2024-05-12 00:51:56 +02:00
e4aba3bf1c feat: Add random card/set/serie endpoint (#484)
Co-authored-by: Avior <git@avior.me>
2024-05-10 02:44:50 +02:00
df154e6b9b Chore: upgrade deps (#483)
Co-authored-by: Avior <git@avior.me>
2024-05-07 02:41:57 +02:00
c7b3267ca2 fix: Missing Compilation when testing 2024-05-06 01:39:46 +02:00
14418b0c94 chore: Add metadata for Portuguese (#482) 2024-05-06 01:37:29 +02:00
aa99ed2750 fix: Add the two missing sets in german (#479) 2024-03-25 00:48:31 +01:00
2d27a129a1 feat: Paldean Fates and Temporal Forces (#478) 2024-03-25 00:30:17 +01:00
0c29886812 fix: better error logging for GraphQL
Signed-off-by: Florian BOUILLON <f.bouillon@aptatio.com>
2024-02-29 15:12:39 +01:00
f6e7871fc5 fix: Remove even more requires
Signed-off-by: Florian BOUILLON <f.bouillon@aptatio.com>
2024-02-29 14:53:30 +01:00
f9aa90ed09 fix: Move from require to import
Signed-off-by: Florian BOUILLON <f.bouillon@aptatio.com>
2024-02-29 14:38:32 +01:00
8e3406f8fc feat: Add more error loggin to catch this shitty error
Signed-off-by: Florian BOUILLON <f.bouillon@aptatio.com>
2024-02-29 14:14:05 +01:00
e6a8c1dd71 chore: Add error handling directing to a Glitchtip server to log errors
Signed-off-by: Avior <github@avior.me>
2024-01-22 23:45:48 +01:00
0146765e7a fix: Cache saving 5xx errors
Signed-off-by: Avior <github@avior.me>
2024-01-22 23:22:39 +01:00
41bf9afde7 feat: Add ability for users to requests using the subfields values (#477) 2024-01-22 01:48:04 +01:00
2cfa860f6d fix: Undefined values crashing the request (#476) 2024-01-22 01:42:59 +01:00
b168b86006 chore: Update Bruno tests (#473) 2024-01-08 01:33:47 +01:00
dependabot[bot]
3a441887b8 build: bump actions/setup-node from 3 to 4 (#470)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Avior <github@avior.me>
2024-01-08 00:50:15 +01:00
dependabot[bot]
e36c92a0b0 build: bump actions/checkout from 3 to 4 (#469)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 00:48:09 +01:00
33007d83bc fix: Invalid card when searching using the set and localid (#472) 2024-01-08 00:40:31 +01:00
8684fb14e4 feat: Add bruno to tests the APIs (#468) 2024-01-03 23:42:56 +01:00
8fd7afeb32 fix: better sorting defaults
Signed-off-by: Avior <github@avior.me>
2024-01-03 23:24:52 +01:00
28fcb66fc9 fix: 404 error for options requests
Signed-off-by: Avior <github@avior.me>
2024-01-03 21:06:52 +01:00
12ed23b5a2 fix: invalid OPTIONS request handling (#467) 2024-01-03 20:25:15 +01:00
b4dbdef4fa fix: set order not following the old way (#465) 2024-01-03 12:16:57 +01:00
17265 changed files with 719955 additions and 6509 deletions

View File

@@ -52,6 +52,24 @@
"contributions": [
"data"
]
},
{
"login": "spyworldxp",
"name": "Clement Yuan",
"avatar_url": "https://avatars.githubusercontent.com/u/1112701?v=4",
"profile": "http://imclement.com",
"contributions": [
"data"
]
},
{
"login": "Reloadaxe",
"name": "Benjamin Rousseliere",
"avatar_url": "https://avatars.githubusercontent.com/u/44167126?v=4",
"profile": "https://github.com/Reloadaxe",
"contributions": [
"data"
]
}
],
"contributorsPerLine": 7,
@@ -60,5 +78,6 @@
"repoType": "github",
"repoHost": "https://github.com",
"skipCi": true,
"commitConvention": "angular"
"commitConvention": "angular",
"commitType": "docs"
}

8
.bruno/bruno.json Normal file
View File

@@ -0,0 +1,8 @@
{
"version": "1",
"name": "TCGdex",
"type": "collection",
"presets": {
"requestType": "http"
}
}

View File

@@ -0,0 +1,25 @@
meta {
name: Advanced Query
type: http
seq: 1
}
get {
url: {{BASE_URL}}/v2/en/cards?name=eq:Pikachu&hp=gte:60&hp=lt:70&localId=5&localId=not:tg&id=neq:cel25-5
body: none
auth: none
}
params:query {
name: eq:Pikachu
hp: gte:60
hp: lt:70
localId: 5
localId: not:tg
id: neq:cel25-5
}
assert {
res.status: eq 200
res.body.length: gte 14
}

View File

@@ -0,0 +1,28 @@
meta {
name: Get the cards list
type: http
seq: 1
}
get {
url: {{BASE_URL}}/v2/en/cards?sort:field=name&sort:order=DESC&pagination:page=1&pagination:itemsPerPage=4
body: none
auth: none
}
query {
sort:field: name
sort:order: DESC
pagination:page: 1
pagination:itemsPerPage: 4
~name: furret
}
assert {
res.status: eq 200
res.body.length: eq 4
}
docs {
Fully describe the card list request, it also has every parameters it can
}

View File

@@ -0,0 +1,16 @@
meta {
name: Get one card
type: http
seq: 2
}
get {
url: {{BASE_URL}}/v2/en/cards/swsh3-136
body: none
auth: none
}
assert {
res.status: eq 200
res.body.id: eq swsh3-136
}

23
.bruno/cards/multiple.bru Normal file
View File

@@ -0,0 +1,23 @@
meta {
name: Multiple values
type: http
seq: 1
}
get {
url: {{BASE_URL}}/v2/en/cards?name=eq:Pikachu|Pichu&hp=lt:70&localId=not:tg&id=neq:cel25-5
body: none
auth: none
}
params:query {
name: eq:Pikachu|Pichu
hp: lt:70
localId: not:tg
id: neq:cel25-5
}
assert {
res.status: eq 200
res.body.length: gt 85
}

View File

@@ -0,0 +1,21 @@
meta {
name: Get by Dex ID
type: http
seq: 1
}
get {
url: {{BASE_URL}}/v2/en/dex-ids/{{ID}}
body: none
auth: none
}
vars:pre-request {
ID: 162
}
assert {
res.status: eq 200
res.body.cards.length: gte 8
res.body.name: eq {{ID}}
}

View File

@@ -0,0 +1,3 @@
vars {
BASE_URL: https://beta.api.tcgdex.net
}

View File

@@ -0,0 +1,3 @@
vars {
BASE_URL: http://127.0.0.1:3000
}

View File

@@ -0,0 +1,3 @@
vars {
BASE_URL: https://api.tcgdex.net
}

View File

@@ -0,0 +1,20 @@
meta {
name: End Star Pattern
type: http
seq: 1
}
get {
url: {{BASE_URL}}/v2/en/cards?name=*chu
body: none
auth: inherit
}
params:query {
name: *chu
}
assert {
res.body.length: gt 3
res.body[1].name: neq Pikachu on the Ball
}

View File

@@ -0,0 +1,19 @@
meta {
name: dexId Search
type: http
seq: 3
}
get {
url: {{BASE_URL}}/v2/ja/cards?dexId=eq:357
body: none
auth: inherit
}
params:query {
dexId: eq:357
}
assert {
res.body.length: eq 3
}

View File

@@ -0,0 +1,20 @@
meta {
name: Start star Pattern
type: http
seq: 2
}
get {
url: {{BASE_URL}}/v2/en/cards?name=fu*
body: none
auth: inherit
}
params:query {
name: fu*
}
assert {
res.body.length: gt 3
res.body[1].name: neq Stufful
}

View File

@@ -0,0 +1,22 @@
meta {
name: 466 - Invalid Sorting
type: http
seq: 1
}
get {
url: {{BASE_URL}}/v2/en/sets/swsh8/53
body: none
auth: none
}
assert {
res.body.id: eq swsh8-53
res.status: eq 200
}
docs {
Validate the issue seen in
https://github.com/tcgdex/cards-database/issues/466
}

View File

@@ -0,0 +1,15 @@
meta {
name: 467 - Validate that we can run OPTIONS
type: http
seq: 2
}
options {
url: {{BASE_URL}}/status
body: none
auth: none
}
assert {
res.status: eq 200
}

View File

@@ -0,0 +1,22 @@
meta {
name: 471 - Invalid Set Sorting
type: http
seq: 3
}
get {
url: {{BASE_URL}}/v2/en/sets/swsh12/10
body: none
auth: none
}
assert {
res.body.id: eq swsh12-010
res.status: eq 200
}
docs {
Validate the issue seen in
https://github.com/tcgdex/cards-database/issues/471
}

View File

@@ -0,0 +1,25 @@
meta {
name: 474 - Queries crashing the server
type: http
seq: 4
}
get {
url: {{BASE_URL}}/v2/en/cards?legal.standard=true
body: none
auth: none
}
query {
legal.standard: true
}
assert {
res.status: eq 200
}
docs {
Validate the issue seen in
https://github.com/tcgdex/cards-database/issues/474
}

View File

@@ -0,0 +1,25 @@
meta {
name: 475 - Ability to query subfileds
type: http
seq: 5
}
get {
url: {{BASE_URL}}/v2/en/cards?legal.standard=true
body: none
auth: none
}
query {
legal.standard: true
}
assert {
res.status: eq 200
}
docs {
Validate the issue seen in
https://github.com/tcgdex/cards-database/issues/474
}

View File

@@ -0,0 +1,17 @@
meta {
name: 489 - Crash When sorting with Null values
type: http
seq: 6
}
get {
url: {{BASE_URL}}/v2/en/cards?name=pikachu&sort:field=hp&sort:order=DESC
body: none
auth: none
}
query {
name: pikachu
sort:field: hp
sort:order: DESC
}

View File

@@ -0,0 +1,29 @@
meta {
name: 562 - GraphQL set request is not returning the correct value
type: graphql
seq: 7
}
post {
url: {{BASE_URL}}/v2/graphql
body: graphql
auth: none
}
body:graphql {
query Pouet {
set(id: "{{SET_ID}}") {
id
}
}
}
vars:pre-request {
SET_ID: swsh1
}
assert {
res.status: eq 200
res.body.data.set.id: eq {{SET_ID}}
}

View File

@@ -0,0 +1,15 @@
meta {
name: 566 - Specific request crash the request
type: http
seq: 7
}
get {
url: {{BASE_URL}}/v2/fr/cards?name=eq:Pikachu&name=eq:Pichu,Pikachu
body: none
auth: none
}
assert {
res.status: eq 200
}

View File

@@ -0,0 +1,21 @@
meta {
name: 567 - invalid data returned when filtering using set
type: http
seq: 9
}
get {
url: {{BASE_URL}}/v2/en/cards?name=umbreon&set=evolving skies
body: none
auth: none
}
params:query {
name: umbreon
set: evolving skies
}
assert {
res.status: eq 200
res.body.length: gte 6
}

28
.bruno/graphql/card.bru Normal file
View File

@@ -0,0 +1,28 @@
meta {
name: card
type: graphql
seq: 2
}
post {
url: {{BASE_URL}}/v2/graphql
body: graphql
auth: none
}
body:graphql {
query Pouet {
card(id: "{{ID}}") {
id
}
}
}
vars:pre-request {
ID: swsh1-136
}
assert {
res.status: eq 200
res.body.data.card.id: eq {{ID}}
}

33
.bruno/graphql/cards.bru Normal file
View File

@@ -0,0 +1,33 @@
meta {
name: cards
type: graphql
seq: 1
}
post {
url: {{BASE_URL}}/v2/graphql
body: graphql
auth: none
}
body:graphql {
query Pouet {
cards {
id
localId
name
set {
id
name
serie {
id
name
}
}
}
}
}
assert {
res.status: eq 200
}

29
.bruno/graphql/serie.bru Normal file
View File

@@ -0,0 +1,29 @@
meta {
name: serie
type: graphql
seq: 5
}
post {
url: {{BASE_URL}}/v2/graphql
body: graphql
auth: none
}
body:graphql {
query Pouet {
serie(id: "{{ID}}") {
id
}
}
}
vars:pre-request {
ID: swsh
}
assert {
res.status: eq 200
res.body.data.serie.id: eq {{ID}}
}

24
.bruno/graphql/series.bru Normal file
View File

@@ -0,0 +1,24 @@
meta {
name: series
type: graphql
seq: 6
}
post {
url: {{BASE_URL}}/v2/graphql
body: graphql
auth: none
}
body:graphql {
query Pouet {
series {
id
}
}
}
assert {
res.status: eq 200
}

29
.bruno/graphql/set.bru Normal file
View File

@@ -0,0 +1,29 @@
meta {
name: set
type: graphql
seq: 3
}
post {
url: {{BASE_URL}}/v2/graphql
body: graphql
auth: none
}
body:graphql {
query Pouet {
set(id: "{{SET_ID}}") {
id
}
}
}
vars:pre-request {
SET_ID: swsh1
}
assert {
res.status: eq 200
res.body.data.set.id: eq {{SET_ID}}
}

24
.bruno/graphql/sets.bru Normal file
View File

@@ -0,0 +1,24 @@
meta {
name: sets
type: graphql
seq: 4
}
post {
url: {{BASE_URL}}/v2/graphql
body: graphql
auth: none
}
body:graphql {
query Pouet {
sets {
id
}
}
}
assert {
res.status: eq 200
}

View File

@@ -0,0 +1,20 @@
meta {
name: Random Card
type: http
seq: 1
}
get {
url: {{BASE_URL}}/v2/en/random/card?name=furret
body: none
auth: none
}
query {
name: furret
}
assert {
res.status: eq 200
res.body.name: contains Furret
}

View File

@@ -0,0 +1,19 @@
meta {
name: Random Serie
type: http
seq: 3
}
get {
url: {{BASE_URL}}/v2/en/random/serie?name=p
body: none
auth: none
}
query {
name: p
}
assert {
res.status: eq 200
}

View File

@@ -0,0 +1,20 @@
meta {
name: Random Set
type: http
seq: 2
}
get {
url: {{BASE_URL}}/v2/en/random/set?name=sword
body: none
auth: none
}
query {
name: sword
}
assert {
res.status: eq 200
res.body.name: contains Sword
}

View File

@@ -0,0 +1,21 @@
meta {
name: Advanced Query
type: http
seq: 4
}
get {
url: {{BASE_URL}}/v2/en/sets?cardCount.official=gt:64&id=swsh
body: none
auth: none
}
params:query {
cardCount.official:gt: 64
id: swsh
}
assert {
res.status: eq 200
res.body: length 17
}

View File

@@ -0,0 +1,16 @@
meta {
name: Get a card by set name
type: http
seq: 6
}
get {
url: {{BASE_URL}}/v2/en/sets/Crystal%20Guardians/10
body: none
auth: none
}
assert {
res.status: eq 200
res.body.id: eq ex14-10
}

View File

@@ -0,0 +1,16 @@
meta {
name: Get a set by name
type: http
seq: 5
}
get {
url: {{BASE_URL}}/v2/en/sets/Crystal%20Guardians
body: none
auth: none
}
assert {
res.status: eq 200
res.body.id: eq ex14
}

View File

@@ -0,0 +1,25 @@
meta {
name: Get a list of sets
type: http
seq: 3
}
get {
url: {{BASE_URL}}/v2/en/sets?sort:field=name&sort:order=DESC&pagination:page=1&pagination:itemsPerPage=1&name=Dark
body: none
auth: none
}
query {
sort:field: name
sort:order: DESC
pagination:page: 1
pagination:itemsPerPage: 1
name: Dark
}
assert {
res.status: eq 200
res.body[0].id: eq swsh3
res.body.length: eq 1
}

16
.bruno/sets/get-a-set.bru Normal file
View File

@@ -0,0 +1,16 @@
meta {
name: Get a set
type: http
seq: 2
}
get {
url: {{BASE_URL}}/v2/en/sets/swsh3
body: none
auth: none
}
assert {
res.status: eq 200
res.body.id: eq swsh3
}

View File

@@ -0,0 +1,16 @@
meta {
name: Get one card from a set
type: http
seq: 1
}
get {
url: {{BASE_URL}}/v2/en/sets/swsh3/136
body: none
auth: none
}
assert {
res.status: eq 200
res.body.id: eq swsh3-136
}

View File

@@ -19,4 +19,3 @@ dist/
# production
/server/dist
/server/generated

View File

@@ -1,5 +1,5 @@
<!--
Thanks for your Pull Request, Please provide the related Issue using "Fix #0" or describe the change(s) you made.
The issue title must follow Conventional Commit (verified by Github Actions) conventionalcommits.org.
The issue title must follow Conventional Commit conventionalcommits.org.
More informations at https://github.com/tcgdex/cards-database/blob/master/CONTRIBUTING.md
-->

34
.github/scripts/.gitignore vendored Normal file
View File

@@ -0,0 +1,34 @@
# dependencies (bun install)
node_modules
# output
out
dist
*.tgz
# code coverage
coverage
*.lcov
# logs
logs
_.log
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# caches
.eslintcache
.cache
*.tsbuildinfo
# IntelliJ based IDEs
.idea
# Finder (MacOS) folder config
.DS_Store

15
.github/scripts/README.md vendored Normal file
View File

@@ -0,0 +1,15 @@
# scripts
To install dependencies:
```bash
bun install
```
To run:
```bash
bun run
```
This project was created using `bun init` in bun v1.2.11. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.

106
.github/scripts/bun.lock vendored Normal file
View File

@@ -0,0 +1,106 @@
{
"lockfileVersion": 1,
"workspaces": {
"": {
"name": "scripts",
"dependencies": {
"@actions/core": "^1.11.1",
"@actions/github": "^6.0.0",
"@tcgdex/sdk": "^2.6.0",
},
"devDependencies": {
"@types/bun": "latest",
},
"peerDependencies": {
"typescript": "^5",
},
},
},
"packages": {
"@actions/core": ["@actions/core@1.11.1", "", { "dependencies": { "@actions/exec": "^1.1.1", "@actions/http-client": "^2.0.1" } }, "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A=="],
"@actions/exec": ["@actions/exec@1.1.1", "", { "dependencies": { "@actions/io": "^1.0.1" } }, "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w=="],
"@actions/github": ["@actions/github@6.0.0", "", { "dependencies": { "@actions/http-client": "^2.2.0", "@octokit/core": "^5.0.1", "@octokit/plugin-paginate-rest": "^9.0.0", "@octokit/plugin-rest-endpoint-methods": "^10.0.0" } }, "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g=="],
"@actions/http-client": ["@actions/http-client@2.2.3", "", { "dependencies": { "tunnel": "^0.0.6", "undici": "^5.25.4" } }, "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA=="],
"@actions/io": ["@actions/io@1.1.3", "", {}, "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q=="],
"@cachex/core": ["@cachex/core@1.0.1", "", { "dependencies": { "@dzeio/object-util": "^1.8.3" } }, "sha512-sHynwjF9hKIvwg8rTUdvA7MOUMcUC5Mq0dpynPBILRS+IPvsHcE4Cb2uRSs0/I2nxO7NQp9p+xHYistdfJJSwg=="],
"@cachex/memory": ["@cachex/memory@1.0.1", "", { "dependencies": { "@cachex/core": "^1" } }, "sha512-KWUTdCCXhIlAkJaVZMhUh9kD0uq8PxC3Z34Q3lMGZOAV6FXP/cOMW89ALrWX3VkoRrrM4R6MIMO+amZNOvEqgw=="],
"@cachex/web-storage": ["@cachex/web-storage@1.0.1", "", { "dependencies": { "@cachex/core": "^1" } }, "sha512-E8Xa9qDZgNgr+lcj3eixowg7PH2CVZbp3huuoc5xVVTtwYrZi5YqbHBG12yG3r6C6Fts/2Yoq6cbVBSm6c8VRA=="],
"@dzeio/object-util": ["@dzeio/object-util@1.9.1", "", {}, "sha512-cLGsjAc7hzSadS57jcMxSPidYabyZXJOFnasScSrE/V5yflhze6T7L5/98josWYrXMvoKu7N+Ivk6vGkIj72UQ=="],
"@fastify/busboy": ["@fastify/busboy@2.1.1", "", {}, "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA=="],
"@octokit/auth-token": ["@octokit/auth-token@4.0.0", "", {}, "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA=="],
"@octokit/core": ["@octokit/core@5.2.1", "", { "dependencies": { "@octokit/auth-token": "^4.0.0", "@octokit/graphql": "^7.1.0", "@octokit/request": "^8.4.1", "@octokit/request-error": "^5.1.1", "@octokit/types": "^13.0.0", "before-after-hook": "^2.2.0", "universal-user-agent": "^6.0.0" } }, "sha512-dKYCMuPO1bmrpuogcjQ8z7ICCH3FP6WmxpwC03yjzGfZhj9fTJg6+bS1+UAplekbN2C+M61UNllGOOoAfGCrdQ=="],
"@octokit/endpoint": ["@octokit/endpoint@9.0.6", "", { "dependencies": { "@octokit/types": "^13.1.0", "universal-user-agent": "^6.0.0" } }, "sha512-H1fNTMA57HbkFESSt3Y9+FBICv+0jFceJFPWDePYlR/iMGrwM5ph+Dd4XRQs+8X+PUFURLQgX9ChPfhJ/1uNQw=="],
"@octokit/graphql": ["@octokit/graphql@7.1.1", "", { "dependencies": { "@octokit/request": "^8.4.1", "@octokit/types": "^13.0.0", "universal-user-agent": "^6.0.0" } }, "sha512-3mkDltSfcDUoa176nlGoA32RGjeWjl3K7F/BwHwRMJUW/IteSa4bnSV8p2ThNkcIcZU2umkZWxwETSSCJf2Q7g=="],
"@octokit/openapi-types": ["@octokit/openapi-types@24.2.0", "", {}, "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg=="],
"@octokit/plugin-paginate-rest": ["@octokit/plugin-paginate-rest@9.2.2", "", { "dependencies": { "@octokit/types": "^12.6.0" }, "peerDependencies": { "@octokit/core": "5" } }, "sha512-u3KYkGF7GcZnSD/3UP0S7K5XUFT2FkOQdcfXZGZQPGv3lm4F2Xbf71lvjldr8c1H3nNbF+33cLEkWYbokGWqiQ=="],
"@octokit/plugin-rest-endpoint-methods": ["@octokit/plugin-rest-endpoint-methods@10.4.1", "", { "dependencies": { "@octokit/types": "^12.6.0" }, "peerDependencies": { "@octokit/core": "5" } }, "sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg=="],
"@octokit/request": ["@octokit/request@8.4.1", "", { "dependencies": { "@octokit/endpoint": "^9.0.6", "@octokit/request-error": "^5.1.1", "@octokit/types": "^13.1.0", "universal-user-agent": "^6.0.0" } }, "sha512-qnB2+SY3hkCmBxZsR/MPCybNmbJe4KAlfWErXq+rBKkQJlbjdJeS85VI9r8UqeLYLvnAenU8Q1okM/0MBsAGXw=="],
"@octokit/request-error": ["@octokit/request-error@5.1.1", "", { "dependencies": { "@octokit/types": "^13.1.0", "deprecation": "^2.0.0", "once": "^1.4.0" } }, "sha512-v9iyEQJH6ZntoENr9/yXxjuezh4My67CBSu9r6Ve/05Iu5gNgnisNWOsoJHTP6k0Rr0+HQIpnH+kyammu90q/g=="],
"@octokit/types": ["@octokit/types@13.10.0", "", { "dependencies": { "@octokit/openapi-types": "^24.2.0" } }, "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA=="],
"@tcgdex/sdk": ["@tcgdex/sdk@2.6.0", "", { "dependencies": { "@cachex/memory": "^1", "@cachex/web-storage": "^1", "@dzeio/object-util": "^1", "isomorphic-unfetch": "^3" } }, "sha512-q0O7dNzRRLq38XwqUoHFKo78/NCQW5pEIZ+JnlrVOxp9r9R/LTIQGAMNR96Il0hb1uIm4j5o7WBueBCpuDyomQ=="],
"@types/bun": ["@types/bun@1.2.11", "", { "dependencies": { "bun-types": "1.2.11" } }, "sha512-ZLbbI91EmmGwlWTRWuV6J19IUiUC5YQ3TCEuSHI3usIP75kuoA8/0PVF+LTrbEnVc8JIhpElWOxv1ocI1fJBbw=="],
"@types/node": ["@types/node@22.15.3", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw=="],
"before-after-hook": ["before-after-hook@2.2.3", "", {}, "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="],
"bun-types": ["bun-types@1.2.11", "", { "dependencies": { "@types/node": "*" } }, "sha512-dbkp5Lo8HDrXkLrONm6bk+yiiYQSntvFUzQp0v3pzTAsXk6FtgVMjdQ+lzFNVAmQFUkPQZ3WMZqH5tTo+Dp/IA=="],
"deprecation": ["deprecation@2.3.1", "", {}, "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="],
"isomorphic-unfetch": ["isomorphic-unfetch@3.1.0", "", { "dependencies": { "node-fetch": "^2.6.1", "unfetch": "^4.2.0" } }, "sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q=="],
"node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="],
"once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="],
"tr46": ["tr46@0.0.3", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="],
"tunnel": ["tunnel@0.0.6", "", {}, "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="],
"typescript": ["typescript@5.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="],
"undici": ["undici@5.29.0", "", { "dependencies": { "@fastify/busboy": "^2.0.0" } }, "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg=="],
"undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
"unfetch": ["unfetch@4.2.0", "", {}, "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA=="],
"universal-user-agent": ["universal-user-agent@6.0.1", "", {}, "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ=="],
"webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="],
"whatwg-url": ["whatwg-url@5.0.0", "", { "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="],
"wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="],
"@octokit/plugin-paginate-rest/@octokit/types": ["@octokit/types@12.6.0", "", { "dependencies": { "@octokit/openapi-types": "^20.0.0" } }, "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw=="],
"@octokit/plugin-rest-endpoint-methods/@octokit/types": ["@octokit/types@12.6.0", "", { "dependencies": { "@octokit/openapi-types": "^20.0.0" } }, "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw=="],
"@octokit/plugin-paginate-rest/@octokit/types/@octokit/openapi-types": ["@octokit/openapi-types@20.0.0", "", {}, "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA=="],
"@octokit/plugin-rest-endpoint-methods/@octokit/types/@octokit/openapi-types": ["@octokit/openapi-types@20.0.0", "", {}, "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA=="],
}
}

472
.github/scripts/load-cards.ts vendored Normal file
View File

@@ -0,0 +1,472 @@
import core from "@actions/core";
import github from "@actions/github";
import TCGdex from "@tcgdex/sdk";
// Types
type CardData = {
id: string;
name: string;
image?: string;
rarity?: string;
set: { name: string };
hasImage: boolean;
};
type CardResult = {
file: string;
card?: CardData;
error?: string;
isAsian?: boolean;
usedLanguage?: string;
hasImage?: boolean;
status?: "added" | "removed" | "modified";
};
type CardFetchResult = {
card: any;
usedLanguage: string;
hasImage: boolean;
} | null;
// Constants
const DATA_REGEX = /^data\/([^\/]+)\/([^\/]+)\/([^\/]+)\.ts$/;
const DATA_ASIA_REGEX = /^data-asia\/([^\/]+)\/([^\/]+)\/([^\/]+)\.ts$/;
const INTERNATIONAL_LANGUAGES = ["en", "fr", "es", "es-mx", "it", "pt", "pt-br", "pt-pt", "de", "nl", "pl", "ru"];
const ASIAN_LANGUAGES = ["ja", "ko", "zh-tw", "id", "th", "zh-cn"];
const LANGUAGE_NAMES: Record<string, string> = {
en: "English",
fr: "French",
es: "Spanish",
"es-mx": "Spanish (Mexico)",
it: "Italian",
pt: "Portuguese",
"pt-br": "Portuguese (Brazil)",
"pt-pt": "Portuguese (Portugal)",
de: "German",
nl: "Dutch",
pl: "Polish",
ru: "Russian",
ja: "Japanese",
ko: "Korean",
"zh-tw": "Chinese (Taiwan)",
id: "Indonesian",
th: "Thai",
"zh-cn": "Chinese (China)",
};
// Helper function to sanitize card data
function sanitizeCardData(card: any): CardData | undefined {
if (!card) return undefined;
return {
id: card.id,
name: card.name,
image: card.image,
rarity: card.rarity,
set: card.set ? { name: card.set.name } : { name: "Unknown" },
hasImage: !!card.image,
};
}
// Helper function to try fetching a card with fallback to other languages
async function tryFetchCardWithFallback(
setIdentifier: string,
cardLocalId: string,
primaryLanguage: string,
allLanguages: string[],
isAsianRegion: boolean,
): Promise<CardFetchResult> {
let lastError: Error | unknown = null;
const languagesToTry = [primaryLanguage, ...allLanguages.filter((lang) => lang !== primaryLanguage)];
let foundWithoutImage: { lang: string; card: any } | undefined;
for (const lang of languagesToTry) {
try {
console.log(` Trying language: ${lang}`);
const tcgdex = new TCGdex(lang as any);
let card;
if (!isAsianRegion) {
const set = await tcgdex.set.get(setIdentifier);
card = await tcgdex.card.get(`${set!.id}-${cardLocalId}`);
} else {
card = await tcgdex.card.get(`${setIdentifier}-${cardLocalId}`);
}
if (card && !card.image) {
foundWithoutImage = { lang, card };
continue;
}
if (card && card.image) {
console.log(` Card: ${card.name} (${card.id}) - Found using language: ${lang}`);
return { card, usedLanguage: lang, hasImage: true };
}
} catch (error) {
lastError = error;
console.log(` Failed with language ${lang}: ${error instanceof Error ? error.message : "Unknown error"}`);
}
}
if (foundWithoutImage) {
console.log(` Card: ${foundWithoutImage.card.name} (${foundWithoutImage.card.id}) - Found without image`);
return { card: foundWithoutImage.card, usedLanguage: foundWithoutImage.lang, hasImage: false };
}
console.log(
` All languages failed. Last error: ${lastError instanceof Error ? lastError.message : "Unknown error"}`,
);
return null;
}
// Get changed files from GitHub
async function getChangedFiles(
context: typeof github.context,
octokit: ReturnType<typeof github.getOctokit>,
): Promise<{ filename: string; status: string }[]> {
if (context.payload.pull_request) {
const { owner, repo } = context.repo;
const prNumber = context.payload.pull_request.number;
// Get all files with pagination
const files: { filename: string; status: string }[] = [];
let page = 1;
let hasMorePages = true;
while (hasMorePages) {
const response = await octokit.rest.pulls.listFiles({
owner,
repo,
pull_number: prNumber,
per_page: 100, // Get maximum allowed per page
page: page,
});
if (response.data.length === 0) {
hasMorePages = false;
} else {
files.push(...response.data.map((file) => ({
filename: file.filename,
status: file.status
})));
page++;
}
}
return files;
} else if (context.payload.commits) {
const files: { filename: string; status: string }[] = [];
for (const commit of context.payload.commits) {
if (commit.added) {
commit.added.forEach((file: string) => files.push({ filename: file, status: "added" }));
}
if (commit.modified) {
commit.modified.forEach((file: string) => files.push({ filename: file, status: "modified" }));
}
if (commit.removed) {
commit.removed.forEach((file: string) => files.push({ filename: file, status: "removed" }));
}
}
return files;
}
return [];
}
// Process a single card file
async function processCardFile(file: { filename: string; status: string }): Promise<CardResult | null> {
console.log(` - ${file.filename} (${file.status})`);
let match = file.filename.match(DATA_REGEX);
const isCardFile = !!(match || file.filename.match(DATA_ASIA_REGEX));
if (!isCardFile) {
return null;
}
// For added files, just return the file info without fetching
if (file.status === "added") {
return {
file: file.filename,
status: "added",
};
}
// For removed files, just return the file info without fetching
if (file.status === "removed") {
return {
file: file.filename,
status: "removed",
};
}
// Only process modified files normally
if (match) {
const [_, , setName, cardLocalId] = match;
const result = await tryFetchCardWithFallback(setName!, cardLocalId!, "en", INTERNATIONAL_LANGUAGES, false);
if (result) {
return {
file: file.filename,
card: sanitizeCardData(result.card),
isAsian: false,
usedLanguage: result.usedLanguage,
hasImage: result.hasImage,
status: "modified",
};
} else {
return {
file: file.filename,
error: "Failed to fetch card information in all available languages",
isAsian: false,
status: "modified",
};
}
}
match = file.filename.match(DATA_ASIA_REGEX);
if (match) {
const [_, , setId, cardLocalId] = match;
const result = await tryFetchCardWithFallback(setId!, cardLocalId!, "ja", ASIAN_LANGUAGES, true);
if (result) {
return {
file: file.filename,
card: sanitizeCardData(result.card),
isAsian: true,
usedLanguage: result.usedLanguage,
hasImage: result.hasImage,
status: "modified",
};
} else {
return {
file: file.filename,
error: "Failed to fetch card information in all available languages",
isAsian: true,
status: "modified",
};
}
}
return null;
}
// Generate comment body for PR
function generateCommentBody(
cardResults: CardResult[],
changedFiles: { filename: string; status: string }[],
repoFullName: string,
contextSha: string,
): string {
const maxCommentLength = 65500;
const newCards = cardResults.filter((r) => r.status === "added").length;
const deletedCards = cardResults.filter((r) => r.status === "removed").length;
const modifiedCards = cardResults.filter((r) => r.status === "modified" && r.card).length;
const errorCards = cardResults.filter((r) => r.status === "modified" && r.error).length;
const cardsWithoutImages = cardResults.filter((r) => r.card && !r.hasImage).length;
let commentBody = `## 🃏 ${cardResults.length} Card${cardResults.length !== 1 ? "s" : ""} Changed\n\n`;
if (cardResults.length === 0) {
commentBody +=
changedFiles.length > 0
? "No recognized card files were changed in this PR.\n"
: "No files were changed in this PR.\n";
return commentBody;
}
// Add summary
commentBody += `**Details:** `;
const details = [];
if (newCards > 0) {
details.push(`${newCards} new`);
}
if (deletedCards > 0) {
details.push(`${deletedCards} deleted`);
}
if (modifiedCards > 0) {
details.push(`${modifiedCards} modified`);
}
if (errorCards > 0) {
details.push(`${errorCards} with errors`);
}
if (cardsWithoutImages > 0) {
details.push(`${cardsWithoutImages} without images`);
}
commentBody += details.join(", ") + "\n\n";
// Generate detailed card information
let truncated = false;
const truncationMessage = "\n\n> **Note:** Comment truncated due to GitHub size limitations. Some cards were omitted.\n";
const truncationLimit = maxCommentLength - truncationMessage.length - 100; // Buffer for safety
for (const item of cardResults) {
const fileUrl = `https://github.com/${repoFullName}/blob/${contextSha}/${item.file}`;
const fileName = item.file.split("/").pop();
// Create a temporary version of what we're about to add to check the length
let cardSection = "";
if (item.status === "added") {
cardSection += `<details><summary> <strong>New card: ${fileName}</strong></summary>\n\n`;
cardSection += `**File:** [${encodeURI(item.file)}](${encodeURI(fileUrl)}) \n\n`;
cardSection += "</details>\n\n";
} else if (item.status === "removed") {
cardSection += `<details><summary>🗑️ <strong>Deleted card: ${fileName}</strong></summary>\n\n`;
cardSection += `**File:** [${encodeURI(item.file)}](${encodeURI(fileUrl)}) \n\n`;
cardSection += "</details>\n\n";
} else if (item.card) {
const langInfo = item.usedLanguage ? ` (found using ${item.usedLanguage})` : "";
const imageStatus = !item.hasImage ? ` <em>(no images)</em>` : "";
cardSection += `<details><summary><strong>${item.card.name}</strong> (${item.card.id})${langInfo}${imageStatus}</summary>\n\n`;
if (item.card.image) {
const languages = item.isAsian ? ASIAN_LANGUAGES : INTERNATIONAL_LANGUAGES;
cardSection += renderCardImageTable(item.card, languages);
} else {
cardSection += `<p align="center"><em>No images available for this card</em></p>\n\n`;
}
cardSection += `**File:** [${item.file}](${fileUrl}) \n`;
cardSection += `**Set:** ${item.card.set?.name || "Unknown"} \n`;
cardSection += `**Rarity:** ${item.card.rarity || "Unknown"}\n\n`;
cardSection += "</details>\n\n";
} else if (item.error) {
cardSection += `<details><summary>⚠️ <strong>Error processing ${fileName}</strong></summary>\n\n`;
cardSection += `**File:** [${encodeURI(item.file)}](${encodeURI(fileUrl)}) \n\n`;
cardSection += `**Error:** ${item.error}\n\n`;
cardSection += "</details>\n\n";
}
// Check if adding this section would exceed the limit
if (commentBody.length + cardSection.length > truncationLimit) {
truncated = true;
break;
}
// If not exceeding, add it to the main comment body
commentBody += cardSection;
}
// Add truncation message if needed
if (truncated) {
commentBody += truncationMessage;
}
return commentBody;
}
// Helper to render the card image table
function renderCardImageTable(card: CardData, languages: string[]): string {
let tableMarkdown = `<div align="center">\n\n`;
tableMarkdown += `| Language | Language | Language |\n`;
tableMarkdown += `|:-------:|:-------:|:-------:|\n`;
for (let i = 0; i < languages.length; i += 3) {
tableMarkdown += `|`;
for (let j = 0; j < 3; j++) {
const langIndex = i + j;
if (langIndex < languages.length) {
const lang = languages[langIndex];
const langName = LANGUAGE_NAMES[lang as keyof typeof LANGUAGE_NAMES] || lang;
const localizedImageUrl = card.image!.replace(/\/[a-z]{2}(-[a-z]{2})?\//, `/${lang}/`);
tableMarkdown += ` <strong>${langName} (${lang})</strong><br><img src="${localizedImageUrl}/high.webp" alt="${card.name} (${langName})" width="200"/> |`;
} else {
tableMarkdown += ` |`;
}
}
tableMarkdown += `\n`;
}
tableMarkdown += `\n</div>\n\n`;
return tableMarkdown;
}
// Post or update PR comment
async function postOrUpdatePRComment(
octokit: ReturnType<typeof github.getOctokit>,
owner: string,
repo: string,
prNumber: number,
commentBody: string,
): Promise<void> {
// Get authenticated user info to identify our bot
const { data: authenticatedUser } = await octokit.rest.users.getAuthenticated();
console.log(`Authenticated as user: ${authenticatedUser.login}`);
const commentsResponse = await octokit.rest.issues.listComments({
owner,
repo,
issue_number: prNumber,
});
// Look for existing comments from our authenticated bot user
const existingComment = commentsResponse.data.find(
(comment) => comment.user?.login === authenticatedUser.login && comment.body?.includes("## 🃏"),
);
if (existingComment) {
await octokit.rest.issues.updateComment({
owner,
repo,
comment_id: existingComment.id,
body: commentBody,
});
console.log(`Updated existing comment #${existingComment.id} on PR #${prNumber} as ${authenticatedUser.login}`);
} else {
await octokit.rest.issues.createComment({
owner,
repo,
issue_number: prNumber,
body: commentBody,
});
console.log(`Posted new comment to PR #${prNumber} as ${authenticatedUser.login}`);
}
}
async function run() {
try {
// Initialize GitHub client
const token = core.getInput("github-token", { required: true });
const octokit = github.getOctokit(token);
const context = github.context;
const { owner, repo } = context.repo;
const repoFullName = `${owner}/${repo}`;
// Get changed files
const changedFiles = await getChangedFiles(context, octokit);
// Process card files
const cardResults: CardResult[] = [];
for (const file of changedFiles) {
const result = await processCardFile(file);
if (result) cardResults.push(result);
}
// Generate comment body
const commentBody = generateCommentBody(cardResults, changedFiles, repoFullName, context.sha);
// Post or update the comment in the PR
if (context.payload.pull_request) {
const prNumber = context.payload.pull_request.number;
await postOrUpdatePRComment(octokit, owner, repo, prNumber, commentBody);
}
// Store the generated comment for the workflow
core.setOutput("pr_comment", commentBody);
core.setOutput("files", changedFiles.map(f => f.filename).join(","));
core.setOutput("cardFiles", JSON.stringify(cardResults));
} catch (error) {
if (error instanceof Error) {
core.setFailed(error.message);
} else {
core.setFailed("An unknown error occurred");
}
}
}
run();

15
.github/scripts/package.json vendored Normal file
View File

@@ -0,0 +1,15 @@
{
"name": "scripts",
"private": true,
"devDependencies": {
"@types/bun": "latest"
},
"peerDependencies": {
"typescript": "^5"
},
"dependencies": {
"@actions/core": "^1.11.1",
"@actions/github": "^6.0.0",
"@tcgdex/sdk": "^2.6.0"
}
}

28
.github/scripts/tsconfig.json vendored Normal file
View File

@@ -0,0 +1,28 @@
{
"compilerOptions": {
// Environment setup & latest features
"lib": ["ESNext"],
"target": "ESNext",
"module": "ESNext",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,
// Bundler mode
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,
// Best practices
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
"noPropertyAccessFromIndexSignature": false
}
}

15
.github/sponsors/dzeio.svg vendored Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -1,59 +1,89 @@
name: Build Docker image
on:
push:
branches:
- '*'
tags:
- v*
pull_request:
branches:
branches:
- master
pull_request:
branches:
- "**"
env:
REGISTRY_IMAGE: |
ghcr.io/tcgdex/server
tcgdex/server
jobs:
build:
runs-on: ubuntu-latest
name: Build TCGdex Server
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/tcgdex/server
tcgdex/server
tags: |
type=edge
type=ref,event=pr
type=ref,event=branch,prefix=branch-
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=semver,pattern=latest
- name: Checkout
uses: actions/checkout@v4
with:
# fetch full history for `updated` support
fetch-depth: 0
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
tags: |
type=edge
type=ref,event=pr
type=ref,event=branch,prefix=branch-
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=semver,pattern=latest
- name: Login to Github Packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Github Packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_TOKEN }}
if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
file: ./Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Pre build server
run: |
bun install --frozen-lockfile
cd server
bun install --frozen-lockfile
bun run compile
rm -rf node_modules
cd ..
rm -rf node_modules
- name: Build and push
id: build
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
file: ./Dockerfile.github-actions
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
push: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
cache-to: type=gha,mode=max

38
.github/workflows/comment-pr.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
name: Card Info Comment
on:
pull_request_target:
types: [opened, synchronize]
paths:
- '.github/workflows/comment-pr.yml'
- '.github/scripts/*'
- 'data/**/*.ts'
- 'data-asia/**/*.ts'
jobs:
card-info-comment:
runs-on: ubuntu-latest
continue-on-error: true
defaults:
run:
working-directory: .github/scripts
permissions:
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun i --frozen-lockfile
- name: Run load-cards script
id: load-cards
run: bun load-cards.js
env:
INPUT_GITHUB-TOKEN: ${{ secrets.TCGDEX_BOT }}

View File

@@ -1,14 +0,0 @@
name: Conventionnal Commit
on: pull_request
jobs:
conventional:
name: Conventional PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: beemojs/conventional-pr-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
config-preset: angular

View File

@@ -1,11 +1,12 @@
name: Test the Data
on:
push:
branches:
- '*'
pull_request:
branches:
branches:
- master
pull_request:
branches:
- "**"
jobs:
test:
@@ -13,20 +14,30 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup BunJS
uses: oven-sh/setup-bun@v1
uses: oven-sh/setup-bun@v2
- name: Install deps
run: |
bun install -g @usebruno/cli
bun install --frozen-lockfile
cd server
bun install --frozen-lockfile
bun run compile
- name: Validate the data & the server
run: |
bun run validate
cd server
bun run validate
bun run --bun validate
- name: Validate some requests
run: |
cd server
bun run start &
sleep 10
cd ../.bruno
bru run --env Developpement

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@
node_modules/
dist/
.idea

View File

@@ -6,8 +6,8 @@ We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
@@ -22,17 +22,17 @@ community include:
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
* Focusing on what is best not just for us as individuals, but for the overall
community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
@@ -52,15 +52,15 @@ decisions when appropriate.
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
the `contact@tcgdex.net` email or on Discord to `Avior#3872`.
reported to the community leaders responsible for enforcement at contact@tcgdex.net or
on Discord to Avior through the official server https://discord.gg/63mQvd3GVE.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
@@ -82,15 +82,15 @@ behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Community Impact**: A violation through a single incident or series of
actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
like social media. Violating these terms may lead to a temporary or permanent
ban.
### 3. Temporary Ban
@@ -106,23 +106,27 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
**Consequence**: A permanent ban from any sort of public interaction within the
community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

View File

@@ -1,5 +1,4 @@
<!-- omit in toc -->
# Contributing to TCGdex
First off, thanks for taking the time to contribute! ❤️
@@ -7,26 +6,23 @@ First off, thanks for taking the time to contribute! ❤️
All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
>
> - Star the project
> - Tweet about it
> - Refer this project in your project's readme
> - Mention the project at local meetups and tell your friends/colleagues
<!-- omit in toc -->
## Table of Contents
- [Code of Conduct](#code-of-conduct)
- [I Have a Question](#i-have-a-question)
- [I Want To Contribute](#i-want-to-contribute)
- [Reporting Issues](#reporting-issues)
- [Suggesting Enhancements](#suggesting-enhancements)
- [Your First Code Contribution](#your-first-code-contribution)
- [Improving The Documentation](#improving-the-documentation)
- [Reporting Bugs](#reporting-bugs)
- [Suggesting Enhancements](#suggesting-enhancements)
- [Your First Code Contribution](#your-first-code-contribution)
- [Improving The Documentation](#improving-the-documentation)
- [Styleguides](#styleguides)
- [Coding Guidlines](#coding-guidelines)
- [Commit Messages](#commit-messages)
- [Commit Messages](#commit-messages)
- [Join The Project Team](#join-the-project-team)
## Code of Conduct
@@ -37,7 +33,7 @@ By participating, you are expected to uphold this code. Please report unacceptab
## I Have a Question
> If you want to ask a question, we assume that you have read the available Documentation at <https://www.tcgdex.dev>.
> If you want to ask a question, we assume that you have read the available [Documentation](https://tcgdex.dev).
The best way to ask questions is to join our Discord server at <https://discord.gg/NehYTAhsZE>.
@@ -69,38 +65,36 @@ Depending on how large the project is, you may want to outsource the questioning
## I Want To Contribute
> ### Legal Notice <!-- omit in toc -->
>
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project licence.
### Reporting Issues
### Reporting Bugs
<!-- omit in toc -->
#### Before Submitting a Bug Report
#### Before Submitting an Issue Report
A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
A good issue report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
- Determine if your issue is not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://www.tcgdex.dev). If you are looking for support, you might want to check [this section](#i-have-a-question)).
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already an issue report existing for your bug or error in the [bug tracker](https://github.com/tcgdex/cards-database/issues).
- Make sure that you are using the latest version.
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://tcgdex.dev). If you are looking for support, you might want to check [this section](#i-have-a-question)).
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https:/github.com/tcgdex/cards-database/issues?q=label%3Abug).
- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
- Collect information about the bug:
- Stack trace (Traceback)
- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
- Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant.
- Possibly your input and the output
- Can you reliably reproduce the issue? And can you also reproduce it with older versions?
- Stack trace (Traceback)
- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
- Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant.
- Possibly your input and the output
- Can you reliably reproduce the issue? And can you also reproduce it with older versions?
<!-- omit in toc -->
#### How Do I Submit a Good Bug Report?
> You must never report security related issues, vulnerabilities or bugs to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to <security@tcgdex.net>.
> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to <security@tcgdex.net>.
<!-- You may add a PGP key to allow the messages to be sent encrypted as well. -->
We use GitHub issues to track bugs and errors. If you run into an issue with the project:
- Open an [Issue](https://github.com/tcgdex/cards-databaseissues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
- Open an [Issue](https://github.com/tcgdex/cards-database/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
- Explain the behavior you would expect and the actual behavior.
- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
- Provide the information you collected in the previous section.
@@ -122,20 +116,19 @@ This section guides you through submitting an enhancement suggestion for TCGdex,
#### Before Submitting an Enhancement
- Make sure that you are using the latest version.
- Read the [documentation](https://www.tcgdex.dev) carefully and find out if the functionality is already covered, maybe by an individual configuration.
- Perform a [search](https://github.com/tcgdex/cards-databaseissues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
- Read the [documentation](https://tcgdex.dev) carefully and find out if the functionality is already covered, maybe by an individual configuration.
- Perform a [search](https://github.com/tcgdex/cards-database/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
<!-- omit in toc -->
#### How Do I Submit a Good Enhancement Suggestion?
Enhancement suggestions are tracked as [GitHub issues](https://github.com/tcgdex/cards-databaseissues).
Enhancement suggestions are tracked as [GitHub issues](https:/github.com/tcgdex/cards-database/issues).
- Use a **clear and descriptive title** for the issue to identify the suggestion.
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux. <!-- this should only be included if the project has a GUI -->
- You may want to **include screenshots or screen recordings** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [LICEcap](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and the built-in [screen recorder in GNOME](https://help.gnome.org/users/gnome-help/stable/screen-shot-record.html.en) or [SimpleScreenRecorder](https://github.com/MaartenBaert/ssr) on Linux. <!-- this should only be included if the project has a GUI -->
- **Explain why this enhancement would be useful** to most TCGdex users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
<!-- You might want to create an issue template for enhancement suggestions that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->
@@ -150,6 +143,11 @@ _note: Follow the different styleguides listed below when contributing_
- we don't like ❌, so if your pull request has its automated checks ending with the red cross, please double check your changes until it show the awesome 🟢, or ask for help !
- If your pull request is ready for review remove WIP: put it s ready for review and we will handle the rest !
folders :
- `data`: the database for the internationnal cards
- `data-asia`: the database for the asian cards
- `server`: The server behind the API
### Improving The Documentation
The documentation is updated in the Documentation repository at <https://github.com/tcgdex/documentation>
@@ -160,8 +158,8 @@ The documentation is updated in the Documentation repository at <https://github.
Install the plugin `.editorconfig` in your dev environment if it's not already done and thats it !
for those who don't want to install it the basic are these:
- Indent using the `tab` or `\t` character
for those who don't want to install it, the basics are these:
- Indent using the <xkb>tab</xkb> (`\t`) character
- the line feed character is `\n`
- only use `;` when necessary and at the start of the line
- use double quotes `"` when editing files in the `data/` folder and single quote `'` in other files
@@ -195,6 +193,6 @@ In short, please name your Pull Requests/Commits following this format
- use the imperative, present tense: "Change" not "Changed" nor "Changes"
- `<footer>` and `<body>` are both optional
<!-- omit in toc -->
## Attribution
This guide is based on [Contribution Gen]((https://github.com/bttger/contributing-gen)) and was adapted by the TCGdex community !
This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)!

View File

@@ -1,30 +1,37 @@
FROM docker.io/oven/bun:1-alpine as BUILD_IMAGE
FROM docker.io/oven/bun:1-alpine AS build
# go to work folder
WORKDIR /usr/src/app
ADD --chown=bun:bun package.json bun.lockb ./
ADD --chown=bun:bun server/package.json server/bun.lockb ./server/
# Add git as it is used to fetch updated times
RUN apk add git\
&& git config --global safe.directory '*'\
&& chown -R bun:bun .
USER bun
ADD --chown=bun:bun package.json bun.lock ./
ADD --chown=bun:bun server/package.json server/bun.lock ./server/
# install dependencies
RUN bun install --frozen-lockfile && \
cd server && \
bun install --frozen-lockfile
cd server && \
bun install --frozen-lockfile
# Add project files
ADD --chown=bun:bun . .
# build
RUN cd server && \
bun run compile
bun run compile
# remove dev dependencies (bun do not yet support "prune")
RUN cd server && \
rm -rf node_modules && \
bun install --frozen-install --production
rm -rf node_modules && \
bun install --frozen-install --production
# go to another VM
FROM docker.io/oven/bun:1-alpine as PROD_IMAGE
FROM docker.io/oven/bun:1-alpine AS prod
# inform software to be in production
ENV NODE_ENV=production
@@ -36,11 +43,11 @@ USER bun
WORKDIR /usr/src/app
# copy from build image
COPY --chown=bun:bun --from=BUILD_IMAGE /usr/src/app/server/generated ./generated
COPY --chown=bun:bun --from=BUILD_IMAGE /usr/src/app/server/node_modules ./node_modules
COPY --chown=bun:bun --from=BUILD_IMAGE /usr/src/app/server/src ./src
COPY --chown=bun:bun --from=BUILD_IMAGE /usr/src/app/server/public ./public
COPY --chown=bun:bun --from=BUILD_IMAGE /usr/src/app/server/package.json ./package.json
COPY --chown=bun:bun --from=build /usr/src/app/server/generated ./generated
COPY --chown=bun:bun --from=build /usr/src/app/server/node_modules ./node_modules
COPY --chown=bun:bun --from=build /usr/src/app/server/src ./src
COPY --chown=bun:bun --from=build /usr/src/app/server/public ./public
COPY --chown=bun:bun --from=build /usr/src/app/server/package.json ./package.json
# Expose port
EXPOSE 3000

40
Dockerfile.github-actions Normal file
View File

@@ -0,0 +1,40 @@
FROM docker.io/oven/bun:1-alpine AS build
# go to work folder
WORKDIR /usr/src/app
# allow bun user to edit folder
RUN chown -R bun:bun .
USER bun
ADD --chown=bun:bun server/package.json server/bun.lock ./server/
# install prod deps dependencies
RUN cd server && \
bun install --frozen-install --production
# go to another VM
FROM docker.io/oven/bun:1-alpine AS prod
# inform software to be in production
ENV NODE_ENV=production
# run as non root user
USER bun
# go to work folder
WORKDIR /usr/src/app
# copy from build image
COPY --chown=bun:bun ./server/public ./public
COPY --chown=bun:bun ./server/package.json ./package.json
COPY --chown=bun:bun --from=build /usr/src/app/server/node_modules ./node_modules
COPY --chown=bun:bun ./server/src ./src
COPY --chown=bun:bun ./server/generated ./generated
# Expose port
EXPOSE 3000
# run it !
CMD ["bun", "src/index.ts"]

View File

@@ -13,11 +13,11 @@
<a href="https://github.com/tcgdex/cards-database/stargazers">
<img src="https://img.shields.io/github/stars/tcgdex/cards-database?style=flat-square" alt="Github stars">
</a>
<a href="https://github.com/tcgdex/compiler">
<img src="https://img.shields.io/github/workflow/status/tcgdex/cards-database/Compile?style=flat-square" alt="Compiler build passing" />
<a href="https://github.com/tcgdex/cards-database/actions">
<img src="https://img.shields.io/github/actions/workflow/status/TCGdex/cards-database/build.yml?style=flat-square" alt="Compiler build passing" />
</a>
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<a href="#contributors-"><img src="https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square" alt="All Contributors Badge" /></a>
<a href="#contributors-"><img src="https://img.shields.io/badge/all_contributors-7-orange.svg?style=flat-square" alt="All Contributors Badge" /></a>
<!-- ALL-CONTRIBUTORS-BADGE:END -->
</p>
@@ -27,15 +27,11 @@ A Multilanguage Pokémon TCG Database with Cards Pictures and most of the inform
## Getting Started
_If you need help for using/editing the database, [join us on Discord](https://discord.gg/NehYTAhsZE)!_
### Using the Database
_The full documentation is available at <https://www.tcgdex.dev>_
A full documentation of the API is available at <https://tcgdex.dev>
- The easiest way to interact with the database is by using one of our SDKs listed below.
- You can also direcly use the endpoints at `api.tcgdex.net` (see the documentation).
- You can build the API yourself by using our `Dockerfile` and using it on the port 3000
- You can build the API yourself by using our `Dockerfile` and using it on the port 3000 (`docker-compose.yml` file included above)
#### SDKs / API Wrappers
@@ -45,14 +41,6 @@ We currently officially support theses SDKs
- [PHP SDK](https://github.com/tcgdex/php-sdk)
- [Java SDK](https://github.com/tcgdex/java-sdk)
### Editing the Database
There is three sub folders that will allow you to edit some faces of the database
- `/data`: Contains Cards Data architectured around `SerieName/SetName/CardLocalId` folders
- `/meta`: Contains informations for the project (definitions files, Translations for some fields)
- `/server`: The server that allow to communicate with the database
## Status
We are making sure to make every cards available for every languages they were available !
@@ -62,18 +50,19 @@ We are making sure to make every cards available for every languages they were a
_want to help translating? each object fields on cards that have at least en,fr,es,de,it or pt can have the others!,_
_Also we have another translation files located at `meta/translations`_
## Contributing
## Sponsors 💕
See [CONTRIBUTING.md](./CONTRIBUTING.md)
_[Support us as a sponsor](https://github.com/sponsors/tcgdex) and have your logo featured on our GitHub README, complete with a link to your website._
TL::DR
- Fork
- make your changes
- pull request
<p align="center">
<a href="https://dzeio.com" target="_blank" title="Dzeio">
<img height="128" width="32%" src="./.github/sponsors/dzeio.svg" alt="TCGdex Sponsor Dzeio" />
</a>
</p>
## Deprecation
As of February 2021, the v1 API is no longer supported.
<p align="center">
<!-- <a href="https://dzeio.com" target="_blank" title="Dzeio"><img height="80" width="19%" src="./.github/sponsors/dzeio.svg" alt="TCGdex Sponsor Dzeio" /></a> -->
</p>
## Contributors ✨
@@ -90,6 +79,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Kevin-Adrea"><img src="https://avatars.githubusercontent.com/u/36231620?v=4?s=100" width="100px;" alt="Kevin-Adrea"/><br /><sub><b>Kevin-Adrea</b></sub></a><br /><a href="https://github.com/tcgdex/cards-database/issues?q=author%3AKevin-Adrea" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Maxopoly"><img src="https://avatars.githubusercontent.com/u/12138136?v=4?s=100" width="100px;" alt="Maxopoly"/><br /><sub><b>Maxopoly</b></sub></a><br /><a href="#data-Maxopoly" title="Data">🔣</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/calli23"><img src="https://avatars.githubusercontent.com/u/24553863?v=4?s=100" width="100px;" alt="calli23"/><br /><sub><b>calli23</b></sub></a><br /><a href="#data-calli23" title="Data">🔣</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://imclement.com"><img src="https://avatars.githubusercontent.com/u/1112701?v=4?s=100" width="100px;" alt="Clement Yuan"/><br /><sub><b>Clement Yuan</b></sub></a><br /><a href="#data-spyworldxp" title="Data">🔣</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Reloadaxe"><img src="https://avatars.githubusercontent.com/u/44167126?v=4?s=100" width="100px;" alt="Benjamin Rousseliere"/><br /><sub><b>Benjamin Rousseliere</b></sub></a><br /><a href="#data-Reloadaxe" title="Data">🔣</a></td>
</tr>
</tbody>
</table>
@@ -101,6 +92,10 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
## Deprecation
As of February 2021, the v1 API is no longer supported.
## Licenses
This database is not produced, endorsed, supported or affiliated with Nintendo or The Pokémon Company

13
bun.lock Normal file
View File

@@ -0,0 +1,13 @@
{
"lockfileVersion": 1,
"workspaces": {
"": {
"devDependencies": {
"typescript": "^5",
},
},
},
"packages": {
"typescript": ["typescript@5.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="],
}
}

BIN
bun.lockb

Binary file not shown.

10
data-asia/ADV.ts Normal file
View File

@@ -0,0 +1,10 @@
import { Serie } from '../interfaces'
const serie: Serie = {
name: {
ja: 'ADV'
},
id: 'ADV'
}
export default serie

18
data-asia/ADV/ADV1.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../ADV'
const set: Set = {
id: 'ADV1',
name: {
ja: '拡張パック'
},
serie: serie,
cardCount: {
official: 55
},
releaseDate: '2003-01-31'
}
export default set

18
data-asia/ADV/ADV2.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../ADV'
const set: Set = {
id: 'ADV2',
name: {
ja: '砂漠のきせき'
},
serie: serie,
cardCount: {
official: 53
},
releaseDate: '2003-04-18'
}
export default set

18
data-asia/ADV/ADV3.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../ADV'
const set: Set = {
id: 'ADV3',
name: {
ja: '天空の覇者'
},
serie: serie,
cardCount: {
official: 54
},
releaseDate: '2003-06-25'
}
export default set

18
data-asia/ADV/ADV4.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../ADV'
const set: Set = {
id: 'ADV4',
name: {
ja: '強化拡張パックex1マグマVSアクア ふたつの野望'
},
serie: serie,
cardCount: {
official: 80
},
releaseDate: '2003-10-24'
}
export default set

18
data-asia/ADV/ADV5.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../ADV'
const set: Set = {
id: 'ADV5',
name: {
ja: 'とかれた封印'
},
serie: serie,
cardCount: {
official: 83
},
releaseDate: '2004-01-16'
}
export default set

8
data-asia/BW.ts Normal file
View File

@@ -0,0 +1,8 @@
import { Serie } from '../interfaces'
const serie: Serie = {
name: {},
id: 'null'
}
export default serie

19
data-asia/BW/BW1a.ts Normal file
View File

@@ -0,0 +1,19 @@
import { Set } from '../../interfaces'
import serie from '../BW'
const set: Set = {
id: 'BW1a',
name: {
ja: 'ブラックコレクション',
ko: '블랙 컬렉션'
},
serie: serie,
cardCount: {
official: 53
},
releaseDate: '2010-12-17'
}
export default set

19
data-asia/BW/BW1b.ts Normal file
View File

@@ -0,0 +1,19 @@
import { Set } from '../../interfaces'
import serie from '../BW'
const set: Set = {
id: 'BW1b',
name: {
ja: 'ホワイトコレクション',
ko: '화이트 컬렉션'
},
serie: serie,
cardCount: {
official: 53
},
releaseDate: '2010-12-17'
}
export default set

19
data-asia/BW/BW2.ts Normal file
View File

@@ -0,0 +1,19 @@
import { Set } from '../../interfaces'
import serie from '../BW'
const set: Set = {
id: 'BW2',
name: {
ja: 'レッドコレクション',
ko: '레드 컬렉션'
},
serie: serie,
cardCount: {
official: 66
},
releaseDate: '2011-07-15'
}
export default set

19
data-asia/BW/BW3a.ts Normal file
View File

@@ -0,0 +1,19 @@
import { Set } from '../../interfaces'
import serie from '../BW'
const set: Set = {
id: 'BW3a',
name: {
ja: 'サイコドライブ',
ko: '사이코 드라이브'
},
serie: serie,
cardCount: {
official: 52
},
releaseDate: '2011-09-16'
}
export default set

19
data-asia/BW/BW3b.ts Normal file
View File

@@ -0,0 +1,19 @@
import { Set } from '../../interfaces'
import serie from '../BW'
const set: Set = {
id: 'BW3a',
name: {
ja: 'ヘイルブリザード',
ko: '헤일 블리자드'
},
serie: serie,
cardCount: {
official: 52
},
releaseDate: '2011-09-16'
}
export default set

19
data-asia/BW/BW4.ts Normal file
View File

@@ -0,0 +1,19 @@
import { Set } from '../../interfaces'
import serie from '../BW'
const set: Set = {
id: 'BW4',
name: {
ja: 'ダークラッシュ',
ko: '다크러시'
},
serie: serie,
cardCount: {
official: 69
},
releaseDate: '2011-12-16'
}
export default set

19
data-asia/BW/BW5a.ts Normal file
View File

@@ -0,0 +1,19 @@
import { Set } from '../../interfaces'
import serie from '../BW'
const set: Set = {
id: 'BW5a',
name: {
ja: 'リューズブラスト',
ko: '드래곤 블라스트'
},
serie: serie,
cardCount: {
official: 50
},
releaseDate: '2012-03-16'
}
export default set

19
data-asia/BW/BW5b.ts Normal file
View File

@@ -0,0 +1,19 @@
import { Set } from '../../interfaces'
import serie from '../BW'
const set: Set = {
id: 'BW5b',
name: {
ja: 'リューノブレード',
ko: '드래곤 블레이드'
},
serie: serie,
cardCount: {
official: 50
},
releaseDate: '2012-03-16'
}
export default set

19
data-asia/BW/BW6a.ts Normal file
View File

@@ -0,0 +1,19 @@
import { Set } from '../../interfaces'
import serie from '../BW'
const set: Set = {
id: 'BW6a',
name: {
ja: 'フリーズボルト',
ko: '프리즈볼트'
},
serie: serie,
cardCount: {
official: 59
},
releaseDate: '2012-07-13'
}
export default set

19
data-asia/BW/BW6b.ts Normal file
View File

@@ -0,0 +1,19 @@
import { Set } from '../../interfaces'
import serie from '../BW'
const set: Set = {
id: 'BW6b',
name: {
ja: 'コールドフレア',
ko: '콜드플레어'
},
serie: serie,
cardCount: {
official: 59
},
releaseDate: '2012-07-13'
}
export default set

19
data-asia/BW/BW7.ts Normal file
View File

@@ -0,0 +1,19 @@
import { Set } from '../../interfaces'
import serie from '../BW'
const set: Set = {
id: 'BW7',
name: {
ja: 'プラズマゲイル',
ko: '플라스마게일'
},
serie: serie,
cardCount: {
official: 70
},
releaseDate: '2012-09-14'
}
export default set

19
data-asia/BW/BW8a.ts Normal file
View File

@@ -0,0 +1,19 @@
import { Set } from '../../interfaces'
import serie from '../BW'
const set: Set = {
id: 'BW8a',
name: {
ja: 'ラセンフォース',
ko: '스파이럴포스'
},
serie: serie,
cardCount: {
official: 51
},
releaseDate: '2012-12-14'
}
export default set

19
data-asia/BW/BW8b.ts Normal file
View File

@@ -0,0 +1,19 @@
import { Set } from '../../interfaces'
import serie from '../BW'
const set: Set = {
id: 'BW8a',
name: {
ja: 'ライデンナックル',
ko: '볼트너클'
},
serie: serie,
cardCount: {
official: 51
},
releaseDate: '2012-12-14'
}
export default set

19
data-asia/BW/BW9.ts Normal file
View File

@@ -0,0 +1,19 @@
import { Set } from '../../interfaces'
import serie from '../BW'
const set: Set = {
id: 'BW9',
name: {
ja: 'メガロキャノン',
ko: '메갈로캐논'
},
serie: serie,
cardCount: {
official: 76
},
releaseDate: '2013-03-15'
}
export default set

19
data-asia/BW/DS.ts Normal file
View File

@@ -0,0 +1,19 @@
import { Set } from '../../interfaces'
import serie from '../BW'
const set: Set = {
id: 'DS',
name: {
ja: 'ドラゴンセレクション',
ko: '드래곤 컬렉션'
},
serie: serie,
cardCount: {
official: 20
},
releaseDate: '2012-01-27'
}
export default set

19
data-asia/BW/EBB.ts Normal file
View File

@@ -0,0 +1,19 @@
import { Set } from '../../interfaces'
import serie from '../BW'
const set: Set = {
id: 'EBB',
name: {
ja: 'EXバトルブースト',
ko: 'EX 배틀 부스트'
},
serie: serie,
cardCount: {
official: 96
},
releaseDate: '2013-07-13'
}
export default set

19
data-asia/BW/SC.ts Normal file
View File

@@ -0,0 +1,19 @@
import { Set } from '../../interfaces'
import serie from '../BW'
const set: Set = {
id: 'SC',
name: {
ja: 'シャイニーコレクション',
ko: '샤이니 컬렉션'
},
serie: serie,
cardCount: {
official: 20
},
releaseDate: '2013-02-01'
}
export default set

8
data-asia/DP.ts Normal file
View File

@@ -0,0 +1,8 @@
import { Serie } from '../interfaces'
const serie: Serie = {
name: {},
id: 'null'
}
export default serie

18
data-asia/DP/DP1a.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../DPt'
const set: Set = {
id: 'DP1a',
name: {
ja: '時空の創造: ダイヤモンドコレクション'
},
serie: serie,
cardCount: {
official: 117
},
releaseDate: '2006-11-30'
}
export default set

18
data-asia/DP/DP1b.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../DPt'
const set: Set = {
id: 'DP1b',
name: {
ja: '時空の創造: パールコレクション'
},
serie: serie,
cardCount: {
official: 119
},
releaseDate: '2006-11-30'
}
export default set

18
data-asia/DP/DP2.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../DPt'
const set: Set = {
id: 'DP2',
name: {
ja: '湖の秘密'
},
serie: serie,
cardCount: {
official: 123
},
releaseDate: '2007-03-02'
}
export default set

18
data-asia/DP/DP3.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../DPt'
const set: Set = {
id: 'DP3',
name: {
ja: 'ひかる闇'
},
serie: serie,
cardCount: {
official: 119
},
releaseDate: '2007-07-05'
}
export default set

18
data-asia/DP/DP4a.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../DPt'
const set: Set = {
id: 'DP4a',
name: {
ja: '月光の追跡'
},
serie: serie,
cardCount: {
official: 70
},
releaseDate: '2007-10-26'
}
export default set

18
data-asia/DP/DP4b.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../DPt'
const set: Set = {
id: 'DP4b',
name: {
ja: '夜明けの疾走'
},
serie: serie,
cardCount: {
official: 70
},
releaseDate: '2007-10-26'
}
export default set

18
data-asia/DP/DP5a.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../DPt'
const set: Set = {
id: 'DP5a',
name: {
ja: '秘境の叫び'
},
serie: serie,
cardCount: {
official: 65
},
releaseDate: '2008-03-14'
}
export default set

18
data-asia/DP/DP5b.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../DPt'
const set: Set = {
id: 'DP5b',
name: {
ja: '怒りの神殿'
},
serie: serie,
cardCount: {
official: 65
},
releaseDate: '2008-03-14'
}
export default set

18
data-asia/DP/DP6.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../DPt'
const set: Set = {
id: 'DP6',
name: {
ja: '破空の激闘'
},
serie: serie,
cardCount: {
official: 92
},
releaseDate: '2008-07-10'
}
export default set

8
data-asia/DPt.ts Normal file
View File

@@ -0,0 +1,8 @@
import { Serie } from '../interfaces'
const serie: Serie = {
name: {},
id: 'null'
}
export default serie

18
data-asia/DPt/Pt1.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../DPt'
const set: Set = {
id: 'Pt1',
name: {
ja: 'ギンガの覇道'
},
serie: serie,
cardCount: {
official: 96
},
releaseDate: '2008-10-10'
}
export default set

18
data-asia/DPt/Pt2.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../DPt'
const set: Set = {
id: 'Pt2',
name: {
ja: '時の果ての絆'
},
serie: serie,
cardCount: {
official: 90
},
releaseDate: '2008-12-26'
}
export default set

18
data-asia/DPt/Pt3.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../DPt'
const set: Set = {
id: 'Pt3',
name: {
ja: 'フロンティアの鼓動'
},
serie: serie,
cardCount: {
official: 100
},
releaseDate: '2009-03-06'
}
export default set

18
data-asia/DPt/Pt4.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../DPt'
const set: Set = {
id: 'Pt4',
name: {
ja: 'アルセウス光臨'
},
serie: serie,
cardCount: {
official: 90
},
releaseDate: '2009-07-08'
}
export default set

10
data-asia/L.ts Normal file
View File

@@ -0,0 +1,10 @@
import { Serie } from '../interfaces'
const serie: Serie = {
name: {
ja: 'LEGEND'
},
id: 'L'
}
export default serie

18
data-asia/L/L1a.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../L'
const set: Set = {
id: 'L1a',
name: {
ja: 'ハートゴールドコレクション'
},
serie: serie,
cardCount: {
official: 70
},
releaseDate: '2009-10-09'
}
export default set

18
data-asia/L/L1b.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Set } from '../../interfaces'
import serie from '../L'
const set: Set = {
id: 'L1b',
name: {
ja: 'ソウルシルバーコレクション'
},
serie: serie,
cardCount: {
official: 70
},
releaseDate: '2009-10-09'
}
export default set

Some files were not shown because too many files have changed in this diff Show More