Comparing version 1.1.5 to 1.2.0
{ | ||
"name": "mongot", | ||
"version": "1.1.5", | ||
"version": "1.2.0", | ||
"description": "MongoT is a modern ODM library for MongoDb.", | ||
@@ -34,4 +34,4 @@ "main": "src/index.js", | ||
"dependencies": { | ||
"@types/mongodb": "^2.1.36", | ||
"mongodb": "^2.2.15" | ||
"@types/mongodb": "^2.1.41", | ||
"mongodb": "^2.2.25" | ||
}, | ||
@@ -38,0 +38,0 @@ "devDependencies": { |
@@ -44,3 +44,3 @@ import * as MongoDb from 'mongodb'; | ||
*/ | ||
aggregate(pipeline: Object[], options?: MongoDb.CollectionAggregationOptions): Promise<MongoDb.AggregationCursor>; | ||
aggregate(pipeline: Object[], options?: MongoDb.CollectionAggregationOptions): Promise<MongoDb.AggregationCursor<any>>; | ||
/** | ||
@@ -222,3 +222,3 @@ * @param operations | ||
*/ | ||
parallelCollectionScan(options?: MongoDb.ParallelCollectionScanOptions): Promise<MongoDb.Cursor[]>; | ||
parallelCollectionScan(options?: MongoDb.ParallelCollectionScanOptions): Promise<MongoDb.Cursor<any>[]>; | ||
/** | ||
@@ -225,0 +225,0 @@ * @TODO |
@@ -19,2 +19,3 @@ "use strict"; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const assert_1 = require("assert"); | ||
@@ -21,0 +22,0 @@ const document_1 = require("./document"); |
@@ -10,2 +10,3 @@ "use strict"; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const document_1 = require("../document"); | ||
@@ -12,0 +13,0 @@ class UpdateResult { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const MongoDb = require("mongodb"); | ||
@@ -3,0 +4,0 @@ class Connection { |
@@ -8,3 +8,3 @@ /// <reference types="node" /> | ||
export declare class Cursor<T extends Object> extends EventEmitter { | ||
readonly cursor: MongoDb.Cursor; | ||
readonly cursor: MongoDb.Cursor<T>; | ||
private cast; | ||
@@ -15,3 +15,3 @@ /** | ||
*/ | ||
constructor(cursor: MongoDb.Cursor, transform?: <TNewDocument>(document: Object) => TNewDocument); | ||
constructor(cursor: MongoDb.Cursor<T>, transform?: <TNewDocument>(document: Object) => TNewDocument); | ||
/** | ||
@@ -22,3 +22,3 @@ * @returns {Cursor<T>} | ||
/** | ||
* @returns {Cursor} | ||
* @returns {Cursor<T>} | ||
*/ | ||
@@ -34,3 +34,3 @@ rewind(): this; | ||
* @param fields | ||
* @returns {Cursor} | ||
* @returns {Cursor<T>} | ||
*/ | ||
@@ -40,3 +40,3 @@ project(fields: Object | string): this; | ||
* @param value | ||
* @returns {Cursor} | ||
* @returns {Cursor<T>} | ||
*/ | ||
@@ -46,3 +46,3 @@ limit(value: number): this; | ||
* @param value | ||
* @returns {Cursor} | ||
* @returns {Cursor<T>} | ||
*/ | ||
@@ -54,6 +54,6 @@ skip(value: number): this; | ||
*/ | ||
map<TMutate>(fn: Function): Cursor<TMutate>; | ||
map<TMutate extends Object>(fn: <N, T>(v: N) => T): Cursor<TMutate>; | ||
/** | ||
* @param value | ||
* @returns {Cursor} | ||
* @returns {Cursor<T>} | ||
*/ | ||
@@ -63,3 +63,3 @@ max(value: number): this; | ||
* @param value | ||
* @returns {Cursor} | ||
* @returns {Cursor<T>} | ||
*/ | ||
@@ -69,3 +69,3 @@ min(value: number): this; | ||
* @param value | ||
* @returns {Cursor} | ||
* @returns {Cursor<T>} | ||
*/ | ||
@@ -72,0 +72,0 @@ sort(value: { |
@@ -10,2 +10,3 @@ "use strict"; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const events_1 = require("events"); | ||
@@ -36,3 +37,3 @@ const document_1 = require("./document"); | ||
/** | ||
* @returns {Cursor} | ||
* @returns {Cursor<T>} | ||
*/ | ||
@@ -53,3 +54,3 @@ rewind() { | ||
* @param fields | ||
* @returns {Cursor} | ||
* @returns {Cursor<T>} | ||
*/ | ||
@@ -68,3 +69,3 @@ project(fields) { | ||
* @param value | ||
* @returns {Cursor} | ||
* @returns {Cursor<T>} | ||
*/ | ||
@@ -77,3 +78,3 @@ limit(value) { | ||
* @param value | ||
* @returns {Cursor} | ||
* @returns {Cursor<T>} | ||
*/ | ||
@@ -89,8 +90,7 @@ skip(value) { | ||
map(fn) { | ||
this.cursor.map(fn); | ||
return new Cursor(this.cursor); | ||
return new Cursor(this.cursor, fn); | ||
} | ||
/** | ||
* @param value | ||
* @returns {Cursor} | ||
* @returns {Cursor<T>} | ||
*/ | ||
@@ -103,3 +103,3 @@ max(value) { | ||
* @param value | ||
* @returns {Cursor} | ||
* @returns {Cursor<T>} | ||
*/ | ||
@@ -112,3 +112,3 @@ min(value) { | ||
* @param value | ||
* @returns {Cursor} | ||
* @returns {Cursor<T>} | ||
*/ | ||
@@ -115,0 +115,0 @@ sort(value) { |
@@ -11,2 +11,3 @@ "use strict"; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const assert_1 = require("assert"); | ||
@@ -13,0 +14,0 @@ const mongodb_1 = require("mongodb"); |
@@ -5,2 +5,3 @@ "use strict"; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const connection_1 = require("./connection"); | ||
@@ -7,0 +8,0 @@ exports.Connection = connection_1.Connection; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const StoreCollection = new WeakMap(); | ||
@@ -40,2 +41,3 @@ const StoreCollectionIndexes = new WeakMap(); | ||
maps.push(...this.getSchemaMetadata(proto)); | ||
//return new Map([...this.getSchemaMetadata(proto), ...StoreType.get(target)]); | ||
} | ||
@@ -42,0 +44,0 @@ if (StoreType.has(target)) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const mongodb_1 = require("mongodb"); | ||
@@ -3,0 +4,0 @@ const store_1 = require("./metadata/store"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
require("./metadata"); | ||
//# sourceMappingURL=index.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
require("./reflect"); | ||
@@ -3,0 +4,0 @@ if (!Reflect.metadata) { |
@@ -10,2 +10,3 @@ "use strict"; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
require("./reflect"); | ||
@@ -108,2 +109,3 @@ const assert_1 = require("assert"); | ||
this[propertyKey] = yield fn(collection); | ||
return true; | ||
}); | ||
@@ -110,0 +112,0 @@ }; |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
NPM Shrinkwrap
Supply chain riskPackage contains a shrinkwrap file. This may allow the package to bypass normal install procedures.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
139241
47
2174
1
Updated@types/mongodb@^2.1.41
Updatedmongodb@^2.2.25