@iflyrpa/actions 4.1.2-beta.0 → 4.1.2
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 -11
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +13 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -11
- 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,5 @@
|
|
|
1
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]="
|
|
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
3
|
import * as __WEBPACK_EXTERNAL_MODULE_crypto__ from "crypto";
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE_fs__ from "fs";
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_package_json_58ae5f06__ from "@iflyrpa/share/package.json";
|
|
@@ -4352,7 +4352,9 @@ function __webpack_require__(moduleId) {
|
|
|
4352
4352
|
return module;
|
|
4353
4353
|
};
|
|
4354
4354
|
})();
|
|
4355
|
-
var package_namespaceObject =
|
|
4355
|
+
var package_namespaceObject = {
|
|
4356
|
+
i8: "4.1.2"
|
|
4357
|
+
};
|
|
4356
4358
|
const USER_MESSAGE = {
|
|
4357
4359
|
PROXY_UNAVAILABLE: "代理暂时不可用,请稍后重试或使用本地IP",
|
|
4358
4360
|
NETWORK_ERROR: "网络异常,请稍后重试",
|
|
@@ -4384,6 +4386,7 @@ function classifyPublishError(handledError) {
|
|
|
4384
4386
|
};
|
|
4385
4387
|
}
|
|
4386
4388
|
const RPA_ERROR_WEBHOOK_URL = "https://open.xfchat.iflytek.com/open-apis/bot/v2/hook/d202c0dc-5af5-40bc-83ed-abc677caa4a5";
|
|
4389
|
+
const AUTH_EXPIRED_MSG_PATTERN = /登录[^,。,.]{0,4}(过期|失效)|重新登录|未登录/;
|
|
4387
4390
|
const ALARM_THROTTLE_MS = 60000;
|
|
4388
4391
|
const lastSentAt = new Map();
|
|
4389
4392
|
const THROTTLE_MAP_MAX_KEYS = 500;
|
|
@@ -4405,6 +4408,12 @@ const buildFeishuPostMessage = (report)=>{
|
|
|
4405
4408
|
text: `平台:${report.platform || "未知平台"}`
|
|
4406
4409
|
}
|
|
4407
4410
|
],
|
|
4411
|
+
[
|
|
4412
|
+
{
|
|
4413
|
+
tag: "text",
|
|
4414
|
+
text: `版本:${package_namespaceObject.i8}`
|
|
4415
|
+
}
|
|
4416
|
+
],
|
|
4408
4417
|
[
|
|
4409
4418
|
{
|
|
4410
4419
|
tag: "text",
|
|
@@ -4469,6 +4478,7 @@ const buildFeishuPostMessage = (report)=>{
|
|
|
4469
4478
|
const reportFeishuAlarm = (report)=>{
|
|
4470
4479
|
try {
|
|
4471
4480
|
if ("alarm" !== report.level) return;
|
|
4481
|
+
if (report.msg && AUTH_EXPIRED_MSG_PATTERN.test(report.msg)) return;
|
|
4472
4482
|
const key = `${report.platform}|${report.source}|${report.stage}|${report.errorType}|${report.code ?? ""}`;
|
|
4473
4483
|
const now = Date.now();
|
|
4474
4484
|
const last = lastSentAt.get(key);
|
|
@@ -4835,14 +4845,6 @@ class Http {
|
|
|
4835
4845
|
this.logger?.debug(`[告警跳过] 本机地址不上报: ${fullUrl}`);
|
|
4836
4846
|
return;
|
|
4837
4847
|
}
|
|
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
4848
|
const rawMsg = "string" == typeof error.message && error.message.trim() ? error.message : "";
|
|
4847
4849
|
const baseMsg = rawMsg || `请求失败(无错误文案,code=${error.code ?? "unknown"})`;
|
|
4848
4850
|
const retriedSuffix = attempts > 0 ? `(已重试${attempts}次仍失败)` : "";
|
|
@@ -27415,4 +27417,4 @@ var __webpack_exports__version = package_namespaceObject.i8;
|
|
|
27415
27417
|
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
27418
|
|
|
27417
27419
|
//# sourceMappingURL=index.mjs.map
|
|
27418
|
-
//# debugId=
|
|
27420
|
+
//# debugId=2da70548-715d-5d5e-92ae-baa18080e8c0
|