@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/bundle.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*! For license information please see bundle.js.LICENSE.txt */
2
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]="ef37432b-1de8-5030-834a-59ecb3853f3c")}catch(e){}}();
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]="c14c6f4b-c5da-5f46-9b34-50e166610ae4")}catch(e){}}();
4
4
  var __webpack_modules__ = {
5
5
  "../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/helpers.js": function(__unused_webpack_module, exports1, __webpack_require__) {
6
6
  "use strict";
@@ -12492,7 +12492,9 @@ var __webpack_exports__ = {};
12492
12492
  var package_namespaceObject = {
12493
12493
  i8: "0.1.2"
12494
12494
  };
12495
- var package_namespaceObject_0 = JSON.parse('{"i8":"4.0.6-beta.1"}');
12495
+ var package_namespaceObject_0 = {
12496
+ i8: "4.0.7"
12497
+ };
12496
12498
  const external_node_fs_namespaceObject = require("node:fs");
12497
12499
  var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
12498
12500
  const external_node_http_namespaceObject = require("node:http");
@@ -27126,14 +27128,15 @@ var __webpack_exports__ = {};
27126
27128
  }
27127
27129
  return `socks5h://${ip}:${port}`;
27128
27130
  }
27129
- async function ProxyAgent(task, addr, accountId, refresh) {
27131
+ async function ProxyAgent(task, ip, adr, accountId, refresh) {
27130
27132
  const http = new Http({
27131
27133
  headers: {
27132
27134
  "content-type": "application/json"
27133
27135
  }
27134
27136
  });
27135
27137
  const params = {
27136
- addr: addr || null,
27138
+ ip: ip,
27139
+ addr: adr || null,
27137
27140
  accountId: accountId
27138
27141
  };
27139
27142
  const ProxyInfo = await http.api({
@@ -27155,7 +27158,7 @@ var __webpack_exports__ = {};
27155
27158
  data: ProxyInfo.data
27156
27159
  }
27157
27160
  };
27158
- task.logger?.info(`请求代理:区域:${params.addr}, AccountId:${params.accountId}, 返回代理信息: ${ProxyInfo.data ? `${ProxyInfo.data.proxyIp}:${ProxyInfo.data.proxyPort}` : "无可用代理"}`, loggerInfo);
27161
+ task.logger?.info(`请求代理:区域:${params.addr}, IP:${params.ip}, AccountId:${params.accountId}, 返回代理信息: ${ProxyInfo.data ? `${ProxyInfo.data.proxyIp}:${ProxyInfo.data.proxyPort}` : "无可用代理"}`, loggerInfo);
27159
27162
  const proxyAgent = "000000" === ProxyInfo.code && ProxyInfo.data ? {
27160
27163
  ip: ProxyInfo.data.proxyIp,
27161
27164
  port: ProxyInfo.data.proxyPort,
@@ -27172,16 +27175,16 @@ var __webpack_exports__ = {};
27172
27175
  data: error
27173
27176
  };
27174
27177
  }
27175
- constructor(config, logger, addr, accountId, platform){
27178
+ constructor(config, logger, adr, ip, accountId, platform){
27176
27179
  this.agentPromise = void 0;
27177
27180
  this.apiClient = lib_axios.create({
27178
27181
  ...config
27179
27182
  });
27180
27183
  this.logger = logger;
27181
27184
  this.platform = platform;
27182
- if (addr) this.agentPromise = ProxyAgent({
27185
+ if (ip) this.agentPromise = ProxyAgent({
27183
27186
  logger
27184
- }, addr, accountId);
27187
+ }, ip, adr, accountId);
27185
27188
  this.addResponseInterceptor(()=>void 0);
27186
27189
  }
27187
27190
  clearResponseInterceptors() {
@@ -32309,11 +32312,16 @@ var __webpack_exports__ = {};
32309
32312
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
32310
32313
  let executionState;
32311
32314
  let proxyUrl;
32312
- if (params.proxyLoc) {
32313
- task.logger?.info(`==> 开始获取代理信息:${params}`);
32315
+ if (params.localIP) {
32316
+ const args = [
32317
+ params.localIP,
32318
+ params.proxyLoc,
32319
+ params.accountId
32320
+ ];
32321
+ task.logger?.info(`==> 开始获取代理信息:${args}`);
32314
32322
  const ProxyAgentResult = await ProxyAgent({
32315
32323
  logger: task.logger
32316
- }, params.proxyLoc, params.accountId);
32324
+ }, ...args);
32317
32325
  task.logger?.info("==> 代理信息获取成功!");
32318
32326
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
32319
32327
  }
@@ -32656,6 +32664,7 @@ var __webpack_exports__ = {};
32656
32664
  },
32657
32665
  task.logger,
32658
32666
  params.proxyLoc,
32667
+ params.localIP,
32659
32668
  params.accountId,
32660
32669
  "baijiahao"
32661
32670
  ];
