apify 4.0.0-beta.124 → 4.0.0-beta.126

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/actor.js CHANGED
@@ -9,7 +9,6 @@ import { ACTOR_ENV_VARS, ACTOR_EVENT_NAMES, APIFY_ENV_VARS, INTEGER_ENV_VARS, ME
9
9
  import { decryptInputSecrets } from '@apify/input_secrets';
10
10
  import log from '@apify/log';
11
11
  import { addTimeoutToPromise } from '@apify/timeout';
12
- import { timeoutPromise } from '@apify/utilities';
13
12
  import { parseArgument } from '@apify/validations';
14
13
  import { ApifyFileSystemStorageBackend } from './apify_file_system_storage_backend.js';
15
14
  import { ApifyStorageBackend } from './apify_storage_backend.js';
@@ -701,13 +700,14 @@ export class Actor {
701
700
  }
702
701
  });
703
702
  // Waiting for all the listeners to finish, as `.reboot()` kills the container.
704
- // Not using `addTimeoutToPromise`, its timeout would also cancel the enclosing one (e.g. a request handler).
705
- await timeoutPromise(Promise.all([
706
- // `persistState` for individual RequestLists, RequestQueue... instances to be persisted
707
- ...callListeners(EventType.PERSIST_STATE, { isMigrating: true }),
708
- // `migrating` to pause Apify crawlers
709
- ...callListeners(EventType.MIGRATING, {}),
710
- ]), timeoutSecs * 1000, `Pre-reboot event listeners did not finish within ${timeoutSecs} seconds, proceeding with the reboot`).catch((err) => log.warning(err.message));
703
+ await addTimeoutToPromise(async () => {
704
+ await Promise.all([
705
+ // `persistState` for individual RequestLists, RequestQueue... instances to be persisted
706
+ ...callListeners(EventType.PERSIST_STATE, { isMigrating: true }),
707
+ // `migrating` to pause Apify crawlers
708
+ ...callListeners(EventType.MIGRATING, {}),
709
+ ]);
710
+ }, timeoutSecs * 1000, `Pre-reboot event listeners did not finish within ${timeoutSecs} seconds, proceeding with the reboot`).catch((err) => log.warning(err.message));
711
711
  const runId = this.configuration.actorRunId;
712
712
  try {
713
713
  await this.apifyClient.run(runId).reboot();
@@ -138,6 +138,7 @@ export class ProxyConfiguration extends CoreProxyConfiguration {
138
138
  `provide options.password or "${APIFY_ENV_VARS.PROXY_PASSWORD}" environment variable. ` +
139
139
  `You can also provide your Apify token via the "${APIFY_ENV_VARS.TOKEN}" environment variable, ` +
140
140
  `so that the SDK can fetch the proxy password from Apify API, when ${APIFY_ENV_VARS.PROXY_PASSWORD} is not defined`);
141
+ return false;
141
142
  }
142
143
  }
143
144
  if ((options?.checkAccess ?? this.#checkAccess) !== false) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apify",
3
- "version": "4.0.0-beta.124",
3
+ "version": "4.0.0-beta.126",
4
4
  "description": "The scalable web crawling and scraping library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.",
5
5
  "engines": {
6
6
  "node": ">=22.13.0"
@@ -58,7 +58,7 @@
58
58
  "@apify/input_secrets": "^2.0.9",
59
59
  "@apify/log": "^3.0.2",
60
60
  "@apify/pseudo_url": "^3.0.2",
61
- "@apify/timeout": "^1.0.1",
61
+ "@apify/timeout": "^1.1.0",
62
62
  "@apify/utilities": "^3.1.1",
63
63
  "@apify/validations": "^1.1.4",
64
64
  "@crawlee/core": "4.0.0-rc.2",