@iflyrpa/actions 4.0.7 → 4.0.8

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]="3cd6ec6b-b28f-5463-acdf-e643a9e5ec4c")}catch(e){}}();
3
3
  var __webpack_modules__ = {
4
4
  "./src/utils/XhsXsCommonEnc.js": function(module) {
5
5
  var encrypt_lookup = [
@@ -4403,7 +4403,7 @@ var __webpack_exports__ = {};
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
4405
  var package_namespaceObject = {
4406
- i8: "4.0.7"
4406
+ i8: "4.0.8"
4407
4407
  };
4408
4408
  const share_namespaceObject = require("@iflyrpa/share");
4409
4409
  const external_node_fs_namespaceObject = require("node:fs");
@@ -4507,15 +4507,14 @@ var __webpack_exports__ = {};
4507
4507
  }
4508
4508
  return `socks5h://${ip}:${port}`;
4509
4509
  }
4510
- async function ProxyAgent(task, ip, adr, accountId, refresh) {
4510
+ async function ProxyAgent(task, addr, accountId, refresh) {
4511
4511
  const http = new Http({
4512
4512
  headers: {
4513
4513
  "content-type": "application/json"
4514
4514
  }
4515
4515
  });
4516
4516
  const params = {
4517
- ip: ip,
4518
- addr: adr || null,
4517
+ addr: addr || null,
4519
4518
  accountId: accountId
4520
4519
  };
4521
4520
  const ProxyInfo = await http.api({
@@ -4537,7 +4536,7 @@ var __webpack_exports__ = {};
4537
4536
  data: ProxyInfo.data
4538
4537
  }
4539
4538
  };
4540
- task.logger?.info(`请求代理:区域:${params.addr}, IP:${params.ip}, AccountId:${params.accountId}, 返回代理信息: ${ProxyInfo.data ? `${ProxyInfo.data.proxyIp}:${ProxyInfo.data.proxyPort}` : "无可用代理"}`, loggerInfo);
4539
+ task.logger?.info(`请求代理:区域:${params.addr}, AccountId:${params.accountId}, 返回代理信息: ${ProxyInfo.data ? `${ProxyInfo.data.proxyIp}:${ProxyInfo.data.proxyPort}` : "无可用代理"}`, loggerInfo);
4541
4540
  const proxyAgent = "000000" === ProxyInfo.code && ProxyInfo.data ? {
4542
4541
  ip: ProxyInfo.data.proxyIp,
4543
4542
  port: ProxyInfo.data.proxyPort,
@@ -4554,16 +4553,16 @@ var __webpack_exports__ = {};
4554
4553
  data: error
4555
4554
  };
4556
4555
  }
4557
- constructor(config, logger, adr, ip, accountId, platform){
4556
+ constructor(config, logger, addr, accountId, platform){
4558
4557
  this.agentPromise = void 0;
4559
4558
  this.apiClient = external_axios_default().create({
4560
4559
  ...config
4561
4560
  });
4562
4561
  this.logger = logger;
4563
4562
  this.platform = platform;
4564
- if (ip) this.agentPromise = ProxyAgent({
4563
+ if (addr) this.agentPromise = ProxyAgent({
4565
4564
  logger
4566
- }, ip, adr, accountId);
4565
+ }, addr, accountId);
4567
4566
  this.addResponseInterceptor(()=>void 0);
4568
4567
  }
4569
4568
  clearResponseInterceptors() {
@@ -8723,16 +8722,11 @@ var __webpack_exports__ = {};
8723
8722
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
8724
8723
  let executionState;
8725
8724
  let proxyUrl;
8726
- if (params.localIP) {
8727
- const args = [
8728
- params.localIP,
8729
- params.proxyLoc,
8730
- params.accountId
8731
- ];
8732
- task.logger?.info(`==> 开始获取代理信息:${args}`);
8725
+ if (params.proxyLoc) {
8726
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
8733
8727
  const ProxyAgentResult = await ProxyAgent({
8734
8728
  logger: task.logger
8735
- }, ...args);
8729
+ }, params.proxyLoc, params.accountId);
8736
8730
  task.logger?.info("==> 代理信息获取成功!");
8737
8731
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
8738
8732
  }
@@ -9077,7 +9071,6 @@ var __webpack_exports__ = {};
9077
9071
  },
9078
9072
  task.logger,
9079
9073
  params.proxyLoc,
9080
- params.localIP,
9081
9074
  params.accountId,
9082
9075
  "baijiahao"
9083
9076
  ];
@@ -9283,7 +9276,6 @@ var __webpack_exports__ = {};
9283
9276
  enverionment: task.enverionment || "development",
9284
9277
  postId: params.articleId,
9285
9278
  eip: proxyHttp.proxyInfo,
9286
- proxyIp: params.localIP,
9287
9279
  accountId: params.accountId,
9288
9280
  uid: params.uid,
9289
9281
  platform: "baijiahao",
@@ -9804,7 +9796,6 @@ var __webpack_exports__ = {};
9804
9796
  },
