From 3b80a8737dd07b98d7a28272ccf39702e2e2d7d4 Mon Sep 17 00:00:00 2001 From: Cheshiriks Date: Mon, 22 Apr 2024 15:05:19 +0300 Subject: [PATCH 1/9] Renaming save-cloud-common module to common --- api-gateway/build.gradle.kts | 2 +- .../controller/SecurityInfoController.kt | 2 +- .../gateway/security/WebSecurityConfig.kt | 4 +- .../save/gateway/service/BackendService.kt | 11 +- ...oringServerAuthenticationSuccessHandler.kt | 2 +- authentication-service/build.gradle.kts | 2 +- .../authservice/config/WebSecurityConfig.kt | 2 +- .../save/authservice/utils/SaveUserDetails.kt | 4 +- .../save/authservice/utils/SecurityUtils.kt | 4 +- .../authservice/utils/SaveUserDetailsTest.kt | 8 +- {save-cloud-common => common}/README.md | 0 .../build.gradle.kts | 0 .../com/saveourtool/common}/ApiVersions.kt | 2 +- .../saveourtool/common}/agent/AgentEnvName.kt | 2 +- .../saveourtool/common}/agent/AgentInfo.kt | 2 +- .../common}/agent/AgentInitConfig.kt | 6 +- .../common}/agent/AgentRunConfig.kt | 4 +- .../saveourtool/common}/agent/AgentState.kt | 2 +- .../saveourtool/common}/agent/Heartbeat.kt | 2 +- .../common}/agent/SaveCliOverrides.kt | 2 +- .../common}/agent/TestExecutionDto.kt | 16 +- .../common}/agent/TestExecutionExtDto.kt | 10 +- .../common}/agent/TestExecutionResult.kt | 4 +- .../agent/TestSuiteExecutionStatisticDto.kt | 4 +- .../common}/coroutines/flow/Flow.kt | 2 +- .../cvsscalculator/CvssVectorAbstract.kt | 2 +- .../common}/cvsscalculator/CvssVersion.kt | 2 +- .../common}/cvsscalculator/ICvssMetrics.kt | 2 +- .../common}/cvsscalculator/ICvssVector.kt | 2 +- .../common}/cvsscalculator/ScoreCalculator.kt | 6 +- .../cvsscalculator/v2/BaseMetricsV2.kt | 6 +- .../common}/cvsscalculator/v2/CvssVectorV2.kt | 10 +- .../cvsscalculator/v2/VectorTypesV2.kt | 2 +- .../common}/cvsscalculator/v2/WeightV2.kt | 2 +- .../cvsscalculator/v3/BaseMetricsV3.kt | 4 +- .../common}/cvsscalculator/v3/CvssVectorV3.kt | 10 +- .../cvsscalculator/v3/VectorTypesV3.kt | 2 +- .../common}/cvsscalculator/v3/WeightV3.kt | 2 +- .../common}/demo/DemoAgentConfig.kt | 4 +- .../common}/demo/DemoCreationRequest.kt | 4 +- .../com/saveourtool/common}/demo/DemoDto.kt | 6 +- .../saveourtool/common}/demo/DemoResult.kt | 2 +- .../common}/demo/DemoRunRequest.kt | 2 +- .../saveourtool/common}/demo/DemoStatus.kt | 2 +- .../common}/demo/cpg/CpgAdditionalParams.kt | 4 +- .../saveourtool/common}/demo/cpg/CpgEdge.kt | 2 +- .../saveourtool/common}/demo/cpg/CpgEngine.kt | 2 +- .../saveourtool/common}/demo/cpg/CpgGraph.kt | 2 +- .../saveourtool/common}/demo/cpg/CpgNode.kt | 2 +- .../saveourtool/common}/demo/cpg/CpgResult.kt | 2 +- .../common}/demo/cpg/CpgRunRequest.kt | 2 +- .../demo/cpg/cytoscape/CytoscapeEdge.kt | 2 +- .../demo/cpg/cytoscape/CytoscapeGraph.kt | 2 +- .../demo/cpg/cytoscape/CytoscapeLayout.kt | 2 +- .../demo/cpg/cytoscape/CytoscapeNode.kt | 4 +- .../common}/domain/EntitySaveStatus.kt | 2 +- .../common}/domain/OrganizationSaveStatus.kt | 4 +- .../saveourtool/common}/domain/PluginType.kt | 2 +- .../common}/domain/ProjectCoordinates.kt | 2 +- .../common}/domain/ProjectSaveStatus.kt | 2 +- .../com/saveourtool/common}/domain/Role.kt | 2 +- .../common}/domain/RunConfiguration.kt | 2 +- .../com/saveourtool/common}/domain/Sdk.kt | 2 +- .../common}/domain/SourceSaveStatus.kt | 2 +- .../common}/domain/TestResultLocation.kt | 2 +- .../common}/domain/TestResultStatus.kt | 2 +- .../common}/domain/UserSaveStatus.kt | 4 +- .../saveourtool/common}/entities/AgentDto.kt | 2 +- .../common}/entities/AgentStatusDto.kt | 6 +- .../common}/entities/CommentDto.kt | 2 +- .../saveourtool/common}/entities/DtoWithId.kt | 2 +- .../saveourtool/common}/entities/FileDto.kt | 4 +- .../saveourtool/common}/entities/GitDto.kt | 6 +- .../entities/LnkContestTestSuiteDto.kt | 6 +- .../common}/entities/LnkExecutionAgentDto.kt | 4 +- .../common}/entities/LnkExecutionFileDto.kt | 4 +- .../entities/LnkExecutionTestSuiteDto.kt | 6 +- .../entities/LnkOrganizationTestSuiteDto.kt | 6 +- .../common}/entities/NotificationDto.kt | 2 +- .../common}/entities/OrganizationDto.kt | 8 +- .../common}/entities/OrganizationStatus.kt | 2 +- .../entities/OrganizationWithRating.kt | 2 +- .../common}/entities/OrganizationWithUsers.kt | 4 +- .../common}/entities/ProjectDto.kt | 10 +- .../entities/ProjectProblemCritical.kt | 2 +- .../common}/entities/ProjectProblemDto.kt | 2 +- .../common}/entities/ProjectStatus.kt | 2 +- .../entities/TestSuitesSourceSnapshotDto.kt | 2 +- .../entities/benchmarks/BenchmarkEntity.kt | 2 +- .../common}/entities/contest/ContestDto.kt | 8 +- .../common}/entities/contest/ContestResult.kt | 4 +- .../entities/contest/ContestSampleDto.kt | 2 +- .../entities/contest/ContestSampleFieldDto.kt | 2 +- .../contest/ContestSampleFieldType.kt | 2 +- .../common}/entities/contest/ContestStatus.kt | 2 +- .../common}/entities/cosv/CosvFileDto.kt | 2 +- .../common}/entities/cosv/RawCosvFileDto.kt | 6 +- .../entities/cosv/RawCosvFileStatisticsDto.kt | 2 +- .../entities/cosv/RawCosvFileStatus.kt | 2 +- .../cosv/RawCosvFileStreamingResponse.kt | 2 +- .../common}/entities/cosv/VulnerabilityExt.kt | 4 +- .../entities/cosv/VulnerabilityMetadataDto.kt | 10 +- .../vulnerability/VulnerabilityDateDto.kt | 4 +- .../vulnerability/VulnerabilityDateType.kt | 2 +- .../vulnerability/VulnerabilityLanguage.kt | 2 +- .../vulnerability/VulnerabilityProjectDto.kt | 2 +- .../vulnerability/VulnerabilityProjectType.kt | 2 +- .../vulnerability/VulnerabilityStatus.kt | 2 +- .../common}/execution/ExecutionDto.kt | 2 +- .../common}/execution/ExecutionStatus.kt | 2 +- .../common}/execution/ExecutionUpdateDto.kt | 2 +- .../common}/execution/TestingType.kt | 2 +- .../saveourtool/common}/filters/DemoFilter.kt | 4 +- .../common}/filters/ExecutionFilter.kt | 4 +- .../common}/filters/OrganizationFilter.kt | 4 +- .../common}/filters/ProjectFilter.kt | 4 +- .../common}/filters/ProjectProblemFilter.kt | 2 +- .../common}/filters/TestExecutionFilter.kt | 4 +- .../common}/filters/TestSuiteFilter.kt | 4 +- .../common}/filters/VulnerabilityFilter.kt | 6 +- .../common}/frontend/PlatformLanguages.kt | 2 +- .../common}/frontend/TabMenuBar.kt | 4 +- .../common}/info/OauthProviderInfo.kt | 2 +- .../com/saveourtool/common}/info/UserInfo.kt | 8 +- .../common}/info/UserPermissions.kt | 2 +- .../info/UserPermissionsInOrganization.kt | 2 +- .../saveourtool/common}/info/UserStatus.kt | 2 +- .../com/saveourtool/common}/kafka/KafkaMsg.kt | 2 +- .../common}/kafka/TestExecutionTaskDto.kt | 4 +- .../common}/permission/Permission.kt | 2 +- .../saveourtool/common}/permission/Rights.kt | 2 +- .../common}/permission/SetRightsRequest.kt | 2 +- .../common}/permission/SetRoleRequest.kt | 4 +- .../common}/request/CreateExecutionRequest.kt | 8 +- .../common}/request/RunExecutionRequest.kt | 4 +- .../common}/request/TestFilesRequest.kt | 6 +- .../request/TestsSourceFetchRequest.kt | 16 +- .../com/saveourtool/common}/test/TestDto.kt | 8 +- .../common}/test/TestFilesContent.kt | 2 +- .../common}/test/TestSuiteValidationError.kt | 2 +- .../test/TestSuiteValidationProgress.kt | 2 +- .../common}/test/TestSuiteValidationResult.kt | 2 +- .../common}/test/TestsSourceSnapshotDto.kt | 4 +- .../common}/test/TestsSourceVersionDto.kt | 6 +- .../common}/test/TestsSourceVersionInfo.kt | 4 +- .../test/analysis/metrics/NoDataAvailable.kt | 2 +- .../analysis/metrics/RegularTestMetrics.kt | 2 +- .../test/analysis/metrics/TestMetrics.kt | 2 +- .../test/analysis/results/AnalysisResult.kt | 2 +- .../test/analysis/results/FlakyTest.kt | 2 +- .../test/analysis/results/IrregularTest.kt | 2 +- .../test/analysis/results/PermanentFailure.kt | 4 +- .../test/analysis/results/Regression.kt | 2 +- .../test/analysis/results/RegularTest.kt | 2 +- .../common}/testsuite/TestSuiteDto.kt | 8 +- .../common}/testsuite/TestSuiteVersioned.kt | 2 +- .../common}/testsuite/TestSuitesSourceDto.kt | 12 +- .../testsuite/TestSuitesSourceFetchMode.kt | 2 +- .../saveourtool/common}/utils/ArchiveUtils.kt | 2 +- .../saveourtool/common}/utils/AvatarType.kt | 2 +- .../saveourtool/common}/utils/Constants.kt | 2 +- .../common}/utils/CosvSchemaUtils.kt | 6 +- .../common}/utils/DateTimeUtils.kt | 2 +- .../common}/utils/ExecutionScoreUtils.kt | 6 +- .../saveourtool/common}/utils/FileUtils.kt | 2 +- .../saveourtool/common}/utils/HttpUtils.kt | 2 +- .../saveourtool/common}/utils/KotlinUtils.kt | 2 +- .../saveourtool/common}/utils/Languages.kt | 2 +- .../common}/utils/PlatformUtils.kt | 2 +- .../saveourtool/common}/utils/RoleUtils.kt | 4 +- .../saveourtool/common}/utils/StringUtils.kt | 2 +- .../common}/utils/TestResultUtils.kt | 8 +- .../common}/utils/github/GitHubHelper.kt | 2 +- .../common}/utils/github/GitHubRepoInfo.kt | 2 +- .../common}/utils/github/ReleaseAsset.kt | 2 +- .../common}/utils/github/ReleaseMetadata.kt | 2 +- .../common}/utils/github/TagMetadata.kt | 2 +- .../common}/validation/BackendRoutes.kt | 4 +- .../common}/validation/FrontendCosvRoutes.kt | 4 +- .../common}/validation/FrontendRoutes.kt | 4 +- .../common}/validation/Validatable.kt | 2 +- .../validation/ValidationErrorMessages.kt | 2 +- .../ValidationRegularExpressions.kt | 2 +- .../common}/validation/ValidationUtils.kt | 2 +- .../common}/coroutines/flow/FlowTest.kt | 2 +- .../cvsscalculator/CvssCalculatorTest.kt | 2 +- .../test/analysis/metrics/TestMetricsTest.kt | 2 +- .../analysis/results/AnalysisResultTest.kt | 2 +- .../saveourtool/common}/utils/ArchiveUtils.kt | 2 +- .../common}/utils/AwesomeBenchmarks.kt | 4 +- .../saveourtool/common}/utils/FileUtils.kt | 2 +- .../common}/utils/PlatformUtils.kt | 2 +- .../common}/configs/ApiSwaggerSupport.kt | 8 +- .../saveourtool/common}/configs/WebConfig.kt | 10 +- .../common}/domain/TestStatusMixin.kt | 2 +- .../com/saveourtool/common}/entities/Agent.kt | 4 +- .../common}/entities/AgentStatus.kt | 6 +- .../saveourtool/common}/entities/Comment.kt | 4 +- .../saveourtool/common}/entities/Contest.kt | 10 +- .../common}/entities/ContestSample.kt | 6 +- .../common}/entities/ContestSampleField.kt | 8 +- .../saveourtool/common}/entities/Execution.kt | 18 +- .../com/saveourtool/common}/entities/File.kt | 6 +- .../com/saveourtool/common}/entities/Git.kt | 4 +- .../common}/entities/LnkContestExecution.kt | 6 +- .../common}/entities/LnkContestProject.kt | 6 +- .../common}/entities/LnkContestTestSuite.kt | 4 +- .../common}/entities/LnkExecutionAgent.kt | 4 +- .../common}/entities/LnkExecutionFile.kt | 4 +- .../common}/entities/LnkExecutionTestSuite.kt | 4 +- .../entities/LnkOrganizationTestSuite.kt | 6 +- .../common}/entities/LnkProjectGithub.kt | 4 +- .../common}/entities/LnkUserOrganization.kt | 6 +- .../common}/entities/LnkUserProject.kt | 6 +- .../common}/entities/Notification.kt | 4 +- .../common}/entities/Organization.kt | 4 +- .../common}/entities/OriginalLogin.kt | 4 +- .../saveourtool/common}/entities/Project.kt | 6 +- .../common}/entities/ProjectProblem.kt | 4 +- .../com/saveourtool/common}/entities/Tag.kt | 4 +- .../com/saveourtool/common}/entities/Test.kt | 8 +- .../common}/entities/TestExecution.kt | 12 +- .../saveourtool/common}/entities/TestSuite.kt | 20 +- .../common}/entities/TestSuitesSource.kt | 6 +- .../common}/entities/TestsSourceSnapshot.kt | 6 +- .../common}/entities/TestsSourceVersion.kt | 10 +- .../com/saveourtool/common}/entities/User.kt | 10 +- .../entities/benchmarks/AwesomeBenchmarks.kt | 6 +- .../common}/entitiescosv/CosvFile.kt | 6 +- .../common}/entitiescosv/CosvGeneratedId.kt | 4 +- .../LnkVulnerabilityMetadataTag.kt | 4 +- .../LnkVulnerabilityMetadataUser.kt | 4 +- .../common}/entitiescosv/RawCosvFile.kt | 12 +- .../entitiescosv/VulnerabilityMetadata.kt | 18 +- .../VulnerabilityMetadataProject.kt | 8 +- .../VulnerabilityMetadataEvent.kt | 4 +- .../common/evententities/CommentEvent.kt | 10 + .../common/evententities/UserEvent.kt | 10 + .../exceptions/BackendInternalException.kt | 2 +- .../common}/listeners/DateListener.kt | 6 +- .../common}/repository/CommentRepository.kt | 6 +- .../common}/repository/GitRepository.kt | 8 +- .../LnkUserOrganizationRepository.kt | 12 +- .../repository/LnkUserProjectRepository.kt | 10 +- .../repository/NotificationRepository.kt | 6 +- .../repository/OrganizationRepository.kt | 8 +- .../repository/OriginalLoginRepository.kt | 6 +- .../common}/repository/ProjectRepository.kt | 8 +- .../common}/repository/TagRepository.kt | 8 +- .../common}/repository/UserRepository.kt | 8 +- .../common}/repository/ValidateRepository.kt | 2 +- .../common}/s3/DefaultS3Configuration.kt | 2 +- .../common}/s3/DefaultS3Operations.kt | 2 +- .../saveourtool/common}/s3/S3Operations.kt | 2 +- .../common}/s3/S3OperationsProperties.kt | 2 +- .../security/CommentPermissionEvaluator.kt | 12 +- .../OrganizationPermissionEvaluator.kt | 22 +- .../security/ProjectPermissionEvaluator.kt | 30 +-- .../common}/service/CommentService.kt | 16 +- .../saveourtool/common}/service/GitService.kt | 10 +- .../service/LnkUserOrganizationService.kt | 20 +- .../common}/service/LnkUserProjectService.kt | 20 +- .../saveourtool/common}/service/LogService.kt | 4 +- .../saveourtool/common}/service/LokiConfig.kt | 2 +- .../common}/service/LokiLogService.kt | 8 +- .../common}/service/OrganizationService.kt | 36 +-- .../common}/service/ProjectService.kt | 22 +- .../common}/service/UserService.kt | 28 +-- .../common}/spring/entity/BaseEntity.kt | 6 +- .../spring/entity/BaseEntityWithDate.kt | 4 +- .../spring/entity/BaseEntityWithDateAndDto.kt | 2 +- .../spring/entity/BaseEntityWithDto.kt | 2 +- .../spring/entity/BaseEntityWithDtoWithId.kt | 4 +- .../spring/entity/IBaseEntityWithDate.kt | 4 +- .../spring/entity/IBaseEntityWithDto.kt | 2 +- .../spring/entity/IBaseEntityWithDtoWithId.kt | 4 +- .../DockerSecretsDatabaseProcessor.kt | 2 +- .../spring/repository/BaseEntityRepository.kt | 4 +- .../common}/spring/utils/WebClientUtils.kt | 4 +- .../AbstractMigrationReactiveStorage.kt | 8 +- .../storage/AbstractReactiveStorage.kt | 10 +- .../storage/AbstractSimpleReactiveStorage.kt | 8 +- .../AbstractSimpleSuspendingStorage.kt | 8 +- .../storage/AbstractSuspendingStorage.kt | 10 +- .../saveourtool/common}/storage/AvatarKey.kt | 4 +- .../common}/storage/AvatarStorage.kt | 10 +- .../common}/storage/BackupStorageUtils.kt | 16 +- .../storage/DefaultStorageCoroutines.kt | 16 +- .../storage/DefaultStoragePreSignedUrl.kt | 12 +- .../storage/DefaultStorageProjectReactor.kt | 10 +- .../common}/storage/ReactiveStorage.kt | 2 +- .../storage/ReactiveStorageWithDatabase.kt | 8 +- .../common}/storage/S3StorageUtils.kt | 2 +- .../common}/storage/StorageCoroutines.kt | 2 +- .../common}/storage/StorageInitializer.kt | 8 +- .../common}/storage/StoragePreSignedUrl.kt | 8 +- .../common}/storage/StorageProjectReactor.kt | 2 +- .../common}/storage/SuspendingStorage.kt | 2 +- .../storage/SuspendingStorageWithDatabase.kt | 8 +- .../impl/AbstractInternalFileStorage.kt | 16 +- .../common}/storage/impl/InternalFileKey.kt | 2 +- .../key/AbstractS3KeyDatabaseManager.kt | 10 +- .../storage/key/AbstractS3KeyDtoManager.kt | 12 +- .../storage/key/AbstractS3KeyEntityManager.kt | 10 +- .../storage/key/AbstractS3KeyManager.kt | 6 +- .../common}/storage/key/S3KeyManager.kt | 2 +- .../storage/request/DownloadRequest.kt | 2 +- .../common}/storage/request/UploadRequest.kt | 2 +- .../test/analysis/metrics/TestMetricsMixin.kt | 4 +- .../analysis/results/AnalysisResultMixin.kt | 2 +- .../common}/utils/AgentDownloadUtils.kt | 4 +- .../saveourtool/common}/utils/ArchiveUtils.kt | 2 +- .../common}/utils/AuthenticationUtils.kt | 4 +- .../common}/utils/BlockingBridge.kt | 2 +- .../BufferAccumulatedUntilReactorUtils.kt | 2 +- .../common}/utils/DateTimeUtilsJvm.kt | 2 +- .../common}/utils/ExceptionUtils.kt | 2 +- .../saveourtool/common}/utils/FileUtils.kt | 2 +- .../saveourtool/common}/utils/HttpUtils.kt | 2 +- .../common}/utils/KotlinUtilsJvm.kt | 2 +- .../common}/utils/LocalDateTimeUtils.kt | 2 +- .../common}/utils/PlatformUtils.kt | 2 +- .../saveourtool/common}/utils/ReactorUtils.kt | 2 +- .../common}/utils/ResponseWithTiming.kt | 2 +- .../saveourtool/common}/utils/SLF4JUtils.kt | 2 +- .../saveourtool/common}/utils/ServerTiming.kt | 2 +- .../saveourtool/common}/utils/SpringUtils.kt | 8 +- .../com/saveourtool/common}/domain/SdkTest.kt | 2 +- .../common}/utils/ReactorUtilsTest.kt | 2 +- .../ValidationRegularExpressionsTest.kt | 4 +- .../common}/validation/ValidationUtilsTest.kt | 2 +- .../saveourtool/common}/utils/ArchiveUtils.kt | 2 +- .../saveourtool/common}/utils/FileUtils.kt | 2 +- .../common}/utils/PlatformUtils.kt | 2 +- cosv-backend/build.gradle.kts | 2 +- .../cosv/backend/CosvApplication.kt | 3 +- .../cosv/backend/configs/ConfigProperties.kt | 2 +- .../PersistenceSaveAutoConfiguration.kt | 4 +- .../backend/controllers/AvatarController.kt | 16 +- .../backend/controllers/CommentController.kt | 22 +- .../backend/controllers/CosvController.kt | 18 +- .../LnkUserOrganizationController.kt | 34 +-- .../controllers/OrganizationController.kt | 26 +-- .../backend/controllers/ProjectController.kt | 18 +- .../controllers/RawCosvFileController.kt | 22 +- .../cosv/backend/controllers/TagController.kt | 6 +- .../controllers/UsersDetailsController.kt | 20 +- .../controllers/VulnerabilityController.kt | 28 +-- .../cosv/backend/event/CommentListener.kt | 13 +- .../backend/repository/CosvFileRepository.kt | 4 +- .../repository/CosvGeneratedIdRepository.kt | 4 +- .../cosv/backend/repository/CosvRepository.kt | 4 +- .../repository/CosvRepositoryInStorage.kt | 6 +- .../LnkVulnerabilityMetadataTagRepository.kt | 4 +- .../LnkVulnerabilityMetadataUserRepository.kt | 4 +- .../repository/RawCosvFileRepository.kt | 4 +- .../VulnerabilityMetadataProjectRepository.kt | 4 +- .../VulnerabilityMetadataRepository.kt | 6 +- .../VulnerabilityPermissionEvaluator.kt | 10 +- .../cosv/backend/service/CosvService.kt | 14 +- .../cosv/backend/service/TagService.kt | 16 +- .../service/VulnerabilityMetadataService.kt | 32 +-- .../service/VulnerabilityRatingService.kt | 10 +- .../backend/service/VulnerabilityService.kt | 28 +-- .../backend/storage/CosvFileS3KeyManager.kt | 13 +- .../cosv/backend/storage/CosvFileStorage.kt | 16 +- .../storage/RawCosvFileS3KeyManager.kt | 22 +- .../backend/storage/RawCosvFileStorage.kt | 34 +-- .../cosv/backend/utils/AuthenticationUtils.kt | 2 +- cosv-frontend/build.gradle.kts | 2 +- .../com/saveourtool/cosv/frontend/App.kt | 4 +- .../cosv/frontend/components/topbar/TopBar.kt | 2 +- .../frontend/components/topbar/TopBarLinks.kt | 2 +- .../components/topbar/TopBarUrlSplits.kt | 4 +- .../components/topbar/TopBarUserField.kt | 2 +- .../views/vuln/CreateVulnerabilityView.kt | 16 +- .../views/vuln/VulnerabilityBadge.kt | 8 +- .../views/vuln/VulnerabilityChangesTab.kt | 4 +- .../views/vuln/VulnerabilityCollectionView.kt | 4 +- .../views/vuln/VulnerabilityCommentTab.kt | 6 +- .../views/vuln/VulnerabilityDateModal.kt | 8 +- .../vuln/VulnerabilityGeneralInfoProps.kt | 20 +- .../views/vuln/VulnerabilityHeader.kt | 10 +- .../views/vuln/VulnerabilityHistoryTab.kt | 4 +- .../views/vuln/VulnerabilityInfoTab.kt | 18 +- .../views/vuln/VulnerabilityProjectWindow.kt | 8 +- .../views/vuln/VulnerabilityRawDataTab.kt | 2 +- .../views/vuln/VulnerabilityTagsComponent.kt | 8 +- .../views/vuln/VulnerabilityView.kt | 8 +- .../component/CosvFileManagerComponent.kt | 26 +-- .../vuln/component/CvssBaseScoreCalculator.kt | 4 +- .../views/vuln/component/TimelineComponent.kt | 4 +- .../vuln/toprating/OrganizationRatingTab.kt | 4 +- .../views/vuln/toprating/TopRatingView.kt | 4 +- .../views/vuln/toprating/UserRatingTab.kt | 3 +- .../views/welcome/VulnerabilityWelcomeView.kt | 6 +- .../views/welcome/pagers/vuln/WhatIsVuln.kt | 3 +- .../cosv/frontend/routing/BasicRouting.kt | 4 +- frontend-common/build.gradle.kts | 2 +- .../components/basic/AddUserComponent.kt | 5 +- .../components/basic/AvatarRenderers.kt | 12 +- .../common/components/basic/CookieBanner.kt | 3 +- .../frontend/common/components/basic/Forum.kt | 8 +- .../components/basic/LanguageSelector.kt | 2 +- .../components/basic/ManageUserRoleCard.kt | 10 +- .../components/basic/TestSuitesDisplayer.kt | 2 +- .../common/components/basic/UserBoard.kt | 4 +- .../contests/ContestCreationComponent.kt | 6 +- .../basic/contests/ContestInfoMenu.kt | 2 +- .../basic/contests/ContestSubmissionsMenu.kt | 4 +- .../basic/contests/ContestSummaryMenu.kt | 2 +- .../basic/contests/PublicTestCardComponent.kt | 4 +- .../filters/VulnerabilitiesFiltersRow.kt | 12 +- .../testsuiteselector/TestSuiteSelector.kt | 2 +- .../TestSuiteSelectorBrowserMode.kt | 2 +- .../TestSuiteSelectorManagerMode.kt | 2 +- .../TestSuiteSelectorSearchMode.kt | 6 +- .../ManageTestSuitePermissionsCard.kt | 8 +- .../TestSuiteSourceUpsertComponent.kt | 10 +- .../fetch/TestSuitesSourceFetcher.kt | 4 +- .../common/components/inputform/InputForms.kt | 2 +- .../components/inputform/InputWithDebounce.kt | 6 +- .../components/views/RegistrationView.kt | 20 +- .../views/ThanksForRegistrationView.kt | 3 +- .../organization/CreateOrganizationView.kt | 6 +- .../views/organization/GitWindow.kt | 2 +- .../organization/ManageGitCredentialsCard.kt | 8 +- .../organization/OrganizationContestsMenu.kt | 6 +- .../organization/OrganizationSettingsMenu.kt | 11 +- .../organization/OrganizationTestsMenu.kt | 6 +- .../organization/OrganizationToolsMenu.kt | 12 +- .../views/organization/OrganizationView.kt | 14 +- .../views/organization/RenderAdminTab.kt | 2 +- .../views/organization/RenderInfoTab.kt | 6 +- .../organization/RenderOrganizationMenuBar.kt | 10 +- .../organization/RenderVulnerabilitiesTab.kt | 4 +- .../TestSuitesSourcesDisplayer.kt | 8 +- .../userprofile/UserProfileNewUsersTab.kt | 3 +- .../views/userprofile/UserProfileView.kt | 12 +- .../views/usersettings/SettingsView.kt | 2 +- .../usersettings/SettingsViewLeftColumn.kt | 3 +- .../usersettings/SettingsViewRightColumn.kt | 2 +- .../views/usersettings/right/Email.kt | 3 +- .../views/usersettings/right/Organizations.kt | 10 +- .../usersettings/right/SettingsInputFields.kt | 2 +- .../right/profile/AvatarSelector.kt | 8 +- .../right/validation/InputValidationUtils.kt | 2 +- .../components/views/vuln/UploadCosvButton.kt | 3 +- .../views/vuln/VulnerabilityTableComponent.kt | 12 +- .../views/welcome/SaveWelcomeView.kt | 4 +- .../components/views/welcome/WelcomeUtils.kt | 9 +- .../frontend/common/externals/i18next/I18n.kt | 2 +- .../common/externals/i18next/Translation.kt | 2 +- .../frontend/common/http/Requests.kt | 14 +- .../frontend/common/utils/CustomHooks.kt | 6 +- .../frontend/common/utils/FilterParamUtils.kt | 2 +- .../frontend/common/utils/HtmlElements.kt | 2 +- .../frontend/common/utils/LocationUtils.kt | 4 +- .../frontend/common/utils/LoginUtils.kt | 2 +- .../frontend/common/utils/RequestUtils.kt | 4 +- .../frontend/common/utils/StateWithRole.kt | 2 +- .../frontend/common/utils/TopBarUrl.kt | 2 +- .../frontend/common/utils/UsefulUrls.kt | 4 +- .../common/utils/UserInfoAwareProps.kt | 2 +- .../frontend/common/utils/Utils.kt | 6 +- .../common/components/basic/SelectFormTest.kt | 4 +- .../components/views/OrganizationViewTest.kt | 6 +- save-agent/build.gradle.kts | 2 +- .../save/agent/AgentConfiguration.kt | 6 +- .../kotlin/com/saveourtool/save/agent/Main.kt | 7 +- .../com/saveourtool/save/agent/Requests.kt | 2 +- .../com/saveourtool/save/agent/SaveAgent.kt | 5 +- .../saveourtool/save/agent/utils/FileUtils.kt | 2 +- .../saveourtool/save/agent/utils/HttpUtils.kt | 10 +- .../com/saveourtool/save/agent/utils/Utils.kt | 4 +- .../saveourtool/save/agent/SaveAgentTest.kt | 34 +-- save-api-cli/build.gradle.kts | 2 +- .../saveourtool/save/apicli/ArgsParsing.kt | 2 +- save-api/build.gradle.kts | 2 +- .../saveourtool/save/api/SaveCloudClientEx.kt | 20 +- .../api/config/PropertiesConfiguration.kt | 8 +- .../save/api/impl/DefaultSaveCloudClient.kt | 28 +-- .../save/api/utils/RequestUtils.kt | 10 +- save-backend/build.gradle.kts | 2 +- .../save/backend/SaveApplication.kt | 17 +- .../backend/configs/ApiGroupsConfiguration.kt | 10 +- .../backend/controllers/AvatarController.kt | 8 +- .../AwesomeBenchmarksController.kt | 5 +- .../backend/controllers/CommentController.kt | 9 +- .../controllers/ContainerLogController.kt | 10 +- .../backend/controllers/ContestController.kt | 18 +- .../controllers/ContestSampleController.kt | 5 +- .../controllers/DemoManagerController.kt | 27 +-- .../controllers/DownloadFilesController.kt | 10 +- .../controllers/ExecutionController.kt | 14 +- .../backend/controllers/FileController.kt | 8 +- .../LnkContestProjectController.kt | 20 +- .../LnkOrganizationTestSuiteController.kt | 24 +- .../LnkUserOrganizationController.kt | 20 +- .../controllers/LnkUserProjectController.kt | 16 +- .../controllers/NotificationController.kt | 9 +- .../controllers/OrganizationController.kt | 31 +-- .../controllers/PermissionController.kt | 16 +- .../backend/controllers/ProjectController.kt | 19 +- .../controllers/RunExecutionController.kt | 4 +- .../controllers/TestExecutionController.kt | 58 +++-- .../controllers/TestSuitesSourceController.kt | 32 +-- .../controllers/UserPermissionController.kt | 9 +- .../controllers/UsersDetailsController.kt | 10 +- .../controllers/internal/AgentsController.kt | 18 +- .../internal/TestSuitesController.kt | 4 +- .../backend/service/TestExecutionService.kt | 8 +- .../saveourtool/save/backend/DatabaseTest.kt | 8 +- .../save/backend/DownloadFilesTest.kt | 14 +- .../controller/AgentsControllerTest.kt | 22 +- .../backend/controller/DeleteEntitiesTest.kt | 6 +- .../controller/ExecutionControllerTest.kt | 6 +- .../controller/JpaSpecificationTest.kt | 4 +- .../LnkUserOrganizationControllerTest.kt | 12 +- .../controller/OrganizationControllerTest.kt | 24 +- .../controller/PermissionControllerTest.kt | 18 +- .../controller/ProjectControllerTest.kt | 18 +- .../controller/TestExecutionControllerTest.kt | 28 +-- .../TestInitializeControllerTest.kt | 6 +- .../backend/controller/UsersControllerTest.kt | 4 +- .../controller/UsersDetailsControllerTest.kt | 12 +- .../controllers/RunExecutionControllerTest.kt | 6 +- .../save/evententities/CommentEvent.kt | 10 - .../save/evententities/UserEvent.kt | 10 - save-demo-agent/build.gradle.kts | 2 +- .../save/demo/agent/utils/HttpUtils.kt | 1 + .../save/demo/agent/utils/SetupUtils.kt | 1 + save-demo-cpg/build.gradle.kts | 2 +- .../save/demo/cpg/controller/CpgController.kt | 4 +- save-demo/build.gradle.kts | 2 +- .../save/demo/controller/DemoController.kt | 4 +- save-frontend/build.gradle.kts | 2 +- .../components/basic/TestStatusComponent.kt | 8 +- .../basic/projects/ProjectStatisticMenu.kt | 10 +- .../components/views/ExecutionView.kt | 12 +- save-orchestrator-common/build.gradle.kts | 2 +- .../saveourtool/save/orchestrator/Utils.kt | 10 +- .../save/orchestrator/config/JsonConfig.kt | 2 +- .../controller/HeartbeatController.kt | 38 +-- .../controller/KafkaController.kt | 4 +- .../docker/DockerContainerRunner.kt | 12 +- .../save/orchestrator/kafka/KafkaSender.kt | 2 +- .../kubernetes/KubernetesManager.kt | 12 +- .../save/orchestrator/service/AgentService.kt | 12 +- .../orchestrator/service/ContainerService.kt | 4 +- .../service/HeartBeatInspector.kt | 4 +- .../service/OrchestratorAgentService.kt | 12 +- .../heartbeat/HeartbeatControllerTest.kt | 218 ++++++++++++------ save-orchestrator/build.gradle.kts | 2 +- .../BackendOrchestratorAgentService.kt | 8 +- save-preprocessor/build.gradle.kts | 2 +- .../service/TestDiscoveringServiceTest.kt | 10 +- settings.gradle.kts | 2 +- test-analysis-core/build.gradle.kts | 2 +- .../test/analysis/algorithms/Algorithm.kt | 6 +- .../analysis/algorithms/FlipRateAnalysis.kt | 6 +- .../algorithms/PermanentFailureDetection.kt | 6 +- .../algorithms/RegressionDetection.kt | 8 +- .../test/analysis/api/TestAnalysisService.kt | 2 +- .../save/test/analysis/api/TestId.kt | 2 +- .../save/test/analysis/api/TestRun.kt | 2 +- .../analysis/api/TestStatisticsStorage.kt | 8 +- .../test/analysis/api/TestStatusProvider.kt | 2 +- .../analysis/entities/ExecutionMetadata.kt | 4 +- .../save/test/analysis/entities/FilePath.kt | 2 +- .../analysis/entities/OrganizationName.kt | 2 +- .../save/test/analysis/entities/PluginName.kt | 2 +- .../test/analysis/entities/ProjectName.kt | 2 +- .../test/analysis/entities/TestSuiteName.kt | 2 +- .../analysis/entities/TestSuiteSourceName.kt | 2 +- .../analysis/entities/TestSuiteVersion.kt | 2 +- .../internal/DefaultTestAnalysisService.kt | 8 +- .../internal/DefaultTestStatusProvider.kt | 8 +- .../test/analysis/internal/ExtendedTestRun.kt | 2 +- .../test/analysis/internal/MemoryBacked.kt | 2 +- .../algorithms/RegressionDetectionTest.kt | 2 +- .../analysis/api/TestAnalysisServiceTest.kt | 14 +- .../analysis/api/TestStatisticsStorageTest.kt | 12 +- .../analysis/api/TestStatusProviderTest.kt | 2 +- 584 files changed, 2051 insertions(+), 1923 deletions(-) rename {save-cloud-common => common}/README.md (100%) rename {save-cloud-common => common}/build.gradle.kts (100%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/ApiVersions.kt (89%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/agent/AgentEnvName.kt (86%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/agent/AgentInfo.kt (90%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/agent/AgentInitConfig.kt (80%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/agent/AgentRunConfig.kt (82%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/agent/AgentState.kt (95%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/agent/Heartbeat.kt (97%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/agent/SaveCliOverrides.kt (94%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/agent/TestExecutionDto.kt (81%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/agent/TestExecutionExtDto.kt (69%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/agent/TestExecutionResult.kt (91%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/agent/TestSuiteExecutionStatisticDto.kt (78%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/coroutines/flow/Flow.kt (96%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/cvsscalculator/CvssVectorAbstract.kt (95%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/cvsscalculator/CvssVersion.kt (85%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/cvsscalculator/ICvssMetrics.kt (88%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/cvsscalculator/ICvssVector.kt (91%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/cvsscalculator/ScoreCalculator.kt (88%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/cvsscalculator/v2/BaseMetricsV2.kt (94%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/cvsscalculator/v2/CvssVectorV2.kt (89%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/cvsscalculator/v2/VectorTypesV2.kt (95%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/cvsscalculator/v2/WeightV2.kt (94%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/cvsscalculator/v3/BaseMetricsV3.kt (96%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/cvsscalculator/v3/CvssVectorV3.kt (91%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/cvsscalculator/v3/VectorTypesV3.kt (96%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/cvsscalculator/v3/WeightV3.kt (95%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/demo/DemoAgentConfig.kt (95%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/demo/DemoCreationRequest.kt (73%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/demo/DemoDto.kt (95%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/demo/DemoResult.kt (95%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/demo/DemoRunRequest.kt (93%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/demo/DemoStatus.kt (97%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/demo/cpg/CpgAdditionalParams.kt (80%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/demo/cpg/CpgEdge.kt (96%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/demo/cpg/CpgEngine.kt (91%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/demo/cpg/CpgGraph.kt (99%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/demo/cpg/CpgNode.kt (97%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/demo/cpg/CpgResult.kt (92%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/demo/cpg/CpgRunRequest.kt (90%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/demo/cpg/cytoscape/CytoscapeEdge.kt (89%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/demo/cpg/cytoscape/CytoscapeGraph.kt (88%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/demo/cpg/cytoscape/CytoscapeLayout.kt (96%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/demo/cpg/cytoscape/CytoscapeNode.kt (92%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/domain/EntitySaveStatus.kt (91%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/domain/OrganizationSaveStatus.kt (84%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/domain/PluginType.kt (96%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/domain/ProjectCoordinates.kt (95%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/domain/ProjectSaveStatus.kt (90%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/domain/Role.kt (98%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/domain/RunConfiguration.kt (90%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/domain/Sdk.kt (98%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/domain/SourceSaveStatus.kt (94%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/domain/TestResultLocation.kt (96%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/domain/TestResultStatus.kt (94%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/domain/UserSaveStatus.kt (90%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/AgentDto.kt (91%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/AgentStatusDto.kt (71%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/CommentDto.kt (93%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/DtoWithId.kt (89%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/FileDto.kt (89%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/GitDto.kt (71%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/LnkContestTestSuiteDto.kt (58%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/LnkExecutionAgentDto.kt (68%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/LnkExecutionFileDto.kt (67%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/LnkExecutionTestSuiteDto.kt (59%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/LnkOrganizationTestSuiteDto.kt (73%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/NotificationDto.kt (87%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/OrganizationDto.kt (87%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/OrganizationStatus.kt (90%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/OrganizationWithRating.kt (84%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/OrganizationWithUsers.kt (77%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/ProjectDto.kt (90%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/ProjectProblemCritical.kt (93%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/ProjectProblemDto.kt (94%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/ProjectStatus.kt (90%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/TestSuitesSourceSnapshotDto.kt (90%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/benchmarks/BenchmarkEntity.kt (96%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/contest/ContestDto.kt (84%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/contest/ContestResult.kt (88%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/contest/ContestSampleDto.kt (91%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/contest/ContestSampleFieldDto.kt (88%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/contest/ContestSampleFieldType.kt (91%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/contest/ContestStatus.kt (84%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/cosv/CosvFileDto.kt (88%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/cosv/RawCosvFileDto.kt (95%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/cosv/RawCosvFileStatisticsDto.kt (95%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/cosv/RawCosvFileStatus.kt (90%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/cosv/RawCosvFileStreamingResponse.kt (89%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/cosv/VulnerabilityExt.kt (86%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/cosv/VulnerabilityMetadataDto.kt (83%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/vulnerability/VulnerabilityDateDto.kt (93%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/vulnerability/VulnerabilityDateType.kt (96%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/vulnerability/VulnerabilityLanguage.kt (90%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/vulnerability/VulnerabilityProjectDto.kt (93%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/vulnerability/VulnerabilityProjectType.kt (89%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/entities/vulnerability/VulnerabilityStatus.kt (91%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/execution/ExecutionDto.kt (97%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/execution/ExecutionStatus.kt (94%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/execution/ExecutionUpdateDto.kt (85%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/execution/TestingType.kt (83%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/filters/DemoFilter.kt (91%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/filters/ExecutionFilter.kt (84%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/filters/OrganizationFilter.kt (83%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/filters/ProjectFilter.kt (89%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/filters/ProjectProblemFilter.kt (92%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/filters/TestExecutionFilter.kt (91%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/filters/TestSuiteFilter.kt (93%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/filters/VulnerabilityFilter.kt (84%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/frontend/PlatformLanguages.kt (95%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/frontend/TabMenuBar.kt (94%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/info/OauthProviderInfo.kt (92%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/info/UserInfo.kt (90%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/info/UserPermissions.kt (92%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/info/UserPermissionsInOrganization.kt (90%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/info/UserStatus.kt (92%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/kafka/KafkaMsg.kt (76%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/kafka/TestExecutionTaskDto.kt (73%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/permission/Permission.kt (75%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/permission/Rights.kt (75%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/permission/SetRightsRequest.kt (90%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/permission/SetRoleRequest.kt (72%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/request/CreateExecutionRequest.kt (86%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/request/RunExecutionRequest.kt (79%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/request/TestFilesRequest.kt (67%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/request/TestsSourceFetchRequest.kt (77%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/test/TestDto.kt (83%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/test/TestFilesContent.kt (93%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/test/TestSuiteValidationError.kt (92%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/test/TestSuiteValidationProgress.kt (95%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/test/TestSuiteValidationResult.kt (90%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/test/TestsSourceSnapshotDto.kt (84%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/test/TestsSourceVersionDto.kt (81%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/test/TestsSourceVersionInfo.kt (90%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/test/analysis/metrics/NoDataAvailable.kt (91%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/test/analysis/metrics/RegularTestMetrics.kt (98%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/test/analysis/metrics/TestMetrics.kt (91%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/test/analysis/results/AnalysisResult.kt (91%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/test/analysis/results/FlakyTest.kt (80%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/test/analysis/results/IrregularTest.kt (92%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/test/analysis/results/PermanentFailure.kt (74%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/test/analysis/results/Regression.kt (80%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/test/analysis/results/RegularTest.kt (91%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/testsuite/TestSuiteDto.kt (81%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/testsuite/TestSuiteVersioned.kt (97%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/testsuite/TestSuitesSourceDto.kt (83%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/testsuite/TestSuitesSourceFetchMode.kt (80%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/utils/ArchiveUtils.kt (90%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/utils/AvatarType.kt (95%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/utils/Constants.kt (98%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/utils/CosvSchemaUtils.kt (96%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/utils/DateTimeUtils.kt (98%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/utils/ExecutionScoreUtils.kt (93%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/utils/FileUtils.kt (98%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/utils/HttpUtils.kt (98%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/utils/KotlinUtils.kt (98%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/utils/Languages.kt (96%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/utils/PlatformUtils.kt (98%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/utils/RoleUtils.kt (78%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/utils/StringUtils.kt (97%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/utils/TestResultUtils.kt (85%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/utils/github/GitHubHelper.kt (98%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/utils/github/GitHubRepoInfo.kt (94%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/utils/github/ReleaseAsset.kt (97%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/utils/github/ReleaseMetadata.kt (93%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/utils/github/TagMetadata.kt (83%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/validation/BackendRoutes.kt (90%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/validation/FrontendCosvRoutes.kt (94%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/validation/FrontendRoutes.kt (95%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/validation/Validatable.kt (88%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/validation/ValidationErrorMessages.kt (97%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/validation/ValidationRegularExpressions.kt (93%) rename {save-cloud-common/src/commonMain/kotlin/com/saveourtool/save => common/src/commonMain/kotlin/com/saveourtool/common}/validation/ValidationUtils.kt (98%) rename {save-cloud-common/src/commonTest/kotlin/com/saveourtool/save => common/src/commonTest/kotlin/com/saveourtool/common}/coroutines/flow/FlowTest.kt (98%) rename {save-cloud-common/src/commonTest/kotlin/com/saveourtool/save => common/src/commonTest/kotlin/com/saveourtool/common}/cvsscalculator/CvssCalculatorTest.kt (88%) rename {save-cloud-common/src/commonTest/kotlin/com/saveourtool/save => common/src/commonTest/kotlin/com/saveourtool/common}/test/analysis/metrics/TestMetricsTest.kt (98%) rename {save-cloud-common/src/commonTest/kotlin/com/saveourtool/save => common/src/commonTest/kotlin/com/saveourtool/common}/test/analysis/results/AnalysisResultTest.kt (98%) rename {save-cloud-common/src/jsMain/kotlin/com/saveourtool/save => common/src/jsMain/kotlin/com/saveourtool/common}/utils/ArchiveUtils.kt (87%) rename {save-cloud-common/src/jsMain/kotlin/com/saveourtool/save => common/src/jsMain/kotlin/com/saveourtool/common}/utils/AwesomeBenchmarks.kt (86%) rename {save-cloud-common/src/jsMain/kotlin/com/saveourtool/save => common/src/jsMain/kotlin/com/saveourtool/common}/utils/FileUtils.kt (94%) rename {save-cloud-common/src/jsMain/kotlin/com/saveourtool/save => common/src/jsMain/kotlin/com/saveourtool/common}/utils/PlatformUtils.kt (95%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/configs/ApiSwaggerSupport.kt (87%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/configs/WebConfig.kt (87%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/domain/TestStatusMixin.kt (95%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/Agent.kt (88%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/AgentStatus.kt (90%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/Comment.kt (87%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/Contest.kt (92%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/ContestSample.kt (77%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/ContestSampleField.kt (70%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/Execution.kt (91%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/File.kt (91%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/Git.kt (91%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/LnkContestExecution.kt (85%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/LnkContestProject.kt (83%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/LnkContestTestSuite.kt (82%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/LnkExecutionAgent.kt (84%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/LnkExecutionFile.kt (84%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/LnkExecutionTestSuite.kt (85%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/LnkOrganizationTestSuite.kt (84%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/LnkProjectGithub.kt (83%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/LnkUserOrganization.kt (81%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/LnkUserProject.kt (80%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/Notification.kt (85%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/Organization.kt (95%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/OriginalLogin.kt (84%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/Project.kt (94%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/ProjectProblem.kt (89%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/Tag.kt (74%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/Test.kt (85%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/TestExecution.kt (85%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/TestSuite.kt (90%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/TestSuitesSource.kt (93%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/TestsSourceSnapshot.kt (90%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/TestsSourceVersion.kt (89%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/User.kt (91%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entities/benchmarks/AwesomeBenchmarks.kt (89%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entitiescosv/CosvFile.kt (85%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entitiescosv/CosvGeneratedId.kt (78%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entitiescosv/LnkVulnerabilityMetadataTag.kt (84%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entitiescosv/LnkVulnerabilityMetadataUser.kt (89%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entitiescosv/RawCosvFile.kt (85%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entitiescosv/VulnerabilityMetadata.kt (81%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entitiescosv/VulnerabilityMetadataProject.kt (80%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/entitiescosv/evententities/VulnerabilityMetadataEvent.kt (53%) create mode 100644 common/src/jvmMain/kotlin/com/saveourtool/common/evententities/CommentEvent.kt create mode 100644 common/src/jvmMain/kotlin/com/saveourtool/common/evententities/UserEvent.kt rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/exceptions/BackendInternalException.kt (80%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/listeners/DateListener.kt (80%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/repository/CommentRepository.kt (84%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/repository/GitRepository.kt (70%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/repository/LnkUserOrganizationRepository.kt (93%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/repository/LnkUserProjectRepository.kt (88%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/repository/NotificationRepository.kt (66%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/repository/OrganizationRepository.kt (84%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/repository/OriginalLoginRepository.kt (74%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/repository/ProjectRepository.kt (92%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/repository/TagRepository.kt (75%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/repository/UserRepository.kt (91%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/repository/ValidateRepository.kt (96%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/s3/DefaultS3Configuration.kt (91%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/s3/DefaultS3Operations.kt (99%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/s3/S3Operations.kt (99%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/s3/S3OperationsProperties.kt (98%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/security/CommentPermissionEvaluator.kt (77%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/security/OrganizationPermissionEvaluator.kt (93%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/security/ProjectPermissionEvaluator.kt (91%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/service/CommentService.kt (83%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/service/GitService.kt (87%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/service/LnkUserOrganizationService.kt (95%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/service/LnkUserProjectService.kt (91%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/service/LogService.kt (97%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/service/LokiConfig.kt (92%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/service/LokiLogService.kt (97%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/service/OrganizationService.kt (91%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/service/ProjectService.kt (93%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/service/UserService.kt (93%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/spring/entity/BaseEntity.kt (80%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/spring/entity/BaseEntityWithDate.kt (86%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/spring/entity/BaseEntityWithDateAndDto.kt (83%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/spring/entity/BaseEntityWithDto.kt (76%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/spring/entity/BaseEntityWithDtoWithId.kt (66%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/spring/entity/IBaseEntityWithDate.kt (91%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/spring/entity/IBaseEntityWithDto.kt (85%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/spring/entity/IBaseEntityWithDtoWithId.kt (70%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/spring/postprocessor/DockerSecretsDatabaseProcessor.kt (97%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/spring/repository/BaseEntityRepository.kt (82%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/spring/utils/WebClientUtils.kt (90%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/AbstractMigrationReactiveStorage.kt (96%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/AbstractReactiveStorage.kt (91%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/AbstractSimpleReactiveStorage.kt (82%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/AbstractSimpleSuspendingStorage.kt (83%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/AbstractSuspendingStorage.kt (91%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/AvatarKey.kt (60%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/AvatarStorage.kt (78%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/BackupStorageUtils.kt (94%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/DefaultStorageCoroutines.kt (94%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/DefaultStoragePreSignedUrl.kt (89%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/DefaultStorageProjectReactor.kt (97%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/ReactiveStorage.kt (84%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/ReactiveStorageWithDatabase.kt (81%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/S3StorageUtils.kt (96%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/StorageCoroutines.kt (98%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/StorageInitializer.kt (96%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/StoragePreSignedUrl.kt (85%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/StorageProjectReactor.kt (98%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/SuspendingStorage.kt (84%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/SuspendingStorageWithDatabase.kt (82%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/impl/AbstractInternalFileStorage.kt (94%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/impl/InternalFileKey.kt (96%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/key/AbstractS3KeyDatabaseManager.kt (91%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/key/AbstractS3KeyDtoManager.kt (79%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/key/AbstractS3KeyEntityManager.kt (79%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/key/AbstractS3KeyManager.kt (90%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/key/S3KeyManager.kt (96%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/request/DownloadRequest.kt (85%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/storage/request/UploadRequest.kt (91%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/test/analysis/metrics/TestMetricsMixin.kt (93%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/test/analysis/results/AnalysisResultMixin.kt (94%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/utils/AgentDownloadUtils.kt (95%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/utils/ArchiveUtils.kt (97%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/utils/AuthenticationUtils.kt (93%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/utils/BlockingBridge.kt (98%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/utils/BufferAccumulatedUntilReactorUtils.kt (97%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/utils/DateTimeUtilsJvm.kt (92%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/utils/ExceptionUtils.kt (97%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/utils/FileUtils.kt (99%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/utils/HttpUtils.kt (99%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/utils/KotlinUtilsJvm.kt (90%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/utils/LocalDateTimeUtils.kt (99%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/utils/PlatformUtils.kt (96%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/utils/ReactorUtils.kt (99%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/utils/ResponseWithTiming.kt (97%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/utils/SLF4JUtils.kt (98%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/utils/ServerTiming.kt (97%) rename {save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save => common/src/jvmMain/kotlin/com/saveourtool/common}/utils/SpringUtils.kt (94%) rename {save-cloud-common/src/jvmTest/kotlin/com/saveourtool/save => common/src/jvmTest/kotlin/com/saveourtool/common}/domain/SdkTest.kt (93%) rename {save-cloud-common/src/jvmTest/kotlin/com/saveourtool/save => common/src/jvmTest/kotlin/com/saveourtool/common}/utils/ReactorUtilsTest.kt (95%) rename {save-cloud-common/src/jvmTest/kotlin/com/saveourtool/save => common/src/jvmTest/kotlin/com/saveourtool/common}/validation/ValidationRegularExpressionsTest.kt (94%) rename {save-cloud-common/src/jvmTest/kotlin/com/saveourtool/save => common/src/jvmTest/kotlin/com/saveourtool/common}/validation/ValidationUtilsTest.kt (94%) rename {save-cloud-common/src/nativeMain/kotlin/com/saveourtool/save => common/src/nativeMain/kotlin/com/saveourtool/common}/utils/ArchiveUtils.kt (92%) rename {save-cloud-common/src/nativeMain/kotlin/com/saveourtool/save => common/src/nativeMain/kotlin/com/saveourtool/common}/utils/FileUtils.kt (98%) rename {save-cloud-common/src/nativeMain/kotlin/com/saveourtool/save => common/src/nativeMain/kotlin/com/saveourtool/common}/utils/PlatformUtils.kt (96%) delete mode 100644 save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/evententities/CommentEvent.kt delete mode 100644 save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/evententities/UserEvent.kt diff --git a/api-gateway/build.gradle.kts b/api-gateway/build.gradle.kts index 1f45f56987..c7d80dafe7 100644 --- a/api-gateway/build.gradle.kts +++ b/api-gateway/build.gradle.kts @@ -5,7 +5,7 @@ plugins { } dependencies { - api(projects.saveCloudCommon) + api(projects.common) implementation(libs.spring.cloud.starter.gateway) implementation(libs.spring.boot.starter.security) implementation(libs.spring.boot.starter.oauth2.client) diff --git a/api-gateway/src/main/kotlin/com/saveourtool/save/gateway/controller/SecurityInfoController.kt b/api-gateway/src/main/kotlin/com/saveourtool/save/gateway/controller/SecurityInfoController.kt index 5c749cbdae..363d210985 100644 --- a/api-gateway/src/main/kotlin/com/saveourtool/save/gateway/controller/SecurityInfoController.kt +++ b/api-gateway/src/main/kotlin/com/saveourtool/save/gateway/controller/SecurityInfoController.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.gateway.controller -import com.saveourtool.save.info.OauthProviderInfo +import com.saveourtool.common.info.OauthProviderInfo import org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository import org.springframework.web.bind.annotation.* diff --git a/api-gateway/src/main/kotlin/com/saveourtool/save/gateway/security/WebSecurityConfig.kt b/api-gateway/src/main/kotlin/com/saveourtool/save/gateway/security/WebSecurityConfig.kt index cc69f890e8..ea8c5ff7eb 100644 --- a/api-gateway/src/main/kotlin/com/saveourtool/save/gateway/security/WebSecurityConfig.kt +++ b/api-gateway/src/main/kotlin/com/saveourtool/save/gateway/security/WebSecurityConfig.kt @@ -4,11 +4,11 @@ package com.saveourtool.save.gateway.security +import com.saveourtool.common.info.UserStatus +import com.saveourtool.common.v1 import com.saveourtool.save.gateway.config.ConfigurationProperties import com.saveourtool.save.gateway.service.BackendService import com.saveourtool.save.gateway.utils.StoringServerAuthenticationSuccessHandler -import com.saveourtool.save.info.UserStatus -import com.saveourtool.save.v1 import org.springframework.context.annotation.Bean import org.springframework.core.annotation.Order diff --git a/api-gateway/src/main/kotlin/com/saveourtool/save/gateway/service/BackendService.kt b/api-gateway/src/main/kotlin/com/saveourtool/save/gateway/service/BackendService.kt index cb025e1a84..7e6a0ae3d6 100644 --- a/api-gateway/src/main/kotlin/com/saveourtool/save/gateway/service/BackendService.kt +++ b/api-gateway/src/main/kotlin/com/saveourtool/save/gateway/service/BackendService.kt @@ -1,13 +1,13 @@ package com.saveourtool.save.gateway.service +import com.saveourtool.common.entities.User +import com.saveourtool.common.utils.SAVE_USER_ID_ATTRIBUTE +import com.saveourtool.common.utils.orNotFound +import com.saveourtool.common.utils.switchIfEmptyToResponseException import com.saveourtool.save.authservice.utils.SaveUserDetails -import com.saveourtool.save.entities.User import com.saveourtool.save.gateway.config.ConfigurationProperties -import com.saveourtool.save.utils.SAVE_USER_ID_ATTRIBUTE -import com.saveourtool.save.utils.orNotFound -import com.saveourtool.save.utils.switchIfEmptyToResponseException -import org.springframework.http.HttpStatus +import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.security.authentication.BadCredentialsException import org.springframework.security.authentication.UsernamePasswordAuthenticationToken @@ -21,6 +21,7 @@ import org.springframework.web.server.WebSession import reactor.core.publisher.Mono import reactor.kotlin.core.publisher.switchIfEmpty import reactor.kotlin.core.publisher.toMono + import java.security.Principal /** diff --git a/api-gateway/src/main/kotlin/com/saveourtool/save/gateway/utils/StoringServerAuthenticationSuccessHandler.kt b/api-gateway/src/main/kotlin/com/saveourtool/save/gateway/utils/StoringServerAuthenticationSuccessHandler.kt index 3d300aa693..20079b0779 100644 --- a/api-gateway/src/main/kotlin/com/saveourtool/save/gateway/utils/StoringServerAuthenticationSuccessHandler.kt +++ b/api-gateway/src/main/kotlin/com/saveourtool/save/gateway/utils/StoringServerAuthenticationSuccessHandler.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.gateway.utils +import com.saveourtool.common.utils.SAVE_USER_ID_ATTRIBUTE import com.saveourtool.save.gateway.service.BackendService -import com.saveourtool.save.utils.SAVE_USER_ID_ATTRIBUTE import org.slf4j.LoggerFactory import org.springframework.security.authentication.BadCredentialsException diff --git a/authentication-service/build.gradle.kts b/authentication-service/build.gradle.kts index e3fb27980c..678776ec5d 100644 --- a/authentication-service/build.gradle.kts +++ b/authentication-service/build.gradle.kts @@ -21,7 +21,7 @@ kotlin { } dependencies { - implementation(projects.saveCloudCommon) + implementation(projects.common) implementation(libs.spring.boot.starter.security) implementation(libs.spring.security.core) implementation("org.springframework:spring-jdbc") diff --git a/authentication-service/src/main/kotlin/com/saveourtool/save/authservice/config/WebSecurityConfig.kt b/authentication-service/src/main/kotlin/com/saveourtool/save/authservice/config/WebSecurityConfig.kt index 6d924879c2..0f1bfa3a6d 100644 --- a/authentication-service/src/main/kotlin/com/saveourtool/save/authservice/config/WebSecurityConfig.kt +++ b/authentication-service/src/main/kotlin/com/saveourtool/save/authservice/config/WebSecurityConfig.kt @@ -4,9 +4,9 @@ package com.saveourtool.save.authservice.config +import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.SaveUserDetails.Companion.toSaveUserDetails import com.saveourtool.save.authservice.utils.roleHierarchy -import com.saveourtool.save.v1 import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Profile diff --git a/authentication-service/src/main/kotlin/com/saveourtool/save/authservice/utils/SaveUserDetails.kt b/authentication-service/src/main/kotlin/com/saveourtool/save/authservice/utils/SaveUserDetails.kt index 4f029fbead..03111af392 100644 --- a/authentication-service/src/main/kotlin/com/saveourtool/save/authservice/utils/SaveUserDetails.kt +++ b/authentication-service/src/main/kotlin/com/saveourtool/save/authservice/utils/SaveUserDetails.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.authservice.utils -import com.saveourtool.save.entities.User -import com.saveourtool.save.utils.* +import com.saveourtool.common.entities.User +import com.saveourtool.common.utils.* import com.fasterxml.jackson.annotation.JsonIgnore import org.springframework.http.HttpHeaders diff --git a/authentication-service/src/main/kotlin/com/saveourtool/save/authservice/utils/SecurityUtils.kt b/authentication-service/src/main/kotlin/com/saveourtool/save/authservice/utils/SecurityUtils.kt index c1509db3d4..04510e1021 100644 --- a/authentication-service/src/main/kotlin/com/saveourtool/save/authservice/utils/SecurityUtils.kt +++ b/authentication-service/src/main/kotlin/com/saveourtool/save/authservice/utils/SecurityUtils.kt @@ -4,8 +4,8 @@ package com.saveourtool.save.authservice.utils -import com.saveourtool.save.domain.Role -import com.saveourtool.save.info.UserStatus +import com.saveourtool.common.domain.Role +import com.saveourtool.common.info.UserStatus import org.springframework.security.access.hierarchicalroles.RoleHierarchy import org.springframework.security.access.hierarchicalroles.RoleHierarchyImpl import org.springframework.security.access.hierarchicalroles.RoleHierarchyUtils diff --git a/authentication-service/src/test/kotlin/com/saveourtool/save/authservice/utils/SaveUserDetailsTest.kt b/authentication-service/src/test/kotlin/com/saveourtool/save/authservice/utils/SaveUserDetailsTest.kt index a9d900c1e0..d7cc4d0391 100644 --- a/authentication-service/src/test/kotlin/com/saveourtool/save/authservice/utils/SaveUserDetailsTest.kt +++ b/authentication-service/src/test/kotlin/com/saveourtool/save/authservice/utils/SaveUserDetailsTest.kt @@ -1,10 +1,10 @@ package com.saveourtool.save.authservice.utils import com.saveourtool.save.authservice.utils.SaveUserDetails.Companion.toSaveUserDetails -import com.saveourtool.save.utils.AUTHORIZATION_ID -import com.saveourtool.save.utils.AUTHORIZATION_NAME -import com.saveourtool.save.utils.AUTHORIZATION_ROLES -import com.saveourtool.save.utils.AUTHORIZATION_STATUS +import com.saveourtool.common.utils.AUTHORIZATION_ID +import com.saveourtool.common.utils.AUTHORIZATION_NAME +import com.saveourtool.common.utils.AUTHORIZATION_ROLES +import com.saveourtool.common.utils.AUTHORIZATION_STATUS import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertThrows diff --git a/save-cloud-common/README.md b/common/README.md similarity index 100% rename from save-cloud-common/README.md rename to common/README.md diff --git a/save-cloud-common/build.gradle.kts b/common/build.gradle.kts similarity index 100% rename from save-cloud-common/build.gradle.kts rename to common/build.gradle.kts diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/ApiVersions.kt b/common/src/commonMain/kotlin/com/saveourtool/common/ApiVersions.kt similarity index 89% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/ApiVersions.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/ApiVersions.kt index fd3f6437f0..002fc7e8a6 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/ApiVersions.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/ApiVersions.kt @@ -5,7 +5,7 @@ @file:Suppress("VARIABLE_NAME_INCORRECT", "CONSTANT_UPPERCASE", "TopLevelPropertyNaming") @file:JsExport -package com.saveourtool.save +package com.saveourtool.common import kotlin.js.JsExport diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/AgentEnvName.kt b/common/src/commonMain/kotlin/com/saveourtool/common/agent/AgentEnvName.kt similarity index 86% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/AgentEnvName.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/agent/AgentEnvName.kt index b056491683..eb5e23fd3e 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/AgentEnvName.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/agent/AgentEnvName.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.agent +package com.saveourtool.common.agent /** * Env names which agent supports and expects diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/AgentInfo.kt b/common/src/commonMain/kotlin/com/saveourtool/common/agent/AgentInfo.kt similarity index 90% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/AgentInfo.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/agent/AgentInfo.kt index f12097acc4..c39f7f0b9b 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/AgentInfo.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/agent/AgentInfo.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.agent +package com.saveourtool.common.agent import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/AgentInitConfig.kt b/common/src/commonMain/kotlin/com/saveourtool/common/agent/AgentInitConfig.kt similarity index 80% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/AgentInitConfig.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/agent/AgentInitConfig.kt index 0d797dcb9c..70552e07ba 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/AgentInitConfig.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/agent/AgentInitConfig.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.agent +package com.saveourtool.common.agent -import com.saveourtool.save.utils.DEFAULT_SETUP_SH_TIMEOUT_MILLIS +import com.saveourtool.common.utils.DEFAULT_SETUP_SH_TIMEOUT_MILLIS import kotlinx.serialization.Serializable /** @@ -15,6 +15,6 @@ data class AgentInitConfig( val saveCliUrl: String, val testSuitesSourceSnapshotUrl: String, val additionalFileNameToUrl: Map, - val saveCliOverrides: SaveCliOverrides, + val saveCliOverrides: com.saveourtool.common.agent.SaveCliOverrides, val setupShTimeoutMillis: Long = DEFAULT_SETUP_SH_TIMEOUT_MILLIS, ) diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/AgentRunConfig.kt b/common/src/commonMain/kotlin/com/saveourtool/common/agent/AgentRunConfig.kt similarity index 82% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/AgentRunConfig.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/agent/AgentRunConfig.kt index c0ce5515e0..235eec82ad 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/AgentRunConfig.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/agent/AgentRunConfig.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.agent +package com.saveourtool.common.agent -import com.saveourtool.save.domain.TestResultDebugInfo +import com.saveourtool.common.domain.TestResultDebugInfo import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/AgentState.kt b/common/src/commonMain/kotlin/com/saveourtool/common/agent/AgentState.kt similarity index 95% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/AgentState.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/agent/AgentState.kt index 29d6d68525..378d2c5684 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/AgentState.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/agent/AgentState.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.agent +package com.saveourtool.common.agent import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/Heartbeat.kt b/common/src/commonMain/kotlin/com/saveourtool/common/agent/Heartbeat.kt similarity index 97% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/Heartbeat.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/agent/Heartbeat.kt index 57c77e04c4..134c9277f6 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/Heartbeat.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/agent/Heartbeat.kt @@ -2,7 +2,7 @@ * Model classes for heartbeating between save agent and the orchestrator */ -package com.saveourtool.save.agent +package com.saveourtool.common.agent import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/SaveCliOverrides.kt b/common/src/commonMain/kotlin/com/saveourtool/common/agent/SaveCliOverrides.kt similarity index 94% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/SaveCliOverrides.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/agent/SaveCliOverrides.kt index 3283d56836..a0eef58ab0 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/SaveCliOverrides.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/agent/SaveCliOverrides.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.agent +package com.saveourtool.common.agent import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/TestExecutionDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/agent/TestExecutionDto.kt similarity index 81% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/TestExecutionDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/agent/TestExecutionDto.kt index 577c38266b..578e5f6988 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/TestExecutionDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/agent/TestExecutionDto.kt @@ -1,10 +1,10 @@ -package com.saveourtool.save.agent +package com.saveourtool.common.agent -import com.saveourtool.save.domain.TestResultStatus -import com.saveourtool.save.entities.DtoWithId -import com.saveourtool.save.test.analysis.metrics.NoDataAvailable -import com.saveourtool.save.test.analysis.metrics.TestMetrics -import com.saveourtool.save.test.analysis.results.AnalysisResult +import com.saveourtool.common.domain.TestResultStatus +import com.saveourtool.common.entities.DtoWithId +import com.saveourtool.common.test.analysis.metrics.NoDataAvailable +import com.saveourtool.common.test.analysis.metrics.TestMetrics +import com.saveourtool.common.test.analysis.results.AnalysisResult import kotlinx.serialization.Serializable @@ -53,8 +53,8 @@ data class TestExecutionDto( hasDebugInfo: Boolean? = null, testMetrics: TestMetrics = NoDataAvailable.instance, analysisResults: List = emptyList(), - ): TestExecutionExtDto = - TestExecutionExtDto( + ): com.saveourtool.common.agent.TestExecutionExtDto = + com.saveourtool.common.agent.TestExecutionExtDto( this, hasDebugInfo, testMetrics, diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/TestExecutionExtDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/agent/TestExecutionExtDto.kt similarity index 69% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/TestExecutionExtDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/agent/TestExecutionExtDto.kt index e8c06909ee..38b122733b 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/TestExecutionExtDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/agent/TestExecutionExtDto.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.agent +package com.saveourtool.common.agent -import com.saveourtool.save.test.analysis.metrics.NoDataAvailable -import com.saveourtool.save.test.analysis.metrics.TestMetrics -import com.saveourtool.save.test.analysis.results.AnalysisResult +import com.saveourtool.common.test.analysis.metrics.NoDataAvailable +import com.saveourtool.common.test.analysis.metrics.TestMetrics +import com.saveourtool.common.test.analysis.results.AnalysisResult import kotlinx.serialization.Serializable /** @@ -19,7 +19,7 @@ import kotlinx.serialization.Serializable */ @Serializable data class TestExecutionExtDto( - val testExecution: TestExecutionDto, + val testExecution: com.saveourtool.common.agent.TestExecutionDto, val hasDebugInfo: Boolean? = null, val testMetrics: TestMetrics = NoDataAvailable.instance, val analysisResults: List = emptyList(), diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/TestExecutionResult.kt b/common/src/commonMain/kotlin/com/saveourtool/common/agent/TestExecutionResult.kt similarity index 91% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/TestExecutionResult.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/agent/TestExecutionResult.kt index f48726634e..645b2f73e9 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/TestExecutionResult.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/agent/TestExecutionResult.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.agent +package com.saveourtool.common.agent -import com.saveourtool.save.domain.TestResultStatus +import com.saveourtool.common.domain.TestResultStatus import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/TestSuiteExecutionStatisticDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/agent/TestSuiteExecutionStatisticDto.kt similarity index 78% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/TestSuiteExecutionStatisticDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/agent/TestSuiteExecutionStatisticDto.kt index 40c6bd61f5..1a33a37107 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/agent/TestSuiteExecutionStatisticDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/agent/TestSuiteExecutionStatisticDto.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.agent +package com.saveourtool.common.agent -import com.saveourtool.save.domain.TestResultStatus +import com.saveourtool.common.domain.TestResultStatus import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/coroutines/flow/Flow.kt b/common/src/commonMain/kotlin/com/saveourtool/common/coroutines/flow/Flow.kt similarity index 96% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/coroutines/flow/Flow.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/coroutines/flow/Flow.kt index fac7741f01..8516a544d1 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/coroutines/flow/Flow.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/coroutines/flow/Flow.kt @@ -1,7 +1,7 @@ @file:JvmName("Flow") @file:Suppress("HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE") -package com.saveourtool.save.coroutines.flow +package com.saveourtool.common.coroutines.flow import okio.Buffer import kotlin.jvm.JvmName diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/CvssVectorAbstract.kt b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/CvssVectorAbstract.kt similarity index 95% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/CvssVectorAbstract.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/CvssVectorAbstract.kt index 4573edcdfb..a09e4be4ca 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/CvssVectorAbstract.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/CvssVectorAbstract.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.cvsscalculator +package com.saveourtool.common.cvsscalculator import kotlin.math.roundToInt diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/CvssVersion.kt b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/CvssVersion.kt similarity index 85% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/CvssVersion.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/CvssVersion.kt index e51e095af9..d5a45ec435 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/CvssVersion.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/CvssVersion.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.cvsscalculator +package com.saveourtool.common.cvsscalculator import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/ICvssMetrics.kt b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/ICvssMetrics.kt similarity index 88% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/ICvssMetrics.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/ICvssMetrics.kt index d6e64aa596..04d4f67611 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/ICvssMetrics.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/ICvssMetrics.kt @@ -1,6 +1,6 @@ @file:Suppress("FILE_NAME_INCORRECT") -package com.saveourtool.save.cvsscalculator +package com.saveourtool.common.cvsscalculator /** * Base interface for all BaseMetrics classes diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/ICvssVector.kt b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/ICvssVector.kt similarity index 91% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/ICvssVector.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/ICvssVector.kt index ebf2097d13..120281ac84 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/ICvssVector.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/ICvssVector.kt @@ -1,6 +1,6 @@ @file:Suppress("FILE_NAME_INCORRECT") -package com.saveourtool.save.cvsscalculator +package com.saveourtool.common.cvsscalculator /** * Base interface for CvssVector classes diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/ScoreCalculator.kt b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/ScoreCalculator.kt similarity index 88% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/ScoreCalculator.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/ScoreCalculator.kt index f97898fd0a..f368c90841 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/ScoreCalculator.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/ScoreCalculator.kt @@ -3,10 +3,10 @@ "HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE", ) -package com.saveourtool.save.cvsscalculator +package com.saveourtool.common.cvsscalculator -import com.saveourtool.save.cvsscalculator.v2.* -import com.saveourtool.save.cvsscalculator.v3.* +import com.saveourtool.common.cvsscalculator.v2.* +import com.saveourtool.common.cvsscalculator.v3.* const val CVSS_VERSION = "CVSS" diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v2/BaseMetricsV2.kt b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v2/BaseMetricsV2.kt similarity index 94% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v2/BaseMetricsV2.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v2/BaseMetricsV2.kt index 809e8f6477..e652b25c41 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v2/BaseMetricsV2.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v2/BaseMetricsV2.kt @@ -1,9 +1,9 @@ @file:Suppress("HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE") -package com.saveourtool.save.cvsscalculator.v2 +package com.saveourtool.common.cvsscalculator.v2 -import com.saveourtool.save.cvsscalculator.* -import com.saveourtool.save.cvsscalculator.v3.* +import com.saveourtool.common.cvsscalculator.* +import com.saveourtool.common.cvsscalculator.v3.* import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v2/CvssVectorV2.kt b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v2/CvssVectorV2.kt similarity index 89% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v2/CvssVectorV2.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v2/CvssVectorV2.kt index e55be774c5..9fd552fb74 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v2/CvssVectorV2.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v2/CvssVectorV2.kt @@ -1,9 +1,9 @@ -package com.saveourtool.save.cvsscalculator.v2 +package com.saveourtool.common.cvsscalculator.v2 -import com.saveourtool.save.cvsscalculator.CvssVectorAbstract -import com.saveourtool.save.cvsscalculator.CvssVersion -import com.saveourtool.save.cvsscalculator.findOrElseThrow -import com.saveourtool.save.cvsscalculator.v3.* +import com.saveourtool.common.cvsscalculator.CvssVectorAbstract +import com.saveourtool.common.cvsscalculator.CvssVersion +import com.saveourtool.common.cvsscalculator.findOrElseThrow +import com.saveourtool.common.cvsscalculator.v3.* import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v2/VectorTypesV2.kt b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v2/VectorTypesV2.kt similarity index 95% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v2/VectorTypesV2.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v2/VectorTypesV2.kt index 0110833b2b..dbfcad8a4a 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v2/VectorTypesV2.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v2/VectorTypesV2.kt @@ -1,6 +1,6 @@ @file:Suppress("HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE") -package com.saveourtool.save.cvsscalculator.v2 +package com.saveourtool.common.cvsscalculator.v2 import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v2/WeightV2.kt b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v2/WeightV2.kt similarity index 94% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v2/WeightV2.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v2/WeightV2.kt index f8af06ee5d..1e30eb2137 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v2/WeightV2.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v2/WeightV2.kt @@ -3,7 +3,7 @@ "MagicNumber", ) -package com.saveourtool.save.cvsscalculator.v2 +package com.saveourtool.common.cvsscalculator.v2 @Suppress("VARIABLE_NAME_INCORRECT_FORMAT") val accessV = mapOf( diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v3/BaseMetricsV3.kt b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v3/BaseMetricsV3.kt similarity index 96% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v3/BaseMetricsV3.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v3/BaseMetricsV3.kt index 0ba2bb5ff8..82b130f2c5 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v3/BaseMetricsV3.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v3/BaseMetricsV3.kt @@ -1,8 +1,8 @@ @file:Suppress("HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE") -package com.saveourtool.save.cvsscalculator.v3 +package com.saveourtool.common.cvsscalculator.v3 -import com.saveourtool.save.cvsscalculator.* +import com.saveourtool.common.cvsscalculator.* import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v3/CvssVectorV3.kt b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v3/CvssVectorV3.kt similarity index 91% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v3/CvssVectorV3.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v3/CvssVectorV3.kt index b281f80d1e..ab24807879 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v3/CvssVectorV3.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v3/CvssVectorV3.kt @@ -1,9 +1,9 @@ -package com.saveourtool.save.cvsscalculator.v3 +package com.saveourtool.common.cvsscalculator.v3 -import com.saveourtool.save.cvsscalculator.CvssVectorAbstract -import com.saveourtool.save.cvsscalculator.CvssVersion -import com.saveourtool.save.cvsscalculator.findOrElseThrow -import com.saveourtool.save.cvsscalculator.v2.BaseMetricsV2Names +import com.saveourtool.common.cvsscalculator.CvssVectorAbstract +import com.saveourtool.common.cvsscalculator.CvssVersion +import com.saveourtool.common.cvsscalculator.findOrElseThrow +import com.saveourtool.common.cvsscalculator.v2.BaseMetricsV2Names import kotlin.math.min import kotlin.math.pow diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v3/VectorTypesV3.kt b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v3/VectorTypesV3.kt similarity index 96% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v3/VectorTypesV3.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v3/VectorTypesV3.kt index da217245aa..a19b7a4b4b 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v3/VectorTypesV3.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v3/VectorTypesV3.kt @@ -1,6 +1,6 @@ @file:Suppress("HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE") -package com.saveourtool.save.cvsscalculator.v3 +package com.saveourtool.common.cvsscalculator.v3 import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v3/WeightV3.kt b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v3/WeightV3.kt similarity index 95% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v3/WeightV3.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v3/WeightV3.kt index b8bcbfef40..8c04e194c6 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/cvsscalculator/v3/WeightV3.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/cvsscalculator/v3/WeightV3.kt @@ -3,7 +3,7 @@ "MagicNumber", ) -package com.saveourtool.save.cvsscalculator.v3 +package com.saveourtool.common.cvsscalculator.v3 val av = mapOf( AttackVectorType.NETWORK.value to 0.85f, diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/DemoAgentConfig.kt b/common/src/commonMain/kotlin/com/saveourtool/common/demo/DemoAgentConfig.kt similarity index 95% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/DemoAgentConfig.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/demo/DemoAgentConfig.kt index 6b5d5c4494..094010bc61 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/DemoAgentConfig.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/demo/DemoAgentConfig.kt @@ -2,9 +2,9 @@ * Configuration data classes */ -package com.saveourtool.save.demo +package com.saveourtool.common.demo -import com.saveourtool.save.utils.DEFAULT_SETUP_SH_TIMEOUT_MILLIS +import com.saveourtool.common.utils.DEFAULT_SETUP_SH_TIMEOUT_MILLIS import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/DemoCreationRequest.kt b/common/src/commonMain/kotlin/com/saveourtool/common/demo/DemoCreationRequest.kt similarity index 73% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/DemoCreationRequest.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/demo/DemoCreationRequest.kt index 011ca321eb..23fb68d8b8 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/DemoCreationRequest.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/demo/DemoCreationRequest.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.demo +package com.saveourtool.common.demo -import com.saveourtool.save.entities.FileDto +import com.saveourtool.common.entities.FileDto import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/DemoDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/demo/DemoDto.kt similarity index 95% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/DemoDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/demo/DemoDto.kt index c682fa3d68..5378eff88a 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/DemoDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/demo/DemoDto.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.demo +package com.saveourtool.common.demo -import com.saveourtool.save.domain.ProjectCoordinates -import com.saveourtool.save.domain.Sdk +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.domain.Sdk import kotlinx.serialization.Serializable typealias RunCommandMap = Map diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/DemoResult.kt b/common/src/commonMain/kotlin/com/saveourtool/common/demo/DemoResult.kt similarity index 95% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/DemoResult.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/demo/DemoResult.kt index fd874b956b..0ca66dcf94 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/DemoResult.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/demo/DemoResult.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.demo +package com.saveourtool.common.demo import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/DemoRunRequest.kt b/common/src/commonMain/kotlin/com/saveourtool/common/demo/DemoRunRequest.kt similarity index 93% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/DemoRunRequest.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/demo/DemoRunRequest.kt index 223df4b1bf..df23847d64 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/DemoRunRequest.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/demo/DemoRunRequest.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.demo +package com.saveourtool.common.demo import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/DemoStatus.kt b/common/src/commonMain/kotlin/com/saveourtool/common/demo/DemoStatus.kt similarity index 97% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/DemoStatus.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/demo/DemoStatus.kt index d45d7329db..0327082438 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/DemoStatus.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/demo/DemoStatus.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.demo +package com.saveourtool.common.demo import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgAdditionalParams.kt b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgAdditionalParams.kt similarity index 80% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgAdditionalParams.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgAdditionalParams.kt index cd3217cb40..fccaeeba5a 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgAdditionalParams.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgAdditionalParams.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.demo.cpg +package com.saveourtool.common.demo.cpg -import com.saveourtool.save.utils.Languages +import com.saveourtool.common.utils.Languages import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgEdge.kt b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgEdge.kt similarity index 96% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgEdge.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgEdge.kt index 3ee41884c9..7071c16fd4 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgEdge.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgEdge.kt @@ -2,7 +2,7 @@ * File that contains CpgEdge definition */ -package com.saveourtool.save.demo.cpg +package com.saveourtool.common.demo.cpg import kotlinx.serialization.EncodeDefault import kotlinx.serialization.EncodeDefault.Mode.ALWAYS diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgEngine.kt b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgEngine.kt similarity index 91% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgEngine.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgEngine.kt index c0eb025ed0..f5de82db96 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgEngine.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgEngine.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.demo.cpg +package com.saveourtool.common.demo.cpg /** * Engines for CPG demo diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgGraph.kt b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgGraph.kt similarity index 99% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgGraph.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgGraph.kt index b34634bb05..11f0511239 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgGraph.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgGraph.kt @@ -2,7 +2,7 @@ * File that contains CpgGraph definition */ -package com.saveourtool.save.demo.cpg +package com.saveourtool.common.demo.cpg import kotlin.random.Random import kotlinx.serialization.EncodeDefault diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgNode.kt b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgNode.kt similarity index 97% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgNode.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgNode.kt index fb6a16f516..fad88298a5 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgNode.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgNode.kt @@ -2,7 +2,7 @@ * File that contains CpgNode definition */ -package com.saveourtool.save.demo.cpg +package com.saveourtool.common.demo.cpg import kotlinx.serialization.EncodeDefault import kotlinx.serialization.EncodeDefault.Mode.ALWAYS diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgResult.kt b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgResult.kt similarity index 92% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgResult.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgResult.kt index 41c07a222f..b5e5dc0791 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgResult.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgResult.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.demo.cpg +package com.saveourtool.common.demo.cpg import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgRunRequest.kt b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgRunRequest.kt similarity index 90% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgRunRequest.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgRunRequest.kt index 336edf2707..07689ff3ad 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/CpgRunRequest.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/CpgRunRequest.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.demo.cpg +package com.saveourtool.common.demo.cpg import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/cytoscape/CytoscapeEdge.kt b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/cytoscape/CytoscapeEdge.kt similarity index 89% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/cytoscape/CytoscapeEdge.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/cytoscape/CytoscapeEdge.kt index 873255f751..f258a30418 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/cytoscape/CytoscapeEdge.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/cytoscape/CytoscapeEdge.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.demo.cpg.cytoscape +package com.saveourtool.common.demo.cpg.cytoscape import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/cytoscape/CytoscapeGraph.kt b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/cytoscape/CytoscapeGraph.kt similarity index 88% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/cytoscape/CytoscapeGraph.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/cytoscape/CytoscapeGraph.kt index ae944c1831..f2e8198cdd 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/cytoscape/CytoscapeGraph.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/cytoscape/CytoscapeGraph.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.demo.cpg.cytoscape +package com.saveourtool.common.demo.cpg.cytoscape import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/cytoscape/CytoscapeLayout.kt b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/cytoscape/CytoscapeLayout.kt similarity index 96% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/cytoscape/CytoscapeLayout.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/cytoscape/CytoscapeLayout.kt index fa4ea0f7db..2f64b8dc73 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/cytoscape/CytoscapeLayout.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/cytoscape/CytoscapeLayout.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.demo.cpg.cytoscape +package com.saveourtool.common.demo.cpg.cytoscape /** * @property layoutName lib-defined name of layout diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/cytoscape/CytoscapeNode.kt b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/cytoscape/CytoscapeNode.kt similarity index 92% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/cytoscape/CytoscapeNode.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/cytoscape/CytoscapeNode.kt index d1d95cdae9..d555b9160a 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/demo/cpg/cytoscape/CytoscapeNode.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/demo/cpg/cytoscape/CytoscapeNode.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.demo.cpg.cytoscape +package com.saveourtool.common.demo.cpg.cytoscape -import com.saveourtool.save.demo.cpg.CpgNodeAdditionalInfo +import com.saveourtool.common.demo.cpg.CpgNodeAdditionalInfo import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/EntitySaveStatus.kt b/common/src/commonMain/kotlin/com/saveourtool/common/domain/EntitySaveStatus.kt similarity index 91% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/EntitySaveStatus.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/domain/EntitySaveStatus.kt index f2c0c3837c..4bde3e41cc 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/EntitySaveStatus.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/domain/EntitySaveStatus.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.domain +package com.saveourtool.common.domain import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/OrganizationSaveStatus.kt b/common/src/commonMain/kotlin/com/saveourtool/common/domain/OrganizationSaveStatus.kt similarity index 84% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/OrganizationSaveStatus.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/domain/OrganizationSaveStatus.kt index 59b80c2f0f..d7027bb419 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/OrganizationSaveStatus.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/domain/OrganizationSaveStatus.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.domain +package com.saveourtool.common.domain -import com.saveourtool.save.validation.NAMING_MAX_LENGTH +import com.saveourtool.common.validation.NAMING_MAX_LENGTH import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/PluginType.kt b/common/src/commonMain/kotlin/com/saveourtool/common/domain/PluginType.kt similarity index 96% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/PluginType.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/domain/PluginType.kt index e88f67a949..7c22800f74 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/PluginType.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/domain/PluginType.kt @@ -1,6 +1,6 @@ @file:Suppress("HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE") -package com.saveourtool.save.domain +package com.saveourtool.common.domain import com.saveourtool.save.core.config.TestConfigSections diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/ProjectCoordinates.kt b/common/src/commonMain/kotlin/com/saveourtool/common/domain/ProjectCoordinates.kt similarity index 95% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/ProjectCoordinates.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/domain/ProjectCoordinates.kt index 182830996a..0c83e2638c 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/ProjectCoordinates.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/domain/ProjectCoordinates.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.domain +package com.saveourtool.common.domain import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/ProjectSaveStatus.kt b/common/src/commonMain/kotlin/com/saveourtool/common/domain/ProjectSaveStatus.kt similarity index 90% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/ProjectSaveStatus.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/domain/ProjectSaveStatus.kt index b2a1498845..0bf7c797e5 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/ProjectSaveStatus.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/domain/ProjectSaveStatus.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.domain +package com.saveourtool.common.domain import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/Role.kt b/common/src/commonMain/kotlin/com/saveourtool/common/domain/Role.kt similarity index 98% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/Role.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/domain/Role.kt index 1170725268..0e572ba83b 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/Role.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/domain/Role.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.domain +package com.saveourtool.common.domain import kotlin.js.JsExport import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/RunConfiguration.kt b/common/src/commonMain/kotlin/com/saveourtool/common/domain/RunConfiguration.kt similarity index 90% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/RunConfiguration.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/domain/RunConfiguration.kt index 12bda97db4..6d9e18ca03 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/RunConfiguration.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/domain/RunConfiguration.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.domain +package com.saveourtool.common.domain import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/Sdk.kt b/common/src/commonMain/kotlin/com/saveourtool/common/domain/Sdk.kt similarity index 98% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/Sdk.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/domain/Sdk.kt index a387638aab..7828815dda 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/Sdk.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/domain/Sdk.kt @@ -2,7 +2,7 @@ * SDK which are supported for test execution in save-cloud */ -package com.saveourtool.save.domain +package com.saveourtool.common.domain import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/SourceSaveStatus.kt b/common/src/commonMain/kotlin/com/saveourtool/common/domain/SourceSaveStatus.kt similarity index 94% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/SourceSaveStatus.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/domain/SourceSaveStatus.kt index 1925216070..48168b99d4 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/SourceSaveStatus.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/domain/SourceSaveStatus.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.domain +package com.saveourtool.common.domain import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/TestResultLocation.kt b/common/src/commonMain/kotlin/com/saveourtool/common/domain/TestResultLocation.kt similarity index 96% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/TestResultLocation.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/domain/TestResultLocation.kt index 643e1107de..9499916508 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/TestResultLocation.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/domain/TestResultLocation.kt @@ -2,7 +2,7 @@ * data classes representing additional data associated with test executions */ -package com.saveourtool.save.domain +package com.saveourtool.common.domain import com.saveourtool.save.core.result.DebugInfo import com.saveourtool.save.core.result.TestStatus diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/TestResultStatus.kt b/common/src/commonMain/kotlin/com/saveourtool/common/domain/TestResultStatus.kt similarity index 94% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/TestResultStatus.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/domain/TestResultStatus.kt index 33d758d17d..ec784704b1 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/TestResultStatus.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/domain/TestResultStatus.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.domain +package com.saveourtool.common.domain import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/UserSaveStatus.kt b/common/src/commonMain/kotlin/com/saveourtool/common/domain/UserSaveStatus.kt similarity index 90% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/UserSaveStatus.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/domain/UserSaveStatus.kt index 1904218484..cb45dacb84 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/domain/UserSaveStatus.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/domain/UserSaveStatus.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.domain +package com.saveourtool.common.domain -import com.saveourtool.save.validation.NAMING_MAX_LENGTH +import com.saveourtool.common.validation.NAMING_MAX_LENGTH import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/AgentDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/AgentDto.kt similarity index 91% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/AgentDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/AgentDto.kt index 6009bee57d..180a0cbe57 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/AgentDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/AgentDto.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/AgentStatusDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/AgentStatusDto.kt similarity index 71% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/AgentStatusDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/AgentStatusDto.kt index a80f5df48b..e9a6f08863 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/AgentStatusDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/AgentStatusDto.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.agent.AgentState -import com.saveourtool.save.utils.getCurrentLocalDateTime +import com.saveourtool.common.agent.AgentState +import com.saveourtool.common.utils.getCurrentLocalDateTime import kotlinx.datetime.LocalDateTime typealias AgentStatusDtoList = List diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/CommentDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/CommentDto.kt similarity index 93% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/CommentDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/CommentDto.kt index 921e99e0cc..e136c29363 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/CommentDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/CommentDto.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities import kotlinx.datetime.LocalDateTime import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/DtoWithId.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/DtoWithId.kt similarity index 89% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/DtoWithId.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/DtoWithId.kt index 3bfa63305c..ffeac92837 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/DtoWithId.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/DtoWithId.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/FileDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/FileDto.kt similarity index 89% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/FileDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/FileDto.kt index e2b2958acb..e7776996aa 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/FileDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/FileDto.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.domain.ProjectCoordinates +import com.saveourtool.common.domain.ProjectCoordinates import kotlinx.datetime.LocalDateTime import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/GitDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/GitDto.kt similarity index 71% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/GitDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/GitDto.kt index 5919ed642e..a0c17740fe 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/GitDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/GitDto.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.validation.Validatable -import com.saveourtool.save.validation.isValidUrl +import com.saveourtool.common.validation.Validatable +import com.saveourtool.common.validation.isValidUrl import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/LnkContestTestSuiteDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/LnkContestTestSuiteDto.kt similarity index 58% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/LnkContestTestSuiteDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/LnkContestTestSuiteDto.kt index 78863a738e..1e6706a42d 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/LnkContestTestSuiteDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/LnkContestTestSuiteDto.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.entities.contest.ContestDto -import com.saveourtool.save.testsuite.TestSuiteDto +import com.saveourtool.common.entities.contest.ContestDto +import com.saveourtool.common.testsuite.TestSuiteDto import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/LnkExecutionAgentDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/LnkExecutionAgentDto.kt similarity index 68% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/LnkExecutionAgentDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/LnkExecutionAgentDto.kt index d266cfab10..7af9e17dd1 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/LnkExecutionAgentDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/LnkExecutionAgentDto.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.execution.ExecutionDto +import com.saveourtool.common.execution.ExecutionDto import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/LnkExecutionFileDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/LnkExecutionFileDto.kt similarity index 67% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/LnkExecutionFileDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/LnkExecutionFileDto.kt index 1a4ade299a..691d6c693c 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/LnkExecutionFileDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/LnkExecutionFileDto.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.execution.ExecutionDto +import com.saveourtool.common.execution.ExecutionDto import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/LnkExecutionTestSuiteDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/LnkExecutionTestSuiteDto.kt similarity index 59% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/LnkExecutionTestSuiteDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/LnkExecutionTestSuiteDto.kt index f3fa4faec4..3d3a6d16dc 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/LnkExecutionTestSuiteDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/LnkExecutionTestSuiteDto.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.execution.ExecutionDto -import com.saveourtool.save.testsuite.TestSuiteDto +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.testsuite.TestSuiteDto import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/LnkOrganizationTestSuiteDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/LnkOrganizationTestSuiteDto.kt similarity index 73% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/LnkOrganizationTestSuiteDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/LnkOrganizationTestSuiteDto.kt index 85f5d202be..e1031abdbc 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/LnkOrganizationTestSuiteDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/LnkOrganizationTestSuiteDto.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.permission.Rights -import com.saveourtool.save.testsuite.TestSuiteDto +import com.saveourtool.common.permission.Rights +import com.saveourtool.common.testsuite.TestSuiteDto import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/NotificationDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/NotificationDto.kt similarity index 87% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/NotificationDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/NotificationDto.kt index 0d4aa65700..56dc6fa086 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/NotificationDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/NotificationDto.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities import kotlinx.datetime.LocalDateTime import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/OrganizationDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/OrganizationDto.kt similarity index 87% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/OrganizationDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/OrganizationDto.kt index 65ac2f6821..fba410ca5c 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/OrganizationDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/OrganizationDto.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.utils.getCurrentLocalDateTime -import com.saveourtool.save.validation.Validatable -import com.saveourtool.save.validation.isValidName +import com.saveourtool.common.utils.getCurrentLocalDateTime +import com.saveourtool.common.validation.Validatable +import com.saveourtool.common.validation.isValidName import kotlinx.datetime.LocalDateTime import kotlinx.serialization.Contextual diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/OrganizationStatus.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/OrganizationStatus.kt similarity index 90% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/OrganizationStatus.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/OrganizationStatus.kt index 08a8387d3c..a6eb7d153b 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/OrganizationStatus.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/OrganizationStatus.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/OrganizationWithRating.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/OrganizationWithRating.kt similarity index 84% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/OrganizationWithRating.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/OrganizationWithRating.kt index 48c508639a..50baa4b971 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/OrganizationWithRating.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/OrganizationWithRating.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/OrganizationWithUsers.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/OrganizationWithUsers.kt similarity index 77% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/OrganizationWithUsers.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/OrganizationWithUsers.kt index 26ef6bf015..532f23410c 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/OrganizationWithUsers.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/OrganizationWithUsers.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.domain.Role +import com.saveourtool.common.domain.Role import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/ProjectDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/ProjectDto.kt similarity index 90% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/ProjectDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/ProjectDto.kt index bc196f461c..236e2a9b60 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/ProjectDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/ProjectDto.kt @@ -1,9 +1,9 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.validation.Validatable -import com.saveourtool.save.validation.isValidEmail -import com.saveourtool.save.validation.isValidName -import com.saveourtool.save.validation.isValidUrl +import com.saveourtool.common.validation.Validatable +import com.saveourtool.common.validation.isValidEmail +import com.saveourtool.common.validation.isValidName +import com.saveourtool.common.validation.isValidUrl import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/ProjectProblemCritical.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/ProjectProblemCritical.kt similarity index 93% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/ProjectProblemCritical.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/ProjectProblemCritical.kt index 185ee66cf2..6180300d51 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/ProjectProblemCritical.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/ProjectProblemCritical.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/ProjectProblemDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/ProjectProblemDto.kt similarity index 94% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/ProjectProblemDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/ProjectProblemDto.kt index 987df5d1d1..1760c1f118 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/ProjectProblemDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/ProjectProblemDto.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/ProjectStatus.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/ProjectStatus.kt similarity index 90% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/ProjectStatus.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/ProjectStatus.kt index 1fde807338..a3f5cbb671 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/ProjectStatus.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/ProjectStatus.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/TestSuitesSourceSnapshotDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/TestSuitesSourceSnapshotDto.kt similarity index 90% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/TestSuitesSourceSnapshotDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/TestSuitesSourceSnapshotDto.kt index ccf170b154..344ba5d23c 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/TestSuitesSourceSnapshotDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/TestSuitesSourceSnapshotDto.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities import kotlinx.datetime.LocalDateTime diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/benchmarks/BenchmarkEntity.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/benchmarks/BenchmarkEntity.kt similarity index 96% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/benchmarks/BenchmarkEntity.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/benchmarks/BenchmarkEntity.kt index f473074f4b..f6a0a8de3e 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/benchmarks/BenchmarkEntity.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/benchmarks/BenchmarkEntity.kt @@ -2,7 +2,7 @@ * Common class for representing the entity used in awesome-benchamrks */ -package com.saveourtool.save.entities.benchmarks +package com.saveourtool.common.entities.benchmarks import kotlin.js.JsExport import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/contest/ContestDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/contest/ContestDto.kt similarity index 84% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/contest/ContestDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/contest/ContestDto.kt index b325b2a421..afec24c691 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/contest/ContestDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/contest/ContestDto.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.entities.contest +package com.saveourtool.common.entities.contest -import com.saveourtool.save.testsuite.TestSuiteVersioned -import com.saveourtool.save.validation.Validatable -import com.saveourtool.save.validation.isValidName +import com.saveourtool.common.testsuite.TestSuiteVersioned +import com.saveourtool.common.validation.Validatable +import com.saveourtool.common.validation.isValidName import kotlin.js.JsExport import kotlinx.datetime.LocalDateTime diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/contest/ContestResult.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/contest/ContestResult.kt similarity index 88% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/contest/ContestResult.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/contest/ContestResult.kt index 3c0e242982..7d62465105 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/contest/ContestResult.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/contest/ContestResult.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entities.contest +package com.saveourtool.common.entities.contest -import com.saveourtool.save.execution.ExecutionStatus +import com.saveourtool.common.execution.ExecutionStatus import kotlinx.datetime.LocalDateTime import kotlinx.serialization.Contextual import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/contest/ContestSampleDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/contest/ContestSampleDto.kt similarity index 91% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/contest/ContestSampleDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/contest/ContestSampleDto.kt index fbc9c0b45c..d94bb922c2 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/contest/ContestSampleDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/contest/ContestSampleDto.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities.contest +package com.saveourtool.common.entities.contest import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/contest/ContestSampleFieldDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/contest/ContestSampleFieldDto.kt similarity index 88% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/contest/ContestSampleFieldDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/contest/ContestSampleFieldDto.kt index b7e592cd5e..bc77b002e7 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/contest/ContestSampleFieldDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/contest/ContestSampleFieldDto.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities.contest +package com.saveourtool.common.entities.contest import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/contest/ContestSampleFieldType.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/contest/ContestSampleFieldType.kt similarity index 91% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/contest/ContestSampleFieldType.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/contest/ContestSampleFieldType.kt index 67bb6e6cfe..d1b8d1d82a 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/contest/ContestSampleFieldType.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/contest/ContestSampleFieldType.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities.contest +package com.saveourtool.common.entities.contest import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/contest/ContestStatus.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/contest/ContestStatus.kt similarity index 84% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/contest/ContestStatus.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/contest/ContestStatus.kt index 5731e40b29..206069e213 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/contest/ContestStatus.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/contest/ContestStatus.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities.contest +package com.saveourtool.common.entities.contest import kotlin.js.JsExport import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/CosvFileDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/CosvFileDto.kt similarity index 88% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/CosvFileDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/CosvFileDto.kt index 15b53d1838..132c0d5be2 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/CosvFileDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/CosvFileDto.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities.cosv +package com.saveourtool.common.entities.cosv import kotlinx.datetime.LocalDateTime import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/RawCosvFileDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/RawCosvFileDto.kt similarity index 95% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/RawCosvFileDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/RawCosvFileDto.kt index 8503ff1f5f..e5938c0d24 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/RawCosvFileDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/RawCosvFileDto.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.entities.cosv +package com.saveourtool.common.entities.cosv -import com.saveourtool.save.entities.DtoWithId -import com.saveourtool.save.utils.ZIP_ARCHIVE_EXTENSION +import com.saveourtool.common.entities.DtoWithId +import com.saveourtool.common.utils.ZIP_ARCHIVE_EXTENSION import kotlinx.datetime.LocalDateTime import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/RawCosvFileStatisticsDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/RawCosvFileStatisticsDto.kt similarity index 95% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/RawCosvFileStatisticsDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/RawCosvFileStatisticsDto.kt index 56759c04c3..dfab512db7 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/RawCosvFileStatisticsDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/RawCosvFileStatisticsDto.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities.cosv +package com.saveourtool.common.entities.cosv import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/RawCosvFileStatus.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/RawCosvFileStatus.kt similarity index 90% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/RawCosvFileStatus.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/RawCosvFileStatus.kt index 65e94cc362..ab9c54072c 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/RawCosvFileStatus.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/RawCosvFileStatus.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities.cosv +package com.saveourtool.common.entities.cosv /** * Status of [RawCosvFileDto] diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/RawCosvFileStreamingResponse.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/RawCosvFileStreamingResponse.kt similarity index 89% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/RawCosvFileStreamingResponse.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/RawCosvFileStreamingResponse.kt index ede2e02a7f..a0efbfda47 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/RawCosvFileStreamingResponse.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/RawCosvFileStreamingResponse.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities.cosv +package com.saveourtool.common.entities.cosv import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/VulnerabilityExt.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/VulnerabilityExt.kt similarity index 86% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/VulnerabilityExt.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/VulnerabilityExt.kt index 352c342dfd..c1d360eade 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/VulnerabilityExt.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/VulnerabilityExt.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.entities.cosv +package com.saveourtool.common.entities.cosv +import com.saveourtool.common.info.UserInfo import com.saveourtool.osv4k.RawOsvSchema as RawCosvSchema -import com.saveourtool.save.info.UserInfo import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/VulnerabilityMetadataDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/VulnerabilityMetadataDto.kt similarity index 83% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/VulnerabilityMetadataDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/VulnerabilityMetadataDto.kt index 8df682996a..d487832b6a 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/cosv/VulnerabilityMetadataDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/cosv/VulnerabilityMetadataDto.kt @@ -1,11 +1,11 @@ @file:Suppress("HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE") -package com.saveourtool.save.entities.cosv +package com.saveourtool.common.entities.cosv -import com.saveourtool.save.entities.OrganizationDto -import com.saveourtool.save.entities.vulnerability.VulnerabilityLanguage -import com.saveourtool.save.entities.vulnerability.VulnerabilityStatus -import com.saveourtool.save.info.UserInfo +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.entities.vulnerability.VulnerabilityLanguage +import com.saveourtool.common.entities.vulnerability.VulnerabilityStatus +import com.saveourtool.common.info.UserInfo import kotlinx.datetime.LocalDateTime import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityDateDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/vulnerability/VulnerabilityDateDto.kt similarity index 93% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityDateDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/vulnerability/VulnerabilityDateDto.kt index fb768d61a2..9fcd22d8fc 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityDateDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/vulnerability/VulnerabilityDateDto.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.entities.vulnerability +package com.saveourtool.common.entities.vulnerability +import com.saveourtool.common.utils.asTimelineEntry import com.saveourtool.osv4k.RawOsvSchema import com.saveourtool.osv4k.TimelineEntry -import com.saveourtool.save.utils.asTimelineEntry import kotlinx.datetime.LocalDateTime import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityDateType.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/vulnerability/VulnerabilityDateType.kt similarity index 96% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityDateType.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/vulnerability/VulnerabilityDateType.kt index a7481685d3..2827bcb872 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityDateType.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/vulnerability/VulnerabilityDateType.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities.vulnerability +package com.saveourtool.common.entities.vulnerability import kotlin.js.JsExport import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityLanguage.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/vulnerability/VulnerabilityLanguage.kt similarity index 90% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityLanguage.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/vulnerability/VulnerabilityLanguage.kt index f73122d212..eae7a9670e 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityLanguage.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/vulnerability/VulnerabilityLanguage.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities.vulnerability +package com.saveourtool.common.entities.vulnerability import kotlin.js.JsExport import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityProjectDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/vulnerability/VulnerabilityProjectDto.kt similarity index 93% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityProjectDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/vulnerability/VulnerabilityProjectDto.kt index b9d4061735..5b3a340e3c 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityProjectDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/vulnerability/VulnerabilityProjectDto.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities.vulnerability +package com.saveourtool.common.entities.vulnerability import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityProjectType.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/vulnerability/VulnerabilityProjectType.kt similarity index 89% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityProjectType.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/vulnerability/VulnerabilityProjectType.kt index ec26bcf5b7..9f84c97628 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityProjectType.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/vulnerability/VulnerabilityProjectType.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities.vulnerability +package com.saveourtool.common.entities.vulnerability import kotlin.js.JsExport import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityStatus.kt b/common/src/commonMain/kotlin/com/saveourtool/common/entities/vulnerability/VulnerabilityStatus.kt similarity index 91% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityStatus.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/entities/vulnerability/VulnerabilityStatus.kt index 6d0d7496dc..a7fd2f64dc 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityStatus.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/entities/vulnerability/VulnerabilityStatus.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.entities.vulnerability +package com.saveourtool.common.entities.vulnerability import kotlin.js.JsExport import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/execution/ExecutionDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/execution/ExecutionDto.kt similarity index 97% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/execution/ExecutionDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/execution/ExecutionDto.kt index 8841fc6aef..3c8cf205f7 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/execution/ExecutionDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/execution/ExecutionDto.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.execution +package com.saveourtool.common.execution import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/execution/ExecutionStatus.kt b/common/src/commonMain/kotlin/com/saveourtool/common/execution/ExecutionStatus.kt similarity index 94% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/execution/ExecutionStatus.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/execution/ExecutionStatus.kt index ccd162b64f..ff590d8b55 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/execution/ExecutionStatus.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/execution/ExecutionStatus.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.execution +package com.saveourtool.common.execution import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/execution/ExecutionUpdateDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/execution/ExecutionUpdateDto.kt similarity index 85% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/execution/ExecutionUpdateDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/execution/ExecutionUpdateDto.kt index d65628d93c..d847ad0ccb 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/execution/ExecutionUpdateDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/execution/ExecutionUpdateDto.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.execution +package com.saveourtool.common.execution import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/execution/TestingType.kt b/common/src/commonMain/kotlin/com/saveourtool/common/execution/TestingType.kt similarity index 83% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/execution/TestingType.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/execution/TestingType.kt index 2fa7e26c7f..9ef361f00d 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/execution/TestingType.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/execution/TestingType.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.execution +package com.saveourtool.common.execution import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/DemoFilter.kt b/common/src/commonMain/kotlin/com/saveourtool/common/filters/DemoFilter.kt similarity index 91% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/DemoFilter.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/filters/DemoFilter.kt index dd5df5b4b2..872641d03c 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/DemoFilter.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/filters/DemoFilter.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.filters +package com.saveourtool.common.filters -import com.saveourtool.save.demo.DemoStatus +import com.saveourtool.common.demo.DemoStatus import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/ExecutionFilter.kt b/common/src/commonMain/kotlin/com/saveourtool/common/filters/ExecutionFilter.kt similarity index 84% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/ExecutionFilter.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/filters/ExecutionFilter.kt index 0fd69543ae..42fec02fec 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/ExecutionFilter.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/filters/ExecutionFilter.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.filters +package com.saveourtool.common.filters -import com.saveourtool.save.utils.getCurrentLocalDateTime +import com.saveourtool.common.utils.getCurrentLocalDateTime import kotlinx.datetime.* import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/OrganizationFilter.kt b/common/src/commonMain/kotlin/com/saveourtool/common/filters/OrganizationFilter.kt similarity index 83% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/OrganizationFilter.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/filters/OrganizationFilter.kt index 0497c92303..10a2886c24 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/OrganizationFilter.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/filters/OrganizationFilter.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.filters +package com.saveourtool.common.filters -import com.saveourtool.save.entities.OrganizationStatus +import com.saveourtool.common.entities.OrganizationStatus import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/ProjectFilter.kt b/common/src/commonMain/kotlin/com/saveourtool/common/filters/ProjectFilter.kt similarity index 89% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/ProjectFilter.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/filters/ProjectFilter.kt index 7a0cd0adbe..d1a6f7ad1b 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/ProjectFilter.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/filters/ProjectFilter.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.filters +package com.saveourtool.common.filters -import com.saveourtool.save.entities.ProjectStatus +import com.saveourtool.common.entities.ProjectStatus import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/ProjectProblemFilter.kt b/common/src/commonMain/kotlin/com/saveourtool/common/filters/ProjectProblemFilter.kt similarity index 92% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/ProjectProblemFilter.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/filters/ProjectProblemFilter.kt index 0ccb511016..f738a38094 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/ProjectProblemFilter.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/filters/ProjectProblemFilter.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.filters +package com.saveourtool.common.filters import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/TestExecutionFilter.kt b/common/src/commonMain/kotlin/com/saveourtool/common/filters/TestExecutionFilter.kt similarity index 91% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/TestExecutionFilter.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/filters/TestExecutionFilter.kt index 57198cd27c..bce7a62bd9 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/TestExecutionFilter.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/filters/TestExecutionFilter.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.filters +package com.saveourtool.common.filters -import com.saveourtool.save.domain.TestResultStatus +import com.saveourtool.common.domain.TestResultStatus import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/TestSuiteFilter.kt b/common/src/commonMain/kotlin/com/saveourtool/common/filters/TestSuiteFilter.kt similarity index 93% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/TestSuiteFilter.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/filters/TestSuiteFilter.kt index c1a6051f4c..0d507a3878 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/TestSuiteFilter.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/filters/TestSuiteFilter.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.filters +package com.saveourtool.common.filters -import com.saveourtool.save.utils.DATABASE_DELIMITER +import com.saveourtool.common.utils.DATABASE_DELIMITER import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/VulnerabilityFilter.kt b/common/src/commonMain/kotlin/com/saveourtool/common/filters/VulnerabilityFilter.kt similarity index 84% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/VulnerabilityFilter.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/filters/VulnerabilityFilter.kt index cca9ac7abe..fb0bf4d25b 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/filters/VulnerabilityFilter.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/filters/VulnerabilityFilter.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.filters +package com.saveourtool.common.filters -import com.saveourtool.save.entities.vulnerability.VulnerabilityLanguage -import com.saveourtool.save.entities.vulnerability.VulnerabilityStatus +import com.saveourtool.common.entities.vulnerability.VulnerabilityLanguage +import com.saveourtool.common.entities.vulnerability.VulnerabilityStatus import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/frontend/PlatformLanguages.kt b/common/src/commonMain/kotlin/com/saveourtool/common/frontend/PlatformLanguages.kt similarity index 95% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/frontend/PlatformLanguages.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/frontend/PlatformLanguages.kt index 0f6fef0907..5ff743f0d2 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/frontend/PlatformLanguages.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/frontend/PlatformLanguages.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.frontend +package com.saveourtool.common.frontend import io.ktor.http.* diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/frontend/TabMenuBar.kt b/common/src/commonMain/kotlin/com/saveourtool/common/frontend/TabMenuBar.kt similarity index 94% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/frontend/TabMenuBar.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/frontend/TabMenuBar.kt index 4cd641142e..eb27ef3934 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/frontend/TabMenuBar.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/frontend/TabMenuBar.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.frontend +package com.saveourtool.common.frontend -import com.saveourtool.save.domain.Role +import com.saveourtool.common.domain.Role import kotlin.js.ExperimentalJsExport import kotlin.js.JsExport diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/info/OauthProviderInfo.kt b/common/src/commonMain/kotlin/com/saveourtool/common/info/OauthProviderInfo.kt similarity index 92% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/info/OauthProviderInfo.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/info/OauthProviderInfo.kt index cfa79d5305..dd6315a552 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/info/OauthProviderInfo.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/info/OauthProviderInfo.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.info +package com.saveourtool.common.info import kotlin.js.JsExport import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/info/UserInfo.kt b/common/src/commonMain/kotlin/com/saveourtool/common/info/UserInfo.kt similarity index 90% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/info/UserInfo.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/info/UserInfo.kt index bc4a6763be..83ed052006 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/info/UserInfo.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/info/UserInfo.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.info +package com.saveourtool.common.info -import com.saveourtool.save.domain.Role -import com.saveourtool.save.validation.Validatable -import com.saveourtool.save.validation.isValidName +import com.saveourtool.common.domain.Role +import com.saveourtool.common.validation.Validatable +import com.saveourtool.common.validation.isValidName import kotlin.js.JsExport import kotlinx.datetime.LocalDateTime diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/info/UserPermissions.kt b/common/src/commonMain/kotlin/com/saveourtool/common/info/UserPermissions.kt similarity index 92% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/info/UserPermissions.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/info/UserPermissions.kt index 1fea46effa..e231e32d52 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/info/UserPermissions.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/info/UserPermissions.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.info +package com.saveourtool.common.info import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/info/UserPermissionsInOrganization.kt b/common/src/commonMain/kotlin/com/saveourtool/common/info/UserPermissionsInOrganization.kt similarity index 90% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/info/UserPermissionsInOrganization.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/info/UserPermissionsInOrganization.kt index 675af5085b..083a78b4d4 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/info/UserPermissionsInOrganization.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/info/UserPermissionsInOrganization.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.info +package com.saveourtool.common.info import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/info/UserStatus.kt b/common/src/commonMain/kotlin/com/saveourtool/common/info/UserStatus.kt similarity index 92% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/info/UserStatus.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/info/UserStatus.kt index df18203e45..d77e94d203 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/info/UserStatus.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/info/UserStatus.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.info +package com.saveourtool.common.info import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/kafka/KafkaMsg.kt b/common/src/commonMain/kotlin/com/saveourtool/common/kafka/KafkaMsg.kt similarity index 76% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/kafka/KafkaMsg.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/kafka/KafkaMsg.kt index 3c8ecd981a..21d24bc3e5 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/kafka/KafkaMsg.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/kafka/KafkaMsg.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.kafka +package com.saveourtool.common.kafka /** * kafka message diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/kafka/TestExecutionTaskDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/kafka/TestExecutionTaskDto.kt similarity index 73% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/kafka/TestExecutionTaskDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/kafka/TestExecutionTaskDto.kt index 03fe23b5bf..55ac3d3562 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/kafka/TestExecutionTaskDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/kafka/TestExecutionTaskDto.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.kafka +package com.saveourtool.common.kafka -import com.saveourtool.save.test.TestDto +import com.saveourtool.common.test.TestDto /** * @property tests diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/permission/Permission.kt b/common/src/commonMain/kotlin/com/saveourtool/common/permission/Permission.kt similarity index 75% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/permission/Permission.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/permission/Permission.kt index 4b5e1f7f41..ea0681f8e9 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/permission/Permission.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/permission/Permission.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.permission +package com.saveourtool.common.permission /** * Permissions that operations may require on certain objects diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/permission/Rights.kt b/common/src/commonMain/kotlin/com/saveourtool/common/permission/Rights.kt similarity index 75% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/permission/Rights.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/permission/Rights.kt index 2716f9a370..7d3e4535df 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/permission/Rights.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/permission/Rights.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.permission +package com.saveourtool.common.permission /** * Status that defines possession status for TestSuites. diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/permission/SetRightsRequest.kt b/common/src/commonMain/kotlin/com/saveourtool/common/permission/SetRightsRequest.kt similarity index 90% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/permission/SetRightsRequest.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/permission/SetRightsRequest.kt index cefc6eb94d..7c28ee042e 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/permission/SetRightsRequest.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/permission/SetRightsRequest.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.permission +package com.saveourtool.common.permission import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/permission/SetRoleRequest.kt b/common/src/commonMain/kotlin/com/saveourtool/common/permission/SetRoleRequest.kt similarity index 72% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/permission/SetRoleRequest.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/permission/SetRoleRequest.kt index 795ab6aed8..a08b578e40 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/permission/SetRoleRequest.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/permission/SetRoleRequest.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.permission +package com.saveourtool.common.permission -import com.saveourtool.save.domain.Role +import com.saveourtool.common.domain.Role import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/request/CreateExecutionRequest.kt b/common/src/commonMain/kotlin/com/saveourtool/common/request/CreateExecutionRequest.kt similarity index 86% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/request/CreateExecutionRequest.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/request/CreateExecutionRequest.kt index 4b104ef5b0..96bcadcb87 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/request/CreateExecutionRequest.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/request/CreateExecutionRequest.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.request +package com.saveourtool.common.request -import com.saveourtool.save.domain.ProjectCoordinates -import com.saveourtool.save.domain.Sdk -import com.saveourtool.save.execution.TestingType +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.domain.Sdk +import com.saveourtool.common.execution.TestingType import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/request/RunExecutionRequest.kt b/common/src/commonMain/kotlin/com/saveourtool/common/request/RunExecutionRequest.kt similarity index 79% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/request/RunExecutionRequest.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/request/RunExecutionRequest.kt index 52518d014a..5289ebbceb 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/request/RunExecutionRequest.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/request/RunExecutionRequest.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.request +package com.saveourtool.common.request -import com.saveourtool.save.domain.Sdk +import com.saveourtool.common.domain.Sdk import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/request/TestFilesRequest.kt b/common/src/commonMain/kotlin/com/saveourtool/common/request/TestFilesRequest.kt similarity index 67% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/request/TestFilesRequest.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/request/TestFilesRequest.kt index f3d200322a..af2e2e4280 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/request/TestFilesRequest.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/request/TestFilesRequest.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.request +package com.saveourtool.common.request -import com.saveourtool.save.test.TestDto -import com.saveourtool.save.test.TestsSourceSnapshotDto +import com.saveourtool.common.test.TestDto +import com.saveourtool.common.test.TestsSourceSnapshotDto import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/request/TestsSourceFetchRequest.kt b/common/src/commonMain/kotlin/com/saveourtool/common/request/TestsSourceFetchRequest.kt similarity index 77% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/request/TestsSourceFetchRequest.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/request/TestsSourceFetchRequest.kt index be90919198..75f2f03bf8 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/request/TestsSourceFetchRequest.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/request/TestsSourceFetchRequest.kt @@ -1,12 +1,12 @@ -package com.saveourtool.save.request +package com.saveourtool.common.request -import com.saveourtool.save.test.TestsSourceSnapshotDto -import com.saveourtool.save.test.TestsSourceVersionDto -import com.saveourtool.save.test.TestsSourceVersionInfo -import com.saveourtool.save.testsuite.TestSuitesSourceDto -import com.saveourtool.save.testsuite.TestSuitesSourceFetchMode -import com.saveourtool.save.utils.GIT_HASH_PREFIX_LENGTH -import com.saveourtool.save.utils.getCurrentLocalDateTime +import com.saveourtool.common.test.TestsSourceSnapshotDto +import com.saveourtool.common.test.TestsSourceVersionDto +import com.saveourtool.common.test.TestsSourceVersionInfo +import com.saveourtool.common.testsuite.TestSuitesSourceDto +import com.saveourtool.common.testsuite.TestSuitesSourceFetchMode +import com.saveourtool.common.utils.GIT_HASH_PREFIX_LENGTH +import com.saveourtool.common.utils.getCurrentLocalDateTime import kotlinx.datetime.LocalDateTime import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/test/TestDto.kt similarity index 83% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/test/TestDto.kt index 76e2713ea0..426d8edbd7 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/test/TestDto.kt @@ -2,11 +2,11 @@ * DTOs for retrieving test batches */ -package com.saveourtool.save.test +package com.saveourtool.common.test -import com.saveourtool.save.domain.PluginType -import com.saveourtool.save.domain.toPluginType -import com.saveourtool.save.utils.DATABASE_DELIMITER +import com.saveourtool.common.domain.PluginType +import com.saveourtool.common.domain.toPluginType +import com.saveourtool.common.utils.DATABASE_DELIMITER import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestFilesContent.kt b/common/src/commonMain/kotlin/com/saveourtool/common/test/TestFilesContent.kt similarity index 93% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestFilesContent.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/test/TestFilesContent.kt index cc8ac5e82e..36e7ef05c3 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestFilesContent.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/test/TestFilesContent.kt @@ -2,7 +2,7 @@ * DTOs for public test transfer */ -package com.saveourtool.save.test +package com.saveourtool.common.test import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestSuiteValidationError.kt b/common/src/commonMain/kotlin/com/saveourtool/common/test/TestSuiteValidationError.kt similarity index 92% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestSuiteValidationError.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/test/TestSuiteValidationError.kt index 28cf1f897d..18f01b861d 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestSuiteValidationError.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/test/TestSuiteValidationError.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.test +package com.saveourtool.common.test import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestSuiteValidationProgress.kt b/common/src/commonMain/kotlin/com/saveourtool/common/test/TestSuiteValidationProgress.kt similarity index 95% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestSuiteValidationProgress.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/test/TestSuiteValidationProgress.kt index c227035a8b..ab4e644a35 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestSuiteValidationProgress.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/test/TestSuiteValidationProgress.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.test +package com.saveourtool.common.test import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestSuiteValidationResult.kt b/common/src/commonMain/kotlin/com/saveourtool/common/test/TestSuiteValidationResult.kt similarity index 90% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestSuiteValidationResult.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/test/TestSuiteValidationResult.kt index f561ad3f37..454f486917 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestSuiteValidationResult.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/test/TestSuiteValidationResult.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.test +package com.saveourtool.common.test /** * The validation result — either a progress message (intermediate or diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestsSourceSnapshotDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/test/TestsSourceSnapshotDto.kt similarity index 84% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestsSourceSnapshotDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/test/TestsSourceSnapshotDto.kt index ce65a17aae..818947050a 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestsSourceSnapshotDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/test/TestsSourceSnapshotDto.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.test +package com.saveourtool.common.test -import com.saveourtool.save.entities.DtoWithId +import com.saveourtool.common.entities.DtoWithId import kotlinx.datetime.LocalDateTime import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestsSourceVersionDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/test/TestsSourceVersionDto.kt similarity index 81% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestsSourceVersionDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/test/TestsSourceVersionDto.kt index fafbac9b42..a39c7453e7 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestsSourceVersionDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/test/TestsSourceVersionDto.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.test +package com.saveourtool.common.test -import com.saveourtool.save.entities.DtoWithId -import com.saveourtool.save.testsuite.TestSuitesSourceFetchMode +import com.saveourtool.common.entities.DtoWithId +import com.saveourtool.common.testsuite.TestSuitesSourceFetchMode import kotlinx.datetime.LocalDateTime import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestsSourceVersionInfo.kt b/common/src/commonMain/kotlin/com/saveourtool/common/test/TestsSourceVersionInfo.kt similarity index 90% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestsSourceVersionInfo.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/test/TestsSourceVersionInfo.kt index dac1057380..c5e1216065 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/TestsSourceVersionInfo.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/test/TestsSourceVersionInfo.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.test +package com.saveourtool.common.test -import com.saveourtool.save.testsuite.TestSuitesSourceFetchMode +import com.saveourtool.common.testsuite.TestSuitesSourceFetchMode import kotlinx.datetime.LocalDateTime import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/metrics/NoDataAvailable.kt b/common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/metrics/NoDataAvailable.kt similarity index 91% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/metrics/NoDataAvailable.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/metrics/NoDataAvailable.kt index 3da966f9d2..1c8ad39148 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/metrics/NoDataAvailable.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/metrics/NoDataAvailable.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.test.analysis.metrics +package com.saveourtool.common.test.analysis.metrics import kotlin.jvm.JvmStatic import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/metrics/RegularTestMetrics.kt b/common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/metrics/RegularTestMetrics.kt similarity index 98% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/metrics/RegularTestMetrics.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/metrics/RegularTestMetrics.kt index 9548a8a536..d4f9ffc077 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/metrics/RegularTestMetrics.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/metrics/RegularTestMetrics.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.test.analysis.metrics +package com.saveourtool.common.test.analysis.metrics import kotlin.time.Duration import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/metrics/TestMetrics.kt b/common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/metrics/TestMetrics.kt similarity index 91% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/metrics/TestMetrics.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/metrics/TestMetrics.kt index bee7bac2b2..a9a9011c1e 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/metrics/TestMetrics.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/metrics/TestMetrics.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.test.analysis.metrics +package com.saveourtool.common.test.analysis.metrics import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/results/AnalysisResult.kt b/common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/results/AnalysisResult.kt similarity index 91% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/results/AnalysisResult.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/results/AnalysisResult.kt index 282ddaa32d..29530819f7 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/results/AnalysisResult.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/results/AnalysisResult.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.test.analysis.results +package com.saveourtool.common.test.analysis.results import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/results/FlakyTest.kt b/common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/results/FlakyTest.kt similarity index 80% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/results/FlakyTest.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/results/FlakyTest.kt index 0a68de205b..97d159c91a 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/results/FlakyTest.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/results/FlakyTest.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.test.analysis.results +package com.saveourtool.common.test.analysis.results import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/results/IrregularTest.kt b/common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/results/IrregularTest.kt similarity index 92% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/results/IrregularTest.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/results/IrregularTest.kt index 6870a221ad..443171b8d2 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/results/IrregularTest.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/results/IrregularTest.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.test.analysis.results +package com.saveourtool.common.test.analysis.results import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/results/PermanentFailure.kt b/common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/results/PermanentFailure.kt similarity index 74% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/results/PermanentFailure.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/results/PermanentFailure.kt index b79ffa0d02..8b8f87bbb4 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/results/PermanentFailure.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/results/PermanentFailure.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.test.analysis.results +package com.saveourtool.common.test.analysis.results -import com.saveourtool.save.test.analysis.metrics.RegularTestMetrics +import com.saveourtool.common.test.analysis.metrics.RegularTestMetrics import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/results/Regression.kt b/common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/results/Regression.kt similarity index 80% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/results/Regression.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/results/Regression.kt index a27fd1e593..33d60b8f3a 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/results/Regression.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/results/Regression.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.test.analysis.results +package com.saveourtool.common.test.analysis.results import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/results/RegularTest.kt b/common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/results/RegularTest.kt similarity index 91% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/results/RegularTest.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/results/RegularTest.kt index da051f9433..d6e5f3aeaf 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/test/analysis/results/RegularTest.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/test/analysis/results/RegularTest.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.test.analysis.results +package com.saveourtool.common.test.analysis.results import kotlin.jvm.JvmStatic import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/testsuite/TestSuiteDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/testsuite/TestSuiteDto.kt similarity index 81% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/testsuite/TestSuiteDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/testsuite/TestSuiteDto.kt index 48d7bad38f..ebe129acab 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/testsuite/TestSuiteDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/testsuite/TestSuiteDto.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.testsuite +package com.saveourtool.common.testsuite -import com.saveourtool.save.domain.PluginType -import com.saveourtool.save.entities.DtoWithId -import com.saveourtool.save.test.TestsSourceSnapshotDto +import com.saveourtool.common.domain.PluginType +import com.saveourtool.common.entities.DtoWithId +import com.saveourtool.common.test.TestsSourceSnapshotDto import kotlinx.serialization.Serializable /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/testsuite/TestSuiteVersioned.kt b/common/src/commonMain/kotlin/com/saveourtool/common/testsuite/TestSuiteVersioned.kt similarity index 97% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/testsuite/TestSuiteVersioned.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/testsuite/TestSuiteVersioned.kt index 2761e3c826..413e9745d1 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/testsuite/TestSuiteVersioned.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/testsuite/TestSuiteVersioned.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.testsuite +package com.saveourtool.common.testsuite import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/testsuite/TestSuitesSourceDto.kt b/common/src/commonMain/kotlin/com/saveourtool/common/testsuite/TestSuitesSourceDto.kt similarity index 83% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/testsuite/TestSuitesSourceDto.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/testsuite/TestSuitesSourceDto.kt index 4685cfeef8..cc090f64a5 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/testsuite/TestSuitesSourceDto.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/testsuite/TestSuitesSourceDto.kt @@ -1,10 +1,10 @@ -package com.saveourtool.save.testsuite +package com.saveourtool.common.testsuite -import com.saveourtool.save.entities.DtoWithId -import com.saveourtool.save.entities.GitDto -import com.saveourtool.save.validation.Validatable -import com.saveourtool.save.validation.isValidName -import com.saveourtool.save.validation.isValidPath +import com.saveourtool.common.entities.DtoWithId +import com.saveourtool.common.entities.GitDto +import com.saveourtool.common.validation.Validatable +import com.saveourtool.common.validation.isValidName +import com.saveourtool.common.validation.isValidPath import kotlinx.serialization.Serializable typealias TestSuitesSourceDtoList = List diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/testsuite/TestSuitesSourceFetchMode.kt b/common/src/commonMain/kotlin/com/saveourtool/common/testsuite/TestSuitesSourceFetchMode.kt similarity index 80% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/testsuite/TestSuitesSourceFetchMode.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/testsuite/TestSuitesSourceFetchMode.kt index 1ed838061f..ff7a711c08 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/testsuite/TestSuitesSourceFetchMode.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/testsuite/TestSuitesSourceFetchMode.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.testsuite +package com.saveourtool.common.testsuite /** * Enum that represents different modes of [TestSuitesSourceDto] fetching diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/ArchiveUtils.kt b/common/src/commonMain/kotlin/com/saveourtool/common/utils/ArchiveUtils.kt similarity index 90% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/ArchiveUtils.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/utils/ArchiveUtils.kt index 9c85b434fe..4d975bc71d 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/ArchiveUtils.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/utils/ArchiveUtils.kt @@ -2,7 +2,7 @@ * Utils to unzip the archive */ -package com.saveourtool.save.utils +package com.saveourtool.common.utils import okio.Path diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/AvatarType.kt b/common/src/commonMain/kotlin/com/saveourtool/common/utils/AvatarType.kt similarity index 95% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/AvatarType.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/utils/AvatarType.kt index af3f6a53fc..3fcf1ee81b 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/AvatarType.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/utils/AvatarType.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.utils +package com.saveourtool.common.utils import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/Constants.kt b/common/src/commonMain/kotlin/com/saveourtool/common/utils/Constants.kt similarity index 98% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/Constants.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/utils/Constants.kt index d3ec6e594a..4997b73509 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/Constants.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/utils/Constants.kt @@ -4,7 +4,7 @@ @file:JsExport -package com.saveourtool.save.utils +package com.saveourtool.common.utils import kotlin.js.JsExport diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/CosvSchemaUtils.kt b/common/src/commonMain/kotlin/com/saveourtool/common/utils/CosvSchemaUtils.kt similarity index 96% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/CosvSchemaUtils.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/utils/CosvSchemaUtils.kt index af3c4b0ce4..83a6066281 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/CosvSchemaUtils.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/utils/CosvSchemaUtils.kt @@ -2,12 +2,12 @@ * This file contains util methods for CosvSchema */ -package com.saveourtool.save.utils +package com.saveourtool.common.utils +import com.saveourtool.common.entities.vulnerability.* +import com.saveourtool.common.info.UserInfo import com.saveourtool.osv4k.* import com.saveourtool.osv4k.OsvSchema as CosvSchema -import com.saveourtool.save.entities.vulnerability.* -import com.saveourtool.save.info.UserInfo import kotlinx.datetime.LocalDateTime diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/DateTimeUtils.kt b/common/src/commonMain/kotlin/com/saveourtool/common/utils/DateTimeUtils.kt similarity index 98% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/DateTimeUtils.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/utils/DateTimeUtils.kt index 9552c89178..6ae1f7151f 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/DateTimeUtils.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/utils/DateTimeUtils.kt @@ -2,7 +2,7 @@ * Utility methods related to a Date and Time */ -package com.saveourtool.save.utils +package com.saveourtool.common.utils import io.ktor.util.* import kotlin.time.Duration diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/ExecutionScoreUtils.kt b/common/src/commonMain/kotlin/com/saveourtool/common/utils/ExecutionScoreUtils.kt similarity index 93% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/ExecutionScoreUtils.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/utils/ExecutionScoreUtils.kt index 0e94fb8c42..77726d3c80 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/ExecutionScoreUtils.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/utils/ExecutionScoreUtils.kt @@ -9,10 +9,10 @@ "FILE_NAME_MATCH_CLASS" ) -package com.saveourtool.save.utils +package com.saveourtool.common.utils -import com.saveourtool.save.execution.ExecutionDto -import com.saveourtool.save.execution.TestingType +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.execution.TestingType /** * Set of types for different ways of score calculation diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/FileUtils.kt b/common/src/commonMain/kotlin/com/saveourtool/common/utils/FileUtils.kt similarity index 98% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/FileUtils.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/utils/FileUtils.kt index 3af5f23e24..8215e1c2b6 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/FileUtils.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/utils/FileUtils.kt @@ -2,7 +2,7 @@ * Utility methods to work with files using Okio */ -package com.saveourtool.save.utils +package com.saveourtool.common.utils import com.saveourtool.save.core.files.findAllFilesMatching import com.saveourtool.save.core.logging.logDebug diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/HttpUtils.kt b/common/src/commonMain/kotlin/com/saveourtool/common/utils/HttpUtils.kt similarity index 98% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/HttpUtils.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/utils/HttpUtils.kt index 92c62ae5b5..73be8e71e1 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/HttpUtils.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/utils/HttpUtils.kt @@ -4,7 +4,7 @@ @file:Suppress("FILE_NAME_MATCH_CLASS") -package com.saveourtool.save.utils +package com.saveourtool.common.utils import io.ktor.client.plugins.api.* import io.ktor.client.statement.* diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/KotlinUtils.kt b/common/src/commonMain/kotlin/com/saveourtool/common/utils/KotlinUtils.kt similarity index 98% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/KotlinUtils.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/utils/KotlinUtils.kt index 503a92909c..1d8941aeee 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/KotlinUtils.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/utils/KotlinUtils.kt @@ -2,7 +2,7 @@ * Utilities for Kotlin */ -package com.saveourtool.save.utils +package com.saveourtool.common.utils import kotlinx.coroutines.delay diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/Languages.kt b/common/src/commonMain/kotlin/com/saveourtool/common/utils/Languages.kt similarity index 96% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/Languages.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/utils/Languages.kt index 2f6bc81a49..dc145ae1bb 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/Languages.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/utils/Languages.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.utils +package com.saveourtool.common.utils /** * Highlight modes for AceEditor diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/PlatformUtils.kt b/common/src/commonMain/kotlin/com/saveourtool/common/utils/PlatformUtils.kt similarity index 98% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/PlatformUtils.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/utils/PlatformUtils.kt index bd1ce5f44e..555f4d86cf 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/PlatformUtils.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/utils/PlatformUtils.kt @@ -2,7 +2,7 @@ * Platform dependent utility methods */ -package com.saveourtool.save.utils +package com.saveourtool.common.utils import com.saveourtool.save.core.logging.logDebug diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/RoleUtils.kt b/common/src/commonMain/kotlin/com/saveourtool/common/utils/RoleUtils.kt similarity index 78% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/RoleUtils.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/utils/RoleUtils.kt index 07e4b3bd49..d41bdfc165 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/RoleUtils.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/utils/RoleUtils.kt @@ -2,9 +2,9 @@ * Utilities of Role entity */ -package com.saveourtool.save.utils +package com.saveourtool.common.utils -import com.saveourtool.save.domain.Role +import com.saveourtool.common.domain.Role /** * @param oneRole diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/StringUtils.kt b/common/src/commonMain/kotlin/com/saveourtool/common/utils/StringUtils.kt similarity index 97% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/StringUtils.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/utils/StringUtils.kt index 61181c579a..c3782c8eba 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/StringUtils.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/utils/StringUtils.kt @@ -1,7 +1,7 @@ @file:JvmName("StringUtils") @file:Suppress("HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE") -package com.saveourtool.save.utils +package com.saveourtool.common.utils import kotlin.jvm.JvmName diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/TestResultUtils.kt b/common/src/commonMain/kotlin/com/saveourtool/common/utils/TestResultUtils.kt similarity index 85% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/TestResultUtils.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/utils/TestResultUtils.kt index 7c7b8f4cb1..2ceaef2e44 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/TestResultUtils.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/utils/TestResultUtils.kt @@ -2,17 +2,17 @@ * Mapping entities from SAVE-cli to their equivalents from SAVE-cloud */ -package com.saveourtool.save.utils +package com.saveourtool.common.utils +import com.saveourtool.common.domain.TestResultDebugInfo +import com.saveourtool.common.domain.TestResultLocation +import com.saveourtool.common.domain.TestResultStatus import com.saveourtool.save.core.result.Crash import com.saveourtool.save.core.result.Fail import com.saveourtool.save.core.result.Ignored import com.saveourtool.save.core.result.Pass import com.saveourtool.save.core.result.TestResult import com.saveourtool.save.core.result.TestStatus -import com.saveourtool.save.domain.TestResultDebugInfo -import com.saveourtool.save.domain.TestResultLocation -import com.saveourtool.save.domain.TestResultStatus /** * Maps `TestStatus` to `TestResultStatus` diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/github/GitHubHelper.kt b/common/src/commonMain/kotlin/com/saveourtool/common/utils/github/GitHubHelper.kt similarity index 98% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/github/GitHubHelper.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/utils/github/GitHubHelper.kt index e2d9b3ac0c..2c0d916ddc 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/github/GitHubHelper.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/utils/github/GitHubHelper.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.utils.github +package com.saveourtool.common.utils.github import io.ktor.client.* import io.ktor.client.call.* diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/github/GitHubRepoInfo.kt b/common/src/commonMain/kotlin/com/saveourtool/common/utils/github/GitHubRepoInfo.kt similarity index 94% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/github/GitHubRepoInfo.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/utils/github/GitHubRepoInfo.kt index ee6014ba92..c95fdc9d50 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/github/GitHubRepoInfo.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/utils/github/GitHubRepoInfo.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.utils.github +package com.saveourtool.common.utils.github /** * Interface which provides info about GitHub repo diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/github/ReleaseAsset.kt b/common/src/commonMain/kotlin/com/saveourtool/common/utils/github/ReleaseAsset.kt similarity index 97% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/github/ReleaseAsset.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/utils/github/ReleaseAsset.kt index e755137940..c195f9575f 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/github/ReleaseAsset.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/utils/github/ReleaseAsset.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.utils.github +package com.saveourtool.common.utils.github import io.ktor.http.* import kotlinx.serialization.SerialName diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/github/ReleaseMetadata.kt b/common/src/commonMain/kotlin/com/saveourtool/common/utils/github/ReleaseMetadata.kt similarity index 93% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/github/ReleaseMetadata.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/utils/github/ReleaseMetadata.kt index 2519c423bc..78b2ce3fdf 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/github/ReleaseMetadata.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/utils/github/ReleaseMetadata.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.utils.github +package com.saveourtool.common.utils.github import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/github/TagMetadata.kt b/common/src/commonMain/kotlin/com/saveourtool/common/utils/github/TagMetadata.kt similarity index 83% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/github/TagMetadata.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/utils/github/TagMetadata.kt index 82c0d3611b..3bf6b87986 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/utils/github/TagMetadata.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/utils/github/TagMetadata.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.utils.github +package com.saveourtool.common.utils.github import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/BackendRoutes.kt b/common/src/commonMain/kotlin/com/saveourtool/common/validation/BackendRoutes.kt similarity index 90% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/BackendRoutes.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/validation/BackendRoutes.kt index d9f5ad291d..8a5854d180 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/BackendRoutes.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/validation/BackendRoutes.kt @@ -3,9 +3,9 @@ * If you create a new view with new URL - add it here. */ -package com.saveourtool.save.validation +package com.saveourtool.common.validation -import com.saveourtool.save.utils.URL_PATH_DELIMITER +import com.saveourtool.common.utils.URL_PATH_DELIMITER import kotlin.js.JsExport /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/FrontendCosvRoutes.kt b/common/src/commonMain/kotlin/com/saveourtool/common/validation/FrontendCosvRoutes.kt similarity index 94% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/FrontendCosvRoutes.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/validation/FrontendCosvRoutes.kt index 5c6a9369f9..dea6e315ca 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/FrontendCosvRoutes.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/validation/FrontendCosvRoutes.kt @@ -3,9 +3,9 @@ * If you create a new view with new URL - add it here. */ -package com.saveourtool.save.validation +package com.saveourtool.common.validation -import com.saveourtool.save.utils.URL_PATH_DELIMITER +import com.saveourtool.common.utils.URL_PATH_DELIMITER import kotlin.js.JsExport /** diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/FrontendRoutes.kt b/common/src/commonMain/kotlin/com/saveourtool/common/validation/FrontendRoutes.kt similarity index 95% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/FrontendRoutes.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/validation/FrontendRoutes.kt index f34758f3ca..b0aac03657 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/FrontendRoutes.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/validation/FrontendRoutes.kt @@ -3,9 +3,9 @@ * If you create a new view with new URL - add it here. */ -package com.saveourtool.save.validation +package com.saveourtool.common.validation -import com.saveourtool.save.utils.URL_PATH_DELIMITER +import com.saveourtool.common.utils.URL_PATH_DELIMITER import kotlin.js.JsExport const val SETTINGS = "settings" diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/Validatable.kt b/common/src/commonMain/kotlin/com/saveourtool/common/validation/Validatable.kt similarity index 88% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/Validatable.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/validation/Validatable.kt index 9ed38cfeb5..24f498e76a 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/Validatable.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/validation/Validatable.kt @@ -2,7 +2,7 @@ * Module that defines an interface for objects validation. */ -package com.saveourtool.save.validation +package com.saveourtool.common.validation /** * [Validatable] should be implemented by all the classes where we need validation diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/ValidationErrorMessages.kt b/common/src/commonMain/kotlin/com/saveourtool/common/validation/ValidationErrorMessages.kt similarity index 97% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/ValidationErrorMessages.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/validation/ValidationErrorMessages.kt index ac3940a05f..dcb7d14a33 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/ValidationErrorMessages.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/validation/ValidationErrorMessages.kt @@ -4,7 +4,7 @@ @file:JsExport -package com.saveourtool.save.validation +package com.saveourtool.common.validation import kotlin.js.JsExport diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/ValidationRegularExpressions.kt b/common/src/commonMain/kotlin/com/saveourtool/common/validation/ValidationRegularExpressions.kt similarity index 93% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/ValidationRegularExpressions.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/validation/ValidationRegularExpressions.kt index 23428a412c..ab01c058d1 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/ValidationRegularExpressions.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/validation/ValidationRegularExpressions.kt @@ -2,7 +2,7 @@ * Module that implements Validation with regular expression */ -package com.saveourtool.save.validation +package com.saveourtool.common.validation /** * URL name fragment class. diff --git a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/ValidationUtils.kt b/common/src/commonMain/kotlin/com/saveourtool/common/validation/ValidationUtils.kt similarity index 98% rename from save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/ValidationUtils.kt rename to common/src/commonMain/kotlin/com/saveourtool/common/validation/ValidationUtils.kt index b2181165d0..e84455d9d2 100644 --- a/save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/validation/ValidationUtils.kt +++ b/common/src/commonMain/kotlin/com/saveourtool/common/validation/ValidationUtils.kt @@ -2,7 +2,7 @@ * Module that implements different types of validation. */ -package com.saveourtool.save.validation +package com.saveourtool.common.validation /** * Default amount of characters allowed for names diff --git a/save-cloud-common/src/commonTest/kotlin/com/saveourtool/save/coroutines/flow/FlowTest.kt b/common/src/commonTest/kotlin/com/saveourtool/common/coroutines/flow/FlowTest.kt similarity index 98% rename from save-cloud-common/src/commonTest/kotlin/com/saveourtool/save/coroutines/flow/FlowTest.kt rename to common/src/commonTest/kotlin/com/saveourtool/common/coroutines/flow/FlowTest.kt index 81f770cd6b..0c413b182f 100644 --- a/save-cloud-common/src/commonTest/kotlin/com/saveourtool/save/coroutines/flow/FlowTest.kt +++ b/common/src/commonTest/kotlin/com/saveourtool/common/coroutines/flow/FlowTest.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.coroutines.flow +package com.saveourtool.common.coroutines.flow import kotlin.js.JsName import kotlin.test.Test diff --git a/save-cloud-common/src/commonTest/kotlin/com/saveourtool/save/cvsscalculator/CvssCalculatorTest.kt b/common/src/commonTest/kotlin/com/saveourtool/common/cvsscalculator/CvssCalculatorTest.kt similarity index 88% rename from save-cloud-common/src/commonTest/kotlin/com/saveourtool/save/cvsscalculator/CvssCalculatorTest.kt rename to common/src/commonTest/kotlin/com/saveourtool/common/cvsscalculator/CvssCalculatorTest.kt index 7ec2402b7d..d43bccd12a 100644 --- a/save-cloud-common/src/commonTest/kotlin/com/saveourtool/save/cvsscalculator/CvssCalculatorTest.kt +++ b/common/src/commonTest/kotlin/com/saveourtool/common/cvsscalculator/CvssCalculatorTest.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.cvsscalculator +package com.saveourtool.common.cvsscalculator import kotlin.js.JsName import kotlin.test.Test diff --git a/save-cloud-common/src/commonTest/kotlin/com/saveourtool/save/test/analysis/metrics/TestMetricsTest.kt b/common/src/commonTest/kotlin/com/saveourtool/common/test/analysis/metrics/TestMetricsTest.kt similarity index 98% rename from save-cloud-common/src/commonTest/kotlin/com/saveourtool/save/test/analysis/metrics/TestMetricsTest.kt rename to common/src/commonTest/kotlin/com/saveourtool/common/test/analysis/metrics/TestMetricsTest.kt index 6fbc86c4f9..ef28b3221c 100644 --- a/save-cloud-common/src/commonTest/kotlin/com/saveourtool/save/test/analysis/metrics/TestMetricsTest.kt +++ b/common/src/commonTest/kotlin/com/saveourtool/common/test/analysis/metrics/TestMetricsTest.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.test.analysis.metrics +package com.saveourtool.common.test.analysis.metrics import kotlin.js.JsName import kotlin.test.Test diff --git a/save-cloud-common/src/commonTest/kotlin/com/saveourtool/save/test/analysis/results/AnalysisResultTest.kt b/common/src/commonTest/kotlin/com/saveourtool/common/test/analysis/results/AnalysisResultTest.kt similarity index 98% rename from save-cloud-common/src/commonTest/kotlin/com/saveourtool/save/test/analysis/results/AnalysisResultTest.kt rename to common/src/commonTest/kotlin/com/saveourtool/common/test/analysis/results/AnalysisResultTest.kt index 8d71ed701b..a3349dafa8 100644 --- a/save-cloud-common/src/commonTest/kotlin/com/saveourtool/save/test/analysis/results/AnalysisResultTest.kt +++ b/common/src/commonTest/kotlin/com/saveourtool/common/test/analysis/results/AnalysisResultTest.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.test.analysis.results +package com.saveourtool.common.test.analysis.results import kotlin.js.JsName import kotlin.test.Test diff --git a/save-cloud-common/src/jsMain/kotlin/com/saveourtool/save/utils/ArchiveUtils.kt b/common/src/jsMain/kotlin/com/saveourtool/common/utils/ArchiveUtils.kt similarity index 87% rename from save-cloud-common/src/jsMain/kotlin/com/saveourtool/save/utils/ArchiveUtils.kt rename to common/src/jsMain/kotlin/com/saveourtool/common/utils/ArchiveUtils.kt index 7de523c834..517c9094be 100644 --- a/save-cloud-common/src/jsMain/kotlin/com/saveourtool/save/utils/ArchiveUtils.kt +++ b/common/src/jsMain/kotlin/com/saveourtool/common/utils/ArchiveUtils.kt @@ -2,7 +2,7 @@ * Utils to unzip the archive */ -package com.saveourtool.save.utils +package com.saveourtool.common.utils import okio.Path diff --git a/save-cloud-common/src/jsMain/kotlin/com/saveourtool/save/utils/AwesomeBenchmarks.kt b/common/src/jsMain/kotlin/com/saveourtool/common/utils/AwesomeBenchmarks.kt similarity index 86% rename from save-cloud-common/src/jsMain/kotlin/com/saveourtool/save/utils/AwesomeBenchmarks.kt rename to common/src/jsMain/kotlin/com/saveourtool/common/utils/AwesomeBenchmarks.kt index 7163da1387..705abee198 100644 --- a/save-cloud-common/src/jsMain/kotlin/com/saveourtool/save/utils/AwesomeBenchmarks.kt +++ b/common/src/jsMain/kotlin/com/saveourtool/common/utils/AwesomeBenchmarks.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.utils +package com.saveourtool.common.utils -import com.saveourtool.save.entities.benchmarks.BenchmarkCategoryEnum +import com.saveourtool.common.entities.benchmarks.BenchmarkCategoryEnum import kotlinx.serialization.Serializable diff --git a/save-cloud-common/src/jsMain/kotlin/com/saveourtool/save/utils/FileUtils.kt b/common/src/jsMain/kotlin/com/saveourtool/common/utils/FileUtils.kt similarity index 94% rename from save-cloud-common/src/jsMain/kotlin/com/saveourtool/save/utils/FileUtils.kt rename to common/src/jsMain/kotlin/com/saveourtool/common/utils/FileUtils.kt index 0c16c141a8..f16f33fc7e 100644 --- a/save-cloud-common/src/jsMain/kotlin/com/saveourtool/save/utils/FileUtils.kt +++ b/common/src/jsMain/kotlin/com/saveourtool/common/utils/FileUtils.kt @@ -2,7 +2,7 @@ * js implementation for FileUtils - Not implemented */ -package com.saveourtool.save.utils +package com.saveourtool.common.utils import okio.FileSystem import okio.Path diff --git a/save-cloud-common/src/jsMain/kotlin/com/saveourtool/save/utils/PlatformUtils.kt b/common/src/jsMain/kotlin/com/saveourtool/common/utils/PlatformUtils.kt similarity index 95% rename from save-cloud-common/src/jsMain/kotlin/com/saveourtool/save/utils/PlatformUtils.kt rename to common/src/jsMain/kotlin/com/saveourtool/common/utils/PlatformUtils.kt index efd5fa26c9..0ea0de523c 100644 --- a/save-cloud-common/src/jsMain/kotlin/com/saveourtool/save/utils/PlatformUtils.kt +++ b/common/src/jsMain/kotlin/com/saveourtool/common/utils/PlatformUtils.kt @@ -2,7 +2,7 @@ * Platform dependent utility methods */ -package com.saveourtool.save.utils +package com.saveourtool.common.utils actual fun createAtomicLong(value: Long): AtomicLong = object : AtomicLong { override fun get(): Long = throw NotImplementedError(NOT_IMPLEMENTED_ON_JS) diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/configs/ApiSwaggerSupport.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/configs/ApiSwaggerSupport.kt similarity index 87% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/configs/ApiSwaggerSupport.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/configs/ApiSwaggerSupport.kt index 476f5dc11c..51df31ac25 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/configs/ApiSwaggerSupport.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/configs/ApiSwaggerSupport.kt @@ -2,11 +2,11 @@ * Utilities related to Swagger */ -package com.saveourtool.save.configs +package com.saveourtool.common.configs -import com.saveourtool.save.utils.AUTHORIZATION_ID -import com.saveourtool.save.utils.AUTHORIZATION_NAME -import com.saveourtool.save.utils.AUTHORIZATION_ROLES +import com.saveourtool.common.utils.AUTHORIZATION_ID +import com.saveourtool.common.utils.AUTHORIZATION_NAME +import com.saveourtool.common.utils.AUTHORIZATION_ROLES import io.swagger.v3.oas.annotations.Parameter import io.swagger.v3.oas.annotations.enums.ParameterIn diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/configs/WebConfig.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/configs/WebConfig.kt similarity index 87% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/configs/WebConfig.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/configs/WebConfig.kt index 6f0682631a..936f73fe26 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/configs/WebConfig.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/configs/WebConfig.kt @@ -5,12 +5,12 @@ "MISSING_KDOC_ON_FUNCTION", ) -package com.saveourtool.save.configs +package com.saveourtool.common.configs -import com.saveourtool.save.domain.supportTestStatus -import com.saveourtool.save.test.analysis.metrics.supportTestMetrics -import com.saveourtool.save.test.analysis.results.supportAnalysisResult -import com.saveourtool.save.utils.supportKLocalDateTime +import com.saveourtool.common.domain.supportTestStatus +import com.saveourtool.common.test.analysis.metrics.supportTestMetrics +import com.saveourtool.common.test.analysis.results.supportAnalysisResult +import com.saveourtool.common.utils.supportKLocalDateTime import com.fasterxml.jackson.databind.ObjectMapper import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/domain/TestStatusMixin.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/domain/TestStatusMixin.kt similarity index 95% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/domain/TestStatusMixin.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/domain/TestStatusMixin.kt index badbaeb839..aea712174f 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/domain/TestStatusMixin.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/domain/TestStatusMixin.kt @@ -2,7 +2,7 @@ * Supports hierarchy in Jackson for [TestStatus] */ -package com.saveourtool.save.domain +package com.saveourtool.common.domain import com.saveourtool.save.core.result.* diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Agent.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Agent.kt similarity index 88% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Agent.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/Agent.kt index 8341b18198..1c41f78ab2 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Agent.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Agent.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.spring.entity.BaseEntityWithDto +import com.saveourtool.common.spring.entity.BaseEntityWithDto import javax.persistence.Entity /** diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/AgentStatus.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/AgentStatus.kt similarity index 90% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/AgentStatus.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/AgentStatus.kt index df50f7da9c..c5846376e5 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/AgentStatus.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/AgentStatus.kt @@ -2,10 +2,10 @@ * Data classes for agent status */ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.agent.AgentState -import com.saveourtool.save.spring.entity.BaseEntity +import com.saveourtool.common.agent.AgentState +import com.saveourtool.common.spring.entity.BaseEntity import java.time.LocalDateTime import javax.persistence.Entity diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Comment.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Comment.kt similarity index 87% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Comment.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/Comment.kt index b08b1cdde5..148b34d02d 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Comment.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Comment.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.spring.entity.BaseEntityWithDateAndDto +import com.saveourtool.common.spring.entity.BaseEntityWithDateAndDto import javax.persistence.Entity import javax.persistence.JoinColumn diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Contest.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Contest.kt similarity index 92% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Contest.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/Contest.kt index b6a711aa44..71487b2860 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Contest.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Contest.kt @@ -1,9 +1,9 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.entities.contest.ContestDto -import com.saveourtool.save.entities.contest.ContestStatus -import com.saveourtool.save.spring.entity.BaseEntity -import com.saveourtool.save.validation.isValidName +import com.saveourtool.common.entities.contest.ContestDto +import com.saveourtool.common.entities.contest.ContestStatus +import com.saveourtool.common.spring.entity.BaseEntity +import com.saveourtool.common.validation.isValidName import com.fasterxml.jackson.annotation.JsonIgnore diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/ContestSample.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/ContestSample.kt similarity index 77% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/ContestSample.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/ContestSample.kt index 718601822e..af9221bcf3 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/ContestSample.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/ContestSample.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.entities.contest.ContestSampleDto -import com.saveourtool.save.spring.entity.BaseEntityWithDateAndDto +import com.saveourtool.common.entities.contest.ContestSampleDto +import com.saveourtool.common.spring.entity.BaseEntityWithDateAndDto import javax.persistence.Entity import javax.persistence.JoinColumn import javax.persistence.ManyToOne diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/ContestSampleField.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/ContestSampleField.kt similarity index 70% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/ContestSampleField.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/ContestSampleField.kt index 7e4d6610ed..6215df39a6 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/ContestSampleField.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/ContestSampleField.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.entities.contest.ContestSampleFieldDto -import com.saveourtool.save.entities.contest.ContestSampleFieldType -import com.saveourtool.save.spring.entity.BaseEntityWithDateAndDto +import com.saveourtool.common.entities.contest.ContestSampleFieldDto +import com.saveourtool.common.entities.contest.ContestSampleFieldType +import com.saveourtool.common.spring.entity.BaseEntityWithDateAndDto import javax.persistence.* /** diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Execution.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Execution.kt similarity index 91% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Execution.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/Execution.kt index c228e8bde5..7f948ce79d 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Execution.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Execution.kt @@ -1,12 +1,12 @@ -package com.saveourtool.save.entities - -import com.saveourtool.save.domain.Sdk -import com.saveourtool.save.domain.toSdk -import com.saveourtool.save.execution.ExecutionDto -import com.saveourtool.save.execution.ExecutionStatus -import com.saveourtool.save.execution.TestingType -import com.saveourtool.save.request.RunExecutionRequest -import com.saveourtool.save.spring.entity.BaseEntity +package com.saveourtool.common.entities + +import com.saveourtool.common.domain.Sdk +import com.saveourtool.common.domain.toSdk +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.execution.ExecutionStatus +import com.saveourtool.common.execution.TestingType +import com.saveourtool.common.request.RunExecutionRequest +import com.saveourtool.common.spring.entity.BaseEntity import java.net.URL import java.time.LocalDateTime import java.time.ZoneOffset diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/File.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/File.kt similarity index 91% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/File.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/File.kt index a7adc925c8..cc2283fcb0 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/File.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/File.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.domain.ProjectCoordinates -import com.saveourtool.save.spring.entity.BaseEntityWithDtoWithId +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.spring.entity.BaseEntityWithDtoWithId import java.nio.file.Path import java.nio.file.Paths diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Git.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Git.kt similarity index 91% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Git.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/Git.kt index b27cff715e..7504f473a1 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Git.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Git.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.spring.entity.BaseEntityWithDto +import com.saveourtool.common.spring.entity.BaseEntityWithDto import javax.persistence.Entity import javax.persistence.JoinColumn import javax.persistence.ManyToOne diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkContestExecution.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkContestExecution.kt similarity index 85% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkContestExecution.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkContestExecution.kt index 1ad87d20ce..3109ac2ff7 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkContestExecution.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkContestExecution.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.entities.contest.ContestResult -import com.saveourtool.save.spring.entity.BaseEntity +import com.saveourtool.common.entities.contest.ContestResult +import com.saveourtool.common.spring.entity.BaseEntity import javax.persistence.Entity import javax.persistence.JoinColumn diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkContestProject.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkContestProject.kt similarity index 83% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkContestProject.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkContestProject.kt index 460310b2f8..e92bf35264 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkContestProject.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkContestProject.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.entities.contest.ContestResult -import com.saveourtool.save.spring.entity.BaseEntity +import com.saveourtool.common.entities.contest.ContestResult +import com.saveourtool.common.spring.entity.BaseEntity import javax.persistence.Entity import javax.persistence.JoinColumn import javax.persistence.ManyToOne diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkContestTestSuite.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkContestTestSuite.kt similarity index 82% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkContestTestSuite.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkContestTestSuite.kt index 3d7ca3a1b9..5ce932fabe 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkContestTestSuite.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkContestTestSuite.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.spring.entity.BaseEntity +import com.saveourtool.common.spring.entity.BaseEntity import com.fasterxml.jackson.annotation.JsonBackReference diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkExecutionAgent.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkExecutionAgent.kt similarity index 84% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkExecutionAgent.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkExecutionAgent.kt index 980f26f8ee..997093f8c0 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkExecutionAgent.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkExecutionAgent.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.spring.entity.BaseEntityWithDto +import com.saveourtool.common.spring.entity.BaseEntityWithDto import javax.persistence.Entity import javax.persistence.JoinColumn import javax.persistence.ManyToOne diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkExecutionFile.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkExecutionFile.kt similarity index 84% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkExecutionFile.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkExecutionFile.kt index 013195b565..2f92dd1822 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkExecutionFile.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkExecutionFile.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.spring.entity.BaseEntityWithDto +import com.saveourtool.common.spring.entity.BaseEntityWithDto import javax.persistence.Entity import javax.persistence.JoinColumn import javax.persistence.ManyToOne diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkExecutionTestSuite.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkExecutionTestSuite.kt similarity index 85% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkExecutionTestSuite.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkExecutionTestSuite.kt index 78b687fbb0..2a2d473fc5 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkExecutionTestSuite.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkExecutionTestSuite.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.spring.entity.BaseEntityWithDto +import com.saveourtool.common.spring.entity.BaseEntityWithDto import javax.persistence.Entity import javax.persistence.JoinColumn import javax.persistence.ManyToOne diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkOrganizationTestSuite.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkOrganizationTestSuite.kt similarity index 84% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkOrganizationTestSuite.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkOrganizationTestSuite.kt index cc6c862e77..eefa634180 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkOrganizationTestSuite.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkOrganizationTestSuite.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.permission.Rights -import com.saveourtool.save.spring.entity.BaseEntityWithDto +import com.saveourtool.common.permission.Rights +import com.saveourtool.common.spring.entity.BaseEntityWithDto import javax.persistence.* import javax.persistence.Entity import javax.persistence.Enumerated diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkProjectGithub.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkProjectGithub.kt similarity index 83% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkProjectGithub.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkProjectGithub.kt index c41da2cceb..d66a158bde 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkProjectGithub.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkProjectGithub.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.spring.entity.BaseEntity +import com.saveourtool.common.spring.entity.BaseEntity import javax.persistence.* import javax.persistence.Entity import javax.persistence.JoinColumn diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkUserOrganization.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkUserOrganization.kt similarity index 81% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkUserOrganization.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkUserOrganization.kt index 0fba281052..7226e876c4 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkUserOrganization.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkUserOrganization.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.domain.Role -import com.saveourtool.save.spring.entity.BaseEntity +import com.saveourtool.common.domain.Role +import com.saveourtool.common.spring.entity.BaseEntity import javax.persistence.* import javax.persistence.Entity import javax.persistence.Enumerated diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkUserProject.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkUserProject.kt similarity index 80% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkUserProject.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkUserProject.kt index abe19ca42a..6fca3fd3d6 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/LnkUserProject.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/LnkUserProject.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.domain.Role -import com.saveourtool.save.spring.entity.BaseEntity +import com.saveourtool.common.domain.Role +import com.saveourtool.common.spring.entity.BaseEntity import javax.persistence.* import javax.persistence.Entity import javax.persistence.Enumerated diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Notification.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Notification.kt similarity index 85% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Notification.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/Notification.kt index 619979b8d5..58e418d189 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Notification.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Notification.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.spring.entity.BaseEntityWithDateAndDto +import com.saveourtool.common.spring.entity.BaseEntityWithDateAndDto import javax.persistence.Entity import javax.persistence.JoinColumn diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Organization.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Organization.kt similarity index 95% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Organization.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/Organization.kt index fad9835e11..59b141b0b6 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Organization.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Organization.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.spring.entity.BaseEntityWithDto +import com.saveourtool.common.spring.entity.BaseEntityWithDto import java.time.LocalDateTime import javax.persistence.* diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/OriginalLogin.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/OriginalLogin.kt similarity index 84% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/OriginalLogin.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/OriginalLogin.kt index 30bb3260e6..a06a3c0ba2 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/OriginalLogin.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/OriginalLogin.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.spring.entity.BaseEntity +import com.saveourtool.common.spring.entity.BaseEntity import com.fasterxml.jackson.annotation.JsonBackReference diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Project.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Project.kt similarity index 94% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Project.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/Project.kt index 8430465b6a..89ab2c5107 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Project.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Project.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.domain.ProjectCoordinates -import com.saveourtool.save.spring.entity.BaseEntityWithDto +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.spring.entity.BaseEntityWithDto import javax.persistence.* diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/ProjectProblem.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/ProjectProblem.kt similarity index 89% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/ProjectProblem.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/ProjectProblem.kt index a378befcf9..6120b6beea 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/ProjectProblem.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/ProjectProblem.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.spring.entity.BaseEntityWithDateAndDto +import com.saveourtool.common.spring.entity.BaseEntityWithDateAndDto import javax.persistence.* /** diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Tag.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Tag.kt similarity index 74% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Tag.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/Tag.kt index 094c27381e..4a23d0f626 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Tag.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Tag.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.spring.entity.BaseEntity +import com.saveourtool.common.spring.entity.BaseEntity import javax.persistence.Entity import javax.persistence.Table diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Test.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Test.kt similarity index 85% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Test.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/Test.kt index 3a12295b30..9f7e6534cc 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/Test.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/Test.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.spring.entity.BaseEntity -import com.saveourtool.save.test.TestDto -import com.saveourtool.save.utils.DATABASE_DELIMITER +import com.saveourtool.common.spring.entity.BaseEntity +import com.saveourtool.common.test.TestDto +import com.saveourtool.common.utils.DATABASE_DELIMITER import java.time.LocalDateTime import javax.persistence.Entity import javax.persistence.JoinColumn diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/TestExecution.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/TestExecution.kt similarity index 85% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/TestExecution.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/TestExecution.kt index 038d4004a8..a3e9cfb4a5 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/TestExecution.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/TestExecution.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.agent.TestExecutionDto -import com.saveourtool.save.domain.TestResultStatus -import com.saveourtool.save.spring.entity.BaseEntityWithDtoWithId +import com.saveourtool.common.agent.TestExecutionDto +import com.saveourtool.common.domain.TestResultStatus +import com.saveourtool.common.spring.entity.BaseEntityWithDtoWithId import java.time.LocalDateTime import java.time.ZoneOffset @@ -55,13 +55,13 @@ class TestExecution( var unexpected: Long?, -) : BaseEntityWithDtoWithId() { +) : BaseEntityWithDtoWithId() { /** * Converts `this` to [TestExecutionDto] * * @return a new [TestExecutionDto] */ - override fun toDto() = TestExecutionDto( + override fun toDto() = com.saveourtool.common.agent.TestExecutionDto( filePath = test.filePath, pluginName = test.pluginName, agentContainerId = agent?.containerId, diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/TestSuite.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/TestSuite.kt similarity index 90% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/TestSuite.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/TestSuite.kt index 89d0c85c80..deb372a79d 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/TestSuite.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/TestSuite.kt @@ -1,13 +1,13 @@ -package com.saveourtool.save.entities - -import com.saveourtool.save.domain.PluginType -import com.saveourtool.save.domain.pluginName -import com.saveourtool.save.domain.toPluginType -import com.saveourtool.save.spring.entity.BaseEntityWithDtoWithId -import com.saveourtool.save.testsuite.TestSuiteDto -import com.saveourtool.save.testsuite.TestSuiteVersioned -import com.saveourtool.save.utils.DATABASE_DELIMITER -import com.saveourtool.save.utils.PRETTY_DELIMITER +package com.saveourtool.common.entities + +import com.saveourtool.common.domain.PluginType +import com.saveourtool.common.domain.pluginName +import com.saveourtool.common.domain.toPluginType +import com.saveourtool.common.spring.entity.BaseEntityWithDtoWithId +import com.saveourtool.common.testsuite.TestSuiteDto +import com.saveourtool.common.testsuite.TestSuiteVersioned +import com.saveourtool.common.utils.DATABASE_DELIMITER +import com.saveourtool.common.utils.PRETTY_DELIMITER import java.time.LocalDateTime import javax.persistence.Entity diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/TestSuitesSource.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/TestSuitesSource.kt similarity index 93% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/TestSuitesSource.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/TestSuitesSource.kt index 5fd799ab1e..9880f6a7a8 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/TestSuitesSource.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/TestSuitesSource.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.spring.entity.BaseEntityWithDtoWithId -import com.saveourtool.save.testsuite.TestSuitesSourceDto +import com.saveourtool.common.spring.entity.BaseEntityWithDtoWithId +import com.saveourtool.common.testsuite.TestSuitesSourceDto import javax.persistence.Entity import javax.persistence.JoinColumn import javax.persistence.ManyToOne diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/TestsSourceSnapshot.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/TestsSourceSnapshot.kt similarity index 90% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/TestsSourceSnapshot.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/TestsSourceSnapshot.kt index 4027a8386d..b3523b4f65 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/TestsSourceSnapshot.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/TestsSourceSnapshot.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.spring.entity.BaseEntityWithDtoWithId -import com.saveourtool.save.test.TestsSourceSnapshotDto +import com.saveourtool.common.spring.entity.BaseEntityWithDtoWithId +import com.saveourtool.common.test.TestsSourceSnapshotDto import java.time.LocalDateTime import javax.persistence.Entity diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/TestsSourceVersion.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/TestsSourceVersion.kt similarity index 89% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/TestsSourceVersion.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/TestsSourceVersion.kt index 181736f139..5c9ae559ad 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/TestsSourceVersion.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/TestsSourceVersion.kt @@ -1,9 +1,9 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.spring.entity.BaseEntityWithDtoWithId -import com.saveourtool.save.test.TestsSourceVersionDto -import com.saveourtool.save.test.TestsSourceVersionInfo -import com.saveourtool.save.testsuite.TestSuitesSourceFetchMode +import com.saveourtool.common.spring.entity.BaseEntityWithDtoWithId +import com.saveourtool.common.test.TestsSourceVersionDto +import com.saveourtool.common.test.TestsSourceVersionInfo +import com.saveourtool.common.testsuite.TestSuitesSourceFetchMode import java.time.LocalDateTime import javax.persistence.* diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/User.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/User.kt similarity index 91% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/User.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/User.kt index 2b18c0d3c7..f4e54d7ff3 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/User.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/User.kt @@ -1,9 +1,9 @@ -package com.saveourtool.save.entities +package com.saveourtool.common.entities -import com.saveourtool.save.domain.Role -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.info.UserStatus -import com.saveourtool.save.spring.entity.BaseEntityWithDate +import com.saveourtool.common.domain.Role +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.info.UserStatus +import com.saveourtool.common.spring.entity.BaseEntityWithDate import com.fasterxml.jackson.annotation.JsonIgnore diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/benchmarks/AwesomeBenchmarks.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/benchmarks/AwesomeBenchmarks.kt similarity index 89% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/benchmarks/AwesomeBenchmarks.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entities/benchmarks/AwesomeBenchmarks.kt index 05c8d9f80a..2d77bd4930 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entities/benchmarks/AwesomeBenchmarks.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entities/benchmarks/AwesomeBenchmarks.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.entities.benchmarks +package com.saveourtool.common.entities.benchmarks -import com.saveourtool.save.spring.entity.BaseEntity -import com.saveourtool.save.utils.DATABASE_DELIMITER +import com.saveourtool.common.spring.entity.BaseEntity +import com.saveourtool.common.utils.DATABASE_DELIMITER import javax.persistence.Entity import javax.persistence.EnumType import javax.persistence.Enumerated diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/CosvFile.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/CosvFile.kt similarity index 85% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/CosvFile.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/CosvFile.kt index cf0cf8e370..76bb5704bc 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/CosvFile.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/CosvFile.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.entitiescosv +package com.saveourtool.common.entitiescosv -import com.saveourtool.save.entities.cosv.CosvFileDto -import com.saveourtool.save.spring.entity.BaseEntity +import com.saveourtool.common.entities.cosv.CosvFileDto +import com.saveourtool.common.spring.entity.BaseEntity import java.time.LocalDateTime import javax.persistence.Entity diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/CosvGeneratedId.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/CosvGeneratedId.kt similarity index 78% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/CosvGeneratedId.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/CosvGeneratedId.kt index bf877f4b76..3f9b93cdd1 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/CosvGeneratedId.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/CosvGeneratedId.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entitiescosv +package com.saveourtool.common.entitiescosv -import com.saveourtool.save.spring.entity.BaseEntityWithDate +import com.saveourtool.common.spring.entity.BaseEntityWithDate import javax.persistence.Entity import javax.persistence.Table diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/LnkVulnerabilityMetadataTag.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/LnkVulnerabilityMetadataTag.kt similarity index 84% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/LnkVulnerabilityMetadataTag.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/LnkVulnerabilityMetadataTag.kt index d30938cd26..a10ebcbd86 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/LnkVulnerabilityMetadataTag.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/LnkVulnerabilityMetadataTag.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entitiescosv +package com.saveourtool.common.entitiescosv -import com.saveourtool.save.spring.entity.BaseEntity +import com.saveourtool.common.spring.entity.BaseEntity import com.fasterxml.jackson.annotation.JsonBackReference import javax.persistence.* diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/LnkVulnerabilityMetadataUser.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/LnkVulnerabilityMetadataUser.kt similarity index 89% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/LnkVulnerabilityMetadataUser.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/LnkVulnerabilityMetadataUser.kt index edc8cdf063..9eb8eda9de 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/LnkVulnerabilityMetadataUser.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/LnkVulnerabilityMetadataUser.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entitiescosv +package com.saveourtool.common.entitiescosv -import com.saveourtool.save.spring.entity.BaseEntity +import com.saveourtool.common.spring.entity.BaseEntity import javax.persistence.* /** diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/RawCosvFile.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/RawCosvFile.kt similarity index 85% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/RawCosvFile.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/RawCosvFile.kt index dee30616d8..e8a3c93265 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/RawCosvFile.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/RawCosvFile.kt @@ -1,10 +1,10 @@ -package com.saveourtool.save.entitiescosv +package com.saveourtool.common.entitiescosv -import com.saveourtool.save.entities.cosv.RawCosvFileDto -import com.saveourtool.save.entities.cosv.RawCosvFileStatus -import com.saveourtool.save.spring.entity.BaseEntityWithDtoWithId -import com.saveourtool.save.spring.entity.IBaseEntityWithDate -import com.saveourtool.save.utils.ZIP_ARCHIVE_EXTENSION +import com.saveourtool.common.entities.cosv.RawCosvFileDto +import com.saveourtool.common.entities.cosv.RawCosvFileStatus +import com.saveourtool.common.spring.entity.BaseEntityWithDtoWithId +import com.saveourtool.common.spring.entity.IBaseEntityWithDate +import com.saveourtool.common.utils.ZIP_ARCHIVE_EXTENSION import org.hibernate.annotations.Formula diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/VulnerabilityMetadata.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/VulnerabilityMetadata.kt similarity index 81% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/VulnerabilityMetadata.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/VulnerabilityMetadata.kt index ad50c436d6..3915619354 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/VulnerabilityMetadata.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/VulnerabilityMetadata.kt @@ -1,13 +1,13 @@ -package com.saveourtool.save.entitiescosv +package com.saveourtool.common.entitiescosv -import com.saveourtool.save.entities.OrganizationDto -import com.saveourtool.save.entities.cosv.VulnerabilityMetadataDto -import com.saveourtool.save.entities.cosv.VulnerabilityMetadataDto.Companion.SUMMARY_LENGTH -import com.saveourtool.save.entities.cosv.VulnerabilityMetadataDtoWithUserAndOrganization -import com.saveourtool.save.entities.vulnerability.VulnerabilityLanguage -import com.saveourtool.save.entities.vulnerability.VulnerabilityStatus -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.spring.entity.BaseEntityWithDto +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.entities.cosv.VulnerabilityMetadataDto +import com.saveourtool.common.entities.cosv.VulnerabilityMetadataDto.Companion.SUMMARY_LENGTH +import com.saveourtool.common.entities.cosv.VulnerabilityMetadataDtoWithUserAndOrganization +import com.saveourtool.common.entities.vulnerability.VulnerabilityLanguage +import com.saveourtool.common.entities.vulnerability.VulnerabilityStatus +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.spring.entity.BaseEntityWithDto import java.time.LocalDateTime import javax.persistence.* diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/VulnerabilityMetadataProject.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/VulnerabilityMetadataProject.kt similarity index 80% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/VulnerabilityMetadataProject.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/VulnerabilityMetadataProject.kt index 91bcc3de7d..96ad1f01c5 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/VulnerabilityMetadataProject.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/VulnerabilityMetadataProject.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.entitiescosv +package com.saveourtool.common.entitiescosv -import com.saveourtool.save.entities.vulnerability.VulnerabilityProjectDto -import com.saveourtool.save.entities.vulnerability.VulnerabilityProjectType -import com.saveourtool.save.spring.entity.BaseEntityWithDto +import com.saveourtool.common.entities.vulnerability.VulnerabilityProjectDto +import com.saveourtool.common.entities.vulnerability.VulnerabilityProjectType +import com.saveourtool.common.spring.entity.BaseEntityWithDto import com.fasterxml.jackson.annotation.JsonBackReference diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/evententities/VulnerabilityMetadataEvent.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/evententities/VulnerabilityMetadataEvent.kt similarity index 53% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/evententities/VulnerabilityMetadataEvent.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/evententities/VulnerabilityMetadataEvent.kt index 3acf01306b..424310a208 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/entitiescosv/evententities/VulnerabilityMetadataEvent.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/entitiescosv/evententities/VulnerabilityMetadataEvent.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.entitiescosv.evententities +package com.saveourtool.common.entitiescosv.evententities -import com.saveourtool.save.entitiescosv.VulnerabilityMetadata +import com.saveourtool.common.entitiescosv.VulnerabilityMetadata /** * @property vulnerabilityMetadata diff --git a/common/src/jvmMain/kotlin/com/saveourtool/common/evententities/CommentEvent.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/evententities/CommentEvent.kt new file mode 100644 index 0000000000..b37a44b341 --- /dev/null +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/evententities/CommentEvent.kt @@ -0,0 +1,10 @@ +package com.saveourtool.common.evententities + +import com.saveourtool.common.entities.Comment + +/** + * @property comment + **/ +data class CommentEvent( + var comment: Comment +) diff --git a/common/src/jvmMain/kotlin/com/saveourtool/common/evententities/UserEvent.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/evententities/UserEvent.kt new file mode 100644 index 0000000000..35a260083d --- /dev/null +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/evententities/UserEvent.kt @@ -0,0 +1,10 @@ +package com.saveourtool.common.evententities + +import com.saveourtool.common.entities.User + +/** + * @property user + **/ +data class UserEvent( + var user: User +) diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/exceptions/BackendInternalException.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/exceptions/BackendInternalException.kt similarity index 80% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/exceptions/BackendInternalException.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/exceptions/BackendInternalException.kt index 5805cb10e8..e528c6d8c1 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/exceptions/BackendInternalException.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/exceptions/BackendInternalException.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.exceptions +package com.saveourtool.common.exceptions import java.lang.Exception diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/listeners/DateListener.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/listeners/DateListener.kt similarity index 80% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/listeners/DateListener.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/listeners/DateListener.kt index 1faf889f34..c559c5a3d6 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/listeners/DateListener.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/listeners/DateListener.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.listeners +package com.saveourtool.common.listeners -import com.saveourtool.save.spring.entity.BaseEntity -import com.saveourtool.save.spring.entity.IBaseEntityWithDate +import com.saveourtool.common.spring.entity.BaseEntity +import com.saveourtool.common.spring.entity.IBaseEntityWithDate import java.time.LocalDateTime import javax.persistence.PrePersist import javax.persistence.PreUpdate diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/CommentRepository.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/CommentRepository.kt similarity index 84% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/CommentRepository.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/repository/CommentRepository.kt index 86c7177e63..b4d7f1b639 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/CommentRepository.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/CommentRepository.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.repository +package com.saveourtool.common.repository -import com.saveourtool.save.entities.Comment -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.Comment +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository import java.time.LocalDateTime diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/GitRepository.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/GitRepository.kt similarity index 70% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/GitRepository.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/repository/GitRepository.kt index dfdd94d57c..5d2c994129 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/GitRepository.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/GitRepository.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.repository +package com.saveourtool.common.repository -import com.saveourtool.save.entities.Git -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.Git +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository /** diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/LnkUserOrganizationRepository.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/LnkUserOrganizationRepository.kt similarity index 93% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/LnkUserOrganizationRepository.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/repository/LnkUserOrganizationRepository.kt index 68b02121a4..2d44774726 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/LnkUserOrganizationRepository.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/LnkUserOrganizationRepository.kt @@ -1,10 +1,10 @@ -package com.saveourtool.save.repository +package com.saveourtool.common.repository -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.LnkUserOrganization -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.entities.OrganizationStatus -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.LnkUserOrganization +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.entities.OrganizationStatus +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.data.jpa.repository.Modifying import org.springframework.data.jpa.repository.Query import org.springframework.data.repository.query.Param diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/LnkUserProjectRepository.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/LnkUserProjectRepository.kt similarity index 88% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/LnkUserProjectRepository.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/repository/LnkUserProjectRepository.kt index f65bd45443..be3ecd2f63 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/LnkUserProjectRepository.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/LnkUserProjectRepository.kt @@ -1,9 +1,9 @@ -package com.saveourtool.save.repository +package com.saveourtool.common.repository -import com.saveourtool.save.entities.LnkUserProject -import com.saveourtool.save.entities.Project -import com.saveourtool.save.entities.ProjectStatus -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.LnkUserProject +import com.saveourtool.common.entities.Project +import com.saveourtool.common.entities.ProjectStatus +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.data.jpa.repository.Modifying import org.springframework.data.jpa.repository.Query import org.springframework.data.repository.query.Param diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/NotificationRepository.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/NotificationRepository.kt similarity index 66% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/NotificationRepository.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/repository/NotificationRepository.kt index 24ed56f08e..1163b92214 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/NotificationRepository.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/NotificationRepository.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.repository +package com.saveourtool.common.repository -import com.saveourtool.save.entities.Notification -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.Notification +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository /** diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/OrganizationRepository.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/OrganizationRepository.kt similarity index 84% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/OrganizationRepository.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/repository/OrganizationRepository.kt index 03ea122eb9..3ef87ec797 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/OrganizationRepository.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/OrganizationRepository.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.repository +package com.saveourtool.common.repository -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.entities.OrganizationStatus -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.entities.OrganizationStatus +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.data.domain.Pageable import org.springframework.stereotype.Repository diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/OriginalLoginRepository.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/OriginalLoginRepository.kt similarity index 74% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/OriginalLoginRepository.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/repository/OriginalLoginRepository.kt index 82984928fe..444a0b2cdc 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/OriginalLoginRepository.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/OriginalLoginRepository.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.repository +package com.saveourtool.common.repository -import com.saveourtool.save.entities.OriginalLogin -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.OriginalLogin +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository /** diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/ProjectRepository.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/ProjectRepository.kt similarity index 92% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/ProjectRepository.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/repository/ProjectRepository.kt index cd708aa344..eb7ca6b01f 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/ProjectRepository.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/ProjectRepository.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.repository +package com.saveourtool.common.repository -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.entities.Project -import com.saveourtool.save.entities.ProjectStatus +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.entities.Project +import com.saveourtool.common.entities.ProjectStatus import org.springframework.data.jpa.repository.JpaRepository import org.springframework.data.jpa.repository.JpaSpecificationExecutor import org.springframework.data.repository.query.QueryByExampleExecutor diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/TagRepository.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/TagRepository.kt similarity index 75% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/TagRepository.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/repository/TagRepository.kt index 02c5c49818..d9ff2e3395 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/TagRepository.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/TagRepository.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.repository +package com.saveourtool.common.repository -import com.saveourtool.save.entities.Tag -import com.saveourtool.save.entitiescosv.LnkVulnerabilityMetadataTag -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.Tag +import com.saveourtool.common.entitiescosv.LnkVulnerabilityMetadataTag +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository /** diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/UserRepository.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/UserRepository.kt similarity index 91% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/UserRepository.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/repository/UserRepository.kt index 0bd3f017c6..dbb6763536 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/UserRepository.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/UserRepository.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.repository +package com.saveourtool.common.repository -import com.saveourtool.save.entities.User -import com.saveourtool.save.info.UserStatus -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.User +import com.saveourtool.common.info.UserStatus +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.data.domain.Page import org.springframework.data.domain.Pageable import org.springframework.stereotype.Repository diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/ValidateRepository.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/ValidateRepository.kt similarity index 96% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/ValidateRepository.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/repository/ValidateRepository.kt index 935e5b5f15..a9da4447a0 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/repository/ValidateRepository.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/repository/ValidateRepository.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.repository +package com.saveourtool.common.repository import org.springframework.data.jpa.repository.Modifying import org.springframework.data.jpa.repository.Query diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/s3/DefaultS3Configuration.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/s3/DefaultS3Configuration.kt similarity index 91% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/s3/DefaultS3Configuration.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/s3/DefaultS3Configuration.kt index 9a1e96b305..88a29afa4a 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/s3/DefaultS3Configuration.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/s3/DefaultS3Configuration.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.s3 +package com.saveourtool.common.s3 import org.springframework.context.annotation.Bean diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/s3/DefaultS3Operations.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/s3/DefaultS3Operations.kt similarity index 99% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/s3/DefaultS3Operations.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/s3/DefaultS3Operations.kt index d14f4c5738..22a630dcbc 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/s3/DefaultS3Operations.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/s3/DefaultS3Operations.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.s3 +package com.saveourtool.common.s3 import org.springframework.http.MediaType import reactor.core.scheduler.Scheduler diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/s3/S3Operations.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/s3/S3Operations.kt similarity index 99% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/s3/S3Operations.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/s3/S3Operations.kt index 30f1a55846..0002b55fef 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/s3/S3Operations.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/s3/S3Operations.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.s3 +package com.saveourtool.common.s3 import reactor.core.scheduler.Scheduler import software.amazon.awssdk.core.async.AsyncRequestBody diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/s3/S3OperationsProperties.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/s3/S3OperationsProperties.kt similarity index 98% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/s3/S3OperationsProperties.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/s3/S3OperationsProperties.kt index 5c9493ad50..01f83949e0 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/s3/S3OperationsProperties.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/s3/S3OperationsProperties.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.s3 +package com.saveourtool.common.s3 import reactor.core.scheduler.Schedulers import software.amazon.awssdk.auth.credentials.AwsBasicCredentials diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/security/CommentPermissionEvaluator.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/security/CommentPermissionEvaluator.kt similarity index 77% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/security/CommentPermissionEvaluator.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/security/CommentPermissionEvaluator.kt index a676b9c179..e735ca9daa 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/security/CommentPermissionEvaluator.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/security/CommentPermissionEvaluator.kt @@ -1,10 +1,10 @@ -package com.saveourtool.save.security +package com.saveourtool.common.security -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.Comment -import com.saveourtool.save.entities.CommentDto -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.utils.hasRole +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.Comment +import com.saveourtool.common.entities.CommentDto +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.utils.hasRole import org.springframework.security.core.Authentication import org.springframework.stereotype.Component diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/security/OrganizationPermissionEvaluator.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/security/OrganizationPermissionEvaluator.kt similarity index 93% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/security/OrganizationPermissionEvaluator.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/security/OrganizationPermissionEvaluator.kt index cf728827e5..28873b6696 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/security/OrganizationPermissionEvaluator.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/security/OrganizationPermissionEvaluator.kt @@ -1,14 +1,14 @@ -package com.saveourtool.save.security - -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.entities.OrganizationStatus -import com.saveourtool.save.entities.User -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.service.LnkUserOrganizationService -import com.saveourtool.save.service.UserService -import com.saveourtool.save.utils.hasRole -import com.saveourtool.save.utils.username +package com.saveourtool.common.security + +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.entities.OrganizationStatus +import com.saveourtool.common.entities.User +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.service.LnkUserOrganizationService +import com.saveourtool.common.service.UserService +import com.saveourtool.common.utils.hasRole +import com.saveourtool.common.utils.username import org.springframework.security.core.Authentication import org.springframework.stereotype.Component diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/security/ProjectPermissionEvaluator.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/security/ProjectPermissionEvaluator.kt similarity index 91% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/security/ProjectPermissionEvaluator.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/security/ProjectPermissionEvaluator.kt index 444ad9ec13..3a995a9e37 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/security/ProjectPermissionEvaluator.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/security/ProjectPermissionEvaluator.kt @@ -1,18 +1,18 @@ -package com.saveourtool.save.security - -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.Execution -import com.saveourtool.save.entities.Project -import com.saveourtool.save.entities.ProjectStatus -import com.saveourtool.save.entities.User -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.repository.LnkUserProjectRepository -import com.saveourtool.save.service.LnkUserOrganizationService -import com.saveourtool.save.service.LnkUserProjectService -import com.saveourtool.save.service.UserService -import com.saveourtool.save.utils.getHighestRole -import com.saveourtool.save.utils.hasRole -import com.saveourtool.save.utils.username +package com.saveourtool.common.security + +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.Execution +import com.saveourtool.common.entities.Project +import com.saveourtool.common.entities.ProjectStatus +import com.saveourtool.common.entities.User +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.repository.LnkUserProjectRepository +import com.saveourtool.common.service.LnkUserOrganizationService +import com.saveourtool.common.service.LnkUserProjectService +import com.saveourtool.common.service.UserService +import com.saveourtool.common.utils.getHighestRole +import com.saveourtool.common.utils.hasRole +import com.saveourtool.common.utils.username import org.springframework.http.HttpStatus import org.springframework.security.core.Authentication diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/CommentService.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/service/CommentService.kt similarity index 83% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/CommentService.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/service/CommentService.kt index be76f29475..f60ed32c7f 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/CommentService.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/service/CommentService.kt @@ -1,12 +1,12 @@ -package com.saveourtool.save.service +package com.saveourtool.common.service -import com.saveourtool.save.entities.Comment -import com.saveourtool.save.entities.CommentDto -import com.saveourtool.save.evententities.CommentEvent -import com.saveourtool.save.repository.CommentRepository -import com.saveourtool.save.repository.UserRepository -import com.saveourtool.save.utils.orNotFound -import com.saveourtool.save.utils.username +import com.saveourtool.common.entities.Comment +import com.saveourtool.common.entities.CommentDto +import com.saveourtool.common.evententities.CommentEvent +import com.saveourtool.common.repository.CommentRepository +import com.saveourtool.common.repository.UserRepository +import com.saveourtool.common.utils.orNotFound +import com.saveourtool.common.utils.username import org.springframework.context.ApplicationEventPublisher import org.springframework.security.core.Authentication diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/GitService.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/service/GitService.kt similarity index 87% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/GitService.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/service/GitService.kt index 545bb09b37..0b5871cec2 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/GitService.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/service/GitService.kt @@ -1,9 +1,9 @@ -package com.saveourtool.save.service +package com.saveourtool.common.service -import com.saveourtool.save.entities.Git -import com.saveourtool.save.entities.GitDto -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.repository.GitRepository +import com.saveourtool.common.entities.Git +import com.saveourtool.common.entities.GitDto +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.repository.GitRepository import org.springframework.data.repository.findByIdOrNull import org.springframework.stereotype.Service diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/LnkUserOrganizationService.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/service/LnkUserOrganizationService.kt similarity index 95% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/LnkUserOrganizationService.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/service/LnkUserOrganizationService.kt index 1bcee22c46..708e2d8187 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/LnkUserOrganizationService.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/service/LnkUserOrganizationService.kt @@ -1,14 +1,14 @@ -package com.saveourtool.save.service +package com.saveourtool.common.service -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.* -import com.saveourtool.save.filters.OrganizationFilter -import com.saveourtool.save.repository.LnkUserOrganizationRepository -import com.saveourtool.save.repository.UserRepository -import com.saveourtool.save.utils.blockingToFlux -import com.saveourtool.save.utils.getHighestRole -import com.saveourtool.save.utils.orNotFound -import com.saveourtool.save.utils.username +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.* +import com.saveourtool.common.filters.OrganizationFilter +import com.saveourtool.common.repository.LnkUserOrganizationRepository +import com.saveourtool.common.repository.UserRepository +import com.saveourtool.common.utils.blockingToFlux +import com.saveourtool.common.utils.getHighestRole +import com.saveourtool.common.utils.orNotFound +import com.saveourtool.common.utils.username import org.springframework.data.domain.PageRequest import org.springframework.security.core.Authentication diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/LnkUserProjectService.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/service/LnkUserProjectService.kt similarity index 91% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/LnkUserProjectService.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/service/LnkUserProjectService.kt index a2d29a8e9f..125d59927c 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/LnkUserProjectService.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/service/LnkUserProjectService.kt @@ -1,14 +1,14 @@ -package com.saveourtool.save.service +package com.saveourtool.common.service -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.LnkUserProject -import com.saveourtool.save.entities.Project -import com.saveourtool.save.entities.ProjectStatus -import com.saveourtool.save.entities.User -import com.saveourtool.save.repository.LnkUserProjectRepository -import com.saveourtool.save.repository.UserRepository -import com.saveourtool.save.utils.getHighestRole -import com.saveourtool.save.utils.username +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.LnkUserProject +import com.saveourtool.common.entities.Project +import com.saveourtool.common.entities.ProjectStatus +import com.saveourtool.common.entities.User +import com.saveourtool.common.repository.LnkUserProjectRepository +import com.saveourtool.common.repository.UserRepository +import com.saveourtool.common.utils.getHighestRole +import com.saveourtool.common.utils.username import org.springframework.data.domain.PageRequest import org.springframework.security.core.Authentication diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/LogService.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/service/LogService.kt similarity index 97% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/LogService.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/service/LogService.kt index 490a9d7f43..8aca9c928c 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/LogService.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/service/LogService.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.service +package com.saveourtool.common.service -import com.saveourtool.save.utils.StringList +import com.saveourtool.common.utils.StringList import reactor.core.publisher.Mono import java.time.Instant diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/LokiConfig.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/service/LokiConfig.kt similarity index 92% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/LokiConfig.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/service/LokiConfig.kt index 789e13c35f..51d2a757b8 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/LokiConfig.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/service/LokiConfig.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.service +package com.saveourtool.common.service /** * @property url url to loki service diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/LokiLogService.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/service/LokiLogService.kt similarity index 97% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/LokiLogService.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/service/LokiLogService.kt index f585359d4f..ab51ae1bcc 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/LokiLogService.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/service/LokiLogService.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.service +package com.saveourtool.common.service -import com.saveourtool.save.utils.StringList -import com.saveourtool.save.utils.debug -import com.saveourtool.save.utils.getLogger +import com.saveourtool.common.utils.StringList +import com.saveourtool.common.utils.debug +import com.saveourtool.common.utils.getLogger import com.fasterxml.jackson.databind.JsonNode import com.fasterxml.jackson.databind.node.ArrayNode diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/OrganizationService.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/service/OrganizationService.kt similarity index 91% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/OrganizationService.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/service/OrganizationService.kt index 14a19cedc0..3931ec273e 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/OrganizationService.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/service/OrganizationService.kt @@ -1,22 +1,22 @@ -package com.saveourtool.save.service +package com.saveourtool.common.service -import com.saveourtool.save.domain.OrganizationSaveStatus -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.entities.OrganizationStatus -import com.saveourtool.save.entities.ProjectStatus -import com.saveourtool.save.entities.ProjectStatus.CREATED -import com.saveourtool.save.filters.OrganizationFilter -import com.saveourtool.save.info.UserPermissions -import com.saveourtool.save.info.UserPermissionsInOrganization -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.repository.LnkUserOrganizationRepository -import com.saveourtool.save.repository.OrganizationRepository -import com.saveourtool.save.utils.AvatarType -import com.saveourtool.save.utils.hasRole -import com.saveourtool.save.utils.orNotFound -import com.saveourtool.save.utils.username -import com.saveourtool.save.validation.isValidLengthName +import com.saveourtool.common.domain.OrganizationSaveStatus +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.entities.OrganizationStatus +import com.saveourtool.common.entities.ProjectStatus +import com.saveourtool.common.entities.ProjectStatus.CREATED +import com.saveourtool.common.filters.OrganizationFilter +import com.saveourtool.common.info.UserPermissions +import com.saveourtool.common.info.UserPermissionsInOrganization +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.repository.LnkUserOrganizationRepository +import com.saveourtool.common.repository.OrganizationRepository +import com.saveourtool.common.utils.AvatarType +import com.saveourtool.common.utils.hasRole +import com.saveourtool.common.utils.orNotFound +import com.saveourtool.common.utils.username +import com.saveourtool.common.validation.isValidLengthName import org.jetbrains.annotations.Blocking import org.springframework.data.domain.Pageable import org.springframework.data.repository.findByIdOrNull diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/ProjectService.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/service/ProjectService.kt similarity index 93% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/ProjectService.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/service/ProjectService.kt index f666ff5ab2..b224d80f89 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/ProjectService.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/service/ProjectService.kt @@ -1,14 +1,14 @@ -package com.saveourtool.save.service - -import com.saveourtool.save.domain.ProjectSaveStatus -import com.saveourtool.save.entities.* -import com.saveourtool.save.filters.ProjectFilter -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.repository.ProjectRepository -import com.saveourtool.save.repository.UserRepository -import com.saveourtool.save.security.ProjectPermissionEvaluator -import com.saveourtool.save.utils.blockingToMono -import com.saveourtool.save.utils.switchIfEmptyToNotFound +package com.saveourtool.common.service + +import com.saveourtool.common.domain.ProjectSaveStatus +import com.saveourtool.common.entities.* +import com.saveourtool.common.filters.ProjectFilter +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.repository.ProjectRepository +import com.saveourtool.common.repository.UserRepository +import com.saveourtool.common.security.ProjectPermissionEvaluator +import com.saveourtool.common.utils.blockingToMono +import com.saveourtool.common.utils.switchIfEmptyToNotFound import org.springframework.http.HttpStatus import org.springframework.security.core.Authentication diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/UserService.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/service/UserService.kt similarity index 93% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/UserService.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/service/UserService.kt index 42ab04bab4..9c8f95a2ec 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/service/UserService.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/service/UserService.kt @@ -1,18 +1,18 @@ -package com.saveourtool.save.service +package com.saveourtool.common.service -import com.saveourtool.save.domain.Role -import com.saveourtool.save.domain.UserSaveStatus -import com.saveourtool.save.entities.OriginalLogin -import com.saveourtool.save.entities.User -import com.saveourtool.save.evententities.UserEvent -import com.saveourtool.save.info.UserStatus -import com.saveourtool.save.repository.LnkUserOrganizationRepository -import com.saveourtool.save.repository.LnkUserProjectRepository -import com.saveourtool.save.repository.OriginalLoginRepository -import com.saveourtool.save.repository.UserRepository -import com.saveourtool.save.storage.AvatarKey -import com.saveourtool.save.storage.AvatarStorage -import com.saveourtool.save.utils.* +import com.saveourtool.common.domain.Role +import com.saveourtool.common.domain.UserSaveStatus +import com.saveourtool.common.entities.OriginalLogin +import com.saveourtool.common.entities.User +import com.saveourtool.common.evententities.UserEvent +import com.saveourtool.common.info.UserStatus +import com.saveourtool.common.repository.LnkUserOrganizationRepository +import com.saveourtool.common.repository.LnkUserProjectRepository +import com.saveourtool.common.repository.OriginalLoginRepository +import com.saveourtool.common.repository.UserRepository +import com.saveourtool.common.storage.AvatarKey +import com.saveourtool.common.storage.AvatarStorage +import com.saveourtool.common.utils.* import org.slf4j.Logger import org.springframework.context.ApplicationEventPublisher diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/BaseEntity.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/BaseEntity.kt similarity index 80% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/BaseEntity.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/BaseEntity.kt index 4433e54805..ea2f20fc84 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/BaseEntity.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/BaseEntity.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.spring.entity +package com.saveourtool.common.spring.entity -import com.saveourtool.save.listeners.DateListener -import com.saveourtool.save.validation.Validatable +import com.saveourtool.common.listeners.DateListener +import com.saveourtool.common.validation.Validatable import javax.persistence.* /** diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/BaseEntityWithDate.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/BaseEntityWithDate.kt similarity index 86% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/BaseEntityWithDate.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/BaseEntityWithDate.kt index 10c13fe702..6f4d2ad0c7 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/BaseEntityWithDate.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/BaseEntityWithDate.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.spring.entity +package com.saveourtool.common.spring.entity -import com.saveourtool.save.listeners.DateListener +import com.saveourtool.common.listeners.DateListener import java.time.LocalDateTime import javax.persistence.Column import javax.persistence.EntityListeners diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/BaseEntityWithDateAndDto.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/BaseEntityWithDateAndDto.kt similarity index 83% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/BaseEntityWithDateAndDto.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/BaseEntityWithDateAndDto.kt index b6bc832a6a..9b4ee1b085 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/BaseEntityWithDateAndDto.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/BaseEntityWithDateAndDto.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.spring.entity +package com.saveourtool.common.spring.entity /** * base class for all entities with date and DTO with [D] type diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/BaseEntityWithDto.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/BaseEntityWithDto.kt similarity index 76% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/BaseEntityWithDto.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/BaseEntityWithDto.kt index e2c610cd0e..bf1bf5fe9b 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/BaseEntityWithDto.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/BaseEntityWithDto.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.spring.entity +package com.saveourtool.common.spring.entity /** * base class for all entities with DTO with [D] type diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/BaseEntityWithDtoWithId.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/BaseEntityWithDtoWithId.kt similarity index 66% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/BaseEntityWithDtoWithId.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/BaseEntityWithDtoWithId.kt index 069e9f326e..cb3e6b5a60 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/BaseEntityWithDtoWithId.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/BaseEntityWithDtoWithId.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.spring.entity +package com.saveourtool.common.spring.entity -import com.saveourtool.save.entities.DtoWithId +import com.saveourtool.common.entities.DtoWithId /** * base class for all entities with DTO with [D] type where DTO has ID diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/IBaseEntityWithDate.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/IBaseEntityWithDate.kt similarity index 91% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/IBaseEntityWithDate.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/IBaseEntityWithDate.kt index 2c3870270d..3e277f3300 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/IBaseEntityWithDate.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/IBaseEntityWithDate.kt @@ -1,8 +1,8 @@ @file:Suppress("FILE_NAME_INCORRECT") -package com.saveourtool.save.spring.entity +package com.saveourtool.common.spring.entity -import com.saveourtool.save.listeners.DateListener +import com.saveourtool.common.listeners.DateListener import java.time.LocalDateTime import javax.persistence.EntityListeners import javax.persistence.MappedSuperclass diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/IBaseEntityWithDto.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/IBaseEntityWithDto.kt similarity index 85% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/IBaseEntityWithDto.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/IBaseEntityWithDto.kt index bb266b976b..81bfd7f763 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/IBaseEntityWithDto.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/IBaseEntityWithDto.kt @@ -1,6 +1,6 @@ @file:Suppress("FILE_NAME_INCORRECT") -package com.saveourtool.save.spring.entity +package com.saveourtool.common.spring.entity /** * base class for all entities with DTO with [D] type diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/IBaseEntityWithDtoWithId.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/IBaseEntityWithDtoWithId.kt similarity index 70% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/IBaseEntityWithDtoWithId.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/IBaseEntityWithDtoWithId.kt index 3b07158168..40397999b7 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/entity/IBaseEntityWithDtoWithId.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/entity/IBaseEntityWithDtoWithId.kt @@ -1,8 +1,8 @@ @file:Suppress("FILE_NAME_INCORRECT") -package com.saveourtool.save.spring.entity +package com.saveourtool.common.spring.entity -import com.saveourtool.save.entities.DtoWithId +import com.saveourtool.common.entities.DtoWithId /** * base class for all entities with DTO with [D] type where DTO has ID diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/postprocessor/DockerSecretsDatabaseProcessor.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/postprocessor/DockerSecretsDatabaseProcessor.kt similarity index 97% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/postprocessor/DockerSecretsDatabaseProcessor.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/spring/postprocessor/DockerSecretsDatabaseProcessor.kt index 18462f1da3..48321aa52c 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/postprocessor/DockerSecretsDatabaseProcessor.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/postprocessor/DockerSecretsDatabaseProcessor.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.spring.postprocessor +package com.saveourtool.common.spring.postprocessor import org.springframework.boot.SpringApplication import org.springframework.boot.env.EnvironmentPostProcessor diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/repository/BaseEntityRepository.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/repository/BaseEntityRepository.kt similarity index 82% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/repository/BaseEntityRepository.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/spring/repository/BaseEntityRepository.kt index 26ab7e2e4f..233b30f497 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/repository/BaseEntityRepository.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/repository/BaseEntityRepository.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.spring.repository +package com.saveourtool.common.spring.repository -import com.saveourtool.save.spring.entity.BaseEntity +import com.saveourtool.common.spring.entity.BaseEntity import org.springframework.data.jpa.repository.JpaRepository import org.springframework.data.jpa.repository.JpaSpecificationExecutor import org.springframework.data.repository.NoRepositoryBean diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/utils/WebClientUtils.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/utils/WebClientUtils.kt similarity index 90% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/utils/WebClientUtils.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/spring/utils/WebClientUtils.kt index ff1cbee548..77e9759aec 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/spring/utils/WebClientUtils.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/utils/WebClientUtils.kt @@ -2,9 +2,9 @@ * Utilities for spring WebClient */ -package com.saveourtool.save.spring.utils +package com.saveourtool.common.spring.utils -import com.saveourtool.save.utils.debug +import com.saveourtool.common.utils.debug import org.slf4j.LoggerFactory import org.springframework.boot.web.reactive.function.client.WebClientCustomizer import org.springframework.web.reactive.function.client.WebClient diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AbstractMigrationReactiveStorage.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/AbstractMigrationReactiveStorage.kt similarity index 96% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AbstractMigrationReactiveStorage.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/AbstractMigrationReactiveStorage.kt index 997440a1b9..28129e5347 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AbstractMigrationReactiveStorage.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/AbstractMigrationReactiveStorage.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.storage +package com.saveourtool.common.storage -import com.saveourtool.save.storage.request.DownloadRequest -import com.saveourtool.save.storage.request.UploadRequest -import com.saveourtool.save.utils.* +import com.saveourtool.common.storage.request.DownloadRequest +import com.saveourtool.common.storage.request.UploadRequest +import com.saveourtool.common.utils.* import org.slf4j.Logger import reactor.core.publisher.Flux import reactor.core.publisher.Mono diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AbstractReactiveStorage.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/AbstractReactiveStorage.kt similarity index 91% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AbstractReactiveStorage.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/AbstractReactiveStorage.kt index 491ce307c3..d0d3ed6ca9 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AbstractReactiveStorage.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/AbstractReactiveStorage.kt @@ -1,9 +1,9 @@ -package com.saveourtool.save.storage +package com.saveourtool.common.storage -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.storage.key.S3KeyManager -import com.saveourtool.save.storage.request.DownloadRequest -import com.saveourtool.save.storage.request.UploadRequest +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.storage.key.S3KeyManager +import com.saveourtool.common.storage.request.DownloadRequest +import com.saveourtool.common.storage.request.UploadRequest import reactor.core.publisher.Flux import reactor.core.publisher.Mono import java.nio.ByteBuffer diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AbstractSimpleReactiveStorage.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/AbstractSimpleReactiveStorage.kt similarity index 82% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AbstractSimpleReactiveStorage.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/AbstractSimpleReactiveStorage.kt index 3ba09a31c3..45e31f1a7c 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AbstractSimpleReactiveStorage.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/AbstractSimpleReactiveStorage.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.storage +package com.saveourtool.common.storage -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.storage.key.AbstractS3KeyManager -import com.saveourtool.save.storage.key.S3KeyManager +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.storage.key.AbstractS3KeyManager +import com.saveourtool.common.storage.key.S3KeyManager /** * S3 implementation of Storage diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AbstractSimpleSuspendingStorage.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/AbstractSimpleSuspendingStorage.kt similarity index 83% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AbstractSimpleSuspendingStorage.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/AbstractSimpleSuspendingStorage.kt index 6ebdecf8e8..13d38a6447 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AbstractSimpleSuspendingStorage.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/AbstractSimpleSuspendingStorage.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.storage +package com.saveourtool.common.storage -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.storage.key.AbstractS3KeyManager -import com.saveourtool.save.storage.key.S3KeyManager +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.storage.key.AbstractS3KeyManager +import com.saveourtool.common.storage.key.S3KeyManager /** * S3 implementation of Storage diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AbstractSuspendingStorage.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/AbstractSuspendingStorage.kt similarity index 91% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AbstractSuspendingStorage.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/AbstractSuspendingStorage.kt index d125c38281..78e69424c1 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AbstractSuspendingStorage.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/AbstractSuspendingStorage.kt @@ -1,9 +1,9 @@ -package com.saveourtool.save.storage +package com.saveourtool.common.storage -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.storage.key.S3KeyManager -import com.saveourtool.save.storage.request.DownloadRequest -import com.saveourtool.save.storage.request.UploadRequest +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.storage.key.S3KeyManager +import com.saveourtool.common.storage.request.DownloadRequest +import com.saveourtool.common.storage.request.UploadRequest import java.nio.ByteBuffer import java.time.Instant diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AvatarKey.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/AvatarKey.kt similarity index 60% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AvatarKey.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/AvatarKey.kt index 8aefc36d20..84fffaeca0 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AvatarKey.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/AvatarKey.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.storage +package com.saveourtool.common.storage -import com.saveourtool.save.utils.AvatarType +import com.saveourtool.common.utils.AvatarType /** * @property type diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AvatarStorage.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/AvatarStorage.kt similarity index 78% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AvatarStorage.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/AvatarStorage.kt index 875b44b97c..c8859b21c1 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/AvatarStorage.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/AvatarStorage.kt @@ -1,9 +1,9 @@ -package com.saveourtool.save.storage +package com.saveourtool.common.storage -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.s3.S3OperationsProperties -import com.saveourtool.save.utils.AvatarType -import com.saveourtool.save.utils.orNotFound +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.s3.S3OperationsProperties +import com.saveourtool.common.utils.AvatarType +import com.saveourtool.common.utils.orNotFound import org.springframework.stereotype.Service /** diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/BackupStorageUtils.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/BackupStorageUtils.kt similarity index 94% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/BackupStorageUtils.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/BackupStorageUtils.kt index 8023493957..eadc90f3c9 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/BackupStorageUtils.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/BackupStorageUtils.kt @@ -2,14 +2,14 @@ * Utils methods to back up unexpected keys */ -package com.saveourtool.save.storage - -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.storage.key.AbstractS3KeyDatabaseManager -import com.saveourtool.save.utils.ListCompletableFuture -import com.saveourtool.save.utils.debug -import com.saveourtool.save.utils.getLogger -import com.saveourtool.save.utils.warn +package com.saveourtool.common.storage + +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.storage.key.AbstractS3KeyDatabaseManager +import com.saveourtool.common.utils.ListCompletableFuture +import com.saveourtool.common.utils.debug +import com.saveourtool.common.utils.getLogger +import com.saveourtool.common.utils.warn import software.amazon.awssdk.services.s3.model.DeleteObjectResponse import software.amazon.awssdk.services.s3.model.ListObjectsV2Response diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/DefaultStorageCoroutines.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/DefaultStorageCoroutines.kt similarity index 94% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/DefaultStorageCoroutines.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/DefaultStorageCoroutines.kt index e31126388d..38fa0e8d11 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/DefaultStorageCoroutines.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/DefaultStorageCoroutines.kt @@ -1,11 +1,11 @@ -package com.saveourtool.save.storage - -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.storage.key.AbstractS3KeyDatabaseManager -import com.saveourtool.save.storage.key.S3KeyManager -import com.saveourtool.save.utils.getLogger -import com.saveourtool.save.utils.isNotNull -import com.saveourtool.save.utils.warn +package com.saveourtool.common.storage + +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.storage.key.AbstractS3KeyDatabaseManager +import com.saveourtool.common.storage.key.S3KeyManager +import com.saveourtool.common.utils.getLogger +import com.saveourtool.common.utils.isNotNull +import com.saveourtool.common.utils.warn import org.slf4j.Logger import reactor.kotlin.core.publisher.toFlux diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/DefaultStoragePreSignedUrl.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/DefaultStoragePreSignedUrl.kt similarity index 89% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/DefaultStoragePreSignedUrl.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/DefaultStoragePreSignedUrl.kt index 0ff1e55e0e..8d8d0be6e1 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/DefaultStoragePreSignedUrl.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/DefaultStoragePreSignedUrl.kt @@ -1,10 +1,10 @@ -package com.saveourtool.save.storage +package com.saveourtool.common.storage -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.storage.key.S3KeyManager -import com.saveourtool.save.storage.request.DownloadRequest -import com.saveourtool.save.storage.request.UploadRequest -import com.saveourtool.save.utils.orNotFound +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.storage.key.S3KeyManager +import com.saveourtool.common.storage.request.DownloadRequest +import com.saveourtool.common.storage.request.UploadRequest +import com.saveourtool.common.utils.orNotFound import software.amazon.awssdk.services.s3.presigner.model.PresignedGetObjectRequest import software.amazon.awssdk.services.s3.presigner.model.PresignedPutObjectRequest import kotlin.time.Duration.Companion.minutes diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/DefaultStorageProjectReactor.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/DefaultStorageProjectReactor.kt similarity index 97% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/DefaultStorageProjectReactor.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/DefaultStorageProjectReactor.kt index f4b1497853..35425b5458 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/DefaultStorageProjectReactor.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/DefaultStorageProjectReactor.kt @@ -1,9 +1,9 @@ -package com.saveourtool.save.storage +package com.saveourtool.common.storage -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.storage.key.AbstractS3KeyDatabaseManager -import com.saveourtool.save.storage.key.S3KeyManager -import com.saveourtool.save.utils.* +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.storage.key.AbstractS3KeyDatabaseManager +import com.saveourtool.common.storage.key.S3KeyManager +import com.saveourtool.common.utils.* import org.slf4j.Logger import reactor.core.publisher.Flux diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/ReactiveStorage.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/ReactiveStorage.kt similarity index 84% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/ReactiveStorage.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/ReactiveStorage.kt index 44d89db54e..91115b175c 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/ReactiveStorage.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/ReactiveStorage.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.storage +package com.saveourtool.common.storage /** * Base interface for Storage which implements [StorageProjectReactor] and [StoragePreSignedUrl] diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/ReactiveStorageWithDatabase.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/ReactiveStorageWithDatabase.kt similarity index 81% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/ReactiveStorageWithDatabase.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/ReactiveStorageWithDatabase.kt index df335b27b6..2a41914aef 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/ReactiveStorageWithDatabase.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/ReactiveStorageWithDatabase.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.storage +package com.saveourtool.common.storage -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.spring.entity.BaseEntity -import com.saveourtool.save.storage.key.AbstractS3KeyDatabaseManager +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.spring.entity.BaseEntity +import com.saveourtool.common.storage.key.AbstractS3KeyDatabaseManager import reactor.core.publisher.Mono /** diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/S3StorageUtils.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/S3StorageUtils.kt similarity index 96% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/S3StorageUtils.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/S3StorageUtils.kt index b7fdd49f4c..6c51877562 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/S3StorageUtils.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/S3StorageUtils.kt @@ -2,7 +2,7 @@ * Utilities for [Storage] which implements [AbstractS3Storage] */ -package com.saveourtool.save.storage +package com.saveourtool.common.storage /** * Delimiter for S3 key diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/StorageCoroutines.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/StorageCoroutines.kt similarity index 98% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/StorageCoroutines.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/StorageCoroutines.kt index da446e61b9..bbdd14b890 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/StorageCoroutines.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/StorageCoroutines.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.storage +package com.saveourtool.common.storage import java.nio.ByteBuffer import java.time.Instant diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/StorageInitializer.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/StorageInitializer.kt similarity index 96% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/StorageInitializer.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/StorageInitializer.kt index 4d24b9505f..a6653104b9 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/StorageInitializer.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/StorageInitializer.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.storage +package com.saveourtool.common.storage -import com.saveourtool.save.utils.getLogger -import com.saveourtool.save.utils.info -import com.saveourtool.save.utils.isNotNull +import com.saveourtool.common.utils.getLogger +import com.saveourtool.common.utils.info +import com.saveourtool.common.utils.isNotNull import io.ktor.client.utils.* import org.slf4j.Logger diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/StoragePreSignedUrl.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/StoragePreSignedUrl.kt similarity index 85% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/StoragePreSignedUrl.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/StoragePreSignedUrl.kt index 64852e12a3..69811c0e8e 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/StoragePreSignedUrl.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/StoragePreSignedUrl.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.storage +package com.saveourtool.common.storage -import com.saveourtool.save.storage.request.DownloadRequest -import com.saveourtool.save.storage.request.UploadRequest -import com.saveourtool.save.utils.orNotFound +import com.saveourtool.common.storage.request.DownloadRequest +import com.saveourtool.common.storage.request.UploadRequest +import com.saveourtool.common.utils.orNotFound import org.springframework.http.HttpStatus import org.springframework.web.server.ResponseStatusException import java.net.URL diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/StorageProjectReactor.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/StorageProjectReactor.kt similarity index 98% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/StorageProjectReactor.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/StorageProjectReactor.kt index ba15c59439..ef183a1c2e 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/StorageProjectReactor.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/StorageProjectReactor.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.storage +package com.saveourtool.common.storage import reactor.core.publisher.Flux import reactor.core.publisher.Mono diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/SuspendingStorage.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/SuspendingStorage.kt similarity index 84% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/SuspendingStorage.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/SuspendingStorage.kt index 066ac8b8dd..d43383f438 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/SuspendingStorage.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/SuspendingStorage.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.storage +package com.saveourtool.common.storage /** * Base interface for Storage which implements [StorageCoroutines] and [StoragePreSignedUrl] diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/SuspendingStorageWithDatabase.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/SuspendingStorageWithDatabase.kt similarity index 82% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/SuspendingStorageWithDatabase.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/SuspendingStorageWithDatabase.kt index 65e77491ba..cf0319196a 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/SuspendingStorageWithDatabase.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/SuspendingStorageWithDatabase.kt @@ -1,8 +1,8 @@ -package com.saveourtool.save.storage +package com.saveourtool.common.storage -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.spring.entity.BaseEntity -import com.saveourtool.save.storage.key.AbstractS3KeyDatabaseManager +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.spring.entity.BaseEntity +import com.saveourtool.common.storage.key.AbstractS3KeyDatabaseManager import kotlinx.coroutines.future.asDeferred import kotlinx.coroutines.withContext diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/impl/AbstractInternalFileStorage.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/impl/AbstractInternalFileStorage.kt similarity index 94% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/impl/AbstractInternalFileStorage.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/impl/AbstractInternalFileStorage.kt index 75d30785ba..f93a1d124a 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/impl/AbstractInternalFileStorage.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/impl/AbstractInternalFileStorage.kt @@ -1,12 +1,12 @@ -package com.saveourtool.save.storage.impl +package com.saveourtool.common.storage.impl -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.storage.* -import com.saveourtool.save.storage.key.AbstractS3KeyManager -import com.saveourtool.save.storage.key.S3KeyManager -import com.saveourtool.save.utils.* -import com.saveourtool.save.utils.github.GitHubHelper -import com.saveourtool.save.utils.github.GitHubRepoInfo +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.storage.* +import com.saveourtool.common.storage.key.AbstractS3KeyManager +import com.saveourtool.common.storage.key.S3KeyManager +import com.saveourtool.common.utils.* +import com.saveourtool.common.utils.github.GitHubHelper +import com.saveourtool.common.utils.github.GitHubRepoInfo import org.slf4j.Logger import org.springframework.http.HttpStatus diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/impl/InternalFileKey.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/impl/InternalFileKey.kt similarity index 96% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/impl/InternalFileKey.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/impl/InternalFileKey.kt index eed4518256..0ff35e6093 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/impl/InternalFileKey.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/impl/InternalFileKey.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.storage.impl +package com.saveourtool.common.storage.impl /** * @property name diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/key/AbstractS3KeyDatabaseManager.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/key/AbstractS3KeyDatabaseManager.kt similarity index 91% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/key/AbstractS3KeyDatabaseManager.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/key/AbstractS3KeyDatabaseManager.kt index b12feb1c2c..77babb2196 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/key/AbstractS3KeyDatabaseManager.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/key/AbstractS3KeyDatabaseManager.kt @@ -1,9 +1,9 @@ -package com.saveourtool.save.storage.key +package com.saveourtool.common.storage.key -import com.saveourtool.save.spring.entity.BaseEntity -import com.saveourtool.save.spring.repository.BaseEntityRepository -import com.saveourtool.save.utils.BlockingBridge -import com.saveourtool.save.utils.orNotFound +import com.saveourtool.common.spring.entity.BaseEntity +import com.saveourtool.common.spring.repository.BaseEntityRepository +import com.saveourtool.common.utils.BlockingBridge +import com.saveourtool.common.utils.orNotFound import org.springframework.data.repository.findByIdOrNull import org.springframework.transaction.annotation.Transactional diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/key/AbstractS3KeyDtoManager.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/key/AbstractS3KeyDtoManager.kt similarity index 79% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/key/AbstractS3KeyDtoManager.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/key/AbstractS3KeyDtoManager.kt index 9771e180cd..bbad4cfaa7 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/key/AbstractS3KeyDtoManager.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/key/AbstractS3KeyDtoManager.kt @@ -1,10 +1,10 @@ -package com.saveourtool.save.storage.key +package com.saveourtool.common.storage.key -import com.saveourtool.save.entities.DtoWithId -import com.saveourtool.save.spring.entity.BaseEntityWithDto -import com.saveourtool.save.spring.repository.BaseEntityRepository -import com.saveourtool.save.utils.BlockingBridge -import com.saveourtool.save.utils.orNotFound +import com.saveourtool.common.entities.DtoWithId +import com.saveourtool.common.spring.entity.BaseEntityWithDto +import com.saveourtool.common.spring.repository.BaseEntityRepository +import com.saveourtool.common.utils.BlockingBridge +import com.saveourtool.common.utils.orNotFound import org.springframework.data.repository.findByIdOrNull /** diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/key/AbstractS3KeyEntityManager.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/key/AbstractS3KeyEntityManager.kt similarity index 79% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/key/AbstractS3KeyEntityManager.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/key/AbstractS3KeyEntityManager.kt index f277522282..e8e56b60d6 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/key/AbstractS3KeyEntityManager.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/key/AbstractS3KeyEntityManager.kt @@ -1,9 +1,9 @@ -package com.saveourtool.save.storage.key +package com.saveourtool.common.storage.key -import com.saveourtool.save.spring.entity.BaseEntity -import com.saveourtool.save.spring.repository.BaseEntityRepository -import com.saveourtool.save.utils.BlockingBridge -import com.saveourtool.save.utils.orNotFound +import com.saveourtool.common.spring.entity.BaseEntity +import com.saveourtool.common.spring.repository.BaseEntityRepository +import com.saveourtool.common.utils.BlockingBridge +import com.saveourtool.common.utils.orNotFound import org.springframework.data.repository.findByIdOrNull /** diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/key/AbstractS3KeyManager.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/key/AbstractS3KeyManager.kt similarity index 90% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/key/AbstractS3KeyManager.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/key/AbstractS3KeyManager.kt index d191de4e6d..dadcdd41cc 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/key/AbstractS3KeyManager.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/key/AbstractS3KeyManager.kt @@ -1,7 +1,7 @@ -package com.saveourtool.save.storage.key +package com.saveourtool.common.storage.key -import com.saveourtool.save.storage.PATH_DELIMITER -import com.saveourtool.save.storage.asS3CommonPrefix +import com.saveourtool.common.storage.PATH_DELIMITER +import com.saveourtool.common.storage.asS3CommonPrefix /** * A common implementation for [S3KeyManager] diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/key/S3KeyManager.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/key/S3KeyManager.kt similarity index 96% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/key/S3KeyManager.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/key/S3KeyManager.kt index 2017792df1..a5caf65325 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/key/S3KeyManager.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/key/S3KeyManager.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.storage.key +package com.saveourtool.common.storage.key /** * Manager for keys: S3 Key to [K] and vice versa diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/request/DownloadRequest.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/request/DownloadRequest.kt similarity index 85% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/request/DownloadRequest.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/request/DownloadRequest.kt index b5a1a62146..c9537927a1 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/request/DownloadRequest.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/request/DownloadRequest.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.storage.request +package com.saveourtool.common.storage.request import java.net.URL diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/request/UploadRequest.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/request/UploadRequest.kt similarity index 91% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/request/UploadRequest.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/storage/request/UploadRequest.kt index c6e5a239e5..cc0ccdc04f 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/storage/request/UploadRequest.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/storage/request/UploadRequest.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.storage.request +package com.saveourtool.common.storage.request import java.net.URL diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/test/analysis/metrics/TestMetricsMixin.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/test/analysis/metrics/TestMetricsMixin.kt similarity index 93% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/test/analysis/metrics/TestMetricsMixin.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/test/analysis/metrics/TestMetricsMixin.kt index 00f84a4ccb..ac0c7b400e 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/test/analysis/metrics/TestMetricsMixin.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/test/analysis/metrics/TestMetricsMixin.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.test.analysis.metrics +package com.saveourtool.common.test.analysis.metrics -import com.saveourtool.save.utils.supportKDuration +import com.saveourtool.common.utils.supportKDuration import com.fasterxml.jackson.annotation.JsonIgnore import com.fasterxml.jackson.annotation.JsonSubTypes import com.fasterxml.jackson.annotation.JsonSubTypes.Type diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/test/analysis/results/AnalysisResultMixin.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/test/analysis/results/AnalysisResultMixin.kt similarity index 94% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/test/analysis/results/AnalysisResultMixin.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/test/analysis/results/AnalysisResultMixin.kt index 536f3dd95b..eb08edf20a 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/test/analysis/results/AnalysisResultMixin.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/test/analysis/results/AnalysisResultMixin.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.test.analysis.results +package com.saveourtool.common.test.analysis.results import com.fasterxml.jackson.annotation.JsonSubTypes import com.fasterxml.jackson.annotation.JsonSubTypes.Type diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/AgentDownloadUtils.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/AgentDownloadUtils.kt similarity index 95% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/AgentDownloadUtils.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/utils/AgentDownloadUtils.kt index bf949584bc..2cc9b039de 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/AgentDownloadUtils.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/AgentDownloadUtils.kt @@ -4,9 +4,9 @@ @file:Suppress("FILE_NAME_MATCH_CLASS") -package com.saveourtool.save.utils +package com.saveourtool.common.utils -import com.saveourtool.save.storage.impl.InternalFileKey +import com.saveourtool.common.storage.impl.InternalFileKey import org.intellij.lang.annotations.Language @Language("bash") diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/ArchiveUtils.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/ArchiveUtils.kt similarity index 97% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/ArchiveUtils.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/utils/ArchiveUtils.kt index 22c5e49966..883b2511e6 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/ArchiveUtils.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/ArchiveUtils.kt @@ -4,7 +4,7 @@ @file:JvmName("ArchiveUtilsJVM") -package com.saveourtool.save.utils +package com.saveourtool.common.utils import okio.Path import org.apache.commons.compress.archivers.ArchiveStreamFactory diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/AuthenticationUtils.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/AuthenticationUtils.kt similarity index 93% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/AuthenticationUtils.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/utils/AuthenticationUtils.kt index 9375cc867b..f598f9c075 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/AuthenticationUtils.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/AuthenticationUtils.kt @@ -1,8 +1,8 @@ @file:Suppress("FILE_NAME_MATCH_CLASS", "HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE") -package com.saveourtool.save.utils +package com.saveourtool.common.utils -import com.saveourtool.save.domain.Role +import com.saveourtool.common.domain.Role import org.springframework.security.core.Authentication import org.springframework.security.core.userdetails.UserDetails diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/BlockingBridge.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/BlockingBridge.kt similarity index 98% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/BlockingBridge.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/utils/BlockingBridge.kt index abda3b466c..f7156b122c 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/BlockingBridge.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/BlockingBridge.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.utils +package com.saveourtool.common.utils import org.jetbrains.annotations.NonBlocking import org.springframework.stereotype.Component diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/BufferAccumulatedUntilReactorUtils.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/BufferAccumulatedUntilReactorUtils.kt similarity index 97% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/BufferAccumulatedUntilReactorUtils.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/utils/BufferAccumulatedUntilReactorUtils.kt index 0c57d7679f..78ceb01133 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/BufferAccumulatedUntilReactorUtils.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/BufferAccumulatedUntilReactorUtils.kt @@ -4,7 +4,7 @@ @file:Suppress("FILE_NAME_MATCH_CLASS") -package com.saveourtool.save.utils +package com.saveourtool.common.utils import reactor.core.publisher.Flux import java.util.function.Predicate diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/DateTimeUtilsJvm.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/DateTimeUtilsJvm.kt similarity index 92% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/DateTimeUtilsJvm.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/utils/DateTimeUtilsJvm.kt index 781e5cb9b2..d100b745c5 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/DateTimeUtilsJvm.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/DateTimeUtilsJvm.kt @@ -2,7 +2,7 @@ * Utility methods related to a Date and Time in JVM */ -package com.saveourtool.save.utils +package com.saveourtool.common.utils import java.time.LocalDateTime import java.time.ZoneOffset diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/ExceptionUtils.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/ExceptionUtils.kt similarity index 97% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/ExceptionUtils.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/utils/ExceptionUtils.kt index 0be03a18d2..27392783dc 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/ExceptionUtils.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/ExceptionUtils.kt @@ -2,7 +2,7 @@ * This file contains util methods to throw exceptions */ -package com.saveourtool.save.utils +package com.saveourtool.common.utils import org.springframework.http.HttpStatus import org.springframework.web.server.ResponseStatusException diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/FileUtils.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/FileUtils.kt similarity index 99% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/FileUtils.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/utils/FileUtils.kt index d2fc477017..7503a642cf 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/FileUtils.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/FileUtils.kt @@ -2,7 +2,7 @@ @file:JvmName("FileUtilsJVM") -package com.saveourtool.save.utils +package com.saveourtool.common.utils import com.akuleshov7.ktoml.file.TomlFileReader import okio.FileSystem diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/HttpUtils.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/HttpUtils.kt similarity index 99% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/HttpUtils.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/utils/HttpUtils.kt index 874fa82074..a92f7c61d2 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/HttpUtils.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/HttpUtils.kt @@ -1,7 +1,7 @@ @file:JvmName("HttpUtils") @file:Suppress("HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE") -package com.saveourtool.save.utils +package com.saveourtool.common.utils import org.springframework.http.CacheControl import org.springframework.http.HttpHeaders diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/KotlinUtilsJvm.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/KotlinUtilsJvm.kt similarity index 90% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/KotlinUtilsJvm.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/utils/KotlinUtilsJvm.kt index 65637feb08..ffa3353690 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/KotlinUtilsJvm.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/KotlinUtilsJvm.kt @@ -2,7 +2,7 @@ * Utilities for Kotlin */ -package com.saveourtool.save.utils +package com.saveourtool.common.utils import org.springframework.http.ResponseEntity import java.util.concurrent.CompletableFuture diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/LocalDateTimeUtils.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/LocalDateTimeUtils.kt similarity index 99% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/LocalDateTimeUtils.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/utils/LocalDateTimeUtils.kt index 4434ba9882..228da79083 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/LocalDateTimeUtils.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/LocalDateTimeUtils.kt @@ -8,7 +8,7 @@ "TYPEALIAS_NAME_INCORRECT_CASE", ) -package com.saveourtool.save.utils +package com.saveourtool.common.utils import com.fasterxml.jackson.core.JsonGenerator import com.fasterxml.jackson.core.JsonParser diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/PlatformUtils.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/PlatformUtils.kt similarity index 96% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/PlatformUtils.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/utils/PlatformUtils.kt index fd23413b5a..040bfd6f25 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/PlatformUtils.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/PlatformUtils.kt @@ -9,7 +9,7 @@ @file:JvmName("PlatformUtilsJVM") -package com.saveourtool.save.utils +package com.saveourtool.common.utils actual fun createAtomicLong(value: Long): AtomicLong = object : AtomicLong { private val holder = java.util.concurrent.atomic.AtomicLong(value) diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/ReactorUtils.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/ReactorUtils.kt similarity index 99% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/ReactorUtils.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/utils/ReactorUtils.kt index 5529572a8c..d48edf7b13 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/ReactorUtils.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/ReactorUtils.kt @@ -2,7 +2,7 @@ * Utility methods for working with Reactor publishers */ -package com.saveourtool.save.utils +package com.saveourtool.common.utils import com.fasterxml.jackson.databind.util.ByteBufferBackedInputStream import io.ktor.utils.io.* diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/ResponseWithTiming.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/ResponseWithTiming.kt similarity index 97% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/ResponseWithTiming.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/utils/ResponseWithTiming.kt index bbcbf77b89..c972a296e7 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/ResponseWithTiming.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/ResponseWithTiming.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.utils +package com.saveourtool.common.utils /** * Adds support for the diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/SLF4JUtils.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/SLF4JUtils.kt similarity index 98% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/SLF4JUtils.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/utils/SLF4JUtils.kt index 3b1f862570..9bb78dd57b 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/SLF4JUtils.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/SLF4JUtils.kt @@ -5,7 +5,7 @@ "MISSING_KDOC_ON_FUNCTION" ) -package com.saveourtool.save.utils +package com.saveourtool.common.utils import org.slf4j.Logger import org.slf4j.LoggerFactory diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/ServerTiming.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/ServerTiming.kt similarity index 97% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/ServerTiming.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/utils/ServerTiming.kt index ca7338381e..2779c442d3 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/ServerTiming.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/ServerTiming.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.utils +package com.saveourtool.common.utils import kotlin.time.Duration diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/SpringUtils.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/SpringUtils.kt similarity index 94% rename from save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/SpringUtils.kt rename to common/src/jvmMain/kotlin/com/saveourtool/common/utils/SpringUtils.kt index e77a14524b..2eef950bd7 100644 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/SpringUtils.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/utils/SpringUtils.kt @@ -2,11 +2,11 @@ * This class contains util methods for Spring */ -package com.saveourtool.save.utils +package com.saveourtool.common.utils -import com.saveourtool.save.spring.entity.BaseEntity -import com.saveourtool.save.spring.repository.BaseEntityRepository -import com.saveourtool.save.storage.StorageProjectReactor +import com.saveourtool.common.spring.entity.BaseEntity +import com.saveourtool.common.spring.repository.BaseEntityRepository +import com.saveourtool.common.storage.StorageProjectReactor import io.ktor.http.* import org.springframework.data.domain.Page import org.springframework.data.domain.Pageable diff --git a/save-cloud-common/src/jvmTest/kotlin/com/saveourtool/save/domain/SdkTest.kt b/common/src/jvmTest/kotlin/com/saveourtool/common/domain/SdkTest.kt similarity index 93% rename from save-cloud-common/src/jvmTest/kotlin/com/saveourtool/save/domain/SdkTest.kt rename to common/src/jvmTest/kotlin/com/saveourtool/common/domain/SdkTest.kt index 4ab0d922c4..9f6d4078e7 100644 --- a/save-cloud-common/src/jvmTest/kotlin/com/saveourtool/save/domain/SdkTest.kt +++ b/common/src/jvmTest/kotlin/com/saveourtool/common/domain/SdkTest.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.domain +package com.saveourtool.common.domain import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test diff --git a/save-cloud-common/src/jvmTest/kotlin/com/saveourtool/save/utils/ReactorUtilsTest.kt b/common/src/jvmTest/kotlin/com/saveourtool/common/utils/ReactorUtilsTest.kt similarity index 95% rename from save-cloud-common/src/jvmTest/kotlin/com/saveourtool/save/utils/ReactorUtilsTest.kt rename to common/src/jvmTest/kotlin/com/saveourtool/common/utils/ReactorUtilsTest.kt index 1fb560212d..55c2d7ce8c 100644 --- a/save-cloud-common/src/jvmTest/kotlin/com/saveourtool/save/utils/ReactorUtilsTest.kt +++ b/common/src/jvmTest/kotlin/com/saveourtool/common/utils/ReactorUtilsTest.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.utils +package com.saveourtool.common.utils import org.junit.jupiter.api.Test import org.junit.jupiter.api.Assertions.* diff --git a/save-cloud-common/src/jvmTest/kotlin/com/saveourtool/save/validation/ValidationRegularExpressionsTest.kt b/common/src/jvmTest/kotlin/com/saveourtool/common/validation/ValidationRegularExpressionsTest.kt similarity index 94% rename from save-cloud-common/src/jvmTest/kotlin/com/saveourtool/save/validation/ValidationRegularExpressionsTest.kt rename to common/src/jvmTest/kotlin/com/saveourtool/common/validation/ValidationRegularExpressionsTest.kt index ed77cef7e9..efa56223dc 100644 --- a/save-cloud-common/src/jvmTest/kotlin/com/saveourtool/save/validation/ValidationRegularExpressionsTest.kt +++ b/common/src/jvmTest/kotlin/com/saveourtool/common/validation/ValidationRegularExpressionsTest.kt @@ -1,6 +1,6 @@ -package com.saveourtool.save.validation +package com.saveourtool.common.validation -import com.saveourtool.save.validation.ValidationRegularExpressions.URL_VALIDATOR +import com.saveourtool.common.validation.ValidationRegularExpressions.URL_VALIDATOR import kotlin.test.Test import kotlin.test.assertTrue import kotlin.test.assertFalse diff --git a/save-cloud-common/src/jvmTest/kotlin/com/saveourtool/save/validation/ValidationUtilsTest.kt b/common/src/jvmTest/kotlin/com/saveourtool/common/validation/ValidationUtilsTest.kt similarity index 94% rename from save-cloud-common/src/jvmTest/kotlin/com/saveourtool/save/validation/ValidationUtilsTest.kt rename to common/src/jvmTest/kotlin/com/saveourtool/common/validation/ValidationUtilsTest.kt index 593477105c..9fb8fbe687 100644 --- a/save-cloud-common/src/jvmTest/kotlin/com/saveourtool/save/validation/ValidationUtilsTest.kt +++ b/common/src/jvmTest/kotlin/com/saveourtool/common/validation/ValidationUtilsTest.kt @@ -1,4 +1,4 @@ -package com.saveourtool.save.validation +package com.saveourtool.common.validation import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test diff --git a/save-cloud-common/src/nativeMain/kotlin/com/saveourtool/save/utils/ArchiveUtils.kt b/common/src/nativeMain/kotlin/com/saveourtool/common/utils/ArchiveUtils.kt similarity index 92% rename from save-cloud-common/src/nativeMain/kotlin/com/saveourtool/save/utils/ArchiveUtils.kt rename to common/src/nativeMain/kotlin/com/saveourtool/common/utils/ArchiveUtils.kt index e19526cf04..8b5fe0bf1f 100644 --- a/save-cloud-common/src/nativeMain/kotlin/com/saveourtool/save/utils/ArchiveUtils.kt +++ b/common/src/nativeMain/kotlin/com/saveourtool/common/utils/ArchiveUtils.kt @@ -2,7 +2,7 @@ * Utils to unzip the archive */ -package com.saveourtool.save.utils +package com.saveourtool.common.utils import com.saveourtool.save.core.logging.logDebug import okio.Path diff --git a/save-cloud-common/src/nativeMain/kotlin/com/saveourtool/save/utils/FileUtils.kt b/common/src/nativeMain/kotlin/com/saveourtool/common/utils/FileUtils.kt similarity index 98% rename from save-cloud-common/src/nativeMain/kotlin/com/saveourtool/save/utils/FileUtils.kt rename to common/src/nativeMain/kotlin/com/saveourtool/common/utils/FileUtils.kt index c8284fa606..d6eca3f961 100644 --- a/save-cloud-common/src/nativeMain/kotlin/com/saveourtool/save/utils/FileUtils.kt +++ b/common/src/nativeMain/kotlin/com/saveourtool/common/utils/FileUtils.kt @@ -2,7 +2,7 @@ * Native implementation for FileUtils */ -package com.saveourtool.save.utils +package com.saveourtool.common.utils import com.akuleshov7.ktoml.file.TomlFileReader import okio.FileSystem diff --git a/save-cloud-common/src/nativeMain/kotlin/com/saveourtool/save/utils/PlatformUtils.kt b/common/src/nativeMain/kotlin/com/saveourtool/common/utils/PlatformUtils.kt similarity index 96% rename from save-cloud-common/src/nativeMain/kotlin/com/saveourtool/save/utils/PlatformUtils.kt rename to common/src/nativeMain/kotlin/com/saveourtool/common/utils/PlatformUtils.kt index a48a4b361b..2d1e8ff077 100644 --- a/save-cloud-common/src/nativeMain/kotlin/com/saveourtool/save/utils/PlatformUtils.kt +++ b/common/src/nativeMain/kotlin/com/saveourtool/common/utils/PlatformUtils.kt @@ -2,7 +2,7 @@ * Platform dependent utility methods */ -package com.saveourtool.save.utils +package com.saveourtool.common.utils import kotlinx.cinterop.ExperimentalForeignApi import kotlinx.cinterop.toKString diff --git a/cosv-backend/build.gradle.kts b/cosv-backend/build.gradle.kts index 250fb6d124..ade38412e7 100644 --- a/cosv-backend/build.gradle.kts +++ b/cosv-backend/build.gradle.kts @@ -9,7 +9,7 @@ plugins { dependencies { implementation(projects.authenticationService) - api(projects.saveCloudCommon) + api(projects.common) api(libs.cosv4k) implementation(libs.spring.security.core) implementation(libs.spring.data.jpa) diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/CosvApplication.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/CosvApplication.kt index 7277425c56..24f2a9862c 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/CosvApplication.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/CosvApplication.kt @@ -1,7 +1,8 @@ package com.saveourtool.cosv.backend +import com.saveourtool.common.s3.DefaultS3Configuration import com.saveourtool.cosv.backend.configs.ConfigProperties -import com.saveourtool.save.s3.DefaultS3Configuration + import org.springframework.boot.SpringApplication import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.autoconfigure.domain.EntityScan diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/configs/ConfigProperties.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/configs/ConfigProperties.kt index 518cc843ea..cca42142d7 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/configs/ConfigProperties.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/configs/ConfigProperties.kt @@ -1,6 +1,6 @@ package com.saveourtool.cosv.backend.configs -import com.saveourtool.save.s3.S3OperationsProperties +import com.saveourtool.common.s3.S3OperationsProperties import org.springframework.boot.context.properties.ConfigurationProperties import org.springframework.boot.context.properties.ConstructorBinding import java.nio.file.Path diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/configs/PersistenceSaveAutoConfiguration.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/configs/PersistenceSaveAutoConfiguration.kt index db7ab0ab21..651c6033d0 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/configs/PersistenceSaveAutoConfiguration.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/configs/PersistenceSaveAutoConfiguration.kt @@ -20,7 +20,7 @@ import javax.sql.DataSource @Configuration @EnableTransactionManagement @EnableJpaRepositories( - basePackages = ["com.saveourtool.save.repository"], + basePackages = ["com.saveourtool.common.repository"], entityManagerFactoryRef = "saveEntityManagerFactory", transactionManagerRef = "saveTransactionManager") class PersistenceSaveAutoConfiguration { @@ -42,7 +42,7 @@ class PersistenceSaveAutoConfiguration { @Qualifier("saveDataSource") saveDataSource: DataSource? ): LocalContainerEntityManagerFactoryBean? = builder .dataSource(saveDataSource) - .packages("com.saveourtool.save.entities") + .packages("com.saveourtool.common.entities") .persistenceUnit("save") .build() diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/AvatarController.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/AvatarController.kt index b7dc4e0729..1e21e37371 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/AvatarController.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/AvatarController.kt @@ -1,14 +1,14 @@ package com.saveourtool.cosv.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.service.UserService +import com.saveourtool.common.storage.AvatarKey +import com.saveourtool.common.storage.AvatarStorage +import com.saveourtool.common.utils.* +import com.saveourtool.common.utils.ByteBufferFluxResponse +import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.username -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.service.UserService -import com.saveourtool.save.storage.AvatarKey -import com.saveourtool.save.storage.AvatarStorage -import com.saveourtool.save.utils.* -import com.saveourtool.save.utils.ByteBufferFluxResponse -import com.saveourtool.save.v1 import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/CommentController.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/CommentController.kt index b8d83fa394..e798061321 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/CommentController.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/CommentController.kt @@ -1,16 +1,16 @@ package com.saveourtool.cosv.backend.controllers -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.entities.Comment -import com.saveourtool.save.entities.CommentDto -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.security.CommentPermissionEvaluator -import com.saveourtool.save.service.CommentService -import com.saveourtool.save.utils.StringResponse -import com.saveourtool.save.utils.blockingToMono -import com.saveourtool.save.utils.switchIfEmptyToNotFound -import com.saveourtool.save.utils.switchIfEmptyToResponseException -import com.saveourtool.save.v1 +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.entities.Comment +import com.saveourtool.common.entities.CommentDto +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.security.CommentPermissionEvaluator +import com.saveourtool.common.service.CommentService +import com.saveourtool.common.utils.StringResponse +import com.saveourtool.common.utils.blockingToMono +import com.saveourtool.common.utils.switchIfEmptyToNotFound +import com.saveourtool.common.utils.switchIfEmptyToResponseException +import com.saveourtool.common.v1 import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.responses.ApiResponse import io.swagger.v3.oas.annotations.tags.Tag diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/CosvController.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/CosvController.kt index 85c0543588..8ab0070442 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/CosvController.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/CosvController.kt @@ -1,15 +1,15 @@ package com.saveourtool.cosv.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.entities.cosv.CosvFileDto +import com.saveourtool.common.entities.cosv.VulnerabilityMetadataDto +import com.saveourtool.common.entities.cosv.VulnerabilityMetadataDtoWithUserAndOrganization +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.service.UserService +import com.saveourtool.common.utils.* +import com.saveourtool.common.v1 import com.saveourtool.cosv.backend.service.CosvService -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.configs.RequiresAuthorizationSourceHeader -import com.saveourtool.save.entities.cosv.CosvFileDto -import com.saveourtool.save.entities.cosv.VulnerabilityMetadataDto -import com.saveourtool.save.entities.cosv.VulnerabilityMetadataDtoWithUserAndOrganization -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.service.UserService -import com.saveourtool.save.utils.* -import com.saveourtool.save.v1 import org.springframework.http.HttpStatus import org.springframework.security.core.Authentication diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/LnkUserOrganizationController.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/LnkUserOrganizationController.kt index b1be478fce..1a32fcbb21 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/LnkUserOrganizationController.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/LnkUserOrganizationController.kt @@ -7,23 +7,23 @@ package com.saveourtool.cosv.backend.controllers -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.configs.RequiresAuthorizationSourceHeader -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.entities.OrganizationWithUsers -import com.saveourtool.save.filters.OrganizationFilter -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.permission.SetRoleRequest -import com.saveourtool.save.security.OrganizationPermissionEvaluator -import com.saveourtool.save.service.LnkUserOrganizationService -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.utils.StringResponse -import com.saveourtool.save.utils.switchIfEmptyToNotFound -import com.saveourtool.save.utils.switchIfEmptyToResponseException -import com.saveourtool.save.utils.username -import com.saveourtool.save.v1 +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.entities.OrganizationWithUsers +import com.saveourtool.common.filters.OrganizationFilter +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.permission.SetRoleRequest +import com.saveourtool.common.security.OrganizationPermissionEvaluator +import com.saveourtool.common.service.LnkUserOrganizationService +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.utils.StringResponse +import com.saveourtool.common.utils.switchIfEmptyToNotFound +import com.saveourtool.common.utils.switchIfEmptyToResponseException +import com.saveourtool.common.utils.username +import com.saveourtool.common.v1 import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/OrganizationController.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/OrganizationController.kt index f399cdcfa5..e61b33ebf8 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/OrganizationController.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/OrganizationController.kt @@ -1,20 +1,20 @@ package com.saveourtool.cosv.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.domain.OrganizationSaveStatus +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.* +import com.saveourtool.common.filters.OrganizationFilter +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.security.OrganizationPermissionEvaluator +import com.saveourtool.common.service.GitService +import com.saveourtool.common.service.LnkUserOrganizationService +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.utils.* +import com.saveourtool.common.v1 import com.saveourtool.cosv.backend.configs.ConfigProperties import com.saveourtool.save.authservice.utils.userId -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.configs.RequiresAuthorizationSourceHeader -import com.saveourtool.save.domain.OrganizationSaveStatus -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.* -import com.saveourtool.save.filters.OrganizationFilter -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.security.OrganizationPermissionEvaluator -import com.saveourtool.save.service.GitService -import com.saveourtool.save.service.LnkUserOrganizationService -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.utils.* -import com.saveourtool.save.v1 import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/ProjectController.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/ProjectController.kt index 0dcc11a9a2..d0218294d0 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/ProjectController.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/ProjectController.kt @@ -1,14 +1,14 @@ package com.saveourtool.cosv.backend.controllers -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.configs.RequiresAuthorizationSourceHeader -import com.saveourtool.save.entities.* -import com.saveourtool.save.filters.ProjectFilter -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.security.ProjectPermissionEvaluator -import com.saveourtool.save.service.ProjectService -import com.saveourtool.save.utils.* -import com.saveourtool.save.v1 +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.entities.* +import com.saveourtool.common.filters.ProjectFilter +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.security.ProjectPermissionEvaluator +import com.saveourtool.common.service.ProjectService +import com.saveourtool.common.utils.* +import com.saveourtool.common.v1 import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/RawCosvFileController.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/RawCosvFileController.kt index 6e184e28f4..a8a84cfbb2 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/RawCosvFileController.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/RawCosvFileController.kt @@ -1,20 +1,20 @@ package com.saveourtool.cosv.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.entities.cosv.* +import com.saveourtool.common.entities.cosv.RawCosvFileDto.Companion.isDuplicate +import com.saveourtool.common.entities.cosv.RawCosvFileDto.Companion.isUploadedJsonFile +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.service.UserService +import com.saveourtool.common.storage.concatS3Key +import com.saveourtool.common.utils.* +import com.saveourtool.common.v1 import com.saveourtool.cosv.backend.configs.ConfigProperties import com.saveourtool.cosv.backend.service.CosvService import com.saveourtool.cosv.backend.storage.RawCosvFileStorage import com.saveourtool.save.authservice.utils.userId -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.configs.RequiresAuthorizationSourceHeader -import com.saveourtool.save.entities.cosv.* -import com.saveourtool.save.entities.cosv.RawCosvFileDto.Companion.isDuplicate -import com.saveourtool.save.entities.cosv.RawCosvFileDto.Companion.isUploadedJsonFile -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.service.UserService -import com.saveourtool.save.storage.concatS3Key -import com.saveourtool.save.utils.* -import com.saveourtool.save.v1 import org.reactivestreams.Publisher import org.springframework.dao.DataIntegrityViolationException diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/TagController.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/TagController.kt index e27b0e7008..0560ef60ae 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/TagController.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/TagController.kt @@ -1,9 +1,9 @@ package com.saveourtool.cosv.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.utils.blockingToMono +import com.saveourtool.common.v1 import com.saveourtool.cosv.backend.service.TagService -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.utils.blockingToMono -import com.saveourtool.save.v1 import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/UsersDetailsController.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/UsersDetailsController.kt index 8a4d2536a0..dbcdbda8ee 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/UsersDetailsController.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/UsersDetailsController.kt @@ -1,18 +1,18 @@ package com.saveourtool.cosv.backend.controllers +import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.domain.UserSaveStatus +import com.saveourtool.common.entities.User +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.info.UserStatus +import com.saveourtool.common.repository.UserRepository +import com.saveourtool.common.service.UserService +import com.saveourtool.common.utils.* +import com.saveourtool.common.v1 +import com.saveourtool.common.validation.isValidLengthName import com.saveourtool.cosv.backend.configs.ConfigProperties import com.saveourtool.save.authservice.utils.SaveUserDetails import com.saveourtool.save.authservice.utils.userId -import com.saveourtool.save.configs.RequiresAuthorizationSourceHeader -import com.saveourtool.save.domain.UserSaveStatus -import com.saveourtool.save.entities.User -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.info.UserStatus -import com.saveourtool.save.repository.UserRepository -import com.saveourtool.save.service.UserService -import com.saveourtool.save.utils.* -import com.saveourtool.save.v1 -import com.saveourtool.save.validation.isValidLengthName import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/VulnerabilityController.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/VulnerabilityController.kt index 023bba1cca..21535f0611 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/VulnerabilityController.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/controllers/VulnerabilityController.kt @@ -1,25 +1,25 @@ package com.saveourtool.cosv.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.cosv.VulnerabilityExt +import com.saveourtool.common.entities.cosv.VulnerabilityMetadataDto +import com.saveourtool.common.entities.vulnerability.VulnerabilityDateDto +import com.saveourtool.common.entities.vulnerability.VulnerabilityProjectDto +import com.saveourtool.common.entities.vulnerability.VulnerabilityStatus +import com.saveourtool.common.filters.VulnerabilityFilter +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.service.UserService +import com.saveourtool.common.utils.* +import com.saveourtool.common.v1 import com.saveourtool.cosv.backend.security.VulnerabilityPermissionEvaluator import com.saveourtool.cosv.backend.service.CosvService import com.saveourtool.cosv.backend.service.VulnerabilityMetadataDtoList import com.saveourtool.cosv.backend.service.VulnerabilityService import com.saveourtool.cosv.backend.utils.hasRole import com.saveourtool.save.authservice.utils.username -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.configs.RequiresAuthorizationSourceHeader -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.cosv.VulnerabilityExt -import com.saveourtool.save.entities.cosv.VulnerabilityMetadataDto -import com.saveourtool.save.entities.vulnerability.VulnerabilityDateDto -import com.saveourtool.save.entities.vulnerability.VulnerabilityProjectDto -import com.saveourtool.save.entities.vulnerability.VulnerabilityStatus -import com.saveourtool.save.filters.VulnerabilityFilter -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.service.UserService -import com.saveourtool.save.utils.* -import com.saveourtool.save.v1 import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.responses.ApiResponse diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/event/CommentListener.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/event/CommentListener.kt index 2ee5979a1d..d2bead782d 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/event/CommentListener.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/event/CommentListener.kt @@ -1,13 +1,14 @@ package com.saveourtool.cosv.backend.event +import com.saveourtool.common.entities.Notification +import com.saveourtool.common.entities.User +import com.saveourtool.common.evententities.CommentEvent +import com.saveourtool.common.repository.NotificationRepository +import com.saveourtool.common.service.UserService +import com.saveourtool.common.utils.orNotFound import com.saveourtool.cosv.backend.repository.LnkVulnerabilityMetadataUserRepository import com.saveourtool.cosv.backend.service.VulnerabilityMetadataService -import com.saveourtool.save.entities.Notification -import com.saveourtool.save.entities.User -import com.saveourtool.save.evententities.CommentEvent -import com.saveourtool.save.repository.NotificationRepository -import com.saveourtool.save.service.UserService -import com.saveourtool.save.utils.orNotFound + import org.springframework.context.event.EventListener import org.springframework.stereotype.Component diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/CosvFileRepository.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/CosvFileRepository.kt index 5cd908fbd4..c3c09408d4 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/CosvFileRepository.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/CosvFileRepository.kt @@ -1,7 +1,7 @@ package com.saveourtool.cosv.backend.repository -import com.saveourtool.save.entitiescosv.CosvFile -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entitiescosv.CosvFile +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository import java.time.LocalDateTime diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/CosvGeneratedIdRepository.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/CosvGeneratedIdRepository.kt index 41ddc6a5af..7766a24925 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/CosvGeneratedIdRepository.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/CosvGeneratedIdRepository.kt @@ -1,7 +1,7 @@ package com.saveourtool.cosv.backend.repository -import com.saveourtool.save.entitiescosv.CosvGeneratedId -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entitiescosv.CosvGeneratedId +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository /** diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/CosvRepository.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/CosvRepository.kt index df2020495e..ad51d4397f 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/CosvRepository.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/CosvRepository.kt @@ -1,8 +1,8 @@ package com.saveourtool.cosv.backend.repository +import com.saveourtool.common.entities.cosv.CosvFileDto +import com.saveourtool.common.entitiescosv.CosvFile import com.saveourtool.osv4k.OsvSchema -import com.saveourtool.save.entities.cosv.CosvFileDto -import com.saveourtool.save.entitiescosv.CosvFile import reactor.core.publisher.Flux import reactor.core.publisher.Mono diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/CosvRepositoryInStorage.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/CosvRepositoryInStorage.kt index fb96149267..f279de5d63 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/CosvRepositoryInStorage.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/CosvRepositoryInStorage.kt @@ -1,10 +1,10 @@ package com.saveourtool.cosv.backend.repository +import com.saveourtool.common.entities.cosv.CosvFileDto +import com.saveourtool.common.entitiescosv.CosvFile +import com.saveourtool.common.utils.* import com.saveourtool.cosv.backend.storage.CosvFileS3KeyManager import com.saveourtool.cosv.backend.storage.CosvFileStorage -import com.saveourtool.save.entities.cosv.CosvFileDto -import com.saveourtool.save.entitiescosv.CosvFile -import com.saveourtool.save.utils.* import org.springframework.stereotype.Component import org.springframework.web.bind.annotation.RequestParam diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/LnkVulnerabilityMetadataTagRepository.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/LnkVulnerabilityMetadataTagRepository.kt index ed316d3c7d..03299cc6fc 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/LnkVulnerabilityMetadataTagRepository.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/LnkVulnerabilityMetadataTagRepository.kt @@ -1,7 +1,7 @@ package com.saveourtool.cosv.backend.repository -import com.saveourtool.save.entitiescosv.LnkVulnerabilityMetadataTag -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entitiescosv.LnkVulnerabilityMetadataTag +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.data.domain.Pageable import org.springframework.stereotype.Repository diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/LnkVulnerabilityMetadataUserRepository.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/LnkVulnerabilityMetadataUserRepository.kt index b0b8d7d79a..25c886a1ff 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/LnkVulnerabilityMetadataUserRepository.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/LnkVulnerabilityMetadataUserRepository.kt @@ -1,7 +1,7 @@ package com.saveourtool.cosv.backend.repository -import com.saveourtool.save.entitiescosv.LnkVulnerabilityMetadataUser -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entitiescosv.LnkVulnerabilityMetadataUser +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository /** diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/RawCosvFileRepository.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/RawCosvFileRepository.kt index 7001a15604..47af5c351b 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/RawCosvFileRepository.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/RawCosvFileRepository.kt @@ -1,7 +1,7 @@ package com.saveourtool.cosv.backend.repository -import com.saveourtool.save.entitiescosv.RawCosvFile -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entitiescosv.RawCosvFile +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.data.domain.PageRequest import org.springframework.stereotype.Repository diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/VulnerabilityMetadataProjectRepository.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/VulnerabilityMetadataProjectRepository.kt index eaabc8a40b..bfbfa80f6a 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/VulnerabilityMetadataProjectRepository.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/VulnerabilityMetadataProjectRepository.kt @@ -1,7 +1,7 @@ package com.saveourtool.cosv.backend.repository -import com.saveourtool.save.entitiescosv.VulnerabilityMetadataProject -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entitiescosv.VulnerabilityMetadataProject +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository /** diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/VulnerabilityMetadataRepository.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/VulnerabilityMetadataRepository.kt index 405e18e6b3..1d3b01f4a9 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/VulnerabilityMetadataRepository.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/repository/VulnerabilityMetadataRepository.kt @@ -1,8 +1,8 @@ package com.saveourtool.cosv.backend.repository -import com.saveourtool.save.entities.vulnerability.VulnerabilityStatus -import com.saveourtool.save.entitiescosv.VulnerabilityMetadata -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.vulnerability.VulnerabilityStatus +import com.saveourtool.common.entitiescosv.VulnerabilityMetadata +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/security/VulnerabilityPermissionEvaluator.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/security/VulnerabilityPermissionEvaluator.kt index bd4526fc78..f50c385636 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/security/VulnerabilityPermissionEvaluator.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/security/VulnerabilityPermissionEvaluator.kt @@ -1,13 +1,13 @@ package com.saveourtool.cosv.backend.security +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.cosv.VulnerabilityMetadataDto +import com.saveourtool.common.entities.vulnerability.VulnerabilityStatus +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.utils.orNotFound import com.saveourtool.cosv.backend.service.VulnerabilityService import com.saveourtool.cosv.backend.utils.hasRole import com.saveourtool.save.authservice.utils.userId -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.cosv.VulnerabilityMetadataDto -import com.saveourtool.save.entities.vulnerability.VulnerabilityStatus -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.utils.orNotFound import org.springframework.security.core.Authentication import org.springframework.stereotype.Component diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/CosvService.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/CosvService.kt index 25046539fc..76c1c59276 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/CosvService.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/CosvService.kt @@ -1,5 +1,12 @@ package com.saveourtool.cosv.backend.service +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.entities.User +import com.saveourtool.common.entities.cosv.* +import com.saveourtool.common.entitiescosv.CosvGeneratedId +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.service.UserService +import com.saveourtool.common.utils.* import com.saveourtool.cosv.backend.processor.CosvProcessor import com.saveourtool.cosv.backend.repository.CosvGeneratedIdRepository import com.saveourtool.cosv.backend.repository.CosvRepository @@ -8,13 +15,6 @@ import com.saveourtool.cosv.backend.repository.LnkVulnerabilityMetadataTagReposi import com.saveourtool.cosv.backend.storage.RawCosvFileStorage import com.saveourtool.osv4k.* import com.saveourtool.osv4k.RawOsvSchema as RawCosvSchema -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.entities.User -import com.saveourtool.save.entities.cosv.* -import com.saveourtool.save.entitiescosv.CosvGeneratedId -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.service.UserService -import com.saveourtool.save.utils.* import org.slf4j.Logger import org.springframework.stereotype.Service diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/TagService.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/TagService.kt index 214de5f94a..0fd2102759 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/TagService.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/TagService.kt @@ -1,15 +1,15 @@ package com.saveourtool.cosv.backend.service +import com.saveourtool.common.entities.Tag +import com.saveourtool.common.entitiescosv.LnkVulnerabilityMetadataTag +import com.saveourtool.common.repository.TagRepository +import com.saveourtool.common.utils.error +import com.saveourtool.common.utils.getLogger +import com.saveourtool.common.utils.orNotFound +import com.saveourtool.common.validation.TAG_ERROR_MESSAGE +import com.saveourtool.common.validation.isValidTag import com.saveourtool.cosv.backend.repository.LnkVulnerabilityMetadataTagRepository import com.saveourtool.cosv.backend.repository.VulnerabilityMetadataRepository -import com.saveourtool.save.entities.Tag -import com.saveourtool.save.entitiescosv.LnkVulnerabilityMetadataTag -import com.saveourtool.save.repository.TagRepository -import com.saveourtool.save.utils.error -import com.saveourtool.save.utils.getLogger -import com.saveourtool.save.utils.orNotFound -import com.saveourtool.save.validation.TAG_ERROR_MESSAGE -import com.saveourtool.save.validation.isValidTag import org.slf4j.Logger import org.springframework.data.domain.Pageable diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/VulnerabilityMetadataService.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/VulnerabilityMetadataService.kt index 36c42dc01c..7b0cd43101 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/VulnerabilityMetadataService.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/VulnerabilityMetadataService.kt @@ -1,27 +1,27 @@ package com.saveourtool.cosv.backend.service +import com.saveourtool.common.cvsscalculator.calculateBaseScore +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.entities.User +import com.saveourtool.common.entities.cosv.VulnerabilityMetadataDto +import com.saveourtool.common.entities.cosv.VulnerabilityMetadataDto.Companion.SUMMARY_LENGTH +import com.saveourtool.common.entities.vulnerability.VulnerabilityLanguage +import com.saveourtool.common.entities.vulnerability.VulnerabilityStatus +import com.saveourtool.common.entitiescosv.CosvFile +import com.saveourtool.common.entitiescosv.VulnerabilityMetadata +import com.saveourtool.common.entitiescosv.evententities.VulnerabilityMetadataEvent +import com.saveourtool.common.utils.ELLIPSIS +import com.saveourtool.common.utils.getCurrentLocalDateTime +import com.saveourtool.common.utils.getLanguage +import com.saveourtool.common.utils.getLogger +import com.saveourtool.common.utils.shorten +import com.saveourtool.common.utils.warn import com.saveourtool.cosv.backend.repository.AnyCosvSchema import com.saveourtool.cosv.backend.repository.CosvSchema import com.saveourtool.cosv.backend.repository.VulnerabilityMetadataRepository import com.saveourtool.cosv.backend.storage.CosvFileS3KeyManager import com.saveourtool.osv4k.Severity import com.saveourtool.osv4k.SeverityType -import com.saveourtool.save.cvsscalculator.calculateBaseScore -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.entities.User -import com.saveourtool.save.entities.cosv.VulnerabilityMetadataDto -import com.saveourtool.save.entities.cosv.VulnerabilityMetadataDto.Companion.SUMMARY_LENGTH -import com.saveourtool.save.entities.vulnerability.VulnerabilityLanguage -import com.saveourtool.save.entities.vulnerability.VulnerabilityStatus -import com.saveourtool.save.entitiescosv.CosvFile -import com.saveourtool.save.entitiescosv.VulnerabilityMetadata -import com.saveourtool.save.entitiescosv.evententities.VulnerabilityMetadataEvent -import com.saveourtool.save.utils.ELLIPSIS -import com.saveourtool.save.utils.getCurrentLocalDateTime -import com.saveourtool.save.utils.getLanguage -import com.saveourtool.save.utils.getLogger -import com.saveourtool.save.utils.shorten -import com.saveourtool.save.utils.warn import org.springframework.context.ApplicationEventPublisher import org.springframework.http.HttpStatus diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/VulnerabilityRatingService.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/VulnerabilityRatingService.kt index 442e81fffb..dc3a8c7f20 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/VulnerabilityRatingService.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/VulnerabilityRatingService.kt @@ -1,10 +1,10 @@ package com.saveourtool.cosv.backend.service -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.entities.User -import com.saveourtool.save.entitiescosv.VulnerabilityMetadata -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.service.UserService +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.entities.User +import com.saveourtool.common.entitiescosv.VulnerabilityMetadata +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.service.UserService import org.springframework.stereotype.Service import org.springframework.transaction.annotation.Transactional diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/VulnerabilityService.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/VulnerabilityService.kt index 12d6b81bdd..711a70514c 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/VulnerabilityService.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/service/VulnerabilityService.kt @@ -1,22 +1,22 @@ package com.saveourtool.cosv.backend.service +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.entities.Tag +import com.saveourtool.common.entities.cosv.* +import com.saveourtool.common.entities.vulnerability.* +import com.saveourtool.common.entitiescosv.LnkVulnerabilityMetadataTag +import com.saveourtool.common.entitiescosv.LnkVulnerabilityMetadataUser +import com.saveourtool.common.entitiescosv.VulnerabilityMetadata +import com.saveourtool.common.entitiescosv.VulnerabilityMetadataProject +import com.saveourtool.common.filters.VulnerabilityFilter +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.service.UserService +import com.saveourtool.common.utils.* import com.saveourtool.cosv.backend.repository.* import com.saveourtool.cosv.backend.utils.hasRole import com.saveourtool.save.authservice.utils.userId -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.entities.Tag -import com.saveourtool.save.entities.cosv.* -import com.saveourtool.save.entities.vulnerability.* -import com.saveourtool.save.entitiescosv.LnkVulnerabilityMetadataTag -import com.saveourtool.save.entitiescosv.LnkVulnerabilityMetadataUser -import com.saveourtool.save.entitiescosv.VulnerabilityMetadata -import com.saveourtool.save.entitiescosv.VulnerabilityMetadataProject -import com.saveourtool.save.filters.VulnerabilityFilter -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.service.UserService -import com.saveourtool.save.utils.* import org.springframework.data.domain.PageRequest import org.springframework.http.HttpStatus diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/storage/CosvFileS3KeyManager.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/storage/CosvFileS3KeyManager.kt index 93d5a9a7f7..a34e19111a 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/storage/CosvFileS3KeyManager.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/storage/CosvFileS3KeyManager.kt @@ -1,12 +1,13 @@ package com.saveourtool.cosv.backend.storage +import com.saveourtool.common.entitiescosv.CosvFile +import com.saveourtool.common.entitiescosv.VulnerabilityMetadata +import com.saveourtool.common.s3.S3OperationsProperties +import com.saveourtool.common.storage.concatS3Key +import com.saveourtool.common.storage.key.AbstractS3KeyEntityManager +import com.saveourtool.common.utils.BlockingBridge import com.saveourtool.cosv.backend.repository.CosvFileRepository -import com.saveourtool.save.entitiescosv.CosvFile -import com.saveourtool.save.entitiescosv.VulnerabilityMetadata -import com.saveourtool.save.s3.S3OperationsProperties -import com.saveourtool.save.storage.concatS3Key -import com.saveourtool.save.storage.key.AbstractS3KeyEntityManager -import com.saveourtool.save.utils.BlockingBridge + import org.springframework.stereotype.Component import org.springframework.transaction.annotation.Transactional diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/storage/CosvFileStorage.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/storage/CosvFileStorage.kt index 9b5a7eec9b..00ed1df33e 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/storage/CosvFileStorage.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/storage/CosvFileStorage.kt @@ -1,13 +1,13 @@ package com.saveourtool.cosv.backend.storage -import com.saveourtool.save.entitiescosv.CosvFile -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.storage.DefaultStorageProjectReactor -import com.saveourtool.save.storage.ReactiveStorageWithDatabase -import com.saveourtool.save.storage.deleteUnexpectedKeys -import com.saveourtool.save.utils.blockingToFlux -import com.saveourtool.save.utils.blockingToMono -import com.saveourtool.save.utils.switchIfEmptyToNotFound +import com.saveourtool.common.entitiescosv.CosvFile +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.storage.DefaultStorageProjectReactor +import com.saveourtool.common.storage.ReactiveStorageWithDatabase +import com.saveourtool.common.storage.deleteUnexpectedKeys +import com.saveourtool.common.utils.blockingToFlux +import com.saveourtool.common.utils.blockingToMono +import com.saveourtool.common.utils.switchIfEmptyToNotFound import org.springframework.stereotype.Service import reactor.core.publisher.Flux import reactor.core.publisher.Mono diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/storage/RawCosvFileS3KeyManager.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/storage/RawCosvFileS3KeyManager.kt index 6043f145b3..6d944efdd6 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/storage/RawCosvFileS3KeyManager.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/storage/RawCosvFileS3KeyManager.kt @@ -1,17 +1,17 @@ package com.saveourtool.cosv.backend.storage +import com.saveourtool.common.entities.cosv.RawCosvFileDto +import com.saveourtool.common.entities.cosv.RawCosvFileStatus +import com.saveourtool.common.entitiescosv.RawCosvFile +import com.saveourtool.common.entitiescosv.RawCosvFile.Companion.toNewEntity +import com.saveourtool.common.s3.S3OperationsProperties +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.service.UserService +import com.saveourtool.common.storage.concatS3Key +import com.saveourtool.common.storage.key.AbstractS3KeyDtoManager +import com.saveourtool.common.utils.BlockingBridge +import com.saveourtool.common.utils.getByIdOrNotFound import com.saveourtool.cosv.backend.repository.RawCosvFileRepository -import com.saveourtool.save.entities.cosv.RawCosvFileDto -import com.saveourtool.save.entities.cosv.RawCosvFileStatus -import com.saveourtool.save.entitiescosv.RawCosvFile -import com.saveourtool.save.entitiescosv.RawCosvFile.Companion.toNewEntity -import com.saveourtool.save.s3.S3OperationsProperties -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.service.UserService -import com.saveourtool.save.storage.concatS3Key -import com.saveourtool.save.storage.key.AbstractS3KeyDtoManager -import com.saveourtool.save.utils.BlockingBridge -import com.saveourtool.save.utils.getByIdOrNotFound import org.springframework.data.domain.PageRequest import org.springframework.stereotype.Component diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/storage/RawCosvFileStorage.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/storage/RawCosvFileStorage.kt index 7929924e5f..f9e2416383 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/storage/RawCosvFileStorage.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/storage/RawCosvFileStorage.kt @@ -1,22 +1,22 @@ package com.saveourtool.cosv.backend.storage -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.entities.User -import com.saveourtool.save.entities.cosv.RawCosvFileDto -import com.saveourtool.save.entities.cosv.RawCosvFileDto.Companion.isDuplicate -import com.saveourtool.save.entities.cosv.RawCosvFileDto.Companion.isHasErrors -import com.saveourtool.save.entities.cosv.RawCosvFileDto.Companion.isPendingRemoved -import com.saveourtool.save.entities.cosv.RawCosvFileDto.Companion.isProcessing -import com.saveourtool.save.entities.cosv.RawCosvFileDto.Companion.isUploadedJsonFile -import com.saveourtool.save.entities.cosv.RawCosvFileDto.Companion.isZipArchive -import com.saveourtool.save.entities.cosv.RawCosvFileStatisticsDto -import com.saveourtool.save.entities.cosv.RawCosvFileStatus -import com.saveourtool.save.entitiescosv.RawCosvFile -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.storage.DefaultStorageProjectReactor -import com.saveourtool.save.storage.ReactiveStorageWithDatabase -import com.saveourtool.save.storage.deleteUnexpectedKeys -import com.saveourtool.save.utils.* +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.entities.User +import com.saveourtool.common.entities.cosv.RawCosvFileDto +import com.saveourtool.common.entities.cosv.RawCosvFileDto.Companion.isDuplicate +import com.saveourtool.common.entities.cosv.RawCosvFileDto.Companion.isHasErrors +import com.saveourtool.common.entities.cosv.RawCosvFileDto.Companion.isPendingRemoved +import com.saveourtool.common.entities.cosv.RawCosvFileDto.Companion.isProcessing +import com.saveourtool.common.entities.cosv.RawCosvFileDto.Companion.isUploadedJsonFile +import com.saveourtool.common.entities.cosv.RawCosvFileDto.Companion.isZipArchive +import com.saveourtool.common.entities.cosv.RawCosvFileStatisticsDto +import com.saveourtool.common.entities.cosv.RawCosvFileStatus +import com.saveourtool.common.entitiescosv.RawCosvFile +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.storage.DefaultStorageProjectReactor +import com.saveourtool.common.storage.ReactiveStorageWithDatabase +import com.saveourtool.common.storage.deleteUnexpectedKeys +import com.saveourtool.common.utils.* import org.springframework.data.domain.PageRequest import org.springframework.stereotype.Component diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/utils/AuthenticationUtils.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/utils/AuthenticationUtils.kt index 6efe7ccfc5..1ab1e709f4 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/utils/AuthenticationUtils.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/utils/AuthenticationUtils.kt @@ -2,7 +2,7 @@ package com.saveourtool.cosv.backend.utils -import com.saveourtool.save.domain.Role +import com.saveourtool.common.domain.Role import org.springframework.security.core.Authentication /** diff --git a/cosv-frontend/build.gradle.kts b/cosv-frontend/build.gradle.kts index b1315c2a23..49dabd7807 100644 --- a/cosv-frontend/build.gradle.kts +++ b/cosv-frontend/build.gradle.kts @@ -17,7 +17,7 @@ rootProject.plugins.withType { } dependencies { - implementation(projects.saveCloudCommon) + implementation(projects.common) implementation(projects.frontendCommon) implementation(enforcedPlatform(libs.kotlin.wrappers.bom)) diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/App.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/App.kt index 8977ced795..84efe6e7fa 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/App.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/App.kt @@ -4,6 +4,8 @@ package com.saveourtool.cosv.frontend +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.cosv.frontend.components.ErrorBoundary import com.saveourtool.cosv.frontend.components.requestModalHandler import com.saveourtool.cosv.frontend.components.topbar.topBarComponent @@ -14,8 +16,6 @@ import com.saveourtool.frontend.common.components.basic.scrollToTopButton import com.saveourtool.frontend.common.externals.i18next.initI18n import com.saveourtool.frontend.common.externals.modal.ReactModal import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.validation.FrontendRoutes import react.* import react.dom.client.createRoot diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/topbar/TopBar.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/topbar/TopBar.kt index 4194237e0d..a02981e5de 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/topbar/TopBar.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/topbar/TopBar.kt @@ -6,13 +6,13 @@ package com.saveourtool.cosv.frontend.components.topbar +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.components.basic.languageSelector import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.externals.fontawesome.FontAwesomeIconModule import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.frontend.common.utils.UserInfoAwarePropsWithChildren import com.saveourtool.frontend.common.utils.notIn -import com.saveourtool.save.validation.FrontendRoutes import js.core.jso import react.* diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/topbar/TopBarLinks.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/topbar/TopBarLinks.kt index eac9f700e0..7156c3ca56 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/topbar/TopBarLinks.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/topbar/TopBarLinks.kt @@ -2,8 +2,8 @@ package com.saveourtool.cosv.frontend.components.topbar +import com.saveourtool.common.validation.FrontendCosvRoutes import com.saveourtool.frontend.common.externals.i18next.useTranslation -import com.saveourtool.save.validation.FrontendCosvRoutes import react.* import react.dom.html.ReactHTML.a diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/topbar/TopBarUrlSplits.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/topbar/TopBarUrlSplits.kt index c1fd8d5c4b..038c9f51c5 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/topbar/TopBarUrlSplits.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/topbar/TopBarUrlSplits.kt @@ -2,9 +2,9 @@ package com.saveourtool.cosv.frontend.components.topbar +import com.saveourtool.common.utils.URL_PATH_DELIMITER +import com.saveourtool.common.validation.FrontendCosvRoutes import com.saveourtool.frontend.common.utils.TopBarUrl -import com.saveourtool.save.utils.URL_PATH_DELIMITER -import com.saveourtool.save.validation.FrontendCosvRoutes import react.FC import react.Props diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/topbar/TopBarUserField.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/topbar/TopBarUserField.kt index 03d71754ff..7fb1f56284 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/topbar/TopBarUserField.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/topbar/TopBarUserField.kt @@ -4,6 +4,7 @@ package com.saveourtool.cosv.frontend.components.topbar +import com.saveourtool.common.validation.FrontendCosvRoutes import com.saveourtool.frontend.common.components.basic.avatarRenderer import com.saveourtool.frontend.common.components.basic.renderTopBarAvatar import com.saveourtool.frontend.common.components.modal.logoutModal @@ -13,7 +14,6 @@ import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.AVATAR_PROFILE_PLACEHOLDER import com.saveourtool.frontend.common.utils.UserInfoAwareProps import com.saveourtool.frontend.common.utils.isSuperAdmin -import com.saveourtool.save.validation.FrontendCosvRoutes import js.core.jso import react.* diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/CreateVulnerabilityView.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/CreateVulnerabilityView.kt index 40f56ac252..34f8ce7905 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/CreateVulnerabilityView.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/CreateVulnerabilityView.kt @@ -2,6 +2,14 @@ package com.saveourtool.cosv.frontend.components.views.vuln +import com.saveourtool.common.cvsscalculator.CvssVersion +import com.saveourtool.common.cvsscalculator.calculateBaseScore +import com.saveourtool.common.cvsscalculator.parsingVectorToMap +import com.saveourtool.common.cvsscalculator.v3.CvssVectorV3 +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.utils.* +import com.saveourtool.common.validation.FrontendCosvRoutes +import com.saveourtool.common.validation.isValidUrl import com.saveourtool.cosv.frontend.components.views.vuln.component.cvssBaseScoreCalculator import com.saveourtool.frontend.common.components.basic.addUserComponent import com.saveourtool.frontend.common.components.basic.markdown @@ -21,14 +29,6 @@ import com.saveourtool.osv4k.Reference import com.saveourtool.osv4k.ReferenceType import com.saveourtool.osv4k.Severity import com.saveourtool.osv4k.SeverityType -import com.saveourtool.save.cvsscalculator.CvssVersion -import com.saveourtool.save.cvsscalculator.calculateBaseScore -import com.saveourtool.save.cvsscalculator.parsingVectorToMap -import com.saveourtool.save.cvsscalculator.v3.CvssVectorV3 -import com.saveourtool.save.entities.OrganizationDto -import com.saveourtool.save.utils.* -import com.saveourtool.save.validation.FrontendCosvRoutes -import com.saveourtool.save.validation.isValidUrl import js.core.jso import react.ChildrenBuilder diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityBadge.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityBadge.kt index eee6537bf5..2768cb15a9 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityBadge.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityBadge.kt @@ -2,6 +2,10 @@ package com.saveourtool.cosv.frontend.components.views.vuln +import com.saveourtool.common.cvsscalculator.CvssVersion +import com.saveourtool.common.cvsscalculator.parsingVectorToMap +import com.saveourtool.common.cvsscalculator.v3.CvssVectorV3 +import com.saveourtool.common.entities.cosv.VulnerabilityExt import com.saveourtool.cosv.frontend.components.views.vuln.component.cvssBaseScoreCalculator import com.saveourtool.frontend.common.components.modal.calculatorModalStyle import com.saveourtool.frontend.common.components.modal.displayModal @@ -12,10 +16,6 @@ import com.saveourtool.frontend.common.utils.buttonBuilder import com.saveourtool.frontend.common.utils.useWindowOpenness import com.saveourtool.osv4k.Severity import com.saveourtool.osv4k.SeverityType -import com.saveourtool.save.cvsscalculator.CvssVersion -import com.saveourtool.save.cvsscalculator.parsingVectorToMap -import com.saveourtool.save.cvsscalculator.v3.CvssVectorV3 -import com.saveourtool.save.entities.cosv.VulnerabilityExt import js.core.jso import react.FC diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityChangesTab.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityChangesTab.kt index 9fc4c4cba3..201518783f 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityChangesTab.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityChangesTab.kt @@ -2,11 +2,11 @@ package com.saveourtool.cosv.frontend.components.views.vuln +import com.saveourtool.common.entities.cosv.CosvFileDto +import com.saveourtool.common.utils.toUnixCalendarFormat import com.saveourtool.frontend.common.externals.diffviewer.reactDiffViewer import com.saveourtool.frontend.common.utils.* import com.saveourtool.osv4k.RawOsvSchema -import com.saveourtool.save.entities.cosv.CosvFileDto -import com.saveourtool.save.utils.toUnixCalendarFormat import js.core.jso import react.FC diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityCollectionView.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityCollectionView.kt index 794d9cf960..a796ae8f49 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityCollectionView.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityCollectionView.kt @@ -6,6 +6,8 @@ package com.saveourtool.cosv.frontend.components.views.vuln +import com.saveourtool.common.filters.VulnerabilityFilter +import com.saveourtool.common.info.UserInfo import com.saveourtool.cosv.frontend.components.basic.vulnerabilityIntroductionComponent import com.saveourtool.frontend.common.components.basic.* import com.saveourtool.frontend.common.components.views.vuln.vulnerabilityTableComponent @@ -13,8 +15,6 @@ import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.Style import com.saveourtool.frontend.common.utils.particles import com.saveourtool.frontend.common.utils.useBackground -import com.saveourtool.save.filters.VulnerabilityFilter -import com.saveourtool.save.info.UserInfo import js.core.jso import react.* diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityCommentTab.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityCommentTab.kt index dcc92a1b02..a2ea251068 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityCommentTab.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityCommentTab.kt @@ -2,13 +2,13 @@ package com.saveourtool.cosv.frontend.components.views.vuln +import com.saveourtool.common.entities.CommentDto +import com.saveourtool.common.entities.cosv.VulnerabilityExt +import com.saveourtool.common.info.UserInfo import com.saveourtool.frontend.common.components.basic.commentWindow import com.saveourtool.frontend.common.components.basic.newCommentWindow import com.saveourtool.frontend.common.externals.i18next.useTranslation import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.CommentDto -import com.saveourtool.save.entities.cosv.VulnerabilityExt -import com.saveourtool.save.info.UserInfo import js.core.jso import react.FC diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityDateModal.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityDateModal.kt index a7cc86853a..4a7264d7a0 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityDateModal.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityDateModal.kt @@ -2,6 +2,10 @@ package com.saveourtool.cosv.frontend.components.views.vuln +import com.saveourtool.common.entities.cosv.VulnerabilityExt +import com.saveourtool.common.entities.vulnerability.VulnerabilityDateDto +import com.saveourtool.common.entities.vulnerability.VulnerabilityDateType +import com.saveourtool.common.utils.getTimeline import com.saveourtool.frontend.common.components.inputform.* import com.saveourtool.frontend.common.components.modal.modal import com.saveourtool.frontend.common.externals.i18next.useTranslation @@ -10,10 +14,6 @@ import com.saveourtool.frontend.common.utils.WindowOpenness import com.saveourtool.frontend.common.utils.buttonBuilder import com.saveourtool.frontend.common.utils.dateStringToLocalDateTime import com.saveourtool.frontend.common.utils.selectorBuilder -import com.saveourtool.save.entities.cosv.VulnerabilityExt -import com.saveourtool.save.entities.vulnerability.VulnerabilityDateDto -import com.saveourtool.save.entities.vulnerability.VulnerabilityDateType -import com.saveourtool.save.utils.getTimeline import react.FC import react.Props diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityGeneralInfoProps.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityGeneralInfoProps.kt index 32680fd516..0a15667383 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityGeneralInfoProps.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityGeneralInfoProps.kt @@ -1,5 +1,15 @@ package com.saveourtool.cosv.frontend.components.views.vuln +import com.saveourtool.common.entities.cosv.VulnerabilityExt +import com.saveourtool.common.entities.cosv.VulnerabilityMetadataDto.Companion.SUMMARY_LENGTH +import com.saveourtool.common.entities.vulnerability.VulnerabilityStatus +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.utils.NO_BREAK_SPACE +import com.saveourtool.common.utils.PRETTY_DELIMITER +import com.saveourtool.common.utils.getRelatedLink +import com.saveourtool.common.utils.shorten +import com.saveourtool.common.utils.toUnixCalendarFormat +import com.saveourtool.common.validation.isValidName import com.saveourtool.frontend.common.components.basic.renderAvatar import com.saveourtool.frontend.common.components.basic.renderUserAvatarWithName import com.saveourtool.frontend.common.components.basic.userBoard @@ -13,16 +23,6 @@ import com.saveourtool.frontend.common.utils.isSuperAdmin import com.saveourtool.frontend.common.utils.selectorBuilder import com.saveourtool.osv4k.ConfirmType import com.saveourtool.osv4k.Credit -import com.saveourtool.save.entities.cosv.VulnerabilityExt -import com.saveourtool.save.entities.cosv.VulnerabilityMetadataDto.Companion.SUMMARY_LENGTH -import com.saveourtool.save.entities.vulnerability.VulnerabilityStatus -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.utils.NO_BREAK_SPACE -import com.saveourtool.save.utils.PRETTY_DELIMITER -import com.saveourtool.save.utils.getRelatedLink -import com.saveourtool.save.utils.shorten -import com.saveourtool.save.utils.toUnixCalendarFormat -import com.saveourtool.save.validation.isValidName import js.core.jso import react.* diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityHeader.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityHeader.kt index ce5f26dbcc..f2427aeb37 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityHeader.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityHeader.kt @@ -6,6 +6,11 @@ package com.saveourtool.cosv.frontend.components.views.vuln +import com.saveourtool.common.entities.CommentDto +import com.saveourtool.common.entities.cosv.VulnerabilityExt +import com.saveourtool.common.entities.vulnerability.VulnerabilityStatus +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.validation.FrontendCosvRoutes import com.saveourtool.frontend.common.components.inputform.InputTypes import com.saveourtool.frontend.common.components.modal.displayModal import com.saveourtool.frontend.common.components.modal.mediumTransparentModalStyle @@ -15,11 +20,6 @@ import com.saveourtool.frontend.common.externals.fontawesome.faTable import com.saveourtool.frontend.common.externals.fontawesome.faTrash import com.saveourtool.frontend.common.externals.i18next.useTranslation import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.CommentDto -import com.saveourtool.save.entities.cosv.VulnerabilityExt -import com.saveourtool.save.entities.vulnerability.VulnerabilityStatus -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.validation.FrontendCosvRoutes import js.core.jso import react.* diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityHistoryTab.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityHistoryTab.kt index 789151e83f..009f651819 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityHistoryTab.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityHistoryTab.kt @@ -2,13 +2,13 @@ package com.saveourtool.cosv.frontend.components.views.vuln +import com.saveourtool.common.entities.cosv.CosvFileDto +import com.saveourtool.common.utils.toUnixCalendarFormat import com.saveourtool.frontend.common.components.tables.* import com.saveourtool.frontend.common.components.tables.TABLE_HEADERS_LOCALE_NAMESPACE import com.saveourtool.frontend.common.components.tables.tableComponent import com.saveourtool.frontend.common.externals.i18next.useTranslation import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.cosv.CosvFileDto -import com.saveourtool.save.utils.toUnixCalendarFormat import react.* import react.dom.html.ReactHTML.td diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityInfoTab.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityInfoTab.kt index e7aea8187a..36d071c587 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityInfoTab.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityInfoTab.kt @@ -6,6 +6,15 @@ package com.saveourtool.cosv.frontend.components.views.vuln +import com.saveourtool.common.entities.cosv.VulnerabilityExt +import com.saveourtool.common.entities.vulnerability.VulnerabilityDateDto +import com.saveourtool.common.entities.vulnerability.VulnerabilityDateType +import com.saveourtool.common.entities.vulnerability.VulnerabilityProjectType +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.utils.ELLIPSIS +import com.saveourtool.common.utils.asTimelineEntry +import com.saveourtool.common.utils.getTimeline +import com.saveourtool.common.utils.listToShortString import com.saveourtool.cosv.frontend.components.views.vuln.component.timelineComponent import com.saveourtool.frontend.common.components.basic.carousel import com.saveourtool.frontend.common.components.modal.displayModal @@ -21,15 +30,6 @@ import com.saveourtool.frontend.common.externals.i18next.TranslationFunction import com.saveourtool.frontend.common.externals.i18next.useTranslation import com.saveourtool.frontend.common.utils.* import com.saveourtool.osv4k.Affected -import com.saveourtool.save.entities.cosv.VulnerabilityExt -import com.saveourtool.save.entities.vulnerability.VulnerabilityDateDto -import com.saveourtool.save.entities.vulnerability.VulnerabilityDateType -import com.saveourtool.save.entities.vulnerability.VulnerabilityProjectType -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.utils.ELLIPSIS -import com.saveourtool.save.utils.asTimelineEntry -import com.saveourtool.save.utils.getTimeline -import com.saveourtool.save.utils.listToShortString import react.* import react.dom.html.ReactHTML.div diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityProjectWindow.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityProjectWindow.kt index 42e32aed13..b1f33779b3 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityProjectWindow.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityProjectWindow.kt @@ -2,6 +2,10 @@ package com.saveourtool.cosv.frontend.components.views.vuln +import com.saveourtool.common.entities.vulnerability.VulnerabilityLanguage +import com.saveourtool.common.entities.vulnerability.VulnerabilityProjectType +import com.saveourtool.common.utils.PRETTY_DELIMITER +import com.saveourtool.common.validation.isValidUrl import com.saveourtool.frontend.common.components.inputform.InputTypes import com.saveourtool.frontend.common.components.inputform.inputTextFormOptional import com.saveourtool.frontend.common.components.inputform.inputTextFormRequired @@ -11,10 +15,6 @@ import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.WindowOpenness import com.saveourtool.frontend.common.utils.selectorBuilder import com.saveourtool.osv4k.* -import com.saveourtool.save.entities.vulnerability.VulnerabilityLanguage -import com.saveourtool.save.entities.vulnerability.VulnerabilityProjectType -import com.saveourtool.save.utils.PRETTY_DELIMITER -import com.saveourtool.save.validation.isValidUrl import react.FC import react.Props diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityRawDataTab.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityRawDataTab.kt index 0fed9968ad..b1a4910eb5 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityRawDataTab.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityRawDataTab.kt @@ -2,8 +2,8 @@ package com.saveourtool.cosv.frontend.components.views.vuln +import com.saveourtool.common.entities.cosv.VulnerabilityExt import com.saveourtool.frontend.common.externals.jsonview.reactJson -import com.saveourtool.save.entities.cosv.VulnerabilityExt import react.FC import react.Props diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityTagsComponent.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityTagsComponent.kt index d40663507d..1c6e4dea4c 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityTagsComponent.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityTagsComponent.kt @@ -2,15 +2,15 @@ package com.saveourtool.cosv.frontend.components.views.vuln +import com.saveourtool.common.entities.cosv.VulnerabilityExt +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.validation.FrontendCosvRoutes +import com.saveourtool.common.validation.isValidTag import com.saveourtool.frontend.common.externals.fontawesome.faPlus import com.saveourtool.frontend.common.externals.i18next.useTranslation import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.buttonBuilder import com.saveourtool.frontend.common.utils.useTooltip -import com.saveourtool.save.entities.cosv.VulnerabilityExt -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.validation.FrontendCosvRoutes -import com.saveourtool.save.validation.isValidTag import react.* import react.dom.html.ReactHTML.div diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityView.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityView.kt index 583c0ea410..dc6e64f966 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityView.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/VulnerabilityView.kt @@ -6,11 +6,11 @@ package com.saveourtool.cosv.frontend.components.views.vuln +import com.saveourtool.common.entities.cosv.VulnerabilityExt +import com.saveourtool.common.frontend.TabMenuBar +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.validation.FrontendCosvRoutes import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.cosv.VulnerabilityExt -import com.saveourtool.save.frontend.TabMenuBar -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.validation.FrontendCosvRoutes import js.core.jso import react.* diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/component/CosvFileManagerComponent.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/component/CosvFileManagerComponent.kt index 008e788076..986ecbf549 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/component/CosvFileManagerComponent.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/component/CosvFileManagerComponent.kt @@ -2,6 +2,19 @@ package com.saveourtool.cosv.frontend.components.views.vuln.component +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.entities.cosv.RawCosvFileDto +import com.saveourtool.common.entities.cosv.RawCosvFileDto.Companion.isDuplicate +import com.saveourtool.common.entities.cosv.RawCosvFileDto.Companion.isHasErrors +import com.saveourtool.common.entities.cosv.RawCosvFileDto.Companion.isPendingRemoved +import com.saveourtool.common.entities.cosv.RawCosvFileDto.Companion.isProcessing +import com.saveourtool.common.entities.cosv.RawCosvFileDto.Companion.isUploadedJsonFile +import com.saveourtool.common.entities.cosv.RawCosvFileDto.Companion.isZipArchive +import com.saveourtool.common.entities.cosv.RawCosvFileStatisticsDto +import com.saveourtool.common.entities.cosv.RawCosvFileStreamingResponse +import com.saveourtool.common.utils.FILE_PART_NAME +import com.saveourtool.common.utils.toKilobytes +import com.saveourtool.common.validation.isValidName import com.saveourtool.frontend.common.components.basic.fileuploader.defaultProgressBarComponent import com.saveourtool.frontend.common.components.basic.fileuploader.deleteFileButton import com.saveourtool.frontend.common.components.basic.fileuploader.downloadFileButton @@ -13,19 +26,6 @@ import com.saveourtool.frontend.common.externals.fontawesome.faReload import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.frontend.common.externals.i18next.useTranslation import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.OrganizationDto -import com.saveourtool.save.entities.cosv.RawCosvFileDto -import com.saveourtool.save.entities.cosv.RawCosvFileDto.Companion.isDuplicate -import com.saveourtool.save.entities.cosv.RawCosvFileDto.Companion.isHasErrors -import com.saveourtool.save.entities.cosv.RawCosvFileDto.Companion.isPendingRemoved -import com.saveourtool.save.entities.cosv.RawCosvFileDto.Companion.isProcessing -import com.saveourtool.save.entities.cosv.RawCosvFileDto.Companion.isUploadedJsonFile -import com.saveourtool.save.entities.cosv.RawCosvFileDto.Companion.isZipArchive -import com.saveourtool.save.entities.cosv.RawCosvFileStatisticsDto -import com.saveourtool.save.entities.cosv.RawCosvFileStreamingResponse -import com.saveourtool.save.utils.FILE_PART_NAME -import com.saveourtool.save.utils.toKilobytes -import com.saveourtool.save.validation.isValidName import js.core.asList import js.core.jso diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/component/CvssBaseScoreCalculator.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/component/CvssBaseScoreCalculator.kt index 8a62f2cda7..f15d5d6a3d 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/component/CvssBaseScoreCalculator.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/component/CvssBaseScoreCalculator.kt @@ -2,9 +2,9 @@ package com.saveourtool.cosv.frontend.components.views.vuln.component +import com.saveourtool.common.cvsscalculator.* +import com.saveourtool.common.cvsscalculator.v3.* import com.saveourtool.frontend.common.utils.buttonBuilder -import com.saveourtool.save.cvsscalculator.* -import com.saveourtool.save.cvsscalculator.v3.* import js.core.jso import react.ChildrenBuilder diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/component/TimelineComponent.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/component/TimelineComponent.kt index 54d7f8f3ba..a86a9068d3 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/component/TimelineComponent.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/component/TimelineComponent.kt @@ -2,10 +2,10 @@ package com.saveourtool.cosv.frontend.components.views.vuln.component +import com.saveourtool.common.entities.cosv.VulnerabilityExt +import com.saveourtool.common.entities.vulnerability.VulnerabilityDateDto import com.saveourtool.frontend.common.externals.i18next.useTranslation import com.saveourtool.frontend.common.utils.buttonBuilder -import com.saveourtool.save.entities.cosv.VulnerabilityExt -import com.saveourtool.save.entities.vulnerability.VulnerabilityDateDto import react.* import react.dom.html.ReactHTML.div diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/toprating/OrganizationRatingTab.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/toprating/OrganizationRatingTab.kt index 6469c76a1e..716ebef5ce 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/toprating/OrganizationRatingTab.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/toprating/OrganizationRatingTab.kt @@ -2,14 +2,14 @@ package com.saveourtool.cosv.frontend.components.views.vuln.toprating +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.filters.OrganizationFilter import com.saveourtool.frontend.common.components.basic.AVATAR_ORGANIZATION_PLACEHOLDER import com.saveourtool.frontend.common.components.basic.avatarRenderer import com.saveourtool.frontend.common.components.basic.table.filters.nameFiltersRow import com.saveourtool.frontend.common.components.tables.* import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.noopResponseHandler -import com.saveourtool.save.entities.OrganizationDto -import com.saveourtool.save.filters.OrganizationFilter import js.core.jso import react.* diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/toprating/TopRatingView.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/toprating/TopRatingView.kt index d3d48e11dc..e4191bd3e8 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/toprating/TopRatingView.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/toprating/TopRatingView.kt @@ -6,13 +6,13 @@ package com.saveourtool.cosv.frontend.components.views.vuln.toprating +import com.saveourtool.common.frontend.TabMenuBar +import com.saveourtool.common.validation.FrontendCosvRoutes import com.saveourtool.frontend.common.externals.fontawesome.faTrophy import com.saveourtool.frontend.common.utils.Style import com.saveourtool.frontend.common.utils.tab import com.saveourtool.frontend.common.utils.title import com.saveourtool.frontend.common.utils.useBackground -import com.saveourtool.save.frontend.TabMenuBar -import com.saveourtool.save.validation.FrontendCosvRoutes import react.FC import react.Props diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/toprating/UserRatingTab.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/toprating/UserRatingTab.kt index b5d87041c0..ca31cae481 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/toprating/UserRatingTab.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/vuln/toprating/UserRatingTab.kt @@ -2,12 +2,13 @@ package com.saveourtool.cosv.frontend.components.views.vuln.toprating +import com.saveourtool.common.info.UserInfo import com.saveourtool.frontend.common.components.basic.renderUserAvatarWithName import com.saveourtool.frontend.common.components.basic.table.filters.nameFiltersRow import com.saveourtool.frontend.common.components.tables.* import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.noopResponseHandler -import com.saveourtool.save.info.UserInfo + import react.* import react.dom.html.ReactHTML.div import react.dom.html.ReactHTML.td diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/welcome/VulnerabilityWelcomeView.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/welcome/VulnerabilityWelcomeView.kt index 21c3f979bc..6b0df55f95 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/welcome/VulnerabilityWelcomeView.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/welcome/VulnerabilityWelcomeView.kt @@ -11,6 +11,9 @@ package com.saveourtool.cosv.frontend.components.views.welcome +import com.saveourtool.common.filters.VulnerabilityFilter.Companion.approved +import com.saveourtool.common.info.OauthProviderInfo +import com.saveourtool.common.validation.FrontendCosvRoutes import com.saveourtool.cosv.frontend.components.views.welcome.pagers.vuln.renderVulnerabilityGeneralInfo import com.saveourtool.frontend.common.components.views.welcome.hrNoMargin import com.saveourtool.frontend.common.components.views.welcome.inputCredentialsView @@ -23,9 +26,6 @@ import com.saveourtool.frontend.common.themes.Colors import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.UserInfoAwarePropsWithChildren import com.saveourtool.frontend.common.utils.useBackground -import com.saveourtool.save.filters.VulnerabilityFilter.Companion.approved -import com.saveourtool.save.info.OauthProviderInfo -import com.saveourtool.save.validation.FrontendCosvRoutes import js.core.jso import org.w3c.fetch.Headers diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/welcome/pagers/vuln/WhatIsVuln.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/welcome/pagers/vuln/WhatIsVuln.kt index 59080b9624..bb03e616aa 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/welcome/pagers/vuln/WhatIsVuln.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/components/views/welcome/pagers/vuln/WhatIsVuln.kt @@ -4,11 +4,12 @@ package com.saveourtool.cosv.frontend.components.views.welcome.pagers.vuln +import com.saveourtool.common.validation.FrontendCosvRoutes import com.saveourtool.cosv.frontend.components.views.welcome.BIG_FONT_SIZE import com.saveourtool.cosv.frontend.components.views.welcome.FIRST_RAW_HEIGHT import com.saveourtool.cosv.frontend.components.views.welcome.SECOND_RAW_HEIGHT import com.saveourtool.frontend.common.externals.i18next.TranslationFunction -import com.saveourtool.save.validation.FrontendCosvRoutes + import js.core.jso import react.ChildrenBuilder import react.dom.html.ReactHTML.div diff --git a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/routing/BasicRouting.kt b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/routing/BasicRouting.kt index 50707789c1..9f6ca22d66 100644 --- a/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/routing/BasicRouting.kt +++ b/cosv-frontend/src/main/kotlin/com/saveourtool/cosv/frontend/routing/BasicRouting.kt @@ -6,6 +6,8 @@ package com.saveourtool.cosv.frontend.routing +import com.saveourtool.common.validation.FrontendCosvRoutes.* +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.cosv.frontend.components.basic.CosvOrganizationType import com.saveourtool.cosv.frontend.components.views.vuln.* import com.saveourtool.cosv.frontend.components.views.vuln.toprating.topRatingView @@ -20,8 +22,6 @@ import com.saveourtool.frontend.common.components.views.userprofile.userProfileV import com.saveourtool.frontend.common.components.views.usersettings.userSettingsView import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.withRouter -import com.saveourtool.save.validation.FrontendCosvRoutes.* -import com.saveourtool.save.validation.FrontendRoutes import org.w3c.dom.url.URLSearchParams import react.* diff --git a/frontend-common/build.gradle.kts b/frontend-common/build.gradle.kts index 58353bf8b3..f8c80e855f 100644 --- a/frontend-common/build.gradle.kts +++ b/frontend-common/build.gradle.kts @@ -17,7 +17,7 @@ rootProject.plugins.withType { } dependencies { - implementation(projects.saveCloudCommon) + implementation(projects.common) implementation(enforcedPlatform(libs.kotlin.wrappers.bom)) implementation("org.jetbrains.kotlin-wrappers:kotlin-react") diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/AddUserComponent.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/AddUserComponent.kt index 1c2960adfb..0418f66930 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/AddUserComponent.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/AddUserComponent.kt @@ -2,11 +2,12 @@ package com.saveourtool.frontend.common.components.basic +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.utils.DATABASE_DELIMITER import com.saveourtool.frontend.common.components.inputform.inputWithDebounceForUserInfo import com.saveourtool.frontend.common.components.inputform.renderUserWithAvatar import com.saveourtool.frontend.common.utils.apiUrl -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.utils.DATABASE_DELIMITER + import react.FC import react.Props import react.dom.html.ReactHTML.div diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/AvatarRenderers.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/AvatarRenderers.kt index 574987fb11..31463d29a3 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/AvatarRenderers.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/AvatarRenderers.kt @@ -4,13 +4,13 @@ package com.saveourtool.frontend.common.components.basic +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.entities.OrganizationStatus +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.info.UserStatus +import com.saveourtool.common.v1 +import com.saveourtool.common.validation.FrontendCosvRoutes import com.saveourtool.frontend.common.utils.AVATAR_PROFILE_PLACEHOLDER -import com.saveourtool.save.entities.OrganizationDto -import com.saveourtool.save.entities.OrganizationStatus -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.info.UserStatus -import com.saveourtool.save.v1 -import com.saveourtool.save.validation.FrontendCosvRoutes import js.core.jso import react.CSSProperties diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/CookieBanner.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/CookieBanner.kt index 987900f3f8..96dc8d730b 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/CookieBanner.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/CookieBanner.kt @@ -2,6 +2,7 @@ package com.saveourtool.frontend.common.components.basic +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.components.modal.MAX_Z_INDEX import com.saveourtool.frontend.common.externals.cookie.acceptCookies import com.saveourtool.frontend.common.externals.cookie.cookie @@ -9,7 +10,7 @@ import com.saveourtool.frontend.common.externals.cookie.declineCookies import com.saveourtool.frontend.common.externals.cookie.isAccepted import com.saveourtool.frontend.common.externals.i18next.useTranslation import com.saveourtool.frontend.common.utils.buttonBuilder -import com.saveourtool.save.validation.FrontendRoutes + import js.core.jso import react.FC import react.Props diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/Forum.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/Forum.kt index 145c470f8b..c74ba82ef9 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/Forum.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/Forum.kt @@ -2,16 +2,16 @@ package com.saveourtool.frontend.common.components.basic +import com.saveourtool.common.entities.CommentDto +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.utils.toUnixCalendarFormat +import com.saveourtool.common.validation.FrontendCosvRoutes import com.saveourtool.frontend.common.components.inputform.InputTypes import com.saveourtool.frontend.common.externals.fontawesome.faPaperPlane import com.saveourtool.frontend.common.externals.fontawesome.faTimes import com.saveourtool.frontend.common.externals.i18next.TranslationFunction import com.saveourtool.frontend.common.externals.i18next.useTranslation import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.CommentDto -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.utils.toUnixCalendarFormat -import com.saveourtool.save.validation.FrontendCosvRoutes import js.core.jso import react.ChildrenBuilder diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/LanguageSelector.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/LanguageSelector.kt index 82253d16b8..6397f2b960 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/LanguageSelector.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/LanguageSelector.kt @@ -2,13 +2,13 @@ package com.saveourtool.frontend.common.components.basic +import com.saveourtool.common.frontend.PlatformLanguages import com.saveourtool.frontend.common.externals.cookie.cookie import com.saveourtool.frontend.common.externals.cookie.getLanguageCode import com.saveourtool.frontend.common.externals.cookie.isAccepted import com.saveourtool.frontend.common.externals.i18next.changeLanguage import com.saveourtool.frontend.common.externals.i18next.language import com.saveourtool.frontend.common.externals.i18next.useTranslation -import com.saveourtool.save.frontend.PlatformLanguages import js.core.jso import react.FC diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/ManageUserRoleCard.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/ManageUserRoleCard.kt index 45a5bf3359..4bb908e967 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/ManageUserRoleCard.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/ManageUserRoleCard.kt @@ -6,15 +6,15 @@ package com.saveourtool.frontend.common.components.basic +import com.saveourtool.common.domain.Role +import com.saveourtool.common.domain.Role.OWNER +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.permission.SetRoleRequest +import com.saveourtool.common.utils.getHighestRole import com.saveourtool.frontend.common.components.inputform.inputWithDebounceForUserInfo import com.saveourtool.frontend.common.components.inputform.renderUserWithAvatar import com.saveourtool.frontend.common.externals.fontawesome.faTimesCircle import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.domain.Role -import com.saveourtool.save.domain.Role.OWNER -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.permission.SetRoleRequest -import com.saveourtool.save.utils.getHighestRole import js.core.jso import react.* diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/TestSuitesDisplayer.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/TestSuitesDisplayer.kt index ac76be65d7..988a8a428b 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/TestSuitesDisplayer.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/TestSuitesDisplayer.kt @@ -7,8 +7,8 @@ package com.saveourtool.frontend.common.components.basic +import com.saveourtool.common.testsuite.TestSuiteVersioned import com.saveourtool.frontend.common.components.basic.testsuiteselector.TestSuiteSelectorMode -import com.saveourtool.save.testsuite.TestSuiteVersioned import react.ChildrenBuilder import react.dom.html.ReactHTML.a diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/UserBoard.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/UserBoard.kt index 6ac70a7602..cb5e63b522 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/UserBoard.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/UserBoard.kt @@ -6,8 +6,8 @@ package com.saveourtool.frontend.common.components.basic -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.validation.FrontendCosvRoutes +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.validation.FrontendCosvRoutes import react.FC import react.Props diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/ContestCreationComponent.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/ContestCreationComponent.kt index c943e22b82..360d938049 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/ContestCreationComponent.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/ContestCreationComponent.kt @@ -2,6 +2,9 @@ package com.saveourtool.frontend.common.components.basic.contests +import com.saveourtool.common.entities.contest.ContestDto +import com.saveourtool.common.validation.FrontendRoutes +import com.saveourtool.common.validation.isValidName import com.saveourtool.frontend.common.components.basic.* import com.saveourtool.frontend.common.components.basic.testsuiteselector.showContestTestSuitesSelectorModal import com.saveourtool.frontend.common.components.inputform.* @@ -11,9 +14,6 @@ import com.saveourtool.frontend.common.components.modal.modal import com.saveourtool.frontend.common.externals.modal.Styles import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.noopLoadingHandler -import com.saveourtool.save.entities.contest.ContestDto -import com.saveourtool.save.validation.FrontendRoutes -import com.saveourtool.save.validation.isValidName import org.w3c.fetch.Response import react.* diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/ContestInfoMenu.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/ContestInfoMenu.kt index 9d46fdaa3f..bccad3a4f8 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/ContestInfoMenu.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/ContestInfoMenu.kt @@ -2,10 +2,10 @@ package com.saveourtool.frontend.common.components.basic.contests +import com.saveourtool.common.entities.contest.ContestDto import com.saveourtool.frontend.common.components.basic.cardComponent import com.saveourtool.frontend.common.components.basic.markdown import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.contest.ContestDto import react.* import react.dom.html.ReactHTML.div diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/ContestSubmissionsMenu.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/ContestSubmissionsMenu.kt index b3f5e550c7..c9dda1e56f 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/ContestSubmissionsMenu.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/ContestSubmissionsMenu.kt @@ -2,13 +2,13 @@ package com.saveourtool.frontend.common.components.basic.contests +import com.saveourtool.common.entities.contest.ContestResult +import com.saveourtool.common.execution.ExecutionStatus import com.saveourtool.frontend.common.components.tables.TableProps import com.saveourtool.frontend.common.components.tables.columns import com.saveourtool.frontend.common.components.tables.tableComponent import com.saveourtool.frontend.common.components.tables.value import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.contest.ContestResult -import com.saveourtool.save.execution.ExecutionStatus import react.* import react.dom.html.ReactHTML.div diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/ContestSummaryMenu.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/ContestSummaryMenu.kt index 7a5cd23c4f..f53a65a102 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/ContestSummaryMenu.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/ContestSummaryMenu.kt @@ -2,8 +2,8 @@ package com.saveourtool.frontend.common.components.basic.contests +import com.saveourtool.common.entities.contest.ContestResult import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.contest.ContestResult import react.* import react.dom.html.ReactHTML.div diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/PublicTestCardComponent.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/PublicTestCardComponent.kt index 6d79b36740..b429da1ea0 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/PublicTestCardComponent.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/contests/PublicTestCardComponent.kt @@ -2,11 +2,11 @@ package com.saveourtool.frontend.common.components.basic.contests +import com.saveourtool.common.test.TestFilesContent +import com.saveourtool.common.testsuite.TestSuiteVersioned import com.saveourtool.frontend.common.components.basic.* import com.saveourtool.frontend.common.externals.markdown.reactMarkdown import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.test.TestFilesContent -import com.saveourtool.save.testsuite.TestSuiteVersioned import js.core.jso import react.* diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/table/filters/VulnerabilitiesFiltersRow.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/table/filters/VulnerabilitiesFiltersRow.kt index 56c640a2f5..78fa789a15 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/table/filters/VulnerabilitiesFiltersRow.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/table/filters/VulnerabilitiesFiltersRow.kt @@ -2,6 +2,12 @@ package com.saveourtool.frontend.common.components.basic.table.filters +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.entities.vulnerability.VulnerabilityLanguage +import com.saveourtool.common.entities.vulnerability.VulnerabilityStatus +import com.saveourtool.common.filters.VulnerabilityFilter +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.validation.FrontendCosvRoutes import com.saveourtool.frontend.common.components.inputform.* import com.saveourtool.frontend.common.components.inputform.renderUserWithAvatar import com.saveourtool.frontend.common.components.tables.TABLE_HEADERS_LOCALE_NAMESPACE @@ -11,12 +17,6 @@ import com.saveourtool.frontend.common.externals.i18next.useTranslation import com.saveourtool.frontend.common.externals.slider.multiRangeSlider import com.saveourtool.frontend.common.themes.Colors import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.OrganizationDto -import com.saveourtool.save.entities.vulnerability.VulnerabilityLanguage -import com.saveourtool.save.entities.vulnerability.VulnerabilityStatus -import com.saveourtool.save.filters.VulnerabilityFilter -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.validation.FrontendCosvRoutes import js.core.jso import react.* diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuiteselector/TestSuiteSelector.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuiteselector/TestSuiteSelector.kt index 0de4a295f1..7067ab69e9 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuiteselector/TestSuiteSelector.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuiteselector/TestSuiteSelector.kt @@ -6,13 +6,13 @@ package com.saveourtool.frontend.common.components.basic.testsuiteselector +import com.saveourtool.common.testsuite.TestSuiteVersioned import com.saveourtool.frontend.common.components.modal.largeTransparentModalStyle import com.saveourtool.frontend.common.components.modal.modal import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.utils.WindowOpenness import com.saveourtool.frontend.common.utils.buttonWithIcon import com.saveourtool.frontend.common.utils.useTooltip -import com.saveourtool.save.testsuite.TestSuiteVersioned import react.* import react.dom.aria.ariaLabel diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuiteselector/TestSuiteSelectorBrowserMode.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuiteselector/TestSuiteSelectorBrowserMode.kt index b692e0669c..f36d549df7 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuiteselector/TestSuiteSelectorBrowserMode.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuiteselector/TestSuiteSelectorBrowserMode.kt @@ -6,12 +6,12 @@ package com.saveourtool.frontend.common.components.basic.testsuiteselector +import com.saveourtool.common.testsuite.TestSuiteVersioned import com.saveourtool.frontend.common.components.basic.showAvailableTestSuites import com.saveourtool.frontend.common.externals.fontawesome.faCheckDouble import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.noopResponseHandler -import com.saveourtool.save.testsuite.TestSuiteVersioned import react.* import react.dom.aria.AriaRole diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuiteselector/TestSuiteSelectorManagerMode.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuiteselector/TestSuiteSelectorManagerMode.kt index 80829007a7..63def2ca6c 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuiteselector/TestSuiteSelectorManagerMode.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuiteselector/TestSuiteSelectorManagerMode.kt @@ -6,9 +6,9 @@ package com.saveourtool.frontend.common.components.basic.testsuiteselector +import com.saveourtool.common.testsuite.TestSuiteVersioned import com.saveourtool.frontend.common.components.basic.showAvailableTestSuites import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.testsuite.TestSuiteVersioned import react.FC import react.Props diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuiteselector/TestSuiteSelectorSearchMode.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuiteselector/TestSuiteSelectorSearchMode.kt index ac882e186b..e245936fe6 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuiteselector/TestSuiteSelectorSearchMode.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuiteselector/TestSuiteSelectorSearchMode.kt @@ -6,13 +6,13 @@ package com.saveourtool.frontend.common.components.basic.testsuiteselector +import com.saveourtool.common.filters.TestSuiteFilter +import com.saveourtool.common.testsuite.TestSuiteVersioned +import com.saveourtool.common.utils.DEFAULT_DEBOUNCE_PERIOD import com.saveourtool.frontend.common.components.basic.showAvailableTestSuites import com.saveourtool.frontend.common.components.basic.testsuiteselector.TestSuiteSelectorPurpose.CONTEST import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.noopResponseHandler -import com.saveourtool.save.filters.TestSuiteFilter -import com.saveourtool.save.testsuite.TestSuiteVersioned -import com.saveourtool.save.utils.DEFAULT_DEBOUNCE_PERIOD import react.* import react.dom.events.ChangeEvent diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuitespermissions/ManageTestSuitePermissionsCard.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuitespermissions/ManageTestSuitePermissionsCard.kt index b1e3c62710..4d9c9d9275 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuitespermissions/ManageTestSuitePermissionsCard.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuitespermissions/ManageTestSuitePermissionsCard.kt @@ -6,6 +6,10 @@ package com.saveourtool.frontend.common.components.basic.testsuitespermissions +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.permission.Rights +import com.saveourtool.common.permission.SetRightsRequest +import com.saveourtool.common.testsuite.TestSuiteVersioned import com.saveourtool.frontend.common.components.basic.testsuiteselector.TestSuiteSelectorPurpose import com.saveourtool.frontend.common.components.basic.testsuiteselector.testSuiteSelector import com.saveourtool.frontend.common.components.basic.testsuitespermissions.PermissionManagerMode.MESSAGE @@ -19,10 +23,6 @@ import com.saveourtool.frontend.common.components.modal.largeTransparentModalSty import com.saveourtool.frontend.common.components.modal.modal import com.saveourtool.frontend.common.components.modal.modalBuilder import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.OrganizationDto -import com.saveourtool.save.permission.Rights -import com.saveourtool.save.permission.SetRightsRequest -import com.saveourtool.save.testsuite.TestSuiteVersioned import react.* import react.dom.html.ReactHTML.div diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuitessources/TestSuiteSourceUpsertComponent.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuitessources/TestSuiteSourceUpsertComponent.kt index abca5e0984..3993a52b04 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuitessources/TestSuiteSourceUpsertComponent.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuitessources/TestSuiteSourceUpsertComponent.kt @@ -2,6 +2,10 @@ package com.saveourtool.frontend.common.components.basic.testsuitessources +import com.saveourtool.common.domain.EntitySaveStatus +import com.saveourtool.common.entities.GitDto +import com.saveourtool.common.testsuite.TestSuitesSourceDto +import com.saveourtool.common.v1 import com.saveourtool.frontend.common.components.basic.selectFormRequired import com.saveourtool.frontend.common.components.inputform.InputTypes import com.saveourtool.frontend.common.components.inputform.inputTextDisabled @@ -13,10 +17,6 @@ import com.saveourtool.frontend.common.externals.fontawesome.faTimesCircle import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.frontend.common.externals.modal.Styles import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.domain.EntitySaveStatus -import com.saveourtool.save.entities.GitDto -import com.saveourtool.save.testsuite.TestSuitesSourceDto -import com.saveourtool.save.v1 import react.* import react.dom.aria.AriaRole @@ -256,7 +256,7 @@ private fun prepareRequest( ) = useDeferredRequest { val (_, setEntitySaveStatus) = entitySaveStatusState val response = post( - url = "/api/$v1/test-suites-sources/${id?.let { "update?id=$it" } ?: "create"}", + url = "/api/${com.saveourtool.common.v1}/test-suites-sources/${id?.let { "update?id=$it" } ?: "create"}", headers = jsonHeaders, body = testSuiteSource.toJsonBody(), loadingHandler = ::loadingHandler, diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuitessources/fetch/TestSuitesSourceFetcher.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuitessources/fetch/TestSuitesSourceFetcher.kt index aa297baf35..4b23453aaf 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuitessources/fetch/TestSuitesSourceFetcher.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/basic/testsuitessources/fetch/TestSuitesSourceFetcher.kt @@ -6,6 +6,8 @@ package com.saveourtool.frontend.common.components.basic.testsuitessources.fetch +import com.saveourtool.common.testsuite.TestSuitesSourceDto +import com.saveourtool.common.testsuite.TestSuitesSourceFetchMode import com.saveourtool.frontend.common.components.basic.selectFormRequired import com.saveourtool.frontend.common.components.inputform.InputTypes import com.saveourtool.frontend.common.components.inputform.inputTextFormRequired @@ -14,8 +16,6 @@ import com.saveourtool.frontend.common.components.modal.modal import com.saveourtool.frontend.common.components.modal.modalBuilder import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.testsuite.TestSuitesSourceDto -import com.saveourtool.save.testsuite.TestSuitesSourceFetchMode import js.core.jso import react.* diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/inputform/InputForms.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/inputform/InputForms.kt index 5fdeb2ae5f..8659b70926 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/inputform/InputForms.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/inputform/InputForms.kt @@ -6,7 +6,7 @@ package com.saveourtool.frontend.common.components.inputform -import com.saveourtool.save.validation.* +import com.saveourtool.common.validation.* private const val URL_PLACEHOLDER = "https://example.com" private const val PURL_PLACEHOLDER = "pkg:example/example.com/version@v1.0.0" diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/inputform/InputWithDebounce.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/inputform/InputWithDebounce.kt index ae179ab63a..a04965c106 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/inputform/InputWithDebounce.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/inputform/InputWithDebounce.kt @@ -2,11 +2,11 @@ package com.saveourtool.frontend.common.components.inputform +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.utils.DEFAULT_DEBOUNCE_PERIOD import com.saveourtool.frontend.common.components.basic.renderAvatar import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.OrganizationDto -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.utils.DEFAULT_DEBOUNCE_PERIOD import js.core.jso import org.w3c.fetch.Response diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/RegistrationView.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/RegistrationView.kt index af53e2d067..13a9170458 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/RegistrationView.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/RegistrationView.kt @@ -6,6 +6,16 @@ package com.saveourtool.frontend.common.components.views +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.info.UserStatus +import com.saveourtool.common.utils.AVATARS_PACKS_DIR +import com.saveourtool.common.utils.AvatarType +import com.saveourtool.common.utils.CONTENT_LENGTH_CUSTOM +import com.saveourtool.common.utils.FILE_PART_NAME +import com.saveourtool.common.validation.FrontendRoutes +import com.saveourtool.common.validation.isValidLengthName +import com.saveourtool.common.validation.isValidName +import com.saveourtool.common.validation.isValidUrl import com.saveourtool.frontend.common.components.basic.avatarForm import com.saveourtool.frontend.common.components.basic.avatarRenderer import com.saveourtool.frontend.common.components.inputform.InputTypes @@ -15,16 +25,6 @@ import com.saveourtool.frontend.common.components.modal.MAX_Z_INDEX import com.saveourtool.frontend.common.components.views.usersettings.AVATAR_TITLE import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.UserInfoAwareMutablePropsWithChildren -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.info.UserStatus -import com.saveourtool.save.utils.AVATARS_PACKS_DIR -import com.saveourtool.save.utils.AvatarType -import com.saveourtool.save.utils.CONTENT_LENGTH_CUSTOM -import com.saveourtool.save.utils.FILE_PART_NAME -import com.saveourtool.save.validation.FrontendRoutes -import com.saveourtool.save.validation.isValidLengthName -import com.saveourtool.save.validation.isValidName -import com.saveourtool.save.validation.isValidUrl import js.core.jso import org.w3c.fetch.Headers diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/ThanksForRegistrationView.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/ThanksForRegistrationView.kt index e6e5187817..18ddfc21ca 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/ThanksForRegistrationView.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/ThanksForRegistrationView.kt @@ -6,9 +6,10 @@ package com.saveourtool.frontend.common.components.views +import com.saveourtool.common.info.UserStatus import com.saveourtool.frontend.common.externals.i18next.useTranslation import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.info.UserStatus + import js.core.jso import react.FC import react.dom.html.ReactHTML.a diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/CreateOrganizationView.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/CreateOrganizationView.kt index 5756b2d972..48c54a55c7 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/CreateOrganizationView.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/CreateOrganizationView.kt @@ -6,15 +6,15 @@ package com.saveourtool.frontend.common.components.views.organization +import com.saveourtool.common.entities.* +import com.saveourtool.common.validation.FrontendRoutes +import com.saveourtool.common.validation.isValidLengthName import com.saveourtool.frontend.common.components.basic.AVATAR_ORGANIZATION_PLACEHOLDER import com.saveourtool.frontend.common.components.inputform.InputTypes import com.saveourtool.frontend.common.components.inputform.inputTextFormRequired import com.saveourtool.frontend.common.components.modal.displayModal import com.saveourtool.frontend.common.components.modal.mediumTransparentModalStyle import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.* -import com.saveourtool.save.validation.FrontendRoutes -import com.saveourtool.save.validation.isValidLengthName import js.core.jso import react.* diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/GitWindow.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/GitWindow.kt index 53bff35a43..9008eb0813 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/GitWindow.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/GitWindow.kt @@ -6,11 +6,11 @@ package com.saveourtool.frontend.common.components.views.organization +import com.saveourtool.common.entities.GitDto import com.saveourtool.frontend.common.components.modal.displayModal import com.saveourtool.frontend.common.components.modal.modal import com.saveourtool.frontend.common.components.modal.smallTransparentModalStyle import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.GitDto import react.* import react.dom.html.ReactHTML.button diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/ManageGitCredentialsCard.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/ManageGitCredentialsCard.kt index 030e75221e..e556502e9e 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/ManageGitCredentialsCard.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/ManageGitCredentialsCard.kt @@ -6,14 +6,14 @@ package com.saveourtool.frontend.common.components.views.organization +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.GitDto +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.utils.getHighestRole import com.saveourtool.frontend.common.components.modal.displayModal import com.saveourtool.frontend.common.components.modal.mediumTransparentModalStyle import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.GitDto -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.utils.getHighestRole import js.core.jso import org.w3c.fetch.Response diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationContestsMenu.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationContestsMenu.kt index 886f606bcc..91586a1a8b 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationContestsMenu.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationContestsMenu.kt @@ -6,6 +6,9 @@ package com.saveourtool.frontend.common.components.views.organization +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.contest.ContestDto +import com.saveourtool.common.entities.contest.ContestStatus import com.saveourtool.frontend.common.components.basic.contests.showContestCreationModal import com.saveourtool.frontend.common.components.tables.TableProps import com.saveourtool.frontend.common.components.tables.columns @@ -14,9 +17,6 @@ import com.saveourtool.frontend.common.components.tables.value import com.saveourtool.frontend.common.externals.fontawesome.faPlus import com.saveourtool.frontend.common.externals.fontawesome.faTrash import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.contest.ContestDto -import com.saveourtool.save.entities.contest.ContestStatus import org.w3c.fetch.Response import react.* diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationSettingsMenu.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationSettingsMenu.kt index 21d0a8d77b..5f349b2285 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationSettingsMenu.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationSettingsMenu.kt @@ -2,21 +2,20 @@ package com.saveourtool.frontend.common.components.views.organization +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.entities.OrganizationStatus +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.components.basic.manageUserRoleCardComponent import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.isSuperAdmin import com.saveourtool.frontend.common.utils.noopLoadingHandler import com.saveourtool.frontend.common.utils.noopResponseHandler -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.OrganizationDto -import com.saveourtool.save.entities.OrganizationStatus -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.validation.FrontendRoutes import org.w3c.fetch.Response import react.* import react.dom.html.ReactHTML.div -import react.dom.html.ReactHTML.label import react.router.useNavigate import web.cssom.ClassName diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationTestsMenu.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationTestsMenu.kt index b2af8c8210..7f9ca4ff1b 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationTestsMenu.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationTestsMenu.kt @@ -7,6 +7,9 @@ package com.saveourtool.frontend.common.components.views.organization +import com.saveourtool.common.domain.Role +import com.saveourtool.common.test.* +import com.saveourtool.common.testsuite.* import com.saveourtool.frontend.common.components.basic.testsuitespermissions.PermissionManagerMode import com.saveourtool.frontend.common.components.basic.testsuitespermissions.manageTestSuitePermissionsComponent import com.saveourtool.frontend.common.components.basic.testsuitessources.fetch.testSuitesSourceFetcher @@ -16,9 +19,6 @@ import com.saveourtool.frontend.common.utils.WithRequestStatusContext import com.saveourtool.frontend.common.utils.loadingHandler import com.saveourtool.frontend.common.utils.useTooltip import com.saveourtool.frontend.common.utils.useWindowOpenness -import com.saveourtool.save.domain.Role -import com.saveourtool.save.test.* -import com.saveourtool.save.testsuite.* import react.* import react.dom.html.ReactHTML.div diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationToolsMenu.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationToolsMenu.kt index 627b102547..839263c7ea 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationToolsMenu.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationToolsMenu.kt @@ -2,6 +2,12 @@ package com.saveourtool.frontend.common.components.views.organization +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.entities.ProjectDto +import com.saveourtool.common.entities.ProjectStatus +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.components.basic.scoreCard import com.saveourtool.frontend.common.components.tables.TableProps import com.saveourtool.frontend.common.components.tables.columns @@ -15,12 +21,6 @@ import com.saveourtool.frontend.common.externals.fontawesome.faTrashAlt import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.isSuperAdmin -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.OrganizationDto -import com.saveourtool.save.entities.ProjectDto -import com.saveourtool.save.entities.ProjectStatus -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.validation.FrontendRoutes import org.w3c.fetch.Response import react.* diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationView.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationView.kt index c99dc75b89..657b952807 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationView.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/OrganizationView.kt @@ -4,16 +4,16 @@ package com.saveourtool.frontend.common.components.views.organization +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.entities.ProjectDto +import com.saveourtool.common.entities.ProjectStatus +import com.saveourtool.common.filters.ProjectFilter +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.utils.getHighestRole import com.saveourtool.frontend.common.components.basic.AVATAR_ORGANIZATION_PLACEHOLDER import com.saveourtool.frontend.common.components.basic.avatarRenderer import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.OrganizationDto -import com.saveourtool.save.entities.ProjectDto -import com.saveourtool.save.entities.ProjectStatus -import com.saveourtool.save.filters.ProjectFilter -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.utils.getHighestRole import js.core.jso import org.w3c.fetch.Headers diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/RenderAdminTab.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/RenderAdminTab.kt index d0310a4929..31544f40c2 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/RenderAdminTab.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/RenderAdminTab.kt @@ -2,7 +2,7 @@ package com.saveourtool.frontend.common.components.views.organization -import com.saveourtool.save.entities.OrganizationDto +import com.saveourtool.common.entities.OrganizationDto import react.FC import react.Props import react.dom.html.ReactHTML.div diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/RenderInfoTab.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/RenderInfoTab.kt index d32dd9cbe4..2dea5a3977 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/RenderInfoTab.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/RenderInfoTab.kt @@ -4,15 +4,15 @@ package com.saveourtool.frontend.common.components.views.organization +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.info.UserInfo import com.saveourtool.frontend.common.components.basic.userBoard import com.saveourtool.frontend.common.externals.fontawesome.faCheck import com.saveourtool.frontend.common.externals.fontawesome.faEdit import com.saveourtool.frontend.common.externals.fontawesome.faTimesCircle import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.OrganizationDto -import com.saveourtool.save.info.UserInfo import js.core.jso import react.* diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/RenderOrganizationMenuBar.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/RenderOrganizationMenuBar.kt index 546c996688..11dd710282 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/RenderOrganizationMenuBar.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/RenderOrganizationMenuBar.kt @@ -4,15 +4,15 @@ package com.saveourtool.frontend.common.components.views.organization +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.utils.AvatarType +import com.saveourtool.common.utils.CONTENT_LENGTH_CUSTOM +import com.saveourtool.common.utils.FILE_PART_NAME import com.saveourtool.frontend.common.components.basic.AVATAR_ORGANIZATION_PLACEHOLDER import com.saveourtool.frontend.common.components.basic.avatarForm import com.saveourtool.frontend.common.components.views.usersettings.AVATAR_TITLE import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.OrganizationDto -import com.saveourtool.save.utils.AvatarType -import com.saveourtool.save.utils.CONTENT_LENGTH_CUSTOM -import com.saveourtool.save.utils.FILE_PART_NAME import js.core.jso import org.w3c.fetch.Headers diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/RenderVulnerabilitiesTab.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/RenderVulnerabilitiesTab.kt index 3738d3d74c..e3e72997d2 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/RenderVulnerabilitiesTab.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/RenderVulnerabilitiesTab.kt @@ -4,9 +4,9 @@ package com.saveourtool.frontend.common.components.views.organization +import com.saveourtool.common.domain.Role +import com.saveourtool.common.info.UserInfo import com.saveourtool.frontend.common.components.views.vuln.vulnerabilityTableComponent -import com.saveourtool.save.domain.Role -import com.saveourtool.save.info.UserInfo import react.FC import react.Props diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/TestSuitesSourcesDisplayer.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/TestSuitesSourcesDisplayer.kt index 0b07eef68b..bf876441d8 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/TestSuitesSourcesDisplayer.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/organization/TestSuitesSourcesDisplayer.kt @@ -7,12 +7,12 @@ package com.saveourtool.frontend.common.components.views.organization +import com.saveourtool.common.test.TestsSourceVersionInfo +import com.saveourtool.common.test.TestsSourceVersionInfoList +import com.saveourtool.common.testsuite.* +import com.saveourtool.common.utils.prettyPrint import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.utils.buttonBuilder -import com.saveourtool.save.test.TestsSourceVersionInfo -import com.saveourtool.save.test.TestsSourceVersionInfoList -import com.saveourtool.save.testsuite.* -import com.saveourtool.save.utils.prettyPrint import js.core.jso import react.ChildrenBuilder diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/userprofile/UserProfileNewUsersTab.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/userprofile/UserProfileNewUsersTab.kt index e60bead3e8..ed44ca5a45 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/userprofile/UserProfileNewUsersTab.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/userprofile/UserProfileNewUsersTab.kt @@ -2,13 +2,14 @@ package com.saveourtool.frontend.common.components.views.userprofile +import com.saveourtool.common.info.UserInfo import com.saveourtool.frontend.common.components.basic.renderUserAvatarWithName import com.saveourtool.frontend.common.components.tables.TableProps import com.saveourtool.frontend.common.components.tables.columns import com.saveourtool.frontend.common.components.tables.tableComponent import com.saveourtool.frontend.common.components.tables.value import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.info.UserInfo + import react.FC import react.Fragment import react.Props diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/userprofile/UserProfileView.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/userprofile/UserProfileView.kt index b5417fba3d..cf83821b12 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/userprofile/UserProfileView.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/userprofile/UserProfileView.kt @@ -4,6 +4,12 @@ package com.saveourtool.frontend.common.components.views.userprofile +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.frontend.TabMenuBar +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.info.UserStatus +import com.saveourtool.common.utils.* +import com.saveourtool.common.validation.FrontendCosvRoutes import com.saveourtool.frontend.common.components.basic.renderAvatar import com.saveourtool.frontend.common.components.basic.renderOrganizationAvatar import com.saveourtool.frontend.common.components.inputform.InputTypes @@ -12,12 +18,6 @@ import com.saveourtool.frontend.common.components.modal.mediumTransparentModalSt import com.saveourtool.frontend.common.components.views.vuln.vulnerabilityTableComponent import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.OrganizationDto -import com.saveourtool.save.frontend.TabMenuBar -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.info.UserStatus -import com.saveourtool.save.utils.* -import com.saveourtool.save.validation.FrontendCosvRoutes import js.core.jso import react.* diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/SettingsView.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/SettingsView.kt index d208dd0309..6821a667af 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/SettingsView.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/SettingsView.kt @@ -6,12 +6,12 @@ package com.saveourtool.frontend.common.components.views.usersettings +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.components.inputform.InputTypes import com.saveourtool.frontend.common.components.modal.modal import com.saveourtool.frontend.common.components.views.usersettings.right.SettingsInputFields import com.saveourtool.frontend.common.externals.i18next.TranslationFunction import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.validation.FrontendRoutes import js.core.jso import react.* diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/SettingsViewLeftColumn.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/SettingsViewLeftColumn.kt index 5d64973476..c522fdbf40 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/SettingsViewLeftColumn.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/SettingsViewLeftColumn.kt @@ -4,13 +4,14 @@ package com.saveourtool.frontend.common.components.views.usersettings +import com.saveourtool.common.validation.FrontendCosvRoutes import com.saveourtool.frontend.common.components.basic.avatarRenderer import com.saveourtool.frontend.common.components.views.userprofile.shortenLoginWithTooltipIfNecessary import com.saveourtool.frontend.common.components.views.userprofile.shortenRealNameWithTooltipIfNecessary import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.externals.i18next.useTranslation import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.validation.FrontendCosvRoutes + import js.core.jso import react.* import react.dom.html.ReactHTML.div diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/SettingsViewRightColumn.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/SettingsViewRightColumn.kt index 272d7a08cf..c341529e41 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/SettingsViewRightColumn.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/SettingsViewRightColumn.kt @@ -4,12 +4,12 @@ package com.saveourtool.frontend.common.components.views.usersettings +import com.saveourtool.common.validation.FrontendRoutes.* import com.saveourtool.frontend.common.components.views.usersettings.right.deleteSettingsCard import com.saveourtool.frontend.common.components.views.usersettings.right.emailSettingsCard import com.saveourtool.frontend.common.components.views.usersettings.right.organizationsSettingsCard import com.saveourtool.frontend.common.components.views.usersettings.right.profile.profileSettingsCard import com.saveourtool.frontend.common.components.views.usersettings.right.tokenSettingsCard -import com.saveourtool.save.validation.FrontendRoutes.* import react.FC import react.dom.html.ReactHTML.div diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/Email.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/Email.kt index 2963be06b3..d77a31fba9 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/Email.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/Email.kt @@ -4,6 +4,7 @@ package com.saveourtool.frontend.common.components.views.usersettings.right +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.components.inputform.InputTypes import com.saveourtool.frontend.common.components.views.usersettings.SettingsProps import com.saveourtool.frontend.common.components.views.usersettings.inputForm @@ -12,7 +13,7 @@ import com.saveourtool.frontend.common.components.views.usersettings.right.valid import com.saveourtool.frontend.common.components.views.usersettings.useSaveUser import com.saveourtool.frontend.common.externals.i18next.useTranslation import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.validation.FrontendRoutes + import js.core.jso import react.FC import react.dom.html.ReactHTML.div diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/Organizations.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/Organizations.kt index e93b4f246a..4869303dbf 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/Organizations.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/Organizations.kt @@ -4,6 +4,11 @@ package com.saveourtool.frontend.common.components.views.usersettings.right +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.OrganizationStatus +import com.saveourtool.common.entities.OrganizationWithUsers +import com.saveourtool.common.filters.OrganizationFilter +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.components.basic.AVATAR_ORGANIZATION_PLACEHOLDER import com.saveourtool.frontend.common.components.basic.avatarRenderer import com.saveourtool.frontend.common.components.views.usersettings.SettingsProps @@ -11,11 +16,6 @@ import com.saveourtool.frontend.common.externals.fontawesome.faRedo import com.saveourtool.frontend.common.externals.fontawesome.faTrashAlt import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.OrganizationStatus -import com.saveourtool.save.entities.OrganizationWithUsers -import com.saveourtool.save.filters.OrganizationFilter -import com.saveourtool.save.validation.FrontendRoutes import js.core.jso import org.w3c.fetch.Response diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/SettingsInputFields.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/SettingsInputFields.kt index f441dd0d64..0211e84f6e 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/SettingsInputFields.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/SettingsInputFields.kt @@ -4,8 +4,8 @@ package com.saveourtool.frontend.common.components.views.usersettings.right +import com.saveourtool.common.info.UserInfo import com.saveourtool.frontend.common.components.inputform.InputTypes -import com.saveourtool.save.info.UserInfo /** * This Data class is used to STORE all input from input view. diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/profile/AvatarSelector.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/profile/AvatarSelector.kt index 846572b1c3..f8f6fbbcf0 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/profile/AvatarSelector.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/profile/AvatarSelector.kt @@ -6,16 +6,16 @@ package com.saveourtool.frontend.common.components.views.usersettings.right.profile +import com.saveourtool.common.utils.AVATARS_PACKS_DIR +import com.saveourtool.common.utils.AvatarType.USER +import com.saveourtool.common.utils.CONTENT_LENGTH_CUSTOM +import com.saveourtool.common.utils.FILE_PART_NAME import com.saveourtool.frontend.common.components.basic.avatarForm import com.saveourtool.frontend.common.components.views.usersettings.AVATAR_TITLE import com.saveourtool.frontend.common.externals.fontawesome.faCamera import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.UserInfoAwareMutablePropsWithChildren -import com.saveourtool.save.utils.AVATARS_PACKS_DIR -import com.saveourtool.save.utils.AvatarType.USER -import com.saveourtool.save.utils.CONTENT_LENGTH_CUSTOM -import com.saveourtool.save.utils.FILE_PART_NAME import js.core.jso import org.w3c.fetch.Headers diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/validation/InputValidationUtils.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/validation/InputValidationUtils.kt index b7d730be5b..4e078bf8bc 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/validation/InputValidationUtils.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/usersettings/right/validation/InputValidationUtils.kt @@ -4,8 +4,8 @@ package com.saveourtool.frontend.common.components.views.usersettings.right.validation +import com.saveourtool.common.validation.* import com.saveourtool.frontend.common.utils.UsefulUrls -import com.saveourtool.save.validation.* private val namingAllowedSymbols = setOf('-', '_', '.', ' ') private val extendedNamingAllowedSymbols = namingAllowedSymbols + setOf(',', '\'') diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/vuln/UploadCosvButton.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/vuln/UploadCosvButton.kt index 9c94d9846b..ab19932aee 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/vuln/UploadCosvButton.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/vuln/UploadCosvButton.kt @@ -2,10 +2,11 @@ package com.saveourtool.frontend.common.components.views.vuln +import com.saveourtool.common.validation.FrontendCosvRoutes import com.saveourtool.frontend.common.externals.fontawesome.faFile import com.saveourtool.frontend.common.externals.i18next.useTranslation import com.saveourtool.frontend.common.utils.buttonBuilder -import com.saveourtool.save.validation.FrontendCosvRoutes + import react.FC import react.Props import react.router.useNavigate diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/vuln/VulnerabilityTableComponent.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/vuln/VulnerabilityTableComponent.kt index 661f21ea52..dc6dc821ad 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/vuln/VulnerabilityTableComponent.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/vuln/VulnerabilityTableComponent.kt @@ -4,6 +4,12 @@ package com.saveourtool.frontend.common.components.views.vuln +import com.saveourtool.common.entities.cosv.VulnerabilityMetadataDtoWithUserAndOrganization +import com.saveourtool.common.entities.vulnerability.VulnerabilityStatus +import com.saveourtool.common.filters.VulnerabilityFilter +import com.saveourtool.common.frontend.TabMenuBar +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.validation.FrontendCosvRoutes import com.saveourtool.frontend.common.components.basic.renderOrganizationWithName import com.saveourtool.frontend.common.components.basic.renderUserAvatarWithName import com.saveourtool.frontend.common.components.basic.table.filters.vulnerabilitiesFiltersRow @@ -12,12 +18,6 @@ import com.saveourtool.frontend.common.externals.i18next.useTranslation import com.saveourtool.frontend.common.themes.Colors import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.noopResponseHandler -import com.saveourtool.save.entities.cosv.VulnerabilityMetadataDtoWithUserAndOrganization -import com.saveourtool.save.entities.vulnerability.VulnerabilityStatus -import com.saveourtool.save.filters.VulnerabilityFilter -import com.saveourtool.save.frontend.TabMenuBar -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.validation.FrontendCosvRoutes import js.core.jso import react.* diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/welcome/SaveWelcomeView.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/welcome/SaveWelcomeView.kt index bb75a56793..246af8c2a3 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/welcome/SaveWelcomeView.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/welcome/SaveWelcomeView.kt @@ -11,6 +11,8 @@ package com.saveourtool.frontend.common.components.views.welcome +import com.saveourtool.common.info.OauthProviderInfo +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.components.views.welcome.pagers.allSaveWelcomePagers import com.saveourtool.frontend.common.components.views.welcome.pagers.save.renderGeneralInfoPage import com.saveourtool.frontend.common.components.views.welcome.pagers.save.renderReadMorePage @@ -19,8 +21,6 @@ import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.externals.i18next.useTranslation import com.saveourtool.frontend.common.themes.Colors import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.info.OauthProviderInfo -import com.saveourtool.save.validation.FrontendRoutes import js.core.jso import org.w3c.fetch.Headers diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/welcome/WelcomeUtils.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/welcome/WelcomeUtils.kt index ea4c08a221..30af98094d 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/welcome/WelcomeUtils.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/components/views/welcome/WelcomeUtils.kt @@ -4,15 +4,16 @@ package com.saveourtool.frontend.common.components.views.welcome +import com.saveourtool.common.info.OauthProviderInfo +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.validation.FrontendCosvRoutes +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.externals.i18next.TranslationFunction import com.saveourtool.frontend.common.themes.Colors import com.saveourtool.frontend.common.utils.OauthProvidersFeConfig import com.saveourtool.frontend.common.utils.processRegistrationId -import com.saveourtool.save.info.OauthProviderInfo -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.validation.FrontendCosvRoutes -import com.saveourtool.save.validation.FrontendRoutes + import js.core.jso import react.ChildrenBuilder import react.dom.html.ReactHTML.div diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/externals/i18next/I18n.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/externals/i18next/I18n.kt index ef005c743b..8c40db7822 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/externals/i18next/I18n.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/externals/i18next/I18n.kt @@ -1,6 +1,6 @@ package com.saveourtool.frontend.common.externals.i18next -import com.saveourtool.save.frontend.PlatformLanguages +import com.saveourtool.common.frontend.PlatformLanguages /** * Class that represents i18n object diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/externals/i18next/Translation.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/externals/i18next/Translation.kt index 53c3725daf..fd648eb48b 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/externals/i18next/Translation.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/externals/i18next/Translation.kt @@ -1,9 +1,9 @@ package com.saveourtool.frontend.common.externals.i18next +import com.saveourtool.common.frontend.PlatformLanguages import com.saveourtool.frontend.common.externals.cookie.cookie import com.saveourtool.frontend.common.externals.cookie.isAccepted import com.saveourtool.frontend.common.externals.cookie.saveLanguageCode -import com.saveourtool.save.frontend.PlatformLanguages typealias TranslationFunction = String.() -> String diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/http/Requests.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/http/Requests.kt index 6fbb7562b9..be5f25deac 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/http/Requests.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/http/Requests.kt @@ -4,14 +4,14 @@ package com.saveourtool.frontend.common.http +import com.saveourtool.common.agent.TestExecutionDto +import com.saveourtool.common.entities.* +import com.saveourtool.common.entities.contest.ContestDto +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.utils.AvatarType +import com.saveourtool.common.utils.CONTENT_LENGTH_CUSTOM +import com.saveourtool.common.utils.FILE_PART_NAME import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.agent.TestExecutionDto -import com.saveourtool.save.entities.* -import com.saveourtool.save.entities.contest.ContestDto -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.utils.AvatarType -import com.saveourtool.save.utils.CONTENT_LENGTH_CUSTOM -import com.saveourtool.save.utils.FILE_PART_NAME import js.core.jso import org.w3c.fetch.Headers diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/CustomHooks.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/CustomHooks.kt index 285d8bd45a..77fdee8990 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/CustomHooks.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/CustomHooks.kt @@ -6,11 +6,11 @@ package com.saveourtool.frontend.common.utils +import com.saveourtool.common.info.UserStatus +import com.saveourtool.common.utils.DEFAULT_DEBOUNCE_PERIOD +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.components.requestStatusContext import com.saveourtool.frontend.common.externals.lodash.debounce -import com.saveourtool.save.info.UserStatus -import com.saveourtool.save.utils.DEFAULT_DEBOUNCE_PERIOD -import com.saveourtool.save.validation.FrontendRoutes import js.core.jso import org.w3c.dom.EventSource diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/FilterParamUtils.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/FilterParamUtils.kt index d7a0ded303..95509df142 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/FilterParamUtils.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/FilterParamUtils.kt @@ -5,7 +5,7 @@ package com.saveourtool.frontend.common.utils -import com.saveourtool.save.filters.VulnerabilityFilter +import com.saveourtool.common.filters.VulnerabilityFilter import org.w3c.dom.url.URLSearchParams /** diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/HtmlElements.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/HtmlElements.kt index dbb6752a9d..95bc91c54a 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/HtmlElements.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/HtmlElements.kt @@ -4,9 +4,9 @@ package com.saveourtool.frontend.common.utils +import com.saveourtool.common.entities.* import com.saveourtool.frontend.common.externals.fontawesome.FontAwesomeIconModule import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon -import com.saveourtool.save.entities.* import js.core.jso import react.ChildrenBuilder diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/LocationUtils.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/LocationUtils.kt index 979249478f..3751dcfe02 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/LocationUtils.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/LocationUtils.kt @@ -2,8 +2,8 @@ package com.saveourtool.frontend.common.utils -import com.saveourtool.save.validation.FrontendRoutes -import com.saveourtool.save.validation.SETTINGS +import com.saveourtool.common.validation.FrontendRoutes +import com.saveourtool.common.validation.SETTINGS import remix.run.router.Location /** diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/LoginUtils.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/LoginUtils.kt index 67e733e4b2..9f1ff4c1e6 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/LoginUtils.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/LoginUtils.kt @@ -6,9 +6,9 @@ package com.saveourtool.frontend.common.utils +import com.saveourtool.common.info.OauthProviderInfo import com.saveourtool.frontend.common.externals.fontawesome.faSignInAlt import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon -import com.saveourtool.save.info.OauthProviderInfo import js.core.jso import react.ChildrenBuilder diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/RequestUtils.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/RequestUtils.kt index b4ad4ce0fe..1d769df0e0 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/RequestUtils.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/RequestUtils.kt @@ -6,11 +6,11 @@ package com.saveourtool.frontend.common.utils +import com.saveourtool.common.coroutines.flow.decodeToString +import com.saveourtool.common.v1 import com.saveourtool.frontend.common.components.RequestStatusContext import com.saveourtool.frontend.common.components.requestStatusContext import com.saveourtool.frontend.common.http.HttpStatusException -import com.saveourtool.save.coroutines.flow.decodeToString -import com.saveourtool.save.v1 import js.buffer.ArrayBuffer import js.core.jso diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/StateWithRole.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/StateWithRole.kt index 19c1902e2d..608aeea0b9 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/StateWithRole.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/StateWithRole.kt @@ -1,6 +1,6 @@ package com.saveourtool.frontend.common.utils -import com.saveourtool.save.domain.Role +import com.saveourtool.common.domain.Role import react.State /** diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/TopBarUrl.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/TopBarUrl.kt index 512c0e975c..3d349a2ab2 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/TopBarUrl.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/TopBarUrl.kt @@ -1,6 +1,6 @@ package com.saveourtool.frontend.common.utils -import com.saveourtool.save.validation.FrontendRoutes +import com.saveourtool.common.validation.FrontendRoutes /** * The class for analyzing url address and creating links in topBar diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/UsefulUrls.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/UsefulUrls.kt index 729043264f..23ea7bbdd6 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/UsefulUrls.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/UsefulUrls.kt @@ -1,7 +1,7 @@ package com.saveourtool.frontend.common.utils -import com.saveourtool.save.validation.NAME_FRAGMENT_CLASS -import com.saveourtool.save.validation.ValidationRegularExpressions.URL_VALIDATOR +import com.saveourtool.common.validation.NAME_FRAGMENT_CLASS +import com.saveourtool.common.validation.ValidationRegularExpressions.URL_VALIDATOR /** * Enum only for storing URLs to well-known website diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/UserInfoAwareProps.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/UserInfoAwareProps.kt index 37e77db3ac..9602a8e76b 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/UserInfoAwareProps.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/UserInfoAwareProps.kt @@ -4,7 +4,7 @@ package com.saveourtool.frontend.common.utils -import com.saveourtool.save.info.UserInfo +import com.saveourtool.common.info.UserInfo import react.FC import react.Props import react.PropsWithChildren diff --git a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/Utils.kt b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/Utils.kt index d4279b0650..d1c33f60bd 100644 --- a/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/Utils.kt +++ b/frontend-common/src/main/kotlin/com/saveourtool/frontend/common/utils/Utils.kt @@ -4,11 +4,11 @@ package com.saveourtool.frontend.common.utils +import com.saveourtool.common.domain.Role +import com.saveourtool.common.domain.Role.SUPER_ADMIN +import com.saveourtool.common.info.UserInfo import com.saveourtool.frontend.common.externals.fontawesome.FontAwesomeIconModule import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon -import com.saveourtool.save.domain.Role -import com.saveourtool.save.domain.Role.SUPER_ADMIN -import com.saveourtool.save.info.UserInfo import js.core.jso import org.w3c.files.Blob diff --git a/frontend-common/src/test/kotlin/com/saveourtool/frontend/common/components/basic/SelectFormTest.kt b/frontend-common/src/test/kotlin/com/saveourtool/frontend/common/components/basic/SelectFormTest.kt index 991c2edffc..7be757f3ee 100644 --- a/frontend-common/src/test/kotlin/com/saveourtool/frontend/common/components/basic/SelectFormTest.kt +++ b/frontend-common/src/test/kotlin/com/saveourtool/frontend/common/components/basic/SelectFormTest.kt @@ -1,7 +1,7 @@ package com.saveourtool.frontend.common.components.basic -import com.saveourtool.save.entities.OrganizationDto -import com.saveourtool.save.v1 +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.v1 import com.saveourtool.frontend.common.components.inputform.InputTypes import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.externals.* diff --git a/frontend-common/src/test/kotlin/com/saveourtool/frontend/common/components/views/OrganizationViewTest.kt b/frontend-common/src/test/kotlin/com/saveourtool/frontend/common/components/views/OrganizationViewTest.kt index 9875dd383c..6c1fd10ad2 100644 --- a/frontend-common/src/test/kotlin/com/saveourtool/frontend/common/components/views/OrganizationViewTest.kt +++ b/frontend-common/src/test/kotlin/com/saveourtool/frontend/common/components/views/OrganizationViewTest.kt @@ -1,8 +1,8 @@ package com.saveourtool.frontend.common.components.views -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.* -import com.saveourtool.save.info.UserInfo +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.* +import com.saveourtool.common.info.UserInfo import com.saveourtool.frontend.common.components.views.organization.OrganizationMenuBar import com.saveourtool.frontend.common.components.views.organization.OrganizationType import com.saveourtool.frontend.common.components.views.organization.organizationView diff --git a/save-agent/build.gradle.kts b/save-agent/build.gradle.kts index a2f4b51b18..f137379380 100644 --- a/save-agent/build.gradle.kts +++ b/save-agent/build.gradle.kts @@ -47,7 +47,7 @@ kotlin { } dependencies { implementation(libs.save.common) - implementation(projects.saveCloudCommon) + implementation(projects.common) implementation(libs.save.core) implementation(libs.save.plugins.fix) implementation(libs.save.reporters) diff --git a/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/AgentConfiguration.kt b/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/AgentConfiguration.kt index a9c44550c5..d42eeb7681 100644 --- a/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/AgentConfiguration.kt +++ b/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/AgentConfiguration.kt @@ -4,13 +4,15 @@ package com.saveourtool.save.agent +import com.saveourtool.common.agent.AgentEnvName +import com.saveourtool.common.agent.AgentInfo import com.saveourtool.save.agent.utils.SAVE_CLI_EXECUTABLE_NAME import com.saveourtool.save.agent.utils.TEST_SUITES_DIR_NAME import com.saveourtool.save.core.config.LogType import com.saveourtool.save.core.config.OutputStreamType import com.saveourtool.save.core.config.ReportType -import com.saveourtool.save.utils.optionalEnv -import com.saveourtool.save.utils.requiredEnv +import com.saveourtool.common.utils.optionalEnv +import com.saveourtool.common.utils.requiredEnv import generated.SAVE_CLOUD_VERSION import kotlinx.serialization.Serializable diff --git a/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/Main.kt b/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/Main.kt index 0874f4f326..56e40e2e40 100644 --- a/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/Main.kt +++ b/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/Main.kt @@ -4,14 +4,15 @@ package com.saveourtool.save.agent +import com.saveourtool.common.agent.* +import com.saveourtool.common.utils.KubernetesServiceAccountAuthHeaderPlugin +import com.saveourtool.common.utils.fs +import com.saveourtool.common.utils.parseConfig import com.saveourtool.save.agent.utils.* import com.saveourtool.save.agent.utils.ktorLogger import com.saveourtool.save.core.config.LogType import com.saveourtool.save.core.logging.describe import com.saveourtool.save.core.logging.logType -import com.saveourtool.save.utils.KubernetesServiceAccountAuthHeaderPlugin -import com.saveourtool.save.utils.fs -import com.saveourtool.save.utils.parseConfig import io.ktor.client.HttpClient import io.ktor.client.plugins.* diff --git a/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/Requests.kt b/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/Requests.kt index 631dc10f01..90f93acb67 100644 --- a/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/Requests.kt +++ b/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/Requests.kt @@ -4,9 +4,9 @@ package com.saveourtool.save.agent +import com.saveourtool.common.utils.* import com.saveourtool.save.agent.utils.* import com.saveourtool.save.core.logging.logWarn -import com.saveourtool.save.utils.* import io.ktor.client.call.* import io.ktor.client.statement.* diff --git a/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/SaveAgent.kt b/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/SaveAgent.kt index afefa47c1e..104ba0e835 100644 --- a/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/SaveAgent.kt +++ b/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/SaveAgent.kt @@ -2,6 +2,9 @@ package com.saveourtool.save.agent +import com.saveourtool.common.agent.* +import com.saveourtool.common.domain.TestResultDebugInfo +import com.saveourtool.common.utils.* import com.saveourtool.save.agent.utils.* import com.saveourtool.save.agent.utils.processRequestToBackend import com.saveourtool.save.core.config.resolveSaveOverridesTomlConfig @@ -13,10 +16,8 @@ import com.saveourtool.save.core.result.CountWarnings import com.saveourtool.save.core.utils.ExecutionResult import com.saveourtool.save.core.utils.ProcessBuilder import com.saveourtool.save.core.utils.runIf -import com.saveourtool.save.domain.TestResultDebugInfo import com.saveourtool.save.plugins.fix.FixPlugin import com.saveourtool.save.reporter.Report -import com.saveourtool.save.utils.* import io.ktor.client.* import io.ktor.client.call.body diff --git a/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/utils/FileUtils.kt b/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/utils/FileUtils.kt index 2d6bbf58ea..cd86b9bc29 100644 --- a/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/utils/FileUtils.kt +++ b/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/utils/FileUtils.kt @@ -4,7 +4,7 @@ package com.saveourtool.save.agent.utils -import com.saveourtool.save.utils.fs +import com.saveourtool.common.utils.fs import okio.FileNotFoundException import okio.Path.Companion.toPath diff --git a/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/utils/HttpUtils.kt b/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/utils/HttpUtils.kt index b3477fa756..b0c0072325 100644 --- a/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/utils/HttpUtils.kt +++ b/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/utils/HttpUtils.kt @@ -4,14 +4,14 @@ package com.saveourtool.save.agent.utils -import com.saveourtool.save.agent.AgentState +import com.saveourtool.common.agent.AgentState +import com.saveourtool.common.utils.createAtomicLong +import com.saveourtool.common.utils.failureOrNotOk +import com.saveourtool.common.utils.fs +import com.saveourtool.common.utils.notOk import com.saveourtool.save.agent.SaveAgent import com.saveourtool.save.core.logging.logWarn import com.saveourtool.save.core.utils.runIf -import com.saveourtool.save.utils.createAtomicLong -import com.saveourtool.save.utils.failureOrNotOk -import com.saveourtool.save.utils.fs -import com.saveourtool.save.utils.notOk import io.ktor.client.* import io.ktor.client.call.body diff --git a/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/utils/Utils.kt b/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/utils/Utils.kt index 5406fe54e6..810b2d398e 100644 --- a/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/utils/Utils.kt +++ b/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/utils/Utils.kt @@ -4,10 +4,10 @@ package com.saveourtool.save.agent.utils +import com.saveourtool.common.agent.AgentEnvName +import com.saveourtool.common.utils.optionalEnv import com.saveourtool.save.agent.AgentConfiguration -import com.saveourtool.save.agent.AgentEnvName import com.saveourtool.save.core.logging.logTrace -import com.saveourtool.save.utils.optionalEnv internal const val SAVE_CLI_EXECUTABLE_NAME = "save-linuxX64.kexe" internal const val TEST_SUITES_DIR_NAME = "test-suites" diff --git a/save-agent/src/commonTest/kotlin/com/saveourtool/save/agent/SaveAgentTest.kt b/save-agent/src/commonTest/kotlin/com/saveourtool/save/agent/SaveAgentTest.kt index b88c3fd9d9..7a4efa1d79 100644 --- a/save-agent/src/commonTest/kotlin/com/saveourtool/save/agent/SaveAgentTest.kt +++ b/save-agent/src/commonTest/kotlin/com/saveourtool/save/agent/SaveAgentTest.kt @@ -5,7 +5,7 @@ import com.saveourtool.save.agent.utils.updateFromEnv import com.saveourtool.save.core.config.LogType import com.saveourtool.save.core.logging.logType import com.saveourtool.save.reporter.Report -import com.saveourtool.save.utils.fs +import com.saveourtool.common.utils.fs import io.ktor.client.* import io.ktor.client.engine.mock.* import io.ktor.client.plugins.contentnegotiation.* @@ -27,11 +27,11 @@ import kotlin.test.assertEquals @Suppress("WRONG_ORDER_IN_CLASS_LIKE_STRUCTURES") open class SaveAgentTest { init { - setenv(AgentEnvName.CONTAINER_ID.name, "agent-for-test") - setenv(AgentEnvName.CONTAINER_NAME.name, "save-agent-for-test") - setenv(AgentEnvName.HEARTBEAT_URL.name, HEARTBEAT_ENDPOINT.toLocalhostUrl()) - setenv(AgentEnvName.CLI_COMMAND.name, "echo Doing nothing it test mode") - setenv(AgentEnvName.EXECUTION_ID.name, "1") + setenv(com.saveourtool.common.agent.AgentEnvName.CONTAINER_ID.name, "agent-for-test") + setenv(com.saveourtool.common.agent.AgentEnvName.CONTAINER_NAME.name, "save-agent-for-test") + setenv(com.saveourtool.common.agent.AgentEnvName.HEARTBEAT_URL.name, HEARTBEAT_ENDPOINT.toLocalhostUrl()) + setenv(com.saveourtool.common.agent.AgentEnvName.CLI_COMMAND.name, "echo Doing nothing it test mode") + setenv(com.saveourtool.common.agent.AgentEnvName.EXECUTION_ID.name, "1") } @Suppress("MAGIC_NUMBER", "MagicNumber") @@ -62,7 +62,9 @@ open class SaveAgentTest { addHandler { request -> when (request.url.encodedPath) { HEARTBEAT_ENDPOINT -> respond( - json.encodeToString(PolymorphicSerializer(HeartbeatResponse::class), ContinueResponse), + json.encodeToString(PolymorphicSerializer(com.saveourtool.common.agent.HeartbeatResponse::class), + com.saveourtool.common.agent.ContinueResponse + ), HttpStatusCode.OK, headersOf(HttpHeaders.ContentType, ContentType.Application.Json.toString()), ) @@ -102,23 +104,25 @@ open class SaveAgentTest { @Test fun `agent should send heartbeats`() { runBlocking { - saveAgentForTest.sendHeartbeat(ExecutionProgress(0, -1L)) + saveAgentForTest.sendHeartbeat(com.saveourtool.common.agent.ExecutionProgress(0, -1L)) } } @Test fun `should change state to FINISHED after SAVE CLI returns`() = runBlocking { - assertEquals(AgentState.BUSY, saveAgentForTest.state.get()) + assertEquals(com.saveourtool.common.agent.AgentState.BUSY, saveAgentForTest.state.get()) runBlocking { saveAgentForTest.run { - startSaveProcess(AgentRunConfig( - cliArgs = "", - executionDataUploadUrl = EXECUTION_DATA_ENDPOINT.toLocalhostUrl(), - debugInfoUploadUrl = DEBUG_INFO_ENDPOINT.toLocalhostUrl() - )) + startSaveProcess( + com.saveourtool.common.agent.AgentRunConfig( + cliArgs = "", + executionDataUploadUrl = EXECUTION_DATA_ENDPOINT.toLocalhostUrl(), + debugInfoUploadUrl = DEBUG_INFO_ENDPOINT.toLocalhostUrl() + ) + ) } } - assertEquals(AgentState.FINISHED, saveAgentForTest.state.get()) + assertEquals(com.saveourtool.common.agent.AgentState.FINISHED, saveAgentForTest.state.get()) } private fun String.toLocalhostUrl() = "http://localhost$this" diff --git a/save-api-cli/build.gradle.kts b/save-api-cli/build.gradle.kts index 52191cff39..a5a2cfce53 100644 --- a/save-api-cli/build.gradle.kts +++ b/save-api-cli/build.gradle.kts @@ -12,7 +12,7 @@ application { dependencies { implementation(projects.saveApi) - implementation(projects.saveCloudCommon) + implementation(projects.common) implementation(libs.save.common.jvm) implementation(libs.kotlinx.cli) implementation(libs.log4j) diff --git a/save-api-cli/src/main/kotlin/com/saveourtool/save/apicli/ArgsParsing.kt b/save-api-cli/src/main/kotlin/com/saveourtool/save/apicli/ArgsParsing.kt index 684987992a..b6263e270d 100644 --- a/save-api-cli/src/main/kotlin/com/saveourtool/save/apicli/ArgsParsing.kt +++ b/save-api-cli/src/main/kotlin/com/saveourtool/save/apicli/ArgsParsing.kt @@ -6,8 +6,8 @@ package com.saveourtool.save.apicli +import com.saveourtool.common.execution.TestingType import com.saveourtool.save.api.authorization.Authorization -import com.saveourtool.save.execution.TestingType import org.slf4j.LoggerFactory diff --git a/save-api/build.gradle.kts b/save-api/build.gradle.kts index 9aa29252ac..20642b893d 100644 --- a/save-api/build.gradle.kts +++ b/save-api/build.gradle.kts @@ -14,7 +14,7 @@ java { } dependencies { - api(projects.saveCloudCommon) + api(projects.common) implementation(libs.save.common.jvm) implementation(libs.log4j) implementation(libs.log4j.slf4j.impl) diff --git a/save-api/src/main/kotlin/com/saveourtool/save/api/SaveCloudClientEx.kt b/save-api/src/main/kotlin/com/saveourtool/save/api/SaveCloudClientEx.kt index 626374df0a..aa2aeb0ae4 100644 --- a/save-api/src/main/kotlin/com/saveourtool/save/api/SaveCloudClientEx.kt +++ b/save-api/src/main/kotlin/com/saveourtool/save/api/SaveCloudClientEx.kt @@ -2,18 +2,18 @@ package com.saveourtool.save.api -import com.saveourtool.save.agent.TestExecutionExtDto +import com.saveourtool.common.agent.TestExecutionExtDto +import com.saveourtool.common.entities.FileDto +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.entities.ProjectDto +import com.saveourtool.common.entities.ProjectStatus.CREATED +import com.saveourtool.common.entities.contest.ContestDto +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.permission.Permission.READ +import com.saveourtool.common.request.CreateExecutionRequest +import com.saveourtool.common.testsuite.TestSuiteVersioned import com.saveourtool.save.api.errors.SaveCloudError import com.saveourtool.save.api.impl.DefaultSaveCloudClient -import com.saveourtool.save.entities.FileDto -import com.saveourtool.save.entities.OrganizationDto -import com.saveourtool.save.entities.ProjectDto -import com.saveourtool.save.entities.ProjectStatus.CREATED -import com.saveourtool.save.entities.contest.ContestDto -import com.saveourtool.save.execution.ExecutionDto -import com.saveourtool.save.permission.Permission.READ -import com.saveourtool.save.request.CreateExecutionRequest -import com.saveourtool.save.testsuite.TestSuiteVersioned import arrow.core.Either import io.ktor.client.plugins.auth.Auth diff --git a/save-api/src/main/kotlin/com/saveourtool/save/api/config/PropertiesConfiguration.kt b/save-api/src/main/kotlin/com/saveourtool/save/api/config/PropertiesConfiguration.kt index b32784d663..73f2adf06b 100644 --- a/save-api/src/main/kotlin/com/saveourtool/save/api/config/PropertiesConfiguration.kt +++ b/save-api/src/main/kotlin/com/saveourtool/save/api/config/PropertiesConfiguration.kt @@ -4,10 +4,10 @@ package com.saveourtool.save.api.config -import com.saveourtool.save.domain.Jdk -import com.saveourtool.save.domain.Python -import com.saveourtool.save.domain.Sdk -import com.saveourtool.save.utils.getLogger +import com.saveourtool.common.domain.Jdk +import com.saveourtool.common.domain.Python +import com.saveourtool.common.domain.Sdk +import com.saveourtool.common.utils.getLogger import kotlinx.serialization.Serializable diff --git a/save-api/src/main/kotlin/com/saveourtool/save/api/impl/DefaultSaveCloudClient.kt b/save-api/src/main/kotlin/com/saveourtool/save/api/impl/DefaultSaveCloudClient.kt index 7ad8920b63..f62b7ecfbf 100644 --- a/save-api/src/main/kotlin/com/saveourtool/save/api/impl/DefaultSaveCloudClient.kt +++ b/save-api/src/main/kotlin/com/saveourtool/save/api/impl/DefaultSaveCloudClient.kt @@ -2,7 +2,20 @@ package com.saveourtool.save.api.impl -import com.saveourtool.save.agent.TestExecutionExtDto +import com.saveourtool.common.agent.TestExecutionExtDto +import com.saveourtool.common.entities.* +import com.saveourtool.common.entities.contest.ContestDto +import com.saveourtool.common.entities.contest.ContestResult +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.execution.TestingType.CONTEST_MODE +import com.saveourtool.common.filters.ProjectFilter +import com.saveourtool.common.permission.Permission.READ +import com.saveourtool.common.request.CreateExecutionRequest +import com.saveourtool.common.testsuite.TestSuiteVersioned +import com.saveourtool.common.utils.CONTENT_LENGTH_CUSTOM +import com.saveourtool.common.utils.getLogger +import com.saveourtool.common.utils.supportJLocalDateTime +import com.saveourtool.common.v1 import com.saveourtool.save.api.SaveCloudClientEx import com.saveourtool.save.api.errors.SaveCloudError import com.saveourtool.save.api.errors.TimeoutError @@ -10,19 +23,6 @@ import com.saveourtool.save.api.http.deleteAndCheck import com.saveourtool.save.api.http.getAndCheck import com.saveourtool.save.api.http.postAndCheck import com.saveourtool.save.api.io.readChannel -import com.saveourtool.save.entities.* -import com.saveourtool.save.entities.contest.ContestDto -import com.saveourtool.save.entities.contest.ContestResult -import com.saveourtool.save.execution.ExecutionDto -import com.saveourtool.save.execution.TestingType.CONTEST_MODE -import com.saveourtool.save.filters.ProjectFilter -import com.saveourtool.save.permission.Permission.READ -import com.saveourtool.save.request.CreateExecutionRequest -import com.saveourtool.save.testsuite.TestSuiteVersioned -import com.saveourtool.save.utils.CONTENT_LENGTH_CUSTOM -import com.saveourtool.save.utils.getLogger -import com.saveourtool.save.utils.supportJLocalDateTime -import com.saveourtool.save.v1 import arrow.core.Either import arrow.core.flatMap diff --git a/save-api/src/main/kotlin/com/saveourtool/save/api/utils/RequestUtils.kt b/save-api/src/main/kotlin/com/saveourtool/save/api/utils/RequestUtils.kt index 65a87861df..96932070eb 100644 --- a/save-api/src/main/kotlin/com/saveourtool/save/api/utils/RequestUtils.kt +++ b/save-api/src/main/kotlin/com/saveourtool/save/api/utils/RequestUtils.kt @@ -4,13 +4,13 @@ package com.saveourtool.save.api.utils +import com.saveourtool.common.entities.FileDto +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.request.CreateExecutionRequest +import com.saveourtool.common.utils.supportJLocalDateTime +import com.saveourtool.common.v1 import com.saveourtool.save.api.authorization.Authorization import com.saveourtool.save.api.config.WebClientProperties -import com.saveourtool.save.entities.FileDto -import com.saveourtool.save.execution.ExecutionDto -import com.saveourtool.save.request.CreateExecutionRequest -import com.saveourtool.save.utils.supportJLocalDateTime -import com.saveourtool.save.v1 import io.ktor.client.HttpClient import io.ktor.client.call.body diff --git a/save-backend/build.gradle.kts b/save-backend/build.gradle.kts index e103a99b84..f218a09e24 100644 --- a/save-backend/build.gradle.kts +++ b/save-backend/build.gradle.kts @@ -45,7 +45,7 @@ tasks.register("copyLiquibase") { } dependencies { - implementation(projects.saveCloudCommon) + implementation(projects.common) implementation(projects.authenticationService) implementation(projects.testAnalysisCore) implementation(libs.save.common.jvm) diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/SaveApplication.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/SaveApplication.kt index 7f8fc88db8..dd90990678 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/SaveApplication.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/SaveApplication.kt @@ -1,7 +1,8 @@ package com.saveourtool.save.backend +import com.saveourtool.common.s3.DefaultS3Configuration import com.saveourtool.save.backend.configs.ConfigProperties -import com.saveourtool.save.s3.DefaultS3Configuration + import org.springframework.boot.SpringApplication import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.context.properties.EnableConfigurationProperties @@ -11,13 +12,13 @@ import org.springframework.context.annotation.Import * An entrypoint for spring for save-backend */ @SpringBootApplication(scanBasePackages = [ - "com.saveourtool.save.configs", - "com.saveourtool.save.backend", - "com.saveourtool.save.service", - "com.saveourtool.save.storage", - "com.saveourtool.save.security", - "com.saveourtool.save.utils", - "com.saveourtool.save.repository", + "com.saveourtool.common.configs", + "com.saveourtool.common.backend", + "com.saveourtool.common.service", + "com.saveourtool.common.storage", + "com.saveourtool.common.security", + "com.saveourtool.common.utils", + "com.saveourtool.common.repository", ]) @EnableConfigurationProperties(ConfigProperties::class) @Import( diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/ApiGroupsConfiguration.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/ApiGroupsConfiguration.kt index 4fa3dae73a..cdd2663fb6 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/ApiGroupsConfiguration.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/ApiGroupsConfiguration.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.backend.configs -import com.saveourtool.save.latestVersion -import com.saveourtool.save.v1 +import com.saveourtool.common.latestVersion +import com.saveourtool.common.v1 import io.swagger.v3.oas.models.Components import io.swagger.v3.oas.models.OpenAPI @@ -28,10 +28,10 @@ class ApiGroupsConfiguration { .build() @Bean - fun openApiV1(): GroupedOpenApi? = createGroupedOpenApi(v1, v1) + fun openApiV1(): GroupedOpenApi? = createGroupedOpenApi(com.saveourtool.common.v1, com.saveourtool.common.v1) @Bean - fun openApiLatestVersion(): GroupedOpenApi? = createGroupedOpenApi("latest", latestVersion) + fun openApiLatestVersion(): GroupedOpenApi? = createGroupedOpenApi("latest", com.saveourtool.common.latestVersion) @Bean fun customOpenApi(): OpenAPI? = OpenAPI() @@ -39,7 +39,7 @@ class ApiGroupsConfiguration { .info( Info() .title("SAVE Backend API") - .version(latestVersion) + .version(com.saveourtool.common.latestVersion) ) private fun createGroupedOpenApi(groupName: String, version: String): GroupedOpenApi? = GroupedOpenApi.builder() diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/AvatarController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/AvatarController.kt index 2960ba98bb..9d31b73f56 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/AvatarController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/AvatarController.kt @@ -1,14 +1,14 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.username -import com.saveourtool.save.configs.ApiSwaggerSupport import com.saveourtool.save.service.OrganizationService import com.saveourtool.save.service.UserService import com.saveourtool.save.storage.AvatarKey import com.saveourtool.save.storage.AvatarStorage import com.saveourtool.save.utils.* import com.saveourtool.save.utils.ByteBufferFluxResponse -import com.saveourtool.save.v1 import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -34,12 +34,12 @@ import kotlin.time.toJavaDuration /** * Controller for working with avatars. */ -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @Tags( Tag(name = "avatars"), ) @RestController -@RequestMapping(path = ["/api/$v1/avatar"]) +@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/avatar"]) internal class AvatarController( private val avatarStorage: AvatarStorage, private val organizationService: OrganizationService, diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/AwesomeBenchmarksController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/AwesomeBenchmarksController.kt index 5733d08fee..b463609fd6 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/AwesomeBenchmarksController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/AwesomeBenchmarksController.kt @@ -6,9 +6,10 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.v1 import com.saveourtool.save.backend.service.AwesomeBenchmarksService import com.saveourtool.save.entities.benchmarks.BenchmarkEntity -import com.saveourtool.save.v1 + import org.slf4j.LoggerFactory import org.springframework.web.bind.annotation.* @@ -34,7 +35,7 @@ class AwesomeBenchmarksController( /** * @return all benchmarks from backend to frontend */ - @GetMapping(path = ["/api/$v1/awesome-benchmarks"]) + @GetMapping(path = ["/api/${com.saveourtool.common.v1}/awesome-benchmarks"]) fun getAllAwesomeBenchmarks() = awesomeBenchmarksService.getAllBenchmarks() } diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/CommentController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/CommentController.kt index 46fca8ab85..6ec9dae896 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/CommentController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/CommentController.kt @@ -1,6 +1,7 @@ package com.saveourtool.save.backend.controllers -import com.saveourtool.save.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.v1 import com.saveourtool.save.entities.Comment import com.saveourtool.save.entities.CommentDto import com.saveourtool.save.permission.Permission @@ -10,7 +11,7 @@ import com.saveourtool.save.utils.StringResponse import com.saveourtool.save.utils.blockingToMono import com.saveourtool.save.utils.switchIfEmptyToNotFound import com.saveourtool.save.utils.switchIfEmptyToResponseException -import com.saveourtool.save.v1 + import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.responses.ApiResponse import io.swagger.v3.oas.annotations.tags.Tag @@ -27,12 +28,12 @@ import reactor.kotlin.core.publisher.toMono /** * Controller for working with comments. */ -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @Tags( Tag(name = "comments"), ) @RestController -@RequestMapping(path = ["/api/$v1/comments"]) +@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/comments"]) class CommentController( private val commentService: CommentService, private val commentPermissionEvaluator: CommentPermissionEvaluator, diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContainerLogController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContainerLogController.kt index 4c169f751e..0ec964606b 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContainerLogController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContainerLogController.kt @@ -1,12 +1,13 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.v1 import com.saveourtool.save.backend.service.AgentService -import com.saveourtool.save.configs.ApiSwaggerSupport import com.saveourtool.save.service.LogService import com.saveourtool.save.utils.StringListResponse import com.saveourtool.save.utils.blockingToMono import com.saveourtool.save.utils.toInstantAtDefaultZone -import com.saveourtool.save.v1 + import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter import io.swagger.v3.oas.annotations.Parameters @@ -19,17 +20,18 @@ import org.springframework.http.ResponseEntity import org.springframework.security.access.prepost.PreAuthorize import org.springframework.web.bind.annotation.* import reactor.core.publisher.Mono + import java.time.LocalDateTime /** * Controller to fetch logs */ -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @Tags( Tag(name = "logs"), ) @RestController -@RequestMapping(path = ["/api/$v1/logs"]) +@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/logs"]) class ContainerLogController( private val logService: LogService, private val agentService: AgentService, diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContestController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContestController.kt index dd15ddf0b7..3f35079022 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContestController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContestController.kt @@ -1,9 +1,10 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.v1 import com.saveourtool.save.backend.service.* import com.saveourtool.save.backend.storage.TestsSourceSnapshotStorage -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.configs.RequiresAuthorizationSourceHeader import com.saveourtool.save.entities.* import com.saveourtool.save.entities.Contest.Companion.toContest import com.saveourtool.save.entities.contest.ContestDto @@ -14,7 +15,6 @@ import com.saveourtool.save.security.OrganizationPermissionEvaluator import com.saveourtool.save.service.OrganizationService import com.saveourtool.save.test.TestFilesContent import com.saveourtool.save.utils.* -import com.saveourtool.save.v1 import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -40,12 +40,12 @@ import java.time.LocalDateTime /** * Controller for working with contests. */ -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @Tags( Tag(name = "contests"), ) @RestController -@RequestMapping(path = ["/api/$v1/contests"]) +@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/contests"]) @Suppress("LongParameterList") internal class ContestController( private val contestService: ContestService, @@ -91,7 +91,7 @@ internal class ContestController( } @PostMapping("/featured/add-or-delete") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("hasRole('ROLE_SUPER_ADMIN')") @Operation( method = "POST", @@ -249,7 +249,7 @@ internal class ContestController( } @PostMapping("/create") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "POST", @@ -309,7 +309,7 @@ internal class ContestController( } @PostMapping("/update") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "POST", @@ -352,7 +352,7 @@ internal class ContestController( } @PostMapping("/update-all") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "POST", diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContestSampleController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContestSampleController.kt index abe01b3b99..6b940efc5b 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContestSampleController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContestSampleController.kt @@ -1,11 +1,12 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.v1 import com.saveourtool.save.backend.service.ContestSampleService import com.saveourtool.save.entities.contest.ContestSampleDto import com.saveourtool.save.utils.StringResponse import com.saveourtool.save.utils.blockingToFlux import com.saveourtool.save.utils.blockingToMono -import com.saveourtool.save.v1 + import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.responses.ApiResponse import org.springframework.http.ResponseEntity @@ -18,7 +19,7 @@ import reactor.core.publisher.Mono * Controller for working with contests sample. */ @RestController -@RequestMapping(path = ["/api/$v1/contests/sample"]) +@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/contests/sample"]) class ContestSampleController( private val contestSampleService: ContestSampleService, ) { diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/DemoManagerController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/DemoManagerController.kt index ba9a22fb0d..640b8b6cee 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/DemoManagerController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/DemoManagerController.kt @@ -1,9 +1,10 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.v1 import com.saveourtool.save.backend.configs.ConfigProperties import com.saveourtool.save.backend.service.LnkProjectGithubService -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.configs.RequiresAuthorizationSourceHeader import com.saveourtool.save.demo.DemoCreationRequest import com.saveourtool.save.entities.FileDto import com.saveourtool.save.entities.Project @@ -13,7 +14,6 @@ import com.saveourtool.save.service.LogService import com.saveourtool.save.service.ProjectService import com.saveourtool.save.spring.utils.applyAll import com.saveourtool.save.utils.* -import com.saveourtool.save.v1 import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -34,14 +34,15 @@ import org.springframework.web.server.ResponseStatusException import reactor.core.publisher.Flux import reactor.core.publisher.Mono import reactor.core.scheduler.Schedulers + import java.time.LocalDateTime /** * Controller that allows adding tools to save-demo */ -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @RestController -@RequestMapping("/api/$v1/demo") +@RequestMapping("/api/${com.saveourtool.common.v1}/demo") class DemoManagerController( private val projectService: ProjectService, private val lnkProjectGithubService: LnkProjectGithubService, @@ -56,7 +57,7 @@ class DemoManagerController( .build() @PostMapping("/{organizationName}/{projectName}/save-or-update") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @Parameters( Parameter(name = "organizationName", `in` = ParameterIn.PATH, description = "name of saveourtool organization", required = true), Parameter(name = "projectName", `in` = ParameterIn.PATH, description = "name of saveourtool project", required = true), @@ -123,7 +124,7 @@ class DemoManagerController( } @PostMapping("/{organizationName}/{projectName}/upload-file", consumes = [MediaType.MULTIPART_FORM_DATA_VALUE]) - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @Parameters( Parameter(name = "organizationName", `in` = ParameterIn.PATH, description = "name of saveourtool organization", required = true), Parameter(name = "projectName", `in` = ParameterIn.PATH, description = "name of saveourtool project", required = true), @@ -155,7 +156,7 @@ class DemoManagerController( } @GetMapping("/{organizationName}/{projectName}/list-file") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @Parameters( Parameter(name = "organizationName", `in` = ParameterIn.PATH, description = "name of saveourtool organization", required = true), Parameter(name = "projectName", `in` = ParameterIn.PATH, description = "name of saveourtool project", required = true), @@ -190,7 +191,7 @@ class DemoManagerController( .flatMapIterable { it } @DeleteMapping("/{organizationName}/{projectName}/delete-file") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @Parameters( Parameter(name = "organizationName", `in` = ParameterIn.PATH, description = "name of saveourtool organization", required = true), Parameter(name = "projectName", `in` = ParameterIn.PATH, description = "name of saveourtool project", required = true), @@ -220,7 +221,7 @@ class DemoManagerController( } @PostMapping("/{organizationName}/{projectName}/delete") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @Parameters( Parameter(name = "organizationName", `in` = ParameterIn.PATH, description = "name of saveourtool organization", required = true), Parameter(name = "projectName", `in` = ParameterIn.PATH, description = "name of saveourtool project", required = true), @@ -246,7 +247,7 @@ class DemoManagerController( } @PostMapping("/{organizationName}/{projectName}/start") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @Parameters( Parameter(name = "organizationName", `in` = ParameterIn.PATH, description = "name of saveourtool organization", required = true), Parameter(name = "projectName", `in` = ParameterIn.PATH, description = "name of saveourtool project", required = true), @@ -272,7 +273,7 @@ class DemoManagerController( } @PostMapping("/{organizationName}/{projectName}/stop") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @Parameters( Parameter(name = "organizationName", `in` = ParameterIn.PATH, description = "name of saveourtool organization", required = true), Parameter(name = "projectName", `in` = ParameterIn.PATH, description = "name of saveourtool project", required = true), @@ -298,7 +299,7 @@ class DemoManagerController( } @GetMapping("/{organizationName}/{projectName}/logs") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @Parameters( Parameter(name = "organizationName", `in` = ParameterIn.PATH, description = "name of saveourtool organization", required = true), Parameter(name = "projectName", `in` = ParameterIn.PATH, description = "name of saveourtool project", required = true), diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/DownloadFilesController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/DownloadFilesController.kt index 9aa9f310df..61c739e638 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/DownloadFilesController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/DownloadFilesController.kt @@ -1,12 +1,12 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.v1 import com.saveourtool.save.backend.service.* import com.saveourtool.save.backend.storage.* -import com.saveourtool.save.configs.ApiSwaggerSupport import com.saveourtool.save.domain.* import com.saveourtool.save.entities.TestExecution import com.saveourtool.save.utils.* -import com.saveourtool.save.v1 import io.swagger.v3.oas.annotations.tags.Tag import io.swagger.v3.oas.annotations.tags.Tags @@ -22,7 +22,7 @@ import java.nio.ByteBuffer * A Spring controller for file downloading */ @RestController -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @Tags( Tag(name = "files"), ) @@ -37,7 +37,7 @@ class DownloadFilesController( * @throws ResponseStatusException if request is invalid or result cannot be returned */ @Suppress("ThrowsCount", "UnsafeCallOnNullableType") - @GetMapping(path = ["/api/$v1/files/get-debug-info"]) + @GetMapping(path = ["/api/${com.saveourtool.common.v1}/files/get-debug-info"]) fun getDebugInfo( @RequestParam testExecutionId: Long, ): Flux = debugInfoStorage.download(testExecutionId) @@ -52,7 +52,7 @@ class DownloadFilesController( * @throws ResponseStatusException if request is invalid or result cannot be returned */ @Suppress("ThrowsCount", "UnsafeCallOnNullableType") - @GetMapping(path = ["/api/$v1/files/get-execution-info"]) + @GetMapping(path = ["/api/${com.saveourtool.common.v1}/files/get-execution-info"]) fun getExecutionInfo( @RequestParam executionId: Long, ): Flux = executionInfoStorage.download(executionId) diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ExecutionController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ExecutionController.kt index 825b7317ff..3bb335d3ce 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ExecutionController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ExecutionController.kt @@ -1,5 +1,6 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.v1 import com.saveourtool.save.backend.service.ExecutionService import com.saveourtool.save.backend.storage.ExecutionInfoStorage import com.saveourtool.save.backend.utils.toMonoOrNotFound @@ -17,7 +18,6 @@ import com.saveourtool.save.service.ProjectService import com.saveourtool.save.utils.blockingMap import com.saveourtool.save.utils.orNotFound import com.saveourtool.save.utils.switchIfEmptyToNotFound -import com.saveourtool.save.v1 import org.slf4j.LoggerFactory import org.springframework.http.HttpStatus @@ -72,7 +72,7 @@ class ExecutionController(private val executionService: ExecutionService, * @param authentication * @return execution if it has been found */ - @GetMapping(path = ["/api/$v1/execution", "/internal/execution"]) + @GetMapping(path = ["/api/${com.saveourtool.common.v1}/execution", "/internal/execution"]) @Transactional(readOnly = true) @Suppress("UnsafeCallOnNullableType") fun getExecution( @@ -100,7 +100,7 @@ class ExecutionController(private val executionService: ExecutionService, * @param authentication * @return execution dto */ - @GetMapping(path = ["/api/$v1/executionDto"]) + @GetMapping(path = ["/api/${com.saveourtool.common.v1}/executionDto"]) fun getExecutionDto(@RequestParam executionId: Long, authentication: Authentication): Mono = executionService.findExecution(executionId) .toMonoOrNotFound() @@ -115,7 +115,7 @@ class ExecutionController(private val executionService: ExecutionService, * @return list of execution dtos */ @Suppress("PARAMETER_NAME_IN_OUTER_LAMBDA") - @PostMapping(path = ["/api/$v1/executionDtoList"]) + @PostMapping(path = ["/api/${com.saveourtool.common.v1}/executionDtoList"]) fun getExecutionByProject( @RequestParam projectName: String, @RequestParam organizationName: String, @@ -159,7 +159,7 @@ class ExecutionController(private val executionService: ExecutionService, * @return Execution * @throws ResponseStatusException if execution is not found */ - @GetMapping(path = ["/api/$v1/latestExecution"]) + @GetMapping(path = ["/api/${com.saveourtool.common.v1}/latestExecution"]) fun getLatestExecutionForProject(@RequestParam name: String, @RequestParam organizationName: String, authentication: Authentication): Mono = Mono.justOrEmpty( executionService.getLatestExecutionByProjectNameAndProjectOrganizationName(name, organizationName) @@ -178,7 +178,7 @@ class ExecutionController(private val executionService: ExecutionService, * @param authentication * @return ResponseEntity */ - @PostMapping(path = ["/api/$v1/execution/delete-all-except-contest"]) + @PostMapping(path = ["/api/${com.saveourtool.common.v1}/execution/delete-all-except-contest"]) @Suppress("UnsafeCallOnNullableType") fun deleteExecutionForProject( @RequestParam name: String, @@ -208,7 +208,7 @@ class ExecutionController(private val executionService: ExecutionService, * - status 404 if all executions are missing or the project is hidden from the current user * @throws ResponseStatusException */ - @PostMapping(path = ["/api/$v1/execution/delete"]) + @PostMapping(path = ["/api/${com.saveourtool.common.v1}/execution/delete"]) @Suppress("TOO_LONG_FUNCTION", "NonBooleanPropertyPrefixedWithIs") fun deleteExecutionsByExecutionIds(@RequestParam executionIds: List, authentication: Authentication): Mono> { val isProjectHidden = AtomicBoolean(false) diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/FileController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/FileController.kt index a2b91a962e..c2d3b38eab 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/FileController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/FileController.kt @@ -1,14 +1,14 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.v1 import com.saveourtool.save.backend.storage.FileStorage -import com.saveourtool.save.configs.ApiSwaggerSupport import com.saveourtool.save.entities.FileDto import com.saveourtool.save.entities.Project import com.saveourtool.save.permission.Permission import com.saveourtool.save.service.ProjectService import com.saveourtool.save.utils.* import com.saveourtool.save.utils.ByteBufferFluxResponse -import com.saveourtool.save.v1 import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -37,8 +37,8 @@ typealias FileDtoResponse = ResponseEntity * A Spring controller for [FileDto] */ @RestController -@RequestMapping("/api/$v1/files") -@ApiSwaggerSupport +@RequestMapping("/api/${com.saveourtool.common.v1}/files") +@com.saveourtool.common.configs.ApiSwaggerSupport @Tags( Tag(name = "files"), ) diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkContestProjectController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkContestProjectController.kt index cb38152608..1bbed5f0e1 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkContestProjectController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkContestProjectController.kt @@ -7,10 +7,11 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.userId import com.saveourtool.save.backend.service.* -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.configs.RequiresAuthorizationSourceHeader import com.saveourtool.save.entities.LnkContestProject import com.saveourtool.save.entities.contest.ContestResult import com.saveourtool.save.execution.ExecutionDto @@ -18,7 +19,6 @@ import com.saveourtool.save.permission.Permission import com.saveourtool.save.service.LnkUserProjectService import com.saveourtool.save.service.ProjectService import com.saveourtool.save.utils.* -import com.saveourtool.save.v1 import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -42,12 +42,12 @@ import reactor.kotlin.core.util.function.component2 /** * Controller for processing links between projects and contests with scores */ -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @Tags( Tag(name = "contests"), ) @RestController -@RequestMapping("/api/$v1/contests") +@RequestMapping("/api/${com.saveourtool.common.v1}/contests") class LnkContestProjectController( private val lnkContestProjectService: LnkContestProjectService, private val lnkContestExecutionService: LnkContestExecutionService, @@ -98,7 +98,7 @@ class LnkContestProjectController( } @GetMapping("/{contestName}/eligible-projects") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "GET", @@ -123,7 +123,7 @@ class LnkContestProjectController( } @GetMapping("/{organizationName}/{projectName}/eligible-contests") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "GET", @@ -182,7 +182,7 @@ class LnkContestProjectController( } @GetMapping("/{contestName}/executions/{organizationName}/{projectName}/latest") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "GET", @@ -224,7 +224,7 @@ class LnkContestProjectController( @GetMapping("/{contestName}/enroll") @PreAuthorize("isAuthenticated()") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @Operation( method = "GET", summary = "Register for a contest.", @@ -276,7 +276,7 @@ class LnkContestProjectController( @GetMapping("/{contestName}/my-results") @PreAuthorize("isAuthenticated()") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @Operation( method = "GET", summary = "Get your best results in contest.", diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkOrganizationTestSuiteController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkOrganizationTestSuiteController.kt index e8f9c2bff7..49838df62e 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkOrganizationTestSuiteController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkOrganizationTestSuiteController.kt @@ -7,12 +7,13 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.v1 import com.saveourtool.save.backend.security.TestSuitePermissionEvaluator import com.saveourtool.save.backend.service.LnkOrganizationTestSuiteService import com.saveourtool.save.backend.service.TestSuitesService import com.saveourtool.save.backend.service.TestsSourceVersionService -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.configs.RequiresAuthorizationSourceHeader import com.saveourtool.save.domain.Role import com.saveourtool.save.domain.isAllowedForContests import com.saveourtool.save.entities.LnkOrganizationTestSuiteDto @@ -27,7 +28,6 @@ import com.saveourtool.save.testsuite.TestSuiteVersioned import com.saveourtool.save.utils.StringResponse import com.saveourtool.save.utils.switchIfEmptyToNotFound import com.saveourtool.save.utils.switchIfEmptyToResponseException -import com.saveourtool.save.v1 import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -50,14 +50,14 @@ import reactor.kotlin.core.util.function.component2 /** * Controller for processing links between organizations and their rights over test suites */ -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @Tags( Tag(name = "rights"), Tag(name = "organizations"), Tag(name = "test-suites"), ) @RestController -@RequestMapping("/api/$v1/test-suites") +@RequestMapping("/api/${com.saveourtool.common.v1}/test-suites") class LnkOrganizationTestSuiteController( private val lnkOrganizationTestSuiteService: LnkOrganizationTestSuiteService, private val organizationService: OrganizationService, @@ -67,7 +67,7 @@ class LnkOrganizationTestSuiteController( private val testsSourceVersionService: TestsSourceVersionService, ) { @GetMapping("/{organizationName}/available") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -122,7 +122,7 @@ class LnkOrganizationTestSuiteController( .mapToInfo(isContest) @PostMapping("/{organizationName}/get-by-ids") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", @@ -182,7 +182,7 @@ class LnkOrganizationTestSuiteController( .mapToInfo(isContest) @GetMapping("/{organizationName}/{testSuiteId}") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -212,7 +212,7 @@ class LnkOrganizationTestSuiteController( } @PostMapping("/{ownerOrganizationName}/{testSuiteId}") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", @@ -265,7 +265,7 @@ class LnkOrganizationTestSuiteController( } @PostMapping("/{ownerOrganizationName}/batch-set-rights") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", @@ -335,7 +335,7 @@ class LnkOrganizationTestSuiteController( } @DeleteMapping("/{ownerOrganizationName}/{testSuiteId}/{requestedOrganizationName}") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "DELETE", @@ -379,7 +379,7 @@ class LnkOrganizationTestSuiteController( } @PostMapping("/{ownerOrganizationName}/batch-change-visibility") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkUserOrganizationController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkUserOrganizationController.kt index fee354dfc1..98fb38401b 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkUserOrganizationController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkUserOrganizationController.kt @@ -7,10 +7,11 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.userId import com.saveourtool.save.authservice.utils.username -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.configs.RequiresAuthorizationSourceHeader import com.saveourtool.save.domain.Role import com.saveourtool.save.entities.Organization import com.saveourtool.save.entities.OrganizationWithUsers @@ -24,7 +25,6 @@ import com.saveourtool.save.service.OrganizationService import com.saveourtool.save.utils.StringResponse import com.saveourtool.save.utils.switchIfEmptyToNotFound import com.saveourtool.save.utils.switchIfEmptyToResponseException -import com.saveourtool.save.v1 import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -47,13 +47,13 @@ import reactor.kotlin.core.util.function.component2 /** * Controller for processing links between users and their roles in organizations */ -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @Tags( Tag(name = "roles"), Tag(name = "organizations"), ) @RestController -@RequestMapping("/api/$v1/organizations") +@RequestMapping("/api/${com.saveourtool.common.v1}/organizations") class LnkUserOrganizationController( private val lnkUserOrganizationService: LnkUserOrganizationService, private val organizationService: OrganizationService, @@ -117,7 +117,7 @@ class LnkUserOrganizationController( } ?: Role.NONE.toMono() @PostMapping("/{organizationName}/users/roles") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", @@ -150,7 +150,7 @@ class LnkUserOrganizationController( } @DeleteMapping("/{organizationName}/users/roles/{userName}") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "DELETE", @@ -181,7 +181,7 @@ class LnkUserOrganizationController( } @GetMapping("/{organizationName}/users/not-from") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -231,7 +231,7 @@ class LnkUserOrganizationController( .defaultIfEmpty(emptyList()) @GetMapping("/can-create-contests") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -248,7 +248,7 @@ class LnkUserOrganizationController( ) @PostMapping("/by-filters") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkUserProjectController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkUserProjectController.kt index 797590d98f..ce38c28106 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkUserProjectController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkUserProjectController.kt @@ -7,9 +7,10 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.userId -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.configs.RequiresAuthorizationSourceHeader import com.saveourtool.save.entities.ProjectDto import com.saveourtool.save.info.UserInfo import com.saveourtool.save.permission.Permission @@ -17,7 +18,6 @@ import com.saveourtool.save.security.ProjectPermissionEvaluator import com.saveourtool.save.service.LnkUserProjectService import com.saveourtool.save.service.ProjectService import com.saveourtool.save.utils.switchIfEmptyToNotFound -import com.saveourtool.save.v1 import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -38,19 +38,19 @@ import reactor.kotlin.core.util.function.component2 /** * Controller for processing links between users and their roles in projects */ -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @Tags( Tag(name = "projects"), ) @RestController -@RequestMapping("/api/$v1/projects") +@RequestMapping("/api/${com.saveourtool.common.v1}/projects") class LnkUserProjectController( private val lnkUserProjectService: LnkUserProjectService, private val projectService: ProjectService, private val projectPermissionEvaluator: ProjectPermissionEvaluator, ) { @GetMapping(path = ["/get-for-current-user"]) - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @Operation( method = "GET", summary = "Get projects of current authenticated user", @@ -67,7 +67,7 @@ class LnkUserProjectController( .map { it.toDto() } @GetMapping(path = ["/{organizationName}/{projectName}/users"]) - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -103,7 +103,7 @@ class LnkUserProjectController( .defaultIfEmpty(emptyList()) @GetMapping("/{organizationName}/{projectName}/users/not-from") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "GET", diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/NotificationController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/NotificationController.kt index 673e5458ca..2331aecdf1 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/NotificationController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/NotificationController.kt @@ -1,13 +1,14 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.username import com.saveourtool.save.backend.service.NotificationService -import com.saveourtool.save.configs.ApiSwaggerSupport import com.saveourtool.save.entities.NotificationDto import com.saveourtool.save.utils.StringResponse import com.saveourtool.save.utils.blockingToFlux import com.saveourtool.save.utils.blockingToMono -import com.saveourtool.save.v1 + import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.responses.ApiResponse import io.swagger.v3.oas.annotations.tags.Tag @@ -24,12 +25,12 @@ import reactor.core.publisher.Mono /** * Controller for working with notifications. */ -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @Tags( Tag(name = "notifications"), ) @RestController -@RequestMapping(path = ["/api/$v1/notifications"]) +@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/notifications"]) class NotificationController( private val notificationService: NotificationService, ) { diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/OrganizationController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/OrganizationController.kt index 566f254525..96a6b67d9d 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/OrganizationController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/OrganizationController.kt @@ -1,11 +1,12 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.userId import com.saveourtool.save.backend.configs.ConfigProperties import com.saveourtool.save.backend.service.* import com.saveourtool.save.backend.storage.TestsSourceSnapshotStorage -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.configs.RequiresAuthorizationSourceHeader import com.saveourtool.save.domain.OrganizationSaveStatus.* import com.saveourtool.save.domain.Role import com.saveourtool.save.entities.* @@ -16,7 +17,6 @@ import com.saveourtool.save.service.GitService import com.saveourtool.save.service.LnkUserOrganizationService import com.saveourtool.save.service.OrganizationService import com.saveourtool.save.utils.* -import com.saveourtool.save.v1 import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -41,6 +41,7 @@ import reactor.core.scheduler.Schedulers import reactor.kotlin.core.publisher.toMono import reactor.kotlin.core.util.function.component1 import reactor.kotlin.core.util.function.component2 + import java.util.EnumSet typealias OrganizationDtoList = List @@ -48,12 +49,12 @@ typealias OrganizationDtoList = List /** * Controller for working with organizations. */ -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @Tags( Tag(name = "organizations"), ) @RestController -@RequestMapping(path = ["/api/$v1/organizations"]) +@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/organizations"]) @Suppress("LongParameterList") internal class OrganizationController( private val organizationService: OrganizationService, @@ -209,7 +210,7 @@ internal class OrganizationController( .collectList() @PostMapping("/{organizationName}/manage-contest-permission") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("hasRole('ROLE_SUPER_ADMIN')") @Operation( method = "POST", @@ -251,7 +252,7 @@ internal class OrganizationController( } @PostMapping("/{organizationName}/manage-bulk-upload-permission") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("hasRole('ROLE_SUPER_ADMIN')") @Operation( method = "POST", @@ -286,7 +287,7 @@ internal class OrganizationController( } @PostMapping("/save") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "POST", @@ -319,7 +320,7 @@ internal class OrganizationController( } @PostMapping("/{organizationName}/update") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "POST", @@ -370,7 +371,7 @@ internal class OrganizationController( } @PostMapping("/{organizationName}/change-status") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "POST", @@ -433,7 +434,7 @@ internal class OrganizationController( } @GetMapping("/{organizationName}/list-git") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "GET", @@ -464,7 +465,7 @@ internal class OrganizationController( .map { it.toDto() } @PostMapping("/{organizationName}/create-git") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "POST", @@ -485,7 +486,7 @@ internal class OrganizationController( ): Mono = upsertGitCredential(organizationName, gitDto, authentication, isUpdate = false) @PostMapping("/{organizationName}/update-git") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "POST", @@ -506,7 +507,7 @@ internal class OrganizationController( ): Mono = upsertGitCredential(organizationName, gitDto, authentication, isUpdate = true) @DeleteMapping("/{organizationName}/delete-git") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "DELETE", @@ -568,7 +569,7 @@ internal class OrganizationController( * @return contest rating for organization */ @GetMapping("/{organizationName}/get-organization-contest-rating") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "Get", diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/PermissionController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/PermissionController.kt index 5a88445faf..66e0bea94e 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/PermissionController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/PermissionController.kt @@ -1,9 +1,10 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.username import com.saveourtool.save.backend.service.PermissionService -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.configs.RequiresAuthorizationSourceHeader import com.saveourtool.save.domain.Role import com.saveourtool.save.permission.Permission import com.saveourtool.save.permission.SetRoleRequest @@ -13,7 +14,6 @@ import com.saveourtool.save.service.OrganizationService import com.saveourtool.save.service.ProjectService import com.saveourtool.save.utils.switchIfEmptyToNotFound import com.saveourtool.save.utils.trace -import com.saveourtool.save.v1 import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -40,13 +40,13 @@ import reactor.kotlin.core.publisher.toMono import reactor.kotlin.core.util.function.component1 import reactor.kotlin.core.util.function.component2 -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @Tags( Tag(name = "projects"), Tag(name = "roles"), ) @RestController -@RequestMapping(path = ["/api/$v1"]) +@RequestMapping(path = ["/api/${com.saveourtool.common.v1}"]) @Suppress("MISSING_KDOC_TOP_LEVEL") class PermissionController( private val projectService: ProjectService, @@ -56,7 +56,7 @@ class PermissionController( private val organizationPermissionEvaluator: OrganizationPermissionEvaluator, ) { @GetMapping("/projects/{organizationName}/{projectName}/users/roles") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @Operation( method = "GET", summary = "Get role for a user on a particular project.", @@ -91,7 +91,7 @@ class PermissionController( .switchIfEmptyToNotFound() @PostMapping("/projects/{organizationName}/{projectName}/users/roles") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @Operation( method = "POST", summary = "Set role for a user on a particular project", @@ -128,7 +128,7 @@ class PermissionController( } @DeleteMapping("/projects/{organizationName}/{projectName}/users/roles/{userName}") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @Operation( method = "DELETE", summary = "Removes user's role on a particular project", diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ProjectController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ProjectController.kt index 68424cc558..55d7e4b0d2 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ProjectController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ProjectController.kt @@ -1,9 +1,10 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.userId import com.saveourtool.save.backend.service.ProjectProblemService -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.configs.RequiresAuthorizationSourceHeader import com.saveourtool.save.domain.ProjectSaveStatus import com.saveourtool.save.domain.Role import com.saveourtool.save.entities.* @@ -15,7 +16,6 @@ import com.saveourtool.save.service.LnkUserProjectService import com.saveourtool.save.service.OrganizationService import com.saveourtool.save.service.ProjectService import com.saveourtool.save.utils.* -import com.saveourtool.save.v1 import com.saveourtool.save.validation.NAMING_MAX_LENGTH import com.saveourtool.save.validation.isValidLengthName @@ -38,17 +38,18 @@ import reactor.kotlin.core.publisher.switchIfEmpty import reactor.kotlin.core.publisher.toMono import reactor.kotlin.core.util.function.component1 import reactor.kotlin.core.util.function.component2 + import java.util.* /** * Controller for working with projects. */ -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @Tags( Tag(name = "projects"), ) @RestController -@RequestMapping(path = ["/api/$v1/projects"]) +@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/projects"]) class ProjectController( private val projectService: ProjectService, private val projectProblemService: ProjectProblemService, @@ -57,7 +58,7 @@ class ProjectController( private val lnkUserProjectService: LnkUserProjectService, ) { @GetMapping("/") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -121,7 +122,7 @@ class ProjectController( } @PostMapping("/save") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", @@ -179,7 +180,7 @@ class ProjectController( } @PostMapping("/update") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", @@ -211,7 +212,7 @@ class ProjectController( } @PostMapping("/{organizationName}/{projectName}/change-status") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/RunExecutionController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/RunExecutionController.kt index 7f99b4fafc..02e3376410 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/RunExecutionController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/RunExecutionController.kt @@ -1,5 +1,6 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.username import com.saveourtool.save.backend.configs.ConfigProperties import com.saveourtool.save.backend.service.* @@ -16,7 +17,6 @@ import com.saveourtool.save.service.ProjectService import com.saveourtool.save.spring.utils.applyAll import com.saveourtool.save.storage.impl.InternalFileKey import com.saveourtool.save.utils.* -import com.saveourtool.save.v1 import com.fasterxml.jackson.databind.ObjectMapper import io.micrometer.core.instrument.MeterRegistry @@ -40,7 +40,7 @@ import reactor.core.scheduler.Schedulers * Controller for running execution */ @RestController -@RequestMapping("/api/$v1/run") +@RequestMapping("/api/${com.saveourtool.common.v1}/run") @Suppress("LongParameterList") class RunExecutionController( private val projectService: ProjectService, diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/TestExecutionController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/TestExecutionController.kt index 2c2ba52b84..d31f19c85a 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/TestExecutionController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/TestExecutionController.kt @@ -1,17 +1,18 @@ package com.saveourtool.save.backend.controllers -import com.saveourtool.save.agent.TestExecutionDto -import com.saveourtool.save.agent.TestExecutionExtDto -import com.saveourtool.save.agent.TestExecutionResult -import com.saveourtool.save.agent.TestSuiteExecutionStatisticDto +import com.saveourtool.common.agent.TestExecutionDto +import com.saveourtool.common.agent.TestExecutionExtDto +import com.saveourtool.common.agent.TestExecutionResult +import com.saveourtool.common.agent.TestSuiteExecutionStatisticDto +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.v1 import com.saveourtool.save.backend.service.ExecutionService import com.saveourtool.save.backend.service.TestAnalysisService import com.saveourtool.save.backend.service.TestExecutionService import com.saveourtool.save.backend.storage.DebugInfoStorage import com.saveourtool.save.backend.storage.ExecutionInfoStorage import com.saveourtool.save.backend.utils.toMonoOrNotFound -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.configs.RequiresAuthorizationSourceHeader import com.saveourtool.save.domain.TestResultLocation import com.saveourtool.save.domain.TestResultStatus import com.saveourtool.save.entities.TestExecution @@ -23,7 +24,6 @@ import com.saveourtool.save.test.analysis.api.testId import com.saveourtool.save.test.analysis.entities.metadata import com.saveourtool.save.test.analysis.metrics.TestMetrics import com.saveourtool.save.utils.* -import com.saveourtool.save.v1 import arrow.core.plus import io.swagger.v3.oas.annotations.tags.Tag @@ -49,7 +49,7 @@ import java.math.BigInteger * * @param testExecutionService service for test execution */ -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @Tags( Tag(name = "test-executions"), ) @@ -77,8 +77,8 @@ class TestExecutionController( * @param testAnalysis if `true`, also perform test analysis. * @return a list of [TestExecutionDto]s */ - @PostMapping("/api/$v1/test-executions") - @RequiresAuthorizationSourceHeader + @PostMapping("/api/${com.saveourtool.common.v1}/test-executions") + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @Suppress("LongParameterList", "TOO_MANY_PARAMETERS", "TYPE_ALIAS") fun getTestExecutions( @RequestParam executionId: Long, @@ -88,7 +88,7 @@ class TestExecutionController( @RequestParam(required = false, defaultValue = "false") checkDebugInfo: Boolean, @RequestParam(required = false, defaultValue = "false") testAnalysis: Boolean, authentication: Authentication, - ): Flux = blockingToMono { + ): Flux = blockingToMono { executionService.findExecution(executionId) } .switchIfEmptyToNotFound() @@ -132,7 +132,7 @@ class TestExecutionController( ) .zipWith( testAnalysisService.analyze(testId).collectList(), - Pair::plus, + Pair::plus, ) }.flatMap { (testExecution, metrics, results) -> if (checkDebugInfo) { @@ -155,7 +155,7 @@ class TestExecutionController( } } - private fun TestExecutionDto.hasDebugInfoAsMono() = debugInfoStorage.doesExist(requiredId()) + private fun com.saveourtool.common.agent.TestExecutionDto.hasDebugInfoAsMono() = debugInfoStorage.doesExist(requiredId()) .logicalOr(executionInfoStorage.doesExist(executionId)) .switchIfEmptyToResponseException(HttpStatus.INTERNAL_SERVER_ERROR) { "Failure while checking for debug info availability." @@ -169,8 +169,8 @@ class TestExecutionController( * @param authentication * @return a list of [TestExecutionDto]s */ - @GetMapping(path = ["/api/$v1/testLatestExecutions"]) - @RequiresAuthorizationSourceHeader + @GetMapping(path = ["/api/${com.saveourtool.common.v1}/testLatestExecutions"]) + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @Suppress("TYPE_ALIAS", "MagicNumber") fun getTestExecutionsByStatus( @RequestParam executionId: Long, @@ -178,7 +178,7 @@ class TestExecutionController( @RequestParam(required = false) page: Int?, @RequestParam(required = false) size: Int?, authentication: Authentication, - ): Mono> = + ): Mono> = executionService.findExecution(executionId) .toMonoOrNotFound() .filterWhen { @@ -187,11 +187,21 @@ class TestExecutionController( .mapNotNull { if (page == null || size == null) { testExecutionService.getAllTestExecutions(executionId).groupBy { it.test.testSuite.name }.map { (testSuiteName, testExecutions) -> - TestSuiteExecutionStatisticDto(testSuiteName, testExecutions.count(), testExecutions.count { it.status == status }, status) + com.saveourtool.common.agent.TestSuiteExecutionStatisticDto( + testSuiteName, + testExecutions.count(), + testExecutions.count { it.status == status }, + status + ) } } else { testExecutionService.getByExecutionIdGroupByTestSuite(executionId, status, page, size)?.map { - TestSuiteExecutionStatisticDto(it[0] as String, (it[1] as BigInteger).toInt(), (it[2] as BigInteger).toInt(), TestResultStatus.valueOf(it[3] as String)) + com.saveourtool.common.agent.TestSuiteExecutionStatisticDto( + it[0] as String, + (it[1] as BigInteger).toInt(), + (it[2] as BigInteger).toInt(), + TestResultStatus.valueOf(it[3] as String) + ) } } } @@ -204,12 +214,12 @@ class TestExecutionController( * @param authentication * @return TestExecution */ - @PostMapping(path = ["/api/$v1/test-execution"]) - @RequiresAuthorizationSourceHeader + @PostMapping(path = ["/api/${com.saveourtool.common.v1}/test-execution"]) + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader fun getTestExecutionByLocation(@RequestParam executionId: Long, @RequestBody testResultLocation: TestResultLocation, authentication: Authentication, - ): Mono = executionService.findExecution(executionId) + ): Mono = executionService.findExecution(executionId) .toMonoOrNotFound() .filterWhen { projectPermissionEvaluator.checkPermissions(authentication, it, Permission.READ) @@ -230,8 +240,8 @@ class TestExecutionController( * @param testSuite * @param authentication */ - @GetMapping(path = ["/api/$v1/testExecution/count"]) - @RequiresAuthorizationSourceHeader + @GetMapping(path = ["/api/${com.saveourtool.common.v1}/testExecution/count"]) + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader fun getTestExecutionsCount( @RequestParam executionId: Long, @RequestParam(required = false) status: TestResultStatus?, @@ -279,7 +289,7 @@ class TestExecutionController( * @return response */ @PostMapping(value = ["/internal/saveTestResult"]) - fun saveTestResult(@RequestBody testExecutionResults: List): ResponseEntity = try { + fun saveTestResult(@RequestBody testExecutionResults: List): ResponseEntity = try { if (testExecutionResults.isEmpty()) { ResponseEntity.status(HttpStatus.BAD_REQUEST).body("Empty result cannot be saved") } else if (testExecutionService.saveTestResult(testExecutionResults).isEmpty()) { diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/TestSuitesSourceController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/TestSuitesSourceController.kt index bf1d5fbd08..7d9b34f5d6 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/TestSuitesSourceController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/TestSuitesSourceController.kt @@ -1,10 +1,11 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.userId import com.saveourtool.save.backend.service.* import com.saveourtool.save.backend.utils.toResponseEntity -import com.saveourtool.save.configs.ApiSwaggerSupport -import com.saveourtool.save.configs.RequiresAuthorizationSourceHeader import com.saveourtool.save.domain.EntitySaveStatus import com.saveourtool.save.entities.* import com.saveourtool.save.entities.TestSuitesSource.Companion.toTestSuiteSource @@ -13,7 +14,6 @@ import com.saveourtool.save.service.OrganizationService import com.saveourtool.save.test.TestsSourceVersionInfoList import com.saveourtool.save.testsuite.* import com.saveourtool.save.utils.* -import com.saveourtool.save.v1 import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -38,12 +38,12 @@ typealias EntitySaveStatusResponse = ResponseEntity /** * Controller for [TestSuitesSource] */ -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @RestController @Tags( Tag(name = "test-suites-source"), ) -@RequestMapping("/api/$v1/test-suites-sources") +@RequestMapping("/api/${com.saveourtool.common.v1}/test-suites-sources") class TestSuitesSourceController( private val testSuitesSourceService: TestSuitesSourceService, private val testsSourceVersionService: TestsSourceVersionService, @@ -51,7 +51,7 @@ class TestSuitesSourceController( private val gitService: GitService, ) { @GetMapping("/{organizationName}/list") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -72,7 +72,7 @@ class TestSuitesSourceController( } @GetMapping("/{organizationName}/{sourceName}") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -95,7 +95,7 @@ class TestSuitesSourceController( .map { it.toDto() } @GetMapping("/{organizationName}/{sourceName}/list-version") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -121,7 +121,7 @@ class TestSuitesSourceController( } @GetMapping("/{organizationName}/list-version") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -141,7 +141,7 @@ class TestSuitesSourceController( } @PostMapping("/create") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", @@ -166,7 +166,7 @@ class TestSuitesSourceController( } @PostMapping("/update") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", @@ -206,7 +206,7 @@ class TestSuitesSourceController( } @DeleteMapping("/{organizationName}/{sourceName}/delete-version") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "DELETE", @@ -260,7 +260,7 @@ class TestSuitesSourceController( } @PostMapping("/{organizationName}/{sourceName}/fetch") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", @@ -293,7 +293,7 @@ class TestSuitesSourceController( } @GetMapping("/{organizationName}/{sourceName}/tag-list-to-fetch") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -313,7 +313,7 @@ class TestSuitesSourceController( } @GetMapping("/{organizationName}/{sourceName}/branch-list-to-fetch") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -329,7 +329,7 @@ class TestSuitesSourceController( .map { ResponseEntity.ok().body(it) } @GetMapping("/available") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/UserPermissionController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/UserPermissionController.kt index a84bf709fa..5cbaeb4591 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/UserPermissionController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/UserPermissionController.kt @@ -1,10 +1,11 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.v1 import com.saveourtool.save.backend.security.UserPermissionEvaluator -import com.saveourtool.save.configs.ApiSwaggerSupport import com.saveourtool.save.info.UserPermissions import com.saveourtool.save.utils.blockingToMono -import com.saveourtool.save.v1 + import org.springframework.security.core.Authentication import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.RequestMapping @@ -15,9 +16,9 @@ import reactor.core.publisher.Mono /** * Controller for user permissions. */ -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @RestController -@RequestMapping(path = ["/api/$v1"]) +@RequestMapping(path = ["/api/${com.saveourtool.common.v1}"]) class UserPermissionController( private val userPermissionEvaluator: UserPermissionEvaluator, ) { diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/UsersDetailsController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/UsersDetailsController.kt index b6d71f6ea1..aeeeaed4df 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/UsersDetailsController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/UsersDetailsController.kt @@ -1,9 +1,10 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.SaveUserDetails import com.saveourtool.save.authservice.utils.userId import com.saveourtool.save.backend.configs.ConfigProperties -import com.saveourtool.save.configs.RequiresAuthorizationSourceHeader import com.saveourtool.save.domain.UserSaveStatus import com.saveourtool.save.entities.User import com.saveourtool.save.info.UserInfo @@ -11,8 +12,8 @@ import com.saveourtool.save.info.UserStatus import com.saveourtool.save.repository.UserRepository import com.saveourtool.save.service.UserService import com.saveourtool.save.utils.* -import com.saveourtool.save.v1 import com.saveourtool.save.validation.isValidLengthName + import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter import io.swagger.v3.oas.annotations.Parameters @@ -21,7 +22,6 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse import org.springframework.boot.web.reactive.function.client.WebClientCustomizer import org.springframework.data.domain.Pageable import org.springframework.data.repository.findByIdOrNull - import org.springframework.http.HttpStatus import org.springframework.http.ResponseEntity import org.springframework.security.access.prepost.PreAuthorize @@ -37,7 +37,7 @@ import reactor.kotlin.core.publisher.toMono * Controller that handles operation with users */ @RestController -@RequestMapping(path = ["/api/$v1/users"]) +@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/users"]) class UsersDetailsController( private val userRepository: UserRepository, private val userDetailsService: UserService, @@ -78,7 +78,7 @@ class UsersDetailsController( ), ) @ApiResponse(responseCode = "200", description = "Successfully fetched users.") - @RequiresAuthorizationSourceHeader + @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader fun findByPrefix( @RequestParam prefix: String, @RequestParam(required = false, defaultValue = "5") pageSize: Int, diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/AgentsController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/AgentsController.kt index 5ac26e7251..9cae95986c 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/AgentsController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/AgentsController.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.backend.controllers.internal -import com.saveourtool.save.agent.* +import com.saveourtool.common.agent.* import com.saveourtool.save.backend.configs.ConfigProperties import com.saveourtool.save.backend.repository.AgentStatusRepository import com.saveourtool.save.backend.service.AgentService @@ -10,10 +10,10 @@ import com.saveourtool.save.backend.service.TestService import com.saveourtool.save.backend.storage.BackendInternalFileStorage import com.saveourtool.save.backend.storage.FileStorage import com.saveourtool.save.backend.storage.TestsSourceSnapshotStorage -import com.saveourtool.save.entities.* -import com.saveourtool.save.storage.impl.InternalFileKey -import com.saveourtool.save.test.TestDto -import com.saveourtool.save.utils.* +import com.saveourtool.common.entities.* +import com.saveourtool.common.storage.impl.InternalFileKey +import com.saveourtool.common.test.TestDto +import com.saveourtool.common.utils.* import org.slf4j.LoggerFactory import org.springframework.http.HttpStatus @@ -57,7 +57,7 @@ class AgentsController( @GetMapping("/agents/get-init-config") fun getInitConfig( @RequestParam containerId: String, - ): Mono = getAgentByContainerIdAsMono(containerId) + ): Mono = getAgentByContainerIdAsMono(containerId) .map { agentService.getExecution(it) } @@ -90,7 +90,7 @@ class AgentsController( @Transactional fun getNextRunConfig( @RequestParam containerId: String, - ): Mono = getAgentByContainerIdAsMono(containerId) + ): Mono = getAgentByContainerIdAsMono(containerId) .map { agentService.getExecution(it) } @@ -101,7 +101,7 @@ class AgentsController( .map { (execution, testBatch) -> val backendUrl = configProperties.agentSettings.backendUrl - testBatch to AgentRunConfig( + testBatch to com.saveourtool.common.agent.AgentRunConfig( cliArgs = testBatch.constructCliCommand(), executionDataUploadUrl = "$backendUrl/internal/saveTestResult", debugInfoUploadUrl = "$backendUrl/internal/files/debug-info?executionId=${execution.requiredId()}" @@ -139,7 +139,7 @@ class AgentsController( fun updateAgentStatus(@RequestBody agentStatus: AgentStatusDto) { val latestAgentStatus = agentStatusRepository.findTopByAgentContainerIdOrderByEndTimeDescIdDesc(agentStatus.containerId) when (val latestState = latestAgentStatus?.state) { - AgentState.TERMINATED -> + com.saveourtool.common.agent.AgentState.TERMINATED -> throw ResponseStatusException(HttpStatus.CONFLICT, "Agent ${agentStatus.containerId} has state $latestState and shouldn't be updated") agentStatus.state -> { // updating time diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/TestSuitesController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/TestSuitesController.kt index 13457f879b..216b0f63da 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/TestSuitesController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/TestSuitesController.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.backend.controllers.internal +import com.saveourtool.common.configs.ApiSwaggerSupport import com.saveourtool.save.backend.service.TestSuitesService -import com.saveourtool.save.configs.ApiSwaggerSupport import com.saveourtool.save.entities.TestSuite import com.saveourtool.save.testsuite.TestSuiteDto import com.saveourtool.save.utils.blockingToMono @@ -17,7 +17,7 @@ import reactor.core.publisher.Mono /** * Controller for test suites */ -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @Tags( Tag(name = "test-suites"), Tag(name = "internal"), diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestExecutionService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestExecutionService.kt index 8d0ea9dff6..d942d7bc37 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestExecutionService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestExecutionService.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.backend.service -import com.saveourtool.save.agent.TestExecutionDto -import com.saveourtool.save.agent.TestExecutionResult +import com.saveourtool.common.agent.TestExecutionDto +import com.saveourtool.common.agent.TestExecutionResult import com.saveourtool.save.backend.repository.AgentRepository import com.saveourtool.save.backend.repository.ExecutionRepository import com.saveourtool.save.backend.repository.TestExecutionRepository @@ -146,7 +146,7 @@ class TestExecutionService( "PARAMETER_NAME_IN_OUTER_LAMBDA", ) @Transactional(propagation = Propagation.REQUIRES_NEW) - fun saveTestResult(testExecutionResults: List): List { + fun saveTestResult(testExecutionResults: List): List { log.debug { "Saving ${testExecutionResults.size} test results from agent ${testExecutionResults.first().agentContainerId}" } // we take agent id only from first element, because all test executions have same execution val agentContainerId = requireNotNull(testExecutionResults.first().agentContainerId) { @@ -157,7 +157,7 @@ class TestExecutionService( } val executionId = agentService.getExecution(agent).requiredId() - val lostTests: MutableList = mutableListOf() + val lostTests: MutableList = mutableListOf() val counters = Counters() testExecutionResults.forEach { testExecutionResult -> val foundTestExec = testExecutionRepository.findByExecutionIdAndTestPluginNameAndTestFilePath( diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/DatabaseTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/DatabaseTest.kt index 1587b2366c..9ab0dfbc7f 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/DatabaseTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/DatabaseTest.kt @@ -1,13 +1,13 @@ package com.saveourtool.save.backend -import com.saveourtool.save.agent.AgentState +import com.saveourtool.common.agent.AgentState import com.saveourtool.save.backend.configs.ApplicationConfiguration import com.saveourtool.save.backend.repository.AgentStatusRepository import com.saveourtool.save.backend.repository.TestExecutionRepository import com.saveourtool.save.backend.utils.InfraExtension -import com.saveourtool.save.domain.TestResultStatus -import com.saveourtool.save.repository.ProjectRepository -import com.saveourtool.save.utils.BlockingBridge +import com.saveourtool.common.domain.TestResultStatus +import com.saveourtool.common.repository.ProjectRepository +import com.saveourtool.common.utils.BlockingBridge import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/DownloadFilesTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/DownloadFilesTest.kt index 0af52031bc..bc1af82a84 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/DownloadFilesTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/DownloadFilesTest.kt @@ -8,7 +8,7 @@ import com.saveourtool.save.backend.controllers.internal.FileInternalController import com.saveourtool.save.backend.service.* import com.saveourtool.save.backend.storage.* import com.saveourtool.save.backend.utils.mutateMockedUser -import com.saveourtool.save.configs.WebConfig +import com.saveourtool.common.configs.WebConfig import com.saveourtool.save.core.result.DebugInfo import com.saveourtool.save.core.result.Pass import com.saveourtool.save.domain.* @@ -21,7 +21,7 @@ import com.saveourtool.save.service.UserService import com.saveourtool.save.utils.BlockingBridge import com.saveourtool.save.utils.CONTENT_LENGTH_CUSTOM import com.saveourtool.save.utils.collectToInputStream -import com.saveourtool.save.v1 +import com.saveourtool.common.v1 import org.jetbrains.annotations.Blocking import org.junit.jupiter.api.Assertions @@ -58,7 +58,7 @@ import kotlin.io.path.* @ActiveProfiles("test") @WebFluxTest(controllers = [DownloadFilesController::class, FileController::class, FileInternalController::class]) @Import( - WebConfig::class, + com.saveourtool.common.configs.WebConfig::class, NoopWebSecurityConfig::class, S11nTestConfig::class, ) @@ -141,7 +141,7 @@ class DownloadFilesTest { .thenAnswer { Mono.just(testProject) } webTestClient.get() - .uri("/api/$v1/files/download?fileId={fileId}", file1.requiredId()) + .uri("/api/${com.saveourtool.common.v1}/files/download?fileId={fileId}", file1.requiredId()) .accept(MediaType.APPLICATION_OCTET_STREAM) .exchange() .expectStatus() @@ -152,7 +152,7 @@ class DownloadFilesTest { } webTestClient.get() - .uri("/api/$v1/files/{organizationName}/{projectName}/list", testProject.organization.name, testProject.name) + .uri("/api/${com.saveourtool.common.v1}/files/{organizationName}/{projectName}/list", testProject.organization.name, testProject.name) .exchange() .expectStatus() .isOk @@ -168,7 +168,7 @@ class DownloadFilesTest { @Test fun `should return 404 for non-existent files`() { webTestClient.get() - .uri("/api/$v1/files/download/invalid-name") + .uri("/api/${com.saveourtool.common.v1}/files/download/invalid-name") .exchange() .expectStatus() .isNotFound @@ -200,7 +200,7 @@ class DownloadFilesTest { .build() webTestClient.post() - .uri("/api/$v1/files/Huawei/huaweiName/upload") + .uri("/api/${com.saveourtool.common.v1}/files/Huawei/huaweiName/upload") .contentType(MediaType.MULTIPART_FORM_DATA) .body(BodyInserters.fromMultipartData(body)) .header(CONTENT_LENGTH_CUSTOM, file.fileSize().toString()) diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/AgentsControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/AgentsControllerTest.kt index b3b62801e1..115e79f829 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/AgentsControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/AgentsControllerTest.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.backend.controller -import com.saveourtool.save.agent.AgentState +import com.saveourtool.common.agent.AgentState import com.saveourtool.save.backend.SaveApplication import com.saveourtool.save.backend.controllers.ProjectController import com.saveourtool.save.backend.repository.AgentRepository @@ -67,7 +67,7 @@ class AgentsControllerTest { .contentType(MediaType.APPLICATION_JSON) .accept(MediaType.APPLICATION_JSON) .bodyValue( - AgentStatusDto(AgentState.IDLE, "container-1") + AgentStatusDto(com.saveourtool.common.agent.AgentState.IDLE, "container-1") ) .exchange() .expectStatus() @@ -78,7 +78,7 @@ class AgentsControllerTest { @Suppress("TOO_LONG_FUNCTION") fun `check that agent statuses are updated`() { updateAgentStatuses( - AgentStatusDto(AgentState.IDLE, "container-2") + AgentStatusDto(com.saveourtool.common.agent.AgentState.IDLE, "container-2") ) val firstAgentIdle = getLastIdleForSecondContainer() @@ -89,21 +89,21 @@ class AgentsControllerTest { .contentType(MediaType.APPLICATION_JSON) .accept(MediaType.APPLICATION_JSON) .bodyValue( - AgentStatusDto(AgentState.IDLE, "container-2", LocalDateTime(2020, Month.MAY, 10, 16, 30, 20)) + AgentStatusDto(com.saveourtool.common.agent.AgentState.IDLE, "container-2", LocalDateTime(2020, Month.MAY, 10, 16, 30, 20)) ) .exchange() .expectStatus() .isOk updateAgentStatuses( - AgentStatusDto(AgentState.BUSY, "container-2") + AgentStatusDto(com.saveourtool.common.agent.AgentState.BUSY, "container-2") ) assertTrue( transactionTemplate.execute { agentStatusRepository .findAll() - .count { it.state == AgentState.IDLE && it.agent.containerId == "container-2" } == 1 + .count { it.state == com.saveourtool.common.agent.AgentState.IDLE && it.agent.containerId == "container-2" } == 1 }!! ) @@ -127,8 +127,8 @@ class AgentsControllerTest { .consumeWith { val statuses = requireNotNull(it.responseBody) Assertions.assertEquals(2, statuses.size) - Assertions.assertEquals(AgentState.IDLE, statuses.first().state) - Assertions.assertEquals(AgentState.BUSY, statuses[1].state) + Assertions.assertEquals(com.saveourtool.common.agent.AgentState.IDLE, statuses.first().state) + Assertions.assertEquals(com.saveourtool.common.agent.AgentState.BUSY, statuses[1].state) } } @@ -144,8 +144,8 @@ class AgentsControllerTest { .consumeWith { val statuses = requireNotNull(it.responseBody) Assertions.assertEquals(2, statuses.size) - Assertions.assertEquals(AgentState.IDLE, statuses.first().state) - Assertions.assertEquals(AgentState.BUSY, statuses[1].state) + Assertions.assertEquals(com.saveourtool.common.agent.AgentState.IDLE, statuses.first().state) + Assertions.assertEquals(com.saveourtool.common.agent.AgentState.BUSY, statuses[1].state) } } @@ -166,7 +166,7 @@ class AgentsControllerTest { entityManager.createNativeQuery("select * from agent_status", AgentStatus::class.java) .resultList .first { - (it as AgentStatus).state == AgentState.IDLE && it.agent.containerId == "container-2" + (it as AgentStatus).state == com.saveourtool.common.agent.AgentState.IDLE && it.agent.containerId == "container-2" } as AgentStatus }!! diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/DeleteEntitiesTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/DeleteEntitiesTest.kt index f3a0651b96..93be73f78f 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/DeleteEntitiesTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/DeleteEntitiesTest.kt @@ -15,7 +15,7 @@ import com.saveourtool.save.repository.OrganizationRepository import com.saveourtool.save.repository.ProjectRepository import com.saveourtool.save.security.ProjectPermissionEvaluator import com.saveourtool.save.utils.DATABASE_DELIMITER -import com.saveourtool.save.v1 +import com.saveourtool.common.v1 import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -142,14 +142,14 @@ class DeleteEntitiesTest { private fun deleteExecutionsAndAssert(executionIds: List, assert: ResponseSpec.() -> Unit) { webClient.postJsonAndAssert( - uri = "/api/$v1/execution/delete?executionIds=${executionIds.joinToString(DATABASE_DELIMITER)}", + uri = "/api/${com.saveourtool.common.v1}/execution/delete?executionIds=${executionIds.joinToString(DATABASE_DELIMITER)}", assert = assert ) } private fun deleteAllExecutionsAndAssert(name: String, organizationName: String, assert: ResponseSpec.() -> Unit) { webClient.postJsonAndAssert( - uri = "/api/$v1/execution/delete-all-except-contest?name=$name&organizationName=$organizationName", + uri = "/api/${com.saveourtool.common.v1}/execution/delete-all-except-contest?name=$name&organizationName=$organizationName", assert = assert ) } diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/ExecutionControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/ExecutionControllerTest.kt index a776b39b12..cac99105ed 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/ExecutionControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/ExecutionControllerTest.kt @@ -13,7 +13,7 @@ import com.saveourtool.save.execution.TestingType import com.saveourtool.save.repository.ProjectRepository import com.saveourtool.save.utils.debug import com.saveourtool.save.utils.getLogger -import com.saveourtool.save.v1 +import com.saveourtool.common.v1 import org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.Test @@ -90,7 +90,7 @@ class ExecutionControllerTest { mutateMockedUser(id = 99) webClient.get() - .uri("/api/$v1/executionDto?executionId=1") + .uri("/api/${com.saveourtool.common.v1}/executionDto?executionId=1") .exchange() .expectStatus() .isOk @@ -109,7 +109,7 @@ class ExecutionControllerTest { val project = projectRepository.findById(1).get() val executionCounts = executionRepository.findAll().count { it.project.id == project.id } webClient.post() - .uri("/api/$v1/executionDtoList?projectName=${project.name}&organizationName=${project.organization.name}") + .uri("/api/${com.saveourtool.common.v1}/executionDtoList?projectName=${project.name}&organizationName=${project.organization.name}") .exchange() .expectStatus() .isOk diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/JpaSpecificationTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/JpaSpecificationTest.kt index fb85ebc4db..8fbb67a8e9 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/JpaSpecificationTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/JpaSpecificationTest.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.backend.controller -import com.saveourtool.save.agent.AgentState +import com.saveourtool.common.agent.AgentState import com.saveourtool.save.backend.configs.ApplicationConfiguration import com.saveourtool.save.backend.repository.AgentStatusRepository import com.saveourtool.save.backend.utils.InfraExtension @@ -33,7 +33,7 @@ class JpaSpecificationTest { val agentStatusToList = agentStatusRepository.findOne { root, _, cb -> cb.and( cb.equal(root.get("id"), 4), - cb.equal(root.get("state"), AgentState.FINISHED) + cb.equal(root.get("state"), com.saveourtool.common.agent.AgentState.FINISHED) ) }.get() diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/LnkUserOrganizationControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/LnkUserOrganizationControllerTest.kt index 4b09a92237..e80f5b5feb 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/LnkUserOrganizationControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/LnkUserOrganizationControllerTest.kt @@ -14,7 +14,7 @@ import com.saveourtool.save.security.OrganizationPermissionEvaluator import com.saveourtool.save.service.LnkUserOrganizationService import com.saveourtool.save.service.OrganizationService import com.saveourtool.save.utils.BlockingBridge -import com.saveourtool.save.v1 +import com.saveourtool.common.v1 import org.junit.jupiter.api.Test import org.mockito.invocation.InvocationOnMock import org.mockito.kotlin.* @@ -69,7 +69,7 @@ class LnkUserOrganizationControllerTest { ) given(organizationPermissionEvaluator.canChangeRoles(any(), any(), any(), any())).willReturn(true) webTestClient.post() - .uri("/api/$v1/organizations/Huawei/users/roles") + .uri("/api/${com.saveourtool.common.v1}/organizations/Huawei/users/roles") .bodyValue(SetRoleRequest("admin", Role.ADMIN)) .exchange() .expectStatus() @@ -88,7 +88,7 @@ class LnkUserOrganizationControllerTest { ) webTestClient.post() - .uri("/api/$v1/organizations/Huawei/users/roles") + .uri("/api/${com.saveourtool.common.v1}/organizations/Huawei/users/roles") .bodyValue(SetRoleRequest("admin", Role.ADMIN)) .exchange() .expectStatus() @@ -106,7 +106,7 @@ class LnkUserOrganizationControllerTest { organizationRole = Role.VIEWER, ) webTestClient.delete() - .uri("/api/$v1/organizations/Huawei/users/roles/user") + .uri("/api/${com.saveourtool.common.v1}/organizations/Huawei/users/roles/user") .exchange() .expectStatus() .isForbidden @@ -125,7 +125,7 @@ class LnkUserOrganizationControllerTest { given(organizationPermissionEvaluator.canChangeRoles(any(), any(), any(), any())).willReturn(true) webTestClient.delete() - .uri("/api/$v1/organizations/Huawei/users/roles/user") + .uri("/api/${com.saveourtool.common.v1}/organizations/Huawei/users/roles/user") .exchange() .expectStatus() .isOk @@ -142,7 +142,7 @@ class LnkUserOrganizationControllerTest { ) given(organizationPermissionEvaluator.canChangeRoles(any(), any(), any(), any())).willReturn(false) webTestClient.delete() - .uri("/api/$v1/organizations/Huawei/users/roles/user") + .uri("/api/${com.saveourtool.common.v1}/organizations/Huawei/users/roles/user") .exchange() .expectStatus() .isForbidden diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/OrganizationControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/OrganizationControllerTest.kt index 40a9699dc8..beeff1285b 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/OrganizationControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/OrganizationControllerTest.kt @@ -7,7 +7,7 @@ import com.saveourtool.save.backend.service.* import com.saveourtool.save.backend.S11nTestConfig import com.saveourtool.save.backend.storage.TestsSourceSnapshotStorage import com.saveourtool.save.backend.utils.mutateMockedUser -import com.saveourtool.save.configs.WebConfig +import com.saveourtool.common.configs.WebConfig import com.saveourtool.save.domain.Role import com.saveourtool.save.entities.* import com.saveourtool.save.repository.* @@ -22,7 +22,7 @@ import com.saveourtool.save.testutils.enqueue import com.saveourtool.save.utils.BlockingBridge import com.saveourtool.save.utils.getLogger import com.saveourtool.save.utils.info -import com.saveourtool.save.v1 +import com.saveourtool.common.v1 import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.MockWebServer import okhttp3.mockwebserver.RecordedRequest @@ -60,7 +60,7 @@ import java.util.concurrent.TimeUnit GitService::class, TestSuitesSourceService::class, TestSuitesService::class, - WebConfig::class, + com.saveourtool.common.configs.WebConfig::class, ProjectPermissionEvaluator::class, LnkUserProjectService::class, UserService::class, @@ -138,7 +138,7 @@ class OrganizationControllerTest { fun `delete organization with owner permission`() { mutateMockedUserAndLink(organization, adminUser, Role.OWNER) webClient.post() - .uri("/api/$v1/organizations/${organization.name}/change-status?status=${OrganizationStatus.DELETED}") + .uri("/api/${com.saveourtool.common.v1}/organizations/${organization.name}/change-status?status=${OrganizationStatus.DELETED}") .exchange() .expectStatus() .isOk @@ -149,7 +149,7 @@ class OrganizationControllerTest { fun `ban organization with super-admin permission`() { mutateMockedUserAndLink(organization, johnDoeUser, Role.SUPER_ADMIN) webClient.post() - .uri("/api/$v1/organizations/${organization.name}/change-status?status=${OrganizationStatus.BANNED}") + .uri("/api/${com.saveourtool.common.v1}/organizations/${organization.name}/change-status?status=${OrganizationStatus.BANNED}") .exchange() .expectStatus() .isOk @@ -160,7 +160,7 @@ class OrganizationControllerTest { fun `delete organization without owner permission`() { mutateMockedUserAndLink(organization, johnDoeUser, Role.VIEWER) webClient.post() - .uri("/api/$v1/organizations/${organization.name}/change-status?status=${OrganizationStatus.DELETED}") + .uri("/api/${com.saveourtool.common.v1}/organizations/${organization.name}/change-status?status=${OrganizationStatus.DELETED}") .exchange() .expectStatus() .isForbidden @@ -175,7 +175,7 @@ class OrganizationControllerTest { val git2 = Git("url2", null, null, organization) given(gitRepository.findAllByOrganizationId(organization.requiredId())).willReturn(listOf(git1, git2)) webClient.get() - .uri("/api/$v1/organizations/${organization.name}/list-git") + .uri("/api/${com.saveourtool.common.v1}/organizations/${organization.name}/list-git") .exchange() .also { it.expectBodyList(GitDto::class.java) @@ -195,7 +195,7 @@ class OrganizationControllerTest { val assertionsToCreate = mockGitCheckConnectivity(true) val gitDtoToCreate = GitDto("url") webClient.post() - .uri("/api/$v1/organizations/${organization.name}/create-git") + .uri("/api/${com.saveourtool.common.v1}/organizations/${organization.name}/create-git") .bodyValue(gitDtoToCreate) .exchange() .expectStatus() @@ -214,7 +214,7 @@ class OrganizationControllerTest { val assertionsToCreate = mockGitCheckConnectivity(false) val gitDtoToCreate = GitDto("invalid-url") webClient.post() - .uri("/api/$v1/organizations/${organization.name}/create-git") + .uri("/api/${com.saveourtool.common.v1}/organizations/${organization.name}/create-git") .bodyValue(gitDtoToCreate) .exchange() .expectStatus() @@ -235,7 +235,7 @@ class OrganizationControllerTest { ) doReturn(gitExisted).whenever(gitRepository).findByOrganizationAndUrl(organization, gitExisted.url) webClient.post() - .uri("/api/$v1/organizations/${organization.name}/create-git") + .uri("/api/${com.saveourtool.common.v1}/organizations/${organization.name}/create-git") .bodyValue(gitExisted.toDto()) .exchange() .expectStatus() @@ -264,7 +264,7 @@ class OrganizationControllerTest { ) doReturn(gitExisted).whenever(gitRepository).findByOrganizationAndUrl(organization, gitExisted.url) webClient.post() - .uri("/api/$v1/organizations/${organization.name}/update-git") + .uri("/api/${com.saveourtool.common.v1}/organizations/${organization.name}/update-git") .bodyValue(gitDtoToUpdate) .exchange() .expectStatus() @@ -286,7 +286,7 @@ class OrganizationControllerTest { ) given(gitRepository.findByOrganizationAndUrl(organization, gitExisted.url)).willReturn(gitExisted) webClient.delete() - .uri("/api/$v1/organizations/${organization.name}/delete-git?url=${gitExisted.url}") + .uri("/api/${com.saveourtool.common.v1}/organizations/${organization.name}/delete-git?url=${gitExisted.url}") .exchange() .expectStatus() .isOk diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/PermissionControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/PermissionControllerTest.kt index e35e1291c2..e1a294ea22 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/PermissionControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/PermissionControllerTest.kt @@ -18,7 +18,7 @@ import com.saveourtool.save.service.LnkUserProjectService import com.saveourtool.save.service.OrganizationService import com.saveourtool.save.service.ProjectService import com.saveourtool.save.utils.BlockingBridge -import com.saveourtool.save.v1 +import com.saveourtool.common.v1 import org.junit.jupiter.api.Test import org.mockito.invocation.InvocationOnMock import org.mockito.kotlin.* @@ -72,7 +72,7 @@ class PermissionControllerTest { given(permissionService.getRole(any(), any())).willReturn(Role.ADMIN) webTestClient.get() - .uri("/api/$v1/projects/Huawei/huaweiName/users/roles?userName=admin") + .uri("/api/${com.saveourtool.common.v1}/projects/Huawei/huaweiName/users/roles?userName=admin") .exchange() .expectStatus() .isOk @@ -92,7 +92,7 @@ class PermissionControllerTest { ) webTestClient.get() - .uri("/api/$v1/projects/Huawei/huaweiName/users/roles?userName=admin") + .uri("/api/${com.saveourtool.common.v1}/projects/Huawei/huaweiName/users/roles?userName=admin") .exchange() .expectStatus() .isNotFound @@ -116,7 +116,7 @@ class PermissionControllerTest { given(permissionService.setRole(any(), any(), any())).willReturn(Mono.just(Unit)) webTestClient.post() - .uri("/api/$v1/projects/Huawei/huaweiName/users/roles") + .uri("/api/${com.saveourtool.common.v1}/projects/Huawei/huaweiName/users/roles") .bodyValue(SetRoleRequest("admin", Role.ADMIN)) .exchange() .expectStatus() @@ -136,7 +136,7 @@ class PermissionControllerTest { given(organizationRepository.findByName(any())).willReturn(Organization.stub(null).apply { name = "Example Org" }) webTestClient.post() - .uri("/api/$v1/projects/Huawei/huaweiName/users/roles") + .uri("/api/${com.saveourtool.common.v1}/projects/Huawei/huaweiName/users/roles") .bodyValue(SetRoleRequest("admin", Role.ADMIN)) .exchange() .expectStatus() @@ -156,7 +156,7 @@ class PermissionControllerTest { given(organizationRepository.findByName(any())).willReturn(Organization.stub(null).apply { name = "Example Org" }) webTestClient.post() - .uri("/api/$v1/projects/Huawei/huaweiName/users/roles") + .uri("/api/${com.saveourtool.common.v1}/projects/Huawei/huaweiName/users/roles") .bodyValue(SetRoleRequest("admin", Role.ADMIN)) .exchange() .expectStatus() @@ -174,7 +174,7 @@ class PermissionControllerTest { permission = null, ) webTestClient.delete() - .uri("/api/$v1/projects/Huawei/huaweiName/users/roles/user") + .uri("/api/${com.saveourtool.common.v1}/projects/Huawei/huaweiName/users/roles/user") .exchange() .expectStatus() .isNotFound @@ -195,7 +195,7 @@ class PermissionControllerTest { given(projectPermissionEvaluator.canChangeRoles(any(), any(), any(), any())).willReturn(true) given(permissionService.removeRole(any(), any(), any())).willReturn(Mono.just(Unit)) webTestClient.delete() - .uri("/api/$v1/projects/Huawei/huaweiName/users/roles/user") + .uri("/api/${com.saveourtool.common.v1}/projects/Huawei/huaweiName/users/roles/user") .exchange() .expectStatus() .isOk @@ -214,7 +214,7 @@ class PermissionControllerTest { given(organizationPermissionEvaluator.canChangeRoles(any(), any(), any(), any())).willReturn(false) given(permissionService.removeRole(any(), any(), any())).willReturn(Mono.just(Unit)) webTestClient.delete() - .uri("/api/$v1/projects/Huawei/huaweiName/users/roles/user") + .uri("/api/${com.saveourtool.common.v1}/projects/Huawei/huaweiName/users/roles/user") .exchange() .expectStatus() .isForbidden diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/ProjectControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/ProjectControllerTest.kt index a20442c89c..e5e6033646 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/ProjectControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/ProjectControllerTest.kt @@ -9,7 +9,7 @@ import com.saveourtool.save.repository.OrganizationRepository import com.saveourtool.save.repository.ProjectRepository import com.saveourtool.save.service.LnkUserProjectService import com.saveourtool.save.service.UserService -import com.saveourtool.save.v1 +import com.saveourtool.common.v1 import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test @@ -53,7 +53,7 @@ class ProjectControllerTest { webClient .post() - .uri("/api/$v1/projects/by-filters") + .uri("/api/${com.saveourtool.common.v1}/projects/by-filters") .accept(MediaType.APPLICATION_JSON) .bodyValue(ProjectFilter.created) .exchange() @@ -118,7 +118,7 @@ class ProjectControllerTest { projectRepository.save(project) webClient.post() - .uri("/api/$v1/projects/${organization.name}/${project.name}/change-status?status=${ProjectStatus.DELETED}") + .uri("/api/${com.saveourtool.common.v1}/projects/${organization.name}/${project.name}/change-status?status=${ProjectStatus.DELETED}") .exchange() .expectStatus() .isOk @@ -145,7 +145,7 @@ class ProjectControllerTest { projectRepository.save(project) webClient.post() - .uri("/api/$v1/projects/${organization.name}/${project.name}/change-status?status=${ProjectStatus.BANNED}") + .uri("/api/${com.saveourtool.common.v1}/projects/${organization.name}/${project.name}/change-status?status=${ProjectStatus.BANNED}") .exchange() .expectStatus() .isOk @@ -172,7 +172,7 @@ class ProjectControllerTest { projectRepository.save(project) webClient.post() - .uri("/api/$v1/projects/${organization.name}/${project.name}/change-status?status=${ProjectStatus.DELETED}") + .uri("/api/${com.saveourtool.common.v1}/projects/${organization.name}/${project.name}/change-status?status=${ProjectStatus.DELETED}") .exchange() .expectStatus() .isForbidden @@ -222,7 +222,7 @@ class ProjectControllerTest { given(userDetailsService.getUserByName(any())).willReturn(mockUser(3)) webClient.post() - .uri("/api/$v1/projects/update") + .uri("/api/${com.saveourtool.common.v1}/projects/update") .bodyValue(project.toDto()) .exchange() .expectStatus() @@ -235,7 +235,7 @@ class ProjectControllerTest { assertion: WebTestClient.ResponseSpec.() -> Unit ) = webClient .get() - .uri("/api/$v1/projects/get/organization-name?name=$name&organizationName=$organizationName") + .uri("/api/${com.saveourtool.common.v1}/projects/get/organization-name?name=$name&organizationName=$organizationName") .accept(MediaType.APPLICATION_JSON) .exchange() .let { assertion(it) } @@ -247,7 +247,7 @@ class ProjectControllerTest { ) { webClient .post() - .uri("/api/$v1/projects/save") + .uri("/api/${com.saveourtool.common.v1}/projects/save") .body(BodyInserters.fromValue(newProject.toDto())) .accept(MediaType.APPLICATION_JSON) .exchange() @@ -255,7 +255,7 @@ class ProjectControllerTest { webClient .get() - .uri("/api/$v1/projects/get/organization-name?name=${newProject.name}&organizationName=${newProject.organization.name}") + .uri("/api/${com.saveourtool.common.v1}/projects/get/organization-name?name=${newProject.name}&organizationName=${newProject.organization.name}") .accept(MediaType.APPLICATION_JSON) .exchange() .let { getAssertion(it) } diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestExecutionControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestExecutionControllerTest.kt index 6889458c3f..2c60197f55 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestExecutionControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestExecutionControllerTest.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.backend.controller -import com.saveourtool.save.agent.TestExecutionDto -import com.saveourtool.save.agent.TestExecutionExtDto -import com.saveourtool.save.agent.TestExecutionResult -import com.saveourtool.save.agent.TestSuiteExecutionStatisticDto +import com.saveourtool.common.agent.TestExecutionDto +import com.saveourtool.common.agent.TestExecutionExtDto +import com.saveourtool.common.agent.TestExecutionResult +import com.saveourtool.common.agent.TestSuiteExecutionStatisticDto import com.saveourtool.save.backend.SaveApplication import com.saveourtool.save.backend.controllers.ProjectController import com.saveourtool.save.backend.repository.AgentRepository @@ -15,7 +15,7 @@ import com.saveourtool.save.backend.utils.InfraExtension import com.saveourtool.save.backend.utils.mutateMockedUser import com.saveourtool.save.domain.TestResultStatus import com.saveourtool.save.utils.secondsToJLocalDateTime -import com.saveourtool.save.v1 +import com.saveourtool.common.v1 import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertTrue @@ -81,7 +81,7 @@ class TestExecutionControllerTest { mutateMockedUser(id = 99) webClient.get() - .uri("/api/$v1/testExecution/count?executionId=1") + .uri("/api/${com.saveourtool.common.v1}/testExecution/count?executionId=1") .exchange() .expectBody() .isEqualTo(28) @@ -94,9 +94,9 @@ class TestExecutionControllerTest { val expectedExecutionCount = 20 webClient.post() - .uri("/api/$v1/test-executions?executionId=1&page=0&size=$expectedExecutionCount") + .uri("/api/${com.saveourtool.common.v1}/test-executions?executionId=1&page=0&size=$expectedExecutionCount") .exchange() - .expectBody>() + .expectBody>() .consumeWith { assertEquals(expectedExecutionCount, it.responseBody!!.size) } @@ -108,9 +108,9 @@ class TestExecutionControllerTest { mutateMockedUser(id = 99) webClient.get() - .uri("/api/$v1/testLatestExecutions?executionId=3&status=${TestResultStatus.PASSED}&page=0&size=10") + .uri("/api/${com.saveourtool.common.v1}/testLatestExecutions?executionId=3&status=${TestResultStatus.PASSED}&page=0&size=10") .exchange() - .expectBody>() + .expectBody>() .consumeWith { assertEquals(1, it.responseBody!!.size) } @@ -125,7 +125,7 @@ class TestExecutionControllerTest { @WithMockUser @Suppress("UnsafeCallOnNullableType", "TOO_LONG_FUNCTION") fun `should save TestExecutionDto into the DB`() { - val testExecutionDtoFirst = TestExecutionResult( + val testExecutionDtoFirst = com.saveourtool.common.agent.TestExecutionResult( "testPath29", "WarnPlugin", "container-3", @@ -138,7 +138,7 @@ class TestExecutionControllerTest { expected = 0, unexpected = 0, ) - val testExecutionDtoSecond = TestExecutionResult( + val testExecutionDtoSecond = com.saveourtool.common.agent.TestExecutionResult( "testPath30", "WarnPlugin", "container-3", @@ -184,7 +184,7 @@ class TestExecutionControllerTest { @Test @WithMockUser fun `should not save data if provided fields are invalid`() { - val testExecutionDto = TestExecutionResult( + val testExecutionDto = com.saveourtool.common.agent.TestExecutionResult( "test-not-exists", "WarnPlugin", "container-1", @@ -217,7 +217,7 @@ class TestExecutionControllerTest { webClient.post() .uri("/internal/saveTestResult") .contentType(MediaType.APPLICATION_JSON) - .body(BodyInserters.fromValue(emptyList())) + .body(BodyInserters.fromValue(emptyList())) .exchange() .expectStatus() .isEqualTo(HttpStatus.BAD_REQUEST) diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestInitializeControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestInitializeControllerTest.kt index 278573e6be..c1578d3787 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestInitializeControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestInitializeControllerTest.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.backend.controller -import com.saveourtool.save.agent.AgentRunConfig +import com.saveourtool.common.agent.AgentRunConfig import com.saveourtool.save.backend.SaveApplication import com.saveourtool.save.backend.controllers.ProjectController import com.saveourtool.save.backend.repository.TestRepository @@ -121,7 +121,7 @@ class TestInitializeControllerTest { .exchange() .expectStatus() .isOk - .expectBody() + .expectBody() .consumeWith { entityExchangeResult -> val batch = entityExchangeResult.responseBody!! log.debug { batch.toString() } @@ -134,7 +134,7 @@ class TestInitializeControllerTest { .exchange() .expectStatus() .isOk - .expectBody() + .expectBody() .consumeWith { entityExchangeResult -> val body = entityExchangeResult.responseBody!! assertTrue(body.cliArgs.split(" ").size == 3) { "Expected 3 tests, but got $body instead" } diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/UsersControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/UsersControllerTest.kt index 93bc200eb3..1438bbbb6b 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/UsersControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/UsersControllerTest.kt @@ -3,7 +3,7 @@ package com.saveourtool.save.backend.controller import com.saveourtool.save.backend.SaveApplication import com.saveourtool.save.backend.utils.InfraExtension import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.v1 +import com.saveourtool.common.v1 import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -33,7 +33,7 @@ class UsersControllerTest { .isOk webTestClient.get() - .uri("/api/$v1/users/admin") + .uri("/api/${com.saveourtool.common.v1}/users/admin") .exchange() .expectStatus() .isOk diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/UsersDetailsControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/UsersDetailsControllerTest.kt index dafbb2e409..8f115b7356 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/UsersDetailsControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/UsersDetailsControllerTest.kt @@ -9,7 +9,7 @@ import com.saveourtool.save.testutils.cleanup import com.saveourtool.save.testutils.createMockWebServer import com.saveourtool.save.testutils.enqueue import com.saveourtool.save.utils.getLogger -import com.saveourtool.save.v1 +import com.saveourtool.common.v1 import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.MockWebServer import okhttp3.mockwebserver.RecordedRequest @@ -48,7 +48,7 @@ class UsersDetailsControllerTest { ) webClient.post() - .uri("/api/$v1/users/save") + .uri("/api/${com.saveourtool.common.v1}/users/save") .bodyValue(newUserInfo) .exchange() .expectStatus() @@ -68,7 +68,7 @@ class UsersDetailsControllerTest { val assertions = mockGatewayUserUpdate() webClient.post() - .uri("/api/$v1/users/save") + .uri("/api/${com.saveourtool.common.v1}/users/save") .bodyValue(newUserInfo) .exchange() .expectStatus() @@ -90,7 +90,7 @@ class UsersDetailsControllerTest { val assertions = mockGatewayUserUpdate() webClient.post() - .uri("/api/$v1/users/save") + .uri("/api/${com.saveourtool.common.v1}/users/save") .bodyValue(newUserInfo) .exchange() .expectStatus() @@ -111,7 +111,7 @@ class UsersDetailsControllerTest { val assertions = mockGatewayUserUpdate() webClient.post() - .uri("/api/$v1/users/save") + .uri("/api/${com.saveourtool.common.v1}/users/save") .bodyValue(newUserInfo) .exchange() .expectStatus() @@ -131,7 +131,7 @@ class UsersDetailsControllerTest { ) webClient.post() - .uri("/api/$v1/users/save") + .uri("/api/${com.saveourtool.common.v1}/users/save") .bodyValue(newUserInfo) .exchange() .expectStatus() diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controllers/RunExecutionControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controllers/RunExecutionControllerTest.kt index b80f9789e0..7602761bea 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controllers/RunExecutionControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controllers/RunExecutionControllerTest.kt @@ -14,7 +14,7 @@ import com.saveourtool.save.testutils.cleanup import com.saveourtool.save.testutils.createMockWebServer import com.saveourtool.save.testutils.enqueue import com.saveourtool.save.utils.getLogger -import com.saveourtool.save.v1 +import com.saveourtool.common.v1 import io.micrometer.core.instrument.composite.CompositeMeterRegistry import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.MockWebServer @@ -84,7 +84,7 @@ class RunExecutionControllerTest( } val executionId = webClient.post() - .uri("/api/$v1/run/trigger?testingType={testingType}", TestingType.PRIVATE_TESTS.name) + .uri("/api/${com.saveourtool.common.v1}/run/trigger?testingType={testingType}", TestingType.PRIVATE_TESTS.name) .bodyValue(request) .exchange() .expectStatus() @@ -150,7 +150,7 @@ class RunExecutionControllerTest( val testSuiteId = 11L val originalExecution = executionRepository.findById(EXECUTION_ID).get() val executionId = webClient.post() - .uri("/api/$v1/run/re-trigger?executionId=$EXECUTION_ID") + .uri("/api/${com.saveourtool.common.v1}/run/re-trigger?executionId=$EXECUTION_ID") .exchange() .expectStatus() .isAccepted diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/evententities/CommentEvent.kt b/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/evententities/CommentEvent.kt deleted file mode 100644 index 0c23350044..0000000000 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/evententities/CommentEvent.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.saveourtool.save.evententities - -import com.saveourtool.save.entities.Comment - -/** - * @property comment - **/ -data class CommentEvent( - var comment: Comment -) diff --git a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/evententities/UserEvent.kt b/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/evententities/UserEvent.kt deleted file mode 100644 index 4e79e18b5b..0000000000 --- a/save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/evententities/UserEvent.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.saveourtool.save.evententities - -import com.saveourtool.save.entities.User - -/** - * @property user - **/ -data class UserEvent( - var user: User -) diff --git a/save-demo-agent/build.gradle.kts b/save-demo-agent/build.gradle.kts index f59ea8a796..0c00aeebba 100644 --- a/save-demo-agent/build.gradle.kts +++ b/save-demo-agent/build.gradle.kts @@ -35,7 +35,7 @@ kotlin { linuxX64Main.dependsOn(this) dependencies { - implementation(projects.saveCloudCommon) + implementation(projects.common) implementation(libs.save.common) implementation(libs.kotlinx.coroutines.core) diff --git a/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/utils/HttpUtils.kt b/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/utils/HttpUtils.kt index f8a3ef8b4a..3d7e72a700 100644 --- a/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/utils/HttpUtils.kt +++ b/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/utils/HttpUtils.kt @@ -11,6 +11,7 @@ import com.saveourtool.save.core.logging.logWarn import com.saveourtool.save.core.utils.runIf import com.saveourtool.save.demo.DemoAgentConfig import com.saveourtool.save.utils.* +import com.saveourtool.save.utils.fs import io.ktor.client.* import io.ktor.client.call.* import io.ktor.client.engine.cio.* diff --git a/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/utils/SetupUtils.kt b/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/utils/SetupUtils.kt index 928227d9f4..bc3fab2aa7 100644 --- a/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/utils/SetupUtils.kt +++ b/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/utils/SetupUtils.kt @@ -12,6 +12,7 @@ import com.saveourtool.save.core.utils.ExecutionResult import com.saveourtool.save.core.utils.ProcessBuilder import com.saveourtool.save.demo.DemoConfiguration import com.saveourtool.save.utils.* +import com.saveourtool.save.utils.fs import okio.Path import okio.Path.Companion.toPath diff --git a/save-demo-cpg/build.gradle.kts b/save-demo-cpg/build.gradle.kts index 3a38dd2507..6e3f7e5a9e 100644 --- a/save-demo-cpg/build.gradle.kts +++ b/save-demo-cpg/build.gradle.kts @@ -46,7 +46,7 @@ val resolveJep: TaskProvider = tasks.register("resolveJep") { } dependencies { - implementation(projects.saveCloudCommon) + implementation(projects.common) api(libs.arrow.kt.core) val excludeLogging: Action = Action { diff --git a/save-demo-cpg/src/main/kotlin/com/saveourtool/save/demo/cpg/controller/CpgController.kt b/save-demo-cpg/src/main/kotlin/com/saveourtool/save/demo/cpg/controller/CpgController.kt index d30efcb52c..785728a7bd 100644 --- a/save-demo-cpg/src/main/kotlin/com/saveourtool/save/demo/cpg/controller/CpgController.kt +++ b/save-demo-cpg/src/main/kotlin/com/saveourtool/save/demo/cpg/controller/CpgController.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.demo.cpg.controller -import com.saveourtool.save.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.ApiSwaggerSupport import com.saveourtool.save.demo.cpg.* import com.saveourtool.save.demo.cpg.config.ConfigProperties import com.saveourtool.save.demo.cpg.repository.CpgRepository @@ -35,7 +35,7 @@ const val FILE_NAME_SEPARATOR = "===" * @property cpgRepository * @property treeSitterService */ -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @Tags( Tag(name = "cpg-demo"), ) diff --git a/save-demo/build.gradle.kts b/save-demo/build.gradle.kts index 73f5b1fb4c..4dcd1a6b72 100644 --- a/save-demo/build.gradle.kts +++ b/save-demo/build.gradle.kts @@ -27,7 +27,7 @@ tasks.withType { val diktatVersion: String = libs.versions.diktat.get() dependencies { - api(projects.saveCloudCommon) + api(projects.common) implementation(libs.save.common.jvm) implementation(libs.spring.cloud.starter.kubernetes.client.config) { diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/DemoController.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/DemoController.kt index 938c5e309d..d9a956ff4c 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/DemoController.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/DemoController.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.demo.controller -import com.saveourtool.save.configs.ApiSwaggerSupport +import com.saveourtool.common.configs.ApiSwaggerSupport import com.saveourtool.save.demo.DemoDto import com.saveourtool.save.demo.DemoResult import com.saveourtool.save.demo.DemoRunRequest @@ -27,7 +27,7 @@ import reactor.kotlin.core.util.function.component2 /** * Controller for demo */ -@ApiSwaggerSupport +@com.saveourtool.common.configs.ApiSwaggerSupport @Tags( Tag(name = "demo"), ) diff --git a/save-frontend/build.gradle.kts b/save-frontend/build.gradle.kts index 02fd94dc33..b0899ddf71 100644 --- a/save-frontend/build.gradle.kts +++ b/save-frontend/build.gradle.kts @@ -17,7 +17,7 @@ rootProject.plugins.withType { } dependencies { - implementation(projects.saveCloudCommon) + implementation(projects.common) implementation(projects.frontendCommon) implementation(enforcedPlatform(libs.kotlin.wrappers.bom)) diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/TestStatusComponent.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/TestStatusComponent.kt index 79546e64f1..c3233e613d 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/TestStatusComponent.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/TestStatusComponent.kt @@ -5,8 +5,8 @@ package com.saveourtool.save.frontend.components.basic import com.saveourtool.frontend.common.components.tables.visibleColumnsCount import com.saveourtool.frontend.common.externals.fontawesome.faExternalLinkAlt import com.saveourtool.frontend.common.utils.buttonBuilder -import com.saveourtool.save.agent.TestExecutionDto -import com.saveourtool.save.agent.TestExecutionExtDto +import com.saveourtool.common.agent.TestExecutionDto +import com.saveourtool.common.agent.TestExecutionExtDto import com.saveourtool.save.core.result.Crash import com.saveourtool.save.core.result.Fail import com.saveourtool.save.core.result.Ignored @@ -39,8 +39,8 @@ const val EXTRA_INFO_COLUMN_WIDTH = 3 fun testStatusComponent( organizationProjectPath: String, testResultDebugInfo: TestResultDebugInfo, - tableInstance: Table, - testExecutionDto: TestExecutionDto, + tableInstance: Table, + testExecutionDto: com.saveourtool.common.agent.TestExecutionDto, ): FC = FC { val shortMessage: String = when (val status: TestStatus = testResultDebugInfo.testStatus) { is Pass -> (status.shortMessage ?: "").ifBlank { "Completed successfully without additional information" } diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectStatisticMenu.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectStatisticMenu.kt index bebf122a30..ba33dd9f28 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectStatisticMenu.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectStatisticMenu.kt @@ -7,7 +7,7 @@ import com.saveourtool.frontend.common.components.tables.columns import com.saveourtool.frontend.common.components.tables.tableComponent import com.saveourtool.frontend.common.components.tables.value import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.agent.TestSuiteExecutionStatisticDto +import com.saveourtool.common.agent.TestSuiteExecutionStatisticDto import com.saveourtool.save.domain.TestResultStatus import com.saveourtool.save.frontend.externals.chart.DataPieChart import com.saveourtool.save.frontend.externals.chart.pieChart @@ -24,7 +24,7 @@ import web.cssom.ClassName "MAGIC_NUMBER", "TYPE_ALIAS", ) -private val executionDetailsTable: FC> = tableComponent( +private val executionDetailsTable: FC> = tableComponent( columns = { columns { column(id = "name", header = "Test suite", { testSuiteName }) { @@ -72,7 +72,7 @@ external interface ProjectStatisticMenuProps : Props { /** * list of tests */ - var latestExecutionStatisticDtos: List? + var latestExecutionStatisticDtos: List? /** * Flag to open Menu @@ -99,7 +99,7 @@ private fun projectStatisticMenu() = FC { props -> loadingHandler = ::loadingHandler, ) .unsafeMap { - it.decodeFromJsonString>() + it.decodeFromJsonString>() } setLatestExecutionStatisticDtos(testLatestExecutions) } @@ -147,7 +147,7 @@ private fun projectStatisticMenu() = FC { props -> loadingHandler = ::loadingHandler, ) .unsafeMap { - it.decodeFromJsonString>() + it.decodeFromJsonString>() } } getPageCount = null diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ExecutionView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ExecutionView.kt index c17ab23d35..b8e1a51832 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ExecutionView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ExecutionView.kt @@ -21,8 +21,8 @@ import com.saveourtool.frontend.common.http.getDebugInfoFor import com.saveourtool.frontend.common.http.getExecutionInfoFor import com.saveourtool.frontend.common.themes.Colors import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.agent.TestExecutionDto -import com.saveourtool.save.agent.TestExecutionExtDto +import com.saveourtool.common.agent.TestExecutionDto +import com.saveourtool.common.agent.TestExecutionExtDto import com.saveourtool.save.core.logging.describe import com.saveourtool.save.core.result.CountWarnings import com.saveourtool.save.domain.TestResultDebugInfo @@ -130,7 +130,7 @@ external interface StatusProps : TableProps { class ExecutionView : AbstractView(Style.SAVE_LIGHT) { @Suppress("TYPE_ALIAS") private val additionalInfo: MutableMap = mutableMapOf() - private val testExecutionsTable: FC> = tableComponent( + private val testExecutionsTable: FC> = tableComponent( columns = { columns { column(id = "index", header = "#") { @@ -313,7 +313,7 @@ class ExecutionView : AbstractView(Style.SAVE_LI } } ?: "" - private suspend fun getAdditionalInfoFor(testExecution: TestExecutionDto, id: String) { + private suspend fun getAdditionalInfoFor(testExecution: com.saveourtool.common.agent.TestExecutionDto, id: String) { val trDebugInfoResponse = getDebugInfoFor(testExecution.requiredId()) // FixMe: invalid setup of execution because of the invalid propagated ID val trExecutionInfoResponse = getExecutionInfoFor(testExecution) @@ -429,10 +429,10 @@ class ExecutionView : AbstractView(Style.SAVE_LI body = Json.encodeToString(filters), loadingHandler = ::classLoadingHandler, ).unsafeMap { - Json.decodeFromString>( + Json.decodeFromString>( it.text().await() ) - }.onEach { (testExecution: TestExecutionDto) -> + }.onEach { (testExecution: com.saveourtool.common.agent.TestExecutionDto) -> /* * Add empty debug info to each test execution. */ diff --git a/save-orchestrator-common/build.gradle.kts b/save-orchestrator-common/build.gradle.kts index 13867be37c..598adc7028 100644 --- a/save-orchestrator-common/build.gradle.kts +++ b/save-orchestrator-common/build.gradle.kts @@ -13,7 +13,7 @@ tasks.withType { } dependencies { - api(projects.saveCloudCommon) + api(projects.common) implementation(libs.dockerJava.core) implementation(libs.dockerJava.transport.httpclient5) implementation(libs.kotlinx.serialization.json.jvm) diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/Utils.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/Utils.kt index c4f6f73d4d..72658091fd 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/Utils.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/Utils.kt @@ -4,7 +4,7 @@ package com.saveourtool.save.orchestrator -import com.saveourtool.save.agent.AgentEnvName +import com.saveourtool.common.agent.AgentEnvName import com.saveourtool.save.orchestrator.config.ConfigProperties.AgentSettings import com.github.dockerjava.api.DockerClient @@ -92,12 +92,12 @@ internal fun DockerClient.findImage(imageId: String, meterRegistry: MeterRegistr internal fun fillAgentPropertiesFromConfiguration( agentSettings: AgentSettings, executionId: Long, -): Map = buildMap { - put(AgentEnvName.EXECUTION_ID, executionId.toString()) +): Map = buildMap { + put(com.saveourtool.common.agent.AgentEnvName.EXECUTION_ID, executionId.toString()) with(agentSettings) { - put(AgentEnvName.HEARTBEAT_URL, heartbeatUrl) - debug?.let { put(AgentEnvName.DEBUG, it.toString()) } + put(com.saveourtool.common.agent.AgentEnvName.HEARTBEAT_URL, heartbeatUrl) + debug?.let { put(com.saveourtool.common.agent.AgentEnvName.DEBUG, it.toString()) } } } diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/config/JsonConfig.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/config/JsonConfig.kt index dbdc9066aa..fa7fe8d8e7 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/config/JsonConfig.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/config/JsonConfig.kt @@ -6,7 +6,7 @@ package com.saveourtool.save.orchestrator.config -import com.saveourtool.save.domain.supportTestStatus +import com.saveourtool.common.domain.supportTestStatus import com.saveourtool.save.utils.supportJLocalDateTime import com.saveourtool.save.utils.supportKLocalDateTime diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/HeartbeatController.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/HeartbeatController.kt index a856812ed2..756e611f4e 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/HeartbeatController.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/HeartbeatController.kt @@ -5,7 +5,7 @@ package com.saveourtool.save.orchestrator.controller import com.saveourtool.save.agent.* -import com.saveourtool.save.agent.AgentState.* +import com.saveourtool.common.agent.AgentState.* import com.saveourtool.save.entities.AgentDto import com.saveourtool.save.entities.AgentStatusDto import com.saveourtool.save.orchestrator.config.ConfigProperties @@ -50,7 +50,7 @@ class HeartbeatController( * @return Answer for agent */ @PostMapping("/heartbeat") - fun acceptHeartbeat(@RequestBody heartbeat: Heartbeat): Mono { + fun acceptHeartbeat(@RequestBody heartbeat: com.saveourtool.common.agent.Heartbeat): Mono { val executionId = heartbeat.executionProgress.executionId val containerId = heartbeat.agentInfo.containerId log.info("Got heartbeat state: ${heartbeat.state.name} from $containerId under execution id=$executionId") @@ -78,24 +78,24 @@ class HeartbeatController( FINISHED -> agentService.checkSavedData(containerId).flatMap { isSavingSuccessful -> handleFinishedAgent(executionId, containerId, isSavingSuccessful) } - BUSY -> Mono.just(ContinueResponse) - BACKEND_FAILURE, BACKEND_UNREACHABLE, CLI_FAILED -> Mono.just(WaitResponse) + BUSY -> Mono.just(com.saveourtool.common.agent.ContinueResponse) + BACKEND_FAILURE, BACKEND_UNREACHABLE, CLI_FAILED -> Mono.just(com.saveourtool.common.agent.WaitResponse) CRASHED, TERMINATED -> Mono.fromCallable { handleIllegallyOnlineAgent(containerId, heartbeat.state) - TerminateResponse + com.saveourtool.common.agent.TerminateResponse } } } // Heartbeat couldn't be processed, agent should replay it current state on the next heartbeat. - .defaultIfEmpty(ContinueResponse) + .defaultIfEmpty(com.saveourtool.common.agent.ContinueResponse) .map { - Json.encodeToString(HeartbeatResponse.serializer(), it) + Json.encodeToString(com.saveourtool.common.agent.HeartbeatResponse.serializer(), it) } } private fun addNewAgent( executionId: Long, - agentInfo: AgentInfo, + agentInfo: com.saveourtool.common.agent.AgentInfo, ): Mono = agentService.addAgent( executionId = executionId, agent = AgentDto( @@ -109,9 +109,9 @@ class HeartbeatController( containerService.cleanupAllByExecution(executionId) } - private fun handleNotInitializedAgent(containerId: String): Mono = agentService.getInitConfig(containerId) + private fun handleNotInitializedAgent(containerId: String): Mono = agentService.getInitConfig(containerId) - private fun handleVacantAgent(executionId: Long, containerId: String): Mono = + private fun handleVacantAgent(executionId: Long, containerId: String): Mono = agentService.getNextRunConfig(containerId) .asyncEffect { agentService.updateAgentStatus(AgentStatusDto(BUSY, containerId)) @@ -124,31 +124,31 @@ class HeartbeatController( .filter { it } .flatMap { agentService.updateAgentStatus(AgentStatusDto(TERMINATED, containerId)) - .thenReturn(TerminateResponse) - .defaultIfEmpty(ContinueResponse) + .thenReturn(com.saveourtool.common.agent.TerminateResponse) + .defaultIfEmpty(com.saveourtool.common.agent.ContinueResponse) .doOnSuccess { - log.info("Agent id=$containerId will receive ${TerminateResponse::class.simpleName} and should shutdown gracefully") + log.info("Agent id=$containerId will receive ${com.saveourtool.common.agent.TerminateResponse::class.simpleName} and should shutdown gracefully") ensureGracefulShutdown(executionId, containerId) } } - .defaultIfEmpty(WaitResponse) + .defaultIfEmpty(com.saveourtool.common.agent.WaitResponse) } private fun handleFinishedAgent( executionId: Long, containerId: String, isSavingSuccessful: Boolean - ): Mono = if (isSavingSuccessful) { + ): Mono = if (isSavingSuccessful) { handleVacantAgent(executionId, containerId) } else { // Agent finished its work, however only part of results were received, other should be marked as failed agentService.markReadyForTestingTestExecutionsOfAgentAsFailed(containerId) .subscribeOn(agentService.scheduler) .subscribe() - Mono.just(WaitResponse) + Mono.just(com.saveourtool.common.agent.WaitResponse) } - private fun handleIllegallyOnlineAgent(containerId: String, state: AgentState) { + private fun handleIllegallyOnlineAgent(containerId: String, state: com.saveourtool.common.agent.AgentState) { log.warn("Agent with containerId=$containerId sent $state status, but should be offline in that case!") heartBeatInspector.watchCrashedAgent(containerId) } @@ -165,12 +165,12 @@ class HeartbeatController( .doOnNext { successfullyStopped -> if (!successfullyStopped) { log.warn { - "Agent with containerId=$containerId is not stopped in $shutdownTimeoutSeconds seconds after ${TerminateResponse::class.simpleName} signal," + + "Agent with containerId=$containerId is not stopped in $shutdownTimeoutSeconds seconds after ${com.saveourtool.common.agent.TerminateResponse::class.simpleName} signal," + " will add it to crashed list" } heartBeatInspector.watchCrashedAgent(containerId) } else { - log.debug { "Agent with containerId=$containerId has stopped after ${TerminateResponse::class.simpleName} signal" } + log.debug { "Agent with containerId=$containerId has stopped after ${com.saveourtool.common.agent.TerminateResponse::class.simpleName} signal" } heartBeatInspector.unwatchAgent(containerId) } // Update final execution status, perform cleanup etc. diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/KafkaController.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/KafkaController.kt index 6bf735e55b..3944f9aa11 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/KafkaController.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/KafkaController.kt @@ -2,7 +2,7 @@ package com.saveourtool.save.orchestrator.controller import com.saveourtool.save.kafka.TestExecutionTaskDto import com.saveourtool.save.orchestrator.kafka.KafkaSender -import com.saveourtool.save.v1 +import com.saveourtool.common.v1 import org.springframework.context.annotation.Profile import org.springframework.web.bind.annotation.PostMapping import org.springframework.web.bind.annotation.RequestBody @@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RestController */ @Profile("dev & kafka") @RestController -@RequestMapping(path = ["/api/$v1/kafka"]) +@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/kafka"]) internal class KafkaController( private val testExecutionSender: KafkaSender ) { diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/docker/DockerContainerRunner.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/docker/DockerContainerRunner.kt index 7223cc81b1..8e032a709b 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/docker/DockerContainerRunner.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/docker/DockerContainerRunner.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.orchestrator.docker -import com.saveourtool.save.agent.AgentEnvName +import com.saveourtool.common.agent.AgentEnvName import com.saveourtool.save.orchestrator.DOCKER_METRIC_PREFIX import com.saveourtool.save.orchestrator.config.ConfigProperties import com.saveourtool.save.orchestrator.config.ConfigProperties.DockerSettings @@ -137,7 +137,7 @@ class DockerContainerRunner( val runCmd = configuration.runCmd val envFileTargetPath = "$SAVE_AGENT_USER_HOME/.env" val envVariables = configuration.env.mapToEnvs() + - AgentEnvName.CONTAINER_NAME.toEnv(containerName) + + com.saveourtool.common.agent.AgentEnvName.CONTAINER_NAME.toEnv(containerName) + kubernetesEnv // createContainerCmd accepts image name, not id, so we retrieve it from tags @@ -182,7 +182,7 @@ class DockerContainerRunner( val containerId = createContainerCmdResponse.id val envFile = createTempDirectory("orchestrator").resolve(envFileTargetPath.substringAfterLast("/")).apply { writeText(""" - ${AgentEnvName.CONTAINER_ID.name}=$containerId + ${com.saveourtool.common.agent.AgentEnvName.CONTAINER_ID.name}=$containerId """.trimIndent() ) } @@ -218,10 +218,10 @@ class DockerContainerRunner( companion object { private val log: Logger = getLogger() private const val RUNNING_STATUS = "running" - private val kubernetesEnv: String = AgentEnvName.KUBERNETES.toEnv(false) + private val kubernetesEnv: String = com.saveourtool.common.agent.AgentEnvName.KUBERNETES.toEnv(false) - private fun Map.mapToEnvs(): List = entries.map { (key, value) -> key.toEnv(value) } + private fun Map.mapToEnvs(): List = entries.map { (key, value) -> key.toEnv(value) } - private fun AgentEnvName.toEnv(value: Any): String = "${this.name}=$value" + private fun com.saveourtool.common.agent.AgentEnvName.toEnv(value: Any): String = "${this.name}=$value" } } diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/kafka/KafkaSender.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/kafka/KafkaSender.kt index 6cd955e8df..30d86da316 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/kafka/KafkaSender.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/kafka/KafkaSender.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.orchestrator.kafka -import com.saveourtool.save.kafka.KafkaMsg +import com.saveourtool.common.kafka.KafkaMsg import org.apache.kafka.clients.producer.ProducerRecord import org.apache.kafka.common.header.internals.RecordHeader import org.slf4j.LoggerFactory diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/kubernetes/KubernetesManager.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/kubernetes/KubernetesManager.kt index 5562951856..cc3f0a285a 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/kubernetes/KubernetesManager.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/kubernetes/KubernetesManager.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.orchestrator.kubernetes -import com.saveourtool.save.agent.AgentEnvName +import com.saveourtool.common.agent.AgentEnvName import com.saveourtool.save.orchestrator.config.ConfigProperties import com.saveourtool.save.orchestrator.runner.ContainerRunner import com.saveourtool.save.orchestrator.runner.ContainerRunnerException @@ -148,7 +148,7 @@ class KubernetesManager( imageName: String, agentRunCmd: List, workingDir: String, - env: Map, + env: Map, ) = Container().apply { name = "save-agent-pod" image = imageName @@ -179,7 +179,7 @@ class KubernetesManager( companion object { private val logger = LoggerFactory.getLogger(KubernetesManager::class.java) private const val EXECUTION_ID_LABEL = "executionId" - private val containerIdEnv = setOf(AgentEnvName.CONTAINER_ID, AgentEnvName.CONTAINER_NAME) + private val containerIdEnv = setOf(com.saveourtool.common.agent.AgentEnvName.CONTAINER_ID, com.saveourtool.common.agent.AgentEnvName.CONTAINER_NAME) .map { it.name } .map { envName -> EnvVar().apply { @@ -191,11 +191,11 @@ class KubernetesManager( } } } - private val kubernetesEnv: EnvVar = AgentEnvName.KUBERNETES.toEnv(true) + private val kubernetesEnv: EnvVar = com.saveourtool.common.agent.AgentEnvName.KUBERNETES.toEnv(true) - private fun Map.mapToEnvs(): List = entries.map { (key, value) -> key.toEnv(value) } + private fun Map.mapToEnvs(): List = entries.map { (key, value) -> key.toEnv(value) } - private fun AgentEnvName.toEnv(value: Any): EnvVar = EnvVar().apply { + private fun com.saveourtool.common.agent.AgentEnvName.toEnv(value: Any): EnvVar = EnvVar().apply { this.name = this@toEnv.name this.value = value.toString() } diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/AgentService.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/AgentService.kt index 5cf9a70e75..60c3ac64b4 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/AgentService.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/AgentService.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.orchestrator.service import com.saveourtool.save.agent.* -import com.saveourtool.save.agent.AgentState.* +import com.saveourtool.common.agent.AgentState.* import com.saveourtool.save.entities.AgentDto import com.saveourtool.save.entities.AgentStatus import com.saveourtool.save.entities.AgentStatusDto @@ -40,9 +40,9 @@ class AgentService( * @param containerId * @return [Mono] of [InitResponse] */ - internal fun getInitConfig(containerId: String): Mono = + internal fun getInitConfig(containerId: String): Mono = orchestratorAgentService.getInitConfig(containerId) - .map { InitResponse(it) } + .map { com.saveourtool.common.agent.InitResponse(it) } /** * Sets new tests ids @@ -50,9 +50,9 @@ class AgentService( * @param containerId * @return [Mono] of [NewJobResponse] if there is some job to do or [Mono.empty] */ - internal fun getNextRunConfig(containerId: String): Mono = + internal fun getNextRunConfig(containerId: String): Mono = orchestratorAgentService.getNextRunConfig(containerId) - .map { NewJobResponse(it) } + .map { com.saveourtool.common.agent.NewJobResponse(it) } /** * Save new agent to the DB @@ -233,7 +233,7 @@ class AgentService( private fun Collection.areFinishedOrStopped() = areAllStatesIn(*finishedOrStoppedStates) - private fun Collection.areAllStatesIn(vararg states: AgentState) = all { it.state in states } + private fun Collection.areAllStatesIn(vararg states: com.saveourtool.common.agent.AgentState) = all { it.state in states } companion object { private val log = LoggerFactory.getLogger(AgentService::class.java) diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/ContainerService.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/ContainerService.kt index cab956c736..862a0dabc6 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/ContainerService.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/ContainerService.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.orchestrator.service -import com.saveourtool.save.agent.AgentEnvName +import com.saveourtool.common.agent.AgentEnvName import com.saveourtool.save.entities.Execution import com.saveourtool.save.execution.ExecutionStatus import com.saveourtool.save.orchestrator.config.ConfigProperties @@ -141,7 +141,7 @@ class ContainerService( val imageTag: String, val runCmd: List, val workingDir: String = EXECUTION_DIR, - val env: Map, + val env: Map, ) companion object { diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/HeartBeatInspector.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/HeartBeatInspector.kt index 269f00e268..263f2598f0 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/HeartBeatInspector.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/HeartBeatInspector.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.orchestrator.service -import com.saveourtool.save.agent.Heartbeat +import com.saveourtool.common.agent.Heartbeat import com.saveourtool.save.entities.AgentStatusDto import com.saveourtool.save.orchestrator.utils.AgentStatusInMemoryRepository @@ -23,7 +23,7 @@ class HeartBeatInspector( * * @param heartbeat */ - fun updateAgentHeartbeatTimeStamps(heartbeat: Heartbeat) { + fun updateAgentHeartbeatTimeStamps(heartbeat: com.saveourtool.common.agent.Heartbeat) { agentStatusInMemoryRepository.upsert( executionId = heartbeat.executionProgress.executionId, AgentStatusDto( diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/OrchestratorAgentService.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/OrchestratorAgentService.kt index 2480015f42..2987799c2e 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/OrchestratorAgentService.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/OrchestratorAgentService.kt @@ -1,8 +1,8 @@ package com.saveourtool.save.orchestrator.service -import com.saveourtool.save.agent.AgentInitConfig -import com.saveourtool.save.agent.AgentRunConfig -import com.saveourtool.save.agent.TestExecutionDto +import com.saveourtool.common.agent.AgentInitConfig +import com.saveourtool.common.agent.AgentRunConfig +import com.saveourtool.common.agent.TestExecutionDto import com.saveourtool.save.entities.* import com.saveourtool.save.execution.ExecutionStatus import com.saveourtool.save.test.TestBatch @@ -10,7 +10,7 @@ import com.saveourtool.save.utils.EmptyResponse import reactor.core.publisher.Mono -typealias TestExecutionList = List +typealias TestExecutionList = List /** * Repository to work with agents @@ -22,7 +22,7 @@ interface OrchestratorAgentService { * @param containerId * @return [Mono] of [AgentInitConfig] */ - fun getInitConfig(containerId: String): Mono + fun getInitConfig(containerId: String): Mono /** * Gets new tests ids @@ -30,7 +30,7 @@ interface OrchestratorAgentService { * @param containerId * @return [Mono] of [TestBatch] */ - fun getNextRunConfig(containerId: String): Mono + fun getNextRunConfig(containerId: String): Mono /** * Save new agents to the DB and insert their statuses diff --git a/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/controller/heartbeat/HeartbeatControllerTest.kt b/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/controller/heartbeat/HeartbeatControllerTest.kt index ae2823b7e5..94a0891930 100644 --- a/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/controller/heartbeat/HeartbeatControllerTest.kt +++ b/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/controller/heartbeat/HeartbeatControllerTest.kt @@ -78,7 +78,11 @@ class HeartbeatControllerTest { @Test fun checkAcceptingHeartbeat() { - val heartBeatBusy = Heartbeat("test".toAgentInfo(), AgentState.BUSY, noProgress) + val heartBeatBusy = com.saveourtool.common.agent.Heartbeat( + "test".toAgentInfo(), + com.saveourtool.common.agent.AgentState.BUSY, + noProgress + ) whenever(orchestratorAgentService.updateAgentStatus(any())) .thenReturn(emptyResponseAsMono) @@ -99,14 +103,14 @@ class HeartbeatControllerTest { val cliArgs = "qwe" whenever(orchestratorAgentService.getNextRunConfig(agentContainerId)) .thenReturn( - AgentRunConfig( + com.saveourtool.common.agent.AgentRunConfig( cliArgs = cliArgs, executionDataUploadUrl = "N/A", debugInfoUploadUrl = "N/A" ).toMono() ) - val monoResponse = agentService.getNextRunConfig(agentContainerId).block() as NewJobResponse + val monoResponse = agentService.getNextRunConfig(agentContainerId).block() as com.saveourtool.common.agent.NewJobResponse assertTrue(monoResponse.config.cliArgs.isNotEmpty()) assertEquals(cliArgs, monoResponse.config.cliArgs) @@ -117,16 +121,21 @@ class HeartbeatControllerTest { fun `should not shutdown any agents when not all of them are IDLE`() { testHeartbeat( agentStatusDtos = listOf( - AgentStatusDto(AgentState.IDLE, "test-1"), - AgentStatusDto(AgentState.BUSY, "test-2"), + AgentStatusDto(com.saveourtool.common.agent.AgentState.IDLE, "test-1"), + AgentStatusDto(com.saveourtool.common.agent.AgentState.BUSY, "test-2"), ), - heartbeats = listOf(Heartbeat("test-1".toAgentInfo(), AgentState.IDLE, fullProgress).withoutDelay()), + heartbeats = listOf( + com.saveourtool.common.agent.Heartbeat( + "test-1".toAgentInfo(), + com.saveourtool.common.agent.AgentState.IDLE, + fullProgress + ).withoutDelay()), initConfigs = emptyList(), testBatchNullable = emptyList(), mockUpdateAgentStatusesCount = 1, mockAgentStatusesByExecutionId = true, ) { heartbeatResponses -> - heartbeatResponses shouldNot exist { it is TerminateResponse } + heartbeatResponses shouldNot exist { it is com.saveourtool.common.agent.TerminateResponse } } } @@ -134,10 +143,15 @@ class HeartbeatControllerTest { fun `should not shutdown any agents when all agents are IDLE but there are more tests left`() { testHeartbeat( agentStatusDtos = listOf( - AgentStatusDto(AgentState.IDLE, "test-1"), - AgentStatusDto(AgentState.IDLE, "test-2"), + AgentStatusDto(com.saveourtool.common.agent.AgentState.IDLE, "test-1"), + AgentStatusDto(com.saveourtool.common.agent.AgentState.IDLE, "test-2"), ), - heartbeats = listOf(Heartbeat("test-1".toAgentInfo(), AgentState.IDLE, fullProgress).withoutDelay()), + heartbeats = listOf( + com.saveourtool.common.agent.Heartbeat( + "test-1".toAgentInfo(), + com.saveourtool.common.agent.AgentState.IDLE, + fullProgress + ).withoutDelay()), initConfigs = emptyList(), testBatchNullable = listOf( TestDto("/path/to/test-1", "WarnPlugin", 1, "hash1", listOf("tag")), @@ -146,7 +160,7 @@ class HeartbeatControllerTest { ), mockUpdateAgentStatusesCount = 2, ) { heartbeatResponses -> - heartbeatResponses shouldNot exist { it is TerminateResponse } + heartbeatResponses shouldNot exist { it is com.saveourtool.common.agent.TerminateResponse } } } @@ -154,18 +168,23 @@ class HeartbeatControllerTest { fun `should send Terminate signal to idle agents when there are no tests left`() { whenever(containerService.isStopped(any())).thenReturn(true) val agentStatusDtos = listOf( - AgentStatusDto(AgentState.IDLE, "test-1"), - AgentStatusDto(AgentState.IDLE, "test-2"), + AgentStatusDto(com.saveourtool.common.agent.AgentState.IDLE, "test-1"), + AgentStatusDto(com.saveourtool.common.agent.AgentState.IDLE, "test-2"), ) testHeartbeat( agentStatusDtos = agentStatusDtos, - heartbeats = listOf(Heartbeat("test-1".toAgentInfo(), AgentState.IDLE, fullProgress).withoutDelay()), + heartbeats = listOf( + com.saveourtool.common.agent.Heartbeat( + "test-1".toAgentInfo(), + com.saveourtool.common.agent.AgentState.IDLE, + fullProgress + ).withoutDelay()), initConfigs = emptyList(), testBatchNullable = emptyList(), mockUpdateAgentStatusesCount = 2, mockAgentStatusesByExecutionId = true, ) { heartbeatResponses -> - heartbeatResponses.shouldHaveSingleElement { it is TerminateResponse } + heartbeatResponses.shouldHaveSingleElement { it is com.saveourtool.common.agent.TerminateResponse } } } @@ -173,12 +192,20 @@ class HeartbeatControllerTest { fun `should not shutdown any agents when they are STARTING`() { testHeartbeat( agentStatusDtos = listOf( - AgentStatusDto(AgentState.STARTING, "test-1"), - AgentStatusDto(AgentState.STARTING, "test-2"), + AgentStatusDto(com.saveourtool.common.agent.AgentState.STARTING, "test-1"), + AgentStatusDto(com.saveourtool.common.agent.AgentState.STARTING, "test-2"), ), heartbeats = listOf( - Heartbeat("test-1".toAgentInfo(), AgentState.STARTING, noProgress).withDelay(1.seconds), - Heartbeat("test-1".toAgentInfo(), AgentState.IDLE, noProgress).withDelay(2.seconds) + com.saveourtool.common.agent.Heartbeat( + "test-1".toAgentInfo(), + com.saveourtool.common.agent.AgentState.STARTING, + noProgress + ).withDelay(1.seconds), + com.saveourtool.common.agent.Heartbeat( + "test-1".toAgentInfo(), + com.saveourtool.common.agent.AgentState.IDLE, + noProgress + ).withDelay(2.seconds) ), initConfigs = listOf(initConfig), testBatchNullable = listOf( @@ -189,7 +216,7 @@ class HeartbeatControllerTest { mockUpdateAgentStatusesCount = 3, mockAddAgentCount = 1, ) { heartbeatResponses -> - heartbeatResponses shouldNot exist { it is TerminateResponse } + heartbeatResponses shouldNot exist { it is com.saveourtool.common.agent.TerminateResponse } } } @@ -198,18 +225,46 @@ class HeartbeatControllerTest { fun `should shutdown agent, which don't sent heartbeat for some time`() { testHeartbeat( agentStatusDtos = listOf( - AgentStatusDto(AgentState.STARTING, "test-1"), - AgentStatusDto(AgentState.BUSY, "test-2"), + AgentStatusDto(com.saveourtool.common.agent.AgentState.STARTING, "test-1"), + AgentStatusDto(com.saveourtool.common.agent.AgentState.BUSY, "test-2"), ), heartbeats = listOf( - Heartbeat("test-1".toAgentInfo(), AgentState.STARTING, noProgress).withoutDelay(), - Heartbeat("test-1".toAgentInfo(), AgentState.IDLE, noProgress).withDelay(1.seconds), - Heartbeat("test-1".toAgentInfo(), AgentState.BUSY, noProgress).withDelay(2.seconds), - Heartbeat("test-2".toAgentInfo(), AgentState.BUSY, noProgress).withDelay(3.seconds), + com.saveourtool.common.agent.Heartbeat( + "test-1".toAgentInfo(), + com.saveourtool.common.agent.AgentState.STARTING, + noProgress + ).withoutDelay(), + com.saveourtool.common.agent.Heartbeat( + "test-1".toAgentInfo(), + com.saveourtool.common.agent.AgentState.IDLE, + noProgress + ).withDelay(1.seconds), + com.saveourtool.common.agent.Heartbeat( + "test-1".toAgentInfo(), + com.saveourtool.common.agent.AgentState.BUSY, + noProgress + ).withDelay(2.seconds), + com.saveourtool.common.agent.Heartbeat( + "test-2".toAgentInfo(), + com.saveourtool.common.agent.AgentState.BUSY, + noProgress + ).withDelay(3.seconds), // 3 absent heartbeats from test-2 - Heartbeat("test-1".toAgentInfo(), AgentState.BUSY, noProgress).withDelay(4.seconds), - Heartbeat("test-1".toAgentInfo(), AgentState.BUSY, noProgress).withDelay(5.seconds), - Heartbeat("test-1".toAgentInfo(), AgentState.BUSY, noProgress).withDelay(10.seconds), + com.saveourtool.common.agent.Heartbeat( + "test-1".toAgentInfo(), + com.saveourtool.common.agent.AgentState.BUSY, + noProgress + ).withDelay(4.seconds), + com.saveourtool.common.agent.Heartbeat( + "test-1".toAgentInfo(), + com.saveourtool.common.agent.AgentState.BUSY, + noProgress + ).withDelay(5.seconds), + com.saveourtool.common.agent.Heartbeat( + "test-1".toAgentInfo(), + com.saveourtool.common.agent.AgentState.BUSY, + noProgress + ).withDelay(10.seconds), ), initConfigs = listOf(initConfig), testBatchNullable = listOf( @@ -229,17 +284,33 @@ class HeartbeatControllerTest { @Test fun `should shutdown all agents, since all of them don't sent heartbeats for some time`() { val agentStatusDtos = listOf( - AgentStatusDto(AgentState.STARTING, "test-1"), + AgentStatusDto(com.saveourtool.common.agent.AgentState.STARTING, "test-1"), ) testHeartbeat( agentStatusDtos = agentStatusDtos, heartbeats = listOf( // heartbeats were sent long time ago - Heartbeat("test-1".toAgentInfo(), AgentState.STARTING, noProgress).withoutDelay(), - Heartbeat("test-1".toAgentInfo(), AgentState.IDLE, noProgress).withoutDelay(), - Heartbeat("test-2".toAgentInfo(), AgentState.BUSY, noProgress).withoutDelay(), + com.saveourtool.common.agent.Heartbeat( + "test-1".toAgentInfo(), + com.saveourtool.common.agent.AgentState.STARTING, + noProgress + ).withoutDelay(), + com.saveourtool.common.agent.Heartbeat( + "test-1".toAgentInfo(), + com.saveourtool.common.agent.AgentState.IDLE, + noProgress + ).withoutDelay(), + com.saveourtool.common.agent.Heartbeat( + "test-2".toAgentInfo(), + com.saveourtool.common.agent.AgentState.BUSY, + noProgress + ).withoutDelay(), // some heartbeat from another agent to prevent cleanup of execution - Heartbeat("test-3".toAgentInfo(), AgentState.BUSY, noProgress).withDelay(5.seconds), + com.saveourtool.common.agent.Heartbeat( + "test-3".toAgentInfo(), + com.saveourtool.common.agent.AgentState.BUSY, + noProgress + ).withDelay(5.seconds), ), initConfigs = listOf(initConfig), testBatchNullable = listOf( @@ -259,20 +330,25 @@ class HeartbeatControllerTest { @Test fun `should shutdown agents even if there are some already FINISHED`() { val agentStatusDtos = listOf( - AgentStatusDto(AgentState.IDLE, "test-1"), - AgentStatusDto(AgentState.IDLE, "test-2"), - AgentStatusDto(AgentState.FINISHED, "test-1", LocalDateTime(2021, Month.JANUARY, 1, 0, 0, 0)), - AgentStatusDto(AgentState.FINISHED, "test-2", LocalDateTime(2021, Month.JANUARY, 1, 0, 0, 0)), + AgentStatusDto(com.saveourtool.common.agent.AgentState.IDLE, "test-1"), + AgentStatusDto(com.saveourtool.common.agent.AgentState.IDLE, "test-2"), + AgentStatusDto(com.saveourtool.common.agent.AgentState.FINISHED, "test-1", LocalDateTime(2021, Month.JANUARY, 1, 0, 0, 0)), + AgentStatusDto(com.saveourtool.common.agent.AgentState.FINISHED, "test-2", LocalDateTime(2021, Month.JANUARY, 1, 0, 0, 0)), ) testHeartbeat( agentStatusDtos = agentStatusDtos, - heartbeats = listOf(Heartbeat("test-1".toAgentInfo(), AgentState.IDLE, fullProgress).withoutDelay()), + heartbeats = listOf( + com.saveourtool.common.agent.Heartbeat( + "test-1".toAgentInfo(), + com.saveourtool.common.agent.AgentState.IDLE, + fullProgress + ).withoutDelay()), initConfigs = emptyList(), testBatchNullable = emptyList(), mockUpdateAgentStatusesCount = 2, mockAgentStatusesByExecutionId = true, ) { heartbeatResponses -> - heartbeatResponses.shouldHaveSingleElement { it is TerminateResponse } + heartbeatResponses.shouldHaveSingleElement { it is com.saveourtool.common.agent.TerminateResponse } } } @@ -280,14 +356,14 @@ class HeartbeatControllerTest { @Test fun `should mark test executions as failed if agent returned only part of results`() { val agentStatusDtos = listOf( - AgentStatusDto(AgentState.IDLE, "test-1"), - AgentStatusDto(AgentState.IDLE, "test-2"), + AgentStatusDto(com.saveourtool.common.agent.AgentState.IDLE, "test-1"), + AgentStatusDto(com.saveourtool.common.agent.AgentState.IDLE, "test-2"), ) // if some test execution still have state `READY_FOR_TESTING`, but Agent.state == `FINISHED` // that's mean, that part of results is lost - val testExecutions: List = listOf( - TestExecutionDto( + val testExecutions: List = listOf( + com.saveourtool.common.agent.TestExecutionDto( filePath = "testPath63", pluginName = "WarnPlugin", agentContainerId = "test", @@ -316,7 +392,11 @@ class HeartbeatControllerTest { testHeartbeat( agentStatusDtos = agentStatusDtos, heartbeats = listOf( - Heartbeat("test-1".toAgentInfo(), AgentState.FINISHED, fullProgress).withoutDelay() + com.saveourtool.common.agent.Heartbeat( + "test-1".toAgentInfo(), + com.saveourtool.common.agent.AgentState.FINISHED, + fullProgress + ).withoutDelay() ), initConfigs = emptyList(), testBatchNullable = null, @@ -346,12 +426,12 @@ class HeartbeatControllerTest { private fun testHeartbeat( agentStatusDtos: List, heartbeats: List, - initConfigs: List, + initConfigs: List, testBatchNullable: TestBatch?, mockUpdateAgentStatusesCount: Int = 0, mockAgentStatusesByExecutionId: Boolean = false, mockAddAgentCount: Int = 0, - verification: (heartbeatResponses: List) -> Unit, + verification: (heartbeatResponses: List) -> Unit, ) { val executionId = executionIdCounter.incrementAndGet() if (mockAddAgentCount > 0) { @@ -364,7 +444,7 @@ class HeartbeatControllerTest { } testBatchNullable?.let { testBatch -> val returnValue = if (testBatch.isNotEmpty()) { - AgentRunConfig( + com.saveourtool.common.agent.AgentRunConfig( cliArgs = testBatch.joinToString(" ") { it.filePath }, executionDataUploadUrl = "N/A", debugInfoUploadUrl = "N/A", @@ -385,7 +465,7 @@ class HeartbeatControllerTest { .thenReturn(Mono.just(agentStatusDtos)) } - val heartbeatResponses: MutableList = mutableListOf() + val heartbeatResponses: MutableList = mutableListOf() heartbeats.forEach { (heartbeat, delay) -> @Suppress("SleepInsteadOfDelay") Thread.sleep(delay.toLong(DurationUnit.MILLISECONDS)) @@ -404,7 +484,7 @@ class HeartbeatControllerTest { ) .exchange() .expectAll({ responseSpec -> - responseSpec.expectBody() + responseSpec.expectBody() .consumeWith { heartbeatResponses.add(it.responseBody) } @@ -420,7 +500,7 @@ class HeartbeatControllerTest { Thread.sleep(5_000) verify(orchestratorAgentService, times(initConfigs.size)).getInitConfig(any()) - heartbeatResponses.filterIsInstance().shouldHaveSize(initConfigs.size) + heartbeatResponses.filterIsInstance().shouldHaveSize(initConfigs.size) testBatchNullable?.let { verify(orchestratorAgentService).getNextRunConfig(any()) } @@ -436,28 +516,32 @@ class HeartbeatControllerTest { companion object { private val executionIdCounter = AtomicLong() - private val noProgress: ExecutionProgress = ExecutionProgress(0, -1L) - private val fullProgress: ExecutionProgress = ExecutionProgress(100, -1L) - private val initConfig: AgentInitConfig = AgentInitConfig( - saveCliUrl = "stub", - testSuitesSourceSnapshotUrl = "stub", - additionalFileNameToUrl = mapOf("file" to "stub"), - saveCliOverrides = SaveCliOverrides(), - ) - private fun String.toAgentInfo(): AgentInfo = AgentInfo( - containerId = this, - containerName = this, - version = "1.0", - ) + private val noProgress: com.saveourtool.common.agent.ExecutionProgress = + com.saveourtool.common.agent.ExecutionProgress(0, -1L) + private val fullProgress: com.saveourtool.common.agent.ExecutionProgress = + com.saveourtool.common.agent.ExecutionProgress(100, -1L) + private val initConfig: com.saveourtool.common.agent.AgentInitConfig = + com.saveourtool.common.agent.AgentInitConfig( + saveCliUrl = "stub", + testSuitesSourceSnapshotUrl = "stub", + additionalFileNameToUrl = mapOf("file" to "stub"), + saveCliOverrides = com.saveourtool.common.agent.SaveCliOverrides(), + ) + private fun String.toAgentInfo(): com.saveourtool.common.agent.AgentInfo = + com.saveourtool.common.agent.AgentInfo( + containerId = this, + containerName = this, + version = "1.0", + ) private data class HeartbeatWithDelay( - val heartbeat: Heartbeat, + val heartbeat: com.saveourtool.common.agent.Heartbeat, val delay: Duration, ) - private fun Heartbeat.withDelay(delay: Duration): HeartbeatWithDelay = HeartbeatWithDelay(this, delay) + private fun com.saveourtool.common.agent.Heartbeat.withDelay(delay: Duration): HeartbeatWithDelay = HeartbeatWithDelay(this, delay) - private fun Heartbeat.withoutDelay(): HeartbeatWithDelay = withDelay(ZERO) + private fun com.saveourtool.common.agent.Heartbeat.withoutDelay(): HeartbeatWithDelay = withDelay(ZERO) @DynamicPropertySource @JvmStatic diff --git a/save-orchestrator/build.gradle.kts b/save-orchestrator/build.gradle.kts index 67660860c9..aeac3c8b79 100644 --- a/save-orchestrator/build.gradle.kts +++ b/save-orchestrator/build.gradle.kts @@ -13,7 +13,7 @@ tasks.withType { } dependencies { - api(projects.saveCloudCommon) + api(projects.common) implementation(projects.saveOrchestratorCommon) implementation(libs.save.common.jvm) implementation(libs.dockerJava.core) diff --git a/save-orchestrator/src/main/kotlin/com/saveourtool/save/orchestrator/service/BackendOrchestratorAgentService.kt b/save-orchestrator/src/main/kotlin/com/saveourtool/save/orchestrator/service/BackendOrchestratorAgentService.kt index 021c263c2c..1ae73d9f4c 100644 --- a/save-orchestrator/src/main/kotlin/com/saveourtool/save/orchestrator/service/BackendOrchestratorAgentService.kt +++ b/save-orchestrator/src/main/kotlin/com/saveourtool/save/orchestrator/service/BackendOrchestratorAgentService.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.orchestrator.service -import com.saveourtool.save.agent.AgentInitConfig -import com.saveourtool.save.agent.AgentRunConfig +import com.saveourtool.common.agent.AgentInitConfig +import com.saveourtool.common.agent.AgentRunConfig import com.saveourtool.save.domain.TestResultStatus import com.saveourtool.save.entities.AgentDto import com.saveourtool.save.entities.AgentStatusDto @@ -33,13 +33,13 @@ class BackendOrchestratorAgentService( .applyAll(customizers) .build() - override fun getInitConfig(containerId: String): Mono = webClientBackend + override fun getInitConfig(containerId: String): Mono = webClientBackend .get() .uri("/agents/get-init-config?containerId=$containerId") .retrieve() .bodyToMono() - override fun getNextRunConfig(containerId: String): Mono = webClientBackend + override fun getNextRunConfig(containerId: String): Mono = webClientBackend .get() .uri("/agents/get-next-run-config?containerId=$containerId") .retrieve() diff --git a/save-preprocessor/build.gradle.kts b/save-preprocessor/build.gradle.kts index d8d8d35b25..d85d1e4162 100644 --- a/save-preprocessor/build.gradle.kts +++ b/save-preprocessor/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } dependencies { - implementation(projects.saveCloudCommon) + implementation(projects.common) testImplementation(projects.testUtils) implementation(libs.save.common.jvm) implementation(libs.save.core.jvm) { diff --git a/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/service/TestDiscoveringServiceTest.kt b/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/service/TestDiscoveringServiceTest.kt index 6327cbfc90..0d05a22ca8 100644 --- a/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/service/TestDiscoveringServiceTest.kt +++ b/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/service/TestDiscoveringServiceTest.kt @@ -1,12 +1,12 @@ package com.saveourtool.save.preprocessor.service import com.saveourtool.save.core.config.TestConfig -import com.saveourtool.save.entities.* +import com.saveourtool.common.entities.* import com.saveourtool.save.preprocessor.config.ConfigProperties -import com.saveourtool.save.test.TestsSourceSnapshotDto -import com.saveourtool.save.testsuite.TestSuiteDto -import com.saveourtool.save.testsuite.TestSuitesSourceDto -import com.saveourtool.save.utils.getCurrentLocalDateTime +import com.saveourtool.common.test.TestsSourceSnapshotDto +import com.saveourtool.common.testsuite.TestSuiteDto +import com.saveourtool.common.testsuite.TestSuitesSourceDto +import com.saveourtool.common.utils.getCurrentLocalDateTime import org.eclipse.jgit.api.Git import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.BeforeAll diff --git a/settings.gradle.kts b/settings.gradle.kts index 7908a2ee2e..d59b41114e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -41,7 +41,7 @@ include("save-backend") include("save-orchestrator-common") include("save-orchestrator") include("save-frontend") -include("save-cloud-common") +include("common") include("save-agent") include("save-preprocessor") include("test-utils") diff --git a/test-analysis-core/build.gradle.kts b/test-analysis-core/build.gradle.kts index 009c84473c..641fbe9639 100644 --- a/test-analysis-core/build.gradle.kts +++ b/test-analysis-core/build.gradle.kts @@ -18,7 +18,7 @@ dependencies { * and fail to find the undefined version. */ implementation(project.dependencies.platform(libs.spring.boot.dependencies)) - api(projects.saveCloudCommon) + api(projects.common) testApi(libs.assertj.core) testApi(libs.mockito.kotlin) diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/Algorithm.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/Algorithm.kt index 6993b9d6ba..8980844560 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/Algorithm.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/Algorithm.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.test.analysis.algorithms import com.saveourtool.save.test.analysis.api.TestRuns -import com.saveourtool.save.test.analysis.metrics.RegularTestMetrics -import com.saveourtool.save.test.analysis.metrics.TestMetrics -import com.saveourtool.save.test.analysis.results.IrregularTest +import com.saveourtool.common.test.analysis.metrics.RegularTestMetrics +import com.saveourtool.common.test.analysis.metrics.TestMetrics +import com.saveourtool.common.test.analysis.results.IrregularTest /** * A heuristic algorithm which accepts test history ([TestRuns]), pre-calculated diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/FlipRateAnalysis.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/FlipRateAnalysis.kt index 3592664ab4..fc23b9dee4 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/FlipRateAnalysis.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/FlipRateAnalysis.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.test.analysis.algorithms import com.saveourtool.save.test.analysis.api.TestRuns -import com.saveourtool.save.test.analysis.metrics.RegularTestMetrics -import com.saveourtool.save.test.analysis.results.FlakyTest -import com.saveourtool.save.test.analysis.results.IrregularTest +import com.saveourtool.common.test.analysis.metrics.RegularTestMetrics +import com.saveourtool.common.test.analysis.results.FlakyTest +import com.saveourtool.common.test.analysis.results.IrregularTest /** * _Flip-rate_ based flaky test detection algorithm. diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/PermanentFailureDetection.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/PermanentFailureDetection.kt index b903cf642a..1844e02d52 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/PermanentFailureDetection.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/PermanentFailureDetection.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.test.analysis.algorithms import com.saveourtool.save.test.analysis.api.TestRuns -import com.saveourtool.save.test.analysis.metrics.RegularTestMetrics -import com.saveourtool.save.test.analysis.results.IrregularTest -import com.saveourtool.save.test.analysis.results.PermanentFailure +import com.saveourtool.common.test.analysis.metrics.RegularTestMetrics +import com.saveourtool.common.test.analysis.results.IrregularTest +import com.saveourtool.common.test.analysis.results.PermanentFailure /** * _Permanent failure_ detection algorithm. diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/RegressionDetection.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/RegressionDetection.kt index 70f3f93dec..aec4326698 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/RegressionDetection.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/RegressionDetection.kt @@ -1,12 +1,12 @@ package com.saveourtool.save.test.analysis.algorithms -import com.saveourtool.save.domain.TestResultStatus +import com.saveourtool.common.domain.TestResultStatus import com.saveourtool.save.test.analysis.api.TestRuns import com.saveourtool.save.test.analysis.api.TestStatusProvider import com.saveourtool.save.test.analysis.api.TestStatusProviderScope -import com.saveourtool.save.test.analysis.metrics.RegularTestMetrics -import com.saveourtool.save.test.analysis.results.IrregularTest -import com.saveourtool.save.test.analysis.results.Regression +import com.saveourtool.common.test.analysis.metrics.RegularTestMetrics +import com.saveourtool.common.test.analysis.results.IrregularTest +import com.saveourtool.common.test.analysis.results.Regression /** * Regression detection algorithm. diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestAnalysisService.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestAnalysisService.kt index 840e6f7356..cea187cde2 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestAnalysisService.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestAnalysisService.kt @@ -4,7 +4,7 @@ import com.saveourtool.save.test.analysis.algorithms.FlipRateAnalysis import com.saveourtool.save.test.analysis.algorithms.PermanentFailureDetection import com.saveourtool.save.test.analysis.algorithms.RegressionDetection import com.saveourtool.save.test.analysis.internal.DefaultTestAnalysisService -import com.saveourtool.save.test.analysis.results.AnalysisResult +import com.saveourtool.common.test.analysis.results.AnalysisResult /** * Analyzes test runs for the given test id; see [analyze] for details. diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestId.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestId.kt index 3c5c91d168..2540cce4e0 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestId.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestId.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.test.analysis.api -import com.saveourtool.save.entities.Test +import com.saveourtool.common.entities.Test /** * A test executed within a particular project (the same test executed in a diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestRun.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestRun.kt index f4eed21122..722b376907 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestRun.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestRun.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.test.analysis.api -import com.saveourtool.save.domain.TestResultStatus +import com.saveourtool.common.domain.TestResultStatus import kotlin.time.Duration /** diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestStatisticsStorage.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestStatisticsStorage.kt index b9a90830e5..7c67def7aa 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestStatisticsStorage.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestStatisticsStorage.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.test.analysis.api -import com.saveourtool.save.domain.TestResultStatus -import com.saveourtool.save.test.analysis.metrics.NoDataAvailable -import com.saveourtool.save.test.analysis.metrics.RegularTestMetrics -import com.saveourtool.save.test.analysis.metrics.TestMetrics +import com.saveourtool.common.domain.TestResultStatus +import com.saveourtool.common.test.analysis.metrics.NoDataAvailable +import com.saveourtool.common.test.analysis.metrics.RegularTestMetrics +import com.saveourtool.common.test.analysis.metrics.TestMetrics import kotlin.time.Duration import kotlin.time.DurationUnit.MILLISECONDS import kotlin.time.toDuration diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestStatusProvider.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestStatusProvider.kt index cc102e3aaf..886e992e0f 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestStatusProvider.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestStatusProvider.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.test.analysis.api -import com.saveourtool.save.domain.TestResultStatus +import com.saveourtool.common.domain.TestResultStatus import com.saveourtool.save.test.analysis.internal.DefaultTestStatusProvider /** diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/ExecutionMetadata.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/ExecutionMetadata.kt index d0b10b977a..e947e343ce 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/ExecutionMetadata.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/ExecutionMetadata.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.test.analysis.entities -import com.saveourtool.save.entities.Execution -import com.saveourtool.save.entities.TestExecution +import com.saveourtool.common.entities.Execution +import com.saveourtool.common.entities.TestExecution /** * Metadata of an execution. diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/FilePath.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/FilePath.kt index b57ff156e2..bc5ff471c0 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/FilePath.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/FilePath.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.test.analysis.entities -import com.saveourtool.save.entities.Test +import com.saveourtool.common.entities.Test /** * File path, intended to be assignment-incompatible with the regular string. diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/OrganizationName.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/OrganizationName.kt index 5110f6aea2..a49aa7d8bd 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/OrganizationName.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/OrganizationName.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.test.analysis.entities -import com.saveourtool.save.entities.Organization +import com.saveourtool.common.entities.Organization /** * Organization name, intended to be assignment-incompatible with the regular diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/PluginName.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/PluginName.kt index 6bc790d04a..b8d5e7a33d 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/PluginName.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/PluginName.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.test.analysis.entities -import com.saveourtool.save.entities.Test +import com.saveourtool.common.entities.Test /** * Plugin name, intended to be assignment-incompatible with the regular string. diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/ProjectName.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/ProjectName.kt index 0bb5752d02..be9365f2fa 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/ProjectName.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/ProjectName.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.test.analysis.entities -import com.saveourtool.save.entities.Project +import com.saveourtool.common.entities.Project /** * Project name, intended to be assignment-incompatible with the regular string. diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/TestSuiteName.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/TestSuiteName.kt index 6b4ed133eb..bd997fc79f 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/TestSuiteName.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/TestSuiteName.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.test.analysis.entities -import com.saveourtool.save.entities.TestSuite +import com.saveourtool.common.entities.TestSuite /** * Test suite name, intended to be assignment-incompatible with the regular diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/TestSuiteSourceName.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/TestSuiteSourceName.kt index be8eb15fc4..54cda6a0f8 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/TestSuiteSourceName.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/TestSuiteSourceName.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.test.analysis.entities -import com.saveourtool.save.entities.Execution +import com.saveourtool.common.entities.Execution /** * Test suite source name, intended to be assignment-incompatible with the diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/TestSuiteVersion.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/TestSuiteVersion.kt index a142eb64f8..f878acbbfb 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/TestSuiteVersion.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/entities/TestSuiteVersion.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.test.analysis.entities -import com.saveourtool.save.entities.Execution +import com.saveourtool.common.entities.Execution /** * Test suite version, intended to be assignment-incompatible with the regular diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/DefaultTestAnalysisService.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/DefaultTestAnalysisService.kt index 4253135469..64603c07e6 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/DefaultTestAnalysisService.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/DefaultTestAnalysisService.kt @@ -4,10 +4,10 @@ import com.saveourtool.save.test.analysis.algorithms.Algorithm import com.saveourtool.save.test.analysis.api.TestAnalysisService import com.saveourtool.save.test.analysis.api.TestId import com.saveourtool.save.test.analysis.api.TestStatisticsStorage -import com.saveourtool.save.test.analysis.metrics.NoDataAvailable -import com.saveourtool.save.test.analysis.metrics.RegularTestMetrics -import com.saveourtool.save.test.analysis.results.AnalysisResult -import com.saveourtool.save.test.analysis.results.RegularTest +import com.saveourtool.common.test.analysis.metrics.NoDataAvailable +import com.saveourtool.common.test.analysis.metrics.RegularTestMetrics +import com.saveourtool.common.test.analysis.results.AnalysisResult +import com.saveourtool.common.test.analysis.results.RegularTest /** * The default implementation of [TestAnalysisService]. diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/DefaultTestStatusProvider.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/DefaultTestStatusProvider.kt index 026df1ef0a..257400f857 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/DefaultTestStatusProvider.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/DefaultTestStatusProvider.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.test.analysis.internal -import com.saveourtool.save.domain.TestResultStatus -import com.saveourtool.save.domain.TestResultStatus.FAILED -import com.saveourtool.save.domain.TestResultStatus.IGNORED -import com.saveourtool.save.domain.TestResultStatus.PASSED +import com.saveourtool.common.domain.TestResultStatus +import com.saveourtool.common.domain.TestResultStatus.FAILED +import com.saveourtool.common.domain.TestResultStatus.IGNORED +import com.saveourtool.common.domain.TestResultStatus.PASSED import com.saveourtool.save.test.analysis.api.TestRun import com.saveourtool.save.test.analysis.api.TestStatusProvider diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/ExtendedTestRun.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/ExtendedTestRun.kt index 40aa77d083..f0e88d891a 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/ExtendedTestRun.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/ExtendedTestRun.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.test.analysis.internal -import com.saveourtool.save.domain.TestResultStatus +import com.saveourtool.common.domain.TestResultStatus import com.saveourtool.save.test.analysis.api.TestId import com.saveourtool.save.test.analysis.api.TestRun import kotlin.time.Duration diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/MemoryBacked.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/MemoryBacked.kt index 1b70da8940..51a2d29c9e 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/MemoryBacked.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/MemoryBacked.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.test.analysis.internal -import com.saveourtool.save.domain.TestResultStatus +import com.saveourtool.common.domain.TestResultStatus import com.saveourtool.save.test.analysis.api.TestId import com.saveourtool.save.test.analysis.api.TestRuns import com.saveourtool.save.test.analysis.api.TestStatisticsStorage diff --git a/test-analysis-core/src/test/kotlin/com/saveourtool/save/test/analysis/algorithms/RegressionDetectionTest.kt b/test-analysis-core/src/test/kotlin/com/saveourtool/save/test/analysis/algorithms/RegressionDetectionTest.kt index 5bb6f2267f..ae6cc2823e 100644 --- a/test-analysis-core/src/test/kotlin/com/saveourtool/save/test/analysis/algorithms/RegressionDetectionTest.kt +++ b/test-analysis-core/src/test/kotlin/com/saveourtool/save/test/analysis/algorithms/RegressionDetectionTest.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.test.analysis.algorithms -import com.saveourtool.save.domain.TestResultStatus +import com.saveourtool.common.domain.TestResultStatus import com.saveourtool.save.test.analysis.api.TestStatusProvider import org.assertj.core.api.Assertions.assertThatThrownBy import org.junit.jupiter.api.Test diff --git a/test-analysis-core/src/test/kotlin/com/saveourtool/save/test/analysis/api/TestAnalysisServiceTest.kt b/test-analysis-core/src/test/kotlin/com/saveourtool/save/test/analysis/api/TestAnalysisServiceTest.kt index 34b8b17518..3c99051b96 100644 --- a/test-analysis-core/src/test/kotlin/com/saveourtool/save/test/analysis/api/TestAnalysisServiceTest.kt +++ b/test-analysis-core/src/test/kotlin/com/saveourtool/save/test/analysis/api/TestAnalysisServiceTest.kt @@ -1,16 +1,16 @@ package com.saveourtool.save.test.analysis.api -import com.saveourtool.save.domain.TestResultStatus.FAILED -import com.saveourtool.save.domain.TestResultStatus.IGNORED -import com.saveourtool.save.domain.TestResultStatus.PASSED +import com.saveourtool.common.domain.TestResultStatus.FAILED +import com.saveourtool.common.domain.TestResultStatus.IGNORED +import com.saveourtool.common.domain.TestResultStatus.PASSED import com.saveourtool.save.test.analysis.api.TestAnalysisService.Factory.MINIMUM_RUN_COUNT import com.saveourtool.save.test.analysis.internal.ExtendedTestRun import com.saveourtool.save.test.analysis.internal.MemoryBacked import com.saveourtool.save.test.analysis.internal.MutableTestStatisticsStorage -import com.saveourtool.save.test.analysis.results.FlakyTest -import com.saveourtool.save.test.analysis.results.PermanentFailure -import com.saveourtool.save.test.analysis.results.Regression -import com.saveourtool.save.test.analysis.results.RegularTest +import com.saveourtool.common.test.analysis.results.FlakyTest +import com.saveourtool.common.test.analysis.results.PermanentFailure +import com.saveourtool.common.test.analysis.results.Regression +import com.saveourtool.common.test.analysis.results.RegularTest import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.BeforeEach diff --git a/test-analysis-core/src/test/kotlin/com/saveourtool/save/test/analysis/api/TestStatisticsStorageTest.kt b/test-analysis-core/src/test/kotlin/com/saveourtool/save/test/analysis/api/TestStatisticsStorageTest.kt index ad6330a91b..c02fd9fbff 100644 --- a/test-analysis-core/src/test/kotlin/com/saveourtool/save/test/analysis/api/TestStatisticsStorageTest.kt +++ b/test-analysis-core/src/test/kotlin/com/saveourtool/save/test/analysis/api/TestStatisticsStorageTest.kt @@ -1,14 +1,14 @@ package com.saveourtool.save.test.analysis.api -import com.saveourtool.save.domain.TestResultStatus -import com.saveourtool.save.domain.TestResultStatus.FAILED -import com.saveourtool.save.domain.TestResultStatus.IGNORED -import com.saveourtool.save.domain.TestResultStatus.PASSED +import com.saveourtool.common.domain.TestResultStatus +import com.saveourtool.common.domain.TestResultStatus.FAILED +import com.saveourtool.common.domain.TestResultStatus.IGNORED +import com.saveourtool.common.domain.TestResultStatus.PASSED import com.saveourtool.save.test.analysis.internal.ExtendedTestRun import com.saveourtool.save.test.analysis.internal.MemoryBacked import com.saveourtool.save.test.analysis.internal.MutableTestStatisticsStorage -import com.saveourtool.save.test.analysis.metrics.NoDataAvailable -import com.saveourtool.save.test.analysis.metrics.RegularTestMetrics +import com.saveourtool.common.test.analysis.metrics.NoDataAvailable +import com.saveourtool.common.test.analysis.metrics.RegularTestMetrics import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.BeforeEach diff --git a/test-analysis-core/src/test/kotlin/com/saveourtool/save/test/analysis/api/TestStatusProviderTest.kt b/test-analysis-core/src/test/kotlin/com/saveourtool/save/test/analysis/api/TestStatusProviderTest.kt index db869aad46..a26f89b10c 100644 --- a/test-analysis-core/src/test/kotlin/com/saveourtool/save/test/analysis/api/TestStatusProviderTest.kt +++ b/test-analysis-core/src/test/kotlin/com/saveourtool/save/test/analysis/api/TestStatusProviderTest.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.test.analysis.api -import com.saveourtool.save.domain.TestResultStatus +import com.saveourtool.common.domain.TestResultStatus import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test From 2a632b6a31c87b15597ca1be621cd6a075a00ff1 Mon Sep 17 00:00:00 2001 From: Cheshiriks Date: Mon, 22 Apr 2024 18:29:48 +0300 Subject: [PATCH 2/9] Renaming save-cloud-common module to common --- .../save/agent/AgentConfiguration.kt | 5 +- .../backend/configs/ApiGroupsConfiguration.kt | 6 +-- .../configs/ApplicationConfiguration.kt | 8 ++-- .../save/backend/configs/ConfigProperties.kt | 4 +- .../configs/TestAnalysisConfiguration.kt | 5 +- .../backend/controllers/AvatarController.kt | 16 +++---- .../AwesomeBenchmarksController.kt | 4 +- .../backend/controllers/CommentController.kt | 22 ++++----- .../controllers/ContainerLogController.kt | 12 ++--- .../backend/controllers/ContestController.kt | 30 ++++++------ .../controllers/ContestSampleController.kt | 10 ++-- .../controllers/DemoManagerController.kt | 38 +++++++-------- .../controllers/DownloadFilesController.kt | 10 ++-- .../controllers/ExecutionController.kt | 38 +++++++-------- .../backend/controllers/FileController.kt | 16 +++---- .../LnkContestProjectController.kt | 28 +++++------ .../LnkOrganizationTestSuiteController.kt | 44 +++++++++--------- .../LnkUserOrganizationController.kt | 40 ++++++++-------- .../controllers/LnkUserProjectController.kt | 24 +++++----- .../controllers/NotificationController.kt | 12 ++--- .../controllers/OrganizationController.kt | 44 +++++++++--------- .../controllers/PermissionController.kt | 28 +++++------ .../backend/controllers/ProjectController.kt | 38 +++++++-------- .../controllers/RunExecutionController.kt | 24 +++++----- .../controllers/TestExecutionController.kt | 46 +++++++++---------- .../controllers/TestSuitesSourceController.kt | 42 ++++++++--------- .../controllers/UserPermissionController.kt | 8 ++-- .../controllers/UsersDetailsController.kt | 20 ++++---- .../controllers/internal/AgentsController.kt | 8 ++-- .../internal/FileInternalController.kt | 6 +-- .../controllers/internal/TestController.kt | 8 ++-- .../internal/TestSuitesController.kt | 8 ++-- .../TestSuitesSourceInternalController.kt | 12 ++--- .../controllers/internal/UsersController.kt | 4 +- .../event/VulnerabilityMetadataListener.kt | 12 ++--- .../save/backend/event/UserListener.kt | 13 +++--- .../backend/repository/AgentRepository.kt | 4 +- .../repository/AgentStatusRepository.kt | 6 +-- .../repository/AwesomeBenchmarksRepository.kt | 4 +- .../backend/repository/ExecutionRepository.kt | 6 +-- .../save/backend/repository/FileRepository.kt | 6 +-- .../LnkContestExecutionRepository.kt | 4 +- .../repository/LnkContestProjectRepository.kt | 8 ++-- .../LnkContestTestSuiteRepository.kt | 6 +-- .../repository/LnkExecutionAgentRepository.kt | 4 +- .../repository/LnkExecutionFileRepository.kt | 8 ++-- .../LnkExecutionTestSuiteRepository.kt | 8 ++-- .../LnkOrganizationTestSuiteRepository.kt | 6 +-- .../repository/LnkProjectGithubRepository.kt | 4 +- .../repository/ProjectProblemRepository.kt | 6 +-- .../repository/TestExecutionRepository.kt | 6 +-- .../save/backend/repository/TestRepository.kt | 4 +- .../backend/repository/TestSuiteRepository.kt | 6 +-- .../repository/TestSuitesSourceRepository.kt | 8 ++-- .../TestsSourceSnapshotRepository.kt | 6 +-- .../TestsSourceVersionRepository.kt | 6 +-- .../repository/contest/ContestRepository.kt | 6 +-- .../contest/ContestSampleFieldRepository.kt | 4 +- .../contest/ContestSampleRepository.kt | 4 +- .../security/TestSuitePermissionEvaluator.kt | 9 ++-- .../security/UserPermissionEvaluator.kt | 9 ++-- .../save/backend/service/AgentService.kt | 12 +++-- .../service/AwesomeBenchmarksService.kt | 7 +-- .../backend/service/ContestSampleService.kt | 11 +++-- .../save/backend/service/ContestService.kt | 6 +-- .../save/backend/service/ExecutionService.kt | 16 +++---- .../service/LnkContestExecutionService.kt | 4 +- .../service/LnkContestProjectService.kt | 11 +++-- .../service/LnkContestTestSuiteService.kt | 3 +- .../service/LnkExecutionTestSuiteService.kt | 7 +-- .../LnkOrganizationTestSuiteService.kt | 9 ++-- .../service/LnkProjectGithubService.kt | 2 +- .../backend/service/NotificationService.kt | 4 +- .../save/backend/service/PermissionService.kt | 14 +++--- .../backend/service/ProjectProblemService.kt | 15 +++--- .../backend/service/TestAnalysisService.kt | 20 ++++---- .../backend/service/TestExecutionService.kt | 16 +++---- .../save/backend/service/TestService.kt | 18 ++++---- .../save/backend/service/TestSuitesService.kt | 15 +++--- .../service/TestSuitesSourceService.kt | 20 ++++---- .../service/TestsSourceVersionService.kt | 16 +++---- .../storage/BackendInternalFileStorage.kt | 10 ++-- .../save/backend/storage/DebugInfoStorage.kt | 16 +++---- .../backend/storage/ExecutionInfoStorage.kt | 18 ++++---- .../save/backend/storage/FileS3KeyManager.kt | 18 ++++---- .../save/backend/storage/FileStorage.kt | 8 ++-- .../TestsSourceSnapshotS3KeyManager.kt | 16 +++---- .../storage/TestsSourceSnapshotStorage.kt | 19 ++++---- .../save/backend/utils/ReactorUtils.kt | 4 +- .../save/backend/utils/SpringUtils.kt | 4 +- .../save/backend/DownloadFilesTest.kt | 30 ++++++------ .../controller/AgentsControllerTest.kt | 28 +++++------ .../backend/controller/DeleteEntitiesTest.kt | 20 ++++---- .../controller/ExecutionControllerTest.kt | 18 ++++---- .../controller/JpaSpecificationTest.kt | 4 +- .../LnkUserOrganizationControllerTest.kt | 28 +++++------ .../controller/OrganizationControllerTest.kt | 40 ++++++++-------- .../controller/PermissionControllerTest.kt | 42 ++++++++--------- .../controller/ProjectControllerTest.kt | 28 +++++------ .../controller/TestExecutionControllerTest.kt | 18 ++++---- .../TestInitializeControllerTest.kt | 6 +-- .../controller/TestSuitesControllerTest.kt | 4 +- .../backend/controller/UsersControllerTest.kt | 4 +- .../controller/UsersDetailsControllerTest.kt | 14 +++--- .../controllers/RunExecutionControllerTest.kt | 14 +++--- .../OrganizationPermissionEvaluatorTest.kt | 18 ++++---- .../ProjectPermissionEvaluatorTest.kt | 24 +++++----- .../service/LnkContestProjectServiceTest.kt | 10 ++-- .../backend/service/PermissionServiceTest.kt | 14 +++--- .../backend/utils/SecurityTestingUtils.kt | 2 +- .../com/saveourtool/save/demo/agent/Main.kt | 4 +- .../com/saveourtool/save/demo/agent/Server.kt | 10 ++-- .../save/demo/agent/SimpleRunner.kt | 16 +++---- .../save/demo/agent/utils/HttpUtils.kt | 8 ++-- .../save/demo/agent/utils/SetupUtils.kt | 8 ++-- .../demo/agent/RelativizeRunCommandTest.kt | 4 +- .../save/demo/agent/ServerTest.kt | 2 +- .../save/demo/cpg/controller/CpgController.kt | 8 ++-- .../save/demo/cpg/repository/CpgRepository.kt | 6 +-- .../save/demo/cpg/utils/CpgUtils.kt | 2 +- .../com/saveourtool/save/demo/SaveDemo.kt | 3 +- .../com/saveourtool/save/demo/config/Beans.kt | 2 +- .../save/demo/config/ConfigProperties.kt | 2 +- .../save/demo/controller/DemoController.kt | 14 +++--- .../demo/controller/DependencyController.kt | 12 ++--- .../controller/ManagementApiController.kt | 6 +-- .../demo/controller/ManagementController.kt | 6 +-- .../com/saveourtool/save/demo/entity/Demo.kt | 12 ++--- .../save/demo/entity/Dependency.kt | 2 +- .../save/demo/entity/GithubRepo.kt | 6 +-- .../save/demo/entity/RunCommand.kt | 4 +- .../saveourtool/save/demo/entity/Snapshot.kt | 2 +- .../com/saveourtool/save/demo/entity/Tool.kt | 3 +- .../save/demo/repository/DemoRepository.kt | 3 +- .../demo/repository/DependencyRepository.kt | 3 +- .../demo/repository/GithubRepoRepository.kt | 3 +- .../demo/repository/RunCommandRepository.kt | 3 +- .../demo/repository/SnapshotRepository.kt | 3 +- .../save/demo/repository/ToolRepository.kt | 3 +- .../saveourtool/save/demo/runners/Runner.kt | 4 +- .../demo/runners/cli/AbstractCliRunner.kt | 11 +++-- .../save/demo/runners/cli/CliRunner.kt | 4 +- .../save/demo/runners/cli/DemoCliRunner.kt | 7 ++- .../save/demo/runners/pod/DemoPodRunner.kt | 2 +- .../save/demo/runners/pod/PodRunner.kt | 6 +-- .../save/demo/service/DemoService.kt | 16 +++---- .../save/demo/service/DownloadToolService.kt | 12 ++--- .../save/demo/service/KubernetesService.kt | 8 ++-- .../save/demo/service/ToolService.kt | 3 +- .../demo/storage/DemoInternalFileStorage.kt | 7 +-- .../save/demo/storage/DependencyKeyManager.kt | 7 +-- .../save/demo/storage/DependencyStorage.kt | 9 ++-- .../save/demo/utils/KubernetesUtils.kt | 9 ++-- .../save/demo/utils/HttpUtilsTest.kt | 2 +- .../save/storage/S3StorageUtilsKtTest.kt | 2 + .../com/saveourtool/save/frontend/App.kt | 4 +- .../components/basic/ContestEnroller.kt | 2 +- .../components/basic/ExecutionLabels.kt | 12 ++--- .../frontend/components/basic/ProjectInfo.kt | 2 +- .../frontend/components/basic/SdkSelection.kt | 2 +- .../basic/TestResourcesSelection.kt | 6 +-- .../components/basic/TestStatusComponent.kt | 10 ++-- .../components/basic/TimelineComponent.kt | 4 +- .../basic/codeeditor/CodeEditorComponent.kt | 2 +- .../basic/codeeditor/EditorToolbar.kt | 2 +- .../components/basic/codeeditor/FileType.kt | 2 +- .../components/basic/cpg/GraphLoader.kt | 2 +- .../basic/demo/GraphDemoComponent.kt | 10 ++-- .../basic/demo/management/DemoButtons.kt | 6 +-- .../demo/management/DemoContainerLogButton.kt | 4 +- .../basic/demo/management/DemoFileUploader.kt | 6 +-- .../basic/demo/management/DemoModeLabel.kt | 2 +- .../basic/demo/management/DemoModeModal.kt | 6 +-- .../basic/demo/management/DemoRunCommands.kt | 4 +- .../demo/management/DemoSettingsComponent.kt | 2 +- .../basic/demo/management/DemoStatusLabel.kt | 2 +- .../basic/demo/run/DemoOutputComponent.kt | 2 +- .../basic/demo/run/DemoRunComponent.kt | 10 ++-- .../basic/demo/welcome/DemoListComponent.kt | 4 +- .../basic/demo/welcome/FeaturedDemos.kt | 2 +- .../fileuploader/FileManagerComponent.kt | 6 +-- .../fileuploader/ProgressBarComponent.kt | 3 +- .../basic/fileuploader/SimpleFileUploader.kt | 2 +- .../basic/graph/AdditionalInfoDisplayer.kt | 2 +- .../basic/graph/CytoscapeVisualizer.kt | 4 +- .../basic/graph/SigmaGraphVisualizer.kt | 2 +- .../projects/CreateProjectProblemView.kt | 8 ++-- .../projects/EditProjectProblemWindow.kt | 4 +- .../basic/projects/ProjectDemoMenu.kt | 18 ++++---- .../basic/projects/ProjectFilesMenu.kt | 8 ++-- .../basic/projects/ProjectInfoMenu.kt | 8 ++-- .../basic/projects/ProjectProblemView.kt | 6 +-- .../basic/projects/ProjectRunMenu.kt | 16 +++---- .../basic/projects/ProjectSecurityMenu.kt | 8 ++-- .../basic/projects/ProjectSettingsMenu.kt | 8 ++-- .../basic/projects/ProjectStatisticMenu.kt | 12 ++--- .../table/filters/TestExecutionFilter.kt | 4 +- .../save/frontend/components/topbar/TopBar.kt | 4 +- .../frontend/components/topbar/TopBarLinks.kt | 2 +- .../components/topbar/TopBarUrlSplits.kt | 2 +- .../components/topbar/TopBarUserField.kt | 2 +- .../components/views/ExecutionView.kt | 4 +- .../save/frontend/externals/graph/CpgUtils.kt | 12 ++--- .../graph/cytoscape/CytoscapeWrapper.kt | 4 +- .../save/frontend/externals/i18next/I18n.kt | 2 +- .../frontend/externals/i18next/Translation.kt | 2 +- .../frontend/externals/reactace/AceBuilder.kt | 4 +- .../save/frontend/routing/BasicRouting.kt | 8 ++-- .../save/frontend/routing/MobileRouting.kt | 3 +- .../basic/ExecutionStatisticsValuesTest.kt | 6 +-- .../frontend/components/topbar/TopBarTest.kt | 2 +- .../components/views/ProjectViewTest.kt | 6 +-- .../saveourtool/save/orchestrator/Utils.kt | 8 ++-- .../save/orchestrator/config/JsonConfig.kt | 4 +- .../orchestrator/config/KafkaConfiguration.kt | 2 +- .../controller/AgentsController.kt | 8 ++-- .../controller/HeartbeatController.kt | 44 +++++++++--------- .../controller/KafkaController.kt | 7 +-- .../docker/DockerContainerRunner.kt | 14 +++--- .../orchestrator/kafka/AgentKafkaListener.kt | 2 +- .../kubernetes/KubernetesManager.kt | 14 +++--- .../save/orchestrator/service/AgentService.kt | 24 +++++----- .../orchestrator/service/ContainerService.kt | 16 +++---- .../service/HeartBeatInspector.kt | 4 +- .../service/OrchestratorAgentService.kt | 14 +++--- .../utils/AgentStatusInMemoryRepository.kt | 6 +-- .../controller/agents/AgentsControllerTest.kt | 8 ++-- .../heartbeat/HeartbeatControllerTest.kt | 10 ++-- .../docker/DockerContainerManagerTest.kt | 4 +- .../docker/KubernetesManagerTest.kt | 4 +- .../service/ContainerServiceTest.kt | 8 ++-- .../save/orchestrator/utils/TestUtils.kt | 2 +- .../BackendOrchestratorAgentService.kt | 22 ++++----- .../common/CloneAndProcessDirectoryAction.kt | 2 +- .../config/LocalDateTimeConfig.kt | 4 +- .../AwesomeBenchmarksDownloadController.kt | 6 +-- .../controllers/GitPreprocessorController.kt | 9 ++-- .../TestSuitesPreprocessorController.kt | 12 ++--- .../service/GitPreprocessorService.kt | 7 ++- .../service/TestDiscoveringService.kt | 22 ++++----- .../service/TestSuiteValidationService.kt | 11 +++-- .../TestsPreprocessorToBackendBridge.kt | 16 +++---- .../test/suite/AbstractTestSuiteValidator.kt | 6 +-- .../test/suite/PluginsWithoutTests.kt | 8 ++-- .../test/suite/TestSuiteValidator.kt | 4 +- .../test/suite/TestSuitesWithWildcardMode.kt | 8 ++-- .../save/preprocessor/utils/GitUtil.kt | 4 +- .../GitPreprocessorControllerTest.kt | 2 +- .../TestSuitesPreprocessorControllerTest.kt | 18 ++++---- .../service/TestSuiteValidationServiceTest.kt | 2 +- .../save/preprocessor/utils/GitUtilKtTest.kt | 2 +- .../test/analysis/algorithms/Algorithm.kt | 2 +- .../analysis/algorithms/FlipRateAnalysis.kt | 2 +- .../algorithms/PermanentFailureDetection.kt | 2 +- .../algorithms/RegressionDetection.kt | 6 +-- .../test/analysis/api/TestAnalysisService.kt | 2 +- .../internal/DefaultTestAnalysisService.kt | 8 ++-- 257 files changed, 1275 insertions(+), 1222 deletions(-) diff --git a/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/AgentConfiguration.kt b/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/AgentConfiguration.kt index d42eeb7681..1aa18b84f4 100644 --- a/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/AgentConfiguration.kt +++ b/save-agent/src/commonMain/kotlin/com/saveourtool/save/agent/AgentConfiguration.kt @@ -6,13 +6,14 @@ package com.saveourtool.save.agent import com.saveourtool.common.agent.AgentEnvName import com.saveourtool.common.agent.AgentInfo +import com.saveourtool.common.utils.optionalEnv +import com.saveourtool.common.utils.requiredEnv import com.saveourtool.save.agent.utils.SAVE_CLI_EXECUTABLE_NAME import com.saveourtool.save.agent.utils.TEST_SUITES_DIR_NAME import com.saveourtool.save.core.config.LogType import com.saveourtool.save.core.config.OutputStreamType import com.saveourtool.save.core.config.ReportType -import com.saveourtool.common.utils.optionalEnv -import com.saveourtool.common.utils.requiredEnv + import generated.SAVE_CLOUD_VERSION import kotlinx.serialization.Serializable diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/ApiGroupsConfiguration.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/ApiGroupsConfiguration.kt index cdd2663fb6..0149d44503 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/ApiGroupsConfiguration.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/ApiGroupsConfiguration.kt @@ -28,10 +28,10 @@ class ApiGroupsConfiguration { .build() @Bean - fun openApiV1(): GroupedOpenApi? = createGroupedOpenApi(com.saveourtool.common.v1, com.saveourtool.common.v1) + fun openApiV1(): GroupedOpenApi? = createGroupedOpenApi(v1, v1) @Bean - fun openApiLatestVersion(): GroupedOpenApi? = createGroupedOpenApi("latest", com.saveourtool.common.latestVersion) + fun openApiLatestVersion(): GroupedOpenApi? = createGroupedOpenApi("latest", latestVersion) @Bean fun customOpenApi(): OpenAPI? = OpenAPI() @@ -39,7 +39,7 @@ class ApiGroupsConfiguration { .info( Info() .title("SAVE Backend API") - .version(com.saveourtool.common.latestVersion) + .version(latestVersion) ) private fun createGroupedOpenApi(groupName: String, version: String): GroupedOpenApi? = GroupedOpenApi.builder() diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/ApplicationConfiguration.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/ApplicationConfiguration.kt index 81ac26750c..d8d2a549eb 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/ApplicationConfiguration.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/ApplicationConfiguration.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.backend.configs -import com.saveourtool.save.service.LogService -import com.saveourtool.save.service.LokiLogService +import com.saveourtool.common.service.LogService +import com.saveourtool.common.service.LokiLogService import org.springframework.boot.actuate.autoconfigure.metrics.orm.jpa.HibernateMetricsAutoConfiguration import org.springframework.boot.autoconfigure.ImportAutoConfiguration import org.springframework.boot.autoconfigure.domain.EntityScan @@ -12,8 +12,8 @@ import org.springframework.web.reactive.config.EnableWebFlux @Configuration @EnableWebFlux -@EnableJpaRepositories(basePackages = ["com.saveourtool.save.backend.repository", "com.saveourtool.save.repository"]) -@EntityScan("com.saveourtool.save.entities") +@EnableJpaRepositories(basePackages = ["com.saveourtool.save.backend.repository", "com.saveourtool.common.repository"]) +@EntityScan("com.saveourtool.common.entities") @ImportAutoConfiguration(HibernateMetricsAutoConfiguration::class) @Suppress("MISSING_KDOC_TOP_LEVEL") class ApplicationConfiguration { diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/ConfigProperties.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/ConfigProperties.kt index d6be92b38c..1e4fb4f33d 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/ConfigProperties.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/ConfigProperties.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.backend.configs -import com.saveourtool.save.s3.S3OperationsProperties -import com.saveourtool.save.service.LokiConfig +import com.saveourtool.common.s3.S3OperationsProperties +import com.saveourtool.common.service.LokiConfig import org.springframework.boot.context.properties.ConfigurationProperties import org.springframework.boot.context.properties.ConstructorBinding import java.nio.file.Path diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/TestAnalysisConfiguration.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/TestAnalysisConfiguration.kt index a9f3cca4d0..dd6a508d5a 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/TestAnalysisConfiguration.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/configs/TestAnalysisConfiguration.kt @@ -1,11 +1,12 @@ package com.saveourtool.save.backend.configs +import com.saveourtool.common.utils.getLogger +import com.saveourtool.common.utils.info import com.saveourtool.save.test.analysis.api.TestIdGenerator import com.saveourtool.save.test.analysis.api.TestStatisticsStorage import com.saveourtool.save.test.analysis.internal.MemoryBacked import com.saveourtool.save.test.analysis.internal.MutableTestStatisticsStorage -import com.saveourtool.save.utils.getLogger -import com.saveourtool.save.utils.info + import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/AvatarController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/AvatarController.kt index 9d31b73f56..6fd438e8c4 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/AvatarController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/AvatarController.kt @@ -1,14 +1,14 @@ package com.saveourtool.save.backend.controllers import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.service.UserService +import com.saveourtool.common.storage.AvatarKey +import com.saveourtool.common.storage.AvatarStorage +import com.saveourtool.common.utils.* +import com.saveourtool.common.utils.ByteBufferFluxResponse import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.username -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.service.UserService -import com.saveourtool.save.storage.AvatarKey -import com.saveourtool.save.storage.AvatarStorage -import com.saveourtool.save.utils.* -import com.saveourtool.save.utils.ByteBufferFluxResponse import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -34,12 +34,12 @@ import kotlin.time.toJavaDuration /** * Controller for working with avatars. */ -@com.saveourtool.common.configs.ApiSwaggerSupport +@ApiSwaggerSupport @Tags( Tag(name = "avatars"), ) @RestController -@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/avatar"]) +@RequestMapping(path = ["/api/$v1/avatar"]) internal class AvatarController( private val avatarStorage: AvatarStorage, private val organizationService: OrganizationService, diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/AwesomeBenchmarksController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/AwesomeBenchmarksController.kt index b463609fd6..9280762485 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/AwesomeBenchmarksController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/AwesomeBenchmarksController.kt @@ -6,9 +6,9 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.entities.benchmarks.BenchmarkEntity import com.saveourtool.common.v1 import com.saveourtool.save.backend.service.AwesomeBenchmarksService -import com.saveourtool.save.entities.benchmarks.BenchmarkEntity import org.slf4j.LoggerFactory import org.springframework.web.bind.annotation.* @@ -35,7 +35,7 @@ class AwesomeBenchmarksController( /** * @return all benchmarks from backend to frontend */ - @GetMapping(path = ["/api/${com.saveourtool.common.v1}/awesome-benchmarks"]) + @GetMapping(path = ["/api/$v1/awesome-benchmarks"]) fun getAllAwesomeBenchmarks() = awesomeBenchmarksService.getAllBenchmarks() } diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/CommentController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/CommentController.kt index 6ec9dae896..b0ee3e485a 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/CommentController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/CommentController.kt @@ -1,16 +1,16 @@ package com.saveourtool.save.backend.controllers import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.entities.Comment +import com.saveourtool.common.entities.CommentDto +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.security.CommentPermissionEvaluator +import com.saveourtool.common.service.CommentService +import com.saveourtool.common.utils.StringResponse +import com.saveourtool.common.utils.blockingToMono +import com.saveourtool.common.utils.switchIfEmptyToNotFound +import com.saveourtool.common.utils.switchIfEmptyToResponseException import com.saveourtool.common.v1 -import com.saveourtool.save.entities.Comment -import com.saveourtool.save.entities.CommentDto -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.security.CommentPermissionEvaluator -import com.saveourtool.save.service.CommentService -import com.saveourtool.save.utils.StringResponse -import com.saveourtool.save.utils.blockingToMono -import com.saveourtool.save.utils.switchIfEmptyToNotFound -import com.saveourtool.save.utils.switchIfEmptyToResponseException import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.responses.ApiResponse @@ -28,12 +28,12 @@ import reactor.kotlin.core.publisher.toMono /** * Controller for working with comments. */ -@com.saveourtool.common.configs.ApiSwaggerSupport +@ApiSwaggerSupport @Tags( Tag(name = "comments"), ) @RestController -@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/comments"]) +@RequestMapping(path = ["/api/$v1/comments"]) class CommentController( private val commentService: CommentService, private val commentPermissionEvaluator: CommentPermissionEvaluator, diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContainerLogController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContainerLogController.kt index 0ec964606b..325c2cd5a6 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContainerLogController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContainerLogController.kt @@ -1,12 +1,12 @@ package com.saveourtool.save.backend.controllers import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.service.LogService +import com.saveourtool.common.utils.StringListResponse +import com.saveourtool.common.utils.blockingToMono +import com.saveourtool.common.utils.toInstantAtDefaultZone import com.saveourtool.common.v1 import com.saveourtool.save.backend.service.AgentService -import com.saveourtool.save.service.LogService -import com.saveourtool.save.utils.StringListResponse -import com.saveourtool.save.utils.blockingToMono -import com.saveourtool.save.utils.toInstantAtDefaultZone import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -26,12 +26,12 @@ import java.time.LocalDateTime /** * Controller to fetch logs */ -@com.saveourtool.common.configs.ApiSwaggerSupport +@ApiSwaggerSupport @Tags( Tag(name = "logs"), ) @RestController -@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/logs"]) +@RequestMapping(path = ["/api/$v1/logs"]) class ContainerLogController( private val logService: LogService, private val agentService: AgentService, diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContestController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContestController.kt index 3f35079022..987e194f2d 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContestController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContestController.kt @@ -2,19 +2,19 @@ package com.saveourtool.save.backend.controllers import com.saveourtool.common.configs.ApiSwaggerSupport import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.entities.* +import com.saveourtool.common.entities.Contest.Companion.toContest +import com.saveourtool.common.entities.contest.ContestDto +import com.saveourtool.common.entities.contest.ContestStatus +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.request.TestFilesRequest +import com.saveourtool.common.security.OrganizationPermissionEvaluator +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.test.TestFilesContent +import com.saveourtool.common.utils.* import com.saveourtool.common.v1 import com.saveourtool.save.backend.service.* import com.saveourtool.save.backend.storage.TestsSourceSnapshotStorage -import com.saveourtool.save.entities.* -import com.saveourtool.save.entities.Contest.Companion.toContest -import com.saveourtool.save.entities.contest.ContestDto -import com.saveourtool.save.entities.contest.ContestStatus -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.request.TestFilesRequest -import com.saveourtool.save.security.OrganizationPermissionEvaluator -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.test.TestFilesContent -import com.saveourtool.save.utils.* import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -40,12 +40,12 @@ import java.time.LocalDateTime /** * Controller for working with contests. */ -@com.saveourtool.common.configs.ApiSwaggerSupport +@ApiSwaggerSupport @Tags( Tag(name = "contests"), ) @RestController -@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/contests"]) +@RequestMapping(path = ["/api/$v1/contests"]) @Suppress("LongParameterList") internal class ContestController( private val contestService: ContestService, @@ -91,7 +91,7 @@ internal class ContestController( } @PostMapping("/featured/add-or-delete") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("hasRole('ROLE_SUPER_ADMIN')") @Operation( method = "POST", @@ -309,7 +309,7 @@ internal class ContestController( } @PostMapping("/update") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "POST", @@ -352,7 +352,7 @@ internal class ContestController( } @PostMapping("/update-all") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "POST", diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContestSampleController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContestSampleController.kt index 6b940efc5b..510670648c 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContestSampleController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ContestSampleController.kt @@ -1,11 +1,11 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.entities.contest.ContestSampleDto +import com.saveourtool.common.utils.StringResponse +import com.saveourtool.common.utils.blockingToFlux +import com.saveourtool.common.utils.blockingToMono import com.saveourtool.common.v1 import com.saveourtool.save.backend.service.ContestSampleService -import com.saveourtool.save.entities.contest.ContestSampleDto -import com.saveourtool.save.utils.StringResponse -import com.saveourtool.save.utils.blockingToFlux -import com.saveourtool.save.utils.blockingToMono import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.responses.ApiResponse @@ -19,7 +19,7 @@ import reactor.core.publisher.Mono * Controller for working with contests sample. */ @RestController -@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/contests/sample"]) +@RequestMapping(path = ["/api/$v1/contests/sample"]) class ContestSampleController( private val contestSampleService: ContestSampleService, ) { diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/DemoManagerController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/DemoManagerController.kt index 640b8b6cee..e3b3a5d966 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/DemoManagerController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/DemoManagerController.kt @@ -2,18 +2,18 @@ package com.saveourtool.save.backend.controllers import com.saveourtool.common.configs.ApiSwaggerSupport import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.demo.DemoCreationRequest +import com.saveourtool.common.entities.FileDto +import com.saveourtool.common.entities.Project +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.security.ProjectPermissionEvaluator +import com.saveourtool.common.service.LogService +import com.saveourtool.common.service.ProjectService +import com.saveourtool.common.spring.utils.applyAll +import com.saveourtool.common.utils.* import com.saveourtool.common.v1 import com.saveourtool.save.backend.configs.ConfigProperties import com.saveourtool.save.backend.service.LnkProjectGithubService -import com.saveourtool.save.demo.DemoCreationRequest -import com.saveourtool.save.entities.FileDto -import com.saveourtool.save.entities.Project -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.security.ProjectPermissionEvaluator -import com.saveourtool.save.service.LogService -import com.saveourtool.save.service.ProjectService -import com.saveourtool.save.spring.utils.applyAll -import com.saveourtool.save.utils.* import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -40,9 +40,9 @@ import java.time.LocalDateTime /** * Controller that allows adding tools to save-demo */ -@com.saveourtool.common.configs.ApiSwaggerSupport +@ApiSwaggerSupport @RestController -@RequestMapping("/api/${com.saveourtool.common.v1}/demo") +@RequestMapping("/api/$v1/demo") class DemoManagerController( private val projectService: ProjectService, private val lnkProjectGithubService: LnkProjectGithubService, @@ -57,7 +57,7 @@ class DemoManagerController( .build() @PostMapping("/{organizationName}/{projectName}/save-or-update") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @Parameters( Parameter(name = "organizationName", `in` = ParameterIn.PATH, description = "name of saveourtool organization", required = true), Parameter(name = "projectName", `in` = ParameterIn.PATH, description = "name of saveourtool project", required = true), @@ -124,7 +124,7 @@ class DemoManagerController( } @PostMapping("/{organizationName}/{projectName}/upload-file", consumes = [MediaType.MULTIPART_FORM_DATA_VALUE]) - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @Parameters( Parameter(name = "organizationName", `in` = ParameterIn.PATH, description = "name of saveourtool organization", required = true), Parameter(name = "projectName", `in` = ParameterIn.PATH, description = "name of saveourtool project", required = true), @@ -156,7 +156,7 @@ class DemoManagerController( } @GetMapping("/{organizationName}/{projectName}/list-file") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @Parameters( Parameter(name = "organizationName", `in` = ParameterIn.PATH, description = "name of saveourtool organization", required = true), Parameter(name = "projectName", `in` = ParameterIn.PATH, description = "name of saveourtool project", required = true), @@ -191,7 +191,7 @@ class DemoManagerController( .flatMapIterable { it } @DeleteMapping("/{organizationName}/{projectName}/delete-file") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @Parameters( Parameter(name = "organizationName", `in` = ParameterIn.PATH, description = "name of saveourtool organization", required = true), Parameter(name = "projectName", `in` = ParameterIn.PATH, description = "name of saveourtool project", required = true), @@ -221,7 +221,7 @@ class DemoManagerController( } @PostMapping("/{organizationName}/{projectName}/delete") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @Parameters( Parameter(name = "organizationName", `in` = ParameterIn.PATH, description = "name of saveourtool organization", required = true), Parameter(name = "projectName", `in` = ParameterIn.PATH, description = "name of saveourtool project", required = true), @@ -247,7 +247,7 @@ class DemoManagerController( } @PostMapping("/{organizationName}/{projectName}/start") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @Parameters( Parameter(name = "organizationName", `in` = ParameterIn.PATH, description = "name of saveourtool organization", required = true), Parameter(name = "projectName", `in` = ParameterIn.PATH, description = "name of saveourtool project", required = true), @@ -273,7 +273,7 @@ class DemoManagerController( } @PostMapping("/{organizationName}/{projectName}/stop") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @Parameters( Parameter(name = "organizationName", `in` = ParameterIn.PATH, description = "name of saveourtool organization", required = true), Parameter(name = "projectName", `in` = ParameterIn.PATH, description = "name of saveourtool project", required = true), @@ -299,7 +299,7 @@ class DemoManagerController( } @GetMapping("/{organizationName}/{projectName}/logs") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @Parameters( Parameter(name = "organizationName", `in` = ParameterIn.PATH, description = "name of saveourtool organization", required = true), Parameter(name = "projectName", `in` = ParameterIn.PATH, description = "name of saveourtool project", required = true), diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/DownloadFilesController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/DownloadFilesController.kt index 61c739e638..124373a401 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/DownloadFilesController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/DownloadFilesController.kt @@ -1,12 +1,12 @@ package com.saveourtool.save.backend.controllers import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.domain.* +import com.saveourtool.common.entities.TestExecution +import com.saveourtool.common.utils.* import com.saveourtool.common.v1 import com.saveourtool.save.backend.service.* import com.saveourtool.save.backend.storage.* -import com.saveourtool.save.domain.* -import com.saveourtool.save.entities.TestExecution -import com.saveourtool.save.utils.* import io.swagger.v3.oas.annotations.tags.Tag import io.swagger.v3.oas.annotations.tags.Tags @@ -22,7 +22,7 @@ import java.nio.ByteBuffer * A Spring controller for file downloading */ @RestController -@com.saveourtool.common.configs.ApiSwaggerSupport +@ApiSwaggerSupport @Tags( Tag(name = "files"), ) @@ -37,7 +37,7 @@ class DownloadFilesController( * @throws ResponseStatusException if request is invalid or result cannot be returned */ @Suppress("ThrowsCount", "UnsafeCallOnNullableType") - @GetMapping(path = ["/api/${com.saveourtool.common.v1}/files/get-debug-info"]) + @GetMapping(path = ["/api/$v1/files/get-debug-info"]) fun getDebugInfo( @RequestParam testExecutionId: Long, ): Flux = debugInfoStorage.download(testExecutionId) diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ExecutionController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ExecutionController.kt index 3bb335d3ce..007de34809 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ExecutionController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ExecutionController.kt @@ -1,23 +1,23 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.entities.Execution +import com.saveourtool.common.entities.Project +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.execution.ExecutionUpdateDto +import com.saveourtool.common.execution.TestingType +import com.saveourtool.common.filters.ExecutionFilter +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.security.ProjectPermissionEvaluator +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.service.ProjectService +import com.saveourtool.common.utils.blockingMap +import com.saveourtool.common.utils.orNotFound +import com.saveourtool.common.utils.switchIfEmptyToNotFound import com.saveourtool.common.v1 import com.saveourtool.save.backend.service.ExecutionService import com.saveourtool.save.backend.storage.ExecutionInfoStorage import com.saveourtool.save.backend.utils.toMonoOrNotFound import com.saveourtool.save.core.utils.runIf -import com.saveourtool.save.entities.Execution -import com.saveourtool.save.entities.Project -import com.saveourtool.save.execution.ExecutionDto -import com.saveourtool.save.execution.ExecutionUpdateDto -import com.saveourtool.save.execution.TestingType -import com.saveourtool.save.filters.ExecutionFilter -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.security.ProjectPermissionEvaluator -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.service.ProjectService -import com.saveourtool.save.utils.blockingMap -import com.saveourtool.save.utils.orNotFound -import com.saveourtool.save.utils.switchIfEmptyToNotFound import org.slf4j.LoggerFactory import org.springframework.http.HttpStatus @@ -72,7 +72,7 @@ class ExecutionController(private val executionService: ExecutionService, * @param authentication * @return execution if it has been found */ - @GetMapping(path = ["/api/${com.saveourtool.common.v1}/execution", "/internal/execution"]) + @GetMapping(path = ["/api/$v1/execution", "/internal/execution"]) @Transactional(readOnly = true) @Suppress("UnsafeCallOnNullableType") fun getExecution( @@ -100,7 +100,7 @@ class ExecutionController(private val executionService: ExecutionService, * @param authentication * @return execution dto */ - @GetMapping(path = ["/api/${com.saveourtool.common.v1}/executionDto"]) + @GetMapping(path = ["/api/$v1/executionDto"]) fun getExecutionDto(@RequestParam executionId: Long, authentication: Authentication): Mono = executionService.findExecution(executionId) .toMonoOrNotFound() @@ -115,7 +115,7 @@ class ExecutionController(private val executionService: ExecutionService, * @return list of execution dtos */ @Suppress("PARAMETER_NAME_IN_OUTER_LAMBDA") - @PostMapping(path = ["/api/${com.saveourtool.common.v1}/executionDtoList"]) + @PostMapping(path = ["/api/$v1/executionDtoList"]) fun getExecutionByProject( @RequestParam projectName: String, @RequestParam organizationName: String, @@ -159,7 +159,7 @@ class ExecutionController(private val executionService: ExecutionService, * @return Execution * @throws ResponseStatusException if execution is not found */ - @GetMapping(path = ["/api/${com.saveourtool.common.v1}/latestExecution"]) + @GetMapping(path = ["/api/$v1/latestExecution"]) fun getLatestExecutionForProject(@RequestParam name: String, @RequestParam organizationName: String, authentication: Authentication): Mono = Mono.justOrEmpty( executionService.getLatestExecutionByProjectNameAndProjectOrganizationName(name, organizationName) @@ -178,7 +178,7 @@ class ExecutionController(private val executionService: ExecutionService, * @param authentication * @return ResponseEntity */ - @PostMapping(path = ["/api/${com.saveourtool.common.v1}/execution/delete-all-except-contest"]) + @PostMapping(path = ["/api/$v1/execution/delete-all-except-contest"]) @Suppress("UnsafeCallOnNullableType") fun deleteExecutionForProject( @RequestParam name: String, @@ -208,7 +208,7 @@ class ExecutionController(private val executionService: ExecutionService, * - status 404 if all executions are missing or the project is hidden from the current user * @throws ResponseStatusException */ - @PostMapping(path = ["/api/${com.saveourtool.common.v1}/execution/delete"]) + @PostMapping(path = ["/api/$v1/execution/delete"]) @Suppress("TOO_LONG_FUNCTION", "NonBooleanPropertyPrefixedWithIs") fun deleteExecutionsByExecutionIds(@RequestParam executionIds: List, authentication: Authentication): Mono> { val isProjectHidden = AtomicBoolean(false) diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/FileController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/FileController.kt index c2d3b38eab..a6b5b4d40a 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/FileController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/FileController.kt @@ -1,14 +1,14 @@ package com.saveourtool.save.backend.controllers import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.entities.FileDto +import com.saveourtool.common.entities.Project +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.service.ProjectService +import com.saveourtool.common.utils.* +import com.saveourtool.common.utils.ByteBufferFluxResponse import com.saveourtool.common.v1 import com.saveourtool.save.backend.storage.FileStorage -import com.saveourtool.save.entities.FileDto -import com.saveourtool.save.entities.Project -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.service.ProjectService -import com.saveourtool.save.utils.* -import com.saveourtool.save.utils.ByteBufferFluxResponse import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -37,8 +37,8 @@ typealias FileDtoResponse = ResponseEntity * A Spring controller for [FileDto] */ @RestController -@RequestMapping("/api/${com.saveourtool.common.v1}/files") -@com.saveourtool.common.configs.ApiSwaggerSupport +@RequestMapping("/api/$v1/files") +@ApiSwaggerSupport @Tags( Tag(name = "files"), ) diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkContestProjectController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkContestProjectController.kt index 1bbed5f0e1..0671402c4b 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkContestProjectController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkContestProjectController.kt @@ -9,16 +9,16 @@ package com.saveourtool.save.backend.controllers import com.saveourtool.common.configs.ApiSwaggerSupport import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.entities.LnkContestProject +import com.saveourtool.common.entities.contest.ContestResult +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.service.LnkUserProjectService +import com.saveourtool.common.service.ProjectService +import com.saveourtool.common.utils.* import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.userId import com.saveourtool.save.backend.service.* -import com.saveourtool.save.entities.LnkContestProject -import com.saveourtool.save.entities.contest.ContestResult -import com.saveourtool.save.execution.ExecutionDto -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.service.LnkUserProjectService -import com.saveourtool.save.service.ProjectService -import com.saveourtool.save.utils.* import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -42,12 +42,12 @@ import reactor.kotlin.core.util.function.component2 /** * Controller for processing links between projects and contests with scores */ -@com.saveourtool.common.configs.ApiSwaggerSupport +@ApiSwaggerSupport @Tags( Tag(name = "contests"), ) @RestController -@RequestMapping("/api/${com.saveourtool.common.v1}/contests") +@RequestMapping("/api/$v1/contests") class LnkContestProjectController( private val lnkContestProjectService: LnkContestProjectService, private val lnkContestExecutionService: LnkContestExecutionService, @@ -98,7 +98,7 @@ class LnkContestProjectController( } @GetMapping("/{contestName}/eligible-projects") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "GET", @@ -123,7 +123,7 @@ class LnkContestProjectController( } @GetMapping("/{organizationName}/{projectName}/eligible-contests") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "GET", @@ -182,7 +182,7 @@ class LnkContestProjectController( } @GetMapping("/{contestName}/executions/{organizationName}/{projectName}/latest") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "GET", @@ -224,7 +224,7 @@ class LnkContestProjectController( @GetMapping("/{contestName}/enroll") @PreAuthorize("isAuthenticated()") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @Operation( method = "GET", summary = "Register for a contest.", @@ -276,7 +276,7 @@ class LnkContestProjectController( @GetMapping("/{contestName}/my-results") @PreAuthorize("isAuthenticated()") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @Operation( method = "GET", summary = "Get your best results in contest.", diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkOrganizationTestSuiteController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkOrganizationTestSuiteController.kt index 49838df62e..5e5beff76a 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkOrganizationTestSuiteController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkOrganizationTestSuiteController.kt @@ -9,25 +9,25 @@ package com.saveourtool.save.backend.controllers import com.saveourtool.common.configs.ApiSwaggerSupport import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.domain.Role +import com.saveourtool.common.domain.isAllowedForContests +import com.saveourtool.common.entities.LnkOrganizationTestSuiteDto +import com.saveourtool.common.entities.TestSuite +import com.saveourtool.common.filters.TestSuiteFilter +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.permission.Rights +import com.saveourtool.common.permission.SetRightsRequest +import com.saveourtool.common.security.OrganizationPermissionEvaluator +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.testsuite.TestSuiteVersioned +import com.saveourtool.common.utils.StringResponse +import com.saveourtool.common.utils.switchIfEmptyToNotFound +import com.saveourtool.common.utils.switchIfEmptyToResponseException import com.saveourtool.common.v1 import com.saveourtool.save.backend.security.TestSuitePermissionEvaluator import com.saveourtool.save.backend.service.LnkOrganizationTestSuiteService import com.saveourtool.save.backend.service.TestSuitesService import com.saveourtool.save.backend.service.TestsSourceVersionService -import com.saveourtool.save.domain.Role -import com.saveourtool.save.domain.isAllowedForContests -import com.saveourtool.save.entities.LnkOrganizationTestSuiteDto -import com.saveourtool.save.entities.TestSuite -import com.saveourtool.save.filters.TestSuiteFilter -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.permission.Rights -import com.saveourtool.save.permission.SetRightsRequest -import com.saveourtool.save.security.OrganizationPermissionEvaluator -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.testsuite.TestSuiteVersioned -import com.saveourtool.save.utils.StringResponse -import com.saveourtool.save.utils.switchIfEmptyToNotFound -import com.saveourtool.save.utils.switchIfEmptyToResponseException import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -57,7 +57,7 @@ import reactor.kotlin.core.util.function.component2 Tag(name = "test-suites"), ) @RestController -@RequestMapping("/api/${com.saveourtool.common.v1}/test-suites") +@RequestMapping("/api/$v1/test-suites") class LnkOrganizationTestSuiteController( private val lnkOrganizationTestSuiteService: LnkOrganizationTestSuiteService, private val organizationService: OrganizationService, @@ -67,7 +67,7 @@ class LnkOrganizationTestSuiteController( private val testsSourceVersionService: TestsSourceVersionService, ) { @GetMapping("/{organizationName}/available") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -122,7 +122,7 @@ class LnkOrganizationTestSuiteController( .mapToInfo(isContest) @PostMapping("/{organizationName}/get-by-ids") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", @@ -182,7 +182,7 @@ class LnkOrganizationTestSuiteController( .mapToInfo(isContest) @GetMapping("/{organizationName}/{testSuiteId}") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -212,7 +212,7 @@ class LnkOrganizationTestSuiteController( } @PostMapping("/{ownerOrganizationName}/{testSuiteId}") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", @@ -265,7 +265,7 @@ class LnkOrganizationTestSuiteController( } @PostMapping("/{ownerOrganizationName}/batch-set-rights") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", @@ -335,7 +335,7 @@ class LnkOrganizationTestSuiteController( } @DeleteMapping("/{ownerOrganizationName}/{testSuiteId}/{requestedOrganizationName}") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "DELETE", @@ -379,7 +379,7 @@ class LnkOrganizationTestSuiteController( } @PostMapping("/{ownerOrganizationName}/batch-change-visibility") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkUserOrganizationController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkUserOrganizationController.kt index 98fb38401b..4a91c0330a 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkUserOrganizationController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkUserOrganizationController.kt @@ -9,22 +9,22 @@ package com.saveourtool.save.backend.controllers import com.saveourtool.common.configs.ApiSwaggerSupport import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.entities.OrganizationWithUsers +import com.saveourtool.common.filters.OrganizationFilter +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.permission.SetRoleRequest +import com.saveourtool.common.security.OrganizationPermissionEvaluator +import com.saveourtool.common.service.LnkUserOrganizationService +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.utils.StringResponse +import com.saveourtool.common.utils.switchIfEmptyToNotFound +import com.saveourtool.common.utils.switchIfEmptyToResponseException import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.userId import com.saveourtool.save.authservice.utils.username -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.entities.OrganizationWithUsers -import com.saveourtool.save.filters.OrganizationFilter -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.permission.SetRoleRequest -import com.saveourtool.save.security.OrganizationPermissionEvaluator -import com.saveourtool.save.service.LnkUserOrganizationService -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.utils.StringResponse -import com.saveourtool.save.utils.switchIfEmptyToNotFound -import com.saveourtool.save.utils.switchIfEmptyToResponseException import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -47,13 +47,13 @@ import reactor.kotlin.core.util.function.component2 /** * Controller for processing links between users and their roles in organizations */ -@com.saveourtool.common.configs.ApiSwaggerSupport +@ApiSwaggerSupport @Tags( Tag(name = "roles"), Tag(name = "organizations"), ) @RestController -@RequestMapping("/api/${com.saveourtool.common.v1}/organizations") +@RequestMapping("/api/$v1/organizations") class LnkUserOrganizationController( private val lnkUserOrganizationService: LnkUserOrganizationService, private val organizationService: OrganizationService, @@ -117,7 +117,7 @@ class LnkUserOrganizationController( } ?: Role.NONE.toMono() @PostMapping("/{organizationName}/users/roles") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", @@ -150,7 +150,7 @@ class LnkUserOrganizationController( } @DeleteMapping("/{organizationName}/users/roles/{userName}") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "DELETE", @@ -181,7 +181,7 @@ class LnkUserOrganizationController( } @GetMapping("/{organizationName}/users/not-from") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -231,7 +231,7 @@ class LnkUserOrganizationController( .defaultIfEmpty(emptyList()) @GetMapping("/can-create-contests") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -248,7 +248,7 @@ class LnkUserOrganizationController( ) @PostMapping("/by-filters") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkUserProjectController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkUserProjectController.kt index ce38c28106..5bd4d9f2d3 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkUserProjectController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/LnkUserProjectController.kt @@ -9,15 +9,15 @@ package com.saveourtool.save.backend.controllers import com.saveourtool.common.configs.ApiSwaggerSupport import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.entities.ProjectDto +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.security.ProjectPermissionEvaluator +import com.saveourtool.common.service.LnkUserProjectService +import com.saveourtool.common.service.ProjectService +import com.saveourtool.common.utils.switchIfEmptyToNotFound import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.userId -import com.saveourtool.save.entities.ProjectDto -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.security.ProjectPermissionEvaluator -import com.saveourtool.save.service.LnkUserProjectService -import com.saveourtool.save.service.ProjectService -import com.saveourtool.save.utils.switchIfEmptyToNotFound import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -38,19 +38,19 @@ import reactor.kotlin.core.util.function.component2 /** * Controller for processing links between users and their roles in projects */ -@com.saveourtool.common.configs.ApiSwaggerSupport +@ApiSwaggerSupport @Tags( Tag(name = "projects"), ) @RestController -@RequestMapping("/api/${com.saveourtool.common.v1}/projects") +@RequestMapping("/api/$v1/projects") class LnkUserProjectController( private val lnkUserProjectService: LnkUserProjectService, private val projectService: ProjectService, private val projectPermissionEvaluator: ProjectPermissionEvaluator, ) { @GetMapping(path = ["/get-for-current-user"]) - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @Operation( method = "GET", summary = "Get projects of current authenticated user", @@ -67,7 +67,7 @@ class LnkUserProjectController( .map { it.toDto() } @GetMapping(path = ["/{organizationName}/{projectName}/users"]) - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -103,7 +103,7 @@ class LnkUserProjectController( .defaultIfEmpty(emptyList()) @GetMapping("/{organizationName}/{projectName}/users/not-from") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "GET", diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/NotificationController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/NotificationController.kt index 2331aecdf1..9e12058db2 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/NotificationController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/NotificationController.kt @@ -1,13 +1,13 @@ package com.saveourtool.save.backend.controllers import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.entities.NotificationDto +import com.saveourtool.common.utils.StringResponse +import com.saveourtool.common.utils.blockingToFlux +import com.saveourtool.common.utils.blockingToMono import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.username import com.saveourtool.save.backend.service.NotificationService -import com.saveourtool.save.entities.NotificationDto -import com.saveourtool.save.utils.StringResponse -import com.saveourtool.save.utils.blockingToFlux -import com.saveourtool.save.utils.blockingToMono import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.responses.ApiResponse @@ -25,12 +25,12 @@ import reactor.core.publisher.Mono /** * Controller for working with notifications. */ -@com.saveourtool.common.configs.ApiSwaggerSupport +@ApiSwaggerSupport @Tags( Tag(name = "notifications"), ) @RestController -@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/notifications"]) +@RequestMapping(path = ["/api/$v1/notifications"]) class NotificationController( private val notificationService: NotificationService, ) { diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/OrganizationController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/OrganizationController.kt index 96a6b67d9d..af73894ece 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/OrganizationController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/OrganizationController.kt @@ -2,21 +2,21 @@ package com.saveourtool.save.backend.controllers import com.saveourtool.common.configs.ApiSwaggerSupport import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.domain.OrganizationSaveStatus.* +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.* +import com.saveourtool.common.filters.OrganizationFilter +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.security.OrganizationPermissionEvaluator +import com.saveourtool.common.service.GitService +import com.saveourtool.common.service.LnkUserOrganizationService +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.utils.* import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.userId import com.saveourtool.save.backend.configs.ConfigProperties import com.saveourtool.save.backend.service.* import com.saveourtool.save.backend.storage.TestsSourceSnapshotStorage -import com.saveourtool.save.domain.OrganizationSaveStatus.* -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.* -import com.saveourtool.save.filters.OrganizationFilter -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.security.OrganizationPermissionEvaluator -import com.saveourtool.save.service.GitService -import com.saveourtool.save.service.LnkUserOrganizationService -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.utils.* import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -49,12 +49,12 @@ typealias OrganizationDtoList = List /** * Controller for working with organizations. */ -@com.saveourtool.common.configs.ApiSwaggerSupport +@ApiSwaggerSupport @Tags( Tag(name = "organizations"), ) @RestController -@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/organizations"]) +@RequestMapping(path = ["/api/$v1/organizations"]) @Suppress("LongParameterList") internal class OrganizationController( private val organizationService: OrganizationService, @@ -210,7 +210,7 @@ internal class OrganizationController( .collectList() @PostMapping("/{organizationName}/manage-contest-permission") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("hasRole('ROLE_SUPER_ADMIN')") @Operation( method = "POST", @@ -252,7 +252,7 @@ internal class OrganizationController( } @PostMapping("/{organizationName}/manage-bulk-upload-permission") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("hasRole('ROLE_SUPER_ADMIN')") @Operation( method = "POST", @@ -287,7 +287,7 @@ internal class OrganizationController( } @PostMapping("/save") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "POST", @@ -320,7 +320,7 @@ internal class OrganizationController( } @PostMapping("/{organizationName}/update") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "POST", @@ -371,7 +371,7 @@ internal class OrganizationController( } @PostMapping("/{organizationName}/change-status") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "POST", @@ -434,7 +434,7 @@ internal class OrganizationController( } @GetMapping("/{organizationName}/list-git") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "GET", @@ -465,7 +465,7 @@ internal class OrganizationController( .map { it.toDto() } @PostMapping("/{organizationName}/create-git") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "POST", @@ -486,7 +486,7 @@ internal class OrganizationController( ): Mono = upsertGitCredential(organizationName, gitDto, authentication, isUpdate = false) @PostMapping("/{organizationName}/update-git") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "POST", @@ -507,7 +507,7 @@ internal class OrganizationController( ): Mono = upsertGitCredential(organizationName, gitDto, authentication, isUpdate = true) @DeleteMapping("/{organizationName}/delete-git") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "DELETE", @@ -569,7 +569,7 @@ internal class OrganizationController( * @return contest rating for organization */ @GetMapping("/{organizationName}/get-organization-contest-rating") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("isAuthenticated()") @Operation( method = "Get", diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/PermissionController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/PermissionController.kt index 66e0bea94e..9ab81cbfc3 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/PermissionController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/PermissionController.kt @@ -2,18 +2,18 @@ package com.saveourtool.save.backend.controllers import com.saveourtool.common.configs.ApiSwaggerSupport import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.domain.Role +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.permission.SetRoleRequest +import com.saveourtool.common.security.OrganizationPermissionEvaluator +import com.saveourtool.common.security.ProjectPermissionEvaluator +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.service.ProjectService +import com.saveourtool.common.utils.switchIfEmptyToNotFound +import com.saveourtool.common.utils.trace import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.username import com.saveourtool.save.backend.service.PermissionService -import com.saveourtool.save.domain.Role -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.permission.SetRoleRequest -import com.saveourtool.save.security.OrganizationPermissionEvaluator -import com.saveourtool.save.security.ProjectPermissionEvaluator -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.service.ProjectService -import com.saveourtool.save.utils.switchIfEmptyToNotFound -import com.saveourtool.save.utils.trace import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -40,13 +40,13 @@ import reactor.kotlin.core.publisher.toMono import reactor.kotlin.core.util.function.component1 import reactor.kotlin.core.util.function.component2 -@com.saveourtool.common.configs.ApiSwaggerSupport +@ApiSwaggerSupport @Tags( Tag(name = "projects"), Tag(name = "roles"), ) @RestController -@RequestMapping(path = ["/api/${com.saveourtool.common.v1}"]) +@RequestMapping(path = ["/api/$v1"]) @Suppress("MISSING_KDOC_TOP_LEVEL") class PermissionController( private val projectService: ProjectService, @@ -56,7 +56,7 @@ class PermissionController( private val organizationPermissionEvaluator: OrganizationPermissionEvaluator, ) { @GetMapping("/projects/{organizationName}/{projectName}/users/roles") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @Operation( method = "GET", summary = "Get role for a user on a particular project.", @@ -91,7 +91,7 @@ class PermissionController( .switchIfEmptyToNotFound() @PostMapping("/projects/{organizationName}/{projectName}/users/roles") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @Operation( method = "POST", summary = "Set role for a user on a particular project", @@ -128,7 +128,7 @@ class PermissionController( } @DeleteMapping("/projects/{organizationName}/{projectName}/users/roles/{userName}") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @Operation( method = "DELETE", summary = "Removes user's role on a particular project", diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ProjectController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ProjectController.kt index 55d7e4b0d2..2fa5dad303 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ProjectController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/ProjectController.kt @@ -2,22 +2,22 @@ package com.saveourtool.save.backend.controllers import com.saveourtool.common.configs.ApiSwaggerSupport import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.domain.ProjectSaveStatus +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.* +import com.saveourtool.common.filters.ProjectFilter +import com.saveourtool.common.filters.ProjectProblemFilter +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.security.ProjectPermissionEvaluator +import com.saveourtool.common.service.LnkUserProjectService +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.service.ProjectService +import com.saveourtool.common.utils.* import com.saveourtool.common.v1 +import com.saveourtool.common.validation.NAMING_MAX_LENGTH +import com.saveourtool.common.validation.isValidLengthName import com.saveourtool.save.authservice.utils.userId import com.saveourtool.save.backend.service.ProjectProblemService -import com.saveourtool.save.domain.ProjectSaveStatus -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.* -import com.saveourtool.save.filters.ProjectFilter -import com.saveourtool.save.filters.ProjectProblemFilter -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.security.ProjectPermissionEvaluator -import com.saveourtool.save.service.LnkUserProjectService -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.service.ProjectService -import com.saveourtool.save.utils.* -import com.saveourtool.save.validation.NAMING_MAX_LENGTH -import com.saveourtool.save.validation.isValidLengthName import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -44,12 +44,12 @@ import java.util.* /** * Controller for working with projects. */ -@com.saveourtool.common.configs.ApiSwaggerSupport +@ApiSwaggerSupport @Tags( Tag(name = "projects"), ) @RestController -@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/projects"]) +@RequestMapping(path = ["/api/$v1/projects"]) class ProjectController( private val projectService: ProjectService, private val projectProblemService: ProjectProblemService, @@ -58,7 +58,7 @@ class ProjectController( private val lnkUserProjectService: LnkUserProjectService, ) { @GetMapping("/") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -122,7 +122,7 @@ class ProjectController( } @PostMapping("/save") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", @@ -180,7 +180,7 @@ class ProjectController( } @PostMapping("/update") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", @@ -212,7 +212,7 @@ class ProjectController( } @PostMapping("/{organizationName}/{projectName}/change-status") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/RunExecutionController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/RunExecutionController.kt index 02e3376410..260cfef93d 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/RunExecutionController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/RunExecutionController.kt @@ -1,22 +1,22 @@ package com.saveourtool.save.backend.controllers +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.entities.Execution +import com.saveourtool.common.execution.ExecutionStatus +import com.saveourtool.common.execution.ExecutionUpdateDto +import com.saveourtool.common.execution.TestingType +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.request.CreateExecutionRequest +import com.saveourtool.common.service.ProjectService +import com.saveourtool.common.spring.utils.applyAll +import com.saveourtool.common.storage.impl.InternalFileKey +import com.saveourtool.common.utils.* import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.username import com.saveourtool.save.backend.configs.ConfigProperties import com.saveourtool.save.backend.service.* import com.saveourtool.save.backend.storage.BackendInternalFileStorage import com.saveourtool.save.backend.storage.ExecutionInfoStorage -import com.saveourtool.save.domain.ProjectCoordinates -import com.saveourtool.save.entities.Execution -import com.saveourtool.save.execution.ExecutionStatus -import com.saveourtool.save.execution.ExecutionUpdateDto -import com.saveourtool.save.execution.TestingType -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.request.CreateExecutionRequest -import com.saveourtool.save.service.ProjectService -import com.saveourtool.save.spring.utils.applyAll -import com.saveourtool.save.storage.impl.InternalFileKey -import com.saveourtool.save.utils.* import com.fasterxml.jackson.databind.ObjectMapper import io.micrometer.core.instrument.MeterRegistry @@ -40,7 +40,7 @@ import reactor.core.scheduler.Schedulers * Controller for running execution */ @RestController -@RequestMapping("/api/${com.saveourtool.common.v1}/run") +@RequestMapping("/api/$v1/run") @Suppress("LongParameterList") class RunExecutionController( private val projectService: ProjectService, diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/TestExecutionController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/TestExecutionController.kt index d31f19c85a..ce3b72d20b 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/TestExecutionController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/TestExecutionController.kt @@ -6,6 +6,14 @@ import com.saveourtool.common.agent.TestExecutionResult import com.saveourtool.common.agent.TestSuiteExecutionStatisticDto import com.saveourtool.common.configs.ApiSwaggerSupport import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.domain.TestResultLocation +import com.saveourtool.common.domain.TestResultStatus +import com.saveourtool.common.entities.TestExecution +import com.saveourtool.common.filters.TestExecutionFilter +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.security.ProjectPermissionEvaluator +import com.saveourtool.common.test.analysis.metrics.TestMetrics +import com.saveourtool.common.utils.* import com.saveourtool.common.v1 import com.saveourtool.save.backend.service.ExecutionService import com.saveourtool.save.backend.service.TestAnalysisService @@ -13,17 +21,9 @@ import com.saveourtool.save.backend.service.TestExecutionService import com.saveourtool.save.backend.storage.DebugInfoStorage import com.saveourtool.save.backend.storage.ExecutionInfoStorage import com.saveourtool.save.backend.utils.toMonoOrNotFound -import com.saveourtool.save.domain.TestResultLocation -import com.saveourtool.save.domain.TestResultStatus -import com.saveourtool.save.entities.TestExecution -import com.saveourtool.save.filters.TestExecutionFilter -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.security.ProjectPermissionEvaluator import com.saveourtool.save.test.analysis.api.TestIdGenerator import com.saveourtool.save.test.analysis.api.testId import com.saveourtool.save.test.analysis.entities.metadata -import com.saveourtool.save.test.analysis.metrics.TestMetrics -import com.saveourtool.save.utils.* import arrow.core.plus import io.swagger.v3.oas.annotations.tags.Tag @@ -49,7 +49,7 @@ import java.math.BigInteger * * @param testExecutionService service for test execution */ -@com.saveourtool.common.configs.ApiSwaggerSupport +@ApiSwaggerSupport @Tags( Tag(name = "test-executions"), ) @@ -78,7 +78,7 @@ class TestExecutionController( * @return a list of [TestExecutionDto]s */ @PostMapping("/api/${com.saveourtool.common.v1}/test-executions") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @Suppress("LongParameterList", "TOO_MANY_PARAMETERS", "TYPE_ALIAS") fun getTestExecutions( @RequestParam executionId: Long, @@ -88,7 +88,7 @@ class TestExecutionController( @RequestParam(required = false, defaultValue = "false") checkDebugInfo: Boolean, @RequestParam(required = false, defaultValue = "false") testAnalysis: Boolean, authentication: Authentication, - ): Flux = blockingToMono { + ): Flux = blockingToMono { executionService.findExecution(executionId) } .switchIfEmptyToNotFound() @@ -132,7 +132,7 @@ class TestExecutionController( ) .zipWith( testAnalysisService.analyze(testId).collectList(), - Pair::plus, + Pair::plus, ) }.flatMap { (testExecution, metrics, results) -> if (checkDebugInfo) { @@ -155,7 +155,7 @@ class TestExecutionController( } } - private fun com.saveourtool.common.agent.TestExecutionDto.hasDebugInfoAsMono() = debugInfoStorage.doesExist(requiredId()) + private fun TestExecutionDto.hasDebugInfoAsMono() = debugInfoStorage.doesExist(requiredId()) .logicalOr(executionInfoStorage.doesExist(executionId)) .switchIfEmptyToResponseException(HttpStatus.INTERNAL_SERVER_ERROR) { "Failure while checking for debug info availability." @@ -169,8 +169,8 @@ class TestExecutionController( * @param authentication * @return a list of [TestExecutionDto]s */ - @GetMapping(path = ["/api/${com.saveourtool.common.v1}/testLatestExecutions"]) - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @GetMapping(path = ["/api/$v1/testLatestExecutions"]) + @RequiresAuthorizationSourceHeader @Suppress("TYPE_ALIAS", "MagicNumber") fun getTestExecutionsByStatus( @RequestParam executionId: Long, @@ -178,7 +178,7 @@ class TestExecutionController( @RequestParam(required = false) page: Int?, @RequestParam(required = false) size: Int?, authentication: Authentication, - ): Mono> = + ): Mono> = executionService.findExecution(executionId) .toMonoOrNotFound() .filterWhen { @@ -187,7 +187,7 @@ class TestExecutionController( .mapNotNull { if (page == null || size == null) { testExecutionService.getAllTestExecutions(executionId).groupBy { it.test.testSuite.name }.map { (testSuiteName, testExecutions) -> - com.saveourtool.common.agent.TestSuiteExecutionStatisticDto( + TestSuiteExecutionStatisticDto( testSuiteName, testExecutions.count(), testExecutions.count { it.status == status }, @@ -196,7 +196,7 @@ class TestExecutionController( } } else { testExecutionService.getByExecutionIdGroupByTestSuite(executionId, status, page, size)?.map { - com.saveourtool.common.agent.TestSuiteExecutionStatisticDto( + TestSuiteExecutionStatisticDto( it[0] as String, (it[1] as BigInteger).toInt(), (it[2] as BigInteger).toInt(), @@ -215,11 +215,11 @@ class TestExecutionController( * @return TestExecution */ @PostMapping(path = ["/api/${com.saveourtool.common.v1}/test-execution"]) - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader fun getTestExecutionByLocation(@RequestParam executionId: Long, @RequestBody testResultLocation: TestResultLocation, authentication: Authentication, - ): Mono = executionService.findExecution(executionId) + ): Mono = executionService.findExecution(executionId) .toMonoOrNotFound() .filterWhen { projectPermissionEvaluator.checkPermissions(authentication, it, Permission.READ) @@ -240,8 +240,8 @@ class TestExecutionController( * @param testSuite * @param authentication */ - @GetMapping(path = ["/api/${com.saveourtool.common.v1}/testExecution/count"]) - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @GetMapping(path = ["/api/$v1/testExecution/count"]) + @RequiresAuthorizationSourceHeader fun getTestExecutionsCount( @RequestParam executionId: Long, @RequestParam(required = false) status: TestResultStatus?, @@ -289,7 +289,7 @@ class TestExecutionController( * @return response */ @PostMapping(value = ["/internal/saveTestResult"]) - fun saveTestResult(@RequestBody testExecutionResults: List): ResponseEntity = try { + fun saveTestResult(@RequestBody testExecutionResults: List): ResponseEntity = try { if (testExecutionResults.isEmpty()) { ResponseEntity.status(HttpStatus.BAD_REQUEST).body("Empty result cannot be saved") } else if (testExecutionService.saveTestResult(testExecutionResults).isEmpty()) { diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/TestSuitesSourceController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/TestSuitesSourceController.kt index 7d9b34f5d6..5328d412d7 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/TestSuitesSourceController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/TestSuitesSourceController.kt @@ -2,18 +2,18 @@ package com.saveourtool.save.backend.controllers import com.saveourtool.common.configs.ApiSwaggerSupport import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.domain.EntitySaveStatus +import com.saveourtool.common.entities.* +import com.saveourtool.common.entities.TestSuitesSource.Companion.toTestSuiteSource +import com.saveourtool.common.service.GitService +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.test.TestsSourceVersionInfoList +import com.saveourtool.common.testsuite.* +import com.saveourtool.common.utils.* import com.saveourtool.common.v1 import com.saveourtool.save.authservice.utils.userId import com.saveourtool.save.backend.service.* import com.saveourtool.save.backend.utils.toResponseEntity -import com.saveourtool.save.domain.EntitySaveStatus -import com.saveourtool.save.entities.* -import com.saveourtool.save.entities.TestSuitesSource.Companion.toTestSuiteSource -import com.saveourtool.save.service.GitService -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.test.TestsSourceVersionInfoList -import com.saveourtool.save.testsuite.* -import com.saveourtool.save.utils.* import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -38,12 +38,12 @@ typealias EntitySaveStatusResponse = ResponseEntity /** * Controller for [TestSuitesSource] */ -@com.saveourtool.common.configs.ApiSwaggerSupport +@ApiSwaggerSupport @RestController @Tags( Tag(name = "test-suites-source"), ) -@RequestMapping("/api/${com.saveourtool.common.v1}/test-suites-sources") +@RequestMapping("/api/$v1/test-suites-sources") class TestSuitesSourceController( private val testSuitesSourceService: TestSuitesSourceService, private val testsSourceVersionService: TestsSourceVersionService, @@ -51,7 +51,7 @@ class TestSuitesSourceController( private val gitService: GitService, ) { @GetMapping("/{organizationName}/list") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -72,7 +72,7 @@ class TestSuitesSourceController( } @GetMapping("/{organizationName}/{sourceName}") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -95,7 +95,7 @@ class TestSuitesSourceController( .map { it.toDto() } @GetMapping("/{organizationName}/{sourceName}/list-version") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -121,7 +121,7 @@ class TestSuitesSourceController( } @GetMapping("/{organizationName}/list-version") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -141,7 +141,7 @@ class TestSuitesSourceController( } @PostMapping("/create") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", @@ -166,7 +166,7 @@ class TestSuitesSourceController( } @PostMapping("/update") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", @@ -206,7 +206,7 @@ class TestSuitesSourceController( } @DeleteMapping("/{organizationName}/{sourceName}/delete-version") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "DELETE", @@ -260,7 +260,7 @@ class TestSuitesSourceController( } @PostMapping("/{organizationName}/{sourceName}/fetch") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "POST", @@ -293,7 +293,7 @@ class TestSuitesSourceController( } @GetMapping("/{organizationName}/{sourceName}/tag-list-to-fetch") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -313,7 +313,7 @@ class TestSuitesSourceController( } @GetMapping("/{organizationName}/{sourceName}/branch-list-to-fetch") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", @@ -329,7 +329,7 @@ class TestSuitesSourceController( .map { ResponseEntity.ok().body(it) } @GetMapping("/available") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader @PreAuthorize("permitAll()") @Operation( method = "GET", diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/UserPermissionController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/UserPermissionController.kt index 5cbaeb4591..a6a3a879b1 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/UserPermissionController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/UserPermissionController.kt @@ -1,10 +1,10 @@ package com.saveourtool.save.backend.controllers import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.info.UserPermissions +import com.saveourtool.common.utils.blockingToMono import com.saveourtool.common.v1 import com.saveourtool.save.backend.security.UserPermissionEvaluator -import com.saveourtool.save.info.UserPermissions -import com.saveourtool.save.utils.blockingToMono import org.springframework.security.core.Authentication import org.springframework.web.bind.annotation.GetMapping @@ -16,9 +16,9 @@ import reactor.core.publisher.Mono /** * Controller for user permissions. */ -@com.saveourtool.common.configs.ApiSwaggerSupport +@ApiSwaggerSupport @RestController -@RequestMapping(path = ["/api/${com.saveourtool.common.v1}"]) +@RequestMapping(path = ["/api/$v1"]) class UserPermissionController( private val userPermissionEvaluator: UserPermissionEvaluator, ) { diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/UsersDetailsController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/UsersDetailsController.kt index aeeeaed4df..546140463e 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/UsersDetailsController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/UsersDetailsController.kt @@ -1,18 +1,18 @@ package com.saveourtool.save.backend.controllers import com.saveourtool.common.configs.RequiresAuthorizationSourceHeader +import com.saveourtool.common.domain.UserSaveStatus +import com.saveourtool.common.entities.User +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.info.UserStatus +import com.saveourtool.common.repository.UserRepository +import com.saveourtool.common.service.UserService +import com.saveourtool.common.utils.* import com.saveourtool.common.v1 +import com.saveourtool.common.validation.isValidLengthName import com.saveourtool.save.authservice.utils.SaveUserDetails import com.saveourtool.save.authservice.utils.userId import com.saveourtool.save.backend.configs.ConfigProperties -import com.saveourtool.save.domain.UserSaveStatus -import com.saveourtool.save.entities.User -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.info.UserStatus -import com.saveourtool.save.repository.UserRepository -import com.saveourtool.save.service.UserService -import com.saveourtool.save.utils.* -import com.saveourtool.save.validation.isValidLengthName import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.Parameter @@ -37,7 +37,7 @@ import reactor.kotlin.core.publisher.toMono * Controller that handles operation with users */ @RestController -@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/users"]) +@RequestMapping(path = ["/api/$v1/users"]) class UsersDetailsController( private val userRepository: UserRepository, private val userDetailsService: UserService, @@ -78,7 +78,7 @@ class UsersDetailsController( ), ) @ApiResponse(responseCode = "200", description = "Successfully fetched users.") - @com.saveourtool.common.configs.RequiresAuthorizationSourceHeader + @RequiresAuthorizationSourceHeader fun findByPrefix( @RequestParam prefix: String, @RequestParam(required = false, defaultValue = "5") pageSize: Int, diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/AgentsController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/AgentsController.kt index 9cae95986c..a9f1431804 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/AgentsController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/AgentsController.kt @@ -1,6 +1,10 @@ package com.saveourtool.save.backend.controllers.internal import com.saveourtool.common.agent.* +import com.saveourtool.common.entities.* +import com.saveourtool.common.storage.impl.InternalFileKey +import com.saveourtool.common.test.TestDto +import com.saveourtool.common.utils.* import com.saveourtool.save.backend.configs.ConfigProperties import com.saveourtool.save.backend.repository.AgentStatusRepository import com.saveourtool.save.backend.service.AgentService @@ -10,10 +14,6 @@ import com.saveourtool.save.backend.service.TestService import com.saveourtool.save.backend.storage.BackendInternalFileStorage import com.saveourtool.save.backend.storage.FileStorage import com.saveourtool.save.backend.storage.TestsSourceSnapshotStorage -import com.saveourtool.common.entities.* -import com.saveourtool.common.storage.impl.InternalFileKey -import com.saveourtool.common.test.TestDto -import com.saveourtool.common.utils.* import org.slf4j.LoggerFactory import org.springframework.http.HttpStatus diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/FileInternalController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/FileInternalController.kt index bb4cf39833..65bd11bf2e 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/FileInternalController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/FileInternalController.kt @@ -1,10 +1,10 @@ package com.saveourtool.save.backend.controllers.internal +import com.saveourtool.common.domain.TestResultDebugInfo +import com.saveourtool.common.utils.ByteBufferFluxResponse +import com.saveourtool.common.utils.switchIfEmptyToNotFound import com.saveourtool.save.backend.storage.DebugInfoStorage import com.saveourtool.save.backend.storage.FileStorage -import com.saveourtool.save.domain.TestResultDebugInfo -import com.saveourtool.save.utils.ByteBufferFluxResponse -import com.saveourtool.save.utils.switchIfEmptyToNotFound import org.slf4j.LoggerFactory import org.springframework.http.MediaType diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/TestController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/TestController.kt index 8626a87af6..b94cfc08e4 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/TestController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/TestController.kt @@ -1,10 +1,10 @@ package com.saveourtool.save.backend.controllers.internal +import com.saveourtool.common.test.TestDto +import com.saveourtool.common.utils.debug +import com.saveourtool.common.utils.getLogger +import com.saveourtool.common.utils.trace import com.saveourtool.save.backend.service.TestService -import com.saveourtool.save.test.TestDto -import com.saveourtool.save.utils.debug -import com.saveourtool.save.utils.getLogger -import com.saveourtool.save.utils.trace import io.micrometer.core.instrument.MeterRegistry import org.slf4j.Logger diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/TestSuitesController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/TestSuitesController.kt index 216b0f63da..f8715738e3 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/TestSuitesController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/TestSuitesController.kt @@ -1,10 +1,10 @@ package com.saveourtool.save.backend.controllers.internal import com.saveourtool.common.configs.ApiSwaggerSupport +import com.saveourtool.common.entities.TestSuite +import com.saveourtool.common.testsuite.TestSuiteDto +import com.saveourtool.common.utils.blockingToMono import com.saveourtool.save.backend.service.TestSuitesService -import com.saveourtool.save.entities.TestSuite -import com.saveourtool.save.testsuite.TestSuiteDto -import com.saveourtool.save.utils.blockingToMono import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.responses.ApiResponse @@ -17,7 +17,7 @@ import reactor.core.publisher.Mono /** * Controller for test suites */ -@com.saveourtool.common.configs.ApiSwaggerSupport +@ApiSwaggerSupport @Tags( Tag(name = "test-suites"), Tag(name = "internal"), diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/TestSuitesSourceInternalController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/TestSuitesSourceInternalController.kt index 61789a7f56..fe1fdc5bd2 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/TestSuitesSourceInternalController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/TestSuitesSourceInternalController.kt @@ -1,13 +1,13 @@ package com.saveourtool.save.backend.controllers.internal +import com.saveourtool.common.entities.TestSuitesSource +import com.saveourtool.common.storage.request.UploadRequest +import com.saveourtool.common.test.TestsSourceSnapshotDto +import com.saveourtool.common.test.TestsSourceVersionDto +import com.saveourtool.common.testsuite.* +import com.saveourtool.common.utils.* import com.saveourtool.save.backend.service.* import com.saveourtool.save.backend.storage.TestsSourceSnapshotStorage -import com.saveourtool.save.entities.TestSuitesSource -import com.saveourtool.save.storage.request.UploadRequest -import com.saveourtool.save.test.TestsSourceSnapshotDto -import com.saveourtool.save.test.TestsSourceVersionDto -import com.saveourtool.save.testsuite.* -import com.saveourtool.save.utils.* import org.springframework.web.bind.annotation.* import reactor.core.publisher.Mono diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/UsersController.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/UsersController.kt index 2e7e148981..5e8e66baa6 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/UsersController.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/internal/UsersController.kt @@ -1,8 +1,8 @@ package com.saveourtool.save.backend.controllers.internal +import com.saveourtool.common.service.UserService +import com.saveourtool.common.utils.blockingToMono import com.saveourtool.save.authservice.utils.SaveUserDetails -import com.saveourtool.save.service.UserService -import com.saveourtool.save.utils.blockingToMono import org.springframework.http.ResponseEntity import org.springframework.web.bind.annotation.GetMapping diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/vulnerability/event/VulnerabilityMetadataListener.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/vulnerability/event/VulnerabilityMetadataListener.kt index 87aefc62da..21fc85b52c 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/vulnerability/event/VulnerabilityMetadataListener.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/controllers/vulnerability/event/VulnerabilityMetadataListener.kt @@ -1,12 +1,12 @@ package com.saveourtool.save.backend.controllers.vulnerability.event +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.Notification +import com.saveourtool.common.entities.vulnerability.VulnerabilityStatus +import com.saveourtool.common.entitiescosv.VulnerabilityMetadata +import com.saveourtool.common.entitiescosv.evententities.VulnerabilityMetadataEvent +import com.saveourtool.common.service.UserService import com.saveourtool.save.backend.service.NotificationService -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.Notification -import com.saveourtool.save.entities.vulnerability.VulnerabilityStatus -import com.saveourtool.save.entitiescosv.VulnerabilityMetadata -import com.saveourtool.save.entitiescosv.evententities.VulnerabilityMetadataEvent -import com.saveourtool.save.service.UserService import org.springframework.context.event.EventListener import org.springframework.stereotype.Component diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/event/UserListener.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/event/UserListener.kt index 13a3718d34..e3ab08f4d7 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/event/UserListener.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/event/UserListener.kt @@ -1,12 +1,13 @@ package com.saveourtool.save.backend.event +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.Notification +import com.saveourtool.common.entities.User +import com.saveourtool.common.evententities.UserEvent +import com.saveourtool.common.info.UserStatus +import com.saveourtool.common.service.UserService import com.saveourtool.save.backend.service.NotificationService -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.Notification -import com.saveourtool.save.entities.User -import com.saveourtool.save.evententities.UserEvent -import com.saveourtool.save.info.UserStatus -import com.saveourtool.save.service.UserService + import org.springframework.context.event.EventListener import org.springframework.stereotype.Component diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/AgentRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/AgentRepository.kt index 84448f5e68..fedb3d2262 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/AgentRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/AgentRepository.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.entities.Agent -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.Agent +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository /** diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/AgentStatusRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/AgentStatusRepository.kt index ee09c7b2e3..8b6f166748 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/AgentStatusRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/AgentStatusRepository.kt @@ -1,8 +1,8 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.entities.Agent -import com.saveourtool.save.entities.AgentStatus -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.Agent +import com.saveourtool.common.entities.AgentStatus +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository import javax.transaction.Transactional diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/AwesomeBenchmarksRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/AwesomeBenchmarksRepository.kt index abaa8d8970..8ded2899f6 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/AwesomeBenchmarksRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/AwesomeBenchmarksRepository.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.entities.benchmarks.AwesomeBenchmarks -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.benchmarks.AwesomeBenchmarks +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.data.jpa.repository.Modifying import org.springframework.data.jpa.repository.Query import org.springframework.stereotype.Repository diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/ExecutionRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/ExecutionRepository.kt index b56245709f..fd3f4527cc 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/ExecutionRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/ExecutionRepository.kt @@ -1,8 +1,8 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.entities.Execution -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.Execution +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.data.jpa.repository.Lock import org.springframework.data.jpa.repository.QueryHints import org.springframework.stereotype.Repository diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/FileRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/FileRepository.kt index b1f1c9017d..ebb0916665 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/FileRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/FileRepository.kt @@ -1,8 +1,8 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.entities.File -import com.saveourtool.save.entities.Project -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.File +import com.saveourtool.common.entities.Project +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository import java.time.LocalDateTime diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkContestExecutionRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkContestExecutionRepository.kt index 9889e5700b..0863f0425e 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkContestExecutionRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkContestExecutionRepository.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.entities.* -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.* +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.data.domain.Page import org.springframework.data.domain.Pageable import org.springframework.stereotype.Repository diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkContestProjectRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkContestProjectRepository.kt index 229a357859..9ddd5cf6a9 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkContestProjectRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkContestProjectRepository.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.entities.Contest -import com.saveourtool.save.entities.LnkContestProject -import com.saveourtool.save.entities.Project -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.Contest +import com.saveourtool.common.entities.LnkContestProject +import com.saveourtool.common.entities.Project +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.data.domain.Pageable import org.springframework.stereotype.Repository import java.util.Optional diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkContestTestSuiteRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkContestTestSuiteRepository.kt index d2fadc7ab0..d53c4eb138 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkContestTestSuiteRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkContestTestSuiteRepository.kt @@ -1,8 +1,8 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.entities.Contest -import com.saveourtool.save.entities.LnkContestTestSuite -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.Contest +import com.saveourtool.common.entities.LnkContestTestSuite +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository /** diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkExecutionAgentRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkExecutionAgentRepository.kt index 936c687387..11e4fdbddc 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkExecutionAgentRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkExecutionAgentRepository.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.entities.LnkExecutionAgent -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.LnkExecutionAgent +import com.saveourtool.common.spring.repository.BaseEntityRepository /** * Repository of [LnkExecutionAgent] diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkExecutionFileRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkExecutionFileRepository.kt index 23d82e94c6..8331f5bdf6 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkExecutionFileRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkExecutionFileRepository.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.entities.Execution -import com.saveourtool.save.entities.File -import com.saveourtool.save.entities.LnkExecutionFile -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.Execution +import com.saveourtool.common.entities.File +import com.saveourtool.common.entities.LnkExecutionFile +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository /** diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkExecutionTestSuiteRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkExecutionTestSuiteRepository.kt index 842e3f7f2d..d7a2b714e0 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkExecutionTestSuiteRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkExecutionTestSuiteRepository.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.entities.Execution -import com.saveourtool.save.entities.LnkExecutionTestSuite -import com.saveourtool.save.entities.TestSuite -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.Execution +import com.saveourtool.common.entities.LnkExecutionTestSuite +import com.saveourtool.common.entities.TestSuite +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository /** diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkOrganizationTestSuiteRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkOrganizationTestSuiteRepository.kt index dde69a4c5d..5df4a24403 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkOrganizationTestSuiteRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkOrganizationTestSuiteRepository.kt @@ -1,8 +1,8 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.entities.* -import com.saveourtool.save.permission.Rights -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.* +import com.saveourtool.common.permission.Rights +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository /** diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkProjectGithubRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkProjectGithubRepository.kt index 8077e91669..eaba1c5adb 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkProjectGithubRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/LnkProjectGithubRepository.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.entities.* -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.* +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository /** diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/ProjectProblemRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/ProjectProblemRepository.kt index 5a53e72ecf..fb36270da5 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/ProjectProblemRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/ProjectProblemRepository.kt @@ -1,8 +1,8 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.entities.ProjectProblem -import com.saveourtool.save.entitiescosv.VulnerabilityMetadata -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.ProjectProblem +import com.saveourtool.common.entitiescosv.VulnerabilityMetadata +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.data.jpa.repository.Query import org.springframework.data.repository.query.Param import org.springframework.stereotype.Repository diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestExecutionRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestExecutionRepository.kt index 92e8d9f75a..b946d47f93 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestExecutionRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestExecutionRepository.kt @@ -1,8 +1,8 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.domain.TestResultStatus -import com.saveourtool.save.entities.TestExecution -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.domain.TestResultStatus +import com.saveourtool.common.entities.TestExecution +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.data.domain.Pageable import org.springframework.data.jpa.repository.Query import org.springframework.data.repository.query.Param diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestRepository.kt index 4a371cb003..275bffa940 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestRepository.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.entities.Test -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.Test +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository import java.util.Optional diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestSuiteRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestSuiteRepository.kt index ba8dc4fc74..4bfdb07f1d 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestSuiteRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestSuiteRepository.kt @@ -1,8 +1,8 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.entities.TestSuite -import com.saveourtool.save.entities.TestsSourceSnapshot -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.TestSuite +import com.saveourtool.common.entities.TestsSourceSnapshot +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository /** diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestSuitesSourceRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestSuitesSourceRepository.kt index 34fedf4a30..3770afab05 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestSuitesSourceRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestSuitesSourceRepository.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.entities.Git -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.entities.TestSuitesSource -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.Git +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.entities.TestSuitesSource +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository /** diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestsSourceSnapshotRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestsSourceSnapshotRepository.kt index c662581774..1c1e8d6fbf 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestsSourceSnapshotRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestsSourceSnapshotRepository.kt @@ -1,8 +1,8 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.entities.TestSuitesSource -import com.saveourtool.save.entities.TestsSourceSnapshot -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.TestSuitesSource +import com.saveourtool.common.entities.TestsSourceSnapshot +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository /** diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestsSourceVersionRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestsSourceVersionRepository.kt index 3e55655e1c..3f1d4eb0a9 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestsSourceVersionRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/TestsSourceVersionRepository.kt @@ -1,8 +1,8 @@ package com.saveourtool.save.backend.repository -import com.saveourtool.save.entities.TestsSourceSnapshot -import com.saveourtool.save.entities.TestsSourceVersion -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.TestsSourceSnapshot +import com.saveourtool.common.entities.TestsSourceVersion +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository /** diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/contest/ContestRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/contest/ContestRepository.kt index 4820c43f90..97663f84fc 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/contest/ContestRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/contest/ContestRepository.kt @@ -1,8 +1,8 @@ package com.saveourtool.save.backend.repository.contest -import com.saveourtool.save.entities.Contest -import com.saveourtool.save.entities.contest.ContestStatus -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.Contest +import com.saveourtool.common.entities.contest.ContestStatus +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.data.domain.Page import org.springframework.data.domain.Pageable import org.springframework.data.jpa.repository.Modifying diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/contest/ContestSampleFieldRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/contest/ContestSampleFieldRepository.kt index 24a2bd02ff..b4968bba81 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/contest/ContestSampleFieldRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/contest/ContestSampleFieldRepository.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.backend.repository.contest -import com.saveourtool.save.entities.ContestSampleField -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.ContestSampleField +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository /** diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/contest/ContestSampleRepository.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/contest/ContestSampleRepository.kt index d2181d5b57..e107b176fd 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/contest/ContestSampleRepository.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/repository/contest/ContestSampleRepository.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.backend.repository.contest -import com.saveourtool.save.entities.ContestSample -import com.saveourtool.save.spring.repository.BaseEntityRepository +import com.saveourtool.common.entities.ContestSample +import com.saveourtool.common.spring.repository.BaseEntityRepository import org.springframework.stereotype.Repository /** diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/security/TestSuitePermissionEvaluator.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/security/TestSuitePermissionEvaluator.kt index a370e85528..76876a34d3 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/security/TestSuitePermissionEvaluator.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/security/TestSuitePermissionEvaluator.kt @@ -1,10 +1,11 @@ package com.saveourtool.save.backend.security +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.entities.TestSuite +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.permission.Rights import com.saveourtool.save.backend.service.LnkOrganizationTestSuiteService -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.entities.TestSuite -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.permission.Rights + import org.springframework.security.core.Authentication import org.springframework.stereotype.Component diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/security/UserPermissionEvaluator.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/security/UserPermissionEvaluator.kt index d2bdd25020..d9a90b5a75 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/security/UserPermissionEvaluator.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/security/UserPermissionEvaluator.kt @@ -1,10 +1,11 @@ package com.saveourtool.save.backend.security +import com.saveourtool.common.entities.OrganizationStatus +import com.saveourtool.common.info.UserPermissions +import com.saveourtool.common.info.UserPermissionsInOrganization +import com.saveourtool.common.repository.LnkUserOrganizationRepository import com.saveourtool.save.authservice.utils.username -import com.saveourtool.save.entities.OrganizationStatus -import com.saveourtool.save.info.UserPermissions -import com.saveourtool.save.info.UserPermissionsInOrganization -import com.saveourtool.save.repository.LnkUserOrganizationRepository + import org.springframework.security.core.Authentication import org.springframework.stereotype.Component diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/AgentService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/AgentService.kt index 13fa7e37ed..adb845578d 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/AgentService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/AgentService.kt @@ -1,16 +1,18 @@ package com.saveourtool.save.backend.service +import com.saveourtool.common.entities.Agent +import com.saveourtool.common.entities.AgentStatus +import com.saveourtool.common.entities.Execution +import com.saveourtool.common.entities.LnkExecutionAgent +import com.saveourtool.common.utils.orNotFound import com.saveourtool.save.backend.repository.AgentRepository import com.saveourtool.save.backend.repository.AgentStatusRepository import com.saveourtool.save.backend.repository.LnkExecutionAgentRepository -import com.saveourtool.save.entities.Agent -import com.saveourtool.save.entities.AgentStatus -import com.saveourtool.save.entities.Execution -import com.saveourtool.save.entities.LnkExecutionAgent -import com.saveourtool.save.utils.orNotFound + import org.springframework.data.repository.findByIdOrNull import org.springframework.stereotype.Service import org.springframework.transaction.annotation.Transactional + import java.time.LocalDateTime /** diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/AwesomeBenchmarksService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/AwesomeBenchmarksService.kt index dcfd57b6b3..67f0c6be45 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/AwesomeBenchmarksService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/AwesomeBenchmarksService.kt @@ -1,9 +1,10 @@ package com.saveourtool.save.backend.service +import com.saveourtool.common.entities.benchmarks.AwesomeBenchmarks +import com.saveourtool.common.entities.benchmarks.BenchmarkEntity +import com.saveourtool.common.entities.benchmarks.toEntity import com.saveourtool.save.backend.repository.AwesomeBenchmarksRepository -import com.saveourtool.save.entities.benchmarks.AwesomeBenchmarks -import com.saveourtool.save.entities.benchmarks.BenchmarkEntity -import com.saveourtool.save.entities.benchmarks.toEntity + import org.slf4j.LoggerFactory import org.springframework.stereotype.Service import org.springframework.transaction.annotation.Transactional diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/ContestSampleService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/ContestSampleService.kt index ee0eae6268..376617c717 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/ContestSampleService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/ContestSampleService.kt @@ -1,13 +1,14 @@ package com.saveourtool.save.backend.service +import com.saveourtool.common.entities.ContestSample +import com.saveourtool.common.entities.ContestSampleField +import com.saveourtool.common.entities.contest.ContestSampleDto +import com.saveourtool.common.repository.UserRepository +import com.saveourtool.common.utils.getByIdOrNotFound import com.saveourtool.save.authservice.utils.userId import com.saveourtool.save.backend.repository.contest.ContestSampleFieldRepository import com.saveourtool.save.backend.repository.contest.ContestSampleRepository -import com.saveourtool.save.entities.ContestSample -import com.saveourtool.save.entities.ContestSampleField -import com.saveourtool.save.entities.contest.ContestSampleDto -import com.saveourtool.save.repository.UserRepository -import com.saveourtool.save.utils.getByIdOrNotFound + import org.springframework.security.core.Authentication import org.springframework.stereotype.Service import org.springframework.transaction.annotation.Transactional diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/ContestService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/ContestService.kt index a3f7b9097d..ebfa1fe1da 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/ContestService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/ContestService.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.backend.service +import com.saveourtool.common.entities.Contest +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.entities.contest.ContestStatus import com.saveourtool.save.backend.repository.contest.ContestRepository -import com.saveourtool.save.entities.Contest -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.entities.contest.ContestStatus import org.springframework.data.domain.PageRequest import org.springframework.data.domain.Pageable diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/ExecutionService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/ExecutionService.kt index aa4e766b5a..680ef2be83 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/ExecutionService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/ExecutionService.kt @@ -1,17 +1,17 @@ package com.saveourtool.save.backend.service +import com.saveourtool.common.domain.* +import com.saveourtool.common.entities.* +import com.saveourtool.common.execution.ExecutionStatus +import com.saveourtool.common.execution.TestingType +import com.saveourtool.common.repository.UserRepository +import com.saveourtool.common.service.ProjectService +import com.saveourtool.common.test.TestsSourceSnapshotDto +import com.saveourtool.common.utils.* import com.saveourtool.save.backend.configs.ConfigProperties import com.saveourtool.save.backend.repository.* import com.saveourtool.save.backend.utils.ErrorMessage import com.saveourtool.save.backend.utils.getOrThrowBadRequest -import com.saveourtool.save.domain.* -import com.saveourtool.save.entities.* -import com.saveourtool.save.execution.ExecutionStatus -import com.saveourtool.save.execution.TestingType -import com.saveourtool.save.repository.UserRepository -import com.saveourtool.save.service.ProjectService -import com.saveourtool.save.test.TestsSourceSnapshotDto -import com.saveourtool.save.utils.* import arrow.core.Either import arrow.core.left diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkContestExecutionService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkContestExecutionService.kt index 73bd78cbc2..dae63805eb 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkContestExecutionService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkContestExecutionService.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.backend.service +import com.saveourtool.common.entities.* +import com.saveourtool.common.utils.orNotFound import com.saveourtool.save.backend.repository.LnkContestExecutionRepository import com.saveourtool.save.backend.repository.contest.ContestRepository -import com.saveourtool.save.entities.* -import com.saveourtool.save.utils.orNotFound import org.springframework.data.domain.PageRequest import org.springframework.stereotype.Service diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkContestProjectService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkContestProjectService.kt index 534d072f7d..28a39b2d97 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkContestProjectService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkContestProjectService.kt @@ -1,11 +1,12 @@ package com.saveourtool.save.backend.service +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.entities.* +import com.saveourtool.common.service.ProjectService +import com.saveourtool.common.utils.debug +import com.saveourtool.common.utils.getLogger import com.saveourtool.save.backend.repository.LnkContestProjectRepository -import com.saveourtool.save.domain.ProjectCoordinates -import com.saveourtool.save.entities.* -import com.saveourtool.save.service.ProjectService -import com.saveourtool.save.utils.debug -import com.saveourtool.save.utils.getLogger + import org.springframework.data.domain.PageRequest import org.springframework.stereotype.Service import org.springframework.transaction.annotation.Transactional diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkContestTestSuiteService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkContestTestSuiteService.kt index 9ade19668e..8067907fcf 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkContestTestSuiteService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkContestTestSuiteService.kt @@ -1,7 +1,8 @@ package com.saveourtool.save.backend.service +import com.saveourtool.common.entities.* import com.saveourtool.save.backend.repository.LnkContestTestSuiteRepository -import com.saveourtool.save.entities.* + import org.springframework.stereotype.Service /** diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkExecutionTestSuiteService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkExecutionTestSuiteService.kt index 4258e0053c..01f0877b93 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkExecutionTestSuiteService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkExecutionTestSuiteService.kt @@ -1,9 +1,10 @@ package com.saveourtool.save.backend.service +import com.saveourtool.common.entities.Execution +import com.saveourtool.common.entities.LnkExecutionTestSuite +import com.saveourtool.common.entities.TestSuite import com.saveourtool.save.backend.repository.LnkExecutionTestSuiteRepository -import com.saveourtool.save.entities.Execution -import com.saveourtool.save.entities.LnkExecutionTestSuite -import com.saveourtool.save.entities.TestSuite + import org.springframework.stereotype.Service /** diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkOrganizationTestSuiteService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkOrganizationTestSuiteService.kt index fe1a849865..be9a65db64 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkOrganizationTestSuiteService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkOrganizationTestSuiteService.kt @@ -1,10 +1,11 @@ package com.saveourtool.save.backend.service +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.* +import com.saveourtool.common.permission.Rights +import com.saveourtool.common.utils.orNotFound import com.saveourtool.save.backend.repository.LnkOrganizationTestSuiteRepository -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.* -import com.saveourtool.save.permission.Rights -import com.saveourtool.save.utils.orNotFound + import org.springframework.stereotype.Service /** diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkProjectGithubService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkProjectGithubService.kt index cae3d13b8b..fb27d52c6e 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkProjectGithubService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/LnkProjectGithubService.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.backend.service +import com.saveourtool.common.entities.* import com.saveourtool.save.backend.repository.LnkProjectGithubRepository -import com.saveourtool.save.entities.* import org.springframework.stereotype.Service diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/NotificationService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/NotificationService.kt index 7db375317b..befd7d6ed4 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/NotificationService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/NotificationService.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.backend.service -import com.saveourtool.save.entities.Notification -import com.saveourtool.save.repository.NotificationRepository +import com.saveourtool.common.entities.Notification +import com.saveourtool.common.repository.NotificationRepository import org.springframework.data.repository.findByIdOrNull import org.springframework.stereotype.Service import org.springframework.transaction.annotation.Transactional diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/PermissionService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/PermissionService.kt index b563b12de6..d9f02a069d 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/PermissionService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/PermissionService.kt @@ -1,12 +1,12 @@ package com.saveourtool.save.backend.service -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.Project -import com.saveourtool.save.entities.User -import com.saveourtool.save.permission.SetRoleRequest -import com.saveourtool.save.repository.UserRepository -import com.saveourtool.save.service.LnkUserProjectService -import com.saveourtool.save.service.ProjectService +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.Project +import com.saveourtool.common.entities.User +import com.saveourtool.common.permission.SetRoleRequest +import com.saveourtool.common.repository.UserRepository +import com.saveourtool.common.service.LnkUserProjectService +import com.saveourtool.common.service.ProjectService import org.springframework.stereotype.Service import reactor.core.publisher.Mono import reactor.kotlin.core.publisher.toMono diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/ProjectProblemService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/ProjectProblemService.kt index e70daa8501..944d47e368 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/ProjectProblemService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/ProjectProblemService.kt @@ -1,14 +1,15 @@ package com.saveourtool.save.backend.service +import com.saveourtool.common.entities.ProjectProblem +import com.saveourtool.common.entities.ProjectProblemDto +import com.saveourtool.common.filters.ProjectProblemFilter +import com.saveourtool.common.repository.ProjectRepository +import com.saveourtool.common.repository.UserRepository +import com.saveourtool.common.utils.getByIdOrNotFound +import com.saveourtool.common.utils.orNotFound import com.saveourtool.save.authservice.utils.userId import com.saveourtool.save.backend.repository.ProjectProblemRepository -import com.saveourtool.save.entities.ProjectProblem -import com.saveourtool.save.entities.ProjectProblemDto -import com.saveourtool.save.filters.ProjectProblemFilter -import com.saveourtool.save.repository.ProjectRepository -import com.saveourtool.save.repository.UserRepository -import com.saveourtool.save.utils.getByIdOrNotFound -import com.saveourtool.save.utils.orNotFound + import org.springframework.security.core.Authentication import org.springframework.stereotype.Service import org.springframework.transaction.annotation.Transactional diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestAnalysisService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestAnalysisService.kt index a4227aeb52..12310857df 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestAnalysisService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestAnalysisService.kt @@ -5,11 +5,11 @@ package com.saveourtool.save.backend.service import com.saveourtool.save.backend.configs.ConfigProperties import com.saveourtool.save.backend.repository.ExecutionRepository import com.saveourtool.save.backend.repository.TestExecutionRepository -import com.saveourtool.save.entities.Execution -import com.saveourtool.save.entities.Project -import com.saveourtool.save.entities.TestExecution -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.service.ProjectService +import com.saveourtool.common.entities.Execution +import com.saveourtool.common.entities.Project +import com.saveourtool.common.entities.TestExecution +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.service.ProjectService import com.saveourtool.save.test.analysis.api.TestId import com.saveourtool.save.test.analysis.api.TestIdGenerator import com.saveourtool.save.test.analysis.api.TestRun @@ -18,11 +18,11 @@ import com.saveourtool.save.test.analysis.api.testId import com.saveourtool.save.test.analysis.entities.metadata import com.saveourtool.save.test.analysis.internal.ExtendedTestRun import com.saveourtool.save.test.analysis.internal.MutableTestStatisticsStorage -import com.saveourtool.save.test.analysis.metrics.TestMetrics -import com.saveourtool.save.test.analysis.results.AnalysisResult -import com.saveourtool.save.utils.getLogger -import com.saveourtool.save.utils.info -import com.saveourtool.save.utils.warn +import com.saveourtool.common.test.analysis.metrics.TestMetrics +import com.saveourtool.common.test.analysis.results.AnalysisResult +import com.saveourtool.common.utils.getLogger +import com.saveourtool.common.utils.info +import com.saveourtool.common.utils.warn import org.springframework.boot.context.event.ApplicationReadyEvent import org.springframework.context.event.EventListener import org.springframework.jmx.export.annotation.ManagedOperation diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestExecutionService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestExecutionService.kt index d942d7bc37..cc4f0e14b5 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestExecutionService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestExecutionService.kt @@ -2,18 +2,18 @@ package com.saveourtool.save.backend.service import com.saveourtool.common.agent.TestExecutionDto import com.saveourtool.common.agent.TestExecutionResult +import com.saveourtool.common.domain.TestResultLocation +import com.saveourtool.common.domain.TestResultStatus +import com.saveourtool.common.entities.Execution +import com.saveourtool.common.entities.Test +import com.saveourtool.common.entities.TestExecution +import com.saveourtool.common.filters.TestExecutionFilter +import com.saveourtool.common.test.TestDto +import com.saveourtool.common.utils.* import com.saveourtool.save.backend.repository.AgentRepository import com.saveourtool.save.backend.repository.ExecutionRepository import com.saveourtool.save.backend.repository.TestExecutionRepository import com.saveourtool.save.core.result.CountWarnings -import com.saveourtool.save.domain.TestResultLocation -import com.saveourtool.save.domain.TestResultStatus -import com.saveourtool.save.entities.Execution -import com.saveourtool.save.entities.Test -import com.saveourtool.save.entities.TestExecution -import com.saveourtool.save.filters.TestExecutionFilter -import com.saveourtool.save.test.TestDto -import com.saveourtool.save.utils.* import org.apache.commons.io.FilenameUtils import org.slf4j.Logger diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestService.kt index 464c7def33..c94cd40f7a 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestService.kt @@ -1,18 +1,18 @@ package com.saveourtool.save.backend.service +import com.saveourtool.common.domain.TestResultStatus +import com.saveourtool.common.entities.Execution +import com.saveourtool.common.entities.Test +import com.saveourtool.common.entities.TestExecution +import com.saveourtool.common.execution.ExecutionStatus +import com.saveourtool.common.test.TestBatch +import com.saveourtool.common.test.TestDto +import com.saveourtool.common.utils.orNotFound import com.saveourtool.save.backend.repository.ExecutionRepository import com.saveourtool.save.backend.repository.TestExecutionRepository import com.saveourtool.save.backend.repository.TestRepository -import com.saveourtool.save.domain.TestResultStatus -import com.saveourtool.save.entities.Execution -import com.saveourtool.save.entities.Test -import com.saveourtool.save.entities.TestExecution -import com.saveourtool.save.execution.ExecutionStatus -import com.saveourtool.save.test.TestBatch -import com.saveourtool.save.test.TestDto -import com.saveourtool.save.utils.orNotFound -import org.apache.commons.io.FilenameUtils +import org.apache.commons.io.FilenameUtils import org.slf4j.LoggerFactory import org.springframework.data.domain.PageRequest import org.springframework.scheduling.annotation.Scheduled diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestSuitesService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestSuitesService.kt index 948ff4d8e9..561b96078c 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestSuitesService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestSuitesService.kt @@ -1,16 +1,15 @@ package com.saveourtool.save.backend.service +import com.saveourtool.common.entities.TestSuite +import com.saveourtool.common.entities.TestSuite.Companion.toEntity +import com.saveourtool.common.entities.TestsSourceSnapshot +import com.saveourtool.common.filters.TestSuiteFilter +import com.saveourtool.common.permission.Rights +import com.saveourtool.common.testsuite.TestSuiteDto +import com.saveourtool.common.utils.orNotFound import com.saveourtool.save.backend.repository.TestSuiteRepository -import com.saveourtool.save.entities.TestSuite -import com.saveourtool.save.entities.TestSuite.Companion.toEntity -import com.saveourtool.save.entities.TestsSourceSnapshot -import com.saveourtool.save.filters.TestSuiteFilter -import com.saveourtool.save.permission.Rights -import com.saveourtool.save.testsuite.TestSuiteDto -import com.saveourtool.save.utils.orNotFound import org.springframework.context.annotation.Lazy - import org.springframework.data.domain.Example import org.springframework.data.domain.ExampleMatcher import org.springframework.data.repository.findByIdOrNull diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestSuitesSourceService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestSuitesSourceService.kt index 497f3f9228..1793b7aec4 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestSuitesSourceService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestSuitesSourceService.kt @@ -1,18 +1,18 @@ package com.saveourtool.save.backend.service +import com.saveourtool.common.domain.EntitySaveStatus +import com.saveourtool.common.entities.Git +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.entities.TestSuitesSource +import com.saveourtool.common.request.TestsSourceFetchRequest +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.testsuite.TestSuitesSourceDto +import com.saveourtool.common.testsuite.TestSuitesSourceFetchMode +import com.saveourtool.common.utils.* import com.saveourtool.save.backend.configs.ConfigProperties import com.saveourtool.save.backend.repository.TestSuitesSourceRepository -import com.saveourtool.save.domain.EntitySaveStatus -import com.saveourtool.save.entities.Git -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.entities.TestSuitesSource -import com.saveourtool.save.request.TestsSourceFetchRequest -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.testsuite.TestSuitesSourceDto -import com.saveourtool.save.testsuite.TestSuitesSourceFetchMode -import com.saveourtool.save.utils.* -import org.slf4j.Logger +import org.slf4j.Logger import org.springframework.boot.web.reactive.function.client.WebClientCustomizer import org.springframework.dao.DataIntegrityViolationException import org.springframework.data.repository.findByIdOrNull diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestsSourceVersionService.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestsSourceVersionService.kt index a5eeddff77..ef49c17320 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestsSourceVersionService.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/service/TestsSourceVersionService.kt @@ -1,18 +1,18 @@ package com.saveourtool.save.backend.service +import com.saveourtool.common.entities.TestsSourceSnapshot +import com.saveourtool.common.entities.TestsSourceVersion +import com.saveourtool.common.entities.TestsSourceVersion.Companion.toEntity +import com.saveourtool.common.repository.UserRepository +import com.saveourtool.common.test.* +import com.saveourtool.common.test.TestsSourceVersionInfo +import com.saveourtool.common.utils.* import com.saveourtool.save.backend.repository.TestSuitesSourceRepository import com.saveourtool.save.backend.repository.TestsSourceSnapshotRepository import com.saveourtool.save.backend.repository.TestsSourceVersionRepository import com.saveourtool.save.backend.storage.TestsSourceSnapshotStorage -import com.saveourtool.save.entities.TestsSourceSnapshot -import com.saveourtool.save.entities.TestsSourceVersion -import com.saveourtool.save.entities.TestsSourceVersion.Companion.toEntity -import com.saveourtool.save.repository.UserRepository -import com.saveourtool.save.test.* -import com.saveourtool.save.test.TestsSourceVersionInfo -import com.saveourtool.save.utils.* -import org.slf4j.Logger +import org.slf4j.Logger import org.springframework.stereotype.Service import org.springframework.transaction.annotation.Transactional diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/BackendInternalFileStorage.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/BackendInternalFileStorage.kt index d5c69b8361..bc8d1af6e0 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/BackendInternalFileStorage.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/BackendInternalFileStorage.kt @@ -1,12 +1,12 @@ package com.saveourtool.save.backend.storage +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.storage.DefaultStorageCoroutines +import com.saveourtool.common.storage.impl.AbstractInternalFileStorage +import com.saveourtool.common.storage.impl.InternalFileKey import com.saveourtool.save.backend.configs.ConfigProperties -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.storage.DefaultStorageCoroutines -import com.saveourtool.save.storage.impl.AbstractInternalFileStorage -import com.saveourtool.save.storage.impl.InternalFileKey -import generated.SAVE_CLI_VERSION +import generated.SAVE_CLI_VERSION import org.springframework.stereotype.Component /** diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/DebugInfoStorage.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/DebugInfoStorage.kt index c0a1035836..cea985994f 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/DebugInfoStorage.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/DebugInfoStorage.kt @@ -1,16 +1,16 @@ package com.saveourtool.save.backend.storage +import com.saveourtool.common.domain.TestResultDebugInfo +import com.saveourtool.common.entities.TestExecution +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.storage.AbstractSimpleReactiveStorage +import com.saveourtool.common.storage.DefaultStorageProjectReactor +import com.saveourtool.common.storage.concatS3Key +import com.saveourtool.common.storage.deleteUnexpectedKeys +import com.saveourtool.common.utils.* import com.saveourtool.save.backend.configs.ConfigProperties import com.saveourtool.save.backend.repository.TestExecutionRepository import com.saveourtool.save.backend.service.TestExecutionService -import com.saveourtool.save.domain.TestResultDebugInfo -import com.saveourtool.save.entities.TestExecution -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.storage.AbstractSimpleReactiveStorage -import com.saveourtool.save.storage.DefaultStorageProjectReactor -import com.saveourtool.save.storage.concatS3Key -import com.saveourtool.save.storage.deleteUnexpectedKeys -import com.saveourtool.save.utils.* import com.fasterxml.jackson.databind.ObjectMapper import org.slf4j.Logger diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/ExecutionInfoStorage.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/ExecutionInfoStorage.kt index 54f3402b0d..17d44258b6 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/ExecutionInfoStorage.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/ExecutionInfoStorage.kt @@ -1,17 +1,17 @@ package com.saveourtool.save.backend.storage +import com.saveourtool.common.execution.ExecutionUpdateDto +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.storage.AbstractSimpleReactiveStorage +import com.saveourtool.common.storage.DefaultStorageProjectReactor +import com.saveourtool.common.storage.concatS3Key +import com.saveourtool.common.storage.deleteUnexpectedKeys +import com.saveourtool.common.utils.debug +import com.saveourtool.common.utils.getLogger +import com.saveourtool.common.utils.uploadAndReturnContentSize import com.saveourtool.save.backend.configs.ConfigProperties import com.saveourtool.save.backend.repository.ExecutionRepository import com.saveourtool.save.backend.utils.collectAsJsonTo -import com.saveourtool.save.execution.ExecutionUpdateDto -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.storage.AbstractSimpleReactiveStorage -import com.saveourtool.save.storage.DefaultStorageProjectReactor -import com.saveourtool.save.storage.concatS3Key -import com.saveourtool.save.storage.deleteUnexpectedKeys -import com.saveourtool.save.utils.debug -import com.saveourtool.save.utils.getLogger -import com.saveourtool.save.utils.uploadAndReturnContentSize import com.fasterxml.jackson.databind.ObjectMapper import org.slf4j.Logger diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/FileS3KeyManager.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/FileS3KeyManager.kt index ba83dcb55e..7da64066cf 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/FileS3KeyManager.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/FileS3KeyManager.kt @@ -1,17 +1,17 @@ package com.saveourtool.save.backend.storage +import com.saveourtool.common.entities.File +import com.saveourtool.common.entities.FileDto +import com.saveourtool.common.entities.Project +import com.saveourtool.common.entities.toEntity +import com.saveourtool.common.service.ProjectService +import com.saveourtool.common.storage.concatS3Key +import com.saveourtool.common.storage.key.AbstractS3KeyDtoManager +import com.saveourtool.common.utils.BlockingBridge +import com.saveourtool.common.utils.orNotFound import com.saveourtool.save.backend.configs.ConfigProperties import com.saveourtool.save.backend.repository.FileRepository import com.saveourtool.save.backend.service.ExecutionService -import com.saveourtool.save.entities.File -import com.saveourtool.save.entities.FileDto -import com.saveourtool.save.entities.Project -import com.saveourtool.save.entities.toEntity -import com.saveourtool.save.service.ProjectService -import com.saveourtool.save.storage.concatS3Key -import com.saveourtool.save.storage.key.AbstractS3KeyDtoManager -import com.saveourtool.save.utils.BlockingBridge -import com.saveourtool.save.utils.orNotFound import org.springframework.stereotype.Component diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/FileStorage.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/FileStorage.kt index 8a2abbb228..663e54ccbb 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/FileStorage.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/FileStorage.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.backend.storage -import com.saveourtool.save.entities.* -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.storage.ReactiveStorageWithDatabase -import com.saveourtool.save.utils.* +import com.saveourtool.common.entities.* +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.storage.ReactiveStorageWithDatabase +import com.saveourtool.common.utils.* import org.springframework.stereotype.Service import reactor.core.publisher.Flux diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/TestsSourceSnapshotS3KeyManager.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/TestsSourceSnapshotS3KeyManager.kt index 4d79352e44..05ff7fd71e 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/TestsSourceSnapshotS3KeyManager.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/TestsSourceSnapshotS3KeyManager.kt @@ -1,18 +1,18 @@ package com.saveourtool.save.backend.storage +import com.saveourtool.common.entities.TestSuitesSource +import com.saveourtool.common.entities.TestsSourceSnapshot +import com.saveourtool.common.entities.TestsSourceSnapshot.Companion.toEntity +import com.saveourtool.common.storage.concatS3Key +import com.saveourtool.common.storage.key.AbstractS3KeyDtoManager +import com.saveourtool.common.test.TestsSourceSnapshotDto +import com.saveourtool.common.utils.BlockingBridge +import com.saveourtool.common.utils.getByIdOrNotFound import com.saveourtool.save.backend.configs.ConfigProperties import com.saveourtool.save.backend.repository.TestSuitesSourceRepository import com.saveourtool.save.backend.repository.TestsSourceSnapshotRepository import com.saveourtool.save.backend.service.ExecutionService import com.saveourtool.save.backend.service.TestSuitesService -import com.saveourtool.save.entities.TestSuitesSource -import com.saveourtool.save.entities.TestsSourceSnapshot -import com.saveourtool.save.entities.TestsSourceSnapshot.Companion.toEntity -import com.saveourtool.save.storage.concatS3Key -import com.saveourtool.save.storage.key.AbstractS3KeyDtoManager -import com.saveourtool.save.test.TestsSourceSnapshotDto -import com.saveourtool.save.utils.BlockingBridge -import com.saveourtool.save.utils.getByIdOrNotFound import org.springframework.stereotype.Component diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/TestsSourceSnapshotStorage.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/TestsSourceSnapshotStorage.kt index 0230fbedc3..827346844c 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/TestsSourceSnapshotStorage.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/storage/TestsSourceSnapshotStorage.kt @@ -1,18 +1,19 @@ package com.saveourtool.save.backend.storage +import com.saveourtool.common.entities.TestSuitesSource +import com.saveourtool.common.entities.TestsSourceSnapshot +import com.saveourtool.common.request.TestFilesRequest +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.storage.ReactiveStorageWithDatabase +import com.saveourtool.common.test.TestFilesContent +import com.saveourtool.common.test.TestsSourceSnapshotDto +import com.saveourtool.common.utils.* import com.saveourtool.save.backend.configs.ConfigProperties -import com.saveourtool.save.entities.TestSuitesSource -import com.saveourtool.save.entities.TestsSourceSnapshot -import com.saveourtool.save.request.TestFilesRequest -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.storage.ReactiveStorageWithDatabase -import com.saveourtool.save.test.TestFilesContent -import com.saveourtool.save.test.TestsSourceSnapshotDto -import com.saveourtool.save.utils.* -import org.slf4j.Logger +import org.slf4j.Logger import org.springframework.stereotype.Component import reactor.core.publisher.Mono + import java.nio.file.Files import kotlin.io.path.* diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/utils/ReactorUtils.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/utils/ReactorUtils.kt index 49759ad8f6..b45702c097 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/utils/ReactorUtils.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/utils/ReactorUtils.kt @@ -4,8 +4,8 @@ package com.saveourtool.save.backend.utils -import com.saveourtool.save.utils.collectToInputStream -import com.saveourtool.save.utils.switchIfEmptyToNotFound +import com.saveourtool.common.utils.collectToInputStream +import com.saveourtool.common.utils.switchIfEmptyToNotFound import com.fasterxml.jackson.databind.ObjectMapper import org.springframework.http.HttpStatus diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/utils/SpringUtils.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/utils/SpringUtils.kt index 9d230b6726..57bcbd4cb4 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/utils/SpringUtils.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/utils/SpringUtils.kt @@ -4,8 +4,8 @@ package com.saveourtool.save.backend.utils -import com.saveourtool.save.domain.EntitySaveStatus -import com.saveourtool.save.domain.Role +import com.saveourtool.common.domain.EntitySaveStatus +import com.saveourtool.common.domain.Role import org.springframework.http.HttpStatus import org.springframework.http.ResponseEntity import org.springframework.security.core.Authentication diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/DownloadFilesTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/DownloadFilesTest.kt index bc1af82a84..e842219542 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/DownloadFilesTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/DownloadFilesTest.kt @@ -11,16 +11,16 @@ import com.saveourtool.save.backend.utils.mutateMockedUser import com.saveourtool.common.configs.WebConfig import com.saveourtool.save.core.result.DebugInfo import com.saveourtool.save.core.result.Pass -import com.saveourtool.save.domain.* -import com.saveourtool.save.entities.* -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.security.ProjectPermissionEvaluator -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.service.ProjectService -import com.saveourtool.save.service.UserService -import com.saveourtool.save.utils.BlockingBridge -import com.saveourtool.save.utils.CONTENT_LENGTH_CUSTOM -import com.saveourtool.save.utils.collectToInputStream +import com.saveourtool.common.domain.* +import com.saveourtool.common.entities.* +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.security.ProjectPermissionEvaluator +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.service.ProjectService +import com.saveourtool.common.service.UserService +import com.saveourtool.common.utils.BlockingBridge +import com.saveourtool.common.utils.CONTENT_LENGTH_CUSTOM +import com.saveourtool.common.utils.collectToInputStream import com.saveourtool.common.v1 import org.jetbrains.annotations.Blocking @@ -58,7 +58,7 @@ import kotlin.io.path.* @ActiveProfiles("test") @WebFluxTest(controllers = [DownloadFilesController::class, FileController::class, FileInternalController::class]) @Import( - com.saveourtool.common.configs.WebConfig::class, + WebConfig::class, NoopWebSecurityConfig::class, S11nTestConfig::class, ) @@ -141,7 +141,7 @@ class DownloadFilesTest { .thenAnswer { Mono.just(testProject) } webTestClient.get() - .uri("/api/${com.saveourtool.common.v1}/files/download?fileId={fileId}", file1.requiredId()) + .uri("/api/${v1}/files/download?fileId={fileId}", file1.requiredId()) .accept(MediaType.APPLICATION_OCTET_STREAM) .exchange() .expectStatus() @@ -152,7 +152,7 @@ class DownloadFilesTest { } webTestClient.get() - .uri("/api/${com.saveourtool.common.v1}/files/{organizationName}/{projectName}/list", testProject.organization.name, testProject.name) + .uri("/api/${v1}/files/{organizationName}/{projectName}/list", testProject.organization.name, testProject.name) .exchange() .expectStatus() .isOk @@ -168,7 +168,7 @@ class DownloadFilesTest { @Test fun `should return 404 for non-existent files`() { webTestClient.get() - .uri("/api/${com.saveourtool.common.v1}/files/download/invalid-name") + .uri("/api/${v1}/files/download/invalid-name") .exchange() .expectStatus() .isNotFound @@ -200,7 +200,7 @@ class DownloadFilesTest { .build() webTestClient.post() - .uri("/api/${com.saveourtool.common.v1}/files/Huawei/huaweiName/upload") + .uri("/api/${v1}/files/Huawei/huaweiName/upload") .contentType(MediaType.MULTIPART_FORM_DATA) .body(BodyInserters.fromMultipartData(body)) .header(CONTENT_LENGTH_CUSTOM, file.fileSize().toString()) diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/AgentsControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/AgentsControllerTest.kt index 115e79f829..a0794d5dc9 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/AgentsControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/AgentsControllerTest.kt @@ -6,10 +6,10 @@ import com.saveourtool.save.backend.controllers.ProjectController import com.saveourtool.save.backend.repository.AgentRepository import com.saveourtool.save.backend.repository.AgentStatusRepository import com.saveourtool.save.backend.utils.InfraExtension -import com.saveourtool.save.entities.AgentStatus -import com.saveourtool.save.entities.AgentStatusDto -import com.saveourtool.save.entities.AgentStatusDtoList -import com.saveourtool.save.security.ProjectPermissionEvaluator +import com.saveourtool.common.entities.AgentStatus +import com.saveourtool.common.entities.AgentStatusDto +import com.saveourtool.common.entities.AgentStatusDtoList +import com.saveourtool.common.security.ProjectPermissionEvaluator import kotlinx.datetime.LocalDateTime import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Assertions.assertTrue @@ -67,7 +67,7 @@ class AgentsControllerTest { .contentType(MediaType.APPLICATION_JSON) .accept(MediaType.APPLICATION_JSON) .bodyValue( - AgentStatusDto(com.saveourtool.common.agent.AgentState.IDLE, "container-1") + AgentStatusDto(AgentState.IDLE, "container-1") ) .exchange() .expectStatus() @@ -78,7 +78,7 @@ class AgentsControllerTest { @Suppress("TOO_LONG_FUNCTION") fun `check that agent statuses are updated`() { updateAgentStatuses( - AgentStatusDto(com.saveourtool.common.agent.AgentState.IDLE, "container-2") + AgentStatusDto(AgentState.IDLE, "container-2") ) val firstAgentIdle = getLastIdleForSecondContainer() @@ -89,21 +89,21 @@ class AgentsControllerTest { .contentType(MediaType.APPLICATION_JSON) .accept(MediaType.APPLICATION_JSON) .bodyValue( - AgentStatusDto(com.saveourtool.common.agent.AgentState.IDLE, "container-2", LocalDateTime(2020, Month.MAY, 10, 16, 30, 20)) + AgentStatusDto(AgentState.IDLE, "container-2", LocalDateTime(2020, Month.MAY, 10, 16, 30, 20)) ) .exchange() .expectStatus() .isOk updateAgentStatuses( - AgentStatusDto(com.saveourtool.common.agent.AgentState.BUSY, "container-2") + AgentStatusDto(AgentState.BUSY, "container-2") ) assertTrue( transactionTemplate.execute { agentStatusRepository .findAll() - .count { it.state == com.saveourtool.common.agent.AgentState.IDLE && it.agent.containerId == "container-2" } == 1 + .count { it.state == AgentState.IDLE && it.agent.containerId == "container-2" } == 1 }!! ) @@ -127,8 +127,8 @@ class AgentsControllerTest { .consumeWith { val statuses = requireNotNull(it.responseBody) Assertions.assertEquals(2, statuses.size) - Assertions.assertEquals(com.saveourtool.common.agent.AgentState.IDLE, statuses.first().state) - Assertions.assertEquals(com.saveourtool.common.agent.AgentState.BUSY, statuses[1].state) + Assertions.assertEquals(AgentState.IDLE, statuses.first().state) + Assertions.assertEquals(AgentState.BUSY, statuses[1].state) } } @@ -144,8 +144,8 @@ class AgentsControllerTest { .consumeWith { val statuses = requireNotNull(it.responseBody) Assertions.assertEquals(2, statuses.size) - Assertions.assertEquals(com.saveourtool.common.agent.AgentState.IDLE, statuses.first().state) - Assertions.assertEquals(com.saveourtool.common.agent.AgentState.BUSY, statuses[1].state) + Assertions.assertEquals(AgentState.IDLE, statuses.first().state) + Assertions.assertEquals(AgentState.BUSY, statuses[1].state) } } @@ -166,7 +166,7 @@ class AgentsControllerTest { entityManager.createNativeQuery("select * from agent_status", AgentStatus::class.java) .resultList .first { - (it as AgentStatus).state == com.saveourtool.common.agent.AgentState.IDLE && it.agent.containerId == "container-2" + (it as AgentStatus).state == AgentState.IDLE && it.agent.containerId == "container-2" } as AgentStatus }!! diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/DeleteEntitiesTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/DeleteEntitiesTest.kt index 93be73f78f..07b4520306 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/DeleteEntitiesTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/DeleteEntitiesTest.kt @@ -7,14 +7,14 @@ import com.saveourtool.save.backend.repository.ExecutionRepository import com.saveourtool.save.backend.repository.TestExecutionRepository import com.saveourtool.save.backend.utils.InfraExtension import com.saveourtool.save.backend.utils.postJsonAndAssert -import com.saveourtool.save.entities.Execution -import com.saveourtool.save.entities.Organization -import com.saveourtool.save.entities.OrganizationStatus -import com.saveourtool.save.entities.Project -import com.saveourtool.save.repository.OrganizationRepository -import com.saveourtool.save.repository.ProjectRepository -import com.saveourtool.save.security.ProjectPermissionEvaluator -import com.saveourtool.save.utils.DATABASE_DELIMITER +import com.saveourtool.common.entities.Execution +import com.saveourtool.common.entities.Organization +import com.saveourtool.common.entities.OrganizationStatus +import com.saveourtool.common.entities.Project +import com.saveourtool.common.repository.OrganizationRepository +import com.saveourtool.common.repository.ProjectRepository +import com.saveourtool.common.security.ProjectPermissionEvaluator +import com.saveourtool.common.utils.DATABASE_DELIMITER import com.saveourtool.common.v1 import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test @@ -142,14 +142,14 @@ class DeleteEntitiesTest { private fun deleteExecutionsAndAssert(executionIds: List, assert: ResponseSpec.() -> Unit) { webClient.postJsonAndAssert( - uri = "/api/${com.saveourtool.common.v1}/execution/delete?executionIds=${executionIds.joinToString(DATABASE_DELIMITER)}", + uri = "/api/${v1}/execution/delete?executionIds=${executionIds.joinToString(DATABASE_DELIMITER)}", assert = assert ) } private fun deleteAllExecutionsAndAssert(name: String, organizationName: String, assert: ResponseSpec.() -> Unit) { webClient.postJsonAndAssert( - uri = "/api/${com.saveourtool.common.v1}/execution/delete-all-except-contest?name=$name&organizationName=$organizationName", + uri = "/api/${v1}/execution/delete-all-except-contest?name=$name&organizationName=$organizationName", assert = assert ) } diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/ExecutionControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/ExecutionControllerTest.kt index cac99105ed..f8e1434524 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/ExecutionControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/ExecutionControllerTest.kt @@ -6,13 +6,13 @@ import com.saveourtool.save.backend.repository.* import com.saveourtool.save.backend.service.LnkContestExecutionService import com.saveourtool.save.backend.utils.InfraExtension import com.saveourtool.save.backend.utils.mutateMockedUser -import com.saveourtool.save.execution.ExecutionDto -import com.saveourtool.save.execution.ExecutionStatus -import com.saveourtool.save.execution.ExecutionUpdateDto -import com.saveourtool.save.execution.TestingType -import com.saveourtool.save.repository.ProjectRepository -import com.saveourtool.save.utils.debug -import com.saveourtool.save.utils.getLogger +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.execution.ExecutionStatus +import com.saveourtool.common.execution.ExecutionUpdateDto +import com.saveourtool.common.execution.TestingType +import com.saveourtool.common.repository.ProjectRepository +import com.saveourtool.common.utils.debug +import com.saveourtool.common.utils.getLogger import com.saveourtool.common.v1 import org.junit.jupiter.api.Assertions.* @@ -90,7 +90,7 @@ class ExecutionControllerTest { mutateMockedUser(id = 99) webClient.get() - .uri("/api/${com.saveourtool.common.v1}/executionDto?executionId=1") + .uri("/api/${v1}/executionDto?executionId=1") .exchange() .expectStatus() .isOk @@ -109,7 +109,7 @@ class ExecutionControllerTest { val project = projectRepository.findById(1).get() val executionCounts = executionRepository.findAll().count { it.project.id == project.id } webClient.post() - .uri("/api/${com.saveourtool.common.v1}/executionDtoList?projectName=${project.name}&organizationName=${project.organization.name}") + .uri("/api/${v1}/executionDtoList?projectName=${project.name}&organizationName=${project.organization.name}") .exchange() .expectStatus() .isOk diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/JpaSpecificationTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/JpaSpecificationTest.kt index 8fbb67a8e9..1781ba706f 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/JpaSpecificationTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/JpaSpecificationTest.kt @@ -4,7 +4,7 @@ import com.saveourtool.common.agent.AgentState import com.saveourtool.save.backend.configs.ApplicationConfiguration import com.saveourtool.save.backend.repository.AgentStatusRepository import com.saveourtool.save.backend.utils.InfraExtension -import com.saveourtool.save.utils.BlockingBridge +import com.saveourtool.common.utils.BlockingBridge import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -33,7 +33,7 @@ class JpaSpecificationTest { val agentStatusToList = agentStatusRepository.findOne { root, _, cb -> cb.and( cb.equal(root.get("id"), 4), - cb.equal(root.get("state"), com.saveourtool.common.agent.AgentState.FINISHED) + cb.equal(root.get("state"), com.saveourtool.common.agent.AgentState.FINISHED) ) }.get() diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/LnkUserOrganizationControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/LnkUserOrganizationControllerTest.kt index e80f5b5feb..d3c19208c4 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/LnkUserOrganizationControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/LnkUserOrganizationControllerTest.kt @@ -4,16 +4,16 @@ import com.saveourtool.save.authservice.config.WebSecurityConfig import com.saveourtool.save.backend.controllers.LnkUserOrganizationController import com.saveourtool.save.backend.service.* import com.saveourtool.save.backend.utils.mutateMockedUser -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.* -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.permission.SetRoleRequest -import com.saveourtool.save.repository.OriginalLoginRepository -import com.saveourtool.save.repository.UserRepository -import com.saveourtool.save.security.OrganizationPermissionEvaluator -import com.saveourtool.save.service.LnkUserOrganizationService -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.utils.BlockingBridge +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.* +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.permission.SetRoleRequest +import com.saveourtool.common.repository.OriginalLoginRepository +import com.saveourtool.common.repository.UserRepository +import com.saveourtool.common.security.OrganizationPermissionEvaluator +import com.saveourtool.common.service.LnkUserOrganizationService +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.utils.BlockingBridge import com.saveourtool.common.v1 import org.junit.jupiter.api.Test import org.mockito.invocation.InvocationOnMock @@ -69,7 +69,7 @@ class LnkUserOrganizationControllerTest { ) given(organizationPermissionEvaluator.canChangeRoles(any(), any(), any(), any())).willReturn(true) webTestClient.post() - .uri("/api/${com.saveourtool.common.v1}/organizations/Huawei/users/roles") + .uri("/api/${v1}/organizations/Huawei/users/roles") .bodyValue(SetRoleRequest("admin", Role.ADMIN)) .exchange() .expectStatus() @@ -88,7 +88,7 @@ class LnkUserOrganizationControllerTest { ) webTestClient.post() - .uri("/api/${com.saveourtool.common.v1}/organizations/Huawei/users/roles") + .uri("/api/${v1}/organizations/Huawei/users/roles") .bodyValue(SetRoleRequest("admin", Role.ADMIN)) .exchange() .expectStatus() @@ -106,7 +106,7 @@ class LnkUserOrganizationControllerTest { organizationRole = Role.VIEWER, ) webTestClient.delete() - .uri("/api/${com.saveourtool.common.v1}/organizations/Huawei/users/roles/user") + .uri("/api/${v1}/organizations/Huawei/users/roles/user") .exchange() .expectStatus() .isForbidden @@ -125,7 +125,7 @@ class LnkUserOrganizationControllerTest { given(organizationPermissionEvaluator.canChangeRoles(any(), any(), any(), any())).willReturn(true) webTestClient.delete() - .uri("/api/${com.saveourtool.common.v1}/organizations/Huawei/users/roles/user") + .uri("/api/${v1}/organizations/Huawei/users/roles/user") .exchange() .expectStatus() .isOk diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/OrganizationControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/OrganizationControllerTest.kt index beeff1285b..4093fda701 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/OrganizationControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/OrganizationControllerTest.kt @@ -8,20 +8,20 @@ import com.saveourtool.save.backend.S11nTestConfig import com.saveourtool.save.backend.storage.TestsSourceSnapshotStorage import com.saveourtool.save.backend.utils.mutateMockedUser import com.saveourtool.common.configs.WebConfig -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.* -import com.saveourtool.save.repository.* -import com.saveourtool.save.security.OrganizationPermissionEvaluator -import com.saveourtool.save.security.ProjectPermissionEvaluator -import com.saveourtool.save.service.* -import com.saveourtool.save.storage.AvatarStorage +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.* +import com.saveourtool.common.repository.* +import com.saveourtool.common.security.OrganizationPermissionEvaluator +import com.saveourtool.common.security.ProjectPermissionEvaluator +import com.saveourtool.common.service.* +import com.saveourtool.common.storage.AvatarStorage import com.saveourtool.save.testutils.checkQueues import com.saveourtool.save.testutils.cleanup import com.saveourtool.save.testutils.createMockWebServer import com.saveourtool.save.testutils.enqueue -import com.saveourtool.save.utils.BlockingBridge -import com.saveourtool.save.utils.getLogger -import com.saveourtool.save.utils.info +import com.saveourtool.common.utils.BlockingBridge +import com.saveourtool.common.utils.getLogger +import com.saveourtool.common.utils.info import com.saveourtool.common.v1 import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.MockWebServer @@ -60,7 +60,7 @@ import java.util.concurrent.TimeUnit GitService::class, TestSuitesSourceService::class, TestSuitesService::class, - com.saveourtool.common.configs.WebConfig::class, + WebConfig::class, ProjectPermissionEvaluator::class, LnkUserProjectService::class, UserService::class, @@ -138,7 +138,7 @@ class OrganizationControllerTest { fun `delete organization with owner permission`() { mutateMockedUserAndLink(organization, adminUser, Role.OWNER) webClient.post() - .uri("/api/${com.saveourtool.common.v1}/organizations/${organization.name}/change-status?status=${OrganizationStatus.DELETED}") + .uri("/api/${v1}/organizations/${organization.name}/change-status?status=${OrganizationStatus.DELETED}") .exchange() .expectStatus() .isOk @@ -149,7 +149,7 @@ class OrganizationControllerTest { fun `ban organization with super-admin permission`() { mutateMockedUserAndLink(organization, johnDoeUser, Role.SUPER_ADMIN) webClient.post() - .uri("/api/${com.saveourtool.common.v1}/organizations/${organization.name}/change-status?status=${OrganizationStatus.BANNED}") + .uri("/api/${v1}/organizations/${organization.name}/change-status?status=${OrganizationStatus.BANNED}") .exchange() .expectStatus() .isOk @@ -160,7 +160,7 @@ class OrganizationControllerTest { fun `delete organization without owner permission`() { mutateMockedUserAndLink(organization, johnDoeUser, Role.VIEWER) webClient.post() - .uri("/api/${com.saveourtool.common.v1}/organizations/${organization.name}/change-status?status=${OrganizationStatus.DELETED}") + .uri("/api/${v1}/organizations/${organization.name}/change-status?status=${OrganizationStatus.DELETED}") .exchange() .expectStatus() .isForbidden @@ -175,7 +175,7 @@ class OrganizationControllerTest { val git2 = Git("url2", null, null, organization) given(gitRepository.findAllByOrganizationId(organization.requiredId())).willReturn(listOf(git1, git2)) webClient.get() - .uri("/api/${com.saveourtool.common.v1}/organizations/${organization.name}/list-git") + .uri("/api/${v1}/organizations/${organization.name}/list-git") .exchange() .also { it.expectBodyList(GitDto::class.java) @@ -195,7 +195,7 @@ class OrganizationControllerTest { val assertionsToCreate = mockGitCheckConnectivity(true) val gitDtoToCreate = GitDto("url") webClient.post() - .uri("/api/${com.saveourtool.common.v1}/organizations/${organization.name}/create-git") + .uri("/api/${v1}/organizations/${organization.name}/create-git") .bodyValue(gitDtoToCreate) .exchange() .expectStatus() @@ -214,7 +214,7 @@ class OrganizationControllerTest { val assertionsToCreate = mockGitCheckConnectivity(false) val gitDtoToCreate = GitDto("invalid-url") webClient.post() - .uri("/api/${com.saveourtool.common.v1}/organizations/${organization.name}/create-git") + .uri("/api/${v1}/organizations/${organization.name}/create-git") .bodyValue(gitDtoToCreate) .exchange() .expectStatus() @@ -235,7 +235,7 @@ class OrganizationControllerTest { ) doReturn(gitExisted).whenever(gitRepository).findByOrganizationAndUrl(organization, gitExisted.url) webClient.post() - .uri("/api/${com.saveourtool.common.v1}/organizations/${organization.name}/create-git") + .uri("/api/${v1}/organizations/${organization.name}/create-git") .bodyValue(gitExisted.toDto()) .exchange() .expectStatus() @@ -264,7 +264,7 @@ class OrganizationControllerTest { ) doReturn(gitExisted).whenever(gitRepository).findByOrganizationAndUrl(organization, gitExisted.url) webClient.post() - .uri("/api/${com.saveourtool.common.v1}/organizations/${organization.name}/update-git") + .uri("/api/${v1}/organizations/${organization.name}/update-git") .bodyValue(gitDtoToUpdate) .exchange() .expectStatus() @@ -286,7 +286,7 @@ class OrganizationControllerTest { ) given(gitRepository.findByOrganizationAndUrl(organization, gitExisted.url)).willReturn(gitExisted) webClient.delete() - .uri("/api/${com.saveourtool.common.v1}/organizations/${organization.name}/delete-git?url=${gitExisted.url}") + .uri("/api/${v1}/organizations/${organization.name}/delete-git?url=${gitExisted.url}") .exchange() .expectStatus() .isOk diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/PermissionControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/PermissionControllerTest.kt index e1a294ea22..3364d2724d 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/PermissionControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/PermissionControllerTest.kt @@ -4,20 +4,20 @@ import com.saveourtool.save.authservice.config.WebSecurityConfig import com.saveourtool.save.backend.controllers.PermissionController import com.saveourtool.save.backend.service.* import com.saveourtool.save.backend.utils.mutateMockedUser -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.* -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.permission.SetRoleRequest -import com.saveourtool.save.repository.OrganizationRepository -import com.saveourtool.save.repository.OriginalLoginRepository -import com.saveourtool.save.repository.UserRepository -import com.saveourtool.save.security.OrganizationPermissionEvaluator -import com.saveourtool.save.security.ProjectPermissionEvaluator -import com.saveourtool.save.service.LnkUserOrganizationService -import com.saveourtool.save.service.LnkUserProjectService -import com.saveourtool.save.service.OrganizationService -import com.saveourtool.save.service.ProjectService -import com.saveourtool.save.utils.BlockingBridge +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.* +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.permission.SetRoleRequest +import com.saveourtool.common.repository.OrganizationRepository +import com.saveourtool.common.repository.OriginalLoginRepository +import com.saveourtool.common.repository.UserRepository +import com.saveourtool.common.security.OrganizationPermissionEvaluator +import com.saveourtool.common.security.ProjectPermissionEvaluator +import com.saveourtool.common.service.LnkUserOrganizationService +import com.saveourtool.common.service.LnkUserProjectService +import com.saveourtool.common.service.OrganizationService +import com.saveourtool.common.service.ProjectService +import com.saveourtool.common.utils.BlockingBridge import com.saveourtool.common.v1 import org.junit.jupiter.api.Test import org.mockito.invocation.InvocationOnMock @@ -72,7 +72,7 @@ class PermissionControllerTest { given(permissionService.getRole(any(), any())).willReturn(Role.ADMIN) webTestClient.get() - .uri("/api/${com.saveourtool.common.v1}/projects/Huawei/huaweiName/users/roles?userName=admin") + .uri("/api/${v1}/projects/Huawei/huaweiName/users/roles?userName=admin") .exchange() .expectStatus() .isOk @@ -92,7 +92,7 @@ class PermissionControllerTest { ) webTestClient.get() - .uri("/api/${com.saveourtool.common.v1}/projects/Huawei/huaweiName/users/roles?userName=admin") + .uri("/api/${v1}/projects/Huawei/huaweiName/users/roles?userName=admin") .exchange() .expectStatus() .isNotFound @@ -136,7 +136,7 @@ class PermissionControllerTest { given(organizationRepository.findByName(any())).willReturn(Organization.stub(null).apply { name = "Example Org" }) webTestClient.post() - .uri("/api/${com.saveourtool.common.v1}/projects/Huawei/huaweiName/users/roles") + .uri("/api/${v1}/projects/Huawei/huaweiName/users/roles") .bodyValue(SetRoleRequest("admin", Role.ADMIN)) .exchange() .expectStatus() @@ -156,7 +156,7 @@ class PermissionControllerTest { given(organizationRepository.findByName(any())).willReturn(Organization.stub(null).apply { name = "Example Org" }) webTestClient.post() - .uri("/api/${com.saveourtool.common.v1}/projects/Huawei/huaweiName/users/roles") + .uri("/api/${v1}/projects/Huawei/huaweiName/users/roles") .bodyValue(SetRoleRequest("admin", Role.ADMIN)) .exchange() .expectStatus() @@ -174,7 +174,7 @@ class PermissionControllerTest { permission = null, ) webTestClient.delete() - .uri("/api/${com.saveourtool.common.v1}/projects/Huawei/huaweiName/users/roles/user") + .uri("/api/${v1}/projects/Huawei/huaweiName/users/roles/user") .exchange() .expectStatus() .isNotFound @@ -195,7 +195,7 @@ class PermissionControllerTest { given(projectPermissionEvaluator.canChangeRoles(any(), any(), any(), any())).willReturn(true) given(permissionService.removeRole(any(), any(), any())).willReturn(Mono.just(Unit)) webTestClient.delete() - .uri("/api/${com.saveourtool.common.v1}/projects/Huawei/huaweiName/users/roles/user") + .uri("/api/${v1}/projects/Huawei/huaweiName/users/roles/user") .exchange() .expectStatus() .isOk @@ -214,7 +214,7 @@ class PermissionControllerTest { given(organizationPermissionEvaluator.canChangeRoles(any(), any(), any(), any())).willReturn(false) given(permissionService.removeRole(any(), any(), any())).willReturn(Mono.just(Unit)) webTestClient.delete() - .uri("/api/${com.saveourtool.common.v1}/projects/Huawei/huaweiName/users/roles/user") + .uri("/api/${v1}/projects/Huawei/huaweiName/users/roles/user") .exchange() .expectStatus() .isForbidden diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/ProjectControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/ProjectControllerTest.kt index e5e6033646..8c753139f1 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/ProjectControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/ProjectControllerTest.kt @@ -3,12 +3,12 @@ package com.saveourtool.save.backend.controller import com.saveourtool.save.backend.SaveApplication import com.saveourtool.save.backend.utils.InfraExtension import com.saveourtool.save.backend.utils.mutateMockedUser -import com.saveourtool.save.entities.* -import com.saveourtool.save.filters.ProjectFilter -import com.saveourtool.save.repository.OrganizationRepository -import com.saveourtool.save.repository.ProjectRepository -import com.saveourtool.save.service.LnkUserProjectService -import com.saveourtool.save.service.UserService +import com.saveourtool.common.entities.* +import com.saveourtool.common.filters.ProjectFilter +import com.saveourtool.common.repository.OrganizationRepository +import com.saveourtool.common.repository.ProjectRepository +import com.saveourtool.common.service.LnkUserProjectService +import com.saveourtool.common.service.UserService import com.saveourtool.common.v1 import org.junit.jupiter.api.Assertions @@ -53,7 +53,7 @@ class ProjectControllerTest { webClient .post() - .uri("/api/${com.saveourtool.common.v1}/projects/by-filters") + .uri("/api/${v1}/projects/by-filters") .accept(MediaType.APPLICATION_JSON) .bodyValue(ProjectFilter.created) .exchange() @@ -118,7 +118,7 @@ class ProjectControllerTest { projectRepository.save(project) webClient.post() - .uri("/api/${com.saveourtool.common.v1}/projects/${organization.name}/${project.name}/change-status?status=${ProjectStatus.DELETED}") + .uri("/api/${v1}/projects/${organization.name}/${project.name}/change-status?status=${ProjectStatus.DELETED}") .exchange() .expectStatus() .isOk @@ -145,7 +145,7 @@ class ProjectControllerTest { projectRepository.save(project) webClient.post() - .uri("/api/${com.saveourtool.common.v1}/projects/${organization.name}/${project.name}/change-status?status=${ProjectStatus.BANNED}") + .uri("/api/${v1}/projects/${organization.name}/${project.name}/change-status?status=${ProjectStatus.BANNED}") .exchange() .expectStatus() .isOk @@ -172,7 +172,7 @@ class ProjectControllerTest { projectRepository.save(project) webClient.post() - .uri("/api/${com.saveourtool.common.v1}/projects/${organization.name}/${project.name}/change-status?status=${ProjectStatus.DELETED}") + .uri("/api/${v1}/projects/${organization.name}/${project.name}/change-status?status=${ProjectStatus.DELETED}") .exchange() .expectStatus() .isForbidden @@ -222,7 +222,7 @@ class ProjectControllerTest { given(userDetailsService.getUserByName(any())).willReturn(mockUser(3)) webClient.post() - .uri("/api/${com.saveourtool.common.v1}/projects/update") + .uri("/api/${v1}/projects/update") .bodyValue(project.toDto()) .exchange() .expectStatus() @@ -235,7 +235,7 @@ class ProjectControllerTest { assertion: WebTestClient.ResponseSpec.() -> Unit ) = webClient .get() - .uri("/api/${com.saveourtool.common.v1}/projects/get/organization-name?name=$name&organizationName=$organizationName") + .uri("/api/${v1}/projects/get/organization-name?name=$name&organizationName=$organizationName") .accept(MediaType.APPLICATION_JSON) .exchange() .let { assertion(it) } @@ -247,7 +247,7 @@ class ProjectControllerTest { ) { webClient .post() - .uri("/api/${com.saveourtool.common.v1}/projects/save") + .uri("/api/${v1}/projects/save") .body(BodyInserters.fromValue(newProject.toDto())) .accept(MediaType.APPLICATION_JSON) .exchange() @@ -255,7 +255,7 @@ class ProjectControllerTest { webClient .get() - .uri("/api/${com.saveourtool.common.v1}/projects/get/organization-name?name=${newProject.name}&organizationName=${newProject.organization.name}") + .uri("/api/${v1}/projects/get/organization-name?name=${newProject.name}&organizationName=${newProject.organization.name}") .accept(MediaType.APPLICATION_JSON) .exchange() .let { getAssertion(it) } diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestExecutionControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestExecutionControllerTest.kt index 2c60197f55..64e54de9a7 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestExecutionControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestExecutionControllerTest.kt @@ -13,8 +13,8 @@ import com.saveourtool.save.backend.storage.DebugInfoStorage import com.saveourtool.save.backend.storage.ExecutionInfoStorage import com.saveourtool.save.backend.utils.InfraExtension import com.saveourtool.save.backend.utils.mutateMockedUser -import com.saveourtool.save.domain.TestResultStatus -import com.saveourtool.save.utils.secondsToJLocalDateTime +import com.saveourtool.common.domain.TestResultStatus +import com.saveourtool.common.utils.secondsToJLocalDateTime import com.saveourtool.common.v1 import org.junit.jupiter.api.Assertions.assertEquals @@ -81,7 +81,7 @@ class TestExecutionControllerTest { mutateMockedUser(id = 99) webClient.get() - .uri("/api/${com.saveourtool.common.v1}/testExecution/count?executionId=1") + .uri("/api/${v1}/testExecution/count?executionId=1") .exchange() .expectBody() .isEqualTo(28) @@ -94,7 +94,7 @@ class TestExecutionControllerTest { val expectedExecutionCount = 20 webClient.post() - .uri("/api/${com.saveourtool.common.v1}/test-executions?executionId=1&page=0&size=$expectedExecutionCount") + .uri("/api/${v1}/test-executions?executionId=1&page=0&size=$expectedExecutionCount") .exchange() .expectBody>() .consumeWith { @@ -108,7 +108,7 @@ class TestExecutionControllerTest { mutateMockedUser(id = 99) webClient.get() - .uri("/api/${com.saveourtool.common.v1}/testLatestExecutions?executionId=3&status=${TestResultStatus.PASSED}&page=0&size=10") + .uri("/api/${v1}/testLatestExecutions?executionId=3&status=${TestResultStatus.PASSED}&page=0&size=10") .exchange() .expectBody>() .consumeWith { @@ -125,7 +125,7 @@ class TestExecutionControllerTest { @WithMockUser @Suppress("UnsafeCallOnNullableType", "TOO_LONG_FUNCTION") fun `should save TestExecutionDto into the DB`() { - val testExecutionDtoFirst = com.saveourtool.common.agent.TestExecutionResult( + val testExecutionDtoFirst = TestExecutionResult( "testPath29", "WarnPlugin", "container-3", @@ -138,7 +138,7 @@ class TestExecutionControllerTest { expected = 0, unexpected = 0, ) - val testExecutionDtoSecond = com.saveourtool.common.agent.TestExecutionResult( + val testExecutionDtoSecond = TestExecutionResult( "testPath30", "WarnPlugin", "container-3", @@ -184,7 +184,7 @@ class TestExecutionControllerTest { @Test @WithMockUser fun `should not save data if provided fields are invalid`() { - val testExecutionDto = com.saveourtool.common.agent.TestExecutionResult( + val testExecutionDto = TestExecutionResult( "test-not-exists", "WarnPlugin", "container-1", @@ -217,7 +217,7 @@ class TestExecutionControllerTest { webClient.post() .uri("/internal/saveTestResult") .contentType(MediaType.APPLICATION_JSON) - .body(BodyInserters.fromValue(emptyList())) + .body(BodyInserters.fromValue(emptyList())) .exchange() .expectStatus() .isEqualTo(HttpStatus.BAD_REQUEST) diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestInitializeControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestInitializeControllerTest.kt index c1578d3787..04d0f7a2f3 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestInitializeControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestInitializeControllerTest.kt @@ -6,9 +6,9 @@ import com.saveourtool.save.backend.controllers.ProjectController import com.saveourtool.save.backend.repository.TestRepository import com.saveourtool.save.backend.repository.TestSuiteRepository import com.saveourtool.save.backend.utils.InfraExtension -import com.saveourtool.save.test.TestDto -import com.saveourtool.save.utils.debug -import com.saveourtool.save.utils.getLogger +import com.saveourtool.common.test.TestDto +import com.saveourtool.common.utils.debug +import com.saveourtool.common.utils.getLogger import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertNotNull diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestSuitesControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestSuitesControllerTest.kt index 1aed1d8fd5..f53640a8e2 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestSuitesControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/TestSuitesControllerTest.kt @@ -4,8 +4,8 @@ import com.saveourtool.save.backend.SaveApplication import com.saveourtool.save.backend.controllers.ProjectController import com.saveourtool.save.backend.repository.* import com.saveourtool.save.backend.utils.InfraExtension -import com.saveourtool.save.entities.TestSuite -import com.saveourtool.save.testsuite.TestSuiteDto +import com.saveourtool.common.entities.TestSuite +import com.saveourtool.common.testsuite.TestSuiteDto import com.saveourtool.save.testutils.checkQueues import com.saveourtool.save.testutils.cleanup import com.saveourtool.save.testutils.createMockWebServer diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/UsersControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/UsersControllerTest.kt index 1438bbbb6b..e0f20f67b2 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/UsersControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/UsersControllerTest.kt @@ -2,7 +2,7 @@ package com.saveourtool.save.backend.controller import com.saveourtool.save.backend.SaveApplication import com.saveourtool.save.backend.utils.InfraExtension -import com.saveourtool.save.info.UserInfo +import com.saveourtool.common.info.UserInfo import com.saveourtool.common.v1 import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test @@ -33,7 +33,7 @@ class UsersControllerTest { .isOk webTestClient.get() - .uri("/api/${com.saveourtool.common.v1}/users/admin") + .uri("/api/${v1}/users/admin") .exchange() .expectStatus() .isOk diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/UsersDetailsControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/UsersDetailsControllerTest.kt index 8f115b7356..0f0535ad5c 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/UsersDetailsControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controller/UsersDetailsControllerTest.kt @@ -3,12 +3,12 @@ package com.saveourtool.save.backend.controller import com.saveourtool.save.backend.SaveApplication import com.saveourtool.save.backend.utils.InfraExtension import com.saveourtool.save.backend.utils.mutateMockedUser -import com.saveourtool.save.info.UserInfo +import com.saveourtool.common.info.UserInfo import com.saveourtool.save.testutils.checkQueues import com.saveourtool.save.testutils.cleanup import com.saveourtool.save.testutils.createMockWebServer import com.saveourtool.save.testutils.enqueue -import com.saveourtool.save.utils.getLogger +import com.saveourtool.common.utils.getLogger import com.saveourtool.common.v1 import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.MockWebServer @@ -48,7 +48,7 @@ class UsersDetailsControllerTest { ) webClient.post() - .uri("/api/${com.saveourtool.common.v1}/users/save") + .uri("/api/${v1}/users/save") .bodyValue(newUserInfo) .exchange() .expectStatus() @@ -68,7 +68,7 @@ class UsersDetailsControllerTest { val assertions = mockGatewayUserUpdate() webClient.post() - .uri("/api/${com.saveourtool.common.v1}/users/save") + .uri("/api/${v1}/users/save") .bodyValue(newUserInfo) .exchange() .expectStatus() @@ -90,7 +90,7 @@ class UsersDetailsControllerTest { val assertions = mockGatewayUserUpdate() webClient.post() - .uri("/api/${com.saveourtool.common.v1}/users/save") + .uri("/api/${v1}/users/save") .bodyValue(newUserInfo) .exchange() .expectStatus() @@ -111,7 +111,7 @@ class UsersDetailsControllerTest { val assertions = mockGatewayUserUpdate() webClient.post() - .uri("/api/${com.saveourtool.common.v1}/users/save") + .uri("/api/${v1}/users/save") .bodyValue(newUserInfo) .exchange() .expectStatus() @@ -131,7 +131,7 @@ class UsersDetailsControllerTest { ) webClient.post() - .uri("/api/${com.saveourtool.common.v1}/users/save") + .uri("/api/${v1}/users/save") .bodyValue(newUserInfo) .exchange() .expectStatus() diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controllers/RunExecutionControllerTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controllers/RunExecutionControllerTest.kt index 7602761bea..b6e5dfa585 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/controllers/RunExecutionControllerTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/controllers/RunExecutionControllerTest.kt @@ -5,15 +5,15 @@ import com.saveourtool.save.backend.configs.ConfigProperties import com.saveourtool.save.backend.repository.* import com.saveourtool.save.backend.utils.InfraExtension import com.saveourtool.save.backend.utils.mutateMockedUser -import com.saveourtool.save.domain.Jdk -import com.saveourtool.save.request.CreateExecutionRequest -import com.saveourtool.save.execution.TestingType -import com.saveourtool.save.repository.ProjectRepository +import com.saveourtool.common.domain.Jdk +import com.saveourtool.common.request.CreateExecutionRequest +import com.saveourtool.common.execution.TestingType +import com.saveourtool.common.repository.ProjectRepository import com.saveourtool.save.testutils.checkQueues import com.saveourtool.save.testutils.cleanup import com.saveourtool.save.testutils.createMockWebServer import com.saveourtool.save.testutils.enqueue -import com.saveourtool.save.utils.getLogger +import com.saveourtool.common.utils.getLogger import com.saveourtool.common.v1 import io.micrometer.core.instrument.composite.CompositeMeterRegistry import okhttp3.mockwebserver.MockResponse @@ -84,7 +84,7 @@ class RunExecutionControllerTest( } val executionId = webClient.post() - .uri("/api/${com.saveourtool.common.v1}/run/trigger?testingType={testingType}", TestingType.PRIVATE_TESTS.name) + .uri("/api/${v1}/run/trigger?testingType={testingType}", TestingType.PRIVATE_TESTS.name) .bodyValue(request) .exchange() .expectStatus() @@ -150,7 +150,7 @@ class RunExecutionControllerTest( val testSuiteId = 11L val originalExecution = executionRepository.findById(EXECUTION_ID).get() val executionId = webClient.post() - .uri("/api/${com.saveourtool.common.v1}/run/re-trigger?executionId=$EXECUTION_ID") + .uri("/api/${v1}/run/re-trigger?executionId=$EXECUTION_ID") .exchange() .expectStatus() .isAccepted diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/security/OrganizationPermissionEvaluatorTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/security/OrganizationPermissionEvaluatorTest.kt index 6bd1a4f302..3a0278f707 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/security/OrganizationPermissionEvaluatorTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/security/OrganizationPermissionEvaluatorTest.kt @@ -1,15 +1,15 @@ package com.saveourtool.save.backend.security import com.saveourtool.save.authservice.utils.SaveUserDetails -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.* -import com.saveourtool.save.info.UserStatus -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.repository.LnkUserOrganizationRepository -import com.saveourtool.save.repository.UserRepository -import com.saveourtool.save.security.OrganizationPermissionEvaluator -import com.saveourtool.save.service.LnkUserOrganizationService -import com.saveourtool.save.service.UserService +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.* +import com.saveourtool.common.info.UserStatus +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.repository.LnkUserOrganizationRepository +import com.saveourtool.common.repository.UserRepository +import com.saveourtool.common.security.OrganizationPermissionEvaluator +import com.saveourtool.common.service.LnkUserOrganizationService +import com.saveourtool.common.service.UserService import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.BeforeEach diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/security/ProjectPermissionEvaluatorTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/security/ProjectPermissionEvaluatorTest.kt index 9aaae87189..9ffa48f453 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/security/ProjectPermissionEvaluatorTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/security/ProjectPermissionEvaluatorTest.kt @@ -1,18 +1,18 @@ package com.saveourtool.save.backend.security import com.saveourtool.save.authservice.utils.SaveUserDetails -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.LnkUserProject -import com.saveourtool.save.entities.Project -import com.saveourtool.save.entities.User -import com.saveourtool.save.info.UserStatus -import com.saveourtool.save.permission.Permission -import com.saveourtool.save.repository.LnkUserProjectRepository -import com.saveourtool.save.repository.UserRepository -import com.saveourtool.save.security.ProjectPermissionEvaluator -import com.saveourtool.save.service.LnkUserOrganizationService -import com.saveourtool.save.service.LnkUserProjectService -import com.saveourtool.save.service.UserService +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.LnkUserProject +import com.saveourtool.common.entities.Project +import com.saveourtool.common.entities.User +import com.saveourtool.common.info.UserStatus +import com.saveourtool.common.permission.Permission +import com.saveourtool.common.repository.LnkUserProjectRepository +import com.saveourtool.common.repository.UserRepository +import com.saveourtool.common.security.ProjectPermissionEvaluator +import com.saveourtool.common.service.LnkUserOrganizationService +import com.saveourtool.common.service.LnkUserProjectService +import com.saveourtool.common.service.UserService import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.BeforeEach diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/service/LnkContestProjectServiceTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/service/LnkContestProjectServiceTest.kt index 471bf6a91b..ce00ea257d 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/service/LnkContestProjectServiceTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/service/LnkContestProjectServiceTest.kt @@ -1,11 +1,11 @@ package com.saveourtool.save.backend.service import com.saveourtool.save.backend.repository.LnkContestProjectRepository -import com.saveourtool.save.entities.Contest -import com.saveourtool.save.entities.Execution -import com.saveourtool.save.entities.LnkContestProject -import com.saveourtool.save.entities.Project -import com.saveourtool.save.service.ProjectService +import com.saveourtool.common.entities.Contest +import com.saveourtool.common.entities.Execution +import com.saveourtool.common.entities.LnkContestProject +import com.saveourtool.common.entities.Project +import com.saveourtool.common.service.ProjectService import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith import org.mockito.kotlin.* diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/service/PermissionServiceTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/service/PermissionServiceTest.kt index b4a579b3bc..6dc358d228 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/service/PermissionServiceTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/service/PermissionServiceTest.kt @@ -1,12 +1,12 @@ package com.saveourtool.save.backend.service -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.Project -import com.saveourtool.save.entities.User -import com.saveourtool.save.permission.SetRoleRequest -import com.saveourtool.save.repository.UserRepository -import com.saveourtool.save.service.LnkUserProjectService -import com.saveourtool.save.service.ProjectService +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.Project +import com.saveourtool.common.entities.User +import com.saveourtool.common.permission.SetRoleRequest +import com.saveourtool.common.repository.UserRepository +import com.saveourtool.common.service.LnkUserProjectService +import com.saveourtool.common.service.ProjectService import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/backend/utils/SecurityTestingUtils.kt b/save-backend/src/test/kotlin/com/saveourtool/save/backend/utils/SecurityTestingUtils.kt index 70f22b8cb0..84257ae20c 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/backend/utils/SecurityTestingUtils.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/backend/utils/SecurityTestingUtils.kt @@ -5,7 +5,7 @@ package com.saveourtool.save.backend.utils import com.saveourtool.save.authservice.utils.SaveUserDetails -import com.saveourtool.save.info.UserStatus +import com.saveourtool.common.info.UserStatus import org.springframework.security.authentication.UsernamePasswordAuthenticationToken import org.springframework.security.core.context.SecurityContextHolder diff --git a/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/Main.kt b/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/Main.kt index 25a8d152d4..150c75f5bb 100644 --- a/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/Main.kt +++ b/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/Main.kt @@ -4,9 +4,9 @@ package com.saveourtool.save.demo.agent +import com.saveourtool.common.demo.ServerConfiguration +import com.saveourtool.common.utils.parseConfigOrDefault import com.saveourtool.save.core.logging.logInfo -import com.saveourtool.save.demo.ServerConfiguration -import com.saveourtool.save.utils.parseConfigOrDefault private val defaultServerConfiguration = ServerConfiguration() diff --git a/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/Server.kt b/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/Server.kt index 12792c1da1..3517476cd5 100644 --- a/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/Server.kt +++ b/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/Server.kt @@ -4,15 +4,15 @@ package com.saveourtool.save.demo.agent +import com.saveourtool.common.demo.DemoAgentConfig +import com.saveourtool.common.demo.DemoResult +import com.saveourtool.common.demo.DemoRunRequest +import com.saveourtool.common.demo.ServerConfiguration +import com.saveourtool.common.utils.retry import com.saveourtool.save.core.config.LogType import com.saveourtool.save.core.logging.* -import com.saveourtool.save.demo.DemoAgentConfig -import com.saveourtool.save.demo.DemoResult -import com.saveourtool.save.demo.DemoRunRequest -import com.saveourtool.save.demo.ServerConfiguration import com.saveourtool.save.demo.agent.utils.getConfiguration import com.saveourtool.save.demo.agent.utils.setupEnvironment -import com.saveourtool.save.utils.retry import io.ktor.http.* import io.ktor.serialization.kotlinx.json.* diff --git a/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/SimpleRunner.kt b/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/SimpleRunner.kt index f72e75ed15..43c9821459 100644 --- a/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/SimpleRunner.kt +++ b/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/SimpleRunner.kt @@ -4,17 +4,17 @@ package com.saveourtool.save.demo.agent +import com.saveourtool.common.demo.DemoAgentConfig +import com.saveourtool.common.demo.DemoResult +import com.saveourtool.common.demo.DemoRunRequest +import com.saveourtool.common.demo.RunConfiguration +import com.saveourtool.common.utils.createAndWrite +import com.saveourtool.common.utils.createAndWriteIfNeeded +import com.saveourtool.common.utils.createTempDir +import com.saveourtool.common.utils.fs import com.saveourtool.save.core.files.readLines import com.saveourtool.save.core.logging.logDebug import com.saveourtool.save.core.utils.ProcessBuilder -import com.saveourtool.save.demo.DemoAgentConfig -import com.saveourtool.save.demo.DemoResult -import com.saveourtool.save.demo.DemoRunRequest -import com.saveourtool.save.demo.RunConfiguration -import com.saveourtool.save.utils.createAndWrite -import com.saveourtool.save.utils.createAndWriteIfNeeded -import com.saveourtool.save.utils.createTempDir -import com.saveourtool.save.utils.fs import okio.Path import okio.Path.Companion.toPath diff --git a/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/utils/HttpUtils.kt b/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/utils/HttpUtils.kt index 3d7e72a700..ad321472a0 100644 --- a/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/utils/HttpUtils.kt +++ b/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/utils/HttpUtils.kt @@ -4,14 +4,15 @@ package com.saveourtool.save.demo.agent.utils +import com.saveourtool.common.demo.DemoAgentConfig +import com.saveourtool.common.utils.* +import com.saveourtool.common.utils.fs import com.saveourtool.save.core.logging.logDebug import com.saveourtool.save.core.logging.logError import com.saveourtool.save.core.logging.logInfo import com.saveourtool.save.core.logging.logWarn import com.saveourtool.save.core.utils.runIf -import com.saveourtool.save.demo.DemoAgentConfig -import com.saveourtool.save.utils.* -import com.saveourtool.save.utils.fs + import io.ktor.client.* import io.ktor.client.call.* import io.ktor.client.engine.cio.* @@ -27,6 +28,7 @@ import io.ktor.utils.io.core.* import okio.Path import okio.buffer import okio.use + import kotlin.concurrent.AtomicLong private const val DOWNLOAD_REQUEST_TIMEOUT_MILLIS = 5 * 60 * 1000L diff --git a/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/utils/SetupUtils.kt b/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/utils/SetupUtils.kt index bc3fab2aa7..69e363cfce 100644 --- a/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/utils/SetupUtils.kt +++ b/save-demo-agent/src/nativeMain/kotlin/com/saveourtool/save/demo/agent/utils/SetupUtils.kt @@ -4,17 +4,17 @@ package com.saveourtool.save.demo.agent.utils +import com.saveourtool.common.demo.DemoConfiguration +import com.saveourtool.common.utils.* +import com.saveourtool.common.utils.fs import com.saveourtool.save.core.logging.describe import com.saveourtool.save.core.logging.logDebug import com.saveourtool.save.core.logging.logError import com.saveourtool.save.core.logging.logInfo import com.saveourtool.save.core.utils.ExecutionResult import com.saveourtool.save.core.utils.ProcessBuilder -import com.saveourtool.save.demo.DemoConfiguration -import com.saveourtool.save.utils.* -import com.saveourtool.save.utils.fs -import okio.Path +import okio.Path import okio.Path.Companion.toPath private const val SETUP_SH_LOGS_FILENAME = "setup.logs" diff --git a/save-demo-agent/src/nativeTest/kotlin/com/saveoourtool/save/demo/agent/RelativizeRunCommandTest.kt b/save-demo-agent/src/nativeTest/kotlin/com/saveoourtool/save/demo/agent/RelativizeRunCommandTest.kt index 14fb92fe94..00041f6645 100644 --- a/save-demo-agent/src/nativeTest/kotlin/com/saveoourtool/save/demo/agent/RelativizeRunCommandTest.kt +++ b/save-demo-agent/src/nativeTest/kotlin/com/saveoourtool/save/demo/agent/RelativizeRunCommandTest.kt @@ -1,7 +1,7 @@ package com.saveoourtool.save.demo.agent -import com.saveourtool.save.demo.DemoRunRequest -import com.saveourtool.save.demo.RunConfiguration +import com.saveourtool.common.demo.DemoRunRequest +import com.saveourtool.common.demo.RunConfiguration import com.saveourtool.save.demo.agent.getRelativeRunCommand import okio.Path.Companion.toPath import kotlin.test.Test diff --git a/save-demo-agent/src/nativeTest/kotlin/com/saveoourtool/save/demo/agent/ServerTest.kt b/save-demo-agent/src/nativeTest/kotlin/com/saveoourtool/save/demo/agent/ServerTest.kt index 63dfb52d8d..3d2303a36b 100644 --- a/save-demo-agent/src/nativeTest/kotlin/com/saveoourtool/save/demo/agent/ServerTest.kt +++ b/save-demo-agent/src/nativeTest/kotlin/com/saveoourtool/save/demo/agent/ServerTest.kt @@ -1,6 +1,6 @@ package com.saveoourtool.save.demo.agent -import com.saveourtool.save.demo.ServerConfiguration +import com.saveourtool.common.demo.ServerConfiguration import com.saveourtool.save.demo.agent.server import io.ktor.client.* import io.ktor.client.engine.cio.* diff --git a/save-demo-cpg/src/main/kotlin/com/saveourtool/save/demo/cpg/controller/CpgController.kt b/save-demo-cpg/src/main/kotlin/com/saveourtool/save/demo/cpg/controller/CpgController.kt index 785728a7bd..bf1b2a2eca 100644 --- a/save-demo-cpg/src/main/kotlin/com/saveourtool/save/demo/cpg/controller/CpgController.kt +++ b/save-demo-cpg/src/main/kotlin/com/saveourtool/save/demo/cpg/controller/CpgController.kt @@ -1,14 +1,14 @@ package com.saveourtool.save.demo.cpg.controller import com.saveourtool.common.configs.ApiSwaggerSupport -import com.saveourtool.save.demo.cpg.* +import com.saveourtool.common.demo.cpg.* +import com.saveourtool.common.utils.blockingToMono +import com.saveourtool.common.utils.getLogger import com.saveourtool.save.demo.cpg.config.ConfigProperties import com.saveourtool.save.demo.cpg.repository.CpgRepository import com.saveourtool.save.demo.cpg.service.CpgService import com.saveourtool.save.demo.cpg.service.TreeSitterService import com.saveourtool.save.demo.cpg.utils.* -import com.saveourtool.save.utils.blockingToMono -import com.saveourtool.save.utils.getLogger import arrow.core.getOrElse import de.fraunhofer.aisec.cpg.* @@ -35,7 +35,7 @@ const val FILE_NAME_SEPARATOR = "===" * @property cpgRepository * @property treeSitterService */ -@com.saveourtool.common.configs.ApiSwaggerSupport +@ApiSwaggerSupport @Tags( Tag(name = "cpg-demo"), ) diff --git a/save-demo-cpg/src/main/kotlin/com/saveourtool/save/demo/cpg/repository/CpgRepository.kt b/save-demo-cpg/src/main/kotlin/com/saveourtool/save/demo/cpg/repository/CpgRepository.kt index 81316dbb78..02014a3059 100644 --- a/save-demo-cpg/src/main/kotlin/com/saveourtool/save/demo/cpg/repository/CpgRepository.kt +++ b/save-demo-cpg/src/main/kotlin/com/saveourtool/save/demo/cpg/repository/CpgRepository.kt @@ -1,12 +1,12 @@ package com.saveourtool.save.demo.cpg.repository -import com.saveourtool.save.demo.cpg.CpgGraph +import com.saveourtool.common.demo.cpg.CpgGraph +import com.saveourtool.common.utils.getLogger +import com.saveourtool.common.utils.info import com.saveourtool.save.demo.cpg.config.ConfigProperties import com.saveourtool.save.demo.cpg.entity.DemoQuery import com.saveourtool.save.demo.cpg.entity.TreeSitterNode import com.saveourtool.save.demo.cpg.utils.* -import com.saveourtool.save.utils.getLogger -import com.saveourtool.save.utils.info import de.fraunhofer.aisec.cpg.TranslationResult import de.fraunhofer.aisec.cpg.frontends.Language diff --git a/save-demo-cpg/src/main/kotlin/com/saveourtool/save/demo/cpg/utils/CpgUtils.kt b/save-demo-cpg/src/main/kotlin/com/saveourtool/save/demo/cpg/utils/CpgUtils.kt index b47a822156..36803a72bf 100644 --- a/save-demo-cpg/src/main/kotlin/com/saveourtool/save/demo/cpg/utils/CpgUtils.kt +++ b/save-demo-cpg/src/main/kotlin/com/saveourtool/save/demo/cpg/utils/CpgUtils.kt @@ -2,7 +2,7 @@ package com.saveourtool.save.demo.cpg.utils -import com.saveourtool.save.demo.cpg.* +import com.saveourtool.common.demo.cpg.* import com.saveourtool.save.demo.cpg.entity.TreeSitterNode import de.fraunhofer.aisec.cpg.graph.Node diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/SaveDemo.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/SaveDemo.kt index 09a2dad212..8a249ee728 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/SaveDemo.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/SaveDemo.kt @@ -1,7 +1,8 @@ package com.saveourtool.save.demo +import com.saveourtool.common.s3.DefaultS3Configuration import com.saveourtool.save.demo.config.ConfigProperties -import com.saveourtool.save.s3.DefaultS3Configuration + import org.springframework.boot.SpringApplication import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.context.properties.EnableConfigurationProperties diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/config/Beans.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/config/Beans.kt index d29f67c9c4..39dd04296e 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/config/Beans.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/config/Beans.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.demo.config -import com.saveourtool.save.utils.BlockingBridge +import com.saveourtool.common.utils.BlockingBridge import io.fabric8.kubernetes.client.ConfigBuilder import io.fabric8.kubernetes.client.KubernetesClient import io.fabric8.kubernetes.client.KubernetesClientBuilder diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/config/ConfigProperties.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/config/ConfigProperties.kt index b63cff2c7d..a68cc1c894 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/config/ConfigProperties.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/config/ConfigProperties.kt @@ -4,7 +4,7 @@ package com.saveourtool.save.demo.config -import com.saveourtool.save.s3.S3OperationsProperties +import com.saveourtool.common.s3.S3OperationsProperties import io.fabric8.kubernetes.api.model.Quantity import org.springframework.boot.context.properties.ConfigurationProperties import org.springframework.boot.context.properties.ConstructorBinding diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/DemoController.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/DemoController.kt index d9a956ff4c..d52c3902cf 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/DemoController.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/DemoController.kt @@ -1,13 +1,14 @@ package com.saveourtool.save.demo.controller import com.saveourtool.common.configs.ApiSwaggerSupport -import com.saveourtool.save.demo.DemoDto -import com.saveourtool.save.demo.DemoResult -import com.saveourtool.save.demo.DemoRunRequest +import com.saveourtool.common.demo.DemoDto +import com.saveourtool.common.demo.DemoResult +import com.saveourtool.common.demo.DemoRunRequest +import com.saveourtool.common.filters.DemoFilter +import com.saveourtool.common.utils.blockingToFlux import com.saveourtool.save.demo.runners.RunnerFactory import com.saveourtool.save.demo.service.DemoService -import com.saveourtool.save.filters.DemoFilter -import com.saveourtool.save.utils.blockingToFlux + import io.swagger.v3.oas.annotations.tags.Tag import io.swagger.v3.oas.annotations.tags.Tags import org.springframework.web.bind.annotation.GetMapping @@ -20,14 +21,13 @@ import org.springframework.web.bind.annotation.RestController import reactor.core.publisher.Flux import reactor.core.publisher.Mono import reactor.kotlin.core.publisher.toMono - import reactor.kotlin.core.util.function.component1 import reactor.kotlin.core.util.function.component2 /** * Controller for demo */ -@com.saveourtool.common.configs.ApiSwaggerSupport +@ApiSwaggerSupport @Tags( Tag(name = "demo"), ) diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/DependencyController.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/DependencyController.kt index dfda5ea3fa..34a0a9bfe0 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/DependencyController.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/DependencyController.kt @@ -1,15 +1,15 @@ package com.saveourtool.save.demo.controller +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.entities.FileDto +import com.saveourtool.common.utils.StringResponse +import com.saveourtool.common.utils.asyncEffect +import com.saveourtool.common.utils.getLogger +import com.saveourtool.common.utils.info import com.saveourtool.save.demo.entity.Dependency import com.saveourtool.save.demo.service.DemoService import com.saveourtool.save.demo.service.DownloadToolService import com.saveourtool.save.demo.storage.DependencyStorage -import com.saveourtool.save.domain.ProjectCoordinates -import com.saveourtool.save.entities.FileDto -import com.saveourtool.save.utils.StringResponse -import com.saveourtool.save.utils.asyncEffect -import com.saveourtool.save.utils.getLogger -import com.saveourtool.save.utils.info import org.slf4j.Logger import org.springframework.http.MediaType diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/ManagementApiController.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/ManagementApiController.kt index 83dbf9d9d1..12c2a521fb 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/ManagementApiController.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/ManagementApiController.kt @@ -1,10 +1,10 @@ package com.saveourtool.save.demo.controller -import com.saveourtool.save.demo.DemoDto -import com.saveourtool.save.demo.DemoStatus +import com.saveourtool.common.demo.DemoDto +import com.saveourtool.common.demo.DemoStatus +import com.saveourtool.common.utils.* import com.saveourtool.save.demo.entity.* import com.saveourtool.save.demo.service.* -import com.saveourtool.save.utils.* import io.swagger.v3.oas.annotations.tags.Tag import io.swagger.v3.oas.annotations.tags.Tags diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/ManagementController.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/ManagementController.kt index 94eebe4749..2ee2649ede 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/ManagementController.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/controller/ManagementController.kt @@ -1,10 +1,10 @@ package com.saveourtool.save.demo.controller -import com.saveourtool.save.demo.DemoAgentConfig -import com.saveourtool.save.demo.DemoDto +import com.saveourtool.common.demo.DemoAgentConfig +import com.saveourtool.common.demo.DemoDto +import com.saveourtool.common.utils.* import com.saveourtool.save.demo.entity.* import com.saveourtool.save.demo.service.* -import com.saveourtool.save.utils.* import org.springframework.http.HttpStatus import org.springframework.web.bind.annotation.* diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/Demo.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/Demo.kt index 60235044f1..6e4b71afc3 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/Demo.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/Demo.kt @@ -1,11 +1,11 @@ package com.saveourtool.save.demo.entity -import com.saveourtool.save.demo.DemoConfiguration -import com.saveourtool.save.demo.DemoDto -import com.saveourtool.save.demo.RunConfiguration -import com.saveourtool.save.domain.ProjectCoordinates -import com.saveourtool.save.domain.toSdk -import com.saveourtool.save.spring.entity.BaseEntityWithDto +import com.saveourtool.common.demo.DemoConfiguration +import com.saveourtool.common.demo.DemoDto +import com.saveourtool.common.demo.RunConfiguration +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.domain.toSdk +import com.saveourtool.common.spring.entity.BaseEntityWithDto import javax.persistence.* /** diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/Dependency.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/Dependency.kt index 22be1e4f3d..334b5dd541 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/Dependency.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/Dependency.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.demo.entity -import com.saveourtool.save.spring.entity.BaseEntity +import com.saveourtool.common.spring.entity.BaseEntity import javax.persistence.* /** diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/GithubRepo.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/GithubRepo.kt index 1960f5f35b..2f305b2f3b 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/GithubRepo.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/GithubRepo.kt @@ -1,8 +1,8 @@ package com.saveourtool.save.demo.entity -import com.saveourtool.save.domain.ProjectCoordinates -import com.saveourtool.save.spring.entity.BaseEntity -import com.saveourtool.save.utils.github.GitHubRepoInfo +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.spring.entity.BaseEntity +import com.saveourtool.common.utils.github.GitHubRepoInfo import javax.persistence.Entity import javax.persistence.Table diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/RunCommand.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/RunCommand.kt index 1330081b42..7ad194b71b 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/RunCommand.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/RunCommand.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.demo.entity -import com.saveourtool.save.demo.RunCommandMap -import com.saveourtool.save.spring.entity.BaseEntity +import com.saveourtool.common.demo.RunCommandMap +import com.saveourtool.common.spring.entity.BaseEntity import javax.persistence.Entity import javax.persistence.FetchType import javax.persistence.JoinColumn diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/Snapshot.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/Snapshot.kt index 7128c1253c..8e4aedfb8f 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/Snapshot.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/Snapshot.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.demo.entity -import com.saveourtool.save.spring.entity.BaseEntity +import com.saveourtool.common.spring.entity.BaseEntity import javax.persistence.Entity /** diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/Tool.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/Tool.kt index b2f17660d5..a2319146ac 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/Tool.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/entity/Tool.kt @@ -1,7 +1,8 @@ package com.saveourtool.save.demo.entity +import com.saveourtool.common.spring.entity.BaseEntity import com.saveourtool.save.demo.storage.ToolKey -import com.saveourtool.save.spring.entity.BaseEntity + import javax.persistence.* /** diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/DemoRepository.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/DemoRepository.kt index 40f182a069..6406d267b0 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/DemoRepository.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/DemoRepository.kt @@ -1,7 +1,8 @@ package com.saveourtool.save.demo.repository +import com.saveourtool.common.spring.repository.BaseEntityRepository import com.saveourtool.save.demo.entity.Demo -import com.saveourtool.save.spring.repository.BaseEntityRepository + import org.springframework.stereotype.Repository /** diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/DependencyRepository.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/DependencyRepository.kt index 306d777a3b..328107a4c0 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/DependencyRepository.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/DependencyRepository.kt @@ -1,8 +1,9 @@ package com.saveourtool.save.demo.repository +import com.saveourtool.common.spring.repository.BaseEntityRepository import com.saveourtool.save.demo.entity.Demo import com.saveourtool.save.demo.entity.Dependency -import com.saveourtool.save.spring.repository.BaseEntityRepository + import org.springframework.stereotype.Repository /** diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/GithubRepoRepository.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/GithubRepoRepository.kt index d851723844..aa3da9f772 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/GithubRepoRepository.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/GithubRepoRepository.kt @@ -1,7 +1,8 @@ package com.saveourtool.save.demo.repository +import com.saveourtool.common.spring.repository.BaseEntityRepository import com.saveourtool.save.demo.entity.GithubRepo -import com.saveourtool.save.spring.repository.BaseEntityRepository + import org.springframework.stereotype.Repository /** diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/RunCommandRepository.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/RunCommandRepository.kt index fb12c7c1df..18bb0bc4b8 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/RunCommandRepository.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/RunCommandRepository.kt @@ -1,7 +1,8 @@ package com.saveourtool.save.demo.repository +import com.saveourtool.common.spring.repository.BaseEntityRepository import com.saveourtool.save.demo.entity.RunCommand -import com.saveourtool.save.spring.repository.BaseEntityRepository + import org.springframework.stereotype.Repository /** diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/SnapshotRepository.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/SnapshotRepository.kt index 447067fb1b..44c8d7083b 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/SnapshotRepository.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/SnapshotRepository.kt @@ -1,7 +1,8 @@ package com.saveourtool.save.demo.repository +import com.saveourtool.common.spring.repository.BaseEntityRepository import com.saveourtool.save.demo.entity.Snapshot -import com.saveourtool.save.spring.repository.BaseEntityRepository + import org.springframework.stereotype.Repository /** diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/ToolRepository.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/ToolRepository.kt index 32b96d5160..7572b78e7a 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/ToolRepository.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/repository/ToolRepository.kt @@ -1,9 +1,10 @@ package com.saveourtool.save.demo.repository +import com.saveourtool.common.spring.repository.BaseEntityRepository import com.saveourtool.save.demo.entity.GithubRepo import com.saveourtool.save.demo.entity.Snapshot import com.saveourtool.save.demo.entity.Tool -import com.saveourtool.save.spring.repository.BaseEntityRepository + import org.springframework.stereotype.Repository /** diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/Runner.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/Runner.kt index 81def02870..a32ca58c5d 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/Runner.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/Runner.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.demo.runners -import com.saveourtool.save.demo.DemoResult -import com.saveourtool.save.demo.DemoRunRequest +import com.saveourtool.common.demo.DemoResult +import com.saveourtool.common.demo.DemoRunRequest import reactor.core.publisher.Mono /** diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/cli/AbstractCliRunner.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/cli/AbstractCliRunner.kt index ab6f59b5a1..133408cf2e 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/cli/AbstractCliRunner.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/cli/AbstractCliRunner.kt @@ -1,19 +1,22 @@ package com.saveourtool.save.demo.runners.cli -import com.saveourtool.save.demo.DemoResult -import com.saveourtool.save.demo.DemoRunRequest +import com.saveourtool.common.demo.DemoResult +import com.saveourtool.common.demo.DemoRunRequest +import com.saveourtool.common.utils.blockingToMono +import com.saveourtool.common.utils.collectToFile import com.saveourtool.save.demo.storage.DependencyStorage import com.saveourtool.save.demo.storage.ToolKey import com.saveourtool.save.demo.utils.prependPath -import com.saveourtool.save.utils.blockingToMono -import com.saveourtool.save.utils.collectToFile + import org.slf4j.Logger import reactor.core.publisher.Mono import reactor.kotlin.core.publisher.switchIfEmpty + import java.io.FileNotFoundException import java.io.IOException import java.io.UncheckedIOException import java.nio.file.Path + import kotlin.io.path.* /** diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/cli/CliRunner.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/cli/CliRunner.kt index 7c9306c722..54708530ce 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/cli/CliRunner.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/cli/CliRunner.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.demo.runners.cli -import com.saveourtool.save.demo.DemoResult -import com.saveourtool.save.demo.DemoRunRequest +import com.saveourtool.common.demo.DemoResult +import com.saveourtool.common.demo.DemoRunRequest import com.saveourtool.save.demo.runners.Runner import com.saveourtool.save.demo.storage.ToolKey import com.saveourtool.save.demo.utils.isWindows diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/cli/DemoCliRunner.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/cli/DemoCliRunner.kt index 7993995f58..b95f713570 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/cli/DemoCliRunner.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/cli/DemoCliRunner.kt @@ -1,14 +1,17 @@ package com.saveourtool.save.demo.runners.cli -import com.saveourtool.save.demo.DemoRunRequest +import com.saveourtool.common.demo.DemoRunRequest +import com.saveourtool.common.utils.getLogger import com.saveourtool.save.demo.entity.Demo import com.saveourtool.save.demo.runners.command.CommandBuilder import com.saveourtool.save.demo.runners.command.CommandContext import com.saveourtool.save.demo.storage.DependencyStorage import com.saveourtool.save.demo.storage.toToolKey -import com.saveourtool.save.utils.getLogger + import org.slf4j.Logger + import java.nio.file.Path + import kotlin.io.path.createTempDirectory /** diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/pod/DemoPodRunner.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/pod/DemoPodRunner.kt index 8495f0aed4..451449dc8a 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/pod/DemoPodRunner.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/pod/DemoPodRunner.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.demo.runners.pod -import com.saveourtool.save.demo.DemoRunRequest +import com.saveourtool.common.demo.DemoRunRequest import com.saveourtool.save.demo.entity.Demo import com.saveourtool.save.demo.service.KubernetesService import io.ktor.client.statement.* diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/pod/PodRunner.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/pod/PodRunner.kt index 120b45d1f5..003b7fc609 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/pod/PodRunner.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/runners/pod/PodRunner.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.demo.runners.pod -import com.saveourtool.save.demo.DemoResult -import com.saveourtool.save.demo.DemoRunRequest +import com.saveourtool.common.demo.DemoResult +import com.saveourtool.common.demo.DemoRunRequest +import com.saveourtool.common.utils.switchIfEmptyToResponseException import com.saveourtool.save.demo.runners.Runner -import com.saveourtool.save.utils.switchIfEmptyToResponseException import io.ktor.client.* import io.ktor.client.call.* diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/service/DemoService.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/service/DemoService.kt index 61beaf7484..4425abefe3 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/service/DemoService.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/service/DemoService.kt @@ -1,19 +1,19 @@ package com.saveourtool.save.demo.service -import com.saveourtool.save.demo.DemoAgentConfig -import com.saveourtool.save.demo.DemoStatus -import com.saveourtool.save.demo.RunCommandMap +import com.saveourtool.common.demo.DemoAgentConfig +import com.saveourtool.common.demo.DemoStatus +import com.saveourtool.common.demo.RunCommandMap +import com.saveourtool.common.filters.DemoFilter +import com.saveourtool.common.utils.StringResponse +import com.saveourtool.common.utils.blockingToMono +import com.saveourtool.common.utils.kFindAll +import com.saveourtool.common.utils.switchIfEmptyToNotFound import com.saveourtool.save.demo.entity.Demo import com.saveourtool.save.demo.entity.RunCommand import com.saveourtool.save.demo.repository.DemoRepository import com.saveourtool.save.demo.repository.RunCommandRepository import com.saveourtool.save.demo.runners.RunnerFactory import com.saveourtool.save.demo.storage.DependencyStorage -import com.saveourtool.save.filters.DemoFilter -import com.saveourtool.save.utils.StringResponse -import com.saveourtool.save.utils.blockingToMono -import com.saveourtool.save.utils.kFindAll -import com.saveourtool.save.utils.switchIfEmptyToNotFound import org.springframework.data.domain.PageRequest import org.springframework.stereotype.Service diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/service/DownloadToolService.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/service/DownloadToolService.kt index 38bcc23672..4b3ad89f8f 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/service/DownloadToolService.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/service/DownloadToolService.kt @@ -1,14 +1,14 @@ package com.saveourtool.save.demo.service +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.entities.FileDto +import com.saveourtool.common.utils.* +import com.saveourtool.common.utils.github.GitHubHelper.downloadAsset +import com.saveourtool.common.utils.github.GitHubHelper.queryMetadata +import com.saveourtool.common.utils.github.ReleaseAsset import com.saveourtool.save.demo.config.ConfigProperties import com.saveourtool.save.demo.entity.* import com.saveourtool.save.demo.storage.DependencyStorage -import com.saveourtool.save.domain.ProjectCoordinates -import com.saveourtool.save.entities.FileDto -import com.saveourtool.save.utils.* -import com.saveourtool.save.utils.github.GitHubHelper.downloadAsset -import com.saveourtool.save.utils.github.GitHubHelper.queryMetadata -import com.saveourtool.save.utils.github.ReleaseAsset import io.ktor.client.* import io.ktor.client.plugins.contentnegotiation.* diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/service/KubernetesService.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/service/KubernetesService.kt index 36af4cd207..a6f17a8389 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/service/KubernetesService.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/service/KubernetesService.kt @@ -1,13 +1,13 @@ package com.saveourtool.save.demo.service -import com.saveourtool.save.demo.DemoAgentConfig -import com.saveourtool.save.demo.DemoRunRequest -import com.saveourtool.save.demo.DemoStatus +import com.saveourtool.common.demo.DemoAgentConfig +import com.saveourtool.common.demo.DemoRunRequest +import com.saveourtool.common.demo.DemoStatus +import com.saveourtool.common.utils.* import com.saveourtool.save.demo.config.ConfigProperties import com.saveourtool.save.demo.entity.Demo import com.saveourtool.save.demo.storage.DemoInternalFileStorage import com.saveourtool.save.demo.utils.* -import com.saveourtool.save.utils.* import io.fabric8.kubernetes.api.model.* import io.fabric8.kubernetes.client.KubernetesClient diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/service/ToolService.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/service/ToolService.kt index 18e59ddd5e..14b3fea251 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/service/ToolService.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/service/ToolService.kt @@ -1,10 +1,11 @@ package com.saveourtool.save.demo.service +import com.saveourtool.common.domain.ProjectCoordinates import com.saveourtool.save.demo.entity.GithubRepo import com.saveourtool.save.demo.entity.Snapshot import com.saveourtool.save.demo.entity.Tool import com.saveourtool.save.demo.repository.ToolRepository -import com.saveourtool.save.domain.ProjectCoordinates + import org.springframework.stereotype.Service import org.springframework.transaction.annotation.Transactional diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/storage/DemoInternalFileStorage.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/storage/DemoInternalFileStorage.kt index ffcbc0d2ba..96e50a72a7 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/storage/DemoInternalFileStorage.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/storage/DemoInternalFileStorage.kt @@ -1,9 +1,10 @@ package com.saveourtool.save.demo.storage +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.storage.impl.AbstractInternalFileStorage +import com.saveourtool.common.storage.impl.InternalFileKey import com.saveourtool.save.demo.config.ConfigProperties -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.storage.impl.AbstractInternalFileStorage -import com.saveourtool.save.storage.impl.InternalFileKey + import org.springframework.stereotype.Component /** diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/storage/DependencyKeyManager.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/storage/DependencyKeyManager.kt index d9f63e02b9..b5e5f41f3a 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/storage/DependencyKeyManager.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/storage/DependencyKeyManager.kt @@ -1,11 +1,12 @@ package com.saveourtool.save.demo.storage +import com.saveourtool.common.storage.concatS3Key +import com.saveourtool.common.storage.key.AbstractS3KeyEntityManager +import com.saveourtool.common.utils.BlockingBridge import com.saveourtool.save.demo.config.ConfigProperties import com.saveourtool.save.demo.entity.Dependency import com.saveourtool.save.demo.repository.DependencyRepository -import com.saveourtool.save.storage.concatS3Key -import com.saveourtool.save.storage.key.AbstractS3KeyEntityManager -import com.saveourtool.save.utils.BlockingBridge + import org.springframework.stereotype.Component /** diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/storage/DependencyStorage.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/storage/DependencyStorage.kt index 845f5a4d8f..aa7396f474 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/storage/DependencyStorage.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/storage/DependencyStorage.kt @@ -1,16 +1,19 @@ package com.saveourtool.save.demo.storage +import com.saveourtool.common.s3.S3Operations +import com.saveourtool.common.storage.ReactiveStorageWithDatabase +import com.saveourtool.common.utils.* import com.saveourtool.save.demo.entity.Demo import com.saveourtool.save.demo.entity.Dependency -import com.saveourtool.save.s3.S3Operations -import com.saveourtool.save.storage.ReactiveStorageWithDatabase -import com.saveourtool.save.utils.* + import org.slf4j.Logger import org.springframework.stereotype.Component import reactor.core.publisher.Flux import reactor.core.publisher.Mono + import java.nio.ByteBuffer import java.nio.file.Path + import kotlin.io.path.* /** diff --git a/save-demo/src/main/kotlin/com/saveourtool/save/demo/utils/KubernetesUtils.kt b/save-demo/src/main/kotlin/com/saveourtool/save/demo/utils/KubernetesUtils.kt index e42b9670cb..731dc96b63 100644 --- a/save-demo/src/main/kotlin/com/saveourtool/save/demo/utils/KubernetesUtils.kt +++ b/save-demo/src/main/kotlin/com/saveourtool/save/demo/utils/KubernetesUtils.kt @@ -4,14 +4,15 @@ package com.saveourtool.save.demo.utils -import com.saveourtool.save.demo.DemoAgentConfig +import com.saveourtool.common.demo.DemoAgentConfig +import com.saveourtool.common.domain.toSdk +import com.saveourtool.common.utils.debug +import com.saveourtool.common.utils.downloadAndRunAgentCommand import com.saveourtool.save.demo.config.ConfigProperties import com.saveourtool.save.demo.config.KubernetesConfig import com.saveourtool.save.demo.entity.Demo import com.saveourtool.save.demo.storage.DemoInternalFileStorage -import com.saveourtool.save.domain.toSdk -import com.saveourtool.save.utils.debug -import com.saveourtool.save.utils.downloadAndRunAgentCommand + import io.fabric8.kubernetes.api.model.* import io.fabric8.kubernetes.api.model.batch.v1.Job import io.fabric8.kubernetes.api.model.batch.v1.JobSpec diff --git a/save-demo/src/test/kotlin/com/saveourtool/save/demo/utils/HttpUtilsTest.kt b/save-demo/src/test/kotlin/com/saveourtool/save/demo/utils/HttpUtilsTest.kt index 001b9a0ab3..fea34271ea 100644 --- a/save-demo/src/test/kotlin/com/saveourtool/save/demo/utils/HttpUtilsTest.kt +++ b/save-demo/src/test/kotlin/com/saveourtool/save/demo/utils/HttpUtilsTest.kt @@ -2,7 +2,7 @@ package com.saveourtool.save.demo.utils import com.saveourtool.save.demo.config.KubernetesConfig import com.saveourtool.save.demo.entity.Demo -import com.saveourtool.save.domain.Sdk +import com.saveourtool.common.domain.Sdk import io.ktor.utils.io.ByteReadChannel import io.ktor.utils.io.jvm.javaio.toByteReadChannel import org.assertj.core.api.Assertions.assertThat diff --git a/save-demo/src/test/kotlin/com/saveourtool/save/storage/S3StorageUtilsKtTest.kt b/save-demo/src/test/kotlin/com/saveourtool/save/storage/S3StorageUtilsKtTest.kt index 3ef74de294..c94432e154 100644 --- a/save-demo/src/test/kotlin/com/saveourtool/save/storage/S3StorageUtilsKtTest.kt +++ b/save-demo/src/test/kotlin/com/saveourtool/save/storage/S3StorageUtilsKtTest.kt @@ -1,5 +1,7 @@ package com.saveourtool.save.storage +import com.saveourtool.common.storage.concatS3Key +import com.saveourtool.common.storage.s3KeyToParts import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/App.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/App.kt index 0883edb6c0..229df3a277 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/App.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/App.kt @@ -4,6 +4,8 @@ package com.saveourtool.save.frontend +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.components.basic.cookieBanner import com.saveourtool.frontend.common.components.basic.scrollToTopButton import com.saveourtool.frontend.common.components.footer @@ -13,8 +15,6 @@ import com.saveourtool.save.frontend.components.* import com.saveourtool.save.frontend.components.topbar.topBarComponent import com.saveourtool.save.frontend.externals.i18next.initI18n import com.saveourtool.save.frontend.routing.basicRouting -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.validation.FrontendRoutes import react.* import react.dom.client.createRoot diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/ContestEnroller.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/ContestEnroller.kt index f75d2ddb5c..7ddb07f8de 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/ContestEnroller.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/ContestEnroller.kt @@ -6,12 +6,12 @@ package com.saveourtool.save.frontend.components.basic +import com.saveourtool.common.utils.URL_PATH_DELIMITER import com.saveourtool.frontend.common.components.modal.largeTransparentModalStyle import com.saveourtool.frontend.common.components.modal.modal import com.saveourtool.frontend.common.externals.fontawesome.faTimesCircle import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.utils.URL_PATH_DELIMITER import org.w3c.fetch.Headers import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/ExecutionLabels.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/ExecutionLabels.kt index 52063a935f..b57040ade5 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/ExecutionLabels.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/ExecutionLabels.kt @@ -7,14 +7,14 @@ package com.saveourtool.save.frontend.components.basic +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.execution.ExecutionStatus +import com.saveourtool.common.utils.calculateRate +import com.saveourtool.common.utils.getPrecisionRate +import com.saveourtool.common.utils.getRecallRate +import com.saveourtool.common.utils.isValidScore import com.saveourtool.frontend.common.externals.fontawesome.faRedo import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon -import com.saveourtool.save.execution.ExecutionDto -import com.saveourtool.save.execution.ExecutionStatus -import com.saveourtool.save.utils.calculateRate -import com.saveourtool.save.utils.getPrecisionRate -import com.saveourtool.save.utils.getRecallRate -import com.saveourtool.save.utils.isValidScore import js.core.jso import react.ChildrenBuilder diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/ProjectInfo.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/ProjectInfo.kt index 473c1fc156..9f1fdba1c0 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/ProjectInfo.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/ProjectInfo.kt @@ -6,12 +6,12 @@ package com.saveourtool.save.frontend.components.basic +import com.saveourtool.common.entities.ProjectDto import com.saveourtool.frontend.common.externals.fontawesome.faCheck import com.saveourtool.frontend.common.externals.fontawesome.faEdit import com.saveourtool.frontend.common.externals.fontawesome.faTimesCircle import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.ProjectDto import react.FC import react.Props diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/SdkSelection.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/SdkSelection.kt index c5089fb550..7ee5094eb9 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/SdkSelection.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/SdkSelection.kt @@ -6,9 +6,9 @@ package com.saveourtool.save.frontend.components.basic +import com.saveourtool.common.domain.* import com.saveourtool.frontend.common.utils.selectorBuilder import com.saveourtool.frontend.common.utils.useStateFromProps -import com.saveourtool.save.domain.* import react.* import react.dom.html.ReactHTML.div diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/TestResourcesSelection.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/TestResourcesSelection.kt index e64c361227..869829eb16 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/TestResourcesSelection.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/TestResourcesSelection.kt @@ -6,14 +6,14 @@ package com.saveourtool.save.frontend.components.basic +import com.saveourtool.common.entities.contest.ContestDto +import com.saveourtool.common.execution.TestingType +import com.saveourtool.common.testsuite.TestSuiteVersioned import com.saveourtool.frontend.common.components.basic.testsuiteselector.showPrivateTestSuitesSelectorModal import com.saveourtool.frontend.common.components.basic.testsuiteselector.showPublicTestSuitesSelectorModal import com.saveourtool.frontend.common.components.inputform.InputTypes import com.saveourtool.frontend.common.components.inputform.inputTextFormRequired import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.contest.ContestDto -import com.saveourtool.save.execution.TestingType -import com.saveourtool.save.testsuite.TestSuiteVersioned import react.* import react.dom.html.ReactHTML.button diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/TestStatusComponent.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/TestStatusComponent.kt index c3233e613d..0ca9800712 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/TestStatusComponent.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/TestStatusComponent.kt @@ -2,17 +2,17 @@ package com.saveourtool.save.frontend.components.basic +import com.saveourtool.common.agent.TestExecutionDto +import com.saveourtool.common.agent.TestExecutionExtDto +import com.saveourtool.common.domain.TestResultDebugInfo import com.saveourtool.frontend.common.components.tables.visibleColumnsCount import com.saveourtool.frontend.common.externals.fontawesome.faExternalLinkAlt import com.saveourtool.frontend.common.utils.buttonBuilder -import com.saveourtool.common.agent.TestExecutionDto -import com.saveourtool.common.agent.TestExecutionExtDto import com.saveourtool.save.core.result.Crash import com.saveourtool.save.core.result.Fail import com.saveourtool.save.core.result.Ignored import com.saveourtool.save.core.result.Pass import com.saveourtool.save.core.result.TestStatus -import com.saveourtool.save.domain.TestResultDebugInfo import react.FC import react.Props @@ -39,8 +39,8 @@ const val EXTRA_INFO_COLUMN_WIDTH = 3 fun testStatusComponent( organizationProjectPath: String, testResultDebugInfo: TestResultDebugInfo, - tableInstance: Table, - testExecutionDto: com.saveourtool.common.agent.TestExecutionDto, + tableInstance: Table, + testExecutionDto: TestExecutionDto, ): FC = FC { val shortMessage: String = when (val status: TestStatus = testResultDebugInfo.testStatus) { is Pass -> (status.shortMessage ?: "").ifBlank { "Completed successfully without additional information" } diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/TimelineComponent.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/TimelineComponent.kt index b7eb18f3e8..1625779fa5 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/TimelineComponent.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/TimelineComponent.kt @@ -2,9 +2,9 @@ package com.saveourtool.save.frontend.components.basic +import com.saveourtool.common.entities.cosv.VulnerabilityExt +import com.saveourtool.common.entities.vulnerability.VulnerabilityDateDto import com.saveourtool.frontend.common.utils.buttonBuilder -import com.saveourtool.save.entities.cosv.VulnerabilityExt -import com.saveourtool.save.entities.vulnerability.VulnerabilityDateDto import com.saveourtool.save.frontend.externals.i18next.useTranslation import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/codeeditor/CodeEditorComponent.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/codeeditor/CodeEditorComponent.kt index 05d22e045a..76155e80a6 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/codeeditor/CodeEditorComponent.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/codeeditor/CodeEditorComponent.kt @@ -2,8 +2,8 @@ package com.saveourtool.save.frontend.components.basic.codeeditor +import com.saveourtool.common.utils.Languages import com.saveourtool.save.frontend.externals.reactace.* -import com.saveourtool.save.utils.Languages import react.* import react.dom.html.ReactHTML.div diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/codeeditor/EditorToolbar.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/codeeditor/EditorToolbar.kt index 3d93da7b4a..adec1a8874 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/codeeditor/EditorToolbar.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/codeeditor/EditorToolbar.kt @@ -2,12 +2,12 @@ package com.saveourtool.save.frontend.components.basic.codeeditor +import com.saveourtool.common.utils.Languages import com.saveourtool.frontend.common.components.basic.cardComponent import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.utils.buttonBuilder import com.saveourtool.frontend.common.utils.selectorBuilder import com.saveourtool.save.frontend.externals.reactace.AceThemes -import com.saveourtool.save.utils.Languages import react.ChildrenBuilder import react.dom.html.ReactHTML.div diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/codeeditor/FileType.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/codeeditor/FileType.kt index 20c2b44601..f2ebe7c4d1 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/codeeditor/FileType.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/codeeditor/FileType.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.frontend.components.basic.codeeditor -import com.saveourtool.save.utils.Languages +import com.saveourtool.common.utils.Languages /** * @property fileName displayed name diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/cpg/GraphLoader.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/cpg/GraphLoader.kt index 6da7f855d7..3b09df3292 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/cpg/GraphLoader.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/cpg/GraphLoader.kt @@ -6,7 +6,7 @@ package com.saveourtool.save.frontend.components.basic.cpg -import com.saveourtool.save.demo.cpg.CpgGraph +import com.saveourtool.common.demo.cpg.CpgGraph import com.saveourtool.save.frontend.externals.graph.paintNodes import com.saveourtool.save.frontend.externals.graph.sigma.layouts.LayoutInstance import com.saveourtool.save.frontend.externals.graph.sigma.layouts.useLayoutCircular diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/GraphDemoComponent.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/GraphDemoComponent.kt index 661b7aecfd..0447cf5dab 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/GraphDemoComponent.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/GraphDemoComponent.kt @@ -6,17 +6,17 @@ package com.saveourtool.save.frontend.components.basic.demo +import com.saveourtool.common.demo.cpg.CpgAdditionalParams +import com.saveourtool.common.demo.cpg.CpgEngine +import com.saveourtool.common.demo.cpg.CpgRunRequest +import com.saveourtool.common.demo.cpg.cytoscape.CytoscapeLayout +import com.saveourtool.common.utils.Languages import com.saveourtool.frontend.common.externals.fontawesome.faCaretSquareRight import com.saveourtool.frontend.common.externals.fontawesome.faInfoCircle import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.demo.cpg.CpgAdditionalParams -import com.saveourtool.save.demo.cpg.CpgEngine -import com.saveourtool.save.demo.cpg.CpgRunRequest -import com.saveourtool.save.demo.cpg.cytoscape.CytoscapeLayout import com.saveourtool.save.frontend.components.basic.codeeditor.codeEditorComponent import com.saveourtool.save.frontend.externals.reactace.AceMarkers import com.saveourtool.save.frontend.externals.reactace.AceThemes -import com.saveourtool.save.utils.Languages import js.core.jso import react.ChildrenBuilder diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoButtons.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoButtons.kt index 5a460b029c..89ca04cd3b 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoButtons.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoButtons.kt @@ -4,10 +4,10 @@ package com.saveourtool.save.frontend.components.basic.demo.management +import com.saveourtool.common.demo.DemoStatus +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.domain.Role import com.saveourtool.frontend.common.utils.buttonBuilder -import com.saveourtool.save.demo.DemoStatus -import com.saveourtool.save.domain.ProjectCoordinates -import com.saveourtool.save.domain.Role import react.ChildrenBuilder import react.dom.html.ReactHTML.div diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoContainerLogButton.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoContainerLogButton.kt index b2927e6fc0..c45595cb6d 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoContainerLogButton.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoContainerLogButton.kt @@ -6,13 +6,13 @@ package com.saveourtool.save.frontend.components.basic.demo.management +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.utils.* import com.saveourtool.frontend.common.components.modal.* import com.saveourtool.frontend.common.externals.fontawesome.faArrowLeft import com.saveourtool.frontend.common.externals.fontawesome.faArrowRight import com.saveourtool.frontend.common.externals.fontawesome.faHistory import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.domain.ProjectCoordinates -import com.saveourtool.save.utils.* import js.core.jso import react.FC diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoFileUploader.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoFileUploader.kt index 225886ecf9..ed13e47408 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoFileUploader.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoFileUploader.kt @@ -4,10 +4,10 @@ package com.saveourtool.save.frontend.components.basic.demo.management +import com.saveourtool.common.demo.DemoDto +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.entities.FileDto import com.saveourtool.frontend.common.utils.apiUrl -import com.saveourtool.save.demo.DemoDto -import com.saveourtool.save.domain.ProjectCoordinates -import com.saveourtool.save.entities.FileDto import com.saveourtool.save.frontend.components.basic.fileuploader.FileDtosSetter import com.saveourtool.save.frontend.components.basic.fileuploader.simpleFileUploader diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoModeLabel.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoModeLabel.kt index d27728132f..57b0b05275 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoModeLabel.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoModeLabel.kt @@ -6,8 +6,8 @@ package com.saveourtool.save.frontend.components.basic.demo.management +import com.saveourtool.common.demo.RunCommandPair import com.saveourtool.frontend.common.utils.buttonBuilder -import com.saveourtool.save.demo.RunCommandPair import react.FC import react.Props diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoModeModal.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoModeModal.kt index 991e654148..b050859642 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoModeModal.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoModeModal.kt @@ -4,13 +4,13 @@ package com.saveourtool.save.frontend.components.basic.demo.management +import com.saveourtool.common.demo.DemoDto +import com.saveourtool.common.demo.RunCommandPair +import com.saveourtool.common.utils.isNotNull import com.saveourtool.frontend.common.components.modal.mediumTransparentModalStyle import com.saveourtool.frontend.common.components.modal.modal import com.saveourtool.frontend.common.components.modal.modalBuilder import com.saveourtool.frontend.common.utils.buttonBuilder -import com.saveourtool.save.demo.DemoDto -import com.saveourtool.save.demo.RunCommandPair -import com.saveourtool.save.utils.isNotNull import react.* import react.dom.html.ReactHTML.div diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoRunCommands.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoRunCommands.kt index c974653787..5313be1424 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoRunCommands.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoRunCommands.kt @@ -6,12 +6,12 @@ package com.saveourtool.save.frontend.components.basic.demo.management +import com.saveourtool.common.demo.DemoDto +import com.saveourtool.common.demo.RunCommandPair import com.saveourtool.frontend.common.externals.fontawesome.faEdit import com.saveourtool.frontend.common.externals.fontawesome.faPlus import com.saveourtool.frontend.common.utils.buttonBuilder import com.saveourtool.frontend.common.utils.useTooltip -import com.saveourtool.save.demo.DemoDto -import com.saveourtool.save.demo.RunCommandPair import react.* import react.dom.html.AutoComplete diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoSettingsComponent.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoSettingsComponent.kt index e2ae80a735..a9bf8e7a52 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoSettingsComponent.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoSettingsComponent.kt @@ -4,7 +4,7 @@ package com.saveourtool.save.frontend.components.basic.demo.management -import com.saveourtool.save.demo.DemoDto +import com.saveourtool.common.demo.DemoDto import react.* import react.dom.html.AutoComplete diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoStatusLabel.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoStatusLabel.kt index 191c20a80f..b2afa070ea 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoStatusLabel.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/management/DemoStatusLabel.kt @@ -4,7 +4,7 @@ package com.saveourtool.save.frontend.components.basic.demo.management -import com.saveourtool.save.demo.DemoStatus +import com.saveourtool.common.demo.DemoStatus import react.* import react.dom.html.ReactHTML.div diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/run/DemoOutputComponent.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/run/DemoOutputComponent.kt index 80dd56ab52..6087dc24c8 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/run/DemoOutputComponent.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/run/DemoOutputComponent.kt @@ -6,9 +6,9 @@ package com.saveourtool.save.frontend.components.basic.demo.run +import com.saveourtool.common.demo.DemoResult import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.demo.DemoResult import js.core.jso import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/run/DemoRunComponent.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/run/DemoRunComponent.kt index 29c8c43707..c26ce2cc78 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/run/DemoRunComponent.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/run/DemoRunComponent.kt @@ -6,6 +6,11 @@ package com.saveourtool.save.frontend.components.basic.demo.run +import com.saveourtool.common.demo.DemoDto +import com.saveourtool.common.demo.DemoResult +import com.saveourtool.common.demo.DemoRunRequest +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.utils.Languages import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.buttonBuilder @@ -13,13 +18,8 @@ import com.saveourtool.frontend.common.utils.post import com.saveourtool.frontend.common.utils.selectorBuilder import com.saveourtool.frontend.common.utils.useDeferredRequest import com.saveourtool.frontend.common.utils.useRequest -import com.saveourtool.save.demo.DemoDto -import com.saveourtool.save.demo.DemoResult -import com.saveourtool.save.demo.DemoRunRequest -import com.saveourtool.save.domain.ProjectCoordinates import com.saveourtool.save.frontend.components.basic.codeeditor.codeEditorComponent import com.saveourtool.save.frontend.externals.reactace.AceThemes -import com.saveourtool.save.utils.Languages import js.core.asList import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/welcome/DemoListComponent.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/welcome/DemoListComponent.kt index d138190dca..a816ab31e0 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/welcome/DemoListComponent.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/welcome/DemoListComponent.kt @@ -4,11 +4,11 @@ package com.saveourtool.save.frontend.components.basic.demo.welcome +import com.saveourtool.common.demo.DemoDto +import com.saveourtool.common.filters.DemoFilter import com.saveourtool.frontend.common.components.basic.cardComponent import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.noopLoadingHandler -import com.saveourtool.save.demo.DemoDto -import com.saveourtool.save.filters.DemoFilter import js.core.jso import react.FC diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/welcome/FeaturedDemos.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/welcome/FeaturedDemos.kt index 5be2ed06e2..be8c92a26e 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/welcome/FeaturedDemos.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/demo/welcome/FeaturedDemos.kt @@ -4,11 +4,11 @@ package com.saveourtool.save.frontend.components.basic.demo.welcome +import com.saveourtool.common.demo.DemoDto import com.saveourtool.frontend.common.components.basic.AVATAR_BASE_URL import com.saveourtool.frontend.common.components.basic.carousel import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.noopResponseHandler -import com.saveourtool.save.demo.DemoDto import react.FC import react.Props diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/fileuploader/FileManagerComponent.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/fileuploader/FileManagerComponent.kt index 1b0ad32378..a2e30e6236 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/fileuploader/FileManagerComponent.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/fileuploader/FileManagerComponent.kt @@ -6,15 +6,15 @@ package com.saveourtool.save.frontend.components.basic.fileuploader +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.entities.FileDto +import com.saveourtool.common.utils.toMegabytes import com.saveourtool.frontend.common.components.basic.fileuploader.deleteFileButton import com.saveourtool.frontend.common.components.basic.fileuploader.downloadFileButton import com.saveourtool.frontend.common.components.inputform.dragAndDropForm import com.saveourtool.frontend.common.http.postUploadFile import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.noopLoadingHandler -import com.saveourtool.save.domain.ProjectCoordinates -import com.saveourtool.save.entities.FileDto -import com.saveourtool.save.utils.toMegabytes import js.core.asList import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/fileuploader/ProgressBarComponent.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/fileuploader/ProgressBarComponent.kt index 60d17fbb66..8beda52f52 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/fileuploader/ProgressBarComponent.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/fileuploader/ProgressBarComponent.kt @@ -6,8 +6,9 @@ package com.saveourtool.save.frontend.components.basic.fileuploader +import com.saveourtool.common.utils.toKilobytes import com.saveourtool.frontend.common.components.basic.fileuploader.defaultProgressBarComponent -import com.saveourtool.save.utils.toKilobytes + import react.FC import react.Props diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/fileuploader/SimpleFileUploader.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/fileuploader/SimpleFileUploader.kt index a256424a8c..1e1416ecec 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/fileuploader/SimpleFileUploader.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/fileuploader/SimpleFileUploader.kt @@ -6,10 +6,10 @@ package com.saveourtool.save.frontend.components.basic.fileuploader +import com.saveourtool.common.entities.FileDto import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.noopLoadingHandler -import com.saveourtool.save.entities.FileDto import react.* import react.dom.html.ReactHTML.div diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/graph/AdditionalInfoDisplayer.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/graph/AdditionalInfoDisplayer.kt index 6f14e13bd9..12c23a4c9a 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/graph/AdditionalInfoDisplayer.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/graph/AdditionalInfoDisplayer.kt @@ -4,9 +4,9 @@ package com.saveourtool.save.frontend.components.basic.graph +import com.saveourtool.common.demo.cpg.CpgNodeAdditionalInfo import com.saveourtool.frontend.common.externals.fontawesome.faTimes import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon -import com.saveourtool.save.demo.cpg.CpgNodeAdditionalInfo import js.core.jso import react.ChildrenBuilder diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/graph/CytoscapeVisualizer.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/graph/CytoscapeVisualizer.kt index 542a633427..1fd3902375 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/graph/CytoscapeVisualizer.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/graph/CytoscapeVisualizer.kt @@ -2,8 +2,8 @@ package com.saveourtool.save.frontend.components.basic.graph -import com.saveourtool.save.demo.cpg.CpgGraph -import com.saveourtool.save.demo.cpg.cytoscape.CytoscapeLayout +import com.saveourtool.common.demo.cpg.CpgGraph +import com.saveourtool.common.demo.cpg.cytoscape.CytoscapeLayout import com.saveourtool.save.frontend.externals.graph.asCytoscapeGraph import com.saveourtool.save.frontend.externals.graph.cytoscape.cytoscape import com.saveourtool.save.frontend.externals.reactace.AceMarkers diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/graph/SigmaGraphVisualizer.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/graph/SigmaGraphVisualizer.kt index cde13f1bac..f3a025c6e5 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/graph/SigmaGraphVisualizer.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/graph/SigmaGraphVisualizer.kt @@ -2,7 +2,7 @@ package com.saveourtool.save.frontend.components.basic.graph -import com.saveourtool.save.demo.cpg.CpgGraph +import com.saveourtool.common.demo.cpg.CpgGraph import com.saveourtool.save.frontend.components.basic.cpg.SigmaLayout import com.saveourtool.save.frontend.components.basic.cpg.graphEvents import com.saveourtool.save.frontend.components.basic.cpg.graphLoader diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/CreateProjectProblemView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/CreateProjectProblemView.kt index 53e60f9423..64b1336de2 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/CreateProjectProblemView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/CreateProjectProblemView.kt @@ -2,14 +2,14 @@ package com.saveourtool.save.frontend.components.basic.projects +import com.saveourtool.common.entities.ProjectProblemCritical +import com.saveourtool.common.entities.ProjectProblemDto +import com.saveourtool.common.entities.vulnerability.VulnerabilityStatus +import com.saveourtool.common.utils.isNotNull import com.saveourtool.frontend.common.components.inputform.InputTypes import com.saveourtool.frontend.common.components.inputform.inputTextFormOptional import com.saveourtool.frontend.common.components.inputform.inputTextFormRequired import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.ProjectProblemCritical -import com.saveourtool.save.entities.ProjectProblemDto -import com.saveourtool.save.entities.vulnerability.VulnerabilityStatus -import com.saveourtool.save.utils.isNotNull import js.core.jso import react.FC diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/EditProjectProblemWindow.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/EditProjectProblemWindow.kt index d3eaf4eefb..8e8164cc83 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/EditProjectProblemWindow.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/EditProjectProblemWindow.kt @@ -2,13 +2,13 @@ package com.saveourtool.save.frontend.components.basic.projects +import com.saveourtool.common.entities.ProjectProblemCritical +import com.saveourtool.common.entities.ProjectProblemDto import com.saveourtool.frontend.common.components.inputform.InputTypes import com.saveourtool.frontend.common.components.inputform.inputTextFormOptional import com.saveourtool.frontend.common.components.inputform.inputTextFormRequired import com.saveourtool.frontend.common.components.modal.modal import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.ProjectProblemCritical -import com.saveourtool.save.entities.ProjectProblemDto import js.core.jso import react.FC diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectDemoMenu.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectDemoMenu.kt index c03426334b..4735c67d69 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectDemoMenu.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectDemoMenu.kt @@ -2,17 +2,17 @@ package com.saveourtool.save.frontend.components.basic.projects +import com.saveourtool.common.demo.DemoCreationRequest +import com.saveourtool.common.demo.DemoDto +import com.saveourtool.common.demo.DemoStatus +import com.saveourtool.common.demo.RunCommandPair +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.domain.Role +import com.saveourtool.common.domain.Sdk +import com.saveourtool.common.domain.orEmpty +import com.saveourtool.common.entities.FileDto import com.saveourtool.frontend.common.components.basic.cardComponent import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.demo.DemoCreationRequest -import com.saveourtool.save.demo.DemoDto -import com.saveourtool.save.demo.DemoStatus -import com.saveourtool.save.demo.RunCommandPair -import com.saveourtool.save.domain.ProjectCoordinates -import com.saveourtool.save.domain.Role -import com.saveourtool.save.domain.Sdk -import com.saveourtool.save.domain.orEmpty -import com.saveourtool.save.entities.FileDto import com.saveourtool.save.frontend.components.basic.* import com.saveourtool.save.frontend.components.basic.demo.* import com.saveourtool.save.frontend.components.basic.demo.management.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectFilesMenu.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectFilesMenu.kt index 01fb1fb3b9..9e583fc785 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectFilesMenu.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectFilesMenu.kt @@ -2,11 +2,11 @@ package com.saveourtool.save.frontend.components.basic.projects -import com.saveourtool.save.domain.ProjectCoordinates -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.ProjectDto +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.ProjectDto +import com.saveourtool.common.info.UserInfo import com.saveourtool.save.frontend.components.basic.fileuploader.fileManagerComponent -import com.saveourtool.save.info.UserInfo import org.w3c.fetch.Response import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectInfoMenu.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectInfoMenu.kt index 39a5d02454..c7bd2b3c6d 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectInfoMenu.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectInfoMenu.kt @@ -2,6 +2,10 @@ package com.saveourtool.save.frontend.components.basic.projects +import com.saveourtool.common.entities.ProjectDto +import com.saveourtool.common.entities.contest.ContestResult +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.components.basic.* import com.saveourtool.frontend.common.components.basic.userBoard import com.saveourtool.frontend.common.externals.fontawesome.faCalendarAlt @@ -11,11 +15,7 @@ import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.get import com.saveourtool.frontend.common.utils.unsafeMap import com.saveourtool.frontend.common.utils.useRequest -import com.saveourtool.save.entities.ProjectDto -import com.saveourtool.save.entities.contest.ContestResult import com.saveourtool.save.frontend.components.basic.projectInfo -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.validation.FrontendRoutes import react.* import react.dom.html.ReactHTML.button diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectProblemView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectProblemView.kt index 00f829899f..af8245d924 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectProblemView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectProblemView.kt @@ -2,6 +2,9 @@ package com.saveourtool.save.frontend.components.basic.projects +import com.saveourtool.common.entities.CommentDto +import com.saveourtool.common.entities.ProjectProblemDto +import com.saveourtool.common.validation.FrontendCosvRoutes import com.saveourtool.frontend.common.components.basic.cardComponent import com.saveourtool.frontend.common.components.basic.commentWindow import com.saveourtool.frontend.common.components.basic.markdown @@ -10,9 +13,6 @@ import com.saveourtool.frontend.common.components.modal.displayModal import com.saveourtool.frontend.common.components.modal.mediumTransparentModalStyle import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.noopLoadingHandler -import com.saveourtool.save.entities.CommentDto -import com.saveourtool.save.entities.ProjectProblemDto -import com.saveourtool.save.validation.FrontendCosvRoutes import js.core.jso import react.FC diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectRunMenu.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectRunMenu.kt index 609fbc92f2..b7e7c1279b 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectRunMenu.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectRunMenu.kt @@ -2,22 +2,22 @@ package com.saveourtool.save.frontend.components.basic.projects +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.domain.Sdk +import com.saveourtool.common.entities.FileDto +import com.saveourtool.common.entities.ProjectDto +import com.saveourtool.common.entities.contest.ContestDto +import com.saveourtool.common.execution.TestingType +import com.saveourtool.common.request.CreateExecutionRequest +import com.saveourtool.common.testsuite.TestSuiteVersioned import com.saveourtool.frontend.common.components.basic.cardComponent import com.saveourtool.frontend.common.externals.fontawesome.faCalendarAlt import com.saveourtool.frontend.common.externals.fontawesome.faHistory import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.apiUrl -import com.saveourtool.save.domain.ProjectCoordinates -import com.saveourtool.save.domain.Sdk -import com.saveourtool.save.entities.FileDto -import com.saveourtool.save.entities.ProjectDto -import com.saveourtool.save.entities.contest.ContestDto -import com.saveourtool.save.execution.TestingType import com.saveourtool.save.frontend.components.basic.* import com.saveourtool.save.frontend.components.basic.fileuploader.simpleFileUploader -import com.saveourtool.save.request.CreateExecutionRequest -import com.saveourtool.save.testsuite.TestSuiteVersioned import react.* import react.dom.html.ReactHTML.div diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectSecurityMenu.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectSecurityMenu.kt index 1da53bb6ef..4d93d7355d 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectSecurityMenu.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectSecurityMenu.kt @@ -5,16 +5,16 @@ package com.saveourtool.save.frontend.components.basic.projects +import com.saveourtool.common.entities.ProjectDto +import com.saveourtool.common.entities.ProjectProblemDto +import com.saveourtool.common.filters.ProjectProblemFilter +import com.saveourtool.common.info.UserInfo import com.saveourtool.frontend.common.components.tables.TableProps import com.saveourtool.frontend.common.components.tables.columns import com.saveourtool.frontend.common.components.tables.tableComponent import com.saveourtool.frontend.common.components.tables.value import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.ProjectDto -import com.saveourtool.save.entities.ProjectProblemDto -import com.saveourtool.save.filters.ProjectProblemFilter -import com.saveourtool.save.info.UserInfo import react.* import react.dom.html.ReactHTML.div diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectSettingsMenu.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectSettingsMenu.kt index 47cb1cfc48..7c32b531ba 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectSettingsMenu.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectSettingsMenu.kt @@ -2,15 +2,15 @@ package com.saveourtool.save.frontend.components.basic.projects +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.ProjectDto +import com.saveourtool.common.entities.ProjectStatus +import com.saveourtool.common.info.UserInfo import com.saveourtool.frontend.common.components.basic.manageUserRoleCardComponent import com.saveourtool.frontend.common.components.inputform.InputTypes import com.saveourtool.frontend.common.components.inputform.inputTextFormOptional import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.noopLoadingHandler -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.ProjectDto -import com.saveourtool.save.entities.ProjectStatus -import com.saveourtool.save.info.UserInfo import org.w3c.fetch.Response import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectStatisticMenu.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectStatisticMenu.kt index ba33dd9f28..e5429db739 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectStatisticMenu.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/projects/ProjectStatisticMenu.kt @@ -2,13 +2,13 @@ package com.saveourtool.save.frontend.components.basic.projects +import com.saveourtool.common.agent.TestSuiteExecutionStatisticDto +import com.saveourtool.common.domain.TestResultStatus import com.saveourtool.frontend.common.components.tables.TableProps import com.saveourtool.frontend.common.components.tables.columns import com.saveourtool.frontend.common.components.tables.tableComponent import com.saveourtool.frontend.common.components.tables.value import com.saveourtool.frontend.common.utils.* -import com.saveourtool.common.agent.TestSuiteExecutionStatisticDto -import com.saveourtool.save.domain.TestResultStatus import com.saveourtool.save.frontend.externals.chart.DataPieChart import com.saveourtool.save.frontend.externals.chart.pieChart import com.saveourtool.save.frontend.externals.chart.randomColor @@ -24,7 +24,7 @@ import web.cssom.ClassName "MAGIC_NUMBER", "TYPE_ALIAS", ) -private val executionDetailsTable: FC> = tableComponent( +private val executionDetailsTable: FC> = tableComponent( columns = { columns { column(id = "name", header = "Test suite", { testSuiteName }) { @@ -72,7 +72,7 @@ external interface ProjectStatisticMenuProps : Props { /** * list of tests */ - var latestExecutionStatisticDtos: List? + var latestExecutionStatisticDtos: List? /** * Flag to open Menu @@ -99,7 +99,7 @@ private fun projectStatisticMenu() = FC { props -> loadingHandler = ::loadingHandler, ) .unsafeMap { - it.decodeFromJsonString>() + it.decodeFromJsonString>() } setLatestExecutionStatisticDtos(testLatestExecutions) } @@ -147,7 +147,7 @@ private fun projectStatisticMenu() = FC { props -> loadingHandler = ::loadingHandler, ) .unsafeMap { - it.decodeFromJsonString>() + it.decodeFromJsonString>() } } getPageCount = null diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/table/filters/TestExecutionFilter.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/table/filters/TestExecutionFilter.kt index 155516cc28..9431ff33ec 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/table/filters/TestExecutionFilter.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/basic/table/filters/TestExecutionFilter.kt @@ -2,12 +2,12 @@ package com.saveourtool.save.frontend.components.basic.table.filters +import com.saveourtool.common.domain.TestResultStatus +import com.saveourtool.common.filters.TestExecutionFilter import com.saveourtool.frontend.common.externals.fontawesome.faFilter import com.saveourtool.frontend.common.externals.fontawesome.faSearch import com.saveourtool.frontend.common.externals.fontawesome.faTrashAlt import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon -import com.saveourtool.save.domain.TestResultStatus -import com.saveourtool.save.filters.TestExecutionFilter import react.FC import react.Props diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/topbar/TopBar.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/topbar/TopBar.kt index 29c93ca7eb..f3ec69d77e 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/topbar/TopBar.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/topbar/TopBar.kt @@ -6,13 +6,13 @@ package com.saveourtool.save.frontend.components.topbar +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.components.basic.languageSelector import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.utils.UserInfoAwarePropsWithChildren import com.saveourtool.frontend.common.utils.notIn -import com.saveourtool.save.validation.FrontendRoutes -import js.core.jso +import js.core.jso import react.* import react.dom.html.ButtonHTMLAttributes import react.dom.html.ReactHTML.button diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/topbar/TopBarLinks.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/topbar/TopBarLinks.kt index a516f97106..bc73503224 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/topbar/TopBarLinks.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/topbar/TopBarLinks.kt @@ -2,8 +2,8 @@ package com.saveourtool.save.frontend.components.topbar +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.save.frontend.externals.i18next.useTranslation -import com.saveourtool.save.validation.FrontendRoutes import react.* import react.dom.html.ReactHTML.a diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/topbar/TopBarUrlSplits.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/topbar/TopBarUrlSplits.kt index 8f7be6fe8a..5462a7fbd5 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/topbar/TopBarUrlSplits.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/topbar/TopBarUrlSplits.kt @@ -2,8 +2,8 @@ package com.saveourtool.save.frontend.components.topbar +import com.saveourtool.common.utils.URL_PATH_DELIMITER import com.saveourtool.frontend.common.utils.TopBarUrl -import com.saveourtool.save.utils.URL_PATH_DELIMITER import react.FC import react.Props diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/topbar/TopBarUserField.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/topbar/TopBarUserField.kt index a6882465d6..d88789e7f0 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/topbar/TopBarUserField.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/topbar/TopBarUserField.kt @@ -4,12 +4,12 @@ package com.saveourtool.save.frontend.components.topbar +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.components.basic.avatarRenderer import com.saveourtool.frontend.common.components.modal.logoutModal import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.utils.* import com.saveourtool.save.frontend.externals.i18next.useTranslation -import com.saveourtool.save.validation.FrontendRoutes import js.core.jso import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ExecutionView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ExecutionView.kt index b8e1a51832..7cd5350121 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ExecutionView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ExecutionView.kt @@ -4,6 +4,8 @@ package com.saveourtool.save.frontend.components.views +import com.saveourtool.common.agent.TestExecutionDto +import com.saveourtool.common.agent.TestExecutionExtDto import com.saveourtool.frontend.common.components.RequestStatusContext import com.saveourtool.frontend.common.components.basic.* import com.saveourtool.frontend.common.components.requestStatusContext @@ -21,8 +23,6 @@ import com.saveourtool.frontend.common.http.getDebugInfoFor import com.saveourtool.frontend.common.http.getExecutionInfoFor import com.saveourtool.frontend.common.themes.Colors import com.saveourtool.frontend.common.utils.* -import com.saveourtool.common.agent.TestExecutionDto -import com.saveourtool.common.agent.TestExecutionExtDto import com.saveourtool.save.core.logging.describe import com.saveourtool.save.core.result.CountWarnings import com.saveourtool.save.domain.TestResultDebugInfo diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/CpgUtils.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/CpgUtils.kt index 3c8d958ee1..c84956eac3 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/CpgUtils.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/CpgUtils.kt @@ -4,12 +4,12 @@ package com.saveourtool.save.frontend.externals.graph -import com.saveourtool.save.demo.cpg.CpgEdge -import com.saveourtool.save.demo.cpg.CpgGraph -import com.saveourtool.save.demo.cpg.CpgNode -import com.saveourtool.save.demo.cpg.cytoscape.CytoscapeEdge -import com.saveourtool.save.demo.cpg.cytoscape.CytoscapeGraph -import com.saveourtool.save.demo.cpg.cytoscape.CytoscapeNode +import com.saveourtool.common.demo.cpg.CpgEdge +import com.saveourtool.common.demo.cpg.CpgGraph +import com.saveourtool.common.demo.cpg.CpgNode +import com.saveourtool.common.demo.cpg.cytoscape.CytoscapeEdge +import com.saveourtool.common.demo.cpg.cytoscape.CytoscapeGraph +import com.saveourtool.common.demo.cpg.cytoscape.CytoscapeNode import js.core.jso diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/cytoscape/CytoscapeWrapper.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/cytoscape/CytoscapeWrapper.kt index fbdf1447b5..78414f48e2 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/cytoscape/CytoscapeWrapper.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/cytoscape/CytoscapeWrapper.kt @@ -2,8 +2,8 @@ package com.saveourtool.save.frontend.externals.graph.cytoscape -import com.saveourtool.save.demo.cpg.cytoscape.CytoscapeGraph -import com.saveourtool.save.demo.cpg.cytoscape.CytoscapeLayout +import com.saveourtool.common.demo.cpg.cytoscape.CytoscapeGraph +import com.saveourtool.common.demo.cpg.cytoscape.CytoscapeLayout import react.* import web.cssom.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/i18next/I18n.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/i18next/I18n.kt index e9068604b5..946265e718 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/i18next/I18n.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/i18next/I18n.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.frontend.externals.i18next -import com.saveourtool.save.frontend.PlatformLanguages +import com.saveourtool.common.frontend.PlatformLanguages /** * Class that represents i18n object diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/i18next/Translation.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/i18next/Translation.kt index 7884456737..7dc1289e6c 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/i18next/Translation.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/i18next/Translation.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.frontend.externals.i18next +import com.saveourtool.common.frontend.PlatformLanguages import com.saveourtool.frontend.common.externals.cookie.cookie import com.saveourtool.frontend.common.externals.cookie.isAccepted import com.saveourtool.frontend.common.externals.cookie.saveLanguageCode -import com.saveourtool.save.frontend.PlatformLanguages typealias TranslationFunction = String.() -> String diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/reactace/AceBuilder.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/reactace/AceBuilder.kt index c59ec1fac6..4d6ee1c1e8 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/reactace/AceBuilder.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/reactace/AceBuilder.kt @@ -2,9 +2,9 @@ package com.saveourtool.save.frontend.externals.reactace +import com.saveourtool.common.utils.DEBOUNCE_PERIOD_FOR_EDITORS +import com.saveourtool.common.utils.Languages import com.saveourtool.frontend.common.utils.parsePositionString -import com.saveourtool.save.utils.DEBOUNCE_PERIOD_FOR_EDITORS -import com.saveourtool.save.utils.Languages import io.github.petertrr.diffutils.diff import js.core.jso diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/routing/BasicRouting.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/routing/BasicRouting.kt index 332ea7ee33..43408b5a77 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/routing/BasicRouting.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/routing/BasicRouting.kt @@ -6,6 +6,10 @@ package com.saveourtool.save.frontend.routing +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.domain.TestResultStatus +import com.saveourtool.common.filters.TestExecutionFilter +import com.saveourtool.common.validation.FrontendRoutes.* import com.saveourtool.frontend.common.components.views.AboutUsView import com.saveourtool.frontend.common.components.views.FallbackView import com.saveourtool.frontend.common.components.views.organization.createOrganizationView @@ -16,9 +20,6 @@ import com.saveourtool.frontend.common.components.views.userprofile.userProfileV import com.saveourtool.frontend.common.components.views.usersettings.* import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.isSuperAdmin -import com.saveourtool.save.domain.ProjectCoordinates -import com.saveourtool.save.domain.TestResultStatus -import com.saveourtool.save.filters.TestExecutionFilter import com.saveourtool.save.frontend.components.basic.projects.createProjectProblem import com.saveourtool.save.frontend.components.basic.projects.projectProblem import com.saveourtool.save.frontend.components.views.* @@ -32,7 +33,6 @@ import com.saveourtool.save.frontend.components.views.index.indexView import com.saveourtool.save.frontend.components.views.projectcollection.CollectionView import com.saveourtool.save.frontend.components.views.welcome.saveWelcomeView import com.saveourtool.save.frontend.utils.SaveOrganizationType -import com.saveourtool.save.validation.FrontendRoutes.* import org.w3c.dom.url.URLSearchParams import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/routing/MobileRouting.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/routing/MobileRouting.kt index 51013da9b3..03beb05a60 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/routing/MobileRouting.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/routing/MobileRouting.kt @@ -4,9 +4,10 @@ package com.saveourtool.save.frontend.routing +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.components.mobile.AboutUsMobileView import com.saveourtool.frontend.common.components.mobile.saveWelcomeMobileView -import com.saveourtool.save.validation.FrontendRoutes + import react.FC import react.Props import react.create diff --git a/save-frontend/src/test/kotlin/com/saveourtool/save/frontend/components/basic/ExecutionStatisticsValuesTest.kt b/save-frontend/src/test/kotlin/com/saveourtool/save/frontend/components/basic/ExecutionStatisticsValuesTest.kt index faed360449..ccc389811b 100644 --- a/save-frontend/src/test/kotlin/com/saveourtool/save/frontend/components/basic/ExecutionStatisticsValuesTest.kt +++ b/save-frontend/src/test/kotlin/com/saveourtool/save/frontend/components/basic/ExecutionStatisticsValuesTest.kt @@ -1,8 +1,8 @@ package com.saveourtool.save.frontend.components.basic -import com.saveourtool.save.execution.ExecutionDto -import com.saveourtool.save.execution.ExecutionStatus -import com.saveourtool.save.execution.TestingType +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.execution.ExecutionStatus +import com.saveourtool.common.execution.TestingType import kotlin.test.Test import kotlin.test.assertEquals diff --git a/save-frontend/src/test/kotlin/com/saveourtool/save/frontend/components/topbar/TopBarTest.kt b/save-frontend/src/test/kotlin/com/saveourtool/save/frontend/components/topbar/TopBarTest.kt index e3e82fd798..5abc1903b0 100644 --- a/save-frontend/src/test/kotlin/com/saveourtool/save/frontend/components/topbar/TopBarTest.kt +++ b/save-frontend/src/test/kotlin/com/saveourtool/save/frontend/components/topbar/TopBarTest.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.frontend.components.topbar import com.saveourtool.save.frontend.externals.* -import com.saveourtool.save.info.UserInfo +import com.saveourtool.common.info.UserInfo import web.html.HTMLDivElement import web.html.HTMLSpanElement diff --git a/save-frontend/src/test/kotlin/com/saveourtool/save/frontend/components/views/ProjectViewTest.kt b/save-frontend/src/test/kotlin/com/saveourtool/save/frontend/components/views/ProjectViewTest.kt index e513a82897..11b8cb8b29 100644 --- a/save-frontend/src/test/kotlin/com/saveourtool/save/frontend/components/views/ProjectViewTest.kt +++ b/save-frontend/src/test/kotlin/com/saveourtool/save/frontend/components/views/ProjectViewTest.kt @@ -1,12 +1,12 @@ package com.saveourtool.save.frontend.components.views -import com.saveourtool.save.domain.Role -import com.saveourtool.save.entities.* +import com.saveourtool.common.domain.Role +import com.saveourtool.common.entities.* import com.saveourtool.save.frontend.externals.* import com.saveourtool.frontend.common.utils.apiUrl import com.saveourtool.save.frontend.utils.mockMswResponse import com.saveourtool.save.frontend.utils.wrapper -import com.saveourtool.save.info.UserInfo +import com.saveourtool.common.info.UserInfo import kotlinx.datetime.LocalDateTime import react.create diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/Utils.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/Utils.kt index 72658091fd..f450a71733 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/Utils.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/Utils.kt @@ -92,12 +92,12 @@ internal fun DockerClient.findImage(imageId: String, meterRegistry: MeterRegistr internal fun fillAgentPropertiesFromConfiguration( agentSettings: AgentSettings, executionId: Long, -): Map = buildMap { - put(com.saveourtool.common.agent.AgentEnvName.EXECUTION_ID, executionId.toString()) +): Map = buildMap { + put(AgentEnvName.EXECUTION_ID, executionId.toString()) with(agentSettings) { - put(com.saveourtool.common.agent.AgentEnvName.HEARTBEAT_URL, heartbeatUrl) - debug?.let { put(com.saveourtool.common.agent.AgentEnvName.DEBUG, it.toString()) } + put(AgentEnvName.HEARTBEAT_URL, heartbeatUrl) + debug?.let { put(AgentEnvName.DEBUG, it.toString()) } } } diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/config/JsonConfig.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/config/JsonConfig.kt index fa7fe8d8e7..5742fdfd57 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/config/JsonConfig.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/config/JsonConfig.kt @@ -7,8 +7,8 @@ package com.saveourtool.save.orchestrator.config import com.saveourtool.common.domain.supportTestStatus -import com.saveourtool.save.utils.supportJLocalDateTime -import com.saveourtool.save.utils.supportKLocalDateTime +import com.saveourtool.common.utils.supportJLocalDateTime +import com.saveourtool.common.utils.supportKLocalDateTime import com.fasterxml.jackson.databind.SerializationFeature import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/config/KafkaConfiguration.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/config/KafkaConfiguration.kt index 686436f878..e5dec904c1 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/config/KafkaConfiguration.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/config/KafkaConfiguration.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.orchestrator.config -import com.saveourtool.save.kafka.TestExecutionTaskDto +import com.saveourtool.common.kafka.TestExecutionTaskDto import com.saveourtool.save.orchestrator.kafka.AgentKafkaListener import com.saveourtool.save.orchestrator.kafka.KafkaSender import org.apache.kafka.clients.admin.NewTopic diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/AgentsController.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/AgentsController.kt index 261b807338..796018f126 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/AgentsController.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/AgentsController.kt @@ -1,12 +1,12 @@ package com.saveourtool.save.orchestrator.controller -import com.saveourtool.save.execution.ExecutionStatus +import com.saveourtool.common.execution.ExecutionStatus +import com.saveourtool.common.request.RunExecutionRequest +import com.saveourtool.common.utils.EmptyResponse +import com.saveourtool.common.utils.info import com.saveourtool.save.orchestrator.runner.ContainerRunnerException import com.saveourtool.save.orchestrator.service.AgentService import com.saveourtool.save.orchestrator.service.ContainerService -import com.saveourtool.save.request.RunExecutionRequest -import com.saveourtool.save.utils.EmptyResponse -import com.saveourtool.save.utils.info import org.slf4j.LoggerFactory import org.springframework.http.HttpStatus diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/HeartbeatController.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/HeartbeatController.kt index 756e611f4e..7e5560064d 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/HeartbeatController.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/HeartbeatController.kt @@ -4,15 +4,15 @@ package com.saveourtool.save.orchestrator.controller -import com.saveourtool.save.agent.* +import com.saveourtool.common.agent.* import com.saveourtool.common.agent.AgentState.* -import com.saveourtool.save.entities.AgentDto -import com.saveourtool.save.entities.AgentStatusDto +import com.saveourtool.common.entities.AgentDto +import com.saveourtool.common.entities.AgentStatusDto +import com.saveourtool.common.utils.* import com.saveourtool.save.orchestrator.config.ConfigProperties import com.saveourtool.save.orchestrator.service.AgentService import com.saveourtool.save.orchestrator.service.ContainerService import com.saveourtool.save.orchestrator.service.HeartBeatInspector -import com.saveourtool.save.utils.* import org.slf4j.Logger import org.springframework.web.bind.annotation.PostMapping @@ -78,24 +78,24 @@ class HeartbeatController( FINISHED -> agentService.checkSavedData(containerId).flatMap { isSavingSuccessful -> handleFinishedAgent(executionId, containerId, isSavingSuccessful) } - BUSY -> Mono.just(com.saveourtool.common.agent.ContinueResponse) - BACKEND_FAILURE, BACKEND_UNREACHABLE, CLI_FAILED -> Mono.just(com.saveourtool.common.agent.WaitResponse) + BUSY -> Mono.just(ContinueResponse) + BACKEND_FAILURE, BACKEND_UNREACHABLE, CLI_FAILED -> Mono.just(WaitResponse) CRASHED, TERMINATED -> Mono.fromCallable { handleIllegallyOnlineAgent(containerId, heartbeat.state) - com.saveourtool.common.agent.TerminateResponse + TerminateResponse } } } // Heartbeat couldn't be processed, agent should replay it current state on the next heartbeat. - .defaultIfEmpty(com.saveourtool.common.agent.ContinueResponse) + .defaultIfEmpty(ContinueResponse) .map { - Json.encodeToString(com.saveourtool.common.agent.HeartbeatResponse.serializer(), it) + Json.encodeToString(HeartbeatResponse.serializer(), it) } } private fun addNewAgent( executionId: Long, - agentInfo: com.saveourtool.common.agent.AgentInfo, + agentInfo: AgentInfo, ): Mono = agentService.addAgent( executionId = executionId, agent = AgentDto( @@ -109,9 +109,9 @@ class HeartbeatController( containerService.cleanupAllByExecution(executionId) } - private fun handleNotInitializedAgent(containerId: String): Mono = agentService.getInitConfig(containerId) + private fun handleNotInitializedAgent(containerId: String): Mono = agentService.getInitConfig(containerId) - private fun handleVacantAgent(executionId: Long, containerId: String): Mono = + private fun handleVacantAgent(executionId: Long, containerId: String): Mono = agentService.getNextRunConfig(containerId) .asyncEffect { agentService.updateAgentStatus(AgentStatusDto(BUSY, containerId)) @@ -124,31 +124,33 @@ class HeartbeatController( .filter { it } .flatMap { agentService.updateAgentStatus(AgentStatusDto(TERMINATED, containerId)) - .thenReturn(com.saveourtool.common.agent.TerminateResponse) - .defaultIfEmpty(com.saveourtool.common.agent.ContinueResponse) + .thenReturn(TerminateResponse) + .defaultIfEmpty(ContinueResponse) .doOnSuccess { - log.info("Agent id=$containerId will receive ${com.saveourtool.common.agent.TerminateResponse::class.simpleName} and should shutdown gracefully") + log.info( + "Agent id=$containerId will receive ${TerminateResponse::class.simpleName} and should shutdown gracefully" + ) ensureGracefulShutdown(executionId, containerId) } } - .defaultIfEmpty(com.saveourtool.common.agent.WaitResponse) + .defaultIfEmpty(WaitResponse) } private fun handleFinishedAgent( executionId: Long, containerId: String, isSavingSuccessful: Boolean - ): Mono = if (isSavingSuccessful) { + ): Mono = if (isSavingSuccessful) { handleVacantAgent(executionId, containerId) } else { // Agent finished its work, however only part of results were received, other should be marked as failed agentService.markReadyForTestingTestExecutionsOfAgentAsFailed(containerId) .subscribeOn(agentService.scheduler) .subscribe() - Mono.just(com.saveourtool.common.agent.WaitResponse) + Mono.just(WaitResponse) } - private fun handleIllegallyOnlineAgent(containerId: String, state: com.saveourtool.common.agent.AgentState) { + private fun handleIllegallyOnlineAgent(containerId: String, state: AgentState) { log.warn("Agent with containerId=$containerId sent $state status, but should be offline in that case!") heartBeatInspector.watchCrashedAgent(containerId) } @@ -165,12 +167,12 @@ class HeartbeatController( .doOnNext { successfullyStopped -> if (!successfullyStopped) { log.warn { - "Agent with containerId=$containerId is not stopped in $shutdownTimeoutSeconds seconds after ${com.saveourtool.common.agent.TerminateResponse::class.simpleName} signal," + + "Agent with containerId=$containerId is not stopped in $shutdownTimeoutSeconds seconds after ${TerminateResponse::class.simpleName} signal," + " will add it to crashed list" } heartBeatInspector.watchCrashedAgent(containerId) } else { - log.debug { "Agent with containerId=$containerId has stopped after ${com.saveourtool.common.agent.TerminateResponse::class.simpleName} signal" } + log.debug { "Agent with containerId=$containerId has stopped after ${TerminateResponse::class.simpleName} signal" } heartBeatInspector.unwatchAgent(containerId) } // Update final execution status, perform cleanup etc. diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/KafkaController.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/KafkaController.kt index 3944f9aa11..4f443f1f9c 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/KafkaController.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/controller/KafkaController.kt @@ -1,8 +1,9 @@ package com.saveourtool.save.orchestrator.controller -import com.saveourtool.save.kafka.TestExecutionTaskDto -import com.saveourtool.save.orchestrator.kafka.KafkaSender +import com.saveourtool.common.kafka.TestExecutionTaskDto import com.saveourtool.common.v1 +import com.saveourtool.save.orchestrator.kafka.KafkaSender + import org.springframework.context.annotation.Profile import org.springframework.web.bind.annotation.PostMapping import org.springframework.web.bind.annotation.RequestBody @@ -14,7 +15,7 @@ import org.springframework.web.bind.annotation.RestController */ @Profile("dev & kafka") @RestController -@RequestMapping(path = ["/api/${com.saveourtool.common.v1}/kafka"]) +@RequestMapping(path = ["/api/$v1/kafka"]) internal class KafkaController( private val testExecutionSender: KafkaSender ) { diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/docker/DockerContainerRunner.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/docker/DockerContainerRunner.kt index 8e032a709b..a7c8fc8c18 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/docker/DockerContainerRunner.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/docker/DockerContainerRunner.kt @@ -1,6 +1,8 @@ package com.saveourtool.save.orchestrator.docker import com.saveourtool.common.agent.AgentEnvName +import com.saveourtool.common.utils.debug +import com.saveourtool.common.utils.getLogger import com.saveourtool.save.orchestrator.DOCKER_METRIC_PREFIX import com.saveourtool.save.orchestrator.config.ConfigProperties import com.saveourtool.save.orchestrator.config.ConfigProperties.DockerSettings @@ -12,8 +14,6 @@ import com.saveourtool.save.orchestrator.runner.ContainerRunnerException import com.saveourtool.save.orchestrator.runner.EXECUTION_DIR import com.saveourtool.save.orchestrator.runner.SAVE_AGENT_USER_HOME import com.saveourtool.save.orchestrator.service.ContainerService -import com.saveourtool.save.utils.debug -import com.saveourtool.save.utils.getLogger import com.github.dockerjava.api.DockerClient import com.github.dockerjava.api.command.CopyArchiveToContainerCmd @@ -137,7 +137,7 @@ class DockerContainerRunner( val runCmd = configuration.runCmd val envFileTargetPath = "$SAVE_AGENT_USER_HOME/.env" val envVariables = configuration.env.mapToEnvs() + - com.saveourtool.common.agent.AgentEnvName.CONTAINER_NAME.toEnv(containerName) + + AgentEnvName.CONTAINER_NAME.toEnv(containerName) + kubernetesEnv // createContainerCmd accepts image name, not id, so we retrieve it from tags @@ -182,7 +182,7 @@ class DockerContainerRunner( val containerId = createContainerCmdResponse.id val envFile = createTempDirectory("orchestrator").resolve(envFileTargetPath.substringAfterLast("/")).apply { writeText(""" - ${com.saveourtool.common.agent.AgentEnvName.CONTAINER_ID.name}=$containerId + ${AgentEnvName.CONTAINER_ID.name}=$containerId """.trimIndent() ) } @@ -218,10 +218,10 @@ class DockerContainerRunner( companion object { private val log: Logger = getLogger() private const val RUNNING_STATUS = "running" - private val kubernetesEnv: String = com.saveourtool.common.agent.AgentEnvName.KUBERNETES.toEnv(false) + private val kubernetesEnv: String = AgentEnvName.KUBERNETES.toEnv(false) - private fun Map.mapToEnvs(): List = entries.map { (key, value) -> key.toEnv(value) } + private fun Map.mapToEnvs(): List = entries.map { (key, value) -> key.toEnv(value) } - private fun com.saveourtool.common.agent.AgentEnvName.toEnv(value: Any): String = "${this.name}=$value" + private fun AgentEnvName.toEnv(value: Any): String = "${this.name}=$value" } } diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/kafka/AgentKafkaListener.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/kafka/AgentKafkaListener.kt index 831ac0c52a..442bbfb944 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/kafka/AgentKafkaListener.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/kafka/AgentKafkaListener.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.orchestrator.kafka -import com.saveourtool.save.kafka.TestExecutionTaskDto +import com.saveourtool.common.kafka.TestExecutionTaskDto import org.slf4j.LoggerFactory import org.springframework.kafka.annotation.KafkaHandler import org.springframework.kafka.annotation.KafkaListener diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/kubernetes/KubernetesManager.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/kubernetes/KubernetesManager.kt index cc3f0a285a..3fc17d1329 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/kubernetes/KubernetesManager.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/kubernetes/KubernetesManager.kt @@ -1,12 +1,12 @@ package com.saveourtool.save.orchestrator.kubernetes import com.saveourtool.common.agent.AgentEnvName +import com.saveourtool.common.utils.debug +import com.saveourtool.common.utils.warn import com.saveourtool.save.orchestrator.config.ConfigProperties import com.saveourtool.save.orchestrator.runner.ContainerRunner import com.saveourtool.save.orchestrator.runner.ContainerRunnerException import com.saveourtool.save.orchestrator.service.ContainerService -import com.saveourtool.save.utils.debug -import com.saveourtool.save.utils.warn import io.fabric8.kubernetes.api.model.* import io.fabric8.kubernetes.api.model.batch.v1.Job @@ -148,7 +148,7 @@ class KubernetesManager( imageName: String, agentRunCmd: List, workingDir: String, - env: Map, + env: Map, ) = Container().apply { name = "save-agent-pod" image = imageName @@ -179,7 +179,7 @@ class KubernetesManager( companion object { private val logger = LoggerFactory.getLogger(KubernetesManager::class.java) private const val EXECUTION_ID_LABEL = "executionId" - private val containerIdEnv = setOf(com.saveourtool.common.agent.AgentEnvName.CONTAINER_ID, com.saveourtool.common.agent.AgentEnvName.CONTAINER_NAME) + private val containerIdEnv = setOf(AgentEnvName.CONTAINER_ID, AgentEnvName.CONTAINER_NAME) .map { it.name } .map { envName -> EnvVar().apply { @@ -191,11 +191,11 @@ class KubernetesManager( } } } - private val kubernetesEnv: EnvVar = com.saveourtool.common.agent.AgentEnvName.KUBERNETES.toEnv(true) + private val kubernetesEnv: EnvVar = AgentEnvName.KUBERNETES.toEnv(true) - private fun Map.mapToEnvs(): List = entries.map { (key, value) -> key.toEnv(value) } + private fun Map.mapToEnvs(): List = entries.map { (key, value) -> key.toEnv(value) } - private fun com.saveourtool.common.agent.AgentEnvName.toEnv(value: Any): EnvVar = EnvVar().apply { + private fun AgentEnvName.toEnv(value: Any): EnvVar = EnvVar().apply { this.name = this@toEnv.name this.value = value.toString() } diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/AgentService.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/AgentService.kt index 60c3ac64b4..1b97426ebb 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/AgentService.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/AgentService.kt @@ -1,15 +1,16 @@ package com.saveourtool.save.orchestrator.service -import com.saveourtool.save.agent.* +import com.saveourtool.common.agent.* import com.saveourtool.common.agent.AgentState.* -import com.saveourtool.save.entities.AgentDto -import com.saveourtool.save.entities.AgentStatus -import com.saveourtool.save.entities.AgentStatusDto -import com.saveourtool.save.execution.ExecutionStatus +import com.saveourtool.common.entities.AgentDto +import com.saveourtool.common.entities.AgentStatus +import com.saveourtool.common.entities.AgentStatusDto +import com.saveourtool.common.execution.ExecutionStatus +import com.saveourtool.common.utils.* import com.saveourtool.save.orchestrator.config.ConfigProperties import com.saveourtool.save.orchestrator.runner.ContainerRunner import com.saveourtool.save.orchestrator.utils.AgentStatusInMemoryRepository -import com.saveourtool.save.utils.* + import org.slf4j.LoggerFactory import org.springframework.stereotype.Service import org.springframework.web.reactive.function.client.WebClientException @@ -17,6 +18,7 @@ import reactor.core.publisher.Mono import reactor.core.scheduler.Scheduler import reactor.core.scheduler.Schedulers import reactor.kotlin.core.publisher.onErrorResume + import java.time.Duration /** @@ -40,9 +42,9 @@ class AgentService( * @param containerId * @return [Mono] of [InitResponse] */ - internal fun getInitConfig(containerId: String): Mono = + internal fun getInitConfig(containerId: String): Mono = orchestratorAgentService.getInitConfig(containerId) - .map { com.saveourtool.common.agent.InitResponse(it) } + .map { InitResponse(it) } /** * Sets new tests ids @@ -50,9 +52,9 @@ class AgentService( * @param containerId * @return [Mono] of [NewJobResponse] if there is some job to do or [Mono.empty] */ - internal fun getNextRunConfig(containerId: String): Mono = + internal fun getNextRunConfig(containerId: String): Mono = orchestratorAgentService.getNextRunConfig(containerId) - .map { com.saveourtool.common.agent.NewJobResponse(it) } + .map { NewJobResponse(it) } /** * Save new agent to the DB @@ -233,7 +235,7 @@ class AgentService( private fun Collection.areFinishedOrStopped() = areAllStatesIn(*finishedOrStoppedStates) - private fun Collection.areAllStatesIn(vararg states: com.saveourtool.common.agent.AgentState) = all { it.state in states } + private fun Collection.areAllStatesIn(vararg states: AgentState) = all { it.state in states } companion object { private val log = LoggerFactory.getLogger(AgentService::class.java) diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/ContainerService.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/ContainerService.kt index 862a0dabc6..a1684d8b0f 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/ContainerService.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/ContainerService.kt @@ -1,19 +1,19 @@ package com.saveourtool.save.orchestrator.service import com.saveourtool.common.agent.AgentEnvName -import com.saveourtool.save.entities.Execution -import com.saveourtool.save.execution.ExecutionStatus +import com.saveourtool.common.entities.Execution +import com.saveourtool.common.execution.ExecutionStatus +import com.saveourtool.common.request.RunExecutionRequest +import com.saveourtool.common.storage.impl.InternalFileKey +import com.saveourtool.common.utils.downloadAndRunAgentCommand +import com.saveourtool.common.utils.info +import com.saveourtool.common.utils.waitReactivelyUntil import com.saveourtool.save.orchestrator.config.ConfigProperties import com.saveourtool.save.orchestrator.fillAgentPropertiesFromConfiguration import com.saveourtool.save.orchestrator.runner.ContainerRunner import com.saveourtool.save.orchestrator.runner.ContainerRunnerException import com.saveourtool.save.orchestrator.runner.EXECUTION_DIR import com.saveourtool.save.orchestrator.utils.AgentStatusInMemoryRepository -import com.saveourtool.save.request.RunExecutionRequest -import com.saveourtool.save.storage.impl.InternalFileKey -import com.saveourtool.save.utils.downloadAndRunAgentCommand -import com.saveourtool.save.utils.info -import com.saveourtool.save.utils.waitReactivelyUntil import org.slf4j.LoggerFactory import org.springframework.stereotype.Service @@ -141,7 +141,7 @@ class ContainerService( val imageTag: String, val runCmd: List, val workingDir: String = EXECUTION_DIR, - val env: Map, + val env: Map, ) companion object { diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/HeartBeatInspector.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/HeartBeatInspector.kt index 263f2598f0..f894bd3c3a 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/HeartBeatInspector.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/HeartBeatInspector.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.orchestrator.service import com.saveourtool.common.agent.Heartbeat -import com.saveourtool.save.entities.AgentStatusDto +import com.saveourtool.common.entities.AgentStatusDto import com.saveourtool.save.orchestrator.utils.AgentStatusInMemoryRepository import org.slf4j.LoggerFactory @@ -23,7 +23,7 @@ class HeartBeatInspector( * * @param heartbeat */ - fun updateAgentHeartbeatTimeStamps(heartbeat: com.saveourtool.common.agent.Heartbeat) { + fun updateAgentHeartbeatTimeStamps(heartbeat: Heartbeat) { agentStatusInMemoryRepository.upsert( executionId = heartbeat.executionProgress.executionId, AgentStatusDto( diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/OrchestratorAgentService.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/OrchestratorAgentService.kt index 2987799c2e..6be5e2ac5e 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/OrchestratorAgentService.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/service/OrchestratorAgentService.kt @@ -3,14 +3,14 @@ package com.saveourtool.save.orchestrator.service import com.saveourtool.common.agent.AgentInitConfig import com.saveourtool.common.agent.AgentRunConfig import com.saveourtool.common.agent.TestExecutionDto -import com.saveourtool.save.entities.* -import com.saveourtool.save.execution.ExecutionStatus -import com.saveourtool.save.test.TestBatch -import com.saveourtool.save.utils.EmptyResponse +import com.saveourtool.common.entities.* +import com.saveourtool.common.execution.ExecutionStatus +import com.saveourtool.common.test.TestBatch +import com.saveourtool.common.utils.EmptyResponse import reactor.core.publisher.Mono -typealias TestExecutionList = List +typealias TestExecutionList = List /** * Repository to work with agents @@ -22,7 +22,7 @@ interface OrchestratorAgentService { * @param containerId * @return [Mono] of [AgentInitConfig] */ - fun getInitConfig(containerId: String): Mono + fun getInitConfig(containerId: String): Mono /** * Gets new tests ids @@ -30,7 +30,7 @@ interface OrchestratorAgentService { * @param containerId * @return [Mono] of [TestBatch] */ - fun getNextRunConfig(containerId: String): Mono + fun getNextRunConfig(containerId: String): Mono /** * Save new agents to the DB and insert their statuses diff --git a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/utils/AgentStatusInMemoryRepository.kt b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/utils/AgentStatusInMemoryRepository.kt index 5bfe5eded7..25a6f1fc01 100644 --- a/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/utils/AgentStatusInMemoryRepository.kt +++ b/save-orchestrator-common/src/main/kotlin/com/saveourtool/save/orchestrator/utils/AgentStatusInMemoryRepository.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.orchestrator.utils -import com.saveourtool.save.entities.AgentStatusDto +import com.saveourtool.common.entities.AgentStatusDto +import com.saveourtool.common.utils.debug +import com.saveourtool.common.utils.getCurrentLocalDateTime import com.saveourtool.save.orchestrator.config.ConfigProperties -import com.saveourtool.save.utils.debug -import com.saveourtool.save.utils.getCurrentLocalDateTime import org.slf4j.Logger import org.slf4j.LoggerFactory diff --git a/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/controller/agents/AgentsControllerTest.kt b/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/controller/agents/AgentsControllerTest.kt index 3bfd203fe4..04c5183a1a 100644 --- a/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/controller/agents/AgentsControllerTest.kt +++ b/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/controller/agents/AgentsControllerTest.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.orchestrator.controller.agents -import com.saveourtool.save.entities.Execution -import com.saveourtool.save.entities.Project -import com.saveourtool.save.execution.ExecutionStatus -import com.saveourtool.save.execution.TestingType +import com.saveourtool.common.entities.Execution +import com.saveourtool.common.entities.Project +import com.saveourtool.common.execution.ExecutionStatus +import com.saveourtool.common.execution.TestingType import com.saveourtool.save.orchestrator.controller.AgentsController import com.saveourtool.save.orchestrator.runner.ContainerRunner import com.saveourtool.save.orchestrator.runner.EXECUTION_DIR diff --git a/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/controller/heartbeat/HeartbeatControllerTest.kt b/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/controller/heartbeat/HeartbeatControllerTest.kt index 94a0891930..88b7e1f1d7 100644 --- a/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/controller/heartbeat/HeartbeatControllerTest.kt +++ b/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/controller/heartbeat/HeartbeatControllerTest.kt @@ -1,16 +1,16 @@ package com.saveourtool.save.orchestrator.controller.heartbeat -import com.saveourtool.save.agent.* -import com.saveourtool.save.domain.TestResultStatus -import com.saveourtool.save.entities.* +import com.saveourtool.common.agent.* +import com.saveourtool.common.domain.TestResultStatus +import com.saveourtool.common.entities.* import com.saveourtool.save.orchestrator.config.JsonConfig import com.saveourtool.save.orchestrator.controller.HeartbeatController import com.saveourtool.save.orchestrator.runner.ContainerRunner import com.saveourtool.save.orchestrator.service.* import com.saveourtool.save.orchestrator.utils.AgentStatusInMemoryRepository import com.saveourtool.save.orchestrator.utils.emptyResponseAsMono -import com.saveourtool.save.test.TestBatch -import com.saveourtool.save.test.TestDto +import com.saveourtool.common.test.TestBatch +import com.saveourtool.common.test.TestDto import io.kotest.matchers.collections.* import io.kotest.matchers.shouldNot import kotlinx.datetime.LocalDateTime diff --git a/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/docker/DockerContainerManagerTest.kt b/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/docker/DockerContainerManagerTest.kt index aa0c3b178e..7154c24764 100644 --- a/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/docker/DockerContainerManagerTest.kt +++ b/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/docker/DockerContainerManagerTest.kt @@ -9,8 +9,8 @@ import com.saveourtool.save.orchestrator.runner.ContainerRunnerException import com.saveourtool.save.orchestrator.service.OrchestratorAgentService import com.saveourtool.save.orchestrator.utils.DockerClientTestConfiguration import com.saveourtool.save.orchestrator.utils.silentlyCleanupContainer -import com.saveourtool.save.utils.error -import com.saveourtool.save.utils.getLogger +import com.saveourtool.common.utils.error +import com.saveourtool.common.utils.getLogger import org.junit.jupiter.api.* import org.slf4j.Logger import org.springframework.beans.factory.annotation.Autowired diff --git a/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/docker/KubernetesManagerTest.kt b/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/docker/KubernetesManagerTest.kt index 1001f2f350..2bcf20d172 100644 --- a/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/docker/KubernetesManagerTest.kt +++ b/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/docker/KubernetesManagerTest.kt @@ -3,8 +3,8 @@ package com.saveourtool.save.orchestrator.docker import com.saveourtool.save.orchestrator.config.ConfigProperties import com.saveourtool.save.orchestrator.kubernetes.KubernetesManager import com.saveourtool.save.orchestrator.service.OrchestratorAgentService -import com.saveourtool.save.utils.debug -import com.saveourtool.save.utils.getLogger +import com.saveourtool.common.utils.debug +import com.saveourtool.common.utils.getLogger import io.fabric8.kubernetes.api.model.batch.v1.JobBuilder import io.fabric8.kubernetes.client.KubernetesClient diff --git a/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/service/ContainerServiceTest.kt b/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/service/ContainerServiceTest.kt index 18449848d3..f4371a52d4 100644 --- a/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/service/ContainerServiceTest.kt +++ b/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/service/ContainerServiceTest.kt @@ -3,9 +3,9 @@ package com.saveourtool.save.orchestrator.service import com.github.dockerjava.api.DockerClient import com.github.dockerjava.api.async.ResultCallback import com.github.dockerjava.api.model.* -import com.saveourtool.save.entities.Execution -import com.saveourtool.save.entities.Project -import com.saveourtool.save.execution.ExecutionStatus +import com.saveourtool.common.entities.Execution +import com.saveourtool.common.entities.Project +import com.saveourtool.common.execution.ExecutionStatus import com.saveourtool.save.orchestrator.docker.DockerContainerRunner import com.saveourtool.save.orchestrator.runner.ContainerRunnerException import com.saveourtool.save.orchestrator.utils.DockerClientTestConfiguration @@ -13,7 +13,7 @@ import com.saveourtool.save.orchestrator.utils.MockserverExtension import com.saveourtool.save.orchestrator.utils.MockserverExtension.Companion.MOCKSERVER_MOCK_URL import com.saveourtool.save.orchestrator.utils.silentlyCleanupContainer -import com.saveourtool.save.utils.error +import com.saveourtool.common.utils.error import org.junit.jupiter.api.* import org.junit.jupiter.api.extension.ExtendWith import org.junit.jupiter.api.io.TempDir diff --git a/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/utils/TestUtils.kt b/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/utils/TestUtils.kt index 3bc9857244..c6a3309f62 100644 --- a/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/utils/TestUtils.kt +++ b/save-orchestrator-common/src/test/kotlin/com/saveourtool/save/orchestrator/utils/TestUtils.kt @@ -7,7 +7,7 @@ package com.saveourtool.save.orchestrator.utils import com.github.dockerjava.api.DockerClient import com.github.dockerjava.api.command.SyncDockerCmd import com.github.dockerjava.api.exception.DockerException -import com.saveourtool.save.utils.EmptyResponse +import com.saveourtool.common.utils.EmptyResponse import org.springframework.http.ResponseEntity import reactor.core.publisher.Mono diff --git a/save-orchestrator/src/main/kotlin/com/saveourtool/save/orchestrator/service/BackendOrchestratorAgentService.kt b/save-orchestrator/src/main/kotlin/com/saveourtool/save/orchestrator/service/BackendOrchestratorAgentService.kt index 1ae73d9f4c..7cb858fb87 100644 --- a/save-orchestrator/src/main/kotlin/com/saveourtool/save/orchestrator/service/BackendOrchestratorAgentService.kt +++ b/save-orchestrator/src/main/kotlin/com/saveourtool/save/orchestrator/service/BackendOrchestratorAgentService.kt @@ -2,15 +2,15 @@ package com.saveourtool.save.orchestrator.service import com.saveourtool.common.agent.AgentInitConfig import com.saveourtool.common.agent.AgentRunConfig -import com.saveourtool.save.domain.TestResultStatus -import com.saveourtool.save.entities.AgentDto -import com.saveourtool.save.entities.AgentStatusDto -import com.saveourtool.save.entities.AgentStatusDtoList -import com.saveourtool.save.execution.ExecutionDto -import com.saveourtool.save.execution.ExecutionStatus -import com.saveourtool.save.execution.ExecutionUpdateDto -import com.saveourtool.save.spring.utils.applyAll -import com.saveourtool.save.utils.* +import com.saveourtool.common.domain.TestResultStatus +import com.saveourtool.common.entities.AgentDto +import com.saveourtool.common.entities.AgentStatusDto +import com.saveourtool.common.entities.AgentStatusDtoList +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.execution.ExecutionStatus +import com.saveourtool.common.execution.ExecutionUpdateDto +import com.saveourtool.common.spring.utils.applyAll +import com.saveourtool.common.utils.* import org.slf4j.Logger import org.springframework.beans.factory.annotation.Value import org.springframework.boot.web.reactive.function.client.WebClientCustomizer @@ -33,13 +33,13 @@ class BackendOrchestratorAgentService( .applyAll(customizers) .build() - override fun getInitConfig(containerId: String): Mono = webClientBackend + override fun getInitConfig(containerId: String): Mono = webClientBackend .get() .uri("/agents/get-init-config?containerId=$containerId") .retrieve() .bodyToMono() - override fun getNextRunConfig(containerId: String): Mono = webClientBackend + override fun getNextRunConfig(containerId: String): Mono = webClientBackend .get() .uri("/agents/get-next-run-config?containerId=$containerId") .retrieve() diff --git a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/common/CloneAndProcessDirectoryAction.kt b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/common/CloneAndProcessDirectoryAction.kt index 47e58be08b..06324f8cef 100644 --- a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/common/CloneAndProcessDirectoryAction.kt +++ b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/common/CloneAndProcessDirectoryAction.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.preprocessor.common -import com.saveourtool.save.entities.GitDto +import com.saveourtool.common.entities.GitDto import com.saveourtool.save.preprocessor.service.GitPreprocessorService import org.reactivestreams.Publisher diff --git a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/config/LocalDateTimeConfig.kt b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/config/LocalDateTimeConfig.kt index c8618adf09..e29a3d16b1 100644 --- a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/config/LocalDateTimeConfig.kt +++ b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/config/LocalDateTimeConfig.kt @@ -11,8 +11,8 @@ package com.saveourtool.save.preprocessor.config -import com.saveourtool.save.utils.supportJLocalDateTime -import com.saveourtool.save.utils.supportKLocalDateTime +import com.saveourtool.common.utils.supportJLocalDateTime +import com.saveourtool.common.utils.supportKLocalDateTime import com.fasterxml.jackson.databind.SerializationFeature import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer diff --git a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/controllers/AwesomeBenchmarksDownloadController.kt b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/controllers/AwesomeBenchmarksDownloadController.kt index b0e168a37d..d3385005f0 100644 --- a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/controllers/AwesomeBenchmarksDownloadController.kt +++ b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/controllers/AwesomeBenchmarksDownloadController.kt @@ -1,11 +1,11 @@ package com.saveourtool.save.preprocessor.controllers -import com.saveourtool.save.entities.GitDto -import com.saveourtool.save.entities.benchmarks.BenchmarkEntity +import com.saveourtool.common.entities.GitDto +import com.saveourtool.common.entities.benchmarks.BenchmarkEntity +import com.saveourtool.common.spring.utils.applyAll import com.saveourtool.save.preprocessor.config.ConfigProperties import com.saveourtool.save.preprocessor.service.GitPreprocessorService import com.saveourtool.save.preprocessor.utils.* -import com.saveourtool.save.spring.utils.applyAll import com.akuleshov7.ktoml.file.TomlFileReader import org.slf4j.LoggerFactory diff --git a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/controllers/GitPreprocessorController.kt b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/controllers/GitPreprocessorController.kt index 43bce1afc7..b2c8009615 100644 --- a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/controllers/GitPreprocessorController.kt +++ b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/controllers/GitPreprocessorController.kt @@ -1,12 +1,13 @@ package com.saveourtool.save.preprocessor.controllers -import com.saveourtool.save.entities.GitDto +import com.saveourtool.common.entities.GitDto +import com.saveourtool.common.utils.blockingToMono +import com.saveourtool.common.utils.getLogger +import com.saveourtool.common.utils.info import com.saveourtool.save.preprocessor.utils.detectBranchList import com.saveourtool.save.preprocessor.utils.detectDefaultBranchName import com.saveourtool.save.preprocessor.utils.detectTagList -import com.saveourtool.save.utils.blockingToMono -import com.saveourtool.save.utils.getLogger -import com.saveourtool.save.utils.info + import org.slf4j.Logger import org.springframework.web.bind.annotation.* import reactor.core.publisher.Mono diff --git a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/controllers/TestSuitesPreprocessorController.kt b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/controllers/TestSuitesPreprocessorController.kt index 4904617707..12f6ca0951 100644 --- a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/controllers/TestSuitesPreprocessorController.kt +++ b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/controllers/TestSuitesPreprocessorController.kt @@ -1,17 +1,17 @@ package com.saveourtool.save.preprocessor.controllers -import com.saveourtool.save.entities.GitDto +import com.saveourtool.common.entities.GitDto +import com.saveourtool.common.request.TestsSourceFetchRequest +import com.saveourtool.common.test.TestSuiteValidationResult +import com.saveourtool.common.test.TestsSourceSnapshotDto +import com.saveourtool.common.testsuite.TestSuitesSourceFetchMode +import com.saveourtool.common.utils.* import com.saveourtool.save.preprocessor.common.CloneAndProcessDirectoryAction import com.saveourtool.save.preprocessor.common.GitRepositoryProcessor import com.saveourtool.save.preprocessor.service.GitPreprocessorService import com.saveourtool.save.preprocessor.service.TestDiscoveringService import com.saveourtool.save.preprocessor.service.TestsPreprocessorToBackendBridge import com.saveourtool.save.preprocessor.utils.GitCommitInfo -import com.saveourtool.save.request.TestsSourceFetchRequest -import com.saveourtool.save.test.TestSuiteValidationResult -import com.saveourtool.save.test.TestsSourceSnapshotDto -import com.saveourtool.save.testsuite.TestSuitesSourceFetchMode -import com.saveourtool.save.utils.* import org.jetbrains.annotations.NonBlocking import org.slf4j.Logger diff --git a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/service/GitPreprocessorService.kt b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/service/GitPreprocessorService.kt index fac3ce2254..18766585cd 100644 --- a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/service/GitPreprocessorService.kt +++ b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/service/GitPreprocessorService.kt @@ -1,6 +1,7 @@ package com.saveourtool.save.preprocessor.service -import com.saveourtool.save.entities.GitDto +import com.saveourtool.common.entities.GitDto +import com.saveourtool.common.utils.* import com.saveourtool.save.preprocessor.common.CloneResult import com.saveourtool.save.preprocessor.common.GitRepositoryProcessor import com.saveourtool.save.preprocessor.config.ConfigProperties @@ -8,17 +9,19 @@ import com.saveourtool.save.preprocessor.utils.GitCommitInfo import com.saveourtool.save.preprocessor.utils.cloneBranchToDirectory import com.saveourtool.save.preprocessor.utils.cloneCommitToDirectory import com.saveourtool.save.preprocessor.utils.cloneTagToDirectory -import com.saveourtool.save.utils.* + import org.eclipse.jgit.util.FileUtils import org.jetbrains.annotations.NonBlocking import org.slf4j.Logger import org.springframework.stereotype.Service import reactor.core.publisher.Flux import reactor.core.publisher.Mono + import java.io.IOException import java.nio.file.Files import java.nio.file.Path import java.nio.file.Paths + import kotlin.io.path.absolutePathString import kotlin.io.path.createDirectories diff --git a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/service/TestDiscoveringService.kt b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/service/TestDiscoveringService.kt index e9dcec8233..b6b92a892b 100644 --- a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/service/TestDiscoveringService.kt +++ b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/service/TestDiscoveringService.kt @@ -8,19 +8,19 @@ import com.saveourtool.save.core.plugin.GeneralConfig import com.saveourtool.save.core.plugin.PluginException import com.saveourtool.save.core.utils.buildActivePlugins import com.saveourtool.save.core.utils.processInPlace -import com.saveourtool.save.entities.TestSuite +import com.saveourtool.common.entities.TestSuite import com.saveourtool.save.plugins.fix.FixPlugin import com.saveourtool.save.preprocessor.utils.toHash -import com.saveourtool.save.test.TestDto -import com.saveourtool.save.test.TestsSourceSnapshotDto -import com.saveourtool.save.test.collectPluginNames -import com.saveourtool.save.testsuite.TestSuiteDto -import com.saveourtool.save.utils.EmptyResponse -import com.saveourtool.save.utils.blockingToMono -import com.saveourtool.save.utils.debug -import com.saveourtool.save.utils.info -import com.saveourtool.save.utils.requireIsAbsolute -import com.saveourtool.save.utils.thenJust +import com.saveourtool.common.test.TestDto +import com.saveourtool.common.test.TestsSourceSnapshotDto +import com.saveourtool.common.test.collectPluginNames +import com.saveourtool.common.testsuite.TestSuiteDto +import com.saveourtool.common.utils.EmptyResponse +import com.saveourtool.common.utils.blockingToMono +import com.saveourtool.common.utils.debug +import com.saveourtool.common.utils.info +import com.saveourtool.common.utils.requireIsAbsolute +import com.saveourtool.common.utils.thenJust import okio.FileSystem import okio.Path diff --git a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/service/TestSuiteValidationService.kt b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/service/TestSuiteValidationService.kt index 9590a3ec0a..155cb5e450 100644 --- a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/service/TestSuiteValidationService.kt +++ b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/service/TestSuiteValidationService.kt @@ -1,17 +1,20 @@ package com.saveourtool.save.preprocessor.service +import com.saveourtool.common.test.TestSuiteValidationError +import com.saveourtool.common.test.TestSuiteValidationResult +import com.saveourtool.common.testsuite.TestSuiteDto +import com.saveourtool.common.utils.getLogger import com.saveourtool.save.preprocessor.test.suite.TestSuiteValidator -import com.saveourtool.save.test.TestSuiteValidationError -import com.saveourtool.save.test.TestSuiteValidationResult -import com.saveourtool.save.testsuite.TestSuiteDto -import com.saveourtool.save.utils.getLogger + import org.springframework.jmx.export.annotation.ManagedAttribute import org.springframework.jmx.export.annotation.ManagedResource import org.springframework.stereotype.Service import reactor.core.publisher.Flux import reactor.core.publisher.ParallelFlux import reactor.core.scheduler.Schedulers + import java.lang.Runtime.getRuntime + import kotlin.math.min /** diff --git a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/service/TestsPreprocessorToBackendBridge.kt b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/service/TestsPreprocessorToBackendBridge.kt index bcc754d958..c8627ba705 100644 --- a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/service/TestsPreprocessorToBackendBridge.kt +++ b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/service/TestsPreprocessorToBackendBridge.kt @@ -1,14 +1,14 @@ package com.saveourtool.save.preprocessor.service -import com.saveourtool.save.entities.* +import com.saveourtool.common.entities.* +import com.saveourtool.common.spring.utils.applyAll +import com.saveourtool.common.storage.request.UploadRequest +import com.saveourtool.common.test.TestDto +import com.saveourtool.common.test.TestsSourceSnapshotDto +import com.saveourtool.common.test.TestsSourceVersionDto +import com.saveourtool.common.testsuite.* +import com.saveourtool.common.utils.* import com.saveourtool.save.preprocessor.config.ConfigProperties -import com.saveourtool.save.spring.utils.applyAll -import com.saveourtool.save.storage.request.UploadRequest -import com.saveourtool.save.test.TestDto -import com.saveourtool.save.test.TestsSourceSnapshotDto -import com.saveourtool.save.test.TestsSourceVersionDto -import com.saveourtool.save.testsuite.* -import com.saveourtool.save.utils.* import org.jetbrains.annotations.NonBlocking import org.slf4j.LoggerFactory diff --git a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/test/suite/AbstractTestSuiteValidator.kt b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/test/suite/AbstractTestSuiteValidator.kt index 07678675a3..bcdaae6ef7 100644 --- a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/test/suite/AbstractTestSuiteValidator.kt +++ b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/test/suite/AbstractTestSuiteValidator.kt @@ -1,8 +1,8 @@ package com.saveourtool.save.preprocessor.test.suite -import com.saveourtool.save.test.TestSuiteValidationResult -import com.saveourtool.save.testsuite.TestSuiteDto -import com.saveourtool.save.utils.getLogger +import com.saveourtool.common.test.TestSuiteValidationResult +import com.saveourtool.common.testsuite.TestSuiteDto +import com.saveourtool.common.utils.getLogger import reactor.core.publisher.Flux import reactor.core.scheduler.Schedulers diff --git a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/test/suite/PluginsWithoutTests.kt b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/test/suite/PluginsWithoutTests.kt index 45794a94a8..f00baa3b54 100644 --- a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/test/suite/PluginsWithoutTests.kt +++ b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/test/suite/PluginsWithoutTests.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.preprocessor.test.suite -import com.saveourtool.save.test.TestSuiteValidationProgress -import com.saveourtool.save.test.TestSuiteValidationResult -import com.saveourtool.save.testsuite.TestSuiteDto -import com.saveourtool.save.utils.getLogger +import com.saveourtool.common.test.TestSuiteValidationProgress +import com.saveourtool.common.test.TestSuiteValidationResult +import com.saveourtool.common.testsuite.TestSuiteDto +import com.saveourtool.common.utils.getLogger /** * Plug-ins without tests. diff --git a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/test/suite/TestSuiteValidator.kt b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/test/suite/TestSuiteValidator.kt index 5ee81b6147..5973d14444 100644 --- a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/test/suite/TestSuiteValidator.kt +++ b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/test/suite/TestSuiteValidator.kt @@ -1,7 +1,7 @@ package com.saveourtool.save.preprocessor.test.suite -import com.saveourtool.save.test.TestSuiteValidationResult -import com.saveourtool.save.testsuite.TestSuiteDto +import com.saveourtool.common.test.TestSuiteValidationResult +import com.saveourtool.common.testsuite.TestSuiteDto import reactor.core.publisher.Flux import reactor.core.scheduler.Scheduler import reactor.core.scheduler.Schedulers diff --git a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/test/suite/TestSuitesWithWildcardMode.kt b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/test/suite/TestSuitesWithWildcardMode.kt index 2aaedc85d2..6bba2237ac 100644 --- a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/test/suite/TestSuitesWithWildcardMode.kt +++ b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/test/suite/TestSuitesWithWildcardMode.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.preprocessor.test.suite -import com.saveourtool.save.test.TestSuiteValidationProgress -import com.saveourtool.save.test.TestSuiteValidationResult -import com.saveourtool.save.testsuite.TestSuiteDto -import com.saveourtool.save.utils.getLogger +import com.saveourtool.common.test.TestSuiteValidationProgress +import com.saveourtool.common.test.TestSuiteValidationResult +import com.saveourtool.common.testsuite.TestSuiteDto +import com.saveourtool.common.utils.getLogger /** * Test suites with wildcard mode. diff --git a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/utils/GitUtil.kt b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/utils/GitUtil.kt index e1aa90f7cf..3955f83a3f 100644 --- a/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/utils/GitUtil.kt +++ b/save-preprocessor/src/main/kotlin/com/saveourtool/save/preprocessor/utils/GitUtil.kt @@ -4,8 +4,8 @@ package com.saveourtool.save.preprocessor.utils -import com.saveourtool.save.entities.GitDto -import com.saveourtool.save.utils.debug +import com.saveourtool.common.entities.GitDto +import com.saveourtool.common.utils.debug import org.eclipse.jgit.api.* import org.eclipse.jgit.api.errors.GitAPIException import org.eclipse.jgit.lib.Constants diff --git a/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/controllers/GitPreprocessorControllerTest.kt b/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/controllers/GitPreprocessorControllerTest.kt index 637451196a..77bf22750a 100644 --- a/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/controllers/GitPreprocessorControllerTest.kt +++ b/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/controllers/GitPreprocessorControllerTest.kt @@ -2,7 +2,7 @@ package com.saveourtool.save.preprocessor.controllers -import com.saveourtool.save.entities.GitDto +import com.saveourtool.common.entities.GitDto import com.saveourtool.save.preprocessor.utils.RepositoryVolume import org.junit.jupiter.api.* diff --git a/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/controllers/TestSuitesPreprocessorControllerTest.kt b/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/controllers/TestSuitesPreprocessorControllerTest.kt index ddf54b9e8f..2eba4d263e 100644 --- a/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/controllers/TestSuitesPreprocessorControllerTest.kt +++ b/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/controllers/TestSuitesPreprocessorControllerTest.kt @@ -1,18 +1,18 @@ package com.saveourtool.save.preprocessor.controllers -import com.saveourtool.save.entities.GitDto -import com.saveourtool.save.entities.TestSuite +import com.saveourtool.common.entities.GitDto +import com.saveourtool.common.entities.TestSuite import com.saveourtool.save.preprocessor.common.CloneResult import com.saveourtool.save.preprocessor.common.GitRepositoryProcessor import com.saveourtool.save.preprocessor.service.* import com.saveourtool.save.preprocessor.utils.GitCommitInfo -import com.saveourtool.save.request.TestsSourceFetchRequest -import com.saveourtool.save.test.TestSuiteValidationResult -import com.saveourtool.save.test.TestsSourceSnapshotDto -import com.saveourtool.save.test.TestsSourceVersionDto -import com.saveourtool.save.testsuite.TestSuitesSourceDto -import com.saveourtool.save.testsuite.TestSuitesSourceFetchMode -import com.saveourtool.save.utils.getCurrentLocalDateTime +import com.saveourtool.common.request.TestsSourceFetchRequest +import com.saveourtool.common.test.TestSuiteValidationResult +import com.saveourtool.common.test.TestsSourceSnapshotDto +import com.saveourtool.common.test.TestsSourceVersionDto +import com.saveourtool.common.testsuite.TestSuitesSourceDto +import com.saveourtool.common.testsuite.TestSuitesSourceFetchMode +import com.saveourtool.common.utils.getCurrentLocalDateTime import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.mockito.invocation.InvocationOnMock diff --git a/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/service/TestSuiteValidationServiceTest.kt b/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/service/TestSuiteValidationServiceTest.kt index 762882e2d8..37e73341db 100644 --- a/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/service/TestSuiteValidationServiceTest.kt +++ b/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/service/TestSuiteValidationServiceTest.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.preprocessor.service -import com.saveourtool.save.test.TestSuiteValidationError +import com.saveourtool.common.test.TestSuiteValidationError import io.kotest.matchers.collections.shouldHaveSize import io.kotest.matchers.collections.shouldNotHaveSize import io.kotest.matchers.shouldBe diff --git a/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/utils/GitUtilKtTest.kt b/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/utils/GitUtilKtTest.kt index c47c40a543..d6ff48ea3c 100644 --- a/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/utils/GitUtilKtTest.kt +++ b/save-preprocessor/src/test/kotlin/com/saveourtool/save/preprocessor/utils/GitUtilKtTest.kt @@ -1,6 +1,6 @@ package com.saveourtool.save.preprocessor.utils -import com.saveourtool.save.entities.GitDto +import com.saveourtool.common.entities.GitDto import org.junit.jupiter.api.Test import org.junit.jupiter.api.io.TempDir import java.nio.file.Path diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/Algorithm.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/Algorithm.kt index 8980844560..e4019d0d6a 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/Algorithm.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/Algorithm.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.test.analysis.algorithms -import com.saveourtool.save.test.analysis.api.TestRuns import com.saveourtool.common.test.analysis.metrics.RegularTestMetrics import com.saveourtool.common.test.analysis.metrics.TestMetrics import com.saveourtool.common.test.analysis.results.IrregularTest +import com.saveourtool.save.test.analysis.api.TestRuns /** * A heuristic algorithm which accepts test history ([TestRuns]), pre-calculated diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/FlipRateAnalysis.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/FlipRateAnalysis.kt index fc23b9dee4..faf91e869f 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/FlipRateAnalysis.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/FlipRateAnalysis.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.test.analysis.algorithms -import com.saveourtool.save.test.analysis.api.TestRuns import com.saveourtool.common.test.analysis.metrics.RegularTestMetrics import com.saveourtool.common.test.analysis.results.FlakyTest import com.saveourtool.common.test.analysis.results.IrregularTest +import com.saveourtool.save.test.analysis.api.TestRuns /** * _Flip-rate_ based flaky test detection algorithm. diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/PermanentFailureDetection.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/PermanentFailureDetection.kt index 1844e02d52..4bdfafe027 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/PermanentFailureDetection.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/PermanentFailureDetection.kt @@ -1,9 +1,9 @@ package com.saveourtool.save.test.analysis.algorithms -import com.saveourtool.save.test.analysis.api.TestRuns import com.saveourtool.common.test.analysis.metrics.RegularTestMetrics import com.saveourtool.common.test.analysis.results.IrregularTest import com.saveourtool.common.test.analysis.results.PermanentFailure +import com.saveourtool.save.test.analysis.api.TestRuns /** * _Permanent failure_ detection algorithm. diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/RegressionDetection.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/RegressionDetection.kt index aec4326698..3fc1bd79f9 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/RegressionDetection.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/algorithms/RegressionDetection.kt @@ -1,12 +1,12 @@ package com.saveourtool.save.test.analysis.algorithms import com.saveourtool.common.domain.TestResultStatus -import com.saveourtool.save.test.analysis.api.TestRuns -import com.saveourtool.save.test.analysis.api.TestStatusProvider -import com.saveourtool.save.test.analysis.api.TestStatusProviderScope import com.saveourtool.common.test.analysis.metrics.RegularTestMetrics import com.saveourtool.common.test.analysis.results.IrregularTest import com.saveourtool.common.test.analysis.results.Regression +import com.saveourtool.save.test.analysis.api.TestRuns +import com.saveourtool.save.test.analysis.api.TestStatusProvider +import com.saveourtool.save.test.analysis.api.TestStatusProviderScope /** * Regression detection algorithm. diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestAnalysisService.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestAnalysisService.kt index cea187cde2..5ac77680d4 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestAnalysisService.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/api/TestAnalysisService.kt @@ -1,10 +1,10 @@ package com.saveourtool.save.test.analysis.api +import com.saveourtool.common.test.analysis.results.AnalysisResult import com.saveourtool.save.test.analysis.algorithms.FlipRateAnalysis import com.saveourtool.save.test.analysis.algorithms.PermanentFailureDetection import com.saveourtool.save.test.analysis.algorithms.RegressionDetection import com.saveourtool.save.test.analysis.internal.DefaultTestAnalysisService -import com.saveourtool.common.test.analysis.results.AnalysisResult /** * Analyzes test runs for the given test id; see [analyze] for details. diff --git a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/DefaultTestAnalysisService.kt b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/DefaultTestAnalysisService.kt index 64603c07e6..62a8b88d7d 100644 --- a/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/DefaultTestAnalysisService.kt +++ b/test-analysis-core/src/main/kotlin/com/saveourtool/save/test/analysis/internal/DefaultTestAnalysisService.kt @@ -1,13 +1,13 @@ package com.saveourtool.save.test.analysis.internal -import com.saveourtool.save.test.analysis.algorithms.Algorithm -import com.saveourtool.save.test.analysis.api.TestAnalysisService -import com.saveourtool.save.test.analysis.api.TestId -import com.saveourtool.save.test.analysis.api.TestStatisticsStorage import com.saveourtool.common.test.analysis.metrics.NoDataAvailable import com.saveourtool.common.test.analysis.metrics.RegularTestMetrics import com.saveourtool.common.test.analysis.results.AnalysisResult import com.saveourtool.common.test.analysis.results.RegularTest +import com.saveourtool.save.test.analysis.algorithms.Algorithm +import com.saveourtool.save.test.analysis.api.TestAnalysisService +import com.saveourtool.save.test.analysis.api.TestId +import com.saveourtool.save.test.analysis.api.TestStatisticsStorage /** * The default implementation of [TestAnalysisService]. From 46dd8df844a8451029476563b2ef3e98a5f3c8ac Mon Sep 17 00:00:00 2001 From: Cheshiriks Date: Tue, 23 Apr 2024 16:23:50 +0300 Subject: [PATCH 3/9] Renaming save-cloud-common module to common --- .../saveourtool/save/test/analysis/metrics/TestMetricsConfig.kt | 1 + .../saveourtool/save/test/analysis/metrics/TestMetricsJvmTest.kt | 1 + .../save/test/analysis/results/AnalysisResultConfig.kt | 1 + .../save/test/analysis/results/AnalysisResultJvmTest.kt | 1 + 4 files changed, 4 insertions(+) diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/test/analysis/metrics/TestMetricsConfig.kt b/save-backend/src/test/kotlin/com/saveourtool/save/test/analysis/metrics/TestMetricsConfig.kt index 7d93bb1fb4..8f353d3a9f 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/test/analysis/metrics/TestMetricsConfig.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/test/analysis/metrics/TestMetricsConfig.kt @@ -1,5 +1,6 @@ package com.saveourtool.save.test.analysis.metrics +import com.saveourtool.common.test.analysis.metrics.supportTestMetrics import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer import org.springframework.boot.test.context.TestConfiguration import org.springframework.context.annotation.Bean diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/test/analysis/metrics/TestMetricsJvmTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/test/analysis/metrics/TestMetricsJvmTest.kt index 73f81d5264..ae9a4d1e23 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/test/analysis/metrics/TestMetricsJvmTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/test/analysis/metrics/TestMetricsJvmTest.kt @@ -1,5 +1,6 @@ package com.saveourtool.save.test.analysis.metrics +import com.saveourtool.common.test.analysis.metrics.* import com.saveourtool.save.test.analysis.TestAnalysisApplication import com.fasterxml.jackson.databind.ObjectMapper import org.assertj.core.api.Assertions.assertThat diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/test/analysis/results/AnalysisResultConfig.kt b/save-backend/src/test/kotlin/com/saveourtool/save/test/analysis/results/AnalysisResultConfig.kt index cd68f6e926..82ca70982e 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/test/analysis/results/AnalysisResultConfig.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/test/analysis/results/AnalysisResultConfig.kt @@ -1,5 +1,6 @@ package com.saveourtool.save.test.analysis.results +import com.saveourtool.common.test.analysis.results.supportAnalysisResult import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer import org.springframework.boot.test.context.TestConfiguration import org.springframework.context.annotation.Bean diff --git a/save-backend/src/test/kotlin/com/saveourtool/save/test/analysis/results/AnalysisResultJvmTest.kt b/save-backend/src/test/kotlin/com/saveourtool/save/test/analysis/results/AnalysisResultJvmTest.kt index ae6c429b44..bf4597721d 100644 --- a/save-backend/src/test/kotlin/com/saveourtool/save/test/analysis/results/AnalysisResultJvmTest.kt +++ b/save-backend/src/test/kotlin/com/saveourtool/save/test/analysis/results/AnalysisResultJvmTest.kt @@ -1,5 +1,6 @@ package com.saveourtool.save.test.analysis.results +import com.saveourtool.common.test.analysis.results.* import com.saveourtool.save.test.analysis.TestAnalysisApplication import com.fasterxml.jackson.core.type.TypeReference import com.fasterxml.jackson.databind.ObjectMapper From 447a9d37f2d6e25b14924146040f35896ef0d00f Mon Sep 17 00:00:00 2001 From: Cheshiriks Date: Tue, 23 Apr 2024 17:17:32 +0300 Subject: [PATCH 4/9] Renaming save-cloud-common module to common --- .../saveourtool/save/api/SaveCloudClient.kt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/save-api/src/main/kotlin/com/saveourtool/save/api/SaveCloudClient.kt b/save-api/src/main/kotlin/com/saveourtool/save/api/SaveCloudClient.kt index 77281101ad..ebf7a3ce7a 100644 --- a/save-api/src/main/kotlin/com/saveourtool/save/api/SaveCloudClient.kt +++ b/save-api/src/main/kotlin/com/saveourtool/save/api/SaveCloudClient.kt @@ -1,5 +1,14 @@ package com.saveourtool.save.api +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.entities.FileDto +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.execution.ExecutionStatus.PENDING +import com.saveourtool.common.execution.ExecutionStatus.RUNNING +import com.saveourtool.common.execution.TestingType +import com.saveourtool.common.request.CreateExecutionRequest +import com.saveourtool.common.utils.DATABASE_DELIMITER +import com.saveourtool.common.utils.getLogger import com.saveourtool.save.api.authorization.Authorization import com.saveourtool.save.api.config.EvaluatedToolProperties import com.saveourtool.save.api.config.WebClientProperties @@ -11,15 +20,6 @@ import com.saveourtool.save.api.utils.getLatestExecution import com.saveourtool.save.api.utils.initializeHttpClient import com.saveourtool.save.api.utils.submitExecution import com.saveourtool.save.api.utils.uploadAdditionalFile -import com.saveourtool.save.domain.ProjectCoordinates -import com.saveourtool.save.entities.FileDto -import com.saveourtool.save.execution.ExecutionDto -import com.saveourtool.save.execution.ExecutionStatus.PENDING -import com.saveourtool.save.execution.ExecutionStatus.RUNNING -import com.saveourtool.save.execution.TestingType -import com.saveourtool.save.request.CreateExecutionRequest -import com.saveourtool.save.utils.DATABASE_DELIMITER -import com.saveourtool.save.utils.getLogger import arrow.core.Either import arrow.core.getOrElse From ecd32a02c3b63bf1da0381957311f45ea1401257 Mon Sep 17 00:00:00 2001 From: Cheshiriks Date: Wed, 24 Apr 2024 17:06:24 +0300 Subject: [PATCH 5/9] Renaming save-cloud-common module to common --- .../kotlin/com/saveourtool/cosv/backend/CosvApplication.kt | 4 ++-- .../kotlin/com/saveourtool/cosv/backend/CosvConfiguration.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/CosvApplication.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/CosvApplication.kt index 24f2a9862c..4355e84759 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/CosvApplication.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/CosvApplication.kt @@ -13,14 +13,14 @@ import org.springframework.context.annotation.Import * An entrypoint for spring for cosv-backend */ @SpringBootApplication(scanBasePackages = [ - "com.saveourtool.save", + "com.saveourtool.common", "com.saveourtool.cosv", ]) @EnableConfigurationProperties(ConfigProperties::class) @Import( DefaultS3Configuration::class, ) -@EntityScan(basePackages = ["com.saveourtool.save.entities", "com.saveourtool.save.entitiescosv"]) +@EntityScan(basePackages = ["com.saveourtool.common.entities", "com.saveourtool.common.entitiescosv"]) class CosvApplication fun main(args: Array) { diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/CosvConfiguration.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/CosvConfiguration.kt index 9855667f80..638ef3fb7d 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/CosvConfiguration.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/CosvConfiguration.kt @@ -45,7 +45,7 @@ class CosvConfiguration { @Qualifier("dataSource") dataSource: DataSource? ): LocalContainerEntityManagerFactoryBean? = builder .dataSource(dataSource) - .packages("com.saveourtool.save.entitiescosv") + .packages("com.saveourtool.common.entitiescosv") .persistenceUnit("cosv") .build() From ba3adde311b0a92e401a394dc13544fad3d5d6f2 Mon Sep 17 00:00:00 2001 From: Cheshiriks Date: Wed, 24 Apr 2024 18:34:30 +0300 Subject: [PATCH 6/9] Renaming save-cloud-common module to common --- .../main/kotlin/com/saveourtool/cosv/backend/CosvApplication.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/CosvApplication.kt b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/CosvApplication.kt index 4355e84759..8efa591712 100644 --- a/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/CosvApplication.kt +++ b/cosv-backend/src/main/kotlin/com/saveourtool/cosv/backend/CosvApplication.kt @@ -14,6 +14,7 @@ import org.springframework.context.annotation.Import */ @SpringBootApplication(scanBasePackages = [ "com.saveourtool.common", + "com.saveourtool.save", "com.saveourtool.cosv", ]) @EnableConfigurationProperties(ConfigProperties::class) From 9308cc8c60259fb5674fe8ba33c9e1a016e70327 Mon Sep 17 00:00:00 2001 From: Cheshiriks Date: Thu, 25 Apr 2024 11:50:33 +0300 Subject: [PATCH 7/9] Renaming save-cloud-common module to common --- .github/workflows/build_and_test.yml | 54 ++++++++++++++-------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 83028f8daa..1a1c89c629 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -24,7 +24,7 @@ jobs: save-api: ${{ steps.calculate-dependencies.outputs.save-api }} save-api-cli: ${{ steps.calculate-dependencies.outputs.save-api-cli }} save-backend: ${{ steps.calculate-dependencies.outputs.save-backend }} - save-cloud-common: ${{ steps.calculate-dependencies.outputs.save-cloud-common }} + common: ${{ steps.calculate-dependencies.outputs.common }} cosv-backend: ${{ steps.calculate-dependencies.outputs.cosv-backend }} cosv-frontend: ${{ steps.calculate-dependencies.outputs.cosv-frontend }} save-demo: ${{ steps.calculate-dependencies.outputs.save-demo }} @@ -64,8 +64,8 @@ jobs: - save-api-cli/** save-backend: - save-backend/** - save-cloud-common: - - save-cloud-common/** + common: + - common/** cosv-backend: - cosv-backend/** cosv-frontend: @@ -94,27 +94,27 @@ jobs: run: | set -x all=$(( ${{ steps.git-changed-files.outputs.root_gradle_all_changed_files_count }} )) - save_cloud_common=$(( $all + ${{ steps.git-changed-files.outputs.save-cloud-common_all_changed_files_count }} )) - frontend_common=$(( $save_cloud_common + ${{ steps.git-changed-files.outputs.frontend-common_all_changed_files_count }} )) - save_orchestrator_common=$(( $save_cloud_common + ${{ steps.git-changed-files.outputs.save-orchestrator-common_all_changed_files_count }} )) + common=$(( $all + ${{ steps.git-changed-files.outputs.common_all_changed_files_count }} )) + frontend_common=$(( $common + ${{ steps.git-changed-files.outputs.frontend-common_all_changed_files_count }} )) + save_orchestrator_common=$(( $common + ${{ steps.git-changed-files.outputs.save-orchestrator-common_all_changed_files_count }} )) - authentication_service=$(( $save_cloud_common + ${{ steps.git-changed-files.outputs.authentication-service_all_changed_files_count }} )) - save_api=$(( $save_cloud_common + ${{ steps.git-changed-files.outputs.save-api_all_changed_files_count }} )) - cosv_backend=$(( $save_cloud_common + ${{ steps.git-changed-files.outputs.cosv-backend_all_changed_files_count }} )) - test_analysis_core=$(( $save_cloud_common + ${{ steps.git-changed-files.outputs.test-analysis-core_all_changed_files_count }} )) + authentication_service=$(( $common + ${{ steps.git-changed-files.outputs.authentication-service_all_changed_files_count }} )) + save_api=$(( $common + ${{ steps.git-changed-files.outputs.save-api_all_changed_files_count }} )) + cosv_backend=$(( $common + ${{ steps.git-changed-files.outputs.cosv-backend_all_changed_files_count }} )) + test_analysis_core=$(( $common + ${{ steps.git-changed-files.outputs.test-analysis-core_all_changed_files_count }} )) test_utils=$(( ${{ steps.git-changed-files.outputs.test-utils_all_changed_files_count }} )) - api_gateway=$(( $save_cloud_common + ${{ steps.git-changed-files.outputs.api-gateway_all_changed_files_count }} )) - save_agent=$(( $save_cloud_common + ${{ steps.git-changed-files.outputs.save-agent_all_changed_files_count }} )) - save_api_cli=$(( $save_cloud_common + $save_api + ${{ steps.git-changed-files.outputs.save-api-cli_all_changed_files_count }} )) - save_backend=$(( $save_cloud_common + $authentication_service + $test_analysis_core + $cosv_backend + $test_utils + ${{ steps.git-changed-files.outputs.save-backend_all_changed_files_count }} )) - cosv_frontend=$(( $save_cloud_common + $frontend_common + ${{ steps.git-changed-files.outputs.cosv-frontend_all_changed_files_count }} )) - save_demo=$(( $save_cloud_common + ${{ steps.git-changed-files.outputs.save-demo_all_changed_files_count }} )) - save_demo_agent=$(( $save_cloud_common + ${{ steps.git-changed-files.outputs.save-demo-agent_all_changed_files_count }} )) - save_demo_cpg=$(( $save_cloud_common + ${{ steps.git-changed-files.outputs.save-demo-cpg_all_changed_files_count }} )) - save_frontend=$(( $save_cloud_common + $frontend_common + ${{ steps.git-changed-files.outputs.save-frontend_all_changed_files_count }} )) - save_orchestrator=$(( $save_cloud_common + $save_orchestrator_common + $test_utils + ${{ steps.git-changed-files.outputs.save-orchestrator_all_changed_files_count }} )) - save_preprocessor=$(( $save_cloud_common + $test_utils + ${{ steps.git-changed-files.outputs.save-preprocessor_all_changed_files_count }} )) + api_gateway=$(( $common + ${{ steps.git-changed-files.outputs.api-gateway_all_changed_files_count }} )) + save_agent=$(( $common + ${{ steps.git-changed-files.outputs.save-agent_all_changed_files_count }} )) + save_api_cli=$(( $common + $save_api + ${{ steps.git-changed-files.outputs.save-api-cli_all_changed_files_count }} )) + save_backend=$(( $common + $authentication_service + $test_analysis_core + $cosv_backend + $test_utils + ${{ steps.git-changed-files.outputs.save-backend_all_changed_files_count }} )) + cosv_frontend=$(( $common + $frontend_common + ${{ steps.git-changed-files.outputs.cosv-frontend_all_changed_files_count }} )) + save_demo=$(( $common + ${{ steps.git-changed-files.outputs.save-demo_all_changed_files_count }} )) + save_demo_agent=$(( $common + ${{ steps.git-changed-files.outputs.save-demo-agent_all_changed_files_count }} )) + save_demo_cpg=$(( $common + ${{ steps.git-changed-files.outputs.save-demo-cpg_all_changed_files_count }} )) + save_frontend=$(( $common + $frontend_common + ${{ steps.git-changed-files.outputs.save-frontend_all_changed_files_count }} )) + save_orchestrator=$(( $common + $save_orchestrator_common + $test_utils + ${{ steps.git-changed-files.outputs.save-orchestrator_all_changed_files_count }} )) + save_preprocessor=$(( $common + $test_utils + ${{ steps.git-changed-files.outputs.save-preprocessor_all_changed_files_count }} )) echo "api-gateway=$api_gateway" >> "$GITHUB_OUTPUT" echo "authentication-service=$authentication_service" >> "$GITHUB_OUTPUT" @@ -122,7 +122,7 @@ jobs: echo "save-api=$save_api" >> "$GITHUB_OUTPUT" echo "save-api-cli=$save_api_cli" >> "$GITHUB_OUTPUT" echo "save-backend=$save_backend" >> "$GITHUB_OUTPUT" - echo "save-cloud-common=$save_cloud_common" >> "$GITHUB_OUTPUT" + echo "common=$common" >> "$GITHUB_OUTPUT" echo "cosv-backend=$cosv_backend" >> "$GITHUB_OUTPUT" echo "cosv-frontend=$cosv_frontend" >> "$GITHUB_OUTPUT" echo "save-demo=$save_demo" >> "$GITHUB_OUTPUT" @@ -135,17 +135,17 @@ jobs: echo "save-preprocessor=$save_preprocessor" >> "$GITHUB_OUTPUT" echo "test-analysis-core=$test_analysis_core" >> "$GITHUB_OUTPUT" echo "test-utils=$test_utils" >> "$GITHUB_OUTPUT" - build_save-cloud-common: - name: 'Build and test (save-cloud-common)' + build_common: + name: 'Build and test (common)' needs: [ calculate_build_flags ] uses: ./.github/workflows/build_and_test_reusable.yml with: - do-build: ${{ github.event_name == 'push' || needs.calculate_build_flags.outputs.save-cloud-common > 0 }} - module: save-cloud-common + do-build: ${{ github.event_name == 'push' || needs.calculate_build_flags.outputs.common > 0 }} + module: common gradle-cache-read-only: ${{ github.ref != 'refs/heads/master' && github.event_name != 'pull_request' }} build_save-orchestrator-common: name: 'Build and test (save-orchestrator-common)' - needs: [ calculate_build_flags, build_save-cloud-common ] + needs: [ calculate_build_flags, build_common ] uses: ./.github/workflows/build_and_test_reusable.yml with: do-build: ${{ github.event_name == 'push' || needs.calculate_build_flags.outputs.save-orchestrator-common > 0 }} From d098b9a620b964d7b0422257cfc81a5956116ec1 Mon Sep 17 00:00:00 2001 From: Cheshiriks Date: Thu, 25 Apr 2024 12:59:08 +0300 Subject: [PATCH 8/9] Renaming save-cloud-common module to common --- .../common/spring/utils/WebClientUtils.kt | 2 +- .../com/saveourtool/save/backend/SaveApplication.kt | 2 +- .../src/main/resources/META-INF/spring.factories | 2 +- .../src/main/resources/META-INF/spring.factories | 2 +- .../components/views/AwesomeBenchmarksView.kt | 8 ++++---- .../save/frontend/components/views/BanView.kt | 2 +- .../components/views/ContestExecutionView.kt | 6 +++--- .../save/frontend/components/views/ContestView.kt | 4 ++-- .../frontend/components/views/CreateProjectView.kt | 8 ++++---- .../save/frontend/components/views/ExecutionView.kt | 12 ++++++------ .../save/frontend/components/views/HistoryView.kt | 10 +++++----- .../components/views/OrganizationAdminView.kt | 6 +++--- .../save/frontend/components/views/ProjectView.kt | 10 +++++----- .../components/views/TestExecutionDetailsView.kt | 2 +- .../views/contests/ContestGlobalRatingView.kt | 8 ++++---- .../components/views/contests/ContestListCard.kt | 4 ++-- .../components/views/contests/ContestListView.kt | 2 +- .../views/contests/ContestSampleListCard.kt | 4 ++-- .../components/views/contests/ContestTemplateView.kt | 8 ++++---- .../components/views/contests/ContestsStatistics.kt | 2 +- .../components/views/contests/CountDownTimer.kt | 2 +- .../views/contests/CreateContestTemplateView.kt | 8 ++++---- .../views/contests/CreateNewContestTemplate.kt | 2 +- .../components/views/contests/FeaturedContests.kt | 2 +- .../components/views/contests/GlobalRating.kt | 12 ++++++------ .../components/views/contests/MyProjectsRating.kt | 2 +- .../components/views/contests/NewContests.kt | 2 +- .../save/frontend/components/views/demo/CpgView.kt | 6 +++--- .../save/frontend/components/views/demo/DemoView.kt | 4 ++-- .../frontend/components/views/index/CardAboutUs.kt | 2 +- .../save/frontend/components/views/index/CardUser.kt | 8 ++++---- .../components/views/index/IndexLogoButtons.kt | 2 +- .../frontend/components/views/index/IndexViewAuth.kt | 2 +- .../components/views/index/IndexViewUserInfo.kt | 4 ++-- .../components/views/projectcollection/Cards.kt | 2 +- .../views/projectcollection/CollectionView.kt | 6 +++--- .../views/test/analysis/AnalysisResultView.kt | 12 ++++++------ .../views/test/analysis/AnalysisResultsView.kt | 2 +- .../views/test/analysis/TestMetricsView.kt | 6 +++--- .../components/views/welcome/SaveWelcomeView.kt | 4 ++-- .../components/views/welcome/WelcomeUtils.kt | 6 +++--- 41 files changed, 100 insertions(+), 100 deletions(-) diff --git a/common/src/jvmMain/kotlin/com/saveourtool/common/spring/utils/WebClientUtils.kt b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/utils/WebClientUtils.kt index 77e9759aec..b173da9e32 100644 --- a/common/src/jvmMain/kotlin/com/saveourtool/common/spring/utils/WebClientUtils.kt +++ b/common/src/jvmMain/kotlin/com/saveourtool/common/spring/utils/WebClientUtils.kt @@ -9,7 +9,7 @@ import org.slf4j.LoggerFactory import org.springframework.boot.web.reactive.function.client.WebClientCustomizer import org.springframework.web.reactive.function.client.WebClient -private val logger = LoggerFactory.getLogger("com.saveourtool.save.spring.utils.WebClientUtils") +private val logger = LoggerFactory.getLogger("com.saveourtool.common.spring.utils.WebClientUtils") /** * Applies all [WebClientCustomizer]s from [customizers] to [this] [WebClient.Builder]. diff --git a/save-backend/src/main/kotlin/com/saveourtool/save/backend/SaveApplication.kt b/save-backend/src/main/kotlin/com/saveourtool/save/backend/SaveApplication.kt index dd90990678..122251c1c8 100644 --- a/save-backend/src/main/kotlin/com/saveourtool/save/backend/SaveApplication.kt +++ b/save-backend/src/main/kotlin/com/saveourtool/save/backend/SaveApplication.kt @@ -13,7 +13,7 @@ import org.springframework.context.annotation.Import */ @SpringBootApplication(scanBasePackages = [ "com.saveourtool.common.configs", - "com.saveourtool.common.backend", + "com.saveourtool.save.backend", "com.saveourtool.common.service", "com.saveourtool.common.storage", "com.saveourtool.common.security", diff --git a/save-backend/src/main/resources/META-INF/spring.factories b/save-backend/src/main/resources/META-INF/spring.factories index b1a3f50ce9..6afc62b184 100644 --- a/save-backend/src/main/resources/META-INF/spring.factories +++ b/save-backend/src/main/resources/META-INF/spring.factories @@ -1 +1 @@ -org.springframework.boot.env.EnvironmentPostProcessor=com.saveourtool.save.spring.postprocessor.DockerSecretsDatabaseProcessor \ No newline at end of file +org.springframework.boot.env.EnvironmentPostProcessor=com.saveourtool.common.spring.postprocessor.DockerSecretsDatabaseProcessor \ No newline at end of file diff --git a/save-demo/src/main/resources/META-INF/spring.factories b/save-demo/src/main/resources/META-INF/spring.factories index b1a3f50ce9..6afc62b184 100644 --- a/save-demo/src/main/resources/META-INF/spring.factories +++ b/save-demo/src/main/resources/META-INF/spring.factories @@ -1 +1 @@ -org.springframework.boot.env.EnvironmentPostProcessor=com.saveourtool.save.spring.postprocessor.DockerSecretsDatabaseProcessor \ No newline at end of file +org.springframework.boot.env.EnvironmentPostProcessor=com.saveourtool.common.spring.postprocessor.DockerSecretsDatabaseProcessor \ No newline at end of file diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/AwesomeBenchmarksView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/AwesomeBenchmarksView.kt index fc655311ac..d9169ce42c 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/AwesomeBenchmarksView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/AwesomeBenchmarksView.kt @@ -11,10 +11,10 @@ import com.saveourtool.frontend.common.components.requestStatusContext import com.saveourtool.frontend.common.components.views.AbstractView import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.benchmarks.BenchmarkCategoryEnum -import com.saveourtool.save.utils.AwesomeBenchmarks -import com.saveourtool.save.utils.DATABASE_DELIMITER -import com.saveourtool.save.validation.FrontendRoutes +import com.saveourtool.common.entities.benchmarks.BenchmarkCategoryEnum +import com.saveourtool.common.utils.AwesomeBenchmarks +import com.saveourtool.common.utils.DATABASE_DELIMITER +import com.saveourtool.common.validation.FrontendRoutes import js.core.jso import org.w3c.fetch.Headers diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/BanView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/BanView.kt index 76b2544c08..7bb0ce8735 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/BanView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/BanView.kt @@ -10,7 +10,7 @@ import com.saveourtool.frontend.common.utils.Style import com.saveourtool.frontend.common.utils.UserInfoAwareProps import com.saveourtool.frontend.common.utils.useBackground import com.saveourtool.frontend.common.utils.useRedirectToIndexIf -import com.saveourtool.save.info.UserStatus +import com.saveourtool.common.info.UserStatus import js.core.jso import react.FC import react.dom.html.ReactHTML.a diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ContestExecutionView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ContestExecutionView.kt index 7b99a4c56e..92e5a5dfd2 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ContestExecutionView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ContestExecutionView.kt @@ -15,15 +15,15 @@ import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.themes.Colors import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.Style -import com.saveourtool.save.execution.ExecutionDto -import com.saveourtool.save.execution.ExecutionStatus +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.execution.ExecutionStatus import com.saveourtool.save.frontend.components.RequestStatusContext import com.saveourtool.save.frontend.components.basic.* import com.saveourtool.save.frontend.components.requestStatusContext import com.saveourtool.save.frontend.externals.chart.DataPieChart import com.saveourtool.save.frontend.externals.chart.PieChartColors import com.saveourtool.save.frontend.externals.chart.pieChart -import com.saveourtool.save.info.UserInfo +import com.saveourtool.common.info.UserInfo import js.core.jso import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ContestView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ContestView.kt index 5aaf4c05a9..c4329a3c96 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ContestView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ContestView.kt @@ -13,8 +13,8 @@ import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.apiUrl import com.saveourtool.frontend.common.utils.classLoadingHandler import com.saveourtool.frontend.common.utils.jsonHeaders -import com.saveourtool.save.entities.contest.ContestDto -import com.saveourtool.save.info.UserInfo +import com.saveourtool.common.entities.contest.ContestDto +import com.saveourtool.common.info.UserInfo import react.* import react.dom.html.ReactHTML.div diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/CreateProjectView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/CreateProjectView.kt index cd78e1eb82..eec8877304 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/CreateProjectView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/CreateProjectView.kt @@ -21,10 +21,10 @@ import com.saveourtool.frontend.common.utils.buttonBuilder import com.saveourtool.frontend.common.utils.particles import com.saveourtool.frontend.common.utils.useBackground import com.saveourtool.frontend.common.utils.useDeferredRequest -import com.saveourtool.save.entities.* -import com.saveourtool.save.validation.FrontendRoutes -import com.saveourtool.save.validation.isValidLengthName -import com.saveourtool.save.validation.isValidName +import com.saveourtool.common.entities.* +import com.saveourtool.common.validation.FrontendRoutes +import com.saveourtool.common.validation.isValidLengthName +import com.saveourtool.common.validation.isValidName import react.* import react.dom.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ExecutionView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ExecutionView.kt index 7cd5350121..ef4bc65908 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ExecutionView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ExecutionView.kt @@ -25,11 +25,11 @@ import com.saveourtool.frontend.common.themes.Colors import com.saveourtool.frontend.common.utils.* import com.saveourtool.save.core.logging.describe import com.saveourtool.save.core.result.CountWarnings -import com.saveourtool.save.domain.TestResultDebugInfo -import com.saveourtool.save.domain.TestResultStatus -import com.saveourtool.save.execution.ExecutionDto -import com.saveourtool.save.execution.ExecutionUpdateDto -import com.saveourtool.save.filters.TestExecutionFilter +import com.saveourtool.common.domain.TestResultDebugInfo +import com.saveourtool.common.domain.TestResultStatus +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.execution.ExecutionUpdateDto +import com.saveourtool.common.filters.TestExecutionFilter import com.saveourtool.save.frontend.components.basic.displayExecutionInfoHeader import com.saveourtool.save.frontend.components.basic.displayTestNotFound import com.saveourtool.save.frontend.components.basic.executionStatusComponent @@ -37,7 +37,7 @@ import com.saveourtool.save.frontend.components.basic.table.filters.testExecutio import com.saveourtool.save.frontend.components.basic.testStatusComponent import com.saveourtool.save.frontend.components.views.test.analysis.analysisResultsView import com.saveourtool.save.frontend.components.views.test.analysis.testMetricsView -import com.saveourtool.save.utils.ELLIPSIS +import com.saveourtool.common.utils.ELLIPSIS import js.core.jso import org.w3c.fetch.Headers diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/HistoryView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/HistoryView.kt index c0234b112b..d3348003a7 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/HistoryView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/HistoryView.kt @@ -19,12 +19,12 @@ import com.saveourtool.frontend.common.externals.fontawesome.faSpinner import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.frontend.common.themes.Colors import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.domain.TestResultStatus -import com.saveourtool.save.execution.ExecutionDto -import com.saveourtool.save.execution.ExecutionStatus -import com.saveourtool.save.filters.ExecutionFilter +import com.saveourtool.common.domain.TestResultStatus +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.execution.ExecutionStatus +import com.saveourtool.common.filters.ExecutionFilter import com.saveourtool.save.frontend.externals.calendar.calendar -import com.saveourtool.save.utils.DATABASE_DELIMITER +import com.saveourtool.common.utils.DATABASE_DELIMITER import js.core.jso import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/OrganizationAdminView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/OrganizationAdminView.kt index 05f77923e4..23b9e4c4bc 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/OrganizationAdminView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/OrganizationAdminView.kt @@ -13,9 +13,9 @@ import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.http.responseChangeOrganizationStatus import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.classLoadingHandler -import com.saveourtool.save.entities.OrganizationDto -import com.saveourtool.save.entities.OrganizationStatus -import com.saveourtool.save.filters.OrganizationFilter +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.entities.OrganizationStatus +import com.saveourtool.common.filters.OrganizationFilter import react.ChildrenBuilder import react.FC diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ProjectView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ProjectView.kt index a30598c276..7cb04a6ced 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ProjectView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ProjectView.kt @@ -14,13 +14,13 @@ import com.saveourtool.frontend.common.components.views.AbstractView import com.saveourtool.frontend.common.http.getProject import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.noopResponseHandler -import com.saveourtool.save.domain.* -import com.saveourtool.save.entities.* -import com.saveourtool.save.execution.ExecutionDto +import com.saveourtool.common.domain.* +import com.saveourtool.common.entities.* +import com.saveourtool.common.execution.ExecutionDto import com.saveourtool.save.frontend.components.basic.projects.* import com.saveourtool.save.frontend.utils.ProjectMenuBar -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.utils.getHighestRole +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.utils.getHighestRole import js.core.jso import org.w3c.fetch.Headers diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/TestExecutionDetailsView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/TestExecutionDetailsView.kt index 22ee86eda6..1754c4f865 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/TestExecutionDetailsView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/TestExecutionDetailsView.kt @@ -11,7 +11,7 @@ import com.saveourtool.save.core.result.Crash import com.saveourtool.save.core.result.Fail import com.saveourtool.save.core.result.Ignored import com.saveourtool.save.core.result.Pass -import com.saveourtool.save.domain.TestResultDebugInfo +import com.saveourtool.common.domain.TestResultDebugInfo import react.* import react.dom.html.ReactHTML.br diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestGlobalRatingView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestGlobalRatingView.kt index 5cb8f6a4af..d8aa9bbbf6 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestGlobalRatingView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestGlobalRatingView.kt @@ -17,10 +17,10 @@ import com.saveourtool.frontend.common.components.tables.visibleColumnsCount import com.saveourtool.frontend.common.components.views.AbstractView import com.saveourtool.frontend.common.externals.fontawesome.faTrophy import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.OrganizationWithRating -import com.saveourtool.save.entities.ProjectDto -import com.saveourtool.save.filters.OrganizationFilter -import com.saveourtool.save.filters.ProjectFilter +import com.saveourtool.common.entities.OrganizationWithRating +import com.saveourtool.common.entities.ProjectDto +import com.saveourtool.common.filters.OrganizationFilter +import com.saveourtool.common.filters.ProjectFilter import js.core.jso import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestListCard.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestListCard.kt index bde624b318..3f0813a87f 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestListCard.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestListCard.kt @@ -12,10 +12,10 @@ import com.saveourtool.frontend.common.externals.fontawesome.faArrowRight import com.saveourtool.frontend.common.externals.fontawesome.faCode import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.contest.ContestDto +import com.saveourtool.common.entities.contest.ContestDto import com.saveourtool.save.frontend.components.basic.ContestNameProps import com.saveourtool.save.frontend.components.basic.showContestEnrollerModal -import com.saveourtool.save.validation.FrontendRoutes +import com.saveourtool.common.validation.FrontendRoutes import js.core.jso import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestListView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestListView.kt index 8f7bb81088..fa299e39a6 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestListView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestListView.kt @@ -8,7 +8,7 @@ package com.saveourtool.save.frontend.components.views.contests import com.saveourtool.frontend.common.utils.Style import com.saveourtool.frontend.common.utils.useBackground -import com.saveourtool.save.info.UserInfo +import com.saveourtool.common.info.UserInfo import react.* import react.dom.html.ReactHTML.div diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestSampleListCard.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestSampleListCard.kt index 383e9376b5..1041847f4d 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestSampleListCard.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestSampleListCard.kt @@ -7,8 +7,8 @@ package com.saveourtool.save.frontend.components.views.contests import com.saveourtool.frontend.common.components.tables.* import com.saveourtool.frontend.common.externals.fontawesome.faCode import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.contest.ContestSampleDto -import com.saveourtool.save.validation.FrontendRoutes +import com.saveourtool.common.entities.contest.ContestSampleDto +import com.saveourtool.common.validation.FrontendRoutes import react.FC import react.Fragment diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestTemplateView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestTemplateView.kt index 07b6b618ae..581766b318 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestTemplateView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestTemplateView.kt @@ -4,10 +4,10 @@ package com.saveourtool.save.frontend.components.views.contests import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.noopLoadingHandler -import com.saveourtool.save.entities.contest.ContestSampleDto -import com.saveourtool.save.entities.contest.ContestSampleFieldDto -import com.saveourtool.save.entities.contest.ContestSampleFieldType -import com.saveourtool.save.info.UserInfo +import com.saveourtool.common.entities.contest.ContestSampleDto +import com.saveourtool.common.entities.contest.ContestSampleFieldDto +import com.saveourtool.common.entities.contest.ContestSampleFieldType +import com.saveourtool.common.info.UserInfo import js.core.jso import react.FC diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestsStatistics.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestsStatistics.kt index 4bbc8c1ddc..29529fd21a 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestsStatistics.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestsStatistics.kt @@ -5,7 +5,7 @@ package com.saveourtool.save.frontend.components.views.contests import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.contest.ContestDto +import com.saveourtool.common.entities.contest.ContestDto import js.core.jso import react.ChildrenBuilder diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/CountDownTimer.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/CountDownTimer.kt index 1edb9e4473..f0a27aea39 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/CountDownTimer.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/CountDownTimer.kt @@ -7,7 +7,7 @@ package com.saveourtool.save.frontend.components.views.contests -import com.saveourtool.save.entities.contest.ContestDto +import com.saveourtool.common.entities.contest.ContestDto import react.FC import react.Props import kotlin.js.Date diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/CreateContestTemplateView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/CreateContestTemplateView.kt index 3c34588246..7534c63445 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/CreateContestTemplateView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/CreateContestTemplateView.kt @@ -5,10 +5,10 @@ package com.saveourtool.save.frontend.components.views.contests import com.saveourtool.frontend.common.components.inputform.InputTypes import com.saveourtool.frontend.common.components.inputform.inputTextFormRequired import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.contest.ContestSampleDto -import com.saveourtool.save.entities.contest.ContestSampleFieldDto -import com.saveourtool.save.entities.contest.ContestSampleFieldType -import com.saveourtool.save.validation.FrontendRoutes +import com.saveourtool.common.entities.contest.ContestSampleDto +import com.saveourtool.common.entities.contest.ContestSampleFieldDto +import com.saveourtool.common.entities.contest.ContestSampleFieldType +import com.saveourtool.common.validation.FrontendRoutes import react.FC import react.Props diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/CreateNewContestTemplate.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/CreateNewContestTemplate.kt index fdc6776b14..6376e114dc 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/CreateNewContestTemplate.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/CreateNewContestTemplate.kt @@ -2,7 +2,7 @@ package com.saveourtool.save.frontend.components.views.contests -import com.saveourtool.save.validation.FrontendRoutes +import com.saveourtool.common.validation.FrontendRoutes import js.core.jso import react.FC import react.Props diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/FeaturedContests.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/FeaturedContests.kt index c5d0cad1c4..092157f64a 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/FeaturedContests.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/FeaturedContests.kt @@ -10,7 +10,7 @@ import com.saveourtool.frontend.common.components.modal.mediumTransparentModalSt import com.saveourtool.frontend.common.externals.fontawesome.faArrowRight import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.contest.ContestDto +import com.saveourtool.common.entities.contest.ContestDto import com.saveourtool.save.frontend.components.basic.ContestNameProps import com.saveourtool.save.frontend.components.basic.showContestEnrollerModal diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/GlobalRating.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/GlobalRating.kt index dfbf459cf9..ef37d84ef4 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/GlobalRating.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/GlobalRating.kt @@ -8,12 +8,12 @@ package com.saveourtool.save.frontend.components.views.contests import com.saveourtool.frontend.common.externals.fontawesome.faTrophy import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.OrganizationWithRating -import com.saveourtool.save.entities.ProjectDto -import com.saveourtool.save.filters.OrganizationFilter -import com.saveourtool.save.filters.ProjectFilter -import com.saveourtool.save.frontend.TabMenuBar -import com.saveourtool.save.validation.FrontendRoutes +import com.saveourtool.common.entities.OrganizationWithRating +import com.saveourtool.common.entities.ProjectDto +import com.saveourtool.common.filters.OrganizationFilter +import com.saveourtool.common.filters.ProjectFilter +import com.saveourtool.common.frontend.TabMenuBar +import com.saveourtool.common.validation.FrontendRoutes import js.core.jso import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/MyProjectsRating.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/MyProjectsRating.kt index d9c2206490..03b2661123 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/MyProjectsRating.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/MyProjectsRating.kt @@ -6,7 +6,7 @@ package com.saveourtool.save.frontend.components.views.contests import com.saveourtool.frontend.common.externals.fontawesome.faUser import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.ProjectDto +import com.saveourtool.common.entities.ProjectDto import js.core.jso import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/NewContests.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/NewContests.kt index 9dcc5d8d16..6d5f367746 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/NewContests.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/NewContests.kt @@ -5,7 +5,7 @@ package com.saveourtool.save.frontend.components.views.contests import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.contest.ContestDto +import com.saveourtool.common.entities.contest.ContestDto import js.core.jso import react.FC diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/demo/CpgView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/demo/CpgView.kt index 1da2d33908..4bd713e464 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/demo/CpgView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/demo/CpgView.kt @@ -10,12 +10,12 @@ import com.saveourtool.frontend.common.components.basic.cardComponent import com.saveourtool.frontend.common.components.modal.displaySimpleModal import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.loadingHandler -import com.saveourtool.save.demo.cpg.CpgResult -import com.saveourtool.save.demo.cpg.cytoscape.CytoscapeLayout +import com.saveourtool.common.demo.cpg.CpgResult +import com.saveourtool.common.demo.cpg.cytoscape.CytoscapeLayout import com.saveourtool.save.frontend.components.basic.demo.graphDemoComponent import com.saveourtool.save.frontend.components.basic.graph.cytoscapeVisualizer import com.saveourtool.save.frontend.externals.reactace.AceMarkers -import com.saveourtool.save.utils.Languages +import com.saveourtool.common.utils.Languages import js.core.jso import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/demo/DemoView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/demo/DemoView.kt index 030575df0a..af4fc07d22 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/demo/DemoView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/demo/DemoView.kt @@ -10,11 +10,11 @@ import com.saveourtool.frontend.common.components.basic.cardComponent import com.saveourtool.frontend.common.utils.Style import com.saveourtool.frontend.common.utils.selectorBuilder import com.saveourtool.frontend.common.utils.useBackground -import com.saveourtool.save.domain.ProjectCoordinates +import com.saveourtool.common.domain.ProjectCoordinates import com.saveourtool.save.frontend.components.basic.demo.run.demoRunComponent import com.saveourtool.save.frontend.externals.reactace.AceThemes import com.saveourtool.save.frontend.utils.* -import com.saveourtool.save.utils.Languages +import com.saveourtool.common.utils.Languages import react.* import react.dom.html.ReactHTML.div diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/CardAboutUs.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/CardAboutUs.kt index 5f4f177f1e..27f963a080 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/CardAboutUs.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/CardAboutUs.kt @@ -8,7 +8,7 @@ import com.saveourtool.frontend.common.externals.fontawesome.faGithub import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.frontend.common.utils.buttonBuilder import com.saveourtool.save.frontend.externals.i18next.useTranslation -import com.saveourtool.save.validation.FrontendRoutes +import com.saveourtool.common.validation.FrontendRoutes import js.core.jso import react.FC diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/CardUser.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/CardUser.kt index 57f3256527..f3b321508a 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/CardUser.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/CardUser.kt @@ -6,11 +6,11 @@ package com.saveourtool.save.frontend.components.views.index import com.saveourtool.frontend.common.components.basic.renderAvatar import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.entities.OrganizationDto -import com.saveourtool.save.entities.OrganizationStatus +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.entities.OrganizationStatus import com.saveourtool.save.frontend.externals.i18next.useTranslation -import com.saveourtool.save.validation.FrontendCosvRoutes -import com.saveourtool.save.validation.FrontendRoutes +import com.saveourtool.common.validation.FrontendCosvRoutes +import com.saveourtool.common.validation.FrontendRoutes import io.ktor.util.* import js.core.jso diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexLogoButtons.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexLogoButtons.kt index f493a03e60..0957f3c996 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexLogoButtons.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexLogoButtons.kt @@ -5,7 +5,7 @@ package com.saveourtool.save.frontend.components.views.index import com.saveourtool.save.frontend.externals.i18next.useTranslation -import com.saveourtool.save.validation.FrontendRoutes +import com.saveourtool.common.validation.FrontendRoutes import js.core.jso import react.ChildrenBuilder import react.FC diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexViewAuth.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexViewAuth.kt index af18e785d2..ed3a342d8a 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexViewAuth.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexViewAuth.kt @@ -7,7 +7,7 @@ package com.saveourtool.save.frontend.components.views.index import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.noopResponseHandler import com.saveourtool.save.frontend.externals.i18next.useTranslation -import com.saveourtool.save.info.OauthProviderInfo +import com.saveourtool.common.info.OauthProviderInfo import org.w3c.fetch.Headers import react.FC diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexViewUserInfo.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexViewUserInfo.kt index b34b2f3aef..118d75eb52 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexViewUserInfo.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexViewUserInfo.kt @@ -8,9 +8,9 @@ import com.saveourtool.frontend.common.components.basic.markdown import com.saveourtool.frontend.common.externals.fontawesome.faTimes import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.noopLoadingHandler -import com.saveourtool.save.entities.NotificationDto +import com.saveourtool.common.entities.NotificationDto import com.saveourtool.save.frontend.externals.i18next.useTranslation -import com.saveourtool.save.utils.toUnixCalendarFormat +import com.saveourtool.common.utils.toUnixCalendarFormat import js.core.jso import react.ChildrenBuilder diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/projectcollection/Cards.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/projectcollection/Cards.kt index c103a33dc1..db3f7e3d16 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/projectcollection/Cards.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/projectcollection/Cards.kt @@ -4,7 +4,7 @@ package com.saveourtool.save.frontend.components.views.projectcollection -import com.saveourtool.save.validation.FrontendRoutes +import com.saveourtool.common.validation.FrontendRoutes import js.core.jso import react.ChildrenBuilder diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/projectcollection/CollectionView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/projectcollection/CollectionView.kt index 1fb66e6714..b05163d562 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/projectcollection/CollectionView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/projectcollection/CollectionView.kt @@ -11,9 +11,9 @@ import com.saveourtool.frontend.common.components.tables.value import com.saveourtool.frontend.common.components.views.AbstractView import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.classLoadingHandler -import com.saveourtool.save.entities.ProjectDto -import com.saveourtool.save.filters.ProjectFilter -import com.saveourtool.save.info.UserInfo +import com.saveourtool.common.entities.ProjectDto +import com.saveourtool.common.filters.ProjectFilter +import com.saveourtool.common.info.UserInfo import react.* import react.dom.html.ReactHTML.div diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/test/analysis/AnalysisResultView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/test/analysis/AnalysisResultView.kt index 18757fb7b0..c7a6bb39af 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/test/analysis/AnalysisResultView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/test/analysis/AnalysisResultView.kt @@ -7,12 +7,12 @@ import com.saveourtool.frontend.common.externals.fontawesome.faCheckCircle import com.saveourtool.frontend.common.externals.fontawesome.faDice import com.saveourtool.frontend.common.externals.fontawesome.faPoo import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon -import com.saveourtool.save.test.analysis.results.AnalysisResult -import com.saveourtool.save.test.analysis.results.FlakyTest -import com.saveourtool.save.test.analysis.results.IrregularTest -import com.saveourtool.save.test.analysis.results.PermanentFailure -import com.saveourtool.save.test.analysis.results.Regression -import com.saveourtool.save.test.analysis.results.RegularTest +import com.saveourtool.common.test.analysis.results.AnalysisResult +import com.saveourtool.common.test.analysis.results.FlakyTest +import com.saveourtool.common.test.analysis.results.IrregularTest +import com.saveourtool.common.test.analysis.results.PermanentFailure +import com.saveourtool.common.test.analysis.results.Regression +import com.saveourtool.common.test.analysis.results.RegularTest import js.core.jso import react.ChildrenBuilder diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/test/analysis/AnalysisResultsView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/test/analysis/AnalysisResultsView.kt index 5ed176e92f..1f4867e065 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/test/analysis/AnalysisResultsView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/test/analysis/AnalysisResultsView.kt @@ -2,7 +2,7 @@ package com.saveourtool.save.frontend.components.views.test.analysis -import com.saveourtool.save.test.analysis.results.AnalysisResult +import com.saveourtool.common.test.analysis.results.AnalysisResult import react.FC import react.Props diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/test/analysis/TestMetricsView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/test/analysis/TestMetricsView.kt index a250c8d69b..72e4e1ea74 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/test/analysis/TestMetricsView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/test/analysis/TestMetricsView.kt @@ -2,9 +2,9 @@ package com.saveourtool.save.frontend.components.views.test.analysis -import com.saveourtool.save.test.analysis.metrics.NoDataAvailable -import com.saveourtool.save.test.analysis.metrics.RegularTestMetrics -import com.saveourtool.save.test.analysis.metrics.TestMetrics +import com.saveourtool.common.test.analysis.metrics.NoDataAvailable +import com.saveourtool.common.test.analysis.metrics.RegularTestMetrics +import com.saveourtool.common.test.analysis.metrics.TestMetrics import react.FC import react.Props diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/welcome/SaveWelcomeView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/welcome/SaveWelcomeView.kt index cc9b733dd3..db7c03f62d 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/welcome/SaveWelcomeView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/welcome/SaveWelcomeView.kt @@ -19,8 +19,8 @@ import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.externals.i18next.useTranslation import com.saveourtool.frontend.common.themes.Colors import com.saveourtool.frontend.common.utils.* -import com.saveourtool.save.info.OauthProviderInfo -import com.saveourtool.save.validation.FrontendRoutes +import com.saveourtool.common.info.OauthProviderInfo +import com.saveourtool.common.validation.FrontendRoutes import js.core.jso import org.w3c.fetch.Headers diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/welcome/WelcomeUtils.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/welcome/WelcomeUtils.kt index 2335540997..9d39012e16 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/welcome/WelcomeUtils.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/welcome/WelcomeUtils.kt @@ -9,9 +9,9 @@ import com.saveourtool.frontend.common.themes.Colors import com.saveourtool.frontend.common.utils.OauthProvidersFeConfig import com.saveourtool.frontend.common.utils.processRegistrationId import com.saveourtool.save.frontend.externals.i18next.TranslationFunction -import com.saveourtool.save.info.OauthProviderInfo -import com.saveourtool.save.info.UserInfo -import com.saveourtool.save.validation.FrontendRoutes +import com.saveourtool.common.info.OauthProviderInfo +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.validation.FrontendRoutes import js.core.jso import react.ChildrenBuilder From ddf3ebc2441e3e41332f9e9496dcc0bc251add79 Mon Sep 17 00:00:00 2001 From: Cheshiriks Date: Thu, 25 Apr 2024 13:57:59 +0300 Subject: [PATCH 9/9] Renaming save-cloud-common module to common --- .../components/views/AwesomeBenchmarksView.kt | 8 ++++---- .../save/frontend/components/views/BanView.kt | 3 ++- .../components/views/ContestExecutionView.kt | 6 +++--- .../save/frontend/components/views/ContestView.kt | 4 ++-- .../frontend/components/views/CreateProjectView.kt | 8 ++++---- .../save/frontend/components/views/ExecutionView.kt | 12 ++++++------ .../save/frontend/components/views/HistoryView.kt | 10 +++++----- .../components/views/OrganizationAdminView.kt | 6 +++--- .../save/frontend/components/views/ProjectView.kt | 10 +++++----- .../components/views/TestExecutionDetailsView.kt | 2 +- .../views/contests/ContestGlobalRatingView.kt | 8 ++++---- .../components/views/contests/ContestListCard.kt | 4 ++-- .../components/views/contests/ContestListView.kt | 2 +- .../views/contests/ContestSampleListCard.kt | 4 ++-- .../components/views/contests/ContestTemplateView.kt | 4 ++-- .../components/views/contests/ContestsStatistics.kt | 2 +- .../views/contests/CreateContestTemplateView.kt | 6 +++--- .../components/views/contests/FeaturedContests.kt | 2 +- .../components/views/contests/GlobalRating.kt | 4 ++-- .../components/views/contests/MyProjectsRating.kt | 2 +- .../components/views/contests/NewContests.kt | 2 +- .../save/frontend/components/views/demo/CpgView.kt | 6 +++--- .../save/frontend/components/views/demo/DemoView.kt | 4 ++-- .../frontend/components/views/index/CardAboutUs.kt | 2 +- .../save/frontend/components/views/index/CardUser.kt | 6 +++--- .../components/views/index/IndexLogoButtons.kt | 3 ++- .../frontend/components/views/index/IndexViewAuth.kt | 2 +- .../components/views/index/IndexViewUserInfo.kt | 4 ++-- .../views/projectcollection/CollectionView.kt | 6 +++--- .../views/test/analysis/AnalysisResultView.kt | 10 +++++----- .../components/views/welcome/SaveWelcomeView.kt | 4 ++-- .../components/views/welcome/WelcomeUtils.kt | 6 +++--- 32 files changed, 82 insertions(+), 80 deletions(-) diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/AwesomeBenchmarksView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/AwesomeBenchmarksView.kt index d9169ce42c..1a5497081a 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/AwesomeBenchmarksView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/AwesomeBenchmarksView.kt @@ -6,15 +6,15 @@ package com.saveourtool.save.frontend.components.views +import com.saveourtool.common.entities.benchmarks.BenchmarkCategoryEnum +import com.saveourtool.common.utils.AwesomeBenchmarks +import com.saveourtool.common.utils.DATABASE_DELIMITER +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.components.RequestStatusContext import com.saveourtool.frontend.common.components.requestStatusContext import com.saveourtool.frontend.common.components.views.AbstractView import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.utils.* -import com.saveourtool.common.entities.benchmarks.BenchmarkCategoryEnum -import com.saveourtool.common.utils.AwesomeBenchmarks -import com.saveourtool.common.utils.DATABASE_DELIMITER -import com.saveourtool.common.validation.FrontendRoutes import js.core.jso import org.w3c.fetch.Headers diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/BanView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/BanView.kt index 7bb0ce8735..bfb3161815 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/BanView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/BanView.kt @@ -6,11 +6,12 @@ package com.saveourtool.save.frontend.components.views +import com.saveourtool.common.info.UserStatus import com.saveourtool.frontend.common.utils.Style import com.saveourtool.frontend.common.utils.UserInfoAwareProps import com.saveourtool.frontend.common.utils.useBackground import com.saveourtool.frontend.common.utils.useRedirectToIndexIf -import com.saveourtool.common.info.UserStatus + import js.core.jso import react.FC import react.dom.html.ReactHTML.a diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ContestExecutionView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ContestExecutionView.kt index 92e5a5dfd2..50e781d4c0 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ContestExecutionView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ContestExecutionView.kt @@ -4,6 +4,9 @@ package com.saveourtool.save.frontend.components.views +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.execution.ExecutionStatus +import com.saveourtool.common.info.UserInfo import com.saveourtool.frontend.common.components.tables.TableProps import com.saveourtool.frontend.common.components.tables.columns import com.saveourtool.frontend.common.components.tables.enableExpanding @@ -15,15 +18,12 @@ import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.themes.Colors import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.Style -import com.saveourtool.common.execution.ExecutionDto -import com.saveourtool.common.execution.ExecutionStatus import com.saveourtool.save.frontend.components.RequestStatusContext import com.saveourtool.save.frontend.components.basic.* import com.saveourtool.save.frontend.components.requestStatusContext import com.saveourtool.save.frontend.externals.chart.DataPieChart import com.saveourtool.save.frontend.externals.chart.PieChartColors import com.saveourtool.save.frontend.externals.chart.pieChart -import com.saveourtool.common.info.UserInfo import js.core.jso import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ContestView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ContestView.kt index c4329a3c96..d4c5e6f21c 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ContestView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ContestView.kt @@ -2,6 +2,8 @@ package com.saveourtool.save.frontend.components.views +import com.saveourtool.common.entities.contest.ContestDto +import com.saveourtool.common.info.UserInfo import com.saveourtool.frontend.common.components.RequestStatusContext import com.saveourtool.frontend.common.components.basic.contests.contestInfoMenu import com.saveourtool.frontend.common.components.basic.contests.contestSubmissionsMenu @@ -13,8 +15,6 @@ import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.apiUrl import com.saveourtool.frontend.common.utils.classLoadingHandler import com.saveourtool.frontend.common.utils.jsonHeaders -import com.saveourtool.common.entities.contest.ContestDto -import com.saveourtool.common.info.UserInfo import react.* import react.dom.html.ReactHTML.div diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/CreateProjectView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/CreateProjectView.kt index eec8877304..f161745683 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/CreateProjectView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/CreateProjectView.kt @@ -6,6 +6,10 @@ package com.saveourtool.save.frontend.components.views +import com.saveourtool.common.entities.* +import com.saveourtool.common.validation.FrontendRoutes +import com.saveourtool.common.validation.isValidLengthName +import com.saveourtool.common.validation.isValidName import com.saveourtool.frontend.common.components.basic.SelectFormRequiredProps import com.saveourtool.frontend.common.components.basic.selectFormRequired import com.saveourtool.frontend.common.components.inputform.InputTypes @@ -21,10 +25,6 @@ import com.saveourtool.frontend.common.utils.buttonBuilder import com.saveourtool.frontend.common.utils.particles import com.saveourtool.frontend.common.utils.useBackground import com.saveourtool.frontend.common.utils.useDeferredRequest -import com.saveourtool.common.entities.* -import com.saveourtool.common.validation.FrontendRoutes -import com.saveourtool.common.validation.isValidLengthName -import com.saveourtool.common.validation.isValidName import react.* import react.dom.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ExecutionView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ExecutionView.kt index ef4bc65908..e264fe7d82 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ExecutionView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ExecutionView.kt @@ -6,6 +6,12 @@ package com.saveourtool.save.frontend.components.views import com.saveourtool.common.agent.TestExecutionDto import com.saveourtool.common.agent.TestExecutionExtDto +import com.saveourtool.common.domain.TestResultDebugInfo +import com.saveourtool.common.domain.TestResultStatus +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.execution.ExecutionUpdateDto +import com.saveourtool.common.filters.TestExecutionFilter +import com.saveourtool.common.utils.ELLIPSIS import com.saveourtool.frontend.common.components.RequestStatusContext import com.saveourtool.frontend.common.components.basic.* import com.saveourtool.frontend.common.components.requestStatusContext @@ -25,11 +31,6 @@ import com.saveourtool.frontend.common.themes.Colors import com.saveourtool.frontend.common.utils.* import com.saveourtool.save.core.logging.describe import com.saveourtool.save.core.result.CountWarnings -import com.saveourtool.common.domain.TestResultDebugInfo -import com.saveourtool.common.domain.TestResultStatus -import com.saveourtool.common.execution.ExecutionDto -import com.saveourtool.common.execution.ExecutionUpdateDto -import com.saveourtool.common.filters.TestExecutionFilter import com.saveourtool.save.frontend.components.basic.displayExecutionInfoHeader import com.saveourtool.save.frontend.components.basic.displayTestNotFound import com.saveourtool.save.frontend.components.basic.executionStatusComponent @@ -37,7 +38,6 @@ import com.saveourtool.save.frontend.components.basic.table.filters.testExecutio import com.saveourtool.save.frontend.components.basic.testStatusComponent import com.saveourtool.save.frontend.components.views.test.analysis.analysisResultsView import com.saveourtool.save.frontend.components.views.test.analysis.testMetricsView -import com.saveourtool.common.utils.ELLIPSIS import js.core.jso import org.w3c.fetch.Headers diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/HistoryView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/HistoryView.kt index d3348003a7..20d99c9842 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/HistoryView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/HistoryView.kt @@ -4,6 +4,11 @@ package com.saveourtool.save.frontend.components.views +import com.saveourtool.common.domain.TestResultStatus +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.execution.ExecutionStatus +import com.saveourtool.common.filters.ExecutionFilter +import com.saveourtool.common.utils.DATABASE_DELIMITER import com.saveourtool.frontend.common.components.RequestStatusContext import com.saveourtool.frontend.common.components.modal.displayModal import com.saveourtool.frontend.common.components.modal.mediumTransparentModalStyle @@ -19,12 +24,7 @@ import com.saveourtool.frontend.common.externals.fontawesome.faSpinner import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.frontend.common.themes.Colors import com.saveourtool.frontend.common.utils.* -import com.saveourtool.common.domain.TestResultStatus -import com.saveourtool.common.execution.ExecutionDto -import com.saveourtool.common.execution.ExecutionStatus -import com.saveourtool.common.filters.ExecutionFilter import com.saveourtool.save.frontend.externals.calendar.calendar -import com.saveourtool.common.utils.DATABASE_DELIMITER import js.core.jso import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/OrganizationAdminView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/OrganizationAdminView.kt index 23b9e4c4bc..32bd460739 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/OrganizationAdminView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/OrganizationAdminView.kt @@ -2,6 +2,9 @@ package com.saveourtool.save.frontend.components.views +import com.saveourtool.common.entities.OrganizationDto +import com.saveourtool.common.entities.OrganizationStatus +import com.saveourtool.common.filters.OrganizationFilter import com.saveourtool.frontend.common.components.tables.TableProps import com.saveourtool.frontend.common.components.tables.columns import com.saveourtool.frontend.common.components.tables.tableComponent @@ -13,9 +16,6 @@ import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.http.responseChangeOrganizationStatus import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.classLoadingHandler -import com.saveourtool.common.entities.OrganizationDto -import com.saveourtool.common.entities.OrganizationStatus -import com.saveourtool.common.filters.OrganizationFilter import react.ChildrenBuilder import react.FC diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ProjectView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ProjectView.kt index 7cb04a6ced..32cdd23b36 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ProjectView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/ProjectView.kt @@ -6,6 +6,11 @@ package com.saveourtool.save.frontend.components.views +import com.saveourtool.common.domain.* +import com.saveourtool.common.entities.* +import com.saveourtool.common.execution.ExecutionDto +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.utils.getHighestRole import com.saveourtool.frontend.common.components.RequestStatusContext import com.saveourtool.frontend.common.components.modal.displayModal import com.saveourtool.frontend.common.components.modal.mediumTransparentModalStyle @@ -14,13 +19,8 @@ import com.saveourtool.frontend.common.components.views.AbstractView import com.saveourtool.frontend.common.http.getProject import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.noopResponseHandler -import com.saveourtool.common.domain.* -import com.saveourtool.common.entities.* -import com.saveourtool.common.execution.ExecutionDto import com.saveourtool.save.frontend.components.basic.projects.* import com.saveourtool.save.frontend.utils.ProjectMenuBar -import com.saveourtool.common.info.UserInfo -import com.saveourtool.common.utils.getHighestRole import js.core.jso import org.w3c.fetch.Headers diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/TestExecutionDetailsView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/TestExecutionDetailsView.kt index 1754c4f865..d6d8b424f4 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/TestExecutionDetailsView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/TestExecutionDetailsView.kt @@ -2,6 +2,7 @@ package com.saveourtool.save.frontend.components.views +import com.saveourtool.common.domain.TestResultDebugInfo import com.saveourtool.frontend.common.http.getDebugInfoFor import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.decodeFromJsonString @@ -11,7 +12,6 @@ import com.saveourtool.save.core.result.Crash import com.saveourtool.save.core.result.Fail import com.saveourtool.save.core.result.Ignored import com.saveourtool.save.core.result.Pass -import com.saveourtool.common.domain.TestResultDebugInfo import react.* import react.dom.html.ReactHTML.br diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestGlobalRatingView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestGlobalRatingView.kt index d8aa9bbbf6..2cc72dc678 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestGlobalRatingView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestGlobalRatingView.kt @@ -4,6 +4,10 @@ package com.saveourtool.save.frontend.components.views.contests +import com.saveourtool.common.entities.OrganizationWithRating +import com.saveourtool.common.entities.ProjectDto +import com.saveourtool.common.filters.OrganizationFilter +import com.saveourtool.common.filters.ProjectFilter import com.saveourtool.frontend.common.components.basic.AVATAR_ORGANIZATION_PLACEHOLDER import com.saveourtool.frontend.common.components.basic.avatarRenderer import com.saveourtool.frontend.common.components.basic.table.filters.nameFiltersRow @@ -17,10 +21,6 @@ import com.saveourtool.frontend.common.components.tables.visibleColumnsCount import com.saveourtool.frontend.common.components.views.AbstractView import com.saveourtool.frontend.common.externals.fontawesome.faTrophy import com.saveourtool.frontend.common.utils.* -import com.saveourtool.common.entities.OrganizationWithRating -import com.saveourtool.common.entities.ProjectDto -import com.saveourtool.common.filters.OrganizationFilter -import com.saveourtool.common.filters.ProjectFilter import js.core.jso import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestListCard.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestListCard.kt index 3f0813a87f..041d3169f3 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestListCard.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestListCard.kt @@ -6,16 +6,16 @@ package com.saveourtool.save.frontend.components.views.contests +import com.saveourtool.common.entities.contest.ContestDto +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.components.modal.displayModal import com.saveourtool.frontend.common.components.modal.mediumTransparentModalStyle import com.saveourtool.frontend.common.externals.fontawesome.faArrowRight import com.saveourtool.frontend.common.externals.fontawesome.faCode import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.frontend.common.utils.* -import com.saveourtool.common.entities.contest.ContestDto import com.saveourtool.save.frontend.components.basic.ContestNameProps import com.saveourtool.save.frontend.components.basic.showContestEnrollerModal -import com.saveourtool.common.validation.FrontendRoutes import js.core.jso import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestListView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestListView.kt index fa299e39a6..64d3332a91 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestListView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestListView.kt @@ -6,9 +6,9 @@ package com.saveourtool.save.frontend.components.views.contests +import com.saveourtool.common.info.UserInfo import com.saveourtool.frontend.common.utils.Style import com.saveourtool.frontend.common.utils.useBackground -import com.saveourtool.common.info.UserInfo import react.* import react.dom.html.ReactHTML.div diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestSampleListCard.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestSampleListCard.kt index 1041847f4d..a5545c8dda 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestSampleListCard.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestSampleListCard.kt @@ -4,11 +4,11 @@ package com.saveourtool.save.frontend.components.views.contests +import com.saveourtool.common.entities.contest.ContestSampleDto +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.components.tables.* import com.saveourtool.frontend.common.externals.fontawesome.faCode import com.saveourtool.frontend.common.utils.* -import com.saveourtool.common.entities.contest.ContestSampleDto -import com.saveourtool.common.validation.FrontendRoutes import react.FC import react.Fragment diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestTemplateView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestTemplateView.kt index 581766b318..b49c44ae5a 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestTemplateView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestTemplateView.kt @@ -2,12 +2,12 @@ package com.saveourtool.save.frontend.components.views.contests -import com.saveourtool.frontend.common.utils.* -import com.saveourtool.frontend.common.utils.noopLoadingHandler import com.saveourtool.common.entities.contest.ContestSampleDto import com.saveourtool.common.entities.contest.ContestSampleFieldDto import com.saveourtool.common.entities.contest.ContestSampleFieldType import com.saveourtool.common.info.UserInfo +import com.saveourtool.frontend.common.utils.* +import com.saveourtool.frontend.common.utils.noopLoadingHandler import js.core.jso import react.FC diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestsStatistics.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestsStatistics.kt index 29529fd21a..10bf3a4c38 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestsStatistics.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/ContestsStatistics.kt @@ -4,8 +4,8 @@ package com.saveourtool.save.frontend.components.views.contests -import com.saveourtool.frontend.common.utils.* import com.saveourtool.common.entities.contest.ContestDto +import com.saveourtool.frontend.common.utils.* import js.core.jso import react.ChildrenBuilder diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/CreateContestTemplateView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/CreateContestTemplateView.kt index 7534c63445..bc632b2af9 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/CreateContestTemplateView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/CreateContestTemplateView.kt @@ -2,13 +2,13 @@ package com.saveourtool.save.frontend.components.views.contests -import com.saveourtool.frontend.common.components.inputform.InputTypes -import com.saveourtool.frontend.common.components.inputform.inputTextFormRequired -import com.saveourtool.frontend.common.utils.* import com.saveourtool.common.entities.contest.ContestSampleDto import com.saveourtool.common.entities.contest.ContestSampleFieldDto import com.saveourtool.common.entities.contest.ContestSampleFieldType import com.saveourtool.common.validation.FrontendRoutes +import com.saveourtool.frontend.common.components.inputform.InputTypes +import com.saveourtool.frontend.common.components.inputform.inputTextFormRequired +import com.saveourtool.frontend.common.utils.* import react.FC import react.Props diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/FeaturedContests.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/FeaturedContests.kt index 092157f64a..92f2e81db7 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/FeaturedContests.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/FeaturedContests.kt @@ -4,13 +4,13 @@ package com.saveourtool.save.frontend.components.views.contests +import com.saveourtool.common.entities.contest.ContestDto import com.saveourtool.frontend.common.components.basic.carousel import com.saveourtool.frontend.common.components.modal.displayModal import com.saveourtool.frontend.common.components.modal.mediumTransparentModalStyle import com.saveourtool.frontend.common.externals.fontawesome.faArrowRight import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.frontend.common.utils.* -import com.saveourtool.common.entities.contest.ContestDto import com.saveourtool.save.frontend.components.basic.ContestNameProps import com.saveourtool.save.frontend.components.basic.showContestEnrollerModal diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/GlobalRating.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/GlobalRating.kt index ef37d84ef4..d466906c69 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/GlobalRating.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/GlobalRating.kt @@ -6,14 +6,14 @@ package com.saveourtool.save.frontend.components.views.contests -import com.saveourtool.frontend.common.externals.fontawesome.faTrophy -import com.saveourtool.frontend.common.utils.* import com.saveourtool.common.entities.OrganizationWithRating import com.saveourtool.common.entities.ProjectDto import com.saveourtool.common.filters.OrganizationFilter import com.saveourtool.common.filters.ProjectFilter import com.saveourtool.common.frontend.TabMenuBar import com.saveourtool.common.validation.FrontendRoutes +import com.saveourtool.frontend.common.externals.fontawesome.faTrophy +import com.saveourtool.frontend.common.utils.* import js.core.jso import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/MyProjectsRating.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/MyProjectsRating.kt index 03b2661123..80184b90f6 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/MyProjectsRating.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/MyProjectsRating.kt @@ -4,9 +4,9 @@ package com.saveourtool.save.frontend.components.views.contests +import com.saveourtool.common.entities.ProjectDto import com.saveourtool.frontend.common.externals.fontawesome.faUser import com.saveourtool.frontend.common.utils.* -import com.saveourtool.common.entities.ProjectDto import js.core.jso import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/NewContests.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/NewContests.kt index 6d5f367746..1add4f6291 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/NewContests.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/contests/NewContests.kt @@ -4,8 +4,8 @@ package com.saveourtool.save.frontend.components.views.contests -import com.saveourtool.frontend.common.utils.* import com.saveourtool.common.entities.contest.ContestDto +import com.saveourtool.frontend.common.utils.* import js.core.jso import react.FC diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/demo/CpgView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/demo/CpgView.kt index 4bd713e464..46b7573c88 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/demo/CpgView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/demo/CpgView.kt @@ -6,16 +6,16 @@ package com.saveourtool.save.frontend.components.views.demo +import com.saveourtool.common.demo.cpg.CpgResult +import com.saveourtool.common.demo.cpg.cytoscape.CytoscapeLayout +import com.saveourtool.common.utils.Languages import com.saveourtool.frontend.common.components.basic.cardComponent import com.saveourtool.frontend.common.components.modal.displaySimpleModal import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.loadingHandler -import com.saveourtool.common.demo.cpg.CpgResult -import com.saveourtool.common.demo.cpg.cytoscape.CytoscapeLayout import com.saveourtool.save.frontend.components.basic.demo.graphDemoComponent import com.saveourtool.save.frontend.components.basic.graph.cytoscapeVisualizer import com.saveourtool.save.frontend.externals.reactace.AceMarkers -import com.saveourtool.common.utils.Languages import js.core.jso import react.* diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/demo/DemoView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/demo/DemoView.kt index af4fc07d22..cc7c849c1e 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/demo/DemoView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/demo/DemoView.kt @@ -6,15 +6,15 @@ package com.saveourtool.save.frontend.components.views.demo +import com.saveourtool.common.domain.ProjectCoordinates +import com.saveourtool.common.utils.Languages import com.saveourtool.frontend.common.components.basic.cardComponent import com.saveourtool.frontend.common.utils.Style import com.saveourtool.frontend.common.utils.selectorBuilder import com.saveourtool.frontend.common.utils.useBackground -import com.saveourtool.common.domain.ProjectCoordinates import com.saveourtool.save.frontend.components.basic.demo.run.demoRunComponent import com.saveourtool.save.frontend.externals.reactace.AceThemes import com.saveourtool.save.frontend.utils.* -import com.saveourtool.common.utils.Languages import react.* import react.dom.html.ReactHTML.div diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/CardAboutUs.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/CardAboutUs.kt index 27f963a080..fa1f87722e 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/CardAboutUs.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/CardAboutUs.kt @@ -4,11 +4,11 @@ package com.saveourtool.save.frontend.components.views.index +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.externals.fontawesome.faGithub import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.frontend.common.utils.buttonBuilder import com.saveourtool.save.frontend.externals.i18next.useTranslation -import com.saveourtool.common.validation.FrontendRoutes import js.core.jso import react.FC diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/CardUser.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/CardUser.kt index f3b321508a..7feba2c6ee 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/CardUser.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/CardUser.kt @@ -4,13 +4,13 @@ package com.saveourtool.save.frontend.components.views.index -import com.saveourtool.frontend.common.components.basic.renderAvatar -import com.saveourtool.frontend.common.utils.* import com.saveourtool.common.entities.OrganizationDto import com.saveourtool.common.entities.OrganizationStatus -import com.saveourtool.save.frontend.externals.i18next.useTranslation import com.saveourtool.common.validation.FrontendCosvRoutes import com.saveourtool.common.validation.FrontendRoutes +import com.saveourtool.frontend.common.components.basic.renderAvatar +import com.saveourtool.frontend.common.utils.* +import com.saveourtool.save.frontend.externals.i18next.useTranslation import io.ktor.util.* import js.core.jso diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexLogoButtons.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexLogoButtons.kt index 0957f3c996..d1879355e1 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexLogoButtons.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexLogoButtons.kt @@ -4,8 +4,9 @@ package com.saveourtool.save.frontend.components.views.index -import com.saveourtool.save.frontend.externals.i18next.useTranslation import com.saveourtool.common.validation.FrontendRoutes +import com.saveourtool.save.frontend.externals.i18next.useTranslation + import js.core.jso import react.ChildrenBuilder import react.FC diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexViewAuth.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexViewAuth.kt index ed3a342d8a..7278e13f43 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexViewAuth.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexViewAuth.kt @@ -4,10 +4,10 @@ package com.saveourtool.save.frontend.components.views.index +import com.saveourtool.common.info.OauthProviderInfo import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.noopResponseHandler import com.saveourtool.save.frontend.externals.i18next.useTranslation -import com.saveourtool.common.info.OauthProviderInfo import org.w3c.fetch.Headers import react.FC diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexViewUserInfo.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexViewUserInfo.kt index 118d75eb52..ca30f3739c 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexViewUserInfo.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/index/IndexViewUserInfo.kt @@ -4,13 +4,13 @@ package com.saveourtool.save.frontend.components.views.index +import com.saveourtool.common.entities.NotificationDto +import com.saveourtool.common.utils.toUnixCalendarFormat import com.saveourtool.frontend.common.components.basic.markdown import com.saveourtool.frontend.common.externals.fontawesome.faTimes import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.noopLoadingHandler -import com.saveourtool.common.entities.NotificationDto import com.saveourtool.save.frontend.externals.i18next.useTranslation -import com.saveourtool.common.utils.toUnixCalendarFormat import js.core.jso import react.ChildrenBuilder diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/projectcollection/CollectionView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/projectcollection/CollectionView.kt index b05163d562..5aed35461e 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/projectcollection/CollectionView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/projectcollection/CollectionView.kt @@ -2,6 +2,9 @@ package com.saveourtool.save.frontend.components.views.projectcollection +import com.saveourtool.common.entities.ProjectDto +import com.saveourtool.common.filters.ProjectFilter +import com.saveourtool.common.info.UserInfo import com.saveourtool.frontend.common.components.RequestStatusContext import com.saveourtool.frontend.common.components.requestStatusContext import com.saveourtool.frontend.common.components.tables.TableProps @@ -11,9 +14,6 @@ import com.saveourtool.frontend.common.components.tables.value import com.saveourtool.frontend.common.components.views.AbstractView import com.saveourtool.frontend.common.utils.* import com.saveourtool.frontend.common.utils.classLoadingHandler -import com.saveourtool.common.entities.ProjectDto -import com.saveourtool.common.filters.ProjectFilter -import com.saveourtool.common.info.UserInfo import react.* import react.dom.html.ReactHTML.div diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/test/analysis/AnalysisResultView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/test/analysis/AnalysisResultView.kt index c7a6bb39af..a0f71cbae0 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/test/analysis/AnalysisResultView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/test/analysis/AnalysisResultView.kt @@ -2,17 +2,17 @@ package com.saveourtool.save.frontend.components.views.test.analysis -import com.saveourtool.frontend.common.externals.fontawesome.faBug -import com.saveourtool.frontend.common.externals.fontawesome.faCheckCircle -import com.saveourtool.frontend.common.externals.fontawesome.faDice -import com.saveourtool.frontend.common.externals.fontawesome.faPoo -import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import com.saveourtool.common.test.analysis.results.AnalysisResult import com.saveourtool.common.test.analysis.results.FlakyTest import com.saveourtool.common.test.analysis.results.IrregularTest import com.saveourtool.common.test.analysis.results.PermanentFailure import com.saveourtool.common.test.analysis.results.Regression import com.saveourtool.common.test.analysis.results.RegularTest +import com.saveourtool.frontend.common.externals.fontawesome.faBug +import com.saveourtool.frontend.common.externals.fontawesome.faCheckCircle +import com.saveourtool.frontend.common.externals.fontawesome.faDice +import com.saveourtool.frontend.common.externals.fontawesome.faPoo +import com.saveourtool.frontend.common.externals.fontawesome.fontAwesomeIcon import js.core.jso import react.ChildrenBuilder diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/welcome/SaveWelcomeView.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/welcome/SaveWelcomeView.kt index db7c03f62d..bf0cdcfa68 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/welcome/SaveWelcomeView.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/welcome/SaveWelcomeView.kt @@ -11,6 +11,8 @@ package com.saveourtool.save.frontend.components.views.welcome +import com.saveourtool.common.info.OauthProviderInfo +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.components.views.welcome.pagers.allSaveWelcomePagers import com.saveourtool.frontend.common.components.views.welcome.pagers.save.renderGeneralInfoPage import com.saveourtool.frontend.common.components.views.welcome.pagers.save.renderReadMorePage @@ -19,8 +21,6 @@ import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.externals.i18next.useTranslation import com.saveourtool.frontend.common.themes.Colors import com.saveourtool.frontend.common.utils.* -import com.saveourtool.common.info.OauthProviderInfo -import com.saveourtool.common.validation.FrontendRoutes import js.core.jso import org.w3c.fetch.Headers diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/welcome/WelcomeUtils.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/welcome/WelcomeUtils.kt index 9d39012e16..0606e456cf 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/welcome/WelcomeUtils.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/welcome/WelcomeUtils.kt @@ -4,14 +4,14 @@ package com.saveourtool.save.frontend.components.views.welcome +import com.saveourtool.common.info.OauthProviderInfo +import com.saveourtool.common.info.UserInfo +import com.saveourtool.common.validation.FrontendRoutes import com.saveourtool.frontend.common.externals.fontawesome.* import com.saveourtool.frontend.common.themes.Colors import com.saveourtool.frontend.common.utils.OauthProvidersFeConfig import com.saveourtool.frontend.common.utils.processRegistrationId import com.saveourtool.save.frontend.externals.i18next.TranslationFunction -import com.saveourtool.common.info.OauthProviderInfo -import com.saveourtool.common.info.UserInfo -import com.saveourtool.common.validation.FrontendRoutes import js.core.jso import react.ChildrenBuilder