@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.js 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]="5f09a939-272d-5019-8b8d-7fde9f1a0f9f")}catch(e){}}();
1
3
  var __webpack_modules__ = {
2
4
  "./src/utils/XhsXsCommonEnc.js": function(module) {
3
5
  var encrypt_lookup = [
@@ -4400,9 +4402,7 @@ var __webpack_exports__ = {};
4400
4402
  });
4401
4403
  const package_json_namespaceObject = require("@iflyrpa/share/package.json");
4402
4404
  var package_json_default = /*#__PURE__*/ __webpack_require__.n(package_json_namespaceObject);
4403
- var package_namespaceObject = {
4404
- i8: "4.0.6"
4405
- };
4405
+ var package_namespaceObject = JSON.parse('{"i8":"4.0.8-beta.0"}');
4406
4406
  const share_namespaceObject = require("@iflyrpa/share");
4407
4407
  const external_node_fs_namespaceObject = require("node:fs");
4408
4408
  var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
@@ -4505,15 +4505,14 @@ var __webpack_exports__ = {};
4505
4505
  }
4506
4506
  return `socks5h://${ip}:${port}`;
4507
4507
  }
4508
- async function ProxyAgent(task, ip, adr, accountId, refresh) {
4508
+ async function ProxyAgent(task, addr, accountId, refresh) {
4509
4509
  const http = new Http({
4510
4510
  headers: {
4511
4511
  "content-type": "application/json"
4512
4512
  }
4513
4513
  });
4514
4514
  const params = {
4515
- ip: ip,
4516
- addr: adr || null,
4515
+ addr: addr || null,
4517
4516
  accountId: accountId
4518
4517
  };
4519
4518
  const ProxyInfo = await http.api({
@@ -4535,7 +4534,7 @@ var __webpack_exports__ = {};
4535
4534
  data: ProxyInfo.data
4536
4535
  }
4537
4536
  };
4538
- task.logger?.info(`请求代理:区域:${params.addr}, IP:${params.ip}, AccountId:${params.accountId}, 返回代理信息: ${ProxyInfo.data ? `${ProxyInfo.data.proxyIp}:${ProxyInfo.data.proxyPort}` : "无可用代理"}`, loggerInfo);
4537
+ task.logger?.info(`请求代理:区域:${params.addr}, AccountId:${params.accountId}, 返回代理信息: ${ProxyInfo.data ? `${ProxyInfo.data.proxyIp}:${ProxyInfo.data.proxyPort}` : "无可用代理"}`, loggerInfo);
4539
4538
  const proxyAgent = "000000" === ProxyInfo.code && ProxyInfo.data ? {
4540
4539
  ip: ProxyInfo.data.proxyIp,
4541
4540
  port: ProxyInfo.data.proxyPort,
@@ -4552,16 +4551,16 @@ var __webpack_exports__ = {};
4552
4551
  data: error
4553
4552
  };
4554
4553
  }
4555
- constructor(config, logger, adr, ip, accountId, platform){
4554
+ constructor(config, logger, addr, accountId, platform){
4556
4555
  this.agentPromise = void 0;
4557
4556
  this.apiClient = external_axios_default().create({
4558
4557
  ...config
4559
4558
  });
4560
4559
  this.logger = logger;
4561
4560
  this.platform = platform;
4562
- if (ip) this.agentPromise = ProxyAgent({
4561
+ if (addr) this.agentPromise = ProxyAgent({
4563
4562
  logger
4564
- }, ip, adr, accountId);
4563
+ }, addr, accountId);
4565
4564
  this.addResponseInterceptor(()=>void 0);
4566
4565
  }
4567
4566
  clearResponseInterceptors() {
@@ -8721,16 +8720,11 @@ var __webpack_exports__ = {};
8721
8720
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
8722
8721
  let executionState;
8723
8722
  let proxyUrl;
8724
- if (params.localIP) {
8725
- const args = [
8726
- params.localIP,
8727
- params.proxyLoc,
8728
- params.accountId
8729
- ];
8730
- task.logger?.info(`==> 开始获取代理信息:${args}`);
8723
+ if (params.proxyLoc) {
8724
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
8731
8725
  const ProxyAgentResult = await ProxyAgent({
8732
8726
  logger: task.logger
8733
- }, ...args);
8727
+ }, params.proxyLoc, params.accountId);
8734
8728
  task.logger?.info("==> 代理信息获取成功!");
8735
8729
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
8736
8730
  }
@@ -9075,7 +9069,6 @@ var __webpack_exports__ = {};
9075
9069
  },
9076
9070
  task.logger,
9077
9071
  params.proxyLoc,
9078
- params.localIP,
9079
9072
  params.accountId,
9080
9073
  "baijiahao"
9081
9074
  ];