9805
9797
  _task.logger,
9806
9798
  params.proxyLoc,
9807
- params.localIP,
9808
9799
  params.accountId
9809
9800
  ];
9810
9801
  const http = new Http(...args);
@@ -10934,7 +10925,7 @@ var __webpack_exports__ = {};
10934
10925
  heapTotal: `${Math.round(process.memoryUsage().heapTotal / 1024 / 1024)} MB`
10935
10926
  },
10936
10927
  accountId: params.accountId,
10937
- hasProxy: !!(params.proxyLoc || params.localIP)
10928
+ hasProxy: !!params.proxyLoc
10938
10929
  });
10939
10930
  }
10940
10931
  const check = {
@@ -10957,7 +10948,6 @@ var __webpack_exports__ = {};
10957
10948
  },
10958
10949
  _task.logger,
10959
10950
  params.proxyLoc,
10960
- params.localIP,
10961
10951
  params.accountId
10962
10952
  ];
10963
10953
  const http = new Http(...args);
@@ -10988,7 +10978,7 @@ var __webpack_exports__ = {};
10988
10978
  heapUsed: `${Math.round(process.memoryUsage().heapUsed / 1024 / 1024)} MB`,
10989
10979
  heapTotal: `${Math.round(process.memoryUsage().heapTotal / 1024 / 1024)} MB`
10990
10980
  },
10991
- hasProxy: !!(params.proxyLoc || params.localIP),
10981
+ hasProxy: !!params.proxyLoc,
10992
10982
  timeSinceLastLog: Date.now() - lastEnvLogTime
10993
10983
  }
10994
10984
  });
@@ -11391,7 +11381,6 @@ var __webpack_exports__ = {};
11391
11381
  },
11392
11382
  _task.logger,
11393
11383
  params.proxyLoc,
11394
- params.localIP,
11395
11384
  params.accountId
11396
11385
  ];
11397
11386
  const http = new Http(...args);
@@ -11478,7 +11467,6 @@ var __webpack_exports__ = {};
11478
11467
  },
11479
11468
  _task.logger,
11480
11469
  params.proxyLoc,
11481
- params.localIP,
11482
11470
  params.accountId
11483
11471
  ];
11484
11472
  const http = new Http(...args);
@@ -11569,7 +11557,6 @@ var __webpack_exports__ = {};
11569
11557
  },
11570
11558
  _task.logger,
11571
11559
  params.proxyLoc,
11572
- params.localIP,
11573
11560
  params.accountId
11574
11561
  ];
11575
11562
  const http = new Http(...args);
@@ -11655,7 +11642,6 @@ var __webpack_exports__ = {};
11655
11642
  },
11656
11643
  _task.logger,
11657
11644
  params.proxyLoc,
11658
- params.localIP,
11659
11645
  params.accountId
11660
11646
  ];
11661
11647
  const http = new Http(...args);
@@ -11739,7 +11725,6 @@ var __webpack_exports__ = {};
11739
11725
  },
11740
11726
  _task.logger,
11741
11727
  params.proxyLoc,
11742
- params.localIP,
11743
11728
  params.accountId
11744
11729
  ];
11745
11730
  const http = new Http(...args);
@@ -11835,7 +11820,6 @@ var __webpack_exports__ = {};
11835
11820
  },
