@unchainedshop/mongodb 2.11.2 → 2.12.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.
@@ -6,3 +6,4 @@ export type Indexes<T extends Document> = Array<{
6
6
  options?: CreateIndexesOptions;
7
7
  }>;
8
8
  export declare const buildDbIndexes: <T extends Document>(collection: Collection<T>, indexes: Indexes<T>) => Promise<boolean>;
9
+ //# sourceMappingURL=build-db-indexes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-db-indexes.d.ts","sourceRoot":"","sources":["../src/build-db-indexes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG1F,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,QAAQ,IAAI,KAAK,CAAC;IAC9C,KAAK,EAAE;SAAG,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,cAAc;KAAE,CAAC;IAC7C,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC,CAAC,CAAC;AAkBH,eAAO,MAAM,cAAc,GAAU,CAAC,SAAS,QAAQ,cACzC,UAAU,CAAC,CAAC,CAAC,WAChB,OAAO,CAAC,CAAC,CAAC,qBA0BpB,CAAC"}
@@ -2,3 +2,4 @@ import { SortOption } from '@unchainedshop/types/api.js';
2
2
  import type { Sort } from 'mongodb';
3
3
  export declare const buildSortOptions: (sort?: Array<SortOption>) => Sort;
4
4
  export default buildSortOptions;
5
+ //# sourceMappingURL=build-sort-option.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-sort-option.d.ts","sourceRoot":"","sources":["../src/build-sort-option.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAOpC,eAAO,MAAM,gBAAgB,UAAU,KAAK,CAAC,UAAU,CAAC,KAAQ,IAM/D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
package/lib/check-id.d.ts CHANGED
@@ -2,3 +2,4 @@ export declare const checkId: (value: string, error?: {
2
2
  message: string;
3
3
  path?: string | undefined;
4
4
  } | undefined) => void;
5
+ //# sourceMappingURL=check-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-id.d.ts","sourceRoot":"","sources":["../src/check-id.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UACX,MAAM,UAET;IACE,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,GACD,SAAS,KACZ,IAIF,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export declare function emailRegexOperator(string: any): {
2
2
  $regex: RegExp;
3
3
  };
4
+ //# sourceMappingURL=email-regex-operator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email-regex-operator.d.ts","sourceRoot":"","sources":["../src/email-regex-operator.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,CAAC,MAAM,KAAA;;EAMxC"}
@@ -3,3 +3,4 @@ import { Locale } from '@unchainedshop/types/common.js';
3
3
  import type { Collection, Document, Filter } from 'mongodb';
4
4
  export declare const findLocalizedText: <T extends Document>(collection: Collection<T>, selector: Filter<T>, locale: Locale) => Promise<T>;
5
5
  export default findLocalizedText;
6
+ //# sourceMappingURL=find-localized-text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-localized-text.d.ts","sourceRoot":"","sources":["../src/find-localized-text.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAgB5D,eAAO,MAAM,iBAAiB,GAAU,CAAC,SAAS,QAAQ,cAC5C,UAAU,CAAC,CAAC,CAAC,YACf,MAAM,CAAC,CAAC,CAAC,UACX,MAAM,KACb,OAAO,CAAC,CAAC,CAqCX,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1,2 +1,3 @@
1
1
  import type { Collection, FindOptions, Filter } from 'mongodb';
2
2
  export declare const findPreservingIds: <T>(collection: Collection<T>) => ((selector: Filter<T>, ids: Array<string>, options?: FindOptions) => Promise<Array<T>>);
3
+ //# sourceMappingURL=find-preserving-ids.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-preserving-ids.d.ts","sourceRoot":"","sources":["../src/find-preserving-ids.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAc/D,eAAO,MAAM,iBAAiB,GAC3B,CAAC,cACY,UAAU,CAAC,CAAC,CAAC,KACxB,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CA0BxF,CAAC"}
@@ -2,3 +2,4 @@ import type { Filter } from 'mongodb';
2
2
  export declare const generateDbFilterById: <T extends {
3
3
  _id?: string;
4
4
  }>(id: unknown, query?: Filter<T>) => Filter<T>;
