@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.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]="ef023941-5d5d-5514-b133-72fa4303f973")}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";
@@ -4352,9 +4352,7 @@ function __webpack_require__(moduleId) {
4352
4352
  return module;
4353
4353
  };
4354
4354
  })();
4355
- var package_namespaceObject = {
4356
- i8: "4.0.7"
4357
- };
4355
+ var package_namespaceObject = JSON.parse('{"i8":"4.0.8-beta.0"}');
4358
4356
  const PROXY_CREDENTIALS = [
4359
4357
  {
4360
4358
  ip: "47.110.131.129",
@@ -4441,15 +4439,14 @@ function buildProxyUrl(ip, port) {
4441
4439
  }
4442
4440
  return `socks5h://${ip}:${port}`;
4443
4441
  }
4444
- async function ProxyAgent(task, ip, adr, accountId, refresh) {
4442
+ async function ProxyAgent(task, addr, accountId, refresh) {
4445
4443
  const http = new Http({
4446
4444
  headers: {
4447
4445
  "content-type": "application/json"
4448
4446
  }
4449
4447
  });
4450
4448
  const params = {
4451
- ip: ip,
4452
- addr: adr || null,
4449
+ addr: addr || null,
4453
4450
  accountId: accountId
4454
4451
  };
4455
4452
  const ProxyInfo = await http.api({
@@ -4471,7 +4468,7 @@ async function ProxyAgent(task, ip, adr, accountId, refresh) {
4471
4468
  data: ProxyInfo.data
4472
4469
  }
4473
4470
  };
4474
- task.logger?.info(`请求代理:区域:${params.addr}, IP:${params.ip}, AccountId:${params.accountId}, 返回代理信息: ${ProxyInfo.data ? `${ProxyInfo.data.proxyIp}:${ProxyInfo.data.proxyPort}` : "无可用代理"}`, loggerInfo);
4471
+ task.logger?.info(`请求代理:区域:${params.addr}, AccountId:${params.accountId}, 返回代理信息: ${ProxyInfo.data ? `${ProxyInfo.data.proxyIp}:${ProxyInfo.data.proxyPort}` : "无可用代理"}`, loggerInfo);
4475
4472
  const proxyAgent = "000000" === ProxyInfo.code && ProxyInfo.data ? {
4476
4473
  ip: ProxyInfo.data.proxyIp,
4477
4474
  port: ProxyInfo.data.proxyPort,
@@ -4488,16 +4485,16 @@ class Http {
4488
4485
  data: error
4489
4486
  };
4490
4487
  }
4491
- constructor(config, logger, adr, ip, accountId, platform){
4488
+ constructor(config, logger, addr, accountId, platform){
4492
4489
  this.agentPromise = void 0;
4493
4490
  this.apiClient = __WEBPACK_EXTERNAL_MODULE_axios__["default"].create({
4494
4491
  ...config
4495
4492
  });
4496
4493
  this.logger = logger;
4497
4494
  this.platform = platform;
4498
- if (ip) this.agentPromise = ProxyAgent({
4495
+ if (addr) this.agentPromise = ProxyAgent({
4499
4496
  logger
4500
- }, ip, adr, accountId);
4497
+ }, addr, accountId);
4501
4498
  this.addResponseInterceptor(()=>void 0);
4502
4499
  }
4503
4500
  clearResponseInterceptors() {
@@ -8655,16 +8652,11 @@ const rpaServer = async (task, params)=>{
8655
8652
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
8656
8653
  let executionState;
8657
8654
  let proxyUrl;
8658
- if (params.localIP) {
8659
- const args = [
8660
- params.localIP,
8661
- params.proxyLoc,
8662
- params.accountId
8663
- ];
8664
- task.logger?.info(`==> 开始获取代理信息:${args}`);
8655
+ if (params.proxyLoc) {
8656
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
8665
8657
  const ProxyAgentResult = await ProxyAgent({
8666
8658
  logger: task.logger
8667
- }, ...args);
8659
+ }, params.proxyLoc, params.accountId);
8668
8660
  task.logger?.info("==> 代理信息获取成功!");
8669
8661
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
8670
8662
  }
@@ -9007,7 +8999,6 @@ const mockAction = async (task, params)=>{
9007
8999
  },
9008
9000
  task.logger,
9009
9001
  params.proxyLoc,
9010
- params.localIP,
9011
9002
  params.accountId,
9012
9003
  "baijiahao"
9013
9004
  ];
@@ -9213,7 +9204,6 @@ const mockAction = async (task, params)=>{
9213
9204
  enverionment: task.enverionment || "development",
9214
9205
  postId: params.articleId,
9215
9206
  eip: proxyHttp.proxyInfo,
9216
- proxyIp: params.localIP,
9217
9207
  accountId: params.accountId,
9218
9208
  uid: params.uid,
9219
9209
  platform: "baijiahao",
@@ -9732,7 +9722,6 @@ const XhsFansExport = async (_task, params)=>{
9732
9722
  },
9733
9723
  _task.logger,
9734
9724
  params.proxyLoc,
9735
- params.localIP,
9736
9725
  params.accountId
9737
9726
  ];
9738
9727
  const http = new Http(...args);
@@ -10862,7 +10851,7 @@ const XhsSessionCheck = async (_task, params)=>{
10862
10851
  heapTotal: `${Math.round(process.memoryUsage().heapTotal / 1024 / 1024)} MB`
10863
10852
  },
10864
10853
  accountId: params.accountId,
10865
- hasProxy: !!(params.proxyLoc || params.localIP)
10854
+ hasProxy: !!params.proxyLoc
10866
10855
  });
10867
10856
  }
10868
10857
  const check = {
@@ -10885,7 +10874,6 @@ const XhsSessionCheck = async (_task, params)=>{
10885
10874
  },
10886
10875
  _task.logger,
10887
10876
  params.proxyLoc,
10888
- params.localIP,
10889
10877
  params.accountId
10890
10878
  ];
10891
10879
  const http = new Http(...args);
@@ -10916,7 +10904,7 @@ const XhsSessionCheck = async (_task, params)=>{
10916
10904
  heapUsed: `${Math.round(process.memoryUsage().heapUsed / 1024 / 1024)} MB`,
10917
10905
  heapTotal: `${Math.round(process.memoryUsage().heapTotal / 1024 / 1024)} MB`
10918
10906
  },
10919
- hasProxy: !!(params.proxyLoc || params.localIP),
10907
+ hasProxy: !!params.proxyLoc,
10920
10908
  timeSinceLastLog: Date.now() - lastEnvLogTime
10921
10909
  }
10922
10910
  });
