@lacqjs/nuxt-dict 0.0.9 → 0.0.12

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lacqjs/nuxt-dict",
3
- "version": "0.0.9",
3
+ "version": "0.0.12",
4
4
  "configKey": "dict",
5
5
  "compatibility": {
6
6
  "nuxt": "^4.4.8"
package/dist/module.mjs CHANGED
@@ -7,7 +7,7 @@ export { createDictTranslator } from '../dist/runtime/utils/dict-translator.js';
7
7
  export { defineDictAdapter } from '../dist/runtime/core/define-adapter.js';
8
8
 
9
9
  const name = "@lacqjs/nuxt-dict";
10
- const version = "0.0.9";
10
+ const version = "0.0.12";
11
11
  const devDependencies = {
12
12
  nuxt: "^4.4.8"};
13
13
  const pkg = {
@@ -1,4 +1,4 @@
1
- import Dexie from "dexie";
1
+ import { Dexie } from "dexie";
2
2
  import { createLogger } from "../../utils/logger.js";
3
3
  export const DEFAULT_STORE_NAME = "dicts";
4
4
  const logger = createLogger("nuxt-dict");
@@ -129,8 +129,7 @@ export class DictManager {
129
129
  if (idbEntry) {
130
130
  this.memoryCache.set(key, {
131
131
  data: idbEntry.data,
132
- timestamp: Date.now(),
133
- version: idbEntry.version
132
+ timestamp: Date.now()
134
133
  });
135
134
  return idbEntry.data;
136
135
  }
@@ -147,8 +146,7 @@ export class DictManager {
147
146
  }
148
147
  const cacheEntry = {
149
148
  data: entry,
150
- timestamp: Date.now(),
151
- version: response.version
149
+ timestamp: Date.now()
152
150
  };
153
151
  this.memoryCache.set(key, cacheEntry);
154
152
  try {
@@ -180,8 +178,7 @@ export class DictManager {
180
178
  }
181
179
  const cacheEntry = {
182
180
  data: entry,
183
- timestamp: Date.now(),
184
- version: response.version
181
+ timestamp: Date.now()
185
182
  };
186
183
  this.memoryCache.set(key, cacheEntry);
187
184
  try {
@@ -43,14 +43,12 @@ export interface DictEntry {
43
43
  }
44
44
  /** API 返回的字典响应格式 */
45
45
  export interface DictResponse {
46
- version: string;
47
46
  data: Record<string, DictEntry>;
48
47
  }
49
48
  /** IndexedDB 中存储的缓存条目 */
50
49
  export interface CacheEntry<T = DictEntry> {
51
50
  data: T;
52
51
  timestamp: number;
53
- version: string;
54
52
  }
55
53
  /**
56
54
  * 字典适配器接口,允许用户自定义数据源(REST / GraphQL / 本地文件等)。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lacqjs/nuxt-dict",
3
- "version": "0.0.9",
3
+ "version": "0.0.12",
4
4
  "description": "Nuxt 数据字典模块,提供扁平/树形字典翻译、多语言国际化、三级缓存与 SSR 预取。",
5
5
  "keywords": [
6
6
  "@lacqjs/nuxt-dict",