@ewb/mongoose-query 1.0.0
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.
- package/README.md +70 -0
- package/lib/ExpressHandler.d.ts +30 -0
- package/lib/ExpressHandler.js +215 -0
- package/lib/ExpressHandler.js.map +1 -0
- package/lib/ModelQuery.d.ts +24 -0
- package/lib/ModelQuery.js +80 -0
- package/lib/ModelQuery.js.map +1 -0
- package/lib/Query.d.ts +77 -0
- package/lib/Query.js +307 -0
- package/lib/Query.js.map +1 -0
- package/lib/QueryError.d.ts +50 -0
- package/lib/QueryError.js +62 -0
- package/lib/QueryError.js.map +1 -0
- package/lib/QueryExpressHandler.d.ts +50 -0
- package/lib/QueryExpressHandler.js +383 -0
- package/lib/QueryExpressHandler.js.map +1 -0
- package/lib/QueryExpressSubHandler.d.ts +20 -0
- package/lib/QueryExpressSubHandler.js +137 -0
- package/lib/QueryExpressSubHandler.js.map +1 -0
- package/lib/QueryHandler.d.ts +59 -0
- package/lib/QueryHandler.js +297 -0
- package/lib/QueryHandler.js.map +1 -0
- package/lib/QueryHistory.d.ts +76 -0
- package/lib/QueryHistory.js +154 -0
- package/lib/QueryHistory.js.map +1 -0
- package/lib/QueryModel.d.ts +80 -0
- package/lib/QueryModel.js +201 -0
- package/lib/QueryModel.js.map +1 -0
- package/lib/constants.d.ts +2 -0
- package/lib/constants.js +6 -0
- package/lib/constants.js.map +1 -0
- package/lib/declarations.d.ts +16 -0
- package/lib/declarations.js +3 -0
- package/lib/declarations.js.map +1 -0
- package/lib/error/ExpressError.d.ts +44 -0
- package/lib/error/ExpressError.js +39 -0
- package/lib/error/ExpressError.js.map +1 -0
- package/lib/error/QueryError.d.ts +47 -0
- package/lib/error/QueryError.js +50 -0
- package/lib/error/QueryError.js.map +1 -0
- package/lib/error/QueryExpressError.d.ts +46 -0
- package/lib/error/QueryExpressError.js +39 -0
- package/lib/error/QueryExpressError.js.map +1 -0
- package/lib/error/V1Error.d.ts +12 -0
- package/lib/error/V1Error.js +27 -0
- package/lib/error/V1Error.js.map +1 -0
- package/lib/error/error.handler.d.ts +3 -0
- package/lib/error/error.handler.js +30 -0
- package/lib/error/error.handler.js.map +1 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.js +32 -0
- package/lib/index.js.map +1 -0
- package/lib/statics.d.ts +17 -0
- package/lib/statics.js +35 -0
- package/lib/statics.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/utils.d.ts +3 -0
- package/lib/utils.js +44 -0
- package/lib/utils.js.map +1 -0
- package/package.json +61 -0
package/lib/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
require("./declarations");
|
|
14
|
+
const Query_1 = require("./Query");
|
|
15
|
+
__exportStar(require("./QueryError"), exports);
|
|
16
|
+
__exportStar(require("./QueryExpressHandler"), exports);
|
|
17
|
+
__exportStar(require("./Query"), exports);
|
|
18
|
+
__exportStar(require("./QueryHandler"), exports);
|
|
19
|
+
__exportStar(require("./QueryHistory"), exports);
|
|
20
|
+
__exportStar(require("./QueryModel"), exports);
|
|
21
|
+
__exportStar(require("./statics"), exports);
|
|
22
|
+
function mongooseQuery(req, _res, next) {
|
|
23
|
+
try {
|
|
24
|
+
req.mongooseQuery = new Query_1.Query(req.query);
|
|
25
|
+
next();
|
|
26
|
+
}
|
|
27
|
+
catch (e) {
|
|
28
|
+
next(e);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.default = mongooseQuery;
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0BAAwB;AAExB,mCAAgC;AAEhC,+CAA6B;AAC7B,wDAAsC;AACtC,0CAAwB;AACxB,iDAA+B;AAC/B,iDAA+B;AAC/B,+CAA6B;AAC7B,4CAA0B;AAE1B,SAAwB,aAAa,CACnC,GAAY,EACZ,IAAc,EACd,IAAkB;IAElB,IAAI;QACF,GAAG,CAAC,aAAa,GAAG,IAAI,aAAK,CAAM,GAAG,CAAC,KAAY,CAAC,CAAC;QACrD,IAAI,EAAE,CAAC;KACR;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,CAAC,CAAC,CAAC;KACT;AACH,CAAC;AAXD,gCAWC"}
|
package/lib/statics.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Document, LeanDocument, Model } from 'mongoose';
|
|
2
|
+
import { QueryModel } from './QueryModel';
|
|
3
|
+
import { Query } from './Query';
|
|
4
|
+
export interface ISearchPaginate<T extends Document> {
|
|
5
|
+
data: LeanDocument<T>[];
|
|
6
|
+
count: number;
|
|
7
|
+
limit: number;
|
|
8
|
+
skip: number;
|
|
9
|
+
}
|
|
10
|
+
export declare type IModelQuerySearchPaginate<T extends Document> = (modelQuery: QueryModel<T>, query: Query<T, any, any>, opts?: IModelQueryFnOpts<T>) => (this: Model<T>) => Promise<ISearchPaginate<T>>;
|
|
11
|
+
export interface IModelQueryFnOpts<T extends Document> {
|
|
12
|
+
select?: (keyof LeanDocument<T>)[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated dont need to be used anymore. Can be removed totaly
|
|
16
|
+
*/
|
|
17
|
+
export declare function modelQuerySearchPaginate<T extends Document>(modelQuery: QueryModel<T>, query: Query<T>, opts?: IModelQueryFnOpts<T>): (this: Model<T>) => Promise<ISearchPaginate<T>>;
|
package/lib/statics.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.modelQuerySearchPaginate = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated dont need to be used anymore. Can be removed totaly
|
|
15
|
+
*/
|
|
16
|
+
function modelQuerySearchPaginate(modelQuery, query, opts = {}) {
|
|
17
|
+
return function () {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const findQuery = modelQuery.createSearchQuery(query);
|
|
20
|
+
const modelFind = this.find(findQuery, query.options);
|
|
21
|
+
modelQuery.setPopulate(modelFind, query);
|
|
22
|
+
modelQuery.setLimitAndSkip(modelFind, query);
|
|
23
|
+
modelQuery.setSort(modelFind, query);
|
|
24
|
+
modelQuery.setSelect(modelFind, query, opts.select);
|
|
25
|
+
const { skip = query.skip, limit = query.limit } = modelFind.getOptions();
|
|
26
|
+
const [data, count] = yield Promise.all([
|
|
27
|
+
modelFind.lean().exec(),
|
|
28
|
+
this.find(findQuery).count()
|
|
29
|
+
]);
|
|
30
|
+
return { data: data, count, limit, skip };
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
exports.modelQuerySearchPaginate = modelQuerySearchPaginate;
|
|
35
|
+
//# sourceMappingURL=statics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statics.js","sourceRoot":"","sources":["../src/statics.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqBA;;GAEG;AACH,SAAgB,wBAAwB,CACtC,UAAyB,EACzB,KAAe,EACf,OAA6B,EAAE;IAE/B,OAAO;;YACL,MAAM,SAAS,GAAG,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACtD,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;YACtD,UAAU,CAAC,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;YACzC,UAAU,CAAC,eAAe,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;YAC7C,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;YACrC,UAAU,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAEpD,MAAM,EAAE,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,GAAG,SAAS,CAAC,UAAU,EAAE,CAAC;YAC1E,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;gBACtC,SAAS,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE;gBACvB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE;aAC7B,CAAC,CAAC;YAEH,OAAO,EAAE,IAAI,EAAE,IAAyB,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QACjE,CAAC;KAAA,CAAC;AACJ,CAAC;AArBD,4DAqBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostic_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/ts3.6/base.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/base.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/range-parser/index.d.ts","../node_modules/@types/qs/index.d.ts","../node_modules/@types/express-serve-static-core/index.d.ts","../node_modules/@types/mime/index.d.ts","../node_modules/@types/serve-static/index.d.ts","../node_modules/@types/connect/index.d.ts","../node_modules/@types/body-parser/index.d.ts","../node_modules/@types/express/index.d.ts","../node_modules/@types/bson/index.d.ts","../node_modules/@types/mongodb/index.d.ts","../node_modules/mongoose/index.d.ts","../src/constants.ts","../src/querymodel.ts","../node_modules/express-mongo-sanitize/index.d.ts","../src/query.ts","../src/error/error.handler.ts","../src/queryerror.ts","../src/queryhandler.ts","../src/statics.ts","../src/utils.ts","../src/queryexpresssubhandler.ts","../src/queryexpresshandler.ts","../node_modules/jsondiffpatch/dist/index.d.ts","../src/queryhistory.ts","../src/declarations.ts","../src/index.ts","../node_modules/@types/chai/index.d.ts","../node_modules/@types/mocha/index.d.ts","../node_modules/@types/parse-json/index.d.ts","../node_modules/@sinonjs/fake-timers/types/fake-timers-src.d.ts","../node_modules/@types/sinon/index.d.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"60761e6ea886034af0f294f025a7199360ce4e2c8ba4ec6408bc049cf9b89799","affectsGlobalScope":true},{"version":"506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e","affectsGlobalScope":true},"f5a6d1a8e21751af6fd0a8422d72ba825c15bce9a1af9d02fc0d992406f18f5f",{"version":"bf629ebbac2c65601bcb5c032644023a2b4b3b1151c0d1bf60ced7c35cc81b5d","affectsGlobalScope":true},"9d07804fffa0680a15b100ea9312078ffd9779429719240d3576bb592511bf31",{"version":"5129a3ed991a1de30a77462d41d3d27e945fa7213603114b65ce4de0ef297e6f","affectsGlobalScope":true},"e5cca775079552250e94c7dbbe3ac1a4fa91caae98fd83fb488440d478a5537c","8528e5fe802d788d89df3169c7a7cde25943d1cee6748a26d4210cf37d79baba",{"version":"a4565a5ce32bca81a0bf56c71168e0ca1e0941ccc15f896f808ccc7a71ba6fa8","affectsGlobalScope":true},"3111079f3cb5f2b9c812ca3f46161562bce5bfb355e915f46ed46c41714dc1c3","087a6c005a7aa76ca849cdc25a00de881291278f84361decb42701b8aff52f49","4481cd6e85120ea80d71866890faa032687d29ad820640a2b8547f04b80ed3ba","b6c2782fb0c0f113cc1c38745c57ab499dd4f459d4f76a2c083c9f6609919df0","6ac7d92ba8f420f89f63ad99af8b146a5bbfe6522be2cd7a179cb5e066975825","3996fc0e7ecec3111a208c9f3389f15381907ccfc0804f89839ec3bfdf630576","cea1624c6870349293bb4d5a4fe7b1e963392b50d34fa916a830dac5cd186ab0",{"version":"6189edcaa78cba8c1dfd1d12a8928fe0603e646009ffb9ddfa92eff0d824ce2c","affectsGlobalScope":true},"8123b4a3b707b071088f581a21f01738c7d390a28d5d712ec396d3f411e23037","4ef819c9ddb82d8e8c841c7ba9db2729915a97a0addfcda6a6a9f852b4a2a128","eb83d39b9e8404d7c73adf30bc666894028d9e567384fbf42cbae805058e24aa","99827736d6a22022a5a4c9ad847900667704560e8b10964bdd36d4412c1eb587","ec7606080747d7e424af23f9b69b02cc47855f045edafbdb2552ccdff9556b4f","ef70156b46b854df342204565597787b04ea8067c1bfd673279fc859bcae42b7",{"version":"6583daa9760bda81669417e393cf1fb9208422fdbcb4991569e59347e93f3e34","affectsGlobalScope":true},"ab108213eabd2bb2ea48db3f43ed77ca2965b22b22ad5a3d0c3b13576c60902e","e1aea0bae8186fee1b966d4e4e2a167ed0edd86668c609b1440ed0e81247462d","d15d11ea31228ad0c57cda43b406f7bb1712c6c8fe6dd9c27a90dbfc7a8d6117","ddbc96f468abfe7c1965eb69f75d267b4493a27a8eaa76ea25f8d8ef87fec846",{"version":"6fe3ec84b325c68a572b7febee0446ddccafa67a5c0701857f26acc4fec0801e","affectsGlobalScope":true},"b89ea948a92ce598bac83e0fd39ab4dd1f938b337287abe33d756950bfe31bd7","e09cc4f66a6cf31c2224129e990b91ca00b25b0826989264fbc4aaa7bf9f6460","85df3d396d50cf6706e8a7fdc94402adbfe636ff758ced46cdd8de906957ca1d","e72c97f28066c9d46cb3fe23f2978ef3a4cedee77ff1fd70634654d7df13bc25","7b9958476fc2d098848bad9eb338d0471dc90799235b3c81286da7ed904bcdcd","328b0780f9ea2c65b5811fb3de14122c00b0a6ebe5b9581e8892decd83b1f8a8","c55b1e6bee98c27c3ff8477a47ef182841cbf7883c0e8b47c76506532366c34c",{"version":"34085490aa2954356441cf6e769f2fab1ba11800264cbdcfd9ee10d70fe1ea47","affectsGlobalScope":true},"a7d28061d1dd9315187b6be305be679c0600a335f4921ce66af79b35104e0bbe","1a3649e06d4244990d2c19e0b3a13330b30747818604cdc0ef19318df80a2b3f","5367052357620c6e14cf2a53f7ede9f8d85f4a9dab6facc3da6ae445541b7372","bb0ef00324f06a878b5c102a6b9670d3562126c7a7a09b5318d5c2113974ce1c","1bc668fc53967b5d4071a9094110b20445a5992f9a226874b2c9ac4e904ad033","5c067020e59677ac77cad8b01bdd01361f5315f289bcc50331e5750b4f29f5b7","45e9d7a11405d31fbb49e5d4fbad5c2d7dc9780f64338af388ba7ea9280b468f","6e25f951f1c64dc1fdda83ad3183b4af572b95218e736bf454185ac0c8abdf41","485a02812f947eb6011e70c44b3e815566b354efc90d4c2c5ac9d7bb3b948a42","b5cc8a2bdfe0163d116852650429c0a49ea75211dfaf66b7b0349fee7b3e8d83",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"f87509fed855ba8d77bcc1bbdd1acb8380a8092373c2caf3f04e5a8f8f3c5e5b","7e28b18588869fdeb3ff70581047ea017bae32c0baf1464b5b501c1ae00a96e0","c279f541b15691f99c82e130c9897740adf4584442b3610c5634f5684c1f5b60","e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b","06b4e032b397f9bad48024b5f942595d2b8c398ab462fd0ba961c5203efb8a55","16d51f964ec125ad2024cf03f0af444b3bc3ec3614d9345cc54d09bab45c9a4c","ba601641fac98c229ccd4a303f747de376d761babb33229bb7153bed9356c9cc",{"version":"61b60d145059c3c8e3c7b484713191b6d0b70999bcb11f2b26286b15926a2b5f","affectsGlobalScope":true},"84e3bbd6f80983d468260fdbfeeb431cc81f7ea98d284d836e4d168e36875e86","0b85cb069d0e427ba946e5eb2d86ef65ffd19867042810516d16919f6c1a5aec","6d829824ead8999f87b6df21200df3c6150391b894b4e80662caa462bd48d073","65cfd1c0bc729fbc2b49fe66bc5ebddba5aa3a978c748e1d2e0d07f502238ce2","3b05c396564e51753e921e1cc4aae1cf7cd9be53c891cf2e81fa29f11c0bd373","7dd45fada5059baae0b8d8ea95de756a74cab14cc3188cb6bf8c2b757d8192e3","a3e7005501f68c921594997dd39c00153c07f20e87d97de276a73535a1e75f88","38c7ea6e2a36bb9e153081ae61f1db3596c09bbe8cd9b2c2b64e588e7e07249c",{"version":"ce710f0ff2aad018be451fef732419595af2982f98fe4ab5757e8de8b50c51e2","signature":"596b35213398773c40c47cd2446cd94ecb11ca10cf9706cd53c6b2581e85b356"},{"version":"7b9bbf952545a6fb8fc713d926a2687233f0a3406d78a027d5a334091c3ce70b","signature":"379ab07912d913d1d45ced112cecf6cfdd5555c16577696abd455ffa9f2c617c"},"264c5bc71df8aab97362a4b9e07ff8454a76e65e69580e861c2853d88241569f",{"version":"a18ea3d5e1a88ec09f28d764a8a93f8816d90881ae422be40fcc80536562fc3e","signature":"5a385b731d3e1fe482829ea312db719a286b7dcc620e8e1ac2f52efe3ac48f4f"},{"version":"f9c4a8493b074e77c09b3a00476b393d307f1b3e942e40fcea2295f0e91a5e0a","signature":"bf99ee30629e6deee8f6053dcb8628c2a145bb2c8ae8118b2e3cfb10cd3cd16f"},{"version":"e9c29d2784cd11b8dcf9a7cd348d1f3f89355efc17720eada13ce50e71ce72b5","signature":"92b0a70df351db587f4a51068e8126eff2a7c34d08430c354f552f0bae2d632e"},{"version":"feebf16e48f2fa37318ece34a6724030b87fabe963599f2038c0107293a98ad4","signature":"45af07d3174e162a322ade0ece8e04f7b2200fa74160cfc03d50362551ea1abc"},{"version":"46cd9c9185b58b8acf5e65aa9179d07f76fadb50282eb27112c27f7eec530926","signature":"4f4a1774c0fd54ff34dee00cec9ec7ac9fecac9e34d06e9d51f50c927db78434"},{"version":"840bc7ba2f263d8802348af1dec4000824de25ec9f46975cecd56cdf0ba27e65","signature":"939664be865a56f7b0a222aa8684108e54fc923fa6f931c6957b1f3c8ce414d3"},{"version":"a64b0ab7cef414641be06fd2c97c4b4a94c303b34f57c253986b68caed483eef","signature":"33f238884bff9c3e1741624dfe2b12d014cc804669cb47021b63179bee600a91"},{"version":"926561e8dfa5a8a9c2560d1cba05b6df263eac55d99b0264ad0ab1074ff3b1f9","signature":"43bb445e33d86c0dd2087ff03da55893f5f87434184c33542879bcbcf2b38735"},"224c97c79147c3f230459cf748af3f5969cd18bda2ca52990f5bb3d35e612f32",{"version":"c8c7f7488f702c8ef930fae717b347dd6e9b64136e47d1f40eb21b1cb7185266","signature":"940aefcba398dbcc860bdd0b7ec6a56b521d8ef052a718e1f155636ab76ec4d1"},{"version":"99b5779ae8a27b9890040aa22dc5ca6164d3f08e0c6a43be4ee365ff2b65a2ec","signature":"cd1ec6ade0a9b676ec4a9127ebb374da4bf267128137d5add5b4ebf1d23f55d0","affectsGlobalScope":true},{"version":"8b931cceb8e4b8b18804d1080404a3afab811636bc9879fa5da8e5de8ada5d59","signature":"8ab26e4c920cf0f5ecad85e2adc8ce9e99f88683b71aaf7242d764998e9e1905"},{"version":"f7834c76f2d4db5fb156f2f18fdf855431843cf0d32620fcf24b836cd4a85096","affectsGlobalScope":true},{"version":"5f186a758a616c107c70e8918db4630d063bd782f22e6e0b17573b125765b40b","affectsGlobalScope":true},"2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","6b40029289530423f407a22755c85b81740f9acfd88d2b53564f8c1657c26660","15b043358a9bac56ee6a567d61adf545b3a09e2f2ead9c3ef3cc617ed3522e71"],"options":{"declaration":true,"jsx":2,"module":1,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":2},"fileIdsList":[[68,69],[51,68,69,84,90],[68,69,84],[51,68,69,84],[48,51,68,69,84,85,86],[68,69,86,87,89,91],[48,65,68,69,70,84,93],[68,69,82],[34,68,69,82],[36,68,69],[68,69,81,82],[37,42,68,69],[38,48,49,56,65,68,69],[38,39,48,56,68,69],[40,68,69,74],[41,42,49,57,68,69],[42,65,68,69,70],[43,45,48,56,68,69],[44,68,69],[45,46,68,69],[47,48,68,69],[48,68,69],[48,49,50,65,68,69,73],[48,49,50,65,68,69],[51,56,65,68,69,73],[48,49,51,52,56,65,68,69,70,73],[51,53,68,69,70,73],[68,69,83],[48,54,68,69],[55,68,69,73],[45,48,56,65,68,69],[57,68,69],[58,68,69],[36,59,68,69],[60,68,69,72,77],[61,68,69],[62,68,69],[48,63,68,69],[63,64,68,69,74,76],[48,65,66,68,69],[65,66,68,69],[67,68,69],[68],[42,56,68,69,70],[68,69,71],[34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80],[56,68,69,72],[51,62,68,69,73],[42,68,69,74],[65,68,69,75],[68,69,76],[68,69,80],[37,42,48,50,59,65,68,69,73,76,77],[65,68,69,78],[51,68,69,84,88],[68,69,114],[68,69,92],[48,65,68,69,94,95],[68,69,92,95,99,108],[68,69,92,101],[68,69,92,97,99,101,102,103,106,108,109],[68,69,92,95,96,97,98],[68,69,100],[68,69,92,95,99,101,102,104,105],[68,69,92,95,101,102,104,106],[68,69,92,95,97,99],[68,69,95,107],[68,69,95,96,99],[68,69,95,97,99],[68,69,92,103],[95,99,108],[92,101],[92,97,99,101,102,103,106,108,109],[92,93,94,95,97],[100],[92,95,102,105],[92,95,102,106],[92,95,97,99],[95],[95,99],[95,97,99],[92,103]],"referencedMap":[[114,1],[91,2],[93,3],[111,1],[90,4],[87,5],[92,6],[88,1],[112,1],[94,7],[82,8],[34,9],[36,10],[83,11],[37,12],[38,13],[39,14],[40,15],[41,16],[42,17],[43,18],[44,19],[45,20],[46,20],[47,21],[48,22],[49,23],[50,24],[35,1],[79,1],[51,25],[52,26],[53,27],[84,28],[54,29],[55,30],[56,31],[57,32],[58,33],[59,34],[60,35],[61,36],[62,37],[63,38],[64,39],[65,40],[66,41],[67,42],[68,22],[69,43],[70,44],[71,45],[81,46],[72,47],[73,48],[74,49],[75,50],[76,51],[80,52],[77,53],[78,54],[113,1],[86,1],[85,1],[89,55],[115,56],[98,57],[107,1],[95,58],[7,1],[9,1],[8,1],[2,1],[10,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[3,1],[4,1],[21,1],[18,1],[19,1],[20,1],[22,1],[23,1],[24,1],[5,1],[25,1],[26,1],[27,1],[28,1],[6,1],[29,1],[30,1],[31,1],[32,1],[1,1],[33,1],[96,1],[109,59],[100,60],[110,61],[99,62],[101,63],[106,64],[105,65],[102,66],[108,67],[97,68],[103,69],[104,70]],"exportedModulesMap":[[114,1],[91,2],[93,3],[111,1],[90,4],[87,5],[92,6],[88,1],[112,1],[94,7],[82,8],[34,9],[36,10],[83,11],[37,12],[38,13],[39,14],[40,15],[41,16],[42,17],[43,18],[44,19],[45,20],[46,20],[47,21],[48,22],[49,23],[50,24],[35,1],[79,1],[51,25],[52,26],[53,27],[84,28],[54,29],[55,30],[56,31],[57,32],[58,33],[59,34],[60,35],[61,36],[62,37],[63,38],[64,39],[65,40],[66,41],[67,42],[68,22],[69,43],[70,44],[71,45],[81,46],[72,47],[73,48],[74,49],[75,50],[76,51],[80,52],[77,53],[78,54],[113,1],[86,1],[85,1],[89,55],[115,56],[98,57],[107,1],[95,58],[7,1],[9,1],[8,1],[2,1],[10,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[3,1],[4,1],[21,1],[18,1],[19,1],[20,1],[22,1],[23,1],[24,1],[5,1],[25,1],[26,1],[27,1],[28,1],[6,1],[29,1],[30,1],[31,1],[32,1],[1,1],[33,1],[109,71],[100,72],[110,73],[99,74],[101,75],[106,76],[105,77],[102,78],[108,79],[97,80],[103,81],[104,82]],"semanticDiagnosticsPerFile":[114,91,93,111,90,87,92,88,112,94,82,34,36,83,37,38,39,40,41,42,43,44,45,46,47,48,49,50,35,79,51,52,53,84,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,81,72,73,74,75,76,80,77,78,113,86,85,89,115,98,107,95,7,9,8,2,10,11,12,13,14,15,16,17,3,4,21,18,19,20,22,23,24,5,25,26,27,28,6,29,30,31,32,1,33,96,109,100,110,99,101,106,105,102,108,97,103,104]},"version":"4.3.5"}
|
package/lib/utils.d.ts
ADDED
package/lib/utils.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPageLinkHeader = void 0;
|
|
4
|
+
const addInRange = (pages, currentPage) => (add) => {
|
|
5
|
+
const sum = currentPage + add;
|
|
6
|
+
if (sum < 0)
|
|
7
|
+
return '0';
|
|
8
|
+
if (sum > pages)
|
|
9
|
+
return String(pages);
|
|
10
|
+
return String(sum);
|
|
11
|
+
};
|
|
12
|
+
const constructUrl = (req) => {
|
|
13
|
+
const rootUrl = req.protocol + '://' + req.get('host') + req.originalUrl;
|
|
14
|
+
const [url, urlQuery] = rootUrl.split('?');
|
|
15
|
+
const query = new URLSearchParams(urlQuery);
|
|
16
|
+
return (rel, page, limit = String(query.get('limit'))) => {
|
|
17
|
+
query.set('page', page);
|
|
18
|
+
query.set('limit', limit);
|
|
19
|
+
return `<${url}?${query.toString()}>; rel="${rel}"`;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
function getPageLinkHeader(req, data) {
|
|
23
|
+
if (!req.mongooseQuery.page)
|
|
24
|
+
return '';
|
|
25
|
+
if (data.count < data.limit)
|
|
26
|
+
return '';
|
|
27
|
+
const currentPage = req.mongooseQuery.page;
|
|
28
|
+
const pages = Math.floor(data.count / data.limit);
|
|
29
|
+
const getPage = addInRange(pages, currentPage);
|
|
30
|
+
const toUrl = constructUrl(req);
|
|
31
|
+
const next = toUrl('next', getPage(1));
|
|
32
|
+
const prevSkip = getPage(-1);
|
|
33
|
+
const prev = currentPage > 1 ? toUrl('prev', prevSkip) : '';
|
|
34
|
+
const first = currentPage > 1 ? toUrl('first', '1') : '';
|
|
35
|
+
const last = toUrl('last', String(pages), String(data.count - pages * data.limit));
|
|
36
|
+
let link = `${next},${last}`;
|
|
37
|
+
if (first)
|
|
38
|
+
link += `,${first}`;
|
|
39
|
+
if (prev)
|
|
40
|
+
link += `,${prev}`;
|
|
41
|
+
return link;
|
|
42
|
+
}
|
|
43
|
+
exports.getPageLinkHeader = getPageLinkHeader;
|
|
44
|
+
//# sourceMappingURL=utils.js.map
|
package/lib/utils.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAGA,MAAM,UAAU,GAAG,CAAC,KAAa,EAAE,WAAmB,EAAE,EAAE,CAAC,CAAC,GAAW,EAAE,EAAE;IACzE,MAAM,GAAG,GAAG,WAAW,GAAG,GAAG,CAAC;IAC9B,IAAI,GAAG,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC;IACxB,IAAI,GAAG,GAAG,KAAK;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,GAAY,EAAE,EAAE;IACpC,MAAM,OAAO,GAAG,GAAG,CAAC,QAAQ,GAAG,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,WAAW,CAAC;IACzE,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3C,MAAM,KAAK,GAAG,IAAI,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC5C,OAAO,CAAC,GAAW,EAAE,IAAY,EAAE,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE;QACvE,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACxB,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC1B,OAAO,IAAI,GAAG,IAAI,KAAK,CAAC,QAAQ,EAAE,WAAW,GAAG,GAAG,CAAC;IACtD,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,SAAgB,iBAAiB,CAAC,GAAY,EAAE,IAA0B;IACxE,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACvC,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IACvC,MAAM,WAAW,GAAG,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC;IAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,OAAO,GAAG,UAAU,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;IAEhC,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACvC,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7B,MAAM,IAAI,GAAG,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5D,MAAM,KAAK,GAAG,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACzD,MAAM,IAAI,GAAG,KAAK,CAChB,MAAM,EACN,MAAM,CAAC,KAAK,CAAC,EACb,MAAM,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CACxC,CAAC;IAEF,IAAI,IAAI,GAAG,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC;IAC7B,IAAI,KAAK;QAAE,IAAI,IAAI,IAAI,KAAK,EAAE,CAAC;IAC/B,IAAI,IAAI;QAAE,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;IAE7B,OAAO,IAAI,CAAC;AACd,CAAC;AAvBD,8CAuBC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ewb/mongoose-query",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Parse queries and params to mongoose search. Strips dangerous keys and set corrects options with help of query values.",
|
|
6
|
+
"main": "./lib/index.js",
|
|
7
|
+
"types": "./lib/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"start": "yarn build:watch",
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"build:watch": "tsc --watch --incremental",
|
|
12
|
+
"lint": "tslint --project \"./tsconfig.json\"",
|
|
13
|
+
"test": "vitest run",
|
|
14
|
+
"test:ui": "vitest --ui",
|
|
15
|
+
"postversion": "git push && git push --tags",
|
|
16
|
+
"prepublish": "yarn test && yarn build",
|
|
17
|
+
"preversion": "yarn build"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"express-mongo-sanitize": "^2.2.0",
|
|
21
|
+
"http-status": "^1.6.2",
|
|
22
|
+
"jsondiffpatch": "^0.4.1"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@vitest/ui": "^0.31.1",
|
|
26
|
+
"husky": "^8.0.3",
|
|
27
|
+
"lint-staged": "^13.2.2",
|
|
28
|
+
"mongoose": "^7.2.0",
|
|
29
|
+
"prettier": "^2.8.8",
|
|
30
|
+
"tslint": "^6.1.3",
|
|
31
|
+
"typescript": "^5.0.4",
|
|
32
|
+
"vitest": "^0.31.1"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"mongoose": "*"
|
|
36
|
+
},
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/ludens-reklame/mongoose-query.git"
|
|
40
|
+
},
|
|
41
|
+
"keywords": [
|
|
42
|
+
"typescript",
|
|
43
|
+
"npm",
|
|
44
|
+
"translate"
|
|
45
|
+
],
|
|
46
|
+
"author": "Emils Webbod",
|
|
47
|
+
"license": "MIT",
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://github.com/ludens-reklame/mongoose-query/issues"
|
|
50
|
+
},
|
|
51
|
+
"homepage": "https://github.com/ludens-reklame/mongoose-query#readme",
|
|
52
|
+
"files": [
|
|
53
|
+
"lib"
|
|
54
|
+
],
|
|
55
|
+
"husky": {
|
|
56
|
+
"hooks": {
|
|
57
|
+
"pre-commit": "pretty-quick --staged"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"resolutions": {}
|
|
61
|
+
}
|