@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/bundle.js CHANGED
@@ -1,4 +1,6 @@
1
1
  /*! For license information please see bundle.js.LICENSE.txt */
2
+
3
+ !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]="e1a74875-fb1a-57f5-b655-1374d18c5370")}catch(e){}}();
2
4
  var __webpack_modules__ = {
3
5
  "../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/helpers.js": function(__unused_webpack_module, exports1, __webpack_require__) {
4
6
  "use strict";
@@ -12490,9 +12492,7 @@ var __webpack_exports__ = {};
12490
12492
  var package_namespaceObject = {
12491
12493
  i8: "0.1.2"
12492
12494
  };
12493
- var package_namespaceObject_0 = {
12494
- i8: "4.0.6"
12495
- };
12495
+ var package_namespaceObject_0 = JSON.parse('{"i8":"4.0.8-beta.0"}');
12496
12496
  const external_node_fs_namespaceObject = require("node:fs");
12497
12497
  var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
12498
12498
  const external_node_http_namespaceObject = require("node:http");
@@ -27126,15 +27126,14 @@ var __webpack_exports__ = {};
27126
27126
  }
27127
27127
  return `socks5h://${ip}:${port}`;
27128
27128
  }
27129
- async function ProxyAgent(task, ip, adr, accountId, refresh) {
27129
+ async function ProxyAgent(task, addr, accountId, refresh) {
27130
27130
  const http = new Http({
27131
27131
  headers: {
27132
27132
  "content-type": "application/json"
27133
27133
  }
27134
27134
  });
27135
27135
  const params = {
27136
- ip: ip,
27137
- addr: adr || null,
27136
+ addr: addr || null,
27138
27137
  accountId: accountId
27139
27138
  };
27140
27139
  const ProxyInfo = await http.api({
@@ -27156,7 +27155,7 @@ var __webpack_exports__ = {};
27156
27155
  data: ProxyInfo.data
27157
27156
  }
27158
27157
  };
27159
- task.logger?.info(`请求代理:区域:${params.addr}, IP:${params.ip}, AccountId:${params.accountId}, 返回代理信息: ${ProxyInfo.data ? `${ProxyInfo.data.proxyIp}:${ProxyInfo.data.proxyPort}` : "无可用代理"}`, loggerInfo);
27158
+ task.logger?.info(`请求代理:区域:${params.addr}, AccountId:${params.accountId}, 返回代理信息: ${ProxyInfo.data ? `${ProxyInfo.data.proxyIp}:${ProxyInfo.data.proxyPort}` : "无可用代理"}`, loggerInfo);
27160
27159
  const proxyAgent = "000000" === ProxyInfo.code && ProxyInfo.data ? {
27161
27160
  ip: ProxyInfo.data.proxyIp,
27162
27161
  port: ProxyInfo.data.proxyPort,
@@ -27173,16 +27172,16 @@ var __webpack_exports__ = {};
27173
27172
  data: error
27174
27173
  };
27175
27174
  }
27176
- constructor(config, logger, adr, ip, accountId, platform){
27175
+ constructor(config, logger, addr, accountId, platform){
27177
27176
  this.agentPromise = void 0;
27178
27177
  this.apiClient = lib_axios.create({
27179
27178
  ...config
27180
27179
  });
27181
27180
  this.logger = logger;
27182
27181
  this.platform = platform;
27183
- if (ip) this.agentPromise = ProxyAgent({
27182
+ if (addr) this.agentPromise = ProxyAgent({
27184
27183
  logger
27185
- }, ip, adr, accountId);
27184
+ }, addr, accountId);
27186
27185
  this.addResponseInterceptor(()=>void 0);
27187
27186
  }
27188
27187
  clearResponseInterceptors() {
@@ -32310,16 +32309,11 @@ var __webpack_exports__ = {};
32310
32309
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
32311
32310
  let executionState;
32312
32311
  let proxyUrl;
32313
- if (params.localIP) {
32314
- const args = [
32315
- params.localIP,
32316
- params.proxyLoc,
32317
- params.accountId
32318
- ];
32319
- task.logger?.info(`==> 开始获取代理信息:${args}`);
32312
+ if (params.proxyLoc) {
32313
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
32320
32314
  const ProxyAgentResult = await ProxyAgent({
32321
32315
  logger: task.logger
32322
- }, ...args);
32316
+ }, params.proxyLoc, params.accountId);
32323
32317
  task.logger?.info("==> 代理信息获取成功!");
32324
32318
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
32325
32319
  }
@@ -32662,7 +32656,6 @@ var __webpack_exports__ = {};
32662
32656
  },
32663
32657
  task.logger,
32664
32658
  params.proxyLoc,
32665
- params.localIP,
32666
32659
  params.accountId,
32667
32660
  "baijiahao"
32668
32661
  ];
