@iflyrpa/actions 4.0.6-beta.1 → 4.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6a453c21-67bd-5554-819f-0c24705e7164")}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]="23a118d5-7504-553a-869b-7251d1fda8eb")}catch(e){}}();
3
3
  var __webpack_modules__ = {
4
4
  "./src/utils/XhsXsCommonEnc.js": function(module) {
5
5
  var encrypt_lookup = [
@@ -4402,7 +4402,9 @@ var __webpack_exports__ = {};
4402
4402
  });
4403
4403
  const package_json_namespaceObject = require("@iflyrpa/share/package.json");
4404
4404
  var package_json_default = /*#__PURE__*/ __webpack_require__.n(package_json_namespaceObject);
4405
- var package_namespaceObject = JSON.parse('{"i8":"4.0.6-beta.1"}');
4405
+ var package_namespaceObject = {
4406
+ i8: "4.0.7"
4407
+ };
4406
4408
  const share_namespaceObject = require("@iflyrpa/share");
4407
4409
  const external_node_fs_namespaceObject = require("node:fs");
4408
4410
  var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
@@ -4505,14 +4507,15 @@ var __webpack_exports__ = {};
4505
4507
  }
4506
4508
  return `socks5h://${ip}:${port}`;
4507
4509
  }
4508
- async function ProxyAgent(task, addr, accountId, refresh) {
4510
+ async function ProxyAgent(task, ip, adr, accountId, refresh) {
4509
4511
  const http = new Http({
4510
4512
  headers: {
4511
4513
  "content-type": "application/json"
4512
4514
  }
4513
4515
  });
4514
4516
  const params = {
4515
- addr: addr || null,
4517
+ ip: ip,
4518
+ addr: adr || null,
4516
4519
  accountId: accountId
4517
4520
  };
4518
4521
  const ProxyInfo = await http.api({
@@ -4534,7 +4537,7 @@ var __webpack_exports__ = {};
4534
4537
  data: ProxyInfo.data
4535
4538
  }
4536
4539
  };
4537
- task.logger?.info(`请求代理:区域:${params.addr}, AccountId:${params.accountId}, 返回代理信息: ${ProxyInfo.data ? `${ProxyInfo.data.proxyIp}:${ProxyInfo.data.proxyPort}` : "无可用代理"}`, loggerInfo);
4540
+ task.logger?.info(`请求代理:区域:${params.addr}, IP:${params.ip}, AccountId:${params.accountId}, 返回代理信息: ${ProxyInfo.data ? `${ProxyInfo.data.proxyIp}:${ProxyInfo.data.proxyPort}` : "无可用代理"}`, loggerInfo);
4538
4541
  const proxyAgent = "000000" === ProxyInfo.code && ProxyInfo.data ? {
4539
4542
  ip: ProxyInfo.data.proxyIp,
4540
4543
  port: ProxyInfo.data.proxyPort,
@@ -4551,16 +4554,16 @@ var __webpack_exports__ = {};
4551
4554
  data: error
4552
4555
  };
4553
4556
  }
4554
- constructor(config, logger, addr, accountId, platform){
4557
+ constructor(config, logger, adr, ip, accountId, platform){
4555
4558
  this.agentPromise = void 0;
4556
4559
  this.apiClient = external_axios_default().create({
4557
4560
  ...config
4558
4561
  });
4559
4562
  this.logger = logger;
4560
4563
  this.platform = platform;
4561
- if (addr) this.agentPromise = ProxyAgent({
4564
+ if (ip) this.agentPromise = ProxyAgent({
4562
4565
  logger
4563
- }, addr, accountId);
4566
+ }, ip, adr, accountId);
4564
4567
  this.addResponseInterceptor(()=>void 0);
4565
4568
  }
4566
4569
  clearResponseInterceptors() {
@@ -8720,11 +8723,16 @@ var __webpack_exports__ = {};
8720
8723
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
8721
8724
  let executionState;
8722
8725
  let proxyUrl;
8723
- if (params.proxyLoc) {
8724
- task.logger?.info(`==> 开始获取代理信息:${params}`);
8726
+ if (params.localIP) {
8727
+ const args = [
8728
+ params.localIP,
8729
+ params.proxyLoc,
8730
+ params.accountId
8731
+ ];
8732
+ task.logger?.info(`==> 开始获取代理信息:${args}`);
8725
8733
  const ProxyAgentResult = await ProxyAgent({
8726
8734
  logger: task.logger
8727
- }, params.proxyLoc, params.accountId);
8735
+ }, ...args);
8728
8736
  task.logger?.info("==> 代理信息获取成功!");
8729
8737
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
8730
8738
  }
@@ -9069,6 +9077,7 @@ var __webpack_exports__ = {};
9069
9077
  },
9070
9078
  task.logger,
9071
9079
  params.proxyLoc,
9080
+ params.localIP,
9072
9081
  params.accountId,
9073
9082
  "baijiahao"
9074
9083
  ];
