From 392dcead139a7b92bdd094d2264dc330f7cb0555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Fri, 13 Mar 2026 18:36:47 +0100 Subject: [PATCH 01/27] feat: redesign Configuration class for v4 Refactor the SDK Configuration class to match the new crawlee core Configuration redesign: - Subclass core Configuration using `protected static override fields` - Direct property access (`config.token`) instead of `config.get('token')` - Immutable: values set via constructor, no `set()` method - Priority: constructor options > env vars > schema defaults - isAtHome conditional defaults moved into field definitions - Use serviceLocator instead of config.useStorageClient/getEventManager - Import z, coerceNumber, coerceBoolean from @crawlee/core (no direct zod dep) - Update all .get()/.set() call sites in actor.ts, charging.ts, etc. - Update tests to use property access Depends on crawlee PR: apify/crawlee#3474 Co-Authored-By: Claude Opus 4.6 --- packages/apify/src/actor.ts | 71 ++-- packages/apify/src/charging.ts | 13 +- packages/apify/src/configuration.ts | 395 ++++++++++--------- packages/apify/src/key_value_store.ts | 4 +- packages/apify/src/platform_event_manager.ts | 2 +- packages/apify/src/proxy_configuration.ts | 13 +- test/apify/actor.test.ts | 17 +- test/apify/events.test.ts | 2 +- 8 files changed, 268 insertions(+), 249 deletions(-) diff --git a/packages/apify/src/actor.ts b/packages/apify/src/actor.ts index 627cacaefb..c972ba8599 100644 --- a/packages/apify/src/actor.ts +++ b/packages/apify/src/actor.ts @@ -9,11 +9,11 @@ import type { UseStateOptions, } from '@crawlee/core'; import { - Configuration as CoreConfiguration, Dataset, EventType, purgeDefaultStorages, RequestQueue, + serviceLocator, StorageManager, } from '@crawlee/core'; import type { @@ -490,19 +490,19 @@ export class Actor { printOutdatedSdkWarning(); // reset global config instance to respect APIFY_ prefixed env vars - CoreConfiguration.globalConfig = Configuration.getGlobalConfig(); + serviceLocator.setConfiguration(Configuration.getGlobalConfig()); if (this.isAtHome()) { - this.config.set('availableMemoryRatio', 1); - this.config.set('disableBrowserSandbox', true); // for browser launcher, adds `--no-sandbox` to args - this.config.useStorageClient(this.apifyClient); - this.config.useEventManager(this.eventManager); + // availableMemoryRatio and disableBrowserSandbox are now set via + // conditional defaults in the Configuration constructor (isAtHome check) + serviceLocator.setStorageClient(this.apifyClient); + serviceLocator.setEventManager(this.eventManager); } else if (options.storage) { - this.config.useStorageClient(options.storage); + serviceLocator.setStorageClient(options.storage); } // Init the event manager the config uses - await this.config.getEventManager().init(); + await serviceLocator.getEventManager().init(); log.debug(`Events initialized`); await purgeDefaultStorages({ @@ -534,8 +534,8 @@ export class Actor { options.exit ??= true; options.exitCode ??= EXIT_CODES.SUCCESS; options.timeoutSecs ??= 30; - const client = this.config.getStorageClient(); - const events = this.config.getEventManager(); + const client = serviceLocator.getStorageClient(); + const events = serviceLocator.getEventManager(); // Close the event manager and emit the final PERSIST_STATE event await events.close(); @@ -601,14 +601,14 @@ export class Actor { * @ignore */ on(event: EventTypeName, listener: (...args: any[]) => any): void { - this.config.getEventManager().on(event, listener); + serviceLocator.getEventManager().on(event, listener); } /** * @ignore */ off(event: EventTypeName, listener?: (...args: any[]) => any): void { - this.config.getEventManager().off(event, listener); + serviceLocator.getEventManager().off(event, listener); } /** @@ -776,12 +776,10 @@ export class Actor { } const { - customAfterSleepMillis = this.config.get( - 'metamorphAfterSleepMillis', - ), + customAfterSleepMillis = this.config.metamorphAfterSleepMillis, ...metamorphOpts } = options; - const runId = this.config.get('actorRunId')!; + const runId = this.config.actorRunId!; await this.apifyClient .run(runId) .metamorph(targetActorId, input, metamorphOpts); @@ -815,27 +813,24 @@ export class Actor { this.isRebooting = true; // Waiting for all the listeners to finish, as `.reboot()` kills the container. + const eventManager = serviceLocator.getEventManager(); await Promise.all([ // `persistState` for individual RequestLists, RequestQueue... instances to be persisted - ...this.config - .getEventManager() + ...eventManager .listeners(EventType.PERSIST_STATE) - .map(async (x) => x()), + .map(async (x: (...args: any[]) => any) => x()), // `migrating` to pause Apify crawlers - ...this.config - .getEventManager() + ...eventManager .listeners(EventType.MIGRATING) - .map(async (x) => x()), + .map(async (x: (...args: any[]) => any) => x()), ]); - const runId = this.config.get('actorRunId')!; + const runId = this.config.actorRunId!; await this.apifyClient.run(runId).reboot(); // Wait some time for container to be stopped. const { - customAfterSleepMillis = this.config.get( - 'metamorphAfterSleepMillis', - ), + customAfterSleepMillis = this.config.metamorphAfterSleepMillis, } = options; await sleep(customAfterSleepMillis); } @@ -873,7 +868,7 @@ export class Actor { return undefined; } - const runId = this.config.get('actorRunId')!; + const runId = this.config.actorRunId!; if (!runId) { throw new Error( `Environment variable ${ACTOR_ENV_VARS.RUN_ID} is not set!`, @@ -924,7 +919,7 @@ export class Actor { break; } - const client = this.config.getStorageClient(); + const client = serviceLocator.getStorageClient(); // just to be sure, this should be fast await addTimeoutToPromise( @@ -937,7 +932,7 @@ export class Actor { 'Setting status message timed out after 1s', ).catch((e) => log.warning(e.message)); - const runId = this.config.get('actorRunId')!; + const runId = this.config.actorRunId!; if (runId) { // just to be sure, this should be fast @@ -1213,13 +1208,9 @@ export class Actor { async getInput(): Promise { this._ensureActorInit('getInput'); - const inputSecretsPrivateKeyFile = this.config.get( - 'inputSecretsPrivateKeyFile', - ); - const inputSecretsPrivateKeyPassphrase = this.config.get( - 'inputSecretsPrivateKeyPassphrase', - ); - const input = await this.getValue(this.config.get('inputKey')); + const {inputSecretsPrivateKeyFile} = this.config; + const {inputSecretsPrivateKeyPassphrase} = this.config; + const input = await this.getValue(this.config.inputKey); if ( ow.isValid(input, ow.object.nonEmpty) && inputSecretsPrivateKeyFile && @@ -1476,18 +1467,14 @@ export class Actor { * @ignore */ newClient(options: ApifyClientOptions = {}): ApifyClient { - const { storageDir, ...storageClientOptions } = this.config.get( - 'storageClientOptions', - ) as Dictionary; const { apifyVersion, crawleeVersion } = getSystemInfo(); return new ApifyClient({ - baseUrl: this.config.get('apiBaseUrl'), - token: this.config.get('token'), + baseUrl: this.config.apiBaseUrl, + token: this.config.token, userAgentSuffix: [ `SDK/${apifyVersion}`, `Crawlee/${crawleeVersion}`, ], - ...storageClientOptions, ...options, // allow overriding the instance configuration }); } diff --git a/packages/apify/src/charging.ts b/packages/apify/src/charging.ts index 5ac7777846..e6100f5652 100644 --- a/packages/apify/src/charging.ts +++ b/packages/apify/src/charging.ts @@ -87,12 +87,11 @@ export class ChargingManager { private apifyClient: ApifyClient; constructor(configuration: Configuration, apifyClient: ApifyClient) { - this.maxTotalChargeUsd = - configuration.get('maxTotalChargeUsd') || Infinity; // convert `0` to `Infinity` in case the value is an empty string - this.isAtHome = configuration.get('isAtHome'); - this.actorRunId = configuration.get('actorRunId'); - this.purgeChargingLogDataset = configuration.get('purgeOnStart'); - this.useChargingLogDataset = configuration.get('useChargingLogDataset'); + this.maxTotalChargeUsd = configuration.maxTotalChargeUsd || Infinity; // convert `0` to `Infinity` in case the value is an empty string + this.isAtHome = !!configuration.isAtHome; + this.actorRunId = configuration.actorRunId; + this.purgeChargingLogDataset = configuration.purgeOnStart; + this.useChargingLogDataset = configuration.useChargingLogDataset; if (this.useChargingLogDataset && this.isAtHome) { throw new Error( @@ -100,7 +99,7 @@ export class ChargingManager { ); } - if (configuration.get('testPayPerEvent')) { + if (configuration.testPayPerEvent) { if (this.isAtHome) { throw new Error( 'Using the ACTOR_TEST_PAY_PER_EVENT environment variable is only supported in a local development environment', diff --git a/packages/apify/src/configuration.ts b/packages/apify/src/configuration.ts index b8dfacd42c..932da5b94e 100644 --- a/packages/apify/src/configuration.ts +++ b/packages/apify/src/configuration.ts @@ -1,7 +1,16 @@ -import type { ConfigurationOptions as CoreConfigurationOptions } from '@crawlee/core'; -import { Configuration as CoreConfiguration } from '@crawlee/core'; +/* eslint-disable no-use-before-define */ +import { AsyncLocalStorage } from 'node:async_hooks'; + +import type { ConfigField, FieldsInput, FieldsOutput } from '@crawlee/core'; +import { + coerceBoolean, + coerceNumber, + Configuration as CoreConfiguration, + crawleeConfigFields, + field, + z, +} from '@crawlee/core'; -import type { META_ORIGINS } from '@apify/consts'; import { ACTOR_ENV_VARS, APIFY_ENV_VARS, @@ -9,37 +18,189 @@ import { LOCAL_APIFY_ENV_VARS, } from '@apify/consts'; -export interface ConfigurationOptions extends CoreConfigurationOptions { - metamorphAfterSleepMillis?: number; - actorEventsWsUrl?: string; - token?: string; - actorId?: string; - actorRunId?: string; - actorTaskId?: string; - apiBaseUrl?: string; - // apiBaseUrl is the internal API URL, accessible only within the platform(private network), - // while apiPublicBaseUrl is the public API URL, available externally(through internet). - apiPublicBaseUrl?: string; - containerPort?: number; - containerUrl?: string; - proxyHostname?: string; - proxyPassword?: string; - proxyPort?: number; - proxyStatusUrl?: string; - /** - * @deprecated use `containerPort` instead - */ - standbyPort?: number; - standbyUrl?: string; - isAtHome?: boolean; - userId?: string; - inputSecretsPrivateKeyPassphrase?: string; - inputSecretsPrivateKeyFile?: string; - maxTotalChargeUsd?: number; - metaOrigin?: (typeof META_ORIGINS)[keyof typeof META_ORIGINS]; - testPayPerEvent?: boolean; - useChargingLogDataset?: boolean; -} +// --- isAtHome check (simple env var presence) --- +const isAtHome = !!process.env[APIFY_ENV_VARS.IS_AT_HOME]; + +// --- Apify config field definitions --- + +export const apifyConfigFields = { + // Inherit all crawlee fields, overriding env vars where the SDK supports ACTOR_/APIFY_ aliases + ...crawleeConfigFields, + + // Override crawlee fields with ACTOR_/APIFY_ env var aliases + defaultDatasetId: field( + z + .string() + .default(LOCAL_ACTOR_ENV_VARS[ACTOR_ENV_VARS.DEFAULT_DATASET_ID]), + [ + ACTOR_ENV_VARS.DEFAULT_DATASET_ID, + 'APIFY_DEFAULT_DATASET_ID', + 'CRAWLEE_DEFAULT_DATASET_ID', + ], + ), + defaultKeyValueStoreId: field( + z + .string() + .default( + LOCAL_ACTOR_ENV_VARS[ACTOR_ENV_VARS.DEFAULT_KEY_VALUE_STORE_ID], + ), + [ + ACTOR_ENV_VARS.DEFAULT_KEY_VALUE_STORE_ID, + 'APIFY_DEFAULT_KEY_VALUE_STORE_ID', + 'CRAWLEE_DEFAULT_KEY_VALUE_STORE_ID', + ], + ), + defaultRequestQueueId: field( + z + .string() + .default( + LOCAL_ACTOR_ENV_VARS[ACTOR_ENV_VARS.DEFAULT_REQUEST_QUEUE_ID], + ), + [ + ACTOR_ENV_VARS.DEFAULT_REQUEST_QUEUE_ID, + 'APIFY_DEFAULT_REQUEST_QUEUE_ID', + 'CRAWLEE_DEFAULT_REQUEST_QUEUE_ID', + ], + ), + inputKey: field(z.string().default('INPUT'), [ + ACTOR_ENV_VARS.INPUT_KEY, + 'APIFY_INPUT_KEY', + 'CRAWLEE_INPUT_KEY', + ]), + memoryMbytes: field(coerceNumber.optional(), [ + ACTOR_ENV_VARS.MEMORY_MBYTES, + 'APIFY_MEMORY_MBYTES', + 'CRAWLEE_MEMORY_MBYTES', + ]), + availableMemoryRatio: field(coerceNumber.default(isAtHome ? 1 : 0.25), [ + 'CRAWLEE_AVAILABLE_MEMORY_RATIO', + 'APIFY_AVAILABLE_MEMORY_RATIO', + ]), + disableBrowserSandbox: field( + isAtHome ? coerceBoolean.default(true) : coerceBoolean.optional(), + ['CRAWLEE_DISABLE_BROWSER_SANDBOX', 'APIFY_DISABLE_BROWSER_SANDBOX'], + ), + persistStateIntervalMillis: field(coerceNumber.default(60_000), [ + 'CRAWLEE_PERSIST_STATE_INTERVAL_MILLIS', + 'APIFY_PERSIST_STATE_INTERVAL_MILLIS', + 'APIFY_TEST_PERSIST_INTERVAL_MILLIS', + ]), + headless: field(coerceBoolean.default(true), [ + 'CRAWLEE_HEADLESS', + 'APIFY_HEADLESS', + ]), + xvfb: field(coerceBoolean.default(false), ['CRAWLEE_XVFB', 'APIFY_XVFB']), + chromeExecutablePath: field(z.string().optional(), [ + 'CRAWLEE_CHROME_EXECUTABLE_PATH', + 'APIFY_CHROME_EXECUTABLE_PATH', + ]), + defaultBrowserPath: field(z.string().optional(), [ + 'CRAWLEE_DEFAULT_BROWSER_PATH', + 'APIFY_DEFAULT_BROWSER_PATH', + ]), + purgeOnStart: field(coerceBoolean.default(true), [ + 'CRAWLEE_PURGE_ON_START', + 'APIFY_PURGE_ON_START', + ]), + + // Apify-specific fields + metamorphAfterSleepMillis: field( + coerceNumber.default(300_000), + 'APIFY_METAMORPH_AFTER_SLEEP_MILLIS', + ), + actorEventsWsUrl: field(z.string().optional(), [ + ACTOR_ENV_VARS.EVENTS_WEBSOCKET_URL, + 'APIFY_ACTOR_EVENTS_WS_URL', + ]), + token: field(z.string().optional(), 'APIFY_TOKEN'), + actorId: field(z.string().optional(), [ + ACTOR_ENV_VARS.ID, + 'APIFY_ACTOR_ID', + ]), + actorRunId: field(z.string().optional(), [ + ACTOR_ENV_VARS.RUN_ID, + 'APIFY_ACTOR_RUN_ID', + ]), + actorTaskId: field(z.string().optional(), [ + ACTOR_ENV_VARS.TASK_ID, + 'APIFY_ACTOR_TASK_ID', + ]), + apiBaseUrl: field( + z.string().default('https://api.apify.com'), + 'APIFY_API_BASE_URL', + ), + apiPublicBaseUrl: field( + z.string().default('https://api.apify.com'), + 'APIFY_API_PUBLIC_BASE_URL', + ), + containerPort: field( + coerceNumber.default( + +LOCAL_ACTOR_ENV_VARS[ACTOR_ENV_VARS.WEB_SERVER_PORT], + ), + [ACTOR_ENV_VARS.WEB_SERVER_PORT, 'APIFY_CONTAINER_PORT'], + ), + containerUrl: field( + z.string().default(LOCAL_ACTOR_ENV_VARS[ACTOR_ENV_VARS.WEB_SERVER_URL]), + [ACTOR_ENV_VARS.WEB_SERVER_URL, 'APIFY_CONTAINER_URL'], + ), + proxyHostname: field( + z.string().default(LOCAL_APIFY_ENV_VARS[APIFY_ENV_VARS.PROXY_HOSTNAME]), + 'APIFY_PROXY_HOSTNAME', + ), + proxyPassword: field(z.string().optional(), 'APIFY_PROXY_PASSWORD'), + proxyPort: field( + coerceNumber.default(+LOCAL_APIFY_ENV_VARS[APIFY_ENV_VARS.PROXY_PORT]), + 'APIFY_PROXY_PORT', + ), + proxyStatusUrl: field( + z.string().default('http://proxy.apify.com'), + 'APIFY_PROXY_STATUS_URL', + ), + /** @deprecated use `containerPort` instead */ + standbyPort: field( + coerceNumber.default( + +LOCAL_ACTOR_ENV_VARS[ACTOR_ENV_VARS.STANDBY_PORT], + ), + ACTOR_ENV_VARS.STANDBY_PORT, + ), + standbyUrl: field(z.string().optional(), ACTOR_ENV_VARS.STANDBY_URL), + isAtHome: field(coerceBoolean.optional(), 'APIFY_IS_AT_HOME'), + userId: field(z.string().optional(), 'APIFY_USER_ID'), + inputSecretsPrivateKeyPassphrase: field( + z.string().optional(), + 'APIFY_INPUT_SECRETS_PRIVATE_KEY_PASSPHRASE', + ), + inputSecretsPrivateKeyFile: field( + z.string().optional(), + 'APIFY_INPUT_SECRETS_PRIVATE_KEY_FILE', + ), + maxTotalChargeUsd: field( + coerceNumber.optional(), + ACTOR_ENV_VARS.MAX_TOTAL_CHARGE_USD, + ), + metaOrigin: field(z.string().optional(), 'APIFY_META_ORIGIN'), + testPayPerEvent: field( + coerceBoolean.default(false), + 'ACTOR_TEST_PAY_PER_EVENT', + ), + useChargingLogDataset: field( + coerceBoolean.default(false), + 'ACTOR_USE_CHARGING_LOG_DATASET', + ), +}; + +// --- Type utilities --- + +export type ApifyConfigurationInput = FieldsInput; +export type ApifyResolvedConfigValues = FieldsOutput; + +/** @deprecated Use {@link ApifyConfigurationInput} instead. */ +export type ConfigurationOptions = ApifyConfigurationInput; + +// --- Configuration class --- + +// eslint-disable-next-line @typescript-eslint/no-empty-object-type, @typescript-eslint/no-unsafe-declaration-merging +export interface Configuration extends ApifyResolvedConfigValues {} /** * `Configuration` is a value object holding the SDK configuration. We can use it in two ways: @@ -48,38 +209,34 @@ export interface ConfigurationOptions extends CoreConfigurationOptions { * * ```javascript * import { Actor } from 'apify'; - * import { BasicCrawler } from 'crawlee'; * * const sdk = new Actor({ token: '123' }); - * console.log(sdk.config.get('token')); // '123' - * - * const crawler = new BasicCrawler({ - * // ... crawler options - * }, sdk.config); + * console.log(sdk.config.token); // '123' * ``` * * 2. To get the global configuration (singleton instance). It will respect the environment variables. * * ```javascript - * import { BasicCrawler, Configuration } from 'crawlee'; + * import { Configuration } from 'apify'; * - * // Get the global configuration * const config = Configuration.getGlobalConfig(); - * // Set the 'persistStateIntervalMillis' option - * // of global configuration to 30 seconds - * config.set('persistStateIntervalMillis', 30_000); - * - * // No need to pass the configuration to the crawler, - * // as it's using the global configuration by default - * const crawler = new BasicCrawler(); + * console.log(config.headless); + * console.log(config.persistStateIntervalMillis); * ``` * + * Configuration is immutable — values are set via the constructor and cannot be changed afterwards. + * The priority order for resolving values is (highest to lowest): + * + * ```text + * constructor options > environment variables > crawlee.json > schema defaults + * ``` + * * ## Supported Configuration Options * * Key | Environment Variable | Default Value * ---|---|--- * `memoryMbytes` | `ACTOR_MEMORY_MBYTES` | - - * `headless` | `APIFY_HEADLESS` | - + * `headless` | `APIFY_HEADLESS` | `true` * `persistStateIntervalMillis` | `APIFY_PERSIST_STATE_INTERVAL_MILLIS` | `60e3` * `token` | `APIFY_TOKEN` | - * `isAtHome` | `APIFY_IS_AT_HOME` | - @@ -112,127 +269,16 @@ export interface ConfigurationOptions extends CoreConfigurationOptions { * `chromeExecutablePath` | `APIFY_CHROME_EXECUTABLE_PATH` | - * `defaultBrowserPath` | `APIFY_DEFAULT_BROWSER_PATH` | - */ +// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging export class Configuration extends CoreConfiguration { - /** @inheritDoc */ - // eslint-disable-next-line no-use-before-define -- Self-reference - static override globalConfig?: Configuration; - - // maps environment variables to config keys (e.g. `APIFY_MEMORY_MBYTES` to `memoryMbytes`) - protected static override ENV_MAP = { - // regular crawlee env vars are also supported - ...CoreConfiguration.ENV_MAP, - - // support crawlee env vars prefixed with `APIFY_` too - APIFY_AVAILABLE_MEMORY_RATIO: 'availableMemoryRatio', - APIFY_PURGE_ON_START: 'purgeOnStart', - APIFY_MEMORY_MBYTES: 'memoryMbytes', - APIFY_DEFAULT_DATASET_ID: 'defaultDatasetId', - APIFY_DEFAULT_KEY_VALUE_STORE_ID: 'defaultKeyValueStoreId', - APIFY_DEFAULT_REQUEST_QUEUE_ID: 'defaultRequestQueueId', - APIFY_INPUT_KEY: 'inputKey', - APIFY_PERSIST_STATE_INTERVAL_MILLIS: 'persistStateIntervalMillis', - APIFY_HEADLESS: 'headless', - APIFY_XVFB: 'xvfb', - APIFY_CHROME_EXECUTABLE_PATH: 'chromeExecutablePath', - APIFY_DEFAULT_BROWSER_PATH: 'defaultBrowserPath', - APIFY_DISABLE_BROWSER_SANDBOX: 'disableBrowserSandbox', - - // as well as apify specific ones - APIFY_TOKEN: 'token', - APIFY_METAMORPH_AFTER_SLEEP_MILLIS: 'metamorphAfterSleepMillis', - APIFY_TEST_PERSIST_INTERVAL_MILLIS: 'persistStateIntervalMillis', // for BC, seems to be unused - APIFY_ACTOR_EVENTS_WS_URL: 'actorEventsWsUrl', - APIFY_ACTOR_ID: 'actorId', - APIFY_API_BASE_URL: 'apiBaseUrl', - APIFY_API_PUBLIC_BASE_URL: 'apiPublicBaseUrl', - APIFY_IS_AT_HOME: 'isAtHome', - APIFY_ACTOR_RUN_ID: 'actorRunId', - APIFY_ACTOR_TASK_ID: 'actorTaskId', - APIFY_CONTAINER_PORT: 'containerPort', - APIFY_CONTAINER_URL: 'containerUrl', - APIFY_USER_ID: 'userId', - APIFY_PROXY_HOSTNAME: 'proxyHostname', - APIFY_PROXY_PASSWORD: 'proxyPassword', - APIFY_PROXY_STATUS_URL: 'proxyStatusUrl', - APIFY_PROXY_PORT: 'proxyPort', - APIFY_INPUT_SECRETS_PRIVATE_KEY_FILE: 'inputSecretsPrivateKeyFile', - APIFY_INPUT_SECRETS_PRIVATE_KEY_PASSPHRASE: - 'inputSecretsPrivateKeyPassphrase', - APIFY_META_ORIGIN: 'metaOrigin', - - // Actor env vars - ACTOR_DEFAULT_DATASET_ID: 'defaultDatasetId', - ACTOR_DEFAULT_KEY_VALUE_STORE_ID: 'defaultKeyValueStoreId', - ACTOR_DEFAULT_REQUEST_QUEUE_ID: 'defaultRequestQueueId', - ACTOR_EVENTS_WEBSOCKET_URL: 'actorEventsWsUrl', - ACTOR_ID: 'actorId', - ACTOR_INPUT_KEY: 'inputKey', - ACTOR_MEMORY_MBYTES: 'memoryMbytes', - ACTOR_RUN_ID: 'actorRunId', - ACTOR_STANDBY_PORT: 'standbyPort', - ACTOR_STANDBY_URL: 'standbyUrl', - ACTOR_TASK_ID: 'actorTaskId', - ACTOR_WEB_SERVER_PORT: 'containerPort', - ACTOR_WEB_SERVER_URL: 'containerUrl', - ACTOR_MAX_TOTAL_CHARGE_USD: 'maxTotalChargeUsd', - ACTOR_TEST_PAY_PER_EVENT: 'testPayPerEvent', - ACTOR_USE_CHARGING_LOG_DATASET: 'useChargingLogDataset', - }; + /** @internal */ + static storage = new AsyncLocalStorage(); - protected static override INTEGER_VARS = [ - ...CoreConfiguration.INTEGER_VARS, - 'proxyPort', - 'containerPort', - 'metamorphAfterSleepMillis', - 'maxTotalChargeUsd', - ]; + /** @internal */ + static globalConfig?: Configuration; - protected static override BOOLEAN_VARS = [ - ...CoreConfiguration.BOOLEAN_VARS, - 'isAtHome', - 'testPayPerEvent', - 'useChargingLogDataset', - ]; - - protected static override DEFAULTS = { - ...CoreConfiguration.DEFAULTS, - defaultKeyValueStoreId: - LOCAL_ACTOR_ENV_VARS[ACTOR_ENV_VARS.DEFAULT_KEY_VALUE_STORE_ID], - defaultDatasetId: - LOCAL_ACTOR_ENV_VARS[ACTOR_ENV_VARS.DEFAULT_DATASET_ID], - defaultRequestQueueId: - LOCAL_ACTOR_ENV_VARS[ACTOR_ENV_VARS.DEFAULT_REQUEST_QUEUE_ID], - inputKey: 'INPUT', - apiBaseUrl: 'https://api.apify.com', - apiPublicBaseUrl: 'https://api.apify.com', - proxyStatusUrl: 'http://proxy.apify.com', - proxyHostname: LOCAL_APIFY_ENV_VARS[APIFY_ENV_VARS.PROXY_HOSTNAME], - proxyPort: +LOCAL_APIFY_ENV_VARS[APIFY_ENV_VARS.PROXY_PORT], - containerPort: +LOCAL_ACTOR_ENV_VARS[ACTOR_ENV_VARS.WEB_SERVER_PORT], - containerUrl: LOCAL_ACTOR_ENV_VARS[ACTOR_ENV_VARS.WEB_SERVER_URL], - standbyPort: +LOCAL_ACTOR_ENV_VARS[ACTOR_ENV_VARS.STANDBY_PORT], - metamorphAfterSleepMillis: 300e3, - persistStateIntervalMillis: 60e3, // This value is mentioned in jsdoc in `events.js`, if you update it here, update it there too. - testPayPerEvent: false, - useChargingLogDataset: false, - }; - - /** - * @inheritDoc - */ - override get< - T extends keyof ConfigurationOptions, - U extends ConfigurationOptions[T], - >(key: T, defaultValue?: U): U { - return super.get(key as keyof CoreConfigurationOptions, defaultValue); - } - - /** - * @inheritDoc - */ - override set(key: keyof ConfigurationOptions, value?: any) { - super.set(key as keyof CoreConfigurationOptions, value); - } + protected static override fields: Record = + apifyConfigFields; /** * @inheritDoc @@ -250,18 +296,7 @@ export class Configuration extends CoreConfiguration { * Resets global configuration instance. The default instance holds configuration based on env vars, * if we want to change them, we need to first reset the global state. Used mainly for testing purposes. */ - static override resetGlobalState(): void { + static resetGlobalState(): void { delete this.globalConfig; } } - -// monkey patch the core class so it respects the new options too -CoreConfiguration.getGlobalConfig = Configuration.getGlobalConfig; -// @ts-expect-error protected property -CoreConfiguration.ENV_MAP = Configuration.ENV_MAP; -// @ts-expect-error protected property -CoreConfiguration.INTEGER_VARS = Configuration.INTEGER_VARS; -// @ts-expect-error protected property -CoreConfiguration.BOOLEAN_VARS = Configuration.BOOLEAN_VARS; -// @ts-expect-error protected property -CoreConfiguration.DEFAULTS = Configuration.DEFAULTS; diff --git a/packages/apify/src/key_value_store.ts b/packages/apify/src/key_value_store.ts index 89f2138d2c..a26a12e8f1 100644 --- a/packages/apify/src/key_value_store.ts +++ b/packages/apify/src/key_value_store.ts @@ -18,12 +18,12 @@ export class KeyValueStore extends CoreKeyValueStore { */ override getPublicUrl(key: string): string { const config = this.config as Configuration; - if (!config.get('isAtHome') && getPublicUrl) { + if (!config.isAtHome && getPublicUrl) { return getPublicUrl.call(this, key); } const publicUrl = new URL( - `${config.get('apiPublicBaseUrl')}/v2/key-value-stores/${this.id}/records/${key}`, + `${config.apiPublicBaseUrl}/v2/key-value-stores/${this.id}/records/${key}`, ); if (this.storageObject?.urlSigningSecretKey) { diff --git a/packages/apify/src/platform_event_manager.ts b/packages/apify/src/platform_event_manager.ts index a71c5ee68e..4385eebd60 100644 --- a/packages/apify/src/platform_event_manager.ts +++ b/packages/apify/src/platform_event_manager.ts @@ -62,7 +62,7 @@ export class PlatformEventManager extends EventManager { } await super.init(); - const eventsWsUrl = this.config.get('actorEventsWsUrl'); + const eventsWsUrl = (this.config as Configuration).actorEventsWsUrl; // Locally there is no web socket to connect, so just print a log message. if (!eventsWsUrl) { diff --git a/packages/apify/src/proxy_configuration.ts b/packages/apify/src/proxy_configuration.ts index 569ea84ae3..0d452ab645 100644 --- a/packages/apify/src/proxy_configuration.ts +++ b/packages/apify/src/proxy_configuration.ts @@ -205,7 +205,7 @@ export class ProxyConfiguration extends CoreProxyConfiguration { apifyProxyGroups = [], countryCode, apifyProxyCountry, - password = config.get('proxyPassword'), + password = config.proxyPassword, tieredProxyConfig, tieredProxyUrls, } = options; @@ -221,8 +221,8 @@ export class ProxyConfiguration extends CoreProxyConfiguration { const groupsToUse = groups.length ? groups : apifyProxyGroups; const countryCodeToUse = countryCode || apifyProxyCountry; - const hostname = config.get('proxyHostname'); - const port = config.get('proxyPort'); + const hostname = config.proxyHostname; + const port = config.proxyPort; // Validation if ( @@ -438,7 +438,7 @@ export class ProxyConfiguration extends CoreProxyConfiguration { */ // TODO: Make this private protected async _setPasswordIfToken(): Promise { - const token = this.config.get('token'); + const {token} = (this.config as Configuration); if (!token) return; try { @@ -500,10 +500,7 @@ export class ProxyConfiguration extends CoreProxyConfiguration { } | undefined > { - const proxyStatusUrl = this.config.get( - 'proxyStatusUrl', - 'http://proxy.apify.com', - ); + const {proxyStatusUrl} = (this.config as Configuration); const requestOpts = { url: `${proxyStatusUrl}/?format=json`, proxyUrl: await this.newUrl(), diff --git a/test/apify/actor.test.ts b/test/apify/actor.test.ts index 47565929ff..2687b1a476 100644 --- a/test/apify/actor.test.ts +++ b/test/apify/actor.test.ts @@ -705,13 +705,14 @@ describe('Actor', () => { expect(getValueSpy).toBeCalledWith(KEY_VALUE_STORE_KEYS.INPUT); expect(val1).toBe(123); - // Uses value from config - sdk.config.set('inputKey', 'some-value'); - const val2 = await sdk.getInput(); - expect(getValueSpy).toBeCalledTimes(2); - expect(getValueSpy).toBeCalledWith('some-value'); + // Uses value from config - create a new Actor with custom inputKey + const sdk2 = new Actor({ inputKey: 'some-value' }); + const getValueSpy2 = vitest.spyOn(sdk2 as any, 'getValue'); + getValueSpy2.mockImplementation(async () => 123); + const val2 = await sdk2.getInput(); + expect(getValueSpy2).toBeCalledTimes(1); + expect(getValueSpy2).toBeCalledWith('some-value'); expect(val2).toBe(123); - sdk.config.set('inputKey', undefined); // restore defaults }); test('setValue()', async () => { @@ -1285,14 +1286,14 @@ describe('Actor', () => { test('should work', async () => { await Actor.init(); process.env.ACTOR_MAX_TOTAL_CHARGE_USD = ''; - expect(Actor.config.get('maxTotalChargeUsd')).toBe(0); + expect(Actor.config.maxTotalChargeUsd).toBe(0); expect(Actor.getChargingManager().getMaxTotalChargeUsd()).toBe( Infinity, ); // the value in charging manager is cached, so we cant test that here process.env.ACTOR_MAX_TOTAL_CHARGE_USD = '123'; - expect(Actor.config.get('maxTotalChargeUsd')).toBe(123); + expect(Actor.config.maxTotalChargeUsd).toBe(123); await Actor.exit({ exit: false }); }); }); diff --git a/test/apify/events.test.ts b/test/apify/events.test.ts index cb7804fbb7..d6ec40d3ec 100644 --- a/test/apify/events.test.ts +++ b/test/apify/events.test.ts @@ -130,7 +130,7 @@ describe('events', () => { test('should send persist state events in regular interval', async () => { const eventsReceived = []; - const interval = config.get('persistStateIntervalMillis')!; + const interval = config.persistStateIntervalMillis; events.on(EventType.PERSIST_STATE, (data) => eventsReceived.push(data)); await events.init(); From 18a23d940601c963bc7a6ef3759941b15aa88c91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Wed, 25 Mar 2026 08:58:06 +0100 Subject: [PATCH 02/27] fix: update configuration integration for crawlee Configuration redesign - Import `z` from `zod` directly (no longer re-exported from crawlee core) - Define `coerceNumber` locally (no longer exported from crawlee core) - Add constructor override to accept `ApifyConfigurationInput` - Import `ConfigurationOptions` from SDK configuration instead of core - Fix test that mutated env vars after init (immutable config) Depends on: apify/crawlee#3080 Co-Authored-By: Claude Opus 4.6 (1M context) --- package-lock.json | 4 ++-- packages/apify/package.json | 3 ++- packages/apify/src/actor.ts | 6 +++--- packages/apify/src/configuration.ts | 12 ++++++++++-- test/apify/actor.test.ts | 13 +++++++------ 5 files changed, 24 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1b05834ad6..1f4a8a966c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20046,7 +20046,6 @@ "version": "3.25.28", "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.28.tgz", "integrity": "sha512-/nt/67WYKnr5by3YS7LroZJbtcCBurDKKPBPWWzaxvVCGuG/NOsiKkrjoOhI8mJ+SQUXEbUzeB3S+6XDUEEj7Q==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" @@ -20195,7 +20194,8 @@ "ow": "^2.0.0", "semver": "^7.7.2", "tslib": "^2.8.1", - "ws": "^8.18.2" + "ws": "^8.18.2", + "zod": "^3.24.0 || ^4.0.0" }, "engines": { "node": ">=22.0.0" diff --git a/packages/apify/package.json b/packages/apify/package.json index f3ddcf0be1..ebb8146b6d 100644 --- a/packages/apify/package.json +++ b/packages/apify/package.json @@ -62,6 +62,7 @@ "ow": "^2.0.0", "semver": "^7.7.2", "tslib": "^2.8.1", - "ws": "^8.18.2" + "ws": "^8.18.2", + "zod": "^3.24.0 || ^4.0.0" } } diff --git a/packages/apify/src/actor.ts b/packages/apify/src/actor.ts index c972ba8599..86fd1b9dce 100644 --- a/packages/apify/src/actor.ts +++ b/packages/apify/src/actor.ts @@ -1,7 +1,6 @@ import { createPrivateKey } from 'node:crypto'; import type { - ConfigurationOptions, EventManager, EventTypeName, IStorage, @@ -46,6 +45,7 @@ import { addTimeoutToPromise } from '@apify/timeout'; import type { ChargeOptions, ChargeResult } from './charging.js'; import { ChargingManager } from './charging.js'; +import type { ConfigurationOptions } from './configuration.js'; import { Configuration } from './configuration.js'; import { KeyValueStore } from './key_value_store.js'; import { PlatformEventManager } from './platform_event_manager.js'; @@ -1208,8 +1208,8 @@ export class Actor { async getInput(): Promise { this._ensureActorInit('getInput'); - const {inputSecretsPrivateKeyFile} = this.config; - const {inputSecretsPrivateKeyPassphrase} = this.config; + const { inputSecretsPrivateKeyFile } = this.config; + const { inputSecretsPrivateKeyPassphrase } = this.config; const input = await this.getValue(this.config.inputKey); if ( ow.isValid(input, ow.object.nonEmpty) && diff --git a/packages/apify/src/configuration.ts b/packages/apify/src/configuration.ts index 932da5b94e..4228f5d93b 100644 --- a/packages/apify/src/configuration.ts +++ b/packages/apify/src/configuration.ts @@ -4,12 +4,11 @@ import { AsyncLocalStorage } from 'node:async_hooks'; import type { ConfigField, FieldsInput, FieldsOutput } from '@crawlee/core'; import { coerceBoolean, - coerceNumber, Configuration as CoreConfiguration, crawleeConfigFields, field, - z, } from '@crawlee/core'; +import { z } from 'zod'; import { ACTOR_ENV_VARS, @@ -18,6 +17,11 @@ import { LOCAL_APIFY_ENV_VARS, } from '@apify/consts'; +const coerceNumber = z.preprocess((val) => { + if (typeof val === 'string') return Number(val); + return val; +}, z.number()); + // --- isAtHome check (simple env var presence) --- const isAtHome = !!process.env[APIFY_ENV_VARS.IS_AT_HOME]; @@ -280,6 +284,10 @@ export class Configuration extends CoreConfiguration { protected static override fields: Record = apifyConfigFields; + constructor(options: ApifyConfigurationInput = {}) { + super(options as any); + } + /** * @inheritDoc */ diff --git a/test/apify/actor.test.ts b/test/apify/actor.test.ts index 2687b1a476..f1b88fc281 100644 --- a/test/apify/actor.test.ts +++ b/test/apify/actor.test.ts @@ -1283,18 +1283,19 @@ describe('Actor', () => { }); describe('Actor.config and PPE', () => { - test('should work', async () => { - await Actor.init(); + test('empty string maxTotalChargeUsd coerces to 0, charging manager treats as Infinity', async () => { process.env.ACTOR_MAX_TOTAL_CHARGE_USD = ''; + await Actor.init(); expect(Actor.config.maxTotalChargeUsd).toBe(0); expect(Actor.getChargingManager().getMaxTotalChargeUsd()).toBe( Infinity, ); - - // the value in charging manager is cached, so we cant test that here - process.env.ACTOR_MAX_TOTAL_CHARGE_USD = '123'; - expect(Actor.config.maxTotalChargeUsd).toBe(123); await Actor.exit({ exit: false }); }); + + test('numeric maxTotalChargeUsd is correctly resolved from constructor options', () => { + const sdk = new Actor({ maxTotalChargeUsd: 123 }); + expect(sdk.config.maxTotalChargeUsd).toBe(123); + }); }); }); From 4f7f6f9fcbcb445921d3c46c8cb7589c73393358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Mon, 20 Apr 2026 16:23:32 +0200 Subject: [PATCH 03/27] fix: preserve storageClientOptions pass-through in Actor.newClient Restore the destructuring of `storageDir` and spread of remaining `storageClientOptions` into the `ApifyClient` constructor so that arbitrary client options configured via `storageClientOptions` continue to reach the client. Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/apify/src/actor.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/apify/src/actor.ts b/packages/apify/src/actor.ts index 86fd1b9dce..f75a3a64fd 100644 --- a/packages/apify/src/actor.ts +++ b/packages/apify/src/actor.ts @@ -1467,6 +1467,9 @@ export class Actor { * @ignore */ newClient(options: ApifyClientOptions = {}): ApifyClient { + const { storageDir, ...storageClientOptions } = (this.config.get( + 'storageClientOptions', + ) ?? {}) as Dictionary; const { apifyVersion, crawleeVersion } = getSystemInfo(); return new ApifyClient({ baseUrl: this.config.apiBaseUrl, @@ -1475,6 +1478,7 @@ export class Actor { `SDK/${apifyVersion}`, `Crawlee/${crawleeVersion}`, ], + ...storageClientOptions, ...options, // allow overriding the instance configuration }); } From b6c34ea472b324cfc49f74dc7479a19a1b2841a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Thu, 30 Apr 2026 17:47:39 +0200 Subject: [PATCH 04/27] chore: bump crawlee to ^4.0.0-beta.49 and finish config-redesign integration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Reuse `coerceNumber` from `@crawlee/core` instead of defining a local copy; otherwise `FieldsOutput` produces a structurally distinct (but equivalent) `availableMemoryRatio` type that breaks declaration-merging with crawlee's `Configuration`. - Drop the dead `storageClientOptions`/`storageDir` destructuring in `Actor.newClient()` — neither key exists in the redesigned Configuration; `options` already covers the override path. The remaining build errors (proxy/storage/event drift) are unrelated to the config redesign and tracked in separate follow-up PRs against the v4 branch. --- package-lock.json | 1837 ++++++++++++++++----------- package.json | 8 +- packages/apify/package.json | 6 +- packages/apify/src/actor.ts | 4 - packages/apify/src/configuration.ts | 6 +- 5 files changed, 1125 insertions(+), 736 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1f4a8a966c..8923e74741 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,9 +16,9 @@ "@apify/input_secrets": "^1.1.72", "@apify/tsconfig": "^0.1.1", "@commitlint/config-conventional": "^19.8.1", - "@crawlee/core": "^4.0.0-beta.0", - "@crawlee/types": "^4.0.0-beta.0", - "@crawlee/utils": "^4.0.0-beta.0", + "@crawlee/core": "^4.0.0-beta.49", + "@crawlee/types": "^4.0.0-beta.49", + "@crawlee/utils": "^4.0.0-beta.49", "@playwright/browser-chromium": "^1.52.0", "@types/content-type": "^1.1.8", "@types/fs-extra": "^11.0.4", @@ -27,7 +27,7 @@ "@types/tough-cookie": "^4.0.5", "@types/ws": "^8.18.1", "commitlint": "^19.8.1", - "crawlee": "^4.0.0-beta.0", + "crawlee": "^4.0.0-beta.49", "eslint": "^9.27.0", "eslint-config-prettier": "^10.1.5", "fs-extra": "^11.3.0", @@ -194,6 +194,16 @@ "node": ">=6.9.0" } }, + "node_modules/@borewit/text-codec": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@borewit/text-codec/-/text-codec-0.2.2.tgz", + "integrity": "sha512-DDaRehssg1aNrH4+2hnj1B7vnUGEjU6OIlyRdkMd0aUdIUvKXrJfXsy8LVtXAy7DRvYVluWbMspsRhz2lcW0mQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, "node_modules/@commitlint/cli": { "version": "19.8.1", "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-19.8.1.tgz", @@ -464,19 +474,106 @@ "node": ">=v18" } }, + "node_modules/@crawlee/cheerio": { + "version": "4.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@crawlee/cheerio/-/cheerio-4.0.0-beta.49.tgz", + "integrity": "sha512-WYFTBQE+7Rzg/cb0OxeOx7yF/IgZTHZLsT0HQEA1yV/0YWuxUFFydJeUDYFhkP3xyzutuOR81sPYkI5xAf/qrQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@crawlee/http": "4.0.0-beta.49", + "@crawlee/types": "4.0.0-beta.49", + "@crawlee/utils": "4.0.0-beta.49", + "cheerio": "^1.0.0", + "htmlparser2": "^10.0.0", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=22.0.0" + } + }, + "node_modules/@crawlee/cheerio/node_modules/cheerio": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.2.0.tgz", + "integrity": "sha512-WDrybc/gKFpTYQutKIK6UvfcuxijIZfMfXaYm8NMsPQxSYvf+13fXUJ4rztGGbJcBQ/GF55gvrZ0Bc0bj/mqvg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.2", + "encoding-sniffer": "^0.2.1", + "htmlparser2": "^10.1.0", + "parse5": "^7.3.0", + "parse5-htmlparser2-tree-adapter": "^7.1.0", + "parse5-parser-stream": "^7.1.2", + "undici": "^7.19.0", + "whatwg-mimetype": "^4.0.0" + }, + "engines": { + "node": ">=20.18.1" + }, + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + } + }, + "node_modules/@crawlee/cheerio/node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/@crawlee/cheerio/node_modules/htmlparser2": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.1.0.tgz", + "integrity": "sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==", + "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.2", + "entities": "^7.0.1" + } + }, + "node_modules/@crawlee/cheerio/node_modules/undici": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.25.0.tgz", + "integrity": "sha512-xXnp4kTyor2Zq+J1FfPI6Eq3ew5h6Vl0F/8d9XU5zZQf1tX9s2Su1/3PiMmUANFULpmksxkClamIZcaUqryHsQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.18.1" + } + }, "node_modules/@crawlee/cli": { - "version": "4.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@crawlee/cli/-/cli-4.0.0-beta.4.tgz", - "integrity": "sha512-IgjQTitc09MM9FIiMAzX5Xx9/6AwevvBVqbyoRMsnJqA1/sPF1Xr7I7I8ImsneZTOjEfEBEq4FycNaOUaUD2PQ==", + "version": "4.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@crawlee/cli/-/cli-4.0.0-beta.49.tgz", + "integrity": "sha512-QhEqBe274Q0ogdiLD/3QtToFQwLisYT+5RHOsJW7EkGEsQ9kJ/h5KD4IRi9CsDStB9IEww5vFv0tJRcwwWqpzQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@crawlee/templates": "4.0.0-beta.4", + "@crawlee/templates": "4.0.0-beta.49", "@inquirer/prompts": "^7.5.0", "ansi-colors": "^4.1.3", "fs-extra": "^11.3.0", "tslib": "^2.8.1", - "yargs": "^17.7.2" + "yargs": "^18.0.0" }, "bin": { "crawlee": "index.js" @@ -485,10 +582,138 @@ "node": ">=22.0.0" } }, + "node_modules/@crawlee/cli/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@crawlee/cli/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@crawlee/cli/node_modules/cliui": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@crawlee/cli/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@crawlee/cli/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@crawlee/cli/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@crawlee/cli/node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@crawlee/cli/node_modules/yargs": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", + "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^9.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "string-width": "^7.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^22.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/@crawlee/cli/node_modules/yargs-parser": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, "node_modules/@crawlee/core": { - "version": "4.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@crawlee/core/-/core-4.0.0-beta.4.tgz", - "integrity": "sha512-gagThRFMLQB0N/Uw8ad+XpRo8xgNEYgHXCSU5H5MVvK6vS4nxm0s2CI7LBj0v1o92rsoM5We284FPlZTe8Qn0w==", + "version": "4.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@crawlee/core/-/core-4.0.0-beta.49.tgz", + "integrity": "sha512-k5FBU/R+gwrL/FWu6fFSciU4aM+nYsUJy4YOAk3Cur9Yom8YF8JRbGGeAaFEvDDjJZxWTR5s0GyYnzHeidx9Gw==", "license": "Apache-2.0", "dependencies": { "@apify/consts": "^2.41.0", @@ -497,22 +722,21 @@ "@apify/pseudo_url": "^2.0.59", "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/memory-storage": "4.0.0-beta.4", - "@crawlee/types": "4.0.0-beta.4", - "@crawlee/utils": "4.0.0-beta.4", + "@crawlee/memory-storage": "4.0.0-beta.49", + "@crawlee/types": "4.0.0-beta.49", + "@crawlee/utils": "4.0.0-beta.49", "@sapphire/async-queue": "^1.5.5", "@vladfrangu/async_event_emitter": "^2.4.6", "csv-stringify": "^6.5.2", - "fs-extra": "^11.3.0", - "got-scraping": "^4.1.1", "json5": "^2.2.3", "minimatch": "^10.0.1", "ow": "^2.0.0", "stream-json": "^1.9.1", "tldts": "^7.0.6", - "tough-cookie": "^5.1.2", + "tough-cookie": "^6.0.0", "tslib": "^2.8.1", - "type-fest": "^4.41.0" + "type-fest": "^4.41.0", + "zod": "^3.24.0 || ^4.0.0" }, "engines": { "node": ">=22.0.0" @@ -613,41 +837,99 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@crawlee/linkedom": { - "version": "4.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@crawlee/linkedom/-/linkedom-4.0.0-beta.4.tgz", - "integrity": "sha512-eOGSsQs2NylAvMG+OiQwe+CiBHGR5f+OtcMo0+vSKh+jno8IlnoSCSvkLQ8pYUo6lWtXe4m2VDfV06Yc9jTrSw==", + "node_modules/@crawlee/core/node_modules/tough-cookie": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.1.tgz", + "integrity": "sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==", + "license": "BSD-3-Clause", + "dependencies": { + "tldts": "^7.0.5" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@crawlee/got-scraping-client": { + "version": "4.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@crawlee/got-scraping-client/-/got-scraping-client-4.0.0-beta.49.tgz", + "integrity": "sha512-L1IWFC/kBQx9TNg/F7SVMjlnG92T95I1ZEL76x5dyGP9hBWBjaZHL8vsVSnoHDYh7ADWsbKjHyyD1CsMUjVimw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@crawlee/http-client": "4.0.0-beta.49", + "got-scraping": "^4.2.1" + }, + "engines": { + "node": ">=22.0.0" + } + }, + "node_modules/@crawlee/http": { + "version": "4.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@crawlee/http/-/http-4.0.0-beta.49.tgz", + "integrity": "sha512-q6vJ29s1TLynGBKPoHx4AbIMyl1KFw3oRPPWLakOj4wqK72W8KqG/0BHP6LPtgwBBgBF4TKhxEnp7xMT29f0KQ==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/http": "4.0.0-beta.4", - "@crawlee/types": "4.0.0-beta.4", - "linkedom": "^0.18.10", + "@crawlee/basic": "4.0.0-beta.49", + "@crawlee/core": "4.0.0-beta.49", + "@crawlee/http-client": "4.0.0-beta.49", + "@crawlee/types": "4.0.0-beta.49", + "@crawlee/utils": "4.0.0-beta.49", + "@types/content-type": "^1.1.8", + "cheerio": "^1.0.0", + "content-type": "^1.0.5", + "iconv-lite": "^0.7.2", + "mime-types": "^3.0.1", "ow": "^2.0.0", - "tslib": "^2.8.1" + "tslib": "^2.8.1", + "type-fest": "^4.41.0" + }, + "engines": { + "node": ">=22.0.0" + } + }, + "node_modules/@crawlee/http-client": { + "version": "4.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@crawlee/http-client/-/http-client-4.0.0-beta.49.tgz", + "integrity": "sha512-UMK5FLyFmAZHFNaaMhITwKQgEPdJZ5GJYvGCDHig4H5Hmc83aiBWIgGNqmQL+t/1YXkWVA0NhrBAgonk3m64aw==", + "license": "Apache-2.0", + "dependencies": { + "@crawlee/types": "4.0.0-beta.49", + "tough-cookie": "^6.0.0" }, "engines": { "node": ">=22.0.0" } }, - "node_modules/@crawlee/linkedom/node_modules/@crawlee/basic": { - "version": "4.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@crawlee/basic/-/basic-4.0.0-beta.4.tgz", - "integrity": "sha512-GnHrt8eylp/9MSLy5tXHrELwTA3Prm8YGVkzyO/8mfZZJqvz7L16uIAvO+ZWhg1x31MoHJKEQLlolaO6CDj2nA==", + "node_modules/@crawlee/http-client/node_modules/tough-cookie": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.1.tgz", + "integrity": "sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==", + "license": "BSD-3-Clause", + "dependencies": { + "tldts": "^7.0.5" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@crawlee/http/node_modules/@crawlee/basic": { + "version": "4.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@crawlee/basic/-/basic-4.0.0-beta.49.tgz", + "integrity": "sha512-6rRchZXH1KyLvkcZpTPeuRcbEDdl/l0XOsVTK5lHxkQvj63LrE+YwlmZxEA3LViiva9soNUll7VoFfWhEL77iw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@apify/log": "^2.5.18", "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/core": "4.0.0-beta.4", - "@crawlee/types": "4.0.0-beta.4", - "@crawlee/utils": "4.0.0-beta.4", + "@crawlee/core": "4.0.0-beta.49", + "@crawlee/got-scraping-client": "4.0.0-beta.49", + "@crawlee/types": "4.0.0-beta.49", + "@crawlee/utils": "4.0.0-beta.49", "csv-stringify": "^6.5.2", "fs-extra": "^11.3.0", - "got-scraping": "^4.1.1", "ow": "^2.0.0", "tldts": "^7.0.6", "tslib": "^2.8.1", @@ -657,33 +939,218 @@ "node": ">=22.0.0" } }, - "node_modules/@crawlee/linkedom/node_modules/@crawlee/http": { - "version": "4.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@crawlee/http/-/http-4.0.0-beta.4.tgz", - "integrity": "sha512-G0MWHpYcSUO73b+ZST5HT7XtiiYkONaMZ+cgKm3TMbtOh0zuaOx8SdcQTNjeMnJdxmSpbmLbQl2ihynXGxhQdA==", + "node_modules/@crawlee/http/node_modules/@sindresorhus/is": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-6.3.1.tgz", + "integrity": "sha512-FX4MfcifwJyFOI2lPoX7PQxCqx8BG1HCho7WdiXwpEQx1Ycij0JxkfYtGK7yqNScrZGSlt6RE6sw8QYoH7eKnQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, + "node_modules/@crawlee/http/node_modules/callsites": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-4.2.0.tgz", + "integrity": "sha512-kfzR4zzQtAE9PC7CzZsjl3aBNbXWuXiSeOCdLcPpBfGW8YuCqQHcRPFDbr/BPVmd3EEPVpuFzLyuT/cUhPr4OQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@crawlee/http/node_modules/cheerio": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.2.0.tgz", + "integrity": "sha512-WDrybc/gKFpTYQutKIK6UvfcuxijIZfMfXaYm8NMsPQxSYvf+13fXUJ4rztGGbJcBQ/GF55gvrZ0Bc0bj/mqvg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.2", + "encoding-sniffer": "^0.2.1", + "htmlparser2": "^10.1.0", + "parse5": "^7.3.0", + "parse5-htmlparser2-tree-adapter": "^7.1.0", + "parse5-parser-stream": "^7.1.2", + "undici": "^7.19.0", + "whatwg-mimetype": "^4.0.0" + }, + "engines": { + "node": ">=20.18.1" + }, + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + } + }, + "node_modules/@crawlee/http/node_modules/dot-prop": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-8.0.2.tgz", + "integrity": "sha512-xaBe6ZT4DHPkg0k4Ytbvn5xoxgpG0jOS1dYxSOwAHPuNLjP3/OzN0gH55SrLqpx8cBfSaVt91lXYkApjb+nYdQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^3.8.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@crawlee/http/node_modules/dot-prop/node_modules/type-fest": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", + "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@crawlee/http/node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/@crawlee/http/node_modules/htmlparser2": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.1.0.tgz", + "integrity": "sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==", + "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.2", + "entities": "^7.0.1" + } + }, + "node_modules/@crawlee/http/node_modules/iconv-lite": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/@crawlee/http/node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/@crawlee/http/node_modules/mime-types": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/@crawlee/http/node_modules/ow": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ow/-/ow-2.0.0.tgz", + "integrity": "sha512-ESUigmGrdhUZ2nQSFNkeKSl6ZRPupXzprMs3yF9DYlNVpJ8XAjM/fI9RUZxA7PI1K9HQDCCvBo1jr/GEIo9joQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sindresorhus/is": "^6.3.0", + "callsites": "^4.1.0", + "dot-prop": "^8.0.2", + "environment": "^1.0.0", + "fast-equals": "^5.0.1", + "is-identifier": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@crawlee/http/node_modules/undici": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.25.0.tgz", + "integrity": "sha512-xXnp4kTyor2Zq+J1FfPI6Eq3ew5h6Vl0F/8d9XU5zZQf1tX9s2Su1/3PiMmUANFULpmksxkClamIZcaUqryHsQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.18.1" + } + }, + "node_modules/@crawlee/jsdom": { + "version": "4.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@crawlee/jsdom/-/jsdom-4.0.0-beta.49.tgz", + "integrity": "sha512-RpO6fJfB8GMxokqfNTanU/zTSZJCFCw0fu3aTfyTG5njk/IENySRyJcIFWz+uUNuzF3trJVW4XEJBq4PBzvUjA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@apify/timeout": "^0.3.2", - "@apify/utilities": "^2.15.5", - "@crawlee/basic": "4.0.0-beta.4", - "@crawlee/types": "4.0.0-beta.4", - "@crawlee/utils": "4.0.0-beta.4", - "@types/content-type": "^1.1.8", + "@apify/timeout": "^0.3.0", + "@apify/utilities": "^2.7.10", + "@crawlee/http": "4.0.0-beta.49", + "@crawlee/types": "4.0.0-beta.49", + "@crawlee/utils": "4.0.0-beta.49", + "@types/jsdom": "^21.1.7", "cheerio": "^1.0.0", - "content-type": "^1.0.5", - "got-scraping": "^4.1.1", - "iconv-lite": "^0.6.3", - "mime-types": "^3.0.1", + "jsdom": "^26.1.0", "ow": "^2.0.0", - "tslib": "^2.8.1", - "type-fest": "^4.41.0" + "tslib": "^2.8.1" }, "engines": { "node": ">=22.0.0" } }, - "node_modules/@crawlee/linkedom/node_modules/@sindresorhus/is": { + "node_modules/@crawlee/jsdom/node_modules/@sindresorhus/is": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-6.3.1.tgz", "integrity": "sha512-FX4MfcifwJyFOI2lPoX7PQxCqx8BG1HCho7WdiXwpEQx1Ycij0JxkfYtGK7yqNScrZGSlt6RE6sw8QYoH7eKnQ==", @@ -696,7 +1163,7 @@ "url": "https://github.com/sindresorhus/is?sponsor=1" } }, - "node_modules/@crawlee/linkedom/node_modules/callsites": { + "node_modules/@crawlee/jsdom/node_modules/callsites": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-4.2.0.tgz", "integrity": "sha512-kfzR4zzQtAE9PC7CzZsjl3aBNbXWuXiSeOCdLcPpBfGW8YuCqQHcRPFDbr/BPVmd3EEPVpuFzLyuT/cUhPr4OQ==", @@ -709,33 +1176,33 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@crawlee/linkedom/node_modules/cheerio": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0.tgz", - "integrity": "sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==", + "node_modules/@crawlee/jsdom/node_modules/cheerio": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.2.0.tgz", + "integrity": "sha512-WDrybc/gKFpTYQutKIK6UvfcuxijIZfMfXaYm8NMsPQxSYvf+13fXUJ4rztGGbJcBQ/GF55gvrZ0Bc0bj/mqvg==", "dev": true, "license": "MIT", "dependencies": { "cheerio-select": "^2.1.0", "dom-serializer": "^2.0.0", "domhandler": "^5.0.3", - "domutils": "^3.1.0", - "encoding-sniffer": "^0.2.0", - "htmlparser2": "^9.1.0", - "parse5": "^7.1.2", - "parse5-htmlparser2-tree-adapter": "^7.0.0", + "domutils": "^3.2.2", + "encoding-sniffer": "^0.2.1", + "htmlparser2": "^10.1.0", + "parse5": "^7.3.0", + "parse5-htmlparser2-tree-adapter": "^7.1.0", "parse5-parser-stream": "^7.1.2", - "undici": "^6.19.5", + "undici": "^7.19.0", "whatwg-mimetype": "^4.0.0" }, "engines": { - "node": ">=18.17" + "node": ">=20.18.1" }, "funding": { "url": "https://github.com/cheeriojs/cheerio?sponsor=1" } }, - "node_modules/@crawlee/linkedom/node_modules/dot-prop": { + "node_modules/@crawlee/jsdom/node_modules/dot-prop": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-8.0.2.tgz", "integrity": "sha512-xaBe6ZT4DHPkg0k4Ytbvn5xoxgpG0jOS1dYxSOwAHPuNLjP3/OzN0gH55SrLqpx8cBfSaVt91lXYkApjb+nYdQ==", @@ -745,66 +1212,149 @@ "type-fest": "^3.8.0" }, "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@crawlee/jsdom/node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/@crawlee/jsdom/node_modules/htmlparser2": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.1.0.tgz", + "integrity": "sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==", + "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.2", + "entities": "^7.0.1" + } + }, + "node_modules/@crawlee/jsdom/node_modules/ow": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ow/-/ow-2.0.0.tgz", + "integrity": "sha512-ESUigmGrdhUZ2nQSFNkeKSl6ZRPupXzprMs3yF9DYlNVpJ8XAjM/fI9RUZxA7PI1K9HQDCCvBo1jr/GEIo9joQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sindresorhus/is": "^6.3.0", + "callsites": "^4.1.0", + "dot-prop": "^8.0.2", + "environment": "^1.0.0", + "fast-equals": "^5.0.1", + "is-identifier": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@crawlee/jsdom/node_modules/type-fest": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", + "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@crawlee/jsdom/node_modules/undici": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.25.0.tgz", + "integrity": "sha512-xXnp4kTyor2Zq+J1FfPI6Eq3ew5h6Vl0F/8d9XU5zZQf1tX9s2Su1/3PiMmUANFULpmksxkClamIZcaUqryHsQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.18.1" + } + }, + "node_modules/@crawlee/linkedom": { + "version": "4.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@crawlee/linkedom/-/linkedom-4.0.0-beta.49.tgz", + "integrity": "sha512-fOBVgl4sVcrKM/3DF96SfaMQjJQuEoMvtci67X1huPrPtjkrREqGrDufCtSttkcSkGu/gQCxMN/yv+oyzBAujQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@apify/timeout": "^0.3.2", + "@apify/utilities": "^2.15.5", + "@crawlee/http": "4.0.0-beta.49", + "@crawlee/types": "4.0.0-beta.49", + "@crawlee/utils": "4.0.0-beta.49", + "linkedom": "^0.18.10", + "ow": "^2.0.0", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=22.0.0" } }, - "node_modules/@crawlee/linkedom/node_modules/dot-prop/node_modules/type-fest": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", - "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", + "node_modules/@crawlee/linkedom/node_modules/@sindresorhus/is": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-6.3.1.tgz", + "integrity": "sha512-FX4MfcifwJyFOI2lPoX7PQxCqx8BG1HCho7WdiXwpEQx1Ycij0JxkfYtGK7yqNScrZGSlt6RE6sw8QYoH7eKnQ==", "dev": true, - "license": "(MIT OR CC0-1.0)", + "license": "MIT", "engines": { - "node": ">=14.16" + "node": ">=16" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@crawlee/linkedom/node_modules/htmlparser2": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz", - "integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.1.0", - "entities": "^4.5.0" + "url": "https://github.com/sindresorhus/is?sponsor=1" } }, - "node_modules/@crawlee/linkedom/node_modules/mime-db": { - "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "node_modules/@crawlee/linkedom/node_modules/callsites": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-4.2.0.tgz", + "integrity": "sha512-kfzR4zzQtAE9PC7CzZsjl3aBNbXWuXiSeOCdLcPpBfGW8YuCqQHcRPFDbr/BPVmd3EEPVpuFzLyuT/cUhPr4OQ==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.6" + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@crawlee/linkedom/node_modules/mime-types": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", - "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "node_modules/@crawlee/linkedom/node_modules/dot-prop": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-8.0.2.tgz", + "integrity": "sha512-xaBe6ZT4DHPkg0k4Ytbvn5xoxgpG0jOS1dYxSOwAHPuNLjP3/OzN0gH55SrLqpx8cBfSaVt91lXYkApjb+nYdQ==", "dev": true, "license": "MIT", "dependencies": { - "mime-db": "^1.54.0" + "type-fest": "^3.8.0" }, "engines": { - "node": ">= 0.6" + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/@crawlee/linkedom/node_modules/ow": { @@ -828,20 +1378,33 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@crawlee/linkedom/node_modules/type-fest": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", + "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@crawlee/memory-storage": { - "version": "4.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@crawlee/memory-storage/-/memory-storage-4.0.0-beta.4.tgz", - "integrity": "sha512-40HxqveRwyeiwpnHw1L8cwo6BP+/UUBqehOzsODGmOZaNTFU6Nm+8hRXlbYbeqzyWwxXOn15bAf2STHsZct/gw==", + "version": "4.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@crawlee/memory-storage/-/memory-storage-4.0.0-beta.49.tgz", + "integrity": "sha512-rLniynMhfrJoXn7rFHfj4NpsVvdRn3PIJi6YFL3G7s4JAiqqfhYOKshW+f6XdldEeb1z0YyGpgOknLo6VupktA==", "license": "Apache-2.0", "dependencies": { - "@apify/log": "^2.5.18", - "@crawlee/types": "4.0.0-beta.4", + "@crawlee/types": "4.0.0-beta.49", "@sapphire/async-queue": "^1.5.5", "@sapphire/shapeshift": "^4.0.0", "content-type": "^1.0.5", "fs-extra": "^11.3.0", "json5": "^2.2.3", "mime-types": "^3.0.1", + "p-limit": "^6.2.0", "proper-lockfile": "^4.1.2", "tslib": "^2.8.1" }, @@ -859,106 +1422,99 @@ } }, "node_modules/@crawlee/memory-storage/node_modules/mime-types": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", - "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", "license": "MIT", "dependencies": { "mime-db": "^1.54.0" }, "engines": { - "node": ">= 0.6" - } - }, - "node_modules/@crawlee/templates": { - "version": "4.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@crawlee/templates/-/templates-4.0.0-beta.4.tgz", - "integrity": "sha512-tpkotGuxSxeMlzmKnJvPfb+2RnUTn32Yl8OkO8hMGu+dPSU81clHlCXoOyfIsWHCTlCWjxggITAMOYEL/hwYKw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "ansi-colors": "^4.1.3", - "inquirer": "^12.6.0", - "tslib": "^2.8.1", - "yargonaut": "^1.1.4", - "yargs": "^17.7.2" + "node": ">=18" }, - "engines": { - "node": ">=22.0.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, - "node_modules/@crawlee/templates/node_modules/inquirer": { - "version": "12.6.1", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-12.6.1.tgz", - "integrity": "sha512-MGFnzHVS3l3oM3cy+LWkyR7UUtVEn3D5U41CZbEY34szToWoJAvaVtCTz1mxsEzZFk/HXWyCArn0HDgloTXMDw==", - "dev": true, + "node_modules/@crawlee/memory-storage/node_modules/p-limit": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-6.2.0.tgz", + "integrity": "sha512-kuUqqHNUqoIWp/c467RI4X6mmyuojY5jGutNU0wVTmEOOfcuwLqyMVoAi9MKi2Ak+5i9+nhmrK4ufZE8069kHA==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/prompts": "^7.5.1", - "@inquirer/type": "^3.0.6", - "ansi-escapes": "^4.3.2", - "mute-stream": "^2.0.0", - "run-async": "^3.0.0", - "rxjs": "^7.8.2" + "yocto-queue": "^1.1.1" }, "engines": { "node": ">=18" }, - "peerDependencies": { - "@types/node": ">=18" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@crawlee/templates/node_modules/mute-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", - "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", - "dev": true, - "license": "ISC", + "node_modules/@crawlee/memory-storage/node_modules/yocto-queue": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz", + "integrity": "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==", + "license": "MIT", "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@crawlee/templates/node_modules/run-async": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", - "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", + "node_modules/@crawlee/templates": { + "version": "4.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@crawlee/templates/-/templates-4.0.0-beta.49.tgz", + "integrity": "sha512-5/cBYgNuMXnVemxUDqagg0lgZURlc28NVuY1vfON+CG0C6Dg/GLwMlTLOmcroQeDJF7bWxVxDrsHomTk0Mm30A==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.8.1" + }, "engines": { - "node": ">=0.12.0" + "node": ">=22.0.0" } }, "node_modules/@crawlee/types": { - "version": "4.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@crawlee/types/-/types-4.0.0-beta.4.tgz", - "integrity": "sha512-DSJRUfTa5NO4xt/ayWD8U/XkHusUry4XTaTcYdEJa9tVYwuf2SyF5xRwd6NdcEiJeeVHn5MM7GU6oknvugfezw==", + "version": "4.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@crawlee/types/-/types-4.0.0-beta.49.tgz", + "integrity": "sha512-p33njES5N539Zgco1aroUZgmWeXp+i6MTPUk7R7wLEdV/k+aw2Y1cjw8wGQpKH9/ZZIpsvqx56U26bC2w1nmcQ==", "license": "Apache-2.0", "dependencies": { + "tough-cookie": "^6.0.0", "tslib": "^2.8.1" }, "engines": { "node": ">=22.0.0" } }, + "node_modules/@crawlee/types/node_modules/tough-cookie": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.1.tgz", + "integrity": "sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==", + "license": "BSD-3-Clause", + "dependencies": { + "tldts": "^7.0.5" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/@crawlee/utils": { - "version": "4.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@crawlee/utils/-/utils-4.0.0-beta.4.tgz", - "integrity": "sha512-oZOORB+gIkEeeExEd47Cmbgkrh4pEqo+vklFY3gk55iFFq7X6W6hu4k2rvQP/FlIMhWMc3ETFJFID08OS6p23g==", + "version": "4.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@crawlee/utils/-/utils-4.0.0-beta.49.tgz", + "integrity": "sha512-JmTTVsJBFJNPUZsdH35Yde/jRFJoZtloVtEYLGZoqo79rT9RmRi+SDr22XFYJ7bb/LEXY+NOWBovdMge+fnpHw==", "license": "Apache-2.0", "dependencies": { - "@apify/log": "^2.5.18", "@apify/ps-tree": "^1.2.0", - "@crawlee/types": "4.0.0-beta.4", + "@crawlee/http-client": "4.0.0-beta.49", + "@crawlee/types": "4.0.0-beta.49", "@types/sax": "^1.2.7", "cheerio": "^1.0.0", - "file-type": "^20.5.0", - "got-scraping": "^4.1.1", + "domhandler": "^5.0.3", + "file-type": "^21.0.0", "ow": "^2.0.0", "robots-parser": "^3.0.1", "sax": "^1.4.1", @@ -1963,18 +2519,28 @@ "node": ">=6.9.0" } }, + "node_modules/@inquirer/ansi": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-1.0.2.tgz", + "integrity": "sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/@inquirer/checkbox": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.1.6.tgz", - "integrity": "sha512-62u896rWCtKKE43soodq5e/QcRsA22I+7/4Ov7LESWnKRO6BVo2A1DFLDmXL9e28TB0CfHc3YtkbPm7iwajqkg==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.3.2.tgz", + "integrity": "sha512-VXukHf0RR1doGe6Sm4F0Em7SWYLTHSsbGfJdS9Ja2bX5/D5uwVOEjr07cncLROdBvmnvCATYEWlHqYmXv2IlQA==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/figures": "^1.0.11", - "@inquirer/type": "^3.0.6", - "ansi-escapes": "^4.3.2", - "yoctocolors-cjs": "^2.1.2" + "@inquirer/ansi": "^1.0.2", + "@inquirer/core": "^10.3.2", + "@inquirer/figures": "^1.0.15", + "@inquirer/type": "^3.0.10", + "yoctocolors-cjs": "^2.1.3" }, "engines": { "node": ">=18" @@ -1989,14 +2555,14 @@ } }, "node_modules/@inquirer/confirm": { - "version": "5.1.10", - "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.10.tgz", - "integrity": "sha512-FxbQ9giWxUWKUk2O5XZ6PduVnH2CZ/fmMKMBkH71MHJvWr7WL5AHKevhzF1L5uYWB2P548o1RzVxrNd3dpmk6g==", + "version": "5.1.21", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.21.tgz", + "integrity": "sha512-KR8edRkIsUayMXV+o3Gv+q4jlhENF9nMYUZs9PA2HzrXeHI8M5uDag70U7RJn9yyiMZSbtF5/UexBtAVtZGSbQ==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/type": "^3.0.6" + "@inquirer/core": "^10.3.2", + "@inquirer/type": "^3.0.10" }, "engines": { "node": ">=18" @@ -2011,20 +2577,20 @@ } }, "node_modules/@inquirer/core": { - "version": "10.1.11", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.1.11.tgz", - "integrity": "sha512-BXwI/MCqdtAhzNQlBEFE7CEflhPkl/BqvAuV/aK6lW3DClIfYVDWPP/kXuXHtBWC7/EEbNqd/1BGq2BGBBnuxw==", + "version": "10.3.2", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.3.2.tgz", + "integrity": "sha512-43RTuEbfP8MbKzedNqBrlhhNKVwoK//vUFNW3Q3vZ88BLcrs4kYpGg+B2mm5p2K/HfygoCxuKwJJiv8PbGmE0A==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/figures": "^1.0.11", - "@inquirer/type": "^3.0.6", - "ansi-escapes": "^4.3.2", + "@inquirer/ansi": "^1.0.2", + "@inquirer/figures": "^1.0.15", + "@inquirer/type": "^3.0.10", "cli-width": "^4.1.0", "mute-stream": "^2.0.0", "signal-exit": "^4.1.0", "wrap-ansi": "^6.2.0", - "yoctocolors-cjs": "^2.1.2" + "yoctocolors-cjs": "^2.1.3" }, "engines": { "node": ">=18" @@ -2072,15 +2638,15 @@ } }, "node_modules/@inquirer/editor": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.11.tgz", - "integrity": "sha512-YoZr0lBnnLFPpfPSNsQ8IZyKxU47zPyVi9NLjCWtna52//M/xuL0PGPAxHxxYhdOhnvY2oBafoM+BI5w/JK7jw==", + "version": "4.2.23", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.23.tgz", + "integrity": "sha512-aLSROkEwirotxZ1pBaP8tugXRFCxW94gwrQLxXfrZsKkfjOYC1aRvAZuhpJOb5cu4IBTJdsCigUlf2iCOu4ZDQ==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/type": "^3.0.6", - "external-editor": "^3.1.0" + "@inquirer/core": "^10.3.2", + "@inquirer/external-editor": "^1.0.3", + "@inquirer/type": "^3.0.10" }, "engines": { "node": ">=18" @@ -2095,15 +2661,37 @@ } }, "node_modules/@inquirer/expand": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.13.tgz", - "integrity": "sha512-HgYNWuZLHX6q5y4hqKhwyytqAghmx35xikOGY3TcgNiElqXGPas24+UzNPOwGUZa5Dn32y25xJqVeUcGlTv+QQ==", + "version": "4.0.23", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.23.tgz", + "integrity": "sha512-nRzdOyFYnpeYTTR2qFwEVmIWypzdAx/sIkCMeTNTcflFOovfqUk+HcFhQQVBftAh9gmGrpFj6QcGEqrDMDOiew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^10.3.2", + "@inquirer/type": "^3.0.10", + "yoctocolors-cjs": "^2.1.3" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/external-editor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.3.tgz", + "integrity": "sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/type": "^3.0.6", - "yoctocolors-cjs": "^2.1.2" + "chardet": "^2.1.1", + "iconv-lite": "^0.7.0" }, "engines": { "node": ">=18" @@ -2117,10 +2705,34 @@ } } }, + "node_modules/@inquirer/external-editor/node_modules/chardet": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.1.tgz", + "integrity": "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@inquirer/external-editor/node_modules/iconv-lite": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/@inquirer/figures": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.12.tgz", - "integrity": "sha512-MJttijd8rMFcKJC8NYmprWr6hD3r9Gd9qUC0XwPNwoEPWSMVJwA2MlXxF+nhZZNMY+HXsWa+o7KY2emWYIn0jQ==", + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.15.tgz", + "integrity": "sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g==", "dev": true, "license": "MIT", "engines": { @@ -2128,14 +2740,14 @@ } }, "node_modules/@inquirer/input": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.1.10.tgz", - "integrity": "sha512-kV3BVne3wJ+j6reYQUZi/UN9NZGZLxgc/tfyjeK3mrx1QI7RXPxGp21IUTv+iVHcbP4ytZALF8vCHoxyNSC6qg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.3.1.tgz", + "integrity": "sha512-kN0pAM4yPrLjJ1XJBjDxyfDduXOuQHrBB8aLDMueuwUGn+vNpF7Gq7TvyVxx8u4SHlFFj4trmj+a2cbpG4Jn1g==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/type": "^3.0.6" + "@inquirer/core": "^10.3.2", + "@inquirer/type": "^3.0.10" }, "engines": { "node": ">=18" @@ -2150,14 +2762,14 @@ } }, "node_modules/@inquirer/number": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.13.tgz", - "integrity": "sha512-IrLezcg/GWKS8zpKDvnJ/YTflNJdG0qSFlUM/zNFsdi4UKW/CO+gaJpbMgQ20Q58vNKDJbEzC6IebdkprwL6ew==", + "version": "3.0.23", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.23.tgz", + "integrity": "sha512-5Smv0OK7K0KUzUfYUXDXQc9jrf8OHo4ktlEayFlelCjwMXz0299Y8OrI+lj7i4gCBY15UObk76q0QtxjzFcFcg==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/type": "^3.0.6" + "@inquirer/core": "^10.3.2", + "@inquirer/type": "^3.0.10" }, "engines": { "node": ">=18" @@ -2172,15 +2784,15 @@ } }, "node_modules/@inquirer/password": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.13.tgz", - "integrity": "sha512-NN0S/SmdhakqOTJhDwOpeBEEr8VdcYsjmZHDb0rblSh2FcbXQOr+2IApP7JG4WE3sxIdKytDn4ed3XYwtHxmJQ==", + "version": "4.0.23", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.23.tgz", + "integrity": "sha512-zREJHjhT5vJBMZX/IUbyI9zVtVfOLiTO66MrF/3GFZYZ7T4YILW5MSkEYHceSii/KtRk+4i3RE7E1CUXA2jHcA==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/type": "^3.0.6", - "ansi-escapes": "^4.3.2" + "@inquirer/ansi": "^1.0.2", + "@inquirer/core": "^10.3.2", + "@inquirer/type": "^3.0.10" }, "engines": { "node": ">=18" @@ -2195,22 +2807,22 @@ } }, "node_modules/@inquirer/prompts": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.5.1.tgz", - "integrity": "sha512-5AOrZPf2/GxZ+SDRZ5WFplCA2TAQgK3OYrXCYmJL5NaTu4ECcoWFlfUZuw7Es++6Njv7iu/8vpYJhuzxUH76Vg==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.10.1.tgz", + "integrity": "sha512-Dx/y9bCQcXLI5ooQ5KyvA4FTgeo2jYj/7plWfV5Ak5wDPKQZgudKez2ixyfz7tKXzcJciTxqLeK7R9HItwiByg==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/checkbox": "^4.1.6", - "@inquirer/confirm": "^5.1.10", - "@inquirer/editor": "^4.2.11", - "@inquirer/expand": "^4.0.13", - "@inquirer/input": "^4.1.10", - "@inquirer/number": "^3.0.13", - "@inquirer/password": "^4.0.13", - "@inquirer/rawlist": "^4.1.1", - "@inquirer/search": "^3.0.13", - "@inquirer/select": "^4.2.1" + "@inquirer/checkbox": "^4.3.2", + "@inquirer/confirm": "^5.1.21", + "@inquirer/editor": "^4.2.23", + "@inquirer/expand": "^4.0.23", + "@inquirer/input": "^4.3.1", + "@inquirer/number": "^3.0.23", + "@inquirer/password": "^4.0.23", + "@inquirer/rawlist": "^4.1.11", + "@inquirer/search": "^3.2.2", + "@inquirer/select": "^4.4.2" }, "engines": { "node": ">=18" @@ -2225,15 +2837,15 @@ } }, "node_modules/@inquirer/rawlist": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.1.tgz", - "integrity": "sha512-VBUC0jPN2oaOq8+krwpo/mf3n/UryDUkKog3zi+oIi8/e5hykvdntgHUB9nhDM78RubiyR1ldIOfm5ue+2DeaQ==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.11.tgz", + "integrity": "sha512-+LLQB8XGr3I5LZN/GuAHo+GpDJegQwuPARLChlMICNdwW7OwV2izlCSCxN6cqpL0sMXmbKbFcItJgdQq5EBXTw==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/type": "^3.0.6", - "yoctocolors-cjs": "^2.1.2" + "@inquirer/core": "^10.3.2", + "@inquirer/type": "^3.0.10", + "yoctocolors-cjs": "^2.1.3" }, "engines": { "node": ">=18" @@ -2248,16 +2860,16 @@ } }, "node_modules/@inquirer/search": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.0.13.tgz", - "integrity": "sha512-9g89d2c5Izok/Gw/U7KPC3f9kfe5rA1AJ24xxNZG0st+vWekSk7tB9oE+dJv5JXd0ZSijomvW0KPMoBd8qbN4g==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.2.2.tgz", + "integrity": "sha512-p2bvRfENXCZdWF/U2BXvnSI9h+tuA8iNqtUKb9UWbmLYCRQxd8WkvwWvYn+3NgYaNwdUkHytJMGG4MMLucI1kA==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/figures": "^1.0.11", - "@inquirer/type": "^3.0.6", - "yoctocolors-cjs": "^2.1.2" + "@inquirer/core": "^10.3.2", + "@inquirer/figures": "^1.0.15", + "@inquirer/type": "^3.0.10", + "yoctocolors-cjs": "^2.1.3" }, "engines": { "node": ">=18" @@ -2272,17 +2884,17 @@ } }, "node_modules/@inquirer/select": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.2.1.tgz", - "integrity": "sha512-gt1Kd5XZm+/ddemcT3m23IP8aD8rC9drRckWoP/1f7OL46Yy2FGi8DSmNjEjQKtPl6SV96Kmjbl6p713KXJ/Jg==", + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.4.2.tgz", + "integrity": "sha512-l4xMuJo55MAe+N7Qr4rX90vypFwCajSakx59qe/tMaC1aEHWLyw68wF4o0A4SLAY4E0nd+Vt+EyskeDIqu1M6w==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.11", - "@inquirer/figures": "^1.0.11", - "@inquirer/type": "^3.0.6", - "ansi-escapes": "^4.3.2", - "yoctocolors-cjs": "^2.1.2" + "@inquirer/ansi": "^1.0.2", + "@inquirer/core": "^10.3.2", + "@inquirer/figures": "^1.0.15", + "@inquirer/type": "^3.0.10", + "yoctocolors-cjs": "^2.1.3" }, "engines": { "node": ">=18" @@ -2297,9 +2909,9 @@ } }, "node_modules/@inquirer/type": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.6.tgz", - "integrity": "sha512-/mKVCtVpyBu3IDarv0G+59KC4stsD5mDsGpYh+GKs1NZT88Jh52+cuoA1AtLk2Q0r/quNl+1cSUyLRHBFeD0XA==", + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.10.tgz", + "integrity": "sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==", "dev": true, "license": "MIT", "engines": { @@ -4185,14 +4797,13 @@ } }, "node_modules/@tokenizer/inflate": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/@tokenizer/inflate/-/inflate-0.2.7.tgz", - "integrity": "sha512-MADQgmZT1eKjp06jpI2yozxaU9uVs4GzzgSL+uEq7bVcJ9V1ZXQkeGNql1fsSI0gMy1vhvNTNbUqrx+pZfJVmg==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@tokenizer/inflate/-/inflate-0.4.1.tgz", + "integrity": "sha512-2mAv+8pkG6GIZiF1kNg1jAjh27IDxEPKwdGul3snfztFerfPGI1LjDezZp3i7BElXompqEtPmoPx6c2wgtWsOA==", "license": "MIT", "dependencies": { - "debug": "^4.4.0", - "fflate": "^0.8.2", - "token-types": "^6.0.0" + "debug": "^4.4.3", + "token-types": "^6.1.1" }, "engines": { "node": ">=18" @@ -4203,9 +4814,9 @@ } }, "node_modules/@tokenizer/inflate/node_modules/debug": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", - "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -7407,24 +8018,24 @@ } }, "node_modules/crawlee": { - "version": "4.0.0-beta.4", - "resolved": "https://registry.npmjs.org/crawlee/-/crawlee-4.0.0-beta.4.tgz", - "integrity": "sha512-ez2meEG/8QNZEDGcZebV0r4VjQgDWSkihbMVLipEeOFyWr8mois/z+wvgxUiMYQI1nwCzDXYdY0OEvlHXWJwHg==", + "version": "4.0.0-beta.49", + "resolved": "https://registry.npmjs.org/crawlee/-/crawlee-4.0.0-beta.49.tgz", + "integrity": "sha512-/+m7LJ0m4nLmdA+zzb0ZL21DjNGUjveoPs+ckbiaPpE0LT8bJBalBbzhRcmUCZHWuY5L6ncNJcS2HTGBe20VaA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@crawlee/basic": "4.0.0-beta.4", - "@crawlee/browser": "4.0.0-beta.4", - "@crawlee/browser-pool": "4.0.0-beta.4", - "@crawlee/cheerio": "4.0.0-beta.4", - "@crawlee/cli": "4.0.0-beta.4", - "@crawlee/core": "4.0.0-beta.4", - "@crawlee/http": "4.0.0-beta.4", - "@crawlee/jsdom": "4.0.0-beta.4", - "@crawlee/linkedom": "4.0.0-beta.4", - "@crawlee/playwright": "4.0.0-beta.4", - "@crawlee/puppeteer": "4.0.0-beta.4", - "@crawlee/utils": "4.0.0-beta.4", + "@crawlee/basic": "4.0.0-beta.49", + "@crawlee/browser": "4.0.0-beta.49", + "@crawlee/browser-pool": "4.0.0-beta.49", + "@crawlee/cheerio": "4.0.0-beta.49", + "@crawlee/cli": "4.0.0-beta.49", + "@crawlee/core": "4.0.0-beta.49", + "@crawlee/http": "4.0.0-beta.49", + "@crawlee/jsdom": "4.0.0-beta.49", + "@crawlee/linkedom": "4.0.0-beta.49", + "@crawlee/playwright": "4.0.0-beta.49", + "@crawlee/puppeteer": "4.0.0-beta.49", + "@crawlee/utils": "4.0.0-beta.49", "import-local": "^3.2.0", "tslib": "^2.8.1" }, @@ -7435,10 +8046,14 @@ "node": ">=22.0.0" }, "peerDependencies": { + "idcac-playwright": "*", "playwright": "*", "puppeteer": "*" }, "peerDependenciesMeta": { + "idcac-playwright": { + "optional": true + }, "playwright": { "optional": true }, @@ -7448,21 +8063,20 @@ } }, "node_modules/crawlee/node_modules/@crawlee/basic": { - "version": "4.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@crawlee/basic/-/basic-4.0.0-beta.4.tgz", - "integrity": "sha512-GnHrt8eylp/9MSLy5tXHrELwTA3Prm8YGVkzyO/8mfZZJqvz7L16uIAvO+ZWhg1x31MoHJKEQLlolaO6CDj2nA==", + "version": "4.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@crawlee/basic/-/basic-4.0.0-beta.49.tgz", + "integrity": "sha512-6rRchZXH1KyLvkcZpTPeuRcbEDdl/l0XOsVTK5lHxkQvj63LrE+YwlmZxEA3LViiva9soNUll7VoFfWhEL77iw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@apify/log": "^2.5.18", "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/core": "4.0.0-beta.4", - "@crawlee/types": "4.0.0-beta.4", - "@crawlee/utils": "4.0.0-beta.4", + "@crawlee/core": "4.0.0-beta.49", + "@crawlee/got-scraping-client": "4.0.0-beta.49", + "@crawlee/types": "4.0.0-beta.49", + "@crawlee/utils": "4.0.0-beta.49", "csv-stringify": "^6.5.2", "fs-extra": "^11.3.0", - "got-scraping": "^4.1.1", "ow": "^2.0.0", "tldts": "^7.0.6", "tslib": "^2.8.1", @@ -7473,17 +8087,17 @@ } }, "node_modules/crawlee/node_modules/@crawlee/browser": { - "version": "4.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@crawlee/browser/-/browser-4.0.0-beta.4.tgz", - "integrity": "sha512-yyvzSVNn7O5Q63BHWdqtgkd3hDMn3DxSv/Vr3fiHXRUL4CiAeHZrzSSl/VgzzTMIuv7GXSVWvLkdXGGYZX2peA==", + "version": "4.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@crawlee/browser/-/browser-4.0.0-beta.49.tgz", + "integrity": "sha512-RBzbtscHGi7qY7bn3KqsfV2flFt0XlKp7OOdGx8VsSSzdVhIb+YXFOrcdMR6DGEyvxtMSZxNZ4U8qaKM/YwOUg==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/timeout": "^0.3.2", - "@crawlee/basic": "4.0.0-beta.4", - "@crawlee/browser-pool": "4.0.0-beta.4", - "@crawlee/types": "4.0.0-beta.4", - "@crawlee/utils": "4.0.0-beta.4", + "@crawlee/basic": "4.0.0-beta.49", + "@crawlee/browser-pool": "4.0.0-beta.49", + "@crawlee/types": "4.0.0-beta.49", + "@crawlee/utils": "4.0.0-beta.49", "ow": "^2.0.0", "tslib": "^2.8.1", "type-fest": "^4.41.0" @@ -7505,128 +8119,61 @@ } }, "node_modules/crawlee/node_modules/@crawlee/browser-pool": { - "version": "4.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@crawlee/browser-pool/-/browser-pool-4.0.0-beta.4.tgz", - "integrity": "sha512-OtzcPk50a2fTTQVR3euwySuXa6tEmNjsZ3mIwb20yMNlZxXdnFvrNMt/8hrJe6CV9ccWQI0GuRp8WwltR634fg==", + "version": "4.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@crawlee/browser-pool/-/browser-pool-4.0.0-beta.49.tgz", + "integrity": "sha512-oroowDwagffg1Ybbn3y3Eey2i2p+rhdu9f2dBtDvH4EF+4KPpfW7Z5FG9knLTx+3OcaRp9QumZUuyFANH+wN1w==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@apify/log": "^2.5.18", "@apify/timeout": "^0.3.2", - "@crawlee/core": "4.0.0-beta.4", - "@crawlee/types": "4.0.0-beta.4", - "fingerprint-generator": "^2.1.66", - "fingerprint-injector": "^2.1.66", + "@crawlee/core": "4.0.0-beta.49", + "@crawlee/types": "4.0.0-beta.49", + "fingerprint-generator": "^2.1.68", + "fingerprint-injector": "^2.1.68", "lodash.merge": "^4.6.2", "nanoid": "^5.1.5", "ow": "^2.0.0", "p-limit": "^6.2.0", "proxy-chain": "^2.5.8", "quick-lru": "^7.0.1", - "tiny-typed-emitter": "^2.1.0", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=22.0.0" - }, - "peerDependencies": { - "playwright": "*", - "puppeteer": "*" - }, - "peerDependenciesMeta": { - "playwright": { - "optional": true - }, - "puppeteer": { - "optional": true - } - } - }, - "node_modules/crawlee/node_modules/@crawlee/cheerio": { - "version": "4.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@crawlee/cheerio/-/cheerio-4.0.0-beta.4.tgz", - "integrity": "sha512-ZQsJBiAZlR05lLm6AsNuwat+qhqaA9UYiAGCY8DtwAUK3EGM0gAGB0WHd7e6tzD3W0yFMQGgG04XIitYVttVyQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@crawlee/http": "4.0.0-beta.4", - "@crawlee/types": "4.0.0-beta.4", - "@crawlee/utils": "4.0.0-beta.4", - "cheerio": "^1.0.0", - "htmlparser2": "^10.0.0", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=22.0.0" - } - }, - "node_modules/crawlee/node_modules/@crawlee/http": { - "version": "4.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@crawlee/http/-/http-4.0.0-beta.4.tgz", - "integrity": "sha512-G0MWHpYcSUO73b+ZST5HT7XtiiYkONaMZ+cgKm3TMbtOh0zuaOx8SdcQTNjeMnJdxmSpbmLbQl2ihynXGxhQdA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@apify/timeout": "^0.3.2", - "@apify/utilities": "^2.15.5", - "@crawlee/basic": "4.0.0-beta.4", - "@crawlee/types": "4.0.0-beta.4", - "@crawlee/utils": "4.0.0-beta.4", - "@types/content-type": "^1.1.8", - "cheerio": "^1.0.0", - "content-type": "^1.0.5", - "got-scraping": "^4.1.1", - "iconv-lite": "^0.6.3", - "mime-types": "^3.0.1", - "ow": "^2.0.0", - "tslib": "^2.8.1", - "type-fest": "^4.41.0" - }, - "engines": { - "node": ">=22.0.0" - } - }, - "node_modules/crawlee/node_modules/@crawlee/jsdom": { - "version": "4.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@crawlee/jsdom/-/jsdom-4.0.0-beta.4.tgz", - "integrity": "sha512-nBrVYyz2kJCSF/s8yWpWf90L7cr7cpByJacnpNpQTwp8+2QSRrJmU60uddFeQEhC2nWq0WnWsuMA1Mx7cR25qw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@apify/timeout": "^0.3.2", - "@apify/utilities": "^2.15.5", - "@crawlee/http": "4.0.0-beta.4", - "@crawlee/types": "4.0.0-beta.4", - "@crawlee/utils": "4.0.0-beta.4", - "@types/jsdom": "^21.1.7", - "cheerio": "^1.0.0", - "jsdom": "^26.1.0", - "ow": "^2.0.0", + "tiny-typed-emitter": "^2.1.0", "tslib": "^2.8.1" }, "engines": { "node": ">=22.0.0" + }, + "peerDependencies": { + "playwright": "*", + "puppeteer": "*" + }, + "peerDependenciesMeta": { + "playwright": { + "optional": true + }, + "puppeteer": { + "optional": true + } } }, "node_modules/crawlee/node_modules/@crawlee/playwright": { - "version": "4.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@crawlee/playwright/-/playwright-4.0.0-beta.4.tgz", - "integrity": "sha512-mAynANJHAoxPbOnxkyDnLIsS+Ujj40q2fApJMWgdz95Ti0Kg/HJBacjeRV+cGZpA/brB8FV7J4/ZGu26laip1g==", + "version": "4.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@crawlee/playwright/-/playwright-4.0.0-beta.49.tgz", + "integrity": "sha512-ozU/eUAgnW0AhyWYUe4Kvipqfl8JyJ2ZZoB5jqWG7PG0zmgEx9CQ5s+aMopl0zmZu31dW7nnZk9HQZa71ZYcTg==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/datastructures": "^2.0.3", - "@apify/log": "^2.5.18", "@apify/timeout": "^0.3.2", - "@crawlee/browser": "4.0.0-beta.4", - "@crawlee/browser-pool": "4.0.0-beta.4", - "@crawlee/core": "4.0.0-beta.4", - "@crawlee/types": "4.0.0-beta.4", - "@crawlee/utils": "4.0.0-beta.4", + "@crawlee/basic": "4.0.0-beta.49", + "@crawlee/browser": "4.0.0-beta.49", + "@crawlee/browser-pool": "4.0.0-beta.49", + "@crawlee/cheerio": "4.0.0-beta.49", + "@crawlee/core": "4.0.0-beta.49", + "@crawlee/types": "4.0.0-beta.49", + "@crawlee/utils": "4.0.0-beta.49", "cheerio": "^1.0.0", "idcac-playwright": "^0.1.3", "jquery": "^3.7.1", - "lodash.isequal": "^4.5.0", "ml-logistic-regression": "^2.0.0", "ml-matrix": "^6.12.1", "ow": "^2.0.0", @@ -7637,30 +8184,41 @@ "node": ">=22.0.0" }, "peerDependencies": { + "idcac-playwright": "^0.2.0", "playwright": "*" }, "peerDependenciesMeta": { + "idcac-playwright": { + "optional": true + }, "playwright": { "optional": true } } }, + "node_modules/crawlee/node_modules/@crawlee/playwright/node_modules/idcac-playwright": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/idcac-playwright/-/idcac-playwright-0.1.3.tgz", + "integrity": "sha512-VVYQ4sv6OrUJKVzYaIP1hq0qAHd1O22HW5LnL1Wf6zkrLStQ/QEg4iJ0rllIOEpd+Rmm+635AJD59A+Vw+2PgQ==", + "dev": true, + "license": "ISC" + }, "node_modules/crawlee/node_modules/@crawlee/puppeteer": { - "version": "4.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@crawlee/puppeteer/-/puppeteer-4.0.0-beta.4.tgz", - "integrity": "sha512-LiXfvOz3RXmtzVte/vk4PkKEdBzoXrmQmTOeHHtbD7z9AYMaHGI1wimEuu5Z2wYNEQ0n0yi7fkXiiajxsC54sg==", + "version": "4.0.0-beta.49", + "resolved": "https://registry.npmjs.org/@crawlee/puppeteer/-/puppeteer-4.0.0-beta.49.tgz", + "integrity": "sha512-fpMaaXqSNr86FTWVvkWvNXlKRApRtURo37U9AHVLtwQTyBbmgFeETnfjHauAlEj29mFaRgk4lyKXEcDmWU/Psw==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/datastructures": "^2.0.3", - "@apify/log": "^2.5.18", - "@crawlee/browser": "4.0.0-beta.4", - "@crawlee/browser-pool": "4.0.0-beta.4", - "@crawlee/types": "4.0.0-beta.4", - "@crawlee/utils": "4.0.0-beta.4", + "@crawlee/browser": "4.0.0-beta.49", + "@crawlee/browser-pool": "4.0.0-beta.49", + "@crawlee/core": "4.0.0-beta.49", + "@crawlee/types": "4.0.0-beta.49", + "@crawlee/utils": "4.0.0-beta.49", "cheerio": "^1.0.0", "devtools-protocol": "*", - "idcac-playwright": "^0.1.3", + "idcac-playwright": "^0.2.0", "jquery": "^3.7.1", "ow": "^2.0.0", "tslib": "^2.8.1" @@ -7669,9 +8227,13 @@ "node": ">=22.0.0" }, "peerDependencies": { + "idcac-playwright": "^0.2.0", "puppeteer": "*" }, "peerDependenciesMeta": { + "idcac-playwright": { + "optional": true + }, "puppeteer": { "optional": true } @@ -7704,51 +8266,31 @@ } }, "node_modules/crawlee/node_modules/cheerio": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0.tgz", - "integrity": "sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.2.0.tgz", + "integrity": "sha512-WDrybc/gKFpTYQutKIK6UvfcuxijIZfMfXaYm8NMsPQxSYvf+13fXUJ4rztGGbJcBQ/GF55gvrZ0Bc0bj/mqvg==", "dev": true, "license": "MIT", "dependencies": { "cheerio-select": "^2.1.0", "dom-serializer": "^2.0.0", "domhandler": "^5.0.3", - "domutils": "^3.1.0", - "encoding-sniffer": "^0.2.0", - "htmlparser2": "^9.1.0", - "parse5": "^7.1.2", - "parse5-htmlparser2-tree-adapter": "^7.0.0", + "domutils": "^3.2.2", + "encoding-sniffer": "^0.2.1", + "htmlparser2": "^10.1.0", + "parse5": "^7.3.0", + "parse5-htmlparser2-tree-adapter": "^7.1.0", "parse5-parser-stream": "^7.1.2", - "undici": "^6.19.5", + "undici": "^7.19.0", "whatwg-mimetype": "^4.0.0" }, "engines": { - "node": ">=18.17" + "node": ">=20.18.1" }, "funding": { "url": "https://github.com/cheeriojs/cheerio?sponsor=1" } }, - "node_modules/crawlee/node_modules/cheerio/node_modules/htmlparser2": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz", - "integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.1.0", - "entities": "^4.5.0" - } - }, "node_modules/crawlee/node_modules/dot-prop": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-8.0.2.tgz", @@ -7778,10 +8320,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/crawlee/node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/crawlee/node_modules/htmlparser2": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.0.0.tgz", - "integrity": "sha512-TwAZM+zE5Tq3lrEHvOlvwgj1XLWQCtaaibSN11Q+gGBAS7Y1uZSWwXXRe4iF6OXnaq1riyQAPFOBtYc77Mxq0g==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.1.0.tgz", + "integrity": "sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==", "dev": true, "funding": [ "https://github.com/fb55/htmlparser2?sponsor=1", @@ -7794,50 +8349,14 @@ "dependencies": { "domelementtype": "^2.3.0", "domhandler": "^5.0.3", - "domutils": "^3.2.1", - "entities": "^6.0.0" - } - }, - "node_modules/crawlee/node_modules/htmlparser2/node_modules/entities": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.0.tgz", - "integrity": "sha512-aKstq2TDOndCn4diEyp9Uq/Flu2i1GlLkc6XIDQSDMuaFE3OPW5OphLCyQ5SpSJZTb4reN+kTcYru5yIfXoRPw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/crawlee/node_modules/mime-db": { - "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/crawlee/node_modules/mime-types": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", - "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "^1.54.0" - }, - "engines": { - "node": ">= 0.6" + "domutils": "^3.2.2", + "entities": "^7.0.1" } }, "node_modules/crawlee/node_modules/nanoid": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.5.tgz", - "integrity": "sha512-Ir/+ZpE9fDsNH0hQ3C68uyThDXzYcim2EqcZ8zn8Chtt1iylPT9xXJB0kPCnqzgcEGikO9RxSrh63MsmVCU7Fw==", + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.9.tgz", + "integrity": "sha512-ZUvP7KeBLe3OZ1ypw6dI/TzYJuvHP77IM4Ry73waSQTLn8/g8rpdjfyVAh7t1/+FjBtG4lCP42MEbDxOsRpBMw==", "dev": true, "funding": [ { @@ -7891,9 +8410,9 @@ } }, "node_modules/crawlee/node_modules/quick-lru": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-7.0.1.tgz", - "integrity": "sha512-kLjThirJMkWKutUKbZ8ViqFc09tDQhlbQo2MNuVeLWbRauqYP96Sm6nzlQ24F0HFjUNZ4i9+AgldJ9H6DZXi7g==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-7.3.0.tgz", + "integrity": "sha512-k9lSsjl36EJdK7I06v7APZCbyGT2vMTsYSRX1Q2nbYmnkBqgUhRkAuzH08Ciotteu/PLJmIF2+tti7o3C/ts2g==", "dev": true, "license": "MIT", "engines": { @@ -7903,10 +8422,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/crawlee/node_modules/undici": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.25.0.tgz", + "integrity": "sha512-xXnp4kTyor2Zq+J1FfPI6Eq3ew5h6Vl0F/8d9XU5zZQf1tX9s2Su1/3PiMmUANFULpmksxkClamIZcaUqryHsQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.18.1" + } + }, "node_modules/crawlee/node_modules/yocto-queue": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz", - "integrity": "sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz", + "integrity": "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==", "dev": true, "license": "MIT", "engines": { @@ -8540,9 +9069,9 @@ } }, "node_modules/encoding-sniffer": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz", - "integrity": "sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.1.tgz", + "integrity": "sha512-5gvq20T6vfpekVtqrYQsSCFZ1wEg5+wW0/QaZMWkFr6BqD3NfKs0rLCx4rrVlSWJeZb5NBJgVLswK/w2MWU+Gw==", "license": "MIT", "dependencies": { "iconv-lite": "^0.6.3", @@ -9571,25 +10100,6 @@ "pend": "~1.2.0" } }, - "node_modules/fflate": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", - "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", - "license": "MIT" - }, - "node_modules/figlet": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.8.1.tgz", - "integrity": "sha512-kEC3Sme+YvA8Hkibv0NR1oClGcWia0VB2fC1SlMy027cwe795Xx40Xiv/nw/iFAwQLupymWh+uhAAErn/7hwPg==", - "dev": true, - "license": "MIT", - "bin": { - "figlet": "bin/index.js" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -9630,18 +10140,18 @@ } }, "node_modules/file-type": { - "version": "20.5.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-20.5.0.tgz", - "integrity": "sha512-BfHZtG/l9iMm4Ecianu7P8HRD2tBHLtjXinm4X62XBOYzi7CYA7jyqfJzOvXHqzVrVPYqBo2/GvbARMaaJkKVg==", + "version": "21.3.4", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.3.4.tgz", + "integrity": "sha512-Ievi/yy8DS3ygGvT47PjSfdFoX+2isQueoYP1cntFW1JLYAuS4GD7NUPGg4zv2iZfV52uDyk5w5Z0TdpRS6Q1g==", "license": "MIT", "dependencies": { - "@tokenizer/inflate": "^0.2.6", - "strtok3": "^10.2.0", - "token-types": "^6.0.0", + "@tokenizer/inflate": "^0.4.1", + "strtok3": "^10.3.4", + "token-types": "^6.1.1", "uint8array-extras": "^1.4.0" }, "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/sindresorhus/file-type?sponsor=1" @@ -9712,14 +10222,14 @@ } }, "node_modules/fingerprint-generator": { - "version": "2.1.66", - "resolved": "https://registry.npmjs.org/fingerprint-generator/-/fingerprint-generator-2.1.66.tgz", - "integrity": "sha512-2CvoY+OPcCOWkoIMQim80uNH+ED1+2rM9QXIcSih7ovBMLOmyr3Sp9IOtfccd05QlGDzulU2M9Oav8jOgTlCBA==", + "version": "2.1.82", + "resolved": "https://registry.npmjs.org/fingerprint-generator/-/fingerprint-generator-2.1.82.tgz", + "integrity": "sha512-5Z/yCKW324pMyMarpIKe/QPdkrFWKNJv3ktdU+fXHri80+HAwNE6QhMvEvsMkK9Q8DeCXZlpPHV77UBa1nFb4A==", "dev": true, "license": "Apache-2.0", "dependencies": { - "generative-bayesian-network": "^2.1.66", - "header-generator": "^2.1.66", + "generative-bayesian-network": "^2.1.82", + "header-generator": "^2.1.82", "tslib": "^2.4.0" }, "engines": { @@ -9727,13 +10237,13 @@ } }, "node_modules/fingerprint-injector": { - "version": "2.1.66", - "resolved": "https://registry.npmjs.org/fingerprint-injector/-/fingerprint-injector-2.1.66.tgz", - "integrity": "sha512-h5llsoG0xoDeEo2czjzvo1niEU0xgCMwhs5/jtAxiBf7IiP/wW1Is3DJMEB+4V4PwIvqNQqLlnD07X23D7tErA==", + "version": "2.1.82", + "resolved": "https://registry.npmjs.org/fingerprint-injector/-/fingerprint-injector-2.1.82.tgz", + "integrity": "sha512-FN7W1wbhHk2PBCF6wpBEcFnmOdGUItZnbpVBtYVcQ1/iGM0skNUDqJyH1YOjmpQiqEl2Rhh7qWNXYsivjsT+tg==", "dev": true, "license": "Apache-2.0", "dependencies": { - "fingerprint-generator": "^2.1.66", + "fingerprint-generator": "^2.1.82", "tslib": "^2.4.0" }, "engines": { @@ -10029,9 +10539,9 @@ } }, "node_modules/generative-bayesian-network": { - "version": "2.1.66", - "resolved": "https://registry.npmjs.org/generative-bayesian-network/-/generative-bayesian-network-2.1.66.tgz", - "integrity": "sha512-gbBsyaaEJj/LHp3473TQrMDdcKiRzI8Sn2CbcG/lwONZkp0n9/ChC1mjzcbZQtHHCuqjn+JouSSbzLeepUMbuw==", + "version": "2.1.82", + "resolved": "https://registry.npmjs.org/generative-bayesian-network/-/generative-bayesian-network-2.1.82.tgz", + "integrity": "sha512-DH4NrmQheoMaJErdVv2IzaqkbOYSDQZmiZTV6UPDJYRDK2EyPpIQ88XRcYdPeFrUjS1N0Jj25H3HUywoJ1dbow==", "license": "Apache-2.0", "dependencies": { "adm-zip": "^0.5.9", @@ -10857,9 +11367,9 @@ } }, "node_modules/got-scraping": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/got-scraping/-/got-scraping-4.1.1.tgz", - "integrity": "sha512-MbT+NMMU4VgvOg2tFIPOSIrMfH986fm0LJ17RxBLKlyTs3gh3xIMETpe+zdPaXY7tH1j6YYeqtfG0TnVMx6V2g==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/got-scraping/-/got-scraping-4.2.1.tgz", + "integrity": "sha512-rhOlO1L4H4Cm31smHJqPtAaXOUrhSKsiTrbZSHKFQW1E/mkTDopnHHpRnXJpqzE0faj+zPsVQnyifIqO+K+cLQ==", "license": "Apache-2.0", "dependencies": { "got": "^14.2.1", @@ -11001,29 +11511,6 @@ "node": ">=6" } }, - "node_modules/has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-ansi/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/has-bigints": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", @@ -11123,13 +11610,13 @@ } }, "node_modules/header-generator": { - "version": "2.1.66", - "resolved": "https://registry.npmjs.org/header-generator/-/header-generator-2.1.66.tgz", - "integrity": "sha512-g0jd79o0CyzyK0Jega4pAG1eJhykhPNfBLpOnUINtX2YkToVvRSBZ+B2wtmIjqwKHXK8DNWxylKuXnZmLs1yMQ==", + "version": "2.1.82", + "resolved": "https://registry.npmjs.org/header-generator/-/header-generator-2.1.82.tgz", + "integrity": "sha512-4NjPB0+bAKjPoponSmTOkK58IEF2W22sOJA5O48k/MxbCZgOm+jrU4WVR53Z2I6xFgIPkVrQmKtt1LAbWtfqXw==", "license": "Apache-2.0", "dependencies": { "browserslist": "^4.21.1", - "generative-bayesian-network": "^2.1.66", + "generative-bayesian-network": "^2.1.82", "ow": "^0.28.1", "tslib": "^2.4.0" }, @@ -11301,11 +11788,11 @@ } }, "node_modules/idcac-playwright": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/idcac-playwright/-/idcac-playwright-0.1.3.tgz", - "integrity": "sha512-VVYQ4sv6OrUJKVzYaIP1hq0qAHd1O22HW5LnL1Wf6zkrLStQ/QEg4iJ0rllIOEpd+Rmm+635AJD59A+Vw+2PgQ==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/idcac-playwright/-/idcac-playwright-0.2.0.tgz", + "integrity": "sha512-qJH7vQgq3TKnhea/3Z3jlEJL7NC9vK9BkLClAzQHVRepBtq1fWfSI4fSuMKcPq7nDUTTlIEIS+vU+GRwwR1BXw==", "dev": true, - "license": "ISC" + "license": "GPL-3.0-only" }, "node_modules/identifier-regex": { "version": "1.0.0", @@ -11608,9 +12095,9 @@ } }, "node_modules/is-any-array": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-any-array/-/is-any-array-2.0.1.tgz", - "integrity": "sha512-UtilS7hLRu++wb/WBAw9bNuP1Eg04Ivn1vERJck8zJthEvXCBEBpGR/33u/xLKWEQf95803oalHrVDptcAvFdQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-any-array/-/is-any-array-3.0.0.tgz", + "integrity": "sha512-o4h+tylWykC4BD1vaejp6gDxoM13bwW8FGuNs4yIKpj8xbBJcRxJx8vZpq0dCr7ZDEfeKjmsi/euolKhX6f/ww==", "dev": true, "license": "MIT" }, @@ -12964,9 +13451,9 @@ } }, "node_modules/linkedom": { - "version": "0.18.10", - "resolved": "https://registry.npmjs.org/linkedom/-/linkedom-0.18.10.tgz", - "integrity": "sha512-ESCqVAtme2GI3zZnlVRidiydByV6WmPlmKeFzFVQslADiAO2Wi+H6xL/5kr/pUOESjEoVb2Eb3cYFJ/TQhQOWA==", + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/linkedom/-/linkedom-0.18.12.tgz", + "integrity": "sha512-jalJsOwIKuQJSeTvsgzPe9iJzyfVaEJiEXl+25EkKevsULHvMJzpNqwvj1jOESWdmgKDiXObyjOYwlUqG7wo1Q==", "dev": true, "license": "ISC", "dependencies": { @@ -12975,12 +13462,23 @@ "html-escaper": "^3.0.3", "htmlparser2": "^10.0.0", "uhyphen": "^0.2.0" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "canvas": ">= 2" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } } }, "node_modules/linkedom/node_modules/entities": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.0.tgz", - "integrity": "sha512-aKstq2TDOndCn4diEyp9Uq/Flu2i1GlLkc6XIDQSDMuaFE3OPW5OphLCyQ5SpSJZTb4reN+kTcYru5yIfXoRPw==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -12991,9 +13489,9 @@ } }, "node_modules/linkedom/node_modules/htmlparser2": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.0.0.tgz", - "integrity": "sha512-TwAZM+zE5Tq3lrEHvOlvwgj1XLWQCtaaibSN11Q+gGBAS7Y1uZSWwXXRe4iF6OXnaq1riyQAPFOBtYc77Mxq0g==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.1.0.tgz", + "integrity": "sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==", "dev": true, "funding": [ "https://github.com/fb55/htmlparser2?sponsor=1", @@ -13006,8 +13504,8 @@ "dependencies": { "domelementtype": "^2.3.0", "domhandler": "^5.0.3", - "domutils": "^3.2.1", - "entities": "^6.0.0" + "domutils": "^3.2.2", + "entities": "^7.0.1" } }, "node_modules/lint-staged": { @@ -13991,35 +14489,35 @@ } }, "node_modules/ml-array-max": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/ml-array-max/-/ml-array-max-1.2.4.tgz", - "integrity": "sha512-BlEeg80jI0tW6WaPyGxf5Sa4sqvcyY6lbSn5Vcv44lp1I2GR6AWojfUvLnGTNsIXrZ8uqWmo8VcG1WpkI2ONMQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ml-array-max/-/ml-array-max-2.0.0.tgz", + "integrity": "sha512-QQZ4kENwpWmyNb98UXRDFXrmtIXuXtt1+bSbda/2KA85+F+rrJP8hZk6QOkCQXM2Th9mUDYdq/PNByPdT9ID4A==", "dev": true, "license": "MIT", "dependencies": { - "is-any-array": "^2.0.0" + "is-any-array": "^3.0.0" } }, "node_modules/ml-array-min": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/ml-array-min/-/ml-array-min-1.2.3.tgz", - "integrity": "sha512-VcZ5f3VZ1iihtrGvgfh/q0XlMobG6GQ8FsNyQXD3T+IlstDv85g8kfV0xUG1QPRO/t21aukaJowDzMTc7j5V6Q==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ml-array-min/-/ml-array-min-2.0.0.tgz", + "integrity": "sha512-GRj6Ky6sW9vGL6yIjgsHmXZ9YgrdmcQ8nCxPqEGeKc6dkfYg1XDYxGFxADUjNuZyoCd5PUscWAS4N+cFaX6hFg==", "dev": true, "license": "MIT", "dependencies": { - "is-any-array": "^2.0.0" + "is-any-array": "^3.0.0" } }, "node_modules/ml-array-rescale": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ml-array-rescale/-/ml-array-rescale-1.3.7.tgz", - "integrity": "sha512-48NGChTouvEo9KBctDfHC3udWnQKNKEWN0ziELvY3KG25GR5cA8K8wNVzracsqSW1QEkAXjTNx+ycgAv06/1mQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ml-array-rescale/-/ml-array-rescale-2.0.0.tgz", + "integrity": "sha512-2GGtKfSno94/kIloWGvpp/U5Q5vLvLrza+SAaGsLeo6Xj4mEbA6Gqx+oTfZFkxnd1grT2X007HfJNs3T5BsiVg==", "dev": true, "license": "MIT", "dependencies": { - "is-any-array": "^2.0.0", - "ml-array-max": "^1.2.4", - "ml-array-min": "^1.2.3" + "is-any-array": "^3.0.0", + "ml-array-max": "^2.0.0", + "ml-array-min": "^2.0.0" } }, "node_modules/ml-logistic-regression": { @@ -14033,14 +14531,14 @@ } }, "node_modules/ml-matrix": { - "version": "6.12.1", - "resolved": "https://registry.npmjs.org/ml-matrix/-/ml-matrix-6.12.1.tgz", - "integrity": "sha512-TJ+8eOFdp+INvzR4zAuwBQJznDUfktMtOB6g/hUcGh3rcyjxbz4Te57Pgri8Q9bhSQ7Zys4IYOGhFdnlgeB6Lw==", + "version": "6.12.2", + "resolved": "https://registry.npmjs.org/ml-matrix/-/ml-matrix-6.12.2.tgz", + "integrity": "sha512-GC+BnW+pBh8Auap8goAxY0senAmF0IEoc3HNVSfnfbvGw0buuDIYb9kAKMS1l+GiwJ1rfK2bzJ8IHhwjzATSFA==", "dev": true, "license": "MIT", "dependencies": { - "is-any-array": "^2.0.1", - "ml-array-rescale": "^1.3.7" + "is-any-array": "^3.0.0", + "ml-array-rescale": "^2.0.0" } }, "node_modules/modify-values": { @@ -15307,15 +15805,6 @@ "node": ">=6" } }, - "node_modules/parent-require": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parent-require/-/parent-require-1.0.0.tgz", - "integrity": "sha512-2MXDNZC4aXdkkap+rBBMv0lUsfJqvX5/2FiYYnfCnorZt3Pk06/IOR5KeaoghgS2w07MLWgjbsnyaq6PdHn2LQ==", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/parse-conflict-json": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/parse-conflict-json/-/parse-conflict-json-3.0.1.tgz", @@ -15519,19 +16008,6 @@ "through": "~2.3" } }, - "node_modules/peek-readable": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-7.0.0.tgz", - "integrity": "sha512-nri2TO5JE3/mRryik9LlHFT53cgHfRK0Lt0BAZQXku/AW3E6XLt2GaY8siWi7dvW/m1z0ecn+J+bpDa9ZN3IsQ==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, "node_modules/pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", @@ -15965,9 +16441,9 @@ } }, "node_modules/proxy-chain": { - "version": "2.5.8", - "resolved": "https://registry.npmjs.org/proxy-chain/-/proxy-chain-2.5.8.tgz", - "integrity": "sha512-TqKOYRD/1Gga/JhiwmdYHJoj0zMJkKGofQ9bHQuSm+vexczatt81fkUHTVMyci+2mWczXiTNv1Eom+2v3Da5og==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/proxy-chain/-/proxy-chain-2.7.1.tgz", + "integrity": "sha512-LtXu0miohJYrHWJxv8wA6EoGreRcX1hxKb7qlE1pMFH+BXE7bqMvpyhzR/JvR6M5SzYKzyHFpvfmYJrZeMtwAg==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -17611,13 +18087,12 @@ } }, "node_modules/strtok3": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-10.2.2.tgz", - "integrity": "sha512-Xt18+h4s7Z8xyZ0tmBoRmzxcop97R4BAh+dXouUDCYn+Em+1P3qpkUfI5ueWLT8ynC5hZ+q4iPEmGG1urvQGBg==", + "version": "10.3.5", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-10.3.5.tgz", + "integrity": "sha512-ki4hZQfh5rX0QDLLkOCj+h+CVNkqmp/CMf8v8kZpkNVK6jGQooMytqzLZYUVYIZcFZ6yDB70EfD8POcFXiF5oA==", "license": "MIT", "dependencies": { - "@tokenizer/token": "^0.3.0", - "peek-readable": "^7.0.0" + "@tokenizer/token": "^0.3.0" }, "engines": { "node": ">=18" @@ -18020,11 +18495,12 @@ } }, "node_modules/token-types": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/token-types/-/token-types-6.0.0.tgz", - "integrity": "sha512-lbDrTLVsHhOMljPscd0yitpozq7Ga2M5Cvez5AjGg8GASBjtt6iERCAJ93yommPmz62fb45oFIXHEZ3u9bfJEA==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-6.1.2.tgz", + "integrity": "sha512-dRXchy+C0IgK8WPC6xvCHFRIWYUbqqdEIKPaKo/AcTUNzwLTK6AH7RjdLWsEZcAN/TBdtfUw3PYEgPr5VPr6ww==", "license": "MIT", "dependencies": { + "@borewit/text-codec": "^0.2.1", "@tokenizer/token": "^0.3.0", "ieee754": "^1.2.1" }, @@ -18040,6 +18516,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.2.tgz", "integrity": "sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A==", + "dev": true, "license": "BSD-3-Clause", "dependencies": { "tldts": "^6.1.32" @@ -18052,6 +18529,7 @@ "version": "6.1.86", "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.86.tgz", "integrity": "sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==", + "dev": true, "license": "MIT", "dependencies": { "tldts-core": "^6.1.86" @@ -18064,6 +18542,7 @@ "version": "6.1.86", "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.86.tgz", "integrity": "sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==", + "dev": true, "license": "MIT" }, "node_modules/tr46": { @@ -18521,9 +19000,9 @@ "license": "ISC" }, "node_modules/uint8array-extras": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/uint8array-extras/-/uint8array-extras-1.4.0.tgz", - "integrity": "sha512-ZPtzy0hu4cZjv3z5NW9gfKnNLjoz4y6uv4HlelAjDK7sY/xOkKZv9xK/WQpcsBB3jEybChz9DPC2U/+cusjJVQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/uint8array-extras/-/uint8array-extras-1.5.0.tgz", + "integrity": "sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==", "license": "MIT", "engines": { "node": ">=18" @@ -19894,88 +20373,6 @@ "node": ">= 14.6" } }, - "node_modules/yargonaut": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/yargonaut/-/yargonaut-1.1.4.tgz", - "integrity": "sha512-rHgFmbgXAAzl+1nngqOcwEljqHGG9uUZoPjsdZEs1w5JW9RXYzrSvH/u70C1JE5qFi0qjsdhnUX/dJRpWqitSA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "chalk": "^1.1.1", - "figlet": "^1.1.1", - "parent-require": "^1.0.0" - } - }, - "node_modules/yargonaut/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yargonaut/node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yargonaut/node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yargonaut/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/yargonaut/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yargonaut/node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", @@ -20030,9 +20427,9 @@ } }, "node_modules/yoctocolors-cjs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz", - "integrity": "sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz", + "integrity": "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==", "dev": true, "license": "MIT", "engines": { @@ -20185,9 +20582,9 @@ "@apify/log": "^2.5.18", "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/core": "^4.0.0-beta.0", - "@crawlee/types": "^4.0.0-beta.0", - "@crawlee/utils": "^4.0.0-beta.0", + "@crawlee/core": "^4.0.0-beta.49", + "@crawlee/types": "^4.0.0-beta.49", + "@crawlee/utils": "^4.0.0-beta.49", "apify-client": "^2.12.4", "fs-extra": "^11.3.0", "got-scraping": "^4.1.1", diff --git a/package.json b/package.json index 22528a5dce..9fed883e8f 100644 --- a/package.json +++ b/package.json @@ -78,10 +78,10 @@ "@types/tough-cookie": "^4.0.5", "@types/ws": "^8.18.1", "commitlint": "^19.8.1", - "crawlee": "^4.0.0-beta.0", - "@crawlee/core": "^4.0.0-beta.0", - "@crawlee/types": "^4.0.0-beta.0", - "@crawlee/utils": "^4.0.0-beta.0", + "crawlee": "^4.0.0-beta.49", + "@crawlee/core": "^4.0.0-beta.49", + "@crawlee/types": "^4.0.0-beta.49", + "@crawlee/utils": "^4.0.0-beta.49", "eslint": "^9.27.0", "eslint-config-prettier": "^10.1.5", "fs-extra": "^11.3.0", diff --git a/packages/apify/package.json b/packages/apify/package.json index ebb8146b6d..7cea7e856d 100644 --- a/packages/apify/package.json +++ b/packages/apify/package.json @@ -53,9 +53,9 @@ "@apify/log": "^2.5.18", "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/core": "^4.0.0-beta.0", - "@crawlee/types": "^4.0.0-beta.0", - "@crawlee/utils": "^4.0.0-beta.0", + "@crawlee/core": "^4.0.0-beta.49", + "@crawlee/types": "^4.0.0-beta.49", + "@crawlee/utils": "^4.0.0-beta.49", "apify-client": "^2.12.4", "fs-extra": "^11.3.0", "got-scraping": "^4.1.1", diff --git a/packages/apify/src/actor.ts b/packages/apify/src/actor.ts index f75a3a64fd..86fd1b9dce 100644 --- a/packages/apify/src/actor.ts +++ b/packages/apify/src/actor.ts @@ -1467,9 +1467,6 @@ export class Actor { * @ignore */ newClient(options: ApifyClientOptions = {}): ApifyClient { - const { storageDir, ...storageClientOptions } = (this.config.get( - 'storageClientOptions', - ) ?? {}) as Dictionary; const { apifyVersion, crawleeVersion } = getSystemInfo(); return new ApifyClient({ baseUrl: this.config.apiBaseUrl, @@ -1478,7 +1475,6 @@ export class Actor { `SDK/${apifyVersion}`, `Crawlee/${crawleeVersion}`, ], - ...storageClientOptions, ...options, // allow overriding the instance configuration }); } diff --git a/packages/apify/src/configuration.ts b/packages/apify/src/configuration.ts index 4228f5d93b..d50aec13ec 100644 --- a/packages/apify/src/configuration.ts +++ b/packages/apify/src/configuration.ts @@ -4,6 +4,7 @@ import { AsyncLocalStorage } from 'node:async_hooks'; import type { ConfigField, FieldsInput, FieldsOutput } from '@crawlee/core'; import { coerceBoolean, + coerceNumber, Configuration as CoreConfiguration, crawleeConfigFields, field, @@ -17,11 +18,6 @@ import { LOCAL_APIFY_ENV_VARS, } from '@apify/consts'; -const coerceNumber = z.preprocess((val) => { - if (typeof val === 'string') return Number(val); - return val; -}, z.number()); - // --- isAtHome check (simple env var presence) --- const isAtHome = !!process.env[APIFY_ENV_VARS.IS_AT_HOME]; From 9d11039556a3de40ae924b03a2d0eb55accd2338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Thu, 30 Apr 2026 18:18:30 +0200 Subject: [PATCH 05/27] test(actor): reset service locator and Actor singleton between newClient cases Crawlee v4's Configuration resolves env vars eagerly at construction, so the existing 'Actor.newClient() reads environment variables correctly' test reads stale values once a prior test or import-time side effect has already created the singleton. Reset both before each case. --- test/apify/utils.test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/apify/utils.test.ts b/test/apify/utils.test.ts index acff5f2324..325d400cc4 100644 --- a/test/apify/utils.test.ts +++ b/test/apify/utils.test.ts @@ -1,6 +1,7 @@ import type { IncomingMessage } from 'node:http'; import type { Request } from '@crawlee/core'; +import { serviceLocator } from '@crawlee/core'; import { createRequestDebugInfo } from '@crawlee/utils'; import { Actor } from 'apify'; import semver from 'semver'; @@ -21,6 +22,15 @@ describe('Actor.isAtHome()', () => { }); describe('Actor.newClient()', () => { + // crawlee v4's `Configuration` resolves env vars eagerly at construction, + // so tests that mutate env vars after the global config / Actor singleton + // exists would otherwise read stale values. Reset both so each test + // observes the env it just wrote. + beforeEach(() => { + serviceLocator.reset(); + (Actor as unknown as { _instance?: Actor })._instance = undefined; + }); + test('reads environment variables correctly', () => { process.env[APIFY_ENV_VARS.API_BASE_URL] = 'http://www.example.com:1234/path'; From be6811fc1ad739ac73c484df74b28957292f9894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Thu, 30 Apr 2026 18:30:13 +0200 Subject: [PATCH 06/27] test: also reset SDK Configuration.globalConfig between cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The SDK's `Configuration` keeps its own static singleton separate from crawlee's serviceLocator. Resetting only the locator wasn't enough — `Configuration.getGlobalConfig()` still handed back the stale cached SDK config (which was built before the test set `APIFY_TOKEN`). --- test/apify/utils.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/apify/utils.test.ts b/test/apify/utils.test.ts index 325d400cc4..897f23d0c7 100644 --- a/test/apify/utils.test.ts +++ b/test/apify/utils.test.ts @@ -3,7 +3,7 @@ import type { IncomingMessage } from 'node:http'; import type { Request } from '@crawlee/core'; import { serviceLocator } from '@crawlee/core'; import { createRequestDebugInfo } from '@crawlee/utils'; -import { Actor } from 'apify'; +import { Actor, Configuration } from 'apify'; import semver from 'semver'; import { APIFY_ENV_VARS } from '@apify/consts'; @@ -28,6 +28,9 @@ describe('Actor.newClient()', () => { // observes the env it just wrote. beforeEach(() => { serviceLocator.reset(); + // The SDK's `Configuration` keeps its own static singleton (separate + // from crawlee's serviceLocator) so tests need to clear that cache too. + (Configuration as unknown as { globalConfig?: Configuration }).globalConfig = undefined; (Actor as unknown as { _instance?: Actor })._instance = undefined; }); From 58ce5364c8a40146752f865161bbaab8b8eb868a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Thu, 30 Apr 2026 18:35:21 +0200 Subject: [PATCH 07/27] chore: silence no-underscore-dangle for Actor._instance reset --- test/apify/utils.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/test/apify/utils.test.ts b/test/apify/utils.test.ts index 897f23d0c7..7b6491a3e2 100644 --- a/test/apify/utils.test.ts +++ b/test/apify/utils.test.ts @@ -31,6 +31,7 @@ describe('Actor.newClient()', () => { // The SDK's `Configuration` keeps its own static singleton (separate // from crawlee's serviceLocator) so tests need to clear that cache too. (Configuration as unknown as { globalConfig?: Configuration }).globalConfig = undefined; + // eslint-disable-next-line no-underscore-dangle -- `_instance` is the upstream Actor singleton field (Actor as unknown as { _instance?: Actor })._instance = undefined; }); From 5a34b349d8175c0c9c47db80ecaf961398c94c19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Thu, 30 Apr 2026 19:11:55 +0200 Subject: [PATCH 08/27] chore: prettier --- test/apify/utils.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/apify/utils.test.ts b/test/apify/utils.test.ts index 7b6491a3e2..b7c051badd 100644 --- a/test/apify/utils.test.ts +++ b/test/apify/utils.test.ts @@ -30,7 +30,9 @@ describe('Actor.newClient()', () => { serviceLocator.reset(); // The SDK's `Configuration` keeps its own static singleton (separate // from crawlee's serviceLocator) so tests need to clear that cache too. - (Configuration as unknown as { globalConfig?: Configuration }).globalConfig = undefined; + ( + Configuration as unknown as { globalConfig?: Configuration } + ).globalConfig = undefined; // eslint-disable-next-line no-underscore-dangle -- `_instance` is the upstream Actor singleton field (Actor as unknown as { _instance?: Actor })._instance = undefined; }); From b42b603f6c20305fcc21045cc7fc49b1869c3212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Thu, 30 Apr 2026 19:17:26 +0200 Subject: [PATCH 09/27] test(actor): adapt to crawlee v4 eager Configuration resolution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Reword "empty string maxTotalChargeUsd" assertion: under Option A the empty env var is now treated as unset, so `config.maxTotalChargeUsd` is `undefined` (charging manager still defaults to Infinity). - Actor.getInput tests now build a fresh Actor *after* setting the env vars they exercise — eager config resolution means a single module-scoped TestingActor would carry stale values. --- test/apify/actor.test.ts | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/test/apify/actor.test.ts b/test/apify/actor.test.ts index f1b88fc281..293fafb3cb 100644 --- a/test/apify/actor.test.ts +++ b/test/apify/actor.test.ts @@ -1182,9 +1182,14 @@ describe('Actor', () => { }); describe('Actor.getInput', () => { - const TestingActor = new Actor(); + // crawlee v4's Configuration resolves env vars eagerly at + // construction, so anything that needs to read env-var-driven + // config (like `inputKey` or `inputSecretsPrivateKey*`) must + // construct a fresh Actor *after* the env var is set. + const buildActor = () => new Actor(); test('should work', async () => { + const TestingActor = buildActor(); await expect(TestingActor.getInput()).resolves.toBeNull(); await expect(TestingActor.getInputOrThrow()).rejects.toThrowError( 'Input does not exist', @@ -1197,19 +1202,21 @@ describe('Actor', () => { await TestingActor.getInput(); - // Uses value from env var. + // Uses value from env var — needs a fresh Actor to pick it up. process.env[ACTOR_ENV_VARS.INPUT_KEY] = 'some-value'; - mockGetValue.mockImplementation(async (key) => + const ActorWithInputKey = buildActor(); + const mockGetValue2 = vitest.spyOn(ActorWithInputKey, 'getValue'); + mockGetValue2.mockImplementation(async (key) => expect(key).toBe('some-value'), ); - await TestingActor.getInput(); + await ActorWithInputKey.getInput(); delete process.env[ACTOR_ENV_VARS.INPUT_KEY]; mockGetValue.mockRestore(); + mockGetValue2.mockRestore(); }); test('should work with input secrets', async () => { - const mockGetValue = vitest.spyOn(TestingActor, 'getValue'); const originalInput = { secret: 'foo', nonSecret: 'bar' }; const likeInputSchema = { properties: { secret: { type: 'string', isSecret: true } }, @@ -1224,12 +1231,15 @@ describe('Actor', () => { expect(encryptedInput.secret.startsWith('ENCRYPTED_')).toBe(true); expect(encryptedInput.nonSecret).toBe(originalInput.nonSecret); - mockGetValue.mockImplementation(async (key) => encryptedInput); - + // Set the secrets env vars *before* constructing the Actor so + // the resolved config picks them up. process.env[APIFY_ENV_VARS.INPUT_SECRETS_PRIVATE_KEY_FILE] = testingPrivateKeyFile; process.env[APIFY_ENV_VARS.INPUT_SECRETS_PRIVATE_KEY_PASSPHRASE] = testingPrivateKeyPassphrase; + const TestingActor = buildActor(); + const mockGetValue = vitest.spyOn(TestingActor, 'getValue'); + mockGetValue.mockImplementation(async (key) => encryptedInput); const input = await TestingActor.getInput(); expect(input).toStrictEqual(originalInput); @@ -1283,10 +1293,15 @@ describe('Actor', () => { }); describe('Actor.config and PPE', () => { - test('empty string maxTotalChargeUsd coerces to 0, charging manager treats as Infinity', async () => { + test('empty string maxTotalChargeUsd is treated as unset, charging manager defaults to Infinity', async () => { + // crawlee v4 (Option A) treats empty-string env vars as unset + // rather than coercing them to `0` / `false` / `''`. The + // resolved config falls through to the schema default + // (undefined) and the charging manager interprets that as + // "no limit". process.env.ACTOR_MAX_TOTAL_CHARGE_USD = ''; await Actor.init(); - expect(Actor.config.maxTotalChargeUsd).toBe(0); + expect(Actor.config.maxTotalChargeUsd).toBeUndefined(); expect(Actor.getChargingManager().getMaxTotalChargeUsd()).toBe( Infinity, ); From 2d90549480bcf20fc2273187b7d8d725cd595405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Thu, 30 Apr 2026 19:18:34 +0200 Subject: [PATCH 10/27] test(getInput): reset cached singletons before each fresh Actor build --- test/apify/actor.test.ts | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/test/apify/actor.test.ts b/test/apify/actor.test.ts index 293fafb3cb..4503128728 100644 --- a/test/apify/actor.test.ts +++ b/test/apify/actor.test.ts @@ -1,6 +1,11 @@ import { createPublicKey } from 'node:crypto'; -import { Configuration, EventType, StorageManager } from '@crawlee/core'; +import { + Configuration, + EventType, + serviceLocator, + StorageManager, +} from '@crawlee/core'; import { sleep } from '@crawlee/utils'; import type { ApifyEnv } from 'apify'; import { Actor, Dataset, KeyValueStore, ProxyConfiguration } from 'apify'; @@ -1183,10 +1188,18 @@ describe('Actor', () => { describe('Actor.getInput', () => { // crawlee v4's Configuration resolves env vars eagerly at - // construction, so anything that needs to read env-var-driven - // config (like `inputKey` or `inputSecretsPrivateKey*`) must - // construct a fresh Actor *after* the env var is set. - const buildActor = () => new Actor(); + // construction, and both the SDK's static `Configuration.globalConfig` + // and `Actor._instance` are cached singletons. Build a fresh Actor + // for every env-var change so the resolved config picks them up. + const buildActor = () => { + serviceLocator.reset(); + ( + Configuration as unknown as { globalConfig?: Configuration } + ).globalConfig = undefined; + // eslint-disable-next-line no-underscore-dangle -- `_instance` is the upstream Actor singleton field + (Actor as unknown as { _instance?: Actor })._instance = undefined; + return new Actor(); + }; test('should work', async () => { const TestingActor = buildActor(); From 41e668926bd80335a8ec2661958fefdb743f30e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Thu, 30 Apr 2026 19:24:47 +0200 Subject: [PATCH 11/27] test(getInput): also overwrite actor.config explicitly for env-var refresh --- test/apify/actor.test.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/test/apify/actor.test.ts b/test/apify/actor.test.ts index 4503128728..ac28de741b 100644 --- a/test/apify/actor.test.ts +++ b/test/apify/actor.test.ts @@ -1188,9 +1188,12 @@ describe('Actor', () => { describe('Actor.getInput', () => { // crawlee v4's Configuration resolves env vars eagerly at - // construction, and both the SDK's static `Configuration.globalConfig` - // and `Actor._instance` are cached singletons. Build a fresh Actor - // for every env-var change so the resolved config picks them up. + // construction. The SDK's static `Configuration.globalConfig` and + // `Configuration.storage` (AsyncLocalStorage) plus `Actor._instance` + // can all hold onto a stale config across tests, so for each + // env-var change we both reset those singletons *and* explicitly + // overwrite `actor.config` with a fresh `new Configuration()` so + // env vars set in the test body are guaranteed to be observed. const buildActor = () => { serviceLocator.reset(); ( @@ -1198,7 +1201,10 @@ describe('Actor', () => { ).globalConfig = undefined; // eslint-disable-next-line no-underscore-dangle -- `_instance` is the upstream Actor singleton field (Actor as unknown as { _instance?: Actor })._instance = undefined; - return new Actor(); + const actor = new Actor(); + (actor as unknown as { config: Configuration }).config = + new Configuration(); + return actor; }; test('should work', async () => { From 09fdf11e56b30631ecb84f311d267ae96a722f70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Thu, 30 Apr 2026 19:33:32 +0200 Subject: [PATCH 12/27] test(actor): import SDK Configuration in test file (not crawlee's) Crawlee's Configuration uses crawleeConfigFields and only knows about `CRAWLEE_INPUT_KEY`. The SDK extension adds `ACTOR_INPUT_KEY` / `APIFY_INPUT_KEY` env-var aliases, which the test relies on. Importing Configuration from 'apify' makes `new Configuration()` inside buildActor() resolve those env vars correctly. --- test/apify/actor.test.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/apify/actor.test.ts b/test/apify/actor.test.ts index ac28de741b..14565498db 100644 --- a/test/apify/actor.test.ts +++ b/test/apify/actor.test.ts @@ -1,14 +1,15 @@ import { createPublicKey } from 'node:crypto'; -import { - Configuration, - EventType, - serviceLocator, - StorageManager, -} from '@crawlee/core'; +import { EventType, serviceLocator, StorageManager } from '@crawlee/core'; import { sleep } from '@crawlee/utils'; import type { ApifyEnv } from 'apify'; -import { Actor, Dataset, KeyValueStore, ProxyConfiguration } from 'apify'; +import { + Actor, + Configuration, + Dataset, + KeyValueStore, + ProxyConfiguration, +} from 'apify'; import type { WebhookUpdateData } from 'apify-client'; import { ActorClient, ApifyClient, RunClient, TaskClient } from 'apify-client'; From 5b6598accc55816ea8db8467ca2ba9f38f7a6a4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Thu, 30 Apr 2026 19:45:07 +0200 Subject: [PATCH 13/27] =?UTF-8?q?chore:=20add=20cheerio=20as=20devDep=20?= =?UTF-8?q?=E2=80=94=20workaround=20missing=20@crawlee/linkedom=20dep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `@crawlee/linkedom@4.0.0-beta.49`'s `linkedom-crawler.js` imports `cheerio` without declaring it as a dependency. Locally this works when a parent directory has cheerio installed; CI's fresh install fails. Adding it directly here keeps tests green until the upstream package fixes the missing dep declaration. --- package-lock.json | 418 +++++++--------------------------------------- package.json | 7 +- 2 files changed, 65 insertions(+), 360 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8923e74741..4f9107adf9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,6 +26,7 @@ "@types/semver": "^7.7.0", "@types/tough-cookie": "^4.0.5", "@types/ws": "^8.18.1", + "cheerio": "^1.2.0", "commitlint": "^19.8.1", "crawlee": "^4.0.0-beta.49", "eslint": "^9.27.0", @@ -492,75 +493,6 @@ "node": ">=22.0.0" } }, - "node_modules/@crawlee/cheerio/node_modules/cheerio": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.2.0.tgz", - "integrity": "sha512-WDrybc/gKFpTYQutKIK6UvfcuxijIZfMfXaYm8NMsPQxSYvf+13fXUJ4rztGGbJcBQ/GF55gvrZ0Bc0bj/mqvg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.2.2", - "encoding-sniffer": "^0.2.1", - "htmlparser2": "^10.1.0", - "parse5": "^7.3.0", - "parse5-htmlparser2-tree-adapter": "^7.1.0", - "parse5-parser-stream": "^7.1.2", - "undici": "^7.19.0", - "whatwg-mimetype": "^4.0.0" - }, - "engines": { - "node": ">=20.18.1" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" - } - }, - "node_modules/@crawlee/cheerio/node_modules/entities": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", - "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/@crawlee/cheerio/node_modules/htmlparser2": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.1.0.tgz", - "integrity": "sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.2.2", - "entities": "^7.0.1" - } - }, - "node_modules/@crawlee/cheerio/node_modules/undici": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.25.0.tgz", - "integrity": "sha512-xXnp4kTyor2Zq+J1FfPI6Eq3ew5h6Vl0F/8d9XU5zZQf1tX9s2Su1/3PiMmUANFULpmksxkClamIZcaUqryHsQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=20.18.1" - } - }, "node_modules/@crawlee/cli": { "version": "4.0.0-beta.49", "resolved": "https://registry.npmjs.org/@crawlee/cli/-/cli-4.0.0-beta.49.tgz", @@ -965,32 +897,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@crawlee/http/node_modules/cheerio": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.2.0.tgz", - "integrity": "sha512-WDrybc/gKFpTYQutKIK6UvfcuxijIZfMfXaYm8NMsPQxSYvf+13fXUJ4rztGGbJcBQ/GF55gvrZ0Bc0bj/mqvg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.2.2", - "encoding-sniffer": "^0.2.1", - "htmlparser2": "^10.1.0", - "parse5": "^7.3.0", - "parse5-htmlparser2-tree-adapter": "^7.1.0", - "parse5-parser-stream": "^7.1.2", - "undici": "^7.19.0", - "whatwg-mimetype": "^4.0.0" - }, - "engines": { - "node": ">=20.18.1" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" - } - }, "node_modules/@crawlee/http/node_modules/dot-prop": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-8.0.2.tgz", @@ -1020,39 +926,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@crawlee/http/node_modules/entities": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", - "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/@crawlee/http/node_modules/htmlparser2": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.1.0.tgz", - "integrity": "sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.2.2", - "entities": "^7.0.1" - } - }, "node_modules/@crawlee/http/node_modules/iconv-lite": { "version": "0.7.2", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", @@ -1118,16 +991,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@crawlee/http/node_modules/undici": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.25.0.tgz", - "integrity": "sha512-xXnp4kTyor2Zq+J1FfPI6Eq3ew5h6Vl0F/8d9XU5zZQf1tX9s2Su1/3PiMmUANFULpmksxkClamIZcaUqryHsQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=20.18.1" - } - }, "node_modules/@crawlee/jsdom": { "version": "4.0.0-beta.49", "resolved": "https://registry.npmjs.org/@crawlee/jsdom/-/jsdom-4.0.0-beta.49.tgz", @@ -1176,32 +1039,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@crawlee/jsdom/node_modules/cheerio": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.2.0.tgz", - "integrity": "sha512-WDrybc/gKFpTYQutKIK6UvfcuxijIZfMfXaYm8NMsPQxSYvf+13fXUJ4rztGGbJcBQ/GF55gvrZ0Bc0bj/mqvg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.2.2", - "encoding-sniffer": "^0.2.1", - "htmlparser2": "^10.1.0", - "parse5": "^7.3.0", - "parse5-htmlparser2-tree-adapter": "^7.1.0", - "parse5-parser-stream": "^7.1.2", - "undici": "^7.19.0", - "whatwg-mimetype": "^4.0.0" - }, - "engines": { - "node": ">=20.18.1" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" - } - }, "node_modules/@crawlee/jsdom/node_modules/dot-prop": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-8.0.2.tgz", @@ -1218,39 +1055,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@crawlee/jsdom/node_modules/entities": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", - "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/@crawlee/jsdom/node_modules/htmlparser2": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.1.0.tgz", - "integrity": "sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.2.2", - "entities": "^7.0.1" - } - }, "node_modules/@crawlee/jsdom/node_modules/ow": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ow/-/ow-2.0.0.tgz", @@ -1285,16 +1089,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@crawlee/jsdom/node_modules/undici": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.25.0.tgz", - "integrity": "sha512-xXnp4kTyor2Zq+J1FfPI6Eq3ew5h6Vl0F/8d9XU5zZQf1tX9s2Su1/3PiMmUANFULpmksxkClamIZcaUqryHsQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=20.18.1" - } - }, "node_modules/@crawlee/linkedom": { "version": "4.0.0-beta.49", "resolved": "https://registry.npmjs.org/@crawlee/linkedom/-/linkedom-4.0.0-beta.49.tgz", @@ -1549,31 +1343,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@crawlee/utils/node_modules/cheerio": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0.tgz", - "integrity": "sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==", - "license": "MIT", - "dependencies": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.1.0", - "encoding-sniffer": "^0.2.0", - "htmlparser2": "^9.1.0", - "parse5": "^7.1.2", - "parse5-htmlparser2-tree-adapter": "^7.0.0", - "parse5-parser-stream": "^7.1.2", - "undici": "^6.19.5", - "whatwg-mimetype": "^4.0.0" - }, - "engines": { - "node": ">=18.17" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" - } - }, "node_modules/@crawlee/utils/node_modules/dot-prop": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-8.0.2.tgz", @@ -1589,25 +1358,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@crawlee/utils/node_modules/htmlparser2": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz", - "integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==", - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.1.0", - "entities": "^4.5.0" - } - }, "node_modules/@crawlee/utils/node_modules/ow": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ow/-/ow-2.0.0.tgz", @@ -6470,6 +6220,31 @@ "node": ">= 16" } }, + "node_modules/cheerio": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.2.0.tgz", + "integrity": "sha512-WDrybc/gKFpTYQutKIK6UvfcuxijIZfMfXaYm8NMsPQxSYvf+13fXUJ4rztGGbJcBQ/GF55gvrZ0Bc0bj/mqvg==", + "license": "MIT", + "dependencies": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.2", + "encoding-sniffer": "^0.2.1", + "htmlparser2": "^10.1.0", + "parse5": "^7.3.0", + "parse5-htmlparser2-tree-adapter": "^7.1.0", + "parse5-parser-stream": "^7.1.2", + "undici": "^7.19.0", + "whatwg-mimetype": "^4.0.0" + }, + "engines": { + "node": ">=20.18.1" + }, + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + } + }, "node_modules/cheerio-select": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", @@ -8265,32 +8040,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/crawlee/node_modules/cheerio": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.2.0.tgz", - "integrity": "sha512-WDrybc/gKFpTYQutKIK6UvfcuxijIZfMfXaYm8NMsPQxSYvf+13fXUJ4rztGGbJcBQ/GF55gvrZ0Bc0bj/mqvg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.2.2", - "encoding-sniffer": "^0.2.1", - "htmlparser2": "^10.1.0", - "parse5": "^7.3.0", - "parse5-htmlparser2-tree-adapter": "^7.1.0", - "parse5-parser-stream": "^7.1.2", - "undici": "^7.19.0", - "whatwg-mimetype": "^4.0.0" - }, - "engines": { - "node": ">=20.18.1" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" - } - }, "node_modules/crawlee/node_modules/dot-prop": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-8.0.2.tgz", @@ -8320,39 +8069,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/crawlee/node_modules/entities": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", - "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/crawlee/node_modules/htmlparser2": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.1.0.tgz", - "integrity": "sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.2.2", - "entities": "^7.0.1" - } - }, "node_modules/crawlee/node_modules/nanoid": { "version": "5.1.9", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.9.tgz", @@ -8422,16 +8138,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/crawlee/node_modules/undici": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.25.0.tgz", - "integrity": "sha512-xXnp4kTyor2Zq+J1FfPI6Eq3ew5h6Vl0F/8d9XU5zZQf1tX9s2Su1/3PiMmUANFULpmksxkClamIZcaUqryHsQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=20.18.1" - } - }, "node_modules/crawlee/node_modules/yocto-queue": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz", @@ -11657,6 +11363,37 @@ "dev": true, "license": "MIT" }, + "node_modules/htmlparser2": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.1.0.tgz", + "integrity": "sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.2", + "entities": "^7.0.1" + } + }, + "node_modules/htmlparser2/node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/http-cache-semantics": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", @@ -13475,39 +13212,6 @@ } } }, - "node_modules/linkedom/node_modules/entities": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", - "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/linkedom/node_modules/htmlparser2": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.1.0.tgz", - "integrity": "sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.2.2", - "entities": "^7.0.1" - } - }, "node_modules/lint-staged": { "version": "16.0.0", "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-16.0.0.tgz", @@ -19031,12 +18735,12 @@ } }, "node_modules/undici": { - "version": "6.21.3", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.3.tgz", - "integrity": "sha512-gBLkYIlEnSp8pFbT64yFgGE6UIB9tAkhukC23PmMDCe5Nd+cRqKxSjw5y54MK2AZMgZfJWMaNE4nYUHgi1XEOw==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.25.0.tgz", + "integrity": "sha512-xXnp4kTyor2Zq+J1FfPI6Eq3ew5h6Vl0F/8d9XU5zZQf1tX9s2Su1/3PiMmUANFULpmksxkClamIZcaUqryHsQ==", "license": "MIT", "engines": { - "node": ">=18.17" + "node": ">=20.18.1" } }, "node_modules/undici-types": { diff --git a/package.json b/package.json index 9fed883e8f..cf480a6f5d 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,9 @@ "@apify/input_secrets": "^1.1.72", "@apify/tsconfig": "^0.1.1", "@commitlint/config-conventional": "^19.8.1", + "@crawlee/core": "^4.0.0-beta.49", + "@crawlee/types": "^4.0.0-beta.49", + "@crawlee/utils": "^4.0.0-beta.49", "@playwright/browser-chromium": "^1.52.0", "@types/content-type": "^1.1.8", "@types/fs-extra": "^11.0.4", @@ -77,11 +80,9 @@ "@types/semver": "^7.7.0", "@types/tough-cookie": "^4.0.5", "@types/ws": "^8.18.1", + "cheerio": "^1.2.0", "commitlint": "^19.8.1", "crawlee": "^4.0.0-beta.49", - "@crawlee/core": "^4.0.0-beta.49", - "@crawlee/types": "^4.0.0-beta.49", - "@crawlee/utils": "^4.0.0-beta.49", "eslint": "^9.27.0", "eslint-config-prettier": "^10.1.5", "fs-extra": "^11.3.0", From 2711b958128ff552d1d292f6d17c61cf15e533af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Thu, 30 Apr 2026 20:14:55 +0200 Subject: [PATCH 14/27] chore: bump crawlee to ^4.0.0-beta.51 and drop cheerio workaround `@crawlee/linkedom@4.0.0-beta.51` now declares cheerio as a direct dependency (apify/crawlee#3620), so the SDK no longer has to ship its own cheerio devDep to mask the missing declaration. --- package-lock.json | 252 ++++++++++++++++++------------------ package.json | 9 +- packages/apify/package.json | 6 +- 3 files changed, 133 insertions(+), 134 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4f9107adf9..42a6d9ef0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,9 +16,9 @@ "@apify/input_secrets": "^1.1.72", "@apify/tsconfig": "^0.1.1", "@commitlint/config-conventional": "^19.8.1", - "@crawlee/core": "^4.0.0-beta.49", - "@crawlee/types": "^4.0.0-beta.49", - "@crawlee/utils": "^4.0.0-beta.49", + "@crawlee/core": "^4.0.0-beta.51", + "@crawlee/types": "^4.0.0-beta.51", + "@crawlee/utils": "^4.0.0-beta.51", "@playwright/browser-chromium": "^1.52.0", "@types/content-type": "^1.1.8", "@types/fs-extra": "^11.0.4", @@ -26,9 +26,8 @@ "@types/semver": "^7.7.0", "@types/tough-cookie": "^4.0.5", "@types/ws": "^8.18.1", - "cheerio": "^1.2.0", "commitlint": "^19.8.1", - "crawlee": "^4.0.0-beta.49", + "crawlee": "^4.0.0-beta.51", "eslint": "^9.27.0", "eslint-config-prettier": "^10.1.5", "fs-extra": "^11.3.0", @@ -476,15 +475,15 @@ } }, "node_modules/@crawlee/cheerio": { - "version": "4.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@crawlee/cheerio/-/cheerio-4.0.0-beta.49.tgz", - "integrity": "sha512-WYFTBQE+7Rzg/cb0OxeOx7yF/IgZTHZLsT0HQEA1yV/0YWuxUFFydJeUDYFhkP3xyzutuOR81sPYkI5xAf/qrQ==", + "version": "4.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@crawlee/cheerio/-/cheerio-4.0.0-beta.51.tgz", + "integrity": "sha512-PrJ4QHdSp57R3cL6+vGCWXrl9avyhjZGKJf+Z1pOpnpc/U5eZPmcdhVvOJEou1Tgm4gYDflMDtrYuGfBsAVB6w==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@crawlee/http": "4.0.0-beta.49", - "@crawlee/types": "4.0.0-beta.49", - "@crawlee/utils": "4.0.0-beta.49", + "@crawlee/http": "4.0.0-beta.51", + "@crawlee/types": "4.0.0-beta.51", + "@crawlee/utils": "4.0.0-beta.51", "cheerio": "^1.0.0", "htmlparser2": "^10.0.0", "tslib": "^2.8.1" @@ -494,13 +493,13 @@ } }, "node_modules/@crawlee/cli": { - "version": "4.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@crawlee/cli/-/cli-4.0.0-beta.49.tgz", - "integrity": "sha512-QhEqBe274Q0ogdiLD/3QtToFQwLisYT+5RHOsJW7EkGEsQ9kJ/h5KD4IRi9CsDStB9IEww5vFv0tJRcwwWqpzQ==", + "version": "4.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@crawlee/cli/-/cli-4.0.0-beta.51.tgz", + "integrity": "sha512-AZtps02lgeQyX0zQ5uiWbcWU8FhXp7XsIzYtbzMg4zR9KQgzhevtpj8rxuBBlzCNgPMqJgYX86LPXdGxr9sz+w==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@crawlee/templates": "4.0.0-beta.49", + "@crawlee/templates": "4.0.0-beta.51", "@inquirer/prompts": "^7.5.0", "ansi-colors": "^4.1.3", "fs-extra": "^11.3.0", @@ -643,9 +642,9 @@ } }, "node_modules/@crawlee/core": { - "version": "4.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@crawlee/core/-/core-4.0.0-beta.49.tgz", - "integrity": "sha512-k5FBU/R+gwrL/FWu6fFSciU4aM+nYsUJy4YOAk3Cur9Yom8YF8JRbGGeAaFEvDDjJZxWTR5s0GyYnzHeidx9Gw==", + "version": "4.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@crawlee/core/-/core-4.0.0-beta.51.tgz", + "integrity": "sha512-zCmpN5kiNfZjfX1//JgvYrMXxv7toCF47aZxf/uyCbFqpEAQoatrBSsqZeNLPnj/90acG5UUfqF9wVM9Ie3Zug==", "license": "Apache-2.0", "dependencies": { "@apify/consts": "^2.41.0", @@ -654,9 +653,9 @@ "@apify/pseudo_url": "^2.0.59", "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/memory-storage": "4.0.0-beta.49", - "@crawlee/types": "4.0.0-beta.49", - "@crawlee/utils": "4.0.0-beta.49", + "@crawlee/memory-storage": "4.0.0-beta.51", + "@crawlee/types": "4.0.0-beta.51", + "@crawlee/utils": "4.0.0-beta.51", "@sapphire/async-queue": "^1.5.5", "@vladfrangu/async_event_emitter": "^2.4.6", "csv-stringify": "^6.5.2", @@ -782,13 +781,13 @@ } }, "node_modules/@crawlee/got-scraping-client": { - "version": "4.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@crawlee/got-scraping-client/-/got-scraping-client-4.0.0-beta.49.tgz", - "integrity": "sha512-L1IWFC/kBQx9TNg/F7SVMjlnG92T95I1ZEL76x5dyGP9hBWBjaZHL8vsVSnoHDYh7ADWsbKjHyyD1CsMUjVimw==", + "version": "4.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@crawlee/got-scraping-client/-/got-scraping-client-4.0.0-beta.51.tgz", + "integrity": "sha512-IKT7BrlIU/rtFi+b6wnvN47uos34sxVGlX4vZQ8OnOZKHTfNLg1cWBqz/BZhLfgxr5B7ZnmkHWzCBr22kM3zDg==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@crawlee/http-client": "4.0.0-beta.49", + "@crawlee/http-client": "4.0.0-beta.51", "got-scraping": "^4.2.1" }, "engines": { @@ -796,19 +795,19 @@ } }, "node_modules/@crawlee/http": { - "version": "4.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@crawlee/http/-/http-4.0.0-beta.49.tgz", - "integrity": "sha512-q6vJ29s1TLynGBKPoHx4AbIMyl1KFw3oRPPWLakOj4wqK72W8KqG/0BHP6LPtgwBBgBF4TKhxEnp7xMT29f0KQ==", + "version": "4.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@crawlee/http/-/http-4.0.0-beta.51.tgz", + "integrity": "sha512-FUaGGZt/PbHuyDgNCna7uqOcq6J5rlus5Sy+LDU/TCTJTcCfuyYkRyEZ4XAba6QoFhSh8ykq8U2v7XQgdm3W5A==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/basic": "4.0.0-beta.49", - "@crawlee/core": "4.0.0-beta.49", - "@crawlee/http-client": "4.0.0-beta.49", - "@crawlee/types": "4.0.0-beta.49", - "@crawlee/utils": "4.0.0-beta.49", + "@crawlee/basic": "4.0.0-beta.51", + "@crawlee/core": "4.0.0-beta.51", + "@crawlee/http-client": "4.0.0-beta.51", + "@crawlee/types": "4.0.0-beta.51", + "@crawlee/utils": "4.0.0-beta.51", "@types/content-type": "^1.1.8", "cheerio": "^1.0.0", "content-type": "^1.0.5", @@ -823,12 +822,12 @@ } }, "node_modules/@crawlee/http-client": { - "version": "4.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@crawlee/http-client/-/http-client-4.0.0-beta.49.tgz", - "integrity": "sha512-UMK5FLyFmAZHFNaaMhITwKQgEPdJZ5GJYvGCDHig4H5Hmc83aiBWIgGNqmQL+t/1YXkWVA0NhrBAgonk3m64aw==", + "version": "4.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@crawlee/http-client/-/http-client-4.0.0-beta.51.tgz", + "integrity": "sha512-/NcX3ESNXGRVYGBgkKCE035OidlOgsFYAd5zBSWTep/zsLefUISq2HEPTZYVpAvrgIVyaVjbNSilk1NpVjJLxw==", "license": "Apache-2.0", "dependencies": { - "@crawlee/types": "4.0.0-beta.49", + "@crawlee/types": "4.0.0-beta.51", "tough-cookie": "^6.0.0" }, "engines": { @@ -848,18 +847,18 @@ } }, "node_modules/@crawlee/http/node_modules/@crawlee/basic": { - "version": "4.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@crawlee/basic/-/basic-4.0.0-beta.49.tgz", - "integrity": "sha512-6rRchZXH1KyLvkcZpTPeuRcbEDdl/l0XOsVTK5lHxkQvj63LrE+YwlmZxEA3LViiva9soNUll7VoFfWhEL77iw==", + "version": "4.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@crawlee/basic/-/basic-4.0.0-beta.51.tgz", + "integrity": "sha512-t4YhLgqWiy4N17YzeLugUIiwQDtXALqTl3GrKSZFnZSuHHux6nlQwbSX8x5FCtzW0q/On9ZGt/GTR+WMTka97g==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/core": "4.0.0-beta.49", - "@crawlee/got-scraping-client": "4.0.0-beta.49", - "@crawlee/types": "4.0.0-beta.49", - "@crawlee/utils": "4.0.0-beta.49", + "@crawlee/core": "4.0.0-beta.51", + "@crawlee/got-scraping-client": "4.0.0-beta.51", + "@crawlee/types": "4.0.0-beta.51", + "@crawlee/utils": "4.0.0-beta.51", "csv-stringify": "^6.5.2", "fs-extra": "^11.3.0", "ow": "^2.0.0", @@ -992,17 +991,17 @@ } }, "node_modules/@crawlee/jsdom": { - "version": "4.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@crawlee/jsdom/-/jsdom-4.0.0-beta.49.tgz", - "integrity": "sha512-RpO6fJfB8GMxokqfNTanU/zTSZJCFCw0fu3aTfyTG5njk/IENySRyJcIFWz+uUNuzF3trJVW4XEJBq4PBzvUjA==", + "version": "4.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@crawlee/jsdom/-/jsdom-4.0.0-beta.51.tgz", + "integrity": "sha512-x2w8NkQfu14LO4yvVGTi4kNWDn3cgJq+XNSqS3UNAOraxQUPTSJpEicR+hwjt21Fb/tQRKMLRhdTgnqACWRoFw==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/timeout": "^0.3.0", "@apify/utilities": "^2.7.10", - "@crawlee/http": "4.0.0-beta.49", - "@crawlee/types": "4.0.0-beta.49", - "@crawlee/utils": "4.0.0-beta.49", + "@crawlee/http": "4.0.0-beta.51", + "@crawlee/types": "4.0.0-beta.51", + "@crawlee/utils": "4.0.0-beta.51", "@types/jsdom": "^21.1.7", "cheerio": "^1.0.0", "jsdom": "^26.1.0", @@ -1090,17 +1089,18 @@ } }, "node_modules/@crawlee/linkedom": { - "version": "4.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@crawlee/linkedom/-/linkedom-4.0.0-beta.49.tgz", - "integrity": "sha512-fOBVgl4sVcrKM/3DF96SfaMQjJQuEoMvtci67X1huPrPtjkrREqGrDufCtSttkcSkGu/gQCxMN/yv+oyzBAujQ==", + "version": "4.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@crawlee/linkedom/-/linkedom-4.0.0-beta.51.tgz", + "integrity": "sha512-OY2ku6ZO2M26ViuYygBGDntxIVNd4zbuaglPdbgyLekX2lw5e6tbqWSLZ7pOF1FTOllCpXVRetRRArWcOBMc7A==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/http": "4.0.0-beta.49", - "@crawlee/types": "4.0.0-beta.49", - "@crawlee/utils": "4.0.0-beta.49", + "@crawlee/http": "4.0.0-beta.51", + "@crawlee/types": "4.0.0-beta.51", + "@crawlee/utils": "4.0.0-beta.51", + "cheerio": "^1.0.0", "linkedom": "^0.18.10", "ow": "^2.0.0", "tslib": "^2.8.1" @@ -1186,12 +1186,12 @@ } }, "node_modules/@crawlee/memory-storage": { - "version": "4.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@crawlee/memory-storage/-/memory-storage-4.0.0-beta.49.tgz", - "integrity": "sha512-rLniynMhfrJoXn7rFHfj4NpsVvdRn3PIJi6YFL3G7s4JAiqqfhYOKshW+f6XdldEeb1z0YyGpgOknLo6VupktA==", + "version": "4.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@crawlee/memory-storage/-/memory-storage-4.0.0-beta.51.tgz", + "integrity": "sha512-SiaQjdZaA7S7BdK5NeCK8LR0GeCNJq4x6qlv7fcQ+MqebLHKNEcmUcuwYXf9u4IoYweNfO+v9N+RkmfjyP4C1A==", "license": "Apache-2.0", "dependencies": { - "@crawlee/types": "4.0.0-beta.49", + "@crawlee/types": "4.0.0-beta.51", "@sapphire/async-queue": "^1.5.5", "@sapphire/shapeshift": "^4.0.0", "content-type": "^1.0.5", @@ -1259,9 +1259,9 @@ } }, "node_modules/@crawlee/templates": { - "version": "4.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@crawlee/templates/-/templates-4.0.0-beta.49.tgz", - "integrity": "sha512-5/cBYgNuMXnVemxUDqagg0lgZURlc28NVuY1vfON+CG0C6Dg/GLwMlTLOmcroQeDJF7bWxVxDrsHomTk0Mm30A==", + "version": "4.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@crawlee/templates/-/templates-4.0.0-beta.51.tgz", + "integrity": "sha512-YDGdBpv2ztbdY1EbVOV3lyJWjGeYGhBprA3WD58sLX+eIx7vUiZUZXdznt3AMf1FnGvfbCsbpFoVPa72xydtYw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -1272,9 +1272,9 @@ } }, "node_modules/@crawlee/types": { - "version": "4.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@crawlee/types/-/types-4.0.0-beta.49.tgz", - "integrity": "sha512-p33njES5N539Zgco1aroUZgmWeXp+i6MTPUk7R7wLEdV/k+aw2Y1cjw8wGQpKH9/ZZIpsvqx56U26bC2w1nmcQ==", + "version": "4.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@crawlee/types/-/types-4.0.0-beta.51.tgz", + "integrity": "sha512-U/m8K41Fe8q5rvLqFvjclNTvRPvRsrphatEBssV1J8q/Rjhn71SnVVB0qVKYusNMLjLnaup3tlBY/01ahJDDSw==", "license": "Apache-2.0", "dependencies": { "tough-cookie": "^6.0.0", @@ -1297,14 +1297,14 @@ } }, "node_modules/@crawlee/utils": { - "version": "4.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@crawlee/utils/-/utils-4.0.0-beta.49.tgz", - "integrity": "sha512-JmTTVsJBFJNPUZsdH35Yde/jRFJoZtloVtEYLGZoqo79rT9RmRi+SDr22XFYJ7bb/LEXY+NOWBovdMge+fnpHw==", + "version": "4.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@crawlee/utils/-/utils-4.0.0-beta.51.tgz", + "integrity": "sha512-DHvn2fo/6pIHTiHAi5tenkSWWi2KTm6sicnAIY38H98ZOiys4Yxh22wvfRN4cE8wm8pbUucQ8IYIzKSxbNLd+Q==", "license": "Apache-2.0", "dependencies": { "@apify/ps-tree": "^1.2.0", - "@crawlee/http-client": "4.0.0-beta.49", - "@crawlee/types": "4.0.0-beta.49", + "@crawlee/http-client": "4.0.0-beta.51", + "@crawlee/types": "4.0.0-beta.51", "@types/sax": "^1.2.7", "cheerio": "^1.0.0", "domhandler": "^5.0.3", @@ -7793,24 +7793,24 @@ } }, "node_modules/crawlee": { - "version": "4.0.0-beta.49", - "resolved": "https://registry.npmjs.org/crawlee/-/crawlee-4.0.0-beta.49.tgz", - "integrity": "sha512-/+m7LJ0m4nLmdA+zzb0ZL21DjNGUjveoPs+ckbiaPpE0LT8bJBalBbzhRcmUCZHWuY5L6ncNJcS2HTGBe20VaA==", + "version": "4.0.0-beta.51", + "resolved": "https://registry.npmjs.org/crawlee/-/crawlee-4.0.0-beta.51.tgz", + "integrity": "sha512-i/w8O7D7mdmUr8hdKEWSSHEIGqk4+nrknoWtEJiwnyOQAyzg7G98QsHUBeGmAR+j40EDPJui3wzrh7B6tUNkMA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@crawlee/basic": "4.0.0-beta.49", - "@crawlee/browser": "4.0.0-beta.49", - "@crawlee/browser-pool": "4.0.0-beta.49", - "@crawlee/cheerio": "4.0.0-beta.49", - "@crawlee/cli": "4.0.0-beta.49", - "@crawlee/core": "4.0.0-beta.49", - "@crawlee/http": "4.0.0-beta.49", - "@crawlee/jsdom": "4.0.0-beta.49", - "@crawlee/linkedom": "4.0.0-beta.49", - "@crawlee/playwright": "4.0.0-beta.49", - "@crawlee/puppeteer": "4.0.0-beta.49", - "@crawlee/utils": "4.0.0-beta.49", + "@crawlee/basic": "4.0.0-beta.51", + "@crawlee/browser": "4.0.0-beta.51", + "@crawlee/browser-pool": "4.0.0-beta.51", + "@crawlee/cheerio": "4.0.0-beta.51", + "@crawlee/cli": "4.0.0-beta.51", + "@crawlee/core": "4.0.0-beta.51", + "@crawlee/http": "4.0.0-beta.51", + "@crawlee/jsdom": "4.0.0-beta.51", + "@crawlee/linkedom": "4.0.0-beta.51", + "@crawlee/playwright": "4.0.0-beta.51", + "@crawlee/puppeteer": "4.0.0-beta.51", + "@crawlee/utils": "4.0.0-beta.51", "import-local": "^3.2.0", "tslib": "^2.8.1" }, @@ -7838,18 +7838,18 @@ } }, "node_modules/crawlee/node_modules/@crawlee/basic": { - "version": "4.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@crawlee/basic/-/basic-4.0.0-beta.49.tgz", - "integrity": "sha512-6rRchZXH1KyLvkcZpTPeuRcbEDdl/l0XOsVTK5lHxkQvj63LrE+YwlmZxEA3LViiva9soNUll7VoFfWhEL77iw==", + "version": "4.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@crawlee/basic/-/basic-4.0.0-beta.51.tgz", + "integrity": "sha512-t4YhLgqWiy4N17YzeLugUIiwQDtXALqTl3GrKSZFnZSuHHux6nlQwbSX8x5FCtzW0q/On9ZGt/GTR+WMTka97g==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/core": "4.0.0-beta.49", - "@crawlee/got-scraping-client": "4.0.0-beta.49", - "@crawlee/types": "4.0.0-beta.49", - "@crawlee/utils": "4.0.0-beta.49", + "@crawlee/core": "4.0.0-beta.51", + "@crawlee/got-scraping-client": "4.0.0-beta.51", + "@crawlee/types": "4.0.0-beta.51", + "@crawlee/utils": "4.0.0-beta.51", "csv-stringify": "^6.5.2", "fs-extra": "^11.3.0", "ow": "^2.0.0", @@ -7862,17 +7862,17 @@ } }, "node_modules/crawlee/node_modules/@crawlee/browser": { - "version": "4.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@crawlee/browser/-/browser-4.0.0-beta.49.tgz", - "integrity": "sha512-RBzbtscHGi7qY7bn3KqsfV2flFt0XlKp7OOdGx8VsSSzdVhIb+YXFOrcdMR6DGEyvxtMSZxNZ4U8qaKM/YwOUg==", + "version": "4.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@crawlee/browser/-/browser-4.0.0-beta.51.tgz", + "integrity": "sha512-Z0VoAetDT5HL8vtQYiZkOVrFFpoeoq/6Yvc6hK6Sp6tQ5Snb/+uVXcTL9LTQ0a/9G0S3yzbgvuYaHpR2AInK1Q==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/timeout": "^0.3.2", - "@crawlee/basic": "4.0.0-beta.49", - "@crawlee/browser-pool": "4.0.0-beta.49", - "@crawlee/types": "4.0.0-beta.49", - "@crawlee/utils": "4.0.0-beta.49", + "@crawlee/basic": "4.0.0-beta.51", + "@crawlee/browser-pool": "4.0.0-beta.51", + "@crawlee/types": "4.0.0-beta.51", + "@crawlee/utils": "4.0.0-beta.51", "ow": "^2.0.0", "tslib": "^2.8.1", "type-fest": "^4.41.0" @@ -7894,15 +7894,15 @@ } }, "node_modules/crawlee/node_modules/@crawlee/browser-pool": { - "version": "4.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@crawlee/browser-pool/-/browser-pool-4.0.0-beta.49.tgz", - "integrity": "sha512-oroowDwagffg1Ybbn3y3Eey2i2p+rhdu9f2dBtDvH4EF+4KPpfW7Z5FG9knLTx+3OcaRp9QumZUuyFANH+wN1w==", + "version": "4.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@crawlee/browser-pool/-/browser-pool-4.0.0-beta.51.tgz", + "integrity": "sha512-2YSgDy8QFrTpzYYiLSctcWyu9MaQzaV0fDrcRMO/a1+WeiwPc5cOwpRjtJYXVRjN4ty1x3/pUbY+mNaGjUDUng==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/timeout": "^0.3.2", - "@crawlee/core": "4.0.0-beta.49", - "@crawlee/types": "4.0.0-beta.49", + "@crawlee/core": "4.0.0-beta.51", + "@crawlee/types": "4.0.0-beta.51", "fingerprint-generator": "^2.1.68", "fingerprint-injector": "^2.1.68", "lodash.merge": "^4.6.2", @@ -7931,21 +7931,21 @@ } }, "node_modules/crawlee/node_modules/@crawlee/playwright": { - "version": "4.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@crawlee/playwright/-/playwright-4.0.0-beta.49.tgz", - "integrity": "sha512-ozU/eUAgnW0AhyWYUe4Kvipqfl8JyJ2ZZoB5jqWG7PG0zmgEx9CQ5s+aMopl0zmZu31dW7nnZk9HQZa71ZYcTg==", + "version": "4.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@crawlee/playwright/-/playwright-4.0.0-beta.51.tgz", + "integrity": "sha512-kJFB2VEeD8xp42oQuf1yReADuhuqZnHxLU5H6IneJ0BhG4JHy5/Za2QT7LtkwBfATZSbIyxiBlgk8vevU25t5A==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/datastructures": "^2.0.3", "@apify/timeout": "^0.3.2", - "@crawlee/basic": "4.0.0-beta.49", - "@crawlee/browser": "4.0.0-beta.49", - "@crawlee/browser-pool": "4.0.0-beta.49", - "@crawlee/cheerio": "4.0.0-beta.49", - "@crawlee/core": "4.0.0-beta.49", - "@crawlee/types": "4.0.0-beta.49", - "@crawlee/utils": "4.0.0-beta.49", + "@crawlee/basic": "4.0.0-beta.51", + "@crawlee/browser": "4.0.0-beta.51", + "@crawlee/browser-pool": "4.0.0-beta.51", + "@crawlee/cheerio": "4.0.0-beta.51", + "@crawlee/core": "4.0.0-beta.51", + "@crawlee/types": "4.0.0-beta.51", + "@crawlee/utils": "4.0.0-beta.51", "cheerio": "^1.0.0", "idcac-playwright": "^0.1.3", "jquery": "^3.7.1", @@ -7979,18 +7979,18 @@ "license": "ISC" }, "node_modules/crawlee/node_modules/@crawlee/puppeteer": { - "version": "4.0.0-beta.49", - "resolved": "https://registry.npmjs.org/@crawlee/puppeteer/-/puppeteer-4.0.0-beta.49.tgz", - "integrity": "sha512-fpMaaXqSNr86FTWVvkWvNXlKRApRtURo37U9AHVLtwQTyBbmgFeETnfjHauAlEj29mFaRgk4lyKXEcDmWU/Psw==", + "version": "4.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@crawlee/puppeteer/-/puppeteer-4.0.0-beta.51.tgz", + "integrity": "sha512-IrPUaR9Y4AeVyCnfZSAWHVvFxAAhVlCJDuEtcL7YIhAuBrvTRW9aGqx6vAhzTsrEwpvuk1OX2mL1lE8s/xbUiw==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/datastructures": "^2.0.3", - "@crawlee/browser": "4.0.0-beta.49", - "@crawlee/browser-pool": "4.0.0-beta.49", - "@crawlee/core": "4.0.0-beta.49", - "@crawlee/types": "4.0.0-beta.49", - "@crawlee/utils": "4.0.0-beta.49", + "@crawlee/browser": "4.0.0-beta.51", + "@crawlee/browser-pool": "4.0.0-beta.51", + "@crawlee/core": "4.0.0-beta.51", + "@crawlee/types": "4.0.0-beta.51", + "@crawlee/utils": "4.0.0-beta.51", "cheerio": "^1.0.0", "devtools-protocol": "*", "idcac-playwright": "^0.2.0", @@ -20286,9 +20286,9 @@ "@apify/log": "^2.5.18", "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/core": "^4.0.0-beta.49", - "@crawlee/types": "^4.0.0-beta.49", - "@crawlee/utils": "^4.0.0-beta.49", + "@crawlee/core": "^4.0.0-beta.51", + "@crawlee/types": "^4.0.0-beta.51", + "@crawlee/utils": "^4.0.0-beta.51", "apify-client": "^2.12.4", "fs-extra": "^11.3.0", "got-scraping": "^4.1.1", diff --git a/package.json b/package.json index cf480a6f5d..7d7ba48891 100644 --- a/package.json +++ b/package.json @@ -70,9 +70,9 @@ "@apify/input_secrets": "^1.1.72", "@apify/tsconfig": "^0.1.1", "@commitlint/config-conventional": "^19.8.1", - "@crawlee/core": "^4.0.0-beta.49", - "@crawlee/types": "^4.0.0-beta.49", - "@crawlee/utils": "^4.0.0-beta.49", + "@crawlee/core": "^4.0.0-beta.51", + "@crawlee/types": "^4.0.0-beta.51", + "@crawlee/utils": "^4.0.0-beta.51", "@playwright/browser-chromium": "^1.52.0", "@types/content-type": "^1.1.8", "@types/fs-extra": "^11.0.4", @@ -80,9 +80,8 @@ "@types/semver": "^7.7.0", "@types/tough-cookie": "^4.0.5", "@types/ws": "^8.18.1", - "cheerio": "^1.2.0", "commitlint": "^19.8.1", - "crawlee": "^4.0.0-beta.49", + "crawlee": "^4.0.0-beta.51", "eslint": "^9.27.0", "eslint-config-prettier": "^10.1.5", "fs-extra": "^11.3.0", diff --git a/packages/apify/package.json b/packages/apify/package.json index 7cea7e856d..9173c9696b 100644 --- a/packages/apify/package.json +++ b/packages/apify/package.json @@ -53,9 +53,9 @@ "@apify/log": "^2.5.18", "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/core": "^4.0.0-beta.49", - "@crawlee/types": "^4.0.0-beta.49", - "@crawlee/utils": "^4.0.0-beta.49", + "@crawlee/core": "^4.0.0-beta.51", + "@crawlee/types": "^4.0.0-beta.51", + "@crawlee/utils": "^4.0.0-beta.51", "apify-client": "^2.12.4", "fs-extra": "^11.3.0", "got-scraping": "^4.1.1", From a39ed7c3c3ebe23ddf1c8f70b2ad009cef580192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Mon, 11 May 2026 18:37:56 +0200 Subject: [PATCH 15/27] refactor(config): address PR review comments - configuration.ts: use APIFY_ENV_VARS constants from @apify/consts in place of inline env var name string literals where a constant exists - charging.ts: prefer ?? over || for maxTotalChargeUsd and isAtHome (empty string -> undefined is already handled by crawlee v4 Option A, so the `|| 0` workaround for `0` is obsolete and the !! on the boolean-or-undefined isAtHome is clearer as `?? false`) Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/apify/src/charging.ts | 4 +- packages/apify/src/configuration.ts | 61 +++++++++++++++-------------- 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/packages/apify/src/charging.ts b/packages/apify/src/charging.ts index e6100f5652..db57c2c477 100644 --- a/packages/apify/src/charging.ts +++ b/packages/apify/src/charging.ts @@ -87,8 +87,8 @@ export class ChargingManager { private apifyClient: ApifyClient; constructor(configuration: Configuration, apifyClient: ApifyClient) { - this.maxTotalChargeUsd = configuration.maxTotalChargeUsd || Infinity; // convert `0` to `Infinity` in case the value is an empty string - this.isAtHome = !!configuration.isAtHome; + this.maxTotalChargeUsd = configuration.maxTotalChargeUsd ?? Infinity; + this.isAtHome = configuration.isAtHome ?? false; this.actorRunId = configuration.actorRunId; this.purgeChargingLogDataset = configuration.purgeOnStart; this.useChargingLogDataset = configuration.useChargingLogDataset; diff --git a/packages/apify/src/configuration.ts b/packages/apify/src/configuration.ts index d50aec13ec..6cd066a48e 100644 --- a/packages/apify/src/configuration.ts +++ b/packages/apify/src/configuration.ts @@ -34,7 +34,7 @@ export const apifyConfigFields = { .default(LOCAL_ACTOR_ENV_VARS[ACTOR_ENV_VARS.DEFAULT_DATASET_ID]), [ ACTOR_ENV_VARS.DEFAULT_DATASET_ID, - 'APIFY_DEFAULT_DATASET_ID', + APIFY_ENV_VARS.DEFAULT_DATASET_ID, 'CRAWLEE_DEFAULT_DATASET_ID', ], ), @@ -46,7 +46,7 @@ export const apifyConfigFields = { ), [ ACTOR_ENV_VARS.DEFAULT_KEY_VALUE_STORE_ID, - 'APIFY_DEFAULT_KEY_VALUE_STORE_ID', + APIFY_ENV_VARS.DEFAULT_KEY_VALUE_STORE_ID, 'CRAWLEE_DEFAULT_KEY_VALUE_STORE_ID', ], ), @@ -58,18 +58,18 @@ export const apifyConfigFields = { ), [ ACTOR_ENV_VARS.DEFAULT_REQUEST_QUEUE_ID, - 'APIFY_DEFAULT_REQUEST_QUEUE_ID', + APIFY_ENV_VARS.DEFAULT_REQUEST_QUEUE_ID, 'CRAWLEE_DEFAULT_REQUEST_QUEUE_ID', ], ), inputKey: field(z.string().default('INPUT'), [ ACTOR_ENV_VARS.INPUT_KEY, - 'APIFY_INPUT_KEY', + APIFY_ENV_VARS.INPUT_KEY, 'CRAWLEE_INPUT_KEY', ]), memoryMbytes: field(coerceNumber.optional(), [ ACTOR_ENV_VARS.MEMORY_MBYTES, - 'APIFY_MEMORY_MBYTES', + APIFY_ENV_VARS.MEMORY_MBYTES, 'CRAWLEE_MEMORY_MBYTES', ]), availableMemoryRatio: field(coerceNumber.default(isAtHome ? 1 : 0.25), [ @@ -82,17 +82,20 @@ export const apifyConfigFields = { ), persistStateIntervalMillis: field(coerceNumber.default(60_000), [ 'CRAWLEE_PERSIST_STATE_INTERVAL_MILLIS', - 'APIFY_PERSIST_STATE_INTERVAL_MILLIS', + APIFY_ENV_VARS.PERSIST_STATE_INTERVAL_MILLIS, 'APIFY_TEST_PERSIST_INTERVAL_MILLIS', ]), headless: field(coerceBoolean.default(true), [ 'CRAWLEE_HEADLESS', - 'APIFY_HEADLESS', + APIFY_ENV_VARS.HEADLESS, + ]), + xvfb: field(coerceBoolean.default(false), [ + 'CRAWLEE_XVFB', + APIFY_ENV_VARS.XVFB, ]), - xvfb: field(coerceBoolean.default(false), ['CRAWLEE_XVFB', 'APIFY_XVFB']), chromeExecutablePath: field(z.string().optional(), [ 'CRAWLEE_CHROME_EXECUTABLE_PATH', - 'APIFY_CHROME_EXECUTABLE_PATH', + APIFY_ENV_VARS.CHROME_EXECUTABLE_PATH, ]), defaultBrowserPath: field(z.string().optional(), [ 'CRAWLEE_DEFAULT_BROWSER_PATH', @@ -100,61 +103,61 @@ export const apifyConfigFields = { ]), purgeOnStart: field(coerceBoolean.default(true), [ 'CRAWLEE_PURGE_ON_START', - 'APIFY_PURGE_ON_START', + APIFY_ENV_VARS.PURGE_ON_START, ]), // Apify-specific fields metamorphAfterSleepMillis: field( coerceNumber.default(300_000), - 'APIFY_METAMORPH_AFTER_SLEEP_MILLIS', + APIFY_ENV_VARS.METAMORPH_AFTER_SLEEP_MILLIS, ), actorEventsWsUrl: field(z.string().optional(), [ ACTOR_ENV_VARS.EVENTS_WEBSOCKET_URL, - 'APIFY_ACTOR_EVENTS_WS_URL', + APIFY_ENV_VARS.ACTOR_EVENTS_WS_URL, ]), - token: field(z.string().optional(), 'APIFY_TOKEN'), + token: field(z.string().optional(), APIFY_ENV_VARS.TOKEN), actorId: field(z.string().optional(), [ ACTOR_ENV_VARS.ID, - 'APIFY_ACTOR_ID', + APIFY_ENV_VARS.ACTOR_ID, ]), actorRunId: field(z.string().optional(), [ ACTOR_ENV_VARS.RUN_ID, - 'APIFY_ACTOR_RUN_ID', + APIFY_ENV_VARS.ACTOR_RUN_ID, ]), actorTaskId: field(z.string().optional(), [ ACTOR_ENV_VARS.TASK_ID, - 'APIFY_ACTOR_TASK_ID', + APIFY_ENV_VARS.ACTOR_TASK_ID, ]), apiBaseUrl: field( z.string().default('https://api.apify.com'), - 'APIFY_API_BASE_URL', + APIFY_ENV_VARS.API_BASE_URL, ), apiPublicBaseUrl: field( z.string().default('https://api.apify.com'), - 'APIFY_API_PUBLIC_BASE_URL', + APIFY_ENV_VARS.API_PUBLIC_BASE_URL, ), containerPort: field( coerceNumber.default( +LOCAL_ACTOR_ENV_VARS[ACTOR_ENV_VARS.WEB_SERVER_PORT], ), - [ACTOR_ENV_VARS.WEB_SERVER_PORT, 'APIFY_CONTAINER_PORT'], + [ACTOR_ENV_VARS.WEB_SERVER_PORT, APIFY_ENV_VARS.CONTAINER_PORT], ), containerUrl: field( z.string().default(LOCAL_ACTOR_ENV_VARS[ACTOR_ENV_VARS.WEB_SERVER_URL]), - [ACTOR_ENV_VARS.WEB_SERVER_URL, 'APIFY_CONTAINER_URL'], + [ACTOR_ENV_VARS.WEB_SERVER_URL, APIFY_ENV_VARS.CONTAINER_URL], ), proxyHostname: field( z.string().default(LOCAL_APIFY_ENV_VARS[APIFY_ENV_VARS.PROXY_HOSTNAME]), - 'APIFY_PROXY_HOSTNAME', + APIFY_ENV_VARS.PROXY_HOSTNAME, ), - proxyPassword: field(z.string().optional(), 'APIFY_PROXY_PASSWORD'), + proxyPassword: field(z.string().optional(), APIFY_ENV_VARS.PROXY_PASSWORD), proxyPort: field( coerceNumber.default(+LOCAL_APIFY_ENV_VARS[APIFY_ENV_VARS.PROXY_PORT]), - 'APIFY_PROXY_PORT', + APIFY_ENV_VARS.PROXY_PORT, ), proxyStatusUrl: field( z.string().default('http://proxy.apify.com'), - 'APIFY_PROXY_STATUS_URL', + APIFY_ENV_VARS.PROXY_STATUS_URL, ), /** @deprecated use `containerPort` instead */ standbyPort: field( @@ -164,21 +167,21 @@ export const apifyConfigFields = { ACTOR_ENV_VARS.STANDBY_PORT, ), standbyUrl: field(z.string().optional(), ACTOR_ENV_VARS.STANDBY_URL), - isAtHome: field(coerceBoolean.optional(), 'APIFY_IS_AT_HOME'), - userId: field(z.string().optional(), 'APIFY_USER_ID'), + isAtHome: field(coerceBoolean.optional(), APIFY_ENV_VARS.IS_AT_HOME), + userId: field(z.string().optional(), APIFY_ENV_VARS.USER_ID), inputSecretsPrivateKeyPassphrase: field( z.string().optional(), - 'APIFY_INPUT_SECRETS_PRIVATE_KEY_PASSPHRASE', + APIFY_ENV_VARS.INPUT_SECRETS_PRIVATE_KEY_PASSPHRASE, ), inputSecretsPrivateKeyFile: field( z.string().optional(), - 'APIFY_INPUT_SECRETS_PRIVATE_KEY_FILE', + APIFY_ENV_VARS.INPUT_SECRETS_PRIVATE_KEY_FILE, ), maxTotalChargeUsd: field( coerceNumber.optional(), ACTOR_ENV_VARS.MAX_TOTAL_CHARGE_USD, ), - metaOrigin: field(z.string().optional(), 'APIFY_META_ORIGIN'), + metaOrigin: field(z.string().optional(), APIFY_ENV_VARS.META_ORIGIN), testPayPerEvent: field( coerceBoolean.default(false), 'ACTOR_TEST_PAY_PER_EVENT', From e49ce5f5ea4234ab3233dd3376a9a99337f40936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Mon, 11 May 2026 19:01:19 +0200 Subject: [PATCH 16/27] =?UTF-8?q?chore:=20prettier=20=E2=80=94=20fix=20for?= =?UTF-8?q?matting=20in=20proxy=5Fconfiguration.ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/apify/src/proxy_configuration.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/apify/src/proxy_configuration.ts b/packages/apify/src/proxy_configuration.ts index 0d452ab645..6c8683c866 100644 --- a/packages/apify/src/proxy_configuration.ts +++ b/packages/apify/src/proxy_configuration.ts @@ -438,7 +438,7 @@ export class ProxyConfiguration extends CoreProxyConfiguration { */ // TODO: Make this private protected async _setPasswordIfToken(): Promise { - const {token} = (this.config as Configuration); + const { token } = this.config as Configuration; if (!token) return; try { @@ -500,7 +500,7 @@ export class ProxyConfiguration extends CoreProxyConfiguration { } | undefined > { - const {proxyStatusUrl} = (this.config as Configuration); + const { proxyStatusUrl } = this.config as Configuration; const requestOpts = { url: `${proxyStatusUrl}/?format=json`, proxyUrl: await this.newUrl(), From bda89cc4a7aa18b25bd02777df1bbeae1bce2518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Mon, 11 May 2026 19:28:00 +0200 Subject: [PATCH 17/27] fix: preserve storageClientOptions pass-through in Actor.newClient MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Configuration redesign dropped `storageClientOptions` along with the generic `.get(key)` lookup, which silently broke the legacy SDK feature of letting users pass arbitrary `ApifyClient` options (custom token, baseUrl, requestInterceptors, …) via `new Actor({ storageClientOptions: { ... } })`. Three existing tests still rely on this shape. Restore the field as an optional grab-bag (`z.record(z.string(), z.unknown())`) so the input survives Configuration's typed schema, and re-add the destructure in `Actor.newClient()` that splits `storageDir` (for local storage emulation, not an ApifyClient option) from the rest and spreads the remainder into the client constructor. Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/apify/src/actor.ts | 3 +++ packages/apify/src/configuration.ts | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/packages/apify/src/actor.ts b/packages/apify/src/actor.ts index 86fd1b9dce..0a8f1e0601 100644 --- a/packages/apify/src/actor.ts +++ b/packages/apify/src/actor.ts @@ -1467,6 +1467,8 @@ export class Actor { * @ignore */ newClient(options: ApifyClientOptions = {}): ApifyClient { + const { storageDir, ...storageClientOptions } = (this.config + .storageClientOptions ?? {}) as Dictionary; const { apifyVersion, crawleeVersion } = getSystemInfo(); return new ApifyClient({ baseUrl: this.config.apiBaseUrl, @@ -1475,6 +1477,7 @@ export class Actor { `SDK/${apifyVersion}`, `Crawlee/${crawleeVersion}`, ], + ...storageClientOptions, ...options, // allow overriding the instance configuration }); } diff --git a/packages/apify/src/configuration.ts b/packages/apify/src/configuration.ts index 6cd066a48e..ca7e006eab 100644 --- a/packages/apify/src/configuration.ts +++ b/packages/apify/src/configuration.ts @@ -190,6 +190,10 @@ export const apifyConfigFields = { coerceBoolean.default(false), 'ACTOR_USE_CHARGING_LOG_DATASET', ), + // Grab-bag of ApifyClient constructor options; the `storageDir` key is + // pulled out separately for local storage emulation, the rest is spread + // into `new ApifyClient({...})` in `Actor.newClient()`. No env var alias. + storageClientOptions: field(z.record(z.string(), z.unknown()).optional()), }; // --- Type utilities --- From 7970267661d8ee05a3424a96c3ce19fd45730dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Mon, 11 May 2026 19:34:18 +0200 Subject: [PATCH 18/27] refactor: drop redundant `as Configuration` casts on this.config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `ProxyConfiguration.config` and `PlatformEventManager.config` are declared as parameter properties initialized from `Configuration.getGlobalConfig()` (which returns `Configuration`), and their respective parent classes do not declare a `config` field — the subclass introduces it fresh. The type is already `Configuration`, so the explicit cast is redundant. Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/apify/src/platform_event_manager.ts | 2 +- packages/apify/src/proxy_configuration.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/apify/src/platform_event_manager.ts b/packages/apify/src/platform_event_manager.ts index 4385eebd60..872237bb9d 100644 --- a/packages/apify/src/platform_event_manager.ts +++ b/packages/apify/src/platform_event_manager.ts @@ -62,7 +62,7 @@ export class PlatformEventManager extends EventManager { } await super.init(); - const eventsWsUrl = (this.config as Configuration).actorEventsWsUrl; + const eventsWsUrl = this.config.actorEventsWsUrl; // Locally there is no web socket to connect, so just print a log message. if (!eventsWsUrl) { diff --git a/packages/apify/src/proxy_configuration.ts b/packages/apify/src/proxy_configuration.ts index 6c8683c866..231cfa6db0 100644 --- a/packages/apify/src/proxy_configuration.ts +++ b/packages/apify/src/proxy_configuration.ts @@ -438,7 +438,7 @@ export class ProxyConfiguration extends CoreProxyConfiguration { */ // TODO: Make this private protected async _setPasswordIfToken(): Promise { - const { token } = this.config as Configuration; + const { token } = this.config; if (!token) return; try { @@ -500,7 +500,7 @@ export class ProxyConfiguration extends CoreProxyConfiguration { } | undefined > { - const { proxyStatusUrl } = this.config as Configuration; + const { proxyStatusUrl } = this.config; const requestOpts = { url: `${proxyStatusUrl}/?format=json`, proxyUrl: await this.newUrl(), From 691c7ce78d847a11aa2388447b6cebb4d8fde00f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Tue, 12 May 2026 13:24:00 +0200 Subject: [PATCH 19/27] fix: keep `|| Infinity` for maxTotalChargeUsd so `0` means "no limit" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `?? Infinity` would let an explicit `0` (constructor option or `ACTOR_MAX_TOTAL_CHARGE_USD="0"`) propagate as a `0` USD cap, which is a behavior change we don't want. The empty-string env-var case @barjin asked about is already handled upstream by Crawlee Core v4's Configuration (empty strings resolve to unset, not `0`), so this `||` only matters for the explicit-`0` input. `isAtHome` stays on `?? false` — equivalent to `!!` for the `boolean | undefined` type, addresses the readability nit. Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/apify/src/charging.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/apify/src/charging.ts b/packages/apify/src/charging.ts index db57c2c477..659b55ca01 100644 --- a/packages/apify/src/charging.ts +++ b/packages/apify/src/charging.ts @@ -87,7 +87,7 @@ export class ChargingManager { private apifyClient: ApifyClient; constructor(configuration: Configuration, apifyClient: ApifyClient) { - this.maxTotalChargeUsd = configuration.maxTotalChargeUsd ?? Infinity; + this.maxTotalChargeUsd = configuration.maxTotalChargeUsd || Infinity; // `0` means "no limit" this.isAtHome = configuration.isAtHome ?? false; this.actorRunId = configuration.actorRunId; this.purgeChargingLogDataset = configuration.purgeOnStart; From 28eab9ae20454f3f01356642d3b62279eb5b6b9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Tue, 12 May 2026 13:56:14 +0200 Subject: [PATCH 20/27] fix(config): default isAtHome to false; resolve maxTotalChargeUsd via schema MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Push the "default when unset" semantics into the Configuration schema itself instead of patching them at every call site: - `isAtHome`: `coerceBoolean.optional()` → `coerceBoolean.default(false)`. The field is now `boolean` (not `boolean | undefined`); `charging.ts` drops its `?? false` fallback. - `maxTotalChargeUsd`: `coerceNumber.optional()` → `coerceNumber.transform(val => val === 0 ? Infinity : val).default(Infinity)`. The schema now handles both "unset → Infinity" (default) and the Apify platform contract "explicit `0` → Infinity" (transform), so `charging.ts` assigns the resolved value directly without any fallback. Test updated: empty-string env var falls through to `Infinity` schema default instead of `undefined`. Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/apify/src/charging.ts | 2 +- packages/apify/src/configuration.ts | 4 ++-- test/apify/actor.test.ts | 10 ++++------ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/apify/src/charging.ts b/packages/apify/src/charging.ts index 659b55ca01..11230bc2fe 100644 --- a/packages/apify/src/charging.ts +++ b/packages/apify/src/charging.ts @@ -88,7 +88,7 @@ export class ChargingManager { constructor(configuration: Configuration, apifyClient: ApifyClient) { this.maxTotalChargeUsd = configuration.maxTotalChargeUsd || Infinity; // `0` means "no limit" - this.isAtHome = configuration.isAtHome ?? false; + this.isAtHome = configuration.isAtHome; this.actorRunId = configuration.actorRunId; this.purgeChargingLogDataset = configuration.purgeOnStart; this.useChargingLogDataset = configuration.useChargingLogDataset; diff --git a/packages/apify/src/configuration.ts b/packages/apify/src/configuration.ts index ca7e006eab..d5b4b18f3d 100644 --- a/packages/apify/src/configuration.ts +++ b/packages/apify/src/configuration.ts @@ -167,7 +167,7 @@ export const apifyConfigFields = { ACTOR_ENV_VARS.STANDBY_PORT, ), standbyUrl: field(z.string().optional(), ACTOR_ENV_VARS.STANDBY_URL), - isAtHome: field(coerceBoolean.optional(), APIFY_ENV_VARS.IS_AT_HOME), + isAtHome: field(coerceBoolean.default(false), APIFY_ENV_VARS.IS_AT_HOME), userId: field(z.string().optional(), APIFY_ENV_VARS.USER_ID), inputSecretsPrivateKeyPassphrase: field( z.string().optional(), @@ -178,7 +178,7 @@ export const apifyConfigFields = { APIFY_ENV_VARS.INPUT_SECRETS_PRIVATE_KEY_FILE, ), maxTotalChargeUsd: field( - coerceNumber.optional(), + coerceNumber.default(Infinity), ACTOR_ENV_VARS.MAX_TOTAL_CHARGE_USD, ), metaOrigin: field(z.string().optional(), APIFY_ENV_VARS.META_ORIGIN), diff --git a/test/apify/actor.test.ts b/test/apify/actor.test.ts index 14565498db..4c5e00d11c 100644 --- a/test/apify/actor.test.ts +++ b/test/apify/actor.test.ts @@ -1313,15 +1313,13 @@ describe('Actor', () => { }); describe('Actor.config and PPE', () => { - test('empty string maxTotalChargeUsd is treated as unset, charging manager defaults to Infinity', async () => { - // crawlee v4 (Option A) treats empty-string env vars as unset - // rather than coercing them to `0` / `false` / `''`. The + test('empty string maxTotalChargeUsd falls through to the schema default of Infinity', async () => { + // crawlee v4 treats empty-string env vars as unset, so the // resolved config falls through to the schema default - // (undefined) and the charging manager interprets that as - // "no limit". + // (`Infinity`). process.env.ACTOR_MAX_TOTAL_CHARGE_USD = ''; await Actor.init(); - expect(Actor.config.maxTotalChargeUsd).toBeUndefined(); + expect(Actor.config.maxTotalChargeUsd).toBe(Infinity); expect(Actor.getChargingManager().getMaxTotalChargeUsd()).toBe( Infinity, ); From 2d3249019d7c067097eafa7fb1b053afaa9fb947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Tue, 12 May 2026 14:30:04 +0200 Subject: [PATCH 21/27] fix(config): translate explicit `0` for maxTotalChargeUsd to Infinity in schema The previous commit message described the schema change correctly but the working-tree edits never landed (a botched `--amend` only updated the message). This commit actually applies them: - `maxTotalChargeUsd` gets a `.transform(val => val === 0 ? Infinity : val)` step before `.default(Infinity)`, so both the "unset" and "explicit 0" cases are translated to Infinity at the Configuration layer. - `charging.ts` drops its `|| Infinity` fallback and assigns the resolved value directly. Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/apify/src/charging.ts | 2 +- packages/apify/src/configuration.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/apify/src/charging.ts b/packages/apify/src/charging.ts index 11230bc2fe..44ae99e0dc 100644 --- a/packages/apify/src/charging.ts +++ b/packages/apify/src/charging.ts @@ -87,7 +87,7 @@ export class ChargingManager { private apifyClient: ApifyClient; constructor(configuration: Configuration, apifyClient: ApifyClient) { - this.maxTotalChargeUsd = configuration.maxTotalChargeUsd || Infinity; // `0` means "no limit" + this.maxTotalChargeUsd = configuration.maxTotalChargeUsd; this.isAtHome = configuration.isAtHome; this.actorRunId = configuration.actorRunId; this.purgeChargingLogDataset = configuration.purgeOnStart; diff --git a/packages/apify/src/configuration.ts b/packages/apify/src/configuration.ts index d5b4b18f3d..648d4e55a1 100644 --- a/packages/apify/src/configuration.ts +++ b/packages/apify/src/configuration.ts @@ -177,8 +177,11 @@ export const apifyConfigFields = { z.string().optional(), APIFY_ENV_VARS.INPUT_SECRETS_PRIVATE_KEY_FILE, ), + // `0` is treated as "no limit" (mirrors the Apify platform contract). maxTotalChargeUsd: field( - coerceNumber.default(Infinity), + coerceNumber + .transform((val: number) => (val === 0 ? Infinity : val)) + .default(Infinity), ACTOR_ENV_VARS.MAX_TOTAL_CHARGE_USD, ), metaOrigin: field(z.string().optional(), APIFY_ENV_VARS.META_ORIGIN), From b1f74e77b7b503dcb2f783206c501314db4e5b35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Tue, 12 May 2026 16:25:11 +0200 Subject: [PATCH 22/27] feat: add Configuration.reset() / Actor.reset(); use them in tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v4 `Configuration` resolves env vars eagerly at construction, so tests that mutate `process.env` afterwards need to drop the cached singleton. The previous pattern bypassed the public API and poked private static state via type assertions, duplicated across multiple test files. - `Configuration.reset()` clears the SDK's own `globalConfig` static *and* delegates to `serviceLocator.reset()` (matches the upcoming crawlee API in apify/crawlee#3649 — once published the SDK can swap the explicit `serviceLocator.reset()` call for `super.reset()`). - `Actor.reset()` clears `Actor._instance` and calls `Configuration.reset()`. Tests use this single call instead of the three-step boilerplate. - `utils.test.ts` and `actor.test.ts` updated; the awkward inline `(Configuration as unknown as { globalConfig?: ... })` / `(Actor as unknown as { _instance?: ... })` blocks are gone. Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/apify/src/actor.ts | 12 ++++++++++++ packages/apify/src/configuration.ts | 17 ++++++++++++++--- test/apify/actor.test.ts | 20 ++++++-------------- test/apify/utils.test.ts | 19 +++++-------------- 4 files changed, 37 insertions(+), 31 deletions(-) diff --git a/packages/apify/src/actor.ts b/packages/apify/src/actor.ts index 0a8f1e0601..8aa4c779b5 100644 --- a/packages/apify/src/actor.ts +++ b/packages/apify/src/actor.ts @@ -2230,6 +2230,18 @@ export class Actor { return this._instance; } + /** + * Drops the cached default `Actor` instance and resets the global `Configuration` (and the + * rest of the service tree via crawlee's `serviceLocator`). Intended mainly for tests that + * mutate `process.env` at runtime — see {@link Configuration.reset} for the underlying + * mechanism. + */ + static reset(): void { + // eslint-disable-next-line no-underscore-dangle -- `_instance` is the lazy default-Actor cache + delete (Actor as { _instance?: Actor })._instance; + Configuration.reset(); + } + private async _openStorage( storageClass: Constructor, id?: string, diff --git a/packages/apify/src/configuration.ts b/packages/apify/src/configuration.ts index 648d4e55a1..2165fd8a7a 100644 --- a/packages/apify/src/configuration.ts +++ b/packages/apify/src/configuration.ts @@ -8,6 +8,7 @@ import { Configuration as CoreConfiguration, crawleeConfigFields, field, + serviceLocator, } from '@crawlee/core'; import { z } from 'zod'; @@ -307,10 +308,20 @@ export class Configuration extends CoreConfiguration { } /** - * Resets global configuration instance. The default instance holds configuration based on env vars, - * if we want to change them, we need to first reset the global state. Used mainly for testing purposes. + * Drops the cached global configuration so the next `Configuration.getGlobalConfig()` constructs + * a fresh instance from the current environment. Intended mainly for tests that mutate + * `process.env` at runtime — values are resolved eagerly at construction, so changing env vars + * after the singleton has been cached has no effect until the singleton is dropped. + * + * Clears the SDK's `globalConfig` static, the `AsyncLocalStorage` that `Actor.init()` writes + * to (replaced wholesale because `enterWith(undefined)` from a child async context does not + * propagate back up on Node 22), and crawlee's `serviceLocator`. + * + * Overrides crawlee's `Configuration.reset()` (apify/crawlee#3649) once published. */ - static resetGlobalState(): void { + static reset(): void { delete this.globalConfig; + this.storage = new AsyncLocalStorage(); + serviceLocator.reset(); } } diff --git a/test/apify/actor.test.ts b/test/apify/actor.test.ts index 4c5e00d11c..012c090598 100644 --- a/test/apify/actor.test.ts +++ b/test/apify/actor.test.ts @@ -1,6 +1,6 @@ import { createPublicKey } from 'node:crypto'; -import { EventType, serviceLocator, StorageManager } from '@crawlee/core'; +import { EventType, StorageManager } from '@crawlee/core'; import { sleep } from '@crawlee/utils'; import type { ApifyEnv } from 'apify'; import { @@ -1188,20 +1188,12 @@ describe('Actor', () => { }); describe('Actor.getInput', () => { - // crawlee v4's Configuration resolves env vars eagerly at - // construction. The SDK's static `Configuration.globalConfig` and - // `Configuration.storage` (AsyncLocalStorage) plus `Actor._instance` - // can all hold onto a stale config across tests, so for each - // env-var change we both reset those singletons *and* explicitly - // overwrite `actor.config` with a fresh `new Configuration()` so - // env vars set in the test body are guaranteed to be observed. + // crawlee v4's Configuration resolves env vars eagerly at construction. + // `Actor.reset()` drops the cached default instance + global Configuration; + // we additionally overwrite `actor.config` with a fresh `new Configuration()` + // so env vars set in the test body are guaranteed to be observed. const buildActor = () => { - serviceLocator.reset(); - ( - Configuration as unknown as { globalConfig?: Configuration } - ).globalConfig = undefined; - // eslint-disable-next-line no-underscore-dangle -- `_instance` is the upstream Actor singleton field - (Actor as unknown as { _instance?: Actor })._instance = undefined; + Actor.reset(); const actor = new Actor(); (actor as unknown as { config: Configuration }).config = new Configuration(); diff --git a/test/apify/utils.test.ts b/test/apify/utils.test.ts index b7c051badd..ec4ebf0f58 100644 --- a/test/apify/utils.test.ts +++ b/test/apify/utils.test.ts @@ -1,9 +1,8 @@ import type { IncomingMessage } from 'node:http'; import type { Request } from '@crawlee/core'; -import { serviceLocator } from '@crawlee/core'; import { createRequestDebugInfo } from '@crawlee/utils'; -import { Actor, Configuration } from 'apify'; +import { Actor } from 'apify'; import semver from 'semver'; import { APIFY_ENV_VARS } from '@apify/consts'; @@ -22,19 +21,11 @@ describe('Actor.isAtHome()', () => { }); describe('Actor.newClient()', () => { - // crawlee v4's `Configuration` resolves env vars eagerly at construction, - // so tests that mutate env vars after the global config / Actor singleton - // exists would otherwise read stale values. Reset both so each test - // observes the env it just wrote. + // crawlee v4's `Configuration` resolves env vars eagerly at construction. + // Reset the cached config + Actor singleton so each test observes the env + // it just wrote. beforeEach(() => { - serviceLocator.reset(); - // The SDK's `Configuration` keeps its own static singleton (separate - // from crawlee's serviceLocator) so tests need to clear that cache too. - ( - Configuration as unknown as { globalConfig?: Configuration } - ).globalConfig = undefined; - // eslint-disable-next-line no-underscore-dangle -- `_instance` is the upstream Actor singleton field - (Actor as unknown as { _instance?: Actor })._instance = undefined; + Actor.reset(); }); test('reads environment variables correctly', () => { From 05743382c21ce7c712fa764ebe9cd5b9f7f179f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Tue, 12 May 2026 16:34:55 +0200 Subject: [PATCH 23/27] =?UTF-8?q?refactor:=20rename=20Actor.reset()=20?= =?UTF-8?q?=E2=86=92=20Actor.resetGlobalState(),=20mark=20@internal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `Actor.reset()` was too generic for the main SDK entrypoint — readers would reasonably expect it to reset *an Actor instance*. Rename to `Actor.resetGlobalState()` (matching the SDK's prior convention for `Configuration.resetGlobalState()` and making the intent explicit: "drop the cached singletons so the next access reconstructs from the current env"). Mark `@internal` so it doesn't surface in public TypeDoc. --- packages/apify/src/actor.ts | 9 +++++---- test/apify/actor.test.ts | 4 ++-- test/apify/utils.test.ts | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/apify/src/actor.ts b/packages/apify/src/actor.ts index 8aa4c779b5..7926d425c6 100644 --- a/packages/apify/src/actor.ts +++ b/packages/apify/src/actor.ts @@ -2232,11 +2232,12 @@ export class Actor { /** * Drops the cached default `Actor` instance and resets the global `Configuration` (and the - * rest of the service tree via crawlee's `serviceLocator`). Intended mainly for tests that - * mutate `process.env` at runtime — see {@link Configuration.reset} for the underlying - * mechanism. + * rest of the service tree via crawlee's `serviceLocator`). Intended for tests that mutate + * `process.env` at runtime — see {@link Configuration.reset} for the underlying mechanism. + * + * @internal */ - static reset(): void { + static resetGlobalState(): void { // eslint-disable-next-line no-underscore-dangle -- `_instance` is the lazy default-Actor cache delete (Actor as { _instance?: Actor })._instance; Configuration.reset(); diff --git a/test/apify/actor.test.ts b/test/apify/actor.test.ts index 012c090598..105506923b 100644 --- a/test/apify/actor.test.ts +++ b/test/apify/actor.test.ts @@ -1189,11 +1189,11 @@ describe('Actor', () => { describe('Actor.getInput', () => { // crawlee v4's Configuration resolves env vars eagerly at construction. - // `Actor.reset()` drops the cached default instance + global Configuration; + // `Actor.resetGlobalState()` drops the cached default instance + global Configuration; // we additionally overwrite `actor.config` with a fresh `new Configuration()` // so env vars set in the test body are guaranteed to be observed. const buildActor = () => { - Actor.reset(); + Actor.resetGlobalState(); const actor = new Actor(); (actor as unknown as { config: Configuration }).config = new Configuration(); diff --git a/test/apify/utils.test.ts b/test/apify/utils.test.ts index ec4ebf0f58..f09b030972 100644 --- a/test/apify/utils.test.ts +++ b/test/apify/utils.test.ts @@ -25,7 +25,7 @@ describe('Actor.newClient()', () => { // Reset the cached config + Actor singleton so each test observes the env // it just wrote. beforeEach(() => { - Actor.reset(); + Actor.resetGlobalState(); }); test('reads environment variables correctly', () => { From 8070d322db673ec0c8048487db9b8d0f8fdb7ca9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Tue, 12 May 2026 16:58:47 +0200 Subject: [PATCH 24/27] chore: bump @crawlee/* to ^4.0.0-beta.56, use super.reset() in Configuration crawlee 4.0.0-beta.56 ships `Configuration.reset()` (apify/crawlee#3649), so the SDK's override can delegate to `super.reset()` instead of calling `serviceLocator.reset()` directly. The SDK still owns clearing its own `globalConfig` static and replacing the `AsyncLocalStorage` singleton. Co-Authored-By: Claude Opus 4.7 (1M context) --- package-lock.json | 256 ++++++++++++++-------------- package.json | 8 +- packages/apify/package.json | 6 +- packages/apify/src/configuration.ts | 14 +- 4 files changed, 141 insertions(+), 143 deletions(-) diff --git a/package-lock.json b/package-lock.json index 42a6d9ef0f..41603ac93a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,9 +16,9 @@ "@apify/input_secrets": "^1.1.72", "@apify/tsconfig": "^0.1.1", "@commitlint/config-conventional": "^19.8.1", - "@crawlee/core": "^4.0.0-beta.51", - "@crawlee/types": "^4.0.0-beta.51", - "@crawlee/utils": "^4.0.0-beta.51", + "@crawlee/core": "^4.0.0-beta.56", + "@crawlee/types": "^4.0.0-beta.56", + "@crawlee/utils": "^4.0.0-beta.56", "@playwright/browser-chromium": "^1.52.0", "@types/content-type": "^1.1.8", "@types/fs-extra": "^11.0.4", @@ -27,7 +27,7 @@ "@types/tough-cookie": "^4.0.5", "@types/ws": "^8.18.1", "commitlint": "^19.8.1", - "crawlee": "^4.0.0-beta.51", + "crawlee": "^4.0.0-beta.56", "eslint": "^9.27.0", "eslint-config-prettier": "^10.1.5", "fs-extra": "^11.3.0", @@ -475,15 +475,15 @@ } }, "node_modules/@crawlee/cheerio": { - "version": "4.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@crawlee/cheerio/-/cheerio-4.0.0-beta.51.tgz", - "integrity": "sha512-PrJ4QHdSp57R3cL6+vGCWXrl9avyhjZGKJf+Z1pOpnpc/U5eZPmcdhVvOJEou1Tgm4gYDflMDtrYuGfBsAVB6w==", + "version": "4.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@crawlee/cheerio/-/cheerio-4.0.0-beta.56.tgz", + "integrity": "sha512-YNuNzjL9zVbbqLgmE4vHzQvYIWVYC+sdyEw2mvJh3EHyO6bHNQzA3RDssDSB0l+zLLdUXhGZStbF71Ur/5RhTw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@crawlee/http": "4.0.0-beta.51", - "@crawlee/types": "4.0.0-beta.51", - "@crawlee/utils": "4.0.0-beta.51", + "@crawlee/http": "4.0.0-beta.56", + "@crawlee/types": "4.0.0-beta.56", + "@crawlee/utils": "4.0.0-beta.56", "cheerio": "^1.0.0", "htmlparser2": "^10.0.0", "tslib": "^2.8.1" @@ -493,13 +493,13 @@ } }, "node_modules/@crawlee/cli": { - "version": "4.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@crawlee/cli/-/cli-4.0.0-beta.51.tgz", - "integrity": "sha512-AZtps02lgeQyX0zQ5uiWbcWU8FhXp7XsIzYtbzMg4zR9KQgzhevtpj8rxuBBlzCNgPMqJgYX86LPXdGxr9sz+w==", + "version": "4.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@crawlee/cli/-/cli-4.0.0-beta.56.tgz", + "integrity": "sha512-LDriHIuvuBJwNk+FV9QkeMwJPAiHvfBf77MAZMCzrNVMqkGzqNb/7/ZnGjNV9+0KckmN/LrEFOPf+3EP6+Mptw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@crawlee/templates": "4.0.0-beta.51", + "@crawlee/templates": "4.0.0-beta.56", "@inquirer/prompts": "^7.5.0", "ansi-colors": "^4.1.3", "fs-extra": "^11.3.0", @@ -642,9 +642,9 @@ } }, "node_modules/@crawlee/core": { - "version": "4.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@crawlee/core/-/core-4.0.0-beta.51.tgz", - "integrity": "sha512-zCmpN5kiNfZjfX1//JgvYrMXxv7toCF47aZxf/uyCbFqpEAQoatrBSsqZeNLPnj/90acG5UUfqF9wVM9Ie3Zug==", + "version": "4.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@crawlee/core/-/core-4.0.0-beta.56.tgz", + "integrity": "sha512-IQa4HMHeHvqSZD9PfByNE82OCPA/BAG431+jgrxLhQArsWBnFYEgP72CjrCvC3TMvGEGJM5R1cGyPZ7peoYAtA==", "license": "Apache-2.0", "dependencies": { "@apify/consts": "^2.41.0", @@ -653,9 +653,9 @@ "@apify/pseudo_url": "^2.0.59", "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/memory-storage": "4.0.0-beta.51", - "@crawlee/types": "4.0.0-beta.51", - "@crawlee/utils": "4.0.0-beta.51", + "@crawlee/memory-storage": "4.0.0-beta.56", + "@crawlee/types": "4.0.0-beta.56", + "@crawlee/utils": "4.0.0-beta.56", "@sapphire/async-queue": "^1.5.5", "@vladfrangu/async_event_emitter": "^2.4.6", "csv-stringify": "^6.5.2", @@ -781,13 +781,13 @@ } }, "node_modules/@crawlee/got-scraping-client": { - "version": "4.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@crawlee/got-scraping-client/-/got-scraping-client-4.0.0-beta.51.tgz", - "integrity": "sha512-IKT7BrlIU/rtFi+b6wnvN47uos34sxVGlX4vZQ8OnOZKHTfNLg1cWBqz/BZhLfgxr5B7ZnmkHWzCBr22kM3zDg==", + "version": "4.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@crawlee/got-scraping-client/-/got-scraping-client-4.0.0-beta.56.tgz", + "integrity": "sha512-QLa0OWd+XW7QN5fczX8ph/UdFOe9nW/vfewtW5B/+JXCGlarkuMq51joo+7XBAKWYrQ3aknWnhiqwxYaSHacPA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@crawlee/http-client": "4.0.0-beta.51", + "@crawlee/http-client": "4.0.0-beta.56", "got-scraping": "^4.2.1" }, "engines": { @@ -795,19 +795,19 @@ } }, "node_modules/@crawlee/http": { - "version": "4.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@crawlee/http/-/http-4.0.0-beta.51.tgz", - "integrity": "sha512-FUaGGZt/PbHuyDgNCna7uqOcq6J5rlus5Sy+LDU/TCTJTcCfuyYkRyEZ4XAba6QoFhSh8ykq8U2v7XQgdm3W5A==", + "version": "4.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@crawlee/http/-/http-4.0.0-beta.56.tgz", + "integrity": "sha512-sQ1oOY4cIGbg3HpZs9awy/nlVifobNTb/8o1ROGJqN2XXJws8E+QCWhu63p65I0zMscSd9arNtXFKKn6swhTyQ==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/basic": "4.0.0-beta.51", - "@crawlee/core": "4.0.0-beta.51", - "@crawlee/http-client": "4.0.0-beta.51", - "@crawlee/types": "4.0.0-beta.51", - "@crawlee/utils": "4.0.0-beta.51", + "@crawlee/basic": "4.0.0-beta.56", + "@crawlee/core": "4.0.0-beta.56", + "@crawlee/http-client": "4.0.0-beta.56", + "@crawlee/types": "4.0.0-beta.56", + "@crawlee/utils": "4.0.0-beta.56", "@types/content-type": "^1.1.8", "cheerio": "^1.0.0", "content-type": "^1.0.5", @@ -822,12 +822,12 @@ } }, "node_modules/@crawlee/http-client": { - "version": "4.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@crawlee/http-client/-/http-client-4.0.0-beta.51.tgz", - "integrity": "sha512-/NcX3ESNXGRVYGBgkKCE035OidlOgsFYAd5zBSWTep/zsLefUISq2HEPTZYVpAvrgIVyaVjbNSilk1NpVjJLxw==", + "version": "4.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@crawlee/http-client/-/http-client-4.0.0-beta.56.tgz", + "integrity": "sha512-9c77oxOB4VuJlQwEqyR8VzZyFyVL7mFf0/2Ny+Kb6rtW6hlZjfg/xLq3ZpuKLfS5LmfGPpFMwCnKDr1NOCkVVw==", "license": "Apache-2.0", "dependencies": { - "@crawlee/types": "4.0.0-beta.51", + "@crawlee/types": "4.0.0-beta.56", "tough-cookie": "^6.0.0" }, "engines": { @@ -847,18 +847,18 @@ } }, "node_modules/@crawlee/http/node_modules/@crawlee/basic": { - "version": "4.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@crawlee/basic/-/basic-4.0.0-beta.51.tgz", - "integrity": "sha512-t4YhLgqWiy4N17YzeLugUIiwQDtXALqTl3GrKSZFnZSuHHux6nlQwbSX8x5FCtzW0q/On9ZGt/GTR+WMTka97g==", + "version": "4.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@crawlee/basic/-/basic-4.0.0-beta.56.tgz", + "integrity": "sha512-lskCNOu/Wp845TQK9DeffaTfcWsb1ZvWbASp+msQ6TtGWbo33aY/+m/6j8eJPMlOJ1NT7axzJYF6CF39JH+dEQ==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/core": "4.0.0-beta.51", - "@crawlee/got-scraping-client": "4.0.0-beta.51", - "@crawlee/types": "4.0.0-beta.51", - "@crawlee/utils": "4.0.0-beta.51", + "@crawlee/core": "4.0.0-beta.56", + "@crawlee/got-scraping-client": "4.0.0-beta.56", + "@crawlee/types": "4.0.0-beta.56", + "@crawlee/utils": "4.0.0-beta.56", "csv-stringify": "^6.5.2", "fs-extra": "^11.3.0", "ow": "^2.0.0", @@ -991,17 +991,17 @@ } }, "node_modules/@crawlee/jsdom": { - "version": "4.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@crawlee/jsdom/-/jsdom-4.0.0-beta.51.tgz", - "integrity": "sha512-x2w8NkQfu14LO4yvVGTi4kNWDn3cgJq+XNSqS3UNAOraxQUPTSJpEicR+hwjt21Fb/tQRKMLRhdTgnqACWRoFw==", + "version": "4.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@crawlee/jsdom/-/jsdom-4.0.0-beta.56.tgz", + "integrity": "sha512-8wsb3w+AEdFIAkMGYSPWFJXxsGM46TaXRpcEMb8gvlPsSCxn+3P7twHx01XWDT5ykYJXQNLf+exGstoxSpUd2w==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/timeout": "^0.3.0", "@apify/utilities": "^2.7.10", - "@crawlee/http": "4.0.0-beta.51", - "@crawlee/types": "4.0.0-beta.51", - "@crawlee/utils": "4.0.0-beta.51", + "@crawlee/http": "4.0.0-beta.56", + "@crawlee/types": "4.0.0-beta.56", + "@crawlee/utils": "4.0.0-beta.56", "@types/jsdom": "^21.1.7", "cheerio": "^1.0.0", "jsdom": "^26.1.0", @@ -1089,17 +1089,17 @@ } }, "node_modules/@crawlee/linkedom": { - "version": "4.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@crawlee/linkedom/-/linkedom-4.0.0-beta.51.tgz", - "integrity": "sha512-OY2ku6ZO2M26ViuYygBGDntxIVNd4zbuaglPdbgyLekX2lw5e6tbqWSLZ7pOF1FTOllCpXVRetRRArWcOBMc7A==", + "version": "4.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@crawlee/linkedom/-/linkedom-4.0.0-beta.56.tgz", + "integrity": "sha512-+oapbX6V9leYP9ucwPe0EqLHjhxvF2M9PXxv0L9hPlorB1qg8UrE76SiDRXDROipPtOjgiq36PQ5ij33FAxBsg==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/http": "4.0.0-beta.51", - "@crawlee/types": "4.0.0-beta.51", - "@crawlee/utils": "4.0.0-beta.51", + "@crawlee/http": "4.0.0-beta.56", + "@crawlee/types": "4.0.0-beta.56", + "@crawlee/utils": "4.0.0-beta.56", "cheerio": "^1.0.0", "linkedom": "^0.18.10", "ow": "^2.0.0", @@ -1186,12 +1186,12 @@ } }, "node_modules/@crawlee/memory-storage": { - "version": "4.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@crawlee/memory-storage/-/memory-storage-4.0.0-beta.51.tgz", - "integrity": "sha512-SiaQjdZaA7S7BdK5NeCK8LR0GeCNJq4x6qlv7fcQ+MqebLHKNEcmUcuwYXf9u4IoYweNfO+v9N+RkmfjyP4C1A==", + "version": "4.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@crawlee/memory-storage/-/memory-storage-4.0.0-beta.56.tgz", + "integrity": "sha512-gRMYE7Wwyc34r14qU/YvY1iRjr66GQ87CUpmhqA0f5Ta+wWL3VTse+mKU3xpEVwEZXT0cv6VfJxqm4xVw7cnjw==", "license": "Apache-2.0", "dependencies": { - "@crawlee/types": "4.0.0-beta.51", + "@crawlee/types": "4.0.0-beta.56", "@sapphire/async-queue": "^1.5.5", "@sapphire/shapeshift": "^4.0.0", "content-type": "^1.0.5", @@ -1259,9 +1259,9 @@ } }, "node_modules/@crawlee/templates": { - "version": "4.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@crawlee/templates/-/templates-4.0.0-beta.51.tgz", - "integrity": "sha512-YDGdBpv2ztbdY1EbVOV3lyJWjGeYGhBprA3WD58sLX+eIx7vUiZUZXdznt3AMf1FnGvfbCsbpFoVPa72xydtYw==", + "version": "4.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@crawlee/templates/-/templates-4.0.0-beta.56.tgz", + "integrity": "sha512-DAnkiNax0k6VMFjvK9Wj9H4wFXQxqHh2Wzex8cVO6SxgGnUCS3UZuglwmxv5ODxhfTYdazC38WDvVkRtWgNSlA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -1272,9 +1272,9 @@ } }, "node_modules/@crawlee/types": { - "version": "4.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@crawlee/types/-/types-4.0.0-beta.51.tgz", - "integrity": "sha512-U/m8K41Fe8q5rvLqFvjclNTvRPvRsrphatEBssV1J8q/Rjhn71SnVVB0qVKYusNMLjLnaup3tlBY/01ahJDDSw==", + "version": "4.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@crawlee/types/-/types-4.0.0-beta.56.tgz", + "integrity": "sha512-KfiBOKtO8Kk9TQRIkxzWyj6TdIAXLH+HZ+G64IFmllXKW1TDrMDZHLuT8vXgNcm5Od8JBGlc/PHqkbMCBhUF6g==", "license": "Apache-2.0", "dependencies": { "tough-cookie": "^6.0.0", @@ -1297,14 +1297,14 @@ } }, "node_modules/@crawlee/utils": { - "version": "4.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@crawlee/utils/-/utils-4.0.0-beta.51.tgz", - "integrity": "sha512-DHvn2fo/6pIHTiHAi5tenkSWWi2KTm6sicnAIY38H98ZOiys4Yxh22wvfRN4cE8wm8pbUucQ8IYIzKSxbNLd+Q==", + "version": "4.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@crawlee/utils/-/utils-4.0.0-beta.56.tgz", + "integrity": "sha512-0ZAMa8g0AT5jz8XzEfgixCEU1OKPVSU6h0/vruIcBPDeJugbhGODKNyiMOOoe9tf6qMmVdwVxS/vj5ADu0mWgA==", "license": "Apache-2.0", "dependencies": { "@apify/ps-tree": "^1.2.0", - "@crawlee/http-client": "4.0.0-beta.51", - "@crawlee/types": "4.0.0-beta.51", + "@crawlee/http-client": "4.0.0-beta.56", + "@crawlee/types": "4.0.0-beta.56", "@types/sax": "^1.2.7", "cheerio": "^1.0.0", "domhandler": "^5.0.3", @@ -7793,24 +7793,24 @@ } }, "node_modules/crawlee": { - "version": "4.0.0-beta.51", - "resolved": "https://registry.npmjs.org/crawlee/-/crawlee-4.0.0-beta.51.tgz", - "integrity": "sha512-i/w8O7D7mdmUr8hdKEWSSHEIGqk4+nrknoWtEJiwnyOQAyzg7G98QsHUBeGmAR+j40EDPJui3wzrh7B6tUNkMA==", + "version": "4.0.0-beta.56", + "resolved": "https://registry.npmjs.org/crawlee/-/crawlee-4.0.0-beta.56.tgz", + "integrity": "sha512-paz/jcWEjnm/llVcC+GVr5ox43Z8DH4ED1BM5d9fry4JbNv/DgQzn5atqpC8CBQTMOtuOoqvRtrrR70sBpnlVA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@crawlee/basic": "4.0.0-beta.51", - "@crawlee/browser": "4.0.0-beta.51", - "@crawlee/browser-pool": "4.0.0-beta.51", - "@crawlee/cheerio": "4.0.0-beta.51", - "@crawlee/cli": "4.0.0-beta.51", - "@crawlee/core": "4.0.0-beta.51", - "@crawlee/http": "4.0.0-beta.51", - "@crawlee/jsdom": "4.0.0-beta.51", - "@crawlee/linkedom": "4.0.0-beta.51", - "@crawlee/playwright": "4.0.0-beta.51", - "@crawlee/puppeteer": "4.0.0-beta.51", - "@crawlee/utils": "4.0.0-beta.51", + "@crawlee/basic": "4.0.0-beta.56", + "@crawlee/browser": "4.0.0-beta.56", + "@crawlee/browser-pool": "4.0.0-beta.56", + "@crawlee/cheerio": "4.0.0-beta.56", + "@crawlee/cli": "4.0.0-beta.56", + "@crawlee/core": "4.0.0-beta.56", + "@crawlee/http": "4.0.0-beta.56", + "@crawlee/jsdom": "4.0.0-beta.56", + "@crawlee/linkedom": "4.0.0-beta.56", + "@crawlee/playwright": "4.0.0-beta.56", + "@crawlee/puppeteer": "4.0.0-beta.56", + "@crawlee/utils": "4.0.0-beta.56", "import-local": "^3.2.0", "tslib": "^2.8.1" }, @@ -7838,18 +7838,18 @@ } }, "node_modules/crawlee/node_modules/@crawlee/basic": { - "version": "4.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@crawlee/basic/-/basic-4.0.0-beta.51.tgz", - "integrity": "sha512-t4YhLgqWiy4N17YzeLugUIiwQDtXALqTl3GrKSZFnZSuHHux6nlQwbSX8x5FCtzW0q/On9ZGt/GTR+WMTka97g==", + "version": "4.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@crawlee/basic/-/basic-4.0.0-beta.56.tgz", + "integrity": "sha512-lskCNOu/Wp845TQK9DeffaTfcWsb1ZvWbASp+msQ6TtGWbo33aY/+m/6j8eJPMlOJ1NT7axzJYF6CF39JH+dEQ==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/core": "4.0.0-beta.51", - "@crawlee/got-scraping-client": "4.0.0-beta.51", - "@crawlee/types": "4.0.0-beta.51", - "@crawlee/utils": "4.0.0-beta.51", + "@crawlee/core": "4.0.0-beta.56", + "@crawlee/got-scraping-client": "4.0.0-beta.56", + "@crawlee/types": "4.0.0-beta.56", + "@crawlee/utils": "4.0.0-beta.56", "csv-stringify": "^6.5.2", "fs-extra": "^11.3.0", "ow": "^2.0.0", @@ -7862,17 +7862,17 @@ } }, "node_modules/crawlee/node_modules/@crawlee/browser": { - "version": "4.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@crawlee/browser/-/browser-4.0.0-beta.51.tgz", - "integrity": "sha512-Z0VoAetDT5HL8vtQYiZkOVrFFpoeoq/6Yvc6hK6Sp6tQ5Snb/+uVXcTL9LTQ0a/9G0S3yzbgvuYaHpR2AInK1Q==", + "version": "4.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@crawlee/browser/-/browser-4.0.0-beta.56.tgz", + "integrity": "sha512-vcDDKQ8w/TMcz7ytfTEhN614bs0Afh5gB2vf2wlIIWQJvN9AZx8oPJEHijnu20UneiX+CRlCytmj1j5GiS1hnA==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/timeout": "^0.3.2", - "@crawlee/basic": "4.0.0-beta.51", - "@crawlee/browser-pool": "4.0.0-beta.51", - "@crawlee/types": "4.0.0-beta.51", - "@crawlee/utils": "4.0.0-beta.51", + "@crawlee/basic": "4.0.0-beta.56", + "@crawlee/browser-pool": "4.0.0-beta.56", + "@crawlee/types": "4.0.0-beta.56", + "@crawlee/utils": "4.0.0-beta.56", "ow": "^2.0.0", "tslib": "^2.8.1", "type-fest": "^4.41.0" @@ -7894,15 +7894,15 @@ } }, "node_modules/crawlee/node_modules/@crawlee/browser-pool": { - "version": "4.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@crawlee/browser-pool/-/browser-pool-4.0.0-beta.51.tgz", - "integrity": "sha512-2YSgDy8QFrTpzYYiLSctcWyu9MaQzaV0fDrcRMO/a1+WeiwPc5cOwpRjtJYXVRjN4ty1x3/pUbY+mNaGjUDUng==", + "version": "4.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@crawlee/browser-pool/-/browser-pool-4.0.0-beta.56.tgz", + "integrity": "sha512-aipCOm+8GVTnm9QYpq85SiFB+zPZy+zAgdyN3OI3Wt2tXamALFRvytWtcTMzoCQos+Uo97UM0akHiUxVW0ABOw==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/timeout": "^0.3.2", - "@crawlee/core": "4.0.0-beta.51", - "@crawlee/types": "4.0.0-beta.51", + "@crawlee/core": "4.0.0-beta.56", + "@crawlee/types": "4.0.0-beta.56", "fingerprint-generator": "^2.1.68", "fingerprint-injector": "^2.1.68", "lodash.merge": "^4.6.2", @@ -7931,21 +7931,21 @@ } }, "node_modules/crawlee/node_modules/@crawlee/playwright": { - "version": "4.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@crawlee/playwright/-/playwright-4.0.0-beta.51.tgz", - "integrity": "sha512-kJFB2VEeD8xp42oQuf1yReADuhuqZnHxLU5H6IneJ0BhG4JHy5/Za2QT7LtkwBfATZSbIyxiBlgk8vevU25t5A==", + "version": "4.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@crawlee/playwright/-/playwright-4.0.0-beta.56.tgz", + "integrity": "sha512-6LriTQm9dVL/Ram2movEyZEQnCTSJuLHvBvwyMEuVKebJel7Ns79aOjmMAn0yeJYXV0K+dT61yMNOcZnLyI3Ig==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/datastructures": "^2.0.3", "@apify/timeout": "^0.3.2", - "@crawlee/basic": "4.0.0-beta.51", - "@crawlee/browser": "4.0.0-beta.51", - "@crawlee/browser-pool": "4.0.0-beta.51", - "@crawlee/cheerio": "4.0.0-beta.51", - "@crawlee/core": "4.0.0-beta.51", - "@crawlee/types": "4.0.0-beta.51", - "@crawlee/utils": "4.0.0-beta.51", + "@crawlee/basic": "4.0.0-beta.56", + "@crawlee/browser": "4.0.0-beta.56", + "@crawlee/browser-pool": "4.0.0-beta.56", + "@crawlee/cheerio": "4.0.0-beta.56", + "@crawlee/core": "4.0.0-beta.56", + "@crawlee/types": "4.0.0-beta.56", + "@crawlee/utils": "4.0.0-beta.56", "cheerio": "^1.0.0", "idcac-playwright": "^0.1.3", "jquery": "^3.7.1", @@ -7979,18 +7979,18 @@ "license": "ISC" }, "node_modules/crawlee/node_modules/@crawlee/puppeteer": { - "version": "4.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@crawlee/puppeteer/-/puppeteer-4.0.0-beta.51.tgz", - "integrity": "sha512-IrPUaR9Y4AeVyCnfZSAWHVvFxAAhVlCJDuEtcL7YIhAuBrvTRW9aGqx6vAhzTsrEwpvuk1OX2mL1lE8s/xbUiw==", + "version": "4.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@crawlee/puppeteer/-/puppeteer-4.0.0-beta.56.tgz", + "integrity": "sha512-I5aSgeYe8mChUw9eIiFUn3duv5cNVYQlGw94PbcAaLccAlJmsG+Q6F62MYI6qtdls+Vrvk+IjAsEVdmvjFbExA==", "dev": true, "license": "Apache-2.0", "dependencies": { "@apify/datastructures": "^2.0.3", - "@crawlee/browser": "4.0.0-beta.51", - "@crawlee/browser-pool": "4.0.0-beta.51", - "@crawlee/core": "4.0.0-beta.51", - "@crawlee/types": "4.0.0-beta.51", - "@crawlee/utils": "4.0.0-beta.51", + "@crawlee/browser": "4.0.0-beta.56", + "@crawlee/browser-pool": "4.0.0-beta.56", + "@crawlee/core": "4.0.0-beta.56", + "@crawlee/types": "4.0.0-beta.56", + "@crawlee/utils": "4.0.0-beta.56", "cheerio": "^1.0.0", "devtools-protocol": "*", "idcac-playwright": "^0.2.0", @@ -8070,9 +8070,9 @@ } }, "node_modules/crawlee/node_modules/nanoid": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.9.tgz", - "integrity": "sha512-ZUvP7KeBLe3OZ1ypw6dI/TzYJuvHP77IM4Ry73waSQTLn8/g8rpdjfyVAh7t1/+FjBtG4lCP42MEbDxOsRpBMw==", + "version": "5.1.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.11.tgz", + "integrity": "sha512-v+KEsUv2ps74PaSKv0gHTxTCgMXOIfBEbaqa6w6ISIGC7ZsvHN4N9oJ8d4cmf0n5oTzQz2SLmThbQWhjd/8eKg==", "dev": true, "funding": [ { @@ -20286,9 +20286,9 @@ "@apify/log": "^2.5.18", "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/core": "^4.0.0-beta.51", - "@crawlee/types": "^4.0.0-beta.51", - "@crawlee/utils": "^4.0.0-beta.51", + "@crawlee/core": "^4.0.0-beta.56", + "@crawlee/types": "^4.0.0-beta.56", + "@crawlee/utils": "^4.0.0-beta.56", "apify-client": "^2.12.4", "fs-extra": "^11.3.0", "got-scraping": "^4.1.1", diff --git a/package.json b/package.json index 7d7ba48891..815ed78957 100644 --- a/package.json +++ b/package.json @@ -70,9 +70,9 @@ "@apify/input_secrets": "^1.1.72", "@apify/tsconfig": "^0.1.1", "@commitlint/config-conventional": "^19.8.1", - "@crawlee/core": "^4.0.0-beta.51", - "@crawlee/types": "^4.0.0-beta.51", - "@crawlee/utils": "^4.0.0-beta.51", + "@crawlee/core": "^4.0.0-beta.56", + "@crawlee/types": "^4.0.0-beta.56", + "@crawlee/utils": "^4.0.0-beta.56", "@playwright/browser-chromium": "^1.52.0", "@types/content-type": "^1.1.8", "@types/fs-extra": "^11.0.4", @@ -81,7 +81,7 @@ "@types/tough-cookie": "^4.0.5", "@types/ws": "^8.18.1", "commitlint": "^19.8.1", - "crawlee": "^4.0.0-beta.51", + "crawlee": "^4.0.0-beta.56", "eslint": "^9.27.0", "eslint-config-prettier": "^10.1.5", "fs-extra": "^11.3.0", diff --git a/packages/apify/package.json b/packages/apify/package.json index 9173c9696b..cd0430ffc3 100644 --- a/packages/apify/package.json +++ b/packages/apify/package.json @@ -53,9 +53,9 @@ "@apify/log": "^2.5.18", "@apify/timeout": "^0.3.2", "@apify/utilities": "^2.15.5", - "@crawlee/core": "^4.0.0-beta.51", - "@crawlee/types": "^4.0.0-beta.51", - "@crawlee/utils": "^4.0.0-beta.51", + "@crawlee/core": "^4.0.0-beta.56", + "@crawlee/types": "^4.0.0-beta.56", + "@crawlee/utils": "^4.0.0-beta.56", "apify-client": "^2.12.4", "fs-extra": "^11.3.0", "got-scraping": "^4.1.1", diff --git a/packages/apify/src/configuration.ts b/packages/apify/src/configuration.ts index 2165fd8a7a..9908777966 100644 --- a/packages/apify/src/configuration.ts +++ b/packages/apify/src/configuration.ts @@ -8,7 +8,6 @@ import { Configuration as CoreConfiguration, crawleeConfigFields, field, - serviceLocator, } from '@crawlee/core'; import { z } from 'zod'; @@ -313,15 +312,14 @@ export class Configuration extends CoreConfiguration { * `process.env` at runtime — values are resolved eagerly at construction, so changing env vars * after the singleton has been cached has no effect until the singleton is dropped. * - * Clears the SDK's `globalConfig` static, the `AsyncLocalStorage` that `Actor.init()` writes - * to (replaced wholesale because `enterWith(undefined)` from a child async context does not - * propagate back up on Node 22), and crawlee's `serviceLocator`. - * - * Overrides crawlee's `Configuration.reset()` (apify/crawlee#3649) once published. + * Extends crawlee's `Configuration.reset()` (which drops the service locator) by also clearing + * the SDK's own `globalConfig` static and replacing the `AsyncLocalStorage` that `Actor.init()` + * writes to (replaced wholesale because `enterWith(undefined)` from a child async context does + * not propagate back up on Node 22). */ - static reset(): void { + static override reset(): void { delete this.globalConfig; this.storage = new AsyncLocalStorage(); - serviceLocator.reset(); + super.reset(); } } From 24ae9b447a369a272b17a2f2d2f58cdde6d24fd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Wed, 13 May 2026 16:44:07 +0200 Subject: [PATCH 25/27] refactor(tests): move resetGlobalState() to a test helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `Actor.resetGlobalState()` and `Configuration.reset()` were both misplaced — Actor is the main public entry point and shouldn't carry test-cleanup methods, and `Configuration.reset()` is misleading because it doesn't reset anything *on* the Configuration; it just drops the singletons that the service locator + SDK statics keep around. Move the cleanup to `test/resetGlobalState.ts`, exported only inside the test tree, and update the two test files that used the static methods to import from there. Production-side SDK surface no longer exposes a generic reset. (Crawlee's `Configuration.reset()` will be reverted separately — apify/crawlee#3649. Until that lands, calling it is harmless; we just don't call it anymore.) Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/apify/src/actor.ts | 13 ---------- packages/apify/src/configuration.ts | 17 ------------- test/apify/actor.test.ts | 5 ++-- test/apify/utils.test.ts | 3 ++- test/resetGlobalState.ts | 39 +++++++++++++++++++++++++++++ 5 files changed, 44 insertions(+), 33 deletions(-) create mode 100644 test/resetGlobalState.ts diff --git a/packages/apify/src/actor.ts b/packages/apify/src/actor.ts index 7926d425c6..0a8f1e0601 100644 --- a/packages/apify/src/actor.ts +++ b/packages/apify/src/actor.ts @@ -2230,19 +2230,6 @@ export class Actor { return this._instance; } - /** - * Drops the cached default `Actor` instance and resets the global `Configuration` (and the - * rest of the service tree via crawlee's `serviceLocator`). Intended for tests that mutate - * `process.env` at runtime — see {@link Configuration.reset} for the underlying mechanism. - * - * @internal - */ - static resetGlobalState(): void { - // eslint-disable-next-line no-underscore-dangle -- `_instance` is the lazy default-Actor cache - delete (Actor as { _instance?: Actor })._instance; - Configuration.reset(); - } - private async _openStorage( storageClass: Constructor, id?: string, diff --git a/packages/apify/src/configuration.ts b/packages/apify/src/configuration.ts index 9908777966..a250f68f8f 100644 --- a/packages/apify/src/configuration.ts +++ b/packages/apify/src/configuration.ts @@ -305,21 +305,4 @@ export class Configuration extends CoreConfiguration { Configuration.globalConfig ??= new Configuration(); return Configuration.globalConfig as Configuration; } - - /** - * Drops the cached global configuration so the next `Configuration.getGlobalConfig()` constructs - * a fresh instance from the current environment. Intended mainly for tests that mutate - * `process.env` at runtime — values are resolved eagerly at construction, so changing env vars - * after the singleton has been cached has no effect until the singleton is dropped. - * - * Extends crawlee's `Configuration.reset()` (which drops the service locator) by also clearing - * the SDK's own `globalConfig` static and replacing the `AsyncLocalStorage` that `Actor.init()` - * writes to (replaced wholesale because `enterWith(undefined)` from a child async context does - * not propagate back up on Node 22). - */ - static override reset(): void { - delete this.globalConfig; - this.storage = new AsyncLocalStorage(); - super.reset(); - } } diff --git a/test/apify/actor.test.ts b/test/apify/actor.test.ts index 105506923b..5c55834741 100644 --- a/test/apify/actor.test.ts +++ b/test/apify/actor.test.ts @@ -24,6 +24,7 @@ import { encryptInputSecrets } from '@apify/input_secrets'; import log from '@apify/log'; import { MemoryStorageEmulator } from '../MemoryStorageEmulator.js'; +import { resetGlobalState } from '../resetGlobalState.js'; const getEmptyEnv = () => { return { @@ -1189,11 +1190,11 @@ describe('Actor', () => { describe('Actor.getInput', () => { // crawlee v4's Configuration resolves env vars eagerly at construction. - // `Actor.resetGlobalState()` drops the cached default instance + global Configuration; + // `resetGlobalState()` drops the cached default Actor + global Configuration; // we additionally overwrite `actor.config` with a fresh `new Configuration()` // so env vars set in the test body are guaranteed to be observed. const buildActor = () => { - Actor.resetGlobalState(); + resetGlobalState(); const actor = new Actor(); (actor as unknown as { config: Configuration }).config = new Configuration(); diff --git a/test/apify/utils.test.ts b/test/apify/utils.test.ts index f09b030972..5e5d110226 100644 --- a/test/apify/utils.test.ts +++ b/test/apify/utils.test.ts @@ -9,6 +9,7 @@ import { APIFY_ENV_VARS } from '@apify/consts'; import log from '@apify/log'; import { printOutdatedSdkWarning } from '../../packages/apify/src/utils.js'; +import { resetGlobalState } from '../resetGlobalState.js'; describe('Actor.isAtHome()', () => { test('works', () => { @@ -25,7 +26,7 @@ describe('Actor.newClient()', () => { // Reset the cached config + Actor singleton so each test observes the env // it just wrote. beforeEach(() => { - Actor.resetGlobalState(); + resetGlobalState(); }); test('reads environment variables correctly', () => { diff --git a/test/resetGlobalState.ts b/test/resetGlobalState.ts new file mode 100644 index 0000000000..aea3a2cdc3 --- /dev/null +++ b/test/resetGlobalState.ts @@ -0,0 +1,39 @@ +import { AsyncLocalStorage } from 'node:async_hooks'; + +import { serviceLocator } from '@crawlee/core'; +import { Actor, Configuration } from 'apify'; + +/** + * Test helper: drops every cached singleton that influences how a freshly + * constructed `Actor` / `Configuration` observes `process.env`. + * + * `Configuration` resolves env vars eagerly at construction, so once a global + * config has been cached, subsequent env-var mutations are invisible until the + * cached instance is dropped. Four caches need clearing for that to work + * end-to-end: + * + * - `Actor._instance` — lazy default `Actor` created by `Actor.getDefaultInstance()`. + * - `Configuration.globalConfig` — the SDK's own static singleton (held alongside + * crawlee's `serviceLocator` cache because the SDK overrides `getGlobalConfig`). + * - `Configuration.storage` — the `AsyncLocalStorage` that `Actor.init()` writes + * to. Replaced wholesale because `enterWith(undefined)` from a child async + * context doesn't propagate back up on Node 22. + * - `serviceLocator` — crawlee's cache for `Configuration` / `EventManager` / + * `StorageClient` / `Logger`. Dropped via `serviceLocator.reset()`. + * + * Production code never needs this — Configuration is intentionally immutable + * per-instance. Kept in the test tree so it doesn't pollute the public SDK + * surface. + */ +/* eslint-disable no-underscore-dangle */ +export function resetGlobalState(): void { + delete (Actor as { _instance?: Actor })._instance; + delete (Configuration as unknown as { globalConfig?: Configuration }) + .globalConfig; + ( + Configuration as unknown as { + storage: AsyncLocalStorage; + } + ).storage = new AsyncLocalStorage(); + serviceLocator.reset(); +} From ee7835d9adb666bdc9033c2aada56b92fea4738b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Thu, 14 May 2026 14:57:02 +0200 Subject: [PATCH 26/27] feat(actor): accept a pre-built Configuration via `new Actor({ configuration })` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Actor constructor previously took either zero options (use cached global Configuration) or field-level overrides (`{ token: ..., inputKey: ... }` constructs a fresh Configuration from those). There was no way to hand the Actor a Configuration instance you already have — useful for tests that want a fresh env-resolved Configuration without touching the global singleton, and for application code that wires its own config explicitly. Adds an optional `configuration` field on the constructor options. When present, it takes precedence over field-level overrides (which are ignored) so the contract stays unambiguous. Mirrors crawlee's BasicCrawler pattern. `Actor.getInput` tests use it: dropping the `resetGlobalState()` + `actor.config = new Configuration()` dance for a single `new Actor({ configuration: new Configuration() })`. Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/apify/src/actor.ts | 32 ++++++++++++++++++++++++++------ test/apify/actor.test.ts | 18 ++++++------------ 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/packages/apify/src/actor.ts b/packages/apify/src/actor.ts index 0a8f1e0601..56a3d3c9cd 100644 --- a/packages/apify/src/actor.ts +++ b/packages/apify/src/actor.ts @@ -57,6 +57,21 @@ import { printOutdatedSdkWarning, } from './utils.js'; +/** + * Options accepted by the {@link Actor} constructor. Either pass field-level + * overrides (`token`, `inputKey`, …) — which the Actor will turn into a fresh + * {@link Configuration} — or pass a pre-built `configuration` instance. When + * both are present, `configuration` wins and the field-level overrides are + * ignored. + */ +export type ActorOptions = ConfigurationOptions & { + /** + * Pre-built {@link Configuration} instance the Actor should use. Takes + * precedence over any field-level overrides also passed in `options`. + */ + configuration?: Configuration; +}; + export interface InitOptions { storage?: StorageClient; } @@ -363,12 +378,17 @@ export class Actor { private chargingManager: ChargingManager; - constructor(options: ConfigurationOptions = {}) { - // use default configuration object if nothing overridden (it fallbacks to env vars) - this.config = - Object.keys(options).length === 0 - ? Configuration.getGlobalConfig() - : new Configuration(options); + constructor(options: ActorOptions = {}) { + const { configuration, ...configOptions } = options; + if (configuration) { + // BYO Configuration takes precedence; field-level overrides are + // ignored to keep the contract unambiguous. + this.config = configuration; + } else if (Object.keys(configOptions).length === 0) { + this.config = Configuration.getGlobalConfig(); + } else { + this.config = new Configuration(configOptions); + } this.apifyClient = this.newClient(); this.eventManager = new PlatformEventManager(this.config); this.chargingManager = new ChargingManager( diff --git a/test/apify/actor.test.ts b/test/apify/actor.test.ts index 5c55834741..4138db1012 100644 --- a/test/apify/actor.test.ts +++ b/test/apify/actor.test.ts @@ -24,7 +24,6 @@ import { encryptInputSecrets } from '@apify/input_secrets'; import log from '@apify/log'; import { MemoryStorageEmulator } from '../MemoryStorageEmulator.js'; -import { resetGlobalState } from '../resetGlobalState.js'; const getEmptyEnv = () => { return { @@ -1189,17 +1188,12 @@ describe('Actor', () => { }); describe('Actor.getInput', () => { - // crawlee v4's Configuration resolves env vars eagerly at construction. - // `resetGlobalState()` drops the cached default Actor + global Configuration; - // we additionally overwrite `actor.config` with a fresh `new Configuration()` - // so env vars set in the test body are guaranteed to be observed. - const buildActor = () => { - resetGlobalState(); - const actor = new Actor(); - (actor as unknown as { config: Configuration }).config = - new Configuration(); - return actor; - }; + // crawlee v4's Configuration resolves env vars eagerly at construction, + // so we pass a fresh `Configuration` to the Actor constructor — this + // observes whatever env vars the test body has set without touching + // the global cache. + const buildActor = () => + new Actor({ configuration: new Configuration() }); test('should work', async () => { const TestingActor = buildActor(); From a00a8f7f5c750e1bfdfb904d2986dcba55b8098a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Tue, 19 May 2026 14:41:13 +0200 Subject: [PATCH 27/27] fix(actor): honour `this.config` instead of `Configuration.getGlobalConfig()` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two spots inside `Actor` were still reaching for the global Configuration singleton instead of the Actor's own `this.config`, which silently defeated the new `new Actor({ configuration })` option: - `init()`: `serviceLocator.setConfiguration(Configuration.getGlobalConfig())` registered the *global* config with the service locator, even when the Actor was constructed with a custom one. Crawlee internals created later (event manager, storage client, …) then saw the wrong instance. - `useState()`: fell back to `Configuration.getGlobalConfig()` for the underlying `KeyValueStore.open({ config })`, same problem. Both now use `this.config`. The stale comment on the `init()` line ("reset global config instance to respect APIFY_ prefixed env vars" — made sense in v3 with mutable Configuration, not in v4 where values are resolved eagerly at construction) is updated. Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/apify/src/actor.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/apify/src/actor.ts b/packages/apify/src/actor.ts index 56a3d3c9cd..36ad69b296 100644 --- a/packages/apify/src/actor.ts +++ b/packages/apify/src/actor.ts @@ -509,8 +509,11 @@ export class Actor { log.info('System info', getSystemInfo()); printOutdatedSdkWarning(); - // reset global config instance to respect APIFY_ prefixed env vars - serviceLocator.setConfiguration(Configuration.getGlobalConfig()); + // Register this Actor's Configuration with the service locator so + // crawlee internals (event manager, storage client, …) created later + // see the same instance. Honours a custom `configuration` passed to + // the Actor constructor instead of falling back to the global. + serviceLocator.setConfiguration(this.config); if (this.isAtHome()) { // availableMemoryRatio and disableBrowserSandbox are now set via @@ -1525,7 +1528,7 @@ export class Actor { options?: UseStateOptions, ) { const kvStore = await KeyValueStore.open(options?.keyValueStoreName, { - config: options?.config || Configuration.getGlobalConfig(), + config: options?.config || this.config, }); return kvStore.getAutoSavedValue( name || 'APIFY_GLOBAL_STATE',