@@ -32868,7 +32861,6 @@ var __webpack_exports__ = {};
32868
32861
  enverionment: task.enverionment || "development",
32869
32862
  postId: params.articleId,
32870
32863
  eip: proxyHttp.proxyInfo,
32871
- proxyIp: params.localIP,
32872
32864
  accountId: params.accountId,
32873
32865
  uid: params.uid,
32874
32866
  platform: "baijiahao",
@@ -33387,7 +33379,6 @@ var __webpack_exports__ = {};
33387
33379
  },
33388
33380
  _task.logger,
33389
33381
  params.proxyLoc,
33390
- params.localIP,
33391
33382
  params.accountId
33392
33383
  ];
33393
33384
  const http = new Http(...args);
@@ -34517,7 +34508,7 @@ var __webpack_exports__ = {};
34517
34508
  heapTotal: `${Math.round(process.memoryUsage().heapTotal / 1024 / 1024)} MB`
34518
34509
  },
34519
34510
  accountId: params.accountId,
34520
- hasProxy: !!(params.proxyLoc || params.localIP)
34511
+ hasProxy: !!params.proxyLoc
34521
34512
  });
34522
34513
  }
34523
34514
  const check = {
@@ -34540,7 +34531,6 @@ var __webpack_exports__ = {};
34540
34531
  },
34541
34532
  _task.logger,
34542
34533
  params.proxyLoc,
34543
- params.localIP,
34544
34534
  params.accountId
34545
34535
  ];
34546
34536
  const http = new Http(...args);
@@ -34571,7 +34561,7 @@ var __webpack_exports__ = {};
34571
34561
  heapUsed: `${Math.round(process.memoryUsage().heapUsed / 1024 / 1024)} MB`,
34572
34562
  heapTotal: `${Math.round(process.memoryUsage().heapTotal / 1024 / 1024)} MB`
34573
34563
  },
34574
- hasProxy: !!(params.proxyLoc || params.localIP),
34564
+ hasProxy: !!params.proxyLoc,
34575
34565
  timeSinceLastLog: Date.now() - lastEnvLogTime
34576
34566
  }
34577
34567
  });
@@ -34612,9 +34602,14 @@ var __webpack_exports__ = {};
34612
34602
  });
34613
34603
  return e.data;
34614
34604
  });
34605
+ const webSessionPath = "/api/sns/web/unread_count";
34606
+ const webSessionData = {};
34607
+ const webSessionXsHeader = sessionCheck_xsEncrypt.signHeadersPost(webSessionPath, recordCookie, "xhs-pc-web", webSessionData);
34615
34608
  const _web_session = http.api({
34616
- method: "get",
34617
- url: "https://edith.xiaohongshu.com/api/sns/web/unread_count"
34609
+ method: "GET",
34610
+ url: "https://edith.xiaohongshu.com/api/sns/web/unread_count",
34611
+ data: webSessionData,
34612
+ headers: webSessionXsHeader
34618
34613
  }, {
34619
34614
  retries: 3,
34620
34615
  retryDelay: 20,
@@ -34969,7 +34964,6 @@ var __webpack_exports__ = {};
34969
34964
  },
34970
34965
  _task.logger,
34971
34966
  params.proxyLoc,
34972
- params.localIP,
34973
34967
  params.accountId
34974
34968
  ];
34975
34969
  const http = new Http(...args);
@@ -35056,7 +35050,6 @@ var __webpack_exports__ = {};
35056
35050
  },
35057
35051
  _task.logger,
35058
35052
  params.proxyLoc,
35059
- params.localIP,
35060
35053
  params.accountId
35061
35054
  ];
35062
35055
  const http = new Http(...args);
@@ -35147,7 +35140,6 @@ var __webpack_exports__ = {};
35147
35140
  },
35148
35141
  _task.logger,
35149
35142
  params.proxyLoc,
35150
- params.localIP,
35151
35143
  params.accountId
35152
35144
  ];
35153
35145
  const http = new Http(...args);
@@ -35233,7 +35225,6 @@ var __webpack_exports__ = {};
35233
35225
  },
35234
35226
  _task.logger,
35235
35227
  params.proxyLoc,
35236
- params.localIP,
35237
35228
  params.accountId
35238
35229
  ];
35239
35230
  const http = new Http(...args);
@@ -35317,7 +35308,6 @@ var __webpack_exports__ = {};
35317
35308
  },
35318
35309
  _task.logger,
35319
35310
  params.proxyLoc,
35320
- params.localIP,
35321
35311
  params.accountId
35322
35312
  ];
35323
35313
  const http = new Http(...args);
@@ -35413,7 +35403,6 @@ var __webpack_exports__ = {};
35413
35403
  },
35414
35404
  _task.logger,
35415
35405
  params.proxyLoc,
35416
- params.localIP,
35417
35406
  params.accountId
35418
35407
  ];
35419
35408
  const http = new Http(...args);
@@ -36064,7 +36053,6 @@ var __webpack_exports__ = {};
36064
36053
  },
36065
36054
  _task.logger,
36066
36055
  params.proxyLoc,
36067
- params.localIP,
36068
36056
  params.accountId
36069
36057
  ];
36070
36058
  const http = new Http(...args);
@@ -36210,7 +36198,6 @@ var __webpack_exports__ = {};
36210
36198
  },
36211
36199
  _task.logger,
36212
36200
  params.proxyLoc,
36213
- params.localIP,
36214
36201
  params.accountId
36215
36202
  ];
36216
36203
  const http = new Http(...args);
@@ -36298,7 +36285,6 @@ var __webpack_exports__ = {};
36298
36285
  },
36299
36286
  _task.logger,
36300
36287
  params.proxyLoc,
36301
- params.localIP,
36302
36288
  params.accountId
36303
36289
  ];
36304
36290
  const http = new Http(...args);
@@ -36386,7 +36372,6 @@ var __webpack_exports__ = {};
36386
36372
  },
36387
36373
  _task.logger,
36388
36374
  params.proxyLoc,
36389
- params.localIP,
36390
36375
  params.accountId
36391
36376
  ];
36392
36377
  const http = new Http(...args);
@@ -36607,7 +36592,6 @@ var __webpack_exports__ = {};
36607
36592
  },
36608
36593
  _task.logger,
36609
36594
  params.proxyLoc,
36610
- params.localIP,
36611
36595
  params.accountId
36612
36596
  ];
36613
36597
  const http = new Http(...args);
@@ -36969,16 +36953,11 @@ var __webpack_exports__ = {};
36969
36953
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
36970
36954
  let executionState;
36971
36955
  let proxyUrl;
36972
- if (params.localIP) {
36973
- const args = [
36974
- params.localIP,
36975
- params.proxyLoc,
36976
- params.accountId
36977
- ];
36978
- task.logger?.info(`==> 开始获取代理信息:${args}`);
36956
+ if (params.proxyLoc) {
36957
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
36979
36958
  const ProxyAgentResult = await ProxyAgent({
36980
36959
  logger: task.logger
36981
- }, ...args);
36960
+ }, params.proxyLoc, params.accountId);
36982
36961
  task.logger?.info("==> 代理信息获取成功!");
36983
36962
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
36984
36963
  }
@@ -38526,7 +38505,7 @@ var __webpack_exports__ = {};
38526
38505
  }
38527
38506
  const mock_mockAction = async (task, params)=>{
38528
38507
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
38529
- 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 utils_response(414, "extraParam 参数缺失或不完整", "");
38508
+ 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 utils_response(414, "extraParam 参数缺失或不完整", "");
38530
38509
  let currentStep = "初始化";
38531
38510
  try {
38532
38511
  currentStep = "验证账号信息";
@@ -38612,8 +38591,7 @@ var __webpack_exports__ = {};
38612
38591
  headers
38613
38592
  },
38614
38593
  task.logger,
38615
- "",
38616
- "",
38594
+ params.proxyLoc,
38617
38595
  params.accountId,
38618
38596
  "douyin"
38619
38597
  ];
@@ -38886,7 +38864,6 @@ var __webpack_exports__ = {};
38886
38864
  enverionment: task.enverionment || "development",
38887
38865
  postId: params.articleId,
38888
38866
  eip: proxyHttp.proxyInfo,
38889
- proxyIp: params.localIP,
38890
38867
  accountId: params.accountId,
38891
38868
  uid: params.uid,
38892
38869
  platform: "douyin",
@@ -39249,18 +39226,13 @@ var __webpack_exports__ = {};
39249
39226
  return downloadImage(url, external_node_path_default().join(tmpCachePath, fileName));
39250
39227
  }));
39251
39228
  let proxyUrl;
39252
- if (params.localIP) {
39253
- const args = [
39254
- params.localIP,
39255
- params.proxyLoc,
39256
- params.accountId
39257
- ];
39258
- task.logger?.info(`==> 开始获取代理信息:${args}`);
39259
- const proxyAgentResult = await ProxyAgent({
39229
+ if (params.proxyLoc) {
39230
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
39231
+ const ProxyAgentResult = await ProxyAgent({
39260
39232
  logger: task.logger
39261
- }, ...args);
39233
+ }, params.proxyLoc, params.accountId);
39262
39234
  task.logger?.info("==> 代理信息获取成功!");
39263
- proxyUrl = proxyAgentResult ? `http://${proxyAgentResult.ip}:${proxyAgentResult.port}` : void 0;
39235
+ proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
39264
39236
  }
39265
39237
  const commonCookies = {
39266
39238
  path: "/",
@@ -40217,7 +40189,6 @@ var __webpack_exports__ = {};
40217
40189
  },
40218
40190
  _task.logger,
40219
40191
  params.proxyLoc,
40220
- params.localIP,
40221
40192
  params.accountId
40222
40193
  ];
40223
40194
  const http = new Http(...args);
@@ -40275,7 +40246,6 @@ var __webpack_exports__ = {};
40275
40246
  },
40276
40247
  _task.logger,
40277
40248
  params.proxyLoc,
40278
- params.localIP,
40279
40249
  params.accountId
40280
40250
  ];
40281
40251
  const http = new Http(...args);
@@ -40322,7 +40292,6 @@ var __webpack_exports__ = {};
40322
40292
  },
40323
40293
  _task.logger,
40324
40294
  params.proxyLoc,
40325
- params.localIP,
40326
40295
  params.accountId
40327
40296
  ];
40328
40297
  const http = new Http(...args);
@@ -40359,6 +40328,7 @@ var __webpack_exports__ = {};
40359
40328
  const data = isSuccess ? res.data.activity_list : [];
40360
40329
  return utils_response(isSuccess ? 0 : 414, message, data);
40361
40330
  };
40331
+ const getXhsWebUnreadCount_xsEncrypt = new Xhshow();
40362
40332
  const UnreadCountSchema = classic_schemas_object({
40363
40333
  connections: classic_schemas_number().nullable(),
40364
40334
  mentions: classic_schemas_number().nullable(),
@@ -40383,7 +40353,6 @@ var __webpack_exports__ = {};
40383
40353
  },
40384
40354
  _task.logger,
40385
40355
  params.proxyLoc,
40386
- params.localIP,
40387
40356
  params.accountId
40388
40357
  ];
40389
40358
  const http = new Http(...args);
@@ -40393,9 +40362,24 @@ var __webpack_exports__ = {};
40393
40362
  unread_count: null,
40394
40363
  likes: null
40395
40364
  };
40365
+ const a1Cookie = params.cookies.find((it)=>"a1" === it.name)?.value;
40366
+ if (!a1Cookie) return {
40367
+ code: 414,
40368
+ message: "账号数据异常,请重新绑定账号后重试。",
40369
+ data: unreadCount
40370
+ };
40371
+ const apiPath = "/api/sns/web/unread_count";
40372
+ const recordCookie = params.cookies.reduce((acc, cookie)=>{
40373
+ if (cookie.name && cookie.value) acc[cookie.name] = cookie.value;
40374
+ return acc;
40375
+ }, {});
40376
+ const requestData = {};
40377
+ const xsHeader = getXhsWebUnreadCount_xsEncrypt.signHeadersPost(apiPath, recordCookie, "xhs-pc-web", requestData);
40396
40378
  const res = await http.api({
40397
- method: "get",
40398
- url: "https://edith.xiaohongshu.com/api/sns/web/unread_count"
40379
+ method: "GET",
40380
+ url: "https://edith.xiaohongshu.com/api/sns/web/unread_count",
40381
+ data: requestData,
40382
+ headers: xsHeader
40399
40383
  }, {
40400
40384
  retries: 3,
40401
40385
  retryDelay: 20,
@@ -40476,7 +40460,6 @@ var __webpack_exports__ = {};
40476
40460
  },
40477
40461
  _task.logger,
40478
40462
  params.proxyLoc,
40479
- params.localIP,
40480
40463
  params.accountId
40481
40464
  ];
40482
40465
  const http = new Http(...args);
@@ -40583,7 +40566,6 @@ var __webpack_exports__ = {};
40583
40566
  },
40584
40567
  _task.logger,
40585
40568
  params.proxyLoc,
40586
- params.localIP,
40587
40569
  params.accountId
40588
40570
  ];
40589
40571
  const http = new Http(...args);
@@ -40814,7 +40796,6 @@ var __webpack_exports__ = {};
40814
40796
  },
40815
40797
  _task.logger,
40816
40798
  params.proxyLoc,
40817
- params.localIP,
40818
40799
  params.accountId
40819
40800
  ];
40820
40801
  const http = new Http(...args);
@@ -41147,7 +41128,6 @@ var __webpack_exports__ = {};
41147
41128
  },
41148
41129
  _task.logger,
41149
41130
  params.proxyLoc,
41150
- params.localIP,
41151
41131
  params.accountId
41152
41132
  ];
41153
41133
  const http = new Http(...args);
@@ -41253,7 +41233,6 @@ var __webpack_exports__ = {};
41253
41233
  },
41254
41234
  _task.logger,
41255
41235
  params.proxyLoc,
41256
- params.localIP,
41257
41236
  params.accountId
41258
41237
  ];
41259
41238
  const http = new Http(...args);
@@ -41718,7 +41697,6 @@ var __webpack_exports__ = {};
41718
41697
  },
41719
41698
  _task.logger,
41720
41699
  params.proxyLoc,
41721
- params.localIP,
41722
41700
  params.accountId
41723
41701
  ];
41724
41702
  const http = new Http(...args);
@@ -42049,7 +42027,6 @@ var __webpack_exports__ = {};
42049
42027
  },
42050
42028
  _task.logger,
42051
42029
  params.proxyLoc,
42052
- params.localIP,
42053
42030
  params.accountId
42054
42031
  ];
42055
42032
  const http = new Http(...args);
@@ -42102,7 +42079,6 @@ var __webpack_exports__ = {};
42102
42079
  },
42103
42080
  _task.logger,
42104
42081
  params.proxyLoc,
42105
- params.localIP,
42106
42082
  params.accountId
42107
42083
  ];
42108
42084
  const http = new Http(...args);
@@ -42155,7 +42131,6 @@ var __webpack_exports__ = {};
42155
42131
  },
42156
42132
  _task.logger,
42157
42133
  params.proxyLoc,
42158
- params.localIP,
42159
42134
  params.accountId
42160
42135
  ];
42161
42136
  const http = new Http(...args);
@@ -42202,7 +42177,6 @@ var __webpack_exports__ = {};
42202
42177
  },
42203
42178
  _task.logger,
42204
42179
  params.proxyLoc,
42205
- params.localIP,
42206
42180
  params.accountId
42207
42181
  ];
42208
42182
  const http = new Http(...args);
@@ -42241,7 +42215,6 @@ var __webpack_exports__ = {};
42241
42215
  },
42242
42216
  _task.logger,
42243
42217
  params.proxyLoc,
42244
- params.localIP,
42245
42218
  params.accountId
42246
42219
  ];
42247
42220
  const http = new Http(...args);
@@ -42303,7 +42276,6 @@ var __webpack_exports__ = {};
42303
42276
  },
42304
42277
  _task.logger,
42305
42278
  params.proxyLoc,
42306
- params.localIP,
42307
42279
  params.accountId
42308
42280
  ];
42309
42281
  const http = new Http(...args);
@@ -42360,7 +42332,6 @@ var __webpack_exports__ = {};
42360
42332
  },
42361
42333
  _task.logger,
42362
42334
  params.proxyLoc,
42363
- params.localIP,
42364
42335
  params.accountId
42365
42336
  ];
42366
42337
  const http = new Http(...args);
@@ -42446,7 +42417,6 @@ var __webpack_exports__ = {};
42446
42417
  },
42447
42418
  _task.logger,
42448
42419
  params.proxyLoc,
42449
- params.localIP,
42450
42420
  params.accountId
42451
42421
  ];
42452
42422
  const http = new Http(...args);
@@ -42534,7 +42504,6 @@ var __webpack_exports__ = {};
42534
42504
  },
42535
42505
  _task.logger,
42536
42506
  params.proxyLoc,
42537
- params.localIP,
42538
42507
  params.accountId
42539
42508
  ];
42540
42509
  const http = new Http(...args);
@@ -42644,7 +42613,6 @@ var __webpack_exports__ = {};
42644
42613
  },
42645
42614
  _task.logger,
42646
42615
  params.proxyLoc,
42647
- params.localIP,
42648
42616
  params.accountId
42649
42617
  ];
42650
42618
  const http = new Http(...args);
@@ -42922,16 +42890,11 @@ var __webpack_exports__ = {};
42922
42890
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
42923
42891
  let executionState;
42924
42892
  let proxyUrl;
