@unchainedshop/core-delivery 4.5.0 → 4.6.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { emit, registerEvents } from '@unchainedshop/events';
|
|
2
|
-
import { mongodb, generateDbFilterById, generateDbObjectId, } from '@unchainedshop/mongodb';
|
|
2
|
+
import { mongodb, generateDbFilterById, generateDbObjectId, escapeRegexString, } from '@unchainedshop/mongodb';
|
|
3
3
|
import { DeliveryProvidersCollection, } from "../db/DeliveryProvidersCollection.js";
|
|
4
4
|
import { deliverySettings } from "../delivery-settings.js";
|
|
5
5
|
import pMemoize from 'p-memoize';
|
|
@@ -18,7 +18,7 @@ export const buildFindSelector = ({ includeDeleted = false, queryString, deliver
|
|
|
18
18
|
selector.type = type;
|
|
19
19
|
}
|
|
20
20
|
if (queryString) {
|
|
21
|
-
const regex = new RegExp(queryString, 'i');
|
|
21
|
+
const regex = new RegExp(escapeRegexString(queryString), 'i');
|
|
22
22
|
selector.$or = [{ _id: regex }, { adapterKey: regex }];
|
|
23
23
|
}
|
|
24
24
|
return selector;
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unchainedshop/core-delivery",
|
|
3
|
-
"
|
|
3
|
+
"description": "Delivery provider management module for the Unchained Engine",
|
|
4
|
+
"version": "4.6.0",
|
|
4
5
|
"main": "lib/delivery-index.js",
|
|
5
6
|
"types": "lib/delivery-index.d.ts",
|
|
6
7
|
"type": "module",
|
|
@@ -34,10 +35,10 @@
|
|
|
34
35
|
},
|
|
35
36
|
"homepage": "https://github.com/unchainedshop/unchained#readme",
|
|
36
37
|
"dependencies": {
|
|
37
|
-
"@unchainedshop/events": "^4.
|
|
38
|
-
"@unchainedshop/logger": "^4.
|
|
39
|
-
"@unchainedshop/mongodb": "^4.
|
|
40
|
-
"@unchainedshop/utils": "^4.
|
|
38
|
+
"@unchainedshop/events": "^4.6.0",
|
|
39
|
+
"@unchainedshop/logger": "^4.6.0",
|
|
40
|
+
"@unchainedshop/mongodb": "^4.6.0",
|
|
41
|
+
"@unchainedshop/utils": "^4.6.0",
|
|
41
42
|
"expiry-map": "^2.0.0",
|
|
42
43
|
"p-memoize": "^8.0.0"
|
|
43
44
|
},
|