@hunt-labs/bytekit-cli 0.9.4 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,24 @@ today, see [README.md](./README.md), which remains the authoritative usage guide
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.10.1] - 2026-09-24
14
+
15
+ ### Changed
16
+
17
+ - A `/v1/search` provider failure now arrives at HTTP `503` instead of `502` (#4891): Cloudflare
18
+ replaced the API's `502` body with its own plain-text page, so the `search_provider_error` code
19
+ never reached the CLI. The body is unchanged and the CLI already reads it by shape, not status;
20
+ only a source comment changed in this package.
21
+
22
+ ## [0.10.0] - 2026-09-14
23
+
24
+ ### Added
25
+
26
+ - `--solve-challenge` on `scrape create` (#4449). It sends `solve_challenge: true`, which asks
27
+ the scrape to attempt to clear a Cloudflare challenge; success is not guaranteed. It is billed
28
+ as a normal browser render. Without the flag the request body is unchanged and carries no
29
+ `solve_challenge` key.
30
+
13
31
  ## [0.9.4] - 2026-09-10
14
32
 
15
33
  ### Added
package/README.md CHANGED
@@ -129,6 +129,7 @@ materialized):
129
129
  | `--include-tags <csv>` | Comma-separated HTML tags to keep. |
130
130
  | `--exclude-tags <csv>` | Comma-separated HTML tags to drop. |
131
131
  | `--mobile` | Render with a mobile viewport/user-agent. |
132
+ | `--solve-challenge` | Attempt to clear a Cloudflare challenge; success is not guaranteed. Billed as a normal browser render. |
132
133
  | `--async` | Queue the scrape and return a job envelope immediately. |
133
134
  | `--webhook-url <url>` | Webhook notified when an async scrape completes. |
134
135
 
package/dist/client.js CHANGED
@@ -224,8 +224,8 @@ function drainBestEffort(body, abort) {
224
224
  *
225
225
  * Two error-body shapes exist across the API:
226
226
  * - the canonical unified envelope `{error: {code, message}}` — tested FIRST, so it always wins;
227
- * - a flat vendor-masked shape `{error: "<code>"}` (e.g. `/v1/search` 502:
228
- * `{"error":"search_provider_error"}`, docs/api/openapi.yaml §/v1/search 502) — the flat form
227
+ * - a flat vendor-masked shape `{error: "<code>"}` (e.g. `/v1/search` 503:
228
+ * `{"error":"search_provider_error"}`, docs/api/openapi.yaml §/v1/search 503) — the flat form
229
229
  * is strictly a FALLBACK and can never override an envelope (#2541, mirrored here for #2586:
230
230
  * the CLI's own copy of this parser had drifted from the SDK's and still only read the
231
231
  * envelope shape, so a flat 502 rendered `internal_error` instead of `search_provider_error`).
@@ -154,6 +154,7 @@ export function makeScrapeCommand(getGlobal) {
154
154
  .option('--include-tags <csv>', 'Comma-separated HTML tags to keep (e.g. article,main)')
155
155
  .option('--exclude-tags <csv>', 'Comma-separated HTML tags to drop (e.g. nav,footer)')
156
156
  .option('--mobile', 'Render with a mobile viewport/user-agent')
157
+ .option('--solve-challenge', 'Attempt to clear a Cloudflare challenge; success is not guaranteed. Billed as a normal browser render.')
157
158
  .option('--raw', 'Print the requested format body raw, with no JSON wrapper')
158
159
  .option('-o, --output <file>', 'Write the output to the given file path (implies --raw unless --json is set)')
159
160
  .action(async (opts) => {
@@ -221,6 +222,8 @@ export function makeScrapeCommand(getGlobal) {
221
222
  body['exclude_tags'] = parseCsv(opts.excludeTags);
222
223
  if (opts.mobile === true)
223
224
  body['mobile'] = true;
225
+ if (opts.solveChallenge === true)
226
+ body['solve_challenge'] = true;
224
227
  try {
225
228
  // Inside the try: buildClient() throws on a missing key (#2686 item 4) and the throw must reach handleError(). See its doc comment in client.ts.
226
229
  const client = buildClient(g);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hunt-labs/bytekit-cli",
3
- "version": "0.9.4",
3
+ "version": "0.10.1",
4
4
  "description": "ByteKit CLI — wraps @hunt-labs/bytekit-sdk as shell subcommands",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -41,7 +41,7 @@
41
41
  ],
42
42
  "dependencies": {
43
43
  "commander": "^12.0.0",
44
- "@hunt-labs/bytekit-sdk": "^0.10.0"
44
+ "@hunt-labs/bytekit-sdk": "^0.11.6"
45
45
  },
46
46
  "scripts": {
47
47
  "build": "rm -rf dist tsconfig.tsbuildinfo && tsc",