@@ -9281,7 +9274,6 @@ var __webpack_exports__ = {};
9281
9274
  enverionment: task.enverionment || "development",
9282
9275
  postId: params.articleId,
9283
9276
  eip: proxyHttp.proxyInfo,
9284
- proxyIp: params.localIP,
9285
9277
  accountId: params.accountId,
9286
9278
  uid: params.uid,
9287
9279
  platform: "baijiahao",
@@ -9802,7 +9794,6 @@ var __webpack_exports__ = {};
9802
9794
  },
9803
9795
  _task.logger,
9804
9796
  params.proxyLoc,
9805
- params.localIP,
9806
9797
  params.accountId
9807
9798
  ];
9808
9799
  const http = new Http(...args);
@@ -10932,7 +10923,7 @@ var __webpack_exports__ = {};
10932
10923
  heapTotal: `${Math.round(process.memoryUsage().heapTotal / 1024 / 1024)} MB`
10933
10924
  },
10934
10925
  accountId: params.accountId,
10935
- hasProxy: !!(params.proxyLoc || params.localIP)
10926
+ hasProxy: !!params.proxyLoc
10936
10927
  });
10937
10928
  }
10938
10929
  const check = {
@@ -10955,7 +10946,6 @@ var __webpack_exports__ = {};
10955
10946
  },
10956
10947
  _task.logger,
10957
10948
  params.proxyLoc,
10958
- params.localIP,
10959
10949
  params.accountId
10960
10950
  ];
10961
10951
  const http = new Http(...args);
@@ -10986,7 +10976,7 @@ var __webpack_exports__ = {};
10986
10976
  heapUsed: `${Math.round(process.memoryUsage().heapUsed / 1024 / 1024)} MB`,
10987
10977
  heapTotal: `${Math.round(process.memoryUsage().heapTotal / 1024 / 1024)} MB`
10988
10978
  },
10989
- hasProxy: !!(params.proxyLoc || params.localIP),
10979
+ hasProxy: !!params.proxyLoc,
10990
10980
  timeSinceLastLog: Date.now() - lastEnvLogTime
10991
10981
  }
10992
10982
  });
@@ -11027,9 +11017,14 @@ var __webpack_exports__ = {};
11027
11017
  });
11028
11018
  return e.data;
11029
11019
  });
11020
+ const webSessionPath = "/api/sns/web/unread_count";
11021
+ const webSessionData = {};
11022
+ const webSessionXsHeader = sessionCheck_xsEncrypt.signHeadersPost(webSessionPath, recordCookie, "xhs-pc-web", webSessionData);
11030
11023
  const _web_session = http.api({
11031
- method: "get",
11032
- url: "https://edith.xiaohongshu.com/api/sns/web/unread_count"
11024
+ method: "GET",
11025
+ url: "https://edith.xiaohongshu.com/api/sns/web/unread_count",
11026
+ data: webSessionData,
11027
+ headers: webSessionXsHeader
11033
11028
  }, {
11034
11029
  retries: 3,
11035
11030
  retryDelay: 20,
@@ -11384,7 +11379,6 @@ var __webpack_exports__ = {};
11384
11379
  },
11385
11380
  _task.logger,
11386
11381
  params.proxyLoc,
11387
- params.localIP,
11388
11382
  params.accountId
11389
11383
  ];
11390
11384
  const http = new Http(...args);
@@ -11471,7 +11465,6 @@ var __webpack_exports__ = {};
11471
11465
  },
11472
11466
  _task.logger,
11473
11467
  params.proxyLoc,
11474
- params.localIP,
11475
11468
  params.accountId
11476
11469
  ];
11477
11470
  const http = new Http(...args);
@@ -11562,7 +11555,6 @@ var __webpack_exports__ = {};
11562
11555
  },
11563
11556
  _task.logger,
11564
11557
  params.proxyLoc,
11565
- params.localIP,
11566
11558
  params.accountId
11567
11559
  ];
11568
11560
  const http = new Http(...args);
@@ -11648,7 +11640,6 @@ var __webpack_exports__ = {};
11648
11640
  },
11649
11641
  _task.logger,
11650
11642
  params.proxyLoc,
11651
- params.localIP,
11652
11643
  params.accountId
11653
11644
  ];
11654
11645
  const http = new Http(...args);
@@ -11732,7 +11723,6 @@ var __webpack_exports__ = {};
11732
11723
  },
11733
11724
  _task.logger,
11734
11725
  params.proxyLoc,
11735
- params.localIP,
11736
11726
  params.accountId
11737
11727
  ];
11738
11728
  const http = new Http(...args);
@@ -11828,7 +11818,6 @@ var __webpack_exports__ = {};
11828
11818
  },
11829
11819
  _task.logger,
11830
11820
  params.proxyLoc,
11831
- params.localIP,
11832
11821
  params.accountId
11833
11822
  ];
11834
11823
  const http = new Http(...args);
@@ -11928,7 +11917,6 @@ var __webpack_exports__ = {};
11928
11917
  },
11929
11918
  _task.logger,
11930
11919
  params.proxyLoc,
11931
- params.localIP,
11932
11920
  params.accountId
11933
11921
  ];
11934
11922
  const http = new Http(...args);
@@ -12074,7 +12062,6 @@ var __webpack_exports__ = {};
12074
12062
  },
12075
12063
  _task.logger,
12076
12064
  params.proxyLoc,
12077
- params.localIP,
12078
12065
  params.accountId
12079
12066
  ];
12080
12067
  const http = new Http(...args);
@@ -12162,7 +12149,6 @@ var __webpack_exports__ = {};
12162
12149
  },
12163
12150
  _task.logger,
12164
12151
  params.proxyLoc,
12165
- params.localIP,
12166
12152
  params.accountId
12167
12153
  ];
12168
12154
  const http = new Http(...args);
@@ -12250,7 +12236,6 @@ var __webpack_exports__ = {};
12250
12236
  },
12251
12237
  _task.logger,
12252
12238
  params.proxyLoc,
12253
- params.localIP,
12254
12239
  params.accountId
12255
12240
  ];
12256
12241
  const http = new Http(...args);
@@ -12471,7 +12456,6 @@ var __webpack_exports__ = {};
12471
12456
  },
12472
12457
  _task.logger,
12473
12458
  params.proxyLoc,
12474
- params.localIP,
12475
12459
  params.accountId
12476
12460
  ];
12477
12461
  const http = new Http(...args);
@@ -12833,16 +12817,11 @@ var __webpack_exports__ = {};
12833
12817
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
12834
12818
  let executionState;
12835
12819
  let proxyUrl;
12836
- if (params.localIP) {
12837
- const args = [
12838
- params.localIP,
12839
- params.proxyLoc,
12840
- params.accountId
12841
- ];
12842
- task.logger?.info(`==> 开始获取代理信息:${args}`);
12820
+ if (params.proxyLoc) {
12821
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
12843
12822
  const ProxyAgentResult = await ProxyAgent({
12844
12823
  logger: task.logger
12845
- }, ...args);
12824
+ }, params.proxyLoc, params.accountId);
12846
12825
  task.logger?.info("==> 代理信息获取成功!");
12847
12826
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
12848
12827
  }
@@ -13455,7 +13434,7 @@ var __webpack_exports__ = {};
13455
13434
  }
13456
13435
  const mock_mockAction = async (task, params)=>{
13457
13436
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
13458
- 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 参数缺失或不完整", "");
13437
+ 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 参数缺失或不完整", "");
13459
13438
  let currentStep = "初始化";
13460
13439
  try {
13461
13440
  currentStep = "验证账号信息";
@@ -13541,8 +13520,7 @@ var __webpack_exports__ = {};
13541
13520
  headers
13542
13521
  },
13543
13522
  task.logger,
13544
- "",
13545
- "",
13523
+ params.proxyLoc,
13546
13524
  params.accountId,
13547
13525
  "douyin"
13548
13526
  ];
@@ -13815,7 +13793,6 @@ var __webpack_exports__ = {};
13815
13793
  enverionment: task.enverionment || "development",
13816
13794
  postId: params.articleId,
13817
13795
  eip: proxyHttp.proxyInfo,
13818
- proxyIp: params.localIP,
13819
13796
  accountId: params.accountId,
13820
13797
  uid: params.uid,
13821
13798
  platform: "douyin",
@@ -14178,18 +14155,13 @@ var __webpack_exports__ = {};
14178
14155
  return (0, share_namespaceObject.downloadImage)(url, external_node_path_default().join(tmpCachePath, fileName));
14179
14156
  }));
14180
14157
  let proxyUrl;
