mongodb-livedata-server 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import MongoDB from "mongodb";
1
+ import * as MongoDB from "mongodb";
2
2
  export declare class DocFetcher {
3
3
  private db;
4
4
  private _callbacksForOp;
@@ -1,7 +1,7 @@
1
1
  import { Subscription } from "../ddp/subscription";
2
- import MongoDB, { WithId } from "mongodb";
2
+ import * as MongoDB from "mongodb";
3
3
  import { LiveMongoConnection } from "./live_connection";
4
- interface CustomFindOptions<T> extends MongoDB.FindOptions<WithId<T>> {
4
+ interface CustomFindOptions<T> extends MongoDB.FindOptions<MongoDB.WithId<T>> {
5
5
  pollingThrottleMs?: number;
6
6
  pollingIntervalMs?: number;
7
7
  transform?: (doc: T) => T;
@@ -10,14 +10,14 @@ interface CustomFindOptions<T> extends MongoDB.FindOptions<WithId<T>> {
10
10
  }
11
11
  export declare class CursorDescription<T> {
12
12
  collectionName: string;
13
- selector: MongoDB.Filter<WithId<T>>;
14
- options: CustomFindOptions<WithId<T>>;
15
- constructor(collectionName: string, selector: MongoDB.Filter<WithId<T>>, options?: CustomFindOptions<WithId<T>>);
13
+ selector: MongoDB.Filter<MongoDB.WithId<T>>;
14
+ options: CustomFindOptions<MongoDB.WithId<T>>;
15
+ constructor(collectionName: string, selector: MongoDB.Filter<MongoDB.WithId<T>>, options?: CustomFindOptions<MongoDB.WithId<T>>);
16
16
  }
17
17
  export declare class LiveCursor<T> {
18
18
  mongo: LiveMongoConnection;
19
19
  cursorDescription: CursorDescription<T>;
20
- constructor(mongo: LiveMongoConnection, collectionName: string, selector: MongoDB.Filter<WithId<T>>, options: CustomFindOptions<WithId<T>>);
20
+ constructor(mongo: LiveMongoConnection, collectionName: string, selector: MongoDB.Filter<MongoDB.WithId<T>>, options: CustomFindOptions<MongoDB.WithId<T>>);
21
21
  _publishCursor(sub: Subscription): {
22
22
  stop: () => void;
23
23
  };
@@ -1,4 +1,4 @@
1
- import MongoDB from "mongodb";
1
+ import * as MongoDB from "mongodb";
2
2
  import { CursorDescription } from "./live_cursor";
3
3
  export declare function listenAll(cursorDescription: CursorDescription<any>, listenCallback: Function): {
4
4
  stop: () => void;
@@ -330,7 +330,7 @@ class OplogHandle {
330
330
  self._lastProcessedTS = ts;
331
331
  while (self._catchingUpFutures.length > 0 && self._catchingUpFutures[0].ts.lessThanOrEqual(self._lastProcessedTS)) {
332
332
  var sequencer = self._catchingUpFutures.shift();
333
- sequencer.future.return();
333
+ sequencer.future.resolve();
334
334
  }
335
335
  }
336
336
  //Methods used on tests to dinamically change TOO_FAR_BEHIND
@@ -1,4 +1,4 @@
1
- import MongoDB from "mongodb";
1
+ import * as MongoDB from "mongodb";
2
2
  import { CursorDescription } from "./live_cursor";
3
3
  export declare function _createSynchronousCursor(db: MongoDB.Db, cursorDescription: CursorDescription<any>, options?: any): SynchronousCursor;
4
4
  export declare class SynchronousCursor {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mongodb-livedata-server",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "MongoDB live data server, extracted from Meteor, Fibers removed and converted to TypeScript",
5
5
  "main": "dist/livedata_server.js",
6
6
  "types": "dist/livedata_server.d.ts",