@@ -11319,7 +11307,6 @@ const douyinCreateCommentReply = async (_task, params)=>{
11319
11307
  },
11320
11308
  _task.logger,
11321
11309
  params.proxyLoc,
11322
- params.localIP,
11323
11310
  params.accountId
11324
11311
  ];
11325
11312
  const http = new Http(...args);
@@ -11406,7 +11393,6 @@ const douyinGetCollection = async (_task, params)=>{
11406
11393
  },
11407
11394
  _task.logger,
11408
11395
  params.proxyLoc,
11409
- params.localIP,
11410
11396
  params.accountId
11411
11397
  ];
11412
11398
  const http = new Http(...args);
@@ -11497,7 +11483,6 @@ const douyinGetCommentList = async (_task, params)=>{
11497
11483
  },
11498
11484
  _task.logger,
11499
11485
  params.proxyLoc,
11500
- params.localIP,
11501
11486
  params.accountId
11502
11487
  ];
11503
11488
  const http = new Http(...args);
@@ -11583,7 +11568,6 @@ const douyinGetCommentReplyList = async (_task, params)=>{
11583
11568
  },
11584
11569
  _task.logger,
11585
11570
  params.proxyLoc,
11586
- params.localIP,
11587
11571
  params.accountId
11588
11572
  ];
11589
11573
  const http = new Http(...args);
@@ -11667,7 +11651,6 @@ const douyinGetHot = async (_task, params)=>{
11667
11651
  },
11668
11652
  _task.logger,
11669
11653
  params.proxyLoc,
11670
- params.localIP,
11671
11654
  params.accountId
11672
11655
  ];
11673
11656
  const http = new Http(...args);
@@ -11763,7 +11746,6 @@ const douyinGetLocation = async (_task, params)=>{
11763
11746
  },
11764
11747
  _task.logger,
11765
11748
  params.proxyLoc,
11766
- params.localIP,
11767
11749
  params.accountId
