diff --git a/dist/ObservableCollection.d.ts b/dist/ObservableCollection.d.ts index f9ec9f09..eeae053f 100644 --- a/dist/ObservableCollection.d.ts +++ b/dist/ObservableCollection.d.ts @@ -1,4 +1,3 @@ -import { Mongo } from 'meteor/mongo'; import { Observable } from 'rxjs'; import { ObservableCursor } from './ObservableCursor'; import Selector = Mongo.Selector; diff --git a/dist/ObservableCollection.js b/dist/ObservableCollection.js index ffcc320f..084806c1 100644 --- a/dist/ObservableCollection.js +++ b/dist/ObservableCollection.js @@ -1,4 +1,3 @@ -import { Mongo } from 'meteor/mongo'; import { Observable } from 'rxjs'; import { ObservableCursor } from './ObservableCursor'; import { removeObserver } from './utils'; diff --git a/dist/ObservableCollection.js.map b/dist/ObservableCollection.js.map index 6bf69740..4904a93c 100644 --- a/dist/ObservableCollection.js.map +++ b/dist/ObservableCollection.js.map @@ -1 +1 @@ -{"version":3,"file":"ObservableCollection.js","sourceRoot":"","sources":["../src/ObservableCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,UAAU,EAAc,MAAM,MAAM,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAQzC,MAAM,KAAQ,eAAe,CAkR5B;AAlRD,WAAc,eAAe;IAC3B,YAAY,CAAC;IAgBb;;;;;;OAMG;IACH,sBAAgC,UAA+B;QAC7D,MAAM,CAAC,IAAI,eAAe,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IACpD,CAAC;IAFe,4BAAY,eAE3B,CAAA;IAED;;;;;;;OAOG;IACH;QAGE;;;;;;;WAOG;QACH,oBAAY,cAA4C,EAC5C,OAA4B;YACtC,EAAE,CAAC,CAAC,cAAc,YAAY,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;gBAC/C,IAAI,CAAC,WAAW,GAAG,cAAc,CAAC;YACpC,CA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;AACH,CAAC,EAlRa,eAAe,KAAf,eAAe,QAkR5B;AAGD;;;;;;;;GAQG;AAEH;;;GAGG;AAEH;;;;;GAKG;AAEH;;;;;GAKG"} \ No newline at end of file +{"version":3,"file":"ObservableCollection.js","sourceRoot":"","sources":["../src/ObservableCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAc,MAAM,MAAM,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAQzC,MAAM,KAAQ,eAAe,CAkR5B;AAlRD,WAAc,eAAe;IAC3B,YAAY,CAAC;IAgBb;;;;;;OAMG;IACH,sBAAgC,UAA+B;QAC7D,MAAM,CAAC,IAAI,eAAe,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IACpD,CAAC;IAFe,4BAAY,eAE3B,CAAA;IAED;;;;;;;OAOG;IACH;QAGE;;;;;;;WAOG;QACH,oBAAY,cAA4C,EAC5C,OAA4B;YACtC,EAAE,CAAC,CAAC,cAAc,YAAY,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;gBAC/C,IAAI,CAAC,WAAW,GAAG,cAAc,CAAC;YACpC,CAAC;YAAC,IAAI,CAAC,CAAC;gBACN,IAAI,CAAC,WAAW,GAAG,IAAI,KAAK,CAAC,UAAU,CAAY,cAAc,EAAE,OAAO,CAAC,CAAC;YAC9E,CAAC;QACH,CAAC;QAMD,sBAAI,kCAAU;YAJd;;;eAGG;iBACH;gBACE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;YAC1B,CAAC;;;WAAA;QAED;;;;WAIG;QACH,0BAAK,GAAL,UAAM,OAAkC;YACtC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACzC,CAAC;QAED;;;;WAIG;QACH,yBAAI,GAAJ,UAAK,OAAkC;YACrC,MAAM,CAAC,IAAI,CAAC,WAAW,CAA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;;;;;;;;WAkBG;QACH,yBAAI,GAAJ,UAAK,QAAuC,EAAE,OAO7C;YACC,IAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CACxC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;YAC/B,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAI,MAAM,CAAC,CAAC;QAC5C,CAAC;QAED;;;;;;;;WAQG;QACH,4BAAO,GAAP,UAAQ,QAAuC,EAAE,OAMhD;YACC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,CACnC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QACjC,CAAC;QAEO,sCAAiB,GAAzB,UAA6B,SAA0B;YACrD,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,UAAC,QAAuB;gBAC/C,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACzB,MAAM,CAAC;oBACL,cAAc,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;gBACtC,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC;QACH,iBAAC;IAAD,CAAC,AA7OD,IA6OC;IA7OY,0BAAU,aA6OtB,CAAA;AACH,CAAC,EAlRa,eAAe,KAAf,eAAe,QAkR5B;AAGD;;;;;;;;GAQG;AAEH;;;GAGG;AAEH;;;;;GAKG;AAEH;;;;;GAKG"} \ No newline at end of file diff --git a/dist/bundles/index.umd.js b/dist/bundles/index.umd.js index 770ce20e..76553745 100644 --- a/dist/bundles/index.umd.js +++ b/dist/bundles/index.umd.js @@ -1,8 +1,8 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('meteor/mongo'), require('rxjs')) : - typeof define === 'function' && define.amd ? define(['exports', 'meteor/mongo', 'rxjs'], factory) : - (factory((global.meteor = global.meteor || {}, global.meteor.rxjs = {}),global.mongo,global.rxjs)); -}(this, (function (exports,mongo,rxjs) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs')) : + typeof define === 'function' && define.amd ? define(['exports', 'rxjs'], factory) : + (factory((global.meteor = global.meteor || {}, global.meteor.rxjs = {}),global.rxjs)); +}(this, (function (exports,rxjs) { 'use strict'; 'use strict'; var subscribeEvents = ['onReady', 'onError', 'onStop']; @@ -261,11 +261,11 @@ var ObservableCursor = /** @class */ (function (_super) { * @constructor */ function Collection(nameOrExisting, options) { - if (nameOrExisting instanceof mongo.Mongo.Collection) { + if (nameOrExisting instanceof Mongo.Collection) { this._collection = nameOrExisting; } else { - this._collection = new mongo.Mongo.Collection(nameOrExisting, options); + this._collection = new Mongo.Collection(nameOrExisting, options); } } Object.defineProperty(Collection.prototype, "collection", { diff --git a/package.json b/package.json index bd6288ac..f9e79c10 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ }, "homepage": "http://www.angular-meteor.com", "peerDependencies": { + "@types/meteor": "^1.4.6", "babel-runtime": "^6.18.0 || ^6.26.0", "rxjs": "^5.4.3 || ^5.0.1 || ^5.0.0-rc.4 || ^5.0.0-beta.12" }, diff --git a/src/ObservableCollection.ts b/src/ObservableCollection.ts index 8be64238..97ee74e0 100644 --- a/src/ObservableCollection.ts +++ b/src/ObservableCollection.ts @@ -1,4 +1,3 @@ -import { Mongo } from 'meteor/mongo'; import { Observable, Subscriber } from 'rxjs'; import { ObservableCursor } from './ObservableCursor'; import { removeObserver } from './utils';