Comparing version 1.2.0 to 1.2.1
@@ -33,3 +33,3 @@ import { ICollection, IMonkManager } from "monk"; | ||
export declare class Manager { | ||
manager: IMonkManager; | ||
manager: Promise<IMonkManager> & IMonkManager; | ||
constructor(uri: string); | ||
@@ -36,0 +36,0 @@ get<TSchema extends Document>(name: string): Collection<TSchema>; |
@@ -49,13 +49,16 @@ "use strict"; | ||
}; | ||
var __spreadArrays = (this && this.__spreadArrays) || function () { | ||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; | ||
for (var r = Array(s), k = 0, i = 0; i < il; i++) | ||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) | ||
r[k] = a[j]; | ||
return r; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Collection = exports.Manager = exports.idify = exports.ObjectID = void 0; | ||
var monk_1 = require("monk"); | ||
var bson_1 = require("bson"); | ||
exports.ObjectID = bson_1.ObjectID; | ||
Object.defineProperty(exports, "ObjectID", { enumerable: true, get: function () { return bson_1.ObjectID; } }); | ||
function idify(str) { | ||
@@ -69,3 +72,3 @@ // Safeguard for the old behaviour, to remove after backend TS conversion is over | ||
if (!bson_1.ObjectID.isValid(str)) | ||
throw new Error("Invalid hex value <" + str + "> passed to idify"); | ||
throw new Error("Invalid hex value <".concat(str, "> passed to idify")); | ||
return bson_1.ObjectID.createFromHexString(str); | ||
@@ -76,3 +79,3 @@ } | ||
function Manager(uri) { | ||
this.manager = monk_1.default(uri); | ||
this.manager = (0, monk_1.default)(uri); | ||
} | ||
@@ -135,4 +138,4 @@ Manager.prototype.get = function (name) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var rootFilter, _a; | ||
var _b; | ||
var rootFilter; | ||
var _a, _b; | ||
return __generator(this, function (_c) { | ||
@@ -142,3 +145,3 @@ switch (_c.label) { | ||
rootFilter = { | ||
$and: __spreadArrays([filter], (search ? [{ $text: { $search: search } }] : [])) | ||
$and: __spreadArray([filter], (search ? [{ $text: { $search: search } }] : []), true) | ||
}; | ||
@@ -145,0 +148,0 @@ _a = {}; |
{ | ||
"name": "minimonk", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "A tiny wrapper around monk", | ||
@@ -17,4 +17,4 @@ "main": "lib/minimonk.js", | ||
"monk": "6.0.6", | ||
"typescript": "^3.7.5" | ||
"typescript": "^4.6.4" | ||
} | ||
} |
@@ -64,3 +64,3 @@ import monk, { ICollection, IMonkManager } from "monk"; | ||
export class Manager { | ||
manager: IMonkManager; | ||
manager: Promise<IMonkManager> & IMonkManager; | ||
@@ -67,0 +67,0 @@ constructor(uri: string) { |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
19804
473
1
+ Addedtypescript@4.9.5(transitive)
- Removedtypescript@3.9.10(transitive)
Updatedtypescript@^4.6.4