Conversation
- Added `getAllSites` to `SiteRepository` - Added `getSnapshotCount` and `getLatestSnapshot` to `SnapshotRepository` - Exported repositories from `@crawlith/core` - Implemented `crawlith sites` command in CLI - Added tests for new repository methods and CLI command
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Rewrote `plugins/cli/src/index.ts` to ensure clean syntax and remove potential hidden artifacts that caused a "Declaration or statement expected" linting error in CI. Also verified that tests pass: - `plugins/core/tests/db_repos.test.ts` - `plugins/cli/tests/sites.test.ts`
- Fixed `tests/db/repositories.test.ts` by ensuring `first_seen_snapshot_id` is set in manual DB inserts, matching schema expectations for `getPagesIteratorBySnapshot`. - Fixed `tests/scoring.test.ts` by updating mock objects to include `meta.crawlStatus`, preventing TypeErrors in updated scoring logic. - Fixed `tests/analyze.integration.test.ts` by adding `scope: 'site'` option to `analyzeSite` and updating tests to use it, ensuring full site analysis is returned when expected. - Added `scope` option to `AnalyzeOptions` in `plugins/core/src/analysis/analyze.ts` to control filtering behavior.
This PR introduces a new
crawlith sitescommand that lists all tracked websites along with their snapshot statistics (count, last crawl date, page count, health score).Changes include:
SiteRepositorywithgetAllSites().SnapshotRepositorywithgetSnapshotCount()andgetLatestSnapshot().src/db/index.tsto make them accessible to the CLI.src/commands/sites.tswhich implements the listing logic.src/index.ts.tests/sites.test.ts.plugins/core/tests/db_repos.test.tsto verify the new repository methods.PR created automatically by Jules for task 6433421688746822513 started by @saurabhsharma2u