Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces the BlessCrawl integration to the SDK, adding distributed web scraping functionality with support for both WASM and HTTP runtime modes along with comprehensive examples and documentation.
- Adds the BlessCrawl SDK in lib/bless-crawl.ts and exports it via lib/index.ts.
- Updates package.json to include the new dependency “zod” and main entry.
- Provides several example scripts and documentation to demonstrate scraping, mapping, and crawling.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Added main entry and zod dependency to support the new BlessCrawl integration. |
| lib/index.ts | Exports the new BlessCrawl module. |
| lib/bless-crawl.ts | Implements the BlessCrawl SDK with runtime detection, validation using zod schemas, and HTTP fallback. |
| examples/crawl/scrape-stdin-example.ts | Provides a stdin-driven example to execute scraping, mapping, and crawling operations. |
| examples/crawl/package.json | Configures the examples project with build and run scripts. |
| examples/crawl/index.ts | Demonstrates usage of the SDK in both WASM and HTTP modes with logging for testing. |
| examples/crawl/README.md | Documents usage, configuration, and examples of the new BlessCrawl integration. |
| README.md | Updates the SDK features list to include bless-crawl. |
Comments suppressed due to low confidence (1)
lib/bless-crawl.ts:440
- Consider verifying the type for 'httpResult.code'. If the server may return a numeric code instead of a string, this comparison might lead to an unintended error; clarifying the expected type in both the code and API documentation would improve robustness.
if (httpResult.code !== "200") {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces the
bless-crawlextension integration.The bless-crawl plugin can be used in quickjs environment (for bless browser runtime).
A simple example is provided (JS) which displays how one can utilize the bless crawl plugin.
AI description
This pull request introduces the new
BlessCrawlSDK for distributed web scraping on the BLESS Network, along with updates to the documentation, examples, and package configuration to support it.The most significant changes include the addition of the
BlessCrawlSDK implementation, updates to supported features, and new examples to demonstrate its usage.New SDK Implementation:
BlessCrawlSDK with core functions (scrape,map, andcrawl) for web scraping, link discovery, and recursive crawling. Includes detailed configuration options and examples. (docs/bless-crawl.md,lib/index.ts,lib/bless-crawl)Documentation Updates:
README.mdto include instructions for building and using theBlessCrawlexample. (README.md, [1] [2]BlessCrawlSDK, including architecture, installation, and usage examples. (docs/bless-crawl.md, docs/bless-crawl.mdR1-R211)Example Projects:
examples/crawl) with sample scripts (index.ts,scrape-stdin-example.ts) to demonstrate theBlessCrawlSDK's capabilities. (examples/crawl/index.ts,examples/crawl/scrape-stdin-example.ts,examples/crawl/README.md,examples/crawl/package.json)Feature and Dependency Updates:
SUPPORTED_FEATURESarray to includecrawlandwasip1features. (bundler/index.ts, bundler/index.tsL29-R29)zodas a new dependency for schema validation. (package.json, package.jsonL38-R40)Miscellaneous:
lib/entry.tsto remove unnecessary blank lines. (lib/entry.ts, lib/entry.tsL12-L18)