@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.mjs 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]="65a9d1c4-06b7-5afb-8cd9-90bcb403fb1a")}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]="c8d107bb-33ed-570f-91cf-6902618660d6")}catch(e){}}();
3
3
  import * as __WEBPACK_EXTERNAL_MODULE_crypto__ from "crypto";
4
4
  import * as __WEBPACK_EXTERNAL_MODULE_fs__ from "fs";
5
5
  import * as __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_package_json_58ae5f06__ from "@iflyrpa/share/package.json";
@@ -4353,7 +4353,7 @@ function __webpack_require__(moduleId) {
4353
4353
  };
4354
4354
  })();
4355
4355
  var package_namespaceObject = {
4356
- i8: "4.0.7"
4356
+ i8: "4.0.8"
4357
4357
  };
4358
4358
  const PROXY_CREDENTIALS = [
4359
4359
  {
@@ -4441,15 +4441,14 @@ function buildProxyUrl(ip, port) {
4441
4441
  }
4442
4442
  return `socks5h://${ip}:${port}`;
4443
4443
  }
4444
- async function ProxyAgent(task, ip, adr, accountId, refresh) {
4444
+ async function ProxyAgent(task, addr, accountId, refresh) {
4445
4445
  const http = new Http({
4446
4446
  headers: {
4447
4447
  "content-type": "application/json"
4448
4448
  }
4449
4449
  });
4450
4450
  const params = {
4451
- ip: ip,
4452
- addr: adr || null,
4451
+ addr: addr || null,
4453
4452
  accountId: accountId
4454
4453
  };
4455
4454
  const ProxyInfo = await http.api({
@@ -4471,7 +4470,7 @@ async function ProxyAgent(task, ip, adr, accountId, refresh) {
4471
4470
  data: ProxyInfo.data
4472
4471
  }
4473
4472
  };
4474
- task.logger?.info(`请求代理:区域:${params.addr}, IP:${params.ip}, AccountId:${params.accountId}, 返回代理信息: ${ProxyInfo.data ? `${ProxyInfo.data.proxyIp}:${ProxyInfo.data.proxyPort}` : "无可用代理"}`, loggerInfo);
4473
+ task.logger?.info(`请求代理:区域:${params.addr}, AccountId:${params.accountId}, 返回代理信息: ${ProxyInfo.data ? `${ProxyInfo.data.proxyIp}:${ProxyInfo.data.proxyPort}` : "无可用代理"}`, loggerInfo);
4475
4474
  const proxyAgent = "000000" === ProxyInfo.code && ProxyInfo.data ? {
4476
4475
  ip: ProxyInfo.data.proxyIp,
4477
4476
  port: ProxyInfo.data.proxyPort,
@@ -4488,16 +4487,16 @@ class Http {
4488
4487
  data: error
4489
4488
  };
4490
4489
  }
4491
- constructor(config, logger, adr, ip, accountId, platform){
4490
+ constructor(config, logger, addr, accountId, platform){
4492
4491
  this.agentPromise = void 0;
4493
4492
  this.apiClient = __WEBPACK_EXTERNAL_MODULE_axios__["default"].create({
4494
4493
  ...config
4495
4494
  });
4496
4495
  this.logger = logger;
4497
4496
  this.platform = platform;
4498
- if (ip) this.agentPromise = ProxyAgent({
4497
+ if (addr) this.agentPromise = ProxyAgent({
4499
4498
  logger
4500
- }, ip, adr, accountId);
4499
+ }, addr, accountId);
4501
4500
  this.addResponseInterceptor(()=>void 0);
4502
4501
  }
4503
4502
  clearResponseInterceptors() {
@@ -8655,16 +8654,11 @@ const rpaServer = async (task, params)=>{
8655
8654
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
8656
8655
  let executionState;
8657
8656
  let proxyUrl;
8658
- if (params.localIP) {
8659
- const args = [
8660
- params.localIP,
8661
- params.proxyLoc,
8662
- params.accountId
8663
- ];
8664
- task.logger?.info(`==> 开始获取代理信息:${args}`);
8657
+ if (params.proxyLoc) {
8658
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
8665
8659
  const ProxyAgentResult = await ProxyAgent({
8666
8660
  logger: task.logger
8667
- }, ...args);
8661
+ }, params.proxyLoc, params.accountId);
8668
8662
  task.logger?.info("==> 代理信息获取成功!");
8669
8663
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
8670
8664
  }
@@ -9007,7 +9001,6 @@ const mockAction = async (task, params)=>{
9007
9001
  },
9008
9002
  task.logger,
9009
9003
  params.proxyLoc,
9010
- params.localIP,
9011
9004
  params.accountId,
9012
9005
  "baijiahao"
9013
9006
  ];
@@ -9213,7 +9206,6 @@ const mockAction = async (task, params)=>{
9213
9206
  enverionment: task.enverionment || "development",
9214
9207
  postId: params.articleId,
9215
9208
  eip: proxyHttp.proxyInfo,
9216
- proxyIp: params.localIP,
9217
9209
  accountId: params.accountId,
9218
9210
  uid: params.uid,
9219
9211
  platform: "baijiahao",
@@ -9732,7 +9724,6 @@ const XhsFansExport = async (_task, params)=>{
9732
9724
  },
9733
9725
  _task.logger,
9734
9726
  params.proxyLoc,
9735
- params.localIP,
9736
9727
  params.accountId
9737
9728
  ];
9738
9729
  const http = new Http(...args);
@@ -10862,7 +10853,7 @@ const XhsSessionCheck = async (_task, params)=>{
10862
10853
  heapTotal: `${Math.round(process.memoryUsage().heapTotal / 1024 / 1024)} MB`
10863
10854
  },
10864
10855
  accountId: params.accountId,
10865
- hasProxy: !!(params.proxyLoc || params.localIP)
10856
+ hasProxy: !!params.proxyLoc
10866
10857
  });
10867
10858
  }
10868
10859
  const check = {
@@ -10885,7 +10876,6 @@ const XhsSessionCheck = async (_task, params)=>{
10885
10876
  },
10886
10877
  _task.logger,
10887
10878
  params.proxyLoc,
10888
- params.localIP,
10889
10879
  params.accountId
10890
10880
  ];
10891
10881
  const http = new Http(...args);
@@ -10916,7 +10906,7 @@ const XhsSessionCheck = async (_task, params)=>{
10916
10906
  heapUsed: `${Math.round(process.memoryUsage().heapUsed / 1024 / 1024)} MB`,
10917
10907
  heapTotal: `${Math.round(process.memoryUsage().heapTotal / 1024 / 1024)} MB`
10918
10908
  },
10919
- hasProxy: !!(params.proxyLoc || params.localIP),
10909
+ hasProxy: !!params.proxyLoc,
10920
10910
  timeSinceLastLog: Date.now() - lastEnvLogTime
10921
10911
  }
10922
10912
  });
