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

redink

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redink - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

5

dist/dbSingleton.js

@@ -12,2 +12,4 @@ 'use strict';

var _redinkErrors = require('redink-errors');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -35,2 +37,5 @@

return db.instance.connect();
},
instance: function instance() {
throw new _redinkErrors.RedinkError('Error in db singleton: Redink not initialized.');
}

@@ -37,0 +42,0 @@ };

13

dist/redink.js

@@ -219,7 +219,3 @@ 'use strict';

var didSucceed = function didSucceed(archived) {
var result = archived ? { deleted: true, id: id } : { deleted: false };
return result;
};
var table = _rethinkdb2.default.table(type);
var query = new Promise(function (resolve) {

@@ -229,5 +225,10 @@ return resolve((0, _cascadeArchive2.default)(id, type, conn, schemas));

var fieldsToMerge = (0, _getFieldsToMerge2.default)(schemas, type);
var fetch = function fetch() {
return table.get(id).merge(fieldsToMerge).run(conn);
};
return query.then(function (reql) {
return new Promise(function (resolve, reject) {
_rethinkdb2.default.do(reql).run(conn).then(didSucceed).then(resolve).catch( /* istanbul ignore next */function (err) {
_rethinkdb2.default.do(reql).run(conn).then(fetch).then(resolve).catch( /* istanbul ignore next */function (err) {
return reject(new _redinkErrors.RedinkDatabaseError('Error archiving record of type \'' + type + '\': ' + err.message));

@@ -234,0 +235,0 @@ });

{
"name": "redink",
"version": "0.1.0",
"version": "0.1.1",
"description": "RethinkDB ORM",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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