Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v 1.0.1 #7

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# inversify-koa-utils

[![Join the chat at https://gitter.im/inversify/InversifyJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/inversify/InversifyJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![inversify chat https://gitter.im/inversify/InversifyJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/inversify/InversifyJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://secure.travis-ci.org/diego-d5000/inversify-koa-utils.svg?branch=master)](https://travis-ci.org/diego-d5000/inversify-koa-utils)
[![Test Coverage](https://codeclimate.com/github/diego-d5000/inversify-koa-utils/badges/coverage.svg)](https://codeclimate.com/github/diego-d5000/inversify-koa-utils/coverage)
[![npm version](https://badge.fury.io/js/inversify-koa-utils.svg)](http://badge.fury.io/js/inversify-koa-utils)
Expand Down Expand Up @@ -234,9 +234,15 @@ Binds a method parameter to request.body or to a specific body property if a nam
### `@requestHeaders(name?: string)`
Binds a method parameter to the request headers.

### `@context()`
Binds a method parameter to the koa context object.

### `@cookies()`
Binds a method parameter to the request cookies.

### `@context()`
Binds a method parameter to the koa context object.

### `@next()`
Binds a method parameter to the next() function.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "inversify-koa-utils",
"version": "1.0.0",
"version": "1.0.1",
"description": "Some utilities for the development of koa applications with Inversify",
"main": "lib/index.js",
"jsnext:main": "es/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const TYPE = {
Controller: Symbol("Controller")
Controller: Symbol.for("Controller")
};

const METADATA_KEY = {
Expand Down
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { InversifyKoaServer } from "./server";
import { controller, httpMethod, httpGet, httpPut, httpPost, httpPatch,
httpHead, all, httpDelete, request, response, requestParam, queryParam,
requestBody, requestHeaders, cookies, next } from "./decorators";
requestBody, requestHeaders, cookies, next, context } from "./decorators";
import { TYPE } from "./constants";
import { interfaces } from "./interfaces";

Expand All @@ -25,5 +25,6 @@ export {
requestBody,
requestHeaders,
cookies,
next
next,
context
};