@strapi/database 4.2.0-beta.4 → 4.2.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 +5 -26
- package/lib/migrations/index.js +1 -1
- package/package.json +2 -2
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
|
|
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
|
-
|
|
33
|
-
[K in keyof T]?: T[K]
|
|
11
|
+
type WhereParams<T> = {
|
|
12
|
+
[K in keyof T]?: T[K];
|
|
34
13
|
} &
|
|
35
|
-
|
|
14
|
+
BooleanWhere<T>;
|
|
36
15
|
|
|
37
16
|
type Sortables<T> = {
|
|
38
17
|
// check sortable
|
package/lib/migrations/index.js
CHANGED
|
@@ -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.
|
|
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
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "Strapi's database layer",
|
|
5
5
|
"homepage": "https://strapi.io",
|
|
6
6
|
"bugs": {
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"node": ">=14.19.1 <=16.x.x",
|
|
43
43
|
"npm": ">=6.0.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "12c8ee3b2d95fe417de4d939db0311a0513bd8da"
|
|
46
46
|
}
|