14181
- if (params.localIP) {
14182
- const args = [
14183
- params.localIP,
14184
- params.proxyLoc,
14185
- params.accountId
14186
- ];
14187
- task.logger?.info(`==> 开始获取代理信息:${args}`);
14188
- const proxyAgentResult = await ProxyAgent({
14158
+ if (params.proxyLoc) {
14159
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
14160
+ const ProxyAgentResult = await ProxyAgent({
14189
14161
  logger: task.logger
14190
- }, ...args);
14162
+ }, params.proxyLoc, params.accountId);
14191
14163
  task.logger?.info("==> 代理信息获取成功!");
14192
- proxyUrl = proxyAgentResult ? `http://${proxyAgentResult.ip}:${proxyAgentResult.port}` : void 0;
14164
+ proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
14193
14165
  }
14194
14166
  const commonCookies = {
14195
14167
  path: "/",
@@ -15146,7 +15118,6 @@ var __webpack_exports__ = {};
15146
15118
  },
15147
15119
  _task.logger,
15148
15120
  params.proxyLoc,
15149
- params.localIP,
15150
15121
  params.accountId
15151
15122
  ];
15152
15123
  const http = new Http(...args);
@@ -15204,7 +15175,6 @@ var __webpack_exports__ = {};
15204
15175
  },
15205
15176
  _task.logger,
15206
15177
  params.proxyLoc,
15207
- params.localIP,
15208
15178
  params.accountId
15209
15179
  ];
15210
15180
  const http = new Http(...args);
@@ -15251,7 +15221,6 @@ var __webpack_exports__ = {};
15251
15221
  },
15252
15222
  _task.logger,
15253
15223
  params.proxyLoc,
15254
- params.localIP,
15255
15224
  params.accountId
15256
15225
  ];
15257
15226
  const http = new Http(...args);
@@ -15288,6 +15257,7 @@ var __webpack_exports__ = {};
15288
15257
  const data = isSuccess ? res.data.activity_list : [];
15289
15258
  return (0, share_namespaceObject.response)(isSuccess ? 0 : 414, message, data);
15290
15259
  };
15260
+ const getXhsWebUnreadCount_xsEncrypt = new Xhshow();
15291
15261
  const UnreadCountSchema = schemas_object({
15292
15262
  connections: schemas_number().nullable(),
15293
15263
  mentions: schemas_number().nullable(),
@@ -15312,7 +15282,6 @@ var __webpack_exports__ = {};
15312
15282
  },
15313
15283
  _task.logger,
15314
15284
  params.proxyLoc,
15315
- params.localIP,
15316
15285
  params.accountId
15317
15286
  ];
15318
15287
  const http = new Http(...args);
@@ -15322,9 +15291,24 @@ var __webpack_exports__ = {};
15322
15291
  unread_count: null,
15323
15292
  likes: null
15324
15293
  };
15294
+ const a1Cookie = params.cookies.find((it)=>"a1" === it.name)?.value;
15295
+ if (!a1Cookie) return {
15296
+ code: 414,
15297
+ message: "账号数据异常,请重新绑定账号后重试。",
15298
+ data: unreadCount
15299
+ };
15300
+ const apiPath = "/api/sns/web/unread_count";
15301
+ const recordCookie = params.cookies.reduce((acc, cookie)=>{
15302
+ if (cookie.name && cookie.value) acc[cookie.name] = cookie.value;
15303
+ return acc;
15304
+ }, {});
15305
+ const requestData = {};
15306
+ const xsHeader = getXhsWebUnreadCount_xsEncrypt.signHeadersPost(apiPath, recordCookie, "xhs-pc-web", requestData);
15325
15307
  const res = await http.api({
15326
- method: "get",
15327
- url: "https://edith.xiaohongshu.com/api/sns/web/unread_count"
15308
+ method: "GET",
15309
+ url: "https://edith.xiaohongshu.com/api/sns/web/unread_count",
15310
+ data: requestData,
15311
+ headers: xsHeader
15328
15312
  }, {
15329
15313
  retries: 3,
15330
15314
  retryDelay: 20,
@@ -15405,7 +15389,6 @@ var __webpack_exports__ = {};
15405
15389
  },
15406
15390
  _task.logger,
15407
15391
  params.proxyLoc,
15408
- params.localIP,
15409
15392
  params.accountId
15410
15393
  ];
15411
15394
  const http = new Http(...args);
@@ -15512,7 +15495,6 @@ var __webpack_exports__ = {};
15512
15495
  },
15513
15496
  _task.logger,
15514
15497
  params.proxyLoc,
15515
- params.localIP,
15516
15498
  params.accountId
15517
15499
  ];
15518
15500
  const http = new Http(...args);
@@ -15743,7 +15725,6 @@ var __webpack_exports__ = {};
15743
15725
  },
15744
15726
  _task.logger,
