Files

ts_install 🧰

Install-time bootstrap module for @fin.cx/einvoice.

This directory contains the scripts that download optional validation resources and external test data used by the main library.

Issue Reporting and Security

For reporting bugs, issues, or security vulnerabilities, please visit community.foss.global/. This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a code.foss.global/ account to submit Pull Requests directly.

What it does

  • runs the package postinstall bootstrap
  • checks whether downloaded Schematron resources are already present and current
  • skips cleanly when offline or when install context is not valid
  • downloads validation resources into assets_downloaded/schematron
  • exposes manual scripts for maintainers and advanced users

Runtime behavior

  • it only runs automatically when npm_lifecycle_event === 'postinstall'
  • it never fails package installation on download/setup problems
  • it skips when dist_ts/ is missing
  • it skips in CI when EINVOICE_SKIP_RESOURCES is set
  • it keeps a .version marker to avoid unnecessary re-downloads

Manual commands

pnpm download-schematron
pnpm download-test-samples

Output locations

  • assets_downloaded/schematron/: downloaded validation rules
  • test-samples/: downloaded external sample corpus for conformance tests

Who needs this?

  • library consumers who want richer validation resources available locally
  • maintainers working on Schematron validation or conformance testing
  • CI or packaging flows that want explicit control over resource setup

For normal basic XML/PDF parsing and conversion, the main package API remains the primary entrypoint.