11836
11821
  _task.logger,
11837
11822
  params.proxyLoc,
11838
- params.localIP,
11839
11823
  params.accountId
11840
11824
  ];
11841
11825
  const http = new Http(...args);
@@ -11935,7 +11919,6 @@ var __webpack_exports__ = {};
11935
11919
  },
11936
11920
  _task.logger,
11937
11921
  params.proxyLoc,
11938
- params.localIP,
11939
11922
  params.accountId
11940
11923
  ];
11941
11924
  const http = new Http(...args);
@@ -12081,7 +12064,6 @@ var __webpack_exports__ = {};
12081
12064
  },
12082
12065
  _task.logger,
12083
12066
  params.proxyLoc,
12084
- params.localIP,
12085
12067
  params.accountId
12086
12068
  ];
12087
12069
  const http = new Http(...args);
@@ -12169,7 +12151,6 @@ var __webpack_exports__ = {};
12169
12151
  },
12170
12152
  _task.logger,
12171
12153
  params.proxyLoc,
12172
- params.localIP,
12173
12154
  params.accountId
12174
12155
  ];
12175
12156
  const http = new Http(...args);
@@ -12257,7 +12238,6 @@ var __webpack_exports__ = {};
12257
12238
  },
12258
12239
  _task.logger,
12259
12240
  params.proxyLoc,
12260
- params.localIP,
12261
12241
  params.accountId
12262
12242
  ];
12263
12243
  const http = new Http(...args);
@@ -12478,7 +12458,6 @@ var __webpack_exports__ = {};
12478
12458
  },
12479
12459
  _task.logger,
12480
12460
  params.proxyLoc,
12481
- params.localIP,
12482
12461
  params.accountId
12483
12462
  ];
12484
12463
  const http = new Http(...args);
@@ -12840,16 +12819,11 @@ var __webpack_exports__ = {};
12840
12819
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
12841
12820
  let executionState;
12842
12821
  let proxyUrl;
12843
- if (params.localIP) {
12844
- const args = [
12845
- params.localIP,
12846
- params.proxyLoc,
12847
- params.accountId
12848
- ];
12849
- task.logger?.info(`==> 开始获取代理信息:${args}`);
12822
+ if (params.proxyLoc) {
12823
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
12850
12824
  const ProxyAgentResult = await ProxyAgent({
12851
12825
  logger: task.logger
12852
- }, ...args);
12826
+ }, params.proxyLoc, params.accountId);
12853
12827
  task.logger?.info("==> 代理信息获取成功!");
12854
12828
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
12855
12829
  }
@@ -13462,7 +13436,7 @@ var __webpack_exports__ = {};
13462
13436
  }
13463
13437
  const mock_mockAction = async (task, params)=>{
13464
13438
  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 参数缺失或不完整", "");
13439
+ 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
13440
  let currentStep = "初始化";
13467
13441
  try {
13468
13442
  currentStep = "验证账号信息";
@@ -13548,8 +13522,7 @@ var __webpack_exports__ = {};
13548
13522
  headers
13549
13523
  },
13550
13524
  task.logger,
13551
- "",
13552
- "",
13525
+ params.proxyLoc,
13553
13526
  params.accountId,
13554
13527
  "douyin"
13555
13528
  ];
@@ -13822,7 +13795,6 @@ var __webpack_exports__ = {};
13822
13795
  enverionment: task.enverionment || "development",
13823
13796
  postId: params.articleId,
13824
13797
  eip: proxyHttp.proxyInfo,
13825
- proxyIp: params.localIP,
13826
13798
  accountId: params.accountId,
13827
13799
  uid: params.uid,
13828
13800
  platform: "douyin",
@@ -14185,18 +14157,13 @@ var __webpack_exports__ = {};
14185
14157
  return (0, share_namespaceObject.downloadImage)(url, external_node_path_default().join(tmpCachePath, fileName));
14186
14158
  }));