@@ -11319,7 +11309,6 @@ const douyinCreateCommentReply = async (_task, params)=>{
11319
11309
  },
11320
11310
  _task.logger,
11321
11311
  params.proxyLoc,
11322
- params.localIP,
11323
11312
  params.accountId
11324
11313
  ];
11325
11314
  const http = new Http(...args);
@@ -11406,7 +11395,6 @@ const douyinGetCollection = async (_task, params)=>{
11406
11395
  },
11407
11396
  _task.logger,
11408
11397
  params.proxyLoc,
11409
- params.localIP,
11410
11398
  params.accountId
11411
11399
  ];
11412
11400
  const http = new Http(...args);
@@ -11497,7 +11485,6 @@ const douyinGetCommentList = async (_task, params)=>{
11497
11485
  },
11498
11486
  _task.logger,
11499
11487
  params.proxyLoc,
11500
- params.localIP,
11501
11488
  params.accountId
11502
11489
  ];
11503
11490
  const http = new Http(...args);
@@ -11583,7 +11570,6 @@ const douyinGetCommentReplyList = async (_task, params)=>{
11583
11570
  },
11584
11571
  _task.logger,
11585
11572
  params.proxyLoc,
11586
- params.localIP,
11587
11573
  params.accountId
11588
11574
  ];
11589
11575
  const http = new Http(...args);
@@ -11667,7 +11653,6 @@ const douyinGetHot = async (_task, params)=>{
11667
11653
  },
11668
11654
  _task.logger,
11669
11655
  params.proxyLoc,
11670
- params.localIP,
11671
11656
  params.accountId
11672
11657
  ];
11673
11658
  const http = new Http(...args);
@@ -11763,7 +11748,6 @@ const douyinGetLocation = async (_task, params)=>{
11763
11748
  },
11764
11749
  _task.logger,
11765
11750
  params.proxyLoc,
11766
- params.localIP,
11767
11751
  params.accountId
11768
11752
  ];
11769
11753
  const http = new Http(...args);
@@ -11862,7 +11846,6 @@ const douyinGetMusic = async (_task, params)=>{
11862
11846
  },
11863
11847
  _task.logger,
11864
11848
  params.proxyLoc,
11865
- params.localIP,
11866
11849
  params.accountId
