Echoes of Astra Importer Technical Overview
The Echoes of Astra importer extends the generic SheetImporter. It reads two tabs from a Google Sheet (Expansions, Products), pulls card art from a Google Drive folder, and produces cards + printings with no external marketplace IDs.
Data Sources
| Source | Role | Data Provided |
|---|---|---|
| Google Sheet | Primary | Expansions, products, attributes, finishes, rules text |
| Google Drive | Images | Card fronts and expansion logos |
The sheet and Drive folder IDs are hardcoded in eoa-importer.ts (getSheetId() / getDriveFolderId()), matching the convention used by the other sheet-only importers.
Because the game is sheet-only, the importer reuses SheetImporter’s generic attribute auto-mapping: each attribute key declared in the game configuration is read from the matching CSV column. Only a few columns need explicit mappings.
Column Mapping
| Sheet column | Attribute | Type | Notes |
|---|---|---|---|
rarity | rarity | enum | Common / Uncommon / Rare / Legendary (printing-level) |
finish | finishes | enum[] | Standard / Foil — split into separate printings per finish |
affinity | affinity | enum | Colour identity (Solara, Lux, Terra, Caelum, Nox, Neutral) |
card_type | cardType | enum | Unit / Tactic / Territory / Item |
subtype | subtypes | enum[] | Pipe-separated traits, e.g. Renowned|Vampire |
supply cost | supplyCost | range | Note the space in the column name |
influence | influence | range | Can be the literal X (see ADR) |
attack / health | attack / health | range | Auto-mapped (column name matches attribute) |
artist | artist | string[] | Pipe-separated artist credits |
variant | variant | enum | Normal / Serialized / Framebreak / Signature |
rules_text | rulesText | string | Printing-level ability text |
Import Flow
Game-Specific Transform Logic
The importer overrides transformSheetProduct for two reasons:
- Variant slug handling —
Normalis the base treatment and must not append a-normalsuffix to the slug (matching games that have no variant column). Special variants (Serialized,Framebreak,Signature) keep their suffix so they form distinct printings. See the variant/influence ADR. - Influence
Xsanitisation — some cards have variable influence printed asX. The base importer coerces range attributes withNumber(), producingNaN; the override strips anyNaNstat so it is never persisted.
Each finish is its own printing: a card available in Standard and Foil becomes two printings (…imp001 and …imp001-foil), each with a single-element finishes array. This matches the convention used by Drakerion and other sheet-only games.
Pricing
There is no price importer for Echoes of Astra. The game is absent from TCGplayer and Cardmarket, so gameToTcgcsvCategory, gameToCardMarketGameIdMap, and the price-importer map all resolve to undefined/[], and CATALOGUE_QUALITY is NONE.
Code Locations
| Component | Location |
|---|---|
| Importer | packages/games/game-importer/src/eoa/eoa-importer.ts |
| Staging importer | packages/games/game-importer/src/eoa/eoa-staging-importer.ts |
| Game config | packages/games/game-configuration/src/lib/games/eoa/eoa.game.ts |
| Types | packages/games/game-configuration/src/lib/games/eoa/eoa.types.ts |
| DTO schemas | packages/core/api-dtos/src/lib/product/games/eoa.schema.ts |
| Base sheet importer | packages/games/game-importer/src/sheet-importer.ts |