@@ -9274,6 +9283,7 @@ var __webpack_exports__ = {};
9274
9283
  enverionment: task.enverionment || "development",
9275
9284
  postId: params.articleId,
9276
9285
  eip: proxyHttp.proxyInfo,
9286
+ proxyIp: params.localIP,
9277
9287
  accountId: params.accountId,
9278
9288
  uid: params.uid,
9279
9289
  platform: "baijiahao",
@@ -9794,6 +9804,7 @@ var __webpack_exports__ = {};
9794
9804
  },
9795
9805
  _task.logger,
9796
9806
  params.proxyLoc,
9807
+ params.localIP,
9797
9808
  params.accountId
9798
9809
  ];
9799
9810
  const http = new Http(...args);
@@ -10923,7 +10934,7 @@ var __webpack_exports__ = {};
10923
10934
  heapTotal: `${Math.round(process.memoryUsage().heapTotal / 1024 / 1024)} MB`
10924
10935
  },
10925
10936
  accountId: params.accountId,
10926
- hasProxy: !!params.proxyLoc
10937
+ hasProxy: !!(params.proxyLoc || params.localIP)
10927
10938
  });
10928
10939
  }
10929
10940
  const check = {
@@ -10946,6 +10957,7 @@ var __webpack_exports__ = {};
10946
10957
  },
10947
10958
  _task.logger,
10948
10959
  params.proxyLoc,
10960
+ params.localIP,
10949
10961
  params.accountId
10950
10962
  ];
10951
10963
  const http = new Http(...args);
@@ -10976,7 +10988,7 @@ var __webpack_exports__ = {};
10976
10988
  heapUsed: `${Math.round(process.memoryUsage().heapUsed / 1024 / 1024)} MB`,
10977
10989
  heapTotal: `${Math.round(process.memoryUsage().heapTotal / 1024 / 1024)} MB`
10978
10990
  },
10979
- hasProxy: !!params.proxyLoc,
10991
+ hasProxy: !!(params.proxyLoc || params.localIP),
10980
10992
  timeSinceLastLog: Date.now() - lastEnvLogTime
10981
10993
  }
10982
10994
  });
@@ -11017,9 +11029,14 @@ var __webpack_exports__ = {};
11017
11029
  });
11018
11030
  return e.data;
11019
11031
  });
11032
+ const webSessionPath = "/api/sns/web/unread_count";
11033
+ const webSessionData = {};
11034
+ const webSessionXsHeader = sessionCheck_xsEncrypt.signHeadersPost(webSessionPath, recordCookie, "xhs-pc-web", webSessionData);
11020
11035
  const _web_session = http.api({
11021
- method: "get",
11022
- url: "https://edith.xiaohongshu.com/api/sns/web/unread_count"
11036
+ method: "GET",
11037
+ url: "https://edith.xiaohongshu.com/api/sns/web/unread_count",
11038
+ data: webSessionData,
11039
+ headers: webSessionXsHeader
11023
11040
  }, {
11024
11041
  retries: 3,
11025
11042
  retryDelay: 20,
@@ -11374,6 +11391,7 @@ var __webpack_exports__ = {};
11374
11391
  },
11375
11392
  _task.logger,
11376
11393
  params.proxyLoc,
11394
+ params.localIP,
11377
11395
  params.accountId
11378
11396
  ];
11379
11397
  const http = new Http(...args);
@@ -11460,6 +11478,7 @@ var __webpack_exports__ = {};
11460
11478
  },
11461
11479
  _task.logger,
11462
11480
  params.proxyLoc,
11481
+ params.localIP,
11463
11482
  params.accountId
11464
11483
  ];
11465
11484
  const http = new Http(...args);
@@ -11550,6 +11569,7 @@ var __webpack_exports__ = {};
11550
11569
  },
11551
11570
  _task.logger,
11552
11571
  params.proxyLoc,
11572
+ params.localIP,
11553
11573
  params.accountId
11554
11574
  ];
11555
11575
  const http = new Http(...args);
@@ -11635,6 +11655,7 @@ var __webpack_exports__ = {};
11635
11655
  },
11636
11656
  _task.logger,
11637
11657
  params.proxyLoc,
11658
+ params.localIP,
11638
11659
  params.accountId
11639
11660
  ];
11640
11661
  const http = new Http(...args);
@@ -11718,6 +11739,7 @@ var __webpack_exports__ = {};
11718
11739
  },
11719
11740
  _task.logger,
11720
11741
  params.proxyLoc,
11742
+ params.localIP,
11721
11743
  params.accountId
11722
11744
  ];
11723
11745
  const http = new Http(...args);
@@ -11813,6 +11835,7 @@ var __webpack_exports__ = {};
11813
11835
  },
11814
11836
  _task.logger,
11815
11837
  params.proxyLoc,
11838
+ params.localIP,
11816
11839
  params.accountId
11817
11840
  ];
11818
11841
  const http = new Http(...args);
@@ -11912,6 +11935,7 @@ var __webpack_exports__ = {};
11912
11935
  },
11913
11936
  _task.logger,
11914
11937
  params.proxyLoc,
11938
+ params.localIP,
11915
11939
  params.accountId
11916
11940
  ];
11917
11941
  const http = new Http(...args);
@@ -12057,6 +12081,7 @@ var __webpack_exports__ = {};
12057
12081
  },
12058
12082
  _task.logger,
12059
12083
  params.proxyLoc,
12084
+ params.localIP,
12060
12085
  params.accountId
12061
12086
  ];
12062
12087
  const http = new Http(...args);
@@ -12144,6 +12169,7 @@ var __webpack_exports__ = {};
12144
12169
  },
12145
12170
  _task.logger,
12146
12171
  params.proxyLoc,
12172
+ params.localIP,
12147
12173
  params.accountId
12148
12174
  ];
12149
12175
  const http = new Http(...args);
@@ -12231,6 +12257,7 @@ var __webpack_exports__ = {};
12231
12257
  },
12232
12258
  _task.logger,
12233
12259
  params.proxyLoc,
12260
+ params.localIP,
12234
12261
  params.accountId
12235
12262
  ];
12236
12263
  const http = new Http(...args);
@@ -12451,6 +12478,7 @@ var __webpack_exports__ = {};
12451
12478
  },
12452
12479
  _task.logger,
12453
12480
  params.proxyLoc,
12481
+ params.localIP,
12454
12482
  params.accountId
12455
12483
  ];
12456
12484
  const http = new Http(...args);
@@ -12812,11 +12840,16 @@ var __webpack_exports__ = {};
12812
12840
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
12813
12841
  let executionState;
12814
12842
  let proxyUrl;
12815
- if (params.proxyLoc) {
12816
- task.logger?.info(`==> 开始获取代理信息:${params}`);
12843
+ if (params.localIP) {
12844
+ const args = [
12845
+ params.localIP,
12846
+ params.proxyLoc,
12847
+ params.accountId
12848
+ ];
12849
+ task.logger?.info(`==> 开始获取代理信息:${args}`);
12817
12850
  const ProxyAgentResult = await ProxyAgent({
12818
12851
  logger: task.logger
12819
- }, params.proxyLoc, params.accountId);
12852
+ }, ...args);
12820
12853
  task.logger?.info("==> 代理信息获取成功!");
12821
12854
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
12822
12855
  }
@@ -13429,7 +13462,7 @@ var __webpack_exports__ = {};
13429
13462
  }
13430
13463
  const mock_mockAction = async (task, params)=>{
13431
13464
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
13432
- if (!params.extraParam || !params.extraParam["security-sdk/s_sdk_sign_data_key/web_protect"] || !params.extraParam["security-sdk/s_sdk_server_cert_key"] || !params.extraParam["security-sdk/s_sdk_crypt_sdk"]) return (0, share_namespaceObject.response)(414, "extraParam 参数缺失或不完整", "");
13465
+ if (!params.extraParam || !params.extraParam["security-sdk/s_sdk_pri_key"] || !params.extraParam["security-sdk/s_sdk_pub_key"] || !params.extraParam["security-sdk/s_sdk_sign_data_key/web_protect"] || !params.extraParam["security-sdk/s_sdk_server_cert_key"] || !params.extraParam["security-sdk/s_sdk_crypt_sdk"]) return (0, share_namespaceObject.response)(414, "extraParam 参数缺失或不完整", "");
13433
13466
  let currentStep = "初始化";
13434
13467
  try {
13435
13468
  currentStep = "验证账号信息";
@@ -13515,7 +13548,8 @@ var __webpack_exports__ = {};
13515
13548
  headers
13516
13549
  },
13517
13550
  task.logger,
13518
- params.proxyLoc,
13551
+ "",
13552
+ "",
13519
13553
  params.accountId,
13520
13554
  "douyin"
13521
13555
  ];
@@ -13788,6 +13822,7 @@ var __webpack_exports__ = {};
13788
13822
  enverionment: task.enverionment || "development",
13789
13823
  postId: params.articleId,
13790
13824
  eip: proxyHttp.proxyInfo,
13825
+ proxyIp: params.localIP,
13791
13826
  accountId: params.accountId,
13792
13827
  uid: params.uid,
13793
13828
  platform: "douyin",
@@ -14150,13 +14185,18 @@ var __webpack_exports__ = {};
14150
14185
  return (0, share_namespaceObject.downloadImage)(url, external_node_path_default().join(tmpCachePath, fileName));
