apify-client 2.25.1-beta.29 → 2.25.1-beta.30
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/apify_api_error.js +6 -4
- package/dist/base/api_client.d.ts +16 -2
- package/dist/base/api_client.js +31 -6
- package/dist/base/resource_client.js +18 -10
- package/dist/bundle.js +589 -149
- package/dist/bundle.js.map +1 -1
- package/dist/http_client.d.ts +21 -1
- package/dist/http_client.js +31 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.mjs +1 -0
- package/dist/interceptors.js +19 -3
- package/dist/resource_clients/actor.d.ts +44 -1
- package/dist/resource_clients/actor.js +45 -0
- package/dist/resource_clients/actor_server.d.ts +143 -0
- package/dist/resource_clients/actor_server.js +193 -0
- package/dist/resource_clients/actor_version.d.ts +18 -0
- package/dist/resource_clients/build.d.ts +7 -0
- package/dist/resource_clients/build.js +1 -0
- package/dist/resource_clients/dataset.d.ts +9 -2
- package/dist/resource_clients/dataset.js +5 -2
- package/dist/resource_clients/key_value_store.d.ts +2 -1
- package/dist/resource_clients/key_value_store.js +8 -7
- package/dist/resource_clients/request_queue.js +5 -5
- package/dist/resource_clients/run.d.ts +1 -0
- package/dist/resource_clients/run.js +1 -0
- package/dist/resource_clients/user.d.ts +5 -0
- package/dist/utils.d.ts +10 -0
- package/dist/utils.js +68 -0
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -11939,13 +11939,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11939
11939
|
let type;
|
|
11940
11940
|
let responseData = response.data;
|
|
11941
11941
|
let errorData;
|
|
11942
|
-
//
|
|
11943
|
-
//
|
|
11942
|
+
// A `forceBuffer` request (e.g. `downloadItems()`) and a failed streaming request, whose body `HttpClient`
|
|
11943
|
+
// has read into a buffer, both arrive unparsed. Parse the body here to get at the error.
|
|
11944
11944
|
if ((0,_utils__rspack_import_1.isBuffer)(responseData)) {
|
|
11945
|
+
const body = (0,_body_parser__rspack_import_0.isomorphicBufferToString)(response.data, 'utf-8');
|
|
11945
11946
|
try {
|
|
11946
|
-
responseData = JSON.parse(
|
|
11947
|
+
responseData = JSON.parse(body);
|
|
11947
11948
|
} catch {
|
|
11948
|
-
|
|
11949
|
+
// A body that is not JSON at all, such as an HTML error page from a proxy, is kept as text.
|
|
11950
|
+
responseData = body;
|
|
11949
11951
|
}
|
|
11950
11952
|
}
|
|
11951
11953
|
if (responseData && responseData.error) {
|
|
@@ -12539,6 +12541,29 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
12539
12541
|
"mz"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
12540
12542
|
"use strict";
|
|
12541
12543
|
__webpack_require__.r(__webpack_exports__);
|
|
12544
|
+
/* import */ var ow__rspack_import_0 = __webpack_require__("y");
|
|
12545
|
+
/* import */ var ow__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(ow__rspack_import_0);
|
|
12546
|
+
|
|
12547
|
+
/**
|
|
12548
|
+
* Percent-encodes a caller-supplied URL path segment so it cannot restructure the request path.
|
|
12549
|
+
*
|
|
12550
|
+
* Empty strings and dot segments are rejected instead of encoded, because URL parsers resolve
|
|
12551
|
+
* dot segments after decoding - `records/%2E%2E` collapses to the parent endpoint just like `records/..`.
|
|
12552
|
+
* @private
|
|
12553
|
+
*/ function toPathSegment(value) {
|
|
12554
|
+
ow__rspack_import_0_default()(value, ow__rspack_import_0_default().string.nonEmpty.validate((v)=>({
|
|
12555
|
+
validator: v !== '.' && v !== '..',
|
|
12556
|
+
message: 'URL path must not contain dot segments'
|
|
12557
|
+
})));
|
|
12558
|
+
return encodeURIComponent(value);
|
|
12559
|
+
}
|
|
12560
|
+
/**
|
|
12561
|
+
* Builds a URL path from segments. A plain string is used as-is, so literal paths such as
|
|
12562
|
+
* `requests/batch` keep their separators; an array has each of its segments encoded individually.
|
|
12563
|
+
* @private
|
|
12564
|
+
*/ function toPath(path) {
|
|
12565
|
+
return Array.isArray(path) ? path.map(toPathSegment).join('/') : path;
|
|
12566
|
+
}
|
|
12542
12567
|
/** @private */ class ApiClient {
|
|
12543
12568
|
id;
|
|
12544
12569
|
safeId;
|
|
@@ -12558,7 +12583,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12558
12583
|
this.baseUrl = baseUrl;
|
|
12559
12584
|
this.publicBaseUrl = publicBaseUrl;
|
|
12560
12585
|
this.resourcePath = resourcePath;
|
|
12561
|
-
this.url = id ? `${baseUrl}/${resourcePath}/${this.safeId}` : `${baseUrl}/${resourcePath}`;
|
|
12586
|
+
this.url = id ? `${baseUrl}/${resourcePath}/${toPathSegment(this.safeId)}` : `${baseUrl}/${resourcePath}`;
|
|
12562
12587
|
this.apifyClient = apifyClient;
|
|
12563
12588
|
this.httpClient = httpClient;
|
|
12564
12589
|
this.params = params;
|
|
@@ -12577,11 +12602,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12577
12602
|
};
|
|
12578
12603
|
}
|
|
12579
12604
|
_url(path) {
|
|
12580
|
-
return path ? `${this.url}/${path}` : this.url;
|
|
12605
|
+
return path ? `${this.url}/${toPath(path)}` : this.url;
|
|
12581
12606
|
}
|
|
12582
12607
|
_publicUrl(path) {
|
|
12583
|
-
const url = this.id ? `${this.publicBaseUrl}/${this.resourcePath}/${this.safeId}` : `${this.publicBaseUrl}/${this.resourcePath}`;
|
|
12584
|
-
return path ? `${url}/${path}` : url;
|
|
12608
|
+
const url = this.id ? `${this.publicBaseUrl}/${this.resourcePath}/${toPathSegment(this.safeId)}` : `${this.publicBaseUrl}/${this.resourcePath}`;
|
|
12609
|
+
return path ? `${url}/${toPath(path)}` : url;
|
|
12585
12610
|
}
|
|
12586
12611
|
_params(endpointParams) {
|
|
12587
12612
|
return {
|
|
@@ -12590,8 +12615,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12590
12615
|
};
|
|
12591
12616
|
}
|
|
12592
12617
|
_toSafeId(id) {
|
|
12593
|
-
|
|
12594
|
-
return id.replace('/', '~');
|
|
12618
|
+
return id.replaceAll('/', '~');
|
|
12595
12619
|
}
|
|
12596
12620
|
/**
|
|
12597
12621
|
* Returns async iterator to iterate through all items and Promise that can be awaited to get first page of results.
|
|
@@ -12636,7 +12660,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12636
12660
|
}
|
|
12637
12661
|
|
|
12638
12662
|
__webpack_require__.d(__webpack_exports__, {
|
|
12639
|
-
ApiClient: () => (ApiClient)
|
|
12663
|
+
ApiClient: () => (ApiClient),
|
|
12664
|
+
toPath: () => (toPath),
|
|
12665
|
+
toPathSegment: () => (toPathSegment)
|
|
12640
12666
|
});
|
|
12641
12667
|
|
|
12642
12668
|
|
|
@@ -12655,6 +12681,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12655
12681
|
* because it would not accept "Infinity".
|
|
12656
12682
|
* 999999 seconds is more than 10 days.
|
|
12657
12683
|
*/ const MAX_WAIT_FOR_FINISH = 999999;
|
|
12684
|
+
/** How long `waitForFinish()` keeps polling a job that returns 404, to ride out replica lag, before it gives up. */ const MAX_WAIT_WHEN_JOB_NOT_EXIST_MILLIS = 3000;
|
|
12658
12685
|
const SMALL_TIMEOUT_MILLIS = 5 * 1000; // For fast and common actions. Suitable for idempotent actions.
|
|
12659
12686
|
const MEDIUM_TIMEOUT_MILLIS = 30 * 1000; // For actions that may take longer.
|
|
12660
12687
|
const DEFAULT_TIMEOUT_MILLIS = 360 * 1000; // 6 minutes
|
|
@@ -12708,14 +12735,16 @@ const DEFAULT_TIMEOUT_MILLIS = 360 * 1000; // 6 minutes
|
|
|
12708
12735
|
const { waitSecs = MAX_WAIT_FOR_FINISH } = options;
|
|
12709
12736
|
const waitMillis = waitSecs * 1000;
|
|
12710
12737
|
let job;
|
|
12738
|
+
let notFoundSince;
|
|
12711
12739
|
const startedAt = Date.now();
|
|
12712
12740
|
const shouldRepeat = ()=>{
|
|
12713
|
-
const
|
|
12714
|
-
if (
|
|
12741
|
+
const now = Date.now();
|
|
12742
|
+
if (now - startedAt >= waitMillis) return false;
|
|
12743
|
+
if (notFoundSince !== undefined && now - notFoundSince >= MAX_WAIT_WHEN_JOB_NOT_EXIST_MILLIS) return false;
|
|
12715
12744
|
const hasJobEnded = job && _apify_consts__rspack_import_0.ACT_JOB_TERMINAL_STATUSES.includes(job.status);
|
|
12716
12745
|
return !hasJobEnded;
|
|
12717
12746
|
};
|
|
12718
|
-
|
|
12747
|
+
while(true){
|
|
12719
12748
|
const millisSinceStart = Date.now() - startedAt;
|
|
12720
12749
|
const remainingWaitSeconds = Math.round((waitMillis - millisSinceStart) / 1000);
|
|
12721
12750
|
const waitForFinish = Math.max(0, remainingWaitSeconds);
|
|
@@ -12729,16 +12758,19 @@ const DEFAULT_TIMEOUT_MILLIS = 360 * 1000; // 6 minutes
|
|
|
12729
12758
|
try {
|
|
12730
12759
|
const response = await this.httpClient.call(requestOpts);
|
|
12731
12760
|
job = (0,_utils__rspack_import_1.parseDateFields)((0,_utils__rspack_import_1.pluckData)(response.data));
|
|
12761
|
+
notFoundSince = undefined;
|
|
12732
12762
|
} catch (err) {
|
|
12733
12763
|
(0,_utils__rspack_import_1.catchNotFoundOrThrow)(err);
|
|
12734
12764
|
job = undefined;
|
|
12765
|
+
notFoundSince ??= Date.now();
|
|
12735
12766
|
}
|
|
12736
|
-
|
|
12737
|
-
//
|
|
12738
|
-
|
|
12767
|
+
if (!shouldRepeat()) break;
|
|
12768
|
+
// The API answers right away when the remaining wait rounds to 0 seconds, and database replicas may not see
|
|
12769
|
+
// a new job for a short while, so pause before the next poll.
|
|
12770
|
+
await new Promise((resolve)=>{
|
|
12739
12771
|
setTimeout(resolve, 250);
|
|
12740
12772
|
});
|
|
12741
|
-
}
|
|
12773
|
+
}
|
|
12742
12774
|
if (!job) {
|
|
12743
12775
|
const constructorName = this.constructor.name;
|
|
12744
12776
|
const jobName = constructorName.match(/(\w+)Client/)[1].toLowerCase();
|
|
@@ -12894,6 +12926,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12894
12926
|
/* import */ var _apify_api_error__rspack_import_2 = __webpack_require__("mF");
|
|
12895
12927
|
/* import */ var _interceptors__rspack_import_3 = __webpack_require__("fH");
|
|
12896
12928
|
/* import */ var _utils__rspack_import_4 = __webpack_require__("ho");
|
|
12929
|
+
/* provided dependency */ var Buffer = __webpack_require__("d").Buffer;
|
|
12897
12930
|
/* provided dependency */ var process = __webpack_require__("zT");
|
|
12898
12931
|
|
|
12899
12932
|
|
|
@@ -12902,6 +12935,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12902
12935
|
|
|
12903
12936
|
|
|
12904
12937
|
const { version } = (0,_utils__rspack_import_4.getVersionData)();
|
|
12938
|
+
async function readStreamToBuffer(stream) {
|
|
12939
|
+
const chunks = [];
|
|
12940
|
+
for await (const chunk of stream)chunks.push(chunk);
|
|
12941
|
+
return Buffer.concat(chunks);
|
|
12942
|
+
}
|
|
12905
12943
|
const RATE_LIMIT_EXCEEDED_STATUS_CODE = 429;
|
|
12906
12944
|
class HttpClient {
|
|
12907
12945
|
stats;
|
|
@@ -13052,6 +13090,7 @@ class HttpClient {
|
|
|
13052
13090
|
const makeRequest = async (stopTrying, attempt)=>{
|
|
13053
13091
|
this.stats.requests++;
|
|
13054
13092
|
let response;
|
|
13093
|
+
let returnErrorResponse = false;
|
|
13055
13094
|
const requestIsStream = (0,_utils__rspack_import_4.isStream)(config.data);
|
|
13056
13095
|
try {
|
|
13057
13096
|
if (requestIsStream) {
|
|
@@ -13067,14 +13106,24 @@ class HttpClient {
|
|
|
13067
13106
|
config.timeout = Math.min(this.timeoutMillis, (config.timeout ?? this.timeoutMillis) * 2 ** (attempt - 1));
|
|
13068
13107
|
response = await this.axios.request(config);
|
|
13069
13108
|
if (this._isStatusOk(response.status)) return response;
|
|
13109
|
+
// A caller that takes error responses gets the last one, once the retries are spent, as it is.
|
|
13110
|
+
returnErrorResponse = config.throwOnErrorStatus === false && (requestIsStream || attempt > this.maxRetries || !this._isStatusCodeRetryable(response.status, config));
|
|
13111
|
+
// A failed request with `responseType: 'stream'` carries the API error body in the stream. Read
|
|
13112
|
+
// it so that `ApifyApiError` can parse it like any other error body. A body that cannot be read
|
|
13113
|
+
// leaves the error without a message, which beats losing the status code to a stream error.
|
|
13114
|
+
if ((0,_utils__rspack_import_4.isStream)(response.data) && !returnErrorResponse) {
|
|
13115
|
+
response.data = await readStreamToBuffer(response.data).catch(()=>undefined);
|
|
13116
|
+
}
|
|
13070
13117
|
} catch (err) {
|
|
13071
13118
|
return (0,_utils__rspack_import_4.cast)(this._handleRequestError(err, config, stopTrying));
|
|
13072
13119
|
}
|
|
13073
|
-
|
|
13120
|
+
// The statistics track the API's rate limits, so a call that takes error responses keeps its 429s out.
|
|
13121
|
+
if (response.status === RATE_LIMIT_EXCEEDED_STATUS_CODE && config.throwOnErrorStatus !== false) {
|
|
13074
13122
|
this.stats.addRateLimitError(attempt);
|
|
13075
13123
|
}
|
|
13124
|
+
if (returnErrorResponse) return response;
|
|
13076
13125
|
const apiError = new _apify_api_error__rspack_import_2.ApifyApiError(response, attempt);
|
|
13077
|
-
if (this._isStatusCodeRetryable(response.status)) {
|
|
13126
|
+
if (this._isStatusCodeRetryable(response.status, config)) {
|
|
13078
13127
|
if (requestIsStream) {
|
|
13079
13128
|
this._informAboutStreamNoRetry();
|
|
13080
13129
|
} else {
|
|
@@ -13097,6 +13146,9 @@ class HttpClient {
|
|
|
13097
13146
|
if (this._isTimeoutError(err) && config.doNotRetryTimeouts) {
|
|
13098
13147
|
return stopTrying(err);
|
|
13099
13148
|
}
|
|
13149
|
+
if (config.retryTransportErrors === false) {
|
|
13150
|
+
return stopTrying(err);
|
|
13151
|
+
}
|
|
13100
13152
|
if (this._isRetryableError(err)) {
|
|
13101
13153
|
if ((0,_utils__rspack_import_4.isStream)(config.data)) {
|
|
13102
13154
|
this._informAboutStreamNoRetry();
|
|
@@ -13137,10 +13189,11 @@ class HttpClient {
|
|
|
13137
13189
|
return hasRequest && hasConfig;
|
|
13138
13190
|
}
|
|
13139
13191
|
/**
|
|
13140
|
-
* We retry 429 (rate limit) and 500
|
|
13192
|
+
* We retry 429 (rate limit) and 500+, or the statuses in `config.retryStatusCodes` when it is set.
|
|
13141
13193
|
* For status codes 300-499 (except 429) we do not retry the request,
|
|
13142
13194
|
* because it's probably caused by invalid url (redirect 3xx) or invalid user input (4xx).
|
|
13143
|
-
*/ _isStatusCodeRetryable(statusCode) {
|
|
13195
|
+
*/ _isStatusCodeRetryable(statusCode, config) {
|
|
13196
|
+
if (config.retryStatusCodes) return config.retryStatusCodes.includes(statusCode);
|
|
13144
13197
|
const isRateLimitError = statusCode === RATE_LIMIT_EXCEEDED_STATUS_CODE;
|
|
13145
13198
|
const isInternalError = statusCode >= 500;
|
|
13146
13199
|
return isRateLimitError || isInternalError;
|
|
@@ -13196,9 +13249,9 @@ function serializeRequest(config) {
|
|
|
13196
13249
|
// it's a small price to pay. The axios default transform does a lot
|
|
13197
13250
|
// of body type checks and we would have to copy all of them to the resource clients.
|
|
13198
13251
|
if (config.stringifyFunctions) {
|
|
13199
|
-
const contentTypeHeader = config
|
|
13252
|
+
const contentTypeHeader = getHeader(config, 'content-type');
|
|
13200
13253
|
try {
|
|
13201
|
-
const
|
|
13254
|
+
const type = contentTypeHeader ? content_type__rspack_import_3.parse(contentTypeHeader).type : undefined;
|
|
13202
13255
|
if (type === 'application/json' && typeof config.data === 'object') {
|
|
13203
13256
|
config.data = stringifyWithFunctions(config.data);
|
|
13204
13257
|
} else {
|
|
@@ -13226,8 +13279,19 @@ function ensureHeadersPrototype(config) {
|
|
|
13226
13279
|
return typeof value === 'function' ? value.toString() : value;
|
|
13227
13280
|
});
|
|
13228
13281
|
}
|
|
13282
|
+
/**
|
|
13283
|
+
* Reads a request header regardless of the casing it was set with, since HTTP header names are case-insensitive
|
|
13284
|
+
* while the config keeps whatever casing the caller used.
|
|
13285
|
+
*/ function getHeader(config, name) {
|
|
13286
|
+
const wanted = name.toLowerCase();
|
|
13287
|
+
const key = Object.keys(config.headers ?? {}).find((candidate)=>candidate.toLowerCase() === wanted);
|
|
13288
|
+
const value = key === undefined ? undefined : config.headers?.[key];
|
|
13289
|
+
return typeof value === 'string' ? value : undefined;
|
|
13290
|
+
}
|
|
13229
13291
|
async function maybeCompressRequest(config) {
|
|
13230
|
-
|
|
13292
|
+
// A caller-supplied encoding means the body is already encoded and the header describes it, so leave both alone.
|
|
13293
|
+
if (config.doNotCompress || getHeader(config, 'content-encoding')) return config;
|
|
13294
|
+
if (!(0,_utils__rspack_import_1.isCompressibleContentType)(getHeader(config, 'content-type'))) return config;
|
|
13231
13295
|
const maybeCompressed = await (0,_utils__rspack_import_1.maybeCompressValue)(config.data);
|
|
13232
13296
|
if (maybeCompressed) {
|
|
13233
13297
|
config.headers ??= {};
|
|
@@ -13253,6 +13317,8 @@ function parseResponseData(response) {
|
|
|
13253
13317
|
try {
|
|
13254
13318
|
response.data = (0,_body_parser__rspack_import_0.maybeParseBody)(response.data, contentTypeHeader);
|
|
13255
13319
|
} catch (err) {
|
|
13320
|
+
// A caller that takes error responses gets an unparsable error body as the raw bytes.
|
|
13321
|
+
if (response.status >= 300 && response.config.throwOnErrorStatus === false) return response;
|
|
13256
13322
|
throw new InvalidResponseBodyError(response, err);
|
|
13257
13323
|
}
|
|
13258
13324
|
return response;
|
|
@@ -13278,19 +13344,21 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
13278
13344
|
"FC"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
13279
13345
|
"use strict";
|
|
13280
13346
|
__webpack_require__.r(__webpack_exports__);
|
|
13281
|
-
/* import */ var
|
|
13282
|
-
/* import */ var
|
|
13347
|
+
/* import */ var ow__rspack_import_12 = __webpack_require__("y");
|
|
13348
|
+
/* import */ var ow__rspack_import_12_default = /*#__PURE__*/__webpack_require__.n(ow__rspack_import_12);
|
|
13283
13349
|
/* import */ var _apify_consts__rspack_import_0 = __webpack_require__("hD");
|
|
13284
13350
|
/* import */ var _apify_log__rspack_import_1 = __webpack_require__("Nq");
|
|
13285
13351
|
/* import */ var _base_resource_client__rspack_import_2 = __webpack_require__("eP");
|
|
13286
13352
|
/* import */ var _utils__rspack_import_3 = __webpack_require__("ho");
|
|
13287
|
-
/* import */ var
|
|
13288
|
-
/* import */ var
|
|
13289
|
-
/* import */ var
|
|
13290
|
-
/* import */ var
|
|
13291
|
-
/* import */ var
|
|
13292
|
-
/* import */ var
|
|
13293
|
-
/* import */ var
|
|
13353
|
+
/* import */ var _actor_server__rspack_import_4 = __webpack_require__("Za");
|
|
13354
|
+
/* import */ var _actor_version__rspack_import_5 = __webpack_require__("gN");
|
|
13355
|
+
/* import */ var _actor_version_collection__rspack_import_6 = __webpack_require__("jNG");
|
|
13356
|
+
/* import */ var _build__rspack_import_7 = __webpack_require__("TT");
|
|
13357
|
+
/* import */ var _build_collection__rspack_import_8 = __webpack_require__("Xi");
|
|
13358
|
+
/* import */ var _run__rspack_import_9 = __webpack_require__("xz");
|
|
13359
|
+
/* import */ var _run_collection__rspack_import_10 = __webpack_require__("Pu");
|
|
13360
|
+
/* import */ var _webhook_collection__rspack_import_11 = __webpack_require__("rk");
|
|
13361
|
+
|
|
13294
13362
|
|
|
13295
13363
|
|
|
13296
13364
|
|
|
@@ -13323,6 +13391,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13323
13391
|
*
|
|
13324
13392
|
* @see https://docs.apify.com/platform/actors
|
|
13325
13393
|
*/ class ActorClient extends _base_resource_client__rspack_import_2.ResourceClient {
|
|
13394
|
+
_serverClient;
|
|
13326
13395
|
/**
|
|
13327
13396
|
* @hidden
|
|
13328
13397
|
*/ constructor(options){
|
|
@@ -13346,7 +13415,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13346
13415
|
* @returns The updated Actor object
|
|
13347
13416
|
* @see https://docs.apify.com/api/v2/act-put
|
|
13348
13417
|
*/ async update(newFields) {
|
|
13349
|
-
|
|
13418
|
+
ow__rspack_import_12_default()(newFields, (ow__rspack_import_12_default().object));
|
|
13350
13419
|
return this._update(newFields);
|
|
13351
13420
|
}
|
|
13352
13421
|
/**
|
|
@@ -13393,17 +13462,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13393
13462
|
let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
13394
13463
|
// input can be anything, so no point in validating it. E.g. if you set content-type to application/pdf
|
|
13395
13464
|
// then it will process input as a buffer.
|
|
13396
|
-
|
|
13397
|
-
build: (
|
|
13398
|
-
contentType: (
|
|
13399
|
-
memory: (
|
|
13400
|
-
timeout: (
|
|
13401
|
-
waitForFinish: (
|
|
13402
|
-
webhooks:
|
|
13403
|
-
maxItems: (
|
|
13404
|
-
maxTotalChargeUsd: (
|
|
13405
|
-
restartOnError: (
|
|
13406
|
-
forcePermissionLevel:
|
|
13465
|
+
ow__rspack_import_12_default()(options, ow__rspack_import_12_default().object.exactShape({
|
|
13466
|
+
build: (ow__rspack_import_12_default().optional.string),
|
|
13467
|
+
contentType: (ow__rspack_import_12_default().optional.string),
|
|
13468
|
+
memory: (ow__rspack_import_12_default().optional.number),
|
|
13469
|
+
timeout: (ow__rspack_import_12_default().optional.number),
|
|
13470
|
+
waitForFinish: (ow__rspack_import_12_default().optional.number),
|
|
13471
|
+
webhooks: ow__rspack_import_12_default().optional.array.ofType((ow__rspack_import_12_default().object)),
|
|
13472
|
+
maxItems: (ow__rspack_import_12_default().optional.number.not.negative),
|
|
13473
|
+
maxTotalChargeUsd: (ow__rspack_import_12_default().optional.number.not.negative),
|
|
13474
|
+
restartOnError: (ow__rspack_import_12_default().optional.boolean),
|
|
13475
|
+
forcePermissionLevel: ow__rspack_import_12_default().optional.string.oneOf(Object.values(_apify_consts__rspack_import_0.ACTOR_PERMISSION_LEVEL))
|
|
13407
13476
|
}));
|
|
13408
13477
|
const { waitForFinish, timeout, memory, build, maxItems, maxTotalChargeUsd, restartOnError, forcePermissionLevel } = options;
|
|
13409
13478
|
const params = {
|
|
@@ -13474,18 +13543,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13474
13543
|
let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
13475
13544
|
// input can be anything, so no point in validating it. E.g. if you set content-type to application/pdf
|
|
13476
13545
|
// then it will process input as a buffer.
|
|
13477
|
-
|
|
13478
|
-
build: (
|
|
13479
|
-
contentType: (
|
|
13480
|
-
memory: (
|
|
13481
|
-
timeout: (
|
|
13482
|
-
waitSecs: (
|
|
13483
|
-
webhooks:
|
|
13484
|
-
maxItems: (
|
|
13485
|
-
maxTotalChargeUsd: (
|
|
13486
|
-
log:
|
|
13487
|
-
restartOnError: (
|
|
13488
|
-
forcePermissionLevel:
|
|
13546
|
+
ow__rspack_import_12_default()(options, ow__rspack_import_12_default().object.exactShape({
|
|
13547
|
+
build: (ow__rspack_import_12_default().optional.string),
|
|
13548
|
+
contentType: (ow__rspack_import_12_default().optional.string),
|
|
13549
|
+
memory: (ow__rspack_import_12_default().optional.number),
|
|
13550
|
+
timeout: (ow__rspack_import_12_default().optional.number.not.negative),
|
|
13551
|
+
waitSecs: (ow__rspack_import_12_default().optional.number.not.negative),
|
|
13552
|
+
webhooks: ow__rspack_import_12_default().optional.array.ofType((ow__rspack_import_12_default().object)),
|
|
13553
|
+
maxItems: (ow__rspack_import_12_default().optional.number.not.negative),
|
|
13554
|
+
maxTotalChargeUsd: (ow__rspack_import_12_default().optional.number.not.negative),
|
|
13555
|
+
log: ow__rspack_import_12_default().optional.any((ow__rspack_import_12_default()["null"]), ow__rspack_import_12_default().object.instanceOf(_apify_log__rspack_import_1.Log), ow__rspack_import_12_default().string.equals('default')),
|
|
13556
|
+
restartOnError: (ow__rspack_import_12_default().optional.boolean),
|
|
13557
|
+
forcePermissionLevel: ow__rspack_import_12_default().optional.string.oneOf(Object.values(_apify_consts__rspack_import_0.ACTOR_PERMISSION_LEVEL))
|
|
13489
13558
|
}));
|
|
13490
13559
|
const { waitSecs, log, ...startOptions } = options;
|
|
13491
13560
|
const { id } = await this.start(input, startOptions);
|
|
@@ -13537,9 +13606,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13537
13606
|
let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
13538
13607
|
// input can be anything, so no point in validating it. E.g. if you set content-type to application/pdf
|
|
13539
13608
|
// then it will process input as a buffer.
|
|
13540
|
-
|
|
13541
|
-
build: (
|
|
13542
|
-
contentType: (
|
|
13609
|
+
ow__rspack_import_12_default()(options, ow__rspack_import_12_default().object.exactShape({
|
|
13610
|
+
build: (ow__rspack_import_12_default().optional.string),
|
|
13611
|
+
contentType: (ow__rspack_import_12_default().optional.string)
|
|
13543
13612
|
}));
|
|
13544
13613
|
const request = {
|
|
13545
13614
|
url: this._url('validate-input'),
|
|
@@ -13590,12 +13659,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13590
13659
|
* ```
|
|
13591
13660
|
*/ async build(versionNumber) {
|
|
13592
13661
|
let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
13593
|
-
|
|
13594
|
-
|
|
13595
|
-
betaPackages: (
|
|
13596
|
-
tag: (
|
|
13597
|
-
useCache: (
|
|
13598
|
-
waitForFinish: (
|
|
13662
|
+
ow__rspack_import_12_default()(versionNumber, (ow__rspack_import_12_default().string));
|
|
13663
|
+
ow__rspack_import_12_default()(options, ow__rspack_import_12_default().object.exactShape({
|
|
13664
|
+
betaPackages: (ow__rspack_import_12_default().optional.boolean),
|
|
13665
|
+
tag: (ow__rspack_import_12_default().optional.string),
|
|
13666
|
+
useCache: (ow__rspack_import_12_default().optional.boolean),
|
|
13667
|
+
waitForFinish: (ow__rspack_import_12_default().optional.number)
|
|
13599
13668
|
}));
|
|
13600
13669
|
const response = await this.httpClient.call({
|
|
13601
13670
|
url: this._url('builds'),
|
|
@@ -13639,7 +13708,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13639
13708
|
params: this._params(options)
|
|
13640
13709
|
});
|
|
13641
13710
|
const { id } = (0,_utils__rspack_import_3.pluckData)(response.data);
|
|
13642
|
-
return new
|
|
13711
|
+
return new _build__rspack_import_7.BuildClient({
|
|
13643
13712
|
baseUrl: this.apifyClient.baseUrl,
|
|
13644
13713
|
publicBaseUrl: this.apifyClient.publicBaseUrl,
|
|
13645
13714
|
httpClient: this.httpClient,
|
|
@@ -13665,11 +13734,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13665
13734
|
* ```
|
|
13666
13735
|
*/ lastRun() {
|
|
13667
13736
|
let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
13668
|
-
|
|
13669
|
-
status:
|
|
13670
|
-
origin:
|
|
13737
|
+
ow__rspack_import_12_default()(options, ow__rspack_import_12_default().object.exactShape({
|
|
13738
|
+
status: ow__rspack_import_12_default().optional.string.oneOf(Object.values(_apify_consts__rspack_import_0.ACTOR_JOB_STATUSES)),
|
|
13739
|
+
origin: ow__rspack_import_12_default().optional.string.oneOf(Object.values(_apify_consts__rspack_import_0.META_ORIGINS))
|
|
13671
13740
|
}));
|
|
13672
|
-
return new
|
|
13741
|
+
return new _run__rspack_import_9.RunClient(this._subResourceOptions({
|
|
13673
13742
|
id: 'last',
|
|
13674
13743
|
params: this._params(options),
|
|
13675
13744
|
resourcePath: 'runs'
|
|
@@ -13681,7 +13750,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13681
13750
|
* @returns A client for the Actor's build collection
|
|
13682
13751
|
* @see https://docs.apify.com/api/v2/act-builds-get
|
|
13683
13752
|
*/ builds() {
|
|
13684
|
-
return new
|
|
13753
|
+
return new _build_collection__rspack_import_8.BuildCollectionClient(this._subResourceOptions({
|
|
13685
13754
|
resourcePath: 'builds'
|
|
13686
13755
|
}));
|
|
13687
13756
|
}
|
|
@@ -13691,7 +13760,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13691
13760
|
* @returns A client for the Actor's run collection
|
|
13692
13761
|
* @see https://docs.apify.com/api/v2/act-runs-get
|
|
13693
13762
|
*/ runs() {
|
|
13694
|
-
return new
|
|
13763
|
+
return new _run_collection__rspack_import_10.RunCollectionClient(this._subResourceOptions({
|
|
13695
13764
|
resourcePath: 'runs'
|
|
13696
13765
|
}));
|
|
13697
13766
|
}
|
|
@@ -13702,8 +13771,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13702
13771
|
* @returns A client for the specified Actor version
|
|
13703
13772
|
* @see https://docs.apify.com/api/v2/act-version-get
|
|
13704
13773
|
*/ version(versionNumber) {
|
|
13705
|
-
|
|
13706
|
-
return new
|
|
13774
|
+
ow__rspack_import_12_default()(versionNumber, (ow__rspack_import_12_default().string));
|
|
13775
|
+
return new _actor_version__rspack_import_5.ActorVersionClient(this._subResourceOptions({
|
|
13707
13776
|
id: versionNumber
|
|
13708
13777
|
}));
|
|
13709
13778
|
}
|
|
@@ -13713,7 +13782,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13713
13782
|
* @returns A client for the Actor's version collection
|
|
13714
13783
|
* @see https://docs.apify.com/api/v2/act-versions-get
|
|
13715
13784
|
*/ versions() {
|
|
13716
|
-
return new
|
|
13785
|
+
return new _actor_version_collection__rspack_import_6.ActorVersionCollectionClient(this._subResourceOptions());
|
|
13717
13786
|
}
|
|
13718
13787
|
/**
|
|
13719
13788
|
* Returns a client for managing webhooks associated with this Actor.
|
|
@@ -13721,7 +13790,48 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13721
13790
|
* @returns A client for the Actor's webhook collection
|
|
13722
13791
|
* @see https://docs.apify.com/api/v2/act-webhooks-get
|
|
13723
13792
|
*/ webhooks() {
|
|
13724
|
-
return new
|
|
13793
|
+
return new _webhook_collection__rspack_import_11.WebhookCollectionClient(this._subResourceOptions());
|
|
13794
|
+
}
|
|
13795
|
+
/**
|
|
13796
|
+
* Returns a client for the server interface of this Actor.
|
|
13797
|
+
*
|
|
13798
|
+
* A Server Actor runs a web server, its server interface, that is called over HTTP without starting a run for
|
|
13799
|
+
* each call. Server Actors were formerly called Actor Standby. Every call returns the same client, so the server
|
|
13800
|
+
* URL it fetches is reused.
|
|
13801
|
+
*
|
|
13802
|
+
* @returns The client for the server interface of this Actor
|
|
13803
|
+
* @see https://docs.apify.com/platform/actors/running/standby
|
|
13804
|
+
* @since Added in 2.26.0
|
|
13805
|
+
*
|
|
13806
|
+
* @example
|
|
13807
|
+
* ```javascript
|
|
13808
|
+
* const response = await client.actor('username/actor-name').server().request('/search', {
|
|
13809
|
+
* params: { q: 'apify' },
|
|
13810
|
+
* });
|
|
13811
|
+
* ```
|
|
13812
|
+
*/ server() {
|
|
13813
|
+
this._serverClient ??= new _actor_server__rspack_import_4.ActorServerClient({
|
|
13814
|
+
baseUrl: this.baseUrl,
|
|
13815
|
+
publicBaseUrl: this.publicBaseUrl,
|
|
13816
|
+
apifyClient: this.apifyClient,
|
|
13817
|
+
httpClient: this.httpClient,
|
|
13818
|
+
id: this.id,
|
|
13819
|
+
params: this.params
|
|
13820
|
+
});
|
|
13821
|
+
return this._serverClient;
|
|
13822
|
+
}
|
|
13823
|
+
/**
|
|
13824
|
+
* Returns a client for the server interface of this Actor in Standby mode.
|
|
13825
|
+
*
|
|
13826
|
+
* Named after Actor Standby, the former name of Server Actors.
|
|
13827
|
+
*
|
|
13828
|
+
* @deprecated Use {@link server} instead. Will be removed in v4.
|
|
13829
|
+
* @returns The client for the server interface of this Actor
|
|
13830
|
+
* @see https://docs.apify.com/platform/actors/running/standby
|
|
13831
|
+
* @since Added in 2.26.0
|
|
13832
|
+
*/ standby() {
|
|
13833
|
+
this.httpClient.logger.deprecated('`standby()` is deprecated and will be removed in v4. Use `server()` instead.');
|
|
13834
|
+
return this.server();
|
|
13725
13835
|
}
|
|
13726
13836
|
}
|
|
13727
13837
|
|
|
@@ -13980,6 +14090,229 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
13980
14090
|
});
|
|
13981
14091
|
|
|
13982
14092
|
|
|
14093
|
+
},
|
|
14094
|
+
"Za"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
14095
|
+
"use strict";
|
|
14096
|
+
__webpack_require__.r(__webpack_exports__);
|
|
14097
|
+
/* import */ var ow__rspack_import_3 = __webpack_require__("y");
|
|
14098
|
+
/* import */ var ow__rspack_import_3_default = /*#__PURE__*/__webpack_require__.n(ow__rspack_import_3);
|
|
14099
|
+
/* import */ var _base_resource_client__rspack_import_0 = __webpack_require__("eP");
|
|
14100
|
+
/* import */ var _utils__rspack_import_1 = __webpack_require__("ho");
|
|
14101
|
+
/* import */ var _build_collection__rspack_import_2 = __webpack_require__("Xi");
|
|
14102
|
+
|
|
14103
|
+
|
|
14104
|
+
|
|
14105
|
+
|
|
14106
|
+
/**
|
|
14107
|
+
* Statuses a server request is retried on. The platform answers with them when it can't pass a request to a server
|
|
14108
|
+
* run, so a retry usually doesn't run the Actor's code again. An Actor that returns one itself gets the request again.
|
|
14109
|
+
*/ const SERVER_RETRY_STATUS_CODES = [
|
|
14110
|
+
429,
|
|
14111
|
+
503
|
|
14112
|
+
];
|
|
14113
|
+
const HTTP_METHODS = [
|
|
14114
|
+
'GET',
|
|
14115
|
+
'HEAD',
|
|
14116
|
+
'POST',
|
|
14117
|
+
'PUT',
|
|
14118
|
+
'DELETE',
|
|
14119
|
+
'CONNECT',
|
|
14120
|
+
'OPTIONS',
|
|
14121
|
+
'TRACE',
|
|
14122
|
+
'PATCH'
|
|
14123
|
+
];
|
|
14124
|
+
const BUILD_NUMBER_PATTERN = /^(\d+)\.(\d+)\.(\d+)$/;
|
|
14125
|
+
/**
|
|
14126
|
+
* Splits a build number like `0.1.23` into its version and sequence number, or returns `undefined` for anything else.
|
|
14127
|
+
*/ function parseBuildNumber(buildNumber) {
|
|
14128
|
+
const match = BUILD_NUMBER_PATTERN.exec(buildNumber ?? '');
|
|
14129
|
+
if (!match) return undefined;
|
|
14130
|
+
return [
|
|
14131
|
+
Number(match[1]),
|
|
14132
|
+
Number(match[2]),
|
|
14133
|
+
Number(match[3])
|
|
14134
|
+
];
|
|
14135
|
+
}
|
|
14136
|
+
/**
|
|
14137
|
+
* Returns whether `buildNumber` belongs to the same version as `target` and comes before it. Builds are listed newest
|
|
14138
|
+
* first and the sequence numbers of a version grow over time, so meeting such a build means the target doesn't exist.
|
|
14139
|
+
*/ function isOlderBuild(buildNumber, target) {
|
|
14140
|
+
const parsed = parseBuildNumber(buildNumber);
|
|
14141
|
+
return parsed !== undefined && parsed[0] === target[0] && parsed[1] === target[1] && parsed[2] < target[2];
|
|
14142
|
+
}
|
|
14143
|
+
/**
|
|
14144
|
+
* Merges two header records, header names compared case-insensitively. A header from `override` replaces a
|
|
14145
|
+
* same-named header in `base` whatever the casing of either.
|
|
14146
|
+
*/ function mergeHeaders(base) {
|
|
14147
|
+
let override = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
14148
|
+
const overridden = new Set(Object.keys(override).map((name)=>name.toLowerCase()));
|
|
14149
|
+
const kept = Object.entries(base).filter((param)=>{
|
|
14150
|
+
let [name] = param;
|
|
14151
|
+
return !overridden.has(name.toLowerCase());
|
|
14152
|
+
});
|
|
14153
|
+
return {
|
|
14154
|
+
...Object.fromEntries(kept),
|
|
14155
|
+
...override
|
|
14156
|
+
};
|
|
14157
|
+
}
|
|
14158
|
+
/**
|
|
14159
|
+
* Client for the server interface of a specific Actor.
|
|
14160
|
+
*
|
|
14161
|
+
* Provides methods to work with the web server of a Server Actor, such as sending it requests or getting its OpenAPI
|
|
14162
|
+
* specification. Get an instance with {@link ActorClient.server}.
|
|
14163
|
+
*
|
|
14164
|
+
* @example
|
|
14165
|
+
* ```javascript
|
|
14166
|
+
* const client = new ApifyClient({ token: 'my-token' });
|
|
14167
|
+
* const actorServerClient = client.actor('username/actor-name').server();
|
|
14168
|
+
*
|
|
14169
|
+
* const response = await actorServerClient.request('/search', { params: { q: 'apify' } });
|
|
14170
|
+
* console.log(response.data);
|
|
14171
|
+
* ```
|
|
14172
|
+
*
|
|
14173
|
+
* @see https://docs.apify.com/platform/actors/running/standby
|
|
14174
|
+
* @since Added in 2.26.0
|
|
14175
|
+
*/ class ActorServerClient extends _base_resource_client__rspack_import_0.ResourceClient {
|
|
14176
|
+
/**
|
|
14177
|
+
* The server URL. Getting it takes an API call for the Actor, so it's cached for {@link getUrl} and
|
|
14178
|
+
* {@link request}. It's pending while the first lookup runs, so concurrent first calls share one API request.
|
|
14179
|
+
*/ _serverUrl;
|
|
14180
|
+
/**
|
|
14181
|
+
* @hidden
|
|
14182
|
+
*/ constructor(options){
|
|
14183
|
+
super({
|
|
14184
|
+
resourcePath: 'actors',
|
|
14185
|
+
...options
|
|
14186
|
+
});
|
|
14187
|
+
}
|
|
14188
|
+
/**
|
|
14189
|
+
* Returns the URL of the Actor's server.
|
|
14190
|
+
*
|
|
14191
|
+
* The URL is the Actor's `standbyUrl`, fetched from the API by the first call of this method or
|
|
14192
|
+
* {@link getOpenApiSpec} and reused by later calls on this client. Use it to call the server with another HTTP
|
|
14193
|
+
* client, for example one generated from the server's OpenAPI specification.
|
|
14194
|
+
*
|
|
14195
|
+
* @returns The URL of the Actor's server
|
|
14196
|
+
* @throws When the Actor does not exist or is not a Server Actor.
|
|
14197
|
+
* @see https://docs.apify.com/platform/actors/running/standby
|
|
14198
|
+
*/ async getUrl() {
|
|
14199
|
+
const url = this._serverUrl ??= this._getServerActor().then((actor)=>actor.standbyUrl);
|
|
14200
|
+
try {
|
|
14201
|
+
return await url;
|
|
14202
|
+
} catch (err) {
|
|
14203
|
+
// A failed lookup is not kept, so the next call tries again.
|
|
14204
|
+
if (this._serverUrl === url) this._serverUrl = undefined;
|
|
14205
|
+
throw err;
|
|
14206
|
+
}
|
|
14207
|
+
}
|
|
14208
|
+
/**
|
|
14209
|
+
* Returns the OpenAPI specification of the Actor's server.
|
|
14210
|
+
*
|
|
14211
|
+
* The specification is the web server schema from the Actor's definition, taken from the build that serves the
|
|
14212
|
+
* server interface: the build set in `actorStandby.build`, or `latest` if none is set. Use it to generate an HTTP
|
|
14213
|
+
* client for the server, and point that client at the URL returned by {@link getUrl}.
|
|
14214
|
+
*
|
|
14215
|
+
* @returns The OpenAPI specification of the Actor's server, or `undefined` if the Actor's definition doesn't
|
|
14216
|
+
* include one
|
|
14217
|
+
* @throws When the Actor does not exist or is not a Server Actor, or the build that serves its server interface
|
|
14218
|
+
* doesn't exist.
|
|
14219
|
+
* @see https://docs.apify.com/platform/actors/development/actor-definition/web-server-schema
|
|
14220
|
+
*/ async getOpenApiSpec() {
|
|
14221
|
+
const actor = await this._getServerActor();
|
|
14222
|
+
const buildRef = actor.actorStandby?.build || 'latest';
|
|
14223
|
+
let buildId = actor.taggedBuilds?.[buildRef]?.buildId;
|
|
14224
|
+
const targetBuildNumber = parseBuildNumber(buildRef);
|
|
14225
|
+
if (buildId === undefined && targetBuildNumber !== undefined) {
|
|
14226
|
+
// Not a tag, so look `buildRef` up as a build number, which the API can't resolve directly.
|
|
14227
|
+
const builds = new _build_collection__rspack_import_2.BuildCollectionClient(this._subResourceOptions({
|
|
14228
|
+
resourcePath: 'builds'
|
|
14229
|
+
}));
|
|
14230
|
+
for await (const build of builds.list({
|
|
14231
|
+
desc: true
|
|
14232
|
+
})){
|
|
14233
|
+
// The API lists builds with their build number, though the list item type omits it.
|
|
14234
|
+
const { buildNumber } = build;
|
|
14235
|
+
if (buildNumber === buildRef) {
|
|
14236
|
+
buildId = build.id;
|
|
14237
|
+
break;
|
|
14238
|
+
}
|
|
14239
|
+
if (isOlderBuild(buildNumber, targetBuildNumber)) break;
|
|
14240
|
+
}
|
|
14241
|
+
}
|
|
14242
|
+
const build = buildId === undefined ? undefined : await this.apifyClient.build(buildId).get();
|
|
14243
|
+
if (build === undefined) {
|
|
14244
|
+
throw new Error(`Build ${buildRef} of Actor ${this.id} does not exist.`);
|
|
14245
|
+
}
|
|
14246
|
+
return build.actorDefinition?.webServerSchema;
|
|
14247
|
+
}
|
|
14248
|
+
async request() {
|
|
14249
|
+
let path = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : '/', options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
14250
|
+
ow__rspack_import_3_default()(path, (ow__rspack_import_3_default().string));
|
|
14251
|
+
const { data, ...rest } = options;
|
|
14252
|
+
ow__rspack_import_3_default()(rest, ow__rspack_import_3_default().object.exactShape({
|
|
14253
|
+
method: ow__rspack_import_3_default().optional.string.oneOf(HTTP_METHODS),
|
|
14254
|
+
params: (ow__rspack_import_3_default().optional.object),
|
|
14255
|
+
headers: ow__rspack_import_3_default().optional.object.valuesOfType((ow__rspack_import_3_default().string)),
|
|
14256
|
+
parentRequestId: (ow__rspack_import_3_default().optional.string),
|
|
14257
|
+
responseType: ow__rspack_import_3_default().optional.string.oneOf([
|
|
14258
|
+
'parsed',
|
|
14259
|
+
'buffer',
|
|
14260
|
+
'stream'
|
|
14261
|
+
]),
|
|
14262
|
+
timeoutSecs: (ow__rspack_import_3_default().optional.number.positive)
|
|
14263
|
+
}));
|
|
14264
|
+
const { method = 'GET', params, headers, parentRequestId, responseType, timeoutSecs } = rest;
|
|
14265
|
+
if (responseType === 'stream' && !(0,_utils__rspack_import_1.isNode)()) {
|
|
14266
|
+
throw new Error("The 'stream' response type can only be used in Node.js environment.");
|
|
14267
|
+
}
|
|
14268
|
+
const serverUrl = await this.getUrl();
|
|
14269
|
+
const serverPath = path.split('#')[0].replace(/^\/+/, '');
|
|
14270
|
+
// The token goes in `X-Apify-Authorization`, which the platform strips, and the client's default
|
|
14271
|
+
// `Authorization` header is dropped (`null`) so the caller's own one, if any, reaches the Actor.
|
|
14272
|
+
const authHeaders = {
|
|
14273
|
+
Authorization: null
|
|
14274
|
+
};
|
|
14275
|
+
if (this.apifyClient.token) authHeaders['X-Apify-Authorization'] = `Bearer ${this.apifyClient.token}`;
|
|
14276
|
+
const requestHeaders = mergeHeaders(mergeHeaders(authHeaders, headers), parentRequestId === undefined ? undefined : {
|
|
14277
|
+
'X-Actor-Request-ID': parentRequestId
|
|
14278
|
+
});
|
|
14279
|
+
const config = {
|
|
14280
|
+
url: `${serverUrl.replace(/\/+$/, '')}/${serverPath}`,
|
|
14281
|
+
method,
|
|
14282
|
+
params,
|
|
14283
|
+
headers: requestHeaders,
|
|
14284
|
+
data,
|
|
14285
|
+
doNotCompress: true,
|
|
14286
|
+
throwOnErrorStatus: false,
|
|
14287
|
+
retryStatusCodes: SERVER_RETRY_STATUS_CODES,
|
|
14288
|
+
retryTransportErrors: false,
|
|
14289
|
+
maxRedirects: 0,
|
|
14290
|
+
timeout: timeoutSecs !== undefined ? timeoutSecs * 1000 : _base_resource_client__rspack_import_0.DEFAULT_TIMEOUT_MILLIS
|
|
14291
|
+
};
|
|
14292
|
+
if (responseType === 'buffer') config.forceBuffer = true;
|
|
14293
|
+
if (responseType === 'stream') config.responseType = 'stream';
|
|
14294
|
+
return this.httpClient.call(config);
|
|
14295
|
+
}
|
|
14296
|
+
/**
|
|
14297
|
+
* Fetches the Actor, checks that it is a Server Actor, and caches its server URL.
|
|
14298
|
+
*/ async _getServerActor() {
|
|
14299
|
+
const actor = await this._get({}, _base_resource_client__rspack_import_0.SMALL_TIMEOUT_MILLIS);
|
|
14300
|
+
if (!actor) {
|
|
14301
|
+
throw new Error(`Actor ${this.id} does not exist.`);
|
|
14302
|
+
}
|
|
14303
|
+
if (!actor.standbyUrl) {
|
|
14304
|
+
throw new Error(`Actor ${this.id} is not a Server Actor.`);
|
|
14305
|
+
}
|
|
14306
|
+
this._serverUrl = Promise.resolve(actor.standbyUrl);
|
|
14307
|
+
return actor;
|
|
14308
|
+
}
|
|
14309
|
+
}
|
|
14310
|
+
|
|
14311
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
14312
|
+
ActorServerClient: () => (ActorServerClient)
|
|
14313
|
+
});
|
|
14314
|
+
|
|
14315
|
+
|
|
13983
14316
|
},
|
|
13984
14317
|
"gN"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
13985
14318
|
"use strict";
|
|
@@ -14284,6 +14617,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14284
14617
|
* Unlike the `waitForFinish` parameter in {@link get}, this method can wait indefinitely
|
|
14285
14618
|
* by polling the build status. It uses the `waitForFinish` parameter internally (max 60s per call)
|
|
14286
14619
|
* and continuously polls until the build finishes or the timeout is reached.
|
|
14620
|
+
* Rejects if the build keeps returning 404 for 3 seconds.
|
|
14287
14621
|
*
|
|
14288
14622
|
* This is useful when you need to immediately start a run after a build finishes.
|
|
14289
14623
|
*
|
|
@@ -14707,8 +15041,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14707
15041
|
* This is useful for sharing dataset results with external services or users.
|
|
14708
15042
|
*
|
|
14709
15043
|
* @param options - URL generation options (extends all options from {@link listItems})
|
|
14710
|
-
* @param options.expiresInSecs - Number of seconds until the signed URL expires. If omitted, the URL
|
|
15044
|
+
* @param options.expiresInSecs - Number of seconds until the signed URL expires. Must be positive. If omitted, the URL
|
|
15045
|
+
* never expires.
|
|
14711
15046
|
* @param options.fields - Array of field names to include in the response.
|
|
15047
|
+
* @param options.format - Format of the items served by the URL. Defaults to `json`.
|
|
14712
15048
|
* @param options.limit - Maximum number of items to return.
|
|
14713
15049
|
* @param options.offset - Number of items to skip.
|
|
14714
15050
|
* @returns A public URL string for accessing the dataset items
|
|
@@ -14737,6 +15073,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14737
15073
|
desc: (ow__rspack_import_3_default().optional.boolean),
|
|
14738
15074
|
flatten: ow__rspack_import_3_default().optional.array.ofType((ow__rspack_import_3_default().string)),
|
|
14739
15075
|
fields: ow__rspack_import_3_default().optional.array.ofType((ow__rspack_import_3_default().string)),
|
|
15076
|
+
format: ow__rspack_import_3_default().optional.string.oneOf(validItemFormats),
|
|
14740
15077
|
omit: ow__rspack_import_3_default().optional.array.ofType((ow__rspack_import_3_default().string)),
|
|
14741
15078
|
limit: (ow__rspack_import_3_default().optional.number.not.negative),
|
|
14742
15079
|
offset: (ow__rspack_import_3_default().optional.number.not.negative),
|
|
@@ -14744,7 +15081,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14744
15081
|
skipHidden: (ow__rspack_import_3_default().optional.boolean),
|
|
14745
15082
|
unwind: ow__rspack_import_3_default().optional.any((ow__rspack_import_3_default().string), ow__rspack_import_3_default().array.ofType((ow__rspack_import_3_default().string))),
|
|
14746
15083
|
view: (ow__rspack_import_3_default().optional.string),
|
|
14747
|
-
expiresInSecs: (ow__rspack_import_3_default().optional.number)
|
|
15084
|
+
expiresInSecs: (ow__rspack_import_3_default().optional.number.positive)
|
|
14748
15085
|
}));
|
|
14749
15086
|
const dataset = await this.get();
|
|
14750
15087
|
const { expiresInSecs, ...queryOptions } = options;
|
|
@@ -15060,7 +15397,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15060
15397
|
*/ async getRecordPublicUrl(key) {
|
|
15061
15398
|
ow__rspack_import_4_default()(key, (ow__rspack_import_4_default().string.nonEmpty));
|
|
15062
15399
|
const store = await this.get();
|
|
15063
|
-
const recordPublicUrl = new URL(this._publicUrl(
|
|
15400
|
+
const recordPublicUrl = new URL(this._publicUrl([
|
|
15401
|
+
'records',
|
|
15402
|
+
key
|
|
15403
|
+
]));
|
|
15064
15404
|
if (store?.urlSigningSecretKey) {
|
|
15065
15405
|
const signature = await (0,_apify_utilities__rspack_import_1.createHmacSignatureAsync)(store.urlSigningSecretKey, key);
|
|
15066
15406
|
recordPublicUrl.searchParams.append('signature', signature);
|
|
@@ -15074,7 +15414,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15074
15414
|
* the URL will include a cryptographic signature which allows access without authentication.
|
|
15075
15415
|
*
|
|
15076
15416
|
* @param options - URL generation options (extends all options from {@link listKeys})
|
|
15077
|
-
* @param options.expiresInSecs - Number of seconds until the signed URL expires. If omitted, the URL
|
|
15417
|
+
* @param options.expiresInSecs - Number of seconds until the signed URL expires. Must be positive. If omitted, the URL
|
|
15418
|
+
* never expires.
|
|
15078
15419
|
* @param options.limit - Maximum number of keys to return.
|
|
15079
15420
|
* @param options.prefix - Filter keys by prefix.
|
|
15080
15421
|
* @returns A public URL string for accessing the keys list
|
|
@@ -15096,7 +15437,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15096
15437
|
exclusiveStartKey: (ow__rspack_import_4_default().optional.string),
|
|
15097
15438
|
collection: (ow__rspack_import_4_default().optional.string),
|
|
15098
15439
|
prefix: (ow__rspack_import_4_default().optional.string),
|
|
15099
|
-
expiresInSecs: (ow__rspack_import_4_default().optional.number)
|
|
15440
|
+
expiresInSecs: (ow__rspack_import_4_default().optional.number.positive)
|
|
15100
15441
|
}));
|
|
15101
15442
|
const store = await this.get();
|
|
15102
15443
|
const { expiresInSecs, ...queryOptions } = options;
|
|
@@ -15131,7 +15472,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15131
15472
|
* @since Added in 2.9.0
|
|
15132
15473
|
*/ async recordExists(key) {
|
|
15133
15474
|
const requestOpts = {
|
|
15134
|
-
url: this._url(
|
|
15475
|
+
url: this._url([
|
|
15476
|
+
'records',
|
|
15477
|
+
key
|
|
15478
|
+
]),
|
|
15135
15479
|
method: 'HEAD',
|
|
15136
15480
|
params: this._params()
|
|
15137
15481
|
};
|
|
@@ -15163,7 +15507,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15163
15507
|
};
|
|
15164
15508
|
if (options.signature) queryParams.signature = options.signature;
|
|
15165
15509
|
const requestOpts = {
|
|
15166
|
-
url: this._url(
|
|
15510
|
+
url: this._url([
|
|
15511
|
+
'records',
|
|
15512
|
+
key
|
|
15513
|
+
]),
|
|
15167
15514
|
method: 'GET',
|
|
15168
15515
|
params: this._params(queryParams),
|
|
15169
15516
|
timeout: _base_resource_client__rspack_import_2.DEFAULT_TIMEOUT_MILLIS
|
|
@@ -15259,7 +15606,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15259
15606
|
}
|
|
15260
15607
|
}
|
|
15261
15608
|
const uploadOpts = {
|
|
15262
|
-
url: this._url(
|
|
15609
|
+
url: this._url([
|
|
15610
|
+
'records',
|
|
15611
|
+
key
|
|
15612
|
+
]),
|
|
15263
15613
|
method: 'PUT',
|
|
15264
15614
|
params: this._params(),
|
|
15265
15615
|
data: value,
|
|
@@ -15284,7 +15634,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15284
15634
|
*/ async deleteRecord(key) {
|
|
15285
15635
|
ow__rspack_import_4_default()(key, (ow__rspack_import_4_default().string));
|
|
15286
15636
|
await this.httpClient.call({
|
|
15287
|
-
url: this._url(
|
|
15637
|
+
url: this._url([
|
|
15638
|
+
'records',
|
|
15639
|
+
key
|
|
15640
|
+
]),
|
|
15288
15641
|
method: 'DELETE',
|
|
15289
15642
|
params: this._params(),
|
|
15290
15643
|
timeout: _base_resource_client__rspack_import_2.SMALL_TIMEOUT_MILLIS
|
|
@@ -16055,7 +16408,10 @@ const SAFETY_BUFFER_PERCENT = 0.01 / 100; // 0.01%
|
|
|
16055
16408
|
*/ async getRequest(id) {
|
|
16056
16409
|
ow__rspack_import_4_default()(id, (ow__rspack_import_4_default().string));
|
|
16057
16410
|
const requestOpts = {
|
|
16058
|
-
url: this._url(
|
|
16411
|
+
url: this._url([
|
|
16412
|
+
'requests',
|
|
16413
|
+
id
|
|
16414
|
+
]),
|
|
16059
16415
|
method: 'GET',
|
|
16060
16416
|
timeout: Math.min(_base_resource_client__rspack_import_2.SMALL_TIMEOUT_MILLIS, this.timeoutMillis ?? Infinity),
|
|
16061
16417
|
params: this._params()
|
|
@@ -16084,7 +16440,10 @@ const SAFETY_BUFFER_PERCENT = 0.01 / 100; // 0.01%
|
|
|
16084
16440
|
forefront: (ow__rspack_import_4_default().optional.boolean)
|
|
16085
16441
|
}));
|
|
16086
16442
|
const response = await this.httpClient.call({
|
|
16087
|
-
url: this._url(
|
|
16443
|
+
url: this._url([
|
|
16444
|
+
'requests',
|
|
16445
|
+
request.id
|
|
16446
|
+
]),
|
|
16088
16447
|
method: 'PUT',
|
|
16089
16448
|
timeout: Math.min(_base_resource_client__rspack_import_2.MEDIUM_TIMEOUT_MILLIS, this.timeoutMillis ?? Infinity),
|
|
16090
16449
|
data: request,
|
|
@@ -16102,7 +16461,10 @@ const SAFETY_BUFFER_PERCENT = 0.01 / 100; // 0.01%
|
|
|
16102
16461
|
*/ async deleteRequest(id) {
|
|
16103
16462
|
ow__rspack_import_4_default()(id, (ow__rspack_import_4_default().string));
|
|
16104
16463
|
await this.httpClient.call({
|
|
16105
|
-
url: this._url(
|
|
16464
|
+
url: this._url([
|
|
16465
|
+
'requests',
|
|
16466
|
+
id
|
|
16467
|
+
]),
|
|
16106
16468
|
method: 'DELETE',
|
|
16107
16469
|
timeout: Math.min(_base_resource_client__rspack_import_2.SMALL_TIMEOUT_MILLIS, this.timeoutMillis ?? Infinity),
|
|
16108
16470
|
params: this._params({
|
|
@@ -16141,7 +16503,11 @@ const SAFETY_BUFFER_PERCENT = 0.01 / 100; // 0.01%
|
|
|
16141
16503
|
forefront: (ow__rspack_import_4_default().optional.boolean)
|
|
16142
16504
|
}));
|
|
16143
16505
|
const response = await this.httpClient.call({
|
|
16144
|
-
url: this._url(
|
|
16506
|
+
url: this._url([
|
|
16507
|
+
'requests',
|
|
16508
|
+
id,
|
|
16509
|
+
'lock'
|
|
16510
|
+
]),
|
|
16145
16511
|
method: 'PUT',
|
|
16146
16512
|
timeout: Math.min(_base_resource_client__rspack_import_2.MEDIUM_TIMEOUT_MILLIS, this.timeoutMillis ?? Infinity),
|
|
16147
16513
|
params: this._params({
|
|
@@ -16169,7 +16535,11 @@ const SAFETY_BUFFER_PERCENT = 0.01 / 100; // 0.01%
|
|
|
16169
16535
|
forefront: (ow__rspack_import_4_default().optional.boolean)
|
|
16170
16536
|
}));
|
|
16171
16537
|
await this.httpClient.call({
|
|
16172
|
-
url: this._url(
|
|
16538
|
+
url: this._url([
|
|
16539
|
+
'requests',
|
|
16540
|
+
id,
|
|
16541
|
+
'lock'
|
|
16542
|
+
]),
|
|
16173
16543
|
method: 'DELETE',
|
|
16174
16544
|
timeout: Math.min(_base_resource_client__rspack_import_2.SMALL_TIMEOUT_MILLIS, this.timeoutMillis ?? Infinity),
|
|
16175
16545
|
params: this._params({
|
|
@@ -16695,6 +17065,7 @@ const RUN_CHARGE_IDEMPOTENCY_HEADER = 'idempotency-key';
|
|
|
16695
17065
|
* Unlike the `waitForFinish` parameter in {@link get}, this method can wait indefinitely
|
|
16696
17066
|
* by polling the run status. It uses the `waitForFinish` parameter internally (max 60s per call)
|
|
16697
17067
|
* and continuously polls until the run finishes or the timeout is reached.
|
|
17068
|
+
* Rejects if the run keeps returning 404 for 3 seconds.
|
|
16698
17069
|
*
|
|
16699
17070
|
* @param options - Wait options
|
|
16700
17071
|
* @param options.waitSecs - Maximum time to wait for the run to finish, in seconds. If the limit is reached, the returned promise resolves to a run object that will have status `READY` or `RUNNING`. If omitted, waits indefinitely.
|
|
@@ -18037,6 +18408,54 @@ const NOT_FOUND_STATUS_CODE = 404;
|
|
|
18037
18408
|
const RECORD_NOT_FOUND_TYPE = 'record-not-found';
|
|
18038
18409
|
const RECORD_OR_TOKEN_NOT_FOUND_TYPE = 'record-or-token-not-found';
|
|
18039
18410
|
const MIN_COMPRESS_BYTES = 1024;
|
|
18411
|
+
/** Media type prefixes whose payloads carry their own compression, so compressing the request body is wasted work. */ const ALREADY_COMPRESSED_MEDIA_TYPE_PREFIXES = [
|
|
18412
|
+
'audio/',
|
|
18413
|
+
'image/',
|
|
18414
|
+
'video/'
|
|
18415
|
+
];
|
|
18416
|
+
/** Exact media types whose payloads carry their own compression. */ const ALREADY_COMPRESSED_MEDIA_TYPES = new Set([
|
|
18417
|
+
'application/epub+zip',
|
|
18418
|
+
'application/gzip',
|
|
18419
|
+
'application/java-archive',
|
|
18420
|
+
'application/vnd.android.package-archive',
|
|
18421
|
+
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
|
18422
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
18423
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
18424
|
+
'application/vnd.rar',
|
|
18425
|
+
'application/x-7z-compressed',
|
|
18426
|
+
'application/x-bzip',
|
|
18427
|
+
'application/x-bzip2',
|
|
18428
|
+
'application/x-gzip',
|
|
18429
|
+
'application/x-rar-compressed',
|
|
18430
|
+
'application/x-xz',
|
|
18431
|
+
'application/x-zip-compressed',
|
|
18432
|
+
'application/zip',
|
|
18433
|
+
'application/zstd',
|
|
18434
|
+
'font/woff',
|
|
18435
|
+
'font/woff2'
|
|
18436
|
+
]);
|
|
18437
|
+
/** Uncompressed media types that sit under an already-compressed prefix, so compressing them still pays off. */ const COMPRESSIBLE_MEDIA_TYPES = new Set([
|
|
18438
|
+
'audio/aiff',
|
|
18439
|
+
'audio/basic',
|
|
18440
|
+
'audio/l16',
|
|
18441
|
+
'audio/l24',
|
|
18442
|
+
'audio/midi',
|
|
18443
|
+
'audio/vnd.wave',
|
|
18444
|
+
'audio/wav',
|
|
18445
|
+
'audio/wave',
|
|
18446
|
+
'audio/x-aiff',
|
|
18447
|
+
'audio/x-wav',
|
|
18448
|
+
'image/bmp',
|
|
18449
|
+
'image/tiff',
|
|
18450
|
+
'image/vnd.adobe.photoshop',
|
|
18451
|
+
'image/vnd.microsoft.icon',
|
|
18452
|
+
'image/x-icon',
|
|
18453
|
+
'image/x-ms-bmp'
|
|
18454
|
+
]);
|
|
18455
|
+
/** Structured syntax suffixes marking a media type as text even under an already-compressed prefix (`image/svg+xml`). */ const COMPRESSIBLE_MEDIA_TYPE_SUFFIXES = [
|
|
18456
|
+
'+json',
|
|
18457
|
+
'+xml'
|
|
18458
|
+
];
|
|
18040
18459
|
/**
|
|
18041
18460
|
* Returns object's 'data' property or throws if parameter is not an object,
|
|
18042
18461
|
* or an object without a 'data' property.
|
|
@@ -18132,6 +18551,23 @@ let gzipPromisified;
|
|
|
18132
18551
|
}
|
|
18133
18552
|
return gzipPromisified(value);
|
|
18134
18553
|
}
|
|
18554
|
+
/**
|
|
18555
|
+
* Decides whether a request body with the given content type is worth compressing.
|
|
18556
|
+
*
|
|
18557
|
+
* Images, audio, video and archives already carry their own compression. Running them through brotli or gzip
|
|
18558
|
+
* burns CPU, holds a second full copy of the body in memory, and usually produces output slightly larger than
|
|
18559
|
+
* the input. Formats that are raw despite such a media type, for example `image/bmp` or `audio/wav`, are still
|
|
18560
|
+
* compressed. A body with no content type is assumed to be compressible.
|
|
18561
|
+
* @internal
|
|
18562
|
+
*/ function isCompressibleContentType(contentType) {
|
|
18563
|
+
if (!contentType) return true;
|
|
18564
|
+
// `Content-Type` is case-insensitive and may carry parameters, for example `text/plain; charset=utf-8`.
|
|
18565
|
+
const mediaType = contentType.split(';', 1)[0].trim().toLowerCase();
|
|
18566
|
+
if (COMPRESSIBLE_MEDIA_TYPES.has(mediaType)) return true;
|
|
18567
|
+
if (COMPRESSIBLE_MEDIA_TYPE_SUFFIXES.some((suffix)=>mediaType.endsWith(suffix))) return true;
|
|
18568
|
+
if (ALREADY_COMPRESSED_MEDIA_TYPES.has(mediaType)) return false;
|
|
18569
|
+
return !ALREADY_COMPRESSED_MEDIA_TYPE_PREFIXES.some((prefix)=>mediaType.startsWith(prefix));
|
|
18570
|
+
}
|
|
18135
18571
|
/**
|
|
18136
18572
|
* Compress the passed value using brotli, falling back to gzip. Returns undefined if the data is
|
|
18137
18573
|
* too small / wrong type, or if neither algorithm is available.
|
|
@@ -18198,7 +18634,7 @@ function isStream(value) {
|
|
|
18198
18634
|
function getVersionData() {
|
|
18199
18635
|
if (true) {
|
|
18200
18636
|
return {
|
|
18201
|
-
version: "2.25.1-beta.
|
|
18637
|
+
version: "2.25.1-beta.30"
|
|
18202
18638
|
};
|
|
18203
18639
|
}
|
|
18204
18640
|
// eslint-disable-next-line
|
|
@@ -18291,6 +18727,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
18291
18727
|
catchNotFoundOrThrow: () => (catchNotFoundOrThrow),
|
|
18292
18728
|
getVersionData: () => (getVersionData),
|
|
18293
18729
|
isBuffer: () => (isBuffer),
|
|
18730
|
+
isCompressibleContentType: () => (isCompressibleContentType),
|
|
18294
18731
|
isNode: () => (isNode),
|
|
18295
18732
|
isStream: () => (isStream),
|
|
18296
18733
|
maybeCompressValue: () => (maybeCompressValue),
|
|
@@ -28805,61 +29242,64 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28805
29242
|
/* reexport */ __webpack_require__.re(__webpack_exports__, _apify_client__rspack_import_0, ["InvalidResponseBodyError","default"]);
|
|
28806
29243
|
/* import */ var _resource_clients_actor__rspack_import_1 = __webpack_require__("FC");
|
|
28807
29244
|
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_actor__rspack_import_1, ["InvalidResponseBodyError","default"]);
|
|
28808
|
-
/* import */ var
|
|
28809
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28810
|
-
/* import */ var
|
|
28811
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28812
|
-
/* import */ var
|
|
28813
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28814
|
-
/* import */ var
|
|
28815
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28816
|
-
/* import */ var
|
|
28817
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28818
|
-
/* import */ var
|
|
28819
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28820
|
-
/* import */ var
|
|
28821
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28822
|
-
/* import */ var
|
|
28823
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28824
|
-
/* import */ var
|
|
28825
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28826
|
-
/* import */ var
|
|
28827
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28828
|
-
/* import */ var
|
|
28829
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28830
|
-
/* import */ var
|
|
28831
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28832
|
-
/* import */ var
|
|
28833
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28834
|
-
/* import */ var
|
|
28835
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28836
|
-
/* import */ var
|
|
28837
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28838
|
-
/* import */ var
|
|
28839
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28840
|
-
/* import */ var
|
|
28841
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28842
|
-
/* import */ var
|
|
28843
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28844
|
-
/* import */ var
|
|
28845
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28846
|
-
/* import */ var
|
|
28847
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28848
|
-
/* import */ var
|
|
28849
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28850
|
-
/* import */ var
|
|
28851
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28852
|
-
/* import */ var
|
|
28853
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28854
|
-
/* import */ var
|
|
28855
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28856
|
-
/* import */ var
|
|
28857
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28858
|
-
/* import */ var
|
|
28859
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28860
|
-
/* import */ var
|
|
28861
|
-
/* reexport */ __webpack_require__.re(__webpack_exports__,
|
|
28862
|
-
/* import */ var
|
|
29245
|
+
/* import */ var _resource_clients_actor_server__rspack_import_2 = __webpack_require__("Za");
|
|
29246
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_actor_server__rspack_import_2, ["InvalidResponseBodyError","default"]);
|
|
29247
|
+
/* import */ var _resource_clients_actor_collection__rspack_import_3 = __webpack_require__("x0");
|
|
29248
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_actor_collection__rspack_import_3, ["InvalidResponseBodyError","default"]);
|
|
29249
|
+
/* import */ var _resource_clients_actor_env_var__rspack_import_4 = __webpack_require__("w5");
|
|
29250
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_actor_env_var__rspack_import_4, ["InvalidResponseBodyError","default"]);
|
|
29251
|
+
/* import */ var _resource_clients_actor_env_var_collection__rspack_import_5 = __webpack_require__("Yk");
|
|
29252
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_actor_env_var_collection__rspack_import_5, ["InvalidResponseBodyError","default"]);
|
|
29253
|
+
/* import */ var _resource_clients_actor_version__rspack_import_6 = __webpack_require__("gN");
|
|
29254
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_actor_version__rspack_import_6, ["InvalidResponseBodyError","default"]);
|
|
29255
|
+
/* import */ var _resource_clients_actor_version_collection__rspack_import_7 = __webpack_require__("jNG");
|
|
29256
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_actor_version_collection__rspack_import_7, ["InvalidResponseBodyError","default"]);
|
|
29257
|
+
/* import */ var _resource_clients_build__rspack_import_8 = __webpack_require__("TT");
|
|
29258
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_build__rspack_import_8, ["InvalidResponseBodyError","default"]);
|
|
29259
|
+
/* import */ var _resource_clients_build_collection__rspack_import_9 = __webpack_require__("Xi");
|
|
29260
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_build_collection__rspack_import_9, ["InvalidResponseBodyError","default"]);
|
|
29261
|
+
/* import */ var _resource_clients_dataset__rspack_import_10 = __webpack_require__("c");
|
|
29262
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_dataset__rspack_import_10, ["InvalidResponseBodyError","default"]);
|
|
29263
|
+
/* import */ var _resource_clients_dataset_collection__rspack_import_11 = __webpack_require__("NN");
|
|
29264
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_dataset_collection__rspack_import_11, ["InvalidResponseBodyError","default"]);
|
|
29265
|
+
/* import */ var _resource_clients_key_value_store__rspack_import_12 = __webpack_require__("Ff");
|
|
29266
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_key_value_store__rspack_import_12, ["InvalidResponseBodyError","default"]);
|
|
29267
|
+
/* import */ var _resource_clients_key_value_store_collection__rspack_import_13 = __webpack_require__("tg");
|
|
29268
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_key_value_store_collection__rspack_import_13, ["InvalidResponseBodyError","default"]);
|
|
29269
|
+
/* import */ var _resource_clients_log__rspack_import_14 = __webpack_require__("gd");
|
|
29270
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_log__rspack_import_14, ["InvalidResponseBodyError","default"]);
|
|
29271
|
+
/* import */ var _resource_clients_request_queue__rspack_import_15 = __webpack_require__("md");
|
|
29272
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_request_queue__rspack_import_15, ["InvalidResponseBodyError","default"]);
|
|
29273
|
+
/* import */ var _resource_clients_request_queue_collection__rspack_import_16 = __webpack_require__("vv");
|
|
29274
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_request_queue_collection__rspack_import_16, ["InvalidResponseBodyError","default"]);
|
|
29275
|
+
/* import */ var _resource_clients_run__rspack_import_17 = __webpack_require__("xz");
|
|
29276
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_run__rspack_import_17, ["InvalidResponseBodyError","default"]);
|
|
29277
|
+
/* import */ var _resource_clients_run_collection__rspack_import_18 = __webpack_require__("Pu");
|
|
29278
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_run_collection__rspack_import_18, ["InvalidResponseBodyError","default"]);
|
|
29279
|
+
/* import */ var _resource_clients_schedule__rspack_import_19 = __webpack_require__("LJ");
|
|
29280
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_schedule__rspack_import_19, ["InvalidResponseBodyError","default"]);
|
|
29281
|
+
/* import */ var _resource_clients_schedule_collection__rspack_import_20 = __webpack_require__("dv");
|
|
29282
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_schedule_collection__rspack_import_20, ["InvalidResponseBodyError","default"]);
|
|
29283
|
+
/* import */ var _resource_clients_store_collection__rspack_import_21 = __webpack_require__("y7");
|
|
29284
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_store_collection__rspack_import_21, ["InvalidResponseBodyError","default"]);
|
|
29285
|
+
/* import */ var _resource_clients_task__rspack_import_22 = __webpack_require__("Hu");
|
|
29286
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_task__rspack_import_22, ["InvalidResponseBodyError","default"]);
|
|
29287
|
+
/* import */ var _resource_clients_task_collection__rspack_import_23 = __webpack_require__("bx");
|
|
29288
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_task_collection__rspack_import_23, ["InvalidResponseBodyError","default"]);
|
|
29289
|
+
/* import */ var _resource_clients_user__rspack_import_24 = __webpack_require__("KQ");
|
|
29290
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_user__rspack_import_24, ["InvalidResponseBodyError","default"]);
|
|
29291
|
+
/* import */ var _resource_clients_webhook__rspack_import_25 = __webpack_require__("cN");
|
|
29292
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_webhook__rspack_import_25, ["InvalidResponseBodyError","default"]);
|
|
29293
|
+
/* import */ var _resource_clients_webhook_collection__rspack_import_26 = __webpack_require__("rk");
|
|
29294
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_webhook_collection__rspack_import_26, ["InvalidResponseBodyError","default"]);
|
|
29295
|
+
/* import */ var _resource_clients_webhook_dispatch__rspack_import_27 = __webpack_require__("Jn");
|
|
29296
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_webhook_dispatch__rspack_import_27, ["InvalidResponseBodyError","default"]);
|
|
29297
|
+
/* import */ var _resource_clients_webhook_dispatch_collection__rspack_import_28 = __webpack_require__("j9");
|
|
29298
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _resource_clients_webhook_dispatch_collection__rspack_import_28, ["InvalidResponseBodyError","default"]);
|
|
29299
|
+
/* import */ var _apify_api_error__rspack_import_29 = __webpack_require__("mF");
|
|
29300
|
+
/* reexport */ __webpack_require__.re(__webpack_exports__, _apify_api_error__rspack_import_29, ["InvalidResponseBodyError","default"]);
|
|
29301
|
+
/* import */ var _interceptors__rspack_import_30 = __webpack_require__("fH");
|
|
29302
|
+
|
|
28863
29303
|
|
|
28864
29304
|
|
|
28865
29305
|
|
|
@@ -28892,7 +29332,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28892
29332
|
|
|
28893
29333
|
|
|
28894
29334
|
__webpack_require__.d(__webpack_exports__, {
|
|
28895
|
-
InvalidResponseBodyError: () => (/* reexport safe */
|
|
29335
|
+
InvalidResponseBodyError: () => (/* reexport safe */ _interceptors__rspack_import_30.InvalidResponseBodyError)
|
|
28896
29336
|
});
|
|
28897
29337
|
|
|
28898
29338
|
})();
|