@crawlee/memory-storage 3.0.0-beta.6 → 3.0.0-beta.62

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 (41) hide show
  1. package/README.md +77 -130
  2. package/cache-helpers.d.ts +2 -1
  3. package/cache-helpers.d.ts.map +1 -1
  4. package/cache-helpers.js +26 -3
  5. package/cache-helpers.js.map +1 -1
  6. package/memory-storage.d.ts +2 -2
  7. package/memory-storage.d.ts.map +1 -1
  8. package/memory-storage.js +1 -1
  9. package/memory-storage.js.map +1 -1
  10. package/package.json +10 -10
  11. package/resource-clients/common/base-client.d.ts +1 -1
  12. package/resource-clients/common/base-client.d.ts.map +1 -1
  13. package/resource-clients/dataset-collection.d.ts +1 -1
  14. package/resource-clients/dataset-collection.d.ts.map +1 -1
  15. package/resource-clients/dataset.d.ts +2 -2
  16. package/resource-clients/dataset.d.ts.map +1 -1
  17. package/resource-clients/dataset.js +1 -1
  18. package/resource-clients/dataset.js.map +1 -1
  19. package/resource-clients/key-value-store-collection.d.ts +1 -1
  20. package/resource-clients/key-value-store-collection.d.ts.map +1 -1
  21. package/resource-clients/key-value-store.d.ts +1 -1
  22. package/resource-clients/key-value-store.d.ts.map +1 -1
  23. package/resource-clients/request-queue-collection.d.ts +1 -1
  24. package/resource-clients/request-queue-collection.d.ts.map +1 -1
  25. package/resource-clients/request-queue.d.ts +1 -1
  26. package/resource-clients/request-queue.d.ts.map +1 -1
  27. package/resource-clients/request-queue.js +1 -1
  28. package/resource-clients/request-queue.js.map +1 -1
  29. package/tsconfig.build.tsbuildinfo +1 -1
  30. package/utils.d.ts +2 -2
  31. package/utils.d.ts.map +1 -1
  32. package/workers/file-storage-worker-emulator.d.ts +1 -0
  33. package/workers/file-storage-worker-emulator.d.ts.map +1 -1
  34. package/workers/file-storage-worker-emulator.js +1 -0
  35. package/workers/file-storage-worker-emulator.js.map +1 -1
  36. package/workers/instance.d.ts +1 -1
  37. package/workers/instance.d.ts.map +1 -1
  38. package/workers/instance.js +1 -0
  39. package/workers/instance.js.map +1 -1
  40. package/workers/worker-utils.d.ts +1 -1
  41. package/workers/worker-utils.d.ts.map +1 -1
package/utils.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAI/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAQpD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAO9D;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAYhD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAWhD;AAED,eAAO,MAAM,gBAAgB,0BAAgD,CAAC;AAE9E,MAAM,WAAW,UAAU;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,MAAM,CAAC;CAClC;AAED,oBAAY,qBAAqB,GAAG,2BAA2B,GAAG,0BAA0B,CAAC;AAE7F,oBAAY,2BAA2B,GACjC,cAAc,CAAC,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,GAC/C,cAAc,CAAC,gBAAgB,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAC3D,cAAc,CAAC,eAAe,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAEhE,oBAAY,0BAA0B,GAChC,aAAa,CAAC,UAAU,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,GACzD,aAAa,CAAC,gBAAgB,EAAE,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3B,MAAM,EAAE,KAAK,GAAG,QAAQ,CAAC;IACzB,MAAM,EAAE,iBAAiB,CAAC;CAC7B"}
@@ -1,5 +1,6 @@
1
1
  export declare class FileStorageWorkerEmulator {
2
2
  postMessage(value: any): void;
3
3
  terminate(): void;
4
+ unref(): void;
4
5
  }
5
6
  //# sourceMappingURL=file-storage-worker-emulator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-storage-worker-emulator.d.ts","sourceRoot":"","sources":["../../src/workers/file-storage-worker-emulator.ts"],"names":[],"mappings":"AAEA,qBAAa,yBAAyB;IAClC,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI;IAI7B,SAAS,IAAI,IAAI;CACpB"}
1
+ {"version":3,"file":"file-storage-worker-emulator.d.ts","sourceRoot":"","sources":["../../src/workers/file-storage-worker-emulator.ts"],"names":[],"mappings":"AAEA,qBAAa,yBAAyB;IAClC,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI;IAI7B,SAAS,IAAI,IAAI;IAEjB,KAAK,IAAI,IAAI;CAChB"}
@@ -7,6 +7,7 @@ class FileStorageWorkerEmulator {
7
7
  void (0, worker_utils_1.handleMessage)(value);
8
8
  }
