MCPcopy
hub / github.com/directus/directus / loadExtensions

Function loadExtensions

api/src/cli/load-extensions.ts:6–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4import { useLogger } from '../logger/index.js';
5
6export const loadExtensions = async () => {
7 const env = useEnv();
8 const logger = useLogger();
9
10 if (!('DB_CLIENT' in env)) return;
11
12 const installed = await isInstalled();
13
14 if (!installed) return;
15
16 const migrationsValid = await validateMigrations();
17
18 if (!migrationsValid) {
19 logger.info('Skipping CLI extensions initialization due to outstanding migrations.');
20 return;
21 }
22
23 const extensionManager = getExtensionManager();
24 await extensionManager.initialize({ schedule: false, watch: false });
25};

Callers

nothing calls this directly

Calls 6

useEnvFunction · 0.90
useLoggerFunction · 0.85
isInstalledFunction · 0.85
validateMigrationsFunction · 0.85
getExtensionManagerFunction · 0.85
initializeMethod · 0.45

Tested by

no test coverage detected