15745
15727
  params.proxyLoc,
15746
- params.localIP,
15747
15728
  params.accountId
15748
15729
  ];
15749
15730
  const http = new Http(...args);
@@ -16076,7 +16057,6 @@ var __webpack_exports__ = {};
16076
16057
  },
16077
16058
  _task.logger,
16078
16059
  params.proxyLoc,
16079
- params.localIP,
16080
16060
  params.accountId
16081
16061
  ];
16082
16062
  const http = new Http(...args);
@@ -16182,7 +16162,6 @@ var __webpack_exports__ = {};
16182
16162
  },
16183
16163
  _task.logger,
16184
16164
  params.proxyLoc,
16185
- params.localIP,
16186
16165
  params.accountId
16187
16166
  ];
16188
16167
  const http = new Http(...args);
@@ -16647,7 +16626,6 @@ var __webpack_exports__ = {};
16647
16626
  },
16648
16627
  _task.logger,
16649
16628
  params.proxyLoc,
16650
- params.localIP,
16651
16629
  params.accountId
16652
16630
  ];
16653
16631
  const http = new Http(...args);
@@ -16978,7 +16956,6 @@ var __webpack_exports__ = {};
16978
16956
  },
16979
16957
  _task.logger,
16980
16958
  params.proxyLoc,
16981
- params.localIP,
16982
16959
  params.accountId
16983
16960
  ];
16984
16961
  const http = new Http(...args);
@@ -17031,7 +17008,6 @@ var __webpack_exports__ = {};
17031
17008
  },
17032
17009
  _task.logger,
17033
17010
  params.proxyLoc,
17034
- params.localIP,
17035
17011
  params.accountId
17036
17012
  ];
17037
17013
  const http = new Http(...args);
@@ -17084,7 +17060,6 @@ var __webpack_exports__ = {};
17084
17060
  },
17085
17061
  _task.logger,
17086
17062
  params.proxyLoc,
17087
- params.localIP,
17088
17063
  params.accountId
17089
17064
  ];
17090
17065
  const http = new Http(...args);
@@ -17131,7 +17106,6 @@ var __webpack_exports__ = {};
17131
17106
  },
17132
17107
  _task.logger,
17133
17108
  params.proxyLoc,
17134
- params.localIP,
17135
17109
  params.accountId
17136
17110
  ];
17137
17111
  const http = new Http(...args);
@@ -17170,7 +17144,6 @@ var __webpack_exports__ = {};
17170
17144
  },
17171
17145
  _task.logger,
17172
17146
  params.proxyLoc,
17173
- params.localIP,
17174
17147
  params.accountId
17175
17148
  ];
17176
17149
  const http = new Http(...args);
@@ -17232,7 +17205,6 @@ var __webpack_exports__ = {};
17232
17205
  },
17233
17206
  _task.logger,
17234
17207
  params.proxyLoc,
17235
- params.localIP,
17236
17208
  params.accountId
17237
17209
  ];
17238
17210
  const http = new Http(...args);
@@ -17289,7 +17261,6 @@ var __webpack_exports__ = {};
17289
17261
  },
17290
17262
  _task.logger,
17291
17263
  params.proxyLoc,
17292
- params.localIP,
17293
17264
  params.accountId
17294
17265
  ];
17295
17266
  const http = new Http(...args);
@@ -17375,7 +17346,6 @@ var __webpack_exports__ = {};
17375
17346
  },
17376
17347
  _task.logger,
17377
17348
  params.proxyLoc,
17378
- params.localIP,
17379
17349
  params.accountId
17380
17350
  ];
17381
17351
  const http = new Http(...args);
@@ -17463,7 +17433,6 @@ var __webpack_exports__ = {};
17463
17433
  },
17464
17434
  _task.logger,
17465
17435
  params.proxyLoc,
17466
- params.localIP,
17467
17436
  params.accountId
17468
17437
  ];
17469
17438
  const http = new Http(...args);
@@ -17573,7 +17542,6 @@ var __webpack_exports__ = {};
17573
17542
  },
17574
17543
  _task.logger,
17575
17544
  params.proxyLoc,
17576
- params.localIP,
17577
17545
  params.accountId
17578
17546
  ];
17579
17547
  const http = new Http(...args);
@@ -17851,16 +17819,11 @@ var __webpack_exports__ = {};
17851
17819
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
17852
17820
  let executionState;
17853
17821
  let proxyUrl;
