@directus/api 33.2.0 → 33.3.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.
@@ -411,6 +411,17 @@ export class AuthenticationService {
411
411
  const user = record;
412
412
  const provider = getAuthProvider(user.provider);
413
413
  await provider.logout(clone(user));
414
+ if (this.accountability) {
415
+ await this.activityService.createOne({
416
+ action: Action.LOGOUT,
417
+ user: user.id,
418
+ ip: this.accountability.ip,
419
+ user_agent: this.accountability.userAgent,
420
+ origin: this.accountability.origin,
421
+ collection: 'directus_users',
422
+ item: user.id,
423
+ });
424
+ }
414
425
  await this.knex.delete().from('directus_sessions').where('token', refreshToken);
415
426
  }
416
427
  }
@@ -1,5 +1,4 @@
1
1
  import { parseFilterFunctionPath } from '@directus/utils';
2
- import { omit } from 'lodash-es';
3
2
  import { parseArgs } from '../schema/parse-args.js';
4
3
  import { getQuery } from '../schema/parse-query.js';
5
4
  import { getAggregateQuery } from '../utils/aggregate-query.js';
@@ -42,10 +41,12 @@ export async function resolveQuery(gql, info) {
42
41
  if (args['id'])
43
42
  return result;
44
43
  if (query.group) {
45
- // for every entry in result add a group field based on query.group;
46
- const aggregateKeys = Object.keys(query.aggregate ?? {});
47
44
  result['map']((field) => {
48
- field['group'] = omit(field, aggregateKeys);
45
+ const groupValues = {};
46
+ for (const key of query.group) {
47
+ groupValues[key] = field[key];
48
+ }
49
+ field['group'] = groupValues;
49
50
  });
50
51
  }
51
52
  return result;
@@ -15,6 +15,9 @@ export async function getAggregateQuery(rawQuery, selections, schema, accountabi
15
15
  // filter out graphql pointers, like __typename
16
16
  if (aggregationGroup.name.value.startsWith('__'))
17
17
  continue;
18
+ // skip the 'group' field — it holds grouped values, not an aggregate function
19
+ if (aggregationGroup.name.value === 'group')
20
+ continue;
18
21
  const aggregateProperty = aggregationGroup.name.value;
19
22
  query.aggregate[aggregateProperty] =
20
23
  aggregationGroup.selectionSet?.selections
@@ -61,6 +61,9 @@ export class ServerService {
61
61
  if (this.accountability?.user) {
62
62
  info['mcp_enabled'] = toBoolean(env['MCP_ENABLED'] ?? true);
63
63
  info['ai_enabled'] = toBoolean(env['AI_ENABLED'] ?? true);
64
+ info['files'] = {
65
+ mimeTypeAllowList: env['FILES_MIME_TYPE_ALLOW_LIST'],
66
+ };
64
67
  if (env['RATE_LIMITER_ENABLED']) {
65
68
  info['rateLimit'] = {
66
69
  points: env['RATE_LIMITER_POINTS'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@directus/api",
3
- "version": "33.2.0",
3
+ "version": "33.3.1",
4
4
  "description": "Directus is a real-time API and App dashboard for managing SQL database content",
5
5
  "keywords": [
6
6
  "directus",
@@ -162,30 +162,30 @@
162
162
  "zod": "4.1.12",
163
163
  "zod-validation-error": "4.0.2",
164
164
  "@directus/ai": "1.1.0",
165
- "@directus/env": "5.5.2",
166
- "@directus/app": "15.2.0",
165
+ "@directus/app": "15.4.0",
166
+ "@directus/constants": "14.1.0",
167
+ "@directus/env": "5.5.3",
167
168
  "@directus/errors": "2.2.0",
168
- "@directus/extensions": "3.0.18",
169
- "@directus/extensions-registry": "3.0.18",
170
- "@directus/extensions-sdk": "17.0.8",
171
- "@directus/format-title": "12.1.1",
172
- "@directus/memory": "3.1.1",
173
- "@directus/pressure": "3.0.16",
169
+ "@directus/extensions": "3.0.19",
170
+ "@directus/extensions-registry": "3.0.19",
171
+ "@directus/extensions-sdk": "17.0.9",
172
+ "@directus/memory": "3.1.2",
174
173
  "@directus/schema": "13.0.5",
175
- "@directus/schema-builder": "0.0.13",
174
+ "@directus/format-title": "12.1.1",
175
+ "@directus/schema-builder": "0.0.14",
176
176
  "@directus/specs": "12.0.0",
177
+ "@directus/pressure": "3.0.17",
177
178
  "@directus/storage": "12.0.3",
178
- "@directus/storage-driver-azure": "12.0.16",
179
- "@directus/storage-driver-cloudinary": "12.0.16",
179
+ "@directus/storage-driver-azure": "12.0.17",
180
+ "@directus/storage-driver-cloudinary": "12.0.17",
181
+ "@directus/storage-driver-s3": "12.1.3",
180
182
  "@directus/storage-driver-local": "12.0.3",
181
- "@directus/constants": "14.0.0",
182
- "@directus/storage-driver-gcs": "12.0.16",
183
- "@directus/storage-driver-supabase": "3.0.16",
183
+ "@directus/storage-driver-supabase": "3.0.17",
184
184
  "@directus/system-data": "4.1.0",
185
- "@directus/utils": "13.2.1",
186
- "@directus/storage-driver-s3": "12.1.2",
187
- "@directus/validation": "2.0.16",
188
- "directus": "11.15.2"
185
+ "@directus/storage-driver-gcs": "12.0.17",
186
+ "@directus/utils": "13.2.2",
187
+ "directus": "11.15.4",
188
+ "@directus/validation": "2.0.17"
189
189
  },
190
190
  "devDependencies": {
191
191
  "@directus/tsconfig": "3.0.0",
@@ -228,8 +228,8 @@
228
228
  "knex-mock-client": "3.0.2",
229
229
  "typescript": "5.9.3",
230
230
  "vitest": "3.2.4",
231
- "@directus/schema-builder": "0.0.13",
232
- "@directus/types": "14.2.0"
231
+ "@directus/schema-builder": "0.0.14",
232
+ "@directus/types": "14.2.1"
233
233
  },
234
234
  "optionalDependencies": {
235
235
  "@keyv/redis": "3.0.1",