From 764c78ac1f83fba4c736cb5e418d0feeabcaf0f4 Mon Sep 17 00:00:00 2001 From: patelravi Date: Thu, 11 Apr 2019 14:43:35 +0530 Subject: [PATCH 1/6] Added logic to add http response status in --- lib/rest/request.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/rest/request.js b/lib/rest/request.js index 30b5968..51f4227 100644 --- a/lib/rest/request.js +++ b/lib/rest/request.js @@ -59,6 +59,10 @@ export function Request(config) { } } else { let body = response.body; + let isObj = typeof _body === 'object' && _body !== null && !(_body instanceof Array) && !(_body instanceof Date) + if (isObj) { + _body['statusCode'] = response.statusCode; + } resolve({ response: response, body: body }); } }); From 5cdc8b1d398e8a0299602d3aec430bbaf05f3337 Mon Sep 17 00:00:00 2001 From: Harika Siddanathi Date: Wed, 24 Jul 2019 17:20:08 +0530 Subject: [PATCH 2/6] ci --- Jenkinsfile | 7 +++++++ ci/config.yml | 5 +++++ 2 files changed, 12 insertions(+) create mode 100644 Jenkinsfile create mode 100644 ci/config.yml diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..b2874e8 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,7 @@ +#!groovy + +@Library('plivo_standard_libs@sdks') _ + +sdksPipeline ([ + buildContainer: 'plivo/jenkins-ci/node-sdk:latest' +]) diff --git a/ci/config.yml b/ci/config.yml new file mode 100644 index 0000000..adef2ec --- /dev/null +++ b/ci/config.yml @@ -0,0 +1,5 @@ +--- +language: node-sdk +build: + command: | + npm install From b8b199cc0c23e3d0a98258018b67b14993ecb570 Mon Sep 17 00:00:00 2001 From: Deblina Date: Tue, 30 Jul 2019 17:39:10 +0530 Subject: [PATCH 3/6] added proxy support --- lib/utils/security.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/utils/security.js b/lib/utils/security.js index f5a6950..3990ecf 100644 --- a/lib/utils/security.js +++ b/lib/utils/security.js @@ -23,7 +23,8 @@ export function validateSignature(uri: string, nonce: string, signature: string, uri = utf8.encode(uri); let parsed_uri = parser.parse(uri); let url_protocol = parsed_uri.protocol == '' ? 'http://' : parsed_uri.protocol+'://'; - let base_url = buildUrl(url_protocol+parsed_uri.host, { path: parsed_uri.path }); + let proxy = parsed_uri.port == '' ? parsed_uri.host : parsed_uri.host + ':' + parsed_uri.port; + let base_url = buildUrl(url_protocol + proxy , { path: parsed_uri.path }); let hmac = crypto.createHmac('sha256', auth_token); let hmacBytes = base64.decode(hmac.update(base_url+nonce).digest('base64')); let authentication_string = base64.encode(hmacBytes); From 52795c24110184f666e01dd3be0baed542a2722c Mon Sep 17 00:00:00 2001 From: Deblina Date: Tue, 30 Jul 2019 17:58:45 +0530 Subject: [PATCH 4/6] bump version to 4.1.3 --- CHANGELOG.md | 8 ++++++-- package.json | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37f887d..7573d86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,13 @@ # Change Log -## [4.1.2](https://github.com/plivo/plivo-node/releases/tag/v4.1.0)(2019-03-11) +## [4.1.3](https://github.com/plivo/plivo-node/releases/tag/v4.1.3)(2019-07-30) +- Add proxy-support for Signature Validation +- Add HTTP status codes in responses + +## [4.1.2](https://github.com/plivo/plivo-node/releases/tag/v4.1.2)(2019-03-19) - Add support: Handling circular reference stringify logic -## [4.1.1](https://github.com/plivo/plivo-node/releases/tag/v4.1.0)(2019-03-11) +## [4.1.1](https://github.com/plivo/plivo-node/releases/tag/v4.1.1)(2019-03-11) - Add PHLO support - Add Multiparty call triggers diff --git a/package.json b/package.json index 4ed69cc..5d5c8c5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "plivo", - "version": "4.1.2", - "description": "A Node.js SDK to make voice calls & send SMS using Plivo and to generate Plivo XML", + "version": "4.1.3", + "description": "A Node.js SDK to make voice calls and send SMS using Plivo and to generate Plivo XML", "homepage": "https://github.com/plivo/plivo-node", "files": [ "dist" From f0fd1125069b125ce87234a30d987ea9e37c88f5 Mon Sep 17 00:00:00 2001 From: Nixon Samuel Date: Tue, 30 Jul 2019 18:47:43 +0530 Subject: [PATCH 5/6] removed node 12 from travis yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a40bb38..cbc9852 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ service_name: travis-ci language: node_js node_js: - - "node" + # - "node" commenting this as we have to find out a solution for node12 & gulp3 - "lts/*" - "8" - "7" From ec522c6af1294325ab68fd16d75c1e9ace9b8934 Mon Sep 17 00:00:00 2001 From: harika siddanathi <38065154+harika245@users.noreply.github.com> Date: Tue, 5 Nov 2019 18:41:31 +0530 Subject: [PATCH 6/6] parent and servicename --- ci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/config.yml b/ci/config.yml index adef2ec..71c3e3a 100644 --- a/ci/config.yml +++ b/ci/config.yml @@ -1,4 +1,6 @@ --- +parent: central +serviceName: plivo-node language: node-sdk build: command: |