apify-client 2.25.1-beta.0 → 2.25.1-beta.10
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_client.d.ts +11 -1
- package/dist/apify_client.js +4 -0
- package/dist/base/api_client.d.ts +3 -0
- package/dist/base/api_client.js +3 -0
- package/dist/bundle.js +1046 -258
- package/dist/bundle.js.map +1 -1
- package/dist/resource_clients/actor.d.ts +105 -7
- package/dist/resource_clients/actor.js +2 -0
- package/dist/resource_clients/actor_collection.d.ts +30 -0
- package/dist/resource_clients/actor_collection.js +3 -0
- package/dist/resource_clients/actor_env_var.d.ts +1 -0
- package/dist/resource_clients/actor_env_var.js +1 -0
- package/dist/resource_clients/actor_env_var_collection.d.ts +5 -0
- package/dist/resource_clients/actor_env_var_collection.js +1 -0
- package/dist/resource_clients/actor_version.d.ts +5 -0
- package/dist/resource_clients/actor_version.js +2 -0
- package/dist/resource_clients/build.d.ts +17 -0
- package/dist/resource_clients/build.js +3 -0
- package/dist/resource_clients/dataset.d.ts +35 -0
- package/dist/resource_clients/dataset.js +2 -0
- package/dist/resource_clients/dataset_collection.d.ts +7 -1
- package/dist/resource_clients/key_value_store.d.ts +39 -0
- package/dist/resource_clients/key_value_store.js +3 -0
- package/dist/resource_clients/key_value_store_collection.d.ts +7 -1
- package/dist/resource_clients/log.d.ts +8 -0
- package/dist/resource_clients/log.js +2 -0
- package/dist/resource_clients/request_queue.d.ts +86 -0
- package/dist/resource_clients/request_queue.js +8 -0
- package/dist/resource_clients/request_queue_collection.d.ts +4 -1
- package/dist/resource_clients/run.d.ts +23 -0
- package/dist/resource_clients/run.js +5 -0
- package/dist/resource_clients/run_collection.d.ts +6 -0
- package/dist/resource_clients/schedule.d.ts +10 -0
- package/dist/resource_clients/store_collection.d.ts +18 -1
- package/dist/resource_clients/store_collection.js +1 -0
- package/dist/resource_clients/task.d.ts +18 -0
- package/dist/resource_clients/task.js +2 -0
- package/dist/resource_clients/task_collection.d.ts +3 -0
- package/dist/resource_clients/user.d.ts +33 -0
- package/dist/resource_clients/user.js +3 -0
- package/dist/resource_clients/webhook.d.ts +12 -0
- package/dist/resource_clients/webhook_dispatch.d.ts +6 -0
- package/dist/utils.d.ts +2 -0
- package/package.json +34 -32
package/dist/bundle.js
CHANGED
|
@@ -12106,7 +12106,9 @@ const DEFAULT_TIMEOUT_SECS = 360;
|
|
|
12106
12106
|
* @see https://docs.apify.com/api/v2
|
|
12107
12107
|
*/ class ApifyClient {
|
|
12108
12108
|
baseUrl;
|
|
12109
|
-
|
|
12109
|
+
/**
|
|
12110
|
+
* @since Added in 2.17.0
|
|
12111
|
+
*/ publicBaseUrl;
|
|
12110
12112
|
token;
|
|
12111
12113
|
stats;
|
|
12112
12114
|
logger;
|
|
@@ -12515,6 +12517,7 @@ const DEFAULT_TIMEOUT_SECS = 360;
|
|
|
12515
12517
|
* @param message - The status message to set
|
|
12516
12518
|
* @param options - Additional options for the status message
|
|
12517
12519
|
* @throws {Error} If `ACTOR_RUN_ID` environment variable is not set
|
|
12520
|
+
* @since Added in 2.7.0
|
|
12518
12521
|
*/ async setStatusMessage(message, options) {
|
|
12519
12522
|
const runId = process.env[_apify_consts__rspack_import_0.ACTOR_ENV_VARS.RUN_ID];
|
|
12520
12523
|
if (!runId) {
|
|
@@ -12540,7 +12543,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12540
12543
|
id;
|
|
12541
12544
|
safeId;
|
|
12542
12545
|
baseUrl;
|
|
12543
|
-
|
|
12546
|
+
/**
|
|
12547
|
+
* @since Added in 2.17.0
|
|
12548
|
+
*/ publicBaseUrl;
|
|
12544
12549
|
resourcePath;
|
|
12545
12550
|
url;
|
|
12546
12551
|
apifyClient;
|
|
@@ -13527,6 +13532,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13527
13532
|
* { build: 'beta' },
|
|
13528
13533
|
* );
|
|
13529
13534
|
* ```
|
|
13535
|
+
* @since Added in 2.24.0
|
|
13530
13536
|
*/ async validateInput(input) {
|
|
13531
13537
|
let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
13532
13538
|
// input can be anything, so no point in validating it. E.g. if you set content-type to application/pdf
|
|
@@ -13624,6 +13630,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13624
13630
|
* const buildClient = await client.actor('my-actor').defaultBuild({ waitForFinish: 60 });
|
|
13625
13631
|
* const build = await buildClient.get();
|
|
13626
13632
|
* ```
|
|
13633
|
+
* @since Added in 2.12.2
|
|
13627
13634
|
*/ async defaultBuild() {
|
|
13628
13635
|
let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
13629
13636
|
const response = await this.httpClient.call({
|
|
@@ -13804,7 +13811,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13804
13811
|
return this._create(actor);
|
|
13805
13812
|
}
|
|
13806
13813
|
}
|
|
13807
|
-
|
|
13814
|
+
/**
|
|
13815
|
+
* @since Added in 2.12.6
|
|
13816
|
+
*/ var ActorListSortBy = /*#__PURE__*/ function(ActorListSortBy) {
|
|
13808
13817
|
ActorListSortBy["CREATED_AT"] = "createdAt";
|
|
13809
13818
|
ActorListSortBy["LAST_RUN_STARTED_AT"] = "stats.lastRunStartedAt";
|
|
13810
13819
|
return ActorListSortBy;
|
|
@@ -13846,6 +13855,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13846
13855
|
* ```
|
|
13847
13856
|
*
|
|
13848
13857
|
* @see https://docs.apify.com/platform/actors/development/programming-interface/environment-variables
|
|
13858
|
+
* @since Added in 2.1.0
|
|
13849
13859
|
*/ class ActorEnvVarClient extends _base_resource_client__rspack_import_0.ResourceClient {
|
|
13850
13860
|
/**
|
|
13851
13861
|
* @hidden
|
|
@@ -13921,6 +13931,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13921
13931
|
* ```
|
|
13922
13932
|
*
|
|
13923
13933
|
* @see https://docs.apify.com/platform/actors/development/programming-interface/environment-variables
|
|
13934
|
+
* @since Added in 2.1.0
|
|
13924
13935
|
*/ class ActorEnvVarCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
|
|
13925
13936
|
/**
|
|
13926
13937
|
* @hidden
|
|
@@ -14042,6 +14053,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14042
14053
|
* @param envVarName - Name of the environment variable.
|
|
14043
14054
|
* @returns A client for the environment variable.
|
|
14044
14055
|
* @see https://docs.apify.com/api/v2/act-version-env-var-get
|
|
14056
|
+
* @since Added in 2.1.0
|
|
14045
14057
|
*/ envVar(envVarName) {
|
|
14046
14058
|
ow__rspack_import_3_default()(envVarName, (ow__rspack_import_3_default().string));
|
|
14047
14059
|
return new _actor_env_var__rspack_import_1.ActorEnvVarClient(this._subResourceOptions({
|
|
@@ -14053,6 +14065,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14053
14065
|
*
|
|
14054
14066
|
* @returns A client for the Actor version's environment variables.
|
|
14055
14067
|
* @see https://docs.apify.com/api/v2/act-version-env-vars-get
|
|
14068
|
+
* @since Added in 2.1.0
|
|
14056
14069
|
*/ envVars() {
|
|
14057
14070
|
return new _actor_env_var_collection__rspack_import_2.ActorEnvVarCollectionClient(this._subResourceOptions());
|
|
14058
14071
|
}
|
|
@@ -14243,6 +14256,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14243
14256
|
* Deletes the Actor build.
|
|
14244
14257
|
*
|
|
14245
14258
|
* @see https://docs.apify.com/api/v2/actor-build-delete
|
|
14259
|
+
* @since Added in 2.8.1
|
|
14246
14260
|
*/ async delete() {
|
|
14247
14261
|
return this._delete();
|
|
14248
14262
|
}
|
|
@@ -14251,6 +14265,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14251
14265
|
*
|
|
14252
14266
|
* @returns The OpenAPI definition object.
|
|
14253
14267
|
* @see https://docs.apify.com/api/v2/actor-build-openapi-json-get
|
|
14268
|
+
* @since Added in 2.11.2
|
|
14254
14269
|
*/ async getOpenApiDefinition() {
|
|
14255
14270
|
const response = await this.httpClient.call({
|
|
14256
14271
|
url: this._url('openapi.json'),
|
|
@@ -14307,6 +14322,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14307
14322
|
* const log = await client.build('build-id').log().get();
|
|
14308
14323
|
* console.log(log);
|
|
14309
14324
|
* ```
|
|
14325
|
+
* @since Added in 2.9.0
|
|
14310
14326
|
*/ log() {
|
|
14311
14327
|
return new _log__rspack_import_2.LogClient(this._subResourceOptions({
|
|
14312
14328
|
resourcePath: 'log'
|
|
@@ -14667,6 +14683,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14667
14683
|
*
|
|
14668
14684
|
* @returns Dataset statistics, or `undefined` if not available
|
|
14669
14685
|
* @see https://docs.apify.com/api/v2/dataset-statistics-get
|
|
14686
|
+
* @since Added in 2.11.2
|
|
14670
14687
|
*/ async getStatistics() {
|
|
14671
14688
|
const requestOpts = {
|
|
14672
14689
|
url: this._url('statistics'),
|
|
@@ -14712,6 +14729,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14712
14729
|
* skipEmpty: true
|
|
14713
14730
|
* });
|
|
14714
14731
|
* ```
|
|
14732
|
+
* @since Added in 2.13.0
|
|
14715
14733
|
*/ async createItemsPublicUrl() {
|
|
14716
14734
|
let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
14717
14735
|
ow__rspack_import_3_default()(options, ow__rspack_import_3_default().object.exactShape({
|
|
@@ -15038,6 +15056,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15038
15056
|
* console.log(`Public URL: ${url}`);
|
|
15039
15057
|
* // You can now share this URL or use it in a browser
|
|
15040
15058
|
* ```
|
|
15059
|
+
* @since Added in 2.14.0
|
|
15041
15060
|
*/ async getRecordPublicUrl(key) {
|
|
15042
15061
|
ow__rspack_import_4_default()(key, (ow__rspack_import_4_default().string.nonEmpty));
|
|
15043
15062
|
const store = await this.get();
|
|
@@ -15069,6 +15088,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15069
15088
|
* });
|
|
15070
15089
|
* console.log(`Share this URL: ${url}`);
|
|
15071
15090
|
* ```
|
|
15091
|
+
* @since Added in 2.13.0
|
|
15072
15092
|
*/ async createKeysPublicUrl() {
|
|
15073
15093
|
let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
15074
15094
|
ow__rspack_import_4_default()(options, ow__rspack_import_4_default().object.exactShape({
|
|
@@ -15108,6 +15128,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15108
15128
|
* console.log('OUTPUT record exists');
|
|
15109
15129
|
* }
|
|
15110
15130
|
* ```
|
|
15131
|
+
* @since Added in 2.9.0
|
|
15111
15132
|
*/ async recordExists(key) {
|
|
15112
15133
|
const requestOpts = {
|
|
15113
15134
|
url: this._url(`records/${key}`),
|
|
@@ -15461,6 +15482,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15461
15482
|
}
|
|
15462
15483
|
/**
|
|
15463
15484
|
* Logger for redirected actor logs.
|
|
15485
|
+
* @since Added in 2.20.0
|
|
15464
15486
|
*/ class LoggerActorRedirect extends _apify_log__rspack_import_1.Logger {
|
|
15465
15487
|
constructor(options = {}){
|
|
15466
15488
|
super({
|
|
@@ -15492,6 +15514,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15492
15514
|
}
|
|
15493
15515
|
/**
|
|
15494
15516
|
* Helper class for redirecting streamed Actor logs to another log.
|
|
15517
|
+
* @since Added in 2.20.0
|
|
15495
15518
|
*/ class StreamedLog {
|
|
15496
15519
|
destinationLog;
|
|
15497
15520
|
streamBuffer = [];
|
|
@@ -15749,6 +15772,7 @@ const SAFETY_BUFFER_PERCENT = 0.01 / 100; // 0.01%
|
|
|
15749
15772
|
* await client.requestQueue('my-queue').deleteRequestLock(request.id);
|
|
15750
15773
|
* }
|
|
15751
15774
|
* ```
|
|
15775
|
+
* @since Added in 2.4.1
|
|
15752
15776
|
*/ async listAndLockHead(options) {
|
|
15753
15777
|
ow__rspack_import_4_default()(options, ow__rspack_import_4_default().object.exactShape({
|
|
15754
15778
|
lockSecs: (ow__rspack_import_4_default().number),
|
|
@@ -15952,6 +15976,7 @@ const SAFETY_BUFFER_PERCENT = 0.01 / 100; // 0.01%
|
|
|
15952
15976
|
* { maxUnprocessedRequestsRetries: 5, maxParallel: 10 }
|
|
15953
15977
|
* );
|
|
15954
15978
|
* ```
|
|
15979
|
+
* @since Added in 2.1.0
|
|
15955
15980
|
*/ async batchAddRequests(requests) {
|
|
15956
15981
|
let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
15957
15982
|
const { forefront, maxUnprocessedRequestsRetries = DEFAULT_UNPROCESSED_RETRIES_BATCH_ADD_REQUESTS, maxParallel = DEFAULT_PARALLEL_BATCH_ADD_REQUESTS, minDelayBetweenUnprocessedRequestsRetriesMillis = DEFAULT_MIN_DELAY_BETWEEN_UNPROCESSED_REQUESTS_RETRIES_MILLIS } = options;
|
|
@@ -16003,6 +16028,7 @@ const SAFETY_BUFFER_PERCENT = 0.01 / 100; // 0.01%
|
|
|
16003
16028
|
* @param requests - Array of requests to delete (by id or uniqueKey)
|
|
16004
16029
|
* @returns Result containing processed and unprocessed requests
|
|
16005
16030
|
* @see https://docs.apify.com/api/v2/request-queue-requests-batch-delete
|
|
16031
|
+
* @since Added in 2.3.0
|
|
16006
16032
|
*/ async batchDeleteRequests(requests) {
|
|
16007
16033
|
ow__rspack_import_4_default()(requests, ow__rspack_import_4_default().array.ofType(ow__rspack_import_4_default().any(ow__rspack_import_4_default().object.partialShape({
|
|
16008
16034
|
id: (ow__rspack_import_4_default().string)
|
|
@@ -16107,6 +16133,7 @@ const SAFETY_BUFFER_PERCENT = 0.01 / 100; // 0.01%
|
|
|
16107
16133
|
* // Processing takes longer than expected, extend the lock
|
|
16108
16134
|
* await client.requestQueue('my-queue').prolongRequestLock(request.id, { lockSecs: 120 });
|
|
16109
16135
|
* ```
|
|
16136
|
+
* @since Added in 2.4.1
|
|
16110
16137
|
*/ async prolongRequestLock(id, options) {
|
|
16111
16138
|
ow__rspack_import_4_default()(id, (ow__rspack_import_4_default().string));
|
|
16112
16139
|
ow__rspack_import_4_default()(options, ow__rspack_import_4_default().object.exactShape({
|
|
@@ -16134,6 +16161,7 @@ const SAFETY_BUFFER_PERCENT = 0.01 / 100; // 0.01%
|
|
|
16134
16161
|
* @param id - Request ID
|
|
16135
16162
|
* @param options - Options such as whether to move to front
|
|
16136
16163
|
* @see https://docs.apify.com/api/v2/request-queue-request-lock-delete
|
|
16164
|
+
* @since Added in 2.4.1
|
|
16137
16165
|
*/ async deleteRequestLock(id) {
|
|
16138
16166
|
let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
16139
16167
|
ow__rspack_import_4_default()(id, (ow__rspack_import_4_default().string));
|
|
@@ -16159,6 +16187,7 @@ const SAFETY_BUFFER_PERCENT = 0.01 / 100; // 0.01%
|
|
|
16159
16187
|
* @param options - Pagination options
|
|
16160
16188
|
* @returns List of requests with pagination information
|
|
16161
16189
|
* @see https://docs.apify.com/api/v2/request-queue-requests-get
|
|
16190
|
+
* @since Added in 2.5.1
|
|
16162
16191
|
*/ listRequests() {
|
|
16163
16192
|
let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
16164
16193
|
var _this = this;
|
|
@@ -16222,6 +16251,7 @@ const SAFETY_BUFFER_PERCENT = 0.01 / 100; // 0.01%
|
|
|
16222
16251
|
*
|
|
16223
16252
|
* @returns Number of requests that were unlocked
|
|
16224
16253
|
* @see https://docs.apify.com/api/v2/request-queue-requests-unlock-post
|
|
16254
|
+
* @since Added in 2.12.5
|
|
16225
16255
|
*/ async unlockRequests() {
|
|
16226
16256
|
const response = await this.httpClient.call({
|
|
16227
16257
|
url: this._url('requests/unlock'),
|
|
@@ -16249,6 +16279,7 @@ const SAFETY_BUFFER_PERCENT = 0.01 / 100; // 0.01%
|
|
|
16249
16279
|
* items.forEach((request) => console.log(request.url));
|
|
16250
16280
|
* }
|
|
16251
16281
|
* ```
|
|
16282
|
+
* @since Added in 2.5.1
|
|
16252
16283
|
*/ paginateRequests() {
|
|
16253
16284
|
let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
16254
16285
|
ow__rspack_import_4_default()(options, ow__rspack_import_4_default().object.exactShape({
|
|
@@ -16475,6 +16506,7 @@ const RUN_CHARGE_IDEMPOTENCY_HEADER = 'idempotency-key';
|
|
|
16475
16506
|
* Deletes the Actor run.
|
|
16476
16507
|
*
|
|
16477
16508
|
* @see https://docs.apify.com/api/v2/actor-run-delete
|
|
16509
|
+
* @since Added in 2.8.1
|
|
16478
16510
|
*/ async delete() {
|
|
16479
16511
|
return this._delete();
|
|
16480
16512
|
}
|
|
@@ -16548,6 +16580,7 @@ const RUN_CHARGE_IDEMPOTENCY_HEADER = 'idempotency-key';
|
|
|
16548
16580
|
* ```javascript
|
|
16549
16581
|
* const run = await client.run('run-id').reboot();
|
|
16550
16582
|
* ```
|
|
16583
|
+
* @since Added in 2.8.0
|
|
16551
16584
|
*/ async reboot() {
|
|
16552
16585
|
const request = {
|
|
16553
16586
|
url: this._url('reboot'),
|
|
@@ -16572,6 +16605,7 @@ const RUN_CHARGE_IDEMPOTENCY_HEADER = 'idempotency-key';
|
|
|
16572
16605
|
* statusMessage: 'Processing items: 50/100'
|
|
16573
16606
|
* });
|
|
16574
16607
|
* ```
|
|
16608
|
+
* @since Added in 2.6.0
|
|
16575
16609
|
*/ async update(newFields) {
|
|
16576
16610
|
ow__rspack_import_7_default()(newFields, (ow__rspack_import_7_default().object));
|
|
16577
16611
|
return this._update(newFields);
|
|
@@ -16624,6 +16658,7 @@ const RUN_CHARGE_IDEMPOTENCY_HEADER = 'idempotency-key';
|
|
|
16624
16658
|
* @param options.idempotencyKey - Optional key to ensure the charge is not duplicated. If not provided, one is auto-generated.
|
|
16625
16659
|
* @returns Empty response object.
|
|
16626
16660
|
* @see https://docs.apify.com/api/v2/post-charge-run
|
|
16661
|
+
* @since Added in 2.11.0
|
|
16627
16662
|
*/ async charge(options) {
|
|
16628
16663
|
ow__rspack_import_7_default()(options, ow__rspack_import_7_default().object.exactShape({
|
|
16629
16664
|
eventName: (ow__rspack_import_7_default().string),
|
|
@@ -16748,6 +16783,7 @@ const RUN_CHARGE_IDEMPOTENCY_HEADER = 'idempotency-key';
|
|
|
16748
16783
|
}
|
|
16749
16784
|
/**
|
|
16750
16785
|
* Get StreamedLog for convenient streaming of the run log and their redirection.
|
|
16786
|
+
* @since Added in 2.20.0
|
|
16751
16787
|
*/ async getStreamedLog() {
|
|
16752
16788
|
let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
16753
16789
|
const { fromStart = true } = options;
|
|
@@ -17082,6 +17118,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17082
17118
|
* ```
|
|
17083
17119
|
*
|
|
17084
17120
|
* @see https://docs.apify.com/platform/actors/publishing
|
|
17121
|
+
* @since Added in 2.7.2
|
|
17085
17122
|
*/ class StoreCollectionClient extends _base_resource_collection_client__rspack_import_0.ResourceCollectionClient {
|
|
17086
17123
|
/**
|
|
17087
17124
|
* @hidden
|
|
@@ -17206,6 +17243,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17206
17243
|
*
|
|
17207
17244
|
* @returns The task object.
|
|
17208
17245
|
* @see https://docs.apify.com/api/v2/actor-task-put
|
|
17246
|
+
* @since Added in 2.25.0
|
|
17209
17247
|
*/ async publish() {
|
|
17210
17248
|
return this.update({
|
|
17211
17249
|
isPublic: true
|
|
@@ -17221,6 +17259,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17221
17259
|
*
|
|
17222
17260
|
* @returns The task object.
|
|
17223
17261
|
* @see https://docs.apify.com/api/v2/actor-task-put
|
|
17262
|
+
* @since Added in 2.25.0
|
|
17224
17263
|
*/ async unpublish() {
|
|
17225
17264
|
return this.update({
|
|
17226
17265
|
isPublic: false
|
|
@@ -17546,6 +17585,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17546
17585
|
*
|
|
17547
17586
|
* @returns The monthly usage object, or `undefined` if it does not exist.
|
|
17548
17587
|
* @see https://docs.apify.com/api/v2/users-me-usage-monthly-get
|
|
17588
|
+
* @since Added in 2.9.2
|
|
17549
17589
|
*/ async monthlyUsage() {
|
|
17550
17590
|
const requestOpts = {
|
|
17551
17591
|
url: this._url('usage/monthly'),
|
|
@@ -17566,6 +17606,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17566
17606
|
*
|
|
17567
17607
|
* @returns The account and usage limits object, or `undefined` if it does not exist.
|
|
17568
17608
|
* @see https://docs.apify.com/api/v2/users-me-limits-get
|
|
17609
|
+
* @since Added in 2.9.2
|
|
17569
17610
|
*/ async limits() {
|
|
17570
17611
|
const requestOpts = {
|
|
17571
17612
|
url: this._url('limits'),
|
|
@@ -17585,6 +17626,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17585
17626
|
*
|
|
17586
17627
|
* @param options - The new limits to set.
|
|
17587
17628
|
* @see https://docs.apify.com/api/v2/users-me-limits-put
|
|
17629
|
+
* @since Added in 2.10.0
|
|
17588
17630
|
*/ async updateLimits(options) {
|
|
17589
17631
|
const requestOpts = {
|
|
17590
17632
|
url: this._url('limits'),
|
|
@@ -18153,7 +18195,7 @@ function isStream(value) {
|
|
|
18153
18195
|
function getVersionData() {
|
|
18154
18196
|
if (true) {
|
|
18155
18197
|
return {
|
|
18156
|
-
version: "2.25.1-beta.
|
|
18198
|
+
version: "2.25.1-beta.10"
|
|
18157
18199
|
};
|
|
18158
18200
|
}
|
|
18159
18201
|
// eslint-disable-next-line
|
|
@@ -18493,7 +18535,7 @@ var DEFAULT_PLATFORM_LIMITS = {
|
|
|
18493
18535
|
// Maximum number of webhooks per user
|
|
18494
18536
|
MAX_WEBHOOKS_PER_USER: 100,
|
|
18495
18537
|
// Maximum number of concurrent actor runs per user for free accounts.
|
|
18496
|
-
FREE_ACCOUNT_MAX_CONCURRENT_ACTOR_RUNS_PER_USER:
|
|
18538
|
+
FREE_ACCOUNT_MAX_CONCURRENT_ACTOR_RUNS_PER_USER: 5,
|
|
18497
18539
|
// Maximum number of concurrent actor runs per user for paid accounts.
|
|
18498
18540
|
PAID_ACCOUNT_MAX_CONCURRENT_ACTOR_RUNS_PER_USER: 250,
|
|
18499
18541
|
// Maximum number of actors per scheduler
|
|
@@ -18574,7 +18616,7 @@ var ACTOR_ENV_VARS = {
|
|
|
18574
18616
|
INPUT_KEY: "ACTOR_INPUT_KEY",
|
|
18575
18617
|
MAX_PAID_DATASET_ITEMS: "ACTOR_MAX_PAID_DATASET_ITEMS",
|
|
18576
18618
|
MAX_TOTAL_CHARGE_USD: "ACTOR_MAX_TOTAL_CHARGE_USD",
|
|
18577
|
-
|
|
18619
|
+
MCP_CONNECTOR_BASE_URL: "ACTOR_MCP_CONNECTOR_BASE_URL",
|
|
18578
18620
|
MEMORY_MBYTES: "ACTOR_MEMORY_MBYTES",
|
|
18579
18621
|
RESTART_ON_ERROR: "ACTOR_RESTART_ON_ERROR",
|
|
18580
18622
|
PERMISSION_LEVEL: "ACTOR_PERMISSION_LEVEL",
|
|
@@ -22165,6 +22207,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
22165
22207
|
|
|
22166
22208
|
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
22167
22209
|
|
|
22210
|
+
const DEFAULT_REQUEST_OPTIONS = {
|
|
22211
|
+
cache: 'default',
|
|
22212
|
+
redirect: 'follow',
|
|
22213
|
+
referrer: 'about:client',
|
|
22214
|
+
referrerPolicy: '',
|
|
22215
|
+
mode: 'cors',
|
|
22216
|
+
integrity: '',
|
|
22217
|
+
keepalive: false,
|
|
22218
|
+
priority: 'auto',
|
|
22219
|
+
window: null,
|
|
22220
|
+
};
|
|
22221
|
+
|
|
22168
22222
|
const { isFunction } = _utils_js__rspack_import_0["default"];
|
|
22169
22223
|
|
|
22170
22224
|
/**
|
|
@@ -22215,9 +22269,7 @@ const maybeWithAuthCredentials = (url) => {
|
|
|
22215
22269
|
|
|
22216
22270
|
const factory = (env) => {
|
|
22217
22271
|
const globalObject =
|
|
22218
|
-
_utils_js__rspack_import_0["default"].global !== undefined && _utils_js__rspack_import_0["default"].global !== null
|
|
22219
|
-
? _utils_js__rspack_import_0["default"].global
|
|
22220
|
-
: globalThis;
|
|
22272
|
+
_utils_js__rspack_import_0["default"].global !== undefined && _utils_js__rspack_import_0["default"].global !== null ? _utils_js__rspack_import_0["default"].global : globalThis;
|
|
22221
22273
|
const { ReadableStream, TextEncoder } = globalObject;
|
|
22222
22274
|
|
|
22223
22275
|
env = _utils_js__rspack_import_0["default"].merge.call(
|
|
@@ -22356,6 +22408,7 @@ const factory = (env) => {
|
|
|
22356
22408
|
fetchOptions,
|
|
22357
22409
|
maxContentLength,
|
|
22358
22410
|
maxBodyLength,
|
|
22411
|
+
maxRedirects,
|
|
22359
22412
|
} = (0,_helpers_resolveConfig_js__rspack_import_3["default"])(config);
|
|
22360
22413
|
|
|
22361
22414
|
const hasMaxContentLength = _utils_js__rspack_import_0["default"].isNumber(maxContentLength) && maxContentLength > -1;
|
|
@@ -22406,7 +22459,7 @@ const factory = (env) => {
|
|
|
22406
22459
|
const password = _utils_js__rspack_import_0["default"].getSafeProp(configAuth, 'password') || '';
|
|
22407
22460
|
auth = {
|
|
22408
22461
|
username,
|
|
22409
|
-
password
|
|
22462
|
+
password,
|
|
22410
22463
|
};
|
|
22411
22464
|
}
|
|
22412
22465
|
|
|
@@ -22418,7 +22471,7 @@ const factory = (env) => {
|
|
|
22418
22471
|
const urlPassword = decodeURIComponentSafe(parsedURL.password);
|
|
22419
22472
|
auth = {
|
|
22420
22473
|
username: urlUsername,
|
|
22421
|
-
password: urlPassword
|
|
22474
|
+
password: urlPassword,
|
|
22422
22475
|
};
|
|
22423
22476
|
}
|
|
22424
22477
|
|
|
@@ -22492,7 +22545,9 @@ const factory = (env) => {
|
|
|
22492
22545
|
(onUploadProgress || mustEnforceStreamBody)
|
|
22493
22546
|
) {
|
|
22494
22547
|
requestContentLength =
|
|
22495
|
-
requestContentLength == null
|
|
22548
|
+
requestContentLength == null
|
|
22549
|
+
? await resolveBodyLength(headers, data)
|
|
22550
|
+
: requestContentLength;
|
|
22496
22551
|
|
|
22497
22552
|
// A declared length of 0 is only trusted to skip the wrap when we are
|
|
22498
22553
|
// not enforcing a stream limit (which must not rely on that header).
|
|
@@ -22505,7 +22560,10 @@ const factory = (env) => {
|
|
|
22505
22560
|
|
|
22506
22561
|
let contentTypeHeader;
|
|
22507
22562
|
|
|
22508
|
-
if (
|
|
22563
|
+
if (
|
|
22564
|
+
_utils_js__rspack_import_0["default"].isFormData(data) &&
|
|
22565
|
+
(contentTypeHeader = _request.headers.get('content-type'))
|
|
22566
|
+
) {
|
|
22509
22567
|
headers.setContentType(contentTypeHeader);
|
|
22510
22568
|
}
|
|
22511
22569
|
|
|
@@ -22568,20 +22626,57 @@ const factory = (env) => {
|
|
|
22568
22626
|
// Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)
|
|
22569
22627
|
headers.set('User-Agent', 'axios/' + _env_data_js__rspack_import_8.VERSION, false);
|
|
22570
22628
|
|
|
22571
|
-
const
|
|
22572
|
-
|
|
22629
|
+
const safeFetchOptions =
|
|
22630
|
+
fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions);
|
|
22631
|
+
|
|
22632
|
+
if (safeFetchOptions) {
|
|
22633
|
+
// These options are owned by Axios and are already reflected in the
|
|
22634
|
+
// resolved Request passed to fetch.
|
|
22635
|
+
delete safeFetchOptions.body;
|
|
22636
|
+
delete safeFetchOptions.headers;
|
|
22637
|
+
delete safeFetchOptions.method;
|
|
22638
|
+
delete safeFetchOptions.signal;
|
|
22639
|
+
delete safeFetchOptions.duplex;
|
|
22640
|
+
delete safeFetchOptions.credentials;
|
|
22641
|
+
}
|
|
22642
|
+
|
|
22643
|
+
const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, {
|
|
22573
22644
|
signal: composedSignal,
|
|
22574
22645
|
method: method.toUpperCase(),
|
|
22575
22646
|
headers: (0,_helpers_sanitizeHeaderValue_js__rspack_import_9.toByteStringHeaderObject)(headers.normalize()),
|
|
22576
22647
|
body: data,
|
|
22577
22648
|
duplex: 'half',
|
|
22578
22649
|
credentials: isCredentialsSupported ? withCredentials : undefined,
|
|
22579
|
-
};
|
|
22650
|
+
});
|
|
22651
|
+
|
|
22652
|
+
if (isRequestSupported) {
|
|
22653
|
+
_utils_js__rspack_import_0["default"].forEach(DEFAULT_REQUEST_OPTIONS, (value, key) => {
|
|
22654
|
+
if (resolvedOptions[key] === undefined) {
|
|
22655
|
+
resolvedOptions[key] = value;
|
|
22656
|
+
}
|
|
22657
|
+
});
|
|
22658
|
+
|
|
22659
|
+
if (resolvedOptions.signal === undefined) {
|
|
22660
|
+
resolvedOptions.signal = null;
|
|
22661
|
+
}
|
|
22662
|
+
|
|
22663
|
+
if (resolvedOptions.body === undefined) {
|
|
22664
|
+
resolvedOptions.body = null;
|
|
22665
|
+
}
|
|
22666
|
+
}
|
|
22667
|
+
|
|
22668
|
+
if (maxRedirects === 0) {
|
|
22669
|
+
resolvedOptions.redirect = 'manual';
|
|
22670
|
+
|
|
22671
|
+
if (safeFetchOptions) {
|
|
22672
|
+
safeFetchOptions.redirect = 'manual';
|
|
22673
|
+
}
|
|
22674
|
+
}
|
|
22580
22675
|
|
|
22581
22676
|
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
22582
22677
|
|
|
22583
22678
|
let response = await (isRequestSupported
|
|
22584
|
-
? _fetch(request,
|
|
22679
|
+
? _fetch(request, safeFetchOptions)
|
|
22585
22680
|
: _fetch(url, resolvedOptions));
|
|
22586
22681
|
|
|
22587
22682
|
const responseHeaders = _core_AxiosHeaders_js__rspack_import_10["default"].from(response.headers);
|
|
@@ -22800,17 +22895,19 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
22800
22895
|
7013(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
22801
22896
|
"use strict";
|
|
22802
22897
|
__webpack_require__.r(__webpack_exports__);
|
|
22803
|
-
/* import */ var
|
|
22804
|
-
/* import */ var
|
|
22805
|
-
/* import */ var
|
|
22806
|
-
/* import */ var
|
|
22807
|
-
/* import */ var
|
|
22808
|
-
/* import */ var
|
|
22809
|
-
/* import */ var
|
|
22898
|
+
/* import */ var _utils_js__rspack_import_8 = __webpack_require__(7275);
|
|
22899
|
+
/* import */ var _core_settle_js__rspack_import_6 = __webpack_require__(3853);
|
|
22900
|
+
/* import */ var _defaults_transitional_js__rspack_import_7 = __webpack_require__(807);
|
|
22901
|
+
/* import */ var _core_AxiosError_js__rspack_import_5 = __webpack_require__(4062);
|
|
22902
|
+
/* import */ var _cancel_CanceledError_js__rspack_import_11 = __webpack_require__(8458);
|
|
22903
|
+
/* import */ var _helpers_normalizeURLForProtocolCheck_js__rspack_import_3 = __webpack_require__(7527);
|
|
22904
|
+
/* import */ var _helpers_parseProtocol_js__rspack_import_2 = __webpack_require__(5579);
|
|
22905
|
+
/* import */ var _platform_index_js__rspack_import_4 = __webpack_require__(3820);
|
|
22810
22906
|
/* import */ var _core_AxiosHeaders_js__rspack_import_1 = __webpack_require__(7110);
|
|
22811
|
-
/* import */ var
|
|
22907
|
+
/* import */ var _helpers_progressEventReducer_js__rspack_import_10 = __webpack_require__(7837);
|
|
22812
22908
|
/* import */ var _helpers_resolveConfig_js__rspack_import_0 = __webpack_require__(8382);
|
|
22813
|
-
/* import */ var
|
|
22909
|
+
/* import */ var _helpers_sanitizeHeaderValue_js__rspack_import_9 = __webpack_require__(8267);
|
|
22910
|
+
|
|
22814
22911
|
|
|
22815
22912
|
|
|
22816
22913
|
|
|
@@ -22834,7 +22931,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
22834
22931
|
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
22835
22932
|
let onCanceled;
|
|
22836
22933
|
let uploadThrottled, downloadThrottled;
|
|
22837
|
-
let flushUpload, flushDownload;
|
|
22934
|
+
let flushUpload, flushDownload, flushDownloadWithEvent;
|
|
22838
22935
|
|
|
22839
22936
|
function done() {
|
|
22840
22937
|
flushUpload && flushUpload(); // flush events
|
|
@@ -22852,10 +22949,55 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
22852
22949
|
// Set the request timeout in MS
|
|
22853
22950
|
request.timeout = _config.timeout;
|
|
22854
22951
|
|
|
22855
|
-
function onloadend() {
|
|
22952
|
+
function onloadend(event) {
|
|
22856
22953
|
if (!request) {
|
|
22857
22954
|
return;
|
|
22858
22955
|
}
|
|
22956
|
+
|
|
22957
|
+
// Status 0 means no response was received, which onerror and onabort normally
|
|
22958
|
+
// reject before this runs. Firefox 152 fires only readystatechange and loadend for
|
|
22959
|
+
// navigation-canceled requests (https://bugzilla.mozilla.org/show_bug.cgi?id=1505389),
|
|
22960
|
+
// leaving settle() to resolve them as an empty success. ECONNABORTED is the error
|
|
22961
|
+
// onabort raised on Firefox 151. Reads over file:, which some environments report as
|
|
22962
|
+
// status 0 on success, are excluded by the request URL's scheme after browser-style
|
|
22963
|
+
// preprocessing, by the page origin's scheme for relative URLs (which inherit it), or
|
|
22964
|
+
// by responseURL where implemented.
|
|
22965
|
+
if (
|
|
22966
|
+
request.status === 0 &&
|
|
22967
|
+
((0,_helpers_parseProtocol_js__rspack_import_2["default"])((0,_helpers_normalizeURLForProtocolCheck_js__rspack_import_3["default"])(_config.url)) ||
|
|
22968
|
+
(0,_helpers_parseProtocol_js__rspack_import_2["default"])(_platform_index_js__rspack_import_4["default"].origin)) !== 'file' &&
|
|
22969
|
+
!(request.responseURL && request.responseURL.startsWith('file:'))
|
|
22970
|
+
) {
|
|
22971
|
+
reject(new _core_AxiosError_js__rspack_import_5["default"]('Request aborted', _core_AxiosError_js__rspack_import_5["default"].ECONNABORTED, config, request));
|
|
22972
|
+
done();
|
|
22973
|
+
|
|
22974
|
+
// Clean up request
|
|
22975
|
+
request = null;
|
|
22976
|
+
return;
|
|
22977
|
+
}
|
|
22978
|
+
|
|
22979
|
+
// When loadend is still dispatching, flushing with it gives progress
|
|
22980
|
+
// listeners a final delivery whose event has a live target. The legacy
|
|
22981
|
+
// ready-state fallback has no event, so replay its pending progress.
|
|
22982
|
+
// A throwing listener must not block settlement; rethrow asynchronously,
|
|
22983
|
+
// matching how listener errors surface on the throttle timer path.
|
|
22984
|
+
try {
|
|
22985
|
+
if (event) {
|
|
22986
|
+
flushDownloadWithEvent && flushDownloadWithEvent(event);
|
|
22987
|
+
} else {
|
|
22988
|
+
flushDownload && flushDownload();
|
|
22989
|
+
}
|
|
22990
|
+
} catch (err) {
|
|
22991
|
+
setTimeout(() => {
|
|
22992
|
+
throw err;
|
|
22993
|
+
});
|
|
22994
|
+
}
|
|
22995
|
+
|
|
22996
|
+
// A final progress callback can cancel the request synchronously.
|
|
22997
|
+
if (!request) {
|
|
22998
|
+
return;
|
|
22999
|
+
}
|
|
23000
|
+
|
|
22859
23001
|
// Prepare the response
|
|
22860
23002
|
const responseHeaders = _core_AxiosHeaders_js__rspack_import_1["default"].from(
|
|
22861
23003
|
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
@@ -22873,7 +23015,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
22873
23015
|
request,
|
|
22874
23016
|
};
|
|
22875
23017
|
|
|
22876
|
-
(0,
|
|
23018
|
+
(0,_core_settle_js__rspack_import_6["default"])(
|
|
22877
23019
|
function _resolve(value) {
|
|
22878
23020
|
resolve(value);
|
|
22879
23021
|
done();
|
|
@@ -22921,7 +23063,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
22921
23063
|
return;
|
|
22922
23064
|
}
|
|
22923
23065
|
|
|
22924
|
-
reject(new
|
|
23066
|
+
reject(new _core_AxiosError_js__rspack_import_5["default"]('Request aborted', _core_AxiosError_js__rspack_import_5["default"].ECONNABORTED, config, request));
|
|
22925
23067
|
done();
|
|
22926
23068
|
|
|
22927
23069
|
// Clean up request
|
|
@@ -22934,7 +23076,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
22934
23076
|
// (message may be empty; when present, surface it)
|
|
22935
23077
|
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
22936
23078
|
const msg = event && event.message ? event.message : 'Network Error';
|
|
22937
|
-
const err = new
|
|
23079
|
+
const err = new _core_AxiosError_js__rspack_import_5["default"](msg, _core_AxiosError_js__rspack_import_5["default"].ERR_NETWORK, config, request);
|
|
22938
23080
|
// attach the underlying event for consumers who want details
|
|
22939
23081
|
err.event = event || null;
|
|
22940
23082
|
reject(err);
|
|
@@ -22947,14 +23089,14 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
22947
23089
|
let timeoutErrorMessage = _config.timeout
|
|
22948
23090
|
? 'timeout of ' + _config.timeout + 'ms exceeded'
|
|
22949
23091
|
: 'timeout exceeded';
|
|
22950
|
-
const transitional = _config.transitional ||
|
|
23092
|
+
const transitional = _config.transitional || _defaults_transitional_js__rspack_import_7["default"];
|
|
22951
23093
|
if (_config.timeoutErrorMessage) {
|
|
22952
23094
|
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
22953
23095
|
}
|
|
22954
23096
|
reject(
|
|
22955
|
-
new
|
|
23097
|
+
new _core_AxiosError_js__rspack_import_5["default"](
|
|
22956
23098
|
timeoutErrorMessage,
|
|
22957
|
-
transitional.clarifyTimeoutError ?
|
|
23099
|
+
transitional.clarifyTimeoutError ? _core_AxiosError_js__rspack_import_5["default"].ETIMEDOUT : _core_AxiosError_js__rspack_import_5["default"].ECONNABORTED,
|
|
22958
23100
|
config,
|
|
22959
23101
|
request
|
|
22960
23102
|
)
|
|
@@ -22970,13 +23112,13 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
22970
23112
|
|
|
22971
23113
|
// Add headers to the request
|
|
22972
23114
|
if ('setRequestHeader' in request) {
|
|
22973
|
-
|
|
23115
|
+
_utils_js__rspack_import_8["default"].forEach((0,_helpers_sanitizeHeaderValue_js__rspack_import_9.toByteStringHeaderObject)(requestHeaders), function setRequestHeader(val, key) {
|
|
22974
23116
|
request.setRequestHeader(key, val);
|
|
22975
23117
|
});
|
|
22976
23118
|
}
|
|
22977
23119
|
|
|
22978
23120
|
// Add withCredentials to request if needed
|
|
22979
|
-
if (!
|
|
23121
|
+
if (!_utils_js__rspack_import_8["default"].isUndefined(_config.withCredentials)) {
|
|
22980
23122
|
request.withCredentials = !!_config.withCredentials;
|
|
22981
23123
|
}
|
|
22982
23124
|
|
|
@@ -22987,13 +23129,16 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
22987
23129
|
|
|
22988
23130
|
// Handle progress if needed
|
|
22989
23131
|
if (onDownloadProgress) {
|
|
22990
|
-
[downloadThrottled, flushDownload] = (0,
|
|
23132
|
+
[downloadThrottled, flushDownload, flushDownloadWithEvent] = (0,_helpers_progressEventReducer_js__rspack_import_10.progressEventReducer)(
|
|
23133
|
+
onDownloadProgress,
|
|
23134
|
+
true
|
|
23135
|
+
);
|
|
22991
23136
|
request.addEventListener('progress', downloadThrottled);
|
|
22992
23137
|
}
|
|
22993
23138
|
|
|
22994
23139
|
// Not all browsers support upload events
|
|
22995
23140
|
if (onUploadProgress && request.upload) {
|
|
22996
|
-
[uploadThrottled, flushUpload] = (0,
|
|
23141
|
+
[uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__rspack_import_10.progressEventReducer)(onUploadProgress);
|
|
22997
23142
|
|
|
22998
23143
|
request.upload.addEventListener('progress', uploadThrottled);
|
|
22999
23144
|
|
|
@@ -23007,7 +23152,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
23007
23152
|
if (!request) {
|
|
23008
23153
|
return;
|
|
23009
23154
|
}
|
|
23010
|
-
reject(!cancel || cancel.type ? new
|
|
23155
|
+
reject(!cancel || cancel.type ? new _cancel_CanceledError_js__rspack_import_11["default"](null, config, request) : cancel);
|
|
23011
23156
|
request.abort();
|
|
23012
23157
|
done();
|
|
23013
23158
|
request = null;
|
|
@@ -23021,13 +23166,13 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
|
23021
23166
|
}
|
|
23022
23167
|
}
|
|
23023
23168
|
|
|
23024
|
-
const protocol = (0,
|
|
23169
|
+
const protocol = (0,_helpers_parseProtocol_js__rspack_import_2["default"])(_config.url);
|
|
23025
23170
|
|
|
23026
|
-
if (protocol && !
|
|
23171
|
+
if (protocol && !_platform_index_js__rspack_import_4["default"].protocols.includes(protocol)) {
|
|
23027
23172
|
reject(
|
|
23028
|
-
new
|
|
23173
|
+
new _core_AxiosError_js__rspack_import_5["default"](
|
|
23029
23174
|
'Unsupported protocol ' + protocol + ':',
|
|
23030
|
-
|
|
23175
|
+
_core_AxiosError_js__rspack_import_5["default"].ERR_BAD_REQUEST,
|
|
23031
23176
|
config
|
|
23032
23177
|
)
|
|
23033
23178
|
);
|
|
@@ -23344,14 +23489,16 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
23344
23489
|
"use strict";
|
|
23345
23490
|
__webpack_require__.r(__webpack_exports__);
|
|
23346
23491
|
/* import */ var _utils_js__rspack_import_3 = __webpack_require__(7275);
|
|
23347
|
-
/* import */ var
|
|
23492
|
+
/* import */ var _helpers_buildURL_js__rspack_import_9 = __webpack_require__(3967);
|
|
23348
23493
|
/* import */ var _InterceptorManager_js__rspack_import_1 = __webpack_require__(7352);
|
|
23349
|
-
/* import */ var
|
|
23494
|
+
/* import */ var _dispatchRequest_js__rspack_import_7 = __webpack_require__(8683);
|
|
23350
23495
|
/* import */ var _mergeConfig_js__rspack_import_2 = __webpack_require__(4662);
|
|
23351
|
-
/* import */ var
|
|
23496
|
+
/* import */ var _buildFullPath_js__rspack_import_8 = __webpack_require__(8262);
|
|
23497
|
+
/* import */ var _methodList_js__rspack_import_4 = __webpack_require__(2647);
|
|
23352
23498
|
/* import */ var _helpers_validator_js__rspack_import_0 = __webpack_require__(3390);
|
|
23353
|
-
/* import */ var
|
|
23354
|
-
/* import */ var
|
|
23499
|
+
/* import */ var _AxiosHeaders_js__rspack_import_5 = __webpack_require__(7110);
|
|
23500
|
+
/* import */ var _defaults_transitional_js__rspack_import_6 = __webpack_require__(807);
|
|
23501
|
+
|
|
23355
23502
|
|
|
23356
23503
|
|
|
23357
23504
|
|
|
@@ -23395,21 +23542,21 @@ class Axios {
|
|
|
23395
23542
|
return await this._request(configOrUrl, config);
|
|
23396
23543
|
} catch (err) {
|
|
23397
23544
|
if (err instanceof Error) {
|
|
23398
|
-
|
|
23545
|
+
try {
|
|
23546
|
+
let dummy = {};
|
|
23399
23547
|
|
|
23400
|
-
|
|
23548
|
+
Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
|
|
23401
23549
|
|
|
23402
|
-
|
|
23403
|
-
|
|
23404
|
-
if (!dummy.stack) {
|
|
23405
|
-
return '';
|
|
23406
|
-
}
|
|
23550
|
+
const dummyStack = dummy.stack;
|
|
23551
|
+
let stack = '';
|
|
23407
23552
|
|
|
23408
|
-
|
|
23553
|
+
// slice off the Error: ... line
|
|
23554
|
+
if (typeof dummyStack === 'string') {
|
|
23555
|
+
const firstNewlineIndex = dummyStack.indexOf('\n');
|
|
23556
|
+
|
|
23557
|
+
stack = firstNewlineIndex === -1 ? '' : dummyStack.slice(firstNewlineIndex + 1);
|
|
23558
|
+
}
|
|
23409
23559
|
|
|
23410
|
-
return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
|
|
23411
|
-
})();
|
|
23412
|
-
try {
|
|
23413
23560
|
if (!err.stack) {
|
|
23414
23561
|
err.stack = stack;
|
|
23415
23562
|
// match without the 2 top stack lines
|
|
@@ -23425,7 +23572,7 @@ class Axios {
|
|
|
23425
23572
|
}
|
|
23426
23573
|
}
|
|
23427
23574
|
} catch (e) {
|
|
23428
|
-
//
|
|
23575
|
+
// Ignore failures from custom stack hooks or un-writable stack properties.
|
|
23429
23576
|
}
|
|
23430
23577
|
}
|
|
23431
23578
|
|
|
@@ -23498,17 +23645,21 @@ class Axios {
|
|
|
23498
23645
|
);
|
|
23499
23646
|
|
|
23500
23647
|
// Set config.method
|
|
23501
|
-
config.method = (
|
|
23648
|
+
config.method = (
|
|
23649
|
+
_utils_js__rspack_import_3["default"].getSafeProp(config, 'method') ||
|
|
23650
|
+
_utils_js__rspack_import_3["default"].getSafeProp(this.defaults, 'method') ||
|
|
23651
|
+
'get'
|
|
23652
|
+
).toLowerCase();
|
|
23502
23653
|
|
|
23503
23654
|
// Flatten headers
|
|
23504
23655
|
let contextHeaders = headers && _utils_js__rspack_import_3["default"].merge(headers.common, headers[config.method]);
|
|
23505
23656
|
|
|
23506
23657
|
headers &&
|
|
23507
|
-
_utils_js__rspack_import_3["default"].forEach(['
|
|
23658
|
+
_utils_js__rspack_import_3["default"].forEach(_methodList_js__rspack_import_4["default"].concat('common'), (method) => {
|
|
23508
23659
|
delete headers[method];
|
|
23509
23660
|
});
|
|
23510
23661
|
|
|
23511
|
-
config.headers =
|
|
23662
|
+
config.headers = _AxiosHeaders_js__rspack_import_5["default"].concat(contextHeaders, headers);
|
|
23512
23663
|
|
|
23513
23664
|
// filter out skipped interceptors
|
|
23514
23665
|
const requestInterceptorChain = [];
|
|
@@ -23520,7 +23671,7 @@ class Axios {
|
|
|
23520
23671
|
|
|
23521
23672
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
23522
23673
|
|
|
23523
|
-
const transitional = config.transitional ||
|
|
23674
|
+
const transitional = config.transitional || _defaults_transitional_js__rspack_import_6["default"];
|
|
23524
23675
|
const legacyInterceptorReqResOrdering =
|
|
23525
23676
|
transitional && transitional.legacyInterceptorReqResOrdering;
|
|
23526
23677
|
|
|
@@ -23541,7 +23692,7 @@ class Axios {
|
|
|
23541
23692
|
let len;
|
|
23542
23693
|
|
|
23543
23694
|
if (!synchronousRequestInterceptors) {
|
|
23544
|
-
const chain = [
|
|
23695
|
+
const chain = [_dispatchRequest_js__rspack_import_7["default"].bind(this), undefined];
|
|
23545
23696
|
chain.unshift(...requestInterceptorChain);
|
|
23546
23697
|
chain.push(...responseInterceptorChain);
|
|
23547
23698
|
len = chain.length;
|
|
@@ -23563,17 +23714,35 @@ class Axios {
|
|
|
23563
23714
|
const onFulfilled = requestInterceptorChain[i++];
|
|
23564
23715
|
const onRejected = requestInterceptorChain[i++];
|
|
23565
23716
|
try {
|
|
23566
|
-
newConfig = onFulfilled(newConfig);
|
|
23717
|
+
newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;
|
|
23567
23718
|
} catch (error) {
|
|
23568
|
-
onRejected
|
|
23719
|
+
if (!onRejected) {
|
|
23720
|
+
promise = Promise.reject(error);
|
|
23721
|
+
break;
|
|
23722
|
+
}
|
|
23723
|
+
|
|
23724
|
+
try {
|
|
23725
|
+
const rejectedResult = onRejected.call(this, error);
|
|
23726
|
+
|
|
23727
|
+
if (_utils_js__rspack_import_3["default"].isThenable(rejectedResult)) {
|
|
23728
|
+
promise = Promise.resolve(rejectedResult).then(() =>
|
|
23729
|
+
_dispatchRequest_js__rspack_import_7["default"].call(this, newConfig)
|
|
23730
|
+
);
|
|
23731
|
+
}
|
|
23732
|
+
} catch (rejectedError) {
|
|
23733
|
+
promise = Promise.reject(rejectedError);
|
|
23734
|
+
}
|
|
23735
|
+
|
|
23569
23736
|
break;
|
|
23570
23737
|
}
|
|
23571
23738
|
}
|
|
23572
23739
|
|
|
23573
|
-
|
|
23574
|
-
|
|
23575
|
-
|
|
23576
|
-
|
|
23740
|
+
if (!promise) {
|
|
23741
|
+
try {
|
|
23742
|
+
promise = _dispatchRequest_js__rspack_import_7["default"].call(this, newConfig);
|
|
23743
|
+
} catch (error) {
|
|
23744
|
+
promise = Promise.reject(error);
|
|
23745
|
+
}
|
|
23577
23746
|
}
|
|
23578
23747
|
|
|
23579
23748
|
i = 0;
|
|
@@ -23588,8 +23757,8 @@ class Axios {
|
|
|
23588
23757
|
|
|
23589
23758
|
getUri(config) {
|
|
23590
23759
|
config = (0,_mergeConfig_js__rspack_import_2["default"])(this.defaults, config);
|
|
23591
|
-
const fullPath = (0,
|
|
23592
|
-
return (0,
|
|
23760
|
+
const fullPath = (0,_buildFullPath_js__rspack_import_8["default"])(config.baseURL, config.url, config.allowAbsoluteUrls, config);
|
|
23761
|
+
return (0,_helpers_buildURL_js__rspack_import_9["default"])(fullPath, config.params, config.paramsSerializer);
|
|
23593
23762
|
}
|
|
23594
23763
|
}
|
|
23595
23764
|
|
|
@@ -23717,9 +23886,40 @@ function redactConfig(config, redactKeys) {
|
|
|
23717
23886
|
return visit(config);
|
|
23718
23887
|
}
|
|
23719
23888
|
|
|
23889
|
+
function stringifySafely(value) {
|
|
23890
|
+
try {
|
|
23891
|
+
return String(value);
|
|
23892
|
+
} catch (err) {
|
|
23893
|
+
return '';
|
|
23894
|
+
}
|
|
23895
|
+
}
|
|
23896
|
+
|
|
23897
|
+
function aggregateErrorMessage(error) {
|
|
23898
|
+
const message = error.errors
|
|
23899
|
+
.map((entry) => {
|
|
23900
|
+
try {
|
|
23901
|
+
return entry && entry.message ? stringifySafely(entry.message) : stringifySafely(entry);
|
|
23902
|
+
} catch (err) {
|
|
23903
|
+
return '';
|
|
23904
|
+
}
|
|
23905
|
+
})
|
|
23906
|
+
.filter(Boolean)
|
|
23907
|
+
.join('; ');
|
|
23908
|
+
|
|
23909
|
+
return message || error.name || 'AggregateError';
|
|
23910
|
+
}
|
|
23911
|
+
|
|
23720
23912
|
class AxiosError extends Error {
|
|
23721
23913
|
static from(error, code, config, request, response, customProps) {
|
|
23722
|
-
|
|
23914
|
+
// `AggregateError` (thrown by Node on dual-stack/Happy-Eyeballs connection
|
|
23915
|
+
// failures) has an empty `message`; its detail lives in `errors[]`. Without
|
|
23916
|
+
// this, the wrapped error surfaces with a blank message (see #6721).
|
|
23917
|
+
let message = error.message;
|
|
23918
|
+
if (!message && _utils_js__rspack_import_0["default"].isArray(error.errors) && error.errors.length) {
|
|
23919
|
+
message = aggregateErrorMessage(error);
|
|
23920
|
+
}
|
|
23921
|
+
|
|
23922
|
+
const axiosError = new AxiosError(message, code || error.code, config, request, response);
|
|
23723
23923
|
// Match native `Error` `cause` semantics: non-enumerable. The wrapped
|
|
23724
23924
|
// error often carries circular internals (sockets, requests, agents), so
|
|
23725
23925
|
// an enumerable `cause` makes structured loggers (pino/winston) and any
|
|
@@ -23832,6 +24032,11 @@ AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
|
|
|
23832
24032
|
|
|
23833
24033
|
/* export default */ __webpack_exports__["default"] = (AxiosError);
|
|
23834
24034
|
|
|
24035
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
24036
|
+
}, {
|
|
24037
|
+
REDACTED: REDACTED
|
|
24038
|
+
});
|
|
24039
|
+
|
|
23835
24040
|
|
|
23836
24041
|
},
|
|
23837
24042
|
7110(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
@@ -23872,6 +24077,124 @@ function parseTokens(str) {
|
|
|
23872
24077
|
return tokens;
|
|
23873
24078
|
}
|
|
23874
24079
|
|
|
24080
|
+
const parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
24081
|
+
|
|
24082
|
+
function trimOWS(value) {
|
|
24083
|
+
let start = 0;
|
|
24084
|
+
let end = value.length;
|
|
24085
|
+
|
|
24086
|
+
while (start < end) {
|
|
24087
|
+
const code = value.charCodeAt(start);
|
|
24088
|
+
|
|
24089
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
24090
|
+
break;
|
|
24091
|
+
}
|
|
24092
|
+
|
|
24093
|
+
start += 1;
|
|
24094
|
+
}
|
|
24095
|
+
|
|
24096
|
+
while (end > start) {
|
|
24097
|
+
const code = value.charCodeAt(end - 1);
|
|
24098
|
+
|
|
24099
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
24100
|
+
break;
|
|
24101
|
+
}
|
|
24102
|
+
|
|
24103
|
+
end -= 1;
|
|
24104
|
+
}
|
|
24105
|
+
|
|
24106
|
+
return start === 0 && end === value.length ? value : value.slice(start, end);
|
|
24107
|
+
}
|
|
24108
|
+
|
|
24109
|
+
function decodeQuotedString(value) {
|
|
24110
|
+
const last = value.length - 1;
|
|
24111
|
+
|
|
24112
|
+
if (last < 1 || value.charCodeAt(0) !== 0x22 || value.charCodeAt(last) !== 0x22) {
|
|
24113
|
+
return value;
|
|
24114
|
+
}
|
|
24115
|
+
|
|
24116
|
+
let decoded = '';
|
|
24117
|
+
|
|
24118
|
+
for (let i = 1; i < last; i++) {
|
|
24119
|
+
const code = value.charCodeAt(i);
|
|
24120
|
+
|
|
24121
|
+
if (code === 0x22) {
|
|
24122
|
+
return value;
|
|
24123
|
+
}
|
|
24124
|
+
|
|
24125
|
+
if (code === 0x5c) {
|
|
24126
|
+
i += 1;
|
|
24127
|
+
|
|
24128
|
+
if (i >= last) {
|
|
24129
|
+
return value;
|
|
24130
|
+
}
|
|
24131
|
+
}
|
|
24132
|
+
|
|
24133
|
+
decoded += value[i];
|
|
24134
|
+
}
|
|
24135
|
+
|
|
24136
|
+
return decoded;
|
|
24137
|
+
}
|
|
24138
|
+
|
|
24139
|
+
function parseParameters(value) {
|
|
24140
|
+
const parameters = Object.create(null);
|
|
24141
|
+
const str = String(value);
|
|
24142
|
+
let start = 0;
|
|
24143
|
+
let quoted = false;
|
|
24144
|
+
let escaped = false;
|
|
24145
|
+
|
|
24146
|
+
function parseParameter(end) {
|
|
24147
|
+
const part = trimOWS(str.slice(start, end));
|
|
24148
|
+
const equals = part.indexOf('=');
|
|
24149
|
+
|
|
24150
|
+
if (equals < 1) {
|
|
24151
|
+
return;
|
|
24152
|
+
}
|
|
24153
|
+
|
|
24154
|
+
const name = trimOWS(part.slice(0, equals));
|
|
24155
|
+
|
|
24156
|
+
if (!parameterNameRE.test(name)) {
|
|
24157
|
+
return;
|
|
24158
|
+
}
|
|
24159
|
+
|
|
24160
|
+
const normalizedName = name.toLowerCase();
|
|
24161
|
+
|
|
24162
|
+
if (
|
|
24163
|
+
normalizedName === '__proto__' ||
|
|
24164
|
+
normalizedName === 'constructor' ||
|
|
24165
|
+
normalizedName === 'prototype'
|
|
24166
|
+
) {
|
|
24167
|
+
return;
|
|
24168
|
+
}
|
|
24169
|
+
|
|
24170
|
+
const parameterValue = trimOWS(part.slice(equals + 1));
|
|
24171
|
+
parameters[normalizedName] = decodeQuotedString(parameterValue);
|
|
24172
|
+
}
|
|
24173
|
+
|
|
24174
|
+
for (let i = 0; i < str.length; i++) {
|
|
24175
|
+
const code = str.charCodeAt(i);
|
|
24176
|
+
|
|
24177
|
+
if (quoted) {
|
|
24178
|
+
if (escaped) {
|
|
24179
|
+
escaped = false;
|
|
24180
|
+
} else if (code === 0x5c) {
|
|
24181
|
+
escaped = true;
|
|
24182
|
+
} else if (code === 0x22) {
|
|
24183
|
+
quoted = false;
|
|
24184
|
+
}
|
|
24185
|
+
} else if (code === 0x22) {
|
|
24186
|
+
quoted = true;
|
|
24187
|
+
} else if (code === 0x2c || code === 0x3b) {
|
|
24188
|
+
parseParameter(i);
|
|
24189
|
+
start = i + 1;
|
|
24190
|
+
}
|
|
24191
|
+
}
|
|
24192
|
+
|
|
24193
|
+
parseParameter(str.length);
|
|
24194
|
+
|
|
24195
|
+
return parameters;
|
|
24196
|
+
}
|
|
24197
|
+
|
|
23875
24198
|
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
23876
24199
|
|
|
23877
24200
|
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
@@ -24123,7 +24446,8 @@ class AxiosHeaders {
|
|
|
24123
24446
|
}
|
|
24124
24447
|
|
|
24125
24448
|
getSetCookie() {
|
|
24126
|
-
|
|
24449
|
+
const value = this.get('set-cookie');
|
|
24450
|
+
return _utils_js__rspack_import_0["default"].isArray(value) ? value : value == null || value === false ? [] : [value];
|
|
24127
24451
|
}
|
|
24128
24452
|
|
|
24129
24453
|
get [Symbol.toStringTag]() {
|
|
@@ -24134,6 +24458,10 @@ class AxiosHeaders {
|
|
|
24134
24458
|
return thing instanceof this ? thing : new this(thing);
|
|
24135
24459
|
}
|
|
24136
24460
|
|
|
24461
|
+
static parseParameters(value) {
|
|
24462
|
+
return parseParameters(value);
|
|
24463
|
+
}
|
|
24464
|
+
|
|
24137
24465
|
static concat(first, ...targets) {
|
|
24138
24466
|
const computed = new this(first);
|
|
24139
24467
|
|
|
@@ -24202,9 +24530,57 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24202
24530
|
|
|
24203
24531
|
|
|
24204
24532
|
|
|
24533
|
+
const $internals = Symbol('internals');
|
|
24534
|
+
|
|
24535
|
+
// `handlers` is public and may be replaced with a nullish value by user code;
|
|
24536
|
+
// `clear()` has always tolerated that. Treat it as an empty stack rather than
|
|
24537
|
+
// dereferencing it.
|
|
24538
|
+
function countHandlers(handlers) {
|
|
24539
|
+
return handlers ? handlers.length : 0;
|
|
24540
|
+
}
|
|
24541
|
+
|
|
24542
|
+
function trimHandlers(handlers) {
|
|
24543
|
+
if (!handlers) {
|
|
24544
|
+
return;
|
|
24545
|
+
}
|
|
24546
|
+
|
|
24547
|
+
while (handlers.length && handlers[handlers.length - 1] === null) {
|
|
24548
|
+
handlers.pop();
|
|
24549
|
+
}
|
|
24550
|
+
}
|
|
24551
|
+
|
|
24552
|
+
function syncHandlerEntries(manager, internals) {
|
|
24553
|
+
const handlers = manager.handlers;
|
|
24554
|
+
const length = countHandlers(handlers);
|
|
24555
|
+
|
|
24556
|
+
if (handlers !== internals.handlersRef) {
|
|
24557
|
+
internals.handlersRef = handlers;
|
|
24558
|
+
internals.handlerEntries.clear();
|
|
24559
|
+
} else if (length !== internals.handlersLength) {
|
|
24560
|
+
if (!length) {
|
|
24561
|
+
internals.handlerEntries.clear();
|
|
24562
|
+
} else {
|
|
24563
|
+
internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {
|
|
24564
|
+
if (handlers[entry.index] !== entry.handler) {
|
|
24565
|
+
internals.handlerEntries.delete(id);
|
|
24566
|
+
}
|
|
24567
|
+
});
|
|
24568
|
+
}
|
|
24569
|
+
}
|
|
24570
|
+
|
|
24571
|
+
internals.handlersLength = length;
|
|
24572
|
+
}
|
|
24573
|
+
|
|
24205
24574
|
class InterceptorManager {
|
|
24206
24575
|
constructor() {
|
|
24207
24576
|
this.handlers = [];
|
|
24577
|
+
this[$internals] = {
|
|
24578
|
+
handlersRef: this.handlers,
|
|
24579
|
+
handlersLength: this.handlers.length,
|
|
24580
|
+
handlerEntries: new Map(),
|
|
24581
|
+
iterationDepth: 0,
|
|
24582
|
+
nextId: 0,
|
|
24583
|
+
};
|
|
24208
24584
|
}
|
|
24209
24585
|
|
|
24210
24586
|
/**
|
|
@@ -24217,13 +24593,30 @@ class InterceptorManager {
|
|
|
24217
24593
|
* @return {Number} An ID used to remove interceptor later
|
|
24218
24594
|
*/
|
|
24219
24595
|
use(fulfilled, rejected, options) {
|
|
24220
|
-
|
|
24596
|
+
const handler = {
|
|
24221
24597
|
fulfilled,
|
|
24222
24598
|
rejected,
|
|
24223
24599
|
synchronous: options ? options.synchronous : false,
|
|
24224
24600
|
runWhen: options ? options.runWhen : null,
|
|
24601
|
+
};
|
|
24602
|
+
const internals = this[$internals];
|
|
24603
|
+
|
|
24604
|
+
if (this.handlers == null) {
|
|
24605
|
+
this.handlers = [];
|
|
24606
|
+
}
|
|
24607
|
+
|
|
24608
|
+
syncHandlerEntries(this, internals);
|
|
24609
|
+
|
|
24610
|
+
const id = internals.nextId++;
|
|
24611
|
+
|
|
24612
|
+
this.handlers.push(handler);
|
|
24613
|
+
internals.handlerEntries.set(id, {
|
|
24614
|
+
handler,
|
|
24615
|
+
index: this.handlers.length - 1,
|
|
24225
24616
|
});
|
|
24226
|
-
|
|
24617
|
+
internals.handlersLength = this.handlers.length;
|
|
24618
|
+
|
|
24619
|
+
return id;
|
|
24227
24620
|
}
|
|
24228
24621
|
|
|
24229
24622
|
/**
|
|
@@ -24234,8 +24627,27 @@ class InterceptorManager {
|
|
|
24234
24627
|
* @returns {void}
|
|
24235
24628
|
*/
|
|
24236
24629
|
eject(id) {
|
|
24237
|
-
|
|
24238
|
-
|
|
24630
|
+
const internals = this[$internals];
|
|
24631
|
+
|
|
24632
|
+
syncHandlerEntries(this, internals);
|
|
24633
|
+
|
|
24634
|
+
const entry = internals.handlerEntries.get(id);
|
|
24635
|
+
|
|
24636
|
+
if (entry) {
|
|
24637
|
+
internals.handlerEntries.delete(id);
|
|
24638
|
+
|
|
24639
|
+
// Ignore IDs invalidated by clear or direct replacement of handlers.
|
|
24640
|
+
if (this.handlers[entry.index] !== entry.handler) {
|
|
24641
|
+
return;
|
|
24642
|
+
}
|
|
24643
|
+
|
|
24644
|
+
this.handlers[entry.index] = null;
|
|
24645
|
+
|
|
24646
|
+
// Do not reuse an index while forEach is walking its length snapshot.
|
|
24647
|
+
if (!internals.iterationDepth) {
|
|
24648
|
+
trimHandlers(this.handlers);
|
|
24649
|
+
internals.handlersLength = this.handlers.length;
|
|
24650
|
+
}
|
|
24239
24651
|
}
|
|
24240
24652
|
}
|
|
24241
24653
|
|
|
@@ -24247,6 +24659,7 @@ class InterceptorManager {
|
|
|
24247
24659
|
clear() {
|
|
24248
24660
|
if (this.handlers) {
|
|
24249
24661
|
this.handlers = [];
|
|
24662
|
+
syncHandlerEntries(this, this[$internals]);
|
|
24250
24663
|
}
|
|
24251
24664
|
}
|
|
24252
24665
|
|
|
@@ -24261,11 +24674,25 @@ class InterceptorManager {
|
|
|
24261
24674
|
* @returns {void}
|
|
24262
24675
|
*/
|
|
24263
24676
|
forEach(fn) {
|
|
24264
|
-
|
|
24265
|
-
|
|
24266
|
-
|
|
24677
|
+
const internals = this[$internals];
|
|
24678
|
+
|
|
24679
|
+
syncHandlerEntries(this, internals);
|
|
24680
|
+
|
|
24681
|
+
internals.iterationDepth++;
|
|
24682
|
+
|
|
24683
|
+
try {
|
|
24684
|
+
_utils_js__rspack_import_0["default"].forEach(this.handlers, function forEachHandler(h) {
|
|
24685
|
+
if (h !== null) {
|
|
24686
|
+
fn(h);
|
|
24687
|
+
}
|
|
24688
|
+
});
|
|
24689
|
+
} finally {
|
|
24690
|
+
if (!--internals.iterationDepth) {
|
|
24691
|
+
syncHandlerEntries(this, internals);
|
|
24692
|
+
trimHandlers(this.handlers);
|
|
24693
|
+
internals.handlersLength = countHandlers(this.handlers);
|
|
24267
24694
|
}
|
|
24268
|
-
}
|
|
24695
|
+
}
|
|
24269
24696
|
}
|
|
24270
24697
|
}
|
|
24271
24698
|
|
|
@@ -24277,8 +24704,10 @@ class InterceptorManager {
|
|
|
24277
24704
|
"use strict";
|
|
24278
24705
|
__webpack_require__.r(__webpack_exports__);
|
|
24279
24706
|
/* import */ var _AxiosError_js__rspack_import_0 = __webpack_require__(4062);
|
|
24280
|
-
/* import */ var
|
|
24281
|
-
/* import */ var
|
|
24707
|
+
/* import */ var _helpers_isAbsoluteURL_js__rspack_import_2 = __webpack_require__(9034);
|
|
24708
|
+
/* import */ var _helpers_combineURLs_js__rspack_import_3 = __webpack_require__(6787);
|
|
24709
|
+
/* import */ var _helpers_normalizeURLForProtocolCheck_js__rspack_import_1 = __webpack_require__(7527);
|
|
24710
|
+
|
|
24282
24711
|
|
|
24283
24712
|
|
|
24284
24713
|
|
|
@@ -24286,27 +24715,52 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24286
24715
|
|
|
24287
24716
|
|
|
24288
24717
|
const malformedHttpProtocol = /^https?:(?!\/\/)/i;
|
|
24289
|
-
const httpProtocolControlCharacters = /[\t\n\r]/g;
|
|
24290
24718
|
|
|
24291
|
-
|
|
24292
|
-
|
|
24293
|
-
|
|
24294
|
-
|
|
24295
|
-
|
|
24296
|
-
|
|
24719
|
+
// Redact the parts of a URL that can carry secrets before it is embedded in an
|
|
24720
|
+
// error message. AxiosError.toJSON() serializes `message` verbatim and errors
|
|
24721
|
+
// are commonly logged, while the opt-in `config.redact` model only cleans
|
|
24722
|
+
// config keys — it cannot reach the message. Redact only the genuinely
|
|
24723
|
+
// sensitive substrings — userinfo (credentials), query parameter values and
|
|
24724
|
+
// fragment contents — with the same REDACTED marker the config redaction uses,
|
|
24725
|
+
// while keeping the scheme, host, path and parameter names so the offending
|
|
24726
|
+
// request stays accurately identifiable.
|
|
24727
|
+
function redactFragment(fragment) {
|
|
24728
|
+
if (!fragment) {
|
|
24729
|
+
return fragment;
|
|
24730
|
+
}
|
|
24731
|
+
|
|
24732
|
+
return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = '') => {
|
|
24733
|
+
return `${separator}${parameterName}${_AxiosError_js__rspack_import_0.REDACTED}`;
|
|
24734
|
+
});
|
|
24297
24735
|
}
|
|
24298
24736
|
|
|
24299
|
-
function
|
|
24300
|
-
|
|
24737
|
+
function redactSensitiveURLParts(url) {
|
|
24738
|
+
const redactedURL = url.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${_AxiosError_js__rspack_import_0.REDACTED}@`);
|
|
24739
|
+
const fragmentIndex = redactedURL.indexOf('#');
|
|
24740
|
+
const urlWithoutFragment =
|
|
24741
|
+
fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);
|
|
24742
|
+
const redactedURLWithoutFragment = urlWithoutFragment.replace(
|
|
24743
|
+
/([?&][^=&#]*=)[^&#]*/g,
|
|
24744
|
+
`$1${_AxiosError_js__rspack_import_0.REDACTED}`
|
|
24745
|
+
);
|
|
24746
|
+
|
|
24747
|
+
if (fragmentIndex === -1) {
|
|
24748
|
+
return redactedURLWithoutFragment;
|
|
24749
|
+
}
|
|
24750
|
+
|
|
24751
|
+
return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;
|
|
24301
24752
|
}
|
|
24302
24753
|
|
|
24303
24754
|
function assertValidHttpProtocolURL(url, config) {
|
|
24304
|
-
if (typeof url === 'string'
|
|
24305
|
-
|
|
24306
|
-
|
|
24307
|
-
_AxiosError_js__rspack_import_0["default"]
|
|
24308
|
-
|
|
24309
|
-
|
|
24755
|
+
if (typeof url === 'string') {
|
|
24756
|
+
const normalizedURL = (0,_helpers_normalizeURLForProtocolCheck_js__rspack_import_1["default"])(url);
|
|
24757
|
+
if (malformedHttpProtocol.test(normalizedURL)) {
|
|
24758
|
+
throw new _AxiosError_js__rspack_import_0["default"](
|
|
24759
|
+
`Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`,
|
|
24760
|
+
_AxiosError_js__rspack_import_0["default"].ERR_INVALID_URL,
|
|
24761
|
+
config
|
|
24762
|
+
);
|
|
24763
|
+
}
|
|
24310
24764
|
}
|
|
24311
24765
|
}
|
|
24312
24766
|
|
|
@@ -24322,10 +24776,10 @@ function assertValidHttpProtocolURL(url, config) {
|
|
|
24322
24776
|
*/
|
|
24323
24777
|
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
|
|
24324
24778
|
assertValidHttpProtocolURL(requestedURL, config);
|
|
24325
|
-
let isRelativeUrl = !(0,
|
|
24779
|
+
let isRelativeUrl = !(0,_helpers_isAbsoluteURL_js__rspack_import_2["default"])(requestedURL);
|
|
24326
24780
|
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
24327
24781
|
assertValidHttpProtocolURL(baseURL, config);
|
|
24328
|
-
return (0,
|
|
24782
|
+
return (0,_helpers_combineURLs_js__rspack_import_3["default"])(baseURL, requestedURL);
|
|
24329
24783
|
}
|
|
24330
24784
|
return requestedURL;
|
|
24331
24785
|
}
|
|
@@ -24339,12 +24793,14 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
24339
24793
|
8683(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
24340
24794
|
"use strict";
|
|
24341
24795
|
__webpack_require__.r(__webpack_exports__);
|
|
24342
|
-
/* import */ var
|
|
24343
|
-
/* import */ var
|
|
24344
|
-
/* import */ var
|
|
24796
|
+
/* import */ var _transformData_js__rspack_import_3 = __webpack_require__(9152);
|
|
24797
|
+
/* import */ var _cancel_isCancel_js__rspack_import_6 = __webpack_require__(9575);
|
|
24798
|
+
/* import */ var _defaults_index_js__rspack_import_5 = __webpack_require__(6013);
|
|
24345
24799
|
/* import */ var _cancel_CanceledError_js__rspack_import_0 = __webpack_require__(8458);
|
|
24346
|
-
/* import */ var
|
|
24347
|
-
/* import */ var
|
|
24800
|
+
/* import */ var _core_AxiosHeaders_js__rspack_import_2 = __webpack_require__(7110);
|
|
24801
|
+
/* import */ var _adapters_adapters_js__rspack_import_4 = __webpack_require__(6263);
|
|
24802
|
+
/* import */ var _utils_js__rspack_import_1 = __webpack_require__(7275);
|
|
24803
|
+
|
|
24348
24804
|
|
|
24349
24805
|
|
|
24350
24806
|
|
|
@@ -24378,19 +24834,24 @@ function throwIfCancellationRequested(config) {
|
|
|
24378
24834
|
*
|
|
24379
24835
|
* @returns {Promise} The Promise to be fulfilled
|
|
24380
24836
|
*/
|
|
24381
|
-
function dispatchRequest(
|
|
24837
|
+
function dispatchRequest(_config) {
|
|
24838
|
+
// Interceptors may replace the merged config with an ordinary object. Flatten
|
|
24839
|
+
// it at the dispatch boundary so shared prototype members cannot become
|
|
24840
|
+
// request behavior, while preserving intentional template/class members.
|
|
24841
|
+
const config = _utils_js__rspack_import_1["default"].toSafeFlatObject(_config);
|
|
24842
|
+
|
|
24382
24843
|
throwIfCancellationRequested(config);
|
|
24383
24844
|
|
|
24384
|
-
config.headers =
|
|
24845
|
+
config.headers = _core_AxiosHeaders_js__rspack_import_2["default"].from(_utils_js__rspack_import_1["default"].getSafeProp(config, 'headers'));
|
|
24385
24846
|
|
|
24386
24847
|
// Transform request data
|
|
24387
|
-
config.data =
|
|
24848
|
+
config.data = _transformData_js__rspack_import_3["default"].call(config, config.transformRequest);
|
|
24388
24849
|
|
|
24389
24850
|
if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
|
|
24390
24851
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
24391
24852
|
}
|
|
24392
24853
|
|
|
24393
|
-
const adapter =
|
|
24854
|
+
const adapter = _adapters_adapters_js__rspack_import_4["default"].getAdapter(config.adapter || _defaults_index_js__rspack_import_5["default"].adapter, config);
|
|
24394
24855
|
|
|
24395
24856
|
return adapter(config).then(
|
|
24396
24857
|
function onAdapterResolution(response) {
|
|
@@ -24401,24 +24862,24 @@ function dispatchRequest(config) {
|
|
|
24401
24862
|
// We clean it up afterwards to avoid polluting the config object.
|
|
24402
24863
|
config.response = response;
|
|
24403
24864
|
try {
|
|
24404
|
-
response.data =
|
|
24865
|
+
response.data = _transformData_js__rspack_import_3["default"].call(config, config.transformResponse, response);
|
|
24405
24866
|
} finally {
|
|
24406
24867
|
delete config.response;
|
|
24407
24868
|
}
|
|
24408
24869
|
|
|
24409
|
-
response.headers =
|
|
24870
|
+
response.headers = _core_AxiosHeaders_js__rspack_import_2["default"].from(response.headers);
|
|
24410
24871
|
|
|
24411
24872
|
return response;
|
|
24412
24873
|
},
|
|
24413
24874
|
function onAdapterRejection(reason) {
|
|
24414
|
-
if (!(0,
|
|
24875
|
+
if (!(0,_cancel_isCancel_js__rspack_import_6["default"])(reason)) {
|
|
24415
24876
|
throwIfCancellationRequested(config);
|
|
24416
24877
|
|
|
24417
24878
|
// Transform response data
|
|
24418
24879
|
if (reason && reason.response) {
|
|
24419
24880
|
config.response = reason.response;
|
|
24420
24881
|
try {
|
|
24421
|
-
reason.response.data =
|
|
24882
|
+
reason.response.data = _transformData_js__rspack_import_3["default"].call(
|
|
24422
24883
|
config,
|
|
24423
24884
|
config.transformResponse,
|
|
24424
24885
|
reason.response
|
|
@@ -24426,7 +24887,7 @@ function dispatchRequest(config) {
|
|
|
24426
24887
|
} finally {
|
|
24427
24888
|
delete config.response;
|
|
24428
24889
|
}
|
|
24429
|
-
reason.response.headers =
|
|
24890
|
+
reason.response.headers = _core_AxiosHeaders_js__rspack_import_2["default"].from(reason.response.headers);
|
|
24430
24891
|
}
|
|
24431
24892
|
}
|
|
24432
24893
|
|
|
@@ -24453,6 +24914,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24453
24914
|
|
|
24454
24915
|
const headersToObject = (thing) => (thing instanceof _AxiosHeaders_js__rspack_import_0["default"] ? { ...thing } : thing);
|
|
24455
24916
|
|
|
24917
|
+
const ownEnumerableKeys = (thing) => {
|
|
24918
|
+
if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
|
|
24919
|
+
return Object.keys(thing).concat(
|
|
24920
|
+
Object.getOwnPropertySymbols(thing).filter(
|
|
24921
|
+
(symbol) => Object.getOwnPropertyDescriptor(thing, symbol).enumerable
|
|
24922
|
+
)
|
|
24923
|
+
);
|
|
24924
|
+
}
|
|
24925
|
+
return Object.keys(thing);
|
|
24926
|
+
};
|
|
24927
|
+
|
|
24456
24928
|
/**
|
|
24457
24929
|
* Config-specific merge-function which creates a new config-object
|
|
24458
24930
|
* by merging two configuration objects together.
|
|
@@ -24518,7 +24990,9 @@ function mergeConfig(config1, config2) {
|
|
|
24518
24990
|
}
|
|
24519
24991
|
|
|
24520
24992
|
function getMergedTransitionalOption(prop) {
|
|
24521
|
-
const transitional2 = _utils_js__rspack_import_1["default"].hasOwnProp(config2, 'transitional')
|
|
24993
|
+
const transitional2 = _utils_js__rspack_import_1["default"].hasOwnProp(config2, 'transitional')
|
|
24994
|
+
? config2.transitional
|
|
24995
|
+
: undefined;
|
|
24522
24996
|
|
|
24523
24997
|
if (!_utils_js__rspack_import_1["default"].isUndefined(transitional2)) {
|
|
24524
24998
|
if (_utils_js__rspack_import_1["default"].isPlainObject(transitional2)) {
|
|
@@ -24530,7 +25004,9 @@ function mergeConfig(config1, config2) {
|
|
|
24530
25004
|
}
|
|
24531
25005
|
}
|
|
24532
25006
|
|
|
24533
|
-
const transitional1 = _utils_js__rspack_import_1["default"].hasOwnProp(config1, 'transitional')
|
|
25007
|
+
const transitional1 = _utils_js__rspack_import_1["default"].hasOwnProp(config1, 'transitional')
|
|
25008
|
+
? config1.transitional
|
|
25009
|
+
: undefined;
|
|
24534
25010
|
|
|
24535
25011
|
if (_utils_js__rspack_import_1["default"].isPlainObject(transitional1) && _utils_js__rspack_import_1["default"].hasOwnProp(transitional1, prop)) {
|
|
24536
25012
|
return transitional1[prop];
|
|
@@ -24557,7 +25033,7 @@ function mergeConfig(config1, config2) {
|
|
|
24557
25033
|
transformResponse: defaultToConfig2,
|
|
24558
25034
|
paramsSerializer: defaultToConfig2,
|
|
24559
25035
|
timeout: defaultToConfig2,
|
|
24560
|
-
|
|
25036
|
+
timeoutErrorMessage: defaultToConfig2,
|
|
24561
25037
|
withCredentials: defaultToConfig2,
|
|
24562
25038
|
withXSRFToken: defaultToConfig2,
|
|
24563
25039
|
adapter: defaultToConfig2,
|
|
@@ -24582,7 +25058,7 @@ function mergeConfig(config1, config2) {
|
|
|
24582
25058
|
mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
|
|
24583
25059
|
};
|
|
24584
25060
|
|
|
24585
|
-
_utils_js__rspack_import_1["default"].forEach(
|
|
25061
|
+
_utils_js__rspack_import_1["default"].forEach(ownEnumerableKeys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
24586
25062
|
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
|
|
24587
25063
|
const merge = _utils_js__rspack_import_1["default"].hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
24588
25064
|
const a = _utils_js__rspack_import_1["default"].hasOwnProp(config1, prop) ? config1[prop] : undefined;
|
|
@@ -24611,6 +25087,66 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
24611
25087
|
});
|
|
24612
25088
|
|
|
24613
25089
|
|
|
25090
|
+
},
|
|
25091
|
+
2647(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
25092
|
+
"use strict";
|
|
25093
|
+
__webpack_require__.r(__webpack_exports__);
|
|
25094
|
+
|
|
25095
|
+
|
|
25096
|
+
const methodList = Object.freeze([
|
|
25097
|
+
'get',
|
|
25098
|
+
'delete',
|
|
25099
|
+
'head',
|
|
25100
|
+
'options',
|
|
25101
|
+
'post',
|
|
25102
|
+
'put',
|
|
25103
|
+
'patch',
|
|
25104
|
+
'purge',
|
|
25105
|
+
'link',
|
|
25106
|
+
'unlink',
|
|
25107
|
+
'query',
|
|
25108
|
+
]);
|
|
25109
|
+
|
|
25110
|
+
/* export default */ __webpack_exports__["default"] = (methodList);
|
|
25111
|
+
|
|
25112
|
+
|
|
25113
|
+
},
|
|
25114
|
+
958(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
25115
|
+
"use strict";
|
|
25116
|
+
__webpack_require__.r(__webpack_exports__);
|
|
25117
|
+
|
|
25118
|
+
|
|
25119
|
+
const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];
|
|
25120
|
+
|
|
25121
|
+
/**
|
|
25122
|
+
* Apply the headers generated by a FormData implementation to the request headers,
|
|
25123
|
+
* honoring the `formDataHeaderPolicy` option: with 'content-only', copy only the
|
|
25124
|
+
* content-* headers; otherwise merge all of them.
|
|
25125
|
+
*
|
|
25126
|
+
* @param {AxiosHeaders} headers - the request headers to mutate
|
|
25127
|
+
* @param {Object | null | undefined} formHeaders - headers produced by the FormData implementation
|
|
25128
|
+
* @param {String} [policy] - the resolved `formDataHeaderPolicy` config value
|
|
25129
|
+
*
|
|
25130
|
+
* @returns {void}
|
|
25131
|
+
*/
|
|
25132
|
+
function setFormDataHeaders(headers, formHeaders, policy) {
|
|
25133
|
+
if (policy !== 'content-only') {
|
|
25134
|
+
headers.set(formHeaders);
|
|
25135
|
+
return;
|
|
25136
|
+
}
|
|
25137
|
+
|
|
25138
|
+
Object.entries(formHeaders || {}).forEach(([key, val]) => {
|
|
25139
|
+
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
|
|
25140
|
+
headers.set(key, val);
|
|
25141
|
+
}
|
|
25142
|
+
});
|
|
25143
|
+
}
|
|
25144
|
+
|
|
25145
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
25146
|
+
"default": () => (setFormDataHeaders)
|
|
25147
|
+
});
|
|
25148
|
+
|
|
25149
|
+
|
|
24614
25150
|
},
|
|
24615
25151
|
3853(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
24616
25152
|
"use strict";
|
|
@@ -24701,6 +25237,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24701
25237
|
/* import */ var _helpers_toURLEncodedForm_js__rspack_import_3 = __webpack_require__(1076);
|
|
24702
25238
|
/* import */ var _platform_index_js__rspack_import_6 = __webpack_require__(3820);
|
|
24703
25239
|
/* import */ var _helpers_formDataToJSON_js__rspack_import_2 = __webpack_require__(7887);
|
|
25240
|
+
/* import */ var _core_methodList_js__rspack_import_7 = __webpack_require__(2647);
|
|
25241
|
+
|
|
24704
25242
|
|
|
24705
25243
|
|
|
24706
25244
|
|
|
@@ -24873,7 +25411,7 @@ const defaults = {
|
|
|
24873
25411
|
},
|
|
24874
25412
|
};
|
|
24875
25413
|
|
|
24876
|
-
_utils_js__rspack_import_0["default"].forEach([
|
|
25414
|
+
_utils_js__rspack_import_0["default"].forEach(_core_methodList_js__rspack_import_7["default"], (method) => {
|
|
24877
25415
|
defaults.headers[method] = {};
|
|
24878
25416
|
});
|
|
24879
25417
|
|
|
@@ -24900,7 +25438,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24900
25438
|
9888(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
24901
25439
|
"use strict";
|
|
24902
25440
|
__webpack_require__.r(__webpack_exports__);
|
|
24903
|
-
const VERSION = "1.
|
|
25441
|
+
const VERSION = "1.20.0";
|
|
24904
25442
|
__webpack_require__.d(__webpack_exports__, {
|
|
24905
25443
|
}, {
|
|
24906
25444
|
VERSION: VERSION
|
|
@@ -25014,14 +25552,22 @@ const HttpStatusCode = {
|
|
|
25014
25552
|
Gone: 410,
|
|
25015
25553
|
LengthRequired: 411,
|
|
25016
25554
|
PreconditionFailed: 412,
|
|
25555
|
+
/**
|
|
25556
|
+
* @deprecated Use `ContentTooLarge` instead.
|
|
25557
|
+
*/
|
|
25017
25558
|
PayloadTooLarge: 413,
|
|
25559
|
+
ContentTooLarge: 413,
|
|
25018
25560
|
UriTooLong: 414,
|
|
25019
25561
|
UnsupportedMediaType: 415,
|
|
25020
25562
|
RangeNotSatisfiable: 416,
|
|
25021
25563
|
ExpectationFailed: 417,
|
|
25022
25564
|
ImATeapot: 418,
|
|
25023
25565
|
MisdirectedRequest: 421,
|
|
25566
|
+
/**
|
|
25567
|
+
* @deprecated Use `UnprocessableContent` instead.
|
|
25568
|
+
*/
|
|
25024
25569
|
UnprocessableEntity: 422,
|
|
25570
|
+
UnprocessableContent: 422,
|
|
25025
25571
|
Locked: 423,
|
|
25026
25572
|
FailedDependency: 424,
|
|
25027
25573
|
TooEarly: 425,
|
|
@@ -25041,6 +25587,7 @@ const HttpStatusCode = {
|
|
|
25041
25587
|
LoopDetected: 508,
|
|
25042
25588
|
NotExtended: 510,
|
|
25043
25589
|
NetworkAuthenticationRequired: 511,
|
|
25590
|
+
WebServerReturnsAnUnknownError: 520,
|
|
25044
25591
|
WebServerIsDown: 521,
|
|
25045
25592
|
ConnectionTimedOut: 522,
|
|
25046
25593
|
OriginIsUnreachable: 523,
|
|
@@ -25050,7 +25597,9 @@ const HttpStatusCode = {
|
|
|
25050
25597
|
};
|
|
25051
25598
|
|
|
25052
25599
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
25053
|
-
HttpStatusCode[value]
|
|
25600
|
+
if (HttpStatusCode[value] === undefined) {
|
|
25601
|
+
HttpStatusCode[value] = key;
|
|
25602
|
+
}
|
|
25054
25603
|
});
|
|
25055
25604
|
|
|
25056
25605
|
/* export default */ __webpack_exports__["default"] = (HttpStatusCode);
|
|
@@ -25177,9 +25726,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25177
25726
|
* @returns {string} The combined URL
|
|
25178
25727
|
*/
|
|
25179
25728
|
function combineURLs(baseURL, relativeURL) {
|
|
25180
|
-
|
|
25181
|
-
|
|
25182
|
-
|
|
25729
|
+
if (!relativeURL) {
|
|
25730
|
+
return baseURL;
|
|
25731
|
+
}
|
|
25732
|
+
|
|
25733
|
+
let end = baseURL.length;
|
|
25734
|
+
|
|
25735
|
+
while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {
|
|
25736
|
+
end--;
|
|
25737
|
+
}
|
|
25738
|
+
|
|
25739
|
+
return baseURL.slice(0, end) + '/' + relativeURL.replace(/^\/+/, '');
|
|
25183
25740
|
}
|
|
25184
25741
|
|
|
25185
25742
|
__webpack_require__.d(__webpack_exports__, {
|
|
@@ -25241,7 +25798,18 @@ const composeSignals = (signals, timeout) => {
|
|
|
25241
25798
|
signals = null;
|
|
25242
25799
|
};
|
|
25243
25800
|
|
|
25244
|
-
signals.forEach((signal) =>
|
|
25801
|
+
signals.forEach((signal) => {
|
|
25802
|
+
if (aborted) {
|
|
25803
|
+
return;
|
|
25804
|
+
}
|
|
25805
|
+
|
|
25806
|
+
if (signal.aborted) {
|
|
25807
|
+
onabort.call(signal);
|
|
25808
|
+
return;
|
|
25809
|
+
}
|
|
25810
|
+
|
|
25811
|
+
signal.addEventListener('abort', onabort, { once: true });
|
|
25812
|
+
});
|
|
25245
25813
|
|
|
25246
25814
|
const { signal } = controller;
|
|
25247
25815
|
|
|
@@ -25330,13 +25898,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25330
25898
|
"use strict";
|
|
25331
25899
|
__webpack_require__.r(__webpack_exports__);
|
|
25332
25900
|
/**
|
|
25333
|
-
* Estimate
|
|
25334
|
-
* -
|
|
25335
|
-
*
|
|
25336
|
-
*
|
|
25337
|
-
*
|
|
25338
|
-
* @param {string} url
|
|
25339
|
-
* @returns {number}
|
|
25901
|
+
* Estimate data: URL byte lengths *without* allocating large buffers.
|
|
25902
|
+
* - Fetch percent-decodes a base64 body before decoding it.
|
|
25903
|
+
* - Node's Buffer.from(body, 'base64') sizes its backing allocation from the
|
|
25904
|
+
* raw body, including ignored characters and content after padding.
|
|
25905
|
+
* - Non-base64 data is percent-decoded and then encoded as UTF-8.
|
|
25340
25906
|
*/
|
|
25341
25907
|
const isHexDigit = (charCode) =>
|
|
25342
25908
|
(charCode >= 48 && charCode <= 57) ||
|
|
@@ -25346,64 +25912,101 @@ const isHexDigit = (charCode) =>
|
|
|
25346
25912
|
const isPercentEncodedByte = (str, i, len) =>
|
|
25347
25913
|
i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
|
|
25348
25914
|
|
|
25349
|
-
|
|
25350
|
-
if (!url || typeof url !== 'string') return 0;
|
|
25351
|
-
if (!url.startsWith('data:')) return 0;
|
|
25915
|
+
const hexValue = (charCode) => (charCode <= 57 ? charCode - 48 : (charCode & 0xdf) - 55);
|
|
25352
25916
|
|
|
25353
|
-
|
|
25354
|
-
|
|
25917
|
+
const isBase64Char = (charCode) =>
|
|
25918
|
+
(charCode >= 65 && charCode <= 90) || // A-Z
|
|
25919
|
+
(charCode >= 97 && charCode <= 122) || // a-z
|
|
25920
|
+
(charCode >= 48 && charCode <= 57) || // 0-9
|
|
25921
|
+
charCode === 43 || // +
|
|
25922
|
+
charCode === 47 || // /
|
|
25923
|
+
charCode === 45 || // - (base64url)
|
|
25924
|
+
charCode === 95; // _ (base64url)
|
|
25355
25925
|
|
|
25356
|
-
|
|
25357
|
-
|
|
25358
|
-
const isBase64 = /;base64/i.test(meta);
|
|
25926
|
+
const isBase64Whitespace = (charCode) =>
|
|
25927
|
+
charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;
|
|
25359
25928
|
|
|
25360
|
-
|
|
25361
|
-
|
|
25362
|
-
|
|
25363
|
-
|
|
25364
|
-
|
|
25365
|
-
|
|
25366
|
-
|
|
25367
|
-
|
|
25368
|
-
|
|
25369
|
-
|
|
25370
|
-
|
|
25371
|
-
|
|
25372
|
-
|
|
25373
|
-
|
|
25374
|
-
|
|
25929
|
+
const base64Bytes = (significant) => {
|
|
25930
|
+
const groups = Math.floor(significant / 4);
|
|
25931
|
+
const remainder = significant % 4;
|
|
25932
|
+
return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);
|
|
25933
|
+
};
|
|
25934
|
+
|
|
25935
|
+
// Buffer.byteLength(body, 'base64') uses the raw string length as an allocation
|
|
25936
|
+
// upper bound even when Buffer.from later ignores characters or stops at '='.
|
|
25937
|
+
const estimateBase64BufferAllocation = (body) => {
|
|
25938
|
+
const len = body.length;
|
|
25939
|
+
let padding = 0;
|
|
25940
|
+
|
|
25941
|
+
if (len > 0 && body.charCodeAt(len - 1) === 61 /* '=' */) {
|
|
25942
|
+
padding++;
|
|
25943
|
+
|
|
25944
|
+
if (len > 1 && body.charCodeAt(len - 2) === 61 /* '=' */) {
|
|
25945
|
+
padding++;
|
|
25375
25946
|
}
|
|
25947
|
+
}
|
|
25376
25948
|
|
|
25377
|
-
|
|
25378
|
-
|
|
25949
|
+
return Math.floor(((len - padding) * 3) / 4);
|
|
25950
|
+
};
|
|
25379
25951
|
|
|
25380
|
-
|
|
25381
|
-
|
|
25382
|
-
|
|
25383
|
-
|
|
25384
|
-
|
|
25952
|
+
const estimatePercentDecodedBase64Bytes = (body) => {
|
|
25953
|
+
const len = body.length;
|
|
25954
|
+
let significant = 0;
|
|
25955
|
+
let padding = 0;
|
|
25956
|
+
let invalid = false;
|
|
25385
25957
|
|
|
25386
|
-
|
|
25387
|
-
|
|
25388
|
-
|
|
25389
|
-
|
|
25390
|
-
|
|
25391
|
-
|
|
25392
|
-
idx -= 3;
|
|
25393
|
-
}
|
|
25958
|
+
for (let i = 0; i < len; i++) {
|
|
25959
|
+
let code = body.charCodeAt(i);
|
|
25960
|
+
|
|
25961
|
+
if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {
|
|
25962
|
+
code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
|
|
25963
|
+
i += 2;
|
|
25394
25964
|
}
|
|
25395
25965
|
|
|
25396
|
-
if (
|
|
25397
|
-
|
|
25398
|
-
|
|
25399
|
-
|
|
25400
|
-
|
|
25401
|
-
|
|
25966
|
+
if (isBase64Whitespace(code)) {
|
|
25967
|
+
continue;
|
|
25968
|
+
}
|
|
25969
|
+
|
|
25970
|
+
if (code === 61 /* '=' */) {
|
|
25971
|
+
padding++;
|
|
25972
|
+
continue;
|
|
25402
25973
|
}
|
|
25403
25974
|
|
|
25404
|
-
|
|
25405
|
-
|
|
25406
|
-
|
|
25975
|
+
if (!isBase64Char(code) || padding > 0) {
|
|
25976
|
+
invalid = true;
|
|
25977
|
+
continue;
|
|
25978
|
+
}
|
|
25979
|
+
|
|
25980
|
+
significant++;
|
|
25981
|
+
}
|
|
25982
|
+
|
|
25983
|
+
// Fetch rejects malformed forgiving-base64 input. Returning the raw-size
|
|
25984
|
+
// allocation bound keeps that invalid input from becoming a pre-check bypass.
|
|
25985
|
+
if (
|
|
25986
|
+
invalid ||
|
|
25987
|
+
padding > 2 ||
|
|
25988
|
+
(padding > 0 && (significant + padding) % 4 !== 0) ||
|
|
25989
|
+
significant % 4 === 1
|
|
25990
|
+
) {
|
|
25991
|
+
return estimateBase64BufferAllocation(body);
|
|
25992
|
+
}
|
|
25993
|
+
|
|
25994
|
+
return base64Bytes(significant);
|
|
25995
|
+
};
|
|
25996
|
+
|
|
25997
|
+
const estimateDataURLBytes = (url, estimateBase64) => {
|
|
25998
|
+
if (!url || typeof url !== 'string') return 0;
|
|
25999
|
+
if (!url.startsWith('data:')) return 0;
|
|
26000
|
+
|
|
26001
|
+
const comma = url.indexOf(',');
|
|
26002
|
+
if (comma < 0) return 0;
|
|
26003
|
+
|
|
26004
|
+
const meta = url.slice(5, comma);
|
|
26005
|
+
const body = url.slice(comma + 1);
|
|
26006
|
+
const isBase64 = /;base64/i.test(meta);
|
|
26007
|
+
|
|
26008
|
+
if (isBase64) {
|
|
26009
|
+
return estimateBase64(body);
|
|
25407
26010
|
}
|
|
25408
26011
|
|
|
25409
26012
|
// Compute UTF-8 byte length directly from UTF-16 code units without allocating
|
|
@@ -25433,10 +26036,37 @@ function estimateDataURLDecodedBytes(url) {
|
|
|
25433
26036
|
}
|
|
25434
26037
|
}
|
|
25435
26038
|
return bytes;
|
|
26039
|
+
};
|
|
26040
|
+
|
|
26041
|
+
/**
|
|
26042
|
+
* Estimate the percent-decoded payload size used by Fetch data: URLs.
|
|
26043
|
+
*
|
|
26044
|
+
* @param {string} url
|
|
26045
|
+
* @returns {number}
|
|
26046
|
+
*/
|
|
26047
|
+
function estimateDataURLDecodedBytes(url) {
|
|
26048
|
+
// Fetch removes URL fragments before processing a data: URL.
|
|
26049
|
+
const fragmentIndex = typeof url === 'string' ? url.indexOf('#') : -1;
|
|
26050
|
+
|
|
26051
|
+
return estimateDataURLBytes(
|
|
26052
|
+
fragmentIndex === -1 ? url : url.slice(0, fragmentIndex),
|
|
26053
|
+
estimatePercentDecodedBase64Bytes
|
|
26054
|
+
);
|
|
26055
|
+
}
|
|
26056
|
+
|
|
26057
|
+
/**
|
|
26058
|
+
* Estimate the Buffer backing allocation used by Node's raw base64 decoder.
|
|
26059
|
+
*
|
|
26060
|
+
* @param {string} url
|
|
26061
|
+
* @returns {number}
|
|
26062
|
+
*/
|
|
26063
|
+
function estimateDataURLBufferAllocation(url) {
|
|
26064
|
+
return estimateDataURLBytes(url, estimateBase64BufferAllocation);
|
|
25436
26065
|
}
|
|
25437
26066
|
|
|
25438
26067
|
__webpack_require__.d(__webpack_exports__, {
|
|
25439
|
-
"default": () => (estimateDataURLDecodedBytes)
|
|
26068
|
+
"default": () => (estimateDataURLDecodedBytes),
|
|
26069
|
+
estimateDataURLBufferAllocation: () => (estimateDataURLBufferAllocation)
|
|
25440
26070
|
});
|
|
25441
26071
|
|
|
25442
26072
|
|
|
@@ -25472,12 +26102,18 @@ function throwIfDepthExceeded(index) {
|
|
|
25472
26102
|
* @returns An array of strings.
|
|
25473
26103
|
*/
|
|
25474
26104
|
function parsePropPath(name) {
|
|
25475
|
-
// foo[x][y][z]
|
|
25476
|
-
// foo.x.y.z
|
|
25477
|
-
//
|
|
25478
|
-
//
|
|
26105
|
+
// foo[x][y][z] -> ['foo', 'x', 'y', 'z']
|
|
26106
|
+
// foo.x.y.z -> ['foo', 'x', 'y', 'z']
|
|
26107
|
+
// A path is split on `.` and on `[...]` groups. A segment — whether written
|
|
26108
|
+
// in dot notation or captured inside brackets — may contain any character
|
|
26109
|
+
// except `.`, `[` and `]`, so a key like `user-name` or `user name` is kept
|
|
26110
|
+
// literal instead of being split (#5402). `.`, `[` and `]` keep their existing
|
|
26111
|
+
// meaning, e.g. `foo[bar.baz]` -> ['foo', 'bar', 'baz'] and `[]` is an array push.
|
|
26112
|
+
// Excluding `[` from the bracket group also makes the match fail fast at the
|
|
26113
|
+
// next `[`, so a malformed name cannot rescan to the end of the string from
|
|
26114
|
+
// every unmatched `[` — parsing stays linear in the length of the name.
|
|
25479
26115
|
const path = [];
|
|
25480
|
-
const pattern =
|
|
26116
|
+
const pattern = /[^.[\]]+|\[([^.[\]]*)]/g;
|
|
25481
26117
|
let match;
|
|
25482
26118
|
|
|
25483
26119
|
while ((match = pattern.exec(name)) !== null) {
|
|
@@ -25645,6 +26281,40 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25645
26281
|
: () => true);
|
|
25646
26282
|
|
|
25647
26283
|
|
|
26284
|
+
},
|
|
26285
|
+
7527(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
26286
|
+
"use strict";
|
|
26287
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26288
|
+
|
|
26289
|
+
|
|
26290
|
+
const urlParserControlCharacters = /[\t\n\r]/g;
|
|
26291
|
+
|
|
26292
|
+
/**
|
|
26293
|
+
* Match WHATWG URL preprocessing before checking a URL's protocol.
|
|
26294
|
+
*
|
|
26295
|
+
* @param {string} url
|
|
26296
|
+
*
|
|
26297
|
+
* @returns {string}
|
|
26298
|
+
*/
|
|
26299
|
+
function normalizeURLForProtocolCheck(url) {
|
|
26300
|
+
if (typeof url !== 'string') {
|
|
26301
|
+
return url;
|
|
26302
|
+
}
|
|
26303
|
+
|
|
26304
|
+
let start = 0;
|
|
26305
|
+
|
|
26306
|
+
while (start < url.length && url.charCodeAt(start) <= 0x20) {
|
|
26307
|
+
start++;
|
|
26308
|
+
}
|
|
26309
|
+
|
|
26310
|
+
return url.slice(start).replace(urlParserControlCharacters, '');
|
|
26311
|
+
}
|
|
26312
|
+
|
|
26313
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
26314
|
+
"default": () => (normalizeURLForProtocolCheck)
|
|
26315
|
+
});
|
|
26316
|
+
|
|
26317
|
+
|
|
25648
26318
|
},
|
|
25649
26319
|
3119(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
25650
26320
|
"use strict";
|
|
@@ -25710,18 +26380,20 @@ const ignoreDuplicateOf = _utils_js__rspack_import_0["default"].toObjectSet([
|
|
|
25710
26380
|
key = line.substring(0, i).trim().toLowerCase();
|
|
25711
26381
|
val = line.substring(i + 1).trim();
|
|
25712
26382
|
|
|
25713
|
-
|
|
26383
|
+
const hasKey = _utils_js__rspack_import_0["default"].hasOwnProp(parsed, key);
|
|
26384
|
+
|
|
26385
|
+
if (!key || (hasKey && _utils_js__rspack_import_0["default"].hasOwnProp(ignoreDuplicateOf, key))) {
|
|
25714
26386
|
return;
|
|
25715
26387
|
}
|
|
25716
26388
|
|
|
25717
26389
|
if (key === 'set-cookie') {
|
|
25718
|
-
if (
|
|
26390
|
+
if (hasKey) {
|
|
25719
26391
|
parsed[key].push(val);
|
|
25720
26392
|
} else {
|
|
25721
26393
|
parsed[key] = [val];
|
|
25722
26394
|
}
|
|
25723
26395
|
} else {
|
|
25724
|
-
parsed[key] =
|
|
26396
|
+
parsed[key] = hasKey ? parsed[key] + ', ' + val : val;
|
|
25725
26397
|
}
|
|
25726
26398
|
});
|
|
25727
26399
|
|
|
@@ -25761,12 +26433,12 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
25761
26433
|
const _speedometer = (0,_speedometer_js__rspack_import_0["default"])(50, 250);
|
|
25762
26434
|
|
|
25763
26435
|
return (0,_throttle_js__rspack_import_1["default"])((e) => {
|
|
25764
|
-
if (!e ||
|
|
26436
|
+
if (!e || !_utils_js__rspack_import_2["default"].isNumber(e.loaded)) {
|
|
25765
26437
|
return;
|
|
25766
26438
|
}
|
|
25767
26439
|
const rawLoaded = e.loaded;
|
|
25768
26440
|
const total = e.lengthComputable ? e.total : undefined;
|
|
25769
|
-
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
26441
|
+
const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);
|
|
25770
26442
|
const progressBytes = Math.max(0, loaded - bytesNotified);
|
|
25771
26443
|
const rate = _speedometer(progressBytes);
|
|
25772
26444
|
|
|
@@ -25803,9 +26475,9 @@ const progressEventDecorator = (total, throttled) => {
|
|
|
25803
26475
|
};
|
|
25804
26476
|
|
|
25805
26477
|
const asyncDecorator =
|
|
25806
|
-
(fn) =>
|
|
26478
|
+
(fn, scheduler = _utils_js__rspack_import_2["default"].asap) =>
|
|
25807
26479
|
(...args) =>
|
|
25808
|
-
|
|
26480
|
+
scheduler(() => fn(...args));
|
|
25809
26481
|
|
|
25810
26482
|
__webpack_require__.d(__webpack_exports__, {
|
|
25811
26483
|
}, {
|
|
@@ -25822,11 +26494,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25822
26494
|
/* import */ var _platform_index_js__rspack_import_6 = __webpack_require__(3820);
|
|
25823
26495
|
/* import */ var _utils_js__rspack_import_1 = __webpack_require__(7275);
|
|
25824
26496
|
/* import */ var _core_AxiosError_js__rspack_import_5 = __webpack_require__(4062);
|
|
25825
|
-
/* import */ var
|
|
25826
|
-
/* import */ var
|
|
26497
|
+
/* import */ var _isURLSameOrigin_js__rspack_import_8 = __webpack_require__(6305);
|
|
26498
|
+
/* import */ var _cookies_js__rspack_import_9 = __webpack_require__(9887);
|
|
25827
26499
|
/* import */ var _core_buildFullPath_js__rspack_import_4 = __webpack_require__(8262);
|
|
25828
26500
|
/* import */ var _core_mergeConfig_js__rspack_import_0 = __webpack_require__(4662);
|
|
25829
26501
|
/* import */ var _core_AxiosHeaders_js__rspack_import_2 = __webpack_require__(7110);
|
|
26502
|
+
/* import */ var _core_setFormDataHeaders_js__rspack_import_7 = __webpack_require__(958);
|
|
25830
26503
|
/* import */ var _buildURL_js__rspack_import_3 = __webpack_require__(3967);
|
|
25831
26504
|
|
|
25832
26505
|
|
|
@@ -25838,20 +26511,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25838
26511
|
|
|
25839
26512
|
|
|
25840
26513
|
|
|
25841
|
-
const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];
|
|
25842
|
-
|
|
25843
|
-
function setFormDataHeaders(headers, formHeaders, policy) {
|
|
25844
|
-
if (policy !== 'content-only') {
|
|
25845
|
-
headers.set(formHeaders);
|
|
25846
|
-
return;
|
|
25847
|
-
}
|
|
25848
|
-
|
|
25849
|
-
Object.entries(formHeaders || {}).forEach(([key, val]) => {
|
|
25850
|
-
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
|
|
25851
|
-
headers.set(key, val);
|
|
25852
|
-
}
|
|
25853
|
-
});
|
|
25854
|
-
}
|
|
25855
26514
|
|
|
25856
26515
|
/**
|
|
25857
26516
|
* Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
|
|
@@ -25907,15 +26566,17 @@ function resolveConfig(config) {
|
|
|
25907
26566
|
}
|
|
25908
26567
|
|
|
25909
26568
|
if (_utils_js__rspack_import_1["default"].isFormData(data)) {
|
|
26569
|
+
const getHeaders = _utils_js__rspack_import_1["default"].getSafeProp(data, 'getHeaders');
|
|
26570
|
+
|
|
25910
26571
|
if (
|
|
25911
26572
|
_platform_index_js__rspack_import_6["default"].hasStandardBrowserEnv ||
|
|
25912
26573
|
_platform_index_js__rspack_import_6["default"].hasStandardBrowserWebWorkerEnv ||
|
|
25913
26574
|
_utils_js__rspack_import_1["default"].isReactNative(data)
|
|
25914
26575
|
) {
|
|
25915
26576
|
headers.setContentType(undefined); // browser/web worker/RN handles it
|
|
25916
|
-
} else if (_utils_js__rspack_import_1["default"].isFunction(
|
|
26577
|
+
} else if (_utils_js__rspack_import_1["default"].isFunction(getHeaders)) {
|
|
25917
26578
|
// Node.js FormData (like form-data package)
|
|
25918
|
-
|
|
26579
|
+
(0,_core_setFormDataHeaders_js__rspack_import_7["default"])(headers, getHeaders.call(data), own('formDataHeaderPolicy'));
|
|
25919
26580
|
}
|
|
25920
26581
|
}
|
|
25921
26582
|
|
|
@@ -25932,10 +26593,10 @@ function resolveConfig(config) {
|
|
|
25932
26593
|
// and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking
|
|
25933
26594
|
// the XSRF token cross-origin.
|
|
25934
26595
|
const shouldSendXSRF =
|
|
25935
|
-
withXSRFToken === true || (withXSRFToken == null && (0,
|
|
26596
|
+
withXSRFToken === true || (withXSRFToken == null && (0,_isURLSameOrigin_js__rspack_import_8["default"])(newConfig.url));
|
|
25936
26597
|
|
|
25937
26598
|
if (shouldSendXSRF) {
|
|
25938
|
-
const xsrfValue = xsrfHeaderName && xsrfCookieName &&
|
|
26599
|
+
const xsrfValue = xsrfHeaderName && xsrfCookieName && _cookies_js__rspack_import_9["default"].read(xsrfCookieName);
|
|
25939
26600
|
|
|
25940
26601
|
if (xsrfValue) {
|
|
25941
26602
|
headers.set(xsrfHeaderName, xsrfValue);
|
|
@@ -26130,7 +26791,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26130
26791
|
* Throttle decorator
|
|
26131
26792
|
* @param {Function} fn
|
|
26132
26793
|
* @param {Number} freq
|
|
26133
|
-
* @return {Function}
|
|
26794
|
+
* @return {Array<Function>}
|
|
26134
26795
|
*/
|
|
26135
26796
|
function throttle(fn, freq) {
|
|
26136
26797
|
let timestamp = 0;
|
|
@@ -26165,8 +26826,9 @@ function throttle(fn, freq) {
|
|
|
26165
26826
|
};
|
|
26166
26827
|
|
|
26167
26828
|
const flush = () => lastArgs && invoke(lastArgs);
|
|
26829
|
+
const flushWith = (...args) => invoke(args);
|
|
26168
26830
|
|
|
26169
|
-
return [throttled, flush];
|
|
26831
|
+
return [throttled, flush, flushWith];
|
|
26170
26832
|
}
|
|
26171
26833
|
|
|
26172
26834
|
/* export default */ __webpack_exports__["default"] = (throttle);
|
|
@@ -26179,7 +26841,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26179
26841
|
/* import */ var _utils_js__rspack_import_0 = __webpack_require__(7275);
|
|
26180
26842
|
/* import */ var _core_AxiosError_js__rspack_import_2 = __webpack_require__(4062);
|
|
26181
26843
|
/* import */ var _platform_node_classes_FormData_js__rspack_import_1 = __webpack_require__(3119);
|
|
26182
|
-
/* provided dependency */ var Buffer = __webpack_require__(8287).Buffer;
|
|
26183
26844
|
|
|
26184
26845
|
|
|
26185
26846
|
|
|
@@ -26187,6 +26848,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26187
26848
|
// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
|
|
26188
26849
|
|
|
26189
26850
|
|
|
26851
|
+
|
|
26190
26852
|
// Default nesting limit shared with the inverse transform (formDataToJSON) so
|
|
26191
26853
|
// the FormData <-> JSON round-trip stays symmetric.
|
|
26192
26854
|
const DEFAULT_FORM_DATA_MAX_DEPTH = 100;
|
|
@@ -26280,28 +26942,18 @@ function toFormData(obj, formData, options) {
|
|
|
26280
26942
|
// eslint-disable-next-line no-param-reassign
|
|
26281
26943
|
formData = formData || new (_platform_node_classes_FormData_js__rspack_import_1["default"] || FormData)();
|
|
26282
26944
|
|
|
26283
|
-
|
|
26284
|
-
|
|
26285
|
-
|
|
26286
|
-
|
|
26287
|
-
metaTokens: true,
|
|
26288
|
-
dots: false,
|
|
26289
|
-
indexes: false,
|
|
26290
|
-
},
|
|
26291
|
-
false,
|
|
26292
|
-
function defined(option, source) {
|
|
26293
|
-
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
26294
|
-
return !_utils_js__rspack_import_0["default"].isUndefined(source[option]);
|
|
26295
|
-
}
|
|
26296
|
-
);
|
|
26945
|
+
const option = (name, fallback) => {
|
|
26946
|
+
const value = _utils_js__rspack_import_0["default"].getSafeProp(options, name);
|
|
26947
|
+
return _utils_js__rspack_import_0["default"].isUndefined(value) ? fallback : value;
|
|
26948
|
+
};
|
|
26297
26949
|
|
|
26298
|
-
const metaTokens =
|
|
26950
|
+
const metaTokens = option('metaTokens', true);
|
|
26299
26951
|
// eslint-disable-next-line no-use-before-define
|
|
26300
|
-
const visitor =
|
|
26301
|
-
const dots =
|
|
26302
|
-
const indexes =
|
|
26303
|
-
const _Blob =
|
|
26304
|
-
const maxDepth =
|
|
26952
|
+
const visitor = option('visitor') || defaultVisitor;
|
|
26953
|
+
const dots = option('dots', false);
|
|
26954
|
+
const indexes = option('indexes', false);
|
|
26955
|
+
const _Blob = option('Blob') || (typeof Blob !== 'undefined' && Blob);
|
|
26956
|
+
const maxDepth = option('maxDepth', DEFAULT_FORM_DATA_MAX_DEPTH);
|
|
26305
26957
|
const useBlob = _Blob && _utils_js__rspack_import_0["default"].isSpecCompliantForm(formData);
|
|
26306
26958
|
const stack = [];
|
|
26307
26959
|
|
|
@@ -26328,10 +26980,13 @@ function toFormData(obj, formData, options) {
|
|
|
26328
26980
|
if (useBlob && typeof _Blob === 'function') {
|
|
26329
26981
|
return new _Blob([value]);
|
|
26330
26982
|
}
|
|
26331
|
-
if (
|
|
26332
|
-
return
|
|
26983
|
+
if (_platform_node_classes_FormData_js__rspack_import_1["default"] && _platform_node_classes_FormData_js__rspack_import_1["default"].isBufferAvailable()) {
|
|
26984
|
+
return _platform_node_classes_FormData_js__rspack_import_1["default"].from(value);
|
|
26333
26985
|
}
|
|
26334
|
-
throw new _core_AxiosError_js__rspack_import_2["default"](
|
|
26986
|
+
throw new _core_AxiosError_js__rspack_import_2["default"](
|
|
26987
|
+
'Blob is not supported. Use a Buffer instead.',
|
|
26988
|
+
_core_AxiosError_js__rspack_import_2["default"].ERR_NOT_SUPPORT
|
|
26989
|
+
);
|
|
26335
26990
|
}
|
|
26336
26991
|
|
|
26337
26992
|
return value;
|
|
@@ -26876,12 +27531,65 @@ const hasOwnProperty = (
|
|
|
26876
27531
|
hasOwnProperty.call(obj, prop)
|
|
26877
27532
|
)(Object.prototype);
|
|
26878
27533
|
|
|
27534
|
+
const isUnsafeObjectKey = (prop) =>
|
|
27535
|
+
typeof prop === 'string' &&
|
|
27536
|
+
(prop === '__proto__' || prop === 'constructor' || prop === 'prototype');
|
|
27537
|
+
|
|
27538
|
+
/**
|
|
27539
|
+
* Determine whether an inherited object must be treated as a shared-prototype
|
|
27540
|
+
* boundary. Cross-realm Object.prototype objects cannot be distinguished
|
|
27541
|
+
* reliably from application-created null-prototype objects because their
|
|
27542
|
+
* properties are mutable, so all inherited terminal prototypes are excluded
|
|
27543
|
+
* as a fail-closed boundary. A null-prototype source still keeps its own
|
|
27544
|
+
* properties, as produced by mergeConfig and other safe materialization paths.
|
|
27545
|
+
*
|
|
27546
|
+
* @param {*} obj The object to inspect
|
|
27547
|
+
* @param {*} prototype The object's prototype
|
|
27548
|
+
* @param {boolean} source Whether obj is the original traversal source
|
|
27549
|
+
*
|
|
27550
|
+
* @returns {boolean} True when obj is a safe prototype traversal boundary
|
|
27551
|
+
*/
|
|
27552
|
+
const isPrototypeBoundary = (obj, prototype, source) =>
|
|
27553
|
+
obj === Object.prototype || (!source && prototype === null);
|
|
27554
|
+
|
|
27555
|
+
/**
|
|
27556
|
+
* Determine whether an object can retain its identity through code paths that
|
|
27557
|
+
* add, replace, and remove config properties without bypassing unsafe-key
|
|
27558
|
+
* filtering. Immutable objects, unsafe-key-bearing objects, and objects with
|
|
27559
|
+
* accessor or restricted data properties must be materialized instead.
|
|
27560
|
+
*
|
|
27561
|
+
* @param {*} obj The object to inspect
|
|
27562
|
+
*
|
|
27563
|
+
* @returns {boolean} True when every own property is safe and fully mutable
|
|
27564
|
+
*/
|
|
27565
|
+
const isSafeAndFullyMutable = (obj) => {
|
|
27566
|
+
if (!Object.isExtensible(obj)) {
|
|
27567
|
+
return false;
|
|
27568
|
+
}
|
|
27569
|
+
|
|
27570
|
+
const props = Object.getOwnPropertyNames(obj);
|
|
27571
|
+
|
|
27572
|
+
if (Object.getOwnPropertySymbols) {
|
|
27573
|
+
props.push(...Object.getOwnPropertySymbols(obj));
|
|
27574
|
+
}
|
|
27575
|
+
|
|
27576
|
+
return props.every((prop) => {
|
|
27577
|
+
if (isUnsafeObjectKey(prop)) {
|
|
27578
|
+
return false;
|
|
27579
|
+
}
|
|
27580
|
+
|
|
27581
|
+
const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
|
|
27582
|
+
|
|
27583
|
+
return !!descriptor && descriptor.configurable && descriptor.writable === true;
|
|
27584
|
+
});
|
|
27585
|
+
};
|
|
27586
|
+
|
|
26879
27587
|
/**
|
|
26880
|
-
* Walk the prototype chain (excluding the
|
|
26881
|
-
* an own `prop`. This distinguishes genuine own/inherited members
|
|
26882
|
-
* class accessors and template prototypes — from members injected
|
|
26883
|
-
* Object.prototype pollution (e.g. `Object.prototype.username = '...'`),
|
|
26884
|
-
* live on Object.prototype itself and are therefore never matched.
|
|
27588
|
+
* Walk the prototype chain (excluding the source realm's Object.prototype)
|
|
27589
|
+
* looking for an own `prop`. This distinguishes genuine own/inherited members
|
|
27590
|
+
* — including class accessors and template prototypes — from members injected
|
|
27591
|
+
* via Object.prototype pollution (e.g. `Object.prototype.username = '...'`),
|
|
27592
|
+
* which live on Object.prototype itself and are therefore never matched.
|
|
26885
27593
|
*
|
|
26886
27594
|
* @param {*} thing The value whose chain to inspect
|
|
26887
27595
|
* @param {string|symbol} prop The property key to look for
|
|
@@ -26892,16 +27600,22 @@ const hasOwnInPrototypeChain = (thing, prop) => {
|
|
|
26892
27600
|
let obj = thing;
|
|
26893
27601
|
const seen = [];
|
|
26894
27602
|
|
|
26895
|
-
while (obj != null
|
|
27603
|
+
while (obj != null) {
|
|
26896
27604
|
if (seen.indexOf(obj) !== -1) {
|
|
26897
27605
|
return false;
|
|
26898
27606
|
}
|
|
26899
27607
|
seen.push(obj);
|
|
26900
27608
|
|
|
27609
|
+
const prototype = getPrototypeOf(obj);
|
|
27610
|
+
|
|
27611
|
+
if (isPrototypeBoundary(obj, prototype, obj === thing)) {
|
|
27612
|
+
return false;
|
|
27613
|
+
}
|
|
27614
|
+
|
|
26901
27615
|
if (hasOwnProperty(obj, prop)) {
|
|
26902
27616
|
return true;
|
|
26903
27617
|
}
|
|
26904
|
-
obj =
|
|
27618
|
+
obj = prototype;
|
|
26905
27619
|
}
|
|
26906
27620
|
return false;
|
|
26907
27621
|
};
|
|
@@ -26920,6 +27634,69 @@ const hasOwnInPrototypeChain = (thing, prop) => {
|
|
|
26920
27634
|
const getSafeProp = (obj, prop) =>
|
|
26921
27635
|
obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined;
|
|
26922
27636
|
|
|
27637
|
+
/**
|
|
27638
|
+
* Flatten an object and its application-defined prototype chain into a
|
|
27639
|
+
* null-prototype object. Members inherited only from the source realm's
|
|
27640
|
+
* Object.prototype are deliberately excluded, while class/template members
|
|
27641
|
+
* below that boundary are preserved.
|
|
27642
|
+
*
|
|
27643
|
+
* @param {*} thing The value to flatten
|
|
27644
|
+
*
|
|
27645
|
+
* @returns {*} A null-prototype copy, or the original value when it is already
|
|
27646
|
+
* structurally safe or is not an object
|
|
27647
|
+
*/
|
|
27648
|
+
const toSafeFlatObject = (thing) => {
|
|
27649
|
+
if (thing == null || (typeof thing !== 'object' && typeof thing !== 'function')) {
|
|
27650
|
+
return thing;
|
|
27651
|
+
}
|
|
27652
|
+
|
|
27653
|
+
const sourcePrototype = getPrototypeOf(thing);
|
|
27654
|
+
|
|
27655
|
+
if (sourcePrototype === null && isSafeAndFullyMutable(thing)) {
|
|
27656
|
+
return thing;
|
|
27657
|
+
}
|
|
27658
|
+
|
|
27659
|
+
const result = Object.create(null);
|
|
27660
|
+
const merged = Object.create(null);
|
|
27661
|
+
const seen = [];
|
|
27662
|
+
let current = thing;
|
|
27663
|
+
|
|
27664
|
+
while (current != null) {
|
|
27665
|
+
if (seen.indexOf(current) !== -1) {
|
|
27666
|
+
break;
|
|
27667
|
+
}
|
|
27668
|
+
|
|
27669
|
+
seen.push(current);
|
|
27670
|
+
|
|
27671
|
+
const prototype = current === thing ? sourcePrototype : getPrototypeOf(current);
|
|
27672
|
+
|
|
27673
|
+
if (isPrototypeBoundary(current, prototype, current === thing)) {
|
|
27674
|
+
break;
|
|
27675
|
+
}
|
|
27676
|
+
|
|
27677
|
+
const props = Object.getOwnPropertyNames(current);
|
|
27678
|
+
|
|
27679
|
+
if (Object.getOwnPropertySymbols) {
|
|
27680
|
+
props.push(...Object.getOwnPropertySymbols(current));
|
|
27681
|
+
}
|
|
27682
|
+
|
|
27683
|
+
for (const prop of props) {
|
|
27684
|
+
if (isUnsafeObjectKey(prop)) {
|
|
27685
|
+
continue;
|
|
27686
|
+
}
|
|
27687
|
+
|
|
27688
|
+
if (!hasOwnProperty(merged, prop)) {
|
|
27689
|
+
result[prop] = thing[prop];
|
|
27690
|
+
merged[prop] = true;
|
|
27691
|
+
}
|
|
27692
|
+
}
|
|
27693
|
+
|
|
27694
|
+
current = prototype;
|
|
27695
|
+
}
|
|
27696
|
+
|
|
27697
|
+
return result;
|
|
27698
|
+
};
|
|
27699
|
+
|
|
26923
27700
|
const kindOf = ((cache) => (thing) => {
|
|
26924
27701
|
const str = toString.call(thing);
|
|
26925
27702
|
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
@@ -27051,12 +27828,10 @@ const isPlainObject = (val) => {
|
|
|
27051
27828
|
|
|
27052
27829
|
const prototype = getPrototypeOf(val);
|
|
27053
27830
|
return (
|
|
27054
|
-
(prototype === null ||
|
|
27055
|
-
|
|
27056
|
-
|
|
27057
|
-
//
|
|
27058
|
-
// Symbol.iterator as evidence the value is a tagged/iterable type rather
|
|
27059
|
-
// than a plain object, while ignoring keys injected onto Object.prototype.
|
|
27831
|
+
(prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) &&
|
|
27832
|
+
// Treat safe own/inherited Symbol.toStringTag or Symbol.iterator members as
|
|
27833
|
+
// evidence the value is tagged/iterable, while ignoring members reachable
|
|
27834
|
+
// only through shared or terminal prototype boundaries.
|
|
27060
27835
|
!hasOwnInPrototypeChain(val, toStringTag) &&
|
|
27061
27836
|
!hasOwnInPrototypeChain(val, iterator)
|
|
27062
27837
|
);
|
|
@@ -27143,6 +27918,7 @@ const isBlob = kindOfTest('Blob');
|
|
|
27143
27918
|
* @returns {boolean} True if value is a FileList, otherwise false
|
|
27144
27919
|
*/
|
|
27145
27920
|
const isFileList = kindOfTest('FileList');
|
|
27921
|
+
const isSet = kindOfTest('Set');
|
|
27146
27922
|
|
|
27147
27923
|
/**
|
|
27148
27924
|
* Determine if a value is a Stream
|
|
@@ -27708,12 +28484,23 @@ const toJSONObject = (obj) => {
|
|
|
27708
28484
|
if (!('toJSON' in source)) {
|
|
27709
28485
|
// add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230).
|
|
27710
28486
|
visited.add(source);
|
|
27711
|
-
const target = isArray(source) ? [] : {};
|
|
27712
28487
|
|
|
27713
|
-
|
|
27714
|
-
|
|
27715
|
-
|
|
27716
|
-
|
|
28488
|
+
let target;
|
|
28489
|
+
|
|
28490
|
+
if (isSet(source)) {
|
|
28491
|
+
target = [];
|
|
28492
|
+
for (const value of source) {
|
|
28493
|
+
const reducedValue = visit(value);
|
|
28494
|
+
!isUndefined(reducedValue) && target.push(reducedValue);
|
|
28495
|
+
}
|
|
28496
|
+
} else {
|
|
28497
|
+
target = isArray(source) ? [] : {};
|
|
28498
|
+
|
|
28499
|
+
forEach(source, (value, key) => {
|
|
28500
|
+
const reducedValue = visit(value);
|
|
28501
|
+
!isUndefined(reducedValue) && (target[key] = reducedValue);
|
|
28502
|
+
});
|
|
28503
|
+
}
|
|
27717
28504
|
|
|
27718
28505
|
visited.delete(source);
|
|
27719
28506
|
|
|
@@ -27858,6 +28645,7 @@ const isSafeIterable = (thing) =>
|
|
|
27858
28645
|
hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
|
|
27859
28646
|
hasOwnInPrototypeChain,
|
|
27860
28647
|
getSafeProp,
|
|
28648
|
+
toSafeFlatObject,
|
|
27861
28649
|
reduceDescriptors,
|
|
27862
28650
|
freezeMethods,
|
|
27863
28651
|
toObjectSet,
|