mormati-mongoose 0.1.32 → 0.1.36
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/dist/helper/model/model.schema.d.ts +8 -2
- package/dist/helper/query/engine/group/index.d.ts +2 -1
- package/dist/helper/query/engine/index.js +1 -1
- package/dist/helper/query/engine/index.js.map +1 -1
- package/dist/helper/query/engine/limit/index.d.ts +2 -1
- package/dist/helper/query/engine/lookup/index.d.ts +2 -1
- package/dist/helper/query/engine/lookup/index.js +2 -1
- package/dist/helper/query/engine/lookup/index.js.map +1 -1
- package/dist/helper/query/engine/match/index.d.ts +28 -23
- package/dist/helper/query/engine/match/match.search.d.ts +2 -1
- package/dist/helper/query/engine/project/index.d.ts +2 -1
- package/dist/helper/query/engine/skip/index.d.ts +2 -1
- package/dist/helper/query/engine/sort/index.d.ts +2 -1
- package/dist/helper/query/engine/unset/index.d.ts +2 -1
- package/dist/modules/mongoose-connection/mongoose-config.service.d.ts +3 -1
- package/dist/modules/mongoose-connection/mongoose-config.service.js +5 -3
- package/dist/modules/mongoose-connection/mongoose-config.service.js.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -34,13 +34,19 @@ export declare class GenericSubCatalog {
|
|
|
34
34
|
updated_at: Date;
|
|
35
35
|
}
|
|
36
36
|
export declare const getGenericSubCatalogSchema: (GenericSubCatalog: any) => import("mongoose").Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
|
37
|
+
[x: number]: unknown;
|
|
38
|
+
[x: symbol]: unknown;
|
|
37
39
|
[x: string]: unknown;
|
|
38
40
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
41
|
+
[x: number]: unknown;
|
|
42
|
+
[x: symbol]: unknown;
|
|
39
43
|
[x: string]: unknown;
|
|
40
|
-
}>> & import("mongoose").FlatRecord<{
|
|
44
|
+
}>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<{
|
|
45
|
+
[x: number]: unknown;
|
|
46
|
+
[x: symbol]: unknown;
|
|
41
47
|
[x: string]: unknown;
|
|
42
48
|
}> & Required<{
|
|
43
49
|
_id: unknown;
|
|
44
50
|
}> & {
|
|
45
|
-
__v
|
|
51
|
+
__v: number;
|
|
46
52
|
}>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import X from '../../query.expression';
|
|
1
2
|
import { ICriteria } from '../engine.type';
|
|
2
3
|
interface IQueryGroup {
|
|
3
4
|
criteria: ICriteria;
|
|
4
5
|
}
|
|
5
6
|
export declare const queryGroup: ({ criteria }: IQueryGroup) => {
|
|
6
|
-
[
|
|
7
|
+
[X.STAGE_GROUP]: {
|
|
7
8
|
length: number;
|
|
8
9
|
toString(): string;
|
|
9
10
|
toLocaleString(): string;
|
|
@@ -21,7 +21,7 @@ const QueryEngine = ({ ConfigSystem, CollectionRef, GroupRef }) => {
|
|
|
21
21
|
const match = (0, match_1.queryMatch)({ _defaultLang, condAnd, condByField, condByQuery, criteria });
|
|
22
22
|
const skip = (0, skip_1.querySkip)({ criteria });
|
|
23
23
|
const limit = (0, limit_1.queryLimit)({ criteria });
|
|
24
|
-
const lookup = (0, lookup_1.queryLookup)({ _collectionRef, _groupRef, condAnd, criteria });
|
|
24
|
+
const lookup = (0, lookup_1.queryLookup)({ _defaultLang, _collectionRef, _groupRef, condAnd, criteria });
|
|
25
25
|
const unwind = (0, unwind_1.queryUnwind)({ criteria });
|
|
26
26
|
const group = (0, group_1.queryGroup)({ criteria });
|
|
27
27
|
const unset = (0, unset_1.queryUnset)({ criteria });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/mongoose/src/helper/query/engine/index.ts"],"names":[],"mappings":";;;AAAA,0DAAoC;AACpC,mCAAsC;AACtC,mCAAsC;AACtC,iCAAoC;AAC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AK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACtF,CAAC,CAAC;IAOF,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,EAAE;QAC1B,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;QACtD,OAAO,IAAA,8BAAe,EAAC,WAAW,EAAE;YAChC,OAAO,EAAE,2BAA2B;YACpC,kBAAkB,EAAE,CAAC,QAAQ,EAAE,UAAU;YACzC,QAAQ,EAAE,CAAC,WAAW,EAAE,EAAE;gBACtB,OAAO,IAAA,kBAAU,EAAC;oBACd,YAAY;oBACZ,OAAO;oBACP,WAAW;oBACX,QAAQ;iBACX,CAAC,CAAC,CAAC,CAAC,CAAC,0BAAC,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,0BAAC,CAAC,WAAW,CAAC,CAAC;YACjD,CAAC;SACJ,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,OAAO;QACH,cAAc;QACd,WAAW;KACd,CAAC;AACN,CAAC,CAAC;AA/DW,QAAA,WAAW,eA+DtB"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import X from '../../query.expression';
|
|
1
2
|
import { ICriteria } from '../engine.type';
|
|
2
3
|
interface IQueryLimit {
|
|
3
4
|
criteria: ICriteria;
|
|
4
5
|
}
|
|
5
6
|
export declare const queryLimit: ({ criteria }: IQueryLimit) => {
|
|
6
|
-
[
|
|
7
|
+
[X.STAGE_LIMIT]: number;
|
|
7
8
|
}[];
|
|
8
9
|
export {};
|
|
@@ -5,7 +5,7 @@ const query_expression_1 = require("../../query.expression");
|
|
|
5
5
|
const match_1 = require("../match");
|
|
6
6
|
const sort_1 = require("../sort");
|
|
7
7
|
const lookup_pipe_1 = require("./lookup.pipe");
|
|
8
|
-
const queryLookup = ({ _collectionRef, _groupRef, condAnd, criteria }) => {
|
|
8
|
+
const queryLookup = ({ _defaultLang, _collectionRef, _groupRef, condAnd, criteria }) => {
|
|
9
9
|
const { _lookup } = criteria ?? {};
|
|
10
10
|
const lookupQuery = [];
|
|
11
11
|
if (_lookup?.length > 0) {
|
|
@@ -19,6 +19,7 @@ const queryLookup = ({ _collectionRef, _groupRef, condAnd, criteria }) => {
|
|
|
19
19
|
lookupQuery.push(...(0, lookup_pipe_1.queryLookup_unwind)(preUnwind));
|
|
20
20
|
const { localVaribales, matchConditions, } = (0, lookup_pipe_1.queryLookup_getValues)(pipelineConditions);
|
|
21
21
|
const matchQuery = (0, match_1.queryMatch)({
|
|
22
|
+
_defaultLang: _defaultLang,
|
|
22
23
|
condAnd: [condAnd.find(e => e.key == "language")],
|
|
23
24
|
condByQuery: matchConditions,
|
|
24
25
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/mongoose/src/helper/query/engine/lookup/index.ts"],"names":[],"mappings":";;;AAAA,6DAAuC;AACvC,oCAAsC;AACtC,kCAAoC;AACpC,+CAKuB;AAGhB,MAAM,WAAW,GAAG,CAAC,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/mongoose/src/helper/query/engine/lookup/index.ts"],"names":[],"mappings":";;;AAAA,6DAAuC;AACvC,oCAAsC;AACtC,kCAAoC;AACpC,+CAKuB;AAGhB,MAAM,WAAW,GAAG,CAAC,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC1F,MAAM,EAAE,OAAO,EAAE,GAAG,QAAQ,IAAI,EAAE,CAAC;IACnC,MAAM,WAAW,GAAG,EAAE,CAAC;IACvB,IAAI,OAAO,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;YAChB,MAAM,EAAE,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I,CAAC,GAAG,IAAA,+BAAiB,EAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;YAEzD,WAAW,CAAC,IAAI,CAAC,GAAG,IAAA,gBAAS,EAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;QAClE,CAAC,CAAC,CAAC;IACP,CAAC;IAAA,CAAC;IACF,OAAO,WAAW,CAAC;AACvB,CAAC,CAAC;AApDW,QAAA,WAAW,eAoDtB"}
|
|
@@ -1,44 +1,49 @@
|
|
|
1
|
+
import X from '../../query.expression';
|
|
1
2
|
export declare const queryMatch: (props: any) => ({
|
|
2
|
-
[
|
|
3
|
+
[X.STAGE_MATCH]: {
|
|
3
4
|
$or: any[];
|
|
4
5
|
};
|
|
5
6
|
} | {
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
7
|
+
[X.STAGE_MATCH]: {
|
|
8
|
+
[X.EXPR]: {
|
|
9
|
+
[X.EXPR_AND]: any[];
|
|
9
10
|
};
|
|
10
11
|
};
|
|
11
12
|
})[] | ({
|
|
12
|
-
[
|
|
13
|
+
[X.STAGE_MATCH]: {
|
|
13
14
|
$or: any[];
|
|
14
15
|
};
|
|
15
16
|
} | {
|
|
16
|
-
[
|
|
17
|
+
[X.STAGE_FACET]: {
|
|
17
18
|
DL: {
|
|
18
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
19
|
+
[X.STAGE_MATCH]: {
|
|
20
|
+
[X.EXPR]: {
|
|
21
|
+
[X.EXPR_AND]: any[];
|
|
21
22
|
};
|
|
22
23
|
};
|
|
23
24
|
}[];
|
|
24
25
|
AL: {
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
[
|
|
26
|
+
[X.STAGE_MATCH]: {
|
|
27
|
+
[X.EXPR]: {
|
|
28
|
+
[X.EXPR_AND]: any[];
|
|
28
29
|
};
|
|
29
30
|
};
|
|
30
31
|
}[];
|
|
31
32
|
};
|
|
32
33
|
} | {
|
|
33
|
-
[
|
|
34
|
+
[X.STAGE_PROJECT]: {
|
|
34
35
|
doc: {
|
|
35
|
-
[
|
|
36
|
-
[
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
[X.MAP.MAP]: {
|
|
37
|
+
[X.MAP.INPUT]: string;
|
|
38
|
+
[X.MAP.AS]: string;
|
|
39
|
+
[X.MAP.IN]: {
|
|
40
|
+
[X.MERGEOBJECTS]: (string | {
|
|
41
|
+
[X.ARRAYELEMAT]: (number | {
|
|
42
|
+
[X.FILTER.FILTER]: {
|
|
43
|
+
[X.FILTER.INPUT]: string;
|
|
44
|
+
[X.FILTER.AS]: string;
|
|
45
|
+
[X.FILTER.COND]: {
|
|
46
|
+
[X.EXPR_EQ]: string[];
|
|
42
47
|
};
|
|
43
48
|
};
|
|
44
49
|
})[];
|
|
@@ -48,9 +53,9 @@ export declare const queryMatch: (props: any) => ({
|
|
|
48
53
|
};
|
|
49
54
|
};
|
|
50
55
|
} | {
|
|
51
|
-
[
|
|
56
|
+
[X.STAGE_UNWIND]: string;
|
|
52
57
|
} | {
|
|
53
|
-
[
|
|
54
|
-
[
|
|
58
|
+
[X.STAGE_REPLACEROOT.REPLACEROOT]: {
|
|
59
|
+
[X.STAGE_REPLACEROOT.NEW_ROOT]: string;
|
|
55
60
|
};
|
|
56
61
|
})[];
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import X from '../../query.expression';
|
|
1
2
|
import { ICriteria } from '../engine.type';
|
|
2
3
|
interface IQueryProject {
|
|
3
4
|
criteria: ICriteria;
|
|
4
5
|
}
|
|
5
6
|
export declare const queryProject: ({ criteria }: IQueryProject) => {
|
|
6
|
-
[
|
|
7
|
+
[X.STAGE_PROJECT]: {};
|
|
7
8
|
}[];
|
|
8
9
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import X from '../../query.expression';
|
|
1
2
|
import { ICriteria } from '../engine.type';
|
|
2
3
|
interface IQuerySkip {
|
|
3
4
|
criteria: ICriteria;
|
|
4
5
|
}
|
|
5
6
|
export declare const querySkip: ({ criteria }: IQuerySkip) => {
|
|
6
|
-
[
|
|
7
|
+
[X.STAGE_SKIP]: number;
|
|
7
8
|
}[];
|
|
8
9
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import X from '../../query.expression';
|
|
1
2
|
import { ICriteria } from '../engine.type';
|
|
2
3
|
interface IQuerySort {
|
|
3
4
|
criteria: ICriteria;
|
|
4
5
|
}
|
|
5
6
|
export declare const querySort: ({ criteria }: IQuerySort) => {
|
|
6
|
-
[
|
|
7
|
+
[X.STAGE_SORT]: object;
|
|
7
8
|
}[];
|
|
8
9
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import X from '../../query.expression';
|
|
1
2
|
import { ICriteria } from '../engine.type';
|
|
2
3
|
interface IQueryUnset {
|
|
3
4
|
criteria: ICriteria;
|
|
4
5
|
}
|
|
5
6
|
export declare const queryUnset: ({ criteria }: IQueryUnset) => {
|
|
6
|
-
[
|
|
7
|
+
[X.STAGE_UNSET]: string[];
|
|
7
8
|
}[];
|
|
8
9
|
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { MongooseModuleOptions, MongooseOptionsFactory } from '@nestjs/mongoose';
|
|
2
|
+
import { LoggerService } from 'mormati-common';
|
|
2
3
|
export declare class MongodbConfigService implements MongooseOptionsFactory {
|
|
3
4
|
private readonly configService;
|
|
4
|
-
|
|
5
|
+
private readonly loggerService;
|
|
6
|
+
constructor(configService: any, loggerService: LoggerService);
|
|
5
7
|
createMongooseOptions(): MongooseModuleOptions;
|
|
6
8
|
}
|
|
@@ -15,9 +15,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.MongodbConfigService = void 0;
|
|
16
16
|
const common_1 = require("@nestjs/common");
|
|
17
17
|
const const_1 = require("../../const");
|
|
18
|
+
const mormati_common_1 = require("mormati-common");
|
|
18
19
|
let MongodbConfigService = class MongodbConfigService {
|
|
19
|
-
constructor(configService) {
|
|
20
|
+
constructor(configService, loggerService) {
|
|
20
21
|
this.configService = configService;
|
|
22
|
+
this.loggerService = loggerService;
|
|
21
23
|
}
|
|
22
24
|
createMongooseOptions() {
|
|
23
25
|
const MONGO_DB_USER = this.configService.get('MONGO_DB_USER');
|
|
@@ -34,7 +36,7 @@ let MongodbConfigService = class MongodbConfigService {
|
|
|
34
36
|
+ `${MONGO_DB_HOST}:${MONGO_DB_PORT}/${MONGO_DB_NAME}`
|
|
35
37
|
+ `?authMechanism=DEFAULT`
|
|
36
38
|
+ `${MONGO_DB_NAME_AUTH ? `&authSource=${MONGO_DB_NAME_AUTH}` : ``}`;
|
|
37
|
-
|
|
39
|
+
this.loggerService.log(`[Mongo DB] # Connecting to DB Server.. [root:root123#@${MONGO_DB_HOST}/${MONGO_DB_NAME}]`);
|
|
38
40
|
return {
|
|
39
41
|
uri,
|
|
40
42
|
socketTimeoutMS: 10000,
|
|
@@ -47,6 +49,6 @@ exports.MongodbConfigService = MongodbConfigService;
|
|
|
47
49
|
exports.MongodbConfigService = MongodbConfigService = __decorate([
|
|
48
50
|
(0, common_1.Injectable)(),
|
|
49
51
|
__param(0, (0, common_1.Inject)(const_1.MONGOOSE_CONFIG_SERVICE)),
|
|
50
|
-
__metadata("design:paramtypes", [Object])
|
|
52
|
+
__metadata("design:paramtypes", [Object, mormati_common_1.LoggerService])
|
|
51
53
|
], MongodbConfigService);
|
|
52
54
|
//# sourceMappingURL=mongoose-config.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mongoose-config.service.js","sourceRoot":"","sources":["../../../../../libs/mongoose/src/modules/mongoose-connection/mongoose-config.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoD;AAKpD,uCAAsD;
|
|
1
|
+
{"version":3,"file":"mongoose-config.service.js","sourceRoot":"","sources":["../../../../../libs/mongoose/src/modules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