11768
11750
  ];
11769
11751
  const http = new Http(...args);
@@ -11862,7 +11844,6 @@ const douyinGetMusic = async (_task, params)=>{
11862
11844
  },
11863
11845
  _task.logger,
11864
11846
  params.proxyLoc,
11865
- params.localIP,
11866
11847
  params.accountId
11867
11848
  ];
11868
11849
  const http = new Http(...args);
@@ -12008,7 +11989,6 @@ const douyinGetMusicByCategory = async (_task, params)=>{
12008
11989
  },
12009
11990
  _task.logger,
12010
11991
  params.proxyLoc,
12011
- params.localIP,
12012
11992
  params.accountId
12013
11993
  ];
12014
11994
  const http = new Http(...args);
@@ -12096,7 +12076,6 @@ const douyinGetMusicCategory = async (_task, params)=>{
12096
12076
  },
12097
12077
  _task.logger,
12098
12078
  params.proxyLoc,
12099
- params.localIP,
12100
12079
  params.accountId
12101
12080
  ];
12102
12081
  const http = new Http(...args);
@@ -12184,7 +12163,6 @@ const douyinGetTopics = async (_task, params)=>{
12184
12163
  },
12185
12164
  _task.logger,
12186
12165
  params.proxyLoc,
12187
- params.localIP,
12188
12166
  params.accountId
12189
12167
  ];
12190
12168
  const http = new Http(...args);
@@ -12405,7 +12383,6 @@ const douyinGetWorkList = async (_task, params)=>{
12405
12383
  },
12406
12384
  _task.logger,
12407
12385
  params.proxyLoc,
12408
- params.localIP,
12409
12386
  params.accountId
12410
12387
  ];
12411
12388
  const http = new Http(...args);
@@ -12767,16 +12744,11 @@ const rpa_server_rpaServer = async (task, params)=>{
12767
12744
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
12768
12745
  let executionState;
12769
12746
  let proxyUrl;
12770
- if (params.localIP) {
12771
- const args = [
12772
- params.localIP,
12773
- params.proxyLoc,
12774
- params.accountId
12775
- ];
12776
- task.logger?.info(`==> 开始获取代理信息:${args}`);
12747
+ if (params.proxyLoc) {
12748
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
12777
12749
  const ProxyAgentResult = await ProxyAgent({
12778
12750
  logger: task.logger
12779
- }, ...args);
12751
+ }, params.proxyLoc, params.accountId);
12780
12752
  task.logger?.info("==> 代理信息获取成功!");
12781
12753
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
12782
12754
  }
@@ -13385,7 +13357,7 @@ function safeSerialize(obj) {
13385
13357
  }
13386
13358
  const mock_mockAction = async (task, params)=>{
13387
13359
  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 参数缺失或不完整", "");
13360
+ 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
13361
  let currentStep = "初始化";
13390
13362
  try {
13391
13363
  currentStep = "验证账号信息";
@@ -13471,8 +13443,7 @@ const mock_mockAction = async (task, params)=>{
13471
13443
  headers
13472
13444
  },
13473
13445
  task.logger,
13474
- "",
13475
- "",
13446
+ params.proxyLoc,
13476
13447
  params.accountId,
13477
13448
  "douyin"
13478
13449
  ];
@@ -13745,7 +13716,6 @@ const mock_mockAction = async (task, params)=>{
13745
13716
  enverionment: task.enverionment || "development",
13746
13717
  postId: params.articleId,
13747
13718
  eip: proxyHttp.proxyInfo,
13748
- proxyIp: params.localIP,
13749
13719
  accountId: params.accountId,
13750
13720
  uid: params.uid,
13751
13721
  platform: "douyin",
@@ -14108,18 +14078,13 @@ const rpaAction_Server = async (task, params)=>{
14108
14078
  return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.downloadImage)(url, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(tmpCachePath, fileName));
14109
14079
  }));
14110
14080
  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({
14081
+ if (params.proxyLoc) {
14082
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
14083
+ const ProxyAgentResult = await ProxyAgent({
14119
14084
  logger: task.logger
14120
- }, ...args);
14085
+ }, params.proxyLoc, params.accountId);
14121
14086
  task.logger?.info("==> 代理信息获取成功!");
14122
- proxyUrl = proxyAgentResult ? `http://${proxyAgentResult.ip}:${proxyAgentResult.port}` : void 0;
14087
+ proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
14123
14088
  }
14124
14089
  const commonCookies = {
14125
14090
  path: "/",
@@ -15076,7 +15041,6 @@ const getXhsCollection = async (_task, params)=>{
15076
15041
  },
15077
15042
  _task.logger,
15078
15043
  params.proxyLoc,
15079
- params.localIP,
15080
15044
  params.accountId
15081
15045
  ];
15082
15046
  const http = new Http(...args);
@@ -15134,7 +15098,6 @@ const getXhsGroup = async (_task, params)=>{
15134
15098
  },
15135
15099
  _task.logger,
15136
15100
  params.proxyLoc,
15137
- params.localIP,
15138
15101
  params.accountId
15139
15102
  ];
15140
15103
  const http = new Http(...args);
@@ -15181,7 +15144,6 @@ const getXhsHotTopic = async (_task, params)=>{
15181
15144
  },
15182
15145
  _task.logger,
15183
15146
  params.proxyLoc,
15184
- params.localIP,
15185
15147
  params.accountId
15186
15148
  ];
15187
15149
  const http = new Http(...args);
@@ -15243,7 +15205,6 @@ const getXhsUnreadCount = async (_task, params)=>{
15243
15205
  },
15244
15206
  _task.logger,
15245
15207
  params.proxyLoc,
15246
- params.localIP,
15247
15208
  params.accountId
15248
15209
  ];
15249
15210
  const http = new Http(...args);
@@ -15351,7 +15312,6 @@ async function getDouyinData(_task, params) {
15351
15312
  },
15352
15313
  _task.logger,
15353
15314
  params.proxyLoc,
15354
- params.localIP,
15355
15315
  params.accountId
15356
15316
  ];
15357
15317
  const http = new Http(...args);
@@ -15458,7 +15418,6 @@ async function getShipinhaoData(_task, params) {
15458
15418
  },
15459
15419
  _task.logger,
15460
15420
  params.proxyLoc,
15461
- params.localIP,
15462
15421
  params.accountId
15463
15422
  ];
15464
15423
  const http = new Http(...args);
@@ -15687,7 +15646,6 @@ async function getXiaohongshuData(_task, params) {
15687
15646
  },
15688
15647
  _task.logger,
15689
15648
  params.proxyLoc,
15690
- params.localIP,
15691
15649
  params.accountId
15692
15650
  ];
15693
15651
  const http = new Http(...args);
@@ -16020,7 +15978,6 @@ async function handleDouyinData(_task, params) {
16020
15978
  },
16021
15979
  _task.logger,
16022
15980
  params.proxyLoc,
16023
- params.localIP,
16024
15981
  params.accountId
16025
15982
  ];
16026
15983
  const http = new Http(...args);
@@ -16126,7 +16083,6 @@ async function handleShipinhaoData(_task, params) {
16126
16083
  },
16127
16084
  _task.logger,
16128
16085
  params.proxyLoc,
16129
- params.localIP,
16130
16086
  params.accountId
16131
16087
  ];
16132
16088
  const http = new Http(...args);
@@ -16589,7 +16545,6 @@ async function handleXiaohongshuData(_task, params) {
16589
16545
  },
16590
16546
  _task.logger,
16591
16547
  params.proxyLoc,
16592
- params.localIP,
16593
16548
  params.accountId
16594
16549
  ];
16595
16550
  const http = new Http(...args);
@@ -16920,7 +16875,6 @@ const searchXhsWebConnections = async (_task, params)=>{
16920
16875
  },
16921
16876
  _task.logger,
16922
16877
  params.proxyLoc,
16923
- params.localIP,
16924
16878
  params.accountId
16925
16879
  ];
16926
16880
  const http = new Http(...args);
@@ -16973,7 +16927,6 @@ const searchXhsWebLikes = async (_task, params)=>{
16973
16927
  },
16974
16928
  _task.logger,
16975
16929
  params.proxyLoc,
16976
- params.localIP,
16977
16930
  params.accountId
16978
16931
  ];
16979
16932
  const http = new Http(...args);
@@ -17026,7 +16979,6 @@ const searchXhsWebMentions = async (_task, params)=>{
17026
16979
  },
17027
16980
  _task.logger,
