@iflyrpa/actions 4.0.6 → 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,3 +1,5 @@
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]="ef023941-5d5d-5514-b133-72fa4303f973")}catch(e){}}();
1
3
  import * as __WEBPACK_EXTERNAL_MODULE_crypto__ from "crypto";
2
4
  import * as __WEBPACK_EXTERNAL_MODULE_fs__ from "fs";
3
5
  import * as __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_package_json_58ae5f06__ from "@iflyrpa/share/package.json";
@@ -4350,9 +4352,7 @@ function __webpack_require__(moduleId) {
4350
4352
  return module;
4351
4353
  };
4352
4354
  })();
4353
- var package_namespaceObject = {
4354
- i8: "4.0.6"
4355
- };
4355
+ var package_namespaceObject = JSON.parse('{"i8":"4.0.8-beta.0"}');
4356
4356
  const PROXY_CREDENTIALS = [
4357
4357
  {
4358
4358
  ip: "47.110.131.129",
@@ -4439,15 +4439,14 @@ function buildProxyUrl(ip, port) {
4439
4439
  }
4440
4440
  return `socks5h://${ip}:${port}`;
4441
4441
  }
4442
- async function ProxyAgent(task, ip, adr, accountId, refresh) {
4442
+ async function ProxyAgent(task, addr, accountId, refresh) {
4443
4443
  const http = new Http({
4444
4444
  headers: {
4445
4445
  "content-type": "application/json"
4446
4446
  }
4447
4447
  });
4448
4448
  const params = {
4449
- ip: ip,
4450
- addr: adr || null,
4449
+ addr: addr || null,
4451
4450
  accountId: accountId
4452
4451
  };
4453
4452
  const ProxyInfo = await http.api({
@@ -4469,7 +4468,7 @@ async function ProxyAgent(task, ip, adr, accountId, refresh) {
4469
4468
  data: ProxyInfo.data
4470
4469
  }
4471
4470
  };
4472
- 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);
4473
4472
  const proxyAgent = "000000" === ProxyInfo.code && ProxyInfo.data ? {
4474
4473
  ip: ProxyInfo.data.proxyIp,
4475
4474
  port: ProxyInfo.data.proxyPort,
@@ -4486,16 +4485,16 @@ class Http {
4486
4485
  data: error
4487
4486
  };
4488
4487
  }
4489
- constructor(config, logger, adr, ip, accountId, platform){
4488
+ constructor(config, logger, addr, accountId, platform){
4490
4489
  this.agentPromise = void 0;
4491
4490
  this.apiClient = __WEBPACK_EXTERNAL_MODULE_axios__["default"].create({
4492
4491
  ...config
4493
4492
  });
4494
4493
  this.logger = logger;
4495
4494
  this.platform = platform;
4496
- if (ip) this.agentPromise = ProxyAgent({
4495
+ if (addr) this.agentPromise = ProxyAgent({
4497
4496
  logger
4498
- }, ip, adr, accountId);
4497
+ }, addr, accountId);
4499
4498
  this.addResponseInterceptor(()=>void 0);
4500
4499
  }
4501
4500
  clearResponseInterceptors() {
@@ -8653,16 +8652,11 @@ const rpaServer = async (task, params)=>{
8653
8652
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
8654
8653
  let executionState;
8655
8654
  let proxyUrl;
8656
- if (params.localIP) {
8657
- const args = [
8658
- params.localIP,
8659
- params.proxyLoc,
8660
- params.accountId
8661
- ];
8662
- task.logger?.info(`==> 开始获取代理信息:${args}`);
8655
+ if (params.proxyLoc) {
8656
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
8663
8657
  const ProxyAgentResult = await ProxyAgent({
8664
8658
  logger: task.logger
8665
- }, ...args);
8659
+ }, params.proxyLoc, params.accountId);
8666
8660
  task.logger?.info("==> 代理信息获取成功!");
8667
8661
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
8668
8662
  }
@@ -9005,7 +8999,6 @@ const mockAction = async (task, params)=>{
9005
8999
  },
9006
9000
  task.logger,
9007
9001
  params.proxyLoc,
9008
- params.localIP,
9009
9002
  params.accountId,
9010
9003
  "baijiahao"
9011
9004
  ];
@@ -9211,7 +9204,6 @@ const mockAction = async (task, params)=>{
9211
9204
  enverionment: task.enverionment || "development",
9212
9205
  postId: params.articleId,
9213
9206
  eip: proxyHttp.proxyInfo,
9214
- proxyIp: params.localIP,
9215
9207
  accountId: params.accountId,
9216
9208
  uid: params.uid,
9217
9209
  platform: "baijiahao",
@@ -9730,7 +9722,6 @@ const XhsFansExport = async (_task, params)=>{
9730
9722
  },
9731
9723
  _task.logger,
9732
9724
  params.proxyLoc,
9733
- params.localIP,
9734
9725
  params.accountId
9735
9726
  ];
9736
9727
  const http = new Http(...args);
@@ -10860,7 +10851,7 @@ const XhsSessionCheck = async (_task, params)=>{
10860
10851
  heapTotal: `${Math.round(process.memoryUsage().heapTotal / 1024 / 1024)} MB`
10861
10852
  },
10862
10853
  accountId: params.accountId,
10863
- hasProxy: !!(params.proxyLoc || params.localIP)
10854
+ hasProxy: !!params.proxyLoc
10864
10855
  });
10865
10856
  }
10866
10857
  const check = {
@@ -10883,7 +10874,6 @@ const XhsSessionCheck = async (_task, params)=>{
10883
10874
  },
10884
10875
  _task.logger,
10885
10876
  params.proxyLoc,
10886
- params.localIP,
10887
10877
  params.accountId
10888
10878
  ];
10889
10879
  const http = new Http(...args);
@@ -10914,7 +10904,7 @@ const XhsSessionCheck = async (_task, params)=>{
10914
10904
  heapUsed: `${Math.round(process.memoryUsage().heapUsed / 1024 / 1024)} MB`,
10915
10905
  heapTotal: `${Math.round(process.memoryUsage().heapTotal / 1024 / 1024)} MB`
10916
10906
  },
10917
- hasProxy: !!(params.proxyLoc || params.localIP),
10907
+ hasProxy: !!params.proxyLoc,
10918
10908
  timeSinceLastLog: Date.now() - lastEnvLogTime
10919
10909
  }
