@iflyrpa/actions 4.0.7 → 4.0.8-beta.0

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/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="23a118d5-7504-553a-869b-7251d1fda8eb")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5f09a939-272d-5019-8b8d-7fde9f1a0f9f")}catch(e){}}();
3
3
  var __webpack_modules__ = {
4
4
  "./src/utils/XhsXsCommonEnc.js": function(module) {
5
5
  var encrypt_lookup = [
@@ -4402,9 +4402,7 @@ var __webpack_exports__ = {};
4402
4402
  });
4403
4403
  const package_json_namespaceObject = require("@iflyrpa/share/package.json");
4404
4404
  var package_json_default = /*#__PURE__*/ __webpack_require__.n(package_json_namespaceObject);
4405
- var package_namespaceObject = {
4406
- i8: "4.0.7"
4407
- };
4405
+ var package_namespaceObject = JSON.parse('{"i8":"4.0.8-beta.0"}');
4408
4406
  const share_namespaceObject = require("@iflyrpa/share");
4409
4407
  const external_node_fs_namespaceObject = require("node:fs");
4410
4408
  var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
@@ -4507,15 +4505,14 @@ var __webpack_exports__ = {};
4507
4505
  }
4508
4506
  return `socks5h://${ip}:${port}`;
4509
4507
  }
4510
- async function ProxyAgent(task, ip, adr, accountId, refresh) {
4508
+ async function ProxyAgent(task, addr, accountId, refresh) {
4511
4509
  const http = new Http({
4512
4510
  headers: {
4513
4511
  "content-type": "application/json"
4514
4512
  }
4515
4513
  });
4516
4514
  const params = {
4517
- ip: ip,
4518
- addr: adr || null,
4515
+ addr: addr || null,
4519
4516
  accountId: accountId
4520
4517
  };
4521
4518
  const ProxyInfo = await http.api({
@@ -4537,7 +4534,7 @@ var __webpack_exports__ = {};
4537
4534
  data: ProxyInfo.data
4538
4535
  }
4539
4536
  };
4540
- task.logger?.info(`请求代理:区域:${params.addr}, IP:${params.ip}, AccountId:${params.accountId}, 返回代理信息: ${ProxyInfo.data ? `${ProxyInfo.data.proxyIp}:${ProxyInfo.data.proxyPort}` : "无可用代理"}`, loggerInfo);
4537
+ task.logger?.info(`请求代理:区域:${params.addr}, AccountId:${params.accountId}, 返回代理信息: ${ProxyInfo.data ? `${ProxyInfo.data.proxyIp}:${ProxyInfo.data.proxyPort}` : "无可用代理"}`, loggerInfo);
4541
4538
  const proxyAgent = "000000" === ProxyInfo.code && ProxyInfo.data ? {
4542
4539
  ip: ProxyInfo.data.proxyIp,
4543
4540
  port: ProxyInfo.data.proxyPort,
@@ -4554,16 +4551,16 @@ var __webpack_exports__ = {};
4554
4551
  data: error
4555
4552
  };
4556
4553
  }
4557
- constructor(config, logger, adr, ip, accountId, platform){
4554
+ constructor(config, logger, addr, accountId, platform){
4558
4555
  this.agentPromise = void 0;
4559
4556
  this.apiClient = external_axios_default().create({
4560
4557
  ...config
4561
4558
  });
4562
4559
  this.logger = logger;
4563
4560
  this.platform = platform;
4564
- if (ip) this.agentPromise = ProxyAgent({
4561
+ if (addr) this.agentPromise = ProxyAgent({
4565
4562
  logger
4566
- }, ip, adr, accountId);
4563
+ }, addr, accountId);
4567
4564
  this.addResponseInterceptor(()=>void 0);
4568
4565
  }
4569
4566
  clearResponseInterceptors() {
@@ -8723,16 +8720,11 @@ var __webpack_exports__ = {};
8723
8720
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
8724
8721
  let executionState;
8725
8722
  let proxyUrl;
8726
- if (params.localIP) {
8727
- const args = [
8728
- params.localIP,
8729
- params.proxyLoc,
8730
- params.accountId
8731
- ];
8732
- task.logger?.info(`==> 开始获取代理信息:${args}`);
8723
+ if (params.proxyLoc) {
8724
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
8733
8725
  const ProxyAgentResult = await ProxyAgent({
8734
8726
  logger: task.logger
8735
- }, ...args);
8727
+ }, params.proxyLoc, params.accountId);
8736
8728
  task.logger?.info("==> 代理信息获取成功!");
8737
8729
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
8738
8730
  }
@@ -9077,7 +9069,6 @@ var __webpack_exports__ = {};
9077
9069
  },
9078
9070
  task.logger,
9079
9071
  params.proxyLoc,
9080
- params.localIP,
9081
9072
  params.accountId,
9082
9073
  "baijiahao"
9083
9074
  ];
@@ -9283,7 +9274,6 @@ var __webpack_exports__ = {};
9283
9274
  enverionment: task.enverionment || "development",
9284
9275
  postId: params.articleId,
9285
9276
  eip: proxyHttp.proxyInfo,
9286
- proxyIp: params.localIP,
9287
9277
  accountId: params.accountId,
9288
9278
  uid: params.uid,
9289
9279
  platform: "baijiahao",
@@ -9804,7 +9794,6 @@ var __webpack_exports__ = {};
9804
9794
  },
9805
9795
  _task.logger,
9806
9796
  params.proxyLoc,
9807
- params.localIP,
9808
9797
  params.accountId
9809
9798
  ];
9810
9799
  const http = new Http(...args);
@@ -10934,7 +10923,7 @@ var __webpack_exports__ = {};
10934
10923
  heapTotal: `${Math.round(process.memoryUsage().heapTotal / 1024 / 1024)} MB`
10935
10924
  },
10936
10925
  accountId: params.accountId,
10937
- hasProxy: !!(params.proxyLoc || params.localIP)
10926
+ hasProxy: !!params.proxyLoc
10938
10927
  });
10939
10928
  }
10940
10929
  const check = {
@@ -10957,7 +10946,6 @@ var __webpack_exports__ = {};
10957
10946
  },
10958
10947
  _task.logger,
10959
10948
  params.proxyLoc,
10960
- params.localIP,
10961
10949
  params.accountId
10962
10950
  ];
10963
10951
  const http = new Http(...args);
@@ -10988,7 +10976,7 @@ var __webpack_exports__ = {};
10988
10976
  heapUsed: `${Math.round(process.memoryUsage().heapUsed / 1024 / 1024)} MB`,
10989
10977
  heapTotal: `${Math.round(process.memoryUsage().heapTotal / 1024 / 1024)} MB`
10990
10978
  },
10991
- hasProxy: !!(params.proxyLoc || params.localIP),
10979
+ hasProxy: !!params.proxyLoc,
10992
10980
  timeSinceLastLog: Date.now() - lastEnvLogTime
10993
10981
  }
10994
10982
  });
@@ -11391,7 +11379,6 @@ var __webpack_exports__ = {};
11391
11379
  },
11392
11380
  _task.logger,
11393
11381
  params.proxyLoc,
11394
- params.localIP,
11395
11382
  params.accountId
11396
11383
  ];
11397
11384
  const http = new Http(...args);
@@ -11478,7 +11465,6 @@ var __webpack_exports__ = {};
11478
11465
  },
11479
11466
  _task.logger,
11480
11467
  params.proxyLoc,
11481
- params.localIP,
11482
11468
  params.accountId
11483
11469
  ];
11484
11470
  const http = new Http(...args);
@@ -11569,7 +11555,6 @@ var __webpack_exports__ = {};
11569
11555
  },
11570
11556
  _task.logger,
11571
11557
  params.proxyLoc,
11572
- params.localIP,
11573
11558
  params.accountId
11574
11559
  ];
11575
11560
  const http = new Http(...args);
@@ -11655,7 +11640,6 @@ var __webpack_exports__ = {};
11655
11640
  },
11656
11641
  _task.logger,
11657
11642
  params.proxyLoc,
11658
- params.localIP,
11659
11643
  params.accountId
11660
11644
  ];
11661
11645
  const http = new Http(...args);
@@ -11739,7 +11723,6 @@ var __webpack_exports__ = {};
11739
11723
  },
11740
11724
  _task.logger,
11741
11725
  params.proxyLoc,
11742
- params.localIP,
11743
11726
  params.accountId
11744
11727
  ];
11745
11728
  const http = new Http(...args);
@@ -11835,7 +11818,6 @@ var __webpack_exports__ = {};
11835
11818
  },
11836
11819
  _task.logger,
11837
11820
  params.proxyLoc,
11838
- params.localIP,
11839
11821
  params.accountId
11840
11822
  ];
11841
11823
  const http = new Http(...args);
@@ -11935,7 +11917,6 @@ var __webpack_exports__ = {};
11935
11917
  },
11936
11918
  _task.logger,
11937
11919
  params.proxyLoc,
11938
- params.localIP,
11939
11920
  params.accountId
11940
11921
  ];
11941
11922
  const http = new Http(...args);
@@ -12081,7 +12062,6 @@ var __webpack_exports__ = {};
12081
12062
  },
12082
12063
  _task.logger,
12083
12064
  params.proxyLoc,
12084
- params.localIP,
12085
12065
  params.accountId
12086
12066
  ];
12087
12067
  const http = new Http(...args);
@@ -12169,7 +12149,6 @@ var __webpack_exports__ = {};
12169
12149
  },
12170
12150
  _task.logger,
12171
12151
  params.proxyLoc,
12172
- params.localIP,
12173
12152
  params.accountId
12174
12153
  ];
12175
12154
  const http = new Http(...args);
@@ -12257,7 +12236,6 @@ var __webpack_exports__ = {};
12257
12236
  },
12258
12237
  _task.logger,
12259
12238
  params.proxyLoc,
12260
- params.localIP,
12261
12239
  params.accountId
12262
12240
  ];
12263
12241
  const http = new Http(...args);
@@ -12478,7 +12456,6 @@ var __webpack_exports__ = {};
12478
12456
  },
12479
12457
  _task.logger,
12480
12458
  params.proxyLoc,
12481
- params.localIP,
12482
12459
  params.accountId
12483
12460
  ];
12484
12461
  const http = new Http(...args);
@@ -12840,16 +12817,11 @@ var __webpack_exports__ = {};
12840
12817
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
12841
12818
  let executionState;
12842
12819
  let proxyUrl;
12843
- if (params.localIP) {
12844
- const args = [
12845
- params.localIP,
12846
- params.proxyLoc,
12847
- params.accountId
12848
- ];
12849
- task.logger?.info(`==> 开始获取代理信息:${args}`);
12820
+ if (params.proxyLoc) {
12821
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
12850
12822
  const ProxyAgentResult = await ProxyAgent({
12851
12823
  logger: task.logger
12852
- }, ...args);
12824
+ }, params.proxyLoc, params.accountId);
12853
12825
  task.logger?.info("==> 代理信息获取成功!");
12854
12826
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
12855
12827
  }
@@ -13462,7 +13434,7 @@ var __webpack_exports__ = {};
13462
13434
  }
13463
13435
  const mock_mockAction = async (task, params)=>{
13464
13436
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
13465
- if (!params.extraParam || !params.extraParam["security-sdk/s_sdk_pri_key"] || !params.extraParam["security-sdk/s_sdk_pub_key"] || !params.extraParam["security-sdk/s_sdk_sign_data_key/web_protect"] || !params.extraParam["security-sdk/s_sdk_server_cert_key"] || !params.extraParam["security-sdk/s_sdk_crypt_sdk"]) return (0, share_namespaceObject.response)(414, "extraParam 参数缺失或不完整", "");
13437
+ if (!params.extraParam || !params.extraParam["security-sdk/s_sdk_sign_data_key/web_protect"] || !params.extraParam["security-sdk/s_sdk_server_cert_key"] || !params.extraParam["security-sdk/s_sdk_crypt_sdk"]) return (0, share_namespaceObject.response)(414, "extraParam 参数缺失或不完整", "");
13466
13438
  let currentStep = "初始化";
13467
13439
  try {
13468
13440
  currentStep = "验证账号信息";
@@ -13548,8 +13520,7 @@ var __webpack_exports__ = {};
13548
13520
  headers
13549
13521
  },
13550
13522
  task.logger,
13551
- "",
13552
- "",
13523
+ params.proxyLoc,
13553
13524
  params.accountId,
13554
13525
  "douyin"
13555
13526
  ];
@@ -13822,7 +13793,6 @@ var __webpack_exports__ = {};
13822
13793
  enverionment: task.enverionment || "development",
13823
13794
  postId: params.articleId,
13824
13795
  eip: proxyHttp.proxyInfo,
13825
- proxyIp: params.localIP,
13826
13796
  accountId: params.accountId,
13827
13797
  uid: params.uid,
13828
13798
  platform: "douyin",
@@ -14185,18 +14155,13 @@ var __webpack_exports__ = {};
14185
14155
  return (0, share_namespaceObject.downloadImage)(url, external_node_path_default().join(tmpCachePath, fileName));
14186
14156
  }));
14187
14157
  let proxyUrl;
14188
- if (params.localIP) {
14189
- const args = [
14190
- params.localIP,
14191
- params.proxyLoc,
14192
- params.accountId
14193
- ];
14194
- task.logger?.info(`==> 开始获取代理信息:${args}`);
14195
- const proxyAgentResult = await ProxyAgent({
14158
+ if (params.proxyLoc) {
14159
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
14160
+ const ProxyAgentResult = await ProxyAgent({
14196
14161
  logger: task.logger
14197
- }, ...args);
14162
+ }, params.proxyLoc, params.accountId);
14198
14163
  task.logger?.info("==> 代理信息获取成功!");
14199
- proxyUrl = proxyAgentResult ? `http://${proxyAgentResult.ip}:${proxyAgentResult.port}` : void 0;
14164
+ proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
14200
14165
  }
14201
14166
  const commonCookies = {
14202
14167
  path: "/",
@@ -15153,7 +15118,6 @@ var __webpack_exports__ = {};
15153
15118
  },
15154
15119
  _task.logger,
15155
15120
  params.proxyLoc,
15156
- params.localIP,
15157
15121
  params.accountId
15158
15122
  ];
15159
15123
  const http = new Http(...args);
@@ -15211,7 +15175,6 @@ var __webpack_exports__ = {};
15211
15175
  },
15212
15176
  _task.logger,
15213
15177
  params.proxyLoc,
15214
- params.localIP,
15215
15178
  params.accountId
15216
15179
  ];
15217
15180
  const http = new Http(...args);
@@ -15258,7 +15221,6 @@ var __webpack_exports__ = {};
15258
15221
  },
15259
15222
  _task.logger,
15260
15223
  params.proxyLoc,
15261
- params.localIP,
15262
15224
  params.accountId
15263
15225
  ];
15264
15226
  const http = new Http(...args);
@@ -15320,7 +15282,6 @@ var __webpack_exports__ = {};
15320
15282
  },
15321
15283
  _task.logger,
15322
15284
  params.proxyLoc,
15323
- params.localIP,
15324
15285
  params.accountId
15325
15286
  ];
15326
15287
  const http = new Http(...args);
@@ -15428,7 +15389,6 @@ var __webpack_exports__ = {};
15428
15389
  },
15429
15390
  _task.logger,
15430
15391
  params.proxyLoc,
15431
- params.localIP,
15432
15392
  params.accountId
15433
15393
  ];
15434
15394
  const http = new Http(...args);
@@ -15535,7 +15495,6 @@ var __webpack_exports__ = {};
15535
15495
  },
15536
15496
  _task.logger,
15537
15497
  params.proxyLoc,
15538
- params.localIP,
15539
15498
  params.accountId
15540
15499
  ];
15541
15500
  const http = new Http(...args);
@@ -15766,7 +15725,6 @@ var __webpack_exports__ = {};
15766
15725
  },
15767
15726
  _task.logger,
15768
15727
  params.proxyLoc,
15769
- params.localIP,
15770
15728
  params.accountId
15771
15729
  ];
15772
15730
  const http = new Http(...args);
@@ -16099,7 +16057,6 @@ var __webpack_exports__ = {};
16099
16057
  },
16100
16058
  _task.logger,
16101
16059
  params.proxyLoc,
16102
- params.localIP,
16103
16060
  params.accountId
16104
16061
  ];
16105
16062
  const http = new Http(...args);
@@ -16205,7 +16162,6 @@ var __webpack_exports__ = {};
16205
16162
  },
16206
16163
  _task.logger,
16207
16164
  params.proxyLoc,
16208
- params.localIP,
16209
16165
  params.accountId
16210
16166
  ];
16211
16167
  const http = new Http(...args);
@@ -16670,7 +16626,6 @@ var __webpack_exports__ = {};
16670
16626
  },
16671
16627
  _task.logger,
16672
16628
  params.proxyLoc,
16673
- params.localIP,
16674
16629
  params.accountId
16675
16630
  ];
16676
16631
  const http = new Http(...args);
