Takazudo Modular Docs

Type to search...

to open search from anywhere

/sub-packages/product-md-sync/CLAUDE.md

CLAUDE.md at /sub-packages/product-md-sync/CLAUDE.md

Path: sub-packages/product-md-sync/CLAUDE.md

product-md-sync

Bidirectional sync tool: Mercari CSV exports (168 columns) <-> Markdown files with YAML frontmatter.

Commands

pnpm test              # Run all tests (vitest)
pnpm test:watch        # Watch mode
pnpm test:coverage     # With coverage
pnpm test:unit         # Unit tests only
pnpm test:integration  # Integration tests
pnpm test:e2e          # End-to-end tests
pnpm test:performance  # Performance benchmarks

Architecture

  • src/cli/ - CLI entry point (Commander.js)
  • src/core/ - CSV parser, Markdown parser
  • src/converters/ - CSV-to-MD / MD-to-CSV converters
  • src/mappers/ - Field mapping between CSV columns and frontmatter
  • src/processors/ - Image flag processing (R=replace, D=delete, 20 slots)
  • src/utils/ - Encoding, security, streaming, file handling

Key Details

  • Test runner: Vitest (migrated from Jest)
  • CSV: 168-column Mercari export, UTF-8 with BOM (was 178; Mercari dropped the SKU{N}_catalog_id columns sometime before 2026-05-01)
  • Streaming: Automatic for files >10MB
  • Checkpoint/resume: For interrupted batch operations
  • Dependencies: papaparse, gray-matter, commander, chalk, cli-progress

Test Status

10/21 test suites pass. 11 suites have pre-existing failures from unimplemented features (md-to-csv converter, some CLI commands, integration scenarios).