17028
16981
  params.proxyLoc,
17029
- params.localIP,
17030
16982
  params.accountId
17031
16983
  ];
17032
16984
  const http = new Http(...args);
@@ -17073,7 +17025,6 @@ const searchXiaohongshuLocation = async (_task, params)=>{
17073
17025
  },
17074
17026
  _task.logger,
17075
17027
  params.proxyLoc,
17076
- params.localIP,
17077
17028
  params.accountId
17078
17029
  ];
17079
17030
  const http = new Http(...args);
@@ -17112,7 +17063,6 @@ const searchXiaohongshuTopicList = async (_task, params)=>{
17112
17063
  },
17113
17064
  _task.logger,
17114
17065
  params.proxyLoc,
17115
- params.localIP,
17116
17066
  params.accountId
17117
17067
  ];
17118
17068
  const http = new Http(...args);
@@ -17174,7 +17124,6 @@ const searchXiaohongshuUserArticle = async (_task, params)=>{
17174
17124
  },
17175
17125
  _task.logger,
17176
17126
  params.proxyLoc,
17177
- params.localIP,
17178
17127
  params.accountId
17179
17128
  ];
17180
17129
  const http = new Http(...args);
@@ -17231,7 +17180,6 @@ const shipinhaoCheckLinkValidate = async (_task, params)=>{
17231
17180
  },
17232
17181
  _task.logger,
17233
17182
  params.proxyLoc,
17234
- params.localIP,
17235
17183
  params.accountId
17236
17184
  ];
17237
17185
  const http = new Http(...args);
@@ -17317,7 +17265,6 @@ const shipinhaoGetLocation = async (_task, params)=>{
17317
17265
  },
17318
17266
  _task.logger,
17319
17267
  params.proxyLoc,
17320
- params.localIP,
17321
17268
  params.accountId
17322
17269
  ];
17323
17270
  const http = new Http(...args);
@@ -17405,7 +17352,6 @@ const shipinhaoGetMsg = async (_task, params)=>{
17405
17352
  },
17406
17353
  _task.logger,
17407
17354
  params.proxyLoc,
17408
- params.localIP,
17409
17355
  params.accountId
17410
17356
  ];
17411
17357
  const http = new Http(...args);
@@ -17515,7 +17461,6 @@ const shipinhaoGetMsgImage = async (_task, params)=>{
17515
17461
  },
17516
17462
  _task.logger,
17517
17463
  params.proxyLoc,
17518
- params.localIP,
17519
17464
  params.accountId
17520
17465
  ];
17521
17466
  const http = new Http(...args);
@@ -17793,16 +17738,11 @@ const shipinhaoLogin_rpa_server_rpaServer = async (task, params)=>{
17793
17738
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
17794
17739
  let executionState;
17795
17740
  let proxyUrl;
17796
- if (params.localIP) {
17797
- const args = [
17798
- params.localIP,
17799
- params.proxyLoc,
17800
- params.accountId
17801
- ];
17802
- task.logger?.info(`==> 开始获取代理信息:${args}`);
17741
+ if (params.proxyLoc) {
17742
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
17803
17743
  const ProxyAgentResult = await ProxyAgent({
17804
17744
  logger: task.logger
17805
- }, ...args);
17745
+ }, params.proxyLoc, params.accountId);
17806
17746
  task.logger?.info("==> 代理信息获取成功!");
17807
17747
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
17808
17748
  }
@@ -18629,7 +18569,6 @@ async function publishDynamic(cookies, uin, fingerPrintDeviceId, aId, proxyHttp,
18629
18569
  enverionment: confParams.enverionment || "development",
18630
18570
  postId: confParams.articleId,
18631
18571
  eip: proxyHttp.proxyInfo,
18632
- proxyIp: confParams.proxyIp,
18633
18572
  accountId: confParams.accountId,
18634
18573
  uid: confParams.uid,
18635
18574
  publishParams: publishData,
@@ -18656,7 +18595,6 @@ const shipinhaoPublish_mock_mockAction = async (task, params)=>{
18656
18595
  },
18657
18596
  task.logger,
18658
18597
  params.proxyLoc,
18659
- params.localIP,
18660
18598
  params.accountId,
18661
18599
  "shipinhao"
18662
18600
  ];