@@ -17001,7 +16956,6 @@ var __webpack_exports__ = {};
17001
16956
  },
17002
16957
  _task.logger,
17003
16958
  params.proxyLoc,
17004
- params.localIP,
17005
16959
  params.accountId
17006
16960
  ];
17007
16961
  const http = new Http(...args);
@@ -17054,7 +17008,6 @@ var __webpack_exports__ = {};
17054
17008
  },
17055
17009
  _task.logger,
17056
17010
  params.proxyLoc,
17057
- params.localIP,
17058
17011
  params.accountId
17059
17012
  ];
17060
17013
  const http = new Http(...args);
@@ -17107,7 +17060,6 @@ var __webpack_exports__ = {};
17107
17060
  },
17108
17061
  _task.logger,
17109
17062
  params.proxyLoc,
17110
- params.localIP,
17111
17063
  params.accountId
17112
17064
  ];
17113
17065
  const http = new Http(...args);
@@ -17154,7 +17106,6 @@ var __webpack_exports__ = {};
17154
17106
  },
17155
17107
  _task.logger,
17156
17108
  params.proxyLoc,
17157
- params.localIP,
17158
17109
  params.accountId
17159
17110
  ];
17160
17111
  const http = new Http(...args);
@@ -17193,7 +17144,6 @@ var __webpack_exports__ = {};
17193
17144
  },
17194
17145
  _task.logger,
17195
17146
  params.proxyLoc,
17196
- params.localIP,
17197
17147
  params.accountId
17198
17148
  ];
17199
17149
  const http = new Http(...args);
@@ -17255,7 +17205,6 @@ var __webpack_exports__ = {};
17255
17205
  },
17256
17206
  _task.logger,
17257
17207
  params.proxyLoc,
17258
- params.localIP,
17259
17208
  params.accountId
17260
17209
  ];
17261
17210
  const http = new Http(...args);
@@ -17312,7 +17261,6 @@ var __webpack_exports__ = {};
17312
17261
  },
17313
17262
  _task.logger,
17314
17263
  params.proxyLoc,
17315
- params.localIP,
17316
17264
  params.accountId
17317
17265
  ];
17318
17266
  const http = new Http(...args);
@@ -17398,7 +17346,6 @@ var __webpack_exports__ = {};
17398
17346
  },
17399
17347
  _task.logger,
17400
17348
  params.proxyLoc,
17401
- params.localIP,
17402
17349
  params.accountId
17403
17350
  ];
17404
17351
  const http = new Http(...args);
@@ -17486,7 +17433,6 @@ var __webpack_exports__ = {};
17486
17433
  },
17487
17434
  _task.logger,
17488
17435
  params.proxyLoc,
17489
- params.localIP,
17490
17436
  params.accountId
17491
17437
  ];
17492
17438
  const http = new Http(...args);
@@ -17596,7 +17542,6 @@ var __webpack_exports__ = {};
17596
17542
  },
17597
17543
  _task.logger,
17598
17544
  params.proxyLoc,
17599
- params.localIP,
17600
17545
  params.accountId
17601
17546
  ];
17602
17547
  const http = new Http(...args);
@@ -17874,16 +17819,11 @@ var __webpack_exports__ = {};
17874
17819
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
17875
17820
  let executionState;
17876
17821
  let proxyUrl;
17877
- if (params.localIP) {
17878
- const args = [
17879
- params.localIP,
17880
- params.proxyLoc,
17881
- params.accountId
17882
- ];
17883
- task.logger?.info(`==> 开始获取代理信息:${args}`);
17822
+ if (params.proxyLoc) {
17823
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
17884
17824
  const ProxyAgentResult = await ProxyAgent({
17885
17825
  logger: task.logger
17886
- }, ...args);
17826
+ }, params.proxyLoc, params.accountId);
17887
17827
  task.logger?.info("==> 代理信息获取成功!");
17888
17828
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
17889
17829
  }
@@ -18710,7 +18650,6 @@ var __webpack_exports__ = {};
18710
18650
  enverionment: confParams.enverionment || "development",
18711
18651
  postId: confParams.articleId,
18712
18652
  eip: proxyHttp.proxyInfo,
18713
- proxyIp: confParams.proxyIp,
18714
18653
  accountId: confParams.accountId,
18715
18654
  uid: confParams.uid,
18716
18655
  publishParams: publishData,
