@@ -24,13 +24,9 @@ just-scrape/
2424├── src/
2525│ ├── cli.ts # Entry point, citty main command + subcommands
2626│ ├── lib/
27- │ │ ├── env.ts # Zod-parsed env config (API key, debug, timeout )
27+ │ │ ├── env.ts # Env config (API key, JUST_SCRAPE_* → SGAI_* bridge )
2828│ │ ├── folders.ts # API key resolution + interactive prompt
29- │ │ ├── scrapegraphai.ts # SDK layer — all API functions (typed responses)
30- │ │ ├── schemas.ts # Zod validation schemas
3129│ │ └── log.ts # Logger factory + syntax-highlighted JSON output
32- │ ├── types/
33- │ │ └── index.ts # Zod-derived types + ApiResult + response types
3430│ ├── commands/
3531│ │ ├── smart-scraper.ts
3632│ │ ├── search-scraper.ts
@@ -45,8 +41,6 @@ just-scrape/
4541│ │ └── validate.ts
4642│ └── utils/
4743│ └── banner.ts # ASCII banner + version from package.json
48- ├── tests/
49- │ └── scrapegraphai.test.ts # SDK layer tests (mocked fetch)
5044├── dist/ # Build output (git-ignored)
5145│ └── cli.mjs # Bundled ESM with shebang
5246├── package.json
@@ -64,6 +58,7 @@ pnpm add -g just-scrape # pnpm
6458yarn global add just-scrape # yarn
6559bun add -g just-scrape # bun
6660npx just-scrape --help # or run without installing
61+ bunx just-scrape --help # bun equivalent
6762```
6863
6964Package: [ just-scrape] ( https://www.npmjs.com/package/just-scrape ) on npm.
@@ -397,10 +392,9 @@ bun run dev --help
397392| CLI Framework | ** citty** (unjs) |
398393| Prompts | ** @clack/prompts ** |
399394| Styling | ** chalk** v5 (ESM) |
400- | Validation | ** zod ** v4 |
395+ | SDK | ** scrapegraph-js ** |
401396| Env | ** dotenv** |
402397| Lint / Format | ** Biome** |
403- | Testing | ** Bun test** (built-in) |
404398| Target | ** Node.js 22+** , ESM-only |
405399
406400### Scripts
@@ -410,16 +404,9 @@ bun run dev # Run CLI from TS source
410404bun run build # Bundle ESM to dist/cli.mjs
411405bun run lint # Lint + format check
412406bun run format # Auto-format
413- bun test # Run tests
414407bun run check # Type-check + lint
415408```
416409
417- ### Testing
418-
419- Tests mock all API calls via ` spyOn(globalThis, "fetch") ` — no network, no API key needed.
420-
421- Covers: success paths, polling, HTTP error mapping (401/402/422/429/500), Zod validation, timeouts, and network failures.
422-
423410## License
424411
425412ISC
0 commit comments