@unchainedshop/core 4.8.27 → 4.8.29
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.
|
@@ -14,7 +14,7 @@ export interface BulkImportOperationResult {
|
|
|
14
14
|
export type BulkImportOperation<T> = {
|
|
15
15
|
payloadSchema?: z.ZodMiniObject;
|
|
16
16
|
} & ((payload: any, options: {
|
|
17
|
-
bulk: (collection: string) =>
|
|
17
|
+
bulk: (collection: string) => mongodb.BulkOperationBase;
|
|
18
18
|
createShouldUpsertIfIDExists?: boolean;
|
|
19
19
|
updateShouldUpsertIfIDNotExists?: boolean;
|
|
20
20
|
skipCacheInvalidation?: boolean;
|
|
@@ -116,7 +116,7 @@ export const FilterDirector = {
|
|
|
116
116
|
includeInactive: true,
|
|
117
117
|
})
|
|
118
118
|
: [];
|
|
119
|
-
const
|
|
119
|
+
const intersected = await filters.reduce(async (productIdSetPromise, filter) => {
|
|
120
120
|
const productIdSet = await productIdSetPromise;
|
|
121
121
|
if (!parsedFilterQuery[filter.key])
|
|
122
122
|
return productIdSet;
|
|
@@ -127,7 +127,7 @@ export const FilterDirector = {
|
|
|
127
127
|
}, unchainedAPI);
|
|
128
128
|
return productIdSet.intersection(filterOptionProductIds);
|
|
129
129
|
}, Promise.resolve(new Set(productIds)));
|
|
130
|
-
return
|
|
130
|
+
return productIds.filter((id) => intersected.has(id));
|
|
131
131
|
},
|
|
132
132
|
async filterFacets(filter, params, unchainedAPI) {
|
|
133
133
|
const { allProductIdSet, searchQuery, forceLiveCollection, otherFilters } = params;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unchainedshop/core",
|
|
3
3
|
"description": "Core orchestration package for the Unchained Engine with business services and directors",
|
|
4
|
-
"version": "4.8.
|
|
4
|
+
"version": "4.8.29",
|
|
5
5
|
"main": "lib/core-index.js",
|
|
6
6
|
"types": "lib/core-index.d.ts",
|
|
7
7
|
"type": "module",
|