@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
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]="e6c55e06-8312-5ee0-a6ce-352904a24137")}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";
|
|
@@ -4352,7 +4350,9 @@ function __webpack_require__(moduleId) {
|
|
|
4352
4350
|
return module;
|
|
4353
4351
|
};
|
|
4354
4352
|
})();
|
|
4355
|
-
var package_namespaceObject =
|
|
4353
|
+
var package_namespaceObject = {
|
|
4354
|
+
i8: "4.1.3"
|
|
4355
|
+
};
|
|
4356
4356
|
const USER_MESSAGE = {
|
|
4357
4357
|
PROXY_UNAVAILABLE: "代理暂时不可用,请稍后重试或使用本地IP",
|
|
4358
4358
|
NETWORK_ERROR: "网络异常,请稍后重试",
|
|
@@ -4384,6 +4384,7 @@ function classifyPublishError(handledError) {
|
|
|
4384
4384
|
};
|
|
4385
4385
|
}
|
|
4386
4386
|
const RPA_ERROR_WEBHOOK_URL = "https://open.xfchat.iflytek.com/open-apis/bot/v2/hook/d202c0dc-5af5-40bc-83ed-abc677caa4a5";
|
|
4387
|
+
const AUTH_EXPIRED_MSG_PATTERN = /登录[^,。,.]{0,4}(过期|失效)|重新登录|未登录/;
|
|
4387
4388
|
const ALARM_THROTTLE_MS = 60000;
|
|
4388
4389
|
const lastSentAt = new Map();
|
|
4389
4390
|
const THROTTLE_MAP_MAX_KEYS = 500;
|
|
@@ -4405,6 +4406,12 @@ const buildFeishuPostMessage = (report)=>{
|
|
|
4405
4406
|
text: `平台:${report.platform || "未知平台"}`
|
|
4406
4407
|
}
|
|
4407
4408
|
],
|
|
4409
|
+
[
|
|
4410
|
+
{
|
|
4411
|
+
tag: "text",
|
|
4412
|
+
text: `版本:${package_namespaceObject.i8}`
|
|
4413
|
+
}
|
|
4414
|
+
],
|
|
4408
4415
|
[
|
|
4409
4416
|
{
|
|
4410
4417
|
tag: "text",
|
|
@@ -4469,6 +4476,7 @@ const buildFeishuPostMessage = (report)=>{
|
|
|
4469
4476
|
const reportFeishuAlarm = (report)=>{
|
|
4470
4477
|
try {
|
|
4471
4478
|
if ("alarm" !== report.level) return;
|
|
4479
|
+
if (report.msg && AUTH_EXPIRED_MSG_PATTERN.test(report.msg)) return;
|
|
4472
4480
|
const key = `${report.platform}|${report.source}|${report.stage}|${report.errorType}|${report.code ?? ""}`;
|
|
4473
4481
|
const now = Date.now();
|
|
4474
4482
|
const last = lastSentAt.get(key);
|
|
@@ -4763,7 +4771,7 @@ class Http {
|
|
|
4763
4771
|
_message = "连接被重置,请检查网络或稍后重试!";
|
|
4764
4772
|
break;
|
|
4765
4773
|
case "ENOTFOUND":
|
|
4766
|
-
_message = "
|
|
4774
|
+
_message = "域名解析失败,请检查网络或稍后重试!";
|
|
4767
4775
|
break;
|
|
4768
4776
|
case "ETIMEDOUT":
|
|
4769
4777
|
_message = "网络请求超时,请检查网络连接!";
|
|
@@ -4835,14 +4843,6 @@ class Http {
|
|
|
4835
4843
|
this.logger?.debug(`[告警跳过] 本机地址不上报: ${fullUrl}`);
|
|
4836
4844
|
return;
|
|
4837
4845
|
}
|
|
4838
|
-
if (attempts < 3) {
|
|
4839
|
-
const isAuthExpired = 401 === status;
|
|
4840
|
-
const isTimeoutCanceled = "ERR_CANCELED" === axiosCode;
|
|
4841
|
-
if (isAuthExpired || isTimeoutCanceled) {
|
|
4842
|
-
this.logger?.debug(`[告警跳过] 低重试次数(${attempts})的常见错误不上报: status=${status}, code=${error.code}, axiosCode=${axiosCode}, url=${fullUrl}`);
|
|
4843
|
-
return;
|
|
4844
|
-
}
|
|
4845
|
-
}
|
|
4846
4846
|
const rawMsg = "string" == typeof error.message && error.message.trim() ? error.message : "";
|
|
4847
4847
|
const baseMsg = rawMsg || `请求失败(无错误文案,code=${error.code ?? "unknown"})`;
|
|
4848
4848
|
const retriedSuffix = attempts > 0 ? `(已重试${attempts}次仍失败)` : "";
|
|
@@ -27414,5 +27414,4 @@ class Action {
|
|
|
27414
27414
|
var __webpack_exports__version = package_namespaceObject.i8;
|
|
27415
27415
|
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 };
|
|
27416
27416
|
|
|
27417
|
-
//# sourceMappingURL=index.mjs.map
|
|
27418
|
-
//# debugId=e6c55e06-8312-5ee0-a6ce-352904a24137
|
|
27417
|
+
//# sourceMappingURL=index.mjs.map
|