@@ -18737,7 +18676,6 @@ var __webpack_exports__ = {};
18737
18676
  },
18738
18677
  task.logger,
18739
18678
  params.proxyLoc,
18740
- params.localIP,
18741
18679
  params.accountId,
18742
18680
  "shipinhao"
18743
18681
  ];
@@ -18808,7 +18746,6 @@ var __webpack_exports__ = {};
18808
18746
  articleId: params.articleId,
18809
18747
  postId: params.articleId,
18810
18748
  eip: proxyHttp.proxyInfo,
18811
- proxyIp: params.localIP,
18812
18749
  accountId: params.accountId,
18813
18750
  uid: params.uid
18814
18751
  }, {
@@ -19195,16 +19132,11 @@ var __webpack_exports__ = {};
19195
19132
  return (0, share_namespaceObject.downloadImage)(url, external_node_path_default().join(tmpCachePath, fileName));
19196
19133
  }));
19197
19134
  let proxyUrl;
19198
- if (params.localIP) {
19199
- const args = [
19200
- params.localIP,
19201
- params.proxyLoc,
19202
- params.accountId
19203
- ];
19204
- task.logger?.info(`==> 开始获取代理信息:${args}`);
19135
+ if (params.proxyLoc) {
19136
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
19205
19137
  const ProxyAgentResult = await ProxyAgent({
19206
19138
  logger: task.logger
19207
- }, ...args);
19139
+ }, params.proxyLoc, params.accountId);
19208
19140
  task.logger?.info("==> 代理信息获取成功!");
19209
19141
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
19210
19142
  }
@@ -19854,16 +19786,11 @@ var __webpack_exports__ = {};
19854
19786
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
19855
19787
  let executionState;
19856
19788
  let proxyUrl;
19857
- if (params.localIP) {
19858
- const args = [
19859
- params.localIP,
19860
- params.proxyLoc,
19861
- params.accountId
19862
- ];
19863
- task.logger?.info(`==> 开始获取代理信息:${args}`);
19789
+ if (params.proxyLoc) {
19790
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
19864
19791
  const ProxyAgentResult = await ProxyAgent({
19865
19792
  logger: task.logger
19866
- }, ...args);
19793
+ }, params.proxyLoc, params.accountId);
19867
19794
  task.logger?.info("==> 代理信息获取成功!");
19868
19795
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
19869
19796
  }
@@ -20114,7 +20041,6 @@ var __webpack_exports__ = {};
20114
20041
  },
20115
20042
  task.logger,
20116
20043
  params.proxyLoc,
20117
- params.localIP,
20118
20044
  params.accountId,
20119
20045
  "toutiao"
20120
20046
  ];
@@ -20312,7 +20238,6 @@ var __webpack_exports__ = {};
20312
20238
  enverionment: task.enverionment || "development",
20313
20239
  postId: params.articleId,
20314
20240
  eip: proxyHttp.proxyInfo,
20315
- proxyIp: params.localIP,
20316
20241
  accountId: params.accountId,
20317
20242
  uid: params.uid,
20318
20243
  platform: "toutiao",
@@ -20947,16 +20872,11 @@ var __webpack_exports__ = {};
20947
20872
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
20948
20873
  let executionState;
20949
20874
  let proxyUrl;
20950
- if (params.localIP) {
20951
- const args = [
20952
- params.localIP,
20953
- params.proxyLoc,
20954
- params.accountId
20955
- ];
20956
- task.logger?.info(`==> 开始获取代理信息:${args}`);
20875
+ if (params.proxyLoc) {
20876
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
20957
20877
  const ProxyAgentResult = await ProxyAgent({
20958
20878
  logger: task.logger
20959
- }, ...args);
20879
+ }, params.proxyLoc, params.accountId);
20960
20880
  task.logger?.info("==> 代理信息获取成功!");
20961
20881
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
20962
20882
  }
@@ -21448,7 +21368,6 @@ var __webpack_exports__ = {};
21448
21368
  },
21449
21369
  task.logger,
21450
21370
  params.proxyLoc,
21451
- params.localIP,
21452
21371
  params.accountId,
21453
21372
  "weixin"
21454
21373
  ];
@@ -22227,7 +22146,6 @@ var __webpack_exports__ = {};
22227
22146
  enverionment: task.enverionment || "development",
22228
22147
  postId: params.articleId,