14151
14186
  }));
14152
14187
  let proxyUrl;
14153
- if (params.proxyLoc) {
14154
- task.logger?.info(`==> 开始获取代理信息:${params}`);
14155
- const ProxyAgentResult = await ProxyAgent({
14188
+ if (params.localIP) {
14189
+ const args = [
14190
+ params.localIP,
14191
+ params.proxyLoc,
14192
+ params.accountId
14193
+ ];
14194
+ task.logger?.info(`==> 开始获取代理信息:${args}`);
14195
+ const proxyAgentResult = await ProxyAgent({
14156
14196
  logger: task.logger
14157
- }, params.proxyLoc, params.accountId);
14197
+ }, ...args);
14158
14198
  task.logger?.info("==> 代理信息获取成功!");
14159
- proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
14199
+ proxyUrl = proxyAgentResult ? `http://${proxyAgentResult.ip}:${proxyAgentResult.port}` : void 0;
14160
14200
  }
14161
14201
  const commonCookies = {
14162
14202
  path: "/",
@@ -15113,6 +15153,7 @@ var __webpack_exports__ = {};
15113
15153
  },
15114
15154
  _task.logger,
15115
15155
  params.proxyLoc,
15156
+ params.localIP,
15116
15157
  params.accountId
15117
15158
  ];
15118
15159
  const http = new Http(...args);
@@ -15170,6 +15211,7 @@ var __webpack_exports__ = {};
15170
15211
  },
15171
15212
  _task.logger,
15172
15213
  params.proxyLoc,
15214
+ params.localIP,
15173
15215
  params.accountId
15174
15216
  ];
15175
15217
  const http = new Http(...args);
@@ -15216,6 +15258,7 @@ var __webpack_exports__ = {};
15216
15258
  },
15217
15259
  _task.logger,
15218
15260
  params.proxyLoc,
15261
+ params.localIP,
15219
15262
  params.accountId
15220
15263
  ];
15221
15264
  const http = new Http(...args);
@@ -15252,6 +15295,7 @@ var __webpack_exports__ = {};
15252
15295
  const data = isSuccess ? res.data.activity_list : [];
15253
15296
  return (0, share_namespaceObject.response)(isSuccess ? 0 : 414, message, data);
15254
15297
  };
15298
+ const getXhsWebUnreadCount_xsEncrypt = new Xhshow();
15255
15299
  const UnreadCountSchema = schemas_object({
15256
15300
  connections: schemas_number().nullable(),
15257
15301
  mentions: schemas_number().nullable(),
@@ -15276,6 +15320,7 @@ var __webpack_exports__ = {};
15276
15320
  },
15277
15321
  _task.logger,
15278
15322
  params.proxyLoc,
15323
+ params.localIP,
15279
15324
  params.accountId
15280
15325
  ];
15281
15326
  const http = new Http(...args);
@@ -15285,9 +15330,24 @@ var __webpack_exports__ = {};
15285
15330
  unread_count: null,
15286
15331
  likes: null
15287
15332
  };
15333
+ const a1Cookie = params.cookies.find((it)=>"a1" === it.name)?.value;
15334
+ if (!a1Cookie) return {
15335
+ code: 414,
15336
+ message: "账号数据异常,请重新绑定账号后重试。",
15337
+ data: unreadCount
15338
+ };
15339
+ const apiPath = "/api/sns/web/unread_count";
15340
+ const recordCookie = params.cookies.reduce((acc, cookie)=>{
15341
+ if (cookie.name && cookie.value) acc[cookie.name] = cookie.value;
15342
+ return acc;
15343
+ }, {});
15344
+ const requestData = {};
15345
+ const xsHeader = getXhsWebUnreadCount_xsEncrypt.signHeadersPost(apiPath, recordCookie, "xhs-pc-web", requestData);
15288
15346
  const res = await http.api({
15289
- method: "get",
15290
- url: "https://edith.xiaohongshu.com/api/sns/web/unread_count"
15347
+ method: "GET",
15348
+ url: "https://edith.xiaohongshu.com/api/sns/web/unread_count",
15349
+ data: requestData,
15350
+ headers: xsHeader
15291
15351
  }, {
15292
15352
  retries: 3,
15293
15353
  retryDelay: 20,
@@ -15368,6 +15428,7 @@ var __webpack_exports__ = {};
15368
15428
  },
15369
15429
  _task.logger,
15370
15430
  params.proxyLoc,
15431
+ params.localIP,
15371
15432
  params.accountId
15372
15433
  ];
15373
15434
  const http = new Http(...args);
@@ -15474,6 +15535,7 @@ var __webpack_exports__ = {};
15474
15535
  },
15475
15536
  _task.logger,
15476
15537
  params.proxyLoc,
15538
+ params.localIP,
15477
15539
  params.accountId
15478
15540
  ];
15479
15541
  const http = new Http(...args);
@@ -15704,6 +15766,7 @@ var __webpack_exports__ = {};
15704
15766
  },
15705
15767
  _task.logger,
15706
15768
  params.proxyLoc,
15769
+ params.localIP,
15707
15770
  params.accountId
15708
15771
  ];
15709
15772
  const http = new Http(...args);
@@ -16036,6 +16099,7 @@ var __webpack_exports__ = {};
16036
16099
  },
16037
16100
  _task.logger,
16038
16101
  params.proxyLoc,
16102
+ params.localIP,
16039
16103
  params.accountId
16040
16104
  ];
16041
16105
  const http = new Http(...args);
@@ -16141,6 +16205,7 @@ var __webpack_exports__ = {};
16141
16205
  },
16142
16206
  _task.logger,
16143
16207
  params.proxyLoc,
16208
+ params.localIP,
16144
16209
  params.accountId
16145
16210
  ];
16146
16211
  const http = new Http(...args);
@@ -16605,6 +16670,7 @@ var __webpack_exports__ = {};
16605
16670
  },
16606
16671
  _task.logger,
16607
16672
  params.proxyLoc,
16673
+ params.localIP,
16608
16674
  params.accountId
16609
16675
  ];
16610
16676
  const http = new Http(...args);
@@ -16935,6 +17001,7 @@ var __webpack_exports__ = {};
16935
17001
  },
16936
17002
  _task.logger,
16937
17003
  params.proxyLoc,
17004
+ params.localIP,
16938
17005
  params.accountId
16939
17006
  ];
16940
17007
  const http = new Http(...args);
@@ -16987,6 +17054,7 @@ var __webpack_exports__ = {};
16987
17054
  },
16988
17055
  _task.logger,
16989
17056
  params.proxyLoc,
17057
+ params.localIP,
16990
17058
  params.accountId
16991
17059
  ];
16992
17060
  const http = new Http(...args);
@@ -17039,6 +17107,7 @@ var __webpack_exports__ = {};
17039
17107
  },
17040
17108
  _task.logger,
17041
17109
  params.proxyLoc,
17110
+ params.localIP,
17042
17111
  params.accountId
17043
17112
  ];
17044
17113
  const http = new Http(...args);
@@ -17085,6 +17154,7 @@ var __webpack_exports__ = {};
17085
17154
  },
17086
17155
  _task.logger,
17087
17156
  params.proxyLoc,
17157
+ params.localIP,
17088
17158
  params.accountId
17089
17159
  ];
17090
17160
  const http = new Http(...args);
@@ -17123,6 +17193,7 @@ var __webpack_exports__ = {};
17123
17193
  },
17124
17194
  _task.logger,
17125
17195
  params.proxyLoc,
17196
+ params.localIP,
17126
17197
  params.accountId
17127
17198
  ];
17128
17199
  const http = new Http(...args);
@@ -17184,6 +17255,7 @@ var __webpack_exports__ = {};
17184
17255
  },
17185
17256
  _task.logger,
17186
17257
  params.proxyLoc,
17258
+ params.localIP,
17187
17259
  params.accountId
17188
17260
  ];
17189
17261
  const http = new Http(...args);
@@ -17240,6 +17312,7 @@ var __webpack_exports__ = {};
17240
17312
  },
17241
17313
  _task.logger,
17242
17314
  params.proxyLoc,
17315
+ params.localIP,
17243
17316
  params.accountId
17244
17317
  ];
17245
17318
  const http = new Http(...args);
@@ -17325,6 +17398,7 @@ var __webpack_exports__ = {};
17325
17398
  },
17326
17399
  _task.logger,
17327
17400
  params.proxyLoc,
17401
+ params.localIP,
17328
17402
  params.accountId
17329
17403
  ];
17330
17404
  const http = new Http(...args);
@@ -17412,6 +17486,7 @@ var __webpack_exports__ = {};
17412
17486
  },
17413
17487
  _task.logger,
17414
17488
  params.proxyLoc,
17489
+ params.localIP,
17415
17490
  params.accountId
17416
17491
  ];
17417
17492
  const http = new Http(...args);
@@ -17521,6 +17596,7 @@ var __webpack_exports__ = {};
17521
17596
  },
17522
17597
  _task.logger,
17523
17598
  params.proxyLoc,
17599
+ params.localIP,
17524
17600
  params.accountId
17525
17601
  ];
17526
17602
  const http = new Http(...args);
@@ -17798,11 +17874,16 @@ var __webpack_exports__ = {};
17798
17874
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
17799
17875
  let executionState;
17800
17876
  let proxyUrl;
