@lacqjs/nuxt-dict 0.0.6 → 0.0.8

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.d.mts CHANGED
@@ -4,7 +4,7 @@ import { ModuleOptions } from '../dist/runtime/types/index.js';
4
4
  export { DictAdapter, DictItem, DictTranslator, GetDictItemOptions, ModuleOptions, TranslateOptions, TranslatePathOptions, TreeNode } from '../dist/runtime/types/index.js';
5
5
  export { DictManager } from '../dist/runtime/core/dict-manager.js';
6
6
  export { createDictTranslator } from '../dist/runtime/utils/dict-translator.js';
7
- export { defineDictAdapter } from '../dist/runtime/utils/define-adapter.js';
7
+ export { defineDictAdapter } from '../dist/runtime/core/define-adapter.js';
8
8
 
9
9
  /**
10
10
  * Nuxt Dict 模块入口。
package/dist/module.d.ts CHANGED
@@ -4,7 +4,7 @@ import { ModuleOptions } from '../dist/runtime/types/index.js';
4
4
  export { DictAdapter, DictItem, DictTranslator, GetDictItemOptions, ModuleOptions, TranslateOptions, TranslatePathOptions, TreeNode } from '../dist/runtime/types/index.js';
5
5
  export { DictManager } from '../dist/runtime/core/dict-manager.js';
6
6
  export { createDictTranslator } from '../dist/runtime/utils/dict-translator.js';
7
- export { defineDictAdapter } from '../dist/runtime/utils/define-adapter.js';
7
+ export { defineDictAdapter } from '../dist/runtime/core/define-adapter.js';
8
8
 
9
9
  /**
10
10
  * Nuxt Dict 模块入口。
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lacqjs/nuxt-dict",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "configKey": "dict",
5
5
  "compatibility": {
6
6
  "nuxt": "^4.4.8"
package/dist/module.mjs CHANGED
@@ -1,13 +1,13 @@
1
- import { defineNuxtModule, useLogger, createResolver, addTemplate, addTypeTemplate, addPlugin, addImportsDir } from '@nuxt/kit';
1
+ import { defineNuxtModule, useLogger, createResolver, addTemplate, addTypeTemplate, addPlugin, addImportsDir, addImports } from '@nuxt/kit';
2
2
  import { existsSync } from 'node:fs';
3
3
  import { resolve } from 'node:path';
4
4
  import { defaultOptions } from '../dist/runtime/options.js';
5
5
  import { createLogger } from '../dist/runtime/utils/logger.js';
6
6
  export { createDictTranslator } from '../dist/runtime/utils/dict-translator.js';
7
- export { defineDictAdapter } from '../dist/runtime/utils/define-adapter.js';
7
+ export { defineDictAdapter } from '../dist/runtime/core/define-adapter.js';
8
8
 
9
9
  const name = "@lacqjs/nuxt-dict";
10
- const version = "0.0.6";
10
+ const version = "0.0.8";
11
11
  const devDependencies = {
12
12
  nuxt: "^4.4.8"};
13
13
  const pkg = {
@@ -259,6 +259,7 @@ declare module '#build/nuxt-dict/adapters' {
259
259
  _nuxt.options.build.transpile.push(resolver.resolve("./runtime"));
260
260
  addPlugin(resolver.resolve("./runtime/plugins/dict"));
261
261
  addImportsDir(resolver.resolve("./runtime/composables"));
262
+ addImports([{ name: "defineDictAdapter", from: resolver.resolve("./runtime/core/define-adapter") }]);
262
263
  registerTypeTemplates(resolver, _options.stores);
263
264
  _nuxt.hook("prepare:types", ({ references }) => {
264
265
  references.push({ types: pkg.name });
package/dist/types.d.mts CHANGED
@@ -4,6 +4,6 @@ export { type DictManager } from '../dist/runtime/core/dict-manager.js'
4
4
 
5
5
  export { type createDictTranslator } from '../dist/runtime/utils/dict-translator.js'
6
6
 
7
- export { type defineDictAdapter } from '../dist/runtime/utils/define-adapter.js'
7
+ export { type defineDictAdapter } from '../dist/runtime/core/define-adapter.js'
8
8
 
9
9
  export { default } from './module.mjs'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lacqjs/nuxt-dict",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "Nuxt 数据字典模块,提供扁平/树形字典翻译、多语言国际化、三级缓存与 SSR 预取。",
5
5
  "keywords": [
6
6
  "@lacqjs/nuxt-dict",
@@ -21,19 +21,20 @@
21
21
  ],
22
22
  "type": "module",
23
23
  "main": "./dist/module.mjs",
24
- "types": "./dist/types.d.mts",
24
+ "types": "./dist/module.d.mts",
25
25
  "typesVersions": {
26
26
  "*": {
27
27
  ".": [
28
- "./dist/types.d.mts"
28
+ "./dist/module.d.mts"
29
29
  ]
30
30
  }
31
31
  },
32
32
  "exports": {
33
33
  ".": {
34
- "types": "./dist/types.d.mts",
34
+ "types": "./dist/module.d.mts",
35
35
  "import": "./dist/module.mjs"
36
- }
36
+ },
37
+ "./runtime/*": "./dist/runtime/*"
37
38
  },
38
39
  "publishConfig": {
39
40
  "access": "public",
@@ -68,7 +69,7 @@
68
69
  },
69
70
  "documentation": "https://miaozhongfei.github.io/nuxt-dict/",
70
71
  "scripts": {
71
- "cleanup": "pnpx nuxt cleanup || npx nuxt cleanup",
72
+ "cleanup": "(pnpx nuxt cleanup || npx nuxt cleanup) && pnpx rimraf .nuxt .output dist node_modules .data",
72
73
  "clean:install": "pnpm run cleanup && pnpm run docs:cleanup && pnpm run playground:cleanup && pnpm install",
73
74
  "dev": "pnpm run dev:prepare && nuxi dev playground",
74
75
  "dev:build": "nuxi build playground",
File without changes