11867
11850
  ];
11868
11851
  const http = new Http(...args);
@@ -12008,7 +11991,6 @@ const douyinGetMusicByCategory = async (_task, params)=>{
12008
11991
  },
12009
11992
  _task.logger,
12010
11993
  params.proxyLoc,
12011
- params.localIP,
12012
11994
  params.accountId
12013
11995
  ];
12014
11996
  const http = new Http(...args);
@@ -12096,7 +12078,6 @@ const douyinGetMusicCategory = async (_task, params)=>{
12096
12078
  },
12097
12079
  _task.logger,
12098
12080
  params.proxyLoc,
12099
- params.localIP,
12100
12081
  params.accountId
12101
12082
  ];
12102
12083
  const http = new Http(...args);
@@ -12184,7 +12165,6 @@ const douyinGetTopics = async (_task, params)=>{
12184
12165
  },
12185
12166
  _task.logger,
12186
12167
  params.proxyLoc,
12187
- params.localIP,
12188
12168
  params.accountId
12189
12169
  ];
12190
12170
  const http = new Http(...args);
@@ -12405,7 +12385,6 @@ const douyinGetWorkList = async (_task, params)=>{
12405
12385
  },
12406
12386
  _task.logger,
12407
12387
  params.proxyLoc,
12408
- params.localIP,
12409
12388
  params.accountId
12410
12389
  ];
12411
12390
  const http = new Http(...args);
@@ -12767,16 +12746,11 @@ const rpa_server_rpaServer = async (task, params)=>{
12767
12746
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
12768
12747
  let executionState;
12769
12748
  let proxyUrl;
12770
- if (params.localIP) {
12771
- const args = [
12772
- params.localIP,
12773
- params.proxyLoc,
12774
- params.accountId
12775
- ];
12776
- task.logger?.info(`==> 开始获取代理信息:${args}`);
12749
+ if (params.proxyLoc) {
12750
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
12777
12751
  const ProxyAgentResult = await ProxyAgent({
12778
12752
  logger: task.logger
12779
- }, ...args);
12753
+ }, params.proxyLoc, params.accountId);
12780
12754
  task.logger?.info("==> 代理信息获取成功!");
12781
12755
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
12782
12756
  }
@@ -13385,7 +13359,7 @@ function safeSerialize(obj) {
13385
13359
  }
13386
13360
  const mock_mockAction = async (task, params)=>{
13387
13361
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
13388
- 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, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.response)(414, "extraParam 参数缺失或不完整", "");
13362
+ 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, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.response)(414, "extraParam 参数缺失或不完整", "");
13389
13363
  let currentStep = "初始化";
13390
13364
  try {
13391
13365
  currentStep = "验证账号信息";
@@ -13471,8 +13445,7 @@ const mock_mockAction = async (task, params)=>{
13471
13445
  headers
13472
13446
  },
13473
13447
  task.logger,
13474
- "",
13475
- "",
13448
+ params.proxyLoc,
13476
13449
  params.accountId,
13477
13450
  "douyin"
13478
13451
  ];
@@ -13745,7 +13718,6 @@ const mock_mockAction = async (task, params)=>{
13745
13718
  enverionment: task.enverionment || "development",
13746
13719
  postId: params.articleId,
13747
13720
  eip: proxyHttp.proxyInfo,
13748
- proxyIp: params.localIP,
13749
13721
  accountId: params.accountId,
13750
13722
  uid: params.uid,
13751
13723
  platform: "douyin",
@@ -14108,18 +14080,13 @@ const rpaAction_Server = async (task, params)=>{
14108
14080
  return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.downloadImage)(url, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(tmpCachePath, fileName));
14109
14081
  }));
14110
14082
  let proxyUrl;
14111
- if (params.localIP) {
14112
- const args = [
14113
- params.localIP,
14114
- params.proxyLoc,
14115
- params.accountId
14116
- ];
14117
- task.logger?.info(`==> 开始获取代理信息:${args}`);
14118
- const proxyAgentResult = await ProxyAgent({
14083
+ if (params.proxyLoc) {
14084
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
14085
+ const ProxyAgentResult = await ProxyAgent({
14119
14086
  logger: task.logger
14120
- }, ...args);
14087
+ }, params.proxyLoc, params.accountId);
14121
14088
  task.logger?.info("==> 代理信息获取成功!");
14122
- proxyUrl = proxyAgentResult ? `http://${proxyAgentResult.ip}:${proxyAgentResult.port}` : void 0;
14089
+ proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
14123
14090
  }
14124
14091
  const commonCookies = {
14125
14092
  path: "/",
@@ -15076,7 +15043,6 @@ const getXhsCollection = async (_task, params)=>{
15076
15043
  },
15077
15044
  _task.logger,
15078
15045
  params.proxyLoc,
15079
- params.localIP,
15080
15046
  params.accountId
15081
15047
  ];
15082
15048
  const http = new Http(...args);
@@ -15134,7 +15100,6 @@ const getXhsGroup = async (_task, params)=>{
15134
15100
  },
15135
15101
  _task.logger,
15136
15102
  params.proxyLoc,
15137
- params.localIP,
15138
15103
  params.accountId
15139
15104
  ];
