kong-admin-node-client
Advanced tools
Comparing version 1.0.17 to 1.0.18
{ | ||
"name": "kong-admin-node-client", | ||
"version": "1.0.17", | ||
"version": "1.0.18", | ||
"description": "Kong admin API client in node", | ||
@@ -33,3 +33,3 @@ "main": "index.js", | ||
"pkginfo": "^0.4.1", | ||
"request": "^2.83.0", | ||
"request": "^2.85.0", | ||
"request-promise": "^4.2.2" | ||
@@ -36,0 +36,0 @@ }, |
@@ -13,7 +13,7 @@ let _ = require('lodash'), | ||
if (typeof key === 'string') { | ||
key = key.toLowerCase() | ||
key = key.toLowerCase(); | ||
} | ||
if (_.includes(fieldsToMask, key)) { | ||
return "XXXXX" | ||
return 'XXXXX'; | ||
} | ||
@@ -67,3 +67,3 @@ }); | ||
if (queryParams) { | ||
options.qs = queryParams | ||
options.qs = queryParams; | ||
} | ||
@@ -70,0 +70,0 @@ |
@@ -193,3 +193,4 @@ let httpHelper = require('./http-helper'), | ||
url: this.kongAdminUrl, | ||
apiId: apiName | ||
apiId: apiName, | ||
pluginName: plugin.name | ||
}; | ||
@@ -304,4 +305,3 @@ getPluginRequest = addHeadersToRequest(this.headers, headers, getPluginRequest); | ||
let getPluginsResponse = await | ||
httpHelper.getPlugins(getPluginsRequest); | ||
let getPluginsResponse = await httpHelper.getPlugins(getPluginsRequest); | ||
@@ -308,0 +308,0 @@ if (apiName) { |
@@ -56,3 +56,3 @@ let httpHelper = require('../src/http-helper'), | ||
headers : { | ||
Authorization: `Bearer sessionToken`, | ||
Authorization: 'Bearer sessionToken', | ||
['x-zooz-account-id']: '*' | ||
@@ -103,3 +103,3 @@ } | ||
let headers = { | ||
Authorization: `Bearer overRide`, | ||
Authorization: 'Bearer overRide', | ||
['x-zooz-account-id']: '*' | ||
@@ -115,3 +115,3 @@ }; | ||
headers: { | ||
Authorization: `Bearer overRide`, | ||
Authorization: 'Bearer overRide', | ||
['x-zooz-account-id']: '*' | ||
@@ -297,2 +297,9 @@ } | ||
should(getPluginsStub.calledThrice).eql(true); | ||
should(getPluginsStub.getCall(2).args[0]).eql({ | ||
apiId: 'api', | ||
pluginName: 'plugin-name', | ||
url: 'url' | ||
}); | ||
should(createPluginStub.calledOnce).eql(true); | ||
@@ -435,3 +442,3 @@ should(deletePluginStub.calledTwice).eql(true); | ||
let plugin1 = { | ||
name: "first plugin" | ||
name: 'first plugin' | ||
}; | ||
@@ -444,3 +451,3 @@ getPluginsStub.onFirstCall().returns(Promise.resolve({ | ||
headers: { | ||
"Authorization": "Bearer undefined" | ||
'Authorization': 'Bearer undefined' | ||
} | ||
@@ -456,3 +463,3 @@ })); | ||
url: 'url', size: 100, apiId: 'api', offset: undefined | ||
}) | ||
}); | ||
}); | ||
@@ -462,6 +469,6 @@ }); | ||
let plugin1 = { | ||
name: "first plugin" | ||
name: 'first plugin' | ||
}; | ||
let plugin2 = { | ||
name: "second plugin" | ||
name: 'second plugin' | ||
}; | ||
@@ -481,3 +488,3 @@ getPluginsStub.onFirstCall().returns(Promise.resolve({ | ||
headers: { | ||
"Authorization": "Bearer undefined" | ||
'Authorization': 'Bearer undefined' | ||
} | ||
@@ -496,3 +503,3 @@ })); | ||
apiId: 'api', | ||
offset: "some_offset", | ||
offset: 'some_offset', | ||
}); | ||
@@ -499,0 +506,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
61745
1502
Updatedrequest@^2.85.0