10920
10910
  });
@@ -10955,9 +10945,14 @@ const XhsSessionCheck = async (_task, params)=>{
10955
10945
  });
10956
10946
  return e.data;
10957
10947
  });
10948
+ const webSessionPath = "/api/sns/web/unread_count";
10949
+ const webSessionData = {};
10950
+ const webSessionXsHeader = sessionCheck_xsEncrypt.signHeadersPost(webSessionPath, recordCookie, "xhs-pc-web", webSessionData);
10958
10951
  const _web_session = http.api({
10959
- method: "get",
10960
- url: "https://edith.xiaohongshu.com/api/sns/web/unread_count"
10952
+ method: "GET",
10953
+ url: "https://edith.xiaohongshu.com/api/sns/web/unread_count",
10954
+ data: webSessionData,
10955
+ headers: webSessionXsHeader
10961
10956
  }, {
10962
10957
  retries: 3,
10963
10958
  retryDelay: 20,
@@ -11312,7 +11307,6 @@ const douyinCreateCommentReply = async (_task, params)=>{
11312
11307
  },
11313
11308
  _task.logger,
11314
11309
  params.proxyLoc,
11315
- params.localIP,
11316
11310
  params.accountId
11317
11311
  ];
11318
11312
  const http = new Http(...args);
@@ -11399,7 +11393,6 @@ const douyinGetCollection = async (_task, params)=>{
11399
11393
  },
11400
11394
  _task.logger,
11401
11395
  params.proxyLoc,
11402
- params.localIP,
11403
11396
  params.accountId
11404
11397
  ];
11405
11398
  const http = new Http(...args);
@@ -11490,7 +11483,6 @@ const douyinGetCommentList = async (_task, params)=>{
11490
11483
  },
11491
11484
  _task.logger,
11492
11485
  params.proxyLoc,
11493
- params.localIP,
11494
11486
  params.accountId
11495
11487
  ];
11496
11488
  const http = new Http(...args);
@@ -11576,7 +11568,6 @@ const douyinGetCommentReplyList = async (_task, params)=>{
11576
11568
  },
11577
11569
  _task.logger,
11578
11570
  params.proxyLoc,
11579
- params.localIP,
11580
11571
  params.accountId
11581
11572
  ];
11582
11573
  const http = new Http(...args);
@@ -11660,7 +11651,6 @@ const douyinGetHot = async (_task, params)=>{
11660
11651
  },
11661
11652
  _task.logger,
11662
11653
  params.proxyLoc,
11663
- params.localIP,
11664
11654
  params.accountId
11665
11655
  ];
11666
11656
  const http = new Http(...args);
@@ -11756,7 +11746,6 @@ const douyinGetLocation = async (_task, params)=>{
11756
11746
  },
11757
11747
  _task.logger,
11758
11748
  params.proxyLoc,
11759
- params.localIP,
11760
11749
  params.accountId
11761
11750
  ];
11762
11751
  const http = new Http(...args);
@@ -11855,7 +11844,6 @@ const douyinGetMusic = async (_task, params)=>{
11855
11844
  },
11856
11845
  _task.logger,
11857
11846
  params.proxyLoc,
11858
- params.localIP,
11859
11847
  params.accountId
11860
11848
  ];
11861
11849
  const http = new Http(...args);
@@ -12001,7 +11989,6 @@ const douyinGetMusicByCategory = async (_task, params)=>{
12001
11989
  },
12002
11990
  _task.logger,
12003
11991
  params.proxyLoc,
12004
- params.localIP,
12005
11992
  params.accountId
12006
11993
  ];
12007
11994
  const http = new Http(...args);
@@ -12089,7 +12076,6 @@ const douyinGetMusicCategory = async (_task, params)=>{
12089
12076
  },
12090
12077
  _task.logger,
12091
12078
  params.proxyLoc,
12092
- params.localIP,
12093
12079
  params.accountId
12094
12080
  ];
12095
12081
  const http = new Http(...args);
@@ -12177,7 +12163,6 @@ const douyinGetTopics = async (_task, params)=>{
12177
12163
  },
12178
12164
  _task.logger,
12179
12165
  params.proxyLoc,
12180
- params.localIP,
12181
12166
  params.accountId
12182
12167
  ];
12183
12168
  const http = new Http(...args);
@@ -12398,7 +12383,6 @@ const douyinGetWorkList = async (_task, params)=>{
12398
12383
  },
12399
12384
  _task.logger,
12400
12385
  params.proxyLoc,
12401
- params.localIP,
12402
12386
  params.accountId
12403
12387
  ];
12404
12388
  const http = new Http(...args);
@@ -12760,16 +12744,11 @@ const rpa_server_rpaServer = async (task, params)=>{
12760
12744
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
12761
12745
  let executionState;
12762
12746
  let proxyUrl;
12763
- if (params.localIP) {
12764
- const args = [
12765
- params.localIP,
12766
- params.proxyLoc,
12767
- params.accountId
12768
- ];
12769
- task.logger?.info(`==> 开始获取代理信息:${args}`);
12747
+ if (params.proxyLoc) {
12748
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
12770
12749
  const ProxyAgentResult = await ProxyAgent({
12771
12750
  logger: task.logger
12772
- }, ...args);
12751
+ }, params.proxyLoc, params.accountId);
12773
12752
  task.logger?.info("==> 代理信息获取成功!");
12774
12753
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
12775
12754
  }
@@ -13378,7 +13357,7 @@ function safeSerialize(obj) {
13378
13357
  }
13379
13358
  const mock_mockAction = async (task, params)=>{
13380
13359
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
13381
- 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 参数缺失或不完整", "");
13382
13361
  let currentStep = "初始化";
13383
13362
  try {
13384
13363
  currentStep = "验证账号信息";
@@ -13464,8 +13443,7 @@ const mock_mockAction = async (task, params)=>{
13464
13443
  headers
13465
13444
  },
13466
13445
  task.logger,
13467
- "",
13468
- "",
13446
+ params.proxyLoc,
13469
13447
  params.accountId,
13470
13448
  "douyin"
13471
13449
  ];
@@ -13738,7 +13716,6 @@ const mock_mockAction = async (task, params)=>{
13738
13716
  enverionment: task.enverionment || "development",
13739
13717
  postId: params.articleId,
13740
13718
  eip: proxyHttp.proxyInfo,
13741
- proxyIp: params.localIP,
13742
13719
  accountId: params.accountId,
13743
13720
  uid: params.uid,
13744
13721
  platform: "douyin",
@@ -14101,18 +14078,13 @@ const rpaAction_Server = async (task, params)=>{
14101
14078
  return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.downloadImage)(url, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(tmpCachePath, fileName));
14102
14079
  }));
14103
14080
  let proxyUrl;
14104
- if (params.localIP) {
14105
- const args = [
14106
- params.localIP,
14107
- params.proxyLoc,
14108
- params.accountId
14109
- ];
14110
- task.logger?.info(`==> 开始获取代理信息:${args}`);
14111
- const proxyAgentResult = await ProxyAgent({
14081
+ if (params.proxyLoc) {
14082
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
14083
+ const ProxyAgentResult = await ProxyAgent({
14112
14084
  logger: task.logger
14113
- }, ...args);
14085
+ }, params.proxyLoc, params.accountId);
14114
14086
  task.logger?.info("==> 代理信息获取成功!");
14115
- proxyUrl = proxyAgentResult ? `http://${proxyAgentResult.ip}:${proxyAgentResult.port}` : void 0;
14087
+ proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
14116
14088
  }
14117
14089
  const commonCookies = {
14118
14090
  path: "/",
@@ -15069,7 +15041,6 @@ const getXhsCollection = async (_task, params)=>{
15069
15041
  },
15070
15042
  _task.logger,
15071
15043
  params.proxyLoc,
15072
- params.localIP,
15073
15044
  params.accountId
15074
15045
  ];
15075
15046
  const http = new Http(...args);
@@ -15127,7 +15098,6 @@ const getXhsGroup = async (_task, params)=>{
15127
15098
  },
15128
15099
  _task.logger,
15129
15100
  params.proxyLoc,
15130
- params.localIP,
15131
15101
  params.accountId
15132
15102
  ];
15133
15103
  const http = new Http(...args);
@@ -15174,7 +15144,6 @@ const getXhsHotTopic = async (_task, params)=>{
15174
15144
  },
15175
15145
  _task.logger,
15176
15146
  params.proxyLoc,
15177
- params.localIP,
15178
15147
  params.accountId
15179
15148
  ];
15180
15149
  const http = new Http(...args);
@@ -15211,6 +15180,7 @@ const getXhsHotTopic = async (_task, params)=>{
15211
15180
  const data = isSuccess ? res.data.activity_list : [];
15212
15181
  return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.response)(isSuccess ? 0 : 414, message, data);
15213
15182
  };
15183
+ const getXhsWebUnreadCount_xsEncrypt = new Xhshow();
15214
15184
  const UnreadCountSchema = schemas_object({
15215
15185
  connections: schemas_number().nullable(),
15216
15186
  mentions: schemas_number().nullable(),
@@ -15235,7 +15205,6 @@ const getXhsUnreadCount = async (_task, params)=>{
15235
15205
  },
15236
15206
  _task.logger,
15237
15207
  params.proxyLoc,
15238
- params.localIP,
15239
15208
  params.accountId
15240
15209
  ];
15241
15210
  const http = new Http(...args);
@@ -15245,9 +15214,24 @@ const getXhsUnreadCount = async (_task, params)=>{
15245
15214
  unread_count: null,
15246
15215
  likes: null
15247
15216
  };
15217
+ const a1Cookie = params.cookies.find((it)=>"a1" === it.name)?.value;
15218
+ if (!a1Cookie) return {
15219
+ code: 414,
15220
+ message: "账号数据异常,请重新绑定账号后重试。",
15221
+ data: unreadCount
15222
+ };
15223
+ const apiPath = "/api/sns/web/unread_count";
15224
+ const recordCookie = params.cookies.reduce((acc, cookie)=>{
15225
+ if (cookie.name && cookie.value) acc[cookie.name] = cookie.value;
15226
+ return acc;
15227
+ }, {});
15228
+ const requestData = {};
15229
+ const xsHeader = getXhsWebUnreadCount_xsEncrypt.signHeadersPost(apiPath, recordCookie, "xhs-pc-web", requestData);
15248
15230
  const res = await http.api({
15249
- method: "get",
15250
- url: "https://edith.xiaohongshu.com/api/sns/web/unread_count"
15231
+ method: "GET",
15232
+ url: "https://edith.xiaohongshu.com/api/sns/web/unread_count",
15233
+ data: requestData,
15234
+ headers: xsHeader
15251
15235
  }, {
15252
15236
  retries: 3,
15253
15237
  retryDelay: 20,
@@ -15328,7 +15312,6 @@ async function getDouyinData(_task, params) {
15328
15312
  },
15329
15313
  _task.logger,
15330
15314
  params.proxyLoc,
15331
- params.localIP,
15332
15315
  params.accountId
15333
15316
  ];
15334
15317
  const http = new Http(...args);
@@ -15435,7 +15418,6 @@ async function getShipinhaoData(_task, params) {
15435
15418
  },
15436
15419
  _task.logger,
15437
15420
  params.proxyLoc,
15438
- params.localIP,
15439
15421
  params.accountId
15440
15422
  ];
15441
15423
  const http = new Http(...args);
@@ -15664,7 +15646,6 @@ async function getXiaohongshuData(_task, params) {
15664
15646
  },
15665
15647
  _task.logger,
15666
15648
  params.proxyLoc,
15667
- params.localIP,
15668
15649
  params.accountId
15669
15650
  ];
15670
15651
  const http = new Http(...args);
@@ -15997,7 +15978,6 @@ async function handleDouyinData(_task, params) {
15997
15978
  },
15998
15979
  _task.logger,
15999
15980
  params.proxyLoc,
16000
- params.localIP,
16001
15981
  params.accountId
16002
15982
  ];
16003
15983
  const http = new Http(...args);
