Skip to content

Add generate-package-template and validate-package commands#58

Draft
zdburrage wants to merge 1 commit into
mainfrom
feat/csv-package-provider
Draft

Add generate-package-template and validate-package commands#58
zdburrage wants to merge 1 commit into
mainfrom
feat/csv-package-provider

Conversation

@zdburrage
Copy link
Copy Markdown
Collaborator

@zdburrage zdburrage commented May 6, 2026

Summary

Phase 12 of the provider-parity execution plan. Adds the generic/manual CSV package path so unsupported providers (or scripted exports) can target the same package contract every dedicated exporter writes.

  • generate-package-template --output-dir <dir> scaffolds an empty migration package skeleton with all canonical CSV files (header-only) and a manifest. Supports --provider, --entities, --source-tenant, --force.
  • validate-package <dir> wraps validateMigrationPackage from src/package/validator.ts. Surfaces manifest schema errors, missing files, header mismatches, count mismatches, and JSONL parse errors. Supports --no-counts, --no-headers, --quiet, and --json.
  • Tests cover skeleton generation, populated package validation, count-mismatch detection, and header-mismatch detection.
  • README documents the manual-CSV migration path and lists both commands in the command table.

Test Plan

  • npm run lint
  • npm run format:check
  • npm run typecheck
  • npm run build
  • npm test — 272 passing across 24 suites.

🤖 Generated with Claude Code

Phase 12 of the provider-parity plan. Adds the generic/manual package
path so unsupported providers (or scripted exports) can target the same
package contract every dedicated exporter writes.

- New \`generate-package-template\` CLI scaffolds an empty migration
  package skeleton with all canonical CSV files (header-only) and a
  manifest. Supports \`--provider\`, \`--entities\`,
  \`--source-tenant\`, and \`--force\`.
- New \`validate-package <dir>\` CLI wraps
  \`validateMigrationPackage\` from src/package/validator.ts. Surfaces
  manifest schema errors, missing files, header mismatches, count
  mismatches, and JSONL parse errors. Supports \`--no-counts\`,
  \`--no-headers\`, \`--quiet\`, and \`--json\`.
- Registered both commands in the CLI index.
- Tests cover skeleton generation, validation pass + count mismatch,
  and header mismatch detection — kept at the orchestration layer to
  avoid commander's process.exit side effects.
- README documents the manual-CSV migration path and lists the new
  commands in the command table.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant