Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hc-service-client

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hc-service-client - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

3

lib/service_client.js

@@ -107,2 +107,5 @@ 'use strict';

// set `nestedQuerystring` to true if it's null or undefined. see https://github.com/node-modules/urllib/tree/677e2ef90b3c0e0f26889696ca6eb88e2c4f5ded#arguments
options.nestedQuerystring = _.isNil(options.nestedQuerystring) ? true : !!options.nestedQuerystring;
// get data content from stream promise

@@ -109,0 +112,0 @@ const getSteamData = new Promise(function (resolve) {

4

package.json
{
"name": "hc-service-client",
"version": "1.0.1",
"version": "1.0.2",
"description": "Service Client Extension for Honeybee",

@@ -22,3 +22,3 @@ "main": "index.js",

"qs": "6.4.0",
"urllib": "2.21.2"
"urllib": "2.26.0"
},

@@ -25,0 +25,0 @@ "devDependencies": {

@@ -19,3 +19,3 @@ 'use strict';

dtboost: {
endpoint: 'http://10.189.225.91',
endpoint: 'http://10.125.25.106',
token: 'a6be75f05b681c633465276910c5a994',

@@ -25,3 +25,3 @@ extension: ['otm']

system: {
endpoint: 'http://10.189.225.91:8000',
endpoint: 'http://10.125.25.106:8000',
token: 'a6be75f05b681c633465276910c5a994'

@@ -28,0 +28,0 @@ },

@@ -43,3 +43,3 @@ 'use strict';

endpoint: services.dtboost.endpoint,
accessKeyId: 'serviceClientTest',
accessKeyId: 'dtboost-system',
accessKeySecret: config.systemToken,

@@ -184,3 +184,3 @@ headers: {

debug('request with href', err, body);
assert(body);
assert(!err);
done();

@@ -198,2 +198,3 @@ });

client.post('/service/otm/api/v2/objects', {}, function (err) {
debug(arguments);
assert(err);

@@ -204,2 +205,54 @@ assert(err.code = 'OTM_ILLEGAL_PARAMETER');

});
it('urllib should use qs to stringify querystring.', function (done) {
const client = new ServiceClient({
endpoint: services.azk.endpoint,
accessKeyId: config.accessKeyId,
accessKeySecret: services.azk.accessKeySecret,
headers: {
'EagleEye-TraceId': '123456',
'X-ScopeId': config.tenantCode,
'X-Operator': config.userId,
'X-Work-App': config.workApp
}
});
client.get('/alg/categories', {
scopeId: 'dtboost',
isPrivate: true,
referType: 'DEFINE',
tenant: config.tenantCode,
a: [1, 2, 3]
}, function (err, body) {
// debug('azk service success', err, body);
assert(body);
done();
});
});
it('urllib should use querystring to signature occur error.', function (done) {
const client = new ServiceClient({
endpoint: services.azk.endpoint,
accessKeyId: config.accessKeyId,
accessKeySecret: services.azk.accessKeySecret,
headers: {
'EagleEye-TraceId': '123456',
'X-ScopeId': config.tenantCode,
'X-Operator': config.userId,
'X-Work-App': config.workApp
}
});
client.get('/alg/categories', {
scopeId: 'dtboost',
isPrivate: true,
referType: 'DEFINE',
tenant: config.tenantCode,
a: [1, 2, 3]
}, {
nestedQuerystring: false
}, function (err, body) {
// debug('azk service error', err, body);
assert(err.code, 'AZK-AUTHC-ERROR');
done();
});
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc