Skip to content

Feature/core crawler typescript - #50

Closed
masahiroid wants to merge 3 commits into
mainfrom
feature/core-crawler-typescript
Closed

masahiroid wants to merge 3 commits into
mainfrom
feature/core-crawler-typescript

Conversation

@masahiroid

Copy link
Copy Markdown
Owner

No description provided.

… entry points

Browser session, form scanner, login handling, crawler and explorer move to core/crawler/typed with named
timeouts and limits and unknown-safe error handling. Output in a real browser matches the recorded results.
Copilot AI balanced review requested due to automatic review settings November 1, 2026 15:45
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a29caa1c-59b7-4273-a38b-a16cf13f3462
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The test can leave its fixture server open if browser startup fails or browser shutdown throws, potentially preventing the test worker from exiting.

1 open issue
What changed in this PR

Migrates the core crawler to TypeScript while retaining CommonJS entry points for existing callers. Adds browser-based characterization tests to capture existing behavior.

Changes:

  • Moves browser lifecycle, crawling, form scanning, login, and exploration into typed modules.
  • Extracts shared URL and error helpers and includes crawler sources in the core TypeScript build.
  • Adds golden fixtures for scan results, navigation, login, logs, and screenshot filenames.
File Description
tsconfig.core.json Includes typed crawler sources.
test/​golden/​crawler/​scan-standalone.json Records standalone field scanning.
test/​golden/​crawler/​scan-forms.json Records form fields and constraints.
test/​golden/​crawler/​navigation.json Records home navigation candidates.
test/​golden/​crawler/​navigation-about.json Records secondary-page navigation.
test/​golden/​crawler/​login-log.json Records successful login logs.
test/​golden/​crawler/​gate.json Records agreement-gate crawling.
test/​golden/​crawler/​explore.json Records exploration results.
test/​golden/​crawler/​explore-shots.json Records exploration screenshot filenames.
test/​golden/​crawler/​explore-log.json Records exploration logs.
test/​golden/​crawler/​crawl.json Records discovered forms and page snapshots.
test/​golden/​crawler/​crawl-shots.json Records crawl screenshot filenames.
test/​golden/​crawler/​crawl-log.json Records crawl and click-probe logs.
test/​crawlerCharacterization.test.js Adds local-site browser characterization tests.
core/​crawler/​typed/​urls.ts Provides shared URL helpers.
core/​crawler/​typed/​login.ts Migrates login handling to TypeScript.
core/​crawler/​typed/​formScanner.ts Types form and navigation extraction.
core/​crawler/​typed/​explorer.ts Migrates site exploration to TypeScript.
core/​crawler/​typed/​errors.ts Provides compact error formatting.
core/​crawler/​typed/​crawler.ts Types crawl orchestration and shared retry logic.
core/​crawler/​typed/​browser.ts Types browser lifecycle and options.
core/​crawler/​login.js Forwards to compiled login implementation.
core/​crawler/​formScanner.js Forwards to compiled scanner implementation.
core/​crawler/​explorer.js Forwards to compiled explorer implementation.
core/​crawler/​crawler.js Forwards to compiled crawler implementation.
core/​crawler/​browser.js Forwards to compiled browser implementation.

Review effort: Balanced

Comment thread test/crawlerCharacterization.test.js Outdated
Comment on lines +78 to +81
const page = await session.start();
const lines = [];
const log = line => lines.push(line.split(origin).join('http://SITE'));
t.after(async () => { await session.stop(); site.close(); });
@masahiroid masahiroid closed this Nov 1, 2026
@masahiroid
masahiroid deleted the feature/core-crawler-typescript branch November 1, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants