@crawlee/basic 4.0.0-beta.166 → 4.0.0-beta.167

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.
@@ -617,6 +617,15 @@ export class BasicCrawler {
617
617
  registerDeferredCleanup: (cleanup) => {
618
618
  deferredCleanup.push(cleanup);
619
619
  },
620
+ afterStorageCommit: (callback) => {
621
+ const transaction = currentStorageTransaction();
622
+ if (transaction === undefined) {
623
+ throw new Error('afterStorageCommit() needs an active storage transaction, and there is none. ' +
624
+ "With `transactionalStorage: false` the request's writes are applied as they are " +
625
+ 'made, so they throw at the call site instead of at commit time.');
626
+ }
627
+ transaction.afterCommit(callback);
628
+ },
620
629
  extendTimeout: (secs) => {
621
630
  const extraMillis = secs * 1000;
622
631
  // the current `addTimeoutToPromise` window (the request handler, or a navigation hook)...
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crawlee/basic",
3
- "version": "4.0.0-beta.166",
3
+ "version": "4.0.0-beta.167",
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.0.0"
@@ -42,10 +42,10 @@
42
42
  "@apify/datastructures": "^3.0.1",
43
43
  "@apify/timeout": "^1.0.1",
44
44
  "@apify/utilities": "^3.0.1",
45
- "@crawlee/core": "4.0.0-beta.166",
46
- "@crawlee/http-client": "4.0.0-beta.166",
47
- "@crawlee/types": "4.0.0-beta.166",
48
- "@crawlee/utils": "4.0.0-beta.166",
45
+ "@crawlee/core": "4.0.0-beta.167",
46
+ "@crawlee/http-client": "4.0.0-beta.167",
47
+ "@crawlee/types": "4.0.0-beta.167",
48
+ "@crawlee/utils": "4.0.0-beta.167",
49
49
  "csv-stringify": "^6.5.2",
50
50
  "tldts": "^7.0.6",
51
51
  "tslib": "^2.8.1",
@@ -53,7 +53,7 @@
53
53
  "zod": "^4.5.4"
54
54
  },
55
55
  "optionalDependencies": {
56
- "@crawlee/impit-client": "4.0.0-beta.166"
56
+ "@crawlee/impit-client": "4.0.0-beta.167"
57
57
  },
58
58
  "lerna": {
59
59
  "command": {
@@ -62,5 +62,5 @@
62
62
  }
63
63
  }
64
64
  },
65
- "gitHead": "5d34cf3b9da170f22cf5b346014ba44060dad827"
65
+ "gitHead": "8b26080bf07dc602aa0970e12fb66e7e9cba509b"
66
66
  }