@iflyrpa/actions 3.0.3 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -5435,7 +5435,7 @@ function __webpack_require__(moduleId) {
5435
5435
  };
5436
5436
  })();
5437
5437
  var package_namespaceObject = {
5438
- i8: "3.0.2"
5438
+ i8: "3.0.3"
5439
5439
  };
5440
5440
  var dist = __webpack_require__("../../node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/index.js");
5441
5441
  async function ProxyAgent(task, ip, adr, accountId, refresh) {
@@ -5451,7 +5451,7 @@ async function ProxyAgent(task, ip, adr, accountId, refresh) {
5451
5451
  };
5452
5452
  const ProxyInfo = await http.api({
5453
5453
  method: "POST",
5454
- url: "http://172.29.194.32:9998/pool/eip/proxy",
5454
+ url: "https://fetdev.iflysec.com/ip-pool/pool/eip/proxy",
5455
5455
  data: params
5456
5456
  }).catch((err)=>{
5457
5457
  throw {
@@ -14483,29 +14483,54 @@ const mock_mockAction = async (task, params)=>{
14483
14483
  })}`);
14484
14484
  task.logger.info(`publishData: ${JSON.stringify(publishData)}`);
14485
14485
  task.logger.info(`url: https://creator.douyin.com/web/api/media/aweme/create_v2/?${publishQueryParams}`);
14486
- const publishResult = await proxyHttp.api({
14487
- method: "post",
14488
- url: `https://creator.douyin.com/web/api/media/aweme/create_v2/?${publishQueryParams}`,
14489
- data: publishData,
14490
- defaultErrorMsg: "发布异常,请稍后重试。",
14491
- headers: {
14492
- ...headers,
14493
- Referer: "https://creator.douyin.com/creator-micro/content/post/image?default-tab=3&enter_from=publish_page&media_type=image&type=new",
14494
- "Content-Type": "application/json",
14495
- Accept: "application/json, text/plain, */*",
14496
- "bd-ticket-guard-client-data": bdTicketGuardClientData["headers_bd_ticket_guard_client_data"],
14497
- "bd-ticket-guard-ree-public-key": bdTicketGuardClientData["headers_bd_ticket_guard_ree_public_key"],
14498
- "bd-ticket-guard-version": "2",
14499
- "bd-ticket-guard-web-sign-type": "1",
14500
- "bd-ticket-guard-web-version": "2",
14501
- "x-secsdk-csrf-token": csrfToken,
14502
- "x-tt-session-dtrait": sessionDtrait || ""
14503
- }
14504
- }, {
14505
- timeout: 60000,
14506
- retries: 3,
14507
- retryDelay: 2000
14508
- });
14486
+ let publishResult;
14487
+ try {
14488
+ publishResult = await proxyHttp.api({
14489
+ method: "post",
14490
+ url: `https://creator.douyin.com/web/api/media/aweme/create_v2/?${publishQueryParams}`,
14491
+ data: publishData,
14492
+ defaultErrorMsg: "发布异常,请稍后重试。",
14493
+ headers: {
14494
+ ...headers,
14495
+ Referer: "https://creator.douyin.com/creator-micro/content/post/image?default-tab=3&enter_from=publish_page&media_type=image&type=new",
14496
+ "Content-Type": "application/json",
14497
+ Accept: "application/json, text/plain, */*",
14498
+ "bd-ticket-guard-client-data": bdTicketGuardClientData["headers_bd_ticket_guard_client_data"],
14499
+ "bd-ticket-guard-ree-public-key": bdTicketGuardClientData["headers_bd_ticket_guard_ree_public_key"],
14500
+ "bd-ticket-guard-version": "2",
14501
+ "bd-ticket-guard-web-sign-type": "1",
14502
+ "bd-ticket-guard-web-version": "2",
14503
+ "x-secsdk-csrf-token": csrfToken,
14504
+ "x-tt-session-dtrait": sessionDtrait || ""
14505
+ }
14506
+ }, {
14507
+ timeout: 60000,
14508
+ retries: 3,
14509
+ retryDelay: 2000
14510
+ });
14511
+ } catch (error) {
14512
+ const upstreamMessage = error?.message || String(error);
14513
+ const upstreamCode = error?.code;
14514
+ task.logger.error(`TaskId:${task.taskId},create_v2 请求异常,上游错误已屏蔽。上游 code=${upstreamCode},message=${upstreamMessage}`, {
14515
+ error,
14516
+ upstreamData: error?.data,
14517
+ extra: error?.extra
14518
+ });
14519
+ const message = "发布失败,请重试";
14520
+ await updateTaskState?.({
14521
+ state: __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.TaskState.FAILED,
14522
+ error: message,
14523
+ result: {
14524
+ data: decision,
14525
+ uploadedImgList: JSON.stringify(publishData.item.common.images)
14526
+ }
14527
+ });
14528
+ return {
14529
+ code: 414,
14530
+ data: "",
14531
+ message
14532
+ };
14533
+ }
14509
14534
  reportLogger({
14510
14535
  token: params.huiwenToken || "",
14511
14536
  enverionment: task.enverionment || "development",