x-error-lib 0.1.5 → 0.1.7

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 e = {
2
+ "network error": "{code} {message}",
3
+ "request timeout": "request timeout",
4
+ "user not found": "user not found"
5
+ };
6
+ export {
7
+ e as default
8
+ };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  import { I18n, I18nOptions } from 'vue-i18n'
2
2
 
3
- export declare function setupI18n(options: I18nOptions)
3
+ export declare function setupI18n(options: I18nOptions): I18n
4
4
 
5
- export declare function loadLocaleMessage(i18n: I18n, locale: string)
5
+ export declare function loadLocaleMessage(
6
+ i18n: I18n,
7
+ locale: string
8
+ ): Promise<void>
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ function l(t) {
10
10
  return s(t);
11
11
  }
12
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`);
13
+ const n = await i(/* @__PURE__ */ Object.assign({ "./locales/en.ts": () => import("./en-DPvxl2yp.js"), "./locales/zhHans.ts": () => import("./zhHans-qxyd7x0N.js") }), `./locales/${e}.ts`);
14
14
  return t.global.setLocaleMessage(e, n.default), r();
15
15
  }
16
16
  export {
@@ -0,0 +1,8 @@
1
+ const e = {
2
+ "network error": "{code} {message}",
3
+ "request timeout": "请求超时",
4
+ "user not found": "用户未找到"
5
+ };
6
+ export {
7
+ e 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.5",
4
+ "version": "0.1.7",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -27,7 +27,6 @@
27
27
  "vuetify": "^3.5.16"
28
28
  },
29
29
  "devDependencies": {
30
- "@intlify/unplugin-vue-i18n": "^4.0.0",
31
30
  "@rushstack/eslint-patch": "^1.8.0",
32
31
  "@types/node": "^20.12.2",
33
32
  "@vitejs/plugin-vue": "^5.0.4",
@@ -1,8 +0,0 @@
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
- };
@@ -1,8 +0,0 @@
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
- };