Skip to content

Commit

Permalink
Renamed cors package to http-cors (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
lmammino committed May 23, 2018
1 parent 9072e93 commit f8436ae
Show file tree
Hide file tree
Showing 24 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,9 @@ on how to write a middleware.
Currently available middlewares:
- [`cache`](/packages/cache): A simple but flexible caching layer
- [`cors`](/packages/cors): Sets CORS headers on response
- [`do-not-wait-for-empty-event-loop`](/packages/do-not-wait-for-empty-event-loop): Sets callbackWaitsForEmptyEventLoop property to false
- [`http-content-negotiation`](/packages/http-content-negotiation): Parses `Accept-*` headers and provides utilities for content negotiation (charset, encoding, language and media type) for HTTP requests
- [`http-cors`](/packages/http-cors): Sets HTTP CORS headers on response
- [`http-error-handler`](/packages/http-error-handler): Creates a proper HTTP response for errors that are created with the [http-errors](https://www.npmjs.com/package/http-errors) module and represents proper HTTP errors.
- [`http-event-normalizer`](/packages/http-event-normalizer): Normalizes HTTP events by adding an empty object for `queryStringParameters` and `pathParameters` if they are missing.
- [`http-header-normalizer`](/packages/http-header-normalizer): Normalizes HTTP header names to their canonical format
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"packages": [
"packages/*"
],
"version": "1.0.0-alpha.5"
"version": "1.0.0-alpha.6"
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "middy-monorepo",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"description": "🛵 The stylish Node.js middleware engine for AWS Lambda",
"engines": {
"node": ">=6.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/cache/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/cache",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"description": "Cache middleware for the middy framework",
"engines": {
"node": ">=6.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/core",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"description": "🛵 The stylish Node.js middleware engine for AWS Lambda (core package)",
"engines": {
"node": ">=6.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/do-not-wait-for-empty-event-loop/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/do-not-wait-for-empty-event-loop",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"description": "Middleware for the middy framework that allows to easily disable the wait for empty event loop in a Lambda function",
"engines": {
"node": ">=6.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/http-content-negotiation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/http-content-negotiation",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"description": "Http content negotiation middleware for the middy framework",
"engines": {
"node": ">=6.10"
Expand Down
8 changes: 4 additions & 4 deletions packages/cors/README.md → packages/http-cors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</p>
</div>

This middleware sets CORS headers (`Access-Control-Allow-Origin`, `Access-Control-Allow-Headers`, `Access-Control-Allow-Credentials`), necessary for making cross-origin requests, to the response object.
This middleware sets HTTP CORS headers (`Access-Control-Allow-Origin`, `Access-Control-Allow-Headers`, `Access-Control-Allow-Credentials`), necessary for making cross-origin requests, to the response object.

Sets headers in `after` and `onError` phases.

Expand All @@ -38,7 +38,7 @@ Sets headers in `after` and `onError` phases.
To install this middleware you can use NPM:

```bash
npm install --save @middy/cors
npm install --save @middy/http-cors
```


Expand All @@ -52,8 +52,8 @@ npm install --save @middy/cors
## Sample usage

```javascript
const middy = require('middy')
const { cors } = require('middy/middlewares')
const middy = require('@middy/core')
const { cors } = require('@middy/http-cors')

const handler = middy((event, context, cb) => {
cb(null, {})
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/cors",
"version": "1.0.0-alpha.5",
"name": "@middy/http-cors",
"version": "1.0.0-alpha.6",
"description": "CORS (Cross-Origin Resource Sharing) middleware for the middy framework",
"engines": {
"node": ">=6.10"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/http-error-handler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/http-error-handler",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"description": "Http error handler middleware for the middy framework",
"engines": {
"node": ">=6.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/http-event-normalizer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/http-event-normalizer",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"description": "Http event normalizer middleware for the middy framework",
"engines": {
"node": ">=6.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/http-header-normalizer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/http-header-normalizer",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"description": "Http header normalizer middleware for the middy framework",
"engines": {
"node": ">=6.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/http-json-body-parser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/http-json-body-parser",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"description": "Http JSON body parser middleware for the middy framework",
"engines": {
"node": ">=6.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/http-partial-response/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/http-partial-response",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"description": "Http partial response middleware for the middy framework",
"engines": {
"node": ">=6.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/http-urlencode-body-parser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/http-urlencode-body-parser",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"description": "Urlencode body parser middleware for the middy framework",
"engines": {
"node": ">=6.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/s3-key-normalizer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/s3-key-normalizer",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"description": "S3 key normalizer middleware for the middy framework",
"engines": {
"node": ">=6.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/ssm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/ssm",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"description": "SSM (EC2 Systems Manager) parameters middleware for the middy framework",
"engines": {
"node": ">=6.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/validator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/validator",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"description": "Validator middleware for the middy framework",
"engines": {
"node": ">=6.10"
Expand Down
2 changes: 1 addition & 1 deletion packages/warmup/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middy/warmup",
"version": "1.0.0-alpha.5",
"version": "1.0.0-alpha.6",
"description": "Warmup (cold start mitigation) middleware for the middy framework",
"engines": {
"node": ">=6.10"
Expand Down

0 comments on commit f8436ae

Please sign in to comment.