@strapi/database 4.2.0-beta.3 → 4.2.1-alpha.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.
package/lib/index.d.ts CHANGED
@@ -2,37 +2,16 @@ import { LifecycleProvider } from './lifecycles';
2
2
  import { MigrationProvider } from './migrations';
3
3
  import { SchemaProvideer } from './schema';
4
4
 
5
- type LogicOperators<T> = {
5
+ type BooleanWhere<T> = {
6
6
  $and?: WhereParams<T>[];
7
7
  $or?: WhereParams<T>[];
8
8
  $not?: WhereParams<T>;
9
- }
10
-
11
- type AttributeOperators<T, K extends keyof T> = {
12
- $eq?: T[K];
13
- $ne?: T[K];
14
- $in?: T[K][];
15
- $notIn?: T[K][];
16
- $lt?: T[K];
17
- $lte?: T[K];
18
- $gt?: T[K];
19
- $gte?: T[K];
20
- $between?: [T[K], T[K]];
21
- $contains?: T[K];
22
- $notContains?: T[K];
23
- $containsi?: T[K];
24
- $notContainsi?: T[K];
25
- $startsWith?: T[K];
26
- $endsWith?: T[K];
27
- $null?: boolean;
28
- $notNull?: boolean;
29
- $not?: WhereParams<T> | AttributeOperators<T, K>;
30
- }
9
+ };
31
10
 
32
- export type WhereParams<T> = {
33
- [K in keyof T]?: T[K] | T[K][] | AttributeOperators<T, K>;
11
+ type WhereParams<T> = {
12
+ [K in keyof T]?: T[K];
34
13
  } &
35
- LogicOperators<T>;
14
+ BooleanWhere<T>;
36
15
 
37
16
  type Sortables<T> = {
38
17
  // check sortable
@@ -34,7 +34,7 @@ const migrationResolver = ({ name, path, context }) => {
34
34
  };
35
35
 
36
36
  const createUmzugProvider = db => {
37
- const migrationDir = path.join(strapi.dirs.app.root, 'database/migrations');
37
+ const migrationDir = path.join(strapi.dirs.root, 'database/migrations');
38
38
 
39
39
  fse.ensureDirSync(migrationDir);
40
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/database",
3
- "version": "4.2.0-beta.3",
3
+ "version": "4.2.1-alpha.0",
4
4
  "description": "Strapi's database layer",
5
5
  "homepage": "https://strapi.io",
6
6
  "bugs": {
@@ -39,8 +39,8 @@
39
39
  "umzug": "3.1.1"
40
40
  },
41
41
  "engines": {
42
- "node": ">=12.22.0 <=16.x.x",
42
+ "node": ">=14.19.1 <=16.x.x",
43
43
  "npm": ">=6.0.0"
44
44
  },
45
- "gitHead": "c4addbad6ecbc8ef7633bbba3806f3b0a2ae5f49"
45
+ "gitHead": "90bd3b9e294a69cd9538bde4e2e853e6de60f238"
46
46
  }