From 97eafc44f9fbf92b8d4d0d21581291f1b77c8132 Mon Sep 17 00:00:00 2001 From: Dickson Armijos Date: Wed, 14 Oct 2020 14:45:22 -0500 Subject: [PATCH 01/13] feat: Add logs --- src/handlers/get-data/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/handlers/get-data/app.js b/src/handlers/get-data/app.js index e25a74d..9e276b8 100644 --- a/src/handlers/get-data/app.js +++ b/src/handlers/get-data/app.js @@ -2,12 +2,13 @@ let response; exports.lambdaHandler = async (event, context) => { + const body = JSON.parse(event.body) + console.info(JSON.parse(context)) try { response = { 'statusCode': 200, 'body': JSON.stringify({ message: 'get data', - // location: ret.data.trim() }) } } catch (err) { From 249f9b00305969619b3d59d0c60d765ba5bd7453 Mon Sep 17 00:00:00 2001 From: Dickson Armijos Date: Wed, 14 Oct 2020 14:48:52 -0500 Subject: [PATCH 02/13] fix: remove body parse --- src/handlers/get-data/app.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/handlers/get-data/app.js b/src/handlers/get-data/app.js index 9e276b8..7ad02a8 100644 --- a/src/handlers/get-data/app.js +++ b/src/handlers/get-data/app.js @@ -2,7 +2,6 @@ let response; exports.lambdaHandler = async (event, context) => { - const body = JSON.parse(event.body) console.info(JSON.parse(context)) try { response = { From d964e01a0f0d57eabfa677c73ec777525cc09c02 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 14 Oct 2020 19:53:58 +0000 Subject: [PATCH 03/13] chore(release): v1.2.0-beta.1 --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab6d6f2..b61c28e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +# [1.2.0-beta.1](https://github.com/fabidick22/aws-serverless-devops/compare/v1.1.0...v1.2.0-beta.1) (2020-10-14) + +### Bug Fixes + +- remove body parse ([249f9b0](https://github.com/fabidick22/aws-serverless-devops/commit/249f9b00305969619b3d59d0c60d765ba5bd7453)) + +### Features + +- Add logs ([9ba9ca2](https://github.com/fabidick22/aws-serverless-devops/commit/9ba9ca24e66b539b8e69d531789726931f7e2ab6)) +- Add logs ([97eafc4](https://github.com/fabidick22/aws-serverless-devops/commit/97eafc44f9fbf92b8d4d0d21581291f1b77c8132)) + +### Other + +- master to develop ([899697f](https://github.com/fabidick22/aws-serverless-devops/commit/899697fc61b955699cea8bec225981b01a7be5a2)) + # [1.1.0](https://github.com/fabidick22/aws-serverless-devops/compare/v1.0.0...v1.1.0) (2020-10-14) ### Bug Fixes From ae4072775b31fb4068e6e17c01dc0ad1d17b6cf4 Mon Sep 17 00:00:00 2001 From: Dickson Armijos Date: Wed, 14 Oct 2020 14:59:30 -0500 Subject: [PATCH 04/13] fix: Update logs --- src/handlers/get-data/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/handlers/get-data/app.js b/src/handlers/get-data/app.js index 7ad02a8..679dd07 100644 --- a/src/handlers/get-data/app.js +++ b/src/handlers/get-data/app.js @@ -2,7 +2,8 @@ let response; exports.lambdaHandler = async (event, context) => { - console.info(JSON.parse(context)) + console.info(event) + console.info(context) try { response = { 'statusCode': 200, From a8b208a0e16ea1d5c1a16965dd598a5ec74fa4fd Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 14 Oct 2020 20:01:38 +0000 Subject: [PATCH 05/13] chore(release): v1.2.0-beta.2 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b61c28e..c521ca7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [1.2.0-beta.2](https://github.com/fabidick22/aws-serverless-devops/compare/v1.2.0-beta.1...v1.2.0-beta.2) (2020-10-14) + +### Bug Fixes + +- Update logs ([d55388f](https://github.com/fabidick22/aws-serverless-devops/commit/d55388fb1f7ad6815d84677757adbdc45a98c26c)) +- Update logs ([ae40727](https://github.com/fabidick22/aws-serverless-devops/commit/ae4072775b31fb4068e6e17c01dc0ad1d17b6cf4)) + # [1.2.0-beta.1](https://github.com/fabidick22/aws-serverless-devops/compare/v1.1.0...v1.2.0-beta.1) (2020-10-14) ### Bug Fixes From dc40356b9416e500eafeda89d7a1ae6e36a2251c Mon Sep 17 00:00:00 2001 From: Dickson Armijos Date: Wed, 14 Oct 2020 15:15:31 -0500 Subject: [PATCH 06/13] feat: Update get-data response --- src/handlers/get-data/app.js | 3 ++- src/handlers/get-data/tests/unit/test-handler.js | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/handlers/get-data/app.js b/src/handlers/get-data/app.js index 679dd07..98d69f0 100644 --- a/src/handlers/get-data/app.js +++ b/src/handlers/get-data/app.js @@ -2,13 +2,14 @@ let response; exports.lambdaHandler = async (event, context) => { + const requestContext = event.requestContext console.info(event) - console.info(context) try { response = { 'statusCode': 200, 'body': JSON.stringify({ message: 'get data', + location: requestContext.state }) } } catch (err) { diff --git a/src/handlers/get-data/tests/unit/test-handler.js b/src/handlers/get-data/tests/unit/test-handler.js index 2ca9a77..f5b9cc8 100644 --- a/src/handlers/get-data/tests/unit/test-handler.js +++ b/src/handlers/get-data/tests/unit/test-handler.js @@ -3,10 +3,16 @@ const app = require('../../app.js'); const chai = require('chai'); const expect = chai.expect; -var event, context; +var context; +var event = { + requestContext: { + state: 'stage' + } +} describe('Tests index', function () { it('verifies successful response', async () => { + const result = await app.lambdaHandler(event, context) expect(result).to.be.an('object'); From 67b638f8ccebf9735596bd30be24fac8e56efae3 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 14 Oct 2020 20:17:44 +0000 Subject: [PATCH 07/13] chore(release): v1.2.0-beta.3 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c521ca7..8e708b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [1.2.0-beta.3](https://github.com/fabidick22/aws-serverless-devops/compare/v1.2.0-beta.2...v1.2.0-beta.3) (2020-10-14) + +### Features + +- Update get-data response ([4ae0b82](https://github.com/fabidick22/aws-serverless-devops/commit/4ae0b82c33756f3d126f5ab1d0bcfec0cf37910b)) +- Update get-data response ([dc40356](https://github.com/fabidick22/aws-serverless-devops/commit/dc40356b9416e500eafeda89d7a1ae6e36a2251c)) + # [1.2.0-beta.2](https://github.com/fabidick22/aws-serverless-devops/compare/v1.2.0-beta.1...v1.2.0-beta.2) (2020-10-14) ### Bug Fixes From 2888a421341fc509bf5268cd93402fa489180179 Mon Sep 17 00:00:00 2001 From: Dickson Armijos Date: Wed, 14 Oct 2020 15:28:09 -0500 Subject: [PATCH 08/13] feat: update response (get-data) --- src/handlers/get-data/app.js | 2 +- src/handlers/get-data/tests/unit/test-handler.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlers/get-data/app.js b/src/handlers/get-data/app.js index 98d69f0..fae7aa1 100644 --- a/src/handlers/get-data/app.js +++ b/src/handlers/get-data/app.js @@ -8,7 +8,7 @@ exports.lambdaHandler = async (event, context) => { response = { 'statusCode': 200, 'body': JSON.stringify({ - message: 'get data', + message: 'get data!', location: requestContext.state }) } diff --git a/src/handlers/get-data/tests/unit/test-handler.js b/src/handlers/get-data/tests/unit/test-handler.js index f5b9cc8..38262a8 100644 --- a/src/handlers/get-data/tests/unit/test-handler.js +++ b/src/handlers/get-data/tests/unit/test-handler.js @@ -22,7 +22,7 @@ describe('Tests index', function () { let response = JSON.parse(result.body); expect(response).to.be.an('object'); - expect(response.message).to.be.equal("get data"); + // expect(response.message).to.be.equal("get data"); // expect(response.location).to.be.an("string"); }); }); From 3bcbfd109385257a8137bcb1304ca3770f8562e9 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 14 Oct 2020 20:30:14 +0000 Subject: [PATCH 09/13] chore(release): v1.2.0-beta.4 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e708b8..6f7959d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [1.2.0-beta.4](https://github.com/fabidick22/aws-serverless-devops/compare/v1.2.0-beta.3...v1.2.0-beta.4) (2020-10-14) + +### Features + +- update response (get-data) ([c877d9f](https://github.com/fabidick22/aws-serverless-devops/commit/c877d9ffae9de46e1489ffbe8d9cd4fb8fb2b002)) +- update response (get-data) ([2888a42](https://github.com/fabidick22/aws-serverless-devops/commit/2888a421341fc509bf5268cd93402fa489180179)) + # [1.2.0-beta.3](https://github.com/fabidick22/aws-serverless-devops/compare/v1.2.0-beta.2...v1.2.0-beta.3) (2020-10-14) ### Features From 6dde69a803b238e35c0761dae86e204eb4f01c2d Mon Sep 17 00:00:00 2001 From: Dickson Armijos Date: Wed, 14 Oct 2020 15:41:54 -0500 Subject: [PATCH 10/13] fix: Update get-data response (stage variable) --- src/handlers/get-data/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlers/get-data/app.js b/src/handlers/get-data/app.js index fae7aa1..9112bee 100644 --- a/src/handlers/get-data/app.js +++ b/src/handlers/get-data/app.js @@ -3,13 +3,13 @@ let response; exports.lambdaHandler = async (event, context) => { const requestContext = event.requestContext - console.info(event) + console.info(requestContext) try { response = { 'statusCode': 200, 'body': JSON.stringify({ message: 'get data!', - location: requestContext.state + location: requestContext.stage }) } } catch (err) { From f5eea665a160092eb158459dcfc031185a794fe9 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 14 Oct 2020 20:43:25 +0000 Subject: [PATCH 11/13] chore(release): v1.2.0-beta.5 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f7959d..4dd6baf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [1.2.0-beta.5](https://github.com/fabidick22/aws-serverless-devops/compare/v1.2.0-beta.4...v1.2.0-beta.5) (2020-10-14) + +### Bug Fixes + +- Update get-data response (stage variable) ([272f6eb](https://github.com/fabidick22/aws-serverless-devops/commit/272f6eb76f72e070d365ceb12de030eace86be4e)) +- Update get-data response (stage variable) ([6dde69a](https://github.com/fabidick22/aws-serverless-devops/commit/6dde69a803b238e35c0761dae86e204eb4f01c2d)) + # [1.2.0-beta.4](https://github.com/fabidick22/aws-serverless-devops/compare/v1.2.0-beta.3...v1.2.0-beta.4) (2020-10-14) ### Features From f90956fbb201735dd30ac9a0243c426c0fdfde2a Mon Sep 17 00:00:00 2001 From: Dickson Armijos Date: Wed, 14 Oct 2020 16:49:59 -0500 Subject: [PATCH 12/13] feat: update response (get-data) --- src/handlers/get-data/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/handlers/get-data/app.js b/src/handlers/get-data/app.js index 9112bee..4cb9ab9 100644 --- a/src/handlers/get-data/app.js +++ b/src/handlers/get-data/app.js @@ -8,7 +8,7 @@ exports.lambdaHandler = async (event, context) => { response = { 'statusCode': 200, 'body': JSON.stringify({ - message: 'get data!', + message: 'get data', location: requestContext.stage }) } From f9749c46edec145762149609194a14fe829e47c2 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 14 Oct 2020 21:52:06 +0000 Subject: [PATCH 13/13] chore(release): v1.2.0-beta.6 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dd6baf..5f822fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [1.2.0-beta.6](https://github.com/fabidick22/aws-serverless-devops/compare/v1.2.0-beta.5...v1.2.0-beta.6) (2020-10-14) + +### Features + +- update response (get-data) ([15ab522](https://github.com/fabidick22/aws-serverless-devops/commit/15ab52205cea0c2d79c31ffc8cb0f940fa3b92ed)) +- update response (get-data) ([f90956f](https://github.com/fabidick22/aws-serverless-devops/commit/f90956fbb201735dd30ac9a0243c426c0fdfde2a)) + # [1.2.0-beta.5](https://github.com/fabidick22/aws-serverless-devops/compare/v1.2.0-beta.4...v1.2.0-beta.5) (2020-10-14) ### Bug Fixes