@crawlee/types 4.0.0-beta.207 → 4.0.0-beta.208
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/browser.d.ts +6 -6
- package/package.json +2 -2
- package/session.d.ts +5 -0
package/browser.d.ts
CHANGED
|
@@ -120,14 +120,14 @@ export interface IBrowserPool<Page = unknown> {
|
|
|
120
120
|
/**
|
|
121
121
|
* Signals the pool that the caller is done with the page. The pool is
|
|
122
122
|
* responsible for closing the page and performing any necessary cleanup
|
|
123
|
-
* (e.g. retiring the underlying browser
|
|
123
|
+
* (e.g. retiring the underlying browser once the page's session is finished).
|
|
124
124
|
*
|
|
125
125
|
* @param page The page to release back to the pool.
|
|
126
|
-
* @param options.error If the
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
126
|
+
* @param options.error If the error is a {@link SessionError}, the
|
|
127
|
+
* session that served the page is finished. A plain `SessionError`
|
|
128
|
+
* means it was blocked: discard any browser state tied to it. A
|
|
129
|
+
* {@link SessionRetiredError} means it merely reached its usage or
|
|
130
|
+
* age limit, so a pool may keep a warm page instead.
|
|
131
131
|
*/
|
|
132
132
|
closePage(page: Page, options?: {
|
|
133
133
|
error?: Error;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/types",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.208",
|
|
4
4
|
"description": "Shared types for the crawlee projects",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.0.0"
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "81d3fbc1abd10fd34be2694a98f4a36e2ebc2f64"
|
|
56
56
|
}
|
package/session.d.ts
CHANGED
|
@@ -108,6 +108,11 @@ export interface ISession {
|
|
|
108
108
|
* Session is usable when it is not expired, not blocked and the maximum usage count has not been reached.
|
|
109
109
|
*/
|
|
110
110
|
isUsable(): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Indicates whether the session is blocked, i.e. its error score reached the maximum or it was retired via `retire()`.
|
|
113
|
+
* Unlike other reasons for not being usable, this means the identity itself is burned.
|
|
114
|
+
*/
|
|
115
|
+
isBlocked(): boolean;
|
|
111
116
|
/**
|
|
112
117
|
* This method should be called after a successful session usage.
|
|
113
118
|
*/
|