@@ -32861,6 +32870,7 @@ var __webpack_exports__ = {};
32861
32870
  enverionment: task.enverionment || "development",
32862
32871
  postId: params.articleId,
32863
32872
  eip: proxyHttp.proxyInfo,
32873
+ proxyIp: params.localIP,
32864
32874
  accountId: params.accountId,
32865
32875
  uid: params.uid,
32866
32876
  platform: "baijiahao",
@@ -33379,6 +33389,7 @@ var __webpack_exports__ = {};
33379
33389
  },
33380
33390
  _task.logger,
33381
33391
  params.proxyLoc,
33392
+ params.localIP,
33382
33393
  params.accountId
33383
33394
  ];
33384
33395
  const http = new Http(...args);
@@ -34508,7 +34519,7 @@ var __webpack_exports__ = {};
34508
34519
  heapTotal: `${Math.round(process.memoryUsage().heapTotal / 1024 / 1024)} MB`
34509
34520
  },
34510
34521
  accountId: params.accountId,
34511
- hasProxy: !!params.proxyLoc
34522
+ hasProxy: !!(params.proxyLoc || params.localIP)
34512
34523
  });
34513
34524
  }
34514
34525
  const check = {
@@ -34531,6 +34542,7 @@ var __webpack_exports__ = {};
34531
34542
  },
34532
34543
  _task.logger,
34533
34544
  params.proxyLoc,
34545
+ params.localIP,
34534
34546
  params.accountId
34535
34547
  ];
34536
34548
  const http = new Http(...args);
@@ -34561,7 +34573,7 @@ var __webpack_exports__ = {};
34561
34573
  heapUsed: `${Math.round(process.memoryUsage().heapUsed / 1024 / 1024)} MB`,
34562
34574
  heapTotal: `${Math.round(process.memoryUsage().heapTotal / 1024 / 1024)} MB`
34563
34575
  },
34564
- hasProxy: !!params.proxyLoc,
34576
+ hasProxy: !!(params.proxyLoc || params.localIP),
34565
34577
  timeSinceLastLog: Date.now() - lastEnvLogTime
34566
34578
  }
34567
34579
  });
@@ -34602,9 +34614,14 @@ var __webpack_exports__ = {};
34602
34614
  });
34603
34615
  return e.data;
34604
34616
  });
34617
+ const webSessionPath = "/api/sns/web/unread_count";
34618
+ const webSessionData = {};
34619
+ const webSessionXsHeader = sessionCheck_xsEncrypt.signHeadersPost(webSessionPath, recordCookie, "xhs-pc-web", webSessionData);
34605
34620
  const _web_session = http.api({
34606
- method: "get",
34607
- url: "https://edith.xiaohongshu.com/api/sns/web/unread_count"
34621
+ method: "GET",
34622
+ url: "https://edith.xiaohongshu.com/api/sns/web/unread_count",
34623
+ data: webSessionData,
34624
+ headers: webSessionXsHeader
34608
34625
  }, {
34609
34626
  retries: 3,
34610
34627
  retryDelay: 20,
@@ -34959,6 +34976,7 @@ var __webpack_exports__ = {};
34959
34976
  },
34960
34977
  _task.logger,
34961
34978
  params.proxyLoc,
34979
+ params.localIP,
34962
34980
  params.accountId
34963
34981
  ];
34964
34982
  const http = new Http(...args);
@@ -35045,6 +35063,7 @@ var __webpack_exports__ = {};
35045
35063
  },
35046
35064
  _task.logger,
35047
35065
  params.proxyLoc,
35066
+ params.localIP,
35048
35067
  params.accountId
35049
35068
  ];
35050
35069
  const http = new Http(...args);
@@ -35135,6 +35154,7 @@ var __webpack_exports__ = {};
35135
35154
  },
35136
35155
  _task.logger,
35137
35156
  params.proxyLoc,
35157
+ params.localIP,
35138
35158
  params.accountId
35139
35159
  ];
35140
35160
  const http = new Http(...args);
@@ -35220,6 +35240,7 @@ var __webpack_exports__ = {};
35220
35240
  },
35221
35241
  _task.logger,
35222
35242
  params.proxyLoc,
35243
+ params.localIP,
35223
35244
  params.accountId
35224
35245
  ];
35225
35246
  const http = new Http(...args);
@@ -35303,6 +35324,7 @@ var __webpack_exports__ = {};
35303
35324
  },
35304
35325
  _task.logger,
35305
35326
  params.proxyLoc,
