jaikamat / clubhouse-pos-importer

Monorepo for an LGS's inventory management system
1 stars 0 forks source link

Import script improvements #322

Closed jaikamat closed 3 years ago

jaikamat commented 3 years ago

Summary

Originally we assumed that all Japanese and English cards could be committed to the system, but occasional error has led to a buildup of non-english cards. Additionally, the store does not accept art_series cards, basic lands, or cards with only a glossy finish yet (as it is unsupported).

In this PR I've extracted atomic, custom validators to govern validating single cards during aggregation, which makes the process much more bespoke and easier to reason with.

We've also imported and configured Jest to test some of these validators.