14187
14159
  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({
14160
+ if (params.proxyLoc) {
14161
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
14162
+ const ProxyAgentResult = await ProxyAgent({
14196
14163
  logger: task.logger
14197
- }, ...args);
14164
+ }, params.proxyLoc, params.accountId);
14198
14165
  task.logger?.info("==> 代理信息获取成功!");
14199
- proxyUrl = proxyAgentResult ? `http://${proxyAgentResult.ip}:${proxyAgentResult.port}` : void 0;
14166
+ proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
14200
14167
  }
14201
14168
  const commonCookies = {
14202
14169
  path: "/",
@@ -15153,7 +15120,6 @@ var __webpack_exports__ = {};
15153
15120
  },
15154
15121
  _task.logger,
15155
15122
  params.proxyLoc,
15156
- params.localIP,
15157
15123
  params.accountId
15158
15124
  ];
15159
15125
  const http = new Http(...args);
@@ -15211,7 +15177,6 @@ var __webpack_exports__ = {};
15211
15177
  },
15212
15178
  _task.logger,
15213
15179
  params.proxyLoc,
15214
- params.localIP,
15215
15180
  params.accountId
15216
15181
  ];
15217
15182
  const http = new Http(...args);
@@ -15258,7 +15223,6 @@ var __webpack_exports__ = {};
15258
15223
  },
15259
15224
  _task.logger,
15260
15225
  params.proxyLoc,
15261
- params.localIP,
15262
15226
  params.accountId
15263
15227
  ];
15264
15228
  const http = new Http(...args);
@@ -15320,7 +15284,6 @@ var __webpack_exports__ = {};
15320
15284
  },
15321
15285
  _task.logger,
15322
15286
  params.proxyLoc,
15323
- params.localIP,
15324
15287
  params.accountId
15325
15288
  ];
15326
15289
  const http = new Http(...args);
@@ -15428,7 +15391,6 @@ var __webpack_exports__ = {};
15428
15391
  },
15429
15392
  _task.logger,
15430
15393
  params.proxyLoc,
15431
- params.localIP,
15432
15394
  params.accountId
15433
15395
  ];
15434
15396
  const http = new Http(...args);
@@ -15535,7 +15497,6 @@ var __webpack_exports__ = {};
15535
15497
  },
15536
15498
  _task.logger,
15537
15499
  params.proxyLoc,
15538
- params.localIP,
15539
15500
  params.accountId
15540
15501
  ];
15541
15502
  const http = new Http(...args);
@@ -15766,7 +15727,6 @@ var __webpack_exports__ = {};
15766
15727
  },
15767
15728
  _task.logger,
15768
15729
  params.proxyLoc,
15769
- params.localIP,
15770
15730
  params.accountId
15771
15731
  ];
15772
15732
  const http = new Http(...args);
@@ -16099,7 +16059,6 @@ var __webpack_exports__ = {};
16099
16059
  },
16100
16060
  _task.logger,
16101
16061
  params.proxyLoc,
16102
- params.localIP,
16103
16062
  params.accountId
16104
16063
  ];
16105
16064
  const http = new Http(...args);
@@ -16205,7 +16164,6 @@ var __webpack_exports__ = {};
16205
16164
  },
16206
16165
  _task.logger,
16207
16166
  params.proxyLoc,
16208
- params.localIP,
16209
16167
  params.accountId
16210
16168
  ];
16211
16169
  const http = new Http(...args);
@@ -16670,7 +16628,6 @@ var __webpack_exports__ = {};
16670
16628
  },
16671
16629
  _task.logger,
16672
16630
  params.proxyLoc,
16673
- params.localIP,
16674
16631
  params.accountId
16675
16632
  ];
16676
16633
  const http = new Http(...args);
@@ -17001,7 +16958,6 @@ var __webpack_exports__ = {};
17001
16958
  },
17002
16959
  _task.logger,
17003
16960
  params.proxyLoc,
17004
- params.localIP,
17005
16961
  params.accountId
17006
16962
  ];
17007
16963
  const http = new Http(...args);
@@ -17054,7 +17010,6 @@ var __webpack_exports__ = {};
17054
17010
  },
17055
17011
  _task.logger,
17056
17012
  params.proxyLoc,
17057
- params.localIP,
17058
17013
  params.accountId
17059
17014
  ];
17060
17015
  const http = new Http(...args);