35327
+ params.localIP,
35306
35328
  params.accountId
35307
35329
  ];
35308
35330
  const http = new Http(...args);
@@ -35398,6 +35420,7 @@ var __webpack_exports__ = {};
35398
35420
  },
35399
35421
  _task.logger,
35400
35422
  params.proxyLoc,
35423
+ params.localIP,
35401
35424
  params.accountId
35402
35425
  ];
35403
35426
  const http = new Http(...args);
@@ -36048,6 +36071,7 @@ var __webpack_exports__ = {};
36048
36071
  },
36049
36072
  _task.logger,
36050
36073
  params.proxyLoc,
36074
+ params.localIP,
36051
36075
  params.accountId
36052
36076
  ];
36053
36077
  const http = new Http(...args);
@@ -36193,6 +36217,7 @@ var __webpack_exports__ = {};
36193
36217
  },
36194
36218
  _task.logger,
36195
36219
  params.proxyLoc,
36220
+ params.localIP,
36196
36221
  params.accountId
36197
36222
  ];
36198
36223
  const http = new Http(...args);
@@ -36280,6 +36305,7 @@ var __webpack_exports__ = {};
36280
36305
  },
36281
36306
  _task.logger,
36282
36307
  params.proxyLoc,
36308
+ params.localIP,
36283
36309
  params.accountId
36284
36310
  ];
36285
36311
  const http = new Http(...args);
@@ -36367,6 +36393,7 @@ var __webpack_exports__ = {};
36367
36393
  },
36368
36394
  _task.logger,
36369
36395
  params.proxyLoc,
36396
+ params.localIP,
36370
36397
  params.accountId
36371
36398
  ];
36372
36399
  const http = new Http(...args);
@@ -36587,6 +36614,7 @@ var __webpack_exports__ = {};
36587
36614
  },
36588
36615
  _task.logger,
36589
36616
  params.proxyLoc,
36617
+ params.localIP,
36590
36618
  params.accountId
36591
36619
  ];
36592
36620
  const http = new Http(...args);
@@ -36948,11 +36976,16 @@ var __webpack_exports__ = {};
36948
36976
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
36949
36977
  let executionState;
36950
36978
  let proxyUrl;
36951
- if (params.proxyLoc) {
36952
- task.logger?.info(`==> 开始获取代理信息:${params}`);
36979
+ if (params.localIP) {
36980
+ const args = [
36981
+ params.localIP,
36982
+ params.proxyLoc,
36983
+ params.accountId
36984
+ ];
36985
+ task.logger?.info(`==> 开始获取代理信息:${args}`);
36953
36986
  const ProxyAgentResult = await ProxyAgent({
36954
36987
  logger: task.logger
36955
- }, params.proxyLoc, params.accountId);
36988
+ }, ...args);
36956
36989
  task.logger?.info("==> 代理信息获取成功!");
36957
36990
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
36958
36991
  }
@@ -38500,7 +38533,7 @@ var __webpack_exports__ = {};
38500
38533
  }
38501
38534
  const mock_mockAction = async (task, params)=>{
38502
38535
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
38503
- 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 参数缺失或不完整", "");
38536
+ 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 参数缺失或不完整", "");
38504
38537
  let currentStep = "初始化";
38505
38538
  try {
38506
38539
  currentStep = "验证账号信息";
@@ -38586,7 +38619,8 @@ var __webpack_exports__ = {};
38586
38619
  headers
38587
38620
  },
38588
38621
  task.logger,
38589
- params.proxyLoc,
38622
+ "",
38623
+ "",
38590
38624
  params.accountId,
38591
38625
  "douyin"
38592
38626
  ];
@@ -38859,6 +38893,7 @@ var __webpack_exports__ = {};
38859
38893
  enverionment: task.enverionment || "development",
38860
38894
  postId: params.articleId,
38861
38895
  eip: proxyHttp.proxyInfo,
38896
+ proxyIp: params.localIP,
38862
38897
  accountId: params.accountId,
38863
38898
  uid: params.uid,
38864
38899
  platform: "douyin",
@@ -39221,13 +39256,18 @@ var __webpack_exports__ = {};
39221
39256
  return downloadImage(url, external_node_path_default().join(tmpCachePath, fileName));
39222
39257
  }));
39223
39258
  let proxyUrl;