17801
- if (params.proxyLoc) {
17802
- task.logger?.info(`==> 开始获取代理信息:${params}`);
17877
+ if (params.localIP) {
17878
+ const args = [
17879
+ params.localIP,
17880
+ params.proxyLoc,
17881
+ params.accountId
17882
+ ];
17883
+ task.logger?.info(`==> 开始获取代理信息:${args}`);
17803
17884
  const ProxyAgentResult = await ProxyAgent({
17804
17885
  logger: task.logger
17805
- }, params.proxyLoc, params.accountId);
17886
+ }, ...args);
17806
17887
  task.logger?.info("==> 代理信息获取成功!");
17807
17888
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
17808
17889
  }
@@ -18629,6 +18710,7 @@ var __webpack_exports__ = {};
18629
18710
  enverionment: confParams.enverionment || "development",
18630
18711
  postId: confParams.articleId,
18631
18712
  eip: proxyHttp.proxyInfo,
18713
+ proxyIp: confParams.proxyIp,
18632
18714
  accountId: confParams.accountId,
18633
18715
  uid: confParams.uid,
18634
18716
  publishParams: publishData,
@@ -18655,6 +18737,7 @@ var __webpack_exports__ = {};
18655
18737
  },
18656
18738
  task.logger,
18657
18739
  params.proxyLoc,
18740
+ params.localIP,
18658
18741
  params.accountId,
18659
18742
  "shipinhao"
18660
18743
  ];
@@ -18725,6 +18808,7 @@ var __webpack_exports__ = {};
18725
18808
  articleId: params.articleId,
18726
18809
  postId: params.articleId,
18727
18810
  eip: proxyHttp.proxyInfo,
18811
+ proxyIp: params.localIP,
18728
18812
  accountId: params.accountId,
18729
18813
  uid: params.uid
18730
18814
  }, {
@@ -19111,11 +19195,16 @@ var __webpack_exports__ = {};
19111
19195
  return (0, share_namespaceObject.downloadImage)(url, external_node_path_default().join(tmpCachePath, fileName));
19112
19196
  }));
19113
19197
  let proxyUrl;
19114
- if (params.proxyLoc) {
19115
- task.logger?.info(`==> 开始获取代理信息:${params}`);
19198
+ if (params.localIP) {
19199
+ const args = [
19200
+ params.localIP,
19201
+ params.proxyLoc,
19202
+ params.accountId
19203
+ ];
19204
+ task.logger?.info(`==> 开始获取代理信息:${args}`);
19116
19205
  const ProxyAgentResult = await ProxyAgent({
19117
19206
  logger: task.logger
19118
- }, params.proxyLoc, params.accountId);
19207
+ }, ...args);
19119
19208
  task.logger?.info("==> 代理信息获取成功!");
19120
19209
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
19121
19210
  }
@@ -19765,11 +19854,16 @@ var __webpack_exports__ = {};
19765
19854
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
19766
19855
  let executionState;
19767
19856
  let proxyUrl;
19768
- if (params.proxyLoc) {
19769
- task.logger?.info(`==> 开始获取代理信息:${params}`);
19857
+ if (params.localIP) {
19858
+ const args = [
19859
+ params.localIP,
19860
+ params.proxyLoc,
19861
+ params.accountId
19862
+ ];
19863
+ task.logger?.info(`==> 开始获取代理信息:${args}`);
19770
19864
  const ProxyAgentResult = await ProxyAgent({
19771
19865
  logger: task.logger
19772
- }, params.proxyLoc, params.accountId);
19866
+ }, ...args);
19773
19867
  task.logger?.info("==> 代理信息获取成功!");
19774
19868
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
19775
19869
  }
@@ -20020,6 +20114,7 @@ var __webpack_exports__ = {};
20020
20114
  },
20021
20115
  task.logger,
20022
20116
  params.proxyLoc,
20117
+ params.localIP,
20023
20118
  params.accountId,
20024
20119
  "toutiao"
20025
20120
  ];
@@ -20217,6 +20312,7 @@ var __webpack_exports__ = {};
20217
20312
  enverionment: task.enverionment || "development",
20218
20313
  postId: params.articleId,
20219
20314
  eip: proxyHttp.proxyInfo,
20315
+ proxyIp: params.localIP,
20220
20316
  accountId: params.accountId,
20221
20317
  uid: params.uid,
20222
20318
  platform: "toutiao",
@@ -20851,11 +20947,16 @@ var __webpack_exports__ = {};
20851
20947
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
20852
20948
  let executionState;
20853
20949
  let proxyUrl;
