From 1df41428283528577f2691d76e540a446f691feb Mon Sep 17 00:00:00 2001 From: ningmengchongshui <916415899@qq.com> Date: Mon, 10 Jun 2024 19:35:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=BE=E7=BD=AE=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E5=88=AB=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- image/main.ts | 2 +- image/types.ts | 2 +- package.json | 3 ++- src/config/index.ts | 1 + src/index.ts | 2 ++ tsconfig.json | 6 ++++++ 6 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 src/config/index.ts 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"] }