@crawlee/types 4.0.0-beta.118 → 4.0.0-beta.119

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/storages.d.ts +8 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crawlee/types",
3
- "version": "4.0.0-beta.118",
3
+ "version": "4.0.0-beta.119",
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": "7306bd05a126662898a4f2fe7779f6b53425cadf"
55
+ "gitHead": "552fe2371a3c6e9e9f3514010536ea6abdc27eb4"
56
56
  }
package/storages.d.ts CHANGED
@@ -334,10 +334,12 @@ export interface RequestQueueBackend {
334
334
  * Identifies a storage by its ID, name, or alias. At most one may be provided.
335
335
  *
336
336
  * - `{ id }` — open a pre-existing storage by its unique ID.
337
- * - `{ name }` — open or create a globally named storage (persists across runs).
337
+ * - `{ name }` — open or create a globally named storage (persists across runs). The name `default`
338
+ * is reserved: it resolves to the default storage, and is emptied on start along with it.
338
339
  * - `{ alias }` — open or create a run-scoped unnamed storage identified by this alias.
339
340
  * The alias is used locally (e.g. as a directory name or cache key) but the storage
340
- * itself has no persistent name. Use this for non-default unnamed storages.
341
+ * itself has no persistent name. Use this for non-default unnamed storages. Like the
342
+ * default storage, an aliased one is emptied on start unless `purgeOnStart` is disabled.
341
343
  * - `{}` / omitted — open the default storage.
342
344
  */
343
345
  export type StorageIdentifier = {
@@ -409,6 +411,10 @@ export interface StorageBackend {
409
411
  * `StorageBackend` implementations automatically get separate cache partitions.
410
412
  */
411
413
  getStorageBackendCacheKey?(): string;
414
+ /**
415
+ * Empty the run-scoped storages — the default one and every alias-keyed one, including any left
416
+ * behind by a previous run. Named storages persist across runs, as does the default store's `INPUT`.
417
+ */
412
418
  purge?(): Promise<void>;
413
419
  teardown?(): Promise<void>;
414
420
  stats?: {