@iflyrpa/actions 4.1.2 → 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/index.mjs CHANGED
@@ -1,5 +1,3 @@
1
-
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2da70548-715d-5d5e-92ae-baa18080e8c0")}catch(e){}}();
3
1
  import * as __WEBPACK_EXTERNAL_MODULE_crypto__ from "crypto";
4
2
  import * as __WEBPACK_EXTERNAL_MODULE_fs__ from "fs";
5
3
  import * as __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_package_json_58ae5f06__ from "@iflyrpa/share/package.json";
@@ -4353,7 +4351,7 @@ function __webpack_require__(moduleId) {
4353
4351
  };
4354
4352
  })();
4355
4353
  var package_namespaceObject = {
4356
- i8: "4.1.2"
4354
+ i8: "4.1.4"
4357
4355
  };
4358
4356
  const USER_MESSAGE = {
4359
4357
  PROXY_UNAVAILABLE: "代理暂时不可用,请稍后重试或使用本地IP",
@@ -4773,7 +4771,7 @@ class Http {
4773
4771
  _message = "连接被重置,请检查网络或稍后重试!";
4774
4772
  break;
4775
4773
  case "ENOTFOUND":
4776
- _message = "域名解析失败,请检查 URL 是否正确!";
4774
+ _message = "域名解析失败,请检查网络或稍后重试!";
4777
4775
  break;
4778
4776
  case "ETIMEDOUT":
4779
4777
  _message = "网络请求超时,请检查网络连接!";
@@ -18639,6 +18637,9 @@ function generateUUID() {
18639
18637
  function mock_getTimeStamp(length) {
18640
18638
  return Date.now().toString().substring(0, length);
18641
18639
  }
18640
+ function normalizePublishContent(content) {
18641
+ return content.replace(/\r\n/g, "\n").replace(/\n{4,}/g, "\n\n");
18642
+ }
18642
18643
  async function mock_getUserInfo(cookies, http) {
18643
18644
  const requestBody = {
18644
18645
  timestamp: mock_getTimeStamp(13),
@@ -18778,6 +18779,7 @@ function buildDescription(content, topics) {
18778
18779
  async function publishDynamic(cookies, uin, fingerPrintDeviceId, aId, proxyHttp, confParams, params) {
18779
18780
  const topicList = params.topic || [];
18780
18781
  const location = params.address ? buildLocation(params.address) : {};
18782
+ const normalizedContent = normalizePublishContent(params.content);
18781
18783
  const publishData = {
18782
18784
  clientid: generateUUID(),
18783
18785
  timestamp: mock_getTimeStamp(13),
@@ -18800,7 +18802,7 @@ async function publishDynamic(cookies, uin, fingerPrintDeviceId, aId, proxyHttp,
18800
18802
  handleFlag: 2,
18801
18803
  topics: topicList,
18802
18804
  objectDesc: {
18803
- description: buildDescription(params.content, topicList),
18805
+ description: buildDescription(normalizedContent, topicList),
18804
18806
  event: {},
18805
18807
  extReading: {
18806
18808
  ...params.link,
@@ -18816,7 +18818,7 @@ async function publishDynamic(cookies, uin, fingerPrintDeviceId, aId, proxyHttp,
18816
18818
  shortTitle: "",
18817
18819
  finderNewlifeDesc: {
18818
18820
  richTextTitle: params.title,
18819
- richTextJson: buildRichTextJson(params.title, params.content),
18821
+ richTextJson: buildRichTextJson(params.title, normalizedContent),
18820
18822
  fromRichPublisher: 1
18821
18823
  }
18822
18824
  }
@@ -18824,7 +18826,7 @@ async function publishDynamic(cookies, uin, fingerPrintDeviceId, aId, proxyHttp,
18824
18826
  if (params.scheduledPublish) publishData.effectiveTime = params.scheduledPublish;
18825
18827
  const objectDesc = publishData.objectDesc;
18826
18828
  if (topicList.length) objectDesc.topic = {
18827
- finderTopicInfo: buildTopicXml(params.content, topicList)
18829
+ finderTopicInfo: buildTopicXml(normalizedContent, topicList)
18828
18830
  };
18829
18831
  if (params.collection) objectDesc.topic = {
18830
18832
  ..."object" == typeof objectDesc.topic && null !== objectDesc.topic ? objectDesc.topic : {},
@@ -19727,7 +19729,10 @@ const ShipinhaoPublishParamsSchema = ActionCommonParamsSchema.extend({
19727
19729
  publishType: schemas_enum([
19728
19730
  "1",
19729
19731
  "2"
19730
- ]).optional()
19732
+ ]).optional(),
19733
+ tagInfo: looseObject({
19734
+ tagType: schemas_number().int()
19735
+ }).optional()
19731
19736
  });
19732
19737
  const shipinhaoPublish = async (task, params)=>{
19733
19738
  task.logger.info(`shipinhaoPublish actionType: ${params.actionType}`);
@@ -27416,5 +27421,4 @@ class Action {
27416
27421
  var __webpack_exports__version = package_namespaceObject.i8;
27417
27422
  export { Action, ActionCommonParamsSchema, BaijiahaoPublishParamsSchema, BetaFlag, CollectionDetailSchema, ConfigDataSchema, DouyinCheckVerifyQrCodeParamsSchema, DouyinCreateCommentReplyParamsSchema, DouyinGetCollectionParamsSchema, DouyinGetCommentListParamsSchema, DouyinGetCommentReplyListParamsSchema, DouyinGetHotParamsSchema, DouyinGetLocationParamsSchema, DouyinGetMusicByCategoryParamsSchema, DouyinGetMusicCategoryParamsSchema, DouyinGetMusicParamsSchema, DouyinGetTopicsParamsSchema, DouyinGetVerifyQrCodeParamsSchema, DouyinGetWorkListParamsSchema, DouyinPublishParamsSchema, FetchArticlesDataSchema, FetchArticlesParamsSchema, Http, ProxyAgent, SearchAccountInfoParamsSchema, SessionCheckResultSchema, ShipinhaoCheckLinkValidateParamsSchema, ShipinhaoGetLocationParamsSchema, ShipinhaoGetMsgParamsSchema, ShipinhaoPublishParamsSchema, ShipinhaoPublishVideoParamsSchema, ShipinhaoSendMsgParamsSchema, ToutiaoPublishParamsSchema, UnreadCountSchema, WeixinPublishParamsSchema, WxBjhSessionParamsSchema, XhsWebSearchParamsSchema, XiaohongshuPublishParamsSchema, bjhConfigDataSchema, douyinConfigDataSchema, getFileState, reportLogger, rpaAction_Server_Mock, shipinhaoConfigDataSchema, ttConfigDataSchema, wxConfigDataSchema, xhsConfigDataSchema, __webpack_exports__version as version };
27418
27423
 
27419
- //# sourceMappingURL=index.mjs.map
27420
- //# debugId=2da70548-715d-5d5e-92ae-baa18080e8c0
27424
+ //# sourceMappingURL=index.mjs.map