@@ -17107,7 +17062,6 @@ var __webpack_exports__ = {};
17107
17062
  },
17108
17063
  _task.logger,
17109
17064
  params.proxyLoc,
17110
- params.localIP,
17111
17065
  params.accountId
17112
17066
  ];
17113
17067
  const http = new Http(...args);
@@ -17154,7 +17108,6 @@ var __webpack_exports__ = {};
17154
17108
  },
17155
17109
  _task.logger,
17156
17110
  params.proxyLoc,
17157
- params.localIP,
17158
17111
  params.accountId
17159
17112
  ];
17160
17113
  const http = new Http(...args);
@@ -17193,7 +17146,6 @@ var __webpack_exports__ = {};
17193
17146
  },
17194
17147
  _task.logger,
17195
17148
  params.proxyLoc,
17196
- params.localIP,
17197
17149
  params.accountId
17198
17150
  ];
17199
17151
  const http = new Http(...args);
@@ -17255,7 +17207,6 @@ var __webpack_exports__ = {};
17255
17207
  },
17256
17208
  _task.logger,
17257
17209
  params.proxyLoc,
17258
- params.localIP,
17259
17210
  params.accountId
17260
17211
  ];
17261
17212
  const http = new Http(...args);
@@ -17312,7 +17263,6 @@ var __webpack_exports__ = {};
17312
17263
  },
17313
17264
  _task.logger,
17314
17265
  params.proxyLoc,
17315
- params.localIP,
17316
17266
  params.accountId
17317
17267
  ];
17318
17268
  const http = new Http(...args);
@@ -17398,7 +17348,6 @@ var __webpack_exports__ = {};
17398
17348
  },
17399
17349
  _task.logger,
17400
17350
  params.proxyLoc,
17401
- params.localIP,
17402
17351
  params.accountId
17403
17352
  ];
17404
17353
  const http = new Http(...args);
@@ -17486,7 +17435,6 @@ var __webpack_exports__ = {};
17486
17435
  },
17487
17436
  _task.logger,
17488
17437
  params.proxyLoc,
17489
- params.localIP,
17490
17438
  params.accountId
17491
17439
  ];
17492
17440
  const http = new Http(...args);
@@ -17596,7 +17544,6 @@ var __webpack_exports__ = {};
17596
17544
  },
17597
17545
  _task.logger,
17598
17546
  params.proxyLoc,
17599
- params.localIP,
17600
17547
  params.accountId
17601
17548
  ];
17602
17549
  const http = new Http(...args);
@@ -17874,16 +17821,11 @@ var __webpack_exports__ = {};
17874
17821
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
17875
17822
  let executionState;
17876
17823
  let proxyUrl;
17877
- if (params.localIP) {
17878
- const args = [
17879
- params.localIP,
17880
- params.proxyLoc,
17881
- params.accountId
17882
- ];
17883
- task.logger?.info(`==> 开始获取代理信息:${args}`);
17824
+ if (params.proxyLoc) {
17825
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
17884
17826
  const ProxyAgentResult = await ProxyAgent({
17885
17827
  logger: task.logger
17886
- }, ...args);
17828
+ }, params.proxyLoc, params.accountId);
17887
17829
  task.logger?.info("==> 代理信息获取成功!");
17888
17830
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
17889
17831
  }
@@ -18710,7 +18652,6 @@ var __webpack_exports__ = {};
18710
18652
  enverionment: confParams.enverionment || "development",
18711
18653
  postId: confParams.articleId,
18712
18654
  eip: proxyHttp.proxyInfo,
18713
- proxyIp: confParams.proxyIp,
18714
18655
  accountId: confParams.accountId,
18715
18656
  uid: confParams.uid,
18716
18657
  publishParams: publishData,
@@ -18737,7 +18678,6 @@ var __webpack_exports__ = {};
18737
18678
  },
18738
18679
  task.logger,
18739
18680
  params.proxyLoc,
18740
- params.localIP,
18741
18681
  params.accountId,
18742
18682
  "shipinhao"
18743
18683
  ];
@@ -18808,7 +18748,6 @@ var __webpack_exports__ = {};
18808
18748
  articleId: params.articleId,
