apify 4.0.0-beta.12 → 4.0.0-beta.120
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 +29 -43
- package/dist/actor.d.ts +511 -167
- package/dist/actor.js +895 -322
- package/dist/apify_dataset_backend.d.ts +19 -0
- package/dist/apify_dataset_backend.js +77 -0
- package/dist/apify_file_system_storage_backend.d.ts +34 -0
- package/dist/apify_file_system_storage_backend.js +41 -0
- package/dist/apify_key_value_store_backend.d.ts +23 -0
- package/dist/apify_key_value_store_backend.js +56 -0
- package/dist/apify_request_queue_backend.d.ts +78 -0
- package/dist/apify_request_queue_backend.js +114 -0
- package/dist/apify_request_queue_shared_backend.d.ts +31 -0
- package/dist/apify_request_queue_shared_backend.js +193 -0
- package/dist/apify_request_queue_single_backend.d.ts +43 -0
- package/dist/apify_request_queue_single_backend.js +256 -0
- package/dist/apify_storage_backend.d.ts +90 -0
- package/dist/apify_storage_backend.js +210 -0
- package/dist/charging.d.ts +82 -18
- package/dist/charging.js +388 -128
- package/dist/charging_storage_backend.d.ts +53 -0
- package/dist/charging_storage_backend.js +109 -0
- package/dist/child_run_tracker.d.ts +88 -0
- package/dist/child_run_tracker.js +239 -0
- package/dist/configuration.d.ts +86 -136
- package/dist/configuration.js +136 -145
- package/dist/enqueue_links_filters.d.ts +29 -0
- package/dist/enqueue_links_filters.js +52 -0
- package/dist/errors.d.ts +31 -0
- package/dist/errors.js +22 -0
- package/dist/google_sheets.d.ts +12 -0
- package/dist/google_sheets.js +26 -0
- package/dist/index.d.ts +11 -5
- package/dist/index.js +8 -5
- package/dist/input-schemas.d.ts +7 -0
- package/dist/input-schemas.js +58 -0
- package/dist/platform_event_manager.d.ts +15 -6
- package/dist/platform_event_manager.js +187 -41
- package/dist/proxy_configuration.d.ts +66 -59
- package/dist/proxy_configuration.js +172 -154
- package/dist/smart_apify_storage_backend.d.ts +52 -0
- package/dist/smart_apify_storage_backend.js +73 -0
- package/dist/storage.d.ts +38 -0
- package/dist/storage.js +1 -0
- package/dist/utils.d.ts +28 -4
- package/dist/utils.js +60 -20
- package/package.json +117 -73
- package/.turbo/turbo-build.log +0 -26
- package/.turbo/turbo-copy.log +0 -4
- package/dist/LICENSE.md +0 -201
- package/dist/README.md +0 -98
- package/dist/actor.d.ts.map +0 -1
- package/dist/actor.js.map +0 -1
- package/dist/charging.d.ts.map +0 -1
- package/dist/charging.js.map +0 -1
- package/dist/configuration.d.ts.map +0 -1
- package/dist/configuration.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/key_value_store.d.ts +0 -17
- package/dist/key_value_store.d.ts.map +0 -1
- package/dist/key_value_store.js +0 -33
- package/dist/key_value_store.js.map +0 -1
- package/dist/package.json +0 -75
- package/dist/platform_event_manager.d.ts.map +0 -1
- package/dist/platform_event_manager.js.map +0 -1
- package/dist/proxy_configuration.d.ts.map +0 -1
- package/dist/proxy_configuration.js.map +0 -1
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js.map +0 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { DatasetBackend, KeyValueStoreBackend, RequestQueueBackend, StorageBackend, StorageIdentifier } from '@crawlee/types';
|
|
2
|
+
import type { StorageType } from './apify_storage_backend.js';
|
|
3
|
+
import type { Configuration } from './configuration.js';
|
|
4
|
+
import type { OpenStorageOptions } from './storage.js';
|
|
5
|
+
export interface SmartApifyStorageBackendOptions {
|
|
6
|
+
/** Used on the Apify platform, and locally for `forceCloud` storages. */
|
|
7
|
+
cloudStorageBackend: StorageBackend;
|
|
8
|
+
/** Used outside of the Apify platform, except for `forceCloud` storages. */
|
|
9
|
+
localStorageBackend: StorageBackend;
|
|
10
|
+
/** Supplies `isAtHome` and the token that cloud storage needs. */
|
|
11
|
+
configuration: Configuration;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Routes storages to Apify cloud storage or to a local one, depending on where the Actor runs.
|
|
15
|
+
*
|
|
16
|
+
* On the Apify platform (detected through the `APIFY_IS_AT_HOME` environment variable) storages are
|
|
17
|
+
* opened in the cloud; locally they are opened through `localStorageBackend`, unless `forceCloud`
|
|
18
|
+
* asks for the cloud one. `Actor` installs it; callers who want storages of their own pass a
|
|
19
|
+
* backend to `Actor.init({ storage })` instead.
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare class SmartApifyStorageBackend implements StorageBackend {
|
|
24
|
+
#private;
|
|
25
|
+
constructor(options: SmartApifyStorageBackendOptions);
|
|
26
|
+
/**
|
|
27
|
+
* The backend a storage is opened through: the cloud one on the platform or with `forceCloud`,
|
|
28
|
+
* the local one otherwise.
|
|
29
|
+
*
|
|
30
|
+
* Exposed so that `forceCloud` storages can be opened through the very same cloud backend
|
|
31
|
+
* instance this one delegates to — two instances would resolve run-scoped aliases to two
|
|
32
|
+
* separate storages.
|
|
33
|
+
*/
|
|
34
|
+
getSuitableStorageBackend(options?: OpenStorageOptions): StorageBackend;
|
|
35
|
+
get stats(): {
|
|
36
|
+
rateLimitErrors: number[];
|
|
37
|
+
} | undefined;
|
|
38
|
+
/** Repeats crawlee's own fallback, so that routing a backend does not change how storages are cached. */
|
|
39
|
+
getStorageBackendCacheKey(): string;
|
|
40
|
+
createDatasetBackend(options?: StorageIdentifier): Promise<DatasetBackend>;
|
|
41
|
+
createKeyValueStoreBackend(options?: StorageIdentifier): Promise<KeyValueStoreBackend>;
|
|
42
|
+
createRequestQueueBackend(options?: StorageIdentifier): Promise<RequestQueueBackend>;
|
|
43
|
+
/**
|
|
44
|
+
* Declared unconditionally, unlike on the backends this one delegates to: crawlee branches on
|
|
45
|
+
* the presence of the three methods below, and delegating to a backend that lacks one is
|
|
46
|
+
* indistinguishable from not having it — a `false` from `storageExists` means the same as its
|
|
47
|
+
* absence (crawlee falls through to a name lookup), and the other two have no return value.
|
|
48
|
+
*/
|
|
49
|
+
storageExists(id: string, type: StorageType): Promise<boolean>;
|
|
50
|
+
purge(): Promise<void>;
|
|
51
|
+
teardown(): Promise<void>;
|
|
52
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Routes storages to Apify cloud storage or to a local one, depending on where the Actor runs.
|
|
3
|
+
*
|
|
4
|
+
* On the Apify platform (detected through the `APIFY_IS_AT_HOME` environment variable) storages are
|
|
5
|
+
* opened in the cloud; locally they are opened through `localStorageBackend`, unless `forceCloud`
|
|
6
|
+
* asks for the cloud one. `Actor` installs it; callers who want storages of their own pass a
|
|
7
|
+
* backend to `Actor.init({ storage })` instead.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export class SmartApifyStorageBackend {
|
|
12
|
+
#cloudStorageBackend;
|
|
13
|
+
#localStorageBackend;
|
|
14
|
+
#configuration;
|
|
15
|
+
constructor(options) {
|
|
16
|
+
this.#cloudStorageBackend = options.cloudStorageBackend;
|
|
17
|
+
this.#localStorageBackend = options.localStorageBackend;
|
|
18
|
+
this.#configuration = options.configuration;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The backend a storage is opened through: the cloud one on the platform or with `forceCloud`,
|
|
22
|
+
* the local one otherwise.
|
|
23
|
+
*
|
|
24
|
+
* Exposed so that `forceCloud` storages can be opened through the very same cloud backend
|
|
25
|
+
* instance this one delegates to — two instances would resolve run-scoped aliases to two
|
|
26
|
+
* separate storages.
|
|
27
|
+
*/
|
|
28
|
+
getSuitableStorageBackend(options = {}) {
|
|
29
|
+
if (this.#configuration.isAtHome) {
|
|
30
|
+
return this.#cloudStorageBackend;
|
|
31
|
+
}
|
|
32
|
+
if (!options.forceCloud) {
|
|
33
|
+
return this.#localStorageBackend;
|
|
34
|
+
}
|
|
35
|
+
if (!this.#configuration.token) {
|
|
36
|
+
throw new Error('In order to use the Apify cloud storage from your computer, you need to provide an Apify token ' +
|
|
37
|
+
'using the APIFY_TOKEN environment variable.');
|
|
38
|
+
}
|
|
39
|
+
return this.#cloudStorageBackend;
|
|
40
|
+
}
|
|
41
|
+
get stats() {
|
|
42
|
+
return this.getSuitableStorageBackend().stats;
|
|
43
|
+
}
|
|
44
|
+
/** Repeats crawlee's own fallback, so that routing a backend does not change how storages are cached. */
|
|
45
|
+
getStorageBackendCacheKey() {
|
|
46
|
+
const backend = this.getSuitableStorageBackend();
|
|
47
|
+
return backend.getStorageBackendCacheKey?.() ?? backend.constructor.name;
|
|
48
|
+
}
|
|
49
|
+
async createDatasetBackend(options) {
|
|
50
|
+
return await this.getSuitableStorageBackend().createDatasetBackend(options);
|
|
51
|
+
}
|
|
52
|
+
async createKeyValueStoreBackend(options) {
|
|
53
|
+
return await this.getSuitableStorageBackend().createKeyValueStoreBackend(options);
|
|
54
|
+
}
|
|
55
|
+
async createRequestQueueBackend(options) {
|
|
56
|
+
return await this.getSuitableStorageBackend().createRequestQueueBackend(options);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Declared unconditionally, unlike on the backends this one delegates to: crawlee branches on
|
|
60
|
+
* the presence of the three methods below, and delegating to a backend that lacks one is
|
|
61
|
+
* indistinguishable from not having it — a `false` from `storageExists` means the same as its
|
|
62
|
+
* absence (crawlee falls through to a name lookup), and the other two have no return value.
|
|
63
|
+
*/
|
|
64
|
+
async storageExists(id, type) {
|
|
65
|
+
return (await this.getSuitableStorageBackend().storageExists?.(id, type)) ?? false;
|
|
66
|
+
}
|
|
67
|
+
async purge() {
|
|
68
|
+
await this.getSuitableStorageBackend().purge?.();
|
|
69
|
+
}
|
|
70
|
+
async teardown() {
|
|
71
|
+
await this.getSuitableStorageBackend().teardown?.();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface OpenStorageOptions {
|
|
2
|
+
/**
|
|
3
|
+
* If set to `true` then the cloud storage is used even if the `CRAWLEE_STORAGE_DIR`
|
|
4
|
+
* environment variable is set. This way it is possible to combine local and cloud storage.
|
|
5
|
+
* @default false
|
|
6
|
+
*/
|
|
7
|
+
forceCloud?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Identifies a run-scoped storage by its alias.
|
|
11
|
+
*
|
|
12
|
+
* An alias declared in the Actor's schema storages (the `ACTOR_STORAGES_JSON` environment variable)
|
|
13
|
+
* resolves to the storage the platform created for it; any other alias gets an unnamed storage of
|
|
14
|
+
* its own, for this run only.
|
|
15
|
+
*/
|
|
16
|
+
export interface StorageAlias {
|
|
17
|
+
alias: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Identifies a storage by its platform ID.
|
|
21
|
+
*/
|
|
22
|
+
export interface StorageId {
|
|
23
|
+
id: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Identifies a storage by its name.
|
|
27
|
+
*/
|
|
28
|
+
export interface StorageName {
|
|
29
|
+
name: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Identifies a storage to open. Can be:
|
|
33
|
+
* - A plain `string` for backward compatibility (treated as ID or name)
|
|
34
|
+
* - `{ alias: string }` to open a run-scoped storage — see {@link StorageAlias}
|
|
35
|
+
* - `{ id: string }` to open by explicit platform ID
|
|
36
|
+
* - `{ name: string }` to open by explicit name
|
|
37
|
+
*/
|
|
38
|
+
export type StorageIdentifier = string | StorageAlias | StorageId | StorageName;
|
package/dist/storage.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
export { ArgumentValidationError } from '@apify/validations';
|
|
2
|
+
/**
|
|
3
|
+
* Returns `true` for a plain, non-empty object (not `null`, not an array).
|
|
4
|
+
* Mirrors the `ow.object.nonEmpty` predicate the SDK used previously.
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare function isNonEmptyObject(value: unknown): value is Record<string, unknown>;
|
|
8
|
+
/** Content type of a JSON record, as `KeyValueStore` and the file-system adoption write it. */
|
|
9
|
+
export declare const JSON_CONTENT_TYPE = "application/json; charset=utf-8";
|
|
10
|
+
/** Content type of raw bytes, which is what a local input file without an extension is adopted as. */
|
|
11
|
+
export declare const BINARY_CONTENT_TYPE = "application/octet-stream";
|
|
12
|
+
/**
|
|
13
|
+
* Parses a raw input record the way `KeyValueStore.getValue` would, with one exception:
|
|
14
|
+
* `application/octet-stream` — the type a local input file without an extension is adopted as — is
|
|
15
|
+
* tried as JSON5 first, so such a file still yields an object. Bytes that do not parse come back as they are.
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare function parseInputValue(value: Buffer | ArrayBuffer, contentType: string | null): unknown;
|
|
19
|
+
/**
|
|
20
|
+
* Converts a `SNAKE_CASE` string to `camelCase` (previously provided by `@crawlee/utils`).
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare function snakeCaseToCamelCase(snakeCaseStr: string): string;
|
|
1
24
|
/**
|
|
2
25
|
* Gets info about system, node version and apify package version.
|
|
3
26
|
* @internal
|
|
@@ -14,8 +37,9 @@ export declare function getSystemInfo(): {
|
|
|
14
37
|
*/
|
|
15
38
|
export declare function checkCrawleeVersion(): void;
|
|
16
39
|
/**
|
|
17
|
-
*
|
|
18
|
-
* @ignore
|
|
40
|
+
* A FIFO mutex that a critical section may re-enter from a nested call without deadlocking.
|
|
19
41
|
*/
|
|
20
|
-
export declare
|
|
21
|
-
|
|
42
|
+
export declare class ReentrantAsyncLock {
|
|
43
|
+
#private;
|
|
44
|
+
runExclusive<T>(fn: () => Promise<T>): Promise<T>;
|
|
45
|
+
}
|
package/dist/utils.js
CHANGED
|
@@ -1,19 +1,58 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
2
3
|
import { createRequire } from 'node:module';
|
|
3
4
|
import { type } from 'node:os';
|
|
4
5
|
import { normalize } from 'node:path';
|
|
6
|
+
import { parseValue } from '@crawlee/core';
|
|
5
7
|
// @ts-ignore if we enable resolveJsonModule, we end up with `src` folder in `dist`
|
|
6
8
|
import crawleePkgJson from '@crawlee/core/package.json' with { type: 'json' };
|
|
7
9
|
// @ts-ignore if we enable resolveJsonModule, we end up with `src` folder in `dist`
|
|
8
10
|
import apifyClientPkgJson from 'apify-client/package.json' with { type: 'json' };
|
|
9
|
-
// eslint-disable-next-line import/extensions
|
|
10
|
-
import { readJSONSync } from 'fs-extra/esm';
|
|
11
|
-
import semver from 'semver';
|
|
12
|
-
import { APIFY_ENV_VARS } from '@apify/consts';
|
|
13
|
-
import log from '@apify/log';
|
|
14
11
|
// @ts-ignore if we enable resolveJsonModule, we end up with `src` folder in `dist`
|
|
15
|
-
import apifyPkgJson from '
|
|
12
|
+
import apifyPkgJson from '../package.json' with { type: 'json' };
|
|
13
|
+
export { ArgumentValidationError } from '@apify/validations';
|
|
16
14
|
const require = createRequire(import.meta.url);
|
|
15
|
+
/**
|
|
16
|
+
* Returns `true` for a plain, non-empty object (not `null`, not an array).
|
|
17
|
+
* Mirrors the `ow.object.nonEmpty` predicate the SDK used previously.
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export function isNonEmptyObject(value) {
|
|
21
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value) && Object.keys(value).length > 0;
|
|
22
|
+
}
|
|
23
|
+
/** Content type of a JSON record, as `KeyValueStore` and the file-system adoption write it. */
|
|
24
|
+
export const JSON_CONTENT_TYPE = 'application/json; charset=utf-8';
|
|
25
|
+
/** Content type of raw bytes, which is what a local input file without an extension is adopted as. */
|
|
26
|
+
export const BINARY_CONTENT_TYPE = 'application/octet-stream';
|
|
27
|
+
/**
|
|
28
|
+
* Parses a raw input record the way `KeyValueStore.getValue` would, with one exception:
|
|
29
|
+
* `application/octet-stream` — the type a local input file without an extension is adopted as — is
|
|
30
|
+
* tried as JSON5 first, so such a file still yields an object. Bytes that do not parse come back as they are.
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
export function parseInputValue(value, contentType) {
|
|
34
|
+
const mediaType = contentType?.split(';')[0].trim().toLowerCase();
|
|
35
|
+
if (mediaType === BINARY_CONTENT_TYPE) {
|
|
36
|
+
try {
|
|
37
|
+
return parseValue(value, JSON_CONTENT_TYPE);
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return parseValue(value, contentType);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Converts a `SNAKE_CASE` string to `camelCase` (previously provided by `@crawlee/utils`).
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
export function snakeCaseToCamelCase(snakeCaseStr) {
|
|
50
|
+
return snakeCaseStr
|
|
51
|
+
.toLowerCase()
|
|
52
|
+
.split('_')
|
|
53
|
+
.map((part, index) => (index > 0 ? part.charAt(0).toUpperCase() + part.slice(1) : part))
|
|
54
|
+
.join('');
|
|
55
|
+
}
|
|
17
56
|
/**
|
|
18
57
|
* Gets info about system, node version and apify package version.
|
|
19
58
|
* @internal
|
|
@@ -55,7 +94,7 @@ export function checkCrawleeVersion() {
|
|
|
55
94
|
}
|
|
56
95
|
let version;
|
|
57
96
|
try {
|
|
58
|
-
version =
|
|
97
|
+
version = JSON.parse(readFileSync(path, 'utf8')).version;
|
|
59
98
|
}
|
|
60
99
|
catch {
|
|
61
100
|
//
|
|
@@ -67,17 +106,18 @@ export function checkCrawleeVersion() {
|
|
|
67
106
|
}
|
|
68
107
|
}
|
|
69
108
|
/**
|
|
70
|
-
*
|
|
71
|
-
* @ignore
|
|
109
|
+
* A FIFO mutex that a critical section may re-enter from a nested call without deadlocking.
|
|
72
110
|
*/
|
|
73
|
-
export
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
111
|
+
export class ReentrantAsyncLock {
|
|
112
|
+
#tail = Promise.resolve();
|
|
113
|
+
#held = new AsyncLocalStorage();
|
|
114
|
+
async runExclusive(fn) {
|
|
115
|
+
if (this.#held.getStore()) {
|
|
116
|
+
return await fn();
|
|
117
|
+
}
|
|
118
|
+
const run = this.#tail.then(async () => this.#held.run(true, fn));
|
|
119
|
+
// Keep the chain alive even when the critical section throws.
|
|
120
|
+
this.#tail = run.catch(() => { });
|
|
121
|
+
return await run;
|
|
122
|
+
}
|
|
82
123
|
}
|
|
83
|
-
//# sourceMappingURL=utils.js.map
|
package/package.json
CHANGED
|
@@ -1,75 +1,119 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "apify",
|
|
3
|
+
"version": "4.0.0-beta.120",
|
|
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
|
+
"engines": {
|
|
6
|
+
"node": ">=22.13.0"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"default": "./dist/index.js"
|
|
7
15
|
},
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"
|
|
75
|
-
|
|
16
|
+
"./package.json": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"apify",
|
|
20
|
+
"headless",
|
|
21
|
+
"chrome",
|
|
22
|
+
"puppeteer",
|
|
23
|
+
"crawler",
|
|
24
|
+
"scraper"
|
|
25
|
+
],
|
|
26
|
+
"author": {
|
|
27
|
+
"name": "Apify",
|
|
28
|
+
"email": "support@apify.com",
|
|
29
|
+
"url": "https://apify.com"
|
|
30
|
+
},
|
|
31
|
+
"contributors": [
|
|
32
|
+
"Jan Curn <jan@apify.com>",
|
|
33
|
+
"Marek Trunkat <marek@apify.com>",
|
|
34
|
+
"Ondra Urban <ondra@apify.com>"
|
|
35
|
+
],
|
|
36
|
+
"license": "Apache-2.0",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/apify/apify-sdk-js"
|
|
40
|
+
},
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "https://github.com/apify/apify-sdk-js/issues"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://docs.apify.com/sdk/js",
|
|
45
|
+
"files": [
|
|
46
|
+
"dist",
|
|
47
|
+
"!dist/tsconfig.build.tsbuildinfo"
|
|
48
|
+
],
|
|
49
|
+
"lint-staged": {
|
|
50
|
+
"*.{ts,mts,cts,js,mjs,cjs}": [
|
|
51
|
+
"oxfmt --write --no-error-on-unmatched-pattern",
|
|
52
|
+
"oxlint --type-aware --fix --no-error-on-unmatched-pattern"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"@apify/consts": "^3.1.0",
|
|
57
|
+
"@apify/datastructures": "^3.0.1",
|
|
58
|
+
"@apify/input_secrets": "^2.0.9",
|
|
59
|
+
"@apify/log": "^3.0.2",
|
|
60
|
+
"@apify/pseudo_url": "^3.0.2",
|
|
61
|
+
"@apify/timeout": "^1.0.1",
|
|
62
|
+
"@apify/utilities": "^3.1.1",
|
|
63
|
+
"@apify/validations": "^1.1.4",
|
|
64
|
+
"@crawlee/core": "4.0.0-rc.2",
|
|
65
|
+
"@crawlee/fs-storage": "4.0.0-rc.2",
|
|
66
|
+
"@crawlee/types": "4.0.0-rc.2",
|
|
67
|
+
"@crawlee/utils": "4.0.0-rc.2",
|
|
68
|
+
"apify-client": "^3.0.0-rc.1",
|
|
69
|
+
"minimatch": "^11.0.9",
|
|
70
|
+
"tslib": "^2.9.1",
|
|
71
|
+
"ws": "^8.23.0",
|
|
72
|
+
"zod": "^4.6.7"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@apify/oxlint-config": "^0.3.0",
|
|
76
|
+
"@apify/tsconfig": "^0.2.0",
|
|
77
|
+
"@commitlint/config-conventional": "^21.2.4",
|
|
78
|
+
"@playwright/browser-chromium": "^1.65.1",
|
|
79
|
+
"@types/node": "^26.6.6",
|
|
80
|
+
"@types/ws": "^8.18.2",
|
|
81
|
+
"commitlint": "^21.2.4",
|
|
82
|
+
"crawlee": "4.0.0-rc.2",
|
|
83
|
+
"husky": "^9.1.7",
|
|
84
|
+
"lint-staged": "^17.6.1",
|
|
85
|
+
"oxfmt": "0.79.0",
|
|
86
|
+
"oxlint": "1.94.0",
|
|
87
|
+
"oxlint-tsgolint": "7.0.2007",
|
|
88
|
+
"playwright": "^1.65.1",
|
|
89
|
+
"puppeteer": "^25.18.1",
|
|
90
|
+
"rimraf": "^6.1.4",
|
|
91
|
+
"tsx": "^4.23.15",
|
|
92
|
+
"typescript": "~7.0.2",
|
|
93
|
+
"vitest": "^5.1.1"
|
|
94
|
+
},
|
|
95
|
+
"devEngines": {
|
|
96
|
+
"packageManager": {
|
|
97
|
+
"name": "pnpm",
|
|
98
|
+
"version": "12.21.0",
|
|
99
|
+
"onFail": "warn"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"scripts": {
|
|
103
|
+
"clean": "rimraf ./dist ./tsconfig.build.tsbuildinfo",
|
|
104
|
+
"compile": "tsc -p tsconfig.build.json",
|
|
105
|
+
"fixApifyExport": "node ./scripts/temp_fix_apify_exports.mjs",
|
|
106
|
+
"build": "pnpm clean && pnpm compile && pnpm fixApifyExport",
|
|
107
|
+
"ci:build": "pnpm build",
|
|
108
|
+
"test": "vitest run --silent",
|
|
109
|
+
"test:e2e": "pnpm test:e2e:sdk",
|
|
110
|
+
"test:e2e:sdk": "pnpm test:e2e:sdk:tarball && node test/e2e/runSdkTests.mjs",
|
|
111
|
+
"test:e2e:sdk:tarball": "pnpm build && mv $(pnpm pack | tail -n 1) test/e2e/apify.tgz",
|
|
112
|
+
"tsc-check-tests": "tsc --noEmit --project test/tsconfig.json",
|
|
113
|
+
"coverage": "vitest --coverage",
|
|
114
|
+
"lint": "oxlint --type-aware",
|
|
115
|
+
"lint:fix": "oxlint --type-aware --fix",
|
|
116
|
+
"format": "oxfmt",
|
|
117
|
+
"format:check": "oxfmt --check"
|
|
118
|
+
}
|
|
119
|
+
}
|
package/.turbo/turbo-build.log
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> apify@3.4.2 build
|
|
3
|
-
> npm run clean && npm run compile && npm run copy && npm run fixApifyExport
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
> apify@3.4.2 clean
|
|
7
|
-
> rimraf ./dist
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
> apify@3.4.2 compile
|
|
11
|
-
> tsc -p tsconfig.build.json
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
> apify@3.4.2 copy
|
|
15
|
-
> tsx ../../scripts/copy.ts --readme=local
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
> apify@3.4.2 fixApifyExport
|
|
19
|
-
> node ../../scripts/temp_fix_apify_exports.mjs
|
|
20
|
-
|
|
21
|
-
Writing /home/runner/work/apify-sdk-js/apify-sdk-js/packages/apify/dist/actor.d.ts
|
|
22
|
-
Writing /home/runner/work/apify-sdk-js/apify-sdk-js/packages/apify/dist/actor.js
|
|
23
|
-
Writing /home/runner/work/apify-sdk-js/apify-sdk-js/packages/apify/dist/platform_event_manager.d.ts
|
|
24
|
-
Writing /home/runner/work/apify-sdk-js/apify-sdk-js/packages/apify/dist/platform_event_manager.js
|
|
25
|
-
Writing /home/runner/work/apify-sdk-js/apify-sdk-js/packages/apify/dist/proxy_configuration.d.ts
|
|
26
|
-
Writing /home/runner/work/apify-sdk-js/apify-sdk-js/packages/apify/dist/proxy_configuration.js
|
package/.turbo/turbo-copy.log
DELETED