@@ -18727,7 +18665,6 @@ const shipinhaoPublish_mock_mockAction = async (task, params)=>{
18727
18665
  articleId: params.articleId,
18728
18666
  postId: params.articleId,
18729
18667
  eip: proxyHttp.proxyInfo,
18730
- proxyIp: params.localIP,
18731
18668
  accountId: params.accountId,
18732
18669
  uid: params.uid
18733
18670
  }, {
@@ -19114,16 +19051,11 @@ const rpa_server_rpaAction_Server = async (task, params)=>{
19114
19051
  return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.downloadImage)(url, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(tmpCachePath, fileName));
19115
19052
  }));
19116
19053
  let proxyUrl;
19117
- if (params.localIP) {
19118
- const args = [
19119
- params.localIP,
19120
- params.proxyLoc,
19121
- params.accountId
19122
- ];
19123
- task.logger?.info(`==> 开始获取代理信息:${args}`);
19054
+ if (params.proxyLoc) {
19055
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
19124
19056
  const ProxyAgentResult = await ProxyAgent({
19125
19057
  logger: task.logger
19126
- }, ...args);
19058
+ }, params.proxyLoc, params.accountId);
19127
19059
  task.logger?.info("==> 代理信息获取成功!");
19128
19060
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
19129
19061
  }
@@ -19773,16 +19705,11 @@ const toutiaoLogin_rpa_server_rpaServer = async (task, params)=>{
19773
19705
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
19774
19706
  let executionState;
19775
19707
  let proxyUrl;
19776
- if (params.localIP) {
19777
- const args = [
19778
- params.localIP,
19779
- params.proxyLoc,
19780
- params.accountId
19781
- ];
19782
- task.logger?.info(`==> 开始获取代理信息:${args}`);
19708
+ if (params.proxyLoc) {
19709
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
19783
19710
  const ProxyAgentResult = await ProxyAgent({
19784
19711
  logger: task.logger
19785
- }, ...args);
19712
+ }, params.proxyLoc, params.accountId);
19786
19713
  task.logger?.info("==> 代理信息获取成功!");
19787
19714
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
19788
19715
  }
@@ -20033,7 +19960,6 @@ const toutiaoPublish_mock_mockAction = async (task, params)=>{
20033
19960
  },
20034
19961
  task.logger,
20035
19962
  params.proxyLoc,
20036
- params.localIP,
20037
19963
  params.accountId,
20038
19964
  "toutiao"
20039
19965
  ];
@@ -20231,7 +20157,6 @@ const toutiaoPublish_mock_mockAction = async (task, params)=>{
20231
20157
  enverionment: task.enverionment || "development",
20232
20158
  postId: params.articleId,
20233
20159
  eip: proxyHttp.proxyInfo,
20234
- proxyIp: params.localIP,
20235
20160
  accountId: params.accountId,
20236
20161
  uid: params.uid,
20237
20162
  platform: "toutiao",
@@ -20866,16 +20791,11 @@ const weixinLogin_rpa_server_rpaServer = async (task, params)=>{
20866
20791
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
20867
20792
  let executionState;
20868
20793
  let proxyUrl;
20869
- if (params.localIP) {
20870
- const args = [
20871
- params.localIP,
20872
- params.proxyLoc,
20873
- params.accountId
20874
- ];
20875
- task.logger?.info(`==> 开始获取代理信息:${args}`);
20794
+ if (params.proxyLoc) {
20795
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
20876
20796
  const ProxyAgentResult = await ProxyAgent({
20877
20797
  logger: task.logger
20878
- }, ...args);
20798
+ }, params.proxyLoc, params.accountId);
20879
20799
  task.logger?.info("==> 代理信息获取成功!");
20880
20800
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
20881
20801
  }
@@ -21367,7 +21287,6 @@ const weixinPublish_mock_mockAction = async (task, params)=>{
21367
21287
  },
21368
21288
  task.logger,
21369
21289
  params.proxyLoc,
21370
- params.localIP,
21371
21290
  params.accountId,
21372
21291
  "weixin"
21373
21292
  ];
