/
use-system.ts
44 lines (40 loc) · 1.38 KB
/
use-system.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import api from '@/api';
import sdk from '@/sdk';
import { useExtensions } from '@/extensions';
import { useCollectionsStore } from '@/stores/collections';
import { useFieldsStore } from '@/stores/fields';
import { useFlowsStore } from '@/stores/flows';
import { useInsightsStore } from '@/stores/insights';
import { useLatencyStore } from '@/stores/latency';
import { useNotificationsStore } from '@/stores/notifications';
import { usePermissionsStore } from '@/stores/permissions';
import { usePresetsStore } from '@/stores/presets';
import { useRelationsStore } from '@/stores/relations';
import { useRequestsStore } from '@/stores/requests';
import { useServerStore } from '@/stores/server';
import { useSettingsStore } from '@/stores/settings';
import { useUserStore } from '@/stores/user';
import { API_INJECT, SDK_INJECT, EXTENSIONS_INJECT, STORES_INJECT } from '@directus/constants';
import { useAppStore } from '@directus/stores';
import { provide } from 'vue';
export function useSystem(): void {
provide(STORES_INJECT, {
useAppStore,
useCollectionsStore,
useFieldsStore,
useInsightsStore,
useLatencyStore,
useNotificationsStore,
usePermissionsStore,
usePresetsStore,
useRelationsStore,
useRequestsStore,
useServerStore,
useSettingsStore,
useUserStore,
useFlowsStore,
});
provide(API_INJECT, api);
provide(SDK_INJECT, sdk);
provide(EXTENSIONS_INJECT, useExtensions());
}