42925
- if (params.localIP) {
42926
- const args = [
42927
- params.localIP,
42928
- params.proxyLoc,
42929
- params.accountId
42930
- ];
42931
- task.logger?.info(`==> 开始获取代理信息:${args}`);
42893
+ if (params.proxyLoc) {
42894
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
42932
42895
  const ProxyAgentResult = await ProxyAgent({
42933
42896
  logger: task.logger
42934
- }, ...args);
42897
+ }, params.proxyLoc, params.accountId);
42935
42898
  task.logger?.info("==> 代理信息获取成功!");
42936
42899
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
42937
42900
  }
@@ -43758,7 +43721,6 @@ var __webpack_exports__ = {};
43758
43721
  enverionment: confParams.enverionment || "development",
43759
43722
  postId: confParams.articleId,
43760
43723
  eip: proxyHttp.proxyInfo,
43761
- proxyIp: confParams.proxyIp,
43762
43724
  accountId: confParams.accountId,
43763
43725
  uid: confParams.uid,
43764
43726
  publishParams: publishData,
@@ -43785,7 +43747,6 @@ var __webpack_exports__ = {};
43785
43747
  },
43786
43748
  task.logger,
43787
43749
  params.proxyLoc,
43788
- params.localIP,
43789
43750
  params.accountId,
43790
43751
  "shipinhao"
43791
43752
  ];
@@ -43856,7 +43817,6 @@ var __webpack_exports__ = {};
43856
43817
  articleId: params.articleId,
43857
43818
  postId: params.articleId,
43858
43819
  eip: proxyHttp.proxyInfo,
43859
- proxyIp: params.localIP,
43860
43820
  accountId: params.accountId,
43861
43821
  uid: params.uid
43862
43822
  }, {
@@ -44243,16 +44203,11 @@ var __webpack_exports__ = {};
44243
44203
  return downloadImage(url, external_node_path_default().join(tmpCachePath, fileName));
44244
44204
  }));
44245
44205
  let proxyUrl;
44246
- if (params.localIP) {
44247
- const args = [
44248
- params.localIP,
44249
- params.proxyLoc,
44250
- params.accountId
44251
- ];
44252
- task.logger?.info(`==> 开始获取代理信息:${args}`);
44206
+ if (params.proxyLoc) {
44207
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
44253
44208
  const ProxyAgentResult = await ProxyAgent({
44254
44209
  logger: task.logger
44255
- }, ...args);
44210
+ }, params.proxyLoc, params.accountId);
44256
44211
  task.logger?.info("==> 代理信息获取成功!");
44257
44212
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
44258
44213
  }
@@ -44902,16 +44857,11 @@ var __webpack_exports__ = {};
44902
44857
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
44903
44858
  let executionState;
44904
44859
  let proxyUrl;
44905
- if (params.localIP) {
44906
- const args = [
44907
- params.localIP,
44908
- params.proxyLoc,
44909
- params.accountId
44910
- ];
44911
- task.logger?.info(`==> 开始获取代理信息:${args}`);
44860
+ if (params.proxyLoc) {
44861
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
44912
44862
  const ProxyAgentResult = await ProxyAgent({
44913
44863
  logger: task.logger
44914
- }, ...args);
44864
+ }, params.proxyLoc, params.accountId);
44915
44865
  task.logger?.info("==> 代理信息获取成功!");
44916
44866
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
44917
44867
  }
@@ -45162,7 +45112,6 @@ var __webpack_exports__ = {};
45162
45112
  },
45163
45113
  task.logger,
45164
45114
  params.proxyLoc,
45165
- params.localIP,
45166
45115
  params.accountId,
45167
45116
  "toutiao"
45168
45117
  ];
@@ -45360,7 +45309,6 @@ var __webpack_exports__ = {};
45360
45309
  enverionment: task.enverionment || "development",
45361
45310
  postId: params.articleId,
45362
45311
  eip: proxyHttp.proxyInfo,
45363
- proxyIp: params.localIP,
45364
45312
  accountId: params.accountId,
45365
45313
  uid: params.uid,
45366
45314
  platform: "toutiao",
@@ -45995,16 +45943,11 @@ var __webpack_exports__ = {};
45995
45943
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
45996
45944
  let executionState;
45997
45945
  let proxyUrl;
45998
- if (params.localIP) {
45999
- const args = [
46000
- params.localIP,
46001
- params.proxyLoc,
46002
- params.accountId
46003
- ];
46004
- task.logger?.info(`==> 开始获取代理信息:${args}`);
45946
+ if (params.proxyLoc) {
45947
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
46005
45948
  const ProxyAgentResult = await ProxyAgent({
46006
45949
  logger: task.logger
46007
- }, ...args);
45950
+ }, params.proxyLoc, params.accountId);
46008
45951
  task.logger?.info("==> 代理信息获取成功!");
