Skip to content

Releases: BoostIO/tachijs

v0.14.1

25 Feb 08:00
78cf226
Compare
Choose a tag to compare

Bug fixes

  • BaseController#end, BaseController#json, BaseController#render and BaseController#send pass data type to result.

v0.14.0

05 Feb 07:59
bdc8e75
Compare
Choose a tag to compare

Bug fixes

  • Register controller method from top to bottom. #30

Dev

  • Improve lint script. #31

v0.13.0

04 Feb 01:03
f8d258c
Compare
Choose a tag to compare

Features

  • Controller middlewares now applied to controller methods only.
    Issue: #27, PR: #29

v0.12.0

18 Jan 05:56
91a3098
Compare
Choose a tag to compare

Features

  • Expose internal injector api, Injector.

Now you can use DI without tachijs. It is useful for some testing and scripts which don't need to use tachijs server.

import { Injector } from 'tachijs'

// Create injector
const injector = new Injector(container)

// Instantiate by a key
const myService = injector.inject<MyService>(ServiceTypes.MyService)
// Instantiate by a constructor
const myService = injector.instantiate(MyService)

v0.11.0

17 Jan 04:44
a3e3be8
Compare
Choose a tag to compare

Features

  • @controller decorator now accepts express router options.
@controller('/:name', [], {
  mergeParams: true
})
class HomeController {
  @httpGet('/hello')
  index(@reqParams('name') name: string) {
    return `Hello, ${name}`
  }
}

v0.10.1

16 Jan 05:20
49ebdb6
Compare
Choose a tag to compare

Dev

  • Add keywords to package.json so they can be displayed in npm page.

v0.10.0

16 Jan 05:19
114d3bd
Compare
Choose a tag to compare

Features

  • Introduce BaseController#context. To know more, check #22.
interface Context {
  req: express.Request
  res: express.Response
  inject<S>(key: string): S
}

export class BaseController {
  context?: Context
  ...

Due to the introducing, BaseController#inject, BaseController#injector and BaseController#httpContext will be deprecated from v1. For now, it will just show warning messages.

v0.9.0

16 Jan 05:11
0ce505b
Compare
Choose a tag to compare

Features

  • Introduce BaseController#inject and BaseController#injector to access services from the container.

v0.8.0

11 Jan 03:08
04aa1c6
Compare
Choose a tag to compare

Features

  • NextResult for using next.
  • Add generic type to some results having data, EndResult, JSONResult, NextResult, RenderResult and SendResult.

Dev

  • Include original source code to npm package

v0.7.0

10 Jan 15:38
a392b20
Compare
Choose a tag to compare

Features

  • Add app option for tachijs.