mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 04:26:23 +08:00
ec140da0d9
fix AF-1850, AF-1883
36 lines
978 B
TypeScript
36 lines
978 B
TypeScript
export {
|
|
GlobalCache,
|
|
GlobalSessionState,
|
|
GlobalState,
|
|
} from './providers/global';
|
|
export {
|
|
GlobalCacheService,
|
|
GlobalSessionStateService,
|
|
GlobalStateService,
|
|
} from './services/global';
|
|
|
|
import type { Framework } from '../../framework';
|
|
import { MemoryMemento } from '../../storage';
|
|
import {
|
|
GlobalCache,
|
|
GlobalSessionState,
|
|
GlobalState,
|
|
} from './providers/global';
|
|
import {
|
|
GlobalCacheService,
|
|
GlobalSessionStateService,
|
|
GlobalStateService,
|
|
} from './services/global';
|
|
|
|
export const configureGlobalStorageModule = (framework: Framework) => {
|
|
framework.service(GlobalStateService, [GlobalState]);
|
|
framework.service(GlobalCacheService, [GlobalCache]);
|
|
framework.service(GlobalSessionStateService, [GlobalSessionState]);
|
|
};
|
|
|
|
export const configureTestingGlobalStorage = (framework: Framework) => {
|
|
framework.impl(GlobalCache, MemoryMemento);
|
|
framework.impl(GlobalState, MemoryMemento);
|
|
framework.impl(GlobalSessionState, MemoryMemento);
|
|
};
|