20854
- if (params.proxyLoc) {
20855
- task.logger?.info(`==> 开始获取代理信息:${params}`);
20950
+ if (params.localIP) {
20951
+ const args = [
20952
+ params.localIP,
20953
+ params.proxyLoc,
20954
+ params.accountId
20955
+ ];
20956
+ task.logger?.info(`==> 开始获取代理信息:${args}`);
20856
20957
  const ProxyAgentResult = await ProxyAgent({
20857
20958
  logger: task.logger
20858
- }, params.proxyLoc, params.accountId);
20959
+ }, ...args);
20859
20960
  task.logger?.info("==> 代理信息获取成功!");
20860
20961
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
20861
20962
  }
@@ -21347,6 +21448,7 @@ var __webpack_exports__ = {};
21347
21448
  },
21348
21449
  task.logger,
21349
21450
  params.proxyLoc,
21451
+ params.localIP,
21350
21452
  params.accountId,
21351
21453
  "weixin"
21352
21454
  ];
@@ -22125,6 +22227,7 @@ var __webpack_exports__ = {};
22125
22227
  enverionment: task.enverionment || "development",
22126
22228
  postId: params.articleId,
22127
22229
  eip: proxyHttp.proxyInfo,
22230
+ proxyIp: params.localIP,
22128
22231
  accountId: params.accountId,
22129
22232
  uid: params.uid,
22130
22233
  platform: "weixin",
@@ -22929,11 +23032,16 @@ var __webpack_exports__ = {};
22929
23032
  const reporter = task.reportService?.reportLoginStatus ?? (()=>Promise.resolve());
22930
23033
  let executionState;
22931
23034
  let proxyUrl;
22932
- if (params.proxyLoc) {
22933
- task.logger?.info(`==> 开始获取代理信息:${params}`);
23035
+ if (params.localIP) {
23036
+ const args = [
23037
+ params.localIP,
23038
+ params.proxyLoc,
23039
+ params.accountId
23040
+ ];
23041
+ task.logger?.info(`==> 开始获取代理信息:${args}`);
22934
23042
  const ProxyAgentResult = await ProxyAgent({
22935
23043
  logger: task.logger
22936
- }, params.proxyLoc, params.accountId);
23044
+ }, ...args);
22937
23045
  task.logger?.info("==> 代理信息获取成功!");
22938
23046
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
22939
23047
  }
@@ -23250,6 +23358,7 @@ var __webpack_exports__ = {};
23250
23358
  },
23251
23359
  task.logger,
23252
23360
  params.proxyLoc,
23361
+ params.localIP,
23253
23362
  params.accountId,
23254
23363
  "xiaohongshu"
23255
23364
  ];
@@ -23290,8 +23399,8 @@ var __webpack_exports__ = {};
23290
23399
  params: fetchCoverParams
23291
23400
  }, {
23292
23401
  retries: 3,
23293
- retryDelay: 500,
23294
- timeout: 30000
23402
+ retryDelay: 20,
23403
+ timeout: 3000
23295
23404
  });
23296
23405
  for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
23297
23406
  bucket: item.bucket || "",
@@ -23310,8 +23419,8 @@ var __webpack_exports__ = {};
23310
23419
  params: fetchCoverParams
23311
23420
  }, {
23312
23421
  retries: 3,
23313
- retryDelay: 500,
23314
- timeout: 30000
23422
+ retryDelay: 20,
23423
+ timeout: 3000
23315
23424
  });
23316
23425
  for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
23317
23426
  bucket: item.bucket || "",
@@ -23372,9 +23481,7 @@ var __webpack_exports__ = {};
23372
23481
  headers: {
23373
23482
  "x-cos-security-token": ossToken
23374
23483
  },
23375
- defaultErrorMsg: "图片上传异常,请稍后重试。"
23376
- }, {
23377
- timeout: 60000
23484
+ defaultErrorMsg: "图片上传异常,请稍后重试发布。"
23378
23485
  });
23379
23486
  return {
23380
23487
  ossFileId,
@@ -23384,8 +23491,6 @@ var __webpack_exports__ = {};
23384
23491
  originSize
23385
23492
  };