18809
18749
  postId: params.articleId,
18810
18750
  eip: proxyHttp.proxyInfo,
18811
- proxyIp: params.localIP,
18812
18751
  accountId: params.accountId,
18813
18752
  uid: params.uid
18814
18753
  }, {
@@ -19195,16 +19134,11 @@ var __webpack_exports__ = {};
19195
19134
  return (0, share_namespaceObject.downloadImage)(url, external_node_path_default().join(tmpCachePath, fileName));
19196
19135
  }));
19197
19136
  let proxyUrl;
19198
- if (params.localIP) {
19199
- const args = [
19200
- params.localIP,
19201
- params.proxyLoc,
19202
- params.accountId
19203
- ];
19204
- task.logger?.info(`==> 开始获取代理信息:${args}`);
19137
+ if (params.proxyLoc) {
19138
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
19205
19139
  const ProxyAgentResult = await ProxyAgent({
19206
19140
  logger: task.logger
19207
- }, ...args);
19141
+ }, params.proxyLoc, params.accountId);
19208
19142
  task.logger?.info("==> 代理信息获取成功!");
19209
19143
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
19210
19144
  }
@@ -19854,16 +19788,11 @@ var __webpack_exports__ = {};
19854
19788
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
19855
19789
  let executionState;
19856
19790
  let proxyUrl;
19857
- if (params.localIP) {
19858
- const args = [
19859
- params.localIP,
19860
- params.proxyLoc,
19861
- params.accountId
19862
- ];
19863
- task.logger?.info(`==> 开始获取代理信息:${args}`);
19791
+ if (params.proxyLoc) {
19792
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
19864
19793
  const ProxyAgentResult = await ProxyAgent({
19865
19794
  logger: task.logger
19866
- }, ...args);
19795
+ }, params.proxyLoc, params.accountId);
19867
19796
  task.logger?.info("==> 代理信息获取成功!");
19868
19797
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
19869
19798
  }
@@ -20114,7 +20043,6 @@ var __webpack_exports__ = {};
20114
20043
  },
20115
20044
  task.logger,
20116
20045
  params.proxyLoc,
20117
- params.localIP,
20118
20046
  params.accountId,
20119
20047
  "toutiao"
20120
20048
  ];
@@ -20312,7 +20240,6 @@ var __webpack_exports__ = {};
20312
20240
  enverionment: task.enverionment || "development",
20313
20241
  postId: params.articleId,
20314
20242
  eip: proxyHttp.proxyInfo,
20315
- proxyIp: params.localIP,
20316
20243
  accountId: params.accountId,
20317
20244
  uid: params.uid,
20318
20245
  platform: "toutiao",
@@ -20947,16 +20874,11 @@ var __webpack_exports__ = {};
20947
20874
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
20948
20875
  let executionState;
20949
20876
  let proxyUrl;
20950
- if (params.localIP) {
20951
- const args = [
20952
- params.localIP,
20953
- params.proxyLoc,
20954
- params.accountId
20955
- ];
20956
- task.logger?.info(`==> 开始获取代理信息:${args}`);
20877
+ if (params.proxyLoc) {
20878
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
20957
20879
  const ProxyAgentResult = await ProxyAgent({
20958
20880
  logger: task.logger
20959
- }, ...args);
20881
+ }, params.proxyLoc, params.accountId);
20960
20882
  task.logger?.info("==> 代理信息获取成功!");
20961
20883
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
20962
20884
  }
@@ -21448,7 +21370,6 @@ var __webpack_exports__ = {};
21448
21370
  },
21449
21371
  task.logger,
21450
21372
  params.proxyLoc,
21451
- params.localIP,
21452
21373
  params.accountId,
21453
21374
  "weixin"
21454
21375
  ];
@@ -22227,7 +22148,6 @@ var __webpack_exports__ = {};
22227
22148
  enverionment: task.enverionment || "development",
22228
22149
  postId: params.articleId,
22229
22150
  eip: proxyHttp.proxyInfo,
22230
- proxyIp: params.localIP,
22231
22151
  accountId: params.accountId,
22232
22152
  uid: params.uid,