@@ -16103,7 +16083,6 @@ async function handleShipinhaoData(_task, params) {
16103
16083
  },
16104
16084
  _task.logger,
16105
16085
  params.proxyLoc,
16106
- params.localIP,
16107
16086
  params.accountId
16108
16087
  ];
16109
16088
  const http = new Http(...args);
@@ -16566,7 +16545,6 @@ async function handleXiaohongshuData(_task, params) {
16566
16545
  },
16567
16546
  _task.logger,
16568
16547
  params.proxyLoc,
16569
- params.localIP,
16570
16548
  params.accountId
16571
16549
  ];
16572
16550
  const http = new Http(...args);
@@ -16897,7 +16875,6 @@ const searchXhsWebConnections = async (_task, params)=>{
16897
16875
  },
16898
16876
  _task.logger,
16899
16877
  params.proxyLoc,
16900
- params.localIP,
16901
16878
  params.accountId
16902
16879
  ];
16903
16880
  const http = new Http(...args);
@@ -16950,7 +16927,6 @@ const searchXhsWebLikes = async (_task, params)=>{
16950
16927
  },
16951
16928
  _task.logger,
16952
16929
  params.proxyLoc,
16953
- params.localIP,
16954
16930
  params.accountId
16955
16931
  ];
16956
16932
  const http = new Http(...args);
@@ -17003,7 +16979,6 @@ const searchXhsWebMentions = async (_task, params)=>{
17003
16979
  },
17004
16980
  _task.logger,
17005
16981
  params.proxyLoc,
17006
- params.localIP,
17007
16982
  params.accountId
17008
16983
  ];
17009
16984
  const http = new Http(...args);
@@ -17050,7 +17025,6 @@ const searchXiaohongshuLocation = async (_task, params)=>{
17050
17025
  },
17051
17026
  _task.logger,
17052
17027
  params.proxyLoc,
17053
- params.localIP,
17054
17028
  params.accountId
17055
17029
  ];
17056
17030
  const http = new Http(...args);
@@ -17089,7 +17063,6 @@ const searchXiaohongshuTopicList = async (_task, params)=>{
17089
17063
  },
17090
17064
  _task.logger,
17091
17065
  params.proxyLoc,
17092
- params.localIP,
17093
17066
  params.accountId
17094
17067
  ];
17095
17068
  const http = new Http(...args);
@@ -17151,7 +17124,6 @@ const searchXiaohongshuUserArticle = async (_task, params)=>{
17151
17124
  },
17152
17125
  _task.logger,
17153
17126
  params.proxyLoc,
17154
- params.localIP,
17155
17127
  params.accountId
17156
17128
  ];
17157
17129
  const http = new Http(...args);
@@ -17208,7 +17180,6 @@ const shipinhaoCheckLinkValidate = async (_task, params)=>{
17208
17180
  },
17209
17181
  _task.logger,
17210
17182
  params.proxyLoc,
17211
- params.localIP,
17212
17183
  params.accountId
17213
17184
  ];
17214
17185
  const http = new Http(...args);
@@ -17294,7 +17265,6 @@ const shipinhaoGetLocation = async (_task, params)=>{
17294
17265
  },
17295
17266
  _task.logger,
17296
17267
  params.proxyLoc,
17297
- params.localIP,
17298
17268
  params.accountId
17299
17269
  ];
17300
17270
  const http = new Http(...args);
@@ -17382,7 +17352,6 @@ const shipinhaoGetMsg = async (_task, params)=>{
17382
17352
  },
17383
17353
  _task.logger,
17384
17354
  params.proxyLoc,
17385
- params.localIP,
17386
17355
  params.accountId
17387
17356
  ];
17388
17357
  const http = new Http(...args);
@@ -17492,7 +17461,6 @@ const shipinhaoGetMsgImage = async (_task, params)=>{
17492
17461
  },
17493
17462
  _task.logger,
17494
17463
  params.proxyLoc,
17495
- params.localIP,
17496
17464
  params.accountId
17497
17465
  ];
17498
17466
  const http = new Http(...args);
@@ -17770,16 +17738,11 @@ const shipinhaoLogin_rpa_server_rpaServer = async (task, params)=>{
17770
17738
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
17771
17739
  let executionState;
17772
17740
  let proxyUrl;
17773
- if (params.localIP) {
17774
- const args = [
17775
- params.localIP,
17776
- params.proxyLoc,
17777
- params.accountId
17778
- ];
17779
- task.logger?.info(`==> 开始获取代理信息:${args}`);
17741
+ if (params.proxyLoc) {
17742
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
17780
17743
  const ProxyAgentResult = await ProxyAgent({
17781
17744
  logger: task.logger
17782
- }, ...args);
17745
+ }, params.proxyLoc, params.accountId);
17783
17746
  task.logger?.info("==> 代理信息获取成功!");
17784
17747
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
17785
17748
  }
@@ -18606,7 +18569,6 @@ async function publishDynamic(cookies, uin, fingerPrintDeviceId, aId, proxyHttp,
18606
18569
  enverionment: confParams.enverionment || "development",
18607
18570
  postId: confParams.articleId,
18608
18571
  eip: proxyHttp.proxyInfo,
18609
- proxyIp: confParams.proxyIp,
18610
18572
  accountId: confParams.accountId,
18611
18573
  uid: confParams.uid,
18612
18574
  publishParams: publishData,
@@ -18633,7 +18595,6 @@ const shipinhaoPublish_mock_mockAction = async (task, params)=>{
18633
18595
  },
18634
18596
  task.logger,
18635
18597
  params.proxyLoc,
18636
- params.localIP,
18637
18598
  params.accountId,
18638
18599
  "shipinhao"
18639
18600
  ];
@@ -18704,7 +18665,6 @@ const shipinhaoPublish_mock_mockAction = async (task, params)=>{
18704
18665
  articleId: params.articleId,
18705
18666
  postId: params.articleId,
18706
18667
  eip: proxyHttp.proxyInfo,
18707
- proxyIp: params.localIP,
18708
18668
  accountId: params.accountId,
18709
18669
  uid: params.uid
18710
18670
  }, {
@@ -19091,16 +19051,11 @@ const rpa_server_rpaAction_Server = async (task, params)=>{
19091
19051
  return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.downloadImage)(url, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(tmpCachePath, fileName));
19092
19052
  }));
19093
19053
  let proxyUrl;
19094
- if (params.localIP) {
19095
- const args = [
19096
- params.localIP,
19097
- params.proxyLoc,
19098
- params.accountId
19099
- ];
19100
- task.logger?.info(`==> 开始获取代理信息:${args}`);
19054
+ if (params.proxyLoc) {
19055
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
19101
19056
  const ProxyAgentResult = await ProxyAgent({
19102
19057
  logger: task.logger
19103
- }, ...args);
19058
+ }, params.proxyLoc, params.accountId);
19104
19059
  task.logger?.info("==> 代理信息获取成功!");
19105
19060
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
19106
19061
  }
@@ -19750,16 +19705,11 @@ const toutiaoLogin_rpa_server_rpaServer = async (task, params)=>{
19750
19705
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
19751
19706
  let executionState;
19752
19707
  let proxyUrl;
19753
- if (params.localIP) {
19754
- const args = [
19755
- params.localIP,
19756
- params.proxyLoc,
19757
- params.accountId
19758
- ];
19759
- task.logger?.info(`==> 开始获取代理信息:${args}`);
19708
+ if (params.proxyLoc) {
19709
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
19760
19710
  const ProxyAgentResult = await ProxyAgent({
19761
19711
  logger: task.logger
19762
- }, ...args);
19712
+ }, params.proxyLoc, params.accountId);
19763
19713
  task.logger?.info("==> 代理信息获取成功!");
19764
19714
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
19765
19715
  }
@@ -20010,7 +19960,6 @@ const toutiaoPublish_mock_mockAction = async (task, params)=>{
20010
19960
  },
20011
19961
  task.logger,
20012
19962
  params.proxyLoc,
20013
- params.localIP,
20014
19963
  params.accountId,
20015
19964
  "toutiao"
20016
19965
  ];
@@ -20208,7 +20157,6 @@ const toutiaoPublish_mock_mockAction = async (task, params)=>{
20208
20157
  enverionment: task.enverionment || "development",
20209
20158
  postId: params.articleId,
20210
20159
  eip: proxyHttp.proxyInfo,
20211
- proxyIp: params.localIP,
20212
20160
  accountId: params.accountId,
20213
20161
  uid: params.uid,
20214
20162
  platform: "toutiao",
@@ -20843,16 +20791,11 @@ const weixinLogin_rpa_server_rpaServer = async (task, params)=>{
20843
20791
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
20844
20792
  let executionState;
20845
20793
  let proxyUrl;
20846
- if (params.localIP) {
20847
- const args = [
20848
- params.localIP,
20849
- params.proxyLoc,
20850
- params.accountId
20851
- ];
20852
- task.logger?.info(`==> 开始获取代理信息:${args}`);
20794
+ if (params.proxyLoc) {
20795
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
20853
20796
  const ProxyAgentResult = await ProxyAgent({
20854
20797
  logger: task.logger
20855
- }, ...args);
20798
+ }, params.proxyLoc, params.accountId);
20856
20799
  task.logger?.info("==> 代理信息获取成功!");
20857
20800
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
20858
20801
  }
@@ -21344,7 +21287,6 @@ const weixinPublish_mock_mockAction = async (task, params)=>{
21344
21287
  },
21345
21288
  task.logger,
21346
21289
  params.proxyLoc,
21347
- params.localIP,
21348
21290
  params.accountId,
21349
21291
  "weixin"
21350
21292
  ];
@@ -22123,7 +22065,6 @@ const weixinPublish_mock_mockAction = async (task, params)=>{
22123
22065
  enverionment: task.enverionment || "development",
22124
22066
  postId: params.articleId,
22125
22067
  eip: proxyHttp.proxyInfo,
22126
- proxyIp: params.localIP,
22127
22068
  accountId: params.accountId,
22128
22069
  uid: params.uid,
22129
22070
  platform: "weixin",
@@ -22928,16 +22869,11 @@ const xiaohongshuLogin_rpa_server_rpaServer = async (task, params)=>{
22928
22869
  const reporter = task.reportService?.reportLoginStatus ?? (()=>Promise.resolve());
22929
22870
  let executionState;
22930
22871
  let proxyUrl;
22931
- if (params.localIP) {
22932
- const args = [
22933
- params.localIP,
22934
- params.proxyLoc,
22935
- params.accountId
22936
- ];
22937
- task.logger?.info(`==> 开始获取代理信息:${args}`);
22872
+ if (params.proxyLoc) {
22873
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
22938
22874
  const ProxyAgentResult = await ProxyAgent({
22939
22875
  logger: task.logger
22940
- }, ...args);
22876
+ }, params.proxyLoc, params.accountId);
22941
22877
  task.logger?.info("==> 代理信息获取成功!");
22942
22878
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
22943
22879
  }
@@ -23254,7 +23190,6 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
23254
23190
  },
23255
23191
  task.logger,
23256
23192
  params.proxyLoc,
23257
- params.localIP,
23258
23193
  params.accountId,
23259
23194
  "xiaohongshu"
23260
23195
  ];
@@ -23295,8 +23230,8 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
23295
23230
  params: fetchCoverParams
23296
23231
  }, {
23297
23232
  retries: 3,
23298
- retryDelay: 20,
23299
- timeout: 3000
23233
+ retryDelay: 500,
23234
+ timeout: 30000
23300
23235
  });
23301
23236
  for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
23302
23237
  bucket: item.bucket || "",
@@ -23315,8 +23250,8 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
23315
23250
  params: fetchCoverParams
23316
23251
  }, {
23317
23252
  retries: 3,
23318
- retryDelay: 20,
23319
- timeout: 3000
23253
+ retryDelay: 500,
23254
+ timeout: 30000
23320
23255
  });
23321
23256
  for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
23322
23257
  bucket: item.bucket || "",
@@ -23377,7 +23312,9 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
23377
23312
  headers: {
23378
23313
  "x-cos-security-token": ossToken
23379
23314
  },
23380
- defaultErrorMsg: "图片上传异常,请稍后重试发布。"
23315
+ defaultErrorMsg: "图片上传异常,请稍后重试。"
23316
+ }, {
23317
+ timeout: 60000
23381
23318
  });
23382
23319
  return {
23383
23320
  ossFileId,
@@ -23387,6 +23324,8 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
23387
23324
  originSize
23388
23325
  };
