@iflyrpa/actions 4.1.2-beta.0 → 4.1.3
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/toutiaoPublish/index.d.ts +1 -1
- package/dist/bundle.js +13 -14
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +13 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -14
- package/dist/index.mjs.map +1 -1
- package/dist/utils/feishuAlarm.d.ts +3 -1
- package/package.json +1 -1
|
@@ -76,7 +76,7 @@ export declare const ToutiaoPublishParamsSchema: z.ZodObject<{
|
|
|
76
76
|
}, z.core.$strip>;
|
|
77
77
|
export type ToutiaoPublishParams = z.infer<typeof ToutiaoPublishParamsSchema>;
|
|
78
78
|
export declare const COVER_TYPE: Record<CoverType, number>;
|
|
79
|
-
export declare const getAddTypeValue: (toutiaoAd: ToutiaoPublishParams["settingInfo"]["toutiaoAd"]) =>
|
|
79
|
+
export declare const getAddTypeValue: (toutiaoAd: ToutiaoPublishParams["settingInfo"]["toutiaoAd"]) => 2 | 3;
|
|
80
80
|
export type PublishAction = CommonAction<ToutiaoPublishParams, string>;
|
|
81
81
|
export declare const toutiaoPublish: PublishAction;
|
|
82
82
|
export {};
|
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]="60b641cd-3a59-5bee-b859-95ffdbb4ec6e")}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";
|
|
@@ -12493,7 +12491,9 @@ var __webpack_exports__ = {};
|
|
|
12493
12491
|
var package_namespaceObject = {
|
|
12494
12492
|
i8: "0.2.0"
|
|
12495
12493
|
};
|
|
12496
|
-
var package_namespaceObject_0 =
|
|
12494
|
+
var package_namespaceObject_0 = {
|
|
12495
|
+
i8: "4.1.3"
|
|
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);
|
|
12499
12499
|
const external_node_http_namespaceObject = require("node:http");
|
|
@@ -27071,6 +27071,7 @@ var __webpack_exports__ = {};
|
|
|
27071
27071
|
};
|
|
27072
27072
|
}
|
|
27073
27073
|
const RPA_ERROR_WEBHOOK_URL = "https://open.xfchat.iflytek.com/open-apis/bot/v2/hook/d202c0dc-5af5-40bc-83ed-abc677caa4a5";
|
|
27074
|
+
const AUTH_EXPIRED_MSG_PATTERN = /登录[^,。,.]{0,4}(过期|失效)|重新登录|未登录/;
|
|
27074
27075
|
const ALARM_THROTTLE_MS = 60000;
|
|
27075
27076
|
const lastSentAt = new Map();
|
|
27076
27077
|
const THROTTLE_MAP_MAX_KEYS = 500;
|
|
@@ -27092,6 +27093,12 @@ var __webpack_exports__ = {};
|
|
|
27092
27093
|
text: `平台:${report.platform || "未知平台"}`
|
|
27093
27094
|
}
|
|
27094
27095
|
],
|
|
27096
|
+
[
|
|
27097
|
+
{
|
|
27098
|
+
tag: "text",
|
|
27099
|
+
text: `版本:${package_namespaceObject_0.i8}`
|
|
27100
|
+
}
|
|
27101
|
+
],
|
|
27095
27102
|
[
|
|
27096
27103
|
{
|
|
27097
27104
|
tag: "text",
|
|
@@ -27156,6 +27163,7 @@ var __webpack_exports__ = {};
|
|
|
27156
27163
|
const reportFeishuAlarm = (report)=>{
|
|
27157
27164
|
try {
|
|
27158
27165
|
if ("alarm" !== report.level) return;
|
|
27166
|
+
if (report.msg && AUTH_EXPIRED_MSG_PATTERN.test(report.msg)) return;
|
|
27159
27167
|
const key = `${report.platform}|${report.source}|${report.stage}|${report.errorType}|${report.code ?? ""}`;
|
|
27160
27168
|
const now = Date.now();
|
|
27161
27169
|
const last = lastSentAt.get(key);
|
|
@@ -27451,7 +27459,7 @@ var __webpack_exports__ = {};
|
|
|
27451
27459
|
_message = "连接被重置,请检查网络或稍后重试!";
|
|
27452
27460
|
break;
|
|
27453
27461
|
case "ENOTFOUND":
|
|
27454
|
-
_message = "
|
|
27462
|
+
_message = "域名解析失败,请检查网络或稍后重试!";
|
|
27455
27463
|
break;
|
|
27456
27464
|
case "ETIMEDOUT":
|
|
27457
27465
|
_message = "网络请求超时,请检查网络连接!";
|
|
@@ -27523,14 +27531,6 @@ var __webpack_exports__ = {};
|
|
|
27523
27531
|
this.logger?.debug(`[告警跳过] 本机地址不上报: ${fullUrl}`);
|
|
27524
27532
|
return;
|
|
27525
27533
|
}
|
|
27526
|
-
if (attempts < 3) {
|
|
27527
|
-
const isAuthExpired = 401 === status;
|
|
27528
|
-
const isTimeoutCanceled = "ERR_CANCELED" === axiosCode;
|
|
27529
|
-
if (isAuthExpired || isTimeoutCanceled) {
|
|
27530
|
-
this.logger?.debug(`[告警跳过] 低重试次数(${attempts})的常见错误不上报: status=${status}, code=${error.code}, axiosCode=${axiosCode}, url=${fullUrl}`);
|
|
27531
|
-
return;
|
|
27532
|
-
}
|
|
27533
|
-
}
|
|
27534
27534
|
const rawMsg = "string" == typeof error.message && error.message.trim() ? error.message : "";
|
|
27535
27535
|
const baseMsg = rawMsg || `请求失败(无错误文案,code=${error.code ?? "unknown"})`;
|
|
27536
27536
|
const retriedSuffix = attempts > 0 ? `(已重试${attempts}次仍失败)` : "";
|
|
@@ -52571,5 +52571,4 @@ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_targe
|
|
|
52571
52571
|
value: true
|
|
52572
52572
|
});
|
|
52573
52573
|
|
|
52574
|
-
//# sourceMappingURL=bundle.js.map
|
|
52575
|
-
//# debugId=60b641cd-3a59-5bee-b859-95ffdbb4ec6e
|
|
52574
|
+
//# sourceMappingURL=bundle.js.map
|