@anweb/nuxt-ancore 1.8.7 → 1.9.1
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/module.json +1 -1
- package/dist/runtime/composables/useAnI18n.d.ts +1 -1
- package/dist/runtime/composables/useAnI18n.js +4 -2
- package/dist/runtime/utils/getJSONHash.d.ts +1 -0
- package/dist/runtime/utils/getJSONHash.js +4 -0
- package/dist/runtime/utils/index.d.ts +2 -1
- package/dist/runtime/utils/index.js +2 -1
- package/package.json +3 -1
package/dist/module.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import i18next from "i18next";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { getJSONHash } from "../utils/index.js";
|
|
3
|
+
export default (resources) => {
|
|
4
|
+
if (!resources) return { t: i18next.t };
|
|
5
|
+
const ns = getJSONHash(resources);
|
|
4
6
|
for (const lang in resources) {
|
|
5
7
|
if (!i18next.hasResourceBundle(lang, ns)) {
|
|
6
8
|
i18next.addResourceBundle(lang, ns, resources[lang]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getJSONHash: (obj: object) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anweb/nuxt-ancore",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "AnCore Nuxt module",
|
|
5
5
|
"repository": "https://github.com/ANLTD/ancore",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,12 +36,14 @@
|
|
|
36
36
|
"@vueuse/core": "^13.5.0",
|
|
37
37
|
"@vueuse/integrations": "^13.5.0",
|
|
38
38
|
"async-validator": "^4.2.5",
|
|
39
|
+
"crypto-js": "^4.2.0",
|
|
39
40
|
"i18next": "^25.3.2"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"@nuxt/devtools": "^2.6.2",
|
|
43
44
|
"@nuxt/module-builder": "^1.0.1",
|
|
44
45
|
"@nuxt/schema": "^4.0.1",
|
|
46
|
+
"@types/crypto-js": "^4.2.2",
|
|
45
47
|
"@types/node": "latest",
|
|
46
48
|
"changelogen": "^0.6.2",
|
|
47
49
|
"nuxt": "^4.0.1",
|