@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/actions/shipinhaoPublish/index.d.ts +3 -0
- package/dist/bundle.js +14 -10
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +14 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/*! For license information please see bundle.js.LICENSE.txt */
|
|
2
|
-
|
|
3
|
-
!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]="1cb89ac2-09ee-5899-babb-7c5e06a9879a")}catch(e){}}();
|
|
4
2
|
var __webpack_modules__ = {
|
|
5
3
|
"../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/helpers.js": function(__unused_webpack_module, exports1, __webpack_require__) {
|
|
6
4
|
"use strict";
|
|
@@ -12494,7 +12492,7 @@ var __webpack_exports__ = {};
|
|
|
12494
12492
|
i8: "0.2.0"
|
|
12495
12493
|
};
|
|
12496
12494
|
var package_namespaceObject_0 = {
|
|
12497
|
-
i8: "4.1.
|
|
12495
|
+
i8: "4.1.4"
|
|
12498
12496
|
};
|
|
12499
12497
|
const external_node_fs_namespaceObject = require("node:fs");
|
|
12500
12498
|
var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
|
|
@@ -27461,7 +27459,7 @@ var __webpack_exports__ = {};
|
|
|
27461
27459
|
_message = "连接被重置,请检查网络或稍后重试!";
|
|
27462
27460
|
break;
|
|
27463
27461
|
case "ENOTFOUND":
|
|
27464
|
-
_message = "
|
|
27462
|
+
_message = "域名解析失败,请检查网络或稍后重试!";
|
|
27465
27463
|
break;
|
|
27466
27464
|
case "ETIMEDOUT":
|
|
27467
27465
|
_message = "网络请求超时,请检查网络连接!";
|
|
@@ -43792,6 +43790,9 @@ var __webpack_exports__ = {};
|
|
|
43792
43790
|
function mock_getTimeStamp(length) {
|
|
43793
43791
|
return Date.now().toString().substring(0, length);
|
|
43794
43792
|
}
|
|
43793
|
+
function normalizePublishContent(content) {
|
|
43794
|
+
return content.replace(/\r\n/g, "\n").replace(/\n{4,}/g, "\n\n");
|
|
43795
|
+
}
|
|
43795
43796
|
async function mock_getUserInfo(cookies, http) {
|
|
43796
43797
|
const requestBody = {
|
|
43797
43798
|
timestamp: mock_getTimeStamp(13),
|
|
@@ -43931,6 +43932,7 @@ var __webpack_exports__ = {};
|
|
|
43931
43932
|
async function publishDynamic(cookies, uin, fingerPrintDeviceId, aId, proxyHttp, confParams, params) {
|
|
43932
43933
|
const topicList = params.topic || [];
|
|
43933
43934
|
const location = params.address ? buildLocation(params.address) : {};
|
|
43935
|
+
const normalizedContent = normalizePublishContent(params.content);
|
|
43934
43936
|
const publishData = {
|
|
43935
43937
|
clientid: generateUUID(),
|
|
43936
43938
|
timestamp: mock_getTimeStamp(13),
|
|
@@ -43953,7 +43955,7 @@ var __webpack_exports__ = {};
|
|
|
43953
43955
|
handleFlag: 2,
|
|
43954
43956
|
topics: topicList,
|
|
43955
43957
|
objectDesc: {
|
|
43956
|
-
description: buildDescription(
|
|
43958
|
+
description: buildDescription(normalizedContent, topicList),
|
|
43957
43959
|
event: {},
|
|
43958
43960
|
extReading: {
|
|
43959
43961
|
...params.link,
|
|
@@ -43969,7 +43971,7 @@ var __webpack_exports__ = {};
|
|
|
43969
43971
|
shortTitle: "",
|
|
43970
43972
|
finderNewlifeDesc: {
|
|
43971
43973
|
richTextTitle: params.title,
|
|
43972
|
-
richTextJson: buildRichTextJson(params.title,
|
|
43974
|
+
richTextJson: buildRichTextJson(params.title, normalizedContent),
|
|
43973
43975
|
fromRichPublisher: 1
|
|
43974
43976
|
}
|
|
43975
43977
|
}
|
|
@@ -43977,7 +43979,7 @@ var __webpack_exports__ = {};
|
|
|
43977
43979
|
if (params.scheduledPublish) publishData.effectiveTime = params.scheduledPublish;
|
|
43978
43980
|
const objectDesc = publishData.objectDesc;
|
|
43979
43981
|
if (topicList.length) objectDesc.topic = {
|
|
43980
|
-
finderTopicInfo: buildTopicXml(
|
|
43982
|
+
finderTopicInfo: buildTopicXml(normalizedContent, topicList)
|
|
43981
43983
|
};
|
|
43982
43984
|
if (params.collection) objectDesc.topic = {
|
|
43983
43985
|
..."object" == typeof objectDesc.topic && null !== objectDesc.topic ? objectDesc.topic : {},
|
|
@@ -44880,7 +44882,10 @@ var __webpack_exports__ = {};
|
|
|
44880
44882
|
publishType: classic_schemas_enum([
|
|
44881
44883
|
"1",
|
|
44882
44884
|
"2"
|
|
44883
|
-
]).optional()
|
|
44885
|
+
]).optional(),
|
|
44886
|
+
tagInfo: looseObject({
|
|
44887
|
+
tagType: classic_schemas_number().int()
|
|
44888
|
+
}).optional()
|
|
44884
44889
|
});
|
|
44885
44890
|
const shipinhaoPublish = async (task, params)=>{
|
|
44886
44891
|
task.logger.info(`shipinhaoPublish actionType: ${params.actionType}`);
|
|
@@ -52573,5 +52578,4 @@ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_targe
|
|
|
52573
52578
|
value: true
|
|
52574
52579
|
});
|
|
52575
52580
|
|
|
52576
|
-
//# sourceMappingURL=bundle.js.map
|
|
52577
|
-
//# debugId=1cb89ac2-09ee-5899-babb-7c5e06a9879a
|
|
52581
|
+
//# sourceMappingURL=bundle.js.map
|