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

o-m-m

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

o-m-m - npm Package Compare versions

Comparing version 0.0.28 to 0.0.29

2

package.json
{
"name": "o-m-m",
"version": "0.0.28",
"version": "0.0.29",
"main": "src/omm.js",

@@ -5,0 +5,0 @@ "typings": "src/omm.ts",

@@ -8,2 +8,5 @@ "use strict";

};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
/**

@@ -13,2 +16,3 @@ * Created by bert on 04.05.15.

var omm = require("../../src/omm");
var Tests = require("./Tests");
var TestAddress = (function () {

@@ -24,6 +28,8 @@ function TestAddress(street, person) {

omm.AsForeignKey,
omm.Type("TestPerson")
omm.Type("TestPerson"),
__metadata('design:type', Tests.TestPerson)
], TestAddress.prototype, "person", void 0);
TestAddress = __decorate([
omm.Entity
omm.Entity,
__metadata('design:paramtypes', [String, Tests.TestPerson])
], TestAddress);

@@ -30,0 +36,0 @@ return TestAddress;

@@ -8,3 +8,7 @@ "use strict";

};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var omm = require("../../src/omm");
var Tests = require("./Tests");
var TestCar = (function () {

@@ -15,12 +19,16 @@ function TestCar() {

__decorate([
omm.Type("TestWheelBanzai")
omm.Type("TestWheelBanzai"),
__metadata('design:type', Tests.TestWheel)
], TestCar.prototype, "wheel", void 0);
__decorate([
omm.ArrayOrMap("TestWheelBanzai")
omm.ArrayOrMap("TestWheelBanzai"),
__metadata('design:type', Array)
], TestCar.prototype, "wheels", void 0);
__decorate([
omm.Ignore
omm.Ignore,
__metadata('design:type', String)
], TestCar.prototype, "temperature", void 0);
TestCar = __decorate([
omm.Entity
omm.Entity,
__metadata('design:paramtypes', [])
], TestCar);

@@ -27,0 +35,0 @@ return TestCar;

@@ -13,2 +13,5 @@ "use strict";

};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var omm = require("../../src/omm");

@@ -25,6 +28,8 @@ var Tests = require("./Tests");

__decorate([
omm.Type("TestInheritanceOther")
omm.Type("TestInheritanceOther"),
__metadata('design:type', Tests.TestInheritanceOther)
], TestInheritanceChild.prototype, "childOther", void 0);
TestInheritanceChild = __decorate([
omm.Entity
omm.Entity,
__metadata('design:paramtypes', [])
], TestInheritanceChild);

@@ -31,0 +36,0 @@ return TestInheritanceChild;

@@ -8,2 +8,5 @@ "use strict";

};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var omm = require("../../src/omm");

@@ -17,3 +20,4 @@ var TestInheritanceOther = (function () {

TestInheritanceOther = __decorate([
omm.Entity
omm.Entity,
__metadata('design:paramtypes', [])
], TestInheritanceOther);

@@ -20,0 +24,0 @@ return TestInheritanceOther;

@@ -8,3 +8,7 @@ "use strict";

};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var omm = require("../../src/omm");
var Tests = require("./Tests");
var TestInheritanceParent = (function () {

@@ -14,10 +18,13 @@ function TestInheritanceParent() {

__decorate([
omm.Type("TestInheritanceOther")
omm.Type("TestInheritanceOther"),
__metadata('design:type', Tests.TestInheritanceOther)
], TestInheritanceParent.prototype, "parentOther", void 0);
__decorate([
omm.Type("TestPerson"),
omm.AsForeignKey
omm.AsForeignKey,
__metadata('design:type', Tests.TestPerson)
], TestInheritanceParent.prototype, "person", void 0);
__decorate([
omm.Ignore
omm.Ignore,
__metadata('design:type', Tests.TestInheritanceOther)
], TestInheritanceParent.prototype, "ignoredOther", void 0);

@@ -24,0 +31,0 @@ return TestInheritanceParent;

@@ -11,3 +11,7 @@ /**

};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var omm = require("../../src/omm");
var Tests = require("./Tests");
var TestLeaf = (function () {

@@ -33,12 +37,18 @@ function TestLeaf(id, parent) {

__decorate([
omm.DocumentName("greenIndex")
omm.DocumentName("greenIndex"),
__metadata('design:type', Number)
], TestLeaf.prototype, "greenNess", void 0);
__decorate([
omm.Parent
omm.Parent,
__metadata('design:type', Tests.TestTree)
], TestLeaf.prototype, "parent", void 0);
__decorate([
omm.Wrap
omm.Wrap,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], TestLeaf.prototype, "flutter", null);
TestLeaf = __decorate([
omm.Entity
omm.Entity,
__metadata('design:paramtypes', [String, Tests.TestTree])
], TestLeaf);

@@ -45,0 +55,0 @@ return TestLeaf;

@@ -8,4 +8,8 @@ "use strict";

};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
///<reference path="./references.d.ts"/>
var omm = require("../../src/omm");
var Tests = require("./Tests");
var TestPerson = (function () {

@@ -96,72 +100,117 @@ function TestPerson(id, name) {

__decorate([
omm.Type("TestPhoneNumber")
omm.Type("TestPhoneNumber"),
__metadata('design:type', Tests.TestPhoneNumber)
], TestPerson.prototype, "phoneNumber", void 0);
__decorate([
omm.ArrayOrMap("TestAddress")
omm.ArrayOrMap("TestAddress"),
__metadata('design:type', Array)
], TestPerson.prototype, "addresses", void 0);
__decorate([
omm.Type("TestTree"),
omm.AsForeignKeys
omm.AsForeignKeys,
__metadata('design:type', Tests.TestTree)
], TestPerson.prototype, "tree", void 0);
__decorate([
omm.Type("TestLeaf"),
omm.AsForeignKeys
omm.AsForeignKeys,
__metadata('design:type', Tests.TestLeaf)
], TestPerson.prototype, "leaf", void 0);
__decorate([
omm.ArrayOrMap("TestLeaf"),
omm.AsForeignKeys
omm.AsForeignKeys,
__metadata('design:type', Array)
], TestPerson.prototype, "trees", void 0);
__decorate([
omm.ArrayOrMap("TestPhoneNumber")
omm.ArrayOrMap("TestPhoneNumber"),
__metadata('design:type', Object)
], TestPerson.prototype, "phoneBook", void 0);
__decorate([
omm.ArrayOrMap("TestTree"),
omm.AsForeignKeys
omm.AsForeignKeys,
__metadata('design:type', Object)
], TestPerson.prototype, "wood", void 0);
__decorate([
omm.ArrayOrMap("TestPerson"),
omm.AsForeignKeys
omm.AsForeignKeys,
__metadata('design:type', Object)
], TestPerson.prototype, "family", void 0);
__decorate([
omm.Wrap
omm.Wrap,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], TestPerson.prototype, "collectLeaf", null);
__decorate([
omm.Wrap
omm.Wrap,
__metadata('design:type', Function),
__metadata('design:paramtypes', [Tests.TestTree]),
__metadata('design:returntype', void 0)
], TestPerson.prototype, "chooseTree", null);
__decorate([
omm.Wrap
omm.Wrap,
__metadata('design:type', Function),
__metadata('design:paramtypes', [Tests.TestLeaf]),
__metadata('design:returntype', void 0)
], TestPerson.prototype, "chooseLeaf", null);
__decorate([
omm.CollectionUpdate,
omm.MeteorMethod
omm.MeteorMethod,
__metadata('design:type', Function),
__metadata('design:paramtypes', [String]),
__metadata('design:returntype', String)
], TestPerson.prototype, "rename", null);
__decorate([
omm.CollectionUpdate,
omm.MeteorMethod
omm.MeteorMethod,
__metadata('design:type', Function),
__metadata('design:paramtypes', [String]),
__metadata('design:returntype', String)
], TestPerson.prototype, "collectionUpdateRename", null);
__decorate([
omm.CollectionUpdate,
omm.MeteorMethod({ parameterTypes: ["TestAddress"], replaceWithCall: true })
omm.MeteorMethod({ parameterTypes: ["TestAddress"], replaceWithCall: true }),
__metadata('design:type', Function),
__metadata('design:paramtypes', [Tests.TestAddress]),
__metadata('design:returntype', Tests.TestAddress)
], TestPerson.prototype, "addAddress", null);
__decorate([
omm.CollectionUpdate,
omm.MeteorMethod({ parameterTypes: ["TestAddress"], replaceWithCall: true })
omm.MeteorMethod({ parameterTypes: ["TestAddress"], replaceWithCall: true }),
__metadata('design:type', Function),
__metadata('design:paramtypes', [Array]),
__metadata('design:returntype', Array)
], TestPerson.prototype, "addAddresses", null);
__decorate([
omm.MeteorMethod({ parameterTypes: ["callback"], replaceWithCall: true, serverOnly: true })
omm.MeteorMethod({ parameterTypes: ["callback"], replaceWithCall: true, serverOnly: true }),
__metadata('design:type', Function),
__metadata('design:paramtypes', [Function]),
__metadata('design:returntype', void 0)
], TestPerson.prototype, "fromServer", null);
__decorate([
omm.Wrap
omm.Wrap,
__metadata('design:type', Function),
__metadata('design:paramtypes', [Tests.TestTree, String]),
__metadata('design:returntype', void 0)
], TestPerson.prototype, "addToWood", null);
__decorate([
omm.Wrap
omm.Wrap,
__metadata('design:type', Function),
__metadata('design:paramtypes', [String, Tests.TestPerson]),
__metadata('design:returntype', void 0)
], TestPerson.prototype, "addFamilyRelation", null);
__decorate([
omm.Wrap
omm.Wrap,
__metadata('design:type', Function),
__metadata('design:paramtypes', [String, Tests.TestPhoneNumber]),
__metadata('design:returntype', void 0)
], TestPerson.prototype, "addPhoneNumber", null);
__decorate([
omm.Wrap
omm.Wrap,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', Number)
], TestPerson.prototype, "tendToGarden", null);
TestPerson = __decorate([
omm.Entity
omm.Entity,
__metadata('design:paramtypes', [String, String])
], TestPerson);

@@ -168,0 +217,0 @@ return TestPerson;

@@ -13,2 +13,5 @@ "use strict";

};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var omm = require("../../src/omm");

@@ -79,21 +82,42 @@ var Tests = require("./Tests");

__decorate([
omm.MeteorMethod({ object: 'TestPersonCollection', replaceWithCall: true, serverOnly: true, parameterTypes: ["string", "callback"] })
omm.MeteorMethod({ object: 'TestPersonCollection', replaceWithCall: true, serverOnly: true, parameterTypes: ["string", "callback"] }),
__metadata('design:type', Function),
__metadata('design:paramtypes', [String, Function]),
__metadata('design:returntype', void 0)
], TestPersonCollection.prototype, "newPerson", null);
__decorate([
omm.MeteorMethod({ object: 'TestPersonCollection' })
omm.MeteorMethod({ object: 'TestPersonCollection' }),
__metadata('design:type', Function),
__metadata('design:paramtypes', [String]),
__metadata('design:returntype', Tests.TestPerson)
], TestPersonCollection.prototype, "insertPerson", null);
__decorate([
omm.MeteorMethod({ object: 'TestPersonCollection', replaceWithCall: true, parameterTypes: ["TestPerson", "TestPerson", "callback"] })
omm.MeteorMethod({ object: 'TestPersonCollection', replaceWithCall: true, parameterTypes: ["TestPerson", "TestPerson", "callback"] }),
__metadata('design:type', Function),
__metadata('design:paramtypes', [Tests.TestPerson, Tests.TestPerson, Function]),
__metadata('design:returntype', void 0)
], TestPersonCollection.prototype, "haveBaby", null);
__decorate([
omm.MeteorMethod({ object: 'TestPersonCollection', replaceWithCall: true, serverOnly: true, parameterTypes: ["string", "callback"] })
omm.MeteorMethod({ object: 'TestPersonCollection', replaceWithCall: true, serverOnly: true, parameterTypes: ["string", "callback"] }),
__metadata('design:type', Function),
__metadata('design:paramtypes', [String, Function]),
__metadata('design:returntype', void 0)
], TestPersonCollection.prototype, "removePerson", null);
__decorate([
omm.MeteorMethod({ object: 'TestPersonCollection', replaceWithCall: true, serverOnly: true, parameterTypes: ["callback"] })
omm.MeteorMethod({ object: 'TestPersonCollection', replaceWithCall: true, serverOnly: true, parameterTypes: ["callback"] }),
__metadata('design:type', Function),
__metadata('design:paramtypes', [Function]),
__metadata('design:returntype', void 0)
], TestPersonCollection.prototype, "removeAllPersons", null);
__decorate([
omm.StaticMeteorMethod
omm.StaticMeteorMethod,
__metadata('design:type', Function),
__metadata('design:paramtypes', [String]),
__metadata('design:returntype', Tests.TestPerson)
], TestPersonCollection, "staticInsertPerson", null);
__decorate([
omm.StaticMeteorMethod('helloWorld', { parameterTypes: ['string'] })
omm.StaticMeteorMethod('helloWorld', { parameterTypes: ['string'] }),
__metadata('design:type', Function),
__metadata('design:paramtypes', [String]),
__metadata('design:returntype', Tests.TestPerson)
], TestPersonCollection, "staticInsertPerson2", null);

@@ -100,0 +124,0 @@ return TestPersonCollection;

@@ -8,2 +8,5 @@ "use strict";

};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var omm = require("../../src/omm");

@@ -43,6 +46,10 @@ var TestPhoneNumber = (function () {

__decorate([
omm.Wrap
omm.Wrap,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', String)
], TestPhoneNumber.prototype, "callNumber", null);
TestPhoneNumber = __decorate([
omm.Entity
omm.Entity,
__metadata('design:paramtypes', [String])
], TestPhoneNumber);

@@ -49,0 +56,0 @@ return TestPhoneNumber;

@@ -8,2 +8,5 @@ "use strict";

};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
///<reference path="./references.d.ts"/>

@@ -49,27 +52,43 @@ var omm = require("../../src/omm");

__decorate([
omm.Id
omm.Id,
__metadata('design:type', String)
], TestTree.prototype, "treeId", void 0);
__decorate([
omm.ArrayType("TestLeaf"),
omm.DocumentName('thoseGreenThings')
omm.DocumentName('thoseGreenThings'),
__metadata('design:type', Array)
], TestTree.prototype, "leaves", void 0);
__decorate([
omm.Type("TestAddress"),
omm.AsForeignKey
omm.AsForeignKey,
__metadata('design:type', Tests.TestAddress)
], TestTree.prototype, "address", void 0);
__decorate([
omm.Wrap
omm.Wrap,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', String)
], TestTree.prototype, "grow", null);
__decorate([
omm.Wrap
omm.Wrap,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], TestTree.prototype, "wither", null);
__decorate([
omm.Wrap
omm.Wrap,
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], TestTree.prototype, "thisThrowsAnError", null);
__decorate([
omm.CollectionUpdate,
omm.MeteorMethod({ replaceWithCall: true, resultType: "TestLeaf" })
omm.MeteorMethod({ replaceWithCall: true, resultType: "TestLeaf" }),
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', void 0)
], TestTree.prototype, "growAndReturnLeaves", null);
TestTree = __decorate([
omm.Entity
omm.Entity,
__metadata('design:paramtypes', [Number])
], TestTree);

@@ -76,0 +95,0 @@ return TestTree;

@@ -16,2 +16,5 @@ /**

};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var omm = require("../../src/omm");

@@ -71,15 +74,30 @@ var Tests = require("./Tests");

__decorate([
omm.MeteorMethod({ object: 'TestTreeCollection', replaceWithCall: true, serverOnly: true, parameterTypes: ["number", "callback"] })
omm.MeteorMethod({ object: 'TestTreeCollection', replaceWithCall: true, serverOnly: true, parameterTypes: ["number", "callback"] }),
__metadata('design:type', Function),
__metadata('design:paramtypes', [Number, Function]),
__metadata('design:returntype', void 0)
], TestTreeCollection.prototype, "newTree", null);
__decorate([
omm.MeteorMethod({ object: 'TestTreeCollection', replaceWithCall: true, serverOnly: true, parameterTypes: ["number", "callback"] })
omm.MeteorMethod({ object: 'TestTreeCollection', replaceWithCall: true, serverOnly: true, parameterTypes: ["number", "callback"] }),
__metadata('design:type', Function),
__metadata('design:paramtypes', [Number, Function]),
__metadata('design:returntype', void 0)
], TestTreeCollection.prototype, "errorMethod", null);
__decorate([
omm.MeteorMethod({ object: 'TestTreeCollection', replaceWithCall: true, parameterTypes: ["string", "callback"] })
omm.MeteorMethod({ object: 'TestTreeCollection', replaceWithCall: true, parameterTypes: ["string", "callback"] }),
__metadata('design:type', Function),
__metadata('design:paramtypes', [String, Function]),
__metadata('design:returntype', void 0)
], TestTreeCollection.prototype, "deleteTree", null);
__decorate([
omm.MeteorMethod({ object: 'TestTreeCollection', replaceWithCall: true, parameterTypes: ["string", "TestTree", "number", "callback"] })
omm.MeteorMethod({ object: 'TestTreeCollection', replaceWithCall: true, parameterTypes: ["string", "TestTree", "number", "callback"] }),
__metadata('design:type', Function),
__metadata('design:paramtypes', [String, Tests.TestTree, Number, Function]),
__metadata('design:returntype', void 0)
], TestTreeCollection.prototype, "serverFunction", null);
__decorate([
omm.MeteorMethod({ object: 'TestTreeCollection', replaceWithCall: true, parameterTypes: ["callback"] })
omm.MeteorMethod({ object: 'TestTreeCollection', replaceWithCall: true, parameterTypes: ["callback"] }),
__metadata('design:type', Function),
__metadata('design:paramtypes', [Function]),
__metadata('design:returntype', void 0)
], TestTreeCollection.prototype, "removeAllTrees", null);

@@ -86,0 +104,0 @@ return TestTreeCollection;

@@ -8,3 +8,7 @@ "use strict";

};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var omm = require("../../src/omm");
var Tests = require("./Tests");
var TestWheel = (function () {

@@ -15,6 +19,8 @@ function TestWheel() {

omm.Type("TestCar"),
omm.AsForeignKey
omm.AsForeignKey,
__metadata('design:type', Tests.TestCar)
], TestWheel.prototype, "car", void 0);
TestWheel = __decorate([
omm.Entity("TestWheelBanzai")
omm.Entity("TestWheelBanzai"),
__metadata('design:paramtypes', [])
], TestWheel);

@@ -21,0 +27,0 @@ return TestWheel;

@@ -12,6 +12,9 @@ /**

this.name = name;
if (!MockCollection.data[this.name])
MockCollection.data[this.name] = {};
}
MockCollection.prototype._ensureIndex = function () {
};
MockCollection.prototype.getData = function () {
if (!MockCollection.data[this.name]) {
MockCollection.data[this.name] = {};
}
return MockCollection.data[this.name];

@@ -32,2 +35,7 @@ };

MockCollection.prototype.find = function (pattern) {
if (this.finder) {
var r = this.finder(pattern, this.getData());
if (r)
return new MockCursor(this.deepClone(r));
}
if (pattern._id) {

@@ -171,2 +179,3 @@ return new MockCursor(this.deepClone([this.getData()[pattern._id]]));

console.log("deasyncing");
debugger;
require('deasync').runLoopOnce();

@@ -185,15 +194,15 @@ }

exports.MockMeteor = MockMeteor;
var isInitialized = false;
function resetDatabases() {
MockCollection.data = {};
}
exports.resetDatabases = resetDatabases;
function init() {
if (!isInitialized) {
exports.mockMongo = new MockMongo();
exports.mockMeteor = new MockMeteor();
omm.config({
Meteor: exports.mockMeteor,
Mongo: exports.mockMongo
});
isInitialized = true;
}
exports.mockMongo = new MockMongo();
exports.mockMeteor = new MockMeteor();
omm.config({
Meteor: exports.mockMeteor,
Mongo: exports.mockMongo
});
}
exports.init = init;
//# sourceMappingURL=Mocks.js.map

@@ -8,4 +8,4 @@ /**

import * as omm from "../src/omm"
import * as url from "url"
export class MockCollection implements omm.MongoCollectionInterface{

@@ -15,12 +15,19 @@ name:string;

nextId:number = 0;
public finder:( pattern:any, allData:Array<any> ) => Array<any>;
constructor( name:string ){
this.name = name;
if( !MockCollection.data[this.name] )
MockCollection.data[this.name] = {}
}
_ensureIndex(){
}
private getData():any{
if( !MockCollection.data[this.name] ){
MockCollection.data[this.name] = {}
}
return MockCollection.data[this.name];
}
getAllData(){

@@ -41,5 +48,10 @@ return MockCollection.data;

find( pattern:any ):MockCursor{
if( this.finder ) {
var r = this.finder(pattern,this.getData());
if( r )
return new MockCursor(this.deepClone(r) );
}
if( pattern._id ){
return new MockCursor(this.deepClone([this.getData()[pattern._id]]));
}else
} else
return new MockCursor(this.deepClone(_.values(this.getData())));

@@ -194,2 +206,3 @@ }

console.log("deasyncing");
debugger;
require('deasync').runLoopOnce();

@@ -203,4 +216,2 @@ }

methods(dict:any){

@@ -212,14 +223,15 @@ _.extend(this.theMethods, dict);

export var mockMeteor : MockMeteor;
var isInitialized:boolean = false;
export function resetDatabases(){
MockCollection.data = {};
}
export function init() {
if( !isInitialized ) {
mockMongo = new MockMongo();
mockMeteor = new MockMeteor();
omm.config( {
Meteor: mockMeteor,
Mongo: mockMongo
} );
isInitialized = true;
}
mockMongo = new MockMongo();
mockMeteor = new MockMeteor();
omm.config( {
Meteor: mockMeteor,
Mongo: mockMongo
} );
}

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

/// <reference path="../../typings/node/node.d.ts"/>
"use strict";

@@ -3,0 +2,0 @@ var EventContext = (function () {

/// <reference path="../../typings/node/node.d.ts"/>
export interface IMethodOptions{

@@ -5,0 +3,0 @@ isStatic?:boolean;

@@ -101,9 +101,16 @@ /**

exports.removeAllUpdateEventListeners = removeAllUpdateEventListeners;
function getQueue() {
return _queue.events;
}
exports.getQueue = getQueue;
var _queue = { events: [] };
function resetQueue() {
exports._queue = [];
_queue.events = [];
//console.log("reset",_queue);
}
exports.resetQueue = resetQueue;
function emit(topic, data) {
if (exports._queue) {
exports._queue.push({
//console.log("Emitting",_queue.events);
if (_queue.events) {
_queue.events.push({
topic: topic,

@@ -118,5 +125,5 @@ data: data

function deleteQueue() {
exports._queue = undefined;
_queue = { events: [] };
}
exports.deleteQueue = deleteQueue;
//# sourceMappingURL=OmmEvent.js.map

@@ -107,11 +107,17 @@ /**

export var _queue:Array<any>;
export function getQueue():Array<any>{
return _queue.events;
}
var _queue:{events:Array<any>} = {events:[]};
export function resetQueue(){
_queue = [];
_queue.events = [];
//console.log("reset",_queue);
}
export function emit( topic, data?:any ){
if( _queue ) {
_queue.push({
//console.log("Emitting",_queue.events);
if( _queue.events ) {
_queue.events.push({
topic: topic,

@@ -127,5 +133,5 @@ data: data

export function deleteQueue(){
_queue = undefined;
_queue = {events:[]};
}
/**
* Created by bert on 22.03.16.
*/
/// <reference path="../../typings/meteor/meteor.d.ts" />
"use strict";