23386
23493
  } catch (error) {
23387
- const e = Http.handleApiError(error);
23388
- 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)}`);
23389
23494
  attempt++;
23390
23495
  }
23391
23496
  }
@@ -23619,6 +23724,7 @@ var __webpack_exports__ = {};
23619
23724
  enverionment: task.enverionment || "development",
23620
23725
  postId: params.articleId,
23621
23726
  eip: proxyHttp.proxyInfo,
23727
+ proxyIp: params.localIP,
23622
23728
  accountId: params.accountId,
23623
23729
  uid: params.uid,
23624
23730
  platform: "xiaohongshu",
@@ -23880,11 +23986,16 @@ var __webpack_exports__ = {};
23880
23986
  return (0, share_namespaceObject.downloadImage)(url, external_node_path_default().join(tmpCachePath, fileName));
23881
23987
  }));
23882
23988
  let proxyUrl;
23883
- if (params.proxyLoc) {
23884
- task.logger?.info(`==> 开始获取代理信息:${params}`);
23989
+ if (params.localIP) {
23990
+ const args = [
23991
+ params.localIP,
23992
+ params.proxyLoc,
23993
+ params.accountId
23994
+ ];
23995
+ task.logger?.info(`==> 开始获取代理信息:${args}`);
23885
23996
  const ProxyAgentResult = await ProxyAgent({
23886
23997
  logger: task.logger
23887
- }, params.proxyLoc, params.accountId);
23998
+ }, ...args);
23888
23999
  task.logger?.info("==> 代理信息获取成功!");
23889
24000
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
23890
24001
  }
@@ -24313,6 +24424,7 @@ var __webpack_exports__ = {};
24313
24424
  },
24314
24425
  task.logger,
24315
24426
  params.proxyLoc,
24427
+ params.localIP,
24316
24428
  params.accountId,
24317
24429
  "xiaohongshu-rpa"
24318
24430
  ];
@@ -24358,8 +24470,8 @@ var __webpack_exports__ = {};
24358
24470
  params: fetchCoverParams
24359
24471
  }, {
24360
24472
  retries: 3,
24361
- retryDelay: 500,
24362
- timeout: 8000
24473
+ retryDelay: 20,
24474
+ timeout: 3000
24363
24475
  });
24364
24476
  for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
24365
24477
  bucket: item.bucket || "",
@@ -24378,8 +24490,8 @@ var __webpack_exports__ = {};
24378
24490
  params: fetchCoverParams
24379
24491
  }, {
24380
24492
  retries: 3,
24381
- retryDelay: 500,
24382
- timeout: 8000
24493
+ retryDelay: 20,
24494
+ timeout: 3000
24383
24495
  });
24384
24496
  for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
24385
24497
  bucket: item.bucket || "",
@@ -24424,8 +24536,6 @@ var __webpack_exports__ = {};
24424
24536
  "x-cos-security-token": ossToken
24425
24537
  },
24426
24538
  defaultErrorMsg: "图片上传异常,请稍后重试发布。"
24427
- }, {
24428
- timeout: 60000
24429
24539
  });
24430
24540
  return {
24431
24541
  ossFileId,
@@ -24735,6 +24845,7 @@ var __webpack_exports__ = {};
24735
24845
  },
24736
24846
  _task.logger,
24737
24847
  params.proxyLoc,
24848
+ params.localIP,
24738
24849
  params.accountId
24739
24850
  ];
24740
24851
  const http = new Http(...args);
@@ -24820,6 +24931,7 @@ var __webpack_exports__ = {};
24820
24931
  },
24821
24932
  _task.logger,
24822
24933
  params.proxyLoc,
24934
+ params.localIP,
24823
24935
  params.accountId
24824
24936
  ];
24825
24937
  const http = new Http(...args);
@@ -24858,6 +24970,7 @@ var __webpack_exports__ = {};
24858
24970
  },
24859
24971
  _task.logger,
24860
24972
  params.proxyLoc,
24973
+ params.localIP,
24861
24974
  params.accountId
24862
24975
  ];
24863
24976
  const http = new Http(...args);
@@ -24910,6 +25023,7 @@ var __webpack_exports__ = {};
24910
25023
  },
24911
25024
  _task.logger,
24912
25025
  params.proxyLoc,
25026
+ params.localIP,
24913
25027
  params.accountId
24914
25028
  ];
24915
25029
  const http = new Http(...args);
@@ -24966,6 +25080,7 @@ var __webpack_exports__ = {};
24966
25080
  },
24967
25081
  _task.logger,
24968
25082
  params.proxyLoc,
25083
+ params.localIP,
24969
25084
  params.accountId
24970
25085
  ];
24971
25086
  const http = new Http(...args);
@@ -25038,6 +25153,7 @@ var __webpack_exports__ = {};
25038
25153
  },
25039
25154
  _task.logger,
25040
25155
  params.proxyLoc,
25156
+ params.localIP,
25041
25157
  params.accountId
25042
25158
  ];
25043
25159
  const http = new Http(...args);
@@ -25141,6 +25257,7 @@ var __webpack_exports__ = {};
25141
25257
  },
25142
25258
  _task.logger,
25143
25259
  params.proxyLoc,
25260
+ params.localIP,
25144
25261
  params.accountId
25145
25262
  ];
25146
25263
  const http = new Http(...args);
@@ -25580,4 +25697,4 @@ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_targe
25580
25697
  });
25581
25698
 
25582
25699
  //# sourceMappingURL=index.js.map
25583
- //# debugId=6a453c21-67bd-5554-819f-0c24705e7164
25700
+ //# debugId=23a118d5-7504-553a-869b-7251d1fda8eb