15140
15105
  const http = new Http(...args);
@@ -15181,7 +15146,6 @@ const getXhsHotTopic = async (_task, params)=>{
15181
15146
  },
15182
15147
  _task.logger,
15183
15148
  params.proxyLoc,
15184
- params.localIP,
15185
15149
  params.accountId
15186
15150
  ];
15187
15151
  const http = new Http(...args);
@@ -15243,7 +15207,6 @@ const getXhsUnreadCount = async (_task, params)=>{
15243
15207
  },
15244
15208
  _task.logger,
15245
15209
  params.proxyLoc,
15246
- params.localIP,
15247
15210
  params.accountId
15248
15211
  ];
15249
15212
  const http = new Http(...args);
@@ -15351,7 +15314,6 @@ async function getDouyinData(_task, params) {
15351
15314
  },
15352
15315
  _task.logger,
15353
15316
  params.proxyLoc,
15354
- params.localIP,
15355
15317
  params.accountId
15356
15318
  ];
15357
15319
  const http = new Http(...args);
@@ -15458,7 +15420,6 @@ async function getShipinhaoData(_task, params) {
15458
15420
  },
15459
15421
  _task.logger,
15460
15422
  params.proxyLoc,
15461
- params.localIP,
15462
15423
  params.accountId
15463
15424
  ];
15464
15425
  const http = new Http(...args);
@@ -15687,7 +15648,6 @@ async function getXiaohongshuData(_task, params) {
15687
15648
  },
15688
15649
  _task.logger,
15689
15650
  params.proxyLoc,
15690
- params.localIP,
15691
15651
  params.accountId
15692
15652
  ];
15693
15653
  const http = new Http(...args);
@@ -16020,7 +15980,6 @@ async function handleDouyinData(_task, params) {
16020
15980
  },
16021
15981
  _task.logger,
16022
15982
  params.proxyLoc,
16023
- params.localIP,
16024
15983
  params.accountId
16025
15984
  ];
16026
15985
  const http = new Http(...args);
@@ -16126,7 +16085,6 @@ async function handleShipinhaoData(_task, params) {
16126
16085
  },
16127
16086
  _task.logger,
16128
16087
  params.proxyLoc,
16129
- params.localIP,
16130
16088
  params.accountId
16131
16089
  ];
16132
16090
  const http = new Http(...args);
@@ -16589,7 +16547,6 @@ async function handleXiaohongshuData(_task, params) {
16589
16547
  },
16590
16548
  _task.logger,
16591
16549
  params.proxyLoc,
16592
- params.localIP,
16593
16550
  params.accountId
16594
16551
  ];
16595
16552
  const http = new Http(...args);
@@ -16920,7 +16877,6 @@ const searchXhsWebConnections = async (_task, params)=>{
16920
16877
  },
16921
16878
  _task.logger,
16922
16879
  params.proxyLoc,
16923
- params.localIP,
16924
16880
  params.accountId
16925
16881
  ];
16926
16882
  const http = new Http(...args);
@@ -16973,7 +16929,6 @@ const searchXhsWebLikes = async (_task, params)=>{
16973
16929
  },
16974
16930
  _task.logger,
16975
16931
  params.proxyLoc,
16976
- params.localIP,
16977
16932
  params.accountId
16978
16933
  ];
16979
16934
  const http = new Http(...args);
@@ -17026,7 +16981,6 @@ const searchXhsWebMentions = async (_task, params)=>{
17026
16981
  },
17027
16982
  _task.logger,
17028
16983
  params.proxyLoc,
17029
- params.localIP,
17030
16984
  params.accountId
17031
16985
  ];
17032
16986
  const http = new Http(...args);
@@ -17073,7 +17027,6 @@ const searchXiaohongshuLocation = async (_task, params)=>{
17073
17027
  },
17074
17028
  _task.logger,
17075
17029
  params.proxyLoc,
17076
- params.localIP,
17077
17030
  params.accountId
17078
17031
  ];
17079
17032
  const http = new Http(...args);
