Skip to content

Commit

Permalink
[TECH] 🚚 Déplacement de deux knowledge repositories vers src
Browse files Browse the repository at this point in the history
  • Loading branch information
pix-service-auto-merge authored Jan 10, 2025
2 parents b71a251 + 38f4e3e commit 060f363
Show file tree
Hide file tree
Showing 29 changed files with 55 additions and 55 deletions.
2 changes: 1 addition & 1 deletion api/lib/domain/events/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import * as assessmentRepository from '../../../src/shared/infrastructure/reposi
import * as assessmentResultRepository from '../../../src/shared/infrastructure/repositories/assessment-result-repository.js';
import * as challengeRepository from '../../../src/shared/infrastructure/repositories/challenge-repository.js';
import * as competenceRepository from '../../../src/shared/infrastructure/repositories/competence-repository.js';
import * as knowledgeElementRepository from '../../../src/shared/infrastructure/repositories/knowledge-element-repository.js';
import * as organizationRepository from '../../../src/shared/infrastructure/repositories/organization-repository.js';
import * as skillRepository from '../../../src/shared/infrastructure/repositories/skill-repository.js';
import { injectDefaults } from '../../../src/shared/infrastructure/utils/dependency-injection.js';
Expand All @@ -38,7 +39,6 @@ import * as badgeAcquisitionRepository from '../../infrastructure/repositories/b
import * as campaignRepository from '../../infrastructure/repositories/campaign-repository.js';
import * as complementaryCertificationCourseResultRepository from '../../infrastructure/repositories/complementary-certification-course-result-repository.js';
import * as complementaryCertificationScoringCriteriaRepository from '../../infrastructure/repositories/complementary-certification-scoring-criteria-repository.js';
import * as knowledgeElementRepository from '../../infrastructure/repositories/knowledge-element-repository.js';
import * as targetProfileRepository from '../../infrastructure/repositories/target-profile-repository.js';
import { handleCertificationRescoring } from './handle-certification-rescoring.js';
import { handleComplementaryCertificationsScoring } from './handle-complementary-certifications-scoring.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { Challenge } from '../../../src/shared/domain/models/Challenge.js';
import { KnowledgeElement } from '../../../src/shared/domain/models/KnowledgeElement.js';
import * as answerRepository from '../../../src/shared/infrastructure/repositories/answer-repository.js';
import * as challengeRepository from '../../../src/shared/infrastructure/repositories/challenge-repository.js';
import * as knowledgeElementRepository from '../../../src/shared/infrastructure/repositories/knowledge-element-repository.js';
import * as certifiableProfileForLearningContentRepository from '../../infrastructure/repositories/certifiable-profile-for-learning-content-repository.js';
import * as knowledgeElementRepository from '../../infrastructure/repositories/knowledge-element-repository.js';
import * as learningContentRepository from '../../infrastructure/repositories/learning-content-repository.js';

