@crawlee/cli 4.0.0-beta.325 → 4.0.0-beta.327
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/cli",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.327",
|
|
4
4
|
"description": "The scalable web crawling and scraping library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.13.0"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@crawlee/templates": "4.0.0-beta.
|
|
48
|
+
"@crawlee/templates": "4.0.0-beta.327",
|
|
49
49
|
"@inquirer/prompts": "^8.8.1",
|
|
50
50
|
"ansi-colors": "^4.1.3",
|
|
51
51
|
"semver": "^7.8.5",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "a7dea40b5857e79e5107ee134cf624f0733d425f"
|
|
63
63
|
}
|
|
@@ -56,6 +56,9 @@ The following properties have been removed from `HttpRequest`, as v4's HTTP clie
|
|
|
56
56
|
- `throwHttpErrors` — `sendRequest` never throws on an HTTP error status; inspect `response.status` yourself. The crawler's `additionalHttpErrorStatusCodes` / `ignoreHttpErrorStatusCodes` options only cover the crawled request itself.
|
|
57
57
|
- `responseType` (and the `HttpRequest<TResponseType>` type parameter) — read the body from the returned `Response` with `response.json()` / `response.text()` / `response.bytes()`.
|
|
58
58
|
- `maxRedirects` — redirect following is handled inside `BaseHttpClient.sendRequest` and capped at 10 redirects; it is no longer configurable per request.
|
|
59
|
+
- `encoding` — a `Response` has no decoding option. Decode the bytes yourself, e.g. `new TextDecoder('latin1').decode(await response.arrayBuffer())`.
|
|
60
|
+
|
|
61
|
+
`followRedirect` now only accepts a boolean. With `followRedirect: false`, `sendRequest` returns the redirect response instead of following it; the predicate form is gone.
|
|
59
62
|
|
|
60
63
|
### Remaining `HttpRequest` properties changed type
|
|
61
64
|
|
|
@@ -82,7 +82,7 @@ The request queue backend's surface was reshaped. The frontend-owned distributed
|
|
|
82
82
|
|
|
83
83
|
The lifecycle is now: `fetchNextRequest()` hands out a pending request and marks it in progress; once processed, call `markRequestAsHandled(request)`; on failure call `reclaimRequest(request, { forefront? })` to return it to the queue.
|
|
84
84
|
|
|
85
|
-
Methods that may have "nothing" to return now consistently resolve to `undefined` rather than `null`. `fetchNextRequest()` resolves to `undefined` when there is nothing to fetch, and `markRequestAsHandled()` / `reclaimRequest()` resolve to `undefined` when the request is not something the backend is currently processing (a
|
|
85
|
+
Methods that may have "nothing" to return now consistently resolve to `undefined` rather than `null`. `fetchNextRequest()` resolves to `undefined` when there is nothing to fetch, and `markRequestAsHandled()` / `reclaimRequest()` resolve to `undefined` when the request is not something the backend is currently processing (not an error; a backend may still apply the operation, as the memory backend does, but the result stays `undefined`). This matches the `undefined` already returned by `getRequest()`, `KeyValueStoreBackend.getValue()`, and `getPublicUrl()`, so the whole backend family uses a single "absent" sentinel. If you implemented a custom backend that returned `null` from these methods, return `undefined` instead.
|
|
86
86
|
|
|
87
87
|
`RequestQueueBackend.isEmpty()` and `RequestQueueBackend.isFinished()` answer two different questions:
|
|
88
88
|
|