@iflyrpa/actions 1.2.16-beta.4 → 1.2.16-beta.6
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 +44 -34
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +44 -34
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +44 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -15889,7 +15889,7 @@ var __webpack_exports__ = {};
|
|
|
15889
15889
|
articleCell,
|
|
15890
15890
|
...onlySuccess ? {
|
|
15891
15891
|
pagination: {
|
|
15892
|
-
total: api_base_info_json.total_count
|
|
15892
|
+
total: api_base_info_json.total_count,
|
|
15893
15893
|
pageNum,
|
|
15894
15894
|
pageSize
|
|
15895
15895
|
}
|
|
@@ -15998,19 +15998,6 @@ var __webpack_exports__ = {};
|
|
|
15998
15998
|
if (parsed.publish_list.length < currentPageSize) break;
|
|
15999
15999
|
nextPage++;
|
|
16000
16000
|
}
|
|
16001
|
-
articleCell = articlesInfo.publish_list.map((item)=>({
|
|
16002
|
-
title: item.publish_info.appmsg_info[0].title,
|
|
16003
|
-
imageUrl: item.publish_info.appmsg_info[0].cover,
|
|
16004
|
-
createTime: item.publish_info.appmsg_info[0].line_info.send_time,
|
|
16005
|
-
redirectUrl: item.publish_info.appmsg_info[0].content_url,
|
|
16006
|
-
readNum: item.publish_info.appmsg_info[0].read_num,
|
|
16007
|
-
likeNum: item.publish_info.appmsg_info[0].old_like_num,
|
|
16008
|
-
shareNum: item.publish_info.appmsg_info[0].share_num,
|
|
16009
|
-
recommendNum: item.publish_info.appmsg_info[0].like_num,
|
|
16010
|
-
...showOriginalData ? {
|
|
16011
|
-
originalData: item
|
|
16012
|
-
} : {}
|
|
16013
|
-
}));
|
|
16014
16001
|
}
|
|
16015
16002
|
let nextPage = false;
|
|
16016
16003
|
if (onlySuccess) {
|
|
@@ -16060,6 +16047,19 @@ var __webpack_exports__ = {};
|
|
|
16060
16047
|
}
|
|
16061
16048
|
}, "微信文章文章获取成功");
|
|
16062
16049
|
}
|
|
16050
|
+
articleCell = articlesInfo.publish_list.map((item)=>({
|
|
16051
|
+
title: item.publish_info.appmsg_info[0].title,
|
|
16052
|
+
imageUrl: item.publish_info.appmsg_info[0].cover,
|
|
16053
|
+
createTime: item.publish_info.appmsg_info[0].line_info.send_time,
|
|
16054
|
+
redirectUrl: item.publish_info.appmsg_info[0].content_url,
|
|
16055
|
+
readNum: item.publish_info.appmsg_info[0].read_num,
|
|
16056
|
+
likeNum: item.publish_info.appmsg_info[0].old_like_num,
|
|
16057
|
+
shareNum: item.publish_info.appmsg_info[0].share_num,
|
|
16058
|
+
recommendNum: item.publish_info.appmsg_info[0].like_num,
|
|
16059
|
+
...showOriginalData ? {
|
|
16060
|
+
originalData: item
|
|
16061
|
+
} : {}
|
|
16062
|
+
}));
|
|
16063
16063
|
return success({
|
|
16064
16064
|
articleCell
|
|
16065
16065
|
}, "微信文章文章获取成功");
|
|
@@ -17833,33 +17833,40 @@ var __webpack_exports__ = {};
|
|
|
17833
17833
|
}
|
|
17834
17834
|
});
|
|
17835
17835
|
let uploadInfos = [];
|
|
17836
|
-
coverIdInfo.data.uploadTempPermits.
|
|
17837
|
-
|
|
17838
|
-
|
|
17839
|
-
|
|
17840
|
-
|
|
17841
|
-
|
|
17836
|
+
coverIdInfo.data.uploadTempPermits.forEach((item)=>{
|
|
17837
|
+
item.fileIds.forEach((fileId)=>{
|
|
17838
|
+
uploadInfos.push({
|
|
17839
|
+
bucket: item.bucket || "",
|
|
17840
|
+
uploadAddr: item.uploadAddr || "",
|
|
17841
|
+
fileIds: fileId,
|
|
17842
|
+
token: item.token || ""
|
|
17843
|
+
});
|
|
17842
17844
|
});
|
|
17843
17845
|
});
|
|
17846
|
+
if (uploadInfos.length < params.banners.length) return {
|
|
17847
|
+
code: 200,
|
|
17848
|
+
message: "可用 OSS bucket 数量不足,无法上传所有图片!",
|
|
17849
|
+
data: ""
|
|
17850
|
+
};
|
|
17844
17851
|
if (0 === uploadInfos.length) return {
|
|
17845
17852
|
code: 200,
|
|
17846
17853
|
message: "图片上传失败,请稍后重试!",
|
|
17847
17854
|
data: ""
|
|
17848
17855
|
};
|
|
17849
|
-
const
|
|
17856
|
+
const availableBuckets = Array.from({
|
|
17857
|
+
length: uploadInfos.length
|
|
17858
|
+
}, (_, i)=>i);
|
|
17859
|
+
const uploadFile = async (url, index)=>{
|
|
17850
17860
|
const fileName = getFilenameFromUrl(url);
|
|
17851
17861
|
const localUrl = await downloadImage(url, external_node_path_default().join(tmpCachePath, fileName));
|
|
17852
17862
|
const fileBuffer = external_node_fs_default().readFileSync(localUrl);
|
|
17853
|
-
const
|
|
17854
|
-
|
|
17855
|
-
|
|
17856
|
-
|
|
17857
|
-
|
|
17858
|
-
|
|
17859
|
-
|
|
17860
|
-
}
|
|
17861
|
-
const currentInfo = uploadInfos[uploadIndex];
|
|
17862
|
-
const ossFileId = currentInfo.fileIds[0];
|
|
17863
|
+
const MAX_RETRIES = uploadInfos.length;
|
|
17864
|
+
let attempt = 0;
|
|
17865
|
+
while(attempt < MAX_RETRIES){
|
|
17866
|
+
const ossBucketIndex = availableBuckets.shift();
|
|
17867
|
+
if (void 0 === ossBucketIndex) break;
|
|
17868
|
+
const currentInfo = uploadInfos[ossBucketIndex];
|
|
17869
|
+
const ossFileId = currentInfo.fileIds;
|
|
17863
17870
|
const ossToken = currentInfo.token;
|
|
17864
17871
|
const ossDomain = currentInfo.uploadAddr;
|
|
17865
17872
|
try {
|
|
@@ -17877,10 +17884,13 @@ var __webpack_exports__ = {};
|
|
|
17877
17884
|
ossToken
|
|
17878
17885
|
};
|
|
17879
17886
|
} catch (error) {
|
|
17880
|
-
|
|
17887
|
+
attempt++;
|
|
17881
17888
|
}
|
|
17889
|
+
}
|
|
17890
|
+
return {
|
|
17891
|
+
ossFileId: "",
|
|
17892
|
+
ossToken: ""
|
|
17882
17893
|
};
|
|
17883
|
-
return tryUpload(infoIndex);
|
|
17884
17894
|
};
|
|
17885
17895
|
const coverInfos = await Promise.all(params.banners.map((it, idx)=>uploadFile(it, idx)));
|
|
17886
17896
|
const invalidUpload = coverInfos.find((it)=>"" === it.ossToken || "" == it.ossFileId);
|
|
@@ -18225,7 +18235,7 @@ var __webpack_exports__ = {};
|
|
|
18225
18235
|
if ("mockApi" === params.actionType) return xiaohongshuPublish_mock_mockAction(task, params);
|
|
18226
18236
|
return executeAction(xiaohongshuPublish_mock_mockAction, xiaohongshuPublish_rpa_rpaAction)(task, params);
|
|
18227
18237
|
};
|
|
18228
|
-
var package_namespaceObject = JSON.parse('{"i8":"1.2.16-beta.
|
|
18238
|
+
var package_namespaceObject = JSON.parse('{"i8":"1.2.16-beta.5"}');
|
|
18229
18239
|
class Action {
|
|
18230
18240
|
constructor(task){
|
|
18231
18241
|
this.task = task;
|