@@ -17112,7 +17065,6 @@ const searchXiaohongshuTopicList = async (_task, params)=>{
17112
17065
  },
17113
17066
  _task.logger,
17114
17067
  params.proxyLoc,
17115
- params.localIP,
17116
17068
  params.accountId
17117
17069
  ];
17118
17070
  const http = new Http(...args);
@@ -17174,7 +17126,6 @@ const searchXiaohongshuUserArticle = async (_task, params)=>{
17174
17126
  },
17175
17127
  _task.logger,
17176
17128
  params.proxyLoc,
17177
- params.localIP,
17178
17129
  params.accountId
17179
17130
  ];
17180
17131
  const http = new Http(...args);
@@ -17231,7 +17182,6 @@ const shipinhaoCheckLinkValidate = async (_task, params)=>{
17231
17182
  },
17232
17183
  _task.logger,
17233
17184
  params.proxyLoc,
17234
- params.localIP,
17235
17185
  params.accountId
17236
17186
  ];
17237
17187
  const http = new Http(...args);
@@ -17317,7 +17267,6 @@ const shipinhaoGetLocation = async (_task, params)=>{
17317
17267
  },
17318
17268
  _task.logger,
17319
17269
  params.proxyLoc,
17320
- params.localIP,
17321
17270
  params.accountId
17322
17271
  ];
17323
17272
  const http = new Http(...args);
@@ -17405,7 +17354,6 @@ const shipinhaoGetMsg = async (_task, params)=>{
17405
17354
  },
17406
17355
  _task.logger,
17407
17356
  params.proxyLoc,
17408
- params.localIP,
17409
17357
  params.accountId
17410
17358
  ];
17411
17359
  const http = new Http(...args);
@@ -17515,7 +17463,6 @@ const shipinhaoGetMsgImage = async (_task, params)=>{
17515
17463
  },
17516
17464
  _task.logger,
17517
17465
  params.proxyLoc,
17518
- params.localIP,
17519
17466
  params.accountId
17520
17467
  ];
17521
17468
  const http = new Http(...args);
@@ -17793,16 +17740,11 @@ const shipinhaoLogin_rpa_server_rpaServer = async (task, params)=>{
17793
17740
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
17794
17741
  let executionState;
17795
17742
  let proxyUrl;
17796
- if (params.localIP) {
17797
- const args = [
17798
- params.localIP,
17799
- params.proxyLoc,
17800
- params.accountId
17801
- ];
17802
- task.logger?.info(`==> 开始获取代理信息:${args}`);
17743
+ if (params.proxyLoc) {
17744
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
17803
17745
  const ProxyAgentResult = await ProxyAgent({
17804
17746
  logger: task.logger
17805
- }, ...args);
17747
+ }, params.proxyLoc, params.accountId);
17806
17748
  task.logger?.info("==> 代理信息获取成功!");
17807
17749
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
17808
17750
  }
@@ -18629,7 +18571,6 @@ async function publishDynamic(cookies, uin, fingerPrintDeviceId, aId, proxyHttp,
18629
18571
  enverionment: confParams.enverionment || "development",
18630
18572
  postId: confParams.articleId,
18631
18573
  eip: proxyHttp.proxyInfo,
18632
- proxyIp: confParams.proxyIp,
18633
18574
  accountId: confParams.accountId,
18634
18575
  uid: confParams.uid,
18635
18576
  publishParams: publishData,
@@ -18656,7 +18597,6 @@ const shipinhaoPublish_mock_mockAction = async (task, params)=>{
18656
18597
  },
18657
18598
  task.logger,
18658
18599
  params.proxyLoc,
18659
- params.localIP,
18660
18600
  params.accountId,
18661
18601
  "shipinhao"
18662
18602
  ];
@@ -18727,7 +18667,6 @@ const shipinhaoPublish_mock_mockAction = async (task, params)=>{
18727
18667
  articleId: params.articleId,
18728
18668
  postId: params.articleId,
18729
18669
  eip: proxyHttp.proxyInfo,
18730
- proxyIp: params.localIP,
18731
18670
  accountId: params.accountId,
18732
18671
  uid: params.uid
18733
18672
  }, {
@@ -19114,16 +19053,11 @@ const rpa_server_rpaAction_Server = async (task, params)=>{
19114
19053
  return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.downloadImage)(url, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(tmpCachePath, fileName));
19115
19054
  }));
19116
19055
  let proxyUrl;