22233
22153
  platform: "weixin",
@@ -23032,16 +22952,11 @@ var __webpack_exports__ = {};
23032
22952
  const reporter = task.reportService?.reportLoginStatus ?? (()=>Promise.resolve());
23033
22953
  let executionState;
23034
22954
  let proxyUrl;
23035
- if (params.localIP) {
23036
- const args = [
23037
- params.localIP,
23038
- params.proxyLoc,
23039
- params.accountId
23040
- ];
23041
- task.logger?.info(`==> 开始获取代理信息:${args}`);
22955
+ if (params.proxyLoc) {
22956
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
23042
22957
  const ProxyAgentResult = await ProxyAgent({
23043
22958
  logger: task.logger
23044
- }, ...args);
22959
+ }, params.proxyLoc, params.accountId);
23045
22960
  task.logger?.info("==> 代理信息获取成功!");
23046
22961
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
23047
22962
  }
@@ -23358,7 +23273,6 @@ var __webpack_exports__ = {};
23358
23273
  },
23359
23274
  task.logger,
23360
23275
  params.proxyLoc,
23361
- params.localIP,
23362
23276
  params.accountId,
23363
23277
  "xiaohongshu"
23364
23278
  ];
@@ -23399,8 +23313,8 @@ var __webpack_exports__ = {};
23399
23313
  params: fetchCoverParams
23400
23314
  }, {
23401
23315
  retries: 3,
23402
- retryDelay: 20,
23403
- timeout: 3000
23316
+ retryDelay: 500,
23317
+ timeout: 30000
23404
23318
  });
23405
23319
  for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
23406
23320
  bucket: item.bucket || "",
@@ -23419,8 +23333,8 @@ var __webpack_exports__ = {};
23419
23333
  params: fetchCoverParams
23420
23334
  }, {
23421
23335
  retries: 3,
23422
- retryDelay: 20,
23423
- timeout: 3000
23336
+ retryDelay: 500,
23337
+ timeout: 30000
23424
23338
  });
23425
23339
  for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
23426
23340
  bucket: item.bucket || "",
@@ -23481,7 +23395,9 @@ var __webpack_exports__ = {};
23481
23395
  headers: {
23482
23396
  "x-cos-security-token": ossToken
23483
23397
  },
23484
- defaultErrorMsg: "图片上传异常,请稍后重试发布。"
23398
+ defaultErrorMsg: "图片上传异常,请稍后重试。"
23399
+ }, {
23400
+ timeout: 60000
23485
23401
  });
23486
23402
  return {
23487
23403
  ossFileId,
@@ -23491,6 +23407,8 @@ var __webpack_exports__ = {};
23491
23407
  originSize
23492
23408
  };
23493
23409
  } catch (error) {
23410
+ const e = Http.handleApiError(error);
23411
+ 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
23412
  attempt++;
23495
23413
  }
23496
23414
  }
@@ -23724,7 +23642,6 @@ var __webpack_exports__ = {};
23724
23642
  enverionment: task.enverionment || "development",
23725
23643
  postId: params.articleId,
23726
23644
  eip: proxyHttp.proxyInfo,
23727
- proxyIp: params.localIP,
23728
23645
  accountId: params.accountId,
23729
23646
  uid: params.uid,
23730
23647
  platform: "xiaohongshu",
@@ -23986,16 +23903,11 @@ var __webpack_exports__ = {};
23986
23903
  return (0, share_namespaceObject.downloadImage)(url, external_node_path_default().join(tmpCachePath, fileName));
23987
23904
  }));
23988
23905
  let proxyUrl;
23989
- if (params.localIP) {
23990
- const args = [
23991
- params.localIP,
23992
- params.proxyLoc,
23993
- params.accountId
23994
- ];
23995
- task.logger?.info(`==> 开始获取代理信息:${args}`);
23906
+ if (params.proxyLoc) {
23907
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
23996
23908
  const ProxyAgentResult = await ProxyAgent({
23997
23909
  logger: task.logger
23998
- }, ...args);
23910
+ }, params.proxyLoc, params.accountId);
23999
23911
  task.logger?.info("==> 代理信息获取成功!");
