-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathindex.js
57 lines (50 loc) · 3.85 KB
/
index.js
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
45
46
47
48
49
50
51
52
53
54
55
56
57
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';
import * as learningContentConversionService from '../../../../../lib/domain/services/learning-content/learning-content-conversion-service.js';
import * as learningContentRepository from '../../../../shared/infrastructure/repositories/learning-content-repository.js';
import { adminMemberRepository } from '../../../../shared/infrastructure/repositories/admin-member.repository.js';
import * as organizationRepository from '../../../../shared/infrastructure/repositories/organization-repository.js';
import { injectDependencies } from '../../../../shared/infrastructure/utils/dependency-injection.js';
import { importNamedExportsFromDirectory } from '../../../../shared/infrastructure/utils/import-named-exports-from-directory.js';
import * as targetProfileRepository from '../../../target-profile/infrastructure/repositories/target-profile-repository.js';
import * as organizationsToAttachToTargetProfileRepository from '../../infrastructure/repositories/organizations-to-attach-to-target-profile-repository.js';
import * as targetProfileAdministrationRepository from '../../infrastructure/repositories/target-profile-administration-repository.js';
import * as targetProfileBondRepository from '../../infrastructure/repositories/target-profile-bond-repository.js';
import * as targetProfileForSpecifierRepository from '../../infrastructure/repositories/target-profile-for-specifier-repository.js';
import * as targetProfileForUpdateRepository from '../../infrastructure/repositories/target-profile-for-update-repository.js';
import * as targetProfileSummaryForAdminRepository from '../../infrastructure/repositories/target-profile-summary-for-admin-repository.js';
/**
* @typedef {import('../../infrastructure/repositories/')} AdminMemberRepository
* @typedef {import('../../../../../lib/domain/services/learning-content/learning-content-conversion-service.js')} LearningContentConversionService
* @typedef {import('../../../../shared/infrastructure/repositories/learning-content-repository.js')} LearningContentRepository
* @typedef {import('../../../../shared/infrastructure/repositories/organization-repository.js')} OrganizationRepository
* @typedef {import('../../infrastructure/repositories/organizations-to-attach-to-target-profile-repository.js')} OrganizationsToAttachToTargetProfileRepository
* @typedef {import('../../infrastructure/repositories/target-profile-administration-repository.js')} TargetProfileAdministrationRepository
* @typedef {import('../../infrastructure/repositories/target-profile-bond-repository.js')} TargetProfileBondRepository
* @typedef {import('../../infrastructure/repositories/target-profile-for-specifier-repository.js')} TargetProfileForSpecifierRepository
* @typedef {import('../../infrastructure/repositories/target-profile-for-update-repository.js')} TargetProfileForUpdateRepository
* @typedef {import('../../../../../lib/infrastructure/repositories/target-profile-repository.js')} TargetProfileRepository
* @typedef {import('../../infrastructure/repositories/target-profile-summary-for-admin-repository.js')} TargetProfileSummaryForAdminRepository
*/
const dependencies = {
adminMemberRepository,
learningContentConversionService,
learningContentRepository,
organizationRepository,
organizationsToAttachToTargetProfileRepository,
targetProfileAdministrationRepository,
targetProfileBondRepository,
targetProfileForSpecifierRepository,
targetProfileForUpdateRepository,
targetProfileRepository,
targetProfileSummaryForAdminRepository,
};
const path = dirname(fileURLToPath(import.meta.url));
const usecasesWithoutInjectedDependencies = {
...(await importNamedExportsFromDirectory({
path: join(path, './'),
ignoredFileNames: ['index.js'],
})),
};
const usecases = injectDependencies(usecasesWithoutInjectedDependencies, dependencies);
export { usecases };