Darren Hinde 193271091a feat: add ExternalScout and optimize ContextScout with research-backed patterns (#128) 2 months ago
..
README.md 54fa50d17a fix: switch CI to TypeScript validator to resolve hanging bash script (#129) 2 months ago
auto-detect-components.sh 11b94b2ab2 feat: Complete registry and profile overhaul for consistent component distribution (#87) 3 months ago
register-component.sh fc29fa3dc4 feat: add PR template and automated doc sync workflow (#40) 4 months ago
validate-component.sh 11b94b2ab2 feat: Complete registry and profile overhaul for consistent component distribution (#87) 3 months ago
validate-profile-coverage.sh 11b94b2ab2 feat: Complete registry and profile overhaul for consistent component distribution (#87) 3 months ago
validate-registry.sh 193271091a feat: add ExternalScout and optimize ContextScout with research-backed patterns (#128) 2 months ago
validate-registry.ts 54fa50d17a fix: switch CI to TypeScript validator to resolve hanging bash script (#129) 2 months ago

README.md

Registry Validation Scripts

This directory contains scripts to validate the registry.json file.

Available Scripts

TypeScript Version (Recommended) ⚡

Fast, modern, and easy to debug

# Run validation
npm run validate:registry

# Run with verbose output
npm run validate:registry:verbose

# Run with fix suggestions
npm run validate:registry:fix

# Or run directly with bun
bun run scripts/registry/validate-registry.ts
bun run scripts/registry/validate-registry.ts -v
bun run scripts/registry/validate-registry.ts -f

Requirements:

  • Bun runtime

Features:

  • ✅ Fast execution (< 1 second)
  • ✅ Easy to debug
  • ✅ Type-safe
  • ✅ Validates all registry paths
  • ✅ Validates component dependencies
  • ✅ Colored output
  • ✅ Verbose mode
  • ✅ Fix suggestions

Bash Version (Legacy)

Original bash script - still maintained for CI compatibility

# Run validation
./scripts/registry/validate-registry.sh

# Run with verbose output
./scripts/registry/validate-registry.sh -v

# Run with fix suggestions
./scripts/registry/validate-registry.sh -f

Requirements:

  • bash
  • jq

Note: The bash version may hang in some CI environments. The TypeScript version is recommended for local development.

What Gets Validated

Both scripts validate:

  1. Registry JSON Format - Ensures registry.json is valid JSON
  2. Component Paths - Verifies all file paths in the registry exist
  3. Component Dependencies - Validates that all dependencies reference existing components

Exit Codes

  • 0 - All paths valid, all dependencies valid
  • 1 - Missing files or missing dependencies found
  • 2 - Registry parse error or missing script dependencies

CI Integration

The GitHub Actions workflow (.github/workflows/validate-registry.yml) currently uses the bash version for compatibility with the base branch workflow file. Once this PR is merged, future PRs can use the TypeScript version.

Development

To modify the TypeScript validator:

  1. Edit scripts/registry/validate-registry.ts
  2. Test locally: npm run validate:registry
  3. Commit changes

The TypeScript version is the source of truth for new features.