23389
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)}`);
23390
23329
  attempt++;
23391
23330
  }
23392
23331
  }
@@ -23620,7 +23559,6 @@ const xiaohongshuPublish_mock_mockAction = async (task, params)=>{
23620
23559
  enverionment: task.enverionment || "development",
23621
23560
  postId: params.articleId,
23622
23561
  eip: proxyHttp.proxyInfo,
23623
- proxyIp: params.localIP,
23624
23562
  accountId: params.accountId,
23625
23563
  uid: params.uid,
23626
23564
  platform: "xiaohongshu",
@@ -23882,16 +23820,11 @@ const xiaohongshuPublish_rpa_server_rpaAction_Server = async (task, params)=>{
23882
23820
  return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.downloadImage)(url, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(tmpCachePath, fileName));
23883
23821
  }));
23884
23822
  let proxyUrl;
23885
- if (params.localIP) {
23886
- const args = [
23887
- params.localIP,
23888
- params.proxyLoc,
23889
- params.accountId
23890
- ];
23891
- task.logger?.info(`==> 开始获取代理信息:${args}`);
23823
+ if (params.proxyLoc) {
23824
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
23892
23825
  const ProxyAgentResult = await ProxyAgent({
23893
23826
  logger: task.logger
23894
- }, ...args);
23827
+ }, params.proxyLoc, params.accountId);
23895
23828
  task.logger?.info("==> 代理信息获取成功!");
23896
23829
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
23897
23830
  }
@@ -24320,7 +24253,6 @@ const rpaAction_Server_Mock = async (task, params)=>{
24320
24253
  },
24321
24254
  task.logger,
24322
24255
  params.proxyLoc,
24323
- params.localIP,
24324
24256
  params.accountId,
24325
24257
  "xiaohongshu-rpa"
24326
24258
  ];
@@ -24366,8 +24298,8 @@ const rpaAction_Server_Mock = async (task, params)=>{
24366
24298
  params: fetchCoverParams
24367
24299
  }, {
24368
24300
  retries: 3,
24369
- retryDelay: 20,
24370
- timeout: 3000
24301
+ retryDelay: 500,
24302
+ timeout: 8000
24371
24303
  });
24372
24304
  for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
24373
24305
  bucket: item.bucket || "",
@@ -24386,8 +24318,8 @@ const rpaAction_Server_Mock = async (task, params)=>{
24386
24318
  params: fetchCoverParams
24387
24319
  }, {
24388
24320
  retries: 3,
24389
- retryDelay: 20,
24390
- timeout: 3000
24321
+ retryDelay: 500,
24322
+ timeout: 8000
24391
24323
  });
24392
24324
  for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
24393
24325
  bucket: item.bucket || "",
@@ -24432,6 +24364,8 @@ const rpaAction_Server_Mock = async (task, params)=>{
24432
24364
  "x-cos-security-token": ossToken
24433
24365
  },
24434
24366
  defaultErrorMsg: "图片上传异常,请稍后重试发布。"
24367
+ }, {
24368
+ timeout: 60000
24435
24369
  });
24436
24370
  return {
24437
24371
  ossFileId,
@@ -24741,7 +24675,6 @@ const xiaohongshuWebCommentAction = async (_task, params)=>{
24741
24675
  },
24742
24676
  _task.logger,
24743
24677
  params.proxyLoc,
24744
- params.localIP,
24745
24678
  params.accountId
24746
24679
  ];
24747
24680
  const http = new Http(...args);
@@ -24827,7 +24760,6 @@ const xiaohongshuWebIntimacySearch = async (_task, params)=>{
24827
24760
  },
24828
24761
  _task.logger,
24829
24762
  params.proxyLoc,
24830
- params.localIP,
24831
24763
  params.accountId
24832
24764
  ];
24833
24765
  const http = new Http(...args);
@@ -24866,7 +24798,6 @@ const xiaohongshuWebMsgRead = async (_task, params)=>{
24866
24798
  },
24867
24799
  _task.logger,
24868
24800
  params.proxyLoc,
24869
- params.localIP,
24870
24801
  params.accountId
24871
24802
  ];
24872
24803
  const http = new Http(...args);
@@ -24919,7 +24850,6 @@ const xiaohongshuWebMsgReply = async (_task, params)=>{
24919
24850
  },
24920
24851
  _task.logger,
24921
24852
  params.proxyLoc,
24922
- params.localIP,
24923
24853
  params.accountId
24924
24854
  ];
24925
24855
  const http = new Http(...args);
@@ -24976,7 +24906,6 @@ const xiaohongshuWebNoteFeed = async (_task, params)=>{
24976
24906
  },
24977
24907
  _task.logger,
24978
24908
  params.proxyLoc,
24979
- params.localIP,
24980
24909
  params.accountId
24981
24910
  ];
24982
24911
  const http = new Http(...args);
@@ -25049,7 +24978,6 @@ const xiaohongshuWebRelationAction = async (_task, params)=>{
25049
24978
  },
25050
24979
  _task.logger,
25051
24980
  params.proxyLoc,
25052
- params.localIP,
25053
24981
  params.accountId
25054
24982
  ];
25055
24983
  const http = new Http(...args);
@@ -25153,7 +25081,6 @@ const xiaohongshuWebSearch = async (_task, params)=>{
25153
25081
  },
25154
25082
  _task.logger,
25155
25083
  params.proxyLoc,
25156
- params.localIP,
25157
25084
  params.accountId
25158
25085
  ];
25159
25086
  const http = new Http(...args);
@@ -25588,4 +25515,5 @@ class Action {
25588
25515
  var __webpack_exports__version = package_namespaceObject.i8;
25589
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 };
25590
25517
 
25591
- //# sourceMappingURL=index.mjs.map
25518
+ //# sourceMappingURL=index.mjs.map
25519
+ //# debugId=ef023941-5d5d-5514-b133-72fa4303f973