diff --git a/image/main.ts b/image/main.ts index e3a2672..2b18811 100644 --- a/image/main.ts +++ b/image/main.ts @@ -1,7 +1,7 @@ import Koa from 'koa' import KoaStatic from 'koa-static' import Router from 'koa-router' -import { Component } from '../src/utils/index.js' +import { Component } from '#miao/utils' import { readdirSync } from 'fs' import { join } from 'path' import './tailwindcss.js' diff --git a/image/types.ts b/image/types.ts index ba44fb5..1a0a629 100644 --- a/image/types.ts +++ b/image/types.ts @@ -1,4 +1,4 @@ -import { type ComponentCreateOpsionType } from '../src/utils/component.js' +import { type ComponentCreateOpsionType } from '#miao/utils' export type RouterType = { url: string element: React.ReactNode diff --git a/package.json b/package.json index 87b42c0..bdb7e42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "miao-yunzai", - "version": "4.0.0", + "version": "4.0.0-rc.0", "author": "Yoimiya-Kokomi, Le-niao", "description": "QQ Group Bot", "main": "./index.js", @@ -79,6 +79,7 @@ "typescript": "^5.0.4" }, "imports": { + "#miao/*": "./src/*", "#miao": "./plugins/miao-plugin/components/index.js", "#miao.models": "./plugins/miao-plugin/models/index.js" } diff --git a/src/config/index.ts b/src/config/index.ts new file mode 100644 index 0000000..693da49 --- /dev/null +++ b/src/config/index.ts @@ -0,0 +1 @@ +export {} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index b689073..9c4f07d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,5 @@ +export * from './config/index.js' export * from './core/index.js' +export * from './db/index.js' export * from './mys/index.js' export * from './utils/index.js' diff --git a/tsconfig.json b/tsconfig.json index ca055da..53b3b01 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -29,7 +29,13 @@ "noUnusedParameters": true, "noFallthroughCasesInSwitch": true, + "forceConsistentCasingInFileNames": true, + + // "paths": { + // 内部核心模块导出 + "#miao/*": ["./src/*"], + // 外部模块 待移除 "#miao": ["./plugins/miao-plugin/components/index.js"], "#miao.models": ["./plugins/miao-plugin/models/index.js"] }