39224
- if (params.proxyLoc) {
39225
- task.logger?.info(`==> 开始获取代理信息:${params}`);
39226
- const ProxyAgentResult = await ProxyAgent({
39259
+ if (params.localIP) {
39260
+ const args = [
39261
+ params.localIP,
39262
+ params.proxyLoc,
39263
+ params.accountId
39264
+ ];
39265
+ task.logger?.info(`==> 开始获取代理信息:${args}`);
39266
+ const proxyAgentResult = await ProxyAgent({
39227
39267
  logger: task.logger
39228
- }, params.proxyLoc, params.accountId);
39268
+ }, ...args);
39229
39269
  task.logger?.info("==> 代理信息获取成功!");
39230
- proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
39270
+ proxyUrl = proxyAgentResult ? `http://${proxyAgentResult.ip}:${proxyAgentResult.port}` : void 0;
39231
39271
  }
39232
39272
  const commonCookies = {
39233
39273
  path: "/",
@@ -40184,6 +40224,7 @@ var __webpack_exports__ = {};
40184
40224
  },
40185
40225
  _task.logger,
40186
40226
  params.proxyLoc,
40227
+ params.localIP,
40187
40228
  params.accountId
40188
40229
  ];
40189
40230
  const http = new Http(...args);
@@ -40241,6 +40282,7 @@ var __webpack_exports__ = {};
40241
40282
  },
40242
40283
  _task.logger,
40243
40284
  params.proxyLoc,
40285
+ params.localIP,
40244
40286
  params.accountId
40245
40287
  ];
40246
40288
  const http = new Http(...args);
@@ -40287,6 +40329,7 @@ var __webpack_exports__ = {};
40287
40329
  },
40288
40330
  _task.logger,
40289
40331
  params.proxyLoc,
40332
+ params.localIP,
40290
40333
  params.accountId
40291
40334
  ];
40292
40335
  const http = new Http(...args);
@@ -40323,6 +40366,7 @@ var __webpack_exports__ = {};
40323
40366
  const data = isSuccess ? res.data.activity_list : [];
40324
40367
  return utils_response(isSuccess ? 0 : 414, message, data);
40325
40368
  };
40369
+ const getXhsWebUnreadCount_xsEncrypt = new Xhshow();
40326
40370
  const UnreadCountSchema = classic_schemas_object({
40327
40371
  connections: classic_schemas_number().nullable(),
40328
40372
  mentions: classic_schemas_number().nullable(),
@@ -40347,6 +40391,7 @@ var __webpack_exports__ = {};
40347
40391
  },
40348
40392
  _task.logger,
40349
40393
  params.proxyLoc,
40394
+ params.localIP,
40350
40395
  params.accountId
40351
40396
  ];
40352
40397
  const http = new Http(...args);
@@ -40356,9 +40401,24 @@ var __webpack_exports__ = {};
40356
40401
  unread_count: null,
40357
40402
  likes: null
40358
40403
  };
40404
+ const a1Cookie = params.cookies.find((it)=>"a1" === it.name)?.value;
40405
+ if (!a1Cookie) return {
40406
+ code: 414,
40407
+ message: "账号数据异常,请重新绑定账号后重试。",
40408
+ data: unreadCount
40409
+ };
40410
+ const apiPath = "/api/sns/web/unread_count";
40411
+ const recordCookie = params.cookies.reduce((acc, cookie)=>{
40412
+ if (cookie.name && cookie.value) acc[cookie.name] = cookie.value;
40413
+ return acc;
40414
+ }, {});
40415
+ const requestData = {};
40416
+ const xsHeader = getXhsWebUnreadCount_xsEncrypt.signHeadersPost(apiPath, recordCookie, "xhs-pc-web", requestData);
40359
40417
  const res = await http.api({
40360
- method: "get",
40361
- url: "https://edith.xiaohongshu.com/api/sns/web/unread_count"
40418
+ method: "GET",
40419
+ url: "https://edith.xiaohongshu.com/api/sns/web/unread_count",
40420
+ data: requestData,
40421
+ headers: xsHeader
40362
40422
  }, {
40363
40423
  retries: 3,
40364
40424
  retryDelay: 20,
@@ -40439,6 +40499,7 @@ var __webpack_exports__ = {};
40439
40499
  },
40440
40500
  _task.logger,
40441
40501
  params.proxyLoc,
40502
+ params.localIP,
40442
40503
  params.accountId
40443
40504
  ];
40444
40505
  const http = new Http(...args);
@@ -40545,6 +40606,7 @@ var __webpack_exports__ = {};
40545
40606
  },
40546
40607
  _task.logger,
40547
40608
  params.proxyLoc,
40609
+ params.localIP,
40548
40610
  params.accountId
40549
40611
  ];
40550
40612
  const http = new Http(...args);
@@ -40775,6 +40837,7 @@ var __webpack_exports__ = {};
40775
40837
  },
40776
40838
  _task.logger,
40777
40839
  params.proxyLoc,
40840
+ params.localIP,
40778
40841
  params.accountId
40779
40842
  ];
40780
40843
  const http = new Http(...args);