5
+ //# sourceMappingURL=generate-db-filter-by-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-db-filter-by-id.d.ts","sourceRoot":"","sources":["../src/generate-db-filter-by-id.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEtC,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,MACzD,OAAO,UACJ,MAAM,CAAC,CAAC,CAAC,KACf,MAAM,CAAC,CAAC,CAGV,CAAC"}
@@ -8,3 +8,4 @@ export declare const generateDbMutations: <T extends TimestampFields & {
8
8
  hasCreateOnly?: boolean;
9
9
  permanentlyDeleteByDefault?: boolean;
10
10
  }) => ModuleMutations<T> | ModuleCreateMutation<T>;
11
+ //# sourceMappingURL=generate-db-mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-db-mutations.d.ts","sourceRoot":"","sources":["../src/generate-db-mutations.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,UAAU,EAAgB,MAAM,SAAS,CAAC;AAKnD,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,eAAe,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,cAClE,UAAU,CAAC,CAAC,CAAC,UACjB,YAAY,YACV;IACR,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC,KACA,eAAe,CAAC,CAAC,CAAC,GAAG,oBAAoB,CAAC,CAAC,CA6E7C,CAAC"}
@@ -5,3 +5,4 @@
5
5
  * @param {Number} n Length of the string
6
6
  */
7
7
  export declare const generateDbObjectId: (digits?: number) => string;
8
+ //# sourceMappingURL=generate-db-object-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-db-object-id.d.ts","sourceRoot":"","sources":["../src/generate-db-object-id.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,uBAAkB,MAehD,CAAC"}
package/lib/initDb.d.ts CHANGED
@@ -3,3 +3,4 @@ export declare const startDb: () => Promise<string>;
3
3
  export declare const stopDb: () => Promise<void>;
4
4
  declare const initDb: () => Promise<Db>;
5
5
  export { initDb };
6
+ //# sourceMappingURL=initDb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initDb.d.ts","sourceRoot":"","sources":["../src/initDb.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAe,MAAM,SAAS,CAAC;AAI1C,eAAO,MAAM,OAAO,uBAgBnB,CAAC;AAEF,eAAO,MAAM,MAAM,qBAElB,CAAC;AAEF,QAAA,MAAM,MAAM,QAAa,OAAO,CAAC,EAAE,CAQlC,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -10,3 +10,4 @@ export { buildSortOptions } from './build-sort-option.js';
10
10
  export { findLocalizedText } from './find-localized-text.js';
11
11
  export { emailRegexOperator } from './email-regex-operator.js';
12
12
  export { mongodb };
13
+ //# sourceMappingURL=mongodb-index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mongodb-index.d.ts","sourceRoot":"","sources":["../src/mongodb-index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAMtD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAE,OAAO,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unchainedshop/mongodb",
3
- "version": "2.11.2",
3
+ "version": "2.12.0",
4
4
  "description": "MongoDB provider for unchained platform",
5
5
  "main": "lib/mongodb-index.js",
6
6
  "exports": {
@@ -31,20 +31,20 @@
31
31
  },
32
32
  "homepage": "https://github.com/unchainedshop/unchained#readme",
33
33
  "dependencies": {
34
- "@unchainedshop/utils": "^2.11.2",
35
- "lru-cache": "^10.2.2"
34
+ "@unchainedshop/utils": "^2.12.0",
35
+ "lru-cache": "^10.3.0"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@mongodb-js/zstd": "^1.2.0",
39
- "mongodb": "^6.7.0"
39
+ "mongodb": "=6.7.0"
40
40
  },
41
41
  "optionalDependencies": {
42
42
  "mongodb-memory-server": "^9.3.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@types/node": "^20.14.8",
46
- "@unchainedshop/types": "^2.11.2",
45
+ "@types/node": "^20.14.9",
46
+ "@unchainedshop/types": "^2.12.0",
47
47
  "jest": "^29.7.0",
48
- "typescript": "^5.4.5"
48
+ "typescript": "^5.5.3"
49
49
  }
50
50
  }