46009
45952
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
46010
45953
  }
@@ -46496,7 +46439,6 @@ var __webpack_exports__ = {};
46496
46439
  },
46497
46440
  task.logger,
46498
46441
  params.proxyLoc,
46499
- params.localIP,
46500
46442
  params.accountId,
46501
46443
  "weixin"
46502
46444
  ];
@@ -47275,7 +47217,6 @@ var __webpack_exports__ = {};
47275
47217
  enverionment: task.enverionment || "development",
47276
47218
  postId: params.articleId,
47277
47219
  eip: proxyHttp.proxyInfo,
47278
- proxyIp: params.localIP,
47279
47220
  accountId: params.accountId,
47280
47221
  uid: params.uid,
47281
47222
  platform: "weixin",
@@ -48080,16 +48021,11 @@ var __webpack_exports__ = {};
48080
48021
  const reporter = task.reportService?.reportLoginStatus ?? (()=>Promise.resolve());
48081
48022
  let executionState;
48082
48023
  let proxyUrl;
48083
- if (params.localIP) {
48084
- const args = [
48085
- params.localIP,
48086
- params.proxyLoc,
48087
- params.accountId
48088
- ];
48089
- task.logger?.info(`==> 开始获取代理信息:${args}`);
48024
+ if (params.proxyLoc) {
48025
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
48090
48026
  const ProxyAgentResult = await ProxyAgent({
48091
48027
  logger: task.logger
48092
- }, ...args);
48028
+ }, params.proxyLoc, params.accountId);
48093
48029
  task.logger?.info("==> 代理信息获取成功!");
48094
48030
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
48095
48031
  }
@@ -48406,7 +48342,6 @@ var __webpack_exports__ = {};
48406
48342
  },
48407
48343
  task.logger,
48408
48344
  params.proxyLoc,
48409
- params.localIP,
48410
48345
  params.accountId,
48411
48346
  "xiaohongshu"
48412
48347
  ];
@@ -48447,8 +48382,8 @@ var __webpack_exports__ = {};
48447
48382
  params: fetchCoverParams
48448
48383
  }, {
48449
48384
  retries: 3,
48450
- retryDelay: 20,
48451
- timeout: 3000
48385
+ retryDelay: 500,
48386
+ timeout: 30000
48452
48387
  });
48453
48388
  for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
48454
48389
  bucket: item.bucket || "",
@@ -48467,8 +48402,8 @@ var __webpack_exports__ = {};
48467
48402
  params: fetchCoverParams
48468
48403
  }, {
48469
48404
  retries: 3,
48470
- retryDelay: 20,
48471
- timeout: 3000
48405
+ retryDelay: 500,
48406
+ timeout: 30000
48472
48407
  });
48473
48408
  for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
48474
48409
  bucket: item.bucket || "",
@@ -48529,7 +48464,9 @@ var __webpack_exports__ = {};
48529
48464
  headers: {
48530
48465
  "x-cos-security-token": ossToken
48531
48466
  },
48532
- defaultErrorMsg: "图片上传异常,请稍后重试发布。"
48467
+ defaultErrorMsg: "图片上传异常,请稍后重试。"
48468
+ }, {
48469
+ timeout: 60000
48533
48470
  });
48534
48471
  return {
48535
48472
  ossFileId,
@@ -48539,6 +48476,8 @@ var __webpack_exports__ = {};
48539
48476
  originSize
48540
48477
  };
