@crawlee/core 4.0.0-beta.5 → 4.0.0-beta.51

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 (177) hide show
  1. package/README.md +9 -5
  2. package/autoscaling/autoscaled_pool.d.ts +3 -5
  3. package/autoscaling/autoscaled_pool.d.ts.map +1 -1
  4. package/autoscaling/autoscaled_pool.js +3 -9
  5. package/autoscaling/autoscaled_pool.js.map +1 -1
  6. package/autoscaling/snapshotter.d.ts +3 -13
  7. package/autoscaling/snapshotter.d.ts.map +1 -1
  8. package/autoscaling/snapshotter.js +18 -29
  9. package/autoscaling/snapshotter.js.map +1 -1
  10. package/autoscaling/system_status.d.ts +0 -3
  11. package/autoscaling/system_status.d.ts.map +1 -1
  12. package/autoscaling/system_status.js +2 -3
  13. package/autoscaling/system_status.js.map +1 -1
  14. package/configuration.d.ts +85 -227
  15. package/configuration.d.ts.map +1 -1
  16. package/configuration.js +159 -223
  17. package/configuration.js.map +1 -1
  18. package/cookie_utils.d.ts +1 -1
  19. package/cookie_utils.d.ts.map +1 -1
  20. package/cookie_utils.js +8 -8
  21. package/cookie_utils.js.map +1 -1
  22. package/crawlers/context_pipeline.d.ts +71 -0
  23. package/crawlers/context_pipeline.d.ts.map +1 -0
  24. package/crawlers/context_pipeline.js +123 -0
  25. package/crawlers/context_pipeline.js.map +1 -0
  26. package/crawlers/crawler_commons.d.ts +19 -27
  27. package/crawlers/crawler_commons.d.ts.map +1 -1
  28. package/crawlers/crawler_commons.js +12 -20
  29. package/crawlers/crawler_commons.js.map +1 -1
  30. package/crawlers/crawler_utils.js +1 -1
  31. package/crawlers/crawler_utils.js.map +1 -1
  32. package/crawlers/error_snapshotter.d.ts +3 -2
  33. package/crawlers/error_snapshotter.d.ts.map +1 -1
  34. package/crawlers/error_snapshotter.js +2 -2
  35. package/crawlers/error_snapshotter.js.map +1 -1
  36. package/crawlers/error_tracker.d.ts +2 -1
  37. package/crawlers/error_tracker.d.ts.map +1 -1
  38. package/crawlers/error_tracker.js.map +1 -1
  39. package/crawlers/index.d.ts +1 -1
  40. package/crawlers/index.d.ts.map +1 -1
  41. package/crawlers/index.js +1 -1
  42. package/crawlers/index.js.map +1 -1
  43. package/crawlers/internals/types.d.ts +8 -0
  44. package/crawlers/internals/types.d.ts.map +1 -0
  45. package/crawlers/internals/types.js +2 -0
  46. package/crawlers/internals/types.js.map +1 -0
  47. package/crawlers/statistics.d.ts +15 -15
  48. package/crawlers/statistics.d.ts.map +1 -1
  49. package/crawlers/statistics.js +21 -18
  50. package/crawlers/statistics.js.map +1 -1
  51. package/enqueue_links/enqueue_links.d.ts +32 -18
  52. package/enqueue_links/enqueue_links.d.ts.map +1 -1
  53. package/enqueue_links/enqueue_links.js +45 -24
  54. package/enqueue_links/enqueue_links.js.map +1 -1
  55. package/enqueue_links/shared.d.ts +25 -8
  56. package/enqueue_links/shared.d.ts.map +1 -1
  57. package/enqueue_links/shared.js +69 -37
  58. package/enqueue_links/shared.js.map +1 -1
  59. package/errors.d.ts +30 -0
  60. package/errors.d.ts.map +1 -1
  61. package/errors.js +44 -0
  62. package/errors.js.map +1 -1
  63. package/events/event_manager.d.ts +8 -5
  64. package/events/event_manager.d.ts.map +1 -1
  65. package/events/event_manager.js +7 -9
  66. package/events/event_manager.js.map +1 -1
  67. package/events/local_event_manager.d.ts +14 -4
  68. package/events/local_event_manager.d.ts.map +1 -1
  69. package/events/local_event_manager.js +33 -39
  70. package/events/local_event_manager.js.map +1 -1
  71. package/index.d.ts +3 -2
  72. package/index.d.ts.map +1 -1
  73. package/index.js +2 -1
  74. package/index.js.map +1 -1
  75. package/log.d.ts +82 -2
  76. package/log.d.ts.map +1 -1
  77. package/log.js +102 -0
  78. package/log.js.map +1 -1
  79. package/package.json +9 -10
  80. package/proxy_configuration.d.ts +14 -148
  81. package/proxy_configuration.d.ts.map +1 -1
  82. package/proxy_configuration.js +19 -167
  83. package/proxy_configuration.js.map +1 -1
  84. package/recoverable_state.d.ts +121 -0
  85. package/recoverable_state.d.ts.map +1 -0
  86. package/recoverable_state.js +142 -0
  87. package/recoverable_state.js.map +1 -0
  88. package/request.d.ts +74 -8
  89. package/request.d.ts.map +1 -1
  90. package/request.js +87 -18
  91. package/request.js.map +1 -1
  92. package/router.d.ts.map +1 -1
  93. package/router.js.map +1 -1
  94. package/serialization.js +1 -1
  95. package/serialization.js.map +1 -1
  96. package/service_locator.d.ts +162 -0
  97. package/service_locator.d.ts.map +1 -0
  98. package/service_locator.js +247 -0
  99. package/service_locator.js.map +1 -0
  100. package/session_pool/session.d.ts +9 -31
  101. package/session_pool/session.d.ts.map +1 -1
  102. package/session_pool/session.js +17 -21
  103. package/session_pool/session.js.map +1 -1
  104. package/session_pool/session_pool.d.ts +51 -57
  105. package/session_pool/session_pool.d.ts.map +1 -1
  106. package/session_pool/session_pool.js +86 -79
  107. package/session_pool/session_pool.js.map +1 -1
  108. package/storages/dataset.d.ts +63 -19
  109. package/storages/dataset.d.ts.map +1 -1
  110. package/storages/dataset.js +86 -22
  111. package/storages/dataset.js.map +1 -1
  112. package/storages/index.d.ts +2 -0
  113. package/storages/index.d.ts.map +1 -1
  114. package/storages/index.js +2 -0
  115. package/storages/index.js.map +1 -1
  116. package/storages/key_value_store.d.ts +79 -10
  117. package/storages/key_value_store.d.ts.map +1 -1
  118. package/storages/key_value_store.js +104 -23
  119. package/storages/key_value_store.js.map +1 -1
  120. package/storages/request_list.d.ts +9 -9
  121. package/storages/request_list.d.ts.map +1 -1
  122. package/storages/request_list.js +13 -8
  123. package/storages/request_list.js.map +1 -1
  124. package/storages/request_list_adapter.d.ts +58 -0
  125. package/storages/request_list_adapter.d.ts.map +1 -0
  126. package/storages/request_list_adapter.js +81 -0
  127. package/storages/request_list_adapter.js.map +1 -0
  128. package/storages/request_manager_tandem.d.ts +68 -0
  129. package/storages/request_manager_tandem.d.ts.map +1 -0
  130. package/storages/request_manager_tandem.js +124 -0
  131. package/storages/request_manager_tandem.js.map +1 -0
  132. package/storages/request_provider.d.ts +86 -23
  133. package/storages/request_provider.d.ts.map +1 -1
  134. package/storages/request_provider.js +114 -74
  135. package/storages/request_provider.js.map +1 -1
  136. package/storages/request_queue.d.ts +1 -3
  137. package/storages/request_queue.d.ts.map +1 -1
  138. package/storages/request_queue.js +2 -4
  139. package/storages/request_queue.js.map +1 -1
  140. package/storages/request_queue_v2.d.ts +3 -3
  141. package/storages/request_queue_v2.d.ts.map +1 -1
  142. package/storages/request_queue_v2.js +4 -5
  143. package/storages/request_queue_v2.js.map +1 -1
  144. package/storages/sitemap_request_list.d.ts +5 -5
  145. package/storages/sitemap_request_list.d.ts.map +1 -1
  146. package/storages/sitemap_request_list.js +10 -7
  147. package/storages/sitemap_request_list.js.map +1 -1
  148. package/storages/storage_manager.d.ts +22 -17
  149. package/storages/storage_manager.d.ts.map +1 -1
  150. package/storages/storage_manager.js +58 -52
  151. package/storages/storage_manager.js.map +1 -1
  152. package/storages/utils.d.ts.map +1 -1
  153. package/storages/utils.js +6 -5
  154. package/storages/utils.js.map +1 -1
  155. package/typedefs.d.ts +1 -1
  156. package/typedefs.d.ts.map +1 -1
  157. package/crawlers/crawler_extension.d.ts +0 -12
  158. package/crawlers/crawler_extension.d.ts.map +0 -1
  159. package/crawlers/crawler_extension.js +0 -14
  160. package/crawlers/crawler_extension.js.map +0 -1
  161. package/http_clients/base-http-client.d.ts +0 -134
  162. package/http_clients/base-http-client.d.ts.map +0 -1
  163. package/http_clients/base-http-client.js +0 -33
  164. package/http_clients/base-http-client.js.map +0 -1
  165. package/http_clients/form-data-like.d.ts +0 -67
  166. package/http_clients/form-data-like.d.ts.map +0 -1
  167. package/http_clients/form-data-like.js +0 -5
  168. package/http_clients/form-data-like.js.map +0 -1
  169. package/http_clients/got-scraping-http-client.d.ts +0 -15
  170. package/http_clients/got-scraping-http-client.d.ts.map +0 -1
  171. package/http_clients/got-scraping-http-client.js +0 -69
  172. package/http_clients/got-scraping-http-client.js.map +0 -1
  173. package/http_clients/index.d.ts +0 -3
  174. package/http_clients/index.d.ts.map +0 -1
  175. package/http_clients/index.js +0 -3
  176. package/http_clients/index.js.map +0 -1
  177. package/tsconfig.build.tsbuildinfo +0 -1
