apify 4.0.0-beta.135 → 4.0.0-beta.137
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/README.md
CHANGED
|
@@ -66,6 +66,10 @@ For questions, you can ask on [Stack Overflow](https://stackoverflow.com/questio
|
|
|
66
66
|
|
|
67
67
|
Visit the [Upgrading Guide](https://docs.apify.com/sdk/js/docs/upgrading/upgrading-to-v3) to find out what changes you might want to make, and, if you encounter any issues, join our [Discord server](https://discord.gg/jyEM2PRvMU) for help!
|
|
68
68
|
|
|
69
|
+
## Supported versions
|
|
70
|
+
|
|
71
|
+
New features and bug fixes land in the latest major version. The previous major version keeps receiving fixes for high and critical severity vulnerabilities for 12 months after the next major is released, and reaches end of life after that. See the [security policy](https://github.com/apify/apify-sdk-js/security/policy) for the current status of each version and for how to report a vulnerability.
|
|
72
|
+
|
|
69
73
|
## Contributing
|
|
70
74
|
|
|
71
75
|
Your code contributions are welcome, and you'll be praised to eternity!
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { DatasetBackend, DatasetBackendListOptions, DatasetInfo, Dictionary, PaginatedList } from '@crawlee/types';
|
|
2
|
-
import type { DatasetClient } from 'apify-client';
|
|
2
|
+
import type { DatasetClient, DatasetResource } from 'apify-client';
|
|
3
|
+
/** {@link DatasetInfo} extended with the fields the Apify platform reports. */
|
|
4
|
+
export interface ApifyDatasetInfo extends DatasetInfo, Omit<DatasetResource, keyof DatasetInfo> {
|
|
5
|
+
}
|
|
3
6
|
/**
|
|
4
7
|
* Implements crawlee v4's {@link DatasetBackend} interface on top of `apify-client`'s
|
|
5
8
|
* dataset API. Mostly a thin method-mapping wrapper (`getMetadata`/`get`, `drop`/`delete`,
|
|
@@ -11,7 +14,7 @@ import type { DatasetClient } from 'apify-client';
|
|
|
11
14
|
export declare class ApifyDatasetBackend implements DatasetBackend {
|
|
12
15
|
#private;
|
|
13
16
|
constructor(client: DatasetClient);
|
|
14
|
-
getMetadata(): Promise<
|
|
17
|
+
getMetadata(): Promise<ApifyDatasetInfo>;
|
|
15
18
|
drop(): Promise<void>;
|
|
16
19
|
purge(): Promise<void>;
|
|
17
20
|
pushData(items: Dictionary[]): Promise<void>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { KeyValueStoreBackend, KeyValueStoreInfo, KeyValueStoreInputRecord, KeyValueStoreListKeysOptions, KeyValueStoreListKeysResult, KeyValueStoreRecord } from '@crawlee/types';
|
|
2
|
-
import type { KeyValueStoreClient } from 'apify-client';
|
|
2
|
+
import type { KeyValueStoreClient, KeyValueStoreResource } from 'apify-client';
|
|
3
|
+
/** {@link KeyValueStoreInfo} extended with the fields the Apify platform reports. */
|
|
4
|
+
export interface ApifyKeyValueStoreInfo extends KeyValueStoreInfo, Omit<KeyValueStoreResource, keyof KeyValueStoreInfo> {
|
|
5
|
+
}
|
|
3
6
|
/**
|
|
4
7
|
* Implements crawlee v4's {@link KeyValueStoreBackend} interface on top of `apify-client`'s
|
|
5
8
|
* key-value store API. Mostly a method-mapping wrapper (`getValue`/`getRecord`,
|
|
@@ -11,7 +14,7 @@ import type { KeyValueStoreClient } from 'apify-client';
|
|
|
11
14
|
export declare class ApifyKeyValueStoreBackend implements KeyValueStoreBackend {
|
|
12
15
|
#private;
|
|
13
16
|
constructor(client: KeyValueStoreClient);
|
|
14
|
-
getMetadata(): Promise<
|
|
17
|
+
getMetadata(): Promise<ApifyKeyValueStoreInfo>;
|
|
15
18
|
drop(): Promise<void>;
|
|
16
19
|
purge(): Promise<void>;
|
|
17
20
|
getValue(key: string): Promise<KeyValueStoreRecord | undefined>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BatchAddRequestsResult, QueueOperationInfo, RequestQueueBackend, RequestQueueInfo, RequestQueueOperationOptions, RequestSchema, UpdateRequestSchema } from '@crawlee/types';
|
|
2
|
-
import type { RequestQueueClient as ApifyRequestQueueApiClient } from 'apify-client';
|
|
2
|
+
import type { RequestQueueClient as ApifyRequestQueueApiClient, RequestQueueResource } from 'apify-client';
|
|
3
3
|
/**
|
|
4
4
|
* Determines how an Apify platform request queue is consumed.
|
|
5
5
|
*
|
|
@@ -18,6 +18,9 @@ export type RequestQueueAccessMode = 'single' | 'shared';
|
|
|
18
18
|
* address a request by unique key without an extra round-trip.
|
|
19
19
|
*/
|
|
20
20
|
export declare function uniqueKeyToRequestId(uniqueKey: string): string;
|
|
21
|
+
/** {@link RequestQueueInfo} extended with the fields the Apify platform reports. */
|
|
22
|
+
export interface ApifyRequestQueueInfo extends RequestQueueInfo, Omit<RequestQueueResource, keyof RequestQueueInfo> {
|
|
23
|
+
}
|
|
21
24
|
/**
|
|
22
25
|
* Common base of the Apify platform implementations of Crawlee v4's stateful, pull-based
|
|
23
26
|
* {@link RequestQueueBackend} interface, built on top of `apify-client`'s REST request-queue API.
|
|
@@ -46,7 +49,7 @@ export declare abstract class ApifyRequestQueueBackend implements RequestQueueBa
|
|
|
46
49
|
abstract isEmpty(): Promise<boolean>;
|
|
47
50
|
abstract isFinished(): Promise<boolean>;
|
|
48
51
|
setExpectedRequestProcessingTime(_processingTimeSecs: number): Promise<void>;
|
|
49
|
-
getMetadata(): Promise<
|
|
52
|
+
getMetadata(): Promise<ApifyRequestQueueInfo>;
|
|
50
53
|
drop(): Promise<void>;
|
|
51
54
|
purge(): Promise<void>;
|
|
52
55
|
protected requestIdFromUniqueKey(uniqueKey: string): string;
|
|
@@ -41,14 +41,10 @@ export class ApifyRequestQueueBackend {
|
|
|
41
41
|
throw new Error('Request queue not found or has been deleted.');
|
|
42
42
|
}
|
|
43
43
|
return {
|
|
44
|
-
|
|
44
|
+
...metadata,
|
|
45
45
|
name: metadata.name ?? undefined,
|
|
46
|
-
createdAt: metadata.createdAt,
|
|
47
|
-
modifiedAt: metadata.modifiedAt,
|
|
48
|
-
accessedAt: metadata.accessedAt,
|
|
49
46
|
totalRequestCount: Math.max(metadata.totalRequestCount, this.estimatedTotalRequestCount),
|
|
50
47
|
handledRequestCount: Math.max(metadata.handledRequestCount, this.estimatedHandledRequestCount),
|
|
51
|
-
pendingRequestCount: metadata.pendingRequestCount,
|
|
52
48
|
};
|
|
53
49
|
}
|
|
54
50
|
async drop() {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * from './actor.js';
|
|
2
2
|
export { ApifyStorageBackend, type ApifyStorageBackendOptions } from './apify_storage_backend.js';
|
|
3
3
|
export { ApifyFileSystemStorageBackend, type ApifyFileSystemStorageOptions, } from './apify_file_system_storage_backend.js';
|
|
4
|
-
export type {
|
|
4
|
+
export type { ApifyDatasetInfo } from './apify_dataset_backend.js';
|
|
5
|
+
export type { ApifyKeyValueStoreInfo } from './apify_key_value_store_backend.js';
|
|
6
|
+
export type { ApifyRequestQueueInfo, RequestQueueAccessMode } from './apify_request_queue_backend.js';
|
|
5
7
|
export { ArgumentValidationError } from './utils.js';
|
|
6
8
|
export { ActorInputError, type ActorInputErrorCode } from './errors.js';
|
|
7
9
|
export { createTransformRequestFunction, type GlobInput, type PseudoUrlInput, type UrlPatternFilters, type UrlPatternRequestOptions, } from './enqueue_links_filters.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apify",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.137",
|
|
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.13.0"
|