x-error-lib 0.5.15 → 0.5.16
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/{i18n-en.kvizsg7o.js → i18n-en.l0to9ld7.js} +5 -2
- package/dist/{i18n-zhHans.f0r8mkdo.js → i18n-zhHans.funn3gdz.js} +5 -2
- package/dist/index.js +14 -10
- package/dist/rolldown-runtime.msh1uh5g.js +11 -0
- package/package.json +12 -15
- package/dist/en.jczyw0vz.js +0 -2
- package/dist/zhHans.ctyq842g.js +0 -2
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { t as e } from "./rolldown-runtime.msh1uh5g.js";
|
|
2
|
+
//#region src/i18n/locales/en/index.ts
|
|
3
|
+
var t = /* @__PURE__ */ e({ default: () => n }), n = { "x-error-lib": {
|
|
2
4
|
err: {
|
|
3
5
|
"network error": "{code} {message}",
|
|
4
6
|
"request timeout": "request timeout",
|
|
@@ -132,4 +134,5 @@ var en_default = { "x-error-lib": {
|
|
|
132
134
|
filter_table: "filter table"
|
|
133
135
|
}
|
|
134
136
|
} };
|
|
135
|
-
|
|
137
|
+
//#endregion
|
|
138
|
+
export { t };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { t as e } from "./rolldown-runtime.msh1uh5g.js";
|
|
2
|
+
//#region src/i18n/locales/zhHans/index.ts
|
|
3
|
+
var t = /* @__PURE__ */ e({ default: () => n }), n = { "x-error-lib": {
|
|
2
4
|
err: {
|
|
3
5
|
"network error": "{code} {message}",
|
|
4
6
|
"request timeout": "请求超时",
|
|
@@ -132,4 +134,5 @@ var zhHans_default = { "x-error-lib": {
|
|
|
132
134
|
filter_table: "过滤表"
|
|
133
135
|
}
|
|
134
136
|
} };
|
|
135
|
-
|
|
137
|
+
//#endregion
|
|
138
|
+
export { t };
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
//#region \0rolldown_dynamic_import_helper.js
|
|
2
|
+
var e = (e, t, n) => {
|
|
2
3
|
let r = t.lastIndexOf("?"), i = e[r === -1 || r < t.lastIndexOf("/") ? t : t.slice(0, r)];
|
|
3
4
|
return i ? typeof i == "function" ? i() : Promise.resolve(i) : new Promise((e, r) => {
|
|
4
5
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(r.bind(null, /* @__PURE__ */ Error("Unknown variable dynamic import: " + t + (t.split("/").length === n ? "" : ". Note that variables only represent file names one level deep."))));
|
|
5
6
|
});
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/i18n/index.ts
|
|
10
|
+
async function t(t) {
|
|
11
|
+
return (await e(/* @__PURE__ */ Object.assign({
|
|
12
|
+
"./locales/en/index.ts": () => import("./i18n-en.l0to9ld7.js").then((e) => e.t),
|
|
13
|
+
"./locales/zhHans/index.ts": () => import("./i18n-zhHans.funn3gdz.js").then((e) => e.t)
|
|
14
|
+
}), `./locales/${t}/index.ts`, 4)).default;
|
|
12
15
|
}
|
|
13
|
-
function
|
|
16
|
+
function n(e) {
|
|
14
17
|
let t = {
|
|
15
18
|
main: "",
|
|
16
19
|
extras: {}
|
|
@@ -20,13 +23,14 @@ function transformError(e) {
|
|
|
20
23
|
n.length >= 2 && (t.extras[n[0]] = n[1]);
|
|
21
24
|
}), t;
|
|
22
25
|
}
|
|
23
|
-
function
|
|
26
|
+
function r(e, t) {
|
|
24
27
|
if (typeof t != "string") return e.global.t("x-error-lib.err.network error", t);
|
|
25
|
-
let r =
|
|
28
|
+
let r = n(t), i = e.global.t(`x-error-lib.err.${r.main}`), a = "";
|
|
26
29
|
for (let t in r.extras) {
|
|
27
30
|
let n = r.extras[t], i = e.global.t(`x-error-lib.obj.${t}=${n}`);
|
|
28
31
|
a !== "" && (a += ", "), a += i;
|
|
29
32
|
}
|
|
30
33
|
return a !== "" && (i += "; ", i += a), i;
|
|
31
34
|
}
|
|
32
|
-
|
|
35
|
+
//#endregion
|
|
36
|
+
export { r as getErrorMessage, t as loadLocaleMessageError };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var e = Object.defineProperty, t = (t, n) => {
|
|
3
|
+
let r = {};
|
|
4
|
+
for (var i in t) e(r, i, {
|
|
5
|
+
get: t[i],
|
|
6
|
+
enumerable: !0
|
|
7
|
+
});
|
|
8
|
+
return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-error-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.16",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -22,32 +22,29 @@
|
|
|
22
22
|
"*": "prettier --write ."
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"vue": "^3.5.
|
|
26
|
-
"vue-i18n": "^11.
|
|
27
|
-
"vuetify": "^4.0.
|
|
25
|
+
"vue": "^3.5.30",
|
|
26
|
+
"vue-i18n": "^11.3.0",
|
|
27
|
+
"vuetify": "^4.0.2"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@eslint/js": "^10.0.1",
|
|
31
|
-
"@types/node": "^25.
|
|
31
|
+
"@types/node": "^25.4.0",
|
|
32
32
|
"@vitejs/plugin-vue": "^6.0.4",
|
|
33
|
-
"eslint": "^10.0.
|
|
33
|
+
"eslint": "^10.0.3",
|
|
34
34
|
"eslint-config-prettier": "^10.1.8",
|
|
35
35
|
"eslint-plugin-prettier": "^5.5.5",
|
|
36
36
|
"eslint-plugin-vue": "^10.8.0",
|
|
37
|
-
"globals": "^17.
|
|
37
|
+
"globals": "^17.4.0",
|
|
38
38
|
"husky": "^9.1.7",
|
|
39
|
-
"lint-staged": "^16.
|
|
39
|
+
"lint-staged": "^16.3.3",
|
|
40
40
|
"prettier": "3.8.1",
|
|
41
|
-
"sass": "^1.
|
|
41
|
+
"sass": "^1.98.0",
|
|
42
42
|
"typescript": "^5.9.3",
|
|
43
|
-
"typescript-eslint": "^8.
|
|
44
|
-
"vite": "
|
|
45
|
-
"vite-plugin-css-injected-by-js": "^
|
|
43
|
+
"typescript-eslint": "^8.57.0",
|
|
44
|
+
"vite": "^8.0.0",
|
|
45
|
+
"vite-plugin-css-injected-by-js": "^4.0.1",
|
|
46
46
|
"vite-plugin-vuetify": "^2.1.3",
|
|
47
47
|
"vue-eslint-parser": "^10.4.0",
|
|
48
48
|
"vue-tsc": "^3.2.5"
|
|
49
|
-
},
|
|
50
|
-
"overrides": {
|
|
51
|
-
"vite": "npm:rolldown-vite@7.3.1"
|
|
52
49
|
}
|
|
53
50
|
}
|
package/dist/en.jczyw0vz.js
DELETED
package/dist/zhHans.ctyq842g.js
DELETED