c2-mongoose 2.1.264 → 2.1.266
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/flow/SearcherFlow.js +5 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
- package/src/flow/SearcherFlow.ts +6 -0
- package/src/index.ts +2 -1
|
@@ -284,6 +284,11 @@ var SearcherFlow = /** @class */ (function () {
|
|
|
284
284
|
if (!Array.isArray(value)) {
|
|
285
285
|
value = [value];
|
|
286
286
|
}
|
|
287
|
+
value === null || value === void 0 ? void 0 : value.forEach(function (v) {
|
|
288
|
+
if (typeof v === 'string' && _this.isValidObjectId(v)) {
|
|
289
|
+
v = new mongoose_1.Types.ObjectId(v);
|
|
290
|
+
}
|
|
291
|
+
});
|
|
287
292
|
if (key.startsWith("notIn")) {
|
|
288
293
|
key = key.replace("notIn", "");
|
|
289
294
|
condition[key] = { $nin: value };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import AddStagePaginationFlowItem from "./flow/item/AddStagePaginationFlowItem";
|
|
|
6
6
|
import AddStageSortFlowItem from "./flow/item/AddStageSortFlowItem";
|
|
7
7
|
import BuildPipelineToCountJoinFlowItem from "./flow/item/BuildPipelineToCountJoinFlowItem";
|
|
8
8
|
import BuildPipelineToJoinFlowItem from "./flow/item/BuildPipelineToJoinFlowItem";
|
|
9
|
+
import BuildPopulateSingleFlowItem from "./flow/item/BuildPopulateSingleFlowItem";
|
|
9
10
|
import BuildSelectSingleFlowItem from "./flow/item/BuildSelectSingleFlowItem";
|
|
10
11
|
import ConvertToSearchResponseFlowItem from "./flow/item/ConvertToSearchResponseFlowItem";
|
|
11
12
|
import { IFacet } from "./model/Facet";
|
|
@@ -13,4 +14,4 @@ import { ILogger, LoggerModel, LoggerSearch, TypeOfOperation } from "./model/Log
|
|
|
13
14
|
import { Options } from "./types/Options";
|
|
14
15
|
import { Pagination, SearchResponse } from "./types/SearchResponse";
|
|
15
16
|
import { initialize } from "./utils/Utils";
|
|
16
|
-
export {
|
|
17
|
+
export { AddStagePaginationFlowItem, AddStageSortFlowItem, BuildPipelineToCountJoinFlowItem, BuildPipelineToJoinFlowItem, BuildPopulateSingleFlowItem, BuildSelectSingleFlowItem, C2Flow, ConvertToSearchResponseFlowItem, CrudFlow, IFacet, ILogger, LoggerModel, LoggerSearch, Options, Pagination, SearchFlow, SearchResponse, SearcherFlow, TypeOfOperation, initialize };
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.initialize = exports.TypeOfOperation = exports.SearchFlow = exports.LoggerSearch = exports.LoggerModel = exports.CrudFlow = exports.ConvertToSearchResponseFlowItem = exports.C2Flow = exports.
|
|
6
|
+
exports.initialize = exports.TypeOfOperation = exports.SearcherFlow = exports.SearchFlow = exports.LoggerSearch = exports.LoggerModel = exports.CrudFlow = exports.ConvertToSearchResponseFlowItem = exports.C2Flow = exports.BuildSelectSingleFlowItem = exports.BuildPopulateSingleFlowItem = exports.BuildPipelineToJoinFlowItem = exports.BuildPipelineToCountJoinFlowItem = exports.AddStageSortFlowItem = exports.AddStagePaginationFlowItem = void 0;
|
|
7
7
|
var C2Flow_1 = __importDefault(require("./flow/C2Flow"));
|
|
8
8
|
exports.C2Flow = C2Flow_1.default;
|
|
9
9
|
var CrudFlow_1 = __importDefault(require("./flow/CrudFlow"));
|
|
@@ -20,6 +20,8 @@ var BuildPipelineToCountJoinFlowItem_1 = __importDefault(require("./flow/item/Bu
|
|
|
20
20
|
exports.BuildPipelineToCountJoinFlowItem = BuildPipelineToCountJoinFlowItem_1.default;
|
|
21
21
|
var BuildPipelineToJoinFlowItem_1 = __importDefault(require("./flow/item/BuildPipelineToJoinFlowItem"));
|
|
22
22
|
exports.BuildPipelineToJoinFlowItem = BuildPipelineToJoinFlowItem_1.default;
|
|
23
|
+
var BuildPopulateSingleFlowItem_1 = __importDefault(require("./flow/item/BuildPopulateSingleFlowItem"));
|
|
24
|
+
exports.BuildPopulateSingleFlowItem = BuildPopulateSingleFlowItem_1.default;
|
|
23
25
|
var BuildSelectSingleFlowItem_1 = __importDefault(require("./flow/item/BuildSelectSingleFlowItem"));
|
|
24
26
|
exports.BuildSelectSingleFlowItem = BuildSelectSingleFlowItem_1.default;
|
|
25
27
|
var ConvertToSearchResponseFlowItem_1 = __importDefault(require("./flow/item/ConvertToSearchResponseFlowItem"));
|
package/package.json
CHANGED
package/src/flow/SearcherFlow.ts
CHANGED
|
@@ -256,6 +256,12 @@ class SearcherFlow<D> {
|
|
|
256
256
|
value = [value]
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
+
(value as [])?.forEach((v: any) => {
|
|
260
|
+
if (typeof v === 'string' && this.isValidObjectId(v)) {
|
|
261
|
+
v = new Types.ObjectId(v);
|
|
262
|
+
}
|
|
263
|
+
})
|
|
264
|
+
|
|
259
265
|
if (key.startsWith("notIn")) {
|
|
260
266
|
key = key.replace("notIn", "");
|
|
261
267
|
condition[key] = { $nin: value };
|
package/src/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ import AddStagePaginationFlowItem from "./flow/item/AddStagePaginationFlowItem"
|
|
|
6
6
|
import AddStageSortFlowItem from "./flow/item/AddStageSortFlowItem"
|
|
7
7
|
import BuildPipelineToCountJoinFlowItem from "./flow/item/BuildPipelineToCountJoinFlowItem"
|
|
8
8
|
import BuildPipelineToJoinFlowItem from "./flow/item/BuildPipelineToJoinFlowItem"
|
|
9
|
+
import BuildPopulateSingleFlowItem from "./flow/item/BuildPopulateSingleFlowItem"
|
|
9
10
|
import BuildSelectSingleFlowItem from "./flow/item/BuildSelectSingleFlowItem"
|
|
10
11
|
import ConvertToSearchResponseFlowItem from "./flow/item/ConvertToSearchResponseFlowItem"
|
|
11
12
|
import { IFacet } from "./model/Facet"
|
|
@@ -16,5 +17,5 @@ import { initialize } from "./utils/Utils"
|
|
|
16
17
|
|
|
17
18
|
(global as any).LoggerRepository = undefined
|
|
18
19
|
|
|
19
|
-
export {
|
|
20
|
+
export { AddStagePaginationFlowItem, AddStageSortFlowItem, BuildPipelineToCountJoinFlowItem, BuildPipelineToJoinFlowItem, BuildPopulateSingleFlowItem, BuildSelectSingleFlowItem, C2Flow, ConvertToSearchResponseFlowItem, CrudFlow, IFacet, ILogger, LoggerModel, LoggerSearch, Options, Pagination, SearchFlow, SearchResponse, SearcherFlow, TypeOfOperation, initialize }
|
|
20
21
|
|