@@ -41107,6 +41170,7 @@ var __webpack_exports__ = {};
41107
41170
  },
41108
41171
  _task.logger,
41109
41172
  params.proxyLoc,
41173
+ params.localIP,
41110
41174
  params.accountId
41111
41175
  ];
41112
41176
  const http = new Http(...args);
@@ -41212,6 +41276,7 @@ var __webpack_exports__ = {};
41212
41276
  },
41213
41277
  _task.logger,
41214
41278
  params.proxyLoc,
41279
+ params.localIP,
41215
41280
  params.accountId
41216
41281
  ];
41217
41282
  const http = new Http(...args);
@@ -41676,6 +41741,7 @@ var __webpack_exports__ = {};
41676
41741
  },
41677
41742
  _task.logger,
41678
41743
  params.proxyLoc,
41744
+ params.localIP,
41679
41745
  params.accountId
41680
41746
  ];
41681
41747
  const http = new Http(...args);
@@ -42006,6 +42072,7 @@ var __webpack_exports__ = {};
42006
42072
  },
42007
42073
  _task.logger,
42008
42074
  params.proxyLoc,
42075
+ params.localIP,
42009
42076
  params.accountId
42010
42077
  ];
42011
42078
  const http = new Http(...args);
@@ -42058,6 +42125,7 @@ var __webpack_exports__ = {};
42058
42125
  },
42059
42126
  _task.logger,
42060
42127
  params.proxyLoc,
42128
+ params.localIP,
42061
42129
  params.accountId
42062
42130
  ];
42063
42131
  const http = new Http(...args);
@@ -42110,6 +42178,7 @@ var __webpack_exports__ = {};
42110
42178
  },
42111
42179
  _task.logger,
42112
42180
  params.proxyLoc,
42181
+ params.localIP,
42113
42182
  params.accountId
42114
42183
  ];
42115
42184
  const http = new Http(...args);
@@ -42156,6 +42225,7 @@ var __webpack_exports__ = {};
42156
42225
  },
42157
42226
  _task.logger,
42158
42227
  params.proxyLoc,
42228
+ params.localIP,
42159
42229
  params.accountId
42160
42230
  ];
42161
42231
  const http = new Http(...args);
@@ -42194,6 +42264,7 @@ var __webpack_exports__ = {};
42194
42264
  },
42195
42265
  _task.logger,
42196
42266
  params.proxyLoc,
42267
+ params.localIP,
42197
42268
  params.accountId
42198
42269
  ];
42199
42270
  const http = new Http(...args);
@@ -42255,6 +42326,7 @@ var __webpack_exports__ = {};
42255
42326
  },
42256
42327
  _task.logger,
42257
42328
  params.proxyLoc,
42329
+ params.localIP,
42258
42330
  params.accountId
42259
42331
  ];
42260
42332
  const http = new Http(...args);
@@ -42311,6 +42383,7 @@ var __webpack_exports__ = {};
42311
42383
  },
42312
42384
  _task.logger,
42313
42385
  params.proxyLoc,
42386
+ params.localIP,
42314
42387
  params.accountId
42315
42388
  ];
42316
42389
  const http = new Http(...args);
@@ -42396,6 +42469,7 @@ var __webpack_exports__ = {};
42396
42469
  },
42397
42470
  _task.logger,
42398
42471
  params.proxyLoc,
42472
+ params.localIP,
42399
42473
  params.accountId
42400
42474
  ];
42401
42475
  const http = new Http(...args);
@@ -42483,6 +42557,7 @@ var __webpack_exports__ = {};
42483
42557
  },
42484
42558
  _task.logger,
42485
42559
  params.proxyLoc,
42560
+ params.localIP,
42486
42561
  params.accountId
42487
42562
  ];
42488
42563
  const http = new Http(...args);
@@ -42592,6 +42667,7 @@ var __webpack_exports__ = {};
42592
42667
  },
42593
42668
  _task.logger,
42594
42669
  params.proxyLoc,
42670
+ params.localIP,
42595
42671
  params.accountId
42596
42672
  ];
42597
42673
  const http = new Http(...args);
@@ -42869,11 +42945,16 @@ var __webpack_exports__ = {};
42869
42945
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
42870
42946
  let executionState;
42871
42947
  let proxyUrl;
42872
- if (params.proxyLoc) {
42873
- task.logger?.info(`==> 开始获取代理信息:${params}`);
42948
+ if (params.localIP) {
42949
+ const args = [
42950
+ params.localIP,
42951
+ params.proxyLoc,
42952
+ params.accountId
42953
+ ];
42954
+ task.logger?.info(`==> 开始获取代理信息:${args}`);
42874
42955
  const ProxyAgentResult = await ProxyAgent({
42875
42956
  logger: task.logger
42876
- }, params.proxyLoc, params.accountId);
42957
+ }, ...args);
42877
42958
  task.logger?.info("==> 代理信息获取成功!");
