Socket
Socket
Sign inDemoInstall

kinvey-flex-sdk

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kinvey-flex-sdk - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

4

CHANGELOG.md
## Changelog
### 2.0.2
* Fixed top-level errors to return JSON, fixing the bug where an invalid shared secret would generate the wrong error
* Set maxSockets to 100 for both http and https agents
### 2.0.1

@@ -4,0 +8,0 @@ * Fix stringification bug on some done() calls.

10

lib/flex.js

@@ -15,2 +15,4 @@ /**

const http = require('http');
const https = require('https');
const data = require('./service/data');

@@ -26,2 +28,5 @@ const isNil = require('lodash.isnil');

http.globalAgent.maxSockets = 100;
https.globalAgent.maxSockets = 100;
class Flex {

@@ -59,4 +64,5 @@ constructor(options, callback) {

const result = task.response;
result.body = kinveyErrors.generateKinveyError('Unauthorized', 'The Authorization Key was not valid or missing.');
result.body = kinveyErrors.generateKinveyError('Unauthorized', 'The Authorization Key was not valid or missing.').toJSON();
result.statusCode = result.body.statusCode;
delete result.body.statusCode;
return completionCallback(task);

@@ -69,3 +75,3 @@ }

const result = task.response;
result.body = kinveyErrors.generateKinveyError('BadRequest', 'Invalid task Type');
result.body = kinveyErrors.generateKinveyError('BadRequest', 'Invalid task Type').toJSON();
result.statusCode = result.body.statusCode;

@@ -72,0 +78,0 @@ delete result.body.statusCode;

{
"name": "kinvey-flex-sdk",
"version": "2.0.1",
"version": "2.0.2",
"description": "SDK for creating Kinvey Flex Services",

@@ -21,3 +21,3 @@ "engines": {

"kinvey-code-task-runner": "2.1.0",
"kinvey-datalink-errors": "0.2.2",
"kinvey-datalink-errors": "0.3.0",
"lodash.forown": "4.2.0",

@@ -24,0 +24,0 @@ "lodash.get": "4.3.0",

@@ -230,3 +230,3 @@ /**

mockTaskReceiver.taskReceived()(task, (err, result) => {
err.response.body.message.should.eql('InvalidCredentials');
err.response.body.error.should.eql('InvalidCredentials');
err.response.body.description.should.eql('Invalid credentials. Please retry your request with correct credentials.');

@@ -275,3 +275,3 @@ err.response.statusCode.should.eql(401);

mockTaskReceiver.taskReceived()(task, (err, result) => {
err.response.body.message.should.eql('InvalidCredentials');
err.response.body.error.should.eql('InvalidCredentials');
err.response.body.description.should.eql('Invalid credentials. Please retry your request with correct credentials.');

@@ -278,0 +278,0 @@ err.response.statusCode.should.eql(401);

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