apify-client 2.23.2-beta.3 → 2.23.2-beta.5
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/bundle.js +636 -190
- package/dist/bundle.js.map +1 -1
- package/package.json +5 -5
package/dist/bundle.js
CHANGED
|
@@ -18020,7 +18020,7 @@ function isStream(value) {
|
|
|
18020
18020
|
function getVersionData() {
|
|
18021
18021
|
if (true) {
|
|
18022
18022
|
return {
|
|
18023
|
-
version: "2.23.2-beta.
|
|
18023
|
+
version: "2.23.2-beta.5"
|
|
18024
18024
|
};
|
|
18025
18025
|
}
|
|
18026
18026
|
// eslint-disable-next-line
|
|
@@ -21548,6 +21548,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
21548
21548
|
HttpStatusCode: () => (HttpStatusCode),
|
|
21549
21549
|
VERSION: () => (VERSION),
|
|
21550
21550
|
all: () => (all),
|
|
21551
|
+
create: () => (create),
|
|
21551
21552
|
"default": () => (/* reexport safe */ _lib_axios_js__rspack_import_0["default"]),
|
|
21552
21553
|
formToJSON: () => (formToJSON),
|
|
21553
21554
|
getAdapter: () => (getAdapter),
|
|
@@ -21580,6 +21581,7 @@ const {
|
|
|
21580
21581
|
formToJSON,
|
|
21581
21582
|
getAdapter,
|
|
21582
21583
|
mergeConfig,
|
|
21584
|
+
create,
|
|
21583
21585
|
} = _lib_axios_js__rspack_import_0["default"];
|
|
21584
21586
|
|
|
21585
21587
|
|
|
@@ -21624,11 +21626,13 @@ const knownAdapters = {
|
|
|
21624
21626
|
_utils_js__rspack_import_3["default"].forEach(knownAdapters, (fn, value) => {
|
|
21625
21627
|
if (fn) {
|
|
21626
21628
|
try {
|
|
21627
|
-
Object.
|
|
21629
|
+
// Null-proto descriptors so a polluted Object.prototype.get cannot turn
|
|
21630
|
+
// these data descriptors into accessor descriptors on the way in.
|
|
21631
|
+
Object.defineProperty(fn, 'name', { __proto__: null, value });
|
|
21628
21632
|
} catch (e) {
|
|
21629
21633
|
// eslint-disable-next-line no-empty
|
|
21630
21634
|
}
|
|
21631
|
-
Object.defineProperty(fn, 'adapterName', { value });
|
|
21635
|
+
Object.defineProperty(fn, 'adapterName', { __proto__: null, value });
|
|
21632
21636
|
}
|
|
21633
21637
|
});
|
|
21634
21638
|
|
|
@@ -21741,11 +21745,13 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
21741
21745
|
/* import */ var _utils_js__rspack_import_0 = __webpack_require__(7275);
|
|
21742
21746
|
/* import */ var _core_AxiosError_js__rspack_import_2 = __webpack_require__(4062);
|
|
21743
21747
|
/* import */ var _helpers_composeSignals_js__rspack_import_4 = __webpack_require__(2723);
|
|
21744
|
-
/* import */ var
|
|
21745
|
-
/* import */ var
|
|
21746
|
-
/* import */ var
|
|
21748
|
+
/* import */ var _helpers_trackStream_js__rspack_import_7 = __webpack_require__(1791);
|
|
21749
|
+
/* import */ var _core_AxiosHeaders_js__rspack_import_10 = __webpack_require__(7110);
|
|
21750
|
+
/* import */ var _helpers_progressEventReducer_js__rspack_import_6 = __webpack_require__(7837);
|
|
21747
21751
|
/* import */ var _helpers_resolveConfig_js__rspack_import_3 = __webpack_require__(8382);
|
|
21748
|
-
/* import */ var
|
|
21752
|
+
/* import */ var _core_settle_js__rspack_import_9 = __webpack_require__(3853);
|
|
21753
|
+
/* import */ var _helpers_estimateDataURLDecodedBytes_js__rspack_import_5 = __webpack_require__(1526);
|
|
21754
|
+
/* import */ var _env_data_js__rspack_import_8 = __webpack_require__(9888);
|
|
21749
21755
|
|
|
21750
21756
|
|
|
21751
21757
|
|
|
@@ -21756,16 +21762,11 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
21756
21762
|
|
|
21757
21763
|
|
|
21758
21764
|
|
|
21759
|
-
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
21760
21765
|
|
|
21761
|
-
const { isFunction } = _utils_js__rspack_import_0["default"];
|
|
21762
21766
|
|
|
21763
|
-
const
|
|
21764
|
-
Request,
|
|
21765
|
-
Response,
|
|
21766
|
-
}))(_utils_js__rspack_import_0["default"].global);
|
|
21767
|
+
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
21767
21768
|
|
|
21768
|
-
const {
|
|
21769
|
+
const { isFunction } = _utils_js__rspack_import_0["default"];
|
|
21769
21770
|
|
|
21770
21771
|
const test = (fn, ...args) => {
|
|
21771
21772
|
try {
|
|
@@ -21776,11 +21777,17 @@ const test = (fn, ...args) => {
|
|
|
21776
21777
|
};
|
|
21777
21778
|
|
|
21778
21779
|
const factory = (env) => {
|
|
21780
|
+
const globalObject = _utils_js__rspack_import_0["default"].global ?? globalThis;
|
|
21781
|
+
const { ReadableStream, TextEncoder } = globalObject;
|
|
21782
|
+
|
|
21779
21783
|
env = _utils_js__rspack_import_0["default"].merge.call(
|
|
21780
21784
|
{
|
|
21781
21785
|
skipUndefined: true,
|
|
21782
21786
|
},
|
|
21783
|
-
|
|
21787
|
+
{
|
|
21788
|
+
Request: globalObject.Request,
|
|
21789
|
+
Response: globalObject.Response,
|
|
21790
|
+
},
|
|
21784
21791
|
env
|
|
21785
21792
|
);
|
|
21786
21793
|
|
|
@@ -21810,18 +21817,20 @@ const factory = (env) => {
|
|
|
21810
21817
|
test(() => {
|
|
21811
21818
|
let duplexAccessed = false;
|
|
21812
21819
|
|
|
21813
|
-
const
|
|
21814
|
-
|
|
21815
|
-
const hasContentType = new Request(_platform_index_js__rspack_import_1["default"].origin, {
|
|
21816
|
-
body,
|
|
21820
|
+
const request = new Request(_platform_index_js__rspack_import_1["default"].origin, {
|
|
21821
|
+
body: new ReadableStream(),
|
|
21817
21822
|
method: 'POST',
|
|
21818
21823
|
get duplex() {
|
|
21819
21824
|
duplexAccessed = true;
|
|
21820
21825
|
return 'half';
|
|
21821
21826
|
},
|
|
21822
|
-
})
|
|
21827
|
+
});
|
|
21828
|
+
|
|
21829
|
+
const hasContentType = request.headers.has('Content-Type');
|
|
21823
21830
|
|
|
21824
|
-
body
|
|
21831
|
+
if (request.body != null) {
|
|
21832
|
+
request.body.cancel();
|
|
21833
|
+
}
|
|
21825
21834
|
|
|
21826
21835
|
return duplexAccessed && !hasContentType;
|
|
21827
21836
|
});
|
|
@@ -21905,8 +21914,13 @@ const factory = (env) => {
|
|
|
21905
21914
|
headers,
|
|
21906
21915
|
withCredentials = 'same-origin',
|
|
21907
21916
|
fetchOptions,
|
|
21917
|
+
maxContentLength,
|
|
21918
|
+
maxBodyLength,
|
|
21908
21919
|
} = (0,_helpers_resolveConfig_js__rspack_import_3["default"])(config);
|
|
21909
21920
|
|
|
21921
|
+
const hasMaxContentLength = _utils_js__rspack_import_0["default"].isNumber(maxContentLength) && maxContentLength > -1;
|
|
21922
|
+
const hasMaxBodyLength = _utils_js__rspack_import_0["default"].isNumber(maxBodyLength) && maxBodyLength > -1;
|
|
21923
|
+
|
|
21910
21924
|
let _fetch = envFetch || fetch;
|
|
21911
21925
|
|
|
21912
21926
|
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
@@ -21928,6 +21942,41 @@ const factory = (env) => {
|
|
|
21928
21942
|
let requestContentLength;
|
|
21929
21943
|
|
|
21930
21944
|
try {
|
|
21945
|
+
// Enforce maxContentLength for data: URLs up-front so we never materialize
|
|
21946
|
+
// an oversized payload. The HTTP adapter applies the same check (see http.js
|
|
21947
|
+
// "if (protocol === 'data:')" branch).
|
|
21948
|
+
if (hasMaxContentLength && typeof url === 'string' && url.startsWith('data:')) {
|
|
21949
|
+
const estimated = (0,_helpers_estimateDataURLDecodedBytes_js__rspack_import_5["default"])(url);
|
|
21950
|
+
if (estimated > maxContentLength) {
|
|
21951
|
+
throw new _core_AxiosError_js__rspack_import_2["default"](
|
|
21952
|
+
'maxContentLength size of ' + maxContentLength + ' exceeded',
|
|
21953
|
+
_core_AxiosError_js__rspack_import_2["default"].ERR_BAD_RESPONSE,
|
|
21954
|
+
config,
|
|
21955
|
+
request
|
|
21956
|
+
);
|
|
21957
|
+
}
|
|
21958
|
+
}
|
|
21959
|
+
|
|
21960
|
+
// Enforce maxBodyLength against the outbound request body before dispatch.
|
|
21961
|
+
// Mirrors http.js behavior (ERR_BAD_REQUEST / 'Request body larger than
|
|
21962
|
+
// maxBodyLength limit'). Skip when the body length cannot be determined
|
|
21963
|
+
// (e.g. a live ReadableStream supplied by the caller).
|
|
21964
|
+
if (hasMaxBodyLength && method !== 'get' && method !== 'head') {
|
|
21965
|
+
const outboundLength = await resolveBodyLength(headers, data);
|
|
21966
|
+
if (
|
|
21967
|
+
typeof outboundLength === 'number' &&
|
|
21968
|
+
isFinite(outboundLength) &&
|
|
21969
|
+
outboundLength > maxBodyLength
|
|
21970
|
+
) {
|
|
21971
|
+
throw new _core_AxiosError_js__rspack_import_2["default"](
|
|
21972
|
+
'Request body larger than maxBodyLength limit',
|
|
21973
|
+
_core_AxiosError_js__rspack_import_2["default"].ERR_BAD_REQUEST,
|
|
21974
|
+
config,
|
|
21975
|
+
request
|
|
21976
|
+
);
|
|
21977
|
+
}
|
|
21978
|
+
}
|
|
21979
|
+
|
|
21931
21980
|
if (
|
|
21932
21981
|
onUploadProgress &&
|
|
21933
21982
|
supportsRequestStream &&
|
|
@@ -21948,12 +21997,12 @@ const factory = (env) => {
|
|
|
21948
21997
|
}
|
|
21949
21998
|
|
|
21950
21999
|
if (_request.body) {
|
|
21951
|
-
const [onProgress, flush] = (0,
|
|
22000
|
+
const [onProgress, flush] = (0,_helpers_progressEventReducer_js__rspack_import_6.progressEventDecorator)(
|
|
21952
22001
|
requestContentLength,
|
|
21953
|
-
(0,
|
|
22002
|
+
(0,_helpers_progressEventReducer_js__rspack_import_6.progressEventReducer)((0,_helpers_progressEventReducer_js__rspack_import_6.asyncDecorator)(onUploadProgress))
|
|
21954
22003
|
);
|
|
21955
22004
|
|
|
21956
|
-
data = (0,
|
|
22005
|
+
data = (0,_helpers_trackStream_js__rspack_import_7.trackStream)(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
21957
22006
|
}
|
|
21958
22007
|
}
|
|
21959
22008
|
|
|
@@ -21965,6 +22014,22 @@ const factory = (env) => {
|
|
|
21965
22014
|
// see https://github.com/cloudflare/workerd/issues/902
|
|
21966
22015
|
const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
|
|
21967
22016
|
|
|
22017
|
+
// If data is FormData and Content-Type is multipart/form-data without boundary,
|
|
22018
|
+
// delete it so fetch can set it correctly with the boundary
|
|
22019
|
+
if (_utils_js__rspack_import_0["default"].isFormData(data)) {
|
|
22020
|
+
const contentType = headers.getContentType();
|
|
22021
|
+
if (
|
|
22022
|
+
contentType &&
|
|
22023
|
+
/^multipart\/form-data/i.test(contentType) &&
|
|
22024
|
+
!/boundary=/i.test(contentType)
|
|
22025
|
+
) {
|
|
22026
|
+
headers.delete('content-type');
|
|
22027
|
+
}
|
|
22028
|
+
}
|
|
22029
|
+
|
|
22030
|
+
// Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)
|
|
22031
|
+
headers.set('User-Agent', 'axios/' + _env_data_js__rspack_import_8.VERSION, false);
|
|
22032
|
+
|
|
21968
22033
|
const resolvedOptions = {
|
|
21969
22034
|
...fetchOptions,
|
|
21970
22035
|
signal: composedSignal,
|
|
@@ -21981,10 +22046,28 @@ const factory = (env) => {
|
|
|
21981
22046
|
? _fetch(request, fetchOptions)
|
|
21982
22047
|
: _fetch(url, resolvedOptions));
|
|
21983
22048
|
|
|
22049
|
+
// Cheap pre-check: if the server honestly declares a content-length that
|
|
22050
|
+
// already exceeds the cap, reject before we start streaming.
|
|
22051
|
+
if (hasMaxContentLength) {
|
|
22052
|
+
const declaredLength = _utils_js__rspack_import_0["default"].toFiniteNumber(response.headers.get('content-length'));
|
|
22053
|
+
if (declaredLength != null && declaredLength > maxContentLength) {
|
|
22054
|
+
throw new _core_AxiosError_js__rspack_import_2["default"](
|
|
22055
|
+
'maxContentLength size of ' + maxContentLength + ' exceeded',
|
|
22056
|
+
_core_AxiosError_js__rspack_import_2["default"].ERR_BAD_RESPONSE,
|
|
22057
|
+
config,
|
|
22058
|
+
request
|
|
22059
|
+
);
|
|
22060
|
+
}
|
|
22061
|
+
}
|
|
22062
|
+
|
|
21984
22063
|
const isStreamResponse =
|
|
21985
22064
|
supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
21986
22065
|
|
|
21987
|
-
if (
|
|
22066
|
+
if (
|
|
22067
|
+
supportsResponseStream &&
|
|
22068
|
+
response.body &&
|
|
22069
|
+
(onDownloadProgress || hasMaxContentLength || (isStreamResponse && unsubscribe))
|
|
22070
|
+
) {
|
|
21988
22071
|
const options = {};
|
|
21989
22072
|
|
|
21990
22073
|
['status', 'statusText', 'headers'].forEach((prop) => {
|
|
@@ -21995,14 +22078,30 @@ const factory = (env) => {
|
|
|
21995
22078
|
|
|
21996
22079
|
const [onProgress, flush] =
|
|
21997
22080
|
(onDownloadProgress &&
|
|
21998
|
-
(0,
|
|
22081
|
+
(0,_helpers_progressEventReducer_js__rspack_import_6.progressEventDecorator)(
|
|
21999
22082
|
responseContentLength,
|
|
22000
|
-
(0,
|
|
22083
|
+
(0,_helpers_progressEventReducer_js__rspack_import_6.progressEventReducer)((0,_helpers_progressEventReducer_js__rspack_import_6.asyncDecorator)(onDownloadProgress), true)
|
|
22001
22084
|
)) ||
|
|
22002
22085
|
[];
|
|
22003
22086
|
|
|
22087
|
+
let bytesRead = 0;
|
|
22088
|
+
const onChunkProgress = (loadedBytes) => {
|
|
22089
|
+
if (hasMaxContentLength) {
|
|
22090
|
+
bytesRead = loadedBytes;
|
|
22091
|
+
if (bytesRead > maxContentLength) {
|
|
22092
|
+
throw new _core_AxiosError_js__rspack_import_2["default"](
|
|
22093
|
+
'maxContentLength size of ' + maxContentLength + ' exceeded',
|
|
22094
|
+
_core_AxiosError_js__rspack_import_2["default"].ERR_BAD_RESPONSE,
|
|
22095
|
+
config,
|
|
22096
|
+
request
|
|
22097
|
+
);
|
|
22098
|
+
}
|
|
22099
|
+
}
|
|
22100
|
+
onProgress && onProgress(loadedBytes);
|
|
22101
|
+
};
|
|
22102
|
+
|
|
22004
22103
|
response = new Response(
|
|
22005
|
-
(0,
|
|
22104
|
+
(0,_helpers_trackStream_js__rspack_import_7.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {
|
|
22006
22105
|
flush && flush();
|
|
22007
22106
|
unsubscribe && unsubscribe();
|
|
22008
22107
|
}),
|
|
@@ -22017,12 +22116,39 @@ const factory = (env) => {
|
|
|
22017
22116
|
config
|
|
22018
22117
|
);
|
|
22019
22118
|
|
|
22119
|
+
// Fallback enforcement for environments without ReadableStream support
|
|
22120
|
+
// (legacy runtimes). Detect materialized size from typed output; skip
|
|
22121
|
+
// streams/Response passthrough since the user will read those themselves.
|
|
22122
|
+
if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {
|
|
22123
|
+
let materializedSize;
|
|
22124
|
+
if (responseData != null) {
|
|
22125
|
+
if (typeof responseData.byteLength === 'number') {
|
|
22126
|
+
materializedSize = responseData.byteLength;
|
|
22127
|
+
} else if (typeof responseData.size === 'number') {
|
|
22128
|
+
materializedSize = responseData.size;
|
|
22129
|
+
} else if (typeof responseData === 'string') {
|
|
22130
|
+
materializedSize =
|
|
22131
|
+
typeof TextEncoder === 'function'
|
|
22132
|
+
? new TextEncoder().encode(responseData).byteLength
|
|
22133
|
+
: responseData.length;
|
|
22134
|
+
}
|
|
22135
|
+
}
|
|
22136
|
+
if (typeof materializedSize === 'number' && materializedSize > maxContentLength) {
|
|
22137
|
+
throw new _core_AxiosError_js__rspack_import_2["default"](
|
|
22138
|
+
'maxContentLength size of ' + maxContentLength + ' exceeded',
|
|
22139
|
+
_core_AxiosError_js__rspack_import_2["default"].ERR_BAD_RESPONSE,
|
|
22140
|
+
config,
|
|
22141
|
+
request
|
|
22142
|
+
);
|
|
22143
|
+
}
|
|
22144
|
+
}
|
|
22145
|
+
|
|
22020
22146
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
22021
22147
|
|
|
22022
22148
|
return await new Promise((resolve, reject) => {
|
|
22023
|
-
(0,
|
|
22149
|
+
(0,_core_settle_js__rspack_import_9["default"])(resolve, reject, {
|
|
22024
22150
|
data: responseData,
|
|
22025
|
-
headers:
|
|
22151
|
+
headers: _core_AxiosHeaders_js__rspack_import_10["default"].from(response.headers),
|
|
22026
22152
|
status: response.status,
|
|
22027
22153
|
statusText: response.statusText,
|
|
22028
22154
|
config,
|
|
@@ -22032,6 +22158,17 @@ const factory = (env) => {
|
|
|
22032
22158
|
} catch (err) {
|
|
22033
22159
|
unsubscribe && unsubscribe();
|
|
22034
22160
|
|
|
22161
|
+
// Safari can surface fetch aborts as a DOMException-like object whose
|
|
22162
|
+
// branded getters throw. Prefer our composed signal reason before reading
|
|
22163
|
+
// the caught error, preserving timeout vs cancellation semantics.
|
|
22164
|
+
if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof _core_AxiosError_js__rspack_import_2["default"]) {
|
|
22165
|
+
const canceledError = composedSignal.reason;
|
|
22166
|
+
canceledError.config = config;
|
|
22167
|
+
request && (canceledError.request = request);
|
|
22168
|
+
err !== canceledError && (canceledError.cause = err);
|
|
22169
|
+
throw canceledError;
|
|
22170
|
+
}
|
|
22171
|
+
|
|
22035
22172
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
22036
22173
|
throw Object.assign(
|
|
22037
22174
|
new _core_AxiosError_js__rspack_import_2["default"](
|
|
@@ -22192,7 +22329,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
22192
22329
|
// will return status as 0 even though it's a successful request
|
|
22193
22330
|
if (
|
|
22194
22331
|
request.status === 0 &&
|
|
22195
|
-
!(request.responseURL && request.responseURL.
|
|
22332
|
+
!(request.responseURL && request.responseURL.startsWith('file:'))
|
|
22196
22333
|
) {
|
|
22197
22334
|
return;
|
|
22198
22335
|
}
|
|
@@ -22209,6 +22346,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
22209
22346
|
}
|
|
22210
22347
|
|
|
22211
22348
|
reject(new _core_AxiosError_js__rspack_import_3["default"]('Request aborted', _core_AxiosError_js__rspack_import_3["default"].ECONNABORTED, config, request));
|
|
22349
|
+
done();
|
|
22212
22350
|
|
|
22213
22351
|
// Clean up request
|
|
22214
22352
|
request = null;
|
|
@@ -22224,6 +22362,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
22224
22362
|
// attach the underlying event for consumers who want details
|
|
22225
22363
|
err.event = event || null;
|
|
22226
22364
|
reject(err);
|
|
22365
|
+
done();
|
|
22227
22366
|
request = null;
|
|
22228
22367
|
};
|
|
22229
22368
|
|
|
@@ -22244,6 +22383,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
22244
22383
|
request
|
|
22245
22384
|
)
|
|
22246
22385
|
);
|
|
22386
|
+
done();
|
|
22247
22387
|
|
|
22248
22388
|
// Clean up request
|
|
22249
22389
|
request = null;
|
|
@@ -22293,6 +22433,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
22293
22433
|
}
|
|
22294
22434
|
reject(!cancel || cancel.type ? new _cancel_CanceledError_js__rspack_import_7["default"](null, config, request) : cancel);
|
|
22295
22435
|
request.abort();
|
|
22436
|
+
done();
|
|
22296
22437
|
request = null;
|
|
22297
22438
|
};
|
|
22298
22439
|
|
|
@@ -22306,7 +22447,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
22306
22447
|
|
|
22307
22448
|
const protocol = (0,_helpers_parseProtocol_js__rspack_import_8["default"])(_config.url);
|
|
22308
22449
|
|
|
22309
|
-
if (protocol && _platform_index_js__rspack_import_9["default"].protocols.
|
|
22450
|
+
if (protocol && !_platform_index_js__rspack_import_9["default"].protocols.includes(protocol)) {
|
|
22310
22451
|
reject(
|
|
22311
22452
|
new _core_AxiosError_js__rspack_import_3["default"](
|
|
22312
22453
|
'Unsupported protocol ' + protocol + ':',
|
|
@@ -22795,7 +22936,7 @@ class Axios {
|
|
|
22795
22936
|
let contextHeaders = headers && _utils_js__rspack_import_3["default"].merge(headers.common, headers[config.method]);
|
|
22796
22937
|
|
|
22797
22938
|
headers &&
|
|
22798
|
-
_utils_js__rspack_import_3["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {
|
|
22939
|
+
_utils_js__rspack_import_3["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query', 'common'], (method) => {
|
|
22799
22940
|
delete headers[method];
|
|
22800
22941
|
});
|
|
22801
22942
|
|
|
@@ -22898,7 +23039,7 @@ _utils_js__rspack_import_3["default"].forEach(['delete', 'get', 'head', 'options
|
|
|
22898
23039
|
};
|
|
22899
23040
|
});
|
|
22900
23041
|
|
|
22901
|
-
_utils_js__rspack_import_3["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
23042
|
+
_utils_js__rspack_import_3["default"].forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) {
|
|
22902
23043
|
function generateHTTPMethod(isForm) {
|
|
22903
23044
|
return function httpMethod(url, data, config) {
|
|
22904
23045
|
return this.request(
|
|
@@ -22918,7 +23059,11 @@ _utils_js__rspack_import_3["default"].forEach(['post', 'put', 'patch'], function
|
|
|
22918
23059
|
|
|
22919
23060
|
Axios.prototype[method] = generateHTTPMethod();
|
|
22920
23061
|
|
|
22921
|
-
|
|
23062
|
+
// QUERY is a safe/idempotent read method; multipart form bodies don't fit
|
|
23063
|
+
// its semantics, so no queryForm shorthand is generated.
|
|
23064
|
+
if (method !== 'query') {
|
|
23065
|
+
Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
|
|
23066
|
+
}
|
|
22922
23067
|
});
|
|
22923
23068
|
|
|
22924
23069
|
/* export default */ const __rspack_default_export = (Axios);
|
|
@@ -22932,9 +23077,80 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
22932
23077
|
"default": () => (__rspack_default_export)
|
|
22933
23078
|
});
|
|
22934
23079
|
/* import */ var _utils_js__rspack_import_0 = __webpack_require__(7275);
|
|
23080
|
+
/* import */ var _AxiosHeaders_js__rspack_import_1 = __webpack_require__(7110);
|
|
23081
|
+
|
|
23082
|
+
|
|
23083
|
+
|
|
23084
|
+
|
|
23085
|
+
|
|
23086
|
+
const REDACTED = '[REDACTED ****]';
|
|
23087
|
+
|
|
23088
|
+
function hasOwnOrPrototypeToJSON(source) {
|
|
23089
|
+
if (_utils_js__rspack_import_0["default"].hasOwnProp(source, 'toJSON')) {
|
|
23090
|
+
return true;
|
|
23091
|
+
}
|
|
23092
|
+
|
|
23093
|
+
let prototype = Object.getPrototypeOf(source);
|
|
23094
|
+
|
|
23095
|
+
while (prototype && prototype !== Object.prototype) {
|
|
23096
|
+
if (_utils_js__rspack_import_0["default"].hasOwnProp(prototype, 'toJSON')) {
|
|
23097
|
+
return true;
|
|
23098
|
+
}
|
|
22935
23099
|
|
|
23100
|
+
prototype = Object.getPrototypeOf(prototype);
|
|
23101
|
+
}
|
|
23102
|
+
|
|
23103
|
+
return false;
|
|
23104
|
+
}
|
|
23105
|
+
|
|
23106
|
+
// Build a plain-object snapshot of `config` and replace the value of any key
|
|
23107
|
+
// (case-insensitive) listed in `redactKeys` with REDACTED. Walks through arrays
|
|
23108
|
+
// and AxiosHeaders, and short-circuits on circular references.
|
|
23109
|
+
function redactConfig(config, redactKeys) {
|
|
23110
|
+
const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));
|
|
23111
|
+
const seen = [];
|
|
23112
|
+
|
|
23113
|
+
const visit = (source) => {
|
|
23114
|
+
if (source === null || typeof source !== 'object') return source;
|
|
23115
|
+
if (_utils_js__rspack_import_0["default"].isBuffer(source)) return source;
|
|
23116
|
+
if (seen.indexOf(source) !== -1) return undefined;
|
|
23117
|
+
|
|
23118
|
+
if (source instanceof _AxiosHeaders_js__rspack_import_1["default"]) {
|
|
23119
|
+
source = source.toJSON();
|
|
23120
|
+
}
|
|
22936
23121
|
|
|
23122
|
+
seen.push(source);
|
|
22937
23123
|
|
|
23124
|
+
let result;
|
|
23125
|
+
if (_utils_js__rspack_import_0["default"].isArray(source)) {
|
|
23126
|
+
result = [];
|
|
23127
|
+
source.forEach((v, i) => {
|
|
23128
|
+
const reducedValue = visit(v);
|
|
23129
|
+
if (!_utils_js__rspack_import_0["default"].isUndefined(reducedValue)) {
|
|
23130
|
+
result[i] = reducedValue;
|
|
23131
|
+
}
|
|
23132
|
+
});
|
|
23133
|
+
} else {
|
|
23134
|
+
if (!_utils_js__rspack_import_0["default"].isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
|
|
23135
|
+
seen.pop();
|
|
23136
|
+
return source;
|
|
23137
|
+
}
|
|
23138
|
+
|
|
23139
|
+
result = Object.create(null);
|
|
23140
|
+
for (const [key, value] of Object.entries(source)) {
|
|
23141
|
+
const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);
|
|
23142
|
+
if (!_utils_js__rspack_import_0["default"].isUndefined(reducedValue)) {
|
|
23143
|
+
result[key] = reducedValue;
|
|
23144
|
+
}
|
|
23145
|
+
}
|
|
23146
|
+
}
|
|
23147
|
+
|
|
23148
|
+
seen.pop();
|
|
23149
|
+
return result;
|
|
23150
|
+
};
|
|
23151
|
+
|
|
23152
|
+
return visit(config);
|
|
23153
|
+
}
|
|
22938
23154
|
|
|
22939
23155
|
class AxiosError extends Error {
|
|
22940
23156
|
static from(error, code, config, request, response, customProps) {
|
|
@@ -22951,42 +23167,56 @@ class AxiosError extends Error {
|
|
|
22951
23167
|
return axiosError;
|
|
22952
23168
|
}
|
|
22953
23169
|
|
|
22954
|
-
|
|
22955
|
-
|
|
22956
|
-
|
|
22957
|
-
|
|
22958
|
-
|
|
22959
|
-
|
|
22960
|
-
|
|
22961
|
-
|
|
22962
|
-
|
|
22963
|
-
|
|
22964
|
-
|
|
22965
|
-
|
|
22966
|
-
|
|
22967
|
-
|
|
22968
|
-
|
|
22969
|
-
|
|
22970
|
-
|
|
22971
|
-
|
|
22972
|
-
|
|
22973
|
-
|
|
22974
|
-
|
|
22975
|
-
|
|
22976
|
-
|
|
22977
|
-
|
|
22978
|
-
|
|
22979
|
-
|
|
22980
|
-
|
|
22981
|
-
|
|
22982
|
-
|
|
22983
|
-
|
|
22984
|
-
|
|
22985
|
-
|
|
22986
|
-
|
|
23170
|
+
/**
|
|
23171
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
23172
|
+
*
|
|
23173
|
+
* @param {string} message The error message.
|
|
23174
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
23175
|
+
* @param {Object} [config] The config.
|
|
23176
|
+
* @param {Object} [request] The request.
|
|
23177
|
+
* @param {Object} [response] The response.
|
|
23178
|
+
*
|
|
23179
|
+
* @returns {Error} The created error.
|
|
23180
|
+
*/
|
|
23181
|
+
constructor(message, code, config, request, response) {
|
|
23182
|
+
super(message);
|
|
23183
|
+
|
|
23184
|
+
// Make message enumerable to maintain backward compatibility
|
|
23185
|
+
// The native Error constructor sets message as non-enumerable,
|
|
23186
|
+
// but axios < v1.13.3 had it as enumerable
|
|
23187
|
+
Object.defineProperty(this, 'message', {
|
|
23188
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
23189
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
23190
|
+
__proto__: null,
|
|
23191
|
+
value: message,
|
|
23192
|
+
enumerable: true,
|
|
23193
|
+
writable: true,
|
|
23194
|
+
configurable: true,
|
|
23195
|
+
});
|
|
23196
|
+
|
|
23197
|
+
this.name = 'AxiosError';
|
|
23198
|
+
this.isAxiosError = true;
|
|
23199
|
+
code && (this.code = code);
|
|
23200
|
+
config && (this.config = config);
|
|
23201
|
+
request && (this.request = request);
|
|
23202
|
+
if (response) {
|
|
23203
|
+
this.response = response;
|
|
23204
|
+
this.status = response.status;
|
|
22987
23205
|
}
|
|
23206
|
+
}
|
|
22988
23207
|
|
|
22989
23208
|
toJSON() {
|
|
23209
|
+
// Opt-in redaction: when the request config carries a `redact` array, the
|
|
23210
|
+
// value of any matching key (case-insensitive, at any depth) is replaced
|
|
23211
|
+
// with REDACTED in the serialized snapshot. Undefined or empty leaves the
|
|
23212
|
+
// existing serialization behavior unchanged.
|
|
23213
|
+
const config = this.config;
|
|
23214
|
+
const redactKeys = config && _utils_js__rspack_import_0["default"].hasOwnProp(config, 'redact') ? config.redact : undefined;
|
|
23215
|
+
const serializedConfig =
|
|
23216
|
+
_utils_js__rspack_import_0["default"].isArray(redactKeys) && redactKeys.length > 0
|
|
23217
|
+
? redactConfig(config, redactKeys)
|
|
23218
|
+
: _utils_js__rspack_import_0["default"].toJSONObject(config);
|
|
23219
|
+
|
|
22990
23220
|
return {
|
|
22991
23221
|
// Standard
|
|
22992
23222
|
message: this.message,
|
|
@@ -23000,7 +23230,7 @@ class AxiosError extends Error {
|
|
|
23000
23230
|
columnNumber: this.columnNumber,
|
|
23001
23231
|
stack: this.stack,
|
|
23002
23232
|
// Axios
|
|
23003
|
-
config:
|
|
23233
|
+
config: serializedConfig,
|
|
23004
23234
|
code: this.code,
|
|
23005
23235
|
status: this.status,
|
|
23006
23236
|
};
|
|
@@ -23012,6 +23242,7 @@ AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
|
|
|
23012
23242
|
AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
|
|
23013
23243
|
AxiosError.ECONNABORTED = 'ECONNABORTED';
|
|
23014
23244
|
AxiosError.ETIMEDOUT = 'ETIMEDOUT';
|
|
23245
|
+
AxiosError.ECONNREFUSED = 'ECONNREFUSED';
|
|
23015
23246
|
AxiosError.ERR_NETWORK = 'ERR_NETWORK';
|
|
23016
23247
|
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
|
|
23017
23248
|
AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';
|
|
@@ -23020,6 +23251,7 @@ AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
|
|
|
23020
23251
|
AxiosError.ERR_CANCELED = 'ERR_CANCELED';
|
|
23021
23252
|
AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
23022
23253
|
AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
23254
|
+
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
|
|
23023
23255
|
|
|
23024
23256
|
/* export default */ const __rspack_default_export = (AxiosError);
|
|
23025
23257
|
|
|
@@ -23040,41 +23272,41 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
23040
23272
|
|
|
23041
23273
|
const $internals = Symbol('internals');
|
|
23042
23274
|
|
|
23043
|
-
const
|
|
23044
|
-
|
|
23045
|
-
function assertValidHeaderValue(value, header) {
|
|
23046
|
-
if (value === false || value == null) {
|
|
23047
|
-
return;
|
|
23048
|
-
}
|
|
23275
|
+
const INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
23049
23276
|
|
|
23050
|
-
|
|
23051
|
-
|
|
23052
|
-
|
|
23053
|
-
}
|
|
23277
|
+
function trimSPorHTAB(str) {
|
|
23278
|
+
let start = 0;
|
|
23279
|
+
let end = str.length;
|
|
23054
23280
|
|
|
23055
|
-
|
|
23056
|
-
|
|
23057
|
-
}
|
|
23058
|
-
}
|
|
23281
|
+
while (start < end) {
|
|
23282
|
+
const code = str.charCodeAt(start);
|
|
23059
23283
|
|
|
23060
|
-
|
|
23061
|
-
|
|
23062
|
-
}
|
|
23284
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
23285
|
+
break;
|
|
23286
|
+
}
|
|
23063
23287
|
|
|
23064
|
-
|
|
23065
|
-
|
|
23288
|
+
start += 1;
|
|
23289
|
+
}
|
|
23066
23290
|
|
|
23067
|
-
while (end >
|
|
23068
|
-
const
|
|
23291
|
+
while (end > start) {
|
|
23292
|
+
const code = str.charCodeAt(end - 1);
|
|
23069
23293
|
|
|
23070
|
-
if (
|
|
23294
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
23071
23295
|
break;
|
|
23072
23296
|
}
|
|
23073
23297
|
|
|
23074
23298
|
end -= 1;
|
|
23075
23299
|
}
|
|
23076
23300
|
|
|
23077
|
-
return end === str.length ? str : str.slice(
|
|
23301
|
+
return start === 0 && end === str.length ? str : str.slice(start, end);
|
|
23302
|
+
}
|
|
23303
|
+
|
|
23304
|
+
function normalizeHeader(header) {
|
|
23305
|
+
return header && String(header).trim().toLowerCase();
|
|
23306
|
+
}
|
|
23307
|
+
|
|
23308
|
+
function sanitizeHeaderValue(str) {
|
|
23309
|
+
return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ''));
|
|
23078
23310
|
}
|
|
23079
23311
|
|
|
23080
23312
|
function normalizeValue(value) {
|
|
@@ -23082,7 +23314,7 @@ function normalizeValue(value) {
|
|
|
23082
23314
|
return value;
|
|
23083
23315
|
}
|
|
23084
23316
|
|
|
23085
|
-
return _utils_js__rspack_import_0["default"].isArray(value) ? value.map(normalizeValue) :
|
|
23317
|
+
return _utils_js__rspack_import_0["default"].isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
|
|
23086
23318
|
}
|
|
23087
23319
|
|
|
23088
23320
|
function parseTokens(str) {
|
|
@@ -23133,6 +23365,9 @@ function buildAccessors(obj, header) {
|
|
|
23133
23365
|
|
|
23134
23366
|
['get', 'set', 'has'].forEach((methodName) => {
|
|
23135
23367
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
23368
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
23369
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
23370
|
+
__proto__: null,
|
|
23136
23371
|
value: function (arg1, arg2, arg3) {
|
|
23137
23372
|
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
23138
23373
|
},
|
|
@@ -23164,7 +23399,6 @@ class AxiosHeaders {
|
|
|
23164
23399
|
_rewrite === true ||
|
|
23165
23400
|
(_rewrite === undefined && self[key] !== false)
|
|
23166
23401
|
) {
|
|
23167
|
-
assertValidHeaderValue(_value, _header);
|
|
23168
23402
|
self[key || _header] = normalizeValue(_value);
|
|
23169
23403
|
}
|
|
23170
23404
|
}
|
|
@@ -23521,7 +23755,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
23521
23755
|
*/
|
|
23522
23756
|
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
23523
23757
|
let isRelativeUrl = !(0,_helpers_isAbsoluteURL_js__rspack_import_0["default"])(requestedURL);
|
|
23524
|
-
if (baseURL && (isRelativeUrl || allowAbsoluteUrls
|
|
23758
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
23525
23759
|
return (0,_helpers_combineURLs_js__rspack_import_1["default"])(baseURL, requestedURL);
|
|
23526
23760
|
}
|
|
23527
23761
|
return requestedURL;
|
|
@@ -23592,8 +23826,15 @@ function dispatchRequest(config) {
|
|
|
23592
23826
|
function onAdapterResolution(response) {
|
|
23593
23827
|
throwIfCancellationRequested(config);
|
|
23594
23828
|
|
|
23595
|
-
//
|
|
23596
|
-
|
|
23829
|
+
// Expose the current response on config so that transformResponse can
|
|
23830
|
+
// attach it to any AxiosError it throws (e.g. on JSON parse failure).
|
|
23831
|
+
// We clean it up afterwards to avoid polluting the config object.
|
|
23832
|
+
config.response = response;
|
|
23833
|
+
try {
|
|
23834
|
+
response.data = _transformData_js__rspack_import_2["default"].call(config, config.transformResponse, response);
|
|
23835
|
+
} finally {
|
|
23836
|
+
delete config.response;
|
|
23837
|
+
}
|
|
23597
23838
|
|
|
23598
23839
|
response.headers = _core_AxiosHeaders_js__rspack_import_1["default"].from(response.headers);
|
|
23599
23840
|
|
|
@@ -23605,11 +23846,16 @@ function dispatchRequest(config) {
|
|
|
23605
23846
|
|
|
23606
23847
|
// Transform response data
|
|
23607
23848
|
if (reason && reason.response) {
|
|
23608
|
-
|
|
23609
|
-
|
|
23610
|
-
|
|
23611
|
-
|
|
23612
|
-
|
|
23849
|
+
config.response = reason.response;
|
|
23850
|
+
try {
|
|
23851
|
+
reason.response.data = _transformData_js__rspack_import_2["default"].call(
|
|
23852
|
+
config,
|
|
23853
|
+
config.transformResponse,
|
|
23854
|
+
reason.response
|
|
23855
|
+
);
|
|
23856
|
+
} finally {
|
|
23857
|
+
delete config.response;
|
|
23858
|
+
}
|
|
23613
23859
|
reason.response.headers = _core_AxiosHeaders_js__rspack_import_1["default"].from(reason.response.headers);
|
|
23614
23860
|
}
|
|
23615
23861
|
}
|
|
@@ -23648,7 +23894,21 @@ const headersToObject = (thing) => (thing instanceof _AxiosHeaders_js__rspack_im
|
|
|
23648
23894
|
function mergeConfig(config1, config2) {
|
|
23649
23895
|
// eslint-disable-next-line no-param-reassign
|
|
23650
23896
|
config2 = config2 || {};
|
|
23651
|
-
|
|
23897
|
+
|
|
23898
|
+
// Use a null-prototype object so that downstream reads such as `config.auth`
|
|
23899
|
+
// or `config.baseURL` cannot inherit polluted values from Object.prototype.
|
|
23900
|
+
// `hasOwnProperty` is restored as a non-enumerable own slot to preserve
|
|
23901
|
+
// ergonomics for user code that relies on it.
|
|
23902
|
+
const config = Object.create(null);
|
|
23903
|
+
Object.defineProperty(config, 'hasOwnProperty', {
|
|
23904
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
23905
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
23906
|
+
__proto__: null,
|
|
23907
|
+
value: Object.prototype.hasOwnProperty,
|
|
23908
|
+
enumerable: false,
|
|
23909
|
+
writable: true,
|
|
23910
|
+
configurable: true,
|
|
23911
|
+
});
|
|
23652
23912
|
|
|
23653
23913
|
function getMergedValue(target, source, prop, caseless) {
|
|
23654
23914
|
if (_utils_js__rspack_import_1["default"].isPlainObject(target) && _utils_js__rspack_import_1["default"].isPlainObject(source)) {
|
|
@@ -23687,9 +23947,9 @@ function mergeConfig(config1, config2) {
|
|
|
23687
23947
|
|
|
23688
23948
|
// eslint-disable-next-line consistent-return
|
|
23689
23949
|
function mergeDirectKeys(a, b, prop) {
|
|
23690
|
-
if (prop
|
|
23950
|
+
if (_utils_js__rspack_import_1["default"].hasOwnProp(config2, prop)) {
|
|
23691
23951
|
return getMergedValue(a, b);
|
|
23692
|
-
} else if (prop
|
|
23952
|
+
} else if (_utils_js__rspack_import_1["default"].hasOwnProp(config1, prop)) {
|
|
23693
23953
|
return getMergedValue(undefined, a);
|
|
23694
23954
|
}
|
|
23695
23955
|
}
|
|
@@ -23721,6 +23981,7 @@ function mergeConfig(config1, config2) {
|
|
|
23721
23981
|
httpsAgent: defaultToConfig2,
|
|
23722
23982
|
cancelToken: defaultToConfig2,
|
|
23723
23983
|
socketPath: defaultToConfig2,
|
|
23984
|
+
allowedSocketPaths: defaultToConfig2,
|
|
23724
23985
|
responseEncoding: defaultToConfig2,
|
|
23725
23986
|
validateStatus: mergeDirectKeys,
|
|
23726
23987
|
headers: (a, b, prop) =>
|
|
@@ -23730,7 +23991,9 @@ function mergeConfig(config1, config2) {
|
|
|
23730
23991
|
_utils_js__rspack_import_1["default"].forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
23731
23992
|
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
|
|
23732
23993
|
const merge = _utils_js__rspack_import_1["default"].hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
23733
|
-
const
|
|
23994
|
+
const a = _utils_js__rspack_import_1["default"].hasOwnProp(config1, prop) ? config1[prop] : undefined;
|
|
23995
|
+
const b = _utils_js__rspack_import_1["default"].hasOwnProp(config2, prop) ? config2[prop] : undefined;
|
|
23996
|
+
const configValue = merge(a, b, prop);
|
|
23734
23997
|
(_utils_js__rspack_import_1["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
23735
23998
|
});
|
|
23736
23999
|
|
|
@@ -23764,17 +24027,13 @@ function settle(resolve, reject, response) {
|
|
|
23764
24027
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
23765
24028
|
resolve(response);
|
|
23766
24029
|
} else {
|
|
23767
|
-
reject(
|
|
23768
|
-
|
|
23769
|
-
|
|
23770
|
-
|
|
23771
|
-
|
|
23772
|
-
|
|
23773
|
-
|
|
23774
|
-
response.request,
|
|
23775
|
-
response
|
|
23776
|
-
)
|
|
23777
|
-
);
|
|
24030
|
+
reject(new _AxiosError_js__rspack_import_0["default"](
|
|
24031
|
+
'Request failed with status code ' + response.status,
|
|
24032
|
+
response.status >= 400 && response.status < 500 ? _AxiosError_js__rspack_import_0["default"].ERR_BAD_REQUEST : _AxiosError_js__rspack_import_0["default"].ERR_BAD_RESPONSE,
|
|
24033
|
+
response.config,
|
|
24034
|
+
response.request,
|
|
24035
|
+
response
|
|
24036
|
+
));
|
|
23778
24037
|
}
|
|
23779
24038
|
}
|
|
23780
24039
|
|
|
@@ -23843,6 +24102,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
23843
24102
|
|
|
23844
24103
|
|
|
23845
24104
|
|
|
24105
|
+
const own = (obj, key) => (obj != null && _utils_js__rspack_import_0["default"].hasOwnProp(obj, key) ? obj[key] : undefined);
|
|
24106
|
+
|
|
23846
24107
|
/**
|
|
23847
24108
|
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
|
23848
24109
|
* of the input
|
|
@@ -23910,20 +24171,22 @@ const defaults = {
|
|
|
23910
24171
|
let isFileList;
|
|
23911
24172
|
|
|
23912
24173
|
if (isObjectPayload) {
|
|
24174
|
+
const formSerializer = own(this, 'formSerializer');
|
|
23913
24175
|
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
23914
|
-
return (0,_helpers_toURLEncodedForm_js__rspack_import_3["default"])(data,
|
|
24176
|
+
return (0,_helpers_toURLEncodedForm_js__rspack_import_3["default"])(data, formSerializer).toString();
|
|
23915
24177
|
}
|
|
23916
24178
|
|
|
23917
24179
|
if (
|
|
23918
24180
|
(isFileList = _utils_js__rspack_import_0["default"].isFileList(data)) ||
|
|
23919
24181
|
contentType.indexOf('multipart/form-data') > -1
|
|
23920
24182
|
) {
|
|
23921
|
-
const
|
|
24183
|
+
const env = own(this, 'env');
|
|
24184
|
+
const _FormData = env && env.FormData;
|
|
23922
24185
|
|
|
23923
24186
|
return (0,_helpers_toFormData_js__rspack_import_4["default"])(
|
|
23924
24187
|
isFileList ? { 'files[]': data } : data,
|
|
23925
24188
|
_FormData && new _FormData(),
|
|
23926
|
-
|
|
24189
|
+
formSerializer
|
|
23927
24190
|
);
|
|
23928
24191
|
}
|
|
23929
24192
|
}
|
|
@@ -23939,9 +24202,10 @@ const defaults = {
|
|
|
23939
24202
|
|
|
23940
24203
|
transformResponse: [
|
|
23941
24204
|
function transformResponse(data) {
|
|
23942
|
-
const transitional = this
|
|
24205
|
+
const transitional = own(this, 'transitional') || defaults.transitional;
|
|
23943
24206
|
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
23944
|
-
const
|
|
24207
|
+
const responseType = own(this, 'responseType');
|
|
24208
|
+
const JSONRequested = responseType === 'json';
|
|
23945
24209
|
|
|
23946
24210
|
if (_utils_js__rspack_import_0["default"].isResponse(data) || _utils_js__rspack_import_0["default"].isReadableStream(data)) {
|
|
23947
24211
|
return data;
|
|
@@ -23950,17 +24214,17 @@ const defaults = {
|
|
|
23950
24214
|
if (
|
|
23951
24215
|
data &&
|
|
23952
24216
|
_utils_js__rspack_import_0["default"].isString(data) &&
|
|
23953
|
-
((forcedJSONParsing && !
|
|
24217
|
+
((forcedJSONParsing && !responseType) || JSONRequested)
|
|
23954
24218
|
) {
|
|
23955
24219
|
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
23956
24220
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
23957
24221
|
|
|
23958
24222
|
try {
|
|
23959
|
-
return JSON.parse(data, this
|
|
24223
|
+
return JSON.parse(data, own(this, 'parseReviver'));
|
|
23960
24224
|
} catch (e) {
|
|
23961
24225
|
if (strictJSONParsing) {
|
|
23962
24226
|
if (e.name === 'SyntaxError') {
|
|
23963
|
-
throw _core_AxiosError_js__rspack_import_5["default"].from(e, _core_AxiosError_js__rspack_import_5["default"].ERR_BAD_RESPONSE, this, null, this
|
|
24227
|
+
throw _core_AxiosError_js__rspack_import_5["default"].from(e, _core_AxiosError_js__rspack_import_5["default"].ERR_BAD_RESPONSE, this, null, own(this, 'response'));
|
|
23964
24228
|
}
|
|
23965
24229
|
throw e;
|
|
23966
24230
|
}
|
|
@@ -24000,7 +24264,7 @@ const defaults = {
|
|
|
24000
24264
|
},
|
|
24001
24265
|
};
|
|
24002
24266
|
|
|
24003
|
-
_utils_js__rspack_import_0["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
24267
|
+
_utils_js__rspack_import_0["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query'], (method) => {
|
|
24004
24268
|
defaults.headers[method] = {};
|
|
24005
24269
|
});
|
|
24006
24270
|
|
|
@@ -24031,7 +24295,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24031
24295
|
__webpack_require__.d(__webpack_exports__, {
|
|
24032
24296
|
VERSION: () => (VERSION)
|
|
24033
24297
|
});
|
|
24034
|
-
const VERSION = "1.
|
|
24298
|
+
const VERSION = "1.16.0";
|
|
24035
24299
|
|
|
24036
24300
|
},
|
|
24037
24301
|
5267(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
@@ -24061,9 +24325,8 @@ function encode(str) {
|
|
|
24061
24325
|
')': '%29',
|
|
24062
24326
|
'~': '%7E',
|
|
24063
24327
|
'%20': '+',
|
|
24064
|
-
'%00': '\x00',
|
|
24065
24328
|
};
|
|
24066
|
-
return encodeURIComponent(str).replace(/[!'()~]|%20
|
|
24329
|
+
return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
|
|
24067
24330
|
return charMap[match];
|
|
24068
24331
|
});
|
|
24069
24332
|
}
|
|
@@ -24219,7 +24482,8 @@ function bind(fn, thisArg) {
|
|
|
24219
24482
|
"use strict";
|
|
24220
24483
|
__webpack_require__.r(__webpack_exports__);
|
|
24221
24484
|
__webpack_require__.d(__webpack_exports__, {
|
|
24222
|
-
"default": () => (buildURL)
|
|
24485
|
+
"default": () => (buildURL),
|
|
24486
|
+
encode: () => (encode)
|
|
24223
24487
|
});
|
|
24224
24488
|
/* import */ var _utils_js__rspack_import_0 = __webpack_require__(7275);
|
|
24225
24489
|
/* import */ var _helpers_AxiosURLSearchParams_js__rspack_import_1 = __webpack_require__(5267);
|
|
@@ -24424,8 +24688,20 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
24424
24688
|
|
|
24425
24689
|
read(name) {
|
|
24426
24690
|
if (typeof document === 'undefined') return null;
|
|
24427
|
-
|
|
24428
|
-
|
|
24691
|
+
// Match name=value by splitting on the semicolon separator instead of building a
|
|
24692
|
+
// RegExp from `name` — interpolating an unescaped string into a RegExp would let
|
|
24693
|
+
// metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or
|
|
24694
|
+
// match the wrong cookie. Browsers may serialize cookie pairs as either ";" or
|
|
24695
|
+
// "; ", so ignore optional whitespace before each cookie name.
|
|
24696
|
+
const cookies = document.cookie.split(';');
|
|
24697
|
+
for (let i = 0; i < cookies.length; i++) {
|
|
24698
|
+
const cookie = cookies[i].replace(/^\s+/, '');
|
|
24699
|
+
const eq = cookie.indexOf('=');
|
|
24700
|
+
if (eq !== -1 && cookie.slice(0, eq) === name) {
|
|
24701
|
+
return decodeURIComponent(cookie.slice(eq + 1));
|
|
24702
|
+
}
|
|
24703
|
+
}
|
|
24704
|
+
return null;
|
|
24429
24705
|
},
|
|
24430
24706
|
|
|
24431
24707
|
remove(name) {
|
|
@@ -24442,6 +24718,116 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
24442
24718
|
});
|
|
24443
24719
|
|
|
24444
24720
|
|
|
24721
|
+
},
|
|
24722
|
+
1526(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
24723
|
+
"use strict";
|
|
24724
|
+
__webpack_require__.r(__webpack_exports__);
|
|
24725
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
24726
|
+
"default": () => (estimateDataURLDecodedBytes)
|
|
24727
|
+
});
|
|
24728
|
+
/* provided dependency */ var Buffer = __webpack_require__(8287)["Buffer"];
|
|
24729
|
+
/**
|
|
24730
|
+
* Estimate decoded byte length of a data:// URL *without* allocating large buffers.
|
|
24731
|
+
* - For base64: compute exact decoded size using length and padding;
|
|
24732
|
+
* handle %XX at the character-count level (no string allocation).
|
|
24733
|
+
* - For non-base64: use UTF-8 byteLength of the encoded body as a safe upper bound.
|
|
24734
|
+
*
|
|
24735
|
+
* @param {string} url
|
|
24736
|
+
* @returns {number}
|
|
24737
|
+
*/
|
|
24738
|
+
function estimateDataURLDecodedBytes(url) {
|
|
24739
|
+
if (!url || typeof url !== 'string') return 0;
|
|
24740
|
+
if (!url.startsWith('data:')) return 0;
|
|
24741
|
+
|
|
24742
|
+
const comma = url.indexOf(',');
|
|
24743
|
+
if (comma < 0) return 0;
|
|
24744
|
+
|
|
24745
|
+
const meta = url.slice(5, comma);
|
|
24746
|
+
const body = url.slice(comma + 1);
|
|
24747
|
+
const isBase64 = /;base64/i.test(meta);
|
|
24748
|
+
|
|
24749
|
+
if (isBase64) {
|
|
24750
|
+
let effectiveLen = body.length;
|
|
24751
|
+
const len = body.length; // cache length
|
|
24752
|
+
|
|
24753
|
+
for (let i = 0; i < len; i++) {
|
|
24754
|
+
if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) {
|
|
24755
|
+
const a = body.charCodeAt(i + 1);
|
|
24756
|
+
const b = body.charCodeAt(i + 2);
|
|
24757
|
+
const isHex =
|
|
24758
|
+
((a >= 48 && a <= 57) || (a >= 65 && a <= 70) || (a >= 97 && a <= 102)) &&
|
|
24759
|
+
((b >= 48 && b <= 57) || (b >= 65 && b <= 70) || (b >= 97 && b <= 102));
|
|
24760
|
+
|
|
24761
|
+
if (isHex) {
|
|
24762
|
+
effectiveLen -= 2;
|
|
24763
|
+
i += 2;
|
|
24764
|
+
}
|
|
24765
|
+
}
|
|
24766
|
+
}
|
|
24767
|
+
|
|
24768
|
+
let pad = 0;
|
|
24769
|
+
let idx = len - 1;
|
|
24770
|
+
|
|
24771
|
+
const tailIsPct3D = (j) =>
|
|
24772
|
+
j >= 2 &&
|
|
24773
|
+
body.charCodeAt(j - 2) === 37 && // '%'
|
|
24774
|
+
body.charCodeAt(j - 1) === 51 && // '3'
|
|
24775
|
+
(body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100); // 'D' or 'd'
|
|
24776
|
+
|
|
24777
|
+
if (idx >= 0) {
|
|
24778
|
+
if (body.charCodeAt(idx) === 61 /* '=' */) {
|
|
24779
|
+
pad++;
|
|
24780
|
+
idx--;
|
|
24781
|
+
} else if (tailIsPct3D(idx)) {
|
|
24782
|
+
pad++;
|
|
24783
|
+
idx -= 3;
|
|
24784
|
+
}
|
|
24785
|
+
}
|
|
24786
|
+
|
|
24787
|
+
if (pad === 1 && idx >= 0) {
|
|
24788
|
+
if (body.charCodeAt(idx) === 61 /* '=' */) {
|
|
24789
|
+
pad++;
|
|
24790
|
+
} else if (tailIsPct3D(idx)) {
|
|
24791
|
+
pad++;
|
|
24792
|
+
}
|
|
24793
|
+
}
|
|
24794
|
+
|
|
24795
|
+
const groups = Math.floor(effectiveLen / 4);
|
|
24796
|
+
const bytes = groups * 3 - (pad || 0);
|
|
24797
|
+
return bytes > 0 ? bytes : 0;
|
|
24798
|
+
}
|
|
24799
|
+
|
|
24800
|
+
if (typeof Buffer !== 'undefined' && typeof Buffer.byteLength === 'function') {
|
|
24801
|
+
return Buffer.byteLength(body, 'utf8');
|
|
24802
|
+
}
|
|
24803
|
+
|
|
24804
|
+
// Compute UTF-8 byte length directly from UTF-16 code units without allocating
|
|
24805
|
+
// a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies).
|
|
24806
|
+
// Using body.length here would undercount non-ASCII (e.g. '€' is 1 code unit
|
|
24807
|
+
// but 3 UTF-8 bytes).
|
|
24808
|
+
let bytes = 0;
|
|
24809
|
+
for (let i = 0, len = body.length; i < len; i++) {
|
|
24810
|
+
const c = body.charCodeAt(i);
|
|
24811
|
+
if (c < 0x80) {
|
|
24812
|
+
bytes += 1;
|
|
24813
|
+
} else if (c < 0x800) {
|
|
24814
|
+
bytes += 2;
|
|
24815
|
+
} else if (c >= 0xd800 && c <= 0xdbff && i + 1 < len) {
|
|
24816
|
+
const next = body.charCodeAt(i + 1);
|
|
24817
|
+
if (next >= 0xdc00 && next <= 0xdfff) {
|
|
24818
|
+
bytes += 4;
|
|
24819
|
+
i++;
|
|
24820
|
+
} else {
|
|
24821
|
+
bytes += 3;
|
|
24822
|
+
}
|
|
24823
|
+
} else {
|
|
24824
|
+
bytes += 3;
|
|
24825
|
+
}
|
|
24826
|
+
}
|
|
24827
|
+
return bytes;
|
|
24828
|
+
}
|
|
24829
|
+
|
|
24830
|
+
|
|
24445
24831
|
},
|
|
24446
24832
|
7887(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
24447
24833
|
"use strict";
|
|
@@ -24510,7 +24896,9 @@ function formDataToJSON(formData) {
|
|
|
24510
24896
|
|
|
24511
24897
|
if (isLast) {
|
|
24512
24898
|
if (_utils_js__rspack_import_0["default"].hasOwnProp(target, name)) {
|
|
24513
|
-
target[name] = [target[name]
|
|
24899
|
+
target[name] = _utils_js__rspack_import_0["default"].isArray(target[name])
|
|
24900
|
+
? target[name].concat(value)
|
|
24901
|
+
: [target[name], value];
|
|
24514
24902
|
} else {
|
|
24515
24903
|
target[name] = value;
|
|
24516
24904
|
}
|
|
@@ -24725,7 +25113,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
24725
25113
|
|
|
24726
25114
|
|
|
24727
25115
|
function parseProtocol(url) {
|
|
24728
|
-
const match = /^([-+\w]{1,25})(
|
|
25116
|
+
const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);
|
|
24729
25117
|
return (match && match[1]) || '';
|
|
24730
25118
|
}
|
|
24731
25119
|
|
|
@@ -24751,13 +25139,13 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
24751
25139
|
const _speedometer = (0,_speedometer_js__rspack_import_0["default"])(50, 250);
|
|
24752
25140
|
|
|
24753
25141
|
return (0,_throttle_js__rspack_import_1["default"])((e) => {
|
|
24754
|
-
const
|
|
25142
|
+
const rawLoaded = e.loaded;
|
|
24755
25143
|
const total = e.lengthComputable ? e.total : undefined;
|
|
24756
|
-
const
|
|
25144
|
+
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
25145
|
+
const progressBytes = Math.max(0, loaded - bytesNotified);
|
|
24757
25146
|
const rate = _speedometer(progressBytes);
|
|
24758
|
-
const inRange = loaded <= total;
|
|
24759
25147
|
|
|
24760
|
-
bytesNotified = loaded;
|
|
25148
|
+
bytesNotified = Math.max(bytesNotified, loaded);
|
|
24761
25149
|
|
|
24762
25150
|
const data = {
|
|
24763
25151
|
loaded,
|
|
@@ -24765,7 +25153,7 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
24765
25153
|
progress: total ? loaded / total : undefined,
|
|
24766
25154
|
bytes: progressBytes,
|
|
24767
25155
|
rate: rate ? rate : undefined,
|
|
24768
|
-
estimated: rate && total
|
|
25156
|
+
estimated: rate && total ? (total - loaded) / rate : undefined,
|
|
24769
25157
|
event: e,
|
|
24770
25158
|
lengthComputable: total != null,
|
|
24771
25159
|
[isDownloadStream ? 'download' : 'upload']: true,
|
|
@@ -24803,13 +25191,14 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
24803
25191
|
"default": () => (__rspack_default_export)
|
|
24804
25192
|
});
|
|
24805
25193
|
/* import */ var _platform_index_js__rspack_import_5 = __webpack_require__(3820);
|
|
24806
|
-
/* import */ var
|
|
25194
|
+
/* import */ var _utils_js__rspack_import_1 = __webpack_require__(7275);
|
|
24807
25195
|
/* import */ var _isURLSameOrigin_js__rspack_import_6 = __webpack_require__(6305);
|
|
24808
25196
|
/* import */ var _cookies_js__rspack_import_7 = __webpack_require__(9887);
|
|
24809
|
-
/* import */ var
|
|
25197
|
+
/* import */ var _core_buildFullPath_js__rspack_import_4 = __webpack_require__(8262);
|
|
24810
25198
|
/* import */ var _core_mergeConfig_js__rspack_import_0 = __webpack_require__(4662);
|
|
24811
|
-
/* import */ var
|
|
24812
|
-
/* import */ var
|
|
25199
|
+
/* import */ var _core_AxiosHeaders_js__rspack_import_2 = __webpack_require__(7110);
|
|
25200
|
+
/* import */ var _buildURL_js__rspack_import_3 = __webpack_require__(3967);
|
|
25201
|
+
|
|
24813
25202
|
|
|
24814
25203
|
|
|
24815
25204
|
|
|
@@ -24818,16 +25207,55 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
24818
25207
|
|
|
24819
25208
|
|
|
24820
25209
|
|
|
25210
|
+
const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];
|
|
25211
|
+
|
|
25212
|
+
function setFormDataHeaders(headers, formHeaders, policy) {
|
|
25213
|
+
if (policy !== 'content-only') {
|
|
25214
|
+
headers.set(formHeaders);
|
|
25215
|
+
return;
|
|
25216
|
+
}
|
|
25217
|
+
|
|
25218
|
+
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
25219
|
+
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
|
|
25220
|
+
headers.set(key, val);
|
|
25221
|
+
}
|
|
25222
|
+
});
|
|
25223
|
+
}
|
|
25224
|
+
|
|
25225
|
+
/**
|
|
25226
|
+
* Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
|
|
25227
|
+
* This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.
|
|
25228
|
+
*
|
|
25229
|
+
* @param {string} str The string to encode
|
|
25230
|
+
*
|
|
25231
|
+
* @returns {string} UTF-8 bytes as a Latin-1 string
|
|
25232
|
+
*/
|
|
25233
|
+
const encodeUTF8 = (str) =>
|
|
25234
|
+
encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>
|
|
25235
|
+
String.fromCharCode(parseInt(hex, 16))
|
|
25236
|
+
);
|
|
24821
25237
|
|
|
24822
25238
|
/* export default */ const __rspack_default_export = ((config) => {
|
|
24823
25239
|
const newConfig = (0,_core_mergeConfig_js__rspack_import_0["default"])({}, config);
|
|
24824
25240
|
|
|
24825
|
-
|
|
25241
|
+
// Read only own properties to prevent prototype pollution gadgets
|
|
25242
|
+
// (e.g. Object.prototype.baseURL = 'https://evil.com').
|
|
25243
|
+
const own = (key) => (_utils_js__rspack_import_1["default"].hasOwnProp(newConfig, key) ? newConfig[key] : undefined);
|
|
25244
|
+
|
|
25245
|
+
const data = own('data');
|
|
25246
|
+
let withXSRFToken = own('withXSRFToken');
|
|
25247
|
+
const xsrfHeaderName = own('xsrfHeaderName');
|
|
25248
|
+
const xsrfCookieName = own('xsrfCookieName');
|
|
25249
|
+
let headers = own('headers');
|
|
25250
|
+
const auth = own('auth');
|
|
25251
|
+
const baseURL = own('baseURL');
|
|
25252
|
+
const allowAbsoluteUrls = own('allowAbsoluteUrls');
|
|
25253
|
+
const url = own('url');
|
|
24826
25254
|
|
|
24827
|
-
newConfig.headers = headers =
|
|
25255
|
+
newConfig.headers = headers = _core_AxiosHeaders_js__rspack_import_2["default"].from(headers);
|
|
24828
25256
|
|
|
24829
|
-
newConfig.url = (0,
|
|
24830
|
-
(0,
|
|
25257
|
+
newConfig.url = (0,_buildURL_js__rspack_import_3["default"])(
|
|
25258
|
+
(0,_core_buildFullPath_js__rspack_import_4["default"])(baseURL, url, allowAbsoluteUrls),
|
|
24831
25259
|
config.params,
|
|
24832
25260
|
config.paramsSerializer
|
|
24833
25261
|
);
|
|
@@ -24837,27 +25265,16 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
24837
25265
|
headers.set(
|
|
24838
25266
|
'Authorization',
|
|
24839
25267
|
'Basic ' +
|
|
24840
|
-
btoa(
|
|
24841
|
-
(auth.username || '') +
|
|
24842
|
-
':' +
|
|
24843
|
-
(auth.password ? unescape(encodeURIComponent(auth.password)) : '')
|
|
24844
|
-
)
|
|
25268
|
+
btoa((auth.username || '') + ':' + (auth.password ? encodeUTF8(auth.password) : ''))
|
|
24845
25269
|
);
|
|
24846
25270
|
}
|
|
24847
25271
|
|
|
24848
|
-
if (
|
|
25272
|
+
if (_utils_js__rspack_import_1["default"].isFormData(data)) {
|
|
24849
25273
|
if (_platform_index_js__rspack_import_5["default"].hasStandardBrowserEnv || _platform_index_js__rspack_import_5["default"].hasStandardBrowserWebWorkerEnv) {
|
|
24850
25274
|
headers.setContentType(undefined); // browser handles it
|
|
24851
|
-
} else if (
|
|
25275
|
+
} else if (_utils_js__rspack_import_1["default"].isFunction(data.getHeaders)) {
|
|
24852
25276
|
// Node.js FormData (like form-data package)
|
|
24853
|
-
|
|
24854
|
-
// Only set safe headers to avoid overwriting security headers
|
|
24855
|
-
const allowedHeaders = ['content-type', 'content-length'];
|
|
24856
|
-
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
24857
|
-
if (allowedHeaders.includes(key.toLowerCase())) {
|
|
24858
|
-
headers.set(key, val);
|
|
24859
|
-
}
|
|
24860
|
-
});
|
|
25277
|
+
setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));
|
|
24861
25278
|
}
|
|
24862
25279
|
}
|
|
24863
25280
|
|
|
@@ -24866,10 +25283,17 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
24866
25283
|
// Specifically not if we're in a web worker, or react-native.
|
|
24867
25284
|
|
|
24868
25285
|
if (_platform_index_js__rspack_import_5["default"].hasStandardBrowserEnv) {
|
|
24869
|
-
|
|
25286
|
+
if (_utils_js__rspack_import_1["default"].isFunction(withXSRFToken)) {
|
|
25287
|
+
withXSRFToken = withXSRFToken(newConfig);
|
|
25288
|
+
}
|
|
25289
|
+
|
|
25290
|
+
// Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)
|
|
25291
|
+
// and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking
|
|
25292
|
+
// the XSRF token cross-origin.
|
|
25293
|
+
const shouldSendXSRF =
|
|
25294
|
+
withXSRFToken === true || (withXSRFToken == null && (0,_isURLSameOrigin_js__rspack_import_6["default"])(newConfig.url));
|
|
24870
25295
|
|
|
24871
|
-
if (
|
|
24872
|
-
// Add xsrf header
|
|
25296
|
+
if (shouldSendXSRF) {
|
|
24873
25297
|
const xsrfValue = xsrfHeaderName && xsrfCookieName && _cookies_js__rspack_import_7["default"].read(xsrfCookieName);
|
|
24874
25298
|
|
|
24875
25299
|
if (xsrfValue) {
|
|
@@ -25164,6 +25588,7 @@ function toFormData(obj, formData, options) {
|
|
|
25164
25588
|
const dots = options.dots;
|
|
25165
25589
|
const indexes = options.indexes;
|
|
25166
25590
|
const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
|
|
25591
|
+
const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
|
|
25167
25592
|
const useBlob = _Blob && _utils_js__rspack_import_0["default"].isSpecCompliantForm(formData);
|
|
25168
25593
|
|
|
25169
25594
|
if (!_utils_js__rspack_import_0["default"].isFunction(visitor)) {
|
|
@@ -25256,9 +25681,16 @@ function toFormData(obj, formData, options) {
|
|
|
25256
25681
|
isVisitable,
|
|
25257
25682
|
});
|
|
25258
25683
|
|
|
25259
|
-
function build(value, path) {
|
|
25684
|
+
function build(value, path, depth = 0) {
|
|
25260
25685
|
if (_utils_js__rspack_import_0["default"].isUndefined(value)) return;
|
|
25261
25686
|
|
|
25687
|
+
if (depth > maxDepth) {
|
|
25688
|
+
throw new _core_AxiosError_js__rspack_import_2["default"](
|
|
25689
|
+
'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,
|
|
25690
|
+
_core_AxiosError_js__rspack_import_2["default"].ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
25691
|
+
);
|
|
25692
|
+
}
|
|
25693
|
+
|
|
25262
25694
|
if (stack.indexOf(value) !== -1) {
|
|
25263
25695
|
throw Error('Circular reference detected in ' + path.join('.'));
|
|
25264
25696
|
}
|
|
@@ -25271,7 +25703,7 @@ function toFormData(obj, formData, options) {
|
|
|
25271
25703
|
visitor.call(formData, el, _utils_js__rspack_import_0["default"].isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
25272
25704
|
|
|
25273
25705
|
if (result === true) {
|
|
25274
|
-
build(el, path ? path.concat(key) : [key]);
|
|
25706
|
+
build(el, path ? path.concat(key) : [key], depth + 1);
|
|
25275
25707
|
}
|
|
25276
25708
|
});
|
|
25277
25709
|
|
|
@@ -25518,7 +25950,9 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
25518
25950
|
let i = keys.length;
|
|
25519
25951
|
while (i-- > 0) {
|
|
25520
25952
|
const opt = keys[i];
|
|
25521
|
-
|
|
25953
|
+
// Use hasOwnProperty so a polluted Object.prototype.<opt> cannot supply
|
|
25954
|
+
// a non-function validator and cause a TypeError.
|
|
25955
|
+
const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;
|
|
25522
25956
|
if (validator) {
|
|
25523
25957
|
const value = options[opt];
|
|
25524
25958
|
const result = value === undefined || validator(value, opt, options);
|
|
@@ -25885,21 +26319,21 @@ const isFile = kindOfTest('File');
|
|
|
25885
26319
|
* also have a `name` and `type` attribute to specify filename and content type
|
|
25886
26320
|
*
|
|
25887
26321
|
* @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
|
|
25888
|
-
*
|
|
26322
|
+
*
|
|
25889
26323
|
* @param {*} value The value to test
|
|
25890
|
-
*
|
|
26324
|
+
*
|
|
25891
26325
|
* @returns {boolean} True if value is a React Native Blob, otherwise false
|
|
25892
26326
|
*/
|
|
25893
26327
|
const isReactNativeBlob = (value) => {
|
|
25894
26328
|
return !!(value && typeof value.uri !== 'undefined');
|
|
25895
|
-
}
|
|
26329
|
+
};
|
|
25896
26330
|
|
|
25897
26331
|
/**
|
|
25898
26332
|
* Determine if environment is React Native
|
|
25899
26333
|
* ReactNative `FormData` has a non-standard `getParts()` method
|
|
25900
|
-
*
|
|
26334
|
+
*
|
|
25901
26335
|
* @param {*} formData The formData to test
|
|
25902
|
-
*
|
|
26336
|
+
*
|
|
25903
26337
|
* @returns {boolean} True if environment is React Native, otherwise false
|
|
25904
26338
|
*/
|
|
25905
26339
|
const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';
|
|
@@ -25918,7 +26352,7 @@ const isBlob = kindOfTest('Blob');
|
|
|
25918
26352
|
*
|
|
25919
26353
|
* @param {*} val The value to test
|
|
25920
26354
|
*
|
|
25921
|
-
* @returns {boolean} True if value is a
|
|
26355
|
+
* @returns {boolean} True if value is a FileList, otherwise false
|
|
25922
26356
|
*/
|
|
25923
26357
|
const isFileList = kindOfTest('FileList');
|
|
25924
26358
|
|
|
@@ -25950,15 +26384,17 @@ const G = getGlobal();
|
|
|
25950
26384
|
const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
|
|
25951
26385
|
|
|
25952
26386
|
const isFormData = (thing) => {
|
|
25953
|
-
|
|
25954
|
-
|
|
25955
|
-
|
|
25956
|
-
|
|
25957
|
-
|
|
25958
|
-
|
|
25959
|
-
|
|
25960
|
-
|
|
25961
|
-
|
|
26387
|
+
if (!thing) return false;
|
|
26388
|
+
if (FormDataCtor && thing instanceof FormDataCtor) return true;
|
|
26389
|
+
// Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData.
|
|
26390
|
+
const proto = getPrototypeOf(thing);
|
|
26391
|
+
if (!proto || proto === Object.prototype) return false;
|
|
26392
|
+
if (!isFunction(thing.append)) return false;
|
|
26393
|
+
const kind = kindOf(thing);
|
|
26394
|
+
return (
|
|
26395
|
+
kind === 'formdata' ||
|
|
26396
|
+
// detect form-data instance
|
|
26397
|
+
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
|
|
25962
26398
|
);
|
|
25963
26399
|
};
|
|
25964
26400
|
|
|
@@ -26094,7 +26530,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
|
26094
26530
|
*
|
|
26095
26531
|
* @returns {Object} Result of all merge properties
|
|
26096
26532
|
*/
|
|
26097
|
-
function merge(
|
|
26533
|
+
function merge(...objs) {
|
|
26098
26534
|
const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
|
|
26099
26535
|
const result = {};
|
|
26100
26536
|
const assignValue = (val, key) => {
|
|
@@ -26104,8 +26540,12 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
26104
26540
|
}
|
|
26105
26541
|
|
|
26106
26542
|
const targetKey = (caseless && findKey(result, key)) || key;
|
|
26107
|
-
|
|
26108
|
-
|
|
26543
|
+
// Read via own-prop only — a bare `result[targetKey]` walks the prototype
|
|
26544
|
+
// chain, so a polluted Object.prototype value could surface here and get
|
|
26545
|
+
// copied into the merged result.
|
|
26546
|
+
const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : undefined;
|
|
26547
|
+
if (isPlainObject(existing) && isPlainObject(val)) {
|
|
26548
|
+
result[targetKey] = merge(existing, val);
|
|
26109
26549
|
} else if (isPlainObject(val)) {
|
|
26110
26550
|
result[targetKey] = merge({}, val);
|
|
26111
26551
|
} else if (isArray(val)) {
|
|
@@ -26115,8 +26555,8 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
26115
26555
|
}
|
|
26116
26556
|
};
|
|
26117
26557
|
|
|
26118
|
-
for (let i = 0, l =
|
|
26119
|
-
|
|
26558
|
+
for (let i = 0, l = objs.length; i < l; i++) {
|
|
26559
|
+
objs[i] && forEach(objs[i], assignValue);
|
|
26120
26560
|
}
|
|
26121
26561
|
return result;
|
|
26122
26562
|
}
|
|
@@ -26138,6 +26578,9 @@ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
|
26138
26578
|
(val, key) => {
|
|
26139
26579
|
if (thisArg && isFunction(val)) {
|
|
26140
26580
|
Object.defineProperty(a, key, {
|
|
26581
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot
|
|
26582
|
+
// hijack defineProperty's accessor-vs-data resolution.
|
|
26583
|
+
__proto__: null,
|
|
26141
26584
|
value: (0,_helpers_bind_js__rspack_import_0["default"])(val, thisArg),
|
|
26142
26585
|
writable: true,
|
|
26143
26586
|
enumerable: true,
|
|
@@ -26145,6 +26588,7 @@ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
|
26145
26588
|
});
|
|
26146
26589
|
} else {
|
|
26147
26590
|
Object.defineProperty(a, key, {
|
|
26591
|
+
__proto__: null,
|
|
26148
26592
|
value: val,
|
|
26149
26593
|
writable: true,
|
|
26150
26594
|
enumerable: true,
|
|
@@ -26183,12 +26627,14 @@ const stripBOM = (content) => {
|
|
|
26183
26627
|
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
26184
26628
|
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
26185
26629
|
Object.defineProperty(constructor.prototype, 'constructor', {
|
|
26630
|
+
__proto__: null,
|
|
26186
26631
|
value: constructor,
|
|
26187
26632
|
writable: true,
|
|
26188
26633
|
enumerable: false,
|
|
26189
26634
|
configurable: true,
|
|
26190
26635
|
});
|
|
26191
26636
|
Object.defineProperty(constructor, 'super', {
|
|
26637
|
+
__proto__: null,
|
|
26192
26638
|
value: superConstructor.prototype,
|
|
26193
26639
|
});
|
|
26194
26640
|
props && Object.assign(constructor.prototype, props);
|
|
@@ -26370,7 +26816,7 @@ const reduceDescriptors = (obj, reducer) => {
|
|
|
26370
26816
|
const freezeMethods = (obj) => {
|
|
26371
26817
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
26372
26818
|
// skip restricted props in strict mode
|
|
26373
|
-
if (isFunction(obj) && ['arguments', 'caller', 'callee'].
|
|
26819
|
+
if (isFunction(obj) && ['arguments', 'caller', 'callee'].includes(name)) {
|
|
26374
26820
|
return false;
|
|
26375
26821
|
}
|
|
26376
26822
|
|
|
@@ -26615,7 +27061,7 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
|
26615
27061
|
},
|
|
26616
27062
|
8330(module) {
|
|
26617
27063
|
"use strict";
|
|
26618
|
-
module.exports = JSON.parse('{"name":"apify-client","version":"2.23.2-beta.
|
|
27064
|
+
module.exports = JSON.parse('{"name":"apify-client","version":"2.23.2-beta.5","description":"Apify API client for JavaScript","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/bundle.js","unpkg":"dist/bundle.js","exports":{"./package.json":"./package.json","./browser":"./dist/bundle.js",".":{"import":"./dist/index.mjs","require":"./dist/index.js","types":"./dist/index.d.ts","browser":"./dist/bundle.js"}},"keywords":["apify","api","apifier","crawler","scraper"],"author":{"name":"Apify","email":"support@apify.com","url":"https://apify.com"},"contributors":["Jan Curn <jan@apify.com>","Marek Trunkát <marek@apify.com>","Ondra Urban <ondra@apify.com>","Jakub Drobník <jakub.drobnik@apify.com>"],"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/apify/apify-client-js"},"bugs":{"url":"https://github.com/apify/apify-client-js/issues"},"homepage":"https://docs.apify.com/api/client/js/","files":["dist","!dist/*.tsbuildinfo"],"scripts":{"build":"pnpm clean && pnpm build:node && pnpm build:browser","postbuild":"gen-esm-wrapper dist/index.js dist/index.mjs","prepublishOnly":"(test $CI || (echo \\"Publishing is reserved to CI!\\"; exit 1))","clean":"rimraf dist tsconfig.tsbuildinfo","test":"pnpm build && vitest run","test:bundling":"pnpm build && pnpm --prefix=./test/bundling run bundle:all","lint":"oxlint --type-aware","lint:fix":"oxlint --type-aware --fix","tsc-check-tests":"tsc --noEmit --project test/tsconfig.json","format":"oxfmt","format:check":"oxfmt --check","build:node":"tsc","build:browser":"rsbuild build","preinstall":"npx only-allow pnpm"},"dependencies":{"@apify/consts":"^2.50.0","@apify/log":"^2.2.6","@apify/utilities":"^2.23.2","@crawlee/types":"^3.3.0","ansi-colors":"^4.1.1","async-retry":"^1.3.3","axios":"^1.16.0","content-type":"^1.0.5","ow":"^0.28.2","proxy-agent":"^6.5.0","tslib":"^2.5.0","type-fest":"^4.0.0"},"devDependencies":{"@apify/oxlint-config":"^0.2.5","@apify/tsconfig":"^0.1.2","@crawlee/puppeteer":"^3.2.2","@rsbuild/core":"^1.3.6","@rsbuild/plugin-node-polyfill":"^1.3.0","@rspack/cli":"^1.7.6","@rspack/core":"^1.7.6","@types/async-retry":"^1.4.5","@types/compression":"^1.8.1","@types/content-type":"^1.1.5","@types/express":"^5.0.0","@types/node":"^24.0.0","ajv":"^8.17.1","body-parser":"^2.0.0","compression":"^1.7.4","esbuild":"0.27.4","express":"^5.0.0","gen-esm-wrapper":"^1.1.2","oxfmt":"0.46.0","oxlint":"1.62.0","oxlint-tsgolint":"0.22.0","puppeteer":"^24.0.0","rimraf":"^6.0.0","rolldown":"^1.0.0-rc.4","typescript":"^5.8.3","vitest":"^4.0.16","webpack":"^5.105.2","webpack-cli":"^7.0.0"},"packageManager":"pnpm@10.24.0"}')
|
|
26619
27065
|
|
|
26620
27066
|
},
|
|
26621
27067
|
|