19117
- if (params.localIP) {
19118
- const args = [
19119
- params.localIP,
19120
- params.proxyLoc,
19121
- params.accountId
19122
- ];
19123
- task.logger?.info(`==> 开始获取代理信息:${args}`);
19056
+ if (params.proxyLoc) {
19057
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
19124
19058
  const ProxyAgentResult = await ProxyAgent({
19125
19059
  logger: task.logger
19126
- }, ...args);
19060
+ }, params.proxyLoc, params.accountId);
19127
19061
  task.logger?.info("==> 代理信息获取成功!");
19128
19062
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
19129
19063
  }
@@ -19773,16 +19707,11 @@ const toutiaoLogin_rpa_server_rpaServer = async (task, params)=>{
19773
19707
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
19774
19708
  let executionState;
19775
19709
  let proxyUrl;
19776
- if (params.localIP) {
19777
- const args = [
19778
- params.localIP,
19779
- params.proxyLoc,
19780
- params.accountId
19781
- ];
19782
- task.logger?.info(`==> 开始获取代理信息:${args}`);
19710
+ if (params.proxyLoc) {
19711
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
19783
19712
  const ProxyAgentResult = await ProxyAgent({
19784
19713
  logger: task.logger
19785
- }, ...args);
19714
+ }, params.proxyLoc, params.accountId);
19786
19715
  task.logger?.info("==> 代理信息获取成功!");
19787
19716
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
19788
19717
  }
@@ -20033,7 +19962,6 @@ const toutiaoPublish_mock_mockAction = async (task, params)=>{
20033
19962
  },
20034
19963
  task.logger,
20035
19964
  params.proxyLoc,
20036
- params.localIP,
20037
19965
  params.accountId,
20038
19966
  "toutiao"
20039
19967
  ];
@@ -20231,7 +20159,6 @@ const toutiaoPublish_mock_mockAction = async (task, params)=>{
20231
20159
  enverionment: task.enverionment || "development",
20232
20160
  postId: params.articleId,
20233
20161
  eip: proxyHttp.proxyInfo,
20234
- proxyIp: params.localIP,
20235
20162
  accountId: params.accountId,
20236
20163
  uid: params.uid,
20237
20164
  platform: "toutiao",
@@ -20866,16 +20793,11 @@ const weixinLogin_rpa_server_rpaServer = async (task, params)=>{
20866
20793
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
20867
20794
  let executionState;
20868
20795
  let proxyUrl;
20869
- if (params.localIP) {
20870
- const args = [
20871
- params.localIP,
20872
- params.proxyLoc,
20873
- params.accountId
20874
- ];
20875
- task.logger?.info(`==> 开始获取代理信息:${args}`);
20796
+ if (params.proxyLoc) {
20797
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
20876
20798
  const ProxyAgentResult = await ProxyAgent({
20877
20799
  logger: task.logger
20878
- }, ...args);
20800
+ }, params.proxyLoc, params.accountId);
20879
20801
  task.logger?.info("==> 代理信息获取成功!");
20880
20802
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
20881
20803
  }
@@ -21367,7 +21289,6 @@ const weixinPublish_mock_mockAction = async (task, params)=>{
21367
21289
  },
21368
21290
  task.logger,
21369
21291
  params.proxyLoc,
21370
- params.localIP,
21371
21292
  params.accountId,
21372
21293
  "weixin"
21373
21294
  ];
@@ -22146,7 +22067,6 @@ const weixinPublish_mock_mockAction = async (task, params)=>{
22146
22067
  enverionment: task.enverionment || "development",
22147
22068
  postId: params.articleId,
22148
22069
  eip: proxyHttp.proxyInfo,
22149
- proxyIp: params.localIP,
22150
22070
  accountId: params.accountId,
22151
22071
  uid: params.uid,
22152
22072
  platform: "weixin",
@@ -22951,16 +22871,11 @@ const xiaohongshuLogin_rpa_server_rpaServer = async (task, params)=>{
22951
22871
  const reporter = task.reportService?.reportLoginStatus ?? (()=>Promise.resolve());
22952
22872
  let executionState;
22953
22873
  let proxyUrl;
22954
- if (params.localIP) {
22955
- const args = [
22956
- params.localIP,
22957
- params.proxyLoc,
22958
- params.accountId
22959
- ];
22960
- task.logger?.info(`==> 开始获取代理信息:${args}`);
22874
+ if (params.proxyLoc) {
22875
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
22961
22876
  const ProxyAgentResult = await ProxyAgent({
22962
22877
  logger: task.logger
22963
- }, ...args);
22878
+ }, params.proxyLoc, params.accountId);
22964
22879
  task.logger?.info("==> 代理信息获取成功!");
22965
22880
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
22966
22881
  }
@@ -23277,7 +23192,6 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
23277
23192
  },