9
9
  terminate() { }
10
+ unref() { }
10
11
  }
11
12
  exports.FileStorageWorkerEmulator = FileStorageWorkerEmulator;
12
13
  //# sourceMappingURL=file-storage-worker-emulator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-storage-worker-emulator.js","sourceRoot":"","sources":["../../src/workers/file-storage-worker-emulator.ts"],"names":[],"mappings":";;;AAAA,iDAA+C;AAE/C,MAAa,yBAAyB;IAClC,WAAW,CAAC,KAAU;QAClB,KAAK,IAAA,4BAAa,EAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,SAAS,KAAU,CAAC;CACvB;AAND,8DAMC"}
1
+ {"version":3,"file":"file-storage-worker-emulator.js","sourceRoot":"","sources":["../../src/workers/file-storage-worker-emulator.ts"],"names":[],"mappings":";;;AAAA,iDAA+C;AAE/C,MAAa,yBAAyB;IAClC,WAAW,CAAC,KAAU;QAClB,KAAK,IAAA,4BAAa,EAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,SAAS,KAAU,CAAC;IAEpB,KAAK,KAAU,CAAC;CACnB;AARD,8DAQC"}
@@ -1,4 +1,4 @@
1
- import { WorkerReceivedMessage } from '../utils';
1
+ import type { WorkerReceivedMessage } from '../utils';
2
2
  export declare function sendWorkerMessage(message: WorkerReceivedMessage): void;
3
3
  export declare function initWorkerIfNeeded(): void;
4
4
  //# sourceMappingURL=instance.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"instance.d.ts","sourceRoot":"","sources":["../../src/workers/instance.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAKnE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,qBAAqB,QAE/D;AAED,wBAAgB,kBAAkB,SAsBjC"}
1
+ {"version":3,"file":"instance.d.ts","sourceRoot":"","sources":["../../src/workers/instance.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAMtD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,qBAAqB,QAE/D;AAED,wBAAgB,kBAAkB,SAuBjC"}
@@ -22,6 +22,7 @@ function initWorkerIfNeeded() {
22
22
  const exists = (0, node_fs_1.existsSync)(workerPath);
23
23
  if (exists) {
24
24
  workerInstance = new node_worker_threads_1.Worker(workerPath);
25
+ workerInstance.unref();
25
26
  workerInstance.once('exit', (code) => {
26
27
  utils_1.memoryStorageLog.debug(`File storage worker exited with code ${code}`);
27
28
  initWorkerIfNeeded();
@@ -1 +1 @@
1
- {"version":3,"file":"instance.js","sourceRoot":"","sources":["../../src/workers/instance.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AACrC,yCAAoC;AACpC,6DAA6C;AAC7C,oCAAmE;AACnE,iFAA2E;AAE3E,IAAI,cAAkD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ACpC,CAAC,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,IAAA,mBAAO,EAAC,SAAS,EAAE,0BAA0B,CAAC,CAAC;IAClE,MAAM,MAAM,GAAG,IAAA,oBAAU,EAAC,UAAU,CAAC,CAAC;IAEtC,IAAI,MAAM,EAAE;QACR,cAAc,GAAG,IAAI,4BAAM,CAAC,UAAU,CAAC,CAAC;QACxC,cAAc,CAAC,KAAK,EAAE,CAAC;QAEtB,cAAyB,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;YAC7C,wBAAgB,CAAC,KAAK,CAAC,wCAAwC,IAAI,EAAE,CAAC,CAAC;YACvE,kBAAkB,EAAE,CAAC;QACzB,CAAC,CAAC,CAAC;KACN;SAAM;QACH,cAAc,GAAG,IAAI,wDAAyB,EAAE,CAAC;KACpD;AACL,CAAC;AAvBD,gDAuBC"}
@@ -1,3 +1,3 @@
1
- import { WorkerReceivedMessage } from '../utils';
1
+ import type { WorkerReceivedMessage } from '../utils';
2
2
  export declare function handleMessage(message: WorkerReceivedMessage): Promise<void>;
3
3
  //# sourceMappingURL=worker-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"worker-utils.d.ts","sourceRoot":"","sources":["../../src/workers/worker-utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAA2D,MAAM,UAAU,CAAC;AAI1G,wBAAsB,aAAa,CAAC,OAAO,EAAE,qBAAqB,iBAajE"}
1
+ {"version":3,"file":"worker-utils.d.ts","sourceRoot":"","sources":["../../src/workers/worker-utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAA2D,MAAM,UAAU,CAAC;AAI/G,wBAAsB,aAAa,CAAC,OAAO,EAAE,qBAAqB,iBAajE"}