x-error-lib 0.1.2 → 0.1.5

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.
@@ -0,0 +1,8 @@
1
+ const t = {
2
+ "network error": { t: 0, b: { t: 2, i: [{ t: 4, k: "code" }, { t: 3, v: " " }, { t: 4, k: "message" }] } },
3
+ "request timeout": { t: 0, b: { t: 2, i: [{ t: 3 }], s: "request timeout" } },
4
+ "user not found": { t: 0, b: { t: 2, i: [{ t: 3 }], s: "user not found" } }
5
+ };
6
+ export {
7
+ t as default
8
+ };
package/dist/index.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { nextTick as r } from "vue";
2
2
  import { createI18n as s } from "vue-i18n";
3
- const i = (o, e) => {
4
- const n = o[e];
5
- return n ? typeof n == "function" ? n() : Promise.resolve(n) : new Promise((a, t) => {
6
- (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(t.bind(null, new Error("Unknown variable dynamic import: " + e)));
3
+ const i = (t, e) => {
4
+ const n = t[e];
5
+ return n ? typeof n == "function" ? n() : Promise.resolve(n) : new Promise((a, o) => {
6
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(o.bind(null, new Error("Unknown variable dynamic import: " + e)));
7
7
  });
8
8
  };
9
- function l(o) {
10
- return s(o);
9
+ function l(t) {
10
+ return s(t);
11
11
  }
12
- async function m(o, e) {
13
- const n = await i(/* @__PURE__ */ Object.assign({ "./locales/en.json": () => import("./en-DeiNYLeo.js"), "./locales/zhHans.json": () => import("./zhHans-DoYhLJBt.js") }), `./locales/${e}.json`);
14
- return o.global.setLocaleMessage(e, n.default), r();
12
+ async function m(t, e) {
13
+ const n = await i(/* @__PURE__ */ Object.assign({ "./locales/en.ts": () => import("./en-DdZw5Z_m.js"), "./locales/zhHans.ts": () => import("./zhHans-CC5lev0k.js") }), `./locales/${e}.ts`);
14
+ return t.global.setLocaleMessage(e, n.default), r();
15
15
  }
16
16
  export {
17
17
  m as loadLocaleMessage,
@@ -0,0 +1,8 @@
1
+ const t = {
2
+ "network error": { t: 0, b: { t: 2, i: [{ t: 4, k: "code" }, { t: 3, v: " " }, { t: 4, k: "message" }] } },
3
+ "request timeout": { t: 0, b: { t: 2, i: [{ t: 3 }], s: "请求超时" } },
4
+ "user not found": { t: 0, b: { t: 2, i: [{ t: 3 }], s: "用户未找到" } }
5
+ };
6
+ export {
7
+ t as default
8
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-error-lib",
3
3
  "private": false,
4
- "version": "0.1.2",
4
+ "version": "0.1.5",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -27,6 +27,7 @@
27
27
  "vuetify": "^3.5.16"
28
28
  },
29
29
  "devDependencies": {
30
+ "@intlify/unplugin-vue-i18n": "^4.0.0",
30
31
  "@rushstack/eslint-patch": "^1.8.0",
31
32
  "@types/node": "^20.12.2",
32
33
  "@vitejs/plugin-vue": "^5.0.4",
@@ -1,7 +0,0 @@
1
- const e = {
2
- "network error": "network error",
3
- "request timeout": "request timeout"
4
- };
5
- export {
6
- e as default
7
- };
@@ -1,7 +0,0 @@
1
- const e = {
2
- "network error": "网络错误",
3
- "request timeout": "请求超时"
4
- };
5
- export {
6
- e as default
7
- };