@iflyrpa/actions 4.1.3 → 4.1.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/actions/shipinhaoPublish/index.d.ts +3 -0
- package/dist/bundle.js +12 -5
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +12 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4351,7 +4351,7 @@ function __webpack_require__(moduleId) {
|
|
|
4351
4351
|
};
|
|
4352
4352
|
})();
|
|
4353
4353
|
var package_namespaceObject = {
|
|
4354
|
-
i8: "4.1.
|
|
4354
|
+
i8: "4.1.4"
|
|
4355
4355
|
};
|
|
4356
4356
|
const USER_MESSAGE = {
|
|
4357
4357
|
PROXY_UNAVAILABLE: "代理暂时不可用,请稍后重试或使用本地IP",
|
|
@@ -18637,6 +18637,9 @@ function generateUUID() {
|
|
|
18637
18637
|
function mock_getTimeStamp(length) {
|
|
18638
18638
|
return Date.now().toString().substring(0, length);
|
|
18639
18639
|
}
|
|
18640
|
+
function normalizePublishContent(content) {
|
|
18641
|
+
return content.replace(/\r\n/g, "\n").replace(/\n{4,}/g, "\n\n");
|
|
18642
|
+
}
|
|
18640
18643
|
async function mock_getUserInfo(cookies, http) {
|
|
18641
18644
|
const requestBody = {
|
|
18642
18645
|
timestamp: mock_getTimeStamp(13),
|
|
@@ -18776,6 +18779,7 @@ function buildDescription(content, topics) {
|
|
|
18776
18779
|
async function publishDynamic(cookies, uin, fingerPrintDeviceId, aId, proxyHttp, confParams, params) {
|
|
18777
18780
|
const topicList = params.topic || [];
|
|
18778
18781
|
const location = params.address ? buildLocation(params.address) : {};
|
|
18782
|
+
const normalizedContent = normalizePublishContent(params.content);
|
|
18779
18783
|
const publishData = {
|
|
18780
18784
|
clientid: generateUUID(),
|
|
18781
18785
|
timestamp: mock_getTimeStamp(13),
|
|
@@ -18798,7 +18802,7 @@ async function publishDynamic(cookies, uin, fingerPrintDeviceId, aId, proxyHttp,
|
|
|
18798
18802
|
handleFlag: 2,
|
|
18799
18803
|
topics: topicList,
|
|
18800
18804
|
objectDesc: {
|
|
18801
|
-
description: buildDescription(
|
|
18805
|
+
description: buildDescription(normalizedContent, topicList),
|
|
18802
18806
|
event: {},
|
|
18803
18807
|
extReading: {
|
|
18804
18808
|
...params.link,
|
|
@@ -18814,7 +18818,7 @@ async function publishDynamic(cookies, uin, fingerPrintDeviceId, aId, proxyHttp,
|
|
|
18814
18818
|
shortTitle: "",
|
|
18815
18819
|
finderNewlifeDesc: {
|
|
18816
18820
|
richTextTitle: params.title,
|
|
18817
|
-
richTextJson: buildRichTextJson(params.title,
|
|
18821
|
+
richTextJson: buildRichTextJson(params.title, normalizedContent),
|
|
18818
18822
|
fromRichPublisher: 1
|
|
18819
18823
|
}
|
|
18820
18824
|
}
|
|
@@ -18822,7 +18826,7 @@ async function publishDynamic(cookies, uin, fingerPrintDeviceId, aId, proxyHttp,
|
|
|
18822
18826
|
if (params.scheduledPublish) publishData.effectiveTime = params.scheduledPublish;
|
|
18823
18827
|
const objectDesc = publishData.objectDesc;
|
|
18824
18828
|
if (topicList.length) objectDesc.topic = {
|
|
18825
|
-
finderTopicInfo: buildTopicXml(
|
|
18829
|
+
finderTopicInfo: buildTopicXml(normalizedContent, topicList)
|
|
18826
18830
|
};
|
|
18827
18831
|
if (params.collection) objectDesc.topic = {
|
|
18828
18832
|
..."object" == typeof objectDesc.topic && null !== objectDesc.topic ? objectDesc.topic : {},
|
|
@@ -19725,7 +19729,10 @@ const ShipinhaoPublishParamsSchema = ActionCommonParamsSchema.extend({
|
|
|
19725
19729
|
publishType: schemas_enum([
|
|
19726
19730
|
"1",
|
|
19727
19731
|
"2"
|
|
19728
|
-
]).optional()
|
|
19732
|
+
]).optional(),
|
|
19733
|
+
tagInfo: looseObject({
|
|
19734
|
+
tagType: schemas_number().int()
|
|
19735
|
+
}).optional()
|
|
19729
19736
|
});
|
|
19730
19737
|
const shipinhaoPublish = async (task, params)=>{
|
|
19731
19738
|
task.logger.info(`shipinhaoPublish actionType: ${params.actionType}`);
|