@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.
@@ -75,6 +75,9 @@ export declare const ShipinhaoPublishParamsSchema: z.ZodObject<{
75
75
  1: "1";
76
76
  2: "2";
77
77
  }>>;
78
+ tagInfo: z.ZodOptional<z.ZodObject<{
79
+ tagType: z.ZodNumber;
80
+ }, z.core.$loose>>;
78
81
  }, z.core.$strip>;
79
82
  export type ShipinhaoPublishParams = z.infer<typeof ShipinhaoPublishParamsSchema>;
80
83
  export type PublishAction = CommonAction<ShipinhaoPublishParams, string>;
package/dist/bundle.js CHANGED
@@ -12492,7 +12492,7 @@ var __webpack_exports__ = {};
12492
12492
  i8: "0.2.0"
12493
12493
  };
12494
12494
  var package_namespaceObject_0 = {
12495
- i8: "4.1.3"
12495
+ i8: "4.1.4"
12496
12496
  };
12497
12497
  const external_node_fs_namespaceObject = require("node:fs");
12498
12498
  var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
@@ -43790,6 +43790,9 @@ var __webpack_exports__ = {};
43790
43790
  function mock_getTimeStamp(length) {
43791
43791
  return Date.now().toString().substring(0, length);
43792
43792
  }
43793
+ function normalizePublishContent(content) {
43794
+ return content.replace(/\r\n/g, "\n").replace(/\n{4,}/g, "\n\n");
43795
+ }
43793
43796
  async function mock_getUserInfo(cookies, http) {
43794
43797
  const requestBody = {
43795
43798
  timestamp: mock_getTimeStamp(13),
@@ -43929,6 +43932,7 @@ var __webpack_exports__ = {};
43929
43932
  async function publishDynamic(cookies, uin, fingerPrintDeviceId, aId, proxyHttp, confParams, params) {
43930
43933
  const topicList = params.topic || [];
43931
43934
  const location = params.address ? buildLocation(params.address) : {};
43935
+ const normalizedContent = normalizePublishContent(params.content);
43932
43936
  const publishData = {
43933
43937
  clientid: generateUUID(),
43934
43938
  timestamp: mock_getTimeStamp(13),
@@ -43951,7 +43955,7 @@ var __webpack_exports__ = {};
43951
43955
  handleFlag: 2,
43952
43956
  topics: topicList,
43953
43957
  objectDesc: {
43954
- description: buildDescription(params.content, topicList),
43958
+ description: buildDescription(normalizedContent, topicList),
43955
43959
  event: {},
43956
43960
  extReading: {
43957
43961
  ...params.link,
@@ -43967,7 +43971,7 @@ var __webpack_exports__ = {};
43967
43971
  shortTitle: "",
43968
43972
  finderNewlifeDesc: {
43969
43973
  richTextTitle: params.title,
43970
- richTextJson: buildRichTextJson(params.title, params.content),
43974
+ richTextJson: buildRichTextJson(params.title, normalizedContent),
43971
43975
  fromRichPublisher: 1
43972
43976
  }
43973
43977
  }
@@ -43975,7 +43979,7 @@ var __webpack_exports__ = {};
43975
43979
  if (params.scheduledPublish) publishData.effectiveTime = params.scheduledPublish;
43976
43980
  const objectDesc = publishData.objectDesc;
43977
43981
  if (topicList.length) objectDesc.topic = {
43978
- finderTopicInfo: buildTopicXml(params.content, topicList)
43982
+ finderTopicInfo: buildTopicXml(normalizedContent, topicList)
43979
43983
  };
43980
43984
  if (params.collection) objectDesc.topic = {
43981
43985
  ..."object" == typeof objectDesc.topic && null !== objectDesc.topic ? objectDesc.topic : {},
@@ -44878,7 +44882,10 @@ var __webpack_exports__ = {};
44878
44882
  publishType: classic_schemas_enum([
44879
44883
  "1",
44880
44884
  "2"
44881
- ]).optional()
44885
+ ]).optional(),
44886
+ tagInfo: looseObject({
44887
+ tagType: classic_schemas_number().int()
44888
+ }).optional()
44882
44889
  });
44883
44890
  const shipinhaoPublish = async (task, params)=>{
44884
44891
  task.logger.info(`shipinhaoPublish actionType: ${params.actionType}`);