Skip to content

Releases: wobsoriano/elysia-autoroutes

v0.5.0

28 Dec 03:22
Compare
Choose a tag to compare
  • Set Elysia peer dependency to ^0.8.0
  • Use bunchee as bundler

v0.4.0

26 Sep 06:53
Compare
Choose a tag to compare
  • Set Elysia peer dependency to ^0.7.0
  • Types fixes

v0.3.0

25 Sep 17:02
Compare
Choose a tag to compare

Breaking

  • Set Elysia peer dep to ^0.6.0

  • Route files should now export default a function that accepts ElysiaApp and returns ElysiaApp, which gets passed to group.

Before:

import type { Context } from 'elysia'

export const get = (context: Context) => ({ ... })

export const post = (context: Context) => ({ ... })

export const del = (context: Context) => ({ ... })

After:

import type Elysia from 'elysia'

export default (app: Elysia) => app
  .get('/', () => ({ ... }))
  .post('/', () => ({ ... }))
  .put('/', () => ({ ... }))
  .patch('/', () => ({ ... }))
  .delete('/', () => ({ ... }))