@directus/api 14.1.2 → 15.0.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/dist/app.js +3 -3
- package/dist/auth/drivers/oauth2.js +2 -3
- package/dist/auth/drivers/openid.js +2 -3
- package/dist/cli/commands/schema/apply.js +44 -33
- package/dist/cli/index.js +2 -2
- package/dist/database/index.d.ts +2 -1
- package/dist/database/index.js +2 -1
- package/dist/database/system-data/relations/relations.yaml +4 -0
- package/dist/emitter.d.ts +1 -0
- package/dist/emitter.js +2 -1
- package/dist/env.d.ts +1 -0
- package/dist/env.js +6 -0
- package/dist/extensions/lib/get-shared-deps-mapping.js +1 -1
- package/dist/extensions/lib/sandbox/register/route.d.ts +1 -0
- package/dist/extensions/manager.d.ts +5 -0
- package/dist/extensions/manager.js +42 -16
- package/dist/logger.d.ts +2 -1
- package/dist/logger.js +1 -0
- package/dist/middleware/rate-limiter-ip.js +14 -11
- package/dist/redis/create-redis.d.ts +7 -0
- package/dist/redis/create-redis.js +12 -0
- package/dist/redis/index.d.ts +2 -0
- package/dist/redis/index.js +2 -0
- package/dist/redis/use-redis.d.ts +16 -0
- package/dist/redis/use-redis.js +22 -0
- package/dist/server.d.ts +2 -0
- package/dist/services/extensions.js +1 -1
- package/dist/services/graphql/index.js +50 -15
- package/dist/services/payload.js +3 -3
- package/dist/services/server.js +2 -3
- package/dist/services/specifications.js +3 -3
- package/dist/services/users.js +6 -6
- package/dist/telemetry/index.d.ts +4 -0
- package/dist/telemetry/index.js +4 -0
- package/dist/telemetry/lib/get-report.d.ts +5 -0
- package/dist/telemetry/lib/get-report.js +42 -0
- package/dist/telemetry/lib/init-telemetry.d.ts +11 -0
- package/dist/telemetry/lib/init-telemetry.js +30 -0
- package/dist/telemetry/lib/send-report.d.ts +5 -0
- package/dist/telemetry/lib/send-report.js +23 -0
- package/dist/telemetry/lib/track.d.ts +10 -0
- package/dist/telemetry/lib/track.js +31 -0
- package/dist/telemetry/types/report.d.ts +58 -0
- package/dist/telemetry/types/report.js +1 -0
- package/dist/telemetry/utils/get-item-count.d.ts +26 -0
- package/dist/telemetry/utils/get-item-count.js +36 -0
- package/dist/telemetry/utils/get-random-wait-time.d.ts +5 -0
- package/dist/telemetry/utils/get-random-wait-time.js +5 -0
- package/dist/telemetry/utils/get-user-count.d.ts +7 -0
- package/dist/telemetry/utils/get-user-count.js +30 -0
- package/dist/telemetry/utils/get-user-item-count.d.ts +13 -0
- package/dist/telemetry/utils/get-user-item-count.js +18 -0
- package/dist/utils/apply-query.js +13 -2
- package/dist/utils/get-cache-key.js +1 -1
- package/dist/utils/get-ip-from-req.d.ts +1 -1
- package/dist/utils/get-ip-from-req.js +1 -1
- package/dist/utils/get-snapshot.js +1 -1
- package/dist/utils/get-versioned-hash.js +1 -1
- package/dist/utils/md.d.ts +1 -1
- package/dist/utils/md.js +3 -2
- package/dist/utils/validate-query.js +1 -0
- package/dist/utils/validate-snapshot.js +3 -3
- package/dist/websocket/controllers/base.d.ts +2 -0
- package/dist/websocket/controllers/graphql.d.ts +2 -0
- package/dist/websocket/controllers/graphql.js +1 -1
- package/dist/websocket/controllers/index.d.ts +2 -0
- package/dist/websocket/controllers/rest.d.ts +2 -0
- package/dist/websocket/types.d.ts +3 -1
- package/package.json +108 -109
- package/dist/utils/package.d.ts +0 -2
- package/dist/utils/package.js +0 -6
- package/dist/utils/telemetry.d.ts +0 -1
- package/dist/utils/telemetry.js +0 -23
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {} from 'knex';
|
|
2
|
+
import { toBoolean } from '../../utils/to-boolean.js';
|
|
3
|
+
export const getUserCount = async (db) => {
|
|
4
|
+
const counts = {
|
|
5
|
+
admin: 0,
|
|
6
|
+
app: 0,
|
|
7
|
+
api: 0,
|
|
8
|
+
};
|
|
9
|
+
const result = (await db
|
|
10
|
+
.count('directus_users.id', { as: 'count' })
|
|
11
|
+
.select('directus_roles.admin_access', 'directus_roles.app_access')
|
|
12
|
+
.from('directus_users')
|
|
13
|
+
.leftJoin('directus_roles', 'directus_users.role', '=', 'directus_roles.id')
|
|
14
|
+
.groupBy('directus_roles.admin_access', 'directus_roles.app_access'));
|
|
15
|
+
for (const record of result) {
|
|
16
|
+
const adminAccess = toBoolean(record.admin_access);
|
|
17
|
+
const appAccess = toBoolean(record.app_access);
|
|
18
|
+
const count = Number(record.count);
|
|
19
|
+
if (adminAccess) {
|
|
20
|
+
counts.admin = count;
|
|
21
|
+
}
|
|
22
|
+
else if (appAccess) {
|
|
23
|
+
counts.app = count;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
counts.api = count;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return counts;
|
|
30
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Knex } from 'knex';
|
|
2
|
+
export interface UserItemCount {
|
|
3
|
+
collections: number;
|
|
4
|
+
items: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Sum all passed values together. Meant to be used with .reduce()
|
|
8
|
+
*/
|
|
9
|
+
export declare const sum: (acc: number, val: number) => number;
|
|
10
|
+
/**
|
|
11
|
+
* Count all the items in the non-system tables
|
|
12
|
+
*/
|
|
13
|
+
export declare const getUserItemCount: (db: Knex) => Promise<UserItemCount>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {} from 'knex';
|
|
2
|
+
import { getSchema } from '../../utils/get-schema.js';
|
|
3
|
+
import { getItemCount } from './get-item-count.js';
|
|
4
|
+
/**
|
|
5
|
+
* Sum all passed values together. Meant to be used with .reduce()
|
|
6
|
+
*/
|
|
7
|
+
export const sum = (acc, val) => (acc += val);
|
|
8
|
+
/**
|
|
9
|
+
* Count all the items in the non-system tables
|
|
10
|
+
*/
|
|
11
|
+
export const getUserItemCount = async (db) => {
|
|
12
|
+
const schema = await getSchema({ database: db });
|
|
13
|
+
const userCollections = Object.keys(schema.collections).filter((collection) => collection.startsWith('directus_') === false);
|
|
14
|
+
const counts = await getItemCount(db, userCollections);
|
|
15
|
+
const collections = userCollections.length;
|
|
16
|
+
const items = Object.values(counts).reduce(sum, 0);
|
|
17
|
+
return { collections, items };
|
|
18
|
+
};
|
|
@@ -405,9 +405,12 @@ export function applyFilter(knex, schema, rootQuery, rootFilter, collection, ali
|
|
|
405
405
|
if (column.includes('(') && column.includes(')')) {
|
|
406
406
|
const functionName = column.split('(')[0];
|
|
407
407
|
const type = getOutputTypeForFunction(functionName);
|
|
408
|
-
if (['
|
|
408
|
+
if (['integer', 'float', 'decimal'].includes(type)) {
|
|
409
409
|
compareValue = Number(compareValue);
|
|
410
410
|
}
|
|
411
|
+
else if (type === 'bigInteger') {
|
|
412
|
+
compareValue = BigInt(compareValue);
|
|
413
|
+
}
|
|
411
414
|
}
|
|
412
415
|
// Cast filter value (compareValue) based on type of field being filtered against
|
|
413
416
|
const [collection, field] = key.split('.');
|
|
@@ -422,7 +425,7 @@ export function applyFilter(knex, schema, rootQuery, rootFilter, collection, ali
|
|
|
422
425
|
compareValue = helpers.date.parse(compareValue);
|
|
423
426
|
}
|
|
424
427
|
}
|
|
425
|
-
if (['
|
|
428
|
+
if (['integer', 'float', 'decimal'].includes(type)) {
|
|
426
429
|
if (Array.isArray(compareValue)) {
|
|
427
430
|
compareValue = compareValue.map((val) => Number(val));
|
|
428
431
|
}
|
|
@@ -430,6 +433,14 @@ export function applyFilter(knex, schema, rootQuery, rootFilter, collection, ali
|
|
|
430
433
|
compareValue = Number(compareValue);
|
|
431
434
|
}
|
|
432
435
|
}
|
|
436
|
+
if (type === 'bigInteger') {
|
|
437
|
+
if (Array.isArray(compareValue)) {
|
|
438
|
+
compareValue = compareValue.map((val) => BigInt(val));
|
|
439
|
+
}
|
|
440
|
+
else {
|
|
441
|
+
compareValue = BigInt(compareValue);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
433
444
|
}
|
|
434
445
|
if (operator === '_eq') {
|
|
435
446
|
dbQuery[logical].where(selectionRaw, '=', compareValue);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import hash from 'object-hash';
|
|
2
2
|
import url from 'url';
|
|
3
3
|
import { getGraphqlQueryAndVariables } from './get-graphql-query-and-variables.js';
|
|
4
|
-
import { version } from '
|
|
4
|
+
import { version } from 'directus/version';
|
|
5
5
|
export function getCacheKey(req) {
|
|
6
6
|
const path = url.parse(req.originalUrl).pathname;
|
|
7
7
|
const isGraphQl = path?.startsWith('/graphql');
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Request } from 'express';
|
|
2
|
-
export declare function getIPFromReq(req: Request): string;
|
|
2
|
+
export declare function getIPFromReq(req: Request): string | null;
|
|
@@ -13,5 +13,5 @@ export function getIPFromReq(req) {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
// IP addresses starting with ::ffff: are IPv4 addresses in IPv6 format. We can strip the prefix to get back to IPv4
|
|
16
|
-
return ip
|
|
16
|
+
return ip?.startsWith('::ffff:') ? ip.substring(7) : ip ?? null;
|
|
17
17
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { version } from 'directus/version';
|
|
1
2
|
import { fromPairs, isArray, isPlainObject, mapValues, omit, sortBy, toPairs } from 'lodash-es';
|
|
2
3
|
import getDatabase, { getDatabaseClient } from '../database/index.js';
|
|
3
4
|
import { CollectionsService } from '../services/collections.js';
|
|
4
5
|
import { FieldsService } from '../services/fields.js';
|
|
5
6
|
import { RelationsService } from '../services/relations.js';
|
|
6
7
|
import { getSchema } from './get-schema.js';
|
|
7
|
-
import { version } from './package.js';
|
|
8
8
|
import { sanitizeCollection, sanitizeField, sanitizeRelation } from './sanitize-schema.js';
|
|
9
9
|
export async function getSnapshot(options) {
|
|
10
10
|
const database = options?.database ?? getDatabase();
|
package/dist/utils/md.d.ts
CHANGED
package/dist/utils/md.js
CHANGED
|
@@ -3,6 +3,7 @@ import sanitizeHTML from 'sanitize-html';
|
|
|
3
3
|
/**
|
|
4
4
|
* Render and sanitize a markdown string
|
|
5
5
|
*/
|
|
6
|
-
export function md(
|
|
7
|
-
|
|
6
|
+
export function md(value) {
|
|
7
|
+
const markdown = marked.parse(value); /* Would only be a promise if used with async extensions */
|
|
8
|
+
return sanitizeHTML(markdown);
|
|
8
9
|
}
|
|
@@ -4,7 +4,7 @@ import { ALIAS_TYPES } from '../constants.js';
|
|
|
4
4
|
import { getDatabaseClient } from '../database/index.js';
|
|
5
5
|
import { InvalidPayloadError } from '@directus/errors';
|
|
6
6
|
import { DatabaseClients } from '../types/index.js';
|
|
7
|
-
import { version
|
|
7
|
+
import { version } from 'directus/version';
|
|
8
8
|
const snapshotJoiSchema = Joi.object({
|
|
9
9
|
version: Joi.number().valid(1).required(),
|
|
10
10
|
directus: Joi.string().required(),
|
|
@@ -51,9 +51,9 @@ export function validateSnapshot(snapshot, force = false) {
|
|
|
51
51
|
// Bypass checks when "force" option is enabled
|
|
52
52
|
if (force)
|
|
53
53
|
return;
|
|
54
|
-
if (snapshot.directus !==
|
|
54
|
+
if (snapshot.directus !== version) {
|
|
55
55
|
throw new InvalidPayloadError({
|
|
56
|
-
reason: `Provided snapshot's directus version ${snapshot.directus} does not match the current instance's version ${
|
|
56
|
+
reason: `Provided snapshot's directus version ${snapshot.directus} does not match the current instance's version ${version}. You can bypass this check by passing the "force" query parameter`,
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
if (!snapshot.vendor) {
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
/// <reference types="node" resolution-mode="require"/>
|
|
3
3
|
/// <reference types="node" resolution-mode="require"/>
|
|
4
4
|
/// <reference types="node" resolution-mode="require"/>
|
|
5
|
+
/// <reference types="node/http.js" />
|
|
6
|
+
/// <reference types="pino-http" />
|
|
5
7
|
import type { IncomingMessage, Server as httpServer } from 'http';
|
|
6
8
|
import type { ParsedUrlQuery } from 'querystring';
|
|
7
9
|
import type { RateLimiterAbstract } from 'rate-limiter-flexible';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node/http.js" />
|
|
3
|
+
/// <reference types="pino-http" />
|
|
2
4
|
import type { Server } from 'graphql-ws';
|
|
3
5
|
import type { Server as httpServer } from 'http';
|
|
4
6
|
import type { GraphQLSocket, UpgradeContext, WebSocketClient } from '../types.js';
|
|
@@ -37,7 +37,7 @@ export class GraphQLSubscriptionController extends SocketController {
|
|
|
37
37
|
send: (data) => new Promise((resolve, reject) => {
|
|
38
38
|
client.send(data, (err) => (err ? reject(err) : resolve()));
|
|
39
39
|
}),
|
|
40
|
-
close: (code, reason) => client.close(code, reason),
|
|
40
|
+
close: (code, reason) => client.close(code, reason), // for standard closures
|
|
41
41
|
onMessage: (cb) => {
|
|
42
42
|
client.on('parsed-message', async (message) => {
|
|
43
43
|
try {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node/http.js" />
|
|
3
|
+
/// <reference types="pino-http" />
|
|
2
4
|
import type { Server as httpServer } from 'http';
|
|
3
5
|
import { GraphQLSubscriptionController } from './graphql.js';
|
|
4
6
|
import { WebSocketController } from './rest.js';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node/http.js" />
|
|
3
|
+
/// <reference types="pino-http" />
|
|
2
4
|
import type { Server as httpServer } from 'http';
|
|
3
5
|
import { WebSocketMessage } from '../messages.js';
|
|
4
6
|
import SocketController from './base.js';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
/// <reference types="node" resolution-mode="require"/>
|
|
3
3
|
/// <reference types="node" resolution-mode="require"/>
|
|
4
|
+
/// <reference types="node/http.js" />
|
|
5
|
+
/// <reference types="pino-http" />
|
|
4
6
|
import type { Accountability, Query } from '@directus/types';
|
|
5
7
|
import type { IncomingMessage } from 'http';
|
|
6
8
|
import type internal from 'stream';
|
|
@@ -12,7 +14,7 @@ export type AuthenticationState = {
|
|
|
12
14
|
};
|
|
13
15
|
export type WebSocketClient = WebSocket & AuthenticationState & {
|
|
14
16
|
uid: string | number;
|
|
15
|
-
auth_timer: NodeJS.
|
|
17
|
+
auth_timer: NodeJS.Timeout | null;
|
|
16
18
|
};
|
|
17
19
|
export type UpgradeRequest = IncomingMessage & AuthenticationState;
|
|
18
20
|
export type SubscriptionEvent = 'create' | 'update' | 'delete';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@directus/api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0",
|
|
4
4
|
"description": "Directus is a real-time API and App dashboard for managing SQL database content",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"directus",
|
|
@@ -59,168 +59,167 @@
|
|
|
59
59
|
],
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@authenio/samlify-node-xmllint": "2.0.0",
|
|
62
|
-
"@aws-sdk/client-ses": "3.
|
|
62
|
+
"@aws-sdk/client-ses": "3.478.0",
|
|
63
63
|
"@directus/format-title": "10.1.0",
|
|
64
|
-
"@godaddy/terminus": "4.12.
|
|
65
|
-
"@rollup/plugin-alias": "5.
|
|
66
|
-
"@rollup/plugin-node-resolve": "15.
|
|
67
|
-
"@rollup/plugin-virtual": "3.0.
|
|
68
|
-
"argon2": "0.31.
|
|
69
|
-
"async": "3.2.
|
|
70
|
-
"axios": "1.
|
|
64
|
+
"@godaddy/terminus": "4.12.1",
|
|
65
|
+
"@rollup/plugin-alias": "5.1.0",
|
|
66
|
+
"@rollup/plugin-node-resolve": "15.2.3",
|
|
67
|
+
"@rollup/plugin-virtual": "3.0.2",
|
|
68
|
+
"argon2": "0.31.2",
|
|
69
|
+
"async": "3.2.5",
|
|
70
|
+
"axios": "1.6.2",
|
|
71
71
|
"busboy": "1.6.0",
|
|
72
72
|
"bytes": "3.1.2",
|
|
73
|
-
"camelcase": "
|
|
74
|
-
"chalk": "5.
|
|
73
|
+
"camelcase": "8.0.0",
|
|
74
|
+
"chalk": "5.3.0",
|
|
75
75
|
"chokidar": "3.5.3",
|
|
76
|
-
"commander": "
|
|
76
|
+
"commander": "11.1.0",
|
|
77
77
|
"content-disposition": "0.5.4",
|
|
78
78
|
"cookie-parser": "1.4.6",
|
|
79
79
|
"cors": "2.8.5",
|
|
80
|
-
"cron-parser": "4.
|
|
81
|
-
"date-fns": "
|
|
80
|
+
"cron-parser": "4.9.0",
|
|
81
|
+
"date-fns": "3.0.1",
|
|
82
82
|
"deep-diff": "1.0.2",
|
|
83
83
|
"destroy": "1.2.0",
|
|
84
|
-
"dotenv": "16.
|
|
84
|
+
"dotenv": "16.3.1",
|
|
85
85
|
"encodeurl": "1.0.2",
|
|
86
86
|
"eventemitter2": "6.4.9",
|
|
87
|
-
"execa": "
|
|
87
|
+
"execa": "8.0.1",
|
|
88
88
|
"exif-reader": "1.2.0",
|
|
89
89
|
"express": "4.18.2",
|
|
90
|
-
"flat": "
|
|
91
|
-
"fs-extra": "11.
|
|
90
|
+
"flat": "6.0.1",
|
|
91
|
+
"fs-extra": "11.2.0",
|
|
92
92
|
"glob-to-regexp": "0.4.1",
|
|
93
93
|
"graphql": "16.8.1",
|
|
94
94
|
"graphql-compose": "9.0.10",
|
|
95
|
-
"graphql-ws": "5.14.
|
|
96
|
-
"helmet": "7.
|
|
95
|
+
"graphql-ws": "5.14.2",
|
|
96
|
+
"helmet": "7.1.0",
|
|
97
97
|
"icc": "3.0.0",
|
|
98
|
-
"inquirer": "9.2.
|
|
98
|
+
"inquirer": "9.2.12",
|
|
99
99
|
"ioredis": "5.3.2",
|
|
100
100
|
"isolated-vm": "4.6.0",
|
|
101
|
-
"joi": "17.
|
|
101
|
+
"joi": "17.11.0",
|
|
102
102
|
"js-yaml": "4.1.0",
|
|
103
103
|
"js2xmlparser": "5.0.0",
|
|
104
104
|
"json2csv": "5.0.7",
|
|
105
|
-
"jsonwebtoken": "9.0.
|
|
106
|
-
"keyv": "4.5.
|
|
107
|
-
"knex": "
|
|
105
|
+
"jsonwebtoken": "9.0.2",
|
|
106
|
+
"keyv": "4.5.4",
|
|
107
|
+
"knex": "3.1.0",
|
|
108
108
|
"ldapjs": "2.3.3",
|
|
109
|
-
"liquidjs": "10.
|
|
109
|
+
"liquidjs": "10.10.0",
|
|
110
110
|
"lodash-es": "4.17.21",
|
|
111
|
-
"marked": "
|
|
111
|
+
"marked": "11.1.0",
|
|
112
112
|
"micromustache": "8.0.3",
|
|
113
113
|
"mime-types": "2.1.35",
|
|
114
|
-
"minimatch": "9.0.
|
|
114
|
+
"minimatch": "9.0.3",
|
|
115
115
|
"ms": "2.1.3",
|
|
116
|
-
"nanoid": "
|
|
116
|
+
"nanoid": "5.0.4",
|
|
117
117
|
"node-machine-id": "1.1.12",
|
|
118
118
|
"node-schedule": "2.1.1",
|
|
119
|
-
"nodemailer": "6.9.
|
|
119
|
+
"nodemailer": "6.9.7",
|
|
120
120
|
"object-hash": "3.0.0",
|
|
121
|
-
"openapi3-ts": "4.
|
|
122
|
-
"openid-client": "5.
|
|
123
|
-
"ora": "
|
|
121
|
+
"openapi3-ts": "4.2.0",
|
|
122
|
+
"openid-client": "5.6.1",
|
|
123
|
+
"ora": "7.0.1",
|
|
124
124
|
"otplib": "12.0.1",
|
|
125
|
-
"p-
|
|
125
|
+
"p-limit": "5.0.0",
|
|
126
|
+
"p-queue": "8.0.1",
|
|
126
127
|
"papaparse": "5.4.1",
|
|
127
|
-
"pino": "8.
|
|
128
|
-
"pino-http": "8.
|
|
128
|
+
"pino": "8.17.1",
|
|
129
|
+
"pino-http": "8.6.0",
|
|
129
130
|
"pino-http-print": "3.1.0",
|
|
130
|
-
"pino-pretty": "10.
|
|
131
|
+
"pino-pretty": "10.3.0",
|
|
131
132
|
"qs": "6.11.2",
|
|
132
|
-
"rate-limiter-flexible": "
|
|
133
|
-
"rollup": "
|
|
133
|
+
"rate-limiter-flexible": "4.0.0",
|
|
134
|
+
"rollup": "4.9.1",
|
|
134
135
|
"samlify": "2.8.10",
|
|
135
|
-
"sanitize-html": "2.
|
|
136
|
-
"sharp": "0.
|
|
136
|
+
"sanitize-html": "2.11.0",
|
|
137
|
+
"sharp": "0.33.1",
|
|
137
138
|
"snappy": "7.2.2",
|
|
138
|
-
"stream-json": "1.
|
|
139
|
-
"strip-bom-stream": "5.0.0",
|
|
139
|
+
"stream-json": "1.8.0",
|
|
140
140
|
"tinypool": "0.8.1",
|
|
141
|
-
"tsx": "4.
|
|
142
|
-
"uuid": "9.0.
|
|
141
|
+
"tsx": "4.7.0",
|
|
142
|
+
"uuid": "9.0.1",
|
|
143
143
|
"uuid-validate": "0.0.3",
|
|
144
144
|
"wellknown": "0.5.0",
|
|
145
|
-
"ws": "8.
|
|
145
|
+
"ws": "8.15.1",
|
|
146
146
|
"zod": "3.22.4",
|
|
147
|
-
"zod-validation-error": "1.0
|
|
148
|
-
"@directus/
|
|
149
|
-
"@directus/
|
|
150
|
-
"@directus/
|
|
151
|
-
"@directus/
|
|
152
|
-
"@directus/extensions-sdk": "10.
|
|
153
|
-
"@directus/pressure": "1.0.
|
|
154
|
-
"@directus/
|
|
155
|
-
"@directus/
|
|
156
|
-
"@directus/storage-driver-azure": "10.0.
|
|
157
|
-
"@directus/
|
|
158
|
-
"@directus/storage-driver-
|
|
159
|
-
"@directus/storage": "10.0.
|
|
160
|
-
"@directus/storage-driver-local": "10.0.
|
|
161
|
-
"@directus/
|
|
162
|
-
"@directus/
|
|
163
|
-
"@directus/
|
|
164
|
-
"@directus/
|
|
147
|
+
"zod-validation-error": "2.1.0",
|
|
148
|
+
"@directus/constants": "11.0.2",
|
|
149
|
+
"@directus/extensions": "0.2.1",
|
|
150
|
+
"@directus/errors": "0.2.1",
|
|
151
|
+
"@directus/app": "10.13.3",
|
|
152
|
+
"@directus/extensions-sdk": "10.3.0",
|
|
153
|
+
"@directus/pressure": "1.0.14",
|
|
154
|
+
"@directus/specs": "10.2.5",
|
|
155
|
+
"@directus/storage": "10.0.8",
|
|
156
|
+
"@directus/storage-driver-azure": "10.0.15",
|
|
157
|
+
"@directus/schema": "11.0.1",
|
|
158
|
+
"@directus/storage-driver-cloudinary": "10.0.15",
|
|
159
|
+
"@directus/storage-driver-gcs": "10.0.15",
|
|
160
|
+
"@directus/storage-driver-local": "10.0.15",
|
|
161
|
+
"@directus/validation": "0.0.10",
|
|
162
|
+
"@directus/utils": "11.0.3",
|
|
163
|
+
"@directus/storage-driver-s3": "10.0.15",
|
|
164
|
+
"@directus/storage-driver-supabase": "1.0.7",
|
|
165
|
+
"directus": "10.8.3"
|
|
165
166
|
},
|
|
166
167
|
"devDependencies": {
|
|
167
|
-
"@ngneat/falso": "
|
|
168
|
-
"@types/async": "3.2.
|
|
169
|
-
"@types/busboy": "1.5.
|
|
170
|
-
"@types/bytes": "3.1.
|
|
171
|
-
"@types/content-disposition": "0.5.
|
|
172
|
-
"@types/cookie-parser": "1.4.
|
|
173
|
-
"@types/cors": "2.8.
|
|
174
|
-
"@types/deep-diff": "1.0.
|
|
175
|
-
"@types/destroy": "1.0.
|
|
176
|
-
"@types/encodeurl": "1.0.
|
|
168
|
+
"@ngneat/falso": "7.1.1",
|
|
169
|
+
"@types/async": "3.2.24",
|
|
170
|
+
"@types/busboy": "1.5.3",
|
|
171
|
+
"@types/bytes": "3.1.4",
|
|
172
|
+
"@types/content-disposition": "0.5.8",
|
|
173
|
+
"@types/cookie-parser": "1.4.6",
|
|
174
|
+
"@types/cors": "2.8.17",
|
|
175
|
+
"@types/deep-diff": "1.0.5",
|
|
176
|
+
"@types/destroy": "1.0.3",
|
|
177
|
+
"@types/encodeurl": "1.0.2",
|
|
177
178
|
"@types/exif-reader": "1.0.0",
|
|
178
|
-
"@types/express": "4.17.
|
|
179
|
-
"@types/express-serve-static-core": "4.17.
|
|
180
|
-
"@types/
|
|
181
|
-
"@types/
|
|
182
|
-
"@types/
|
|
183
|
-
"@types/
|
|
184
|
-
"@types/
|
|
185
|
-
"@types/
|
|
186
|
-
"@types/jsonwebtoken": "9.0.2",
|
|
179
|
+
"@types/express": "4.17.21",
|
|
180
|
+
"@types/express-serve-static-core": "4.17.41",
|
|
181
|
+
"@types/fs-extra": "11.0.4",
|
|
182
|
+
"@types/glob-to-regexp": "0.4.4",
|
|
183
|
+
"@types/inquirer": "9.0.7",
|
|
184
|
+
"@types/js-yaml": "4.0.9",
|
|
185
|
+
"@types/json2csv": "5.0.7",
|
|
186
|
+
"@types/jsonwebtoken": "9.0.5",
|
|
187
187
|
"@types/ldapjs": "2.2.5",
|
|
188
|
-
"@types/lodash-es": "4.17.
|
|
189
|
-
"@types/
|
|
190
|
-
"@types/
|
|
191
|
-
"@types/
|
|
192
|
-
"@types/node": "
|
|
193
|
-
"@types/
|
|
194
|
-
"@types/
|
|
195
|
-
"@types/
|
|
196
|
-
"@types/
|
|
197
|
-
"@types/
|
|
198
|
-
"@types/
|
|
199
|
-
"@types/
|
|
200
|
-
"@types/
|
|
201
|
-
"@types/uuid": "
|
|
202
|
-
"@types/
|
|
203
|
-
"@types/
|
|
204
|
-
"@
|
|
205
|
-
"@vitest/coverage-v8": "0.34.6",
|
|
188
|
+
"@types/lodash-es": "4.17.12",
|
|
189
|
+
"@types/mime-types": "2.1.4",
|
|
190
|
+
"@types/ms": "0.7.34",
|
|
191
|
+
"@types/node": "18.19.3",
|
|
192
|
+
"@types/node-schedule": "2.1.5",
|
|
193
|
+
"@types/nodemailer": "6.4.14",
|
|
194
|
+
"@types/object-hash": "3.0.6",
|
|
195
|
+
"@types/papaparse": "5.3.14",
|
|
196
|
+
"@types/qs": "6.9.10",
|
|
197
|
+
"@types/sanitize-html": "2.9.5",
|
|
198
|
+
"@types/stream-json": "1.7.7",
|
|
199
|
+
"@types/supertest": "2.0.16",
|
|
200
|
+
"@types/uuid": "9.0.7",
|
|
201
|
+
"@types/uuid-validate": "0.0.3",
|
|
202
|
+
"@types/wellknown": "0.5.8",
|
|
203
|
+
"@types/ws": "8.5.10",
|
|
204
|
+
"@vitest/coverage-v8": "1.1.0",
|
|
206
205
|
"copyfiles": "2.4.1",
|
|
207
206
|
"form-data": "4.0.0",
|
|
208
|
-
"knex-mock-client": "2.0.
|
|
207
|
+
"knex-mock-client": "2.0.1",
|
|
209
208
|
"supertest": "6.3.3",
|
|
210
|
-
"typescript": "5.
|
|
211
|
-
"vitest": "
|
|
212
|
-
"@directus/random": "0.2.3",
|
|
209
|
+
"typescript": "5.3.3",
|
|
210
|
+
"vitest": "1.1.0",
|
|
213
211
|
"@directus/tsconfig": "1.0.1",
|
|
214
|
-
"@directus/types": "11.0.
|
|
212
|
+
"@directus/types": "11.0.3"
|
|
215
213
|
},
|
|
216
214
|
"optionalDependencies": {
|
|
217
|
-
"@keyv/redis": "2.
|
|
215
|
+
"@keyv/redis": "2.8.1",
|
|
218
216
|
"mysql": "2.18.1",
|
|
219
217
|
"nodemailer-mailgun-transport": "2.1.5",
|
|
220
218
|
"nodemailer-sendgrid": "1.0.3",
|
|
221
|
-
"
|
|
219
|
+
"oracledb": "6.2.0",
|
|
220
|
+
"pg": "8.11.3",
|
|
222
221
|
"sqlite3": "5.1.6",
|
|
223
|
-
"tedious": "16.1
|
|
222
|
+
"tedious": "16.6.1"
|
|
224
223
|
},
|
|
225
224
|
"engines": {
|
|
226
225
|
"node": ">=18.0.0"
|
package/dist/utils/package.d.ts
DELETED
package/dist/utils/package.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from 'node:fs';
|
|
2
|
-
import { dirname, resolve } from 'node:path';
|
|
3
|
-
import { fileURLToPath } from 'node:url';
|
|
4
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
5
|
-
const { name, version } = JSON.parse(readFileSync(resolve(__dirname, '../../package.json'), 'utf8'));
|
|
6
|
-
export { name, version };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function collectTelemetry(): Promise<void>;
|
package/dist/utils/telemetry.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import mid from 'node-machine-id';
|
|
2
|
-
import env from '../env.js';
|
|
3
|
-
import logger from '../logger.js';
|
|
4
|
-
import { version } from './package.js';
|
|
5
|
-
export async function collectTelemetry() {
|
|
6
|
-
const axios = (await import('axios')).default;
|
|
7
|
-
if (env['TELEMETRY'] !== false) {
|
|
8
|
-
try {
|
|
9
|
-
await axios.post('https://telemetry.directus.io/', {
|
|
10
|
-
version: version,
|
|
11
|
-
public_url: env['PUBLIC_URL'],
|
|
12
|
-
project_id: env['KEY'],
|
|
13
|
-
machine_id: await mid.machineId(),
|
|
14
|
-
db_client: env['DB_CLIENT'],
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
catch (err) {
|
|
18
|
-
if (env['NODE_ENV'] === 'development') {
|
|
19
|
-
logger.error(err);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|