@unchainedshop/core-warehousing 4.5.0 → 4.6.1

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 { generateDbFilterById, generateDbObjectId, assertDocumentDBCompatMode, } from '@unchainedshop/mongodb';
2
+ import { generateDbFilterById, generateDbObjectId, escapeRegexString, assertDocumentDBCompatMode, } from '@unchainedshop/mongodb';
3
3
  import { WarehousingProvidersCollection, } from "../db/WarehousingProvidersCollection.js";
4
4
  import { TokenSurrogateCollection } from "../db/TokenSurrogateCollection.js";
5
5
  import pMemoize from 'p-memoize';
@@ -21,7 +21,7 @@ export const buildFindSelector = ({ includeDeleted = false, queryString, warehou
21
21
  selector.type = type;
22
22
  }
23
23
  if (queryString) {
24
- const regex = new RegExp(queryString, 'i');
24
+ const regex = new RegExp(escapeRegexString(queryString), 'i');
25
25
  selector.$or = [{ _id: regex }, { adapterKey: regex }];
26
26
  }
27
27
  return selector;
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@unchainedshop/core-warehousing",
3
- "version": "4.5.0",
3
+ "description": "Inventory and stock management module for the Unchained Engine",
4
+ "version": "4.6.1",
4
5
  "main": "lib/warehousing-index.js",
5
6
  "types": "lib/warehousing-index.d.ts",
6
7
  "type": "module",
@@ -34,9 +35,9 @@
34
35
  },
35
36
  "homepage": "https://github.com/unchainedshop/unchained#readme",
36
37
  "dependencies": {
37
- "@unchainedshop/events": "^4.5.0",
38
- "@unchainedshop/logger": "^4.5.0",
39
- "@unchainedshop/utils": "^4.5.0",
38
+ "@unchainedshop/events": "^4.6.0",
39
+ "@unchainedshop/logger": "^4.6.0",
40
+ "@unchainedshop/utils": "^4.6.0",
40
41
  "expiry-map": "^2.0.0",
41
42
  "p-memoize": "^8.0.0"
42
43
  },