Skip to content

Commit

Permalink
r
Browse files Browse the repository at this point in the history
  • Loading branch information
hxg2050 committed Apr 4, 2024
1 parent 59c6d55 commit c0844ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/handler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@feiyun/handler",
"version": "0.0.24",
"version": "0.0.25",
"license": "MIT",
"type": "module",
"main": "./src/index.ts",
Expand Down Expand Up @@ -46,7 +46,7 @@
}
},
"scripts": {
"build": "rimraf **/dist && tsc && rollup -c",
"build": "rimraf dist types && tsc && rollup -c",
"prepublishOnly": "pnpm build"
},
"devDependencies": {
Expand Down
8 changes: 2 additions & 6 deletions packages/handler/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,8 @@ const runHandler = async (handler: any, ctx: Context) => {
* @param rule 导入路径规则
* @returns
*/
export const include = async (baseDir: string, rule = '**/*.handler.ts'): Promise<FeiyunMiddleware> => {
// const dirs = await readdir(path);
// const files = await findUp(path + '/' + rule);
// console.log(files);
console.log(path.resolve(baseDir, rule));
const handlerPaths = await glob(path.resolve(baseDir, rule));
export const include = async (rule = '**/*.handler.ts'): Promise<FeiyunMiddleware> => {
const handlerPaths = await glob(rule);

const handlers = [];

Expand Down
1 change: 1 addition & 0 deletions packages/handler/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"emitDeclarationOnly": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noImplicitReturns": false,
Expand Down

0 comments on commit c0844ef

Please sign in to comment.