@@ -6,0 +5,0 @@ var meteorReference;

/**
* Created by bert on 22.03.16.
*/
/// <reference path="../../typings/meteor/meteor.d.ts" />
export interface MeteorInterface {
Error? : {
new(error: string | number, reason?: string, details?: string): any;
new( error: string | number, reason?: string, details?: string ): any;
};

@@ -49,2 +47,4 @@ users? : MongoCollectionInterface;

var mongoReference:MongoInterface;
declare var Meteor:any;
declare var Mongo:any;

@@ -51,0 +51,0 @@ export function config( options:{ Meteor? : MeteorInterface, Mongo?: MongoInterface } ) {

@@ -400,4 +400,4 @@ "use strict";

//ctx.ob
if (omm_event._queue) {
omm_event._queue.forEach(function (t) {
if (omm_event.getQueue()) {
omm_event.getQueue().forEach(function (t) {
//console.log( 'emitting event:'+t.topic );

@@ -441,2 +441,6 @@ omm_event.callEventListeners(entityClass, t.topic, ctx, t.data);

exports.MeteorPersistence = MeteorPersistence;
function init() {
MeteorPersistence.init();
}
exports.init = init;
//Meteor.startup(function(){

@@ -443,0 +447,0 @@ // MeteorPersistence.init();

@@ -403,5 +403,4 @@

if( omm_event._queue ){
omm_event._queue.forEach(function(t){
if( omm_event.getQueue() ){
omm_event.getQueue().forEach(function(t){
//console.log( 'emitting event:'+t.topic );

@@ -445,4 +444,9 @@ omm_event.callEventListeners( entityClass, t.topic, ctx, t.data );

export function init(){
MeteorPersistence.init();
}
//Meteor.startup(function(){
// MeteorPersistence.init();
//});

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

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

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

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

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

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