Skip to content

Commit

Permalink
chore: publish new release and some updates at README
Browse files Browse the repository at this point in the history
  • Loading branch information
kravetsone committed Dec 29, 2024
1 parent 9abc3cb commit 52a5c27
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@

[![npm](https://img.shields.io/npm/v/elysia-autoload?logo=npm&style=flat&labelColor=000&color=3b82f6)](https://www.npmjs.org/package/elysia-autoload)
[![npm downloads](https://img.shields.io/npm/dw/elysia-autoload?logo=npm&style=flat&labelColor=000&color=3b82f6)](https://www.npmjs.org/package/elysia-autoload)

<!-- [![JSR](https://jsr.io/badges/elysia-autoload)](https://jsr.io/elysia-autoload)
[![JSR Score](https://jsr.io/badges/elysia-autoload/score)](https://jsr.io/elysia-autoload) -->

</div>

Plugin for [Elysia](https://elysiajs.com/) which autoload all routes in directory and code-generate types for [Eden](https://elysiajs.com/eden/overview.html) with [`Bun.build`](#bun-build-usage) support!
Plugin for [Elysia](https://elysiajs.com/) which autoload all routes in directory and code-generate types for [Eden](https://elysiajs.com/eden/overview.html) with [`Bun.build`](#bun-build-usage) and **Node adapter** support!

## Installation

Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,14 @@
"@types/node": "^22.10.2",
"elysia": "^1.2.9",
"pkgroll": "2.5.1",
"typescript": "^5.7.2"
"typescript": "^5.7.2",
"@elysiajs/node": "^1.2.3"
},
"peerDependencies": {
"elysia": "^1.2.0"
},
"engines": {
"node": ">=22"
},
"dependencies": {
"@elysiajs/node": "^1.2.3"
"node": ">=22",
"bun": ">=1.0.0"
}
}
3 changes: 2 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ type PathToObject<
namespace ElysiaMatch {
export type RouteEnd = Record<string, RouteSchema>;

export type Fx = (...args: unknown[]) => AnyElysia;
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
export type Fx = (...args: any[]) => AnyElysia;
export type All = AnyElysia | Fx;

export type Extract<T extends All> = T extends Fx ? ReturnType<T> : T;
Expand Down

0 comments on commit 52a5c27

Please sign in to comment.