@@ -22146,7 +22065,6 @@ const weixinPublish_mock_mockAction = async (task, params)=>{
22146
22065
  enverionment: task.enverionment || "development",
22147
22066
  postId: params.articleId,
22148
22067
  eip: proxyHttp.proxyInfo,
22149
- proxyIp: params.localIP,
22150
22068
  accountId: params.accountId,
22151
22069
  uid: params.uid,
22152
22070
  platform: "weixin",
@@ -22951,16 +22869,11 @@ const xiaohongshuLogin_rpa_server_rpaServer = async (task, params)=>{
22951
22869
  const reporter = task.reportService?.reportLoginStatus ?? (()=>Promise.resolve());
22952
22870
  let executionState;
22953
22871
  let proxyUrl;
22954
- if (params.localIP) {
22955
- const args = [
22956
- params.localIP,
22957
- params.proxyLoc,
22958
- params.accountId
22959
- ];
22960
- task.logger?.info(`==> 开始获取代理信息:${args}`);
22872
+ if (params.proxyLoc) {
22873
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
22961
22874
  const ProxyAgentResult = await ProxyAgent({
22962
22875
  logger: task.logger
22963
- }, ...args);
22876
+ }, params.proxyLoc, params.accountId);
22964
22877
  task.logger?.info("==> 代理信息获取成功!");
22965
22878
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
22966
22879
  }
@@ -23277,7 +23190,6 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
23277
23190
  },
23278
23191
  task.logger,
23279
23192
  params.proxyLoc,
23280
- params.localIP,
23281
23193
  params.accountId,
23282
23194
  "xiaohongshu"
23283
23195
  ];
@@ -23318,8 +23230,8 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
23318
23230
  params: fetchCoverParams
23319
23231
  }, {
23320
23232
  retries: 3,
23321
- retryDelay: 20,
23322
- timeout: 3000
23233
+ retryDelay: 500,
23234
+ timeout: 30000
23323
23235
  });
23324
23236
  for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
23325
23237
  bucket: item.bucket || "",
@@ -23338,8 +23250,8 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
23338
23250
  params: fetchCoverParams
23339
23251
  }, {
23340
23252
  retries: 3,
23341
- retryDelay: 20,
23342
- timeout: 3000
23253
+ retryDelay: 500,
23254
+ timeout: 30000
23343
23255
  });
23344
23256
  for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
23345
23257
  bucket: item.bucket || "",
@@ -23400,7 +23312,9 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
23400
23312
  headers: {
23401
23313
  "x-cos-security-token": ossToken
23402
23314
  },
23403
- defaultErrorMsg: "图片上传异常,请稍后重试发布。"
23315
+ defaultErrorMsg: "图片上传异常,请稍后重试。"
23316
+ }, {
23317
+ timeout: 60000
23404
23318
  });
23405
23319
  return {
23406
23320
  ossFileId,
@@ -23410,6 +23324,8 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
23410
23324
  originSize
23411
23325
  };
23412
23326
  } catch (error) {
23327
+ const e = Http.handleApiError(error);
23328
+ 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
23329
  attempt++;
23414
23330
  }
23415
23331
  }
@@ -23643,7 +23559,6 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
23643
23559
  enverionment: task.enverionment || "development",
23644
23560
  postId: params.articleId,
23645
23561
  eip: proxyHttp.proxyInfo,
23646
- proxyIp: params.localIP,
23647
23562
  accountId: params.accountId,
23648
23563
  uid: params.uid,
23649
23564
  platform: "xiaohongshu",
@@ -23905,16 +23820,11 @@ const xiaohongshuPublish_rpa_server_rpaAction_Server = async (task, params)=>{
23905
23820
  return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.downloadImage)(url, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(tmpCachePath, fileName));
23906
23821
  }));
23907
23822
  let proxyUrl;
23908
- if (params.localIP) {
23909
- const args = [
23910
- params.localIP,
23911
- params.proxyLoc,
23912
- params.accountId
23913
- ];
23914
- task.logger?.info(`==> 开始获取代理信息:${args}`);
23823
+ if (params.proxyLoc) {
23824
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
23915
23825
  const ProxyAgentResult = await ProxyAgent({
23916
23826
  logger: task.logger
23917
- }, ...args);
23827
+ }, params.proxyLoc, params.accountId);
23918
23828
  task.logger?.info("==> 代理信息获取成功!");
23919
23829
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
23920
23830
  }
@@ -24343,7 +24253,6 @@ const rpaAction_Server_Mock = async (task, params)=>{
24343
24253
  },
24344
24254
  task.logger,