48541
48478
  } catch (error) {
48479
+ const e = Http.handleApiError(error);
48480
+ 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)}`);
48542
48481
  attempt++;
48543
48482
  }
48544
48483
  }
@@ -48772,7 +48711,6 @@ var __webpack_exports__ = {};
48772
48711
  enverionment: task.enverionment || "development",
48773
48712
  postId: params.articleId,
48774
48713
  eip: proxyHttp.proxyInfo,
48775
- proxyIp: params.localIP,
48776
48714
  accountId: params.accountId,
48777
48715
  uid: params.uid,
48778
48716
  platform: "xiaohongshu",
@@ -49034,16 +48972,11 @@ var __webpack_exports__ = {};
49034
48972
  return downloadImage(url, external_node_path_default().join(tmpCachePath, fileName));
49035
48973
  }));
49036
48974
  let proxyUrl;
49037
- if (params.localIP) {
49038
- const args = [
49039
- params.localIP,
49040
- params.proxyLoc,
49041
- params.accountId
49042
- ];
49043
- task.logger?.info(`==> 开始获取代理信息:${args}`);
48975
+ if (params.proxyLoc) {
48976
+ task.logger?.info(`==> 开始获取代理信息:${params}`);
49044
48977
  const ProxyAgentResult = await ProxyAgent({
49045
48978
  logger: task.logger
49046
- }, ...args);
48979
+ }, params.proxyLoc, params.accountId);
49047
48980
  task.logger?.info("==> 代理信息获取成功!");
49048
48981
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
49049
48982
  }
@@ -49472,7 +49405,6 @@ var __webpack_exports__ = {};
49472
49405
  },
49473
49406
  task.logger,
49474
49407
  params.proxyLoc,
49475
- params.localIP,
49476
49408
  params.accountId,
49477
49409
  "xiaohongshu-rpa"
49478
49410
  ];
@@ -49518,8 +49450,8 @@ var __webpack_exports__ = {};
49518
49450
  params: fetchCoverParams
49519
49451
  }, {
49520
49452
  retries: 3,
49521
- retryDelay: 20,
49522
- timeout: 3000
49453
+ retryDelay: 500,
49454
+ timeout: 8000
49523
49455
  });
49524
49456
  for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
49525
49457
  bucket: item.bucket || "",
@@ -49538,8 +49470,8 @@ var __webpack_exports__ = {};
49538
49470
  params: fetchCoverParams
49539
49471
  }, {
49540
49472
  retries: 3,
49541
- retryDelay: 20,
49542
- timeout: 3000
49473
+ retryDelay: 500,
49474
+ timeout: 8000
49543
49475
  });
49544
49476
  for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
49545
49477
  bucket: item.bucket || "",
@@ -49584,6 +49516,8 @@ var __webpack_exports__ = {};
49584
49516
  "x-cos-security-token": ossToken
49585
49517
  },
49586
49518
  defaultErrorMsg: "图片上传异常,请稍后重试发布。"
49519
+ }, {
49520
+ timeout: 60000
49587
49521
  });
49588
49522
  return {
49589
49523
  ossFileId,
@@ -49893,7 +49827,6 @@ var __webpack_exports__ = {};
49893
49827
  },
49894
49828
  _task.logger,
49895
49829
  params.proxyLoc,
49896
- params.localIP,
49897
49830
  params.accountId
49898
49831
  ];
49899
49832
  const http = new Http(...args);
@@ -49979,7 +49912,6 @@ var __webpack_exports__ = {};
49979
49912
  },
49980
49913
  _task.logger,
49981
49914
  params.proxyLoc,
49982
- params.localIP,
49983
49915
  params.accountId
49984
49916
  ];
49985
49917
  const http = new Http(...args);
@@ -50018,7 +49950,6 @@ var __webpack_exports__ = {};
50018
49950
  },
50019
49951
  _task.logger,
50020
49952
  params.proxyLoc,
50021
- params.localIP,
50022
49953
  params.accountId
50023
49954
  ];
50024
49955
  const http = new Http(...args);
@@ -50071,7 +50002,6 @@ var __webpack_exports__ = {};
50071
50002
  },
50072
50003
  _task.logger,
50073
50004
  params.proxyLoc,
50074
- params.localIP,
50075
50005
  params.accountId
50076
50006
  ];
50077
50007
  const http = new Http(...args);
@@ -50128,7 +50058,6 @@ var __webpack_exports__ = {};
50128
50058
  },
50129
50059
  _task.logger,
50130
50060
  params.proxyLoc,
50131
- params.localIP,
50132
50061
  params.accountId
50133
50062
  ];
50134
50063
  const http = new Http(...args);
@@ -50201,7 +50130,6 @@ var __webpack_exports__ = {};
50201
50130
  },
50202
50131
  _task.logger,
50203
50132
  params.proxyLoc,
50204
- params.localIP,
50205
50133
  params.accountId
50206
50134
  ];
50207
50135
  const http = new Http(...args);
@@ -50305,7 +50233,6 @@ var __webpack_exports__ = {};
50305
50233
  },
50306
50234
  _task.logger,
50307
50235
  params.proxyLoc,
50308
- params.localIP,
50309
50236
  params.accountId
50310
50237
  ];
50311
50238
  const http = new Http(...args);
@@ -50744,4 +50671,5 @@ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_targe
50744
50671
  value: true
50745
50672
  });
50746
50673
 
50747
- //# sourceMappingURL=bundle.js.map
50674
+ //# sourceMappingURL=bundle.js.map
50675
+ //# debugId=e1a74875-fb1a-57f5-b655-1374d18c5370