22229
22148
  eip: proxyHttp.proxyInfo,
22230
- proxyIp: params.localIP,
22231
22149
  accountId: params.accountId,
22232
22150
  uid: params.uid,
22233
22151
  platform: "weixin",
@@ -23032,16 +22950,11 @@ var __webpack_exports__ = {};
23032
22950
  const reporter = task.reportService?.reportLoginStatus ?? (()=>Promise.resolve());
23033
22951
  let executionState;
23034
22952
  let proxyUrl;
23035
- if (params.localIP) {
23036
- const args = [
23037
- params.localIP,
23038
- params.proxyLoc,
23039
- params.accountId
23040
- ];
23041
- task.logger?.info(`==> 开始获取代理信息:${args}`);
22953
+ if (params.proxyLoc) {
22954
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
23042
22955
  const ProxyAgentResult = await ProxyAgent({
23043
22956
  logger: task.logger
23044
- }, ...args);
22957
+ }, params.proxyLoc, params.accountId);
23045
22958
  task.logger?.info("==> 代理信息获取成功!");
23046
22959
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
23047
22960
  }
@@ -23358,7 +23271,6 @@ var __webpack_exports__ = {};
23358
23271
  },
23359
23272
  task.logger,
23360
23273
  params.proxyLoc,
23361
- params.localIP,
23362
23274
  params.accountId,
23363
23275
  "xiaohongshu"
23364
23276
  ];
@@ -23399,8 +23311,8 @@ var __webpack_exports__ = {};
23399
23311
  params: fetchCoverParams
23400
23312
  }, {
23401
23313
  retries: 3,
23402
- retryDelay: 20,
23403
- timeout: 3000
23314
+ retryDelay: 500,
23315
+ timeout: 30000
23404
23316
  });
23405
23317
  for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
23406
23318
  bucket: item.bucket || "",
@@ -23419,8 +23331,8 @@ var __webpack_exports__ = {};
23419
23331
  params: fetchCoverParams
23420
23332
  }, {
23421
23333
  retries: 3,
23422
- retryDelay: 20,
23423
- timeout: 3000
23334
+ retryDelay: 500,
23335
+ timeout: 30000
23424
23336
  });
23425
23337
  for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
23426
23338
  bucket: item.bucket || "",
@@ -23481,7 +23393,9 @@ var __webpack_exports__ = {};
23481
23393
  headers: {
23482
23394
  "x-cos-security-token": ossToken
23483
23395
  },
23484
- defaultErrorMsg: "图片上传异常,请稍后重试发布。"
23396
+ defaultErrorMsg: "图片上传异常,请稍后重试。"
23397
+ }, {
23398
+ timeout: 60000
23485
23399
  });
23486
23400
  return {
23487
23401
  ossFileId,
@@ -23491,6 +23405,8 @@ var __webpack_exports__ = {};
23491
23405
  originSize
23492
23406
  };
23493
23407
  } catch (error) {
23408
+ const e = Http.handleApiError(error);
23409
+ task.logger.warn(`[xhs upload] 第${attempt + 1}次失败 index=${index} bucket=${ossBucketIndex} domain=${ossDomain} fileId=${ossFileId} code=${e.code} msg=${e.message} data=${stringifyError(e.data)}`);
23494
23410
  attempt++;
23495
23411
  }
23496
23412
  }
@@ -23724,7 +23640,6 @@ var __webpack_exports__ = {};
23724
23640
  enverionment: task.enverionment || "development",
23725
23641
  postId: params.articleId,
23726
23642
  eip: proxyHttp.proxyInfo,
23727
- proxyIp: params.localIP,
23728
23643
  accountId: params.accountId,
23729
23644
  uid: params.uid,
23730
23645
  platform: "xiaohongshu",
@@ -23986,16 +23901,11 @@ var __webpack_exports__ = {};
23986
23901
  return (0, share_namespaceObject.downloadImage)(url, external_node_path_default().join(tmpCachePath, fileName));
23987
23902
  }));
23988
23903
  let proxyUrl;
23989
- if (params.localIP) {
23990
- const args = [
23991
- params.localIP,
23992
- params.proxyLoc,
23993
- params.accountId
23994
- ];
23995
- task.logger?.info(`==> 开始获取代理信息:${args}`);
23904
+ if (params.proxyLoc) {
23905
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
23996
23906
  const ProxyAgentResult = await ProxyAgent({
23997
23907
  logger: task.logger
23998
- }, ...args);
23908
+ }, params.proxyLoc, params.accountId);
23999
23909
  task.logger?.info("==> 代理信息获取成功!");
24000
23910
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
24001
23911
  }
@@ -24424,7 +24334,6 @@ var __webpack_exports__ = {};
24424
24334
  },
24425
24335
  task.logger,
24426
24336
  params.proxyLoc,
24427
- params.localIP,
24428
24337
  params.accountId,
24429
24338
  "xiaohongshu-rpa"
24430
24339
  ];
@@ -24470,8 +24379,8 @@ var __webpack_exports__ = {};
24470
24379
  params: fetchCoverParams
24471
24380
  }, {
24472
24381
  retries: 3,
24473
- retryDelay: 20,
24474
- timeout: 3000
24382
+ retryDelay: 500,
24383
+ timeout: 8000
24475
24384
  });
24476
24385
  for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
24477
24386
  bucket: item.bucket || "",
@@ -24490,8 +24399,8 @@ var __webpack_exports__ = {};
24490
24399
  params: fetchCoverParams
24491
24400
  }, {
24492
24401
  retries: 3,
24493
- retryDelay: 20,
24494
- timeout: 3000
24402
+ retryDelay: 500,
24403
+ timeout: 8000
24495
24404
  });
24496
24405
  for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
24497
24406
  bucket: item.bucket || "",
@@ -24536,6 +24445,8 @@ var __webpack_exports__ = {};
24536
24445
  "x-cos-security-token": ossToken
24537
24446
  },
24538
24447
  defaultErrorMsg: "图片上传异常,请稍后重试发布。"
24448
+ }, {
24449
+ timeout: 60000
24539
24450
  });
24540
24451
  return {
24541
24452
  ossFileId,
@@ -24845,7 +24756,6 @@ var __webpack_exports__ = {};
24845
24756
  },
24846
24757
  _task.logger,
24847
24758
  params.proxyLoc,
24848
- params.localIP,
24849
24759
  params.accountId
24850
24760
  ];
24851
24761
  const http = new Http(...args);
@@ -24931,7 +24841,6 @@ var __webpack_exports__ = {};
24931
24841
  },
24932
24842
  _task.logger,
24933
24843
  params.proxyLoc,
24934
- params.localIP,
24935
24844
  params.accountId
24936
24845
  ];
24937
24846
  const http = new Http(...args);
@@ -24970,7 +24879,6 @@ var __webpack_exports__ = {};
24970
24879
  },
24971
24880
  _task.logger,
24972
24881
  params.proxyLoc,
24973
- params.localIP,
24974
24882
  params.accountId
24975
24883
  ];
24976
24884
  const http = new Http(...args);
@@ -25023,7 +24931,6 @@ var __webpack_exports__ = {};
25023
24931
  },
25024
24932
  _task.logger,
25025
24933
  params.proxyLoc,
25026
- params.localIP,
25027
24934
  params.accountId
25028
24935
  ];
25029
24936
  const http = new Http(...args);
@@ -25080,7 +24987,6 @@ var __webpack_exports__ = {};
25080
24987
  },
25081
24988
  _task.logger,
25082
24989
  params.proxyLoc,
25083
- params.localIP,
25084
24990
  params.accountId
25085
24991
  ];
25086
24992
  const http = new Http(...args);
@@ -25153,7 +25059,6 @@ var __webpack_exports__ = {};
25153
25059
  },
25154
25060
  _task.logger,
25155
25061
  params.proxyLoc,
25156
- params.localIP,
25157
25062
  params.accountId
25158
25063
  ];
25159
25064
  const http = new Http(...args);
@@ -25257,7 +25162,6 @@ var __webpack_exports__ = {};
25257
25162
  },
25258
25163
  _task.logger,
25259
25164
  params.proxyLoc,
25260
- params.localIP,
25261
25165
  params.accountId
25262
25166
  ];
25263
25167
  const http = new Http(...args);
@@ -25697,4 +25601,4 @@ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_targe
25697
25601
  });
25698
25602
 
25699
25603
  //# sourceMappingURL=index.js.map
25700
- //# debugId=23a118d5-7504-553a-869b-7251d1fda8eb
25604
+ //# debugId=5f09a939-272d-5019-8b8d-7fde9f1a0f9f