42878
42959
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
42879
42960
  }
@@ -43700,6 +43781,7 @@ var __webpack_exports__ = {};
43700
43781
  enverionment: confParams.enverionment || "development",
43701
43782
  postId: confParams.articleId,
43702
43783
  eip: proxyHttp.proxyInfo,
43784
+ proxyIp: confParams.proxyIp,
43703
43785
  accountId: confParams.accountId,
43704
43786
  uid: confParams.uid,
43705
43787
  publishParams: publishData,
@@ -43726,6 +43808,7 @@ var __webpack_exports__ = {};
43726
43808
  },
43727
43809
  task.logger,
43728
43810
  params.proxyLoc,
43811
+ params.localIP,
43729
43812
  params.accountId,
43730
43813
  "shipinhao"
43731
43814
  ];
@@ -43796,6 +43879,7 @@ var __webpack_exports__ = {};
43796
43879
  articleId: params.articleId,
43797
43880
  postId: params.articleId,
43798
43881
  eip: proxyHttp.proxyInfo,
43882
+ proxyIp: params.localIP,
43799
43883
  accountId: params.accountId,
43800
43884
  uid: params.uid
43801
43885
  }, {
@@ -44182,11 +44266,16 @@ var __webpack_exports__ = {};
44182
44266
  return downloadImage(url, external_node_path_default().join(tmpCachePath, fileName));
44183
44267
  }));
44184
44268
  let proxyUrl;
44185
- if (params.proxyLoc) {
44186
- task.logger?.info(`==> 开始获取代理信息:${params}`);
44269
+ if (params.localIP) {
44270
+ const args = [
44271
+ params.localIP,
44272
+ params.proxyLoc,
44273
+ params.accountId
44274
+ ];
44275
+ task.logger?.info(`==> 开始获取代理信息:${args}`);
44187
44276
  const ProxyAgentResult = await ProxyAgent({
44188
44277
  logger: task.logger
44189
- }, params.proxyLoc, params.accountId);
44278
+ }, ...args);
44190
44279
  task.logger?.info("==> 代理信息获取成功!");
44191
44280
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
44192
44281
  }
@@ -44836,11 +44925,16 @@ var __webpack_exports__ = {};
44836
44925
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
44837
44926
  let executionState;
44838
44927
  let proxyUrl;
44839
- if (params.proxyLoc) {
44840
- task.logger?.info(`==> 开始获取代理信息:${params}`);
44928
+ if (params.localIP) {
44929
+ const args = [
44930
+ params.localIP,
44931
+ params.proxyLoc,
44932
+ params.accountId
44933
+ ];
44934
+ task.logger?.info(`==> 开始获取代理信息:${args}`);
44841
44935
  const ProxyAgentResult = await ProxyAgent({
44842
44936
  logger: task.logger
44843
- }, params.proxyLoc, params.accountId);
44937
+ }, ...args);
44844
44938
  task.logger?.info("==> 代理信息获取成功!");
44845
44939
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
44846
44940
  }
@@ -45091,6 +45185,7 @@ var __webpack_exports__ = {};
45091
45185
  },
45092
45186
  task.logger,
45093
45187
  params.proxyLoc,
45188
+ params.localIP,
45094
45189
  params.accountId,
45095
45190
  "toutiao"
45096
45191
  ];
@@ -45288,6 +45383,7 @@ var __webpack_exports__ = {};
45288
45383
  enverionment: task.enverionment || "development",
45289
45384
  postId: params.articleId,
45290
45385
  eip: proxyHttp.proxyInfo,
45386
+ proxyIp: params.localIP,
45291
45387
  accountId: params.accountId,
45292
45388
  uid: params.uid,
45293
45389
  platform: "toutiao",
@@ -45922,11 +46018,16 @@ var __webpack_exports__ = {};
45922
46018
  const updateTaskState = task.taskStageStore?.update?.bind(task.taskStageStore, task.taskId || "");
45923
46019
  let executionState;
45924
46020
  let proxyUrl;
45925
- if (params.proxyLoc) {
45926
- task.logger?.info(`==> 开始获取代理信息:${params}`);
46021
+ if (params.localIP) {
46022
+ const args = [
46023
+ params.localIP,
46024
+ params.proxyLoc,
46025
+ params.accountId
46026
+ ];
46027
+ task.logger?.info(`==> 开始获取代理信息:${args}`);
45927
46028
  const ProxyAgentResult = await ProxyAgent({
45928
46029
  logger: task.logger
45929
- }, params.proxyLoc, params.accountId);
46030
+ }, ...args);
45930
46031
  task.logger?.info("==> 代理信息获取成功!");
