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

kinvey-backend-sdk

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kinvey-backend-sdk - npm Package Compare versions

Comparing version 0.3.4 to 0.4.0

.eslintrc

4

CHANGELOG.md
## Changelog
### 0.4.0
* Complete rewrite in es6, targeting node 6
* Back 1531 make backend sdk work externally
### 0.3.4

@@ -4,0 +8,0 @@ * Parse request.query if it is stringified

1

index.js

@@ -13,3 +13,2 @@ // Copyright (c) 2016 Kinvey Inc.

require('coffee-script/register')
module.exports = require('./lib/sdk');
{
"name": "kinvey-backend-sdk",
"version": "0.3.4",
"version": "0.4.0",
"description": "Backend SDK",
"engines": {
"node": "= 0.10.x"
"node": "= 6.2.x"
},
"author": "Kinvey <support@kinvey.com>",
"contributors": [
"Michael Salinger <mjsalinger@kinvey.com>"
"Michael Salinger <mjsalinger@kinvey.com>",
"Sam Levin <sam@kinvey.com>"
],
"repository" : { "type": "git", "url": "Kinvey/backend-sdk" },
"repository": {
"type": "git",
"url": "Kinvey/backend-sdk"
},
"license": "Apache-2.0",
"dependencies": {
"coffee-script": "1.7.1",
"request": "2.44.0",
"moment": "2.10.6",
"bson":"0.4.15",
"kinvey-code-task-runner": "0.1.3",
"kinvey-datalink-errors": "0.2.2"
"bson": "0.4.23",
"kinvey-code-task-runner": "0.2.0",
"kinvey-datalink-errors": "0.2.2",
"lodash.forown": "4.2.0",
"lodash.get": "4.3.0",
"lodash.has": "4.4.0",
"lodash.isnil": "4.0.0",
"moment": "2.13.0",
"request": "2.72.0"
},
"devDependencies": {
"mocha": "1.21.4",
"eslint": "2.11.1",
"eslint-config-airbnb-base": "3.0.1",
"eslint-plugin-import": "1.8.1",
"mocha": "2.5.3",
"proxyquire": "1.7.9",
"should": "3.3.2",
"coffeelint": "1.8.1",
"proxyquire": "1.0.1",
"sinon": "1.10.3"
"sinon": "1.17.4"
},
"scripts": {
"pretest": "./node_modules/.bin/coffeelint --file ./coffeelint.json lib test",
"pretest": "./node_modules/.bin/eslint lib test",
"test": "mocha test/lib/modules/* test/lib/*",
"test-core": "mocha test/lib/*",
"test-sdk": "mocha test/lib/sdk.test.coffee",
"test-datalink": "mocha test/lib/dataLink.test.coffee",
"test-businesslogic": "mocha test/lib/businessLogic.test.coffee",
"test-moduleGenerator": "mocha test/lib/moduleGenerator.test.coffee",
"test-sdk": "mocha test/lib/sdk.test.js",
"test-datalink": "mocha test/lib/dataLink.test.js",
"test-businesslogic": "mocha test/lib/businessLogic.test.js",
"test-moduleGenerator": "mocha test/lib/moduleGenerator.test.js",
"test-modules": "mocha test/lib/modules/*",
"test-backendcontext": "mocha test/lib/modules/backendContext.test.coffee",
"test-email": "mocha test/lib/modules/email.test.coffee",
"test-entity": "mocha test/lib/modules/entity.test.coffee",
"test-kinveydate": "mocha test/lib/modules/kinveyDate.test.coffee",
"test-logger": "mocha test/lib/modules/logger.test.coffee",
"test-push": "mocha test/lib/modules/push.test.coffee",
"test-requestcontext": "mocha test/lib/modules/requestContext.test.coffee",
"test-tempobjectstore": "mocha test/lib/modules/tempObjectStore.test.coffee",
"test-validation": "mocha test/lib/modules/validation.test.coffee"
"test-backendcontext": "mocha test/lib/modules/backendContext.test.js",
"test-email": "mocha test/lib/modules/email.test.js",
"test-entity": "mocha test/lib/modules/entity.test.js",
"test-kinveydate": "mocha test/lib/modules/kinveyDate.test.js",
"test-logger": "mocha test/lib/modules/logger.test.js",
"test-push": "mocha test/lib/modules/push.test.js",
"test-requestcontext": "mocha test/lib/modules/requestContext.test.js",
"test-tempobjectstore": "mocha test/lib/modules/tempObjectStore.test.js",
"test-validation": "mocha test/lib/modules/validation.test.js"
}
}

@@ -18,3 +18,3 @@ # Kinvey Backend SDK (beta)

```
var sdk = require('kinvey-backend-sdk');
const sdk = require('kinvey-backend-sdk');
```

@@ -25,3 +25,3 @@

```
var service = sdk.service(function(err, service) {
const service = sdk.service((err, service) => {
// code goes here

@@ -31,2 +31,13 @@ };

When running locally, you can specify a host and port to listen on by passing an options object with an optional host and port. If no host/port is specified, localhost:10001 will be used:
```
const service = sdk.service({ host: 'somehost', port: 7777 }, (err, service) => {
// code goes here
};
```
To run your code locally, execute `node .` in the root of your project. Routes conform to the Kinvey Data Link specification.
## DataLink framework

@@ -37,3 +48,3 @@

```
var dataLink = sdk.dataLink;
const dataLink = sdk.dataLink;
```

@@ -47,3 +58,3 @@

// To register the 'widgets' ServiceObject:
var widgets = sdk.dataLink.serviceObject('widgets');
const widgets = sdk.dataLink.serviceObject('widgets');
```

@@ -164,12 +175,9 @@

```
var sdk = require('kinvey-backend-sdk');
var service = sdk.service(function(err, service) {
var dataLink = service.dataLink; // gets the datalink object from the service
var notImplementedHandler = function(request, complete) {
complete("These methods are not implemented").notImplemented().done();
};
const sdk = require('kinvey-backend-sdk');
const service = sdk.service(function(err, service) {
const dataLink = service.dataLink; // gets the datalink object from the service
var getRecordById = function(request, complete) {
var entityId = request.entityId;
var entity;
const getRecordById = function(request, complete) {
let entityId = request.entityId;
let entity = null;

@@ -189,3 +197,3 @@ // Do some logic to get the entity id from the remote data store

// set the serviceObject
var widgets = dataLink.serviceObject('widgets');
const widgets = dataLink.serviceObject('widgets');

@@ -192,0 +200,0 @@ // wire up the event that we want to process

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