This is a performance monitoring toolkit for SilverAssist projects, built as an NPM package. It integrates PageSpeed Insights API and Lighthouse CI for comprehensive performance analysis.
Key Architecture:
- Build: TypeScript + tsup → dual ESM/CJS outputs
- Distribution: NPM package
@silverassist/performance-toolkit - CLI:
perf-checkcommand for quick analysis
performance-toolkit/
├── src/
│ ├── index.ts # Main entry point
│ ├── pagespeed/ # PageSpeed Insights API client
│ │ └── index.ts
│ ├── lighthouse/ # Lighthouse CI runner
│ │ └── index.ts
│ └── types/ # TypeScript definitions
│ └── index.ts
├── bin/
│ └── cli.js # CLI entry point
├── __tests__/ # Test files
├── dist/ # Build output (gitignored)
├── .github/
│ └── workflows/ # CI/CD workflows
├── package.json
├── tsconfig.json
└── tsup.config.ts
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Type check
npm run typecheck
# Lint
npm run lint
# Format
npm run format- Use explicit types, avoid
any - Export types from
src/types/index.ts - Use JSDoc comments for public APIs
- Write tests for all new functionality
- Maintain >70% coverage
- Use Jest with ts-jest
- Update README.md for API changes
- Update CHANGELOG.md following Keep a Changelog format
- Add JSDoc comments for exported functions
feat: Add new feature
fix: Fix bug
docs: Update documentation
refactor: Refactor code
test: Add tests
chore: Maintenance
main- Production releasesdev- Development branchfeature/*- Feature branchesbugfix/*- Bug fix branches
- Update version in
package.json - Update
CHANGELOG.md - Create GitHub release
- CI will automatically publish to npm
PolyForm Noncommercial License 1.0.0 - SilverAssist
This is NOT MIT. The library is for internal use and SilverAssist projects only.