@iflyrpa/actions 4.1.0-beta.1 → 4.1.0-beta.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/bundle.js +23 -15
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +21 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
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]="47f14957-3de9-5f22-92f5-89210082b96d")}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,7 @@ function __webpack_require__(moduleId) {
|
|
|
4352
4352
|
return module;
|
|
4353
4353
|
};
|
|
4354
4354
|
})();
|
|
4355
|
-
var package_namespaceObject = JSON.parse('{"i8":"4.1.0-beta.
|
|
4355
|
+
var package_namespaceObject = JSON.parse('{"i8":"4.1.0-beta.2"}');
|
|
4356
4356
|
const USER_MESSAGE = {
|
|
4357
4357
|
PROXY_UNAVAILABLE: "代理暂时不可用,请稍后重试或使用本地IP",
|
|
4358
4358
|
NETWORK_ERROR: "网络异常,请稍后重试",
|
|
@@ -4654,7 +4654,14 @@ const HTTP_STATUS_MESSAGE = {
|
|
|
4654
4654
|
};
|
|
4655
4655
|
class Http {
|
|
4656
4656
|
static handleApiError(error) {
|
|
4657
|
-
if (error && "object" == typeof error && "code" in error && "message" in error)
|
|
4657
|
+
if (error && "object" == typeof error && "code" in error && "message" in error) {
|
|
4658
|
+
const resp = error;
|
|
4659
|
+
if ("string" != typeof resp.message || !resp.message.trim()) return {
|
|
4660
|
+
...resp,
|
|
4661
|
+
message: USER_MESSAGE.SYSTEM_ERROR
|
|
4662
|
+
};
|
|
4663
|
+
return resp;
|
|
4664
|
+
}
|
|
4658
4665
|
return {
|
|
4659
4666
|
code: 500,
|
|
4660
4667
|
message: USER_MESSAGE.SYSTEM_ERROR,
|
|
@@ -4804,17 +4811,20 @@ class Http {
|
|
|
4804
4811
|
const status = error.extra?.alarmStatus;
|
|
4805
4812
|
const axiosCode = error.extra?.alarmErrorCode;
|
|
4806
4813
|
const method = (config.method || "get").toUpperCase();
|
|
4807
|
-
const
|
|
4814
|
+
const baseURL = config.baseURL || this.apiClient.defaults.baseURL || "";
|
|
4815
|
+
const fullUrl = config.url ? /^https?:\/\//.test(config.url) ? config.url : `${baseURL.replace(/\/$/, "")}${config.url}` : baseURL || "-";
|
|
4816
|
+
const rawMsg = "string" == typeof error.message && error.message.trim() ? error.message : "";
|
|
4817
|
+
const baseMsg = rawMsg || `请求失败(无错误文案,code=${error.code ?? "unknown"})`;
|
|
4808
4818
|
const retriedSuffix = attempts > 0 ? `(已重试${attempts}次仍失败)` : "";
|
|
4809
4819
|
reportFeishuAlarm({
|
|
4810
4820
|
level: status && ALARM_STATUS.has(status) ? "alarm" : "warning",
|
|
4811
|
-
platform:
|
|
4821
|
+
platform: "@iflyrpa/playwright",
|
|
4812
4822
|
source: "http",
|
|
4813
|
-
stage: `${method} ${
|
|
4823
|
+
stage: `${method} ${fullUrl}`,
|
|
4814
4824
|
errorType: status ? `HTTP_${status}` : axiosCode || "NETWORK_ERROR",
|
|
4815
4825
|
code: error.code,
|
|
4816
|
-
msg: `${
|
|
4817
|
-
url:
|
|
4826
|
+
msg: `${baseMsg}${retriedSuffix}`,
|
|
4827
|
+
url: "-" !== fullUrl ? fullUrl : void 0,
|
|
4818
4828
|
title: "RPA接口异常"
|
|
4819
4829
|
});
|
|
4820
4830
|
}
|
|
@@ -20745,8 +20755,8 @@ const shipinhaoPublishVideo_mock_mockAction = async (task, params)=>{
|
|
|
20745
20755
|
const resultCode = publishResult.data?.baseResp?.errcode ?? publishResult.errCode;
|
|
20746
20756
|
const resultMsg = publishResult.data?.baseResp?.errmsg ?? (0 === resultCode ? "发布成功" : `发布失败(errCode=${resultCode})`);
|
|
20747
20757
|
if (0 === resultCode) {
|
|
20748
|
-
const publishId = extractEncFileKey(
|
|
20749
|
-
if (!publishId) task.logger.error(`[shipinhaoPublishVideo] 封面 DownloadURL 中未解析到 encfilekey,关联 id 为空: ${
|
|
20758
|
+
const publishId = extractEncFileKey(verticalCoverUpload.downloadUrl);
|
|
20759
|
+
if (!publishId) task.logger.error(`[shipinhaoPublishVideo] 封面 DownloadURL 中未解析到 encfilekey,关联 id 为空: ${verticalCoverUpload.downloadUrl}`);
|
|
20750
20760
|
await updateTaskState?.({
|
|
20751
20761
|
state: __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.TaskState.SUCCESS,
|
|
20752
20762
|
result: {
|
|
@@ -27365,4 +27375,4 @@ var __webpack_exports__version = package_namespaceObject.i8;
|
|
|
27365
27375
|
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 };
|
|
27366
27376
|
|
|
27367
27377
|
//# sourceMappingURL=index.mjs.map
|
|
27368
|
-
//# debugId=
|
|
27378
|
+
//# debugId=47f14957-3de9-5f22-92f5-89210082b96d
|