@iflyrpa/actions 3.0.0-beta.3 → 3.0.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.mjs CHANGED
@@ -5434,7 +5434,7 @@ function __webpack_require__(moduleId) {
5434
5434
  return module;
5435
5435
  };
5436
5436
  })();
5437
- var package_namespaceObject = JSON.parse('{"i8":"3.0.0-beta.2"}');
5437
+ var package_namespaceObject = JSON.parse('{"i8":"3.0.0-beta.3"}');
5438
5438
  var dist = __webpack_require__("../../node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/index.js");
5439
5439
  async function ProxyAgent(task, ip, adr, accountId, refresh) {
5440
5440
  const http = new Http({
@@ -13923,9 +13923,10 @@ class DouyinImageUploader {
13923
13923
  this.authCache = null;
13924
13924
  this.authExpireTime = 0;
13925
13925
  this.AUTH_REFRESH_BUFFER = 300000;
13926
- this.CONCURRENT_LIMIT = 3;
13926
+ this.CONCURRENT_LIMIT = 5;
13927
13927
  this.UPLOAD_DELAY = 1000;
13928
- this.UPLOAD_TIMEOUT = 60000;
13928
+ this.UPLOAD_TIMEOUT = 300000;
13929
+ this.TOS_UPLOAD_TIMEOUT = 600000;
13929
13930
  this.proxyHttp = proxyHttp;
13930
13931
  this.headers = headers;
13931
13932
  this.queryParams = queryParams;
@@ -13935,7 +13936,7 @@ class DouyinImageUploader {
13935
13936
  keepAlive: true,
13936
13937
  maxSockets: this.CONCURRENT_LIMIT,
13937
13938
  maxFreeSockets: 2,
13938
- timeout: this.UPLOAD_TIMEOUT
13939
+ timeout: this.TOS_UPLOAD_TIMEOUT
13939
13940
  };
13940
13941
  agentOptions.freeSocketTimeout = 30000;
13941
13942
  this.uploadAgent = new Agent(agentOptions);
@@ -13959,7 +13960,7 @@ class DouyinImageUploader {
13959
13960
  "Content-Type": "application/json"
13960
13961
  }
13961
13962
  }, {
13962
- timeout: 60000
13963
+ timeout: 300000
13963
13964
  });
13964
13965
  if (!uploadAuth.auth) throw new Error(uploadAuth.status_msg || "获取上传权限失败");
13965
13966
  try {
@@ -14010,6 +14011,8 @@ class DouyinImageUploader {
14010
14011
  "X-amz-date": amzDate,
14011
14012
  "X-amz-security-token": authData.SessionToken
14012
14013
  }
14014
+ }, {
14015
+ timeout: this.UPLOAD_TIMEOUT
14013
14016
  });
14014
14017
  if (!response) throw new Error("获取上传地址失败: 响应为空");
14015
14018
  if (response.ResponseMetadata?.Error) throw new Error(`ImageX错误: ${response.ResponseMetadata.Error.Code} - ${response.ResponseMetadata.Error.Message}`);
@@ -14054,7 +14057,7 @@ class DouyinImageUploader {
14054
14057
  data: fileBuffer,
14055
14058
  httpAgent: this.uploadAgent,
14056
14059
  httpsAgent: this.uploadAgent,
14057
- timeout: this.UPLOAD_TIMEOUT,
14060
+ timeout: this.TOS_UPLOAD_TIMEOUT,
14058
14061
  maxBodyLength: 1 / 0,
14059
14062
  maxContentLength: 1 / 0
14060
14063
  });
@@ -14361,7 +14364,8 @@ const mock_mockAction = async (task, params)=>{
14361
14364
  };
14362
14365
  }
14363
14366
  if (params.banners && params.banners.length > 0) {
14364
- const uploadResults = await uploader.uploadImages(params.banners);
14367
+ const banners = params.banners.filter((i)=>i !== params.coverImage);
14368
+ const uploadResults = await uploader.uploadImages(banners);
14365
14369
  publishData.item.common.images = publishData.item.common.images.concat(uploadResults.map((result)=>({
14366
14370
  uri: result.uri,
14367
14371
  width: result.width,