apify 4.0.0-beta.81 → 4.0.0-beta.83
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.d.ts +0 -2
- package/dist/actor.js +9 -3
- package/dist/utils.d.ts +0 -5
- package/dist/utils.js +0 -16
- package/package.json +1 -3
package/dist/actor.d.ts
CHANGED
|
@@ -170,7 +170,6 @@ export interface ApifyEnv {
|
|
|
170
170
|
apiPublicBaseUrl: string | null;
|
|
171
171
|
chromeExecutablePath: string | null;
|
|
172
172
|
dedicatedCpus: string | null;
|
|
173
|
-
disableOutdatedWarning: 1 | null;
|
|
174
173
|
fact: string | null;
|
|
175
174
|
inputSecretsPrivateKeyFile: string | null;
|
|
176
175
|
inputSecretsPrivateKeyPassphrase: string | null;
|
|
@@ -196,7 +195,6 @@ export interface ApifyEnv {
|
|
|
196
195
|
* The key of the input record in the Actor’s default key-value store (ACTOR_INPUT_KEY)
|
|
197
196
|
*/
|
|
198
197
|
inputKey: string | null;
|
|
199
|
-
sdkLatestVersion: string | null;
|
|
200
198
|
systemInfoIntervalMillis: string | null;
|
|
201
199
|
workflowKey: string | null;
|
|
202
200
|
actorBuildNumber: string | null;
|
package/dist/actor.js
CHANGED
|
@@ -21,9 +21,14 @@ import { getDefaultsFromInputSchema, noActorInputSchemaDefinedMarker, readInputS
|
|
|
21
21
|
import { PlatformEventManager } from './platform_event_manager.js';
|
|
22
22
|
import { ProxyConfiguration } from './proxy_configuration.js';
|
|
23
23
|
import { SmartApifyStorageBackend } from './smart_apify_storage_backend.js';
|
|
24
|
-
import { BINARY_CONTENT_TYPE, checkCrawleeVersion, getSystemInfo, isNonEmptyObject, JSON_CONTENT_TYPE, parseInputValue,
|
|
24
|
+
import { BINARY_CONTENT_TYPE, checkCrawleeVersion, getSystemInfo, isNonEmptyObject, JSON_CONTENT_TYPE, parseInputValue, snakeCaseToCamelCase, } from './utils.js';
|
|
25
25
|
// `@apify/consts` has no boolean counterpart to `INTEGER_ENV_VARS`.
|
|
26
26
|
const BOOLEAN_ENV_VARS = [APIFY_ENV_VARS.USER_IS_PAYING];
|
|
27
|
+
// Still listed in `@apify/consts`, but no longer read by the SDK.
|
|
28
|
+
const IGNORED_ENV_VARS = [
|
|
29
|
+
APIFY_ENV_VARS.DISABLE_OUTDATED_WARNING,
|
|
30
|
+
APIFY_ENV_VARS.SDK_LATEST_VERSION,
|
|
31
|
+
];
|
|
27
32
|
/**
|
|
28
33
|
* {@link parseInputValue} with the parser error wrapped as an {@link ActorInputError}, so a malformed
|
|
29
34
|
* JSON input reports where it came from.
|
|
@@ -230,7 +235,6 @@ export class Actor {
|
|
|
230
235
|
this.initialized = true;
|
|
231
236
|
checkCrawleeVersion();
|
|
232
237
|
log.info('System info', getSystemInfo());
|
|
233
|
-
printOutdatedSdkWarning();
|
|
234
238
|
// Register this Actor's config as the global one so crawlee storages and
|
|
235
239
|
// the event manager resolve the same instance (`availableMemoryRatio` /
|
|
236
240
|
// `disableBrowserSandbox` at-home defaults now live in `Configuration`).
|
|
@@ -1198,6 +1202,8 @@ export class Actor {
|
|
|
1198
1202
|
...APIFY_ENV_VARS,
|
|
1199
1203
|
...this.getModifiedActorEnvVars(),
|
|
1200
1204
|
})) {
|
|
1205
|
+
if (IGNORED_ENV_VARS.includes(fullName))
|
|
1206
|
+
continue;
|
|
1201
1207
|
const camelCaseName = snakeCaseToCamelCase(shortName);
|
|
1202
1208
|
let value = env[fullName];
|
|
1203
1209
|
// Parse booleans, dates and integers.
|
|
@@ -1254,7 +1260,7 @@ export class Actor {
|
|
|
1254
1260
|
async useState(name, defaultValue = {}, options) {
|
|
1255
1261
|
this.ensureActorInit('useState');
|
|
1256
1262
|
const kvStore = await KeyValueStore.open(options?.keyValueStoreName, {
|
|
1257
|
-
configuration: options?.configuration
|
|
1263
|
+
configuration: options?.configuration ?? this.configuration,
|
|
1258
1264
|
});
|
|
1259
1265
|
return kvStore.getAutoSavedValue(name || 'APIFY_GLOBAL_STATE', defaultValue);
|
|
1260
1266
|
}
|
package/dist/utils.d.ts
CHANGED
|
@@ -36,11 +36,6 @@ export declare function getSystemInfo(): {
|
|
|
36
36
|
* @internal
|
|
37
37
|
*/
|
|
38
38
|
export declare function checkCrawleeVersion(): void;
|
|
39
|
-
/**
|
|
40
|
-
* Prints a warning if this version of Apify SDK is outdated.
|
|
41
|
-
* @ignore
|
|
42
|
-
*/
|
|
43
|
-
export declare function printOutdatedSdkWarning(): void;
|
|
44
39
|
/**
|
|
45
40
|
* A FIFO mutex that a critical section may re-enter from a nested call without deadlocking.
|
|
46
41
|
*/
|
package/dist/utils.js
CHANGED
|
@@ -8,9 +8,6 @@ import { parseValue } from '@crawlee/core';
|
|
|
8
8
|
import crawleePkgJson from '@crawlee/core/package.json' with { type: 'json' };
|
|
9
9
|
// @ts-ignore if we enable resolveJsonModule, we end up with `src` folder in `dist`
|
|
10
10
|
import apifyClientPkgJson from 'apify-client/package.json' with { type: 'json' };
|
|
11
|
-
import semver from 'semver';
|
|
12
|
-
import { APIFY_ENV_VARS } from '@apify/consts';
|
|
13
|
-
import log from '@apify/log';
|
|
14
11
|
// @ts-ignore if we enable resolveJsonModule, we end up with `src` folder in `dist`
|
|
15
12
|
import apifyPkgJson from '../package.json' with { type: 'json' };
|
|
16
13
|
export { ArgumentValidationError } from '@apify/validations';
|
|
@@ -108,19 +105,6 @@ export function checkCrawleeVersion() {
|
|
|
108
105
|
}
|
|
109
106
|
}
|
|
110
107
|
}
|
|
111
|
-
/**
|
|
112
|
-
* Prints a warning if this version of Apify SDK is outdated.
|
|
113
|
-
* @ignore
|
|
114
|
-
*/
|
|
115
|
-
export function printOutdatedSdkWarning() {
|
|
116
|
-
if (process.env[APIFY_ENV_VARS.DISABLE_OUTDATED_WARNING])
|
|
117
|
-
return;
|
|
118
|
-
const latestApifyVersion = process.env[APIFY_ENV_VARS.SDK_LATEST_VERSION];
|
|
119
|
-
if (!latestApifyVersion || !semver.lt(apifyPkgJson.version, latestApifyVersion))
|
|
120
|
-
return;
|
|
121
|
-
log.warning(`You are using an outdated version (${apifyPkgJson.version}) of Apify SDK. We recommend you to update to the latest version (${latestApifyVersion}).
|
|
122
|
-
Read more about Apify SDK versioning at: https://help.apify.com/en/articles/3184510-updates-and-versioning-of-apify-sdk`);
|
|
123
|
-
}
|
|
124
108
|
/**
|
|
125
109
|
* A FIFO mutex that a critical section may re-enter from a nested call without deadlocking.
|
|
126
110
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apify",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.83",
|
|
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"
|
|
@@ -67,7 +67,6 @@
|
|
|
67
67
|
"@crawlee/utils": "4.0.0-rc.1",
|
|
68
68
|
"apify-client": "^3.0.0-rc.0",
|
|
69
69
|
"minimatch": "^10.2.6",
|
|
70
|
-
"semver": "^7.8.5",
|
|
71
70
|
"tslib": "^2.8.1",
|
|
72
71
|
"ws": "^8.22.0",
|
|
73
72
|
"zod": "^4.6.5"
|
|
@@ -78,7 +77,6 @@
|
|
|
78
77
|
"@commitlint/config-conventional": "^21.2.3",
|
|
79
78
|
"@playwright/browser-chromium": "^1.63.0",
|
|
80
79
|
"@types/node": "^26.6.3",
|
|
81
|
-
"@types/semver": "^7.8.0",
|
|
82
80
|
"@types/ws": "^8.18.1",
|
|
83
81
|
"commitlint": "^21.2.3",
|
|
84
82
|
"crawlee": "4.0.0-rc.1",
|