24345
24255
  params.proxyLoc,
24346
- params.localIP,
24347
24256
  params.accountId,
24348
24257
  "xiaohongshu-rpa"
24349
24258
  ];
@@ -24389,8 +24298,8 @@ const rpaAction_Server_Mock = async (task, params)=>{
24389
24298
  params: fetchCoverParams
24390
24299
  }, {
24391
24300
  retries: 3,
24392
- retryDelay: 20,
24393
- timeout: 3000
24301
+ retryDelay: 500,
24302
+ timeout: 8000
24394
24303
  });
24395
24304
  for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
24396
24305
  bucket: item.bucket || "",
@@ -24409,8 +24318,8 @@ const rpaAction_Server_Mock = async (task, params)=>{
24409
24318
  params: fetchCoverParams
24410
24319
  }, {
24411
24320
  retries: 3,
24412
- retryDelay: 20,
24413
- timeout: 3000
24321
+ retryDelay: 500,
24322
+ timeout: 8000
24414
24323
  });
24415
24324
  for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
24416
24325
  bucket: item.bucket || "",
@@ -24455,6 +24364,8 @@ const rpaAction_Server_Mock = async (task, params)=>{
24455
24364
  "x-cos-security-token": ossToken
24456
24365
  },
24457
24366
  defaultErrorMsg: "图片上传异常,请稍后重试发布。"
24367
+ }, {
24368
+ timeout: 60000
24458
24369
  });
24459
24370
  return {
24460
24371
  ossFileId,
@@ -24764,7 +24675,6 @@ const xiaohongshuWebCommentAction = async (_task, params)=>{
24764
24675
  },
24765
24676
  _task.logger,
24766
24677
  params.proxyLoc,
24767
- params.localIP,
24768
24678
  params.accountId
24769
24679
  ];
24770
24680
  const http = new Http(...args);
@@ -24850,7 +24760,6 @@ const xiaohongshuWebIntimacySearch = async (_task, params)=>{
24850
24760
  },
24851
24761
  _task.logger,
24852
24762
  params.proxyLoc,
24853
- params.localIP,
24854
24763
  params.accountId
24855
24764
  ];
24856
24765
  const http = new Http(...args);
@@ -24889,7 +24798,6 @@ const xiaohongshuWebMsgRead = async (_task, params)=>{
24889
24798
  },
24890
24799
  _task.logger,
24891
24800
  params.proxyLoc,
24892
- params.localIP,
24893
24801
  params.accountId
24894
24802
  ];
24895
24803
  const http = new Http(...args);
@@ -24942,7 +24850,6 @@ const xiaohongshuWebMsgReply = async (_task, params)=>{
24942
24850
  },
24943
24851
  _task.logger,
24944
24852
  params.proxyLoc,
24945
- params.localIP,
24946
24853
  params.accountId
24947
24854
  ];
24948
24855
  const http = new Http(...args);
@@ -24999,7 +24906,6 @@ const xiaohongshuWebNoteFeed = async (_task, params)=>{
24999
24906
  },
25000
24907
  _task.logger,
25001
24908
  params.proxyLoc,
25002
- params.localIP,
25003
24909
  params.accountId
25004
24910
  ];
25005
24911
  const http = new Http(...args);
@@ -25072,7 +24978,6 @@ const xiaohongshuWebRelationAction = async (_task, params)=>{
25072
24978
  },
25073
24979
  _task.logger,
25074
24980
  params.proxyLoc,
25075
- params.localIP,
25076
24981
  params.accountId
25077
24982
  ];
25078
24983
  const http = new Http(...args);
@@ -25176,7 +25081,6 @@ const xiaohongshuWebSearch = async (_task, params)=>{
25176
25081
  },
25177
25082
  _task.logger,
25178
25083
  params.proxyLoc,
25179
- params.localIP,
25180
25084
  params.accountId
25181
25085
  ];
25182
25086
  const http = new Http(...args);
@@ -25612,4 +25516,4 @@ var __webpack_exports__version = package_namespaceObject.i8;
25612
25516
  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
25517
 
25614
25518
  //# sourceMappingURL=index.mjs.map
25615
- //# debugId=65a9d1c4-06b7-5afb-8cd9-90bcb403fb1a
25519
+ //# debugId=ef023941-5d5d-5514-b133-72fa4303f973