node-decorators

node-decorators

MIT License

Downloads
14.1K
Stars
380
Committers
17

Bot releases are hidden (Show)

node-decorators - Mongoose#2.0.1

Published by serhiisol over 7 years ago

Bug fixes

node-decorators - Socket#2.0.0

Published by serhiisol over 7 years ago

Features

  • Added wrap option for @IO(WrapperClass?) decorator, see @Socket() decorator for details

Breaking changes

  • Renamed
    • @Callback() to @Ack()
    • @GlobalMiddleware() for socket global middleware to @Middleware()
    • Renamed @Namespace() to @Controller(namespace: string, middleware?: Function | Function[])
  • Removed
    • @Middleware(middleware: Function | Function[]) - use Controller based middleware
    • deprecated bootstrapSocketIO(io: SocketIO.Server, Controllers) - Attaches controllers to IO server - use attachControllers() instead
    • deprecated attachControllerToSocket(io: SocketIO.Server, socket: SocketIO.Socket, Controllers) - Attaches controllers to Socket - use attachControllersToSocket() instead
node-decorators - Mongoose#2.0.0

Published by serhiisol over 7 years ago

FEATURES

  • schema() helper function added in order to reach mongoose schema in the same way, with @decorators/mongoose class

BREAKING CHANGES

  • removed deprecated @Set() = @Option()
  • renamed bootstrapMongoose to model(...)
  • renamed ModelClass
node-decorators - Common#1.1.1

Published by serhiisol over 7 years ago

  • Fix for @Catch() to provide proper arguments if original function returns Promise (async function)
node-decorators - Mongoose#1.2.1

Published by serhiisol over 7 years ago

  • Fixed model ctx for DI
node-decorators - Common#1.1.0

Published by serhiisol over 7 years ago

  • Moved project back to es5
  • @Catch() now accepts all passed arguments of the original function and error, e.g.:
@Catch((volume: number, e: Error) => {
  // ...
})
sound(volume: number) {}
node-decorators - Socket#1.4.0

Published by serhiisol over 7 years ago

This PR fixes:

  1. Controller DI (closes #29)
{ provide: UserController, deps: [UserService] }
  1. Renamed methods bootstrapSocketIO and attachControllerToSocket (see README for details)
node-decorators - Mongoose#1.2.0

Published by serhiisol over 7 years ago

  1. Model DI (closes #35)
  2. Cleaned up README (closes #33)
node-decorators - Express#1.3.0

Published by serhiisol over 7 years ago

  1. Moved express-related types to package interfaces
  2. @Request decorator accepts optional parameter name (closes #27)
  3. Controller DI (closes #28)
node-decorators - Mongoose#1.1.2

Published by serhiisol over 7 years ago

  • Add options parameter to Model decorator
  • Mark Set and Option decorator as deprecated (emit console warning)
  • Update README.md accordingly
node-decorators - Common#1.0.0

Published by serhiisol over 7 years ago

Common#1.0.0

  • New common decorators
    • @Log(loggerFn?: Function)
    • @Debounce(wait: number = 500)
    • @Throttle(wait: number = 500)
    • @Decorate(decorateFunction: Function, ...args)
    • @SuppressConsole(methods?: string[])
    • @Bind()
    • @Catch(func: (e) => void)
node-decorators - Express#1.2.0

Published by serhiisol over 7 years ago

Express#1.2.0

  • Added controller-based middleware - @Controller(baseUrl: string, [middleware]?)
  • moved route-based middleware to route definition decorator - @Get(url: string, [middleware]?)
  • renamed bootstrapControllers to attachControllers
  • @Middleware moved to deprecated, will be removed in 2.0.0
  • bootstrapControllers moved to deprecated, will be removed in 2.0.0
node-decorators - Socket#1.3.2

Published by serhiisol almost 8 years ago

  • Added wrap option for @Socket(WrapperClass?) decorator, now you can pass wrapper class in it, to get extended functionality over the socket, optional parameter, e.g.:
class SocketWrapper {
  constructor(private socket: SocketIO.Socket) {}
}