45931
46032
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
45932
46033
  }
@@ -46418,6 +46519,7 @@ var __webpack_exports__ = {};
46418
46519
  },
46419
46520
  task.logger,
46420
46521
  params.proxyLoc,
46522
+ params.localIP,
46421
46523
  params.accountId,
46422
46524
  "weixin"
46423
46525
  ];
@@ -47196,6 +47298,7 @@ var __webpack_exports__ = {};
47196
47298
  enverionment: task.enverionment || "development",
47197
47299
  postId: params.articleId,
47198
47300
  eip: proxyHttp.proxyInfo,
47301
+ proxyIp: params.localIP,
47199
47302
  accountId: params.accountId,
47200
47303
  uid: params.uid,
47201
47304
  platform: "weixin",
@@ -48000,11 +48103,16 @@ var __webpack_exports__ = {};
48000
48103
  const reporter = task.reportService?.reportLoginStatus ?? (()=>Promise.resolve());
48001
48104
  let executionState;
48002
48105
  let proxyUrl;
48003
- if (params.proxyLoc) {
48004
- task.logger?.info(`==> 开始获取代理信息:${params}`);
48106
+ if (params.localIP) {
48107
+ const args = [
48108
+ params.localIP,
48109
+ params.proxyLoc,
48110
+ params.accountId
48111
+ ];
48112
+ task.logger?.info(`==> 开始获取代理信息:${args}`);
48005
48113
  const ProxyAgentResult = await ProxyAgent({
48006
48114
  logger: task.logger
48007
- }, params.proxyLoc, params.accountId);
48115
+ }, ...args);
48008
48116
  task.logger?.info("==> 代理信息获取成功!");
48009
48117
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
48010
48118
  }
@@ -48321,6 +48429,7 @@ var __webpack_exports__ = {};
48321
48429
  },
48322
48430
  task.logger,
48323
48431
  params.proxyLoc,
48432
+ params.localIP,
48324
48433
  params.accountId,
48325
48434
  "xiaohongshu"
48326
48435
  ];
@@ -48361,8 +48470,8 @@ var __webpack_exports__ = {};
48361
48470
  params: fetchCoverParams
48362
48471
  }, {
48363
48472
  retries: 3,
48364
- retryDelay: 500,
48365
- timeout: 30000
48473
+ retryDelay: 20,
48474
+ timeout: 3000
48366
48475
  });
48367
48476
  for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
48368
48477
  bucket: item.bucket || "",
@@ -48381,8 +48490,8 @@ var __webpack_exports__ = {};
48381
48490
  params: fetchCoverParams
48382
48491
  }, {
48383
48492
  retries: 3,
48384
- retryDelay: 500,
48385
- timeout: 30000
48493
+ retryDelay: 20,
48494
+ timeout: 3000
48386
48495
  });
48387
48496
  for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
48388
48497
  bucket: item.bucket || "",
@@ -48443,9 +48552,7 @@ var __webpack_exports__ = {};
48443
48552
  headers: {
48444
48553
  "x-cos-security-token": ossToken
48445
48554
  },
48446
- defaultErrorMsg: "图片上传异常,请稍后重试。"
48447
- }, {
48448
- timeout: 60000
48555
+ defaultErrorMsg: "图片上传异常,请稍后重试发布。"
48449
48556
  });
48450
48557
  return {
48451
48558
  ossFileId,
@@ -48455,8 +48562,6 @@ var __webpack_exports__ = {};
48455
48562
  originSize
48456
48563
  };
48457
48564
  } catch (error) {
48458
- const e = Http.handleApiError(error);
48459
- 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)}`);
48460
48565
  attempt++;
48461
48566
  }
48462
48567
  }
@@ -48690,6 +48795,7 @@ var __webpack_exports__ = {};
48690
48795
  enverionment: task.enverionment || "development",
48691
48796
  postId: params.articleId,
48692
48797
  eip: proxyHttp.proxyInfo,
48798
+ proxyIp: params.localIP,
48693
48799
  accountId: params.accountId,
48694
48800
  uid: params.uid,
48695
48801
  platform: "xiaohongshu",
@@ -48951,11 +49057,16 @@ var __webpack_exports__ = {};
48951
49057
  return downloadImage(url, external_node_path_default().join(tmpCachePath, fileName));
48952
49058
  }));
48953
49059
  let proxyUrl;
48954
- if (params.proxyLoc) {
48955
- task.logger?.info(`==> 开始获取代理信息:${params}`);
49060
+ if (params.localIP) {
49061
+ const args = [
49062
+ params.localIP,
49063
+ params.proxyLoc,
49064
+ params.accountId
49065
+ ];
49066
+ task.logger?.info(`==> 开始获取代理信息:${args}`);
48956
49067
  const ProxyAgentResult = await ProxyAgent({
48957
49068
  logger: task.logger
48958
- }, params.proxyLoc, params.accountId);
49069
+ }, ...args);
48959
49070
  task.logger?.info("==> 代理信息获取成功!");
48960
49071
  proxyUrl = ProxyAgentResult ? `http://${ProxyAgentResult.ip}:${ProxyAgentResult.port}` : void 0;