23278
23193
  task.logger,
23279
23194
  params.proxyLoc,
23280
- params.localIP,
23281
23195
  params.accountId,
23282
23196
  "xiaohongshu"
23283
23197
  ];
@@ -23318,8 +23232,8 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
23318
23232
  params: fetchCoverParams
23319
23233
  }, {
23320
23234
  retries: 3,
23321
- retryDelay: 20,
23322
- timeout: 3000
23235
+ retryDelay: 500,
23236
+ timeout: 30000
23323
23237
  });
23324
23238
  for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
23325
23239
  bucket: item.bucket || "",
@@ -23338,8 +23252,8 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
23338
23252
  params: fetchCoverParams
23339
23253
  }, {
23340
23254
  retries: 3,
23341
- retryDelay: 20,
23342
- timeout: 3000
23255
+ retryDelay: 500,
23256
+ timeout: 30000
23343
23257
  });
23344
23258
  for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
23345
23259
  bucket: item.bucket || "",
@@ -23400,7 +23314,9 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
23400
23314
  headers: {
23401
23315
  "x-cos-security-token": ossToken
23402
23316
  },
23403
- defaultErrorMsg: "图片上传异常,请稍后重试发布。"
23317
+ defaultErrorMsg: "图片上传异常,请稍后重试。"
23318
+ }, {
23319
+ timeout: 60000
23404
23320
  });
23405
23321
  return {
23406
23322
  ossFileId,
@@ -23410,6 +23326,8 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
23410
23326
  originSize
23411
23327
  };