17854
- if (params.localIP) {
17855
- const args = [
17856
- params.localIP,
17857
- params.proxyLoc,
17858
- params.accountId
17859
- ];
17860
- task.logger?.info(`==> 开始获取代理信息:${args}`);
17822
+ if (params.proxyLoc) {
17823
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
17861
17824
  const ProxyAgentResult = await ProxyAgent({
17862
17825
  logger: task.logger
17863
- }, ...args);
17826
+ }, params.proxyLoc, params.accountId);
17864
17827
  task.logger?.info("==> 代理信息获取成功!");
17865
17828
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
17866
17829
  }
@@ -18687,7 +18650,6 @@ var __webpack_exports__ = {};
18687
18650
  enverionment: confParams.enverionment || "development",
18688
18651
  postId: confParams.articleId,
18689
18652
  eip: proxyHttp.proxyInfo,
18690
- proxyIp: confParams.proxyIp,
18691
18653
  accountId: confParams.accountId,
18692
18654
  uid: confParams.uid,
18693
18655
  publishParams: publishData,
@@ -18714,7 +18676,6 @@ var __webpack_exports__ = {};
18714
18676
  },
18715
18677
  task.logger,
18716
18678
  params.proxyLoc,
18717
- params.localIP,
18718
18679
  params.accountId,
18719
18680
  "shipinhao"
18720
18681
  ];
@@ -18785,7 +18746,6 @@ var __webpack_exports__ = {};
18785
18746
  articleId: params.articleId,
18786
18747
  postId: params.articleId,
18787
18748
  eip: proxyHttp.proxyInfo,
18788
- proxyIp: params.localIP,
18789
18749
  accountId: params.accountId,
18790
18750
  uid: params.uid
18791
18751
  }, {
@@ -19172,16 +19132,11 @@ var __webpack_exports__ = {};
19172
19132
  return (0, share_namespaceObject.downloadImage)(url, external_node_path_default().join(tmpCachePath, fileName));
19173
19133
  }));
19174
19134
  let proxyUrl;
19175
- if (params.localIP) {
19176
- const args = [
19177
- params.localIP,
19178
- params.proxyLoc,
19179
- params.accountId
19180
- ];
19181
- task.logger?.info(`==> 开始获取代理信息:${args}`);
19135
+ if (params.proxyLoc) {
19136
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
19182
19137
  const ProxyAgentResult = await ProxyAgent({
19183
19138
  logger: task.logger
19184
- }, ...args);
19139
+ }, params.proxyLoc, params.accountId);
19185
19140
  task.logger?.info("==> 代理信息获取成功!");
19186
19141
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
19187
19142
  }
@@ -19831,16 +19786,11 @@ var __webpack_exports__ = {};
19831
19786
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
19832
19787
  let executionState;
19833
19788
  let proxyUrl;
19834
- if (params.localIP) {
19835
- const args = [
19836
- params.localIP,
19837
- params.proxyLoc,
19838
- params.accountId
19839
- ];
19840
- task.logger?.info(`==> 开始获取代理信息:${args}`);
19789
+ if (params.proxyLoc) {
19790
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
19841
19791
  const ProxyAgentResult = await ProxyAgent({
19842
19792
  logger: task.logger
19843
- }, ...args);
19793
+ }, params.proxyLoc, params.accountId);
19844
19794
  task.logger?.info("==> 代理信息获取成功!");
19845
19795
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
19846
19796
  }
@@ -20091,7 +20041,6 @@ var __webpack_exports__ = {};
20091
20041
  },
20092
20042
  task.logger,
20093
20043
  params.proxyLoc,
20094
- params.localIP,
20095
20044
  params.accountId,
20096
20045
  "toutiao"
20097
20046
  ];
@@ -20289,7 +20238,6 @@ var __webpack_exports__ = {};
20289
20238
  enverionment: task.enverionment || "development",
20290
20239
  postId: params.articleId,
20291
20240
  eip: proxyHttp.proxyInfo,
20292
- proxyIp: params.localIP,
20293
20241
  accountId: params.accountId,
20294
20242
  uid: params.uid,
20295
20243
  platform: "toutiao",
@@ -20924,16 +20872,11 @@ var __webpack_exports__ = {};
20924
20872
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
20925
20873
  let executionState;
20926
20874
  let proxyUrl;
20927
- if (params.localIP) {
20928
- const args = [
20929
- params.localIP,
20930
- params.proxyLoc,
20931
- params.accountId
20932
- ];
20933
- task.logger?.info(`==> 开始获取代理信息:${args}`);
20875
+ if (params.proxyLoc) {
20876
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
20934
20877
  const ProxyAgentResult = await ProxyAgent({
20935
20878
  logger: task.logger
20936
- }, ...args);
20879
+ }, params.proxyLoc, params.accountId);
20937
20880
  task.logger?.info("==> 代理信息获取成功!");
20938
20881
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
20939
20882
  }
@@ -21425,7 +21368,6 @@ var __webpack_exports__ = {};
21425
21368
  },
21426
21369
  task.logger,
21427
21370
  params.proxyLoc,
21428
- params.localIP,
21429
21371
  params.accountId,
21430
21372
  "weixin"
21431
21373
  ];
@@ -22204,7 +22146,6 @@ var __webpack_exports__ = {};
22204
22146
  enverionment: task.enverionment || "development",
22205
22147
  postId: params.articleId,
22206
22148
  eip: proxyHttp.proxyInfo,
22207
- proxyIp: params.localIP,
22208
22149
  accountId: params.accountId,
22209
22150
  uid: params.uid,
22210
22151
  platform: "weixin",
@@ -23009,16 +22950,11 @@ var __webpack_exports__ = {};
23009
22950
  const reporter = task.reportService?.reportLoginStatus ?? (()=>Promise.resolve());
23010
22951
  let executionState;
23011
22952
  let proxyUrl;
23012
- if (params.localIP) {
23013
- const args = [
23014
- params.localIP,
23015
- params.proxyLoc,
23016
- params.accountId
23017
- ];
23018
- task.logger?.info(`==> 开始获取代理信息:${args}`);
22953
+ if (params.proxyLoc) {
22954
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
23019
22955
  const ProxyAgentResult = await ProxyAgent({
23020
22956
  logger: task.logger
23021
- }, ...args);
22957
+ }, params.proxyLoc, params.accountId);
23022
22958
  task.logger?.info("==> 代理信息获取成功!");
23023
22959
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
23024
22960
  }
@@ -23335,7 +23271,6 @@ var __webpack_exports__ = {};
23335
23271
  },
23336
23272
  task.logger,
23337
23273
  params.proxyLoc,
23338
- params.localIP,
23339
23274
  params.accountId,
23340
23275
  "xiaohongshu"
23341
23276
  ];
@@ -23376,8 +23311,8 @@ var __webpack_exports__ = {};
23376
23311
  params: fetchCoverParams
23377
23312
  }, {
23378
23313
  retries: 3,
23379
- retryDelay: 20,
23380
- timeout: 3000
23314
+ retryDelay: 500,
23315
+ timeout: 30000
23381
23316
  });
23382
23317
  for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
23383
23318
  bucket: item.bucket || "",
@@ -23396,8 +23331,8 @@ var __webpack_exports__ = {};
23396
23331
  params: fetchCoverParams
23397
23332
  }, {
23398
23333
  retries: 3,
23399
- retryDelay: 20,
23400
- timeout: 3000
23334
+ retryDelay: 500,
23335
+ timeout: 30000
23401
23336
  });
23402
23337
  for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
23403
23338
  bucket: item.bucket || "",
@@ -23458,7 +23393,9 @@ var __webpack_exports__ = {};
23458
23393
  headers: {
23459
23394
  "x-cos-security-token": ossToken
23460
23395
  },
23461
- defaultErrorMsg: "图片上传异常,请稍后重试发布。"
23396
+ defaultErrorMsg: "图片上传异常,请稍后重试。"
23397
+ }, {
23398
+ timeout: 60000
23462
23399
  });
23463
23400
  return {
23464
23401
  ossFileId,
@@ -23468,6 +23405,8 @@ var __webpack_exports__ = {};
23468
23405
  originSize
23469
23406
  };
