directus 9.14.3 → 9.14.5
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.
|
@@ -1023,7 +1023,7 @@ class GraphQLService {
|
|
|
1023
1023
|
* Directus' query structure which is then executed by the services.
|
|
1024
1024
|
*/
|
|
1025
1025
|
async resolveQuery(info) {
|
|
1026
|
-
var _a, _b, _c;
|
|
1026
|
+
var _a, _b, _c, _d;
|
|
1027
1027
|
let collection = info.fieldName;
|
|
1028
1028
|
if (this.scope === 'system')
|
|
1029
1029
|
collection = `directus_${collection}`;
|
|
@@ -1057,13 +1057,15 @@ class GraphQLService {
|
|
|
1057
1057
|
query.limit = 1;
|
|
1058
1058
|
}
|
|
1059
1059
|
// Transform count(a.b.c) into a.b.count(c)
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1060
|
+
if ((_c = query.fields) === null || _c === void 0 ? void 0 : _c.length) {
|
|
1061
|
+
for (let fieldIndex = 0; fieldIndex < query.fields.length; fieldIndex++) {
|
|
1062
|
+
if (query.fields[fieldIndex].includes('(') && query.fields[fieldIndex].includes(')')) {
|
|
1063
|
+
const functionName = query.fields[fieldIndex].split('(')[0];
|
|
1064
|
+
const columnNames = query.fields[fieldIndex].match(constants_2.REGEX_BETWEEN_PARENS)[1].split('.');
|
|
1065
|
+
if (columnNames.length > 1) {
|
|
1066
|
+
const column = columnNames.pop();
|
|
1067
|
+
query.fields[fieldIndex] = columnNames.join('.') + '.' + functionName + '(' + column + ')';
|
|
1068
|
+
}
|
|
1067
1069
|
}
|
|
1068
1070
|
}
|
|
1069
1071
|
}
|
|
@@ -1073,7 +1075,7 @@ class GraphQLService {
|
|
|
1073
1075
|
}
|
|
1074
1076
|
if (query.group) {
|
|
1075
1077
|
// for every entry in result add a group field based on query.group;
|
|
1076
|
-
const aggregateKeys = Object.keys((
|
|
1078
|
+
const aggregateKeys = Object.keys((_d = query.aggregate) !== null && _d !== void 0 ? _d : {});
|
|
1077
1079
|
result.map((field) => {
|
|
1078
1080
|
field.group = (0, lodash_1.omit)(field, aggregateKeys);
|
|
1079
1081
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "directus",
|
|
3
|
-
"version": "9.14.
|
|
3
|
+
"version": "9.14.5",
|
|
4
4
|
"license": "GPL-3.0-only",
|
|
5
5
|
"homepage": "https://github.com/directus/directus#readme",
|
|
6
6
|
"description": "Directus is a real-time API and App dashboard for managing SQL database content.",
|
|
@@ -66,16 +66,16 @@
|
|
|
66
66
|
],
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@aws-sdk/client-ses": "^3.107.0",
|
|
69
|
-
"@directus/app": "9.14.
|
|
70
|
-
"@directus/drive": "9.14.
|
|
71
|
-
"@directus/drive-azure": "9.14.
|
|
72
|
-
"@directus/drive-gcs": "9.14.
|
|
73
|
-
"@directus/drive-s3": "9.14.
|
|
69
|
+
"@directus/app": "9.14.5",
|
|
70
|
+
"@directus/drive": "9.14.5",
|
|
71
|
+
"@directus/drive-azure": "9.14.5",
|
|
72
|
+
"@directus/drive-gcs": "9.14.4",
|
|
73
|
+
"@directus/drive-s3": "9.14.5",
|
|
74
74
|
"@directus/extensions-sdk": "^9.14.1",
|
|
75
75
|
"@directus/format-title": "^9.15.0",
|
|
76
|
-
"@directus/schema": "9.14.
|
|
77
|
-
"@directus/shared": "9.14.
|
|
78
|
-
"@directus/specs": "9.14.
|
|
76
|
+
"@directus/schema": "9.14.5",
|
|
77
|
+
"@directus/shared": "9.14.5",
|
|
78
|
+
"@directus/specs": "9.14.5",
|
|
79
79
|
"@godaddy/terminus": "^4.10.2",
|
|
80
80
|
"@rollup/plugin-alias": "^3.1.9",
|
|
81
81
|
"@rollup/plugin-virtual": "^2.1.0",
|