@nocobase/plugin-localization 1.3.39-beta → 1.4.0-alpha

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.
@@ -11,14 +11,14 @@ module.exports = {
11
11
  "@ant-design/icons": "5.2.6",
12
12
  "@formily/core": "2.3.0",
13
13
  "@formily/react": "2.3.0",
14
- "@nocobase/client": "1.3.39-beta",
14
+ "@nocobase/client": "1.4.0-alpha",
15
15
  "ahooks": "3.7.8",
16
16
  "antd": "5.12.8",
17
17
  "react": "18.2.0",
18
- "@nocobase/database": "1.3.39-beta",
19
- "@nocobase/plugin-ui-schema-storage": "1.3.39-beta",
20
- "@nocobase/server": "1.3.39-beta",
21
- "@nocobase/cache": "1.3.39-beta",
18
+ "@nocobase/database": "1.4.0-alpha",
19
+ "@nocobase/plugin-ui-schema-storage": "1.4.0-alpha",
20
+ "@nocobase/server": "1.4.0-alpha",
21
+ "@nocobase/cache": "1.4.0-alpha",
22
22
  "react-i18next": "11.18.6",
23
- "@nocobase/actions": "1.3.39-beta"
23
+ "@nocobase/actions": "1.4.0-alpha"
24
24
  };
@@ -1 +1 @@
1
- {"name":"deepmerge","description":"A library for deep (recursive) merging of Javascript objects","keywords":["merge","deep","extend","copy","clone","recursive"],"version":"4.3.1","homepage":"https://github.com/TehShrike/deepmerge","repository":{"type":"git","url":"git://github.com/TehShrike/deepmerge.git"},"main":"dist/cjs.js","engines":{"node":">=0.10.0"},"scripts":{"build":"rollup -c","test":"npm run build && tape test/*.js && jsmd readme.md && npm run test:typescript","test:typescript":"tsc --noEmit test/typescript.ts && ts-node test/typescript.ts","size":"npm run build && uglifyjs --compress --mangle -- ./dist/umd.js | gzip -c | wc -c"},"devDependencies":{"@types/node":"^8.10.54","is-mergeable-object":"1.1.0","is-plain-object":"^5.0.0","jsmd":"^1.0.2","rollup":"^1.23.1","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","tape":"^4.11.0","ts-node":"7.0.1","typescript":"=2.2.2","uglify-js":"^3.6.1"},"license":"MIT","_lastModified":"2024-10-24T04:47:46.006Z"}
1
+ {"name":"deepmerge","description":"A library for deep (recursive) merging of Javascript objects","keywords":["merge","deep","extend","copy","clone","recursive"],"version":"4.3.1","homepage":"https://github.com/TehShrike/deepmerge","repository":{"type":"git","url":"git://github.com/TehShrike/deepmerge.git"},"main":"dist/cjs.js","engines":{"node":">=0.10.0"},"scripts":{"build":"rollup -c","test":"npm run build && tape test/*.js && jsmd readme.md && npm run test:typescript","test:typescript":"tsc --noEmit test/typescript.ts && ts-node test/typescript.ts","size":"npm run build && uglifyjs --compress --mangle -- ./dist/umd.js | gzip -c | wc -c"},"devDependencies":{"@types/node":"^8.10.54","is-mergeable-object":"1.1.0","is-plain-object":"^5.0.0","jsmd":"^1.0.2","rollup":"^1.23.1","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","tape":"^4.11.0","ts-node":"7.0.1","typescript":"=2.2.2","uglify-js":"^3.6.1"},"license":"MIT","_lastModified":"2024-10-24T14:09:52.756Z"}
@@ -132,7 +132,8 @@ class PluginLocalizationServer extends import_server.Plugin {
132
132
  this.resources = new import_resources.default(this.db, cache);
133
133
  this.registerUISchemahook();
134
134
  this.app.localeManager.registerResourceStorer("plugin-localization", {
135
- getResources: (lang) => this.resources.getResources(lang)
135
+ getResources: (lang) => this.resources.getResources(lang),
136
+ reset: () => this.resources.reset()
136
137
  });
137
138
  }
138
139
  async install(options) {
@@ -23,5 +23,5 @@ export default class Resources {
23
23
  module: string;
24
24
  }[]>;
25
25
  updateCacheTexts(texts: any[], transaction?: Transaction): Promise<void>;
26
- resetCache(locale: string): Promise<void>;
26
+ reset(): Promise<void>;
27
27
  }
@@ -95,7 +95,7 @@ class Resources {
95
95
  const existTexts = await this.getTexts(transaction);
96
96
  await this.cache.set(`texts`, [...existTexts, ...newTexts]);
97
97
  }
98
- async resetCache(locale) {
99
- await this.cache.del(`translations:${locale}`);
98
+ async reset() {
99
+ await this.cache.reset();
100
100
  }
101
101
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-localization",
3
- "version": "1.3.39-beta",
3
+ "version": "1.4.0-alpha",
4
4
  "main": "dist/server/index.js",
5
5
  "homepage": "https://docs.nocobase.com/handbook/localization-management",
6
6
  "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/localization-management",
@@ -24,5 +24,5 @@
24
24
  "displayName.zh-CN": "本地化",
25
25
  "description": "Allows to manage localization resources of the application.",
26
26
  "description.zh-CN": "支持管理应用程序的本地化资源。",
27
- "gitHead": "68daadf8575cddf9eeb09a1a672f9baf7aabe67a"
27
+ "gitHead": "f097a2bddec152522b5645bd5d451f4c866d2060"
28
28
  }
File without changes
File without changes