@@ -0,0 +1,68 @@
1
+ import type { Dictionary } from '@crawlee/types';
2
+ import type { Request, Source } from '../request.js';
3
+ import type { IRequestList } from './request_list.js';
4
+ import type { AddRequestsBatchedOptions, AddRequestsBatchedResult, IRequestManager, RequestQueueOperationInfo, RequestQueueOperationOptions, RequestsLike } from './request_provider.js';
5
+ /**
6
+ * A request manager that combines a RequestList and a RequestQueue.
7
+ * It first reads requests from the RequestList and then, when needed,
8
+ * transfers them in batches to the RequestQueue.
9
+ */
10
+ export declare class RequestManagerTandem implements IRequestManager {
11
+ private log;
12
+ private requestList;
13
+ private requestQueue;
14
+ constructor(requestList: IRequestList, requestQueue: IRequestManager);
15
+ /**
16
+ * Transfers a batch of requests from the RequestList to the RequestQueue.
17
+ * Handles both successful transfers and failures appropriately.
18
+ * @private
19
+ */
20
+ private transferNextBatchToQueue;
21
+ /**
22
+ * Fetches the next request from the RequestQueue. If the queue is empty and the RequestList
23
+ * is not finished, it will transfer a batch of requests from the list to the queue first.
24
+ * @inheritdoc
25
+ */
26
+ fetchNextRequest<T extends Dictionary = Dictionary>(): Promise<Request<T> | null>;
27
+ /**
28
+ * @inheritdoc
29
+ */
30
+ isFinished(): Promise<boolean>;
31
+ /**
32
+ * @inheritdoc
33
+ */
34
+ isEmpty(): Promise<boolean>;
35
+ /**
36
+ * @inheritdoc
37
+ */
38
+ handledCount(): Promise<number>;
39
+ /**
40
+ * @inheritdoc
41
+ */
42
+ getTotalCount(): number;
43
+ /**
44
+ * @inheritdoc
45
+ */
46
+ getPendingCount(): number;
47
+ /**
48
+ * @inheritdoc
49
+ */
50
+ [Symbol.asyncIterator](): AsyncGenerator<Request<Dictionary>, void, unknown>;
51
+ /**
52
+ * @inheritdoc
53
+ */
54
+ markRequestHandled(request: Request): Promise<RequestQueueOperationInfo | void | null>;
55
+ /**
56
+ * @inheritdoc
57
+ */
58
+ reclaimRequest(request: Request, options?: RequestQueueOperationOptions): Promise<RequestQueueOperationInfo | null>;
59
+ /**
60
+ * @inheritdoc
61
+ */
62
+ addRequest(requestLike: Source, options?: RequestQueueOperationOptions): Promise<RequestQueueOperationInfo>;
63
+ /**
64
+ * @inheritdoc
65
+ */
66
+ addRequestsBatched(requests: RequestsLike, options?: AddRequestsBatchedOptions): Promise<AddRequestsBatchedResult>;
67
+ }
68
+ //# sourceMappingURL=request_manager_tandem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request_manager_tandem.d.ts","sourceRoot":"","sources":["../../src/storages/request_manager_tandem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EACR,yBAAyB,EACzB,wBAAwB,EACxB,eAAe,EACf,yBAAyB,EACzB,4BAA4B,EAC5B,YAAY,EACf,MAAM,uBAAuB,CAAC;AAE/B;;;;GAIG;AACH,qBAAa,oBAAqB,YAAW,eAAe;IACxD,OAAO,CAAC,GAAG,CAAgB;IAC3B,OAAO,CAAC,WAAW,CAAe;IAClC,OAAO,CAAC,YAAY,CAAkB;gBAE1B,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe;IAMpE;;;;OAIG;YACW,wBAAwB;IAuBtC;;;;OAIG;IACG,gBAAgB,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAevF;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAKpC;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC;IAKjC;;OAEG;IACG,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC;IAKrC;;OAEG;IACH,aAAa,IAAI,MAAM;IAIvB;;OAEG;IACH,eAAe,IAAI,MAAM;IAIzB;;OAEG;IACI,CAAC,MAAM,CAAC,aAAa,CAAC;IAQ7B;;OAEG;IACG,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,yBAAyB,GAAG,IAAI,GAAG,IAAI,CAAC;IAI5F;;OAEG;IACG,cAAc,CAChB,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,4BAA4B,GACvC,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC;IAI5C;;OAEG;IACG,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,4BAA4B,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAIjH;;OAEG;IACG,kBAAkB,CACpB,QAAQ,EAAE,YAAY,EACtB,OAAO,CAAC,EAAE,yBAAyB,GACpC,OAAO,CAAC,wBAAwB,CAAC;CAGvC"}
@@ -0,0 +1,124 @@
1
+ import { serviceLocator } from '../service_locator.js';
2
+ /**
3
+ * A request manager that combines a RequestList and a RequestQueue.
4
+ * It first reads requests from the RequestList and then, when needed,
5
+ * transfers them in batches to the RequestQueue.
6
+ */
7
+ export class RequestManagerTandem {
8
+ log;
9
+ requestList;
10
+ requestQueue;
11
+ constructor(requestList, requestQueue) {
12
+ this.log = serviceLocator.getLogger().child({ prefix: 'RequestManagerTandem' });
13
+ this.requestList = requestList;
14
+ this.requestQueue = requestQueue;
15
+ }
16
+ /**
17
+ * Transfers a batch of requests from the RequestList to the RequestQueue.
18
+ * Handles both successful transfers and failures appropriately.
19
+ * @private
20
+ */
21
+ async transferNextBatchToQueue() {
22
+ const request = await this.requestList.fetchNextRequest();
23
+ if (request === null) {
24
+ return;
25
+ }
26
+ try {
27
+ await this.requestQueue.addRequest(request, { forefront: true });
28
+ }
29
+ catch (error) {
30
+ // If requestQueue.addRequest() fails here then we must reclaim it back to
31
+ // the RequestList because probably it's not yet in the queue!
32
+ this.log.error('Adding of request from the RequestList to the RequestQueue failed, reclaiming request back to the list.', { request });
33
+ await this.requestList.reclaimRequest(request);
34
+ return;
35
+ }
36
+ await this.requestList.markRequestHandled(request);
37
+ }
38
+ /**
39
+ * Fetches the next request from the RequestQueue. If the queue is empty and the RequestList
40
+ * is not finished, it will transfer a batch of requests from the list to the queue first.
41
+ * @inheritdoc
42
+ */
43
+ async fetchNextRequest() {
44
+ // First, try to transfer a request from the requestList
45
+ const [listEmpty, listFinished] = await Promise.all([
46
+ this.requestList.isEmpty(),
47
+ this.requestList.isFinished(),
48
+ ]);
49
+ if (!listEmpty && !listFinished) {
50
+ await this.transferNextBatchToQueue();
51
+ }
52
+ // Try to fetch from queue after potential transfer
53
+ return this.requestQueue.fetchNextRequest();
54
+ }
55
+ /**
56
+ * @inheritdoc
57
+ */
58
+ async isFinished() {
59
+ const storagesFinished = await Promise.all([this.requestList.isFinished(), this.requestQueue.isFinished()]);
60
+ return storagesFinished.every(Boolean);
61
+ }
62
+ /**
63
+ * @inheritdoc
64
+ */
65
+ async isEmpty() {
66
+ const storagesEmpty = await Promise.all([this.requestList.isEmpty(), this.requestQueue.isEmpty()]);
67
+ return storagesEmpty.every(Boolean);
68
+ }
69
+ /**
70
+ * @inheritdoc
71
+ */
72
+ async handledCount() {
73
+ // Since one of the stores needs to have priority when both are present, we query the request queue - the request list will first be dumped into the queue and then left empty.
74
+ return await this.requestQueue.handledCount();
75
+ }
76
+ /**
77
+ * @inheritdoc
78
+ */
79
+ getTotalCount() {
80
+ return this.requestQueue.getTotalCount();
81
+ }
82
+ /**
83
+ * @inheritdoc
84
+ */
85
+ getPendingCount() {
86
+ return this.requestQueue.getPendingCount() + this.requestList.length() - this.requestList.handledCount();
87
+ }
88
+ /**
89
+ * @inheritdoc
90
+ */
91
+ async *[Symbol.asyncIterator]() {
92
+ while (true) {
93
+ const req = await this.fetchNextRequest();
94
+ if (!req)
95
+ break;
96
+ yield req;
97
+ }
98
+ }
99
+ /**
100
+ * @inheritdoc
101
+ */
102
+ async markRequestHandled(request) {
103
+ return this.requestQueue.markRequestHandled(request);
104
+ }
105
+ /**
106
+ * @inheritdoc
107
+ */
108
+ async reclaimRequest(request, options) {
109
+ return await this.requestQueue.reclaimRequest(request, options);
110
+ }
111
+ /**
112
+ * @inheritdoc
113
+ */
114
+ async addRequest(requestLike, options) {
115
+ return await this.requestQueue.addRequest(requestLike, options);
116
+ }
117
+ /**
118
+ * @inheritdoc
119
+ */
120
+ async addRequestsBatched(requests, options) {
121
+ return await this.requestQueue.addRequestsBatched(requests, options);
122
+ }
123
+ }
124
+ //# sourceMappingURL=request_manager_tandem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request_manager_tandem.js","sourceRoot":"","sources":["../../src/storages/request_manager_tandem.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAWvD;;;;GAIG;AACH,MAAM,OAAO,oBAAoB;IACrB,GAAG,CAAgB;IACnB,WAAW,CAAe;IAC1B,YAAY,CAAkB;IAEtC,YAAY,WAAyB,EAAE,YAA6B;QAChE,IAAI,CAAC,GAAG,GAAG,cAAc,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,sBAAsB,EAAE,CAAC,CAAC;QAChF,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACrC,CAAC;IAED;;;;OAIG;IACK,KAAK,CAAC,wBAAwB;QAClC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC;QAE1D,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YACnB,OAAO;QACX,CAAC;QAED,IAAI,CAAC;YACD,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;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CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;CACJ"}
@@ -1,25 +1,79 @@
1
- import type { BatchAddRequestsResult, Dictionary, ProcessedRequest, QueueOperationInfo, RequestQueueClient, RequestQueueInfo, StorageClient } from '@crawlee/types';
1
+ import type { BaseHttpClient, BatchAddRequestsResult, Dictionary, ProcessedRequest, QueueOperationInfo, RequestQueueClient, RequestQueueInfo } from '@crawlee/types';
2
+ import type { ReadonlyDeep } from 'type-fest';
2
3
  import { ListDictionary, LruCache } from '@apify/datastructures';
