@iflyrpa/actions 4.1.0-beta.2 → 4.1.0-beta.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/bundle.js +27 -6
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +28 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -7
- package/dist/index.mjs.map +1 -1
- package/dist/utils/http.d.ts +11 -0
- package/package.json +2 -2
package/dist/index.js
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]="eab7e6bf-8230-5cac-87e0-bda79dd9176d")}catch(e){}}();
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
4
|
"./src/utils/XhsXsCommonEnc.js": function(module) {
|
|
5
5
|
var encrypt_lookup = [
|
|
@@ -4403,7 +4403,7 @@ var __webpack_exports__ = {};
|
|
|
4403
4403
|
});
|
|
4404
4404
|
const package_json_namespaceObject = require("@iflyrpa/share/package.json");
|
|
4405
4405
|
var package_json_default = /*#__PURE__*/ __webpack_require__.n(package_json_namespaceObject);
|
|
4406
|
-
var package_namespaceObject = JSON.parse('{"i8":"4.1.0-beta.
|
|
4406
|
+
var package_namespaceObject = JSON.parse('{"i8":"4.1.0-beta.3"}');
|
|
4407
4407
|
const share_namespaceObject = require("@iflyrpa/share");
|
|
4408
4408
|
const external_node_fs_namespaceObject = require("node:fs");
|
|
4409
4409
|
var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
|
|
@@ -4685,6 +4685,19 @@ var __webpack_exports__ = {};
|
|
|
4685
4685
|
461,
|
|
4686
4686
|
471
|
|
4687
4687
|
]);
|
|
4688
|
+
function isLocalAddress(url) {
|
|
4689
|
+
let hostname;
|
|
4690
|
+
try {
|
|
4691
|
+
hostname = new URL(url).hostname.toLowerCase();
|
|
4692
|
+
} catch {
|
|
4693
|
+
return false;
|
|
4694
|
+
}
|
|
4695
|
+
if ("localhost" === hostname || "::1" === hostname || "[::1]" === hostname) return true;
|
|
4696
|
+
if (hostname.endsWith(".localhost") || hostname.endsWith(".local")) return true;
|
|
4697
|
+
if (/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(hostname)) return true;
|
|
4698
|
+
if ("0.0.0.0" === hostname) return true;
|
|
4699
|
+
return false;
|
|
4700
|
+
}
|
|
4688
4701
|
const HTTP_STATUS_MESSAGE = {
|
|
4689
4702
|
400: "请求参数错误,请检查参数格式是否正确!",
|
|
4690
4703
|
401: "登录状态已失效,请重新登录后重试!",
|
|
@@ -4879,7 +4892,15 @@ var __webpack_exports__ = {};
|
|
|
4879
4892
|
const axiosCode = error.extra?.alarmErrorCode;
|
|
4880
4893
|
const method = (config.method || "get").toUpperCase();
|
|
4881
4894
|
const baseURL = config.baseURL || this.apiClient.defaults.baseURL || "";
|
|
4882
|
-
const fullUrl = config.url ? /^https?:\/\//.test(config.url) ? config.url : `${baseURL.replace(/\/$/, "")}${config.url}` : baseURL
|
|
4895
|
+
const fullUrl = config.url ? /^https?:\/\//.test(config.url) ? config.url : `${baseURL.replace(/\/$/, "")}${config.url}` : baseURL;
|
|
4896
|
+
if (!fullUrl) {
|
|
4897
|
+
this.logger?.debug(`[告警跳过] 请求失败但无 URL,不上报: ${error.message}`);
|
|
4898
|
+
return;
|
|
4899
|
+
}
|
|
4900
|
+
if (isLocalAddress(fullUrl)) {
|
|
4901
|
+
this.logger?.debug(`[告警跳过] 本机地址不上报: ${fullUrl}`);
|
|
4902
|
+
return;
|
|
4903
|
+
}
|
|
4883
4904
|
const rawMsg = "string" == typeof error.message && error.message.trim() ? error.message : "";
|
|
4884
4905
|
const baseMsg = rawMsg || `请求失败(无错误文案,code=${error.code ?? "unknown"})`;
|
|
4885
4906
|
const retriedSuffix = attempts > 0 ? `(已重试${attempts}次仍失败)` : "";
|
|
@@ -4891,7 +4912,7 @@ var __webpack_exports__ = {};
|
|
|
4891
4912
|
errorType: status ? `HTTP_${status}` : axiosCode || "NETWORK_ERROR",
|
|
4892
4913
|
code: error.code,
|
|
4893
4914
|
msg: `${baseMsg}${retriedSuffix}`,
|
|
4894
|
-
url:
|
|
4915
|
+
url: fullUrl,
|
|
4895
4916
|
title: "RPA接口异常"
|
|
4896
4917
|
});
|
|
4897
4918
|
}
|
|
@@ -6060,7 +6081,7 @@ var __webpack_exports__ = {};
|
|
|
6060
6081
|
const cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
|
|
6061
6082
|
const regexes_base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
|
|
6062
6083
|
const regexes_base64url = /^[A-Za-z0-9_-]*$/;
|
|
6063
|
-
const
|
|
6084
|
+
const regexes_hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
|
|
6064
6085
|
const e164 = /^\+(?:[0-9]){6,14}[0-9]$/;
|
|
6065
6086
|
const dateSource = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";
|
|
6066
6087
|
const regexes_date = /*@__PURE__*/ new RegExp(`^${dateSource}$`);
|
|
@@ -6656,7 +6677,7 @@ var __webpack_exports__ = {};
|
|
|
6656
6677
|
code: "invalid_format",
|
|
6657
6678
|
format: "url",
|
|
6658
6679
|
note: "Invalid hostname",
|
|
6659
|
-
pattern:
|
|
6680
|
+
pattern: regexes_hostname.source,
|
|
6660
6681
|
input: payload.value,
|
|
6661
6682
|
inst,
|
|
6662
6683
|
continue: !def.abort
|
|
@@ -27461,4 +27482,4 @@ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_targe
|
|
|
27461
27482
|
});
|
|
27462
27483
|
|
|
27463
27484
|
//# sourceMappingURL=index.js.map
|
|
27464
|
-
//# debugId=
|
|
27485
|
+
//# debugId=eab7e6bf-8230-5cac-87e0-bda79dd9176d
|