const pickCertificationChallenges = async function (
Expand Down
2 changes: 1 addition & 1 deletion api/lib/domain/usecases/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ import * as assessmentResultRepository from '../../../src/shared/infrastructure/
import * as challengeRepository from '../../../src/shared/infrastructure/repositories/challenge-repository.js';
import * as competenceRepository from '../../../src/shared/infrastructure/repositories/competence-repository.js';
import * as courseRepository from '../../../src/shared/infrastructure/repositories/course-repository.js';
import * as knowledgeElementRepository from '../../../src/shared/infrastructure/repositories/knowledge-element-repository.js';
import * as organizationLearnerRepository from '../../../src/shared/infrastructure/repositories/organization-learner-repository.js';
import * as organizationRepository from '../../../src/shared/infrastructure/repositories/organization-repository.js';
import * as skillRepository from '../../../src/shared/infrastructure/repositories/skill-repository.js';
Expand Down Expand Up @@ -136,7 +137,6 @@ import * as flashAssessmentResultRepository from '../../infrastructure/repositor
import * as frameworkRepository from '../../infrastructure/repositories/framework-repository.js';
import { repositories } from '../../infrastructure/repositories/index.js';
import { certificationCompletedJobRepository } from '../../infrastructure/repositories/jobs/certification-completed-job-repository.js';
import * as knowledgeElementRepository from '../../infrastructure/repositories/knowledge-element-repository.js';
import * as learningContentRepository from '../../infrastructure/repositories/learning-content-repository.js';
import * as organizationMemberIdentityRepository from '../../infrastructure/repositories/organization-member-identity-repository.js';
import * as organizationTagRepository from '../../infrastructure/repositories/organization-tag-repository.js';
Expand Down
2 changes: 1 addition & 1 deletion api/lib/domain/usecases/stages/handle-stage-acquisition.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import * as defaultGetNewAcquiredStagesService from '../../../../src/evaluation/
import * as defaultStageAcquisitionRepository from '../../../../src/evaluation/infrastructure/repositories/stage-acquisition-repository.js';
import * as defaultStageRepository from '../../../../src/evaluation/infrastructure/repositories/stage-repository.js';
import * as defaultCampaignParticipationRepository from '../../../../src/prescription/campaign-participation/infrastructure/repositories/campaign-participation-repository.js';
import * as defaultKnowledgeElementRepositoryRepository from '../../../../src/shared/infrastructure/repositories/knowledge-element-repository.js';
import * as defaultSkillRepository from '../../../../src/shared/infrastructure/repositories/skill-repository.js';
import * as defaultCampaignRepository from '../../../infrastructure/repositories/campaign-repository.js';
import * as defaultCampaignSkillRepository from '../../../infrastructure/repositories/campaign-skill-repository.js';
import * as defaultKnowledgeElementRepositoryRepository from '../../../infrastructure/repositories/knowledge-element-repository.js';
import * as defaultGetMasteryPercentageService from '../../services/get-mastery-percentage-service.js';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import _ from 'lodash';

import { knex } from '../../../db/knex-database-connection.js';
import { CertifiableProfileForLearningContent } from '../../../src/shared/domain/models/CertifiableProfileForLearningContent.js';
import * as knowledgeElementRepository from './knowledge-element-repository.js';
import * as knowledgeElementRepository from '../../../src/shared/infrastructure/repositories/knowledge-element-repository.js';

const get = async function ({ id, profileDate, learningContent }) {
const knowledgeElements = await knowledgeElementRepository.findUniqByUserId({ userId: id, limitDate: profileDate });
Expand Down
2 changes: 1 addition & 1 deletion api/scripts/prod/compute-participation-results.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as dotenv from 'dotenv';

dotenv.config({ path: `${__dirname}/../../.env` });
import * as campaignRepository from '../../lib/infrastructure/repositories/campaign-repository.js';
import * as knowlegeElementSnapshotRepository from '../../lib/infrastructure/repositories/knowledge-element-snapshot-repository.js';
import * as knowlegeElementSnapshotRepository from '../../src/prescription/campaign/infrastructure/repositories/knowledge-element-snapshot-repository.js';
import { ParticipantResultsShared } from '../../src/prescription/campaign-participation/domain/models/ParticipantResultsShared.js';
import { CampaignParticipationStatuses } from '../../src/prescription/shared/domain/constants.js';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import * as url from 'node:url';
import yargs from 'yargs';

import { disconnect, knex } from '../../db/knex-database-connection.js';
import * as knowledgeElementRepository from '../../lib/infrastructure/repositories/knowledge-element-repository.js';
import * as knowledgeElementSnapshotRepository from '../../lib/infrastructure/repositories/knowledge-element-snapshot-repository.js';
import * as knowledgeElementSnapshotRepository from '../../src/prescription/campaign/infrastructure/repositories/knowledge-element-snapshot-repository.js';
import { AlreadyExistingEntityError } from '../../src/shared/domain/errors.js';
import * as knowledgeElementRepository from '../../src/shared/infrastructure/repositories/knowledge-element-repository.js';
import { PromiseUtils } from '../../src/shared/infrastructure/utils/promise-utils.js';

const DEFAULT_MAX_SNAPSHOT_COUNT = 5000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { LOCALE } from '../../../../shared/domain/constants.js';

const { FRENCH_SPOKEN } = LOCALE;
import { knex } from '../../../../../db/knex-database-connection.js';
import * as knowledgeElementRepository from '../../../../../lib/infrastructure/repositories/knowledge-element-repository.js';
import { NotFoundError } from '../../../../shared/domain/errors.js';
import {
CertifiedArea,
Expand All @@ -15,6 +14,7 @@ import {
} from '../../../../shared/domain/read-models/CertifiedProfile.js';
import * as areaRepository from '../../../../shared/infrastructure/repositories/area-repository.js';
import * as competenceRepository from '../../../../shared/infrastructure/repositories/competence-repository.js';
import * as knowledgeElementRepository from '../../../../shared/infrastructure/repositories/knowledge-element-repository.js';
import * as skillRepository from '../../../../shared/infrastructure/repositories/skill-repository.js';
import * as tubeRepository from '../../../../shared/infrastructure/repositories/tube-repository.js';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import _ from 'lodash';

import * as badgeForCalculationRepository from '../../../../../lib/infrastructure/repositories/badge-for-calculation-repository.js';
import * as certifiableBadgeAcquisitionRepository from '../../../../../lib/infrastructure/repositories/certifiable-badge-acquisition-repository.js';
import * as knowledgeElementRepository from '../../../../../lib/infrastructure/repositories/knowledge-element-repository.js';
import * as knowledgeElementRepository from '../../../../shared/infrastructure/repositories/knowledge-element-repository.js';
import { PromiseUtils } from '../../../../shared/infrastructure/utils/promise-utils.js';

const findStillValidBadgeAcquisitions = async function ({
Expand Down
2 changes: 1 addition & 1 deletion api/src/devcomp/domain/usecases/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';

import * as campaignRepository from '../../../../lib/infrastructure/repositories/campaign-repository.js';
import * as knowledgeElementRepository from '../../../../lib/infrastructure/repositories/knowledge-element-repository.js';
import * as targetProfileRepository from '../../../../lib/infrastructure/repositories/target-profile-repository.js';
import * as targetProfileTrainingRepository from '../../../../lib/infrastructure/repositories/target-profile-training-repository.js';
import * as userRepository from '../../../identity-access-management/infrastructure/repositories/user.repository.js';
import * as campaignParticipationRepository from '../../../prescription/campaign-participation/infrastructure/repositories/campaign-participation-repository.js';
import * as knowledgeElementRepository from '../../../shared/infrastructure/repositories/knowledge-element-repository.js';
import * as skillRepository from '../../../shared/infrastructure/repositories/skill-repository.js';
import { injectDependencies } from '../../../shared/infrastructure/utils/dependency-injection.js';
import { importNamedExportsFromDirectory } from '../../../shared/infrastructure/utils/import-named-exports-from-directory.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import _ from 'lodash';

import * as knowledgeElementRepository from '../../../../lib/infrastructure/repositories/knowledge-element-repository.js';
import { LOCALE } from '../../../shared/domain/constants.js';
import { NotFoundError } from '../../../shared/domain/errors.js';
import * as knowledgeElementRepository from '../../../shared/infrastructure/repositories/knowledge-element-repository.js';
import { LearningContentRepository } from '../../../shared/infrastructure/repositories/learning-content-repository.js';
import * as skillRepository from '../../../shared/infrastructure/repositories/skill-repository.js';
import * as paginateModule from '../../../shared/infrastructure/utils/paginate.js';
Expand Down
2 changes: 1 addition & 1 deletion api/src/evaluation/domain/services/get-competence-level.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as knowledgeElementRepository from '../../../../lib/infrastructure/repositories/knowledge-element-repository.js';
import * as knowledgeElementRepository from '../../../shared/infrastructure/repositories/knowledge-element-repository.js';
import * as scoringService from './scoring/scoring-service.js';

const getCompetenceLevel = async function ({
Expand Down
6 changes: 3 additions & 3 deletions api/src/evaluation/domain/usecases/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';

import * as campaignRepository from '../../../../lib/infrastructure/repositories/campaign-repository.js';
import * as knowledgeElementRepository from '../../../../lib/infrastructure/repositories/knowledge-element-repository.js';
import * as targetProfileRepository from '../../../../lib/infrastructure/repositories/target-profile-repository.js';
import * as campaignParticipationRepository from '../../../../src/prescription/campaign-participation/infrastructure/repositories/campaign-participation-repository.js';
import * as challengeRepository from '../../../../src/shared/infrastructure/repositories/challenge-repository.js';
import * as campaignParticipationRepository from '../../../prescription/campaign-participation/infrastructure/repositories/campaign-participation-repository.js';
import * as targetProfileAdministrationRepository from '../../../prescription/target-profile/infrastructure/repositories/target-profile-administration-repository.js';
import * as answerRepository from '../../../shared/infrastructure/repositories/answer-repository.js';
import * as areaRepository from '../../../shared/infrastructure/repositories/area-repository.js';
import * as assessmentRepository from '../../../shared/infrastructure/repositories/assessment-repository.js';
import * as challengeRepository from '../../../shared/infrastructure/repositories/challenge-repository.js';
import * as competenceRepository from '../../../shared/infrastructure/repositories/competence-repository.js';
import * as knowledgeElementRepository from '../../../shared/infrastructure/repositories/knowledge-element-repository.js';
import * as skillRepository from '../../../shared/infrastructure/repositories/skill-repository.js';
import { injectDependencies } from '../../../shared/infrastructure/utils/dependency-injection.js';
import { importNamedExportsFromDirectory } from '../../../shared/infrastructure/utils/import-named-exports-from-directory.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ import { fileURLToPath } from 'node:url';
import * as badgeAcquisitionRepository from '../../../../../lib/infrastructure/repositories/badge-acquisition-repository.js';
import * as badgeForCalculationRepository from '../../../../../lib/infrastructure/repositories/badge-for-calculation-repository.js';
import * as campaignRepository from '../../../../../lib/infrastructure/repositories/campaign-repository.js';
import * as knowledgeElementRepository from '../../../../../lib/infrastructure/repositories/knowledge-element-repository.js';
import * as learningContentRepository from '../../../../../lib/infrastructure/repositories/learning-content-repository.js';
import * as targetProfileRepository from '../../../../../lib/infrastructure/repositories/target-profile-repository.js';
import * as stageCollectionRepository from '../../../../../lib/infrastructure/repositories/user-campaign-results/stage-collection-repository.js';
import * as badgeRepository from '../../../../../src/evaluation/infrastructure/repositories/badge-repository.js';
import * as tutorialRepository from '../../../../devcomp/infrastructure/repositories/tutorial-repository.js';
import * as compareStagesAndAcquiredStages from '../../../../evaluation/domain/services/stages/stage-and-stage-acquisition-comparison-service.js';
import * as badgeRepository from '../../../../evaluation/infrastructure/repositories/badge-repository.js';
import * as competenceEvaluationRepository from '../../../../evaluation/infrastructure/repositories/competence-evaluation-repository.js';
import * as stageAcquisitionRepository from '../../../../evaluation/infrastructure/repositories/stage-acquisition-repository.js';
import * as stageRepository from '../../../../evaluation/infrastructure/repositories/stage-repository.js';
Expand All @@ -20,6 +19,7 @@ import { config } from '../../../../shared/config.js';
import * as areaRepository from '../../../../shared/infrastructure/repositories/area-repository.js';
import * as assessmentRepository from '../../../../shared/infrastructure/repositories/assessment-repository.js';
import * as competenceRepository from '../../../../shared/infrastructure/repositories/competence-repository.js';
import * as knowledgeElementRepository from '../../../../shared/infrastructure/repositories/knowledge-element-repository.js';
import * as organizationLearnerRepository from '../../../../shared/infrastructure/repositories/organization-learner-repository.js';
import * as organizationRepository from '../../../../shared/infrastructure/repositories/organization-repository.js';
import { injectDependencies } from '../../../../shared/infrastructure/utils/dependency-injection.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import _ from 'lodash';

import { knex } from '../../../../../db/knex-database-connection.js';
import * as knowledgeElementRepository from '../../../../../lib/infrastructure/repositories/knowledge-element-repository.js';
import { CHUNK_SIZE_CAMPAIGN_RESULT_PROCESSING } from '../../../../../src/shared/infrastructure/constants.js';
import * as knowledgeElementRepository from '../../../../shared/infrastructure/repositories/knowledge-element-repository.js';
import { CampaignAnalysis } from '../../../campaign/domain/read-models/CampaignAnalysis.js';
import { CampaignParticipationStatuses } from '../../../shared/domain/constants.js';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import _ from 'lodash';

import { knex } from '../../../../../db/knex-database-connection.js';
import * as campaignRepository from '../../../../../lib/infrastructure/repositories/campaign-repository.js';
import * as knowledgeElementRepository from '../../../../../lib/infrastructure/repositories/knowledge-element-repository.js';
import { NotFoundError } from '../../../../shared/domain/errors.js';
import { Assessment } from '../../../../shared/domain/models/Assessment.js';
import * as knowledgeElementRepository from '../../../../shared/infrastructure/repositories/knowledge-element-repository.js';
import { CampaignAssessmentParticipation } from '../../domain/models/CampaignAssessmentParticipation.js';

const getByCampaignIdAndCampaignParticipationId = async function ({ campaignId, campaignParticipationId }) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { knex } from '../../../../../db/knex-database-connection.js';
import * as knowledgeElementRepository from '../../../../../lib/infrastructure/repositories/knowledge-element-repository.js';
import * as learningContentRepository from '../../../../../lib/infrastructure/repositories/learning-content-repository.js';
import { CampaignLearningContent } from '../../../../../src/shared/domain/models/CampaignLearningContent.js';
import { NotFoundError } from '../../../../shared/domain/errors.js';
import { CampaignLearningContent } from '../../../../shared/domain/models/CampaignLearningContent.js';
import * as knowledgeElementRepository from '../../../../shared/infrastructure/repositories/knowledge-element-repository.js';
import { CampaignAssessmentParticipationResult } from '../../domain/models/CampaignAssessmentParticipationResult.js';

const getByCampaignIdAndCampaignParticipationId = async function ({ campaignId, campaignParticipationId, locale }) {
Expand Down
Loading

0 comments on commit 060f363

Please sign in to comment.