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

reob

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reob - npm Package Compare versions

Comparing version 0.1.36 to 0.1.37

server.d.ts

14

package.json
{
"name": "reob",
"description": "Remote objects - Create backends for one page web apps with ease. Uses mongo and express.",
"version": "0.1.36",
"version": "0.1.37",
"repository": "https://github.com/bvanheukelom/reob",
"license": "MIT",
"main": "dist/src/reob.js",
"typings": "dist/src/reob.d.ts",
"main": "src/reob.js",
"typings": "src/reob.ts",
"scripts": {
"test": "jasmine",
"test": "node $NODE_DEBUG_OPTION ./node_modules/jasmine/bin/jasmine.js",
"clean-m": "find s*/ -type f -name '*.js' -delete && find s*/ -type f -name '*.d.ts' -delete && find s*/ -type f -name '*.js.map' -delete && rm -rf dist",

@@ -24,3 +24,3 @@ "clean": "npm run clean-m && rm -rf node_modules && rm -rf .tscache",

"@types/jasmine": "^2.5.53",
"@types/mongodb": "^2.2.11",
"@types/mongodb": "^3.1.4",
"@types/node": "^8.0.9",

@@ -37,7 +37,7 @@ "@types/node-fetch": "^1.6.7",

"dependencies": {
"express": "^4.16.2",
"compression": "^1.6.2",
"eventemitter2": "^2.1.0",
"express": "^4.16.2",
"jsondiffpatch": "^0.1.43",
"mongodb": "^2.2.26",
"mongodb": "^3.1.3",
"uuid": "^3.1.0",

@@ -44,0 +44,0 @@ "web-methods": "*"

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./dist/src/serverModule"));
__export(require("./src/serverModule"));
//# sourceMappingURL=server.js.map

@@ -1,1 +0,1 @@

export * from "./dist/src/serverModule"
export * from "./src/serverModule"

@@ -34,3 +34,2 @@ import * as reob from "../../src/reob"

//console.log("Tree is growing to new heights: ", this.height+" on the "+(omm.getMeteor().isServer?"server":"client"));
debugger;
this.leaves.push(new Tests.TestLeaf("leaf" + this.getHeight(), this));

@@ -37,0 +36,0 @@ this.leaves.forEach(function (l:Tests.TestLeaf) {

{
"spec_dir": ".",
"spec_files": [
"./dist/**/*[sS]pec.js"
"./spec/**/*[sS]pec.js"
],

@@ -6,0 +6,0 @@ "helpers": [

@@ -186,13 +186,8 @@ /**

it("can run collection updates from within another method", function (done) {
var t1:Tests.TestTree = new Tests.TestTree(15);
treeCollection.insert(t1).then( (id:string)=> {
debugger;
return clientTreeService.growTree( id ).then( ()=>id );
}).then((id)=>{
return treeCollection.getByIdOrFail(id);
}).then((t)=>{
expect( t.getLeaves().length ).toBe(1);
done();
});
it("can run collection updates from within another method", async function () {
let t1:Tests.TestTree = new Tests.TestTree(15);
let id = await treeCollection.insert(t1);
await clientTreeService.growTree( id );
let t = await treeCollection.getByIdOrFail(id);
expect( t.getLeaves().length ).toBe(1);
});

@@ -212,3 +207,2 @@

treeCollection.insert(t1).then( (id:string)=> {
debugger;
return clientTreeService.growTree( id ).then( ()=>id );

@@ -245,3 +239,2 @@ }).then((id)=>{

var i;
debugger;
Promise.all([treeCollection.insert(t1), personCollection.newPerson("norbert")]).then((arr)=>{

@@ -302,3 +295,2 @@ return clientTreeService.aTreeAndAPerson(arr[0],arr[1].getId());

var doc = new reob.Serializer().toDocument(t1);
debugger;
var t2 = new reob.Serializer().toObject(doc, treeCollection, Tests.TestTree, new reob.SerializationPath(treeCollection.getName(), "tree1") );

@@ -539,3 +531,2 @@ var sp = reob.SerializationPath.getObjectContext(t2).serializationPath;

parent.parentOther.otherness = 84;
debugger;
var doc:any = s.toDocument(parent, true);

@@ -788,3 +779,2 @@ console.log(doc);

var serializer = new reob.Serializer();
debugger;
var doc:any = serializer.toDocument(tree);

@@ -791,0 +781,0 @@ expect( tree.someArray.length ).toBe(0);

@@ -6,2 +6,3 @@

import * as uuid from "uuid"
import {Db} from "mongodb";

@@ -182,3 +183,3 @@ /**

setMongoCollection( db:any ){
setMongoCollection( db:Db ){
// if( omm.isVerbose() )console.log("set mongo collection for collection ", this );

@@ -385,3 +386,3 @@ this.mongoCollection = db.collection( this.name );

return this.getMongoCollection().updateOne({
return this.getMongoCollection().replaceOne({
_id: reob.getId(rootObject),

@@ -388,0 +389,0 @@ serial: currentSerial

@@ -13,2 +13,3 @@ /**

import * as compression from "compression"
import {MongoClient} from "mongodb";

@@ -66,12 +67,12 @@ export declare type LoadingCheck = (id:string, request:reob.Request, obj:any ) => boolean|Promise<void>;

async connectToMongoDb(){
async connectToMongoDb():Promise<void>{
if( !this.mongoDb ) {
this.mongoDb = await <any>mongo.MongoClient.connect(this.mongoUrl).then((db: mongo.Db) => {
for (var i in this.collections) {
var c: reob.Collection<any> = this.collections[i];
c.setMongoCollection(db);
}
return db;
});
//let client = new MongoClient(this.mongoUrl);
let client:MongoClient = await MongoClient.connect(this.mongoUrl);
this.mongoDb = client.db();
}
for (var i in this.collections) {
var c: reob.Collection<any> = this.collections[i];
c.setMongoCollection(this.mongoDb);
}
}

@@ -78,0 +79,0 @@

@@ -13,4 +13,3 @@ {

"declaration": true,
"moduleResolution": "node",
"outDir": "dist"
"moduleResolution": "node"
},

@@ -17,0 +16,0 @@ "include": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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