apify 3.7.3-beta.94 → 3.7.3-beta.96

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.
@@ -159,6 +159,7 @@ export declare class ProxyConfiguration extends CoreProxyConfiguration {
159
159
  private hostname;
160
160
  private port?;
161
161
  private usesApifyProxy?;
162
+ private checkAccess?;
162
163
  /**
163
164
  * @internal
164
165
  */
@@ -108,6 +108,12 @@ class ProxyConfiguration extends core_1.ProxyConfiguration {
108
108
  writable: true,
109
109
  value: void 0
110
110
  });
111
+ Object.defineProperty(this, "checkAccess", {
112
+ enumerable: true,
113
+ configurable: true,
114
+ writable: true,
115
+ value: void 0
116
+ });
111
117
  (0, ow_1.default)(rest, ow_1.default.object.partialShape({
112
118
  groups: ow_1.default.optional.array.ofType(ow_1.default.string.matches(consts_1.APIFY_PROXY_VALUE_REGEX)),
113
119
  apifyProxyGroups: ow_1.default.optional.array.ofType(ow_1.default.string.matches(consts_1.APIFY_PROXY_VALUE_REGEX)),
@@ -145,6 +151,7 @@ class ProxyConfiguration extends core_1.ProxyConfiguration {
145
151
  this.hostname = hostname;
146
152
  this.port = port;
147
153
  this.usesApifyProxy = !this.proxyUrls && !this.newUrlFunction;
154
+ this.checkAccess = options.checkAccess;
148
155
  if (proxyUrls && proxyUrls.some((url) => url?.includes('apify.com'))) {
149
156
  this.log.warning('Some Apify proxy features may work incorrectly. Please consider setting up Apify properties instead of `proxyUrls`.\n' +
150
157
  'See https://docs.apify.com/sdk/js/docs/concepts/proxy-management#apify-proxy-configuration');
@@ -179,7 +186,7 @@ class ProxyConfiguration extends core_1.ProxyConfiguration {
179
186
  `so that the SDK can fetch the proxy password from Apify API, when ${consts_1.APIFY_ENV_VARS.PROXY_PASSWORD} is not defined`);
180
187
  }
181
188
  }
182
- if (options?.checkAccess !== false) {
189
+ if ((options?.checkAccess ?? this.checkAccess) !== false) {
183
190
  return this._checkAccess();
184
191
  }
185
192
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apify",
3
- "version": "3.7.3-beta.94",
3
+ "version": "3.7.3-beta.96",
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": ">=16.0.0"