3
- import type { Log } from '@apify/log';
4
4
  import { Configuration } from '../configuration.js';
5
+ import type { EventManager } from '../events/event_manager.js';
6
+ import type { CrawleeLogger } from '../log.js';
5
7
  import type { ProxyConfiguration } from '../proxy_configuration.js';
6
8
  import type { InternalSource, RequestOptions, Source } from '../request.js';
7
9
  import { Request } from '../request.js';
8
- import type { IStorage, StorageManagerOptions } from './storage_manager.js';
9
- export declare abstract class RequestProvider implements IStorage {
10
- readonly config: Configuration;
10
+ import type { IStorage, StorageIdentifier, StorageManagerOptions } from './storage_manager.js';
11
+ export type RequestsLike = AsyncIterable<Source | string> | Iterable<Source | string> | (Source | string)[];
12
+ /**
13
+ * Represents a provider of requests/URLs to crawl.
14
+ */
15
+ export interface IRequestManager {
16
+ /**
17
+ * Returns `true` if all requests were already handled and there are no more left.
18
+ */
19
+ isFinished(): Promise<boolean>;
20
+ /**
21
+ * Resolves to `true` if the next call to {@link IRequestManager.fetchNextRequest} function
22
+ * would return `null`, otherwise it resolves to `false`.
23
+ * Note that even if the provider is empty, there might be some pending requests currently being processed.
24
+ */
25
+ isEmpty(): Promise<boolean>;
26
+ /**
27
+ * Returns number of handled requests.
28
+ */
29
+ handledCount(): Promise<number>;
30
+ /**
31
+ * Get the total number of requests known to the request manager.
32
+ */
33
+ getTotalCount(): number;
34
+ /**
35
+ * Get an offline approximation of the number of pending requests.
36
+ */
37
+ getPendingCount(): number;
38
+ /**
39
+ * Gets the next {@link Request} to process.
40
+ *
41
+ * The function's `Promise` resolves to `null` if there are no more
42
+ * requests to process.
43
+ */
44
+ fetchNextRequest<T extends Dictionary = Dictionary>(): Promise<Request<T> | null>;
45
+ /**
46
+ * Can be used to iterate over the `RequestManager` instance in a `for await .. of` loop.
47
+ * Provides an alternative for the repeated use of `fetchNextRequest`.
48
+ */
49
+ [Symbol.asyncIterator](): AsyncGenerator<Request>;
50
+ /**
51
+ * Marks request as handled after successful processing.
52
+ */
53
+ markRequestHandled(request: Request): Promise<RequestQueueOperationInfo | void | null>;
54
+ /**
55
+ * Reclaims request to the provider if its processing failed.
56
+ * The request will become available in the next `fetchNextRequest()`.
57
+ */
58
+ reclaimRequest(request: Request, options?: RequestQueueOperationOptions): Promise<RequestQueueOperationInfo | null>;
59
+ addRequest(requestLike: Source, options?: RequestQueueOperationOptions): Promise<RequestQueueOperationInfo>;
60
+ addRequestsBatched(requests: RequestsLike, options?: AddRequestsBatchedOptions): Promise<AddRequestsBatchedResult>;
61
+ }
62
+ export declare abstract class RequestProvider implements IStorage, IRequestManager {
63
+ protected readonly config: Configuration;
11
64
  id: string;
12
65
  name?: string;
13
66
  timeoutSecs: number;
14
67
  clientKey: string;
15
68
  client: RequestQueueClient;
16
69
  protected proxyConfiguration?: ProxyConfiguration;
17
- log: Log;
70
+ log: CrawleeLogger;
18
71
  internalTimeoutMillis: number;
19
72
  requestLockSecs: number;
20
73
  assumedTotalCount: number;
21
74
  assumedHandledCount: number;
22
75
  private initialCount;
76
+ private initialHandledCount;
23
77
  protected queueHeadIds: ListDictionary<string>;
24
78
  protected requestCache: LruCache<RequestLruItem>;
25
79
  protected recentlyHandledRequestsCache: LruCache<boolean>;
@@ -27,13 +81,21 @@ export declare abstract class RequestProvider implements IStorage {
27
81
  protected lastActivity: Date;
28
82
  protected isFinishedCalledWhileHeadWasNotEmpty: number;
29
83
  protected inProgressRequestBatchCount: number;
30
- constructor(options: InternalRequestProviderOptions, config?: Configuration);
84
+ protected httpClient?: BaseHttpClient;
85
+ protected readonly events: EventManager;
86
+ constructor(options: InternalRequestProviderOptions, config: Configuration);
31
87
  /**
32
88
  * Returns an offline approximation of the total number of requests in the queue (i.e. pending + handled).
33
89
  *
34
90
  * Survives restarts and actor migrations.
35
91
  */
36
92
  getTotalCount(): number;
93
+ /**
94
+ * Returns an offline approximation of the total number of pending requests in the queue.
95
+ *
96
+ * Survives restarts and Actor migrations.
97
+ */
98
+ getPendingCount(): number;
37
99
  /**
38
100
  * Adds a request to the queue.
39
101
  *
@@ -63,7 +125,7 @@ export declare abstract class RequestProvider implements IStorage {
63
125
  * Note that the function sets the `uniqueKey` and `id` fields to the passed requests if missing.
64
126
  * @param [options] Request queue operation options.
65
127
  */
66
- addRequests(requestsLike: Source[], options?: RequestQueueOperationOptions): Promise<BatchAddRequestsResult>;
128
+ addRequests(requestsLike: RequestsLike, options?: RequestQueueOperationOptions): Promise<BatchAddRequestsResult>;
67
129
  /**
68
130
  * Adds requests to the queue in batches. By default, it will resolve after the initial batch is added, and continue
69
131
  * adding the rest in the background. You can configure the batch size via `batchSize` option and the sleep time in between
@@ -73,7 +135,7 @@ export declare abstract class RequestProvider implements IStorage {
73
135
  * @param requests The requests to add
74
136
  * @param options Options for the request queue
75
137
  */
76
- addRequestsBatched(requests: (string | Source)[], options?: AddRequestsBatchedOptions): Promise<AddRequestsBatchedResult>;
138
+ addRequestsBatched(requests: ReadonlyDeep<RequestsLike>, options?: AddRequestsBatchedOptions): Promise<AddRequestsBatchedResult>;
77
139
  /**
78
140
  * Gets the request from the queue specified by ID.
79
141
  *
@@ -98,7 +160,7 @@ export declare abstract class RequestProvider implements IStorage {
98
160
  * @returns
99
161
  * Returns the request object or `null` if there are no more pending requests.
100
162
  */
101
- abstract fetchNextRequest<T extends Dictionary = Dictionary>(options?: RequestOptions): Promise<Request<T> | null>;
163
+ abstract fetchNextRequest<T extends Dictionary = Dictionary>(): Promise<Request<T> | null>;
102
164
  /**
103
165
  * Marks a request that was previously returned by the
104
166
  * {@link RequestQueue.fetchNextRequest}
@@ -142,6 +204,10 @@ export declare abstract class RequestProvider implements IStorage {
142
204
  * depending on the mode of operation.
143
205
  */
144
206
  drop(): Promise<void>;
207
+ /**
208
+ * @inheritdoc
209
+ */
210
+ [Symbol.asyncIterator](): AsyncGenerator<Request<Dictionary>, void, unknown>;
145
211
  /**
146
212
  * Returns the number of handled requests.
147
213
  *
@@ -150,23 +216,17 @@ export declare abstract class RequestProvider implements IStorage {
150
216
  * ```javascript
151
217
  * const { handledRequestCount } = await queue.getInfo();
152
218
  * ```
219
+ * @inheritdoc
153
220
  */
154
221
  handledCount(): Promise<number>;
155
222
  /**
156
223
  * Returns an object containing general information about the request queue.
157
224
  *
158
- * The function returns the same object as the Apify API Client's
159
- * [getQueue](https://docs.apify.com/api/apify-client-js/latest#ApifyClient-requestQueues)
160
- * function, which in turn calls the
161
- * [Get request queue](https://apify.com/docs/api/v2#/reference/request-queues/queue/get-request-queue)
162
- * API endpoint.
163
- *
164
225
  * **Example:**
165
226
  * ```
166
227
  * {
167
228
  * id: "WkzbQMuFYuamGv3YF",
168
229
  * name: "my-queue",
169
- * userId: "wRsJZtadYvn4mBZmm",
170
230
  * createdAt: new Date("2015-12-12T07:34:14.202Z"),
171
231
  * modifiedAt: new Date("2015-12-13T08:36:13.202Z"),
172
232
  * accessedAt: new Date("2015-12-14T08:36:13.202Z"),
@@ -175,8 +235,10 @@ export declare abstract class RequestProvider implements IStorage {
175
235
  * pendingRequestCount: 20,
176
236
  * }
177
237
  * ```
238
+ *
239
+ * @throws If the underlying storage no longer exists (e.g. it was deleted externally).
178
240
  */
179
- getInfo(): Promise<RequestQueueInfo | undefined>;
241
+ getInfo(): Promise<RequestQueueInfo>;
180
242
  /**
181
243
  * Fetches URLs from requestsFromUrl and returns them in format of list of requests
182
244
  */
@@ -200,12 +262,13 @@ export declare abstract class RequestProvider implements IStorage {
200
262
  *
201
263
  * For more details and code examples, see the {@link RequestQueue} class.
202
264
  *
203
- * @param [queueIdOrName]
204
- * ID or name of the request queue to be opened. If `null` or `undefined`,
205
- * the function returns the default request queue associated with the crawler run.
265
+ * @param [identifier]
266
+ * ID or name of the request queue to be opened. If a string is provided, it will first be
267
+ * looked up as an ID; if no such storage exists, it will be treated as a name.
268
+ * If `null` or `undefined`, the function returns the default request queue associated with the crawler run.
206
269
  * @param [options] Open Request Queue options.
207
270
  */
208
- static open(queueIdOrName?: string | null, options?: StorageManagerOptions): Promise<RequestProvider>;
271
+ static open(identifier?: string | StorageIdentifier | null, options?: StorageManagerOptions): Promise<RequestProvider>;
209
272
  }
210
273
  interface RequestLruItem {
211
274
  uniqueKey: string;
@@ -218,7 +281,7 @@ interface RequestLruItem {
218
281
  export interface RequestProviderOptions {
219
282
  id: string;
220
283
  name?: string;
221
- client: StorageClient;
284
+ client: RequestQueueClient;
222
285
  /**
223
286
  * Used to pass the proxy configuration for the `requestsFromUrl` objects.
224
287
  * Takes advantage of the internal address rotation and authentication process.
@@ -1 +1 @@
1
- {"version":3,"file":"request_provider.d.ts","sourceRoot":"","sources":["../../src/storages/request_provider.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACR,sBAAsB,EACtB,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EAChB,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAGtC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC,OAAO,KAAK,EAAE,QAAQ,EAAE,qBAAqB,EAAE,M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