23412
23328
  } catch (error) {
23329
+ const e = Http.handleApiError(error);
23330
+ 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)}`);
23413
23331
  attempt++;
23414
23332
  }
23415
23333
  }
@@ -23643,7 +23561,6 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
23643
23561
  enverionment: task.enverionment || "development",
23644
23562
  postId: params.articleId,
23645
23563
  eip: proxyHttp.proxyInfo,
23646
- proxyIp: params.localIP,
23647
23564
  accountId: params.accountId,
23648
23565
  uid: params.uid,
23649
23566
  platform: "xiaohongshu",
@@ -23905,16 +23822,11 @@ const xiaohongshuPublish_rpa_server_rpaAction_Server = async (task, params)=>{
23905
23822
  return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.downloadImage)(url, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(tmpCachePath, fileName));
23906
23823
  }));
23907
23824
  let proxyUrl;
23908
- if (params.localIP) {
23909
- const args = [
23910
- params.localIP,
23911
- params.proxyLoc,
23912
- params.accountId
23913
- ];
23914
- task.logger?.info(`==> 开始获取代理信息:${args}`);
23825
+ if (params.proxyLoc) {
23826
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
23915
23827
  const ProxyAgentResult = await ProxyAgent({
23916
23828
  logger: task.logger
23917
- }, ...args);
23829
+ }, params.proxyLoc, params.accountId);
23918
23830
  task.logger?.info("==> 代理信息获取成功!");
23919
23831
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
23920
23832
  }
@@ -24343,7 +24255,6 @@ const rpaAction_Server_Mock = async (task, params)=>{
24343
24255
  },
24344
24256
  task.logger,
24345
24257
  params.proxyLoc,
24346
- params.localIP,
24347
24258
  params.accountId,
24348
24259
  "xiaohongshu-rpa"
24349
24260
  ];
@@ -24389,8 +24300,8 @@ const rpaAction_Server_Mock = async (task, params)=>{
24389
24300
  params: fetchCoverParams
24390
24301
  }, {
24391
24302
  retries: 3,
24392
- retryDelay: 20,
24393
- timeout: 3000
24303
+ retryDelay: 500,
24304
+ timeout: 8000
24394
24305
  });
24395
24306
  for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
24396
24307
  bucket: item.bucket || "",
@@ -24409,8 +24320,8 @@ const rpaAction_Server_Mock = async (task, params)=>{
24409
24320
  params: fetchCoverParams
24410
24321
  }, {
24411
24322
  retries: 3,
24412
- retryDelay: 20,
24413
- timeout: 3000
24323
+ retryDelay: 500,
24324
+ timeout: 8000
24414
24325
  });
24415
24326
  for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
24416
24327
  bucket: item.bucket || "",
@@ -24455,6 +24366,8 @@ const rpaAction_Server_Mock = async (task, params)=>{
24455
24366
  "x-cos-security-token": ossToken
24456
24367
  },
24457
24368
  defaultErrorMsg: "图片上传异常,请稍后重试发布。"
24369
+ }, {
24370
+ timeout: 60000
24458
24371
  });
24459
24372
  return {
24460
24373
  ossFileId,
@@ -24764,7 +24677,6 @@ const xiaohongshuWebCommentAction = async (_task, params)=>{
24764
24677
  },
24765
24678
  _task.logger,
24766
24679
  params.proxyLoc,
24767
- params.localIP,
24768
24680
  params.accountId
24769
24681
  ];
24770
24682
  const http = new Http(...args);
@@ -24850,7 +24762,6 @@ const xiaohongshuWebIntimacySearch = async (_task, params)=>{
24850
24762
  },
24851
24763
  _task.logger,
24852
24764
  params.proxyLoc,
24853
- params.localIP,
24854
24765
  params.accountId
24855
24766
  ];
24856
24767
  const http = new Http(...args);
@@ -24889,7 +24800,6 @@ const xiaohongshuWebMsgRead = async (_task, params)=>{
24889
24800
  },
24890
24801
  _task.logger,
24891
24802
  params.proxyLoc,
24892
- params.localIP,
24893
24803
  params.accountId
24894
24804
  ];
24895
24805
  const http = new Http(...args);
@@ -24942,7 +24852,6 @@ const xiaohongshuWebMsgReply = async (_task, params)=>{
24942
24852
  },
24943
24853
  _task.logger,
24944
24854
  params.proxyLoc,
24945
- params.localIP,
24946
24855
  params.accountId
24947
24856
  ];
24948
24857
  const http = new Http(...args);
@@ -24999,7 +24908,6 @@ const xiaohongshuWebNoteFeed = async (_task, params)=>{
24999
24908
  },
25000
24909
  _task.logger,
25001
24910
  params.proxyLoc,
25002
- params.localIP,
25003
24911
  params.accountId
25004
24912
  ];
25005
24913
  const http = new Http(...args);
@@ -25072,7 +24980,6 @@ const xiaohongshuWebRelationAction = async (_task, params)=>{
25072
24980
  },
25073
24981
  _task.logger,
25074
24982
  params.proxyLoc,
25075
- params.localIP,
25076
24983
  params.accountId
25077
24984
  ];
25078
24985
  const http = new Http(...args);
@@ -25176,7 +25083,6 @@ const xiaohongshuWebSearch = async (_task, params)=>{
25176
25083
  },
25177
25084
  _task.logger,
25178
25085
  params.proxyLoc,
25179
- params.localIP,
25180
25086
  params.accountId
25181
25087
  ];
25182
25088
  const http = new Http(...args);
@@ -25612,4 +25518,4 @@ var __webpack_exports__version = package_namespaceObject.i8;
25612
25518
  export { Action, ActionCommonParamsSchema, BaijiahaoPublishParamsSchema, BetaFlag, CollectionDetailSchema, ConfigDataSchema, DouyinCheckVerifyQrCodeParamsSchema, DouyinCreateCommentReplyParamsSchema, DouyinGetCollectionParamsSchema, DouyinGetCommentListParamsSchema, DouyinGetCommentReplyListParamsSchema, DouyinGetHotParamsSchema, DouyinGetLocationParamsSchema, DouyinGetMusicByCategoryParamsSchema, DouyinGetMusicCategoryParamsSchema, DouyinGetMusicParamsSchema, DouyinGetTopicsParamsSchema, DouyinGetVerifyQrCodeParamsSchema, DouyinGetWorkListParamsSchema, DouyinPublishParamsSchema, FetchArticlesDataSchema, FetchArticlesParamsSchema, Http, ProxyAgent, SearchAccountInfoParamsSchema, SessionCheckResultSchema, ShipinhaoCheckLinkValidateParamsSchema, ShipinhaoGetLocationParamsSchema, ShipinhaoGetMsgParamsSchema, ShipinhaoPublishParamsSchema, ShipinhaoSendMsgParamsSchema, ToutiaoPublishParamsSchema, UnreadCountSchema, WeixinPublishParamsSchema, WxBjhSessionParamsSchema, XhsWebSearchParamsSchema, XiaohongshuPublishParamsSchema, bjhConfigDataSchema, douyinConfigDataSchema, getFileState, reportLogger, rpaAction_Server_Mock, shipinhaoConfigDataSchema, ttConfigDataSchema, wxConfigDataSchema, xhsConfigDataSchema, __webpack_exports__version as version };
25613
25519
 
25614
25520
  //# sourceMappingURL=index.mjs.map
25615
- //# debugId=65a9d1c4-06b7-5afb-8cd9-90bcb403fb1a
25521
+ //# debugId=c8d107bb-33ed-570f-91cf-6902618660d6