@crawlee/core 3.17.1-beta.59 → 3.17.1-beta.60
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/core",
|
|
3
|
-
"version": "3.17.1-beta.
|
|
3
|
+
"version": "3.17.1-beta.60",
|
|
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": ">=16.0.0"
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"@apify/pseudo_url": "^2.0.30",
|
|
60
60
|
"@apify/timeout": "^0.4.0",
|
|
61
61
|
"@apify/utilities": "^2.7.10",
|
|
62
|
-
"@crawlee/memory-storage": "3.17.1-beta.
|
|
63
|
-
"@crawlee/types": "3.17.1-beta.
|
|
64
|
-
"@crawlee/utils": "3.17.1-beta.
|
|
62
|
+
"@crawlee/memory-storage": "3.17.1-beta.60",
|
|
63
|
+
"@crawlee/types": "3.17.1-beta.60",
|
|
64
|
+
"@crawlee/utils": "3.17.1-beta.60",
|
|
65
65
|
"@sapphire/async-queue": "^1.5.1",
|
|
66
66
|
"@standard-schema/spec": "^1.0.0",
|
|
67
67
|
"@vladfrangu/async_event_emitter": "^2.2.2",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "5ba2517b5f3bc6ef868b860c6c783a3e7e7d4a93"
|
|
88
88
|
}
|
|
@@ -192,8 +192,11 @@ export declare class SessionPool extends EventEmitter {
|
|
|
192
192
|
/**
|
|
193
193
|
* Removes listener from `persistState` event.
|
|
194
194
|
* This function should be called after you are done with using the `SessionPool` instance.
|
|
195
|
+
* @param options - Set `persistState` to false when the final state was already persisted by the event manager.
|
|
195
196
|
*/
|
|
196
|
-
teardown(
|
|
197
|
+
teardown({ persistState }?: {
|
|
198
|
+
persistState?: boolean;
|
|
199
|
+
}): Promise<void>;
|
|
197
200
|
/**
|
|
198
201
|
* SessionPool should not work before initialization.
|
|
199
202
|
*/
|
|
@@ -342,10 +342,13 @@ class SessionPool extends node_events_1.EventEmitter {
|
|
|
342
342
|
/**
|
|
343
343
|
* Removes listener from `persistState` event.
|
|
344
344
|
* This function should be called after you are done with using the `SessionPool` instance.
|
|
345
|
+
* @param options - Set `persistState` to false when the final state was already persisted by the event manager.
|
|
345
346
|
*/
|
|
346
|
-
async teardown() {
|
|
347
|
+
async teardown({ persistState = true } = {}) {
|
|
347
348
|
this.events.off("persistState" /* EventType.PERSIST_STATE */, this._listener);
|
|
348
|
-
|
|
349
|
+
if (persistState) {
|
|
350
|
+
await this.persistState();
|
|
351
|
+
}
|
|
349
352
|
}
|
|
350
353
|
/**
|
|
351
354
|
* SessionPool should not work before initialization.
|