48961
49072
  }
@@ -49384,6 +49495,7 @@ var __webpack_exports__ = {};
49384
49495
  },
49385
49496
  task.logger,
49386
49497
  params.proxyLoc,
49498
+ params.localIP,
49387
49499
  params.accountId,
49388
49500
  "xiaohongshu-rpa"
49389
49501
  ];
@@ -49429,8 +49541,8 @@ var __webpack_exports__ = {};
49429
49541
  params: fetchCoverParams
49430
49542
  }, {
49431
49543
  retries: 3,
49432
- retryDelay: 500,
49433
- timeout: 8000
49544
+ retryDelay: 20,
49545
+ timeout: 3000
49434
49546
  });
49435
49547
  for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
49436
49548
  bucket: item.bucket || "",
@@ -49449,8 +49561,8 @@ var __webpack_exports__ = {};
49449
49561
  params: fetchCoverParams
49450
49562
  }, {
49451
49563
  retries: 3,
49452
- retryDelay: 500,
49453
- timeout: 8000
49564
+ retryDelay: 20,
49565
+ timeout: 3000
49454
49566
  });
49455
49567
  for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
49456
49568
  bucket: item.bucket || "",
@@ -49495,8 +49607,6 @@ var __webpack_exports__ = {};
49495
49607
  "x-cos-security-token": ossToken
49496
49608
  },
49497
49609
  defaultErrorMsg: "图片上传异常,请稍后重试发布。"
49498
- }, {
49499
- timeout: 60000
49500
49610
  });
49501
49611
  return {
49502
49612
  ossFileId,
@@ -49806,6 +49916,7 @@ var __webpack_exports__ = {};
49806
49916
  },
49807
49917
  _task.logger,
49808
49918
  params.proxyLoc,
49919
+ params.localIP,
49809
49920
  params.accountId
49810
49921
  ];
49811
49922
  const http = new Http(...args);
@@ -49891,6 +50002,7 @@ var __webpack_exports__ = {};
49891
50002
  },
49892
50003
  _task.logger,
49893
50004
  params.proxyLoc,
50005
+ params.localIP,
49894
50006
  params.accountId
49895
50007
  ];
49896
50008
  const http = new Http(...args);
@@ -49929,6 +50041,7 @@ var __webpack_exports__ = {};
49929
50041
  },
49930
50042
  _task.logger,
49931
50043
  params.proxyLoc,
50044
+ params.localIP,
49932
50045
  params.accountId
49933
50046
  ];
49934
50047
  const http = new Http(...args);
@@ -49981,6 +50094,7 @@ var __webpack_exports__ = {};
49981
50094
  },
49982
50095
  _task.logger,
49983
50096
  params.proxyLoc,
50097
+ params.localIP,
49984
50098
  params.accountId
49985
50099
  ];
49986
50100
  const http = new Http(...args);
@@ -50037,6 +50151,7 @@ var __webpack_exports__ = {};
50037
50151
  },
50038
50152
  _task.logger,
50039
50153
  params.proxyLoc,
50154
+ params.localIP,
50040
50155
  params.accountId
50041
50156
  ];
50042
50157
  const http = new Http(...args);
@@ -50109,6 +50224,7 @@ var __webpack_exports__ = {};
50109
50224
  },
50110
50225
  _task.logger,
50111
50226
  params.proxyLoc,
50227
+ params.localIP,
50112
50228
  params.accountId
50113
50229
  ];
50114
50230
  const http = new Http(...args);
@@ -50212,6 +50328,7 @@ var __webpack_exports__ = {};
50212
50328
  },
50213
50329
  _task.logger,
50214
50330
  params.proxyLoc,
50331
+ params.localIP,
50215
50332
  params.accountId
50216
50333
  ];
50217
50334
  const http = new Http(...args);
@@ -50651,4 +50768,4 @@ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_targe
50651
50768
  });
50652
50769
 
50653
50770
  //# sourceMappingURL=bundle.js.map
50654
- //# debugId=ef37432b-1de8-5030-834a-59ecb3853f3c
50771
+ //# debugId=c14c6f4b-c5da-5f46-9b34-50e166610ae4