24000
23912
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
24001
23913
  }
@@ -24424,7 +24336,6 @@ var __webpack_exports__ = {};
24424
24336
  },
24425
24337
  task.logger,
24426
24338
  params.proxyLoc,
24427
- params.localIP,
24428
24339
  params.accountId,
24429
24340
  "xiaohongshu-rpa"
24430
24341
  ];
@@ -24470,8 +24381,8 @@ var __webpack_exports__ = {};
24470
24381
  params: fetchCoverParams
24471
24382
  }, {
24472
24383
  retries: 3,
24473
- retryDelay: 20,
24474
- timeout: 3000
24384
+ retryDelay: 500,
24385
+ timeout: 8000
24475
24386
  });
24476
24387
  for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
24477
24388
  bucket: item.bucket || "",
@@ -24490,8 +24401,8 @@ var __webpack_exports__ = {};
24490
24401
  params: fetchCoverParams
24491
24402
  }, {
24492
24403
  retries: 3,
24493
- retryDelay: 20,
24494
- timeout: 3000
24404
+ retryDelay: 500,
24405
+ timeout: 8000
24495
24406
  });
24496
24407
  for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
24497
24408
  bucket: item.bucket || "",
@@ -24536,6 +24447,8 @@ var __webpack_exports__ = {};
24536
24447
  "x-cos-security-token": ossToken
24537
24448
  },
24538
24449
  defaultErrorMsg: "图片上传异常,请稍后重试发布。"
24450
+ }, {
24451
+ timeout: 60000
24539
24452
  });
24540
24453
  return {
24541
24454
  ossFileId,
@@ -24845,7 +24758,6 @@ var __webpack_exports__ = {};
24845
24758
  },
24846
24759
  _task.logger,
24847
24760
  params.proxyLoc,
24848
- params.localIP,
24849
24761
  params.accountId
24850
24762
  ];
24851
24763
  const http = new Http(...args);
@@ -24931,7 +24843,6 @@ var __webpack_exports__ = {};
24931
24843
  },
24932
24844
  _task.logger,
24933
24845
  params.proxyLoc,
24934
- params.localIP,
24935
24846
  params.accountId
24936
24847
  ];
24937
24848
  const http = new Http(...args);
@@ -24970,7 +24881,6 @@ var __webpack_exports__ = {};
24970
24881
  },
24971
24882
  _task.logger,
24972
24883
  params.proxyLoc,
24973
- params.localIP,
24974
24884
  params.accountId
24975
24885
  ];
24976
24886
  const http = new Http(...args);
@@ -25023,7 +24933,6 @@ var __webpack_exports__ = {};
25023
24933
  },
25024
24934
  _task.logger,
25025
24935
  params.proxyLoc,
25026
- params.localIP,
25027
24936
  params.accountId
25028
24937
  ];
25029
24938
  const http = new Http(...args);
@@ -25080,7 +24989,6 @@ var __webpack_exports__ = {};
25080
24989
  },
25081
24990
  _task.logger,
25082
24991
  params.proxyLoc,
25083
- params.localIP,
25084
24992
  params.accountId
25085
24993
  ];
25086
24994
  const http = new Http(...args);
@@ -25153,7 +25061,6 @@ var __webpack_exports__ = {};
25153
25061
  },
25154
25062
  _task.logger,
25155
25063
  params.proxyLoc,
25156
- params.localIP,
25157
25064
  params.accountId
25158
25065
  ];
25159
25066
  const http = new Http(...args);
@@ -25257,7 +25164,6 @@ var __webpack_exports__ = {};
25257
25164
  },
25258
25165
  _task.logger,
25259
25166
  params.proxyLoc,
25260
- params.localIP,
25261
25167
  params.accountId
25262
25168
  ];
25263
25169
  const http = new Http(...args);
@@ -25697,4 +25603,4 @@ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_targe
25697
25603
  });
25698
25604
 
25699
25605
  //# sourceMappingURL=index.js.map
25700
- //# debugId=23a118d5-7504-553a-869b-7251d1fda8eb
25606
+ //# debugId=3cd6ec6b-b28f-5463-acdf-e643a9e5ec4c