index.ts 462 B

123456789101112131415161718192021
  1. import type Crowi from '~/server/crowi';
  2. import { ImportService } from './import';
  3. let instance: ImportService;
  4. export const initializeImportService = (crowi: Crowi): void => {
  5. if (instance == null) {
  6. instance = new ImportService(crowi);
  7. }
  8. };
  9. export const getImportService = (): ImportService => {
  10. if (instance == null) {
  11. throw new Error('ImportService has not been initialized');
  12. }
  13. return instance;
  14. };
  15. export * from './import-settings';