23470
23407
  } catch (error) {
23408
+ const e = Http.handleApiError(error);
23409
+ 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)}`);
23471
23410
  attempt++;
23472
23411
  }
23473
23412
  }
@@ -23701,7 +23640,6 @@ var __webpack_exports__ = {};
23701
23640
  enverionment: task.enverionment || "development",
23702
23641
  postId: params.articleId,
23703
23642
  eip: proxyHttp.proxyInfo,
23704
- proxyIp: params.localIP,
23705
23643
  accountId: params.accountId,
23706
23644
  uid: params.uid,
23707
23645
  platform: "xiaohongshu",
@@ -23963,16 +23901,11 @@ var __webpack_exports__ = {};
23963
23901
  return (0, share_namespaceObject.downloadImage)(url, external_node_path_default().join(tmpCachePath, fileName));
23964
23902
  }));
23965
23903
  let proxyUrl;
23966
- if (params.localIP) {
23967
- const args = [
23968
- params.localIP,
23969
- params.proxyLoc,
23970
- params.accountId
23971
- ];
23972
- task.logger?.info(`==> 开始获取代理信息:${args}`);
23904
+ if (params.proxyLoc) {
23905
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
23973
23906
  const ProxyAgentResult = await ProxyAgent({
23974
23907
  logger: task.logger
23975
- }, ...args);
23908
+ }, params.proxyLoc, params.accountId);
23976
23909
  task.logger?.info("==> 代理信息获取成功!");
23977
23910
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
23978
23911
  }
@@ -24401,7 +24334,6 @@ var __webpack_exports__ = {};
24401
24334
  },
24402
24335
  task.logger,
24403
24336
  params.proxyLoc,
24404
- params.localIP,
24405
24337
  params.accountId,
24406
24338
  "xiaohongshu-rpa"
24407
24339
  ];
@@ -24447,8 +24379,8 @@ var __webpack_exports__ = {};
24447
24379
  params: fetchCoverParams
24448
24380
  }, {
24449
24381
  retries: 3,
24450
- retryDelay: 20,
24451
- timeout: 3000
24382
+ retryDelay: 500,
24383
+ timeout: 8000
24452
24384
  });
24453
24385
  for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
24454
24386
  bucket: item.bucket || "",
@@ -24467,8 +24399,8 @@ var __webpack_exports__ = {};
24467
24399
  params: fetchCoverParams
24468
24400
  }, {
24469
24401
  retries: 3,
24470
- retryDelay: 20,
24471
- timeout: 3000
24402
+ retryDelay: 500,
24403
+ timeout: 8000
24472
24404
  });
24473
24405
  for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
24474
24406
  bucket: item.bucket || "",
@@ -24513,6 +24445,8 @@ var __webpack_exports__ = {};
24513
24445
  "x-cos-security-token": ossToken
24514
24446
  },
24515
24447
  defaultErrorMsg: "图片上传异常,请稍后重试发布。"
24448
+ }, {
24449
+ timeout: 60000
24516
24450
  });
24517
24451
  return {
24518
24452
  ossFileId,
@@ -24822,7 +24756,6 @@ var __webpack_exports__ = {};
24822
24756
  },
24823
24757
  _task.logger,
24824
24758
  params.proxyLoc,
24825
- params.localIP,
24826
24759
  params.accountId
24827
24760
  ];
24828
24761
  const http = new Http(...args);
@@ -24908,7 +24841,6 @@ var __webpack_exports__ = {};
24908
24841
  },
24909
24842
  _task.logger,
24910
24843
  params.proxyLoc,
24911
- params.localIP,
24912
24844
  params.accountId
24913
24845
  ];
24914
24846
  const http = new Http(...args);
@@ -24947,7 +24879,6 @@ var __webpack_exports__ = {};
24947
24879
  },
24948
24880
  _task.logger,
24949
24881
  params.proxyLoc,
24950
- params.localIP,
24951
24882
  params.accountId
24952
24883
  ];
24953
24884
  const http = new Http(...args);
@@ -25000,7 +24931,6 @@ var __webpack_exports__ = {};
25000
24931
  },
25001
24932
  _task.logger,
25002
24933
  params.proxyLoc,
25003
- params.localIP,
25004
24934
  params.accountId
25005
24935
  ];
25006
24936
  const http = new Http(...args);
@@ -25057,7 +24987,6 @@ var __webpack_exports__ = {};
25057
24987
  },
25058
24988
  _task.logger,
25059
24989
  params.proxyLoc,
25060
- params.localIP,
25061
24990
  params.accountId
25062
24991
  ];
25063
24992
  const http = new Http(...args);
@@ -25130,7 +25059,6 @@ var __webpack_exports__ = {};
25130
25059
  },
25131
25060
  _task.logger,
25132
25061
  params.proxyLoc,
25133
- params.localIP,
25134
25062
  params.accountId
25135
25063
  ];
25136
25064
  const http = new Http(...args);
@@ -25234,7 +25162,6 @@ var __webpack_exports__ = {};
25234
25162
  },
25235
25163
  _task.logger,
25236
25164
  params.proxyLoc,
25237
- params.localIP,
25238
25165
  params.accountId
25239
25166
  ];
25240
25167
  const http = new Http(...args);
@@ -25673,4 +25600,5 @@ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_targe
25673
25600
  value: true
25674
25601
  });
25675
25602
 
25676
- //# sourceMappingURL=index.js.map
25603
+ //# sourceMappingURL=index.js.map
25604
+ //# debugId=5f09a939-272d-5019-8b8d-7fde9f1a0f9f