From 8ebac41318172c94732be3c01f0e699c0a4f8969 Mon Sep 17 00:00:00 2001 From: Jason Rasmussen Date: Thu, 8 Jun 2023 11:01:07 -0400 Subject: [PATCH] refactor(server)*: tsconfigs (#2689) * refactor(server): tsconfigs * chore: dummy commit * fix: start.sh * chore: restore original entry scripts --- .github/workflows/test.yml | 4 +- docker/docker-compose.yml | 4 +- docs/docs/developer/database-migrations.md | 6 +-- docs/docs/developer/pr-checklist.md | 2 +- docs/docs/developer/setup.md | 4 +- server/.gitignore | 2 + server/Dockerfile | 2 +- server/README.md | 6 --- server/apps/cli/tsconfig.app.json | 9 ---- .../src/api-v1/album/dto/add-users.dto.ts | 6 --- server/apps/immich/test/jest-e2e.json | 14 ----- server/apps/immich/tsconfig.app.json | 9 ---- .../apps/microservices/test/app.e2e-spec.ts | 21 -------- server/apps/microservices/test/jest-e2e.json | 9 ---- server/apps/microservices/tsconfig.app.json | 9 ---- server/bin/cli.sh | 2 +- .../immich/test => e2e}/album.e2e-spec.ts | 8 +-- .../immich/test => e2e}/user.e2e-spec.ts | 4 +- server/jest-e2e.json | 16 ++++++ .../domain/src/asset/dto/asset-ids.dto.ts | 6 --- server/libs/domain/tsconfig.lib.json | 9 ---- server/libs/infra/tsconfig.lib.json | 9 ---- server/nest-cli.json | 54 ++----------------- server/package.json | 40 +++++++------- .../{apps/cli/src => src/cli}/app.module.ts | 0 .../cli}/commands/list-users.command.ts | 0 .../cli}/commands/password-login.ts | 0 .../commands/reset-admin-password.command.ts | 2 +- server/{apps/cli/src => src/cli}/constants.ts | 0 server/{apps/cli/src => src/cli}/immich.ts | 3 +- .../domain}/access/access.repository.ts | 0 .../domain/src => src/domain}/access/index.ts | 0 .../domain}/album/album.repository.ts | 0 .../domain}/album/album.service.spec.ts | 2 +- .../src => src/domain}/album/album.service.ts | 0 .../domain}/album/dto/album-add-users.dto.ts | 2 +- .../domain}/album/dto/album-create.dto.ts | 2 +- .../domain}/album/dto/album-update.dto.ts | 2 +- .../domain}/album/dto/get-albums.dto.ts | 4 +- .../src => src/domain}/album/dto/index.ts | 0 .../domain/src => src/domain}/album/index.ts | 0 .../album/response-dto/album-response.dto.ts | 0 .../domain}/album/response-dto/index.ts | 0 .../domain}/api-key/api-key-response.dto.ts | 0 .../domain}/api-key/api-key.core.ts | 0 .../src => src/domain}/api-key/api-key.dto.ts | 0 .../domain}/api-key/api-key.repository.ts | 0 .../domain}/api-key/api-key.service.spec.ts | 2 +- .../domain}/api-key/api-key.service.ts | 0 .../src => src/domain}/api-key/index.ts | 0 .../domain}/asset/asset.repository.ts | 0 .../domain}/asset/asset.service.spec.ts | 4 +- .../src => src/domain}/asset/asset.service.ts | 0 server/src/domain/asset/dto/asset-ids.dto.ts | 6 +++ .../src => src/domain}/asset/dto/index.ts | 0 .../domain}/asset/dto/map-marker.dto.ts | 2 +- .../domain/src => src/domain}/asset/index.ts | 0 .../response-dto/asset-ids-response.dto.ts | 0 .../asset/response-dto/asset-response.dto.ts | 0 .../asset/response-dto/exif-response.dto.ts | 0 .../domain}/asset/response-dto/index.ts | 0 .../response-dto/map-marker-response.dto.ts | 0 .../response-dto/smart-info-response.dto.ts | 0 .../src => src/domain}/auth/auth.constant.ts | 0 .../src => src/domain}/auth/auth.core.ts | 0 .../domain}/auth/auth.service.spec.ts | 2 +- .../src => src/domain}/auth/auth.service.ts | 0 .../domain}/auth/dto/auth-user.dto.ts | 0 .../domain}/auth/dto/change-password.dto.ts | 0 .../src => src/domain}/auth/dto/index.ts | 0 .../auth/dto/login-credential.dto.spec.ts | 0 .../domain}/auth/dto/login-credential.dto.ts | 0 .../domain}/auth/dto/sign-up.dto.spec.ts | 0 .../domain}/auth/dto/sign-up.dto.ts | 0 .../domain/src => src/domain}/auth/index.ts | 0 .../response-dto/admin-signup-response.dto.ts | 0 .../response-dto/auth-device-response.dto.ts | 0 .../domain}/auth/response-dto/index.ts | 0 .../auth/response-dto/login-response.dto.ts | 0 .../auth/response-dto/logout-response.dto.ts | 0 .../validate-asset-token-response.dto.ts | 0 .../communication/communication.repository.ts | 0 .../src => src/domain}/communication/index.ts | 0 .../domain}/crypto/crypto.repository.ts | 0 .../domain/src => src/domain}/crypto/index.ts | 0 .../src => src/domain}/domain.config.ts | 0 .../src => src/domain}/domain.constant.ts | 2 +- .../src => src/domain}/domain.module.ts | 0 .../domain/src => src/domain}/domain.util.ts | 0 .../facial-recognition/face.repository.ts | 0 .../facial-recognition.service.spec.ts | 2 +- .../facial-recognition.services.ts | 0 .../domain}/facial-recognition/index.ts | 0 .../{libs/domain/src => src/domain}/index.ts | 0 .../src => src/domain}/job/dto/index.ts | 0 .../domain}/job/dto/job-command.dto.ts | 0 .../src => src/domain}/job/dto/job-id.dto.ts | 0 .../domain/src => src/domain}/job/index.ts | 0 .../src => src/domain}/job/job.constants.ts | 0 .../src => src/domain}/job/job.interface.ts | 0 .../src => src/domain}/job/job.repository.ts | 0 .../domain}/job/job.service.spec.ts | 4 +- .../src => src/domain}/job/job.service.ts | 0 .../all-job-status-response.dto.ts | 0 .../domain}/job/response-dto/index.ts | 0 .../domain/src => src/domain}/media/index.ts | 0 .../domain}/media/media.constant.ts | 0 .../domain}/media/media.repository.ts | 0 .../domain}/media/media.service.spec.ts | 2 +- .../src => src/domain}/media/media.service.ts | 0 .../domain}/metadata/geocoding.repository.ts | 0 .../src => src/domain}/metadata/index.ts | 0 .../domain}/metadata/metadata.service.spec.ts | 2 +- .../domain}/metadata/metadata.service.ts | 0 .../src => src/domain}/oauth/dto/index.ts | 0 .../domain}/oauth/dto/oauth-auth-code.dto.ts | 0 .../domain}/oauth/dto/oauth-config.dto.ts | 0 .../domain/src => src/domain}/oauth/index.ts | 0 .../domain}/oauth/oauth.constants.ts | 0 .../src => src/domain}/oauth/oauth.core.ts | 0 .../domain}/oauth/oauth.service.spec.ts | 10 ++-- .../src => src/domain}/oauth/oauth.service.ts | 0 .../domain}/oauth/response-dto/index.ts | 0 .../response-dto/oauth-config-response.dto.ts | 0 .../src => src/domain}/partner/index.ts | 0 .../domain}/partner/partner.repository.ts | 0 .../domain}/partner/partner.service.spec.ts | 2 +- .../domain}/partner/partner.service.ts | 2 +- .../src => src/domain}/person/dto/index.ts | 0 .../domain}/person/dto/person-update.dto.ts | 0 .../domain/src => src/domain}/person/index.ts | 0 .../domain}/person/person.repository.ts | 0 .../domain}/person/person.service.spec.ts | 2 +- .../domain}/person/person.service.ts | 0 .../domain}/person/response-dto/index.ts | 0 .../response-dto/person-response.dto.ts | 0 .../src => src/domain}/search/dto/index.ts | 0 .../domain}/search/dto/search.dto.ts | 2 +- .../domain/src => src/domain}/search/index.ts | 0 .../domain}/search/response-dto/index.ts | 0 .../search-config-response.dto.ts | 0 .../search-explore.response.dto.ts | 0 .../response-dto/search-response.dto.ts | 0 .../domain}/search/search.repository.ts | 0 .../domain}/search/search.service.spec.ts | 2 +- .../domain}/search/search.service.ts | 0 .../src => src/domain}/server-info/index.ts | 0 .../domain}/server-info/response-dto/index.ts | 0 .../response-dto/server-info-response.dto.ts | 0 .../response-dto/server-ping-response.dto.ts | 0 .../response-dto/server-stats-response.dto.ts | 0 .../server-version-response.dto.ts | 0 .../usage-by-user-response.dto.ts | 0 .../server-info/server-info.service.spec.ts | 2 +- .../server-info/server-info.service.ts | 0 .../shared-link/dto/create-shared-link.dto.ts | 0 .../shared-link/dto/edit-shared-link.dto.ts | 0 .../domain}/shared-link/dto/index.ts | 0 .../src => src/domain}/shared-link/index.ts | 0 .../domain}/shared-link/response-dto/index.ts | 0 .../response-dto/shared-link-response.dto.ts | 0 .../domain}/shared-link/shared-link.core.ts | 0 .../shared-link/shared-link.repository.ts | 0 .../shared-link/shared-link.service.spec.ts | 2 +- .../shared-link/shared-link.service.ts | 0 .../src => src/domain}/smart-info/index.ts | 0 .../smart-info/machine-learning.interface.ts | 0 .../smart-info/smart-info.repository.ts | 0 .../smart-info/smart-info.service.spec.ts | 2 +- .../domain}/smart-info/smart-info.service.ts | 0 .../domain}/storage-template/index.ts | 0 .../storage-template/storage-template.core.ts | 0 .../storage-template.service.spec.ts | 4 +- .../storage-template.service.ts | 0 .../src => src/domain}/storage/index.ts | 0 .../domain}/storage/storage.core.ts | 0 .../domain}/storage/storage.repository.ts | 0 .../domain}/storage/storage.service.spec.ts | 4 +- .../domain}/storage/storage.service.ts | 0 .../domain}/system-config/dto/index.ts | 0 .../dto/system-config-ffmpeg.dto.ts | 0 .../dto/system-config-job.dto.ts | 0 .../dto/system-config-oauth.dto.ts | 0 .../dto/system-config-password-login.dto.ts | 0 .../dto/system-config-storage-template.dto.ts | 0 .../system-config/dto/system-config.dto.ts | 0 .../src => src/domain}/system-config/index.ts | 0 .../system-config/response-dto/index.ts | 0 ...stem-config-template-storage-option.dto.ts | 0 .../system-config/system-config.constants.ts | 0 .../system-config/system-config.core.ts | 0 .../system-config/system-config.repository.ts | 0 .../system-config.service.spec.ts | 2 +- .../system-config/system-config.service.ts | 2 +- .../domain/src => src/domain}/tag/index.ts | 0 .../domain}/tag/tag-response.dto.ts | 0 .../domain/src => src/domain}/tag/tag.dto.ts | 0 .../src => src/domain}/tag/tag.repository.ts | 0 .../domain}/tag/tag.service.spec.ts | 2 +- .../src => src/domain}/tag/tag.service.ts | 0 .../src => src/domain}/user-token/index.ts | 0 .../domain}/user-token/user-token.core.ts | 0 .../user-token/user-token.repository.ts | 0 .../user/dto/create-profile-image.dto.ts | 0 .../domain}/user/dto/create-user.dto.spec.ts | 0 .../domain}/user/dto/create-user.dto.ts | 2 +- .../src => src/domain}/user/dto/index.ts | 0 .../domain}/user/dto/update-user.dto.ts | 2 +- .../domain}/user/dto/user-count.dto.ts | 0 .../domain}/user/dto/user-id.dto.ts | 0 .../domain/src => src/domain}/user/index.ts | 0 .../create-profile-image-response.dto.ts | 0 .../domain}/user/response-dto/index.ts | 0 .../response-dto/user-count-response.dto.ts | 0 .../user/response-dto/user-response.dto.ts | 0 .../src => src/domain}/user/user.core.ts | 0 .../domain}/user/user.repository.ts | 0 .../domain}/user/user.service.spec.ts | 2 +- .../src => src/domain}/user/user.service.ts | 2 +- .../immich}/api-v1/album/album-repository.ts | 0 .../immich}/api-v1/album/album.controller.ts | 0 .../immich}/api-v1/album/album.module.ts | 0 .../api-v1/album/album.service.spec.ts | 2 +- .../immich}/api-v1/album/album.service.ts | 0 .../api-v1/album/dto/add-assets.dto.ts | 2 +- .../immich/api-v1/album/dto/add-users.dto.ts | 6 +++ .../album/dto/create-album-shared-link.dto.ts | 2 +- .../api-v1/album/dto/remove-assets.dto.ts | 2 +- .../response-dto/add-assets-response.dto.ts | 0 .../response-dto/album-count-response.dto.ts | 0 .../immich}/api-v1/asset/asset-repository.ts | 0 .../immich}/api-v1/asset/asset.controller.ts | 2 +- .../immich}/api-v1/asset/asset.core.ts | 0 .../immich}/api-v1/asset/asset.module.ts | 0 .../api-v1/asset/asset.service.spec.ts | 2 +- .../immich}/api-v1/asset/asset.service.ts | 0 .../api-v1/asset/dto/asset-check.dto.ts | 0 .../api-v1/asset/dto/asset-search.dto.ts | 0 .../asset/dto/check-duplicate-asset.dto.ts | 0 .../dto/check-existing-assets.dto.spec.ts | 0 .../asset/dto/check-existing-assets.dto.ts | 0 .../asset/dto/create-asset-shared-link.dto.ts | 0 .../api-v1/asset/dto/create-asset.dto.ts | 0 .../api-v1/asset/dto/create-exif.dto.ts | 0 .../api-v1/asset/dto/delete-asset.dto.ts | 0 .../immich}/api-v1/asset/dto/device-id.dto.ts | 0 .../api-v1/asset/dto/download-files.dto.ts | 0 .../api-v1/asset/dto/download-library.dto.ts | 0 .../asset/dto/get-asset-by-time-bucket.dto.ts | 0 .../dto/get-asset-count-by-time-bucket.dto.ts | 0 .../asset/dto/get-asset-thumbnail.dto.ts | 0 .../api-v1/asset/dto/search-asset.dto.ts | 0 .../api-v1/asset/dto/search-properties.dto.ts | 0 .../api-v1/asset/dto/serve-file.dto.ts | 0 .../api-v1/asset/dto/update-asset.dto.ts | 0 .../response-dto/asset-check-response.dto.ts | 0 .../asset-count-by-time-group-response.dto.ts | 0 .../asset-count-by-user-id-response.dto.ts | 0 .../asset-file-upload-response.dto.ts | 0 .../check-duplicate-asset-response.dto.ts | 0 .../check-existing-assets-response.dto.ts | 0 .../curated-locations-response.dto.ts | 0 .../curated-objects-response.dto.ts | 0 .../response-dto/delete-asset-response.dto.ts | 0 .../validation/file-not-empty-validator.ts | 0 .../api-v1/validation/parse-me-uuid-pipe.ts | 0 .../immich/src => src/immich}/app.module.ts | 0 .../immich/src => src/immich}/app.service.ts | 0 .../immich/src => src/immich}/app.utils.ts | 0 .../config/asset-upload.config.spec.ts | 0 .../immich}/config/asset-upload.config.ts | 0 .../profile-image-upload.config.spec.ts | 0 .../config/profile-image-upload.config.ts | 0 .../immich}/controllers/album.controller.ts | 0 .../immich}/controllers/api-key.controller.ts | 0 .../immich}/controllers/app.controller.ts | 0 .../immich}/controllers/asset.controller.ts | 0 .../immich}/controllers/auth.controller.ts | 0 .../immich}/controllers/dto/uuid-param.dto.ts | 0 .../src => src/immich}/controllers/index.ts | 0 .../immich}/controllers/job.controller.ts | 0 .../immich}/controllers/oauth.controller.ts | 0 .../immich}/controllers/partner.controller.ts | 0 .../immich}/controllers/person.controller.ts | 0 .../immich}/controllers/search.controller.ts | 0 .../controllers/server-info.controller.ts | 0 .../controllers/shared-link.controller.ts | 0 .../controllers/system-config.controller.ts | 0 .../immich}/controllers/tag.controller.ts | 0 .../immich}/controllers/user.controller.ts | 0 .../immich}/decorators/auth-user.decorator.ts | 0 .../decorators/authenticated.decorator.ts | 0 .../decorators/use-validation.decorator.ts | 0 .../decorators/validate-uuid.decorator.ts | 0 .../{apps/immich/src => src/immich}/main.ts | 3 +- .../immich}/middlewares/auth.guard.ts | 0 .../modules/download/download.module.ts | 0 .../modules/download/download.service.ts | 0 .../immich}/utils/path-form-data.util.ts | 0 .../immich}/utils/transform.util.ts | 0 .../infra}/communication.gateway.ts | 0 .../src => src/infra}/database.config.ts | 0 .../infra}/entities/album.entity.ts | 0 .../infra}/entities/api-key.entity.ts | 0 .../infra}/entities/asset-face.entity.ts | 0 .../infra}/entities/asset.entity.ts | 0 .../src => src/infra}/entities/exif.entity.ts | 0 .../infra/src => src/infra}/entities/index.ts | 0 .../infra}/entities/partner.entity.ts | 0 .../infra}/entities/person.entity.ts | 0 .../infra}/entities/shared-link.entity.ts | 0 .../infra}/entities/smart-info.entity.ts | 0 .../infra}/entities/system-config.entity.ts | 2 +- .../src => src/infra}/entities/tag.entity.ts | 0 .../infra}/entities/user-token.entity.ts | 0 .../src => src/infra}/entities/user.entity.ts | 0 server/{libs/infra/src => src/infra}/index.ts | 0 .../infra/src => src/infra}/infra.config.ts | 0 .../infra/src => src/infra}/infra.module.ts | 0 .../1645130759468-CreateUserTable.ts | 0 .../1645130777674-CreateDeviceInfoTable.ts | 0 .../1645130805273-CreateAssetsTable.ts | 0 .../1645130817965-CreateExifTable.ts | 0 .../1645130870184-CreateSmartInfoTable.ts | 0 .../1646249209023-AddExifTextSearchColumn.ts | 0 ...1646249734844-CreateExifTextSearchIndex.ts | 0 .../1646709533213-AddRegionCityToExIf.ts | 0 ...46710459852-AddLocationToExifTextSearch.ts | 0 ...648317474768-AddObjectColumnToSmartInfo.ts | 0 ...16111-CreateSharedAlbumAndRelatedTables.ts | 0 ...3525943-UpdateUserTableWithAdminAndName.ts | 0 ...3214255670-UpdateAssetTableWithWebpPath.ts | 0 ...583-UpdateAssetTableWithEncodeVideoPath.ts | 0 .../1655401127251-RenameSharedAlbums.ts | 0 ...56338626260-RenameIsFirstLoggedInColumn.ts | 0 ...656888591977-RenameAssetAlbumIdSequence.ts | 0 ...6888918620-DropExifTextSearchableColumn.ts | 0 ...1566-MatchMigrationsWithTypeORMEntities.ts | 0 ...470248-AddExifImageNameAsSearchableText.ts | 0 .../migrations/1661011331242-AddCaption.ts | 0 ...919411-ChangeExifFileSizeInByteToBigInt.ts | 0 .../1661881837496-AddAssetChecksum.ts | 0 ...UpdateAssetTableWithNewUniqueConstraint.ts | 0 ...365521-FixTimestampDataTypeInAssetTable.ts | 0 .../1665540663419-CreateSystemConfigTable.ts | 0 ...60744-AddingDeletedAtColumnInUserEntity.ts | 0 ...-AddLivePhotosRelatedColumnToAssetTable.ts | 0 .../1668835311083-UpdateUserTableForOIDC.ts | 0 .../migrations/1670104716264-OAuthId.ts | 0 .../1670257571385-CreateTagsTable.ts | 0 .../1670607437008-TruncateOldConfigItems.ts | 0 ...0633210032-AddUserEmailUniqueConstraint.ts | 0 .../1672109862870-DropSaltColumn.ts | 0 .../migrations/1672502270115-AddAPIKeys.ts | 0 .../1673150490490-AddSharedLinkTable.ts | 0 ...907194740-AddMorePermissionToSharedLink.ts | 0 ...4263302005-RemoveVideoCodecConfigOption.ts | 0 .../1674342044239-CreateUserTokenEntity.ts | 0 ...757936889-AlterExifExposureTimeToString.ts | 0 .../1674774248319-TruncateAPIKeys.ts | 0 ...9-AddSharedLinkUserForeignKeyConstraint.ts | 0 ...2-AddUpdatedAtColumnToAlbumsUsersAssets.ts | 0 ...909594-AddAlbumUserForeignKeyConstraint.ts | 0 .../1675808874445-APIKeyUUIDPrimaryKey.ts | 0 .../1675812532822-FixAlbumEntityTypeORM.ts | 0 .../1676437878377-AppleContentIdentifier.ts | 0 .../1676680127415-FixAssetRelations.ts | 0 .../1676721296440-AssetCreatedAtField.ts | 0 ...1676848629119-ExifEntityDefinitionFixes.ts | 0 ...8694786-SharedLinkEntityDefinitionFixes.ts | 0 ...52143506-SmartInfoEntityDefinitionFixes.ts | 0 .../1677497925328-AddExifTimeZone.ts | 0 ...43119-AddIndexForAlbumInSharedLinkTable.ts | 0 .../1677613712565-AlbumThumbnailRelation.ts | 0 .../1677971458822-AddCLIPEncodeDataColumn.ts | 0 .../1679751316282-UpdateTranscodeOption.ts | 0 .../1679901204458-ClipEmbeddingFloat4.ts | 0 .../1680632845740-AddIsArchivedColumn.ts | 0 ...680694465853-RemoveRedundantConstraints.ts | 0 ...4628393-AddOriginalFileNameToAssetTable.ts | 0 ...1159594469-RemoveImageNameFromEXIFTable.ts | 0 .../1682371561743-FixNullableRelations.ts | 0 .../1682371791038-AddDeviceInfoToUserToken.ts | 0 .../1682710252424-DropDeviceInfoTable.ts | 0 .../1683808254676-AddPartnersTable.ts | 0 .../1684255168091-AddFacialTables.ts | 0 .../1684273840676-AddSidecarFile.ts | 0 .../1684328185099-RequireChecksumNotNull.ts | 0 .../1684410565398-AddStorageLabel.ts | 0 ...867360825-AddUserTokenAndAPIKeyCascades.ts | 0 .../1685044328272-AddSharedLinkCascade.ts | 0 .../1685370430343-UserDatesTimestamptz.ts | 0 .../1685731372040-RemoveInvalidCoordinates.ts | 0 .../src => src/infra}/redis-io.adapter.ts | 0 .../infra}/repositories/access.repository.ts | 0 .../infra}/repositories/album.repository.ts | 0 .../infra}/repositories/api-key.repository.ts | 0 .../infra}/repositories/asset.repository.ts | 0 .../repositories/communication.repository.ts | 0 .../infra}/repositories/crypto.repository.ts | 0 .../infra}/repositories/face.repository.ts | 0 .../repositories/filesystem.provider.ts | 0 .../repositories/geocoding.repository.ts | 0 .../src => src/infra}/repositories/index.ts | 0 .../infra}/repositories/job.repository.ts | 0 .../machine-learning.repository.ts | 0 .../infra}/repositories/media.repository.ts | 0 .../infra}/repositories/partner.repository.ts | 0 .../infra}/repositories/person.repository.ts | 0 .../repositories/shared-link.repository.ts | 0 .../repositories/smart-info.repository.ts | 0 .../repositories/system-config.repository.ts | 0 .../infra}/repositories/tag.repository.ts | 0 .../repositories/typesense.repository.ts | 0 .../repositories/user-token.repository.ts | 0 .../infra}/repositories/user.repository.ts | 0 .../infra}/typesense-schemas/album.schema.ts | 0 .../infra}/typesense-schemas/asset.schema.ts | 0 .../infra}/typesense-schemas/face.schema.ts | 0 .../infra}/typesense-schemas/index.ts | 0 .../infra}/utils/optional-between.util.ts | 0 .../infra}/utils/pagination.util.ts | 0 server/src/main.ts | 24 +++++++++ .../src => src/microservices}/app.service.ts | 0 .../src => src/microservices}/main.ts | 4 +- .../microservices}/microservices.module.ts | 0 .../metadata-extraction.processor.ts | 0 .../utils/exif/coordinates.spec.ts | 0 .../microservices}/utils/exif/coordinates.ts | 0 .../utils/exif/date-time.spec.ts | 0 .../microservices}/utils/exif/date-time.ts | 0 .../microservices}/utils/exif/iso.spec.ts | 0 .../microservices}/utils/exif/iso.ts | 0 .../microservices}/utils/numbers.spec.ts | 0 .../microservices}/utils/numbers.ts | 0 server/start-microservices.sh | 23 +------- server/start-server.sh | 23 +------- server/start.sh | 23 ++++++++ server/{libs/domain => }/test/fixtures.ts | 2 +- server/{libs/domain => }/test/global-setup.js | 0 server/test/index.ts | 8 +++ .../repositories}/access.repository.mock.ts | 2 +- .../repositories}/album.repository.mock.ts | 2 +- .../repositories}/api-key.repository.mock.ts | 2 +- .../repositories}/asset.repository.mock.ts | 2 +- .../communication.repository.mock.ts | 2 +- .../repositories}/crypto.repository.mock.ts | 2 +- .../repositories}/face.repository.mock.ts | 2 +- .../test => test/repositories}/index.ts | 7 --- .../repositories}/job.repository.mock.ts | 2 +- .../machine-learning.repository.mock.ts | 2 +- .../repositories}/media.repository.mock.ts | 2 +- .../repositories}/partner.repository.mock.ts | 2 +- .../repositories}/person.repository.mock.ts | 2 +- .../repositories}/search.repository.mock.ts | 2 +- .../shared-link.repository.mock.ts | 2 +- .../smart-info.repository.mock.ts | 2 +- .../repositories}/storage.repository.mock.ts | 2 +- .../system-config.repository.mock.ts | 2 +- .../repositories}/tag.repository.mock.ts | 2 +- .../user-token.repository.mock.ts | 2 +- .../repositories}/user.repository.mock.ts | 2 +- server/{libs/domain => }/test/setup.ts | 0 server/{apps/immich => }/test/test-utils.ts | 4 +- server/tsconfig.json | 12 +++-- 465 files changed, 209 insertions(+), 332 deletions(-) delete mode 100644 server/README.md delete mode 100644 server/apps/cli/tsconfig.app.json delete mode 100644 server/apps/immich/src/api-v1/album/dto/add-users.dto.ts delete mode 100644 server/apps/immich/test/jest-e2e.json delete mode 100644 server/apps/immich/tsconfig.app.json delete mode 100644 server/apps/microservices/test/app.e2e-spec.ts delete mode 100644 server/apps/microservices/test/jest-e2e.json delete mode 100644 server/apps/microservices/tsconfig.app.json rename server/{apps/immich/test => e2e}/album.e2e-spec.ts (96%) rename server/{apps/immich/test => e2e}/user.e2e-spec.ts (98%) create mode 100644 server/jest-e2e.json delete mode 100644 server/libs/domain/src/asset/dto/asset-ids.dto.ts delete mode 100644 server/libs/domain/tsconfig.lib.json delete mode 100644 server/libs/infra/tsconfig.lib.json rename server/{apps/cli/src => src/cli}/app.module.ts (100%) rename server/{apps/cli/src => src/cli}/commands/list-users.command.ts (100%) rename server/{apps/cli/src => src/cli}/commands/password-login.ts (100%) rename server/{apps/cli/src => src/cli}/commands/reset-admin-password.command.ts (97%) rename server/{apps/cli/src => src/cli}/constants.ts (100%) rename server/{apps/cli/src => src/cli}/immich.ts (78%) rename server/{libs/domain/src => src/domain}/access/access.repository.ts (100%) rename server/{libs/domain/src => src/domain}/access/index.ts (100%) rename server/{libs/domain/src => src/domain}/album/album.repository.ts (100%) rename server/{libs/domain/src => src/domain}/album/album.service.spec.ts (99%) rename server/{libs/domain/src => src/domain}/album/album.service.ts (100%) rename server/{libs/domain/src => src/domain}/album/dto/album-add-users.dto.ts (61%) rename server/{libs/domain/src => src/domain}/album/dto/album-create.dto.ts (78%) rename server/{libs/domain/src => src/domain}/album/dto/album-update.dto.ts (72%) rename server/{libs/domain/src => src/domain}/album/dto/get-albums.dto.ts (76%) rename server/{libs/domain/src => src/domain}/album/dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/album/index.ts (100%) rename server/{libs/domain/src => src/domain}/album/response-dto/album-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/album/response-dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/api-key/api-key-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/api-key/api-key.core.ts (100%) rename server/{libs/domain/src => src/domain}/api-key/api-key.dto.ts (100%) rename server/{libs/domain/src => src/domain}/api-key/api-key.repository.ts (100%) rename server/{libs/domain/src => src/domain}/api-key/api-key.service.spec.ts (99%) rename server/{libs/domain/src => src/domain}/api-key/api-key.service.ts (100%) rename server/{libs/domain/src => src/domain}/api-key/index.ts (100%) rename server/{libs/domain/src => src/domain}/asset/asset.repository.ts (100%) rename server/{libs/domain/src => src/domain}/asset/asset.service.spec.ts (93%) rename server/{libs/domain/src => src/domain}/asset/asset.service.ts (100%) create mode 100644 server/src/domain/asset/dto/asset-ids.dto.ts rename server/{libs/domain/src => src/domain}/asset/dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/asset/dto/map-marker.dto.ts (84%) rename server/{libs/domain/src => src/domain}/asset/index.ts (100%) rename server/{libs/domain/src => src/domain}/asset/response-dto/asset-ids-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/asset/response-dto/asset-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/asset/response-dto/exif-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/asset/response-dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/asset/response-dto/map-marker-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/asset/response-dto/smart-info-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/auth/auth.constant.ts (100%) rename server/{libs/domain/src => src/domain}/auth/auth.core.ts (100%) rename server/{libs/domain/src => src/domain}/auth/auth.service.spec.ts (99%) rename server/{libs/domain/src => src/domain}/auth/auth.service.ts (100%) rename server/{libs/domain/src => src/domain}/auth/dto/auth-user.dto.ts (100%) rename server/{libs/domain/src => src/domain}/auth/dto/change-password.dto.ts (100%) rename server/{libs/domain/src => src/domain}/auth/dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/auth/dto/login-credential.dto.spec.ts (100%) rename server/{libs/domain/src => src/domain}/auth/dto/login-credential.dto.ts (100%) rename server/{libs/domain/src => src/domain}/auth/dto/sign-up.dto.spec.ts (100%) rename server/{libs/domain/src => src/domain}/auth/dto/sign-up.dto.ts (100%) rename server/{libs/domain/src => src/domain}/auth/index.ts (100%) rename server/{libs/domain/src => src/domain}/auth/response-dto/admin-signup-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/auth/response-dto/auth-device-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/auth/response-dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/auth/response-dto/login-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/auth/response-dto/logout-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/auth/response-dto/validate-asset-token-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/communication/communication.repository.ts (100%) rename server/{libs/domain/src => src/domain}/communication/index.ts (100%) rename server/{libs/domain/src => src/domain}/crypto/crypto.repository.ts (100%) rename server/{libs/domain/src => src/domain}/crypto/index.ts (100%) rename server/{libs/domain/src => src/domain}/domain.config.ts (100%) rename server/{libs/domain/src => src/domain}/domain.constant.ts (95%) rename server/{libs/domain/src => src/domain}/domain.module.ts (100%) rename server/{libs/domain/src => src/domain}/domain.util.ts (100%) rename server/{libs/domain/src => src/domain}/facial-recognition/face.repository.ts (100%) rename server/{libs/domain/src => src/domain}/facial-recognition/facial-recognition.service.spec.ts (99%) rename server/{libs/domain/src => src/domain}/facial-recognition/facial-recognition.services.ts (100%) rename server/{libs/domain/src => src/domain}/facial-recognition/index.ts (100%) rename server/{libs/domain/src => src/domain}/index.ts (100%) rename server/{libs/domain/src => src/domain}/job/dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/job/dto/job-command.dto.ts (100%) rename server/{libs/domain/src => src/domain}/job/dto/job-id.dto.ts (100%) rename server/{libs/domain/src => src/domain}/job/index.ts (100%) rename server/{libs/domain/src => src/domain}/job/job.constants.ts (100%) rename server/{libs/domain/src => src/domain}/job/job.interface.ts (100%) rename server/{libs/domain/src => src/domain}/job/job.repository.ts (100%) rename server/{libs/domain/src => src/domain}/job/job.service.spec.ts (99%) rename server/{libs/domain/src => src/domain}/job/job.service.ts (100%) rename server/{libs/domain/src => src/domain}/job/response-dto/all-job-status-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/job/response-dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/media/index.ts (100%) rename server/{libs/domain/src => src/domain}/media/media.constant.ts (100%) rename server/{libs/domain/src => src/domain}/media/media.repository.ts (100%) rename server/{libs/domain/src => src/domain}/media/media.service.spec.ts (99%) rename server/{libs/domain/src => src/domain}/media/media.service.ts (100%) rename server/{libs/domain/src => src/domain}/metadata/geocoding.repository.ts (100%) rename server/{libs/domain/src => src/domain}/metadata/index.ts (100%) rename server/{libs/domain/src => src/domain}/metadata/metadata.service.spec.ts (98%) rename server/{libs/domain/src => src/domain}/metadata/metadata.service.ts (100%) rename server/{libs/domain/src => src/domain}/oauth/dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/oauth/dto/oauth-auth-code.dto.ts (100%) rename server/{libs/domain/src => src/domain}/oauth/dto/oauth-config.dto.ts (100%) rename server/{libs/domain/src => src/domain}/oauth/index.ts (100%) rename server/{libs/domain/src => src/domain}/oauth/oauth.constants.ts (100%) rename server/{libs/domain/src => src/domain}/oauth/oauth.core.ts (100%) rename server/{libs/domain/src => src/domain}/oauth/oauth.service.spec.ts (98%) rename server/{libs/domain/src => src/domain}/oauth/oauth.service.ts (100%) rename server/{libs/domain/src => src/domain}/oauth/response-dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/oauth/response-dto/oauth-config-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/partner/index.ts (100%) rename server/{libs/domain/src => src/domain}/partner/partner.repository.ts (100%) rename server/{libs/domain/src => src/domain}/partner/partner.service.spec.ts (99%) rename server/{libs/domain/src => src/domain}/partner/partner.service.ts (99%) rename server/{libs/domain/src => src/domain}/person/dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/person/dto/person-update.dto.ts (100%) rename server/{libs/domain/src => src/domain}/person/index.ts (100%) rename server/{libs/domain/src => src/domain}/person/person.repository.ts (100%) rename server/{libs/domain/src => src/domain}/person/person.service.spec.ts (99%) rename server/{libs/domain/src => src/domain}/person/person.service.ts (100%) rename server/{libs/domain/src => src/domain}/person/response-dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/person/response-dto/person-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/search/dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/search/dto/search.dto.ts (94%) rename server/{libs/domain/src => src/domain}/search/index.ts (100%) rename server/{libs/domain/src => src/domain}/search/response-dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/search/response-dto/search-config-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/search/response-dto/search-explore.response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/search/response-dto/search-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/search/search.repository.ts (100%) rename server/{libs/domain/src => src/domain}/search/search.service.spec.ts (99%) rename server/{libs/domain/src => src/domain}/search/search.service.ts (100%) rename server/{libs/domain/src => src/domain}/server-info/index.ts (100%) rename server/{libs/domain/src => src/domain}/server-info/response-dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/server-info/response-dto/server-info-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/server-info/response-dto/server-ping-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/server-info/response-dto/server-stats-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/server-info/response-dto/server-version-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/server-info/response-dto/usage-by-user-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/server-info/server-info.service.spec.ts (99%) rename server/{libs/domain/src => src/domain}/server-info/server-info.service.ts (100%) rename server/{libs/domain/src => src/domain}/shared-link/dto/create-shared-link.dto.ts (100%) rename server/{libs/domain/src => src/domain}/shared-link/dto/edit-shared-link.dto.ts (100%) rename server/{libs/domain/src => src/domain}/shared-link/dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/shared-link/index.ts (100%) rename server/{libs/domain/src => src/domain}/shared-link/response-dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/shared-link/response-dto/shared-link-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/shared-link/shared-link.core.ts (100%) rename server/{libs/domain/src => src/domain}/shared-link/shared-link.repository.ts (100%) rename server/{libs/domain/src => src/domain}/shared-link/shared-link.service.spec.ts (99%) rename server/{libs/domain/src => src/domain}/shared-link/shared-link.service.ts (100%) rename server/{libs/domain/src => src/domain}/smart-info/index.ts (100%) rename server/{libs/domain/src => src/domain}/smart-info/machine-learning.interface.ts (100%) rename server/{libs/domain/src => src/domain}/smart-info/smart-info.repository.ts (100%) rename server/{libs/domain/src => src/domain}/smart-info/smart-info.service.spec.ts (99%) rename server/{libs/domain/src => src/domain}/smart-info/smart-info.service.ts (100%) rename server/{libs/domain/src => src/domain}/storage-template/index.ts (100%) rename server/{libs/domain/src => src/domain}/storage-template/storage-template.core.ts (100%) rename server/{libs/domain/src => src/domain}/storage-template/storage-template.service.spec.ts (98%) rename server/{libs/domain/src => src/domain}/storage-template/storage-template.service.ts (100%) rename server/{libs/domain/src => src/domain}/storage/index.ts (100%) rename server/{libs/domain/src => src/domain}/storage/storage.core.ts (100%) rename server/{libs/domain/src => src/domain}/storage/storage.repository.ts (100%) rename server/{libs/domain/src => src/domain}/storage/storage.service.spec.ts (92%) rename server/{libs/domain/src => src/domain}/storage/storage.service.ts (100%) rename server/{libs/domain/src => src/domain}/system-config/dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/system-config/dto/system-config-ffmpeg.dto.ts (100%) rename server/{libs/domain/src => src/domain}/system-config/dto/system-config-job.dto.ts (100%) rename server/{libs/domain/src => src/domain}/system-config/dto/system-config-oauth.dto.ts (100%) rename server/{libs/domain/src => src/domain}/system-config/dto/system-config-password-login.dto.ts (100%) rename server/{libs/domain/src => src/domain}/system-config/dto/system-config-storage-template.dto.ts (100%) rename server/{libs/domain/src => src/domain}/system-config/dto/system-config.dto.ts (100%) rename server/{libs/domain/src => src/domain}/system-config/index.ts (100%) rename server/{libs/domain/src => src/domain}/system-config/response-dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/system-config/response-dto/system-config-template-storage-option.dto.ts (100%) rename server/{libs/domain/src => src/domain}/system-config/system-config.constants.ts (100%) rename server/{libs/domain/src => src/domain}/system-config/system-config.core.ts (100%) rename server/{libs/domain/src => src/domain}/system-config/system-config.repository.ts (100%) rename server/{libs/domain/src => src/domain}/system-config/system-config.service.spec.ts (99%) rename server/{libs/domain/src => src/domain}/system-config/system-config.service.ts (97%) rename server/{libs/domain/src => src/domain}/tag/index.ts (100%) rename server/{libs/domain/src => src/domain}/tag/tag-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/tag/tag.dto.ts (100%) rename server/{libs/domain/src => src/domain}/tag/tag.repository.ts (100%) rename server/{libs/domain/src => src/domain}/tag/tag.service.spec.ts (99%) rename server/{libs/domain/src => src/domain}/tag/tag.service.ts (100%) rename server/{libs/domain/src => src/domain}/user-token/index.ts (100%) rename server/{libs/domain/src => src/domain}/user-token/user-token.core.ts (100%) rename server/{libs/domain/src => src/domain}/user-token/user-token.repository.ts (100%) rename server/{libs/domain/src => src/domain}/user/dto/create-profile-image.dto.ts (100%) rename server/{libs/domain/src => src/domain}/user/dto/create-user.dto.spec.ts (100%) rename server/{libs/domain/src => src/domain}/user/dto/create-user.dto.ts (90%) rename server/{libs/domain/src => src/domain}/user/dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/user/dto/update-user.dto.ts (89%) rename server/{libs/domain/src => src/domain}/user/dto/user-count.dto.ts (100%) rename server/{libs/domain/src => src/domain}/user/dto/user-id.dto.ts (100%) rename server/{libs/domain/src => src/domain}/user/index.ts (100%) rename server/{libs/domain/src => src/domain}/user/response-dto/create-profile-image-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/user/response-dto/index.ts (100%) rename server/{libs/domain/src => src/domain}/user/response-dto/user-count-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/user/response-dto/user-response.dto.ts (100%) rename server/{libs/domain/src => src/domain}/user/user.core.ts (100%) rename server/{libs/domain/src => src/domain}/user/user.repository.ts (100%) rename server/{libs/domain/src => src/domain}/user/user.service.spec.ts (99%) rename server/{libs/domain/src => src/domain}/user/user.service.ts (99%) rename server/{apps/immich/src => src/immich}/api-v1/album/album-repository.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/album/album.controller.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/album/album.module.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/album/album.service.spec.ts (99%) rename server/{apps/immich/src => src/immich}/api-v1/album/album.service.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/album/dto/add-assets.dto.ts (50%) create mode 100644 server/src/immich/api-v1/album/dto/add-users.dto.ts rename server/{apps/immich/src => src/immich}/api-v1/album/dto/create-album-shared-link.dto.ts (88%) rename server/{apps/immich/src => src/immich}/api-v1/album/dto/remove-assets.dto.ts (51%) rename server/{apps/immich/src => src/immich}/api-v1/album/response-dto/add-assets-response.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/album/response-dto/album-count-response.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/asset-repository.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/asset.controller.ts (99%) rename server/{apps/immich/src => src/immich}/api-v1/asset/asset.core.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/asset.module.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/asset.service.spec.ts (99%) rename server/{apps/immich/src => src/immich}/api-v1/asset/asset.service.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/dto/asset-check.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/dto/asset-search.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/dto/check-duplicate-asset.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/dto/check-existing-assets.dto.spec.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/dto/check-existing-assets.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/dto/create-asset-shared-link.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/dto/create-asset.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/dto/create-exif.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/dto/delete-asset.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/dto/device-id.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/dto/download-files.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/dto/download-library.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/dto/get-asset-by-time-bucket.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/dto/get-asset-count-by-time-bucket.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/dto/get-asset-thumbnail.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/dto/search-asset.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/dto/search-properties.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/dto/serve-file.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/dto/update-asset.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/response-dto/asset-check-response.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/response-dto/asset-count-by-time-group-response.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/response-dto/asset-count-by-user-id-response.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/response-dto/asset-file-upload-response.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/response-dto/check-duplicate-asset-response.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/response-dto/check-existing-assets-response.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/response-dto/curated-locations-response.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/response-dto/curated-objects-response.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/asset/response-dto/delete-asset-response.dto.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/validation/file-not-empty-validator.ts (100%) rename server/{apps/immich/src => src/immich}/api-v1/validation/parse-me-uuid-pipe.ts (100%) rename server/{apps/immich/src => src/immich}/app.module.ts (100%) rename server/{apps/immich/src => src/immich}/app.service.ts (100%) rename server/{apps/immich/src => src/immich}/app.utils.ts (100%) rename server/{apps/immich/src => src/immich}/config/asset-upload.config.spec.ts (100%) rename server/{apps/immich/src => src/immich}/config/asset-upload.config.ts (100%) rename server/{apps/immich/src => src/immich}/config/profile-image-upload.config.spec.ts (100%) rename server/{apps/immich/src => src/immich}/config/profile-image-upload.config.ts (100%) rename server/{apps/immich/src => src/immich}/controllers/album.controller.ts (100%) rename server/{apps/immich/src => src/immich}/controllers/api-key.controller.ts (100%) rename server/{apps/immich/src => src/immich}/controllers/app.controller.ts (100%) rename server/{apps/immich/src => src/immich}/controllers/asset.controller.ts (100%) rename server/{apps/immich/src => src/immich}/controllers/auth.controller.ts (100%) rename server/{apps/immich/src => src/immich}/controllers/dto/uuid-param.dto.ts (100%) rename server/{apps/immich/src => src/immich}/controllers/index.ts (100%) rename server/{apps/immich/src => src/immich}/controllers/job.controller.ts (100%) rename server/{apps/immich/src => src/immich}/controllers/oauth.controller.ts (100%) rename server/{apps/immich/src => src/immich}/controllers/partner.controller.ts (100%) rename server/{apps/immich/src => src/immich}/controllers/person.controller.ts (100%) rename server/{apps/immich/src => src/immich}/controllers/search.controller.ts (100%) rename server/{apps/immich/src => src/immich}/controllers/server-info.controller.ts (100%) rename server/{apps/immich/src => src/immich}/controllers/shared-link.controller.ts (100%) rename server/{apps/immich/src => src/immich}/controllers/system-config.controller.ts (100%) rename server/{apps/immich/src => src/immich}/controllers/tag.controller.ts (100%) rename server/{apps/immich/src => src/immich}/controllers/user.controller.ts (100%) rename server/{apps/immich/src => src/immich}/decorators/auth-user.decorator.ts (100%) rename server/{apps/immich/src => src/immich}/decorators/authenticated.decorator.ts (100%) rename server/{apps/immich/src => src/immich}/decorators/use-validation.decorator.ts (100%) rename server/{apps/immich/src => src/immich}/decorators/validate-uuid.decorator.ts (100%) rename server/{apps/immich/src => src/immich}/main.ts (96%) rename server/{apps/immich/src => src/immich}/middlewares/auth.guard.ts (100%) rename server/{apps/immich/src => src/immich}/modules/download/download.module.ts (100%) rename server/{apps/immich/src => src/immich}/modules/download/download.service.ts (100%) rename server/{apps/immich/src => src/immich}/utils/path-form-data.util.ts (100%) rename server/{apps/immich/src => src/immich}/utils/transform.util.ts (100%) rename server/{libs/infra/src => src/infra}/communication.gateway.ts (100%) rename server/{libs/infra/src => src/infra}/database.config.ts (100%) rename server/{libs/infra/src => src/infra}/entities/album.entity.ts (100%) rename server/{libs/infra/src => src/infra}/entities/api-key.entity.ts (100%) rename server/{libs/infra/src => src/infra}/entities/asset-face.entity.ts (100%) rename server/{libs/infra/src => src/infra}/entities/asset.entity.ts (100%) rename server/{libs/infra/src => src/infra}/entities/exif.entity.ts (100%) rename server/{libs/infra/src => src/infra}/entities/index.ts (100%) rename server/{libs/infra/src => src/infra}/entities/partner.entity.ts (100%) rename server/{libs/infra/src => src/infra}/entities/person.entity.ts (100%) rename server/{libs/infra/src => src/infra}/entities/shared-link.entity.ts (100%) rename server/{libs/infra/src => src/infra}/entities/smart-info.entity.ts (100%) rename server/{libs/infra/src => src/infra}/entities/system-config.entity.ts (98%) rename server/{libs/infra/src => src/infra}/entities/tag.entity.ts (100%) rename server/{libs/infra/src => src/infra}/entities/user-token.entity.ts (100%) rename server/{libs/infra/src => src/infra}/entities/user.entity.ts (100%) rename server/{libs/infra/src => src/infra}/index.ts (100%) rename server/{libs/infra/src => src/infra}/infra.config.ts (100%) rename server/{libs/infra/src => src/infra}/infra.module.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1645130759468-CreateUserTable.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1645130777674-CreateDeviceInfoTable.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1645130805273-CreateAssetsTable.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1645130817965-CreateExifTable.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1645130870184-CreateSmartInfoTable.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1646249209023-AddExifTextSearchColumn.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1646249734844-CreateExifTextSearchIndex.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1646709533213-AddRegionCityToExIf.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1646710459852-AddLocationToExifTextSearch.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1648317474768-AddObjectColumnToSmartInfo.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1649643216111-CreateSharedAlbumAndRelatedTables.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1652633525943-UpdateUserTableWithAdminAndName.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1653214255670-UpdateAssetTableWithWebpPath.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1654299904583-UpdateAssetTableWithEncodeVideoPath.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1655401127251-RenameSharedAlbums.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1656338626260-RenameIsFirstLoggedInColumn.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1656888591977-RenameAssetAlbumIdSequence.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1656888918620-DropExifTextSearchableColumn.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1656889061566-MatchMigrationsWithTypeORMEntities.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1658860470248-AddExifImageNameAsSearchableText.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1661011331242-AddCaption.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1661528919411-ChangeExifFileSizeInByteToBigInt.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1661881837496-AddAssetChecksum.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1661971370662-UpdateAssetTableWithNewUniqueConstraint.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1662427365521-FixTimestampDataTypeInAssetTable.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1665540663419-CreateSystemConfigTable.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1667762360744-AddingDeletedAtColumnInUserEntity.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1668383120461-AddLivePhotosRelatedColumnToAssetTable.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1668835311083-UpdateUserTableForOIDC.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1670104716264-OAuthId.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1670257571385-CreateTagsTable.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1670607437008-TruncateOldConfigItems.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1670633210032-AddUserEmailUniqueConstraint.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1672109862870-DropSaltColumn.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1672502270115-AddAPIKeys.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1673150490490-AddSharedLinkTable.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1673907194740-AddMorePermissionToSharedLink.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1674263302005-RemoveVideoCodecConfigOption.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1674342044239-CreateUserTokenEntity.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1674757936889-AlterExifExposureTimeToString.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1674774248319-TruncateAPIKeys.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1674939383309-AddSharedLinkUserForeignKeyConstraint.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1675667878312-AddUpdatedAtColumnToAlbumsUsersAssets.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1675701909594-AddAlbumUserForeignKeyConstraint.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1675808874445-APIKeyUUIDPrimaryKey.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1675812532822-FixAlbumEntityTypeORM.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1676437878377-AppleContentIdentifier.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1676680127415-FixAssetRelations.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1676721296440-AssetCreatedAtField.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1676848629119-ExifEntityDefinitionFixes.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1676848694786-SharedLinkEntityDefinitionFixes.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1676852143506-SmartInfoEntityDefinitionFixes.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1677497925328-AddExifTimeZone.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1677535643119-AddIndexForAlbumInSharedLinkTable.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1677613712565-AlbumThumbnailRelation.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1677971458822-AddCLIPEncodeDataColumn.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1679751316282-UpdateTranscodeOption.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1679901204458-ClipEmbeddingFloat4.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1680632845740-AddIsArchivedColumn.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1680694465853-RemoveRedundantConstraints.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1681144628393-AddOriginalFileNameToAssetTable.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1681159594469-RemoveImageNameFromEXIFTable.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1682371561743-FixNullableRelations.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1682371791038-AddDeviceInfoToUserToken.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1682710252424-DropDeviceInfoTable.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1683808254676-AddPartnersTable.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1684255168091-AddFacialTables.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1684273840676-AddSidecarFile.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1684328185099-RequireChecksumNotNull.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1684410565398-AddStorageLabel.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1684867360825-AddUserTokenAndAPIKeyCascades.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1685044328272-AddSharedLinkCascade.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1685370430343-UserDatesTimestamptz.ts (100%) rename server/{libs/infra/src => src/infra}/migrations/1685731372040-RemoveInvalidCoordinates.ts (100%) rename server/{libs/infra/src => src/infra}/redis-io.adapter.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/access.repository.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/album.repository.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/api-key.repository.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/asset.repository.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/communication.repository.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/crypto.repository.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/face.repository.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/filesystem.provider.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/geocoding.repository.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/index.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/job.repository.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/machine-learning.repository.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/media.repository.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/partner.repository.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/person.repository.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/shared-link.repository.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/smart-info.repository.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/system-config.repository.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/tag.repository.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/typesense.repository.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/user-token.repository.ts (100%) rename server/{libs/infra/src => src/infra}/repositories/user.repository.ts (100%) rename server/{libs/infra/src => src/infra}/typesense-schemas/album.schema.ts (100%) rename server/{libs/infra/src => src/infra}/typesense-schemas/asset.schema.ts (100%) rename server/{libs/infra/src => src/infra}/typesense-schemas/face.schema.ts (100%) rename server/{libs/infra/src => src/infra}/typesense-schemas/index.ts (100%) rename server/{libs/infra/src => src/infra}/utils/optional-between.util.ts (100%) rename server/{libs/infra/src => src/infra}/utils/pagination.util.ts (100%) create mode 100644 server/src/main.ts rename server/{apps/microservices/src => src/microservices}/app.service.ts (100%) rename server/{apps/microservices/src => src/microservices}/main.ts (94%) rename server/{apps/microservices/src => src/microservices}/microservices.module.ts (100%) rename server/{apps/microservices/src => src/microservices}/processors/metadata-extraction.processor.ts (100%) rename server/{apps/microservices/src => src/microservices}/utils/exif/coordinates.spec.ts (100%) rename server/{apps/microservices/src => src/microservices}/utils/exif/coordinates.ts (100%) rename server/{apps/microservices/src => src/microservices}/utils/exif/date-time.spec.ts (100%) rename server/{apps/microservices/src => src/microservices}/utils/exif/date-time.ts (100%) rename server/{apps/microservices/src => src/microservices}/utils/exif/iso.spec.ts (100%) rename server/{apps/microservices/src => src/microservices}/utils/exif/iso.ts (100%) rename server/{apps/microservices/src => src/microservices}/utils/numbers.spec.ts (100%) rename server/{apps/microservices/src => src/microservices}/utils/numbers.ts (100%) create mode 100755 server/start.sh rename server/{libs/domain => }/test/fixtures.ts (99%) rename server/{libs/domain => }/test/global-setup.js (100%) create mode 100644 server/test/index.ts rename server/{libs/domain/test => test/repositories}/access.repository.mock.ts (81%) rename server/{libs/domain/test => test/repositories}/album.repository.mock.ts (90%) rename server/{libs/domain/test => test/repositories}/api-key.repository.mock.ts (83%) rename server/{libs/domain/test => test/repositories}/asset.repository.mock.ts (90%) rename server/{libs/domain/test => test/repositories}/communication.repository.mock.ts (70%) rename server/{libs/domain/test => test/repositories}/crypto.repository.mock.ts (89%) rename server/{libs/domain/test => test/repositories}/face.repository.mock.ts (77%) rename server/{libs/domain/test => test/repositories}/index.ts (85%) rename server/{libs/domain/test => test/repositories}/job.repository.mock.ts (88%) rename server/{libs/domain/test => test/repositories}/machine-learning.repository.mock.ts (79%) rename server/{libs/domain/test => test/repositories}/media.repository.mock.ts (84%) rename server/{libs/domain/test => test/repositories}/partner.repository.mock.ts (79%) rename server/{libs/domain/test => test/repositories}/person.repository.mock.ts (86%) rename server/{libs/domain/test => test/repositories}/search.repository.mock.ts (91%) rename server/{libs/domain/test => test/repositories}/shared-link.repository.mock.ts (82%) rename server/{libs/domain/test => test/repositories}/smart-info.repository.mock.ts (71%) rename server/{libs/domain/test => test/repositories}/storage.repository.mock.ts (87%) rename server/{libs/domain/test => test/repositories}/system-config.repository.mock.ts (80%) rename server/{libs/domain/test => test/repositories}/tag.repository.mock.ts (88%) rename server/{libs/domain/test => test/repositories}/user-token.repository.mock.ts (81%) rename server/{libs/domain/test => test/repositories}/user.repository.mock.ts (89%) rename server/{libs/domain => }/test/setup.ts (100%) rename server/{apps/immich => }/test/test-utils.ts (89%) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 98da1a783..2db37ae85 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -167,13 +167,13 @@ jobs: run: npm --prefix server run typeorm:migrations:run - name: Generate new migrations continue-on-error: true - run: npm --prefix server run typeorm:migrations:generate ./libs/infra/src/migrations/TestMigration + run: npm --prefix server run typeorm:migrations:generate ./src/infra/migrations/TestMigration - name: Find file changes uses: tj-actions/verify-changed-files@v13.1 id: verify-changed-files with: files: | - server/libs/infra/src/migrations/ + server/src/infra/migrations/ - name: Verify files have not changed if: steps.verify-changed-files.outputs.files_changed == 'true' run: | diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 17f766e82..188c45844 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -4,7 +4,7 @@ services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} - command: ["start-server.sh"] + command: [ "start.sh", "immich" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: @@ -18,7 +18,7 @@ services: immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} - command: ["start-microservices.sh"] + command: [ "start.sh", "microservices" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: diff --git a/docs/docs/developer/database-migrations.md b/docs/docs/developer/database-migrations.md index 5b69c3ec3..f94e2ca4f 100644 --- a/docs/docs/developer/database-migrations.md +++ b/docs/docs/developer/database-migrations.md @@ -1,14 +1,14 @@ # Database Migrations -After making any changes in the `server/libs/database/src/entities`, a database migration need to run in order to register the changes in the database. Follow the steps below to create a new migration. +After making any changes in the `server/src/infra/database/entities`, a database migration need to run in order to register the changes in the database. Follow the steps below to create a new migration. 1. Run the command ```bash -npm run typeorm:migrations:generate ./libs/infra/src/ +npm run typeorm:migrations:generate ./src/infra/ ``` 2. Check if the migration file makes sense. -3. Move the migration file to folder `server/libs/database/src/migrations` in your code editor. +3. Move the migration file to folder `./src/infra/database/migrations` in your code editor. The server will automatically detect `*.ts` file changes and restart. Part of the server start-up process includes running any new migrations, so it will be applied immediately. diff --git a/docs/docs/developer/pr-checklist.md b/docs/docs/developer/pr-checklist.md index 8eab7da42..efaa8f041 100644 --- a/docs/docs/developer/pr-checklist.md +++ b/docs/docs/developer/pr-checklist.md @@ -30,4 +30,4 @@ The Open API client libraries need to be regenerated whenever there are changes ## Database Migrations -A database migration needs to be generated whenever there are changes to `server/libs/infra/src/entities`. See [Database Migration](/docs/developer/database-migrations.md) for more details. +A database migration needs to be generated whenever there are changes to `server/src/infra/src/entities`. See [Database Migration](/docs/developer/database-migrations.md) for more details. diff --git a/docs/docs/developer/setup.md b/docs/docs/developer/setup.md index 59e417750..e712426ff 100644 --- a/docs/docs/developer/setup.md +++ b/docs/docs/developer/setup.md @@ -10,9 +10,9 @@ sidebar_position: 2 This environment includes the following services: -- Core server - `/server/apps/immich` +- Core server - `/server/src/immich` - Machine learning - `/machine-learning` -- Microservices - `/server/apps/microservicess` +- Microservices - `/server/src/microservicess` - Web app - `/web` - Redis - PostgreSQL development database with exposed port `5432` so you can use any database client to acess it diff --git a/server/.gitignore b/server/.gitignore index 673d09abb..4f2bbcf8a 100644 --- a/server/.gitignore +++ b/server/.gitignore @@ -40,3 +40,5 @@ upload/ tmp/ core .reverse-geocoding-dump/ + +**/node_modules/** diff --git a/server/Dockerfile b/server/Dockerfile index c0d6725c9..22906c502 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -32,7 +32,7 @@ COPY --from=prod /usr/src/app/bin ./bin COPY LICENSE /licenses/LICENSE.txt COPY LICENSE /LICENSE COPY package.json package-lock.json ./ -COPY start-server.sh start-microservices.sh ./ +COPY start*.sh ./ RUN npm link && npm cache clean --force diff --git a/server/README.md b/server/README.md deleted file mode 100644 index c889a5239..000000000 --- a/server/README.md +++ /dev/null @@ -1,6 +0,0 @@ -## How to run migration - -1. Attached to the container shell -2. Run `npm run typeorm -- migration:generate ./libs/database/src/ -d libs/database/src/config/database.config.ts` -3. Check if the migration file makes sense -4. Move the migration file to folder `server/libs/database/src/migrations` in your code editor. \ No newline at end of file diff --git a/server/apps/cli/tsconfig.app.json b/server/apps/cli/tsconfig.app.json deleted file mode 100644 index 7c519aac4..000000000 --- a/server/apps/cli/tsconfig.app.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "declaration": false, - "outDir": "../../dist/apps/cli" - }, - "include": ["src/**/*", "../../libs/**/*"], - "exclude": ["node_modules", "dist", "test", "**/*spec.ts"] -} diff --git a/server/apps/immich/src/api-v1/album/dto/add-users.dto.ts b/server/apps/immich/src/api-v1/album/dto/add-users.dto.ts deleted file mode 100644 index 0f73e43ea..000000000 --- a/server/apps/immich/src/api-v1/album/dto/add-users.dto.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ValidateUUID } from '../../../../../../apps/immich/src/decorators/validate-uuid.decorator'; - -export class AddUsersDto { - @ValidateUUID({ each: true }) - sharedUserIds!: string[]; -} diff --git a/server/apps/immich/test/jest-e2e.json b/server/apps/immich/test/jest-e2e.json deleted file mode 100644 index d3095fe6e..000000000 --- a/server/apps/immich/test/jest-e2e.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "moduleFileExtensions": ["js", "json", "ts"], - "modulePaths": ["", "../../../"], - "rootDir": ".", - "testEnvironment": "node", - "testRegex": ".e2e-spec.ts$", - "transform": { - "^.+\\.(t|j)s$": "ts-jest" - }, - "moduleNameMapper": { - "^@app/infra(|/.*)$": "../../../libs/infra/src/$1", - "^@app/domain(|/.*)$": "../../../libs/domain/src/$1" - } -} diff --git a/server/apps/immich/tsconfig.app.json b/server/apps/immich/tsconfig.app.json deleted file mode 100644 index 8cbae8bbf..000000000 --- a/server/apps/immich/tsconfig.app.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "declaration": false, - "outDir": "../../dist/apps/immich" - }, - "include": ["src/**/*", "../../libs/**/*"], - "exclude": ["node_modules", "dist", "test", "**/*spec.ts"] -} diff --git a/server/apps/microservices/test/app.e2e-spec.ts b/server/apps/microservices/test/app.e2e-spec.ts deleted file mode 100644 index 36cf0affb..000000000 --- a/server/apps/microservices/test/app.e2e-spec.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Test, TestingModule } from '@nestjs/testing'; -import { INestApplication } from '@nestjs/common'; -import request from 'supertest'; -import { MicroservicesModule } from './../src/microservices.module'; - -describe('MicroservicesController (e2e)', () => { - let app: INestApplication; - - beforeEach(async () => { - const moduleFixture: TestingModule = await Test.createTestingModule({ - imports: [MicroservicesModule], - }).compile(); - - app = moduleFixture.createNestApplication(); - await app.init(); - }); - - it('/ (GET)', () => { - return request(app.getHttpServer()).get('/').expect(200).expect('Hello World!'); - }); -}); diff --git a/server/apps/microservices/test/jest-e2e.json b/server/apps/microservices/test/jest-e2e.json deleted file mode 100644 index e9d912f3e..000000000 --- a/server/apps/microservices/test/jest-e2e.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "moduleFileExtensions": ["js", "json", "ts"], - "rootDir": ".", - "testEnvironment": "node", - "testRegex": ".e2e-spec.ts$", - "transform": { - "^.+\\.(t|j)s$": "ts-jest" - } -} diff --git a/server/apps/microservices/tsconfig.app.json b/server/apps/microservices/tsconfig.app.json deleted file mode 100644 index a24a8136b..000000000 --- a/server/apps/microservices/tsconfig.app.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "declaration": false, - "outDir": "../../dist/apps/microservices" - }, - "include": ["src/**/*"], - "exclude": ["node_modules", "dist", "test", "**/*spec.ts"] -} diff --git a/server/bin/cli.sh b/server/bin/cli.sh index f95ca6e22..90db9957e 100755 --- a/server/bin/cli.sh +++ b/server/bin/cli.sh @@ -1 +1 @@ -node ./dist/apps/cli/apps/cli/src/immich "$@" +node ./dist/main cli "$@" diff --git a/server/apps/immich/test/album.e2e-spec.ts b/server/e2e/album.e2e-spec.ts similarity index 96% rename from server/apps/immich/test/album.e2e-spec.ts rename to server/e2e/album.e2e-spec.ts index 36bce93d2..e75a68046 100644 --- a/server/apps/immich/test/album.e2e-spec.ts +++ b/server/e2e/album.e2e-spec.ts @@ -1,13 +1,13 @@ import { Test, TestingModule } from '@nestjs/testing'; import { INestApplication } from '@nestjs/common'; import request from 'supertest'; -import { clearDb, getAuthUser, authCustom } from './test-utils'; +import { clearDb, getAuthUser, authCustom } from '../test/test-utils'; import { CreateAlbumDto } from '@app/domain'; -import { CreateAlbumShareLinkDto } from '../src/api-v1/album/dto/create-album-shared-link.dto'; -import { AuthUserDto } from '../src/decorators/auth-user.decorator'; +import { CreateAlbumShareLinkDto } from '@app/immich/api-v1/album/dto/create-album-shared-link.dto'; +import { AuthUserDto } from '@app/immich/decorators/auth-user.decorator'; import { AlbumResponseDto, AuthService, SharedLinkResponseDto, UserService } from '@app/domain'; import { DataSource } from 'typeorm'; -import { AppModule } from '../src/app.module'; +import { AppModule } from '@app/immich/app.module'; async function _createAlbum(app: INestApplication, data: CreateAlbumDto) { const res = await request(app.getHttpServer()).post('/album').send(data); diff --git a/server/apps/immich/test/user.e2e-spec.ts b/server/e2e/user.e2e-spec.ts similarity index 98% rename from server/apps/immich/test/user.e2e-spec.ts rename to server/e2e/user.e2e-spec.ts index 83d3577d7..6c72d9091 100644 --- a/server/apps/immich/test/user.e2e-spec.ts +++ b/server/e2e/user.e2e-spec.ts @@ -1,11 +1,11 @@ import { Test, TestingModule } from '@nestjs/testing'; import { INestApplication } from '@nestjs/common'; import request from 'supertest'; -import { clearDb, authCustom } from './test-utils'; +import { clearDb, authCustom } from '../test/test-utils'; import { CreateUserDto, UserService, AuthUserDto, UserResponseDto } from '@app/domain'; import { DataSource } from 'typeorm'; import { AuthService } from '@app/domain'; -import { AppModule } from '../src/app.module'; +import { AppModule } from '@app/immich/app.module'; function _createUser(userService: UserService, data: CreateUserDto) { return userService.createUser(data); diff --git a/server/jest-e2e.json b/server/jest-e2e.json new file mode 100644 index 000000000..cc9806560 --- /dev/null +++ b/server/jest-e2e.json @@ -0,0 +1,16 @@ +{ + "moduleFileExtensions": ["js", "json", "ts"], + "modulePaths": [""], + "rootDir": ".", + "testEnvironment": "node", + "testRegex": ".e2e-spec.ts$", + "transform": { + "^.+\\.(t|j)s$": "ts-jest" + }, + "moduleNameMapper": { + "^@test(|/.*)$": "/test/$1", + "^@app/immich(|/.*)$": "/src/immich/$1", + "^@app/infra(|/.*)$": "/src/infra/$1", + "^@app/domain(|/.*)$": "/src/domain/$1" + } +} diff --git a/server/libs/domain/src/asset/dto/asset-ids.dto.ts b/server/libs/domain/src/asset/dto/asset-ids.dto.ts deleted file mode 100644 index 8c9b60b3d..000000000 --- a/server/libs/domain/src/asset/dto/asset-ids.dto.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ValidateUUID } from '../../../../../apps/immich/src/decorators/validate-uuid.decorator'; - -export class AssetIdsDto { - @ValidateUUID({ each: true }) - assetIds!: string[]; -} diff --git a/server/libs/domain/tsconfig.lib.json b/server/libs/domain/tsconfig.lib.json deleted file mode 100644 index 4e050b3d9..000000000 --- a/server/libs/domain/tsconfig.lib.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "declaration": true, - "outDir": "../../dist/libs/domain" - }, - "include": ["src/**/*"], - "exclude": ["node_modules", "dist", "test", "**/*spec.ts"] -} diff --git a/server/libs/infra/tsconfig.lib.json b/server/libs/infra/tsconfig.lib.json deleted file mode 100644 index 02f54211f..000000000 --- a/server/libs/infra/tsconfig.lib.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "declaration": true, - "outDir": "../../dist/libs/infra" - }, - "include": ["src/**/*"], - "exclude": ["node_modules", "dist", "test", "**/*spec.ts"] -} diff --git a/server/nest-cli.json b/server/nest-cli.json index b59076dda..b295cd0f8 100644 --- a/server/nest-cli.json +++ b/server/nest-cli.json @@ -1,11 +1,10 @@ { + "$schema": "https://json.schemastore.org/nest-cli", "collection": "@nestjs/schematics", - "sourceRoot": "apps/immich/src", - "monorepo": true, - "root": "apps/immich", + "sourceRoot": "src", "compilerOptions": { + "deleteOutDir": true, "webpack": false, - "tsConfigPath": "apps/immich/tsconfig.app.json", "plugins": [ { "name": "@nestjs/swagger", @@ -15,52 +14,5 @@ } } ] - }, - "projects": { - "immich": { - "type": "application", - "root": "apps/immich", - "entryFile": "main", - "sourceRoot": "apps/immich/src", - "compilerOptions": { - "tsConfigPath": "apps/immich/tsconfig.app.json" - } - }, - "microservices": { - "type": "application", - "root": "apps/microservices", - "entryFile": "main", - "sourceRoot": "apps/microservices/src", - "compilerOptions": { - "tsConfigPath": "apps/microservices/tsconfig.app.json" - } - }, - "cli": { - "type": "application", - "root": "apps/cli", - "entryFile": "immich", - "sourceRoot": "apps/cli/src", - "compilerOptions": { - "tsConfigPath": "apps/cli/tsconfig.app.json" - } - }, - "infra": { - "type": "library", - "root": "libs/infra", - "entryFile": "index", - "sourceRoot": "libs/infra/src", - "compilerOptions": { - "tsConfigPath": "libs/infra/tsconfig.lib.json" - } - }, - "domain": { - "type": "library", - "root": "libs/domain", - "entryFile": "index", - "sourceRoot": "libs/domain/src", - "compilerOptions": { - "tsConfigPath": "libs/domain/tsconfig.lib.json" - } - } } } diff --git a/server/package.json b/server/package.json index a49eddc74..3edf01c4e 100644 --- a/server/package.json +++ b/server/package.json @@ -9,16 +9,14 @@ "immich": "./bin/cli.sh" }, "scripts": { - "prebuild": "rimraf dist", - "build": "nest build immich && nest build microservices && nest build cli", + "build": "nest build", "format": "prettier --check .", "format:fix": "prettier --write .", - "start": "nest start", + "start": "npm run start:dev", "nest": "nest", - "start:dev": "nest start --watch", - "start:debug": "rimraf dist && nest start --debug 0.0.0.0:9230 --watch", - "start:prod": "node dist/main", - "lint": "eslint \"{apps,libs}/**/*.ts\" --max-warnings 0", + "start:dev": "nest start --watch --", + "start:debug": "nest start --debug 0.0.0.0:9230 --watch --", + "lint": "eslint \"src/**/*.ts\" --max-warnings 0", "lint:fix": "npm run lint -- --fix", "check": "tsc --noEmit", "check:code": "npm run format && npm run lint && npm run check", @@ -27,13 +25,13 @@ "test:watch": "jest --watch", "test:cov": "jest --coverage", "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", - "test:e2e": "jest --config ./apps/immich/test/jest-e2e.json --runInBand", + "test:e2e": "jest --config jest-e2e.json --runInBand", "typeorm": "node --require ts-node/register ./node_modules/typeorm/cli.js", "typeorm:migrations:create": "node --require ts-node/register ./node_modules/typeorm/cli.js migration:create", - "typeorm:migrations:generate": "node --require ts-node/register ./node_modules/typeorm/cli.js migration:generate -d ./libs/infra/src/database.config.ts", - "typeorm:migrations:run": "node --require ts-node/register ./node_modules/typeorm/cli.js migration:run -d ./libs/infra/src/database.config.ts", - "typeorm:migrations:revert": "node --require ts-node/register ./node_modules/typeorm/cli.js migration:revert -d ./libs/infra/src/database.config.ts", - "typeorm:schema:drop": "node --require ts-node/register ./node_modules/typeorm/cli.js schema:drop -d ./libs/infra/src/database.config.ts", + "typeorm:migrations:generate": "node --require ts-node/register ./node_modules/typeorm/cli.js migration:generate -d ./src/infra/database.config.ts", + "typeorm:migrations:run": "node --require ts-node/register ./node_modules/typeorm/cli.js migration:run -d ./src/infra/database.config.ts", + "typeorm:migrations:revert": "node --require ts-node/register ./node_modules/typeorm/cli.js migration:revert -d ./src/infra/database.config.ts", + "typeorm:schema:drop": "node --require ts-node/register ./node_modules/typeorm/cli.js schema:drop -d ./src/infra/database.config.ts", "typeorm:schema:reset": "npm run typeorm:schema:drop && npm run typeorm:migrations:run", "api:typescript": "bash ./bin/generate-open-api.sh web", "api:dart": "bash ./bin/generate-open-api.sh mobile", @@ -134,11 +132,11 @@ }, "collectCoverageFrom": [ "**/*.(t|j)s", - "!/libs/infra/**/*" + "!/infra/**/*" ], "coverageDirectory": "./coverage", "coverageThreshold": { - "./libs/domain/": { + "./src/domain/": { "branches": 80, "functions": 80, "lines": 90, @@ -146,17 +144,15 @@ } }, "setupFilesAfterEnv": [ - "/libs/domain/test/setup.ts" + "/test/setup.ts" ], "testEnvironment": "node", - "roots": [ - "/apps/", - "/libs/" - ], "moduleNameMapper": { - "^@app/infra(|/.*)$": "/libs/infra/src/$1", - "^@app/domain(|/.*)$": "/libs/domain/src/$1" + "^@test(|/.*)$": "/test/$1", + "^@app/immich(|/.*)$": "/src/immich/$1", + "^@app/infra(|/.*)$": "/src/infra/$1", + "^@app/domain(|/.*)$": "/src/domain/$1" }, - "globalSetup": "/libs/domain/test/global-setup.js" + "globalSetup": "/test/global-setup.js" } } diff --git a/server/apps/cli/src/app.module.ts b/server/src/cli/app.module.ts similarity index 100% rename from server/apps/cli/src/app.module.ts rename to server/src/cli/app.module.ts diff --git a/server/apps/cli/src/commands/list-users.command.ts b/server/src/cli/commands/list-users.command.ts similarity index 100% rename from server/apps/cli/src/commands/list-users.command.ts rename to server/src/cli/commands/list-users.command.ts diff --git a/server/apps/cli/src/commands/password-login.ts b/server/src/cli/commands/password-login.ts similarity index 100% rename from server/apps/cli/src/commands/password-login.ts rename to server/src/cli/commands/password-login.ts diff --git a/server/apps/cli/src/commands/reset-admin-password.command.ts b/server/src/cli/commands/reset-admin-password.command.ts similarity index 97% rename from server/apps/cli/src/commands/reset-admin-password.command.ts rename to server/src/cli/commands/reset-admin-password.command.ts index b12a54996..148209167 100644 --- a/server/apps/cli/src/commands/reset-admin-password.command.ts +++ b/server/src/cli/commands/reset-admin-password.command.ts @@ -13,7 +13,7 @@ export class ResetAdminPasswordCommand extends CommandRunner { async run(): Promise { const ask = (admin: UserResponseDto) => { const { id, oauthId, email, firstName, lastName } = admin; - console.log(`Found Admin: + console.log(`Found Admin: - ID=${id} - OAuth ID=${oauthId} - Email=${email} diff --git a/server/apps/cli/src/constants.ts b/server/src/cli/constants.ts similarity index 100% rename from server/apps/cli/src/constants.ts rename to server/src/cli/constants.ts diff --git a/server/apps/cli/src/immich.ts b/server/src/cli/immich.ts similarity index 78% rename from server/apps/cli/src/immich.ts rename to server/src/cli/immich.ts index 95c2a76e5..5dc0d5b61 100755 --- a/server/apps/cli/src/immich.ts +++ b/server/src/cli/immich.ts @@ -1,7 +1,6 @@ import { CommandFactory } from 'nest-commander'; import { AppModule } from './app.module'; -async function bootstrap() { +export async function bootstrap() { await CommandFactory.run(AppModule, ['warn', 'error']); } -bootstrap(); diff --git a/server/libs/domain/src/access/access.repository.ts b/server/src/domain/access/access.repository.ts similarity index 100% rename from server/libs/domain/src/access/access.repository.ts rename to server/src/domain/access/access.repository.ts diff --git a/server/libs/domain/src/access/index.ts b/server/src/domain/access/index.ts similarity index 100% rename from server/libs/domain/src/access/index.ts rename to server/src/domain/access/index.ts diff --git a/server/libs/domain/src/album/album.repository.ts b/server/src/domain/album/album.repository.ts similarity index 100% rename from server/libs/domain/src/album/album.repository.ts rename to server/src/domain/album/album.repository.ts diff --git a/server/libs/domain/src/album/album.service.spec.ts b/server/src/domain/album/album.service.spec.ts similarity index 99% rename from server/libs/domain/src/album/album.service.spec.ts rename to server/src/domain/album/album.service.spec.ts index e15ad31b3..43e5b0fc9 100644 --- a/server/libs/domain/src/album/album.service.spec.ts +++ b/server/src/domain/album/album.service.spec.ts @@ -8,7 +8,7 @@ import { newJobRepositoryMock, newUserRepositoryMock, userEntityStub, -} from '../../test'; +} from '@test'; import { IAssetRepository } from '../asset'; import { IJobRepository, JobName } from '../job'; import { IUserRepository } from '../user'; diff --git a/server/libs/domain/src/album/album.service.ts b/server/src/domain/album/album.service.ts similarity index 100% rename from server/libs/domain/src/album/album.service.ts rename to server/src/domain/album/album.service.ts diff --git a/server/libs/domain/src/album/dto/album-add-users.dto.ts b/server/src/domain/album/dto/album-add-users.dto.ts similarity index 61% rename from server/libs/domain/src/album/dto/album-add-users.dto.ts rename to server/src/domain/album/dto/album-add-users.dto.ts index 32b8770aa..7546cdc3b 100644 --- a/server/libs/domain/src/album/dto/album-add-users.dto.ts +++ b/server/src/domain/album/dto/album-add-users.dto.ts @@ -1,5 +1,5 @@ import { ArrayNotEmpty } from 'class-validator'; -import { ValidateUUID } from '../../../../../apps/immich/src/decorators/validate-uuid.decorator'; +import { ValidateUUID } from '@app/immich/decorators/validate-uuid.decorator'; export class AddUsersDto { @ValidateUUID({ each: true }) diff --git a/server/libs/domain/src/album/dto/album-create.dto.ts b/server/src/domain/album/dto/album-create.dto.ts similarity index 78% rename from server/libs/domain/src/album/dto/album-create.dto.ts rename to server/src/domain/album/dto/album-create.dto.ts index 45e5faa44..c41d9120d 100644 --- a/server/libs/domain/src/album/dto/album-create.dto.ts +++ b/server/src/domain/album/dto/album-create.dto.ts @@ -1,5 +1,5 @@ import { ApiProperty } from '@nestjs/swagger'; -import { ValidateUUID } from '../../../../../apps/immich/src/decorators/validate-uuid.decorator'; +import { ValidateUUID } from '@app/immich/decorators/validate-uuid.decorator'; import { IsNotEmpty, IsString } from 'class-validator'; export class CreateAlbumDto { diff --git a/server/libs/domain/src/album/dto/album-update.dto.ts b/server/src/domain/album/dto/album-update.dto.ts similarity index 72% rename from server/libs/domain/src/album/dto/album-update.dto.ts rename to server/src/domain/album/dto/album-update.dto.ts index e71722b74..fb1e79336 100644 --- a/server/libs/domain/src/album/dto/album-update.dto.ts +++ b/server/src/domain/album/dto/album-update.dto.ts @@ -1,6 +1,6 @@ import { ApiProperty } from '@nestjs/swagger'; import { IsOptional } from 'class-validator'; -import { ValidateUUID } from '../../../../../apps/immich/src/decorators/validate-uuid.decorator'; +import { ValidateUUID } from '@app/immich/decorators/validate-uuid.decorator'; export class UpdateAlbumDto { @IsOptional() diff --git a/server/libs/domain/src/album/dto/get-albums.dto.ts b/server/src/domain/album/dto/get-albums.dto.ts similarity index 76% rename from server/libs/domain/src/album/dto/get-albums.dto.ts rename to server/src/domain/album/dto/get-albums.dto.ts index ccf5098b0..9b22d6116 100644 --- a/server/libs/domain/src/album/dto/get-albums.dto.ts +++ b/server/src/domain/album/dto/get-albums.dto.ts @@ -1,8 +1,8 @@ import { ApiProperty } from '@nestjs/swagger'; import { Transform } from 'class-transformer'; import { IsBoolean, IsOptional } from 'class-validator'; -import { ValidateUUID } from '../../../../../apps/immich/src/decorators/validate-uuid.decorator'; -import { toBoolean } from '../../../../../apps/immich/src/utils/transform.util'; +import { ValidateUUID } from '@app/immich/decorators/validate-uuid.decorator'; +import { toBoolean } from '@app/immich/utils/transform.util'; export class GetAlbumsDto { @IsOptional() diff --git a/server/libs/domain/src/album/dto/index.ts b/server/src/domain/album/dto/index.ts similarity index 100% rename from server/libs/domain/src/album/dto/index.ts rename to server/src/domain/album/dto/index.ts diff --git a/server/libs/domain/src/album/index.ts b/server/src/domain/album/index.ts similarity index 100% rename from server/libs/domain/src/album/index.ts rename to server/src/domain/album/index.ts diff --git a/server/libs/domain/src/album/response-dto/album-response.dto.ts b/server/src/domain/album/response-dto/album-response.dto.ts similarity index 100% rename from server/libs/domain/src/album/response-dto/album-response.dto.ts rename to server/src/domain/album/response-dto/album-response.dto.ts diff --git a/server/libs/domain/src/album/response-dto/index.ts b/server/src/domain/album/response-dto/index.ts similarity index 100% rename from server/libs/domain/src/album/response-dto/index.ts rename to server/src/domain/album/response-dto/index.ts diff --git a/server/libs/domain/src/api-key/api-key-response.dto.ts b/server/src/domain/api-key/api-key-response.dto.ts similarity index 100% rename from server/libs/domain/src/api-key/api-key-response.dto.ts rename to server/src/domain/api-key/api-key-response.dto.ts diff --git a/server/libs/domain/src/api-key/api-key.core.ts b/server/src/domain/api-key/api-key.core.ts similarity index 100% rename from server/libs/domain/src/api-key/api-key.core.ts rename to server/src/domain/api-key/api-key.core.ts diff --git a/server/libs/domain/src/api-key/api-key.dto.ts b/server/src/domain/api-key/api-key.dto.ts similarity index 100% rename from server/libs/domain/src/api-key/api-key.dto.ts rename to server/src/domain/api-key/api-key.dto.ts diff --git a/server/libs/domain/src/api-key/api-key.repository.ts b/server/src/domain/api-key/api-key.repository.ts similarity index 100% rename from server/libs/domain/src/api-key/api-key.repository.ts rename to server/src/domain/api-key/api-key.repository.ts diff --git a/server/libs/domain/src/api-key/api-key.service.spec.ts b/server/src/domain/api-key/api-key.service.spec.ts similarity index 99% rename from server/libs/domain/src/api-key/api-key.service.spec.ts rename to server/src/domain/api-key/api-key.service.spec.ts index cfae7c2cc..1e33d9a6b 100644 --- a/server/libs/domain/src/api-key/api-key.service.spec.ts +++ b/server/src/domain/api-key/api-key.service.spec.ts @@ -1,5 +1,5 @@ import { BadRequestException } from '@nestjs/common'; -import { authStub, keyStub, newCryptoRepositoryMock, newKeyRepositoryMock } from '../../test'; +import { authStub, keyStub, newCryptoRepositoryMock, newKeyRepositoryMock } from '@test'; import { ICryptoRepository } from '../crypto'; import { IKeyRepository } from './api-key.repository'; import { APIKeyService } from './api-key.service'; diff --git a/server/libs/domain/src/api-key/api-key.service.ts b/server/src/domain/api-key/api-key.service.ts similarity index 100% rename from server/libs/domain/src/api-key/api-key.service.ts rename to server/src/domain/api-key/api-key.service.ts diff --git a/server/libs/domain/src/api-key/index.ts b/server/src/domain/api-key/index.ts similarity index 100% rename from server/libs/domain/src/api-key/index.ts rename to server/src/domain/api-key/index.ts diff --git a/server/libs/domain/src/asset/asset.repository.ts b/server/src/domain/asset/asset.repository.ts similarity index 100% rename from server/libs/domain/src/asset/asset.repository.ts rename to server/src/domain/asset/asset.repository.ts diff --git a/server/libs/domain/src/asset/asset.service.spec.ts b/server/src/domain/asset/asset.service.spec.ts similarity index 93% rename from server/libs/domain/src/asset/asset.service.spec.ts rename to server/src/domain/asset/asset.service.spec.ts index 832b8d053..b3ffd7668 100644 --- a/server/libs/domain/src/asset/asset.service.spec.ts +++ b/server/src/domain/asset/asset.service.spec.ts @@ -1,5 +1,5 @@ -import { assetEntityStub, authStub, newAssetRepositoryMock } from '../../test'; -import { AssetService, IAssetRepository } from '../asset'; +import { assetEntityStub, authStub, newAssetRepositoryMock } from '@test'; +import { AssetService, IAssetRepository } from '.'; describe(AssetService.name, () => { let sut: AssetService; diff --git a/server/libs/domain/src/asset/asset.service.ts b/server/src/domain/asset/asset.service.ts similarity index 100% rename from server/libs/domain/src/asset/asset.service.ts rename to server/src/domain/asset/asset.service.ts diff --git a/server/src/domain/asset/dto/asset-ids.dto.ts b/server/src/domain/asset/dto/asset-ids.dto.ts new file mode 100644 index 000000000..5438e7a63 --- /dev/null +++ b/server/src/domain/asset/dto/asset-ids.dto.ts @@ -0,0 +1,6 @@ +import { ValidateUUID } from '@app/immich/decorators/validate-uuid.decorator'; + +export class AssetIdsDto { + @ValidateUUID({ each: true }) + assetIds!: string[]; +} diff --git a/server/libs/domain/src/asset/dto/index.ts b/server/src/domain/asset/dto/index.ts similarity index 100% rename from server/libs/domain/src/asset/dto/index.ts rename to server/src/domain/asset/dto/index.ts diff --git a/server/libs/domain/src/asset/dto/map-marker.dto.ts b/server/src/domain/asset/dto/map-marker.dto.ts similarity index 84% rename from server/libs/domain/src/asset/dto/map-marker.dto.ts rename to server/src/domain/asset/dto/map-marker.dto.ts index af39a4980..95db3067e 100644 --- a/server/libs/domain/src/asset/dto/map-marker.dto.ts +++ b/server/src/domain/asset/dto/map-marker.dto.ts @@ -1,7 +1,7 @@ import { ApiProperty } from '@nestjs/swagger'; import { Transform, Type } from 'class-transformer'; import { IsBoolean, IsDate, IsOptional } from 'class-validator'; -import { toBoolean } from '../../../../../apps/immich/src/utils/transform.util'; +import { toBoolean } from '@app/immich/utils/transform.util'; export class MapMarkerDto { @ApiProperty() diff --git a/server/libs/domain/src/asset/index.ts b/server/src/domain/asset/index.ts similarity index 100% rename from server/libs/domain/src/asset/index.ts rename to server/src/domain/asset/index.ts diff --git a/server/libs/domain/src/asset/response-dto/asset-ids-response.dto.ts b/server/src/domain/asset/response-dto/asset-ids-response.dto.ts similarity index 100% rename from server/libs/domain/src/asset/response-dto/asset-ids-response.dto.ts rename to server/src/domain/asset/response-dto/asset-ids-response.dto.ts diff --git a/server/libs/domain/src/asset/response-dto/asset-response.dto.ts b/server/src/domain/asset/response-dto/asset-response.dto.ts similarity index 100% rename from server/libs/domain/src/asset/response-dto/asset-response.dto.ts rename to server/src/domain/asset/response-dto/asset-response.dto.ts diff --git a/server/libs/domain/src/asset/response-dto/exif-response.dto.ts b/server/src/domain/asset/response-dto/exif-response.dto.ts similarity index 100% rename from server/libs/domain/src/asset/response-dto/exif-response.dto.ts rename to server/src/domain/asset/response-dto/exif-response.dto.ts diff --git a/server/libs/domain/src/asset/response-dto/index.ts b/server/src/domain/asset/response-dto/index.ts similarity index 100% rename from server/libs/domain/src/asset/response-dto/index.ts rename to server/src/domain/asset/response-dto/index.ts diff --git a/server/libs/domain/src/asset/response-dto/map-marker-response.dto.ts b/server/src/domain/asset/response-dto/map-marker-response.dto.ts similarity index 100% rename from server/libs/domain/src/asset/response-dto/map-marker-response.dto.ts rename to server/src/domain/asset/response-dto/map-marker-response.dto.ts diff --git a/server/libs/domain/src/asset/response-dto/smart-info-response.dto.ts b/server/src/domain/asset/response-dto/smart-info-response.dto.ts similarity index 100% rename from server/libs/domain/src/asset/response-dto/smart-info-response.dto.ts rename to server/src/domain/asset/response-dto/smart-info-response.dto.ts diff --git a/server/libs/domain/src/auth/auth.constant.ts b/server/src/domain/auth/auth.constant.ts similarity index 100% rename from server/libs/domain/src/auth/auth.constant.ts rename to server/src/domain/auth/auth.constant.ts diff --git a/server/libs/domain/src/auth/auth.core.ts b/server/src/domain/auth/auth.core.ts similarity index 100% rename from server/libs/domain/src/auth/auth.core.ts rename to server/src/domain/auth/auth.core.ts diff --git a/server/libs/domain/src/auth/auth.service.spec.ts b/server/src/domain/auth/auth.service.spec.ts similarity index 99% rename from server/libs/domain/src/auth/auth.service.spec.ts rename to server/src/domain/auth/auth.service.spec.ts index 80e8a6d6e..08d131ba3 100644 --- a/server/libs/domain/src/auth/auth.service.spec.ts +++ b/server/src/domain/auth/auth.service.spec.ts @@ -17,7 +17,7 @@ import { systemConfigStub, userEntityStub, userTokenEntityStub, -} from '../../test'; +} from '@test'; import { IKeyRepository } from '../api-key'; import { ICryptoRepository } from '../crypto/crypto.repository'; import { ISharedLinkRepository } from '../shared-link'; diff --git a/server/libs/domain/src/auth/auth.service.ts b/server/src/domain/auth/auth.service.ts similarity index 100% rename from server/libs/domain/src/auth/auth.service.ts rename to server/src/domain/auth/auth.service.ts diff --git a/server/libs/domain/src/auth/dto/auth-user.dto.ts b/server/src/domain/auth/dto/auth-user.dto.ts similarity index 100% rename from server/libs/domain/src/auth/dto/auth-user.dto.ts rename to server/src/domain/auth/dto/auth-user.dto.ts diff --git a/server/libs/domain/src/auth/dto/change-password.dto.ts b/server/src/domain/auth/dto/change-password.dto.ts similarity index 100% rename from server/libs/domain/src/auth/dto/change-password.dto.ts rename to server/src/domain/auth/dto/change-password.dto.ts diff --git a/server/libs/domain/src/auth/dto/index.ts b/server/src/domain/auth/dto/index.ts similarity index 100% rename from server/libs/domain/src/auth/dto/index.ts rename to server/src/domain/auth/dto/index.ts diff --git a/server/libs/domain/src/auth/dto/login-credential.dto.spec.ts b/server/src/domain/auth/dto/login-credential.dto.spec.ts similarity index 100% rename from server/libs/domain/src/auth/dto/login-credential.dto.spec.ts rename to server/src/domain/auth/dto/login-credential.dto.spec.ts diff --git a/server/libs/domain/src/auth/dto/login-credential.dto.ts b/server/src/domain/auth/dto/login-credential.dto.ts similarity index 100% rename from server/libs/domain/src/auth/dto/login-credential.dto.ts rename to server/src/domain/auth/dto/login-credential.dto.ts diff --git a/server/libs/domain/src/auth/dto/sign-up.dto.spec.ts b/server/src/domain/auth/dto/sign-up.dto.spec.ts similarity index 100% rename from server/libs/domain/src/auth/dto/sign-up.dto.spec.ts rename to server/src/domain/auth/dto/sign-up.dto.spec.ts diff --git a/server/libs/domain/src/auth/dto/sign-up.dto.ts b/server/src/domain/auth/dto/sign-up.dto.ts similarity index 100% rename from server/libs/domain/src/auth/dto/sign-up.dto.ts rename to server/src/domain/auth/dto/sign-up.dto.ts diff --git a/server/libs/domain/src/auth/index.ts b/server/src/domain/auth/index.ts similarity index 100% rename from server/libs/domain/src/auth/index.ts rename to server/src/domain/auth/index.ts diff --git a/server/libs/domain/src/auth/response-dto/admin-signup-response.dto.ts b/server/src/domain/auth/response-dto/admin-signup-response.dto.ts similarity index 100% rename from server/libs/domain/src/auth/response-dto/admin-signup-response.dto.ts rename to server/src/domain/auth/response-dto/admin-signup-response.dto.ts diff --git a/server/libs/domain/src/auth/response-dto/auth-device-response.dto.ts b/server/src/domain/auth/response-dto/auth-device-response.dto.ts similarity index 100% rename from server/libs/domain/src/auth/response-dto/auth-device-response.dto.ts rename to server/src/domain/auth/response-dto/auth-device-response.dto.ts diff --git a/server/libs/domain/src/auth/response-dto/index.ts b/server/src/domain/auth/response-dto/index.ts similarity index 100% rename from server/libs/domain/src/auth/response-dto/index.ts rename to server/src/domain/auth/response-dto/index.ts diff --git a/server/libs/domain/src/auth/response-dto/login-response.dto.ts b/server/src/domain/auth/response-dto/login-response.dto.ts similarity index 100% rename from server/libs/domain/src/auth/response-dto/login-response.dto.ts rename to server/src/domain/auth/response-dto/login-response.dto.ts diff --git a/server/libs/domain/src/auth/response-dto/logout-response.dto.ts b/server/src/domain/auth/response-dto/logout-response.dto.ts similarity index 100% rename from server/libs/domain/src/auth/response-dto/logout-response.dto.ts rename to server/src/domain/auth/response-dto/logout-response.dto.ts diff --git a/server/libs/domain/src/auth/response-dto/validate-asset-token-response.dto.ts b/server/src/domain/auth/response-dto/validate-asset-token-response.dto.ts similarity index 100% rename from server/libs/domain/src/auth/response-dto/validate-asset-token-response.dto.ts rename to server/src/domain/auth/response-dto/validate-asset-token-response.dto.ts diff --git a/server/libs/domain/src/communication/communication.repository.ts b/server/src/domain/communication/communication.repository.ts similarity index 100% rename from server/libs/domain/src/communication/communication.repository.ts rename to server/src/domain/communication/communication.repository.ts diff --git a/server/libs/domain/src/communication/index.ts b/server/src/domain/communication/index.ts similarity index 100% rename from server/libs/domain/src/communication/index.ts rename to server/src/domain/communication/index.ts diff --git a/server/libs/domain/src/crypto/crypto.repository.ts b/server/src/domain/crypto/crypto.repository.ts similarity index 100% rename from server/libs/domain/src/crypto/crypto.repository.ts rename to server/src/domain/crypto/crypto.repository.ts diff --git a/server/libs/domain/src/crypto/index.ts b/server/src/domain/crypto/index.ts similarity index 100% rename from server/libs/domain/src/crypto/index.ts rename to server/src/domain/crypto/index.ts diff --git a/server/libs/domain/src/domain.config.ts b/server/src/domain/domain.config.ts similarity index 100% rename from server/libs/domain/src/domain.config.ts rename to server/src/domain/domain.config.ts diff --git a/server/libs/domain/src/domain.constant.ts b/server/src/domain/domain.constant.ts similarity index 95% rename from server/libs/domain/src/domain.constant.ts rename to server/src/domain/domain.constant.ts index b0e075977..3aec785d7 100644 --- a/server/libs/domain/src/domain.constant.ts +++ b/server/src/domain/domain.constant.ts @@ -1,5 +1,5 @@ import { BadRequestException } from '@nestjs/common'; -import pkg from '../../../package.json'; +import pkg from 'src/../../package.json'; const [major, minor, patch] = pkg.version.split('.'); diff --git a/server/libs/domain/src/domain.module.ts b/server/src/domain/domain.module.ts similarity index 100% rename from server/libs/domain/src/domain.module.ts rename to server/src/domain/domain.module.ts diff --git a/server/libs/domain/src/domain.util.ts b/server/src/domain/domain.util.ts similarity index 100% rename from server/libs/domain/src/domain.util.ts rename to server/src/domain/domain.util.ts diff --git a/server/libs/domain/src/facial-recognition/face.repository.ts b/server/src/domain/facial-recognition/face.repository.ts similarity index 100% rename from server/libs/domain/src/facial-recognition/face.repository.ts rename to server/src/domain/facial-recognition/face.repository.ts diff --git a/server/libs/domain/src/facial-recognition/facial-recognition.service.spec.ts b/server/src/domain/facial-recognition/facial-recognition.service.spec.ts similarity index 99% rename from server/libs/domain/src/facial-recognition/facial-recognition.service.spec.ts rename to server/src/domain/facial-recognition/facial-recognition.service.spec.ts index 6c4adbd37..87418b2c2 100644 --- a/server/libs/domain/src/facial-recognition/facial-recognition.service.spec.ts +++ b/server/src/domain/facial-recognition/facial-recognition.service.spec.ts @@ -10,7 +10,7 @@ import { newSearchRepositoryMock, newStorageRepositoryMock, personStub, -} from '../../test'; +} from '@test'; import { IAssetRepository, WithoutProperty } from '../asset'; import { IJobRepository, JobName } from '../job'; import { IMediaRepository } from '../media'; diff --git a/server/libs/domain/src/facial-recognition/facial-recognition.services.ts b/server/src/domain/facial-recognition/facial-recognition.services.ts similarity index 100% rename from server/libs/domain/src/facial-recognition/facial-recognition.services.ts rename to server/src/domain/facial-recognition/facial-recognition.services.ts diff --git a/server/libs/domain/src/facial-recognition/index.ts b/server/src/domain/facial-recognition/index.ts similarity index 100% rename from server/libs/domain/src/facial-recognition/index.ts rename to server/src/domain/facial-recognition/index.ts diff --git a/server/libs/domain/src/index.ts b/server/src/domain/index.ts similarity index 100% rename from server/libs/domain/src/index.ts rename to server/src/domain/index.ts diff --git a/server/libs/domain/src/job/dto/index.ts b/server/src/domain/job/dto/index.ts similarity index 100% rename from server/libs/domain/src/job/dto/index.ts rename to server/src/domain/job/dto/index.ts diff --git a/server/libs/domain/src/job/dto/job-command.dto.ts b/server/src/domain/job/dto/job-command.dto.ts similarity index 100% rename from server/libs/domain/src/job/dto/job-command.dto.ts rename to server/src/domain/job/dto/job-command.dto.ts diff --git a/server/libs/domain/src/job/dto/job-id.dto.ts b/server/src/domain/job/dto/job-id.dto.ts similarity index 100% rename from server/libs/domain/src/job/dto/job-id.dto.ts rename to server/src/domain/job/dto/job-id.dto.ts diff --git a/server/libs/domain/src/job/index.ts b/server/src/domain/job/index.ts similarity index 100% rename from server/libs/domain/src/job/index.ts rename to server/src/domain/job/index.ts diff --git a/server/libs/domain/src/job/job.constants.ts b/server/src/domain/job/job.constants.ts similarity index 100% rename from server/libs/domain/src/job/job.constants.ts rename to server/src/domain/job/job.constants.ts diff --git a/server/libs/domain/src/job/job.interface.ts b/server/src/domain/job/job.interface.ts similarity index 100% rename from server/libs/domain/src/job/job.interface.ts rename to server/src/domain/job/job.interface.ts diff --git a/server/libs/domain/src/job/job.repository.ts b/server/src/domain/job/job.repository.ts similarity index 100% rename from server/libs/domain/src/job/job.repository.ts rename to server/src/domain/job/job.repository.ts diff --git a/server/libs/domain/src/job/job.service.spec.ts b/server/src/domain/job/job.service.spec.ts similarity index 99% rename from server/libs/domain/src/job/job.service.spec.ts rename to server/src/domain/job/job.service.spec.ts index 303661edb..23999d5d3 100644 --- a/server/libs/domain/src/job/job.service.spec.ts +++ b/server/src/domain/job/job.service.spec.ts @@ -6,10 +6,10 @@ import { newCommunicationRepositoryMock, newJobRepositoryMock, newSystemConfigRepositoryMock, -} from '../../test'; +} from '@test'; import { IAssetRepository } from '../asset'; import { ICommunicationRepository } from '../communication'; -import { IJobRepository, JobCommand, JobHandler, JobItem, JobName, JobService, QueueName } from '../job'; +import { IJobRepository, JobCommand, JobHandler, JobItem, JobName, JobService, QueueName } from '.'; import { ISystemConfigRepository } from '../system-config'; import { SystemConfigCore } from '../system-config/system-config.core'; diff --git a/server/libs/domain/src/job/job.service.ts b/server/src/domain/job/job.service.ts similarity index 100% rename from server/libs/domain/src/job/job.service.ts rename to server/src/domain/job/job.service.ts diff --git a/server/libs/domain/src/job/response-dto/all-job-status-response.dto.ts b/server/src/domain/job/response-dto/all-job-status-response.dto.ts similarity index 100% rename from server/libs/domain/src/job/response-dto/all-job-status-response.dto.ts rename to server/src/domain/job/response-dto/all-job-status-response.dto.ts diff --git a/server/libs/domain/src/job/response-dto/index.ts b/server/src/domain/job/response-dto/index.ts similarity index 100% rename from server/libs/domain/src/job/response-dto/index.ts rename to server/src/domain/job/response-dto/index.ts diff --git a/server/libs/domain/src/media/index.ts b/server/src/domain/media/index.ts similarity index 100% rename from server/libs/domain/src/media/index.ts rename to server/src/domain/media/index.ts diff --git a/server/libs/domain/src/media/media.constant.ts b/server/src/domain/media/media.constant.ts similarity index 100% rename from server/libs/domain/src/media/media.constant.ts rename to server/src/domain/media/media.constant.ts diff --git a/server/libs/domain/src/media/media.repository.ts b/server/src/domain/media/media.repository.ts similarity index 100% rename from server/libs/domain/src/media/media.repository.ts rename to server/src/domain/media/media.repository.ts diff --git a/server/libs/domain/src/media/media.service.spec.ts b/server/src/domain/media/media.service.spec.ts similarity index 99% rename from server/libs/domain/src/media/media.service.spec.ts rename to server/src/domain/media/media.service.spec.ts index 17b683d46..99c51a1c0 100644 --- a/server/libs/domain/src/media/media.service.spec.ts +++ b/server/src/domain/media/media.service.spec.ts @@ -7,7 +7,7 @@ import { newStorageRepositoryMock, newSystemConfigRepositoryMock, probeStub, -} from '../../test'; +} from '@test'; import { IAssetRepository, WithoutProperty } from '../asset'; import { IJobRepository, JobName } from '../job'; import { IStorageRepository } from '../storage'; diff --git a/server/libs/domain/src/media/media.service.ts b/server/src/domain/media/media.service.ts similarity index 100% rename from server/libs/domain/src/media/media.service.ts rename to server/src/domain/media/media.service.ts diff --git a/server/libs/domain/src/metadata/geocoding.repository.ts b/server/src/domain/metadata/geocoding.repository.ts similarity index 100% rename from server/libs/domain/src/metadata/geocoding.repository.ts rename to server/src/domain/metadata/geocoding.repository.ts diff --git a/server/libs/domain/src/metadata/index.ts b/server/src/domain/metadata/index.ts similarity index 100% rename from server/libs/domain/src/metadata/index.ts rename to server/src/domain/metadata/index.ts diff --git a/server/libs/domain/src/metadata/metadata.service.spec.ts b/server/src/domain/metadata/metadata.service.spec.ts similarity index 98% rename from server/libs/domain/src/metadata/metadata.service.spec.ts rename to server/src/domain/metadata/metadata.service.spec.ts index d889a9ce8..cc47b2abf 100644 --- a/server/libs/domain/src/metadata/metadata.service.spec.ts +++ b/server/src/domain/metadata/metadata.service.spec.ts @@ -1,5 +1,5 @@ import { constants } from 'fs/promises'; -import { assetEntityStub, newAssetRepositoryMock, newJobRepositoryMock, newStorageRepositoryMock } from '../../test'; +import { assetEntityStub, newAssetRepositoryMock, newJobRepositoryMock, newStorageRepositoryMock } from '@test'; import { IAssetRepository, WithoutProperty, WithProperty } from '../asset'; import { IJobRepository, JobName } from '../job'; import { IStorageRepository } from '../storage'; diff --git a/server/libs/domain/src/metadata/metadata.service.ts b/server/src/domain/metadata/metadata.service.ts similarity index 100% rename from server/libs/domain/src/metadata/metadata.service.ts rename to server/src/domain/metadata/metadata.service.ts diff --git a/server/libs/domain/src/oauth/dto/index.ts b/server/src/domain/oauth/dto/index.ts similarity index 100% rename from server/libs/domain/src/oauth/dto/index.ts rename to server/src/domain/oauth/dto/index.ts diff --git a/server/libs/domain/src/oauth/dto/oauth-auth-code.dto.ts b/server/src/domain/oauth/dto/oauth-auth-code.dto.ts similarity index 100% rename from server/libs/domain/src/oauth/dto/oauth-auth-code.dto.ts rename to server/src/domain/oauth/dto/oauth-auth-code.dto.ts diff --git a/server/libs/domain/src/oauth/dto/oauth-config.dto.ts b/server/src/domain/oauth/dto/oauth-config.dto.ts similarity index 100% rename from server/libs/domain/src/oauth/dto/oauth-config.dto.ts rename to server/src/domain/oauth/dto/oauth-config.dto.ts diff --git a/server/libs/domain/src/oauth/index.ts b/server/src/domain/oauth/index.ts similarity index 100% rename from server/libs/domain/src/oauth/index.ts rename to server/src/domain/oauth/index.ts diff --git a/server/libs/domain/src/oauth/oauth.constants.ts b/server/src/domain/oauth/oauth.constants.ts similarity index 100% rename from server/libs/domain/src/oauth/oauth.constants.ts rename to server/src/domain/oauth/oauth.constants.ts diff --git a/server/libs/domain/src/oauth/oauth.core.ts b/server/src/domain/oauth/oauth.core.ts similarity index 100% rename from server/libs/domain/src/oauth/oauth.core.ts rename to server/src/domain/oauth/oauth.core.ts diff --git a/server/libs/domain/src/oauth/oauth.service.spec.ts b/server/src/domain/oauth/oauth.service.spec.ts similarity index 98% rename from server/libs/domain/src/oauth/oauth.service.spec.ts rename to server/src/domain/oauth/oauth.service.spec.ts index c79e09e7e..74dac63f5 100644 --- a/server/libs/domain/src/oauth/oauth.service.spec.ts +++ b/server/src/domain/oauth/oauth.service.spec.ts @@ -3,21 +3,21 @@ import { BadRequestException } from '@nestjs/common'; import { generators, Issuer } from 'openid-client'; import { authStub, - userEntityStub, loginResponseStub, newCryptoRepositoryMock, newSystemConfigRepositoryMock, newUserRepositoryMock, + newUserTokenRepositoryMock, systemConfigStub, + userEntityStub, userTokenEntityStub, -} from '../../test'; +} from '@test'; +import { OAuthService } from '.'; +import { LoginDetails } from '../auth'; import { ICryptoRepository } from '../crypto'; -import { OAuthService } from '../oauth'; import { ISystemConfigRepository } from '../system-config'; import { IUserRepository } from '../user'; import { IUserTokenRepository } from '../user-token'; -import { newUserTokenRepositoryMock } from '../../test/user-token.repository.mock'; -import { LoginDetails } from '../auth'; const email = 'user@immich.com'; const sub = 'my-auth-user-sub'; diff --git a/server/libs/domain/src/oauth/oauth.service.ts b/server/src/domain/oauth/oauth.service.ts similarity index 100% rename from server/libs/domain/src/oauth/oauth.service.ts rename to server/src/domain/oauth/oauth.service.ts diff --git a/server/libs/domain/src/oauth/response-dto/index.ts b/server/src/domain/oauth/response-dto/index.ts similarity index 100% rename from server/libs/domain/src/oauth/response-dto/index.ts rename to server/src/domain/oauth/response-dto/index.ts diff --git a/server/libs/domain/src/oauth/response-dto/oauth-config-response.dto.ts b/server/src/domain/oauth/response-dto/oauth-config-response.dto.ts similarity index 100% rename from server/libs/domain/src/oauth/response-dto/oauth-config-response.dto.ts rename to server/src/domain/oauth/response-dto/oauth-config-response.dto.ts diff --git a/server/libs/domain/src/partner/index.ts b/server/src/domain/partner/index.ts similarity index 100% rename from server/libs/domain/src/partner/index.ts rename to server/src/domain/partner/index.ts diff --git a/server/libs/domain/src/partner/partner.repository.ts b/server/src/domain/partner/partner.repository.ts similarity index 100% rename from server/libs/domain/src/partner/partner.repository.ts rename to server/src/domain/partner/partner.repository.ts diff --git a/server/libs/domain/src/partner/partner.service.spec.ts b/server/src/domain/partner/partner.service.spec.ts similarity index 99% rename from server/libs/domain/src/partner/partner.service.spec.ts rename to server/src/domain/partner/partner.service.spec.ts index 7a3c0490f..2422d20ce 100644 --- a/server/libs/domain/src/partner/partner.service.spec.ts +++ b/server/src/domain/partner/partner.service.spec.ts @@ -1,5 +1,5 @@ import { BadRequestException } from '@nestjs/common'; -import { authStub, newPartnerRepositoryMock, partnerStub } from '../../test'; +import { authStub, newPartnerRepositoryMock, partnerStub } from '@test'; import { IPartnerRepository, PartnerDirection } from './partner.repository'; import { PartnerService } from './partner.service'; diff --git a/server/libs/domain/src/partner/partner.service.ts b/server/src/domain/partner/partner.service.ts similarity index 99% rename from server/libs/domain/src/partner/partner.service.ts rename to server/src/domain/partner/partner.service.ts index 2759f37cb..6486df742 100644 --- a/server/libs/domain/src/partner/partner.service.ts +++ b/server/src/domain/partner/partner.service.ts @@ -1,7 +1,7 @@ import { PartnerEntity } from '@app/infra/entities'; import { BadRequestException, Inject, Injectable } from '@nestjs/common'; import { AuthUserDto } from '../auth'; -import { IPartnerRepository, PartnerDirection, PartnerIds } from '../partner'; +import { IPartnerRepository, PartnerDirection, PartnerIds } from '.'; import { mapUser, UserResponseDto } from '../user'; @Injectable() diff --git a/server/libs/domain/src/person/dto/index.ts b/server/src/domain/person/dto/index.ts similarity index 100% rename from server/libs/domain/src/person/dto/index.ts rename to server/src/domain/person/dto/index.ts diff --git a/server/libs/domain/src/person/dto/person-update.dto.ts b/server/src/domain/person/dto/person-update.dto.ts similarity index 100% rename from server/libs/domain/src/person/dto/person-update.dto.ts rename to server/src/domain/person/dto/person-update.dto.ts diff --git a/server/libs/domain/src/person/index.ts b/server/src/domain/person/index.ts similarity index 100% rename from server/libs/domain/src/person/index.ts rename to server/src/domain/person/index.ts diff --git a/server/libs/domain/src/person/person.repository.ts b/server/src/domain/person/person.repository.ts similarity index 100% rename from server/libs/domain/src/person/person.repository.ts rename to server/src/domain/person/person.repository.ts diff --git a/server/libs/domain/src/person/person.service.spec.ts b/server/src/domain/person/person.service.spec.ts similarity index 99% rename from server/libs/domain/src/person/person.service.spec.ts rename to server/src/domain/person/person.service.spec.ts index 78ff32f1a..9a9f3107d 100644 --- a/server/libs/domain/src/person/person.service.spec.ts +++ b/server/src/domain/person/person.service.spec.ts @@ -7,7 +7,7 @@ import { newPersonRepositoryMock, newStorageRepositoryMock, personStub, -} from '../../test'; +} from '@test'; import { IStorageRepository } from '../storage'; import { IPersonRepository } from './person.repository'; import { PersonService } from './person.service'; diff --git a/server/libs/domain/src/person/person.service.ts b/server/src/domain/person/person.service.ts similarity index 100% rename from server/libs/domain/src/person/person.service.ts rename to server/src/domain/person/person.service.ts diff --git a/server/libs/domain/src/person/response-dto/index.ts b/server/src/domain/person/response-dto/index.ts similarity index 100% rename from server/libs/domain/src/person/response-dto/index.ts rename to server/src/domain/person/response-dto/index.ts diff --git a/server/libs/domain/src/person/response-dto/person-response.dto.ts b/server/src/domain/person/response-dto/person-response.dto.ts similarity index 100% rename from server/libs/domain/src/person/response-dto/person-response.dto.ts rename to server/src/domain/person/response-dto/person-response.dto.ts diff --git a/server/libs/domain/src/search/dto/index.ts b/server/src/domain/search/dto/index.ts similarity index 100% rename from server/libs/domain/src/search/dto/index.ts rename to server/src/domain/search/dto/index.ts diff --git a/server/libs/domain/src/search/dto/search.dto.ts b/server/src/domain/search/dto/search.dto.ts similarity index 94% rename from server/libs/domain/src/search/dto/search.dto.ts rename to server/src/domain/search/dto/search.dto.ts index 1d65c7bfb..9c442260b 100644 --- a/server/libs/domain/src/search/dto/search.dto.ts +++ b/server/src/domain/search/dto/search.dto.ts @@ -1,7 +1,7 @@ import { AssetType } from '@app/infra/entities'; import { Transform } from 'class-transformer'; import { IsArray, IsBoolean, IsEnum, IsNotEmpty, IsOptional, IsString } from 'class-validator'; -import { toBoolean } from '../../../../../apps/immich/src/utils/transform.util'; +import { toBoolean } from '@app/immich/utils/transform.util'; export class SearchDto { @IsString() diff --git a/server/libs/domain/src/search/index.ts b/server/src/domain/search/index.ts similarity index 100% rename from server/libs/domain/src/search/index.ts rename to server/src/domain/search/index.ts diff --git a/server/libs/domain/src/search/response-dto/index.ts b/server/src/domain/search/response-dto/index.ts similarity index 100% rename from server/libs/domain/src/search/response-dto/index.ts rename to server/src/domain/search/response-dto/index.ts diff --git a/server/libs/domain/src/search/response-dto/search-config-response.dto.ts b/server/src/domain/search/response-dto/search-config-response.dto.ts similarity index 100% rename from server/libs/domain/src/search/response-dto/search-config-response.dto.ts rename to server/src/domain/search/response-dto/search-config-response.dto.ts diff --git a/server/libs/domain/src/search/response-dto/search-explore.response.dto.ts b/server/src/domain/search/response-dto/search-explore.response.dto.ts similarity index 100% rename from server/libs/domain/src/search/response-dto/search-explore.response.dto.ts rename to server/src/domain/search/response-dto/search-explore.response.dto.ts diff --git a/server/libs/domain/src/search/response-dto/search-response.dto.ts b/server/src/domain/search/response-dto/search-response.dto.ts similarity index 100% rename from server/libs/domain/src/search/response-dto/search-response.dto.ts rename to server/src/domain/search/response-dto/search-response.dto.ts diff --git a/server/libs/domain/src/search/search.repository.ts b/server/src/domain/search/search.repository.ts similarity index 100% rename from server/libs/domain/src/search/search.repository.ts rename to server/src/domain/search/search.repository.ts diff --git a/server/libs/domain/src/search/search.service.spec.ts b/server/src/domain/search/search.service.spec.ts similarity index 99% rename from server/libs/domain/src/search/search.service.spec.ts rename to server/src/domain/search/search.service.spec.ts index ebd614e5b..e1ff835d0 100644 --- a/server/libs/domain/src/search/search.service.spec.ts +++ b/server/src/domain/search/search.service.spec.ts @@ -14,7 +14,7 @@ import { newMachineLearningRepositoryMock, newSearchRepositoryMock, searchStub, -} from '../../test'; +} from '@test'; import { IAlbumRepository } from '../album/album.repository'; import { IAssetRepository } from '../asset/asset.repository'; import { IFaceRepository } from '../facial-recognition'; diff --git a/server/libs/domain/src/search/search.service.ts b/server/src/domain/search/search.service.ts similarity index 100% rename from server/libs/domain/src/search/search.service.ts rename to server/src/domain/search/search.service.ts diff --git a/server/libs/domain/src/server-info/index.ts b/server/src/domain/server-info/index.ts similarity index 100% rename from server/libs/domain/src/server-info/index.ts rename to server/src/domain/server-info/index.ts diff --git a/server/libs/domain/src/server-info/response-dto/index.ts b/server/src/domain/server-info/response-dto/index.ts similarity index 100% rename from server/libs/domain/src/server-info/response-dto/index.ts rename to server/src/domain/server-info/response-dto/index.ts diff --git a/server/libs/domain/src/server-info/response-dto/server-info-response.dto.ts b/server/src/domain/server-info/response-dto/server-info-response.dto.ts similarity index 100% rename from server/libs/domain/src/server-info/response-dto/server-info-response.dto.ts rename to server/src/domain/server-info/response-dto/server-info-response.dto.ts diff --git a/server/libs/domain/src/server-info/response-dto/server-ping-response.dto.ts b/server/src/domain/server-info/response-dto/server-ping-response.dto.ts similarity index 100% rename from server/libs/domain/src/server-info/response-dto/server-ping-response.dto.ts rename to server/src/domain/server-info/response-dto/server-ping-response.dto.ts diff --git a/server/libs/domain/src/server-info/response-dto/server-stats-response.dto.ts b/server/src/domain/server-info/response-dto/server-stats-response.dto.ts similarity index 100% rename from server/libs/domain/src/server-info/response-dto/server-stats-response.dto.ts rename to server/src/domain/server-info/response-dto/server-stats-response.dto.ts diff --git a/server/libs/domain/src/server-info/response-dto/server-version-response.dto.ts b/server/src/domain/server-info/response-dto/server-version-response.dto.ts similarity index 100% rename from server/libs/domain/src/server-info/response-dto/server-version-response.dto.ts rename to server/src/domain/server-info/response-dto/server-version-response.dto.ts diff --git a/server/libs/domain/src/server-info/response-dto/usage-by-user-response.dto.ts b/server/src/domain/server-info/response-dto/usage-by-user-response.dto.ts similarity index 100% rename from server/libs/domain/src/server-info/response-dto/usage-by-user-response.dto.ts rename to server/src/domain/server-info/response-dto/usage-by-user-response.dto.ts diff --git a/server/libs/domain/src/server-info/server-info.service.spec.ts b/server/src/domain/server-info/server-info.service.spec.ts similarity index 99% rename from server/libs/domain/src/server-info/server-info.service.spec.ts rename to server/src/domain/server-info/server-info.service.spec.ts index f030a63a1..ebb0d800f 100644 --- a/server/libs/domain/src/server-info/server-info.service.spec.ts +++ b/server/src/domain/server-info/server-info.service.spec.ts @@ -1,4 +1,4 @@ -import { newStorageRepositoryMock, newUserRepositoryMock } from '../../test'; +import { newStorageRepositoryMock, newUserRepositoryMock } from '@test'; import { serverVersion } from '../domain.constant'; import { IStorageRepository } from '../storage'; import { IUserRepository } from '../user'; diff --git a/server/libs/domain/src/server-info/server-info.service.ts b/server/src/domain/server-info/server-info.service.ts similarity index 100% rename from server/libs/domain/src/server-info/server-info.service.ts rename to server/src/domain/server-info/server-info.service.ts diff --git a/server/libs/domain/src/shared-link/dto/create-shared-link.dto.ts b/server/src/domain/shared-link/dto/create-shared-link.dto.ts similarity index 100% rename from server/libs/domain/src/shared-link/dto/create-shared-link.dto.ts rename to server/src/domain/shared-link/dto/create-shared-link.dto.ts diff --git a/server/libs/domain/src/shared-link/dto/edit-shared-link.dto.ts b/server/src/domain/shared-link/dto/edit-shared-link.dto.ts similarity index 100% rename from server/libs/domain/src/shared-link/dto/edit-shared-link.dto.ts rename to server/src/domain/shared-link/dto/edit-shared-link.dto.ts diff --git a/server/libs/domain/src/shared-link/dto/index.ts b/server/src/domain/shared-link/dto/index.ts similarity index 100% rename from server/libs/domain/src/shared-link/dto/index.ts rename to server/src/domain/shared-link/dto/index.ts diff --git a/server/libs/domain/src/shared-link/index.ts b/server/src/domain/shared-link/index.ts similarity index 100% rename from server/libs/domain/src/shared-link/index.ts rename to server/src/domain/shared-link/index.ts diff --git a/server/libs/domain/src/shared-link/response-dto/index.ts b/server/src/domain/shared-link/response-dto/index.ts similarity index 100% rename from server/libs/domain/src/shared-link/response-dto/index.ts rename to server/src/domain/shared-link/response-dto/index.ts diff --git a/server/libs/domain/src/shared-link/response-dto/shared-link-response.dto.ts b/server/src/domain/shared-link/response-dto/shared-link-response.dto.ts similarity index 100% rename from server/libs/domain/src/shared-link/response-dto/shared-link-response.dto.ts rename to server/src/domain/shared-link/response-dto/shared-link-response.dto.ts diff --git a/server/libs/domain/src/shared-link/shared-link.core.ts b/server/src/domain/shared-link/shared-link.core.ts similarity index 100% rename from server/libs/domain/src/shared-link/shared-link.core.ts rename to server/src/domain/shared-link/shared-link.core.ts diff --git a/server/libs/domain/src/shared-link/shared-link.repository.ts b/server/src/domain/shared-link/shared-link.repository.ts similarity index 100% rename from server/libs/domain/src/shared-link/shared-link.repository.ts rename to server/src/domain/shared-link/shared-link.repository.ts diff --git a/server/libs/domain/src/shared-link/shared-link.service.spec.ts b/server/src/domain/shared-link/shared-link.service.spec.ts similarity index 99% rename from server/libs/domain/src/shared-link/shared-link.service.spec.ts rename to server/src/domain/shared-link/shared-link.service.spec.ts index 09a0f1e63..52cf7469b 100644 --- a/server/libs/domain/src/shared-link/shared-link.service.spec.ts +++ b/server/src/domain/shared-link/shared-link.service.spec.ts @@ -1,5 +1,5 @@ import { BadRequestException, ForbiddenException } from '@nestjs/common'; -import { authStub, newSharedLinkRepositoryMock, sharedLinkResponseStub, sharedLinkStub } from '../../test'; +import { authStub, newSharedLinkRepositoryMock, sharedLinkResponseStub, sharedLinkStub } from '@test'; import { SharedLinkService } from './shared-link.service'; import { ISharedLinkRepository } from './shared-link.repository'; diff --git a/server/libs/domain/src/shared-link/shared-link.service.ts b/server/src/domain/shared-link/shared-link.service.ts similarity index 100% rename from server/libs/domain/src/shared-link/shared-link.service.ts rename to server/src/domain/shared-link/shared-link.service.ts diff --git a/server/libs/domain/src/smart-info/index.ts b/server/src/domain/smart-info/index.ts similarity index 100% rename from server/libs/domain/src/smart-info/index.ts rename to server/src/domain/smart-info/index.ts diff --git a/server/libs/domain/src/smart-info/machine-learning.interface.ts b/server/src/domain/smart-info/machine-learning.interface.ts similarity index 100% rename from server/libs/domain/src/smart-info/machine-learning.interface.ts rename to server/src/domain/smart-info/machine-learning.interface.ts diff --git a/server/libs/domain/src/smart-info/smart-info.repository.ts b/server/src/domain/smart-info/smart-info.repository.ts similarity index 100% rename from server/libs/domain/src/smart-info/smart-info.repository.ts rename to server/src/domain/smart-info/smart-info.repository.ts diff --git a/server/libs/domain/src/smart-info/smart-info.service.spec.ts b/server/src/domain/smart-info/smart-info.service.spec.ts similarity index 99% rename from server/libs/domain/src/smart-info/smart-info.service.spec.ts rename to server/src/domain/smart-info/smart-info.service.spec.ts index 404059c0b..3a3136637 100644 --- a/server/libs/domain/src/smart-info/smart-info.service.spec.ts +++ b/server/src/domain/smart-info/smart-info.service.spec.ts @@ -5,7 +5,7 @@ import { newJobRepositoryMock, newMachineLearningRepositoryMock, newSmartInfoRepositoryMock, -} from '../../test'; +} from '@test'; import { IAssetRepository, WithoutProperty } from '../asset'; import { IJobRepository, JobName } from '../job'; import { IMachineLearningRepository } from './machine-learning.interface'; diff --git a/server/libs/domain/src/smart-info/smart-info.service.ts b/server/src/domain/smart-info/smart-info.service.ts similarity index 100% rename from server/libs/domain/src/smart-info/smart-info.service.ts rename to server/src/domain/smart-info/smart-info.service.ts diff --git a/server/libs/domain/src/storage-template/index.ts b/server/src/domain/storage-template/index.ts similarity index 100% rename from server/libs/domain/src/storage-template/index.ts rename to server/src/domain/storage-template/index.ts diff --git a/server/libs/domain/src/storage-template/storage-template.core.ts b/server/src/domain/storage-template/storage-template.core.ts similarity index 100% rename from server/libs/domain/src/storage-template/storage-template.core.ts rename to server/src/domain/storage-template/storage-template.core.ts diff --git a/server/libs/domain/src/storage-template/storage-template.service.spec.ts b/server/src/domain/storage-template/storage-template.service.spec.ts similarity index 98% rename from server/libs/domain/src/storage-template/storage-template.service.spec.ts rename to server/src/domain/storage-template/storage-template.service.spec.ts index f39f0ec2c..166ba4695 100644 --- a/server/libs/domain/src/storage-template/storage-template.service.spec.ts +++ b/server/src/domain/storage-template/storage-template.service.spec.ts @@ -7,9 +7,9 @@ import { newUserRepositoryMock, systemConfigStub, userEntityStub, -} from '../../test'; +} from '@test'; import { IAssetRepository } from '../asset'; -import { StorageTemplateService } from '../storage-template'; +import { StorageTemplateService } from '.'; import { IStorageRepository } from '../storage/storage.repository'; import { ISystemConfigRepository } from '../system-config'; import { IUserRepository } from '../user'; diff --git a/server/libs/domain/src/storage-template/storage-template.service.ts b/server/src/domain/storage-template/storage-template.service.ts similarity index 100% rename from server/libs/domain/src/storage-template/storage-template.service.ts rename to server/src/domain/storage-template/storage-template.service.ts diff --git a/server/libs/domain/src/storage/index.ts b/server/src/domain/storage/index.ts similarity index 100% rename from server/libs/domain/src/storage/index.ts rename to server/src/domain/storage/index.ts diff --git a/server/libs/domain/src/storage/storage.core.ts b/server/src/domain/storage/storage.core.ts similarity index 100% rename from server/libs/domain/src/storage/storage.core.ts rename to server/src/domain/storage/storage.core.ts diff --git a/server/libs/domain/src/storage/storage.repository.ts b/server/src/domain/storage/storage.repository.ts similarity index 100% rename from server/libs/domain/src/storage/storage.repository.ts rename to server/src/domain/storage/storage.repository.ts diff --git a/server/libs/domain/src/storage/storage.service.spec.ts b/server/src/domain/storage/storage.service.spec.ts similarity index 92% rename from server/libs/domain/src/storage/storage.service.spec.ts rename to server/src/domain/storage/storage.service.spec.ts index 9b180cafc..e2a114b76 100644 --- a/server/libs/domain/src/storage/storage.service.spec.ts +++ b/server/src/domain/storage/storage.service.spec.ts @@ -1,5 +1,5 @@ -import { newStorageRepositoryMock } from '../../test'; -import { IStorageRepository } from '../storage'; +import { newStorageRepositoryMock } from '@test'; +import { IStorageRepository } from '.'; import { StorageService } from './storage.service'; describe(StorageService.name, () => { diff --git a/server/libs/domain/src/storage/storage.service.ts b/server/src/domain/storage/storage.service.ts similarity index 100% rename from server/libs/domain/src/storage/storage.service.ts rename to server/src/domain/storage/storage.service.ts diff --git a/server/libs/domain/src/system-config/dto/index.ts b/server/src/domain/system-config/dto/index.ts similarity index 100% rename from server/libs/domain/src/system-config/dto/index.ts rename to server/src/domain/system-config/dto/index.ts diff --git a/server/libs/domain/src/system-config/dto/system-config-ffmpeg.dto.ts b/server/src/domain/system-config/dto/system-config-ffmpeg.dto.ts similarity index 100% rename from server/libs/domain/src/system-config/dto/system-config-ffmpeg.dto.ts rename to server/src/domain/system-config/dto/system-config-ffmpeg.dto.ts diff --git a/server/libs/domain/src/system-config/dto/system-config-job.dto.ts b/server/src/domain/system-config/dto/system-config-job.dto.ts similarity index 100% rename from server/libs/domain/src/system-config/dto/system-config-job.dto.ts rename to server/src/domain/system-config/dto/system-config-job.dto.ts diff --git a/server/libs/domain/src/system-config/dto/system-config-oauth.dto.ts b/server/src/domain/system-config/dto/system-config-oauth.dto.ts similarity index 100% rename from server/libs/domain/src/system-config/dto/system-config-oauth.dto.ts rename to server/src/domain/system-config/dto/system-config-oauth.dto.ts diff --git a/server/libs/domain/src/system-config/dto/system-config-password-login.dto.ts b/server/src/domain/system-config/dto/system-config-password-login.dto.ts similarity index 100% rename from server/libs/domain/src/system-config/dto/system-config-password-login.dto.ts rename to server/src/domain/system-config/dto/system-config-password-login.dto.ts diff --git a/server/libs/domain/src/system-config/dto/system-config-storage-template.dto.ts b/server/src/domain/system-config/dto/system-config-storage-template.dto.ts similarity index 100% rename from server/libs/domain/src/system-config/dto/system-config-storage-template.dto.ts rename to server/src/domain/system-config/dto/system-config-storage-template.dto.ts diff --git a/server/libs/domain/src/system-config/dto/system-config.dto.ts b/server/src/domain/system-config/dto/system-config.dto.ts similarity index 100% rename from server/libs/domain/src/system-config/dto/system-config.dto.ts rename to server/src/domain/system-config/dto/system-config.dto.ts diff --git a/server/libs/domain/src/system-config/index.ts b/server/src/domain/system-config/index.ts similarity index 100% rename from server/libs/domain/src/system-config/index.ts rename to server/src/domain/system-config/index.ts diff --git a/server/libs/domain/src/system-config/response-dto/index.ts b/server/src/domain/system-config/response-dto/index.ts similarity index 100% rename from server/libs/domain/src/system-config/response-dto/index.ts rename to server/src/domain/system-config/response-dto/index.ts diff --git a/server/libs/domain/src/system-config/response-dto/system-config-template-storage-option.dto.ts b/server/src/domain/system-config/response-dto/system-config-template-storage-option.dto.ts similarity index 100% rename from server/libs/domain/src/system-config/response-dto/system-config-template-storage-option.dto.ts rename to server/src/domain/system-config/response-dto/system-config-template-storage-option.dto.ts diff --git a/server/libs/domain/src/system-config/system-config.constants.ts b/server/src/domain/system-config/system-config.constants.ts similarity index 100% rename from server/libs/domain/src/system-config/system-config.constants.ts rename to server/src/domain/system-config/system-config.constants.ts diff --git a/server/libs/domain/src/system-config/system-config.core.ts b/server/src/domain/system-config/system-config.core.ts similarity index 100% rename from server/libs/domain/src/system-config/system-config.core.ts rename to server/src/domain/system-config/system-config.core.ts diff --git a/server/libs/domain/src/system-config/system-config.repository.ts b/server/src/domain/system-config/system-config.repository.ts similarity index 100% rename from server/libs/domain/src/system-config/system-config.repository.ts rename to server/src/domain/system-config/system-config.repository.ts diff --git a/server/libs/domain/src/system-config/system-config.service.spec.ts b/server/src/domain/system-config/system-config.service.spec.ts similarity index 99% rename from server/libs/domain/src/system-config/system-config.service.spec.ts rename to server/src/domain/system-config/system-config.service.spec.ts index 4038506dd..e18eb296e 100644 --- a/server/libs/domain/src/system-config/system-config.service.spec.ts +++ b/server/src/domain/system-config/system-config.service.spec.ts @@ -1,6 +1,6 @@ import { SystemConfig, SystemConfigEntity, SystemConfigKey, TranscodePreset } from '@app/infra/entities'; import { BadRequestException } from '@nestjs/common'; -import { newJobRepositoryMock, newSystemConfigRepositoryMock, systemConfigStub } from '../../test'; +import { newJobRepositoryMock, newSystemConfigRepositoryMock, systemConfigStub } from '@test'; import { IJobRepository, JobName, QueueName } from '../job'; import { SystemConfigValidator } from './system-config.core'; import { ISystemConfigRepository } from './system-config.repository'; diff --git a/server/libs/domain/src/system-config/system-config.service.ts b/server/src/domain/system-config/system-config.service.ts similarity index 97% rename from server/libs/domain/src/system-config/system-config.service.ts rename to server/src/domain/system-config/system-config.service.ts index 4dc5cd6eb..426f5725f 100644 --- a/server/libs/domain/src/system-config/system-config.service.ts +++ b/server/src/domain/system-config/system-config.service.ts @@ -1,4 +1,4 @@ -import { ISystemConfigRepository } from '../system-config'; +import { ISystemConfigRepository } from '.'; import { supportedDayTokens, supportedHourTokens, diff --git a/server/libs/domain/src/tag/index.ts b/server/src/domain/tag/index.ts similarity index 100% rename from server/libs/domain/src/tag/index.ts rename to server/src/domain/tag/index.ts diff --git a/server/libs/domain/src/tag/tag-response.dto.ts b/server/src/domain/tag/tag-response.dto.ts similarity index 100% rename from server/libs/domain/src/tag/tag-response.dto.ts rename to server/src/domain/tag/tag-response.dto.ts diff --git a/server/libs/domain/src/tag/tag.dto.ts b/server/src/domain/tag/tag.dto.ts similarity index 100% rename from server/libs/domain/src/tag/tag.dto.ts rename to server/src/domain/tag/tag.dto.ts diff --git a/server/libs/domain/src/tag/tag.repository.ts b/server/src/domain/tag/tag.repository.ts similarity index 100% rename from server/libs/domain/src/tag/tag.repository.ts rename to server/src/domain/tag/tag.repository.ts diff --git a/server/libs/domain/src/tag/tag.service.spec.ts b/server/src/domain/tag/tag.service.spec.ts similarity index 99% rename from server/libs/domain/src/tag/tag.service.spec.ts rename to server/src/domain/tag/tag.service.spec.ts index 62c145080..8bed512d2 100644 --- a/server/libs/domain/src/tag/tag.service.spec.ts +++ b/server/src/domain/tag/tag.service.spec.ts @@ -1,7 +1,7 @@ import { TagType } from '@app/infra/entities'; import { BadRequestException } from '@nestjs/common'; import { when } from 'jest-when'; -import { assetEntityStub, authStub, newTagRepositoryMock, tagResponseStub, tagStub } from '../../test'; +import { assetEntityStub, authStub, newTagRepositoryMock, tagResponseStub, tagStub } from '@test'; import { AssetIdErrorReason } from '../asset'; import { ITagRepository } from './tag.repository'; import { TagService } from './tag.service'; diff --git a/server/libs/domain/src/tag/tag.service.ts b/server/src/domain/tag/tag.service.ts similarity index 100% rename from server/libs/domain/src/tag/tag.service.ts rename to server/src/domain/tag/tag.service.ts diff --git a/server/libs/domain/src/user-token/index.ts b/server/src/domain/user-token/index.ts similarity index 100% rename from server/libs/domain/src/user-token/index.ts rename to server/src/domain/user-token/index.ts diff --git a/server/libs/domain/src/user-token/user-token.core.ts b/server/src/domain/user-token/user-token.core.ts similarity index 100% rename from server/libs/domain/src/user-token/user-token.core.ts rename to server/src/domain/user-token/user-token.core.ts diff --git a/server/libs/domain/src/user-token/user-token.repository.ts b/server/src/domain/user-token/user-token.repository.ts similarity index 100% rename from server/libs/domain/src/user-token/user-token.repository.ts rename to server/src/domain/user-token/user-token.repository.ts diff --git a/server/libs/domain/src/user/dto/create-profile-image.dto.ts b/server/src/domain/user/dto/create-profile-image.dto.ts similarity index 100% rename from server/libs/domain/src/user/dto/create-profile-image.dto.ts rename to server/src/domain/user/dto/create-profile-image.dto.ts diff --git a/server/libs/domain/src/user/dto/create-user.dto.spec.ts b/server/src/domain/user/dto/create-user.dto.spec.ts similarity index 100% rename from server/libs/domain/src/user/dto/create-user.dto.spec.ts rename to server/src/domain/user/dto/create-user.dto.spec.ts diff --git a/server/libs/domain/src/user/dto/create-user.dto.ts b/server/src/domain/user/dto/create-user.dto.ts similarity index 90% rename from server/libs/domain/src/user/dto/create-user.dto.ts rename to server/src/domain/user/dto/create-user.dto.ts index a99811b04..4fea6eddc 100644 --- a/server/libs/domain/src/user/dto/create-user.dto.ts +++ b/server/src/domain/user/dto/create-user.dto.ts @@ -1,6 +1,6 @@ import { Transform } from 'class-transformer'; import { IsEmail, IsNotEmpty, IsOptional, IsString } from 'class-validator'; -import { toEmail, toSanitized } from '../../../../../apps/immich/src/utils/transform.util'; +import { toEmail, toSanitized } from '@app/immich/utils/transform.util'; export class CreateUserDto { @IsEmail() diff --git a/server/libs/domain/src/user/dto/index.ts b/server/src/domain/user/dto/index.ts similarity index 100% rename from server/libs/domain/src/user/dto/index.ts rename to server/src/domain/user/dto/index.ts diff --git a/server/libs/domain/src/user/dto/update-user.dto.ts b/server/src/domain/user/dto/update-user.dto.ts similarity index 89% rename from server/libs/domain/src/user/dto/update-user.dto.ts rename to server/src/domain/user/dto/update-user.dto.ts index db8ecba7f..0c23ad7d3 100644 --- a/server/libs/domain/src/user/dto/update-user.dto.ts +++ b/server/src/domain/user/dto/update-user.dto.ts @@ -1,7 +1,7 @@ import { ApiProperty } from '@nestjs/swagger'; import { Transform } from 'class-transformer'; import { IsBoolean, IsEmail, IsNotEmpty, IsOptional, IsString, IsUUID } from 'class-validator'; -import { toEmail, toSanitized } from '../../../../../apps/immich/src/utils/transform.util'; +import { toEmail, toSanitized } from '@app/immich/utils/transform.util'; export class UpdateUserDto { @IsOptional() diff --git a/server/libs/domain/src/user/dto/user-count.dto.ts b/server/src/domain/user/dto/user-count.dto.ts similarity index 100% rename from server/libs/domain/src/user/dto/user-count.dto.ts rename to server/src/domain/user/dto/user-count.dto.ts diff --git a/server/libs/domain/src/user/dto/user-id.dto.ts b/server/src/domain/user/dto/user-id.dto.ts similarity index 100% rename from server/libs/domain/src/user/dto/user-id.dto.ts rename to server/src/domain/user/dto/user-id.dto.ts diff --git a/server/libs/domain/src/user/index.ts b/server/src/domain/user/index.ts similarity index 100% rename from server/libs/domain/src/user/index.ts rename to server/src/domain/user/index.ts diff --git a/server/libs/domain/src/user/response-dto/create-profile-image-response.dto.ts b/server/src/domain/user/response-dto/create-profile-image-response.dto.ts similarity index 100% rename from server/libs/domain/src/user/response-dto/create-profile-image-response.dto.ts rename to server/src/domain/user/response-dto/create-profile-image-response.dto.ts diff --git a/server/libs/domain/src/user/response-dto/index.ts b/server/src/domain/user/response-dto/index.ts similarity index 100% rename from server/libs/domain/src/user/response-dto/index.ts rename to server/src/domain/user/response-dto/index.ts diff --git a/server/libs/domain/src/user/response-dto/user-count-response.dto.ts b/server/src/domain/user/response-dto/user-count-response.dto.ts similarity index 100% rename from server/libs/domain/src/user/response-dto/user-count-response.dto.ts rename to server/src/domain/user/response-dto/user-count-response.dto.ts diff --git a/server/libs/domain/src/user/response-dto/user-response.dto.ts b/server/src/domain/user/response-dto/user-response.dto.ts similarity index 100% rename from server/libs/domain/src/user/response-dto/user-response.dto.ts rename to server/src/domain/user/response-dto/user-response.dto.ts diff --git a/server/libs/domain/src/user/user.core.ts b/server/src/domain/user/user.core.ts similarity index 100% rename from server/libs/domain/src/user/user.core.ts rename to server/src/domain/user/user.core.ts diff --git a/server/libs/domain/src/user/user.repository.ts b/server/src/domain/user/user.repository.ts similarity index 100% rename from server/libs/domain/src/user/user.repository.ts rename to server/src/domain/user/user.repository.ts diff --git a/server/libs/domain/src/user/user.service.spec.ts b/server/src/domain/user/user.service.spec.ts similarity index 99% rename from server/libs/domain/src/user/user.service.spec.ts rename to server/src/domain/user/user.service.spec.ts index 1fbe5cccb..518873286 100644 --- a/server/libs/domain/src/user/user.service.spec.ts +++ b/server/src/domain/user/user.service.spec.ts @@ -8,7 +8,7 @@ import { newJobRepositoryMock, newStorageRepositoryMock, newUserRepositoryMock, -} from '../../test'; +} from '@test'; import { IAlbumRepository } from '../album'; import { IAssetRepository } from '../asset'; import { AuthUserDto } from '../auth'; diff --git a/server/libs/domain/src/user/user.service.ts b/server/src/domain/user/user.service.ts similarity index 99% rename from server/libs/domain/src/user/user.service.ts rename to server/src/domain/user/user.service.ts index f8c852de6..dfc818204 100644 --- a/server/libs/domain/src/user/user.service.ts +++ b/server/src/domain/user/user.service.ts @@ -9,7 +9,7 @@ import { ICryptoRepository } from '../crypto/crypto.repository'; import { IEntityJob, IJobRepository, JobName } from '../job'; import { StorageCore, StorageFolder } from '../storage'; import { IStorageRepository } from '../storage/storage.repository'; -import { IUserRepository } from '../user/user.repository'; +import { IUserRepository } from './user.repository'; import { CreateUserDto, UpdateUserDto, UserCountDto } from './dto'; import { CreateProfileImageResponseDto, diff --git a/server/apps/immich/src/api-v1/album/album-repository.ts b/server/src/immich/api-v1/album/album-repository.ts similarity index 100% rename from server/apps/immich/src/api-v1/album/album-repository.ts rename to server/src/immich/api-v1/album/album-repository.ts diff --git a/server/apps/immich/src/api-v1/album/album.controller.ts b/server/src/immich/api-v1/album/album.controller.ts similarity index 100% rename from server/apps/immich/src/api-v1/album/album.controller.ts rename to server/src/immich/api-v1/album/album.controller.ts diff --git a/server/apps/immich/src/api-v1/album/album.module.ts b/server/src/immich/api-v1/album/album.module.ts similarity index 100% rename from server/apps/immich/src/api-v1/album/album.module.ts rename to server/src/immich/api-v1/album/album.module.ts diff --git a/server/apps/immich/src/api-v1/album/album.service.spec.ts b/server/src/immich/api-v1/album/album.service.spec.ts similarity index 99% rename from server/apps/immich/src/api-v1/album/album.service.spec.ts rename to server/src/immich/api-v1/album/album.service.spec.ts index d621e6035..c864d767a 100644 --- a/server/apps/immich/src/api-v1/album/album.service.spec.ts +++ b/server/src/immich/api-v1/album/album.service.spec.ts @@ -7,7 +7,7 @@ import { AddAssetsResponseDto } from './response-dto/add-assets-response.dto'; import { IAlbumRepository } from './album-repository'; import { DownloadService } from '../../modules/download/download.service'; import { ISharedLinkRepository } from '@app/domain'; -import { newCryptoRepositoryMock, newSharedLinkRepositoryMock, userEntityStub } from '@app/domain/../test'; +import { newCryptoRepositoryMock, newSharedLinkRepositoryMock, userEntityStub } from '@test'; describe('Album service', () => { let sut: AlbumService; diff --git a/server/apps/immich/src/api-v1/album/album.service.ts b/server/src/immich/api-v1/album/album.service.ts similarity index 100% rename from server/apps/immich/src/api-v1/album/album.service.ts rename to server/src/immich/api-v1/album/album.service.ts diff --git a/server/apps/immich/src/api-v1/album/dto/add-assets.dto.ts b/server/src/immich/api-v1/album/dto/add-assets.dto.ts similarity index 50% rename from server/apps/immich/src/api-v1/album/dto/add-assets.dto.ts rename to server/src/immich/api-v1/album/dto/add-assets.dto.ts index bf0d53135..f5c13d677 100644 --- a/server/apps/immich/src/api-v1/album/dto/add-assets.dto.ts +++ b/server/src/immich/api-v1/album/dto/add-assets.dto.ts @@ -1,4 +1,4 @@ -import { ValidateUUID } from 'apps/immich/src/decorators/validate-uuid.decorator'; +import { ValidateUUID } from '@app/immich/decorators/validate-uuid.decorator'; export class AddAssetsDto { @ValidateUUID({ each: true }) diff --git a/server/src/immich/api-v1/album/dto/add-users.dto.ts b/server/src/immich/api-v1/album/dto/add-users.dto.ts new file mode 100644 index 000000000..921dac7ef --- /dev/null +++ b/server/src/immich/api-v1/album/dto/add-users.dto.ts @@ -0,0 +1,6 @@ +import { ValidateUUID } from '@app/immich/decorators/validate-uuid.decorator'; + +export class AddUsersDto { + @ValidateUUID({ each: true }) + sharedUserIds!: string[]; +} diff --git a/server/apps/immich/src/api-v1/album/dto/create-album-shared-link.dto.ts b/server/src/immich/api-v1/album/dto/create-album-shared-link.dto.ts similarity index 88% rename from server/apps/immich/src/api-v1/album/dto/create-album-shared-link.dto.ts rename to server/src/immich/api-v1/album/dto/create-album-shared-link.dto.ts index bda843981..284b6f741 100644 --- a/server/apps/immich/src/api-v1/album/dto/create-album-shared-link.dto.ts +++ b/server/src/immich/api-v1/album/dto/create-album-shared-link.dto.ts @@ -1,5 +1,5 @@ import { ApiProperty } from '@nestjs/swagger'; -import { ValidateUUID } from 'apps/immich/src/decorators/validate-uuid.decorator'; +import { ValidateUUID } from '@app/immich/decorators/validate-uuid.decorator'; import { Type } from 'class-transformer'; import { IsBoolean, IsDate, IsOptional, IsString } from 'class-validator'; diff --git a/server/apps/immich/src/api-v1/album/dto/remove-assets.dto.ts b/server/src/immich/api-v1/album/dto/remove-assets.dto.ts similarity index 51% rename from server/apps/immich/src/api-v1/album/dto/remove-assets.dto.ts rename to server/src/immich/api-v1/album/dto/remove-assets.dto.ts index d1b2651ec..2782154bb 100644 --- a/server/apps/immich/src/api-v1/album/dto/remove-assets.dto.ts +++ b/server/src/immich/api-v1/album/dto/remove-assets.dto.ts @@ -1,4 +1,4 @@ -import { ValidateUUID } from 'apps/immich/src/decorators/validate-uuid.decorator'; +import { ValidateUUID } from '@app/immich/decorators/validate-uuid.decorator'; export class RemoveAssetsDto { @ValidateUUID({ each: true }) diff --git a/server/apps/immich/src/api-v1/album/response-dto/add-assets-response.dto.ts b/server/src/immich/api-v1/album/response-dto/add-assets-response.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/album/response-dto/add-assets-response.dto.ts rename to server/src/immich/api-v1/album/response-dto/add-assets-response.dto.ts diff --git a/server/apps/immich/src/api-v1/album/response-dto/album-count-response.dto.ts b/server/src/immich/api-v1/album/response-dto/album-count-response.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/album/response-dto/album-count-response.dto.ts rename to server/src/immich/api-v1/album/response-dto/album-count-response.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/asset-repository.ts b/server/src/immich/api-v1/asset/asset-repository.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/asset-repository.ts rename to server/src/immich/api-v1/asset/asset-repository.ts diff --git a/server/apps/immich/src/api-v1/asset/asset.controller.ts b/server/src/immich/api-v1/asset/asset.controller.ts similarity index 99% rename from server/apps/immich/src/api-v1/asset/asset.controller.ts rename to server/src/immich/api-v1/asset/asset.controller.ts index 5fc837e68..b678086af 100644 --- a/server/apps/immich/src/api-v1/asset/asset.controller.ts +++ b/server/src/immich/api-v1/asset/asset.controller.ts @@ -1,4 +1,4 @@ -import { AddAssetsDto } from './../album/dto/add-assets.dto'; +import { AddAssetsDto } from '../album/dto/add-assets.dto'; import { Controller, Post, diff --git a/server/apps/immich/src/api-v1/asset/asset.core.ts b/server/src/immich/api-v1/asset/asset.core.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/asset.core.ts rename to server/src/immich/api-v1/asset/asset.core.ts diff --git a/server/apps/immich/src/api-v1/asset/asset.module.ts b/server/src/immich/api-v1/asset/asset.module.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/asset.module.ts rename to server/src/immich/api-v1/asset/asset.module.ts diff --git a/server/apps/immich/src/api-v1/asset/asset.service.spec.ts b/server/src/immich/api-v1/asset/asset.service.spec.ts similarity index 99% rename from server/apps/immich/src/api-v1/asset/asset.service.spec.ts rename to server/src/immich/api-v1/asset/asset.service.spec.ts index b9210d699..f49eb1c92 100644 --- a/server/apps/immich/src/api-v1/asset/asset.service.spec.ts +++ b/server/src/immich/api-v1/asset/asset.service.spec.ts @@ -27,7 +27,7 @@ import { newStorageRepositoryMock, sharedLinkResponseStub, sharedLinkStub, -} from '@app/domain/../test'; +} from '@test'; import { CreateAssetsShareLinkDto } from './dto/create-asset-shared-link.dto'; import { BadRequestException } from '@nestjs/common'; import { when } from 'jest-when'; diff --git a/server/apps/immich/src/api-v1/asset/asset.service.ts b/server/src/immich/api-v1/asset/asset.service.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/asset.service.ts rename to server/src/immich/api-v1/asset/asset.service.ts diff --git a/server/apps/immich/src/api-v1/asset/dto/asset-check.dto.ts b/server/src/immich/api-v1/asset/dto/asset-check.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/dto/asset-check.dto.ts rename to server/src/immich/api-v1/asset/dto/asset-check.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/dto/asset-search.dto.ts b/server/src/immich/api-v1/asset/dto/asset-search.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/dto/asset-search.dto.ts rename to server/src/immich/api-v1/asset/dto/asset-search.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/dto/check-duplicate-asset.dto.ts b/server/src/immich/api-v1/asset/dto/check-duplicate-asset.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/dto/check-duplicate-asset.dto.ts rename to server/src/immich/api-v1/asset/dto/check-duplicate-asset.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/dto/check-existing-assets.dto.spec.ts b/server/src/immich/api-v1/asset/dto/check-existing-assets.dto.spec.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/dto/check-existing-assets.dto.spec.ts rename to server/src/immich/api-v1/asset/dto/check-existing-assets.dto.spec.ts diff --git a/server/apps/immich/src/api-v1/asset/dto/check-existing-assets.dto.ts b/server/src/immich/api-v1/asset/dto/check-existing-assets.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/dto/check-existing-assets.dto.ts rename to server/src/immich/api-v1/asset/dto/check-existing-assets.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/dto/create-asset-shared-link.dto.ts b/server/src/immich/api-v1/asset/dto/create-asset-shared-link.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/dto/create-asset-shared-link.dto.ts rename to server/src/immich/api-v1/asset/dto/create-asset-shared-link.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/dto/create-asset.dto.ts b/server/src/immich/api-v1/asset/dto/create-asset.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/dto/create-asset.dto.ts rename to server/src/immich/api-v1/asset/dto/create-asset.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/dto/create-exif.dto.ts b/server/src/immich/api-v1/asset/dto/create-exif.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/dto/create-exif.dto.ts rename to server/src/immich/api-v1/asset/dto/create-exif.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/dto/delete-asset.dto.ts b/server/src/immich/api-v1/asset/dto/delete-asset.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/dto/delete-asset.dto.ts rename to server/src/immich/api-v1/asset/dto/delete-asset.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/dto/device-id.dto.ts b/server/src/immich/api-v1/asset/dto/device-id.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/dto/device-id.dto.ts rename to server/src/immich/api-v1/asset/dto/device-id.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/dto/download-files.dto.ts b/server/src/immich/api-v1/asset/dto/download-files.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/dto/download-files.dto.ts rename to server/src/immich/api-v1/asset/dto/download-files.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/dto/download-library.dto.ts b/server/src/immich/api-v1/asset/dto/download-library.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/dto/download-library.dto.ts rename to server/src/immich/api-v1/asset/dto/download-library.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/dto/get-asset-by-time-bucket.dto.ts b/server/src/immich/api-v1/asset/dto/get-asset-by-time-bucket.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/dto/get-asset-by-time-bucket.dto.ts rename to server/src/immich/api-v1/asset/dto/get-asset-by-time-bucket.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/dto/get-asset-count-by-time-bucket.dto.ts b/server/src/immich/api-v1/asset/dto/get-asset-count-by-time-bucket.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/dto/get-asset-count-by-time-bucket.dto.ts rename to server/src/immich/api-v1/asset/dto/get-asset-count-by-time-bucket.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/dto/get-asset-thumbnail.dto.ts b/server/src/immich/api-v1/asset/dto/get-asset-thumbnail.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/dto/get-asset-thumbnail.dto.ts rename to server/src/immich/api-v1/asset/dto/get-asset-thumbnail.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/dto/search-asset.dto.ts b/server/src/immich/api-v1/asset/dto/search-asset.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/dto/search-asset.dto.ts rename to server/src/immich/api-v1/asset/dto/search-asset.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/dto/search-properties.dto.ts b/server/src/immich/api-v1/asset/dto/search-properties.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/dto/search-properties.dto.ts rename to server/src/immich/api-v1/asset/dto/search-properties.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/dto/serve-file.dto.ts b/server/src/immich/api-v1/asset/dto/serve-file.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/dto/serve-file.dto.ts rename to server/src/immich/api-v1/asset/dto/serve-file.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/dto/update-asset.dto.ts b/server/src/immich/api-v1/asset/dto/update-asset.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/dto/update-asset.dto.ts rename to server/src/immich/api-v1/asset/dto/update-asset.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/response-dto/asset-check-response.dto.ts b/server/src/immich/api-v1/asset/response-dto/asset-check-response.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/response-dto/asset-check-response.dto.ts rename to server/src/immich/api-v1/asset/response-dto/asset-check-response.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/response-dto/asset-count-by-time-group-response.dto.ts b/server/src/immich/api-v1/asset/response-dto/asset-count-by-time-group-response.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/response-dto/asset-count-by-time-group-response.dto.ts rename to server/src/immich/api-v1/asset/response-dto/asset-count-by-time-group-response.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/response-dto/asset-count-by-user-id-response.dto.ts b/server/src/immich/api-v1/asset/response-dto/asset-count-by-user-id-response.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/response-dto/asset-count-by-user-id-response.dto.ts rename to server/src/immich/api-v1/asset/response-dto/asset-count-by-user-id-response.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/response-dto/asset-file-upload-response.dto.ts b/server/src/immich/api-v1/asset/response-dto/asset-file-upload-response.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/response-dto/asset-file-upload-response.dto.ts rename to server/src/immich/api-v1/asset/response-dto/asset-file-upload-response.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/response-dto/check-duplicate-asset-response.dto.ts b/server/src/immich/api-v1/asset/response-dto/check-duplicate-asset-response.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/response-dto/check-duplicate-asset-response.dto.ts rename to server/src/immich/api-v1/asset/response-dto/check-duplicate-asset-response.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/response-dto/check-existing-assets-response.dto.ts b/server/src/immich/api-v1/asset/response-dto/check-existing-assets-response.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/response-dto/check-existing-assets-response.dto.ts rename to server/src/immich/api-v1/asset/response-dto/check-existing-assets-response.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/response-dto/curated-locations-response.dto.ts b/server/src/immich/api-v1/asset/response-dto/curated-locations-response.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/response-dto/curated-locations-response.dto.ts rename to server/src/immich/api-v1/asset/response-dto/curated-locations-response.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/response-dto/curated-objects-response.dto.ts b/server/src/immich/api-v1/asset/response-dto/curated-objects-response.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/response-dto/curated-objects-response.dto.ts rename to server/src/immich/api-v1/asset/response-dto/curated-objects-response.dto.ts diff --git a/server/apps/immich/src/api-v1/asset/response-dto/delete-asset-response.dto.ts b/server/src/immich/api-v1/asset/response-dto/delete-asset-response.dto.ts similarity index 100% rename from server/apps/immich/src/api-v1/asset/response-dto/delete-asset-response.dto.ts rename to server/src/immich/api-v1/asset/response-dto/delete-asset-response.dto.ts diff --git a/server/apps/immich/src/api-v1/validation/file-not-empty-validator.ts b/server/src/immich/api-v1/validation/file-not-empty-validator.ts similarity index 100% rename from server/apps/immich/src/api-v1/validation/file-not-empty-validator.ts rename to server/src/immich/api-v1/validation/file-not-empty-validator.ts diff --git a/server/apps/immich/src/api-v1/validation/parse-me-uuid-pipe.ts b/server/src/immich/api-v1/validation/parse-me-uuid-pipe.ts similarity index 100% rename from server/apps/immich/src/api-v1/validation/parse-me-uuid-pipe.ts rename to server/src/immich/api-v1/validation/parse-me-uuid-pipe.ts diff --git a/server/apps/immich/src/app.module.ts b/server/src/immich/app.module.ts similarity index 100% rename from server/apps/immich/src/app.module.ts rename to server/src/immich/app.module.ts diff --git a/server/apps/immich/src/app.service.ts b/server/src/immich/app.service.ts similarity index 100% rename from server/apps/immich/src/app.service.ts rename to server/src/immich/app.service.ts diff --git a/server/apps/immich/src/app.utils.ts b/server/src/immich/app.utils.ts similarity index 100% rename from server/apps/immich/src/app.utils.ts rename to server/src/immich/app.utils.ts diff --git a/server/apps/immich/src/config/asset-upload.config.spec.ts b/server/src/immich/config/asset-upload.config.spec.ts similarity index 100% rename from server/apps/immich/src/config/asset-upload.config.spec.ts rename to server/src/immich/config/asset-upload.config.spec.ts diff --git a/server/apps/immich/src/config/asset-upload.config.ts b/server/src/immich/config/asset-upload.config.ts similarity index 100% rename from server/apps/immich/src/config/asset-upload.config.ts rename to server/src/immich/config/asset-upload.config.ts diff --git a/server/apps/immich/src/config/profile-image-upload.config.spec.ts b/server/src/immich/config/profile-image-upload.config.spec.ts similarity index 100% rename from server/apps/immich/src/config/profile-image-upload.config.spec.ts rename to server/src/immich/config/profile-image-upload.config.spec.ts diff --git a/server/apps/immich/src/config/profile-image-upload.config.ts b/server/src/immich/config/profile-image-upload.config.ts similarity index 100% rename from server/apps/immich/src/config/profile-image-upload.config.ts rename to server/src/immich/config/profile-image-upload.config.ts diff --git a/server/apps/immich/src/controllers/album.controller.ts b/server/src/immich/controllers/album.controller.ts similarity index 100% rename from server/apps/immich/src/controllers/album.controller.ts rename to server/src/immich/controllers/album.controller.ts diff --git a/server/apps/immich/src/controllers/api-key.controller.ts b/server/src/immich/controllers/api-key.controller.ts similarity index 100% rename from server/apps/immich/src/controllers/api-key.controller.ts rename to server/src/immich/controllers/api-key.controller.ts diff --git a/server/apps/immich/src/controllers/app.controller.ts b/server/src/immich/controllers/app.controller.ts similarity index 100% rename from server/apps/immich/src/controllers/app.controller.ts rename to server/src/immich/controllers/app.controller.ts diff --git a/server/apps/immich/src/controllers/asset.controller.ts b/server/src/immich/controllers/asset.controller.ts similarity index 100% rename from server/apps/immich/src/controllers/asset.controller.ts rename to server/src/immich/controllers/asset.controller.ts diff --git a/server/apps/immich/src/controllers/auth.controller.ts b/server/src/immich/controllers/auth.controller.ts similarity index 100% rename from server/apps/immich/src/controllers/auth.controller.ts rename to server/src/immich/controllers/auth.controller.ts diff --git a/server/apps/immich/src/controllers/dto/uuid-param.dto.ts b/server/src/immich/controllers/dto/uuid-param.dto.ts similarity index 100% rename from server/apps/immich/src/controllers/dto/uuid-param.dto.ts rename to server/src/immich/controllers/dto/uuid-param.dto.ts diff --git a/server/apps/immich/src/controllers/index.ts b/server/src/immich/controllers/index.ts similarity index 100% rename from server/apps/immich/src/controllers/index.ts rename to server/src/immich/controllers/index.ts diff --git a/server/apps/immich/src/controllers/job.controller.ts b/server/src/immich/controllers/job.controller.ts similarity index 100% rename from server/apps/immich/src/controllers/job.controller.ts rename to server/src/immich/controllers/job.controller.ts diff --git a/server/apps/immich/src/controllers/oauth.controller.ts b/server/src/immich/controllers/oauth.controller.ts similarity index 100% rename from server/apps/immich/src/controllers/oauth.controller.ts rename to server/src/immich/controllers/oauth.controller.ts diff --git a/server/apps/immich/src/controllers/partner.controller.ts b/server/src/immich/controllers/partner.controller.ts similarity index 100% rename from server/apps/immich/src/controllers/partner.controller.ts rename to server/src/immich/controllers/partner.controller.ts diff --git a/server/apps/immich/src/controllers/person.controller.ts b/server/src/immich/controllers/person.controller.ts similarity index 100% rename from server/apps/immich/src/controllers/person.controller.ts rename to server/src/immich/controllers/person.controller.ts diff --git a/server/apps/immich/src/controllers/search.controller.ts b/server/src/immich/controllers/search.controller.ts similarity index 100% rename from server/apps/immich/src/controllers/search.controller.ts rename to server/src/immich/controllers/search.controller.ts diff --git a/server/apps/immich/src/controllers/server-info.controller.ts b/server/src/immich/controllers/server-info.controller.ts similarity index 100% rename from server/apps/immich/src/controllers/server-info.controller.ts rename to server/src/immich/controllers/server-info.controller.ts diff --git a/server/apps/immich/src/controllers/shared-link.controller.ts b/server/src/immich/controllers/shared-link.controller.ts similarity index 100% rename from server/apps/immich/src/controllers/shared-link.controller.ts rename to server/src/immich/controllers/shared-link.controller.ts diff --git a/server/apps/immich/src/controllers/system-config.controller.ts b/server/src/immich/controllers/system-config.controller.ts similarity index 100% rename from server/apps/immich/src/controllers/system-config.controller.ts rename to server/src/immich/controllers/system-config.controller.ts diff --git a/server/apps/immich/src/controllers/tag.controller.ts b/server/src/immich/controllers/tag.controller.ts similarity index 100% rename from server/apps/immich/src/controllers/tag.controller.ts rename to server/src/immich/controllers/tag.controller.ts diff --git a/server/apps/immich/src/controllers/user.controller.ts b/server/src/immich/controllers/user.controller.ts similarity index 100% rename from server/apps/immich/src/controllers/user.controller.ts rename to server/src/immich/controllers/user.controller.ts diff --git a/server/apps/immich/src/decorators/auth-user.decorator.ts b/server/src/immich/decorators/auth-user.decorator.ts similarity index 100% rename from server/apps/immich/src/decorators/auth-user.decorator.ts rename to server/src/immich/decorators/auth-user.decorator.ts diff --git a/server/apps/immich/src/decorators/authenticated.decorator.ts b/server/src/immich/decorators/authenticated.decorator.ts similarity index 100% rename from server/apps/immich/src/decorators/authenticated.decorator.ts rename to server/src/immich/decorators/authenticated.decorator.ts diff --git a/server/apps/immich/src/decorators/use-validation.decorator.ts b/server/src/immich/decorators/use-validation.decorator.ts similarity index 100% rename from server/apps/immich/src/decorators/use-validation.decorator.ts rename to server/src/immich/decorators/use-validation.decorator.ts diff --git a/server/apps/immich/src/decorators/validate-uuid.decorator.ts b/server/src/immich/decorators/validate-uuid.decorator.ts similarity index 100% rename from server/apps/immich/src/decorators/validate-uuid.decorator.ts rename to server/src/immich/decorators/validate-uuid.decorator.ts diff --git a/server/apps/immich/src/main.ts b/server/src/immich/main.ts similarity index 96% rename from server/apps/immich/src/main.ts rename to server/src/immich/main.ts index 015e51b76..80bd976dd 100644 --- a/server/apps/immich/src/main.ts +++ b/server/src/immich/main.ts @@ -14,7 +14,7 @@ const envName = (process.env.NODE_ENV || 'development').toUpperCase(); const port = Number(process.env.SERVER_PORT) || 3001; const isDev = process.env.NODE_ENV === 'development'; -async function bootstrap() { +export async function bootstrap() { const app = await NestFactory.create(AppModule, { logger: getLogLevels() }); app.set('trust proxy', ['loopback', 'linklocal', 'uniquelocal']); @@ -32,4 +32,3 @@ async function bootstrap() { logger.log(`Immich Server is listening on ${port} [v${SERVER_VERSION}] [${envName}] `); } -bootstrap(); diff --git a/server/apps/immich/src/middlewares/auth.guard.ts b/server/src/immich/middlewares/auth.guard.ts similarity index 100% rename from server/apps/immich/src/middlewares/auth.guard.ts rename to server/src/immich/middlewares/auth.guard.ts diff --git a/server/apps/immich/src/modules/download/download.module.ts b/server/src/immich/modules/download/download.module.ts similarity index 100% rename from server/apps/immich/src/modules/download/download.module.ts rename to server/src/immich/modules/download/download.module.ts diff --git a/server/apps/immich/src/modules/download/download.service.ts b/server/src/immich/modules/download/download.service.ts similarity index 100% rename from server/apps/immich/src/modules/download/download.service.ts rename to server/src/immich/modules/download/download.service.ts diff --git a/server/apps/immich/src/utils/path-form-data.util.ts b/server/src/immich/utils/path-form-data.util.ts similarity index 100% rename from server/apps/immich/src/utils/path-form-data.util.ts rename to server/src/immich/utils/path-form-data.util.ts diff --git a/server/apps/immich/src/utils/transform.util.ts b/server/src/immich/utils/transform.util.ts similarity index 100% rename from server/apps/immich/src/utils/transform.util.ts rename to server/src/immich/utils/transform.util.ts diff --git a/server/libs/infra/src/communication.gateway.ts b/server/src/infra/communication.gateway.ts similarity index 100% rename from server/libs/infra/src/communication.gateway.ts rename to server/src/infra/communication.gateway.ts diff --git a/server/libs/infra/src/database.config.ts b/server/src/infra/database.config.ts similarity index 100% rename from server/libs/infra/src/database.config.ts rename to server/src/infra/database.config.ts diff --git a/server/libs/infra/src/entities/album.entity.ts b/server/src/infra/entities/album.entity.ts similarity index 100% rename from server/libs/infra/src/entities/album.entity.ts rename to server/src/infra/entities/album.entity.ts diff --git a/server/libs/infra/src/entities/api-key.entity.ts b/server/src/infra/entities/api-key.entity.ts similarity index 100% rename from server/libs/infra/src/entities/api-key.entity.ts rename to server/src/infra/entities/api-key.entity.ts diff --git a/server/libs/infra/src/entities/asset-face.entity.ts b/server/src/infra/entities/asset-face.entity.ts similarity index 100% rename from server/libs/infra/src/entities/asset-face.entity.ts rename to server/src/infra/entities/asset-face.entity.ts diff --git a/server/libs/infra/src/entities/asset.entity.ts b/server/src/infra/entities/asset.entity.ts similarity index 100% rename from server/libs/infra/src/entities/asset.entity.ts rename to server/src/infra/entities/asset.entity.ts diff --git a/server/libs/infra/src/entities/exif.entity.ts b/server/src/infra/entities/exif.entity.ts similarity index 100% rename from server/libs/infra/src/entities/exif.entity.ts rename to server/src/infra/entities/exif.entity.ts diff --git a/server/libs/infra/src/entities/index.ts b/server/src/infra/entities/index.ts similarity index 100% rename from server/libs/infra/src/entities/index.ts rename to server/src/infra/entities/index.ts diff --git a/server/libs/infra/src/entities/partner.entity.ts b/server/src/infra/entities/partner.entity.ts similarity index 100% rename from server/libs/infra/src/entities/partner.entity.ts rename to server/src/infra/entities/partner.entity.ts diff --git a/server/libs/infra/src/entities/person.entity.ts b/server/src/infra/entities/person.entity.ts similarity index 100% rename from server/libs/infra/src/entities/person.entity.ts rename to server/src/infra/entities/person.entity.ts diff --git a/server/libs/infra/src/entities/shared-link.entity.ts b/server/src/infra/entities/shared-link.entity.ts similarity index 100% rename from server/libs/infra/src/entities/shared-link.entity.ts rename to server/src/infra/entities/shared-link.entity.ts diff --git a/server/libs/infra/src/entities/smart-info.entity.ts b/server/src/infra/entities/smart-info.entity.ts similarity index 100% rename from server/libs/infra/src/entities/smart-info.entity.ts rename to server/src/infra/entities/smart-info.entity.ts diff --git a/server/libs/infra/src/entities/system-config.entity.ts b/server/src/infra/entities/system-config.entity.ts similarity index 98% rename from server/libs/infra/src/entities/system-config.entity.ts rename to server/src/infra/entities/system-config.entity.ts index 81c7df180..0bcb4cf4e 100644 --- a/server/libs/infra/src/entities/system-config.entity.ts +++ b/server/src/infra/entities/system-config.entity.ts @@ -1,5 +1,5 @@ import { Column, Entity, PrimaryColumn } from 'typeorm'; -import { QueueName } from '../../../domain/src'; +import { QueueName } from '@app/domain/job/job.constants'; @Entity('system_config') export class SystemConfigEntity { diff --git a/server/libs/infra/src/entities/tag.entity.ts b/server/src/infra/entities/tag.entity.ts similarity index 100% rename from server/libs/infra/src/entities/tag.entity.ts rename to server/src/infra/entities/tag.entity.ts diff --git a/server/libs/infra/src/entities/user-token.entity.ts b/server/src/infra/entities/user-token.entity.ts similarity index 100% rename from server/libs/infra/src/entities/user-token.entity.ts rename to server/src/infra/entities/user-token.entity.ts diff --git a/server/libs/infra/src/entities/user.entity.ts b/server/src/infra/entities/user.entity.ts similarity index 100% rename from server/libs/infra/src/entities/user.entity.ts rename to server/src/infra/entities/user.entity.ts diff --git a/server/libs/infra/src/index.ts b/server/src/infra/index.ts similarity index 100% rename from server/libs/infra/src/index.ts rename to server/src/infra/index.ts diff --git a/server/libs/infra/src/infra.config.ts b/server/src/infra/infra.config.ts similarity index 100% rename from server/libs/infra/src/infra.config.ts rename to server/src/infra/infra.config.ts diff --git a/server/libs/infra/src/infra.module.ts b/server/src/infra/infra.module.ts similarity index 100% rename from server/libs/infra/src/infra.module.ts rename to server/src/infra/infra.module.ts diff --git a/server/libs/infra/src/migrations/1645130759468-CreateUserTable.ts b/server/src/infra/migrations/1645130759468-CreateUserTable.ts similarity index 100% rename from server/libs/infra/src/migrations/1645130759468-CreateUserTable.ts rename to server/src/infra/migrations/1645130759468-CreateUserTable.ts diff --git a/server/libs/infra/src/migrations/1645130777674-CreateDeviceInfoTable.ts b/server/src/infra/migrations/1645130777674-CreateDeviceInfoTable.ts similarity index 100% rename from server/libs/infra/src/migrations/1645130777674-CreateDeviceInfoTable.ts rename to server/src/infra/migrations/1645130777674-CreateDeviceInfoTable.ts diff --git a/server/libs/infra/src/migrations/1645130805273-CreateAssetsTable.ts b/server/src/infra/migrations/1645130805273-CreateAssetsTable.ts similarity index 100% rename from server/libs/infra/src/migrations/1645130805273-CreateAssetsTable.ts rename to server/src/infra/migrations/1645130805273-CreateAssetsTable.ts diff --git a/server/libs/infra/src/migrations/1645130817965-CreateExifTable.ts b/server/src/infra/migrations/1645130817965-CreateExifTable.ts similarity index 100% rename from server/libs/infra/src/migrations/1645130817965-CreateExifTable.ts rename to server/src/infra/migrations/1645130817965-CreateExifTable.ts diff --git a/server/libs/infra/src/migrations/1645130870184-CreateSmartInfoTable.ts b/server/src/infra/migrations/1645130870184-CreateSmartInfoTable.ts similarity index 100% rename from server/libs/infra/src/migrations/1645130870184-CreateSmartInfoTable.ts rename to server/src/infra/migrations/1645130870184-CreateSmartInfoTable.ts diff --git a/server/libs/infra/src/migrations/1646249209023-AddExifTextSearchColumn.ts b/server/src/infra/migrations/1646249209023-AddExifTextSearchColumn.ts similarity index 100% rename from server/libs/infra/src/migrations/1646249209023-AddExifTextSearchColumn.ts rename to server/src/infra/migrations/1646249209023-AddExifTextSearchColumn.ts diff --git a/server/libs/infra/src/migrations/1646249734844-CreateExifTextSearchIndex.ts b/server/src/infra/migrations/1646249734844-CreateExifTextSearchIndex.ts similarity index 100% rename from server/libs/infra/src/migrations/1646249734844-CreateExifTextSearchIndex.ts rename to server/src/infra/migrations/1646249734844-CreateExifTextSearchIndex.ts diff --git a/server/libs/infra/src/migrations/1646709533213-AddRegionCityToExIf.ts b/server/src/infra/migrations/1646709533213-AddRegionCityToExIf.ts similarity index 100% rename from server/libs/infra/src/migrations/1646709533213-AddRegionCityToExIf.ts rename to server/src/infra/migrations/1646709533213-AddRegionCityToExIf.ts diff --git a/server/libs/infra/src/migrations/1646710459852-AddLocationToExifTextSearch.ts b/server/src/infra/migrations/1646710459852-AddLocationToExifTextSearch.ts similarity index 100% rename from server/libs/infra/src/migrations/1646710459852-AddLocationToExifTextSearch.ts rename to server/src/infra/migrations/1646710459852-AddLocationToExifTextSearch.ts diff --git a/server/libs/infra/src/migrations/1648317474768-AddObjectColumnToSmartInfo.ts b/server/src/infra/migrations/1648317474768-AddObjectColumnToSmartInfo.ts similarity index 100% rename from server/libs/infra/src/migrations/1648317474768-AddObjectColumnToSmartInfo.ts rename to server/src/infra/migrations/1648317474768-AddObjectColumnToSmartInfo.ts diff --git a/server/libs/infra/src/migrations/1649643216111-CreateSharedAlbumAndRelatedTables.ts b/server/src/infra/migrations/1649643216111-CreateSharedAlbumAndRelatedTables.ts similarity index 100% rename from server/libs/infra/src/migrations/1649643216111-CreateSharedAlbumAndRelatedTables.ts rename to server/src/infra/migrations/1649643216111-CreateSharedAlbumAndRelatedTables.ts diff --git a/server/libs/infra/src/migrations/1652633525943-UpdateUserTableWithAdminAndName.ts b/server/src/infra/migrations/1652633525943-UpdateUserTableWithAdminAndName.ts similarity index 100% rename from server/libs/infra/src/migrations/1652633525943-UpdateUserTableWithAdminAndName.ts rename to server/src/infra/migrations/1652633525943-UpdateUserTableWithAdminAndName.ts diff --git a/server/libs/infra/src/migrations/1653214255670-UpdateAssetTableWithWebpPath.ts b/server/src/infra/migrations/1653214255670-UpdateAssetTableWithWebpPath.ts similarity index 100% rename from server/libs/infra/src/migrations/1653214255670-UpdateAssetTableWithWebpPath.ts rename to server/src/infra/migrations/1653214255670-UpdateAssetTableWithWebpPath.ts diff --git a/server/libs/infra/src/migrations/1654299904583-UpdateAssetTableWithEncodeVideoPath.ts b/server/src/infra/migrations/1654299904583-UpdateAssetTableWithEncodeVideoPath.ts similarity index 100% rename from server/libs/infra/src/migrations/1654299904583-UpdateAssetTableWithEncodeVideoPath.ts rename to server/src/infra/migrations/1654299904583-UpdateAssetTableWithEncodeVideoPath.ts diff --git a/server/libs/infra/src/migrations/1655401127251-RenameSharedAlbums.ts b/server/src/infra/migrations/1655401127251-RenameSharedAlbums.ts similarity index 100% rename from server/libs/infra/src/migrations/1655401127251-RenameSharedAlbums.ts rename to server/src/infra/migrations/1655401127251-RenameSharedAlbums.ts diff --git a/server/libs/infra/src/migrations/1656338626260-RenameIsFirstLoggedInColumn.ts b/server/src/infra/migrations/1656338626260-RenameIsFirstLoggedInColumn.ts similarity index 100% rename from server/libs/infra/src/migrations/1656338626260-RenameIsFirstLoggedInColumn.ts rename to server/src/infra/migrations/1656338626260-RenameIsFirstLoggedInColumn.ts diff --git a/server/libs/infra/src/migrations/1656888591977-RenameAssetAlbumIdSequence.ts b/server/src/infra/migrations/1656888591977-RenameAssetAlbumIdSequence.ts similarity index 100% rename from server/libs/infra/src/migrations/1656888591977-RenameAssetAlbumIdSequence.ts rename to server/src/infra/migrations/1656888591977-RenameAssetAlbumIdSequence.ts diff --git a/server/libs/infra/src/migrations/1656888918620-DropExifTextSearchableColumn.ts b/server/src/infra/migrations/1656888918620-DropExifTextSearchableColumn.ts similarity index 100% rename from server/libs/infra/src/migrations/1656888918620-DropExifTextSearchableColumn.ts rename to server/src/infra/migrations/1656888918620-DropExifTextSearchableColumn.ts diff --git a/server/libs/infra/src/migrations/1656889061566-MatchMigrationsWithTypeORMEntities.ts b/server/src/infra/migrations/1656889061566-MatchMigrationsWithTypeORMEntities.ts similarity index 100% rename from server/libs/infra/src/migrations/1656889061566-MatchMigrationsWithTypeORMEntities.ts rename to server/src/infra/migrations/1656889061566-MatchMigrationsWithTypeORMEntities.ts diff --git a/server/libs/infra/src/migrations/1658860470248-AddExifImageNameAsSearchableText.ts b/server/src/infra/migrations/1658860470248-AddExifImageNameAsSearchableText.ts similarity index 100% rename from server/libs/infra/src/migrations/1658860470248-AddExifImageNameAsSearchableText.ts rename to server/src/infra/migrations/1658860470248-AddExifImageNameAsSearchableText.ts diff --git a/server/libs/infra/src/migrations/1661011331242-AddCaption.ts b/server/src/infra/migrations/1661011331242-AddCaption.ts similarity index 100% rename from server/libs/infra/src/migrations/1661011331242-AddCaption.ts rename to server/src/infra/migrations/1661011331242-AddCaption.ts diff --git a/server/libs/infra/src/migrations/1661528919411-ChangeExifFileSizeInByteToBigInt.ts b/server/src/infra/migrations/1661528919411-ChangeExifFileSizeInByteToBigInt.ts similarity index 100% rename from server/libs/infra/src/migrations/1661528919411-ChangeExifFileSizeInByteToBigInt.ts rename to server/src/infra/migrations/1661528919411-ChangeExifFileSizeInByteToBigInt.ts diff --git a/server/libs/infra/src/migrations/1661881837496-AddAssetChecksum.ts b/server/src/infra/migrations/1661881837496-AddAssetChecksum.ts similarity index 100% rename from server/libs/infra/src/migrations/1661881837496-AddAssetChecksum.ts rename to server/src/infra/migrations/1661881837496-AddAssetChecksum.ts diff --git a/server/libs/infra/src/migrations/1661971370662-UpdateAssetTableWithNewUniqueConstraint.ts b/server/src/infra/migrations/1661971370662-UpdateAssetTableWithNewUniqueConstraint.ts similarity index 100% rename from server/libs/infra/src/migrations/1661971370662-UpdateAssetTableWithNewUniqueConstraint.ts rename to server/src/infra/migrations/1661971370662-UpdateAssetTableWithNewUniqueConstraint.ts diff --git a/server/libs/infra/src/migrations/1662427365521-FixTimestampDataTypeInAssetTable.ts b/server/src/infra/migrations/1662427365521-FixTimestampDataTypeInAssetTable.ts similarity index 100% rename from server/libs/infra/src/migrations/1662427365521-FixTimestampDataTypeInAssetTable.ts rename to server/src/infra/migrations/1662427365521-FixTimestampDataTypeInAssetTable.ts diff --git a/server/libs/infra/src/migrations/1665540663419-CreateSystemConfigTable.ts b/server/src/infra/migrations/1665540663419-CreateSystemConfigTable.ts similarity index 100% rename from server/libs/infra/src/migrations/1665540663419-CreateSystemConfigTable.ts rename to server/src/infra/migrations/1665540663419-CreateSystemConfigTable.ts diff --git a/server/libs/infra/src/migrations/1667762360744-AddingDeletedAtColumnInUserEntity.ts b/server/src/infra/migrations/1667762360744-AddingDeletedAtColumnInUserEntity.ts similarity index 100% rename from server/libs/infra/src/migrations/1667762360744-AddingDeletedAtColumnInUserEntity.ts rename to server/src/infra/migrations/1667762360744-AddingDeletedAtColumnInUserEntity.ts diff --git a/server/libs/infra/src/migrations/1668383120461-AddLivePhotosRelatedColumnToAssetTable.ts b/server/src/infra/migrations/1668383120461-AddLivePhotosRelatedColumnToAssetTable.ts similarity index 100% rename from server/libs/infra/src/migrations/1668383120461-AddLivePhotosRelatedColumnToAssetTable.ts rename to server/src/infra/migrations/1668383120461-AddLivePhotosRelatedColumnToAssetTable.ts diff --git a/server/libs/infra/src/migrations/1668835311083-UpdateUserTableForOIDC.ts b/server/src/infra/migrations/1668835311083-UpdateUserTableForOIDC.ts similarity index 100% rename from server/libs/infra/src/migrations/1668835311083-UpdateUserTableForOIDC.ts rename to server/src/infra/migrations/1668835311083-UpdateUserTableForOIDC.ts diff --git a/server/libs/infra/src/migrations/1670104716264-OAuthId.ts b/server/src/infra/migrations/1670104716264-OAuthId.ts similarity index 100% rename from server/libs/infra/src/migrations/1670104716264-OAuthId.ts rename to server/src/infra/migrations/1670104716264-OAuthId.ts diff --git a/server/libs/infra/src/migrations/1670257571385-CreateTagsTable.ts b/server/src/infra/migrations/1670257571385-CreateTagsTable.ts similarity index 100% rename from server/libs/infra/src/migrations/1670257571385-CreateTagsTable.ts rename to server/src/infra/migrations/1670257571385-CreateTagsTable.ts diff --git a/server/libs/infra/src/migrations/1670607437008-TruncateOldConfigItems.ts b/server/src/infra/migrations/1670607437008-TruncateOldConfigItems.ts similarity index 100% rename from server/libs/infra/src/migrations/1670607437008-TruncateOldConfigItems.ts rename to server/src/infra/migrations/1670607437008-TruncateOldConfigItems.ts diff --git a/server/libs/infra/src/migrations/1670633210032-AddUserEmailUniqueConstraint.ts b/server/src/infra/migrations/1670633210032-AddUserEmailUniqueConstraint.ts similarity index 100% rename from server/libs/infra/src/migrations/1670633210032-AddUserEmailUniqueConstraint.ts rename to server/src/infra/migrations/1670633210032-AddUserEmailUniqueConstraint.ts diff --git a/server/libs/infra/src/migrations/1672109862870-DropSaltColumn.ts b/server/src/infra/migrations/1672109862870-DropSaltColumn.ts similarity index 100% rename from server/libs/infra/src/migrations/1672109862870-DropSaltColumn.ts rename to server/src/infra/migrations/1672109862870-DropSaltColumn.ts diff --git a/server/libs/infra/src/migrations/1672502270115-AddAPIKeys.ts b/server/src/infra/migrations/1672502270115-AddAPIKeys.ts similarity index 100% rename from server/libs/infra/src/migrations/1672502270115-AddAPIKeys.ts rename to server/src/infra/migrations/1672502270115-AddAPIKeys.ts diff --git a/server/libs/infra/src/migrations/1673150490490-AddSharedLinkTable.ts b/server/src/infra/migrations/1673150490490-AddSharedLinkTable.ts similarity index 100% rename from server/libs/infra/src/migrations/1673150490490-AddSharedLinkTable.ts rename to server/src/infra/migrations/1673150490490-AddSharedLinkTable.ts diff --git a/server/libs/infra/src/migrations/1673907194740-AddMorePermissionToSharedLink.ts b/server/src/infra/migrations/1673907194740-AddMorePermissionToSharedLink.ts similarity index 100% rename from server/libs/infra/src/migrations/1673907194740-AddMorePermissionToSharedLink.ts rename to server/src/infra/migrations/1673907194740-AddMorePermissionToSharedLink.ts diff --git a/server/libs/infra/src/migrations/1674263302005-RemoveVideoCodecConfigOption.ts b/server/src/infra/migrations/1674263302005-RemoveVideoCodecConfigOption.ts similarity index 100% rename from server/libs/infra/src/migrations/1674263302005-RemoveVideoCodecConfigOption.ts rename to server/src/infra/migrations/1674263302005-RemoveVideoCodecConfigOption.ts diff --git a/server/libs/infra/src/migrations/1674342044239-CreateUserTokenEntity.ts b/server/src/infra/migrations/1674342044239-CreateUserTokenEntity.ts similarity index 100% rename from server/libs/infra/src/migrations/1674342044239-CreateUserTokenEntity.ts rename to server/src/infra/migrations/1674342044239-CreateUserTokenEntity.ts diff --git a/server/libs/infra/src/migrations/1674757936889-AlterExifExposureTimeToString.ts b/server/src/infra/migrations/1674757936889-AlterExifExposureTimeToString.ts similarity index 100% rename from server/libs/infra/src/migrations/1674757936889-AlterExifExposureTimeToString.ts rename to server/src/infra/migrations/1674757936889-AlterExifExposureTimeToString.ts diff --git a/server/libs/infra/src/migrations/1674774248319-TruncateAPIKeys.ts b/server/src/infra/migrations/1674774248319-TruncateAPIKeys.ts similarity index 100% rename from server/libs/infra/src/migrations/1674774248319-TruncateAPIKeys.ts rename to server/src/infra/migrations/1674774248319-TruncateAPIKeys.ts diff --git a/server/libs/infra/src/migrations/1674939383309-AddSharedLinkUserForeignKeyConstraint.ts b/server/src/infra/migrations/1674939383309-AddSharedLinkUserForeignKeyConstraint.ts similarity index 100% rename from server/libs/infra/src/migrations/1674939383309-AddSharedLinkUserForeignKeyConstraint.ts rename to server/src/infra/migrations/1674939383309-AddSharedLinkUserForeignKeyConstraint.ts diff --git a/server/libs/infra/src/migrations/1675667878312-AddUpdatedAtColumnToAlbumsUsersAssets.ts b/server/src/infra/migrations/1675667878312-AddUpdatedAtColumnToAlbumsUsersAssets.ts similarity index 100% rename from server/libs/infra/src/migrations/1675667878312-AddUpdatedAtColumnToAlbumsUsersAssets.ts rename to server/src/infra/migrations/1675667878312-AddUpdatedAtColumnToAlbumsUsersAssets.ts diff --git a/server/libs/infra/src/migrations/1675701909594-AddAlbumUserForeignKeyConstraint.ts b/server/src/infra/migrations/1675701909594-AddAlbumUserForeignKeyConstraint.ts similarity index 100% rename from server/libs/infra/src/migrations/1675701909594-AddAlbumUserForeignKeyConstraint.ts rename to server/src/infra/migrations/1675701909594-AddAlbumUserForeignKeyConstraint.ts diff --git a/server/libs/infra/src/migrations/1675808874445-APIKeyUUIDPrimaryKey.ts b/server/src/infra/migrations/1675808874445-APIKeyUUIDPrimaryKey.ts similarity index 100% rename from server/libs/infra/src/migrations/1675808874445-APIKeyUUIDPrimaryKey.ts rename to server/src/infra/migrations/1675808874445-APIKeyUUIDPrimaryKey.ts diff --git a/server/libs/infra/src/migrations/1675812532822-FixAlbumEntityTypeORM.ts b/server/src/infra/migrations/1675812532822-FixAlbumEntityTypeORM.ts similarity index 100% rename from server/libs/infra/src/migrations/1675812532822-FixAlbumEntityTypeORM.ts rename to server/src/infra/migrations/1675812532822-FixAlbumEntityTypeORM.ts diff --git a/server/libs/infra/src/migrations/1676437878377-AppleContentIdentifier.ts b/server/src/infra/migrations/1676437878377-AppleContentIdentifier.ts similarity index 100% rename from server/libs/infra/src/migrations/1676437878377-AppleContentIdentifier.ts rename to server/src/infra/migrations/1676437878377-AppleContentIdentifier.ts diff --git a/server/libs/infra/src/migrations/1676680127415-FixAssetRelations.ts b/server/src/infra/migrations/1676680127415-FixAssetRelations.ts similarity index 100% rename from server/libs/infra/src/migrations/1676680127415-FixAssetRelations.ts rename to server/src/infra/migrations/1676680127415-FixAssetRelations.ts diff --git a/server/libs/infra/src/migrations/1676721296440-AssetCreatedAtField.ts b/server/src/infra/migrations/1676721296440-AssetCreatedAtField.ts similarity index 100% rename from server/libs/infra/src/migrations/1676721296440-AssetCreatedAtField.ts rename to server/src/infra/migrations/1676721296440-AssetCreatedAtField.ts diff --git a/server/libs/infra/src/migrations/1676848629119-ExifEntityDefinitionFixes.ts b/server/src/infra/migrations/1676848629119-ExifEntityDefinitionFixes.ts similarity index 100% rename from server/libs/infra/src/migrations/1676848629119-ExifEntityDefinitionFixes.ts rename to server/src/infra/migrations/1676848629119-ExifEntityDefinitionFixes.ts diff --git a/server/libs/infra/src/migrations/1676848694786-SharedLinkEntityDefinitionFixes.ts b/server/src/infra/migrations/1676848694786-SharedLinkEntityDefinitionFixes.ts similarity index 100% rename from server/libs/infra/src/migrations/1676848694786-SharedLinkEntityDefinitionFixes.ts rename to server/src/infra/migrations/1676848694786-SharedLinkEntityDefinitionFixes.ts diff --git a/server/libs/infra/src/migrations/1676852143506-SmartInfoEntityDefinitionFixes.ts b/server/src/infra/migrations/1676852143506-SmartInfoEntityDefinitionFixes.ts similarity index 100% rename from server/libs/infra/src/migrations/1676852143506-SmartInfoEntityDefinitionFixes.ts rename to server/src/infra/migrations/1676852143506-SmartInfoEntityDefinitionFixes.ts diff --git a/server/libs/infra/src/migrations/1677497925328-AddExifTimeZone.ts b/server/src/infra/migrations/1677497925328-AddExifTimeZone.ts similarity index 100% rename from server/libs/infra/src/migrations/1677497925328-AddExifTimeZone.ts rename to server/src/infra/migrations/1677497925328-AddExifTimeZone.ts diff --git a/server/libs/infra/src/migrations/1677535643119-AddIndexForAlbumInSharedLinkTable.ts b/server/src/infra/migrations/1677535643119-AddIndexForAlbumInSharedLinkTable.ts similarity index 100% rename from server/libs/infra/src/migrations/1677535643119-AddIndexForAlbumInSharedLinkTable.ts rename to server/src/infra/migrations/1677535643119-AddIndexForAlbumInSharedLinkTable.ts diff --git a/server/libs/infra/src/migrations/1677613712565-AlbumThumbnailRelation.ts b/server/src/infra/migrations/1677613712565-AlbumThumbnailRelation.ts similarity index 100% rename from server/libs/infra/src/migrations/1677613712565-AlbumThumbnailRelation.ts rename to server/src/infra/migrations/1677613712565-AlbumThumbnailRelation.ts diff --git a/server/libs/infra/src/migrations/1677971458822-AddCLIPEncodeDataColumn.ts b/server/src/infra/migrations/1677971458822-AddCLIPEncodeDataColumn.ts similarity index 100% rename from server/libs/infra/src/migrations/1677971458822-AddCLIPEncodeDataColumn.ts rename to server/src/infra/migrations/1677971458822-AddCLIPEncodeDataColumn.ts diff --git a/server/libs/infra/src/migrations/1679751316282-UpdateTranscodeOption.ts b/server/src/infra/migrations/1679751316282-UpdateTranscodeOption.ts similarity index 100% rename from server/libs/infra/src/migrations/1679751316282-UpdateTranscodeOption.ts rename to server/src/infra/migrations/1679751316282-UpdateTranscodeOption.ts diff --git a/server/libs/infra/src/migrations/1679901204458-ClipEmbeddingFloat4.ts b/server/src/infra/migrations/1679901204458-ClipEmbeddingFloat4.ts similarity index 100% rename from server/libs/infra/src/migrations/1679901204458-ClipEmbeddingFloat4.ts rename to server/src/infra/migrations/1679901204458-ClipEmbeddingFloat4.ts diff --git a/server/libs/infra/src/migrations/1680632845740-AddIsArchivedColumn.ts b/server/src/infra/migrations/1680632845740-AddIsArchivedColumn.ts similarity index 100% rename from server/libs/infra/src/migrations/1680632845740-AddIsArchivedColumn.ts rename to server/src/infra/migrations/1680632845740-AddIsArchivedColumn.ts diff --git a/server/libs/infra/src/migrations/1680694465853-RemoveRedundantConstraints.ts b/server/src/infra/migrations/1680694465853-RemoveRedundantConstraints.ts similarity index 100% rename from server/libs/infra/src/migrations/1680694465853-RemoveRedundantConstraints.ts rename to server/src/infra/migrations/1680694465853-RemoveRedundantConstraints.ts diff --git a/server/libs/infra/src/migrations/1681144628393-AddOriginalFileNameToAssetTable.ts b/server/src/infra/migrations/1681144628393-AddOriginalFileNameToAssetTable.ts similarity index 100% rename from server/libs/infra/src/migrations/1681144628393-AddOriginalFileNameToAssetTable.ts rename to server/src/infra/migrations/1681144628393-AddOriginalFileNameToAssetTable.ts diff --git a/server/libs/infra/src/migrations/1681159594469-RemoveImageNameFromEXIFTable.ts b/server/src/infra/migrations/1681159594469-RemoveImageNameFromEXIFTable.ts similarity index 100% rename from server/libs/infra/src/migrations/1681159594469-RemoveImageNameFromEXIFTable.ts rename to server/src/infra/migrations/1681159594469-RemoveImageNameFromEXIFTable.ts diff --git a/server/libs/infra/src/migrations/1682371561743-FixNullableRelations.ts b/server/src/infra/migrations/1682371561743-FixNullableRelations.ts similarity index 100% rename from server/libs/infra/src/migrations/1682371561743-FixNullableRelations.ts rename to server/src/infra/migrations/1682371561743-FixNullableRelations.ts diff --git a/server/libs/infra/src/migrations/1682371791038-AddDeviceInfoToUserToken.ts b/server/src/infra/migrations/1682371791038-AddDeviceInfoToUserToken.ts similarity index 100% rename from server/libs/infra/src/migrations/1682371791038-AddDeviceInfoToUserToken.ts rename to server/src/infra/migrations/1682371791038-AddDeviceInfoToUserToken.ts diff --git a/server/libs/infra/src/migrations/1682710252424-DropDeviceInfoTable.ts b/server/src/infra/migrations/1682710252424-DropDeviceInfoTable.ts similarity index 100% rename from server/libs/infra/src/migrations/1682710252424-DropDeviceInfoTable.ts rename to server/src/infra/migrations/1682710252424-DropDeviceInfoTable.ts diff --git a/server/libs/infra/src/migrations/1683808254676-AddPartnersTable.ts b/server/src/infra/migrations/1683808254676-AddPartnersTable.ts similarity index 100% rename from server/libs/infra/src/migrations/1683808254676-AddPartnersTable.ts rename to server/src/infra/migrations/1683808254676-AddPartnersTable.ts diff --git a/server/libs/infra/src/migrations/1684255168091-AddFacialTables.ts b/server/src/infra/migrations/1684255168091-AddFacialTables.ts similarity index 100% rename from server/libs/infra/src/migrations/1684255168091-AddFacialTables.ts rename to server/src/infra/migrations/1684255168091-AddFacialTables.ts diff --git a/server/libs/infra/src/migrations/1684273840676-AddSidecarFile.ts b/server/src/infra/migrations/1684273840676-AddSidecarFile.ts similarity index 100% rename from server/libs/infra/src/migrations/1684273840676-AddSidecarFile.ts rename to server/src/infra/migrations/1684273840676-AddSidecarFile.ts diff --git a/server/libs/infra/src/migrations/1684328185099-RequireChecksumNotNull.ts b/server/src/infra/migrations/1684328185099-RequireChecksumNotNull.ts similarity index 100% rename from server/libs/infra/src/migrations/1684328185099-RequireChecksumNotNull.ts rename to server/src/infra/migrations/1684328185099-RequireChecksumNotNull.ts diff --git a/server/libs/infra/src/migrations/1684410565398-AddStorageLabel.ts b/server/src/infra/migrations/1684410565398-AddStorageLabel.ts similarity index 100% rename from server/libs/infra/src/migrations/1684410565398-AddStorageLabel.ts rename to server/src/infra/migrations/1684410565398-AddStorageLabel.ts diff --git a/server/libs/infra/src/migrations/1684867360825-AddUserTokenAndAPIKeyCascades.ts b/server/src/infra/migrations/1684867360825-AddUserTokenAndAPIKeyCascades.ts similarity index 100% rename from server/libs/infra/src/migrations/1684867360825-AddUserTokenAndAPIKeyCascades.ts rename to server/src/infra/migrations/1684867360825-AddUserTokenAndAPIKeyCascades.ts diff --git a/server/libs/infra/src/migrations/1685044328272-AddSharedLinkCascade.ts b/server/src/infra/migrations/1685044328272-AddSharedLinkCascade.ts similarity index 100% rename from server/libs/infra/src/migrations/1685044328272-AddSharedLinkCascade.ts rename to server/src/infra/migrations/1685044328272-AddSharedLinkCascade.ts diff --git a/server/libs/infra/src/migrations/1685370430343-UserDatesTimestamptz.ts b/server/src/infra/migrations/1685370430343-UserDatesTimestamptz.ts similarity index 100% rename from server/libs/infra/src/migrations/1685370430343-UserDatesTimestamptz.ts rename to server/src/infra/migrations/1685370430343-UserDatesTimestamptz.ts diff --git a/server/libs/infra/src/migrations/1685731372040-RemoveInvalidCoordinates.ts b/server/src/infra/migrations/1685731372040-RemoveInvalidCoordinates.ts similarity index 100% rename from server/libs/infra/src/migrations/1685731372040-RemoveInvalidCoordinates.ts rename to server/src/infra/migrations/1685731372040-RemoveInvalidCoordinates.ts diff --git a/server/libs/infra/src/redis-io.adapter.ts b/server/src/infra/redis-io.adapter.ts similarity index 100% rename from server/libs/infra/src/redis-io.adapter.ts rename to server/src/infra/redis-io.adapter.ts diff --git a/server/libs/infra/src/repositories/access.repository.ts b/server/src/infra/repositories/access.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/access.repository.ts rename to server/src/infra/repositories/access.repository.ts diff --git a/server/libs/infra/src/repositories/album.repository.ts b/server/src/infra/repositories/album.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/album.repository.ts rename to server/src/infra/repositories/album.repository.ts diff --git a/server/libs/infra/src/repositories/api-key.repository.ts b/server/src/infra/repositories/api-key.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/api-key.repository.ts rename to server/src/infra/repositories/api-key.repository.ts diff --git a/server/libs/infra/src/repositories/asset.repository.ts b/server/src/infra/repositories/asset.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/asset.repository.ts rename to server/src/infra/repositories/asset.repository.ts diff --git a/server/libs/infra/src/repositories/communication.repository.ts b/server/src/infra/repositories/communication.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/communication.repository.ts rename to server/src/infra/repositories/communication.repository.ts diff --git a/server/libs/infra/src/repositories/crypto.repository.ts b/server/src/infra/repositories/crypto.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/crypto.repository.ts rename to server/src/infra/repositories/crypto.repository.ts diff --git a/server/libs/infra/src/repositories/face.repository.ts b/server/src/infra/repositories/face.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/face.repository.ts rename to server/src/infra/repositories/face.repository.ts diff --git a/server/libs/infra/src/repositories/filesystem.provider.ts b/server/src/infra/repositories/filesystem.provider.ts similarity index 100% rename from server/libs/infra/src/repositories/filesystem.provider.ts rename to server/src/infra/repositories/filesystem.provider.ts diff --git a/server/libs/infra/src/repositories/geocoding.repository.ts b/server/src/infra/repositories/geocoding.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/geocoding.repository.ts rename to server/src/infra/repositories/geocoding.repository.ts diff --git a/server/libs/infra/src/repositories/index.ts b/server/src/infra/repositories/index.ts similarity index 100% rename from server/libs/infra/src/repositories/index.ts rename to server/src/infra/repositories/index.ts diff --git a/server/libs/infra/src/repositories/job.repository.ts b/server/src/infra/repositories/job.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/job.repository.ts rename to server/src/infra/repositories/job.repository.ts diff --git a/server/libs/infra/src/repositories/machine-learning.repository.ts b/server/src/infra/repositories/machine-learning.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/machine-learning.repository.ts rename to server/src/infra/repositories/machine-learning.repository.ts diff --git a/server/libs/infra/src/repositories/media.repository.ts b/server/src/infra/repositories/media.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/media.repository.ts rename to server/src/infra/repositories/media.repository.ts diff --git a/server/libs/infra/src/repositories/partner.repository.ts b/server/src/infra/repositories/partner.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/partner.repository.ts rename to server/src/infra/repositories/partner.repository.ts diff --git a/server/libs/infra/src/repositories/person.repository.ts b/server/src/infra/repositories/person.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/person.repository.ts rename to server/src/infra/repositories/person.repository.ts diff --git a/server/libs/infra/src/repositories/shared-link.repository.ts b/server/src/infra/repositories/shared-link.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/shared-link.repository.ts rename to server/src/infra/repositories/shared-link.repository.ts diff --git a/server/libs/infra/src/repositories/smart-info.repository.ts b/server/src/infra/repositories/smart-info.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/smart-info.repository.ts rename to server/src/infra/repositories/smart-info.repository.ts diff --git a/server/libs/infra/src/repositories/system-config.repository.ts b/server/src/infra/repositories/system-config.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/system-config.repository.ts rename to server/src/infra/repositories/system-config.repository.ts diff --git a/server/libs/infra/src/repositories/tag.repository.ts b/server/src/infra/repositories/tag.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/tag.repository.ts rename to server/src/infra/repositories/tag.repository.ts diff --git a/server/libs/infra/src/repositories/typesense.repository.ts b/server/src/infra/repositories/typesense.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/typesense.repository.ts rename to server/src/infra/repositories/typesense.repository.ts diff --git a/server/libs/infra/src/repositories/user-token.repository.ts b/server/src/infra/repositories/user-token.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/user-token.repository.ts rename to server/src/infra/repositories/user-token.repository.ts diff --git a/server/libs/infra/src/repositories/user.repository.ts b/server/src/infra/repositories/user.repository.ts similarity index 100% rename from server/libs/infra/src/repositories/user.repository.ts rename to server/src/infra/repositories/user.repository.ts diff --git a/server/libs/infra/src/typesense-schemas/album.schema.ts b/server/src/infra/typesense-schemas/album.schema.ts similarity index 100% rename from server/libs/infra/src/typesense-schemas/album.schema.ts rename to server/src/infra/typesense-schemas/album.schema.ts diff --git a/server/libs/infra/src/typesense-schemas/asset.schema.ts b/server/src/infra/typesense-schemas/asset.schema.ts similarity index 100% rename from server/libs/infra/src/typesense-schemas/asset.schema.ts rename to server/src/infra/typesense-schemas/asset.schema.ts diff --git a/server/libs/infra/src/typesense-schemas/face.schema.ts b/server/src/infra/typesense-schemas/face.schema.ts similarity index 100% rename from server/libs/infra/src/typesense-schemas/face.schema.ts rename to server/src/infra/typesense-schemas/face.schema.ts diff --git a/server/libs/infra/src/typesense-schemas/index.ts b/server/src/infra/typesense-schemas/index.ts similarity index 100% rename from server/libs/infra/src/typesense-schemas/index.ts rename to server/src/infra/typesense-schemas/index.ts diff --git a/server/libs/infra/src/utils/optional-between.util.ts b/server/src/infra/utils/optional-between.util.ts similarity index 100% rename from server/libs/infra/src/utils/optional-between.util.ts rename to server/src/infra/utils/optional-between.util.ts diff --git a/server/libs/infra/src/utils/pagination.util.ts b/server/src/infra/utils/pagination.util.ts similarity index 100% rename from server/libs/infra/src/utils/pagination.util.ts rename to server/src/infra/utils/pagination.util.ts diff --git a/server/src/main.ts b/server/src/main.ts new file mode 100644 index 000000000..f5e83aacf --- /dev/null +++ b/server/src/main.ts @@ -0,0 +1,24 @@ +import { bootstrap as immich } from './immich/main'; +import { bootstrap as microservices } from './microservices/main'; +import { bootstrap as cli } from './cli/immich'; + +const immichApp = process.argv[2] || process.env.IMMICH_APP; + +if (process.argv[2] === immichApp) { + process.argv.splice(2, 1); +} + +function bootstrap() { + switch (immichApp) { + case 'immich': + return immich(); + case 'microservices': + return microservices(); + case 'cli': + return cli(); + default: + console.log(`Invalid app name: ${immichApp}. Expected one of immich|microservices|cli`); + process.exit(1); + } +} +bootstrap(); diff --git a/server/apps/microservices/src/app.service.ts b/server/src/microservices/app.service.ts similarity index 100% rename from server/apps/microservices/src/app.service.ts rename to server/src/microservices/app.service.ts diff --git a/server/apps/microservices/src/main.ts b/server/src/microservices/main.ts similarity index 94% rename from server/apps/microservices/src/main.ts rename to server/src/microservices/main.ts index 1a6818186..1f170786b 100644 --- a/server/apps/microservices/src/main.ts +++ b/server/src/microservices/main.ts @@ -9,7 +9,7 @@ const logger = new Logger('ImmichMicroservice'); const port = Number(process.env.MICROSERVICES_PORT) || 3002; const envName = (process.env.NODE_ENV || 'development').toUpperCase(); -async function bootstrap() { +export async function bootstrap() { const app = await NestFactory.create(MicroservicesModule, { logger: getLogLevels() }); app.useWebSocketAdapter(new RedisIoAdapter(app)); @@ -19,5 +19,3 @@ async function bootstrap() { logger.log(`Immich Microservices is listening on ${port} [v${SERVER_VERSION}] [${envName}] `); } - -bootstrap(); diff --git a/server/apps/microservices/src/microservices.module.ts b/server/src/microservices/microservices.module.ts similarity index 100% rename from server/apps/microservices/src/microservices.module.ts rename to server/src/microservices/microservices.module.ts diff --git a/server/apps/microservices/src/processors/metadata-extraction.processor.ts b/server/src/microservices/processors/metadata-extraction.processor.ts similarity index 100% rename from server/apps/microservices/src/processors/metadata-extraction.processor.ts rename to server/src/microservices/processors/metadata-extraction.processor.ts diff --git a/server/apps/microservices/src/utils/exif/coordinates.spec.ts b/server/src/microservices/utils/exif/coordinates.spec.ts similarity index 100% rename from server/apps/microservices/src/utils/exif/coordinates.spec.ts rename to server/src/microservices/utils/exif/coordinates.spec.ts diff --git a/server/apps/microservices/src/utils/exif/coordinates.ts b/server/src/microservices/utils/exif/coordinates.ts similarity index 100% rename from server/apps/microservices/src/utils/exif/coordinates.ts rename to server/src/microservices/utils/exif/coordinates.ts diff --git a/server/apps/microservices/src/utils/exif/date-time.spec.ts b/server/src/microservices/utils/exif/date-time.spec.ts similarity index 100% rename from server/apps/microservices/src/utils/exif/date-time.spec.ts rename to server/src/microservices/utils/exif/date-time.spec.ts diff --git a/server/apps/microservices/src/utils/exif/date-time.ts b/server/src/microservices/utils/exif/date-time.ts similarity index 100% rename from server/apps/microservices/src/utils/exif/date-time.ts rename to server/src/microservices/utils/exif/date-time.ts diff --git a/server/apps/microservices/src/utils/exif/iso.spec.ts b/server/src/microservices/utils/exif/iso.spec.ts similarity index 100% rename from server/apps/microservices/src/utils/exif/iso.spec.ts rename to server/src/microservices/utils/exif/iso.spec.ts diff --git a/server/apps/microservices/src/utils/exif/iso.ts b/server/src/microservices/utils/exif/iso.ts similarity index 100% rename from server/apps/microservices/src/utils/exif/iso.ts rename to server/src/microservices/utils/exif/iso.ts diff --git a/server/apps/microservices/src/utils/numbers.spec.ts b/server/src/microservices/utils/numbers.spec.ts similarity index 100% rename from server/apps/microservices/src/utils/numbers.spec.ts rename to server/src/microservices/utils/numbers.spec.ts diff --git a/server/apps/microservices/src/utils/numbers.ts b/server/src/microservices/utils/numbers.ts similarity index 100% rename from server/apps/microservices/src/utils/numbers.ts rename to server/src/microservices/utils/numbers.ts diff --git a/server/start-microservices.sh b/server/start-microservices.sh index 845b1cd7d..f81e6381a 100755 --- a/server/start-microservices.sh +++ b/server/start-microservices.sh @@ -1,23 +1,2 @@ #!/bin/sh - -if [ "$DB_HOSTNAME_FILE" ]; then - export DB_HOSTNAME=$(cat $DB_HOSTNAME_FILE) - unset DB_HOSTNAME_FILE -fi - -if [ "$DB_DATABASE_NAME_FILE" ]; then - export DB_DATABASE_NAME=$(cat $DB_DATABASE_NAME_FILE) - unset DB_DATABASE_NAME_FILE -fi - -if [ "$DB_USERNAME_FILE" ]; then - export DB_USERNAME=$(cat $DB_USERNAME_FILE) - unset DB_USERNAME_FILE -fi - -if [ "$DB_PASSWORD_FILE" ]; then - export DB_PASSWORD=$(cat $DB_PASSWORD_FILE) - unset DB_PASSWORD_FILE -fi - -exec node dist/apps/microservices/apps/microservices/src/main +./start.sh microservices diff --git a/server/start-server.sh b/server/start-server.sh index 012dfd817..c3262af83 100755 --- a/server/start-server.sh +++ b/server/start-server.sh @@ -1,23 +1,2 @@ #!/bin/sh - -if [ "$DB_HOSTNAME_FILE" ]; then - export DB_HOSTNAME=$(cat $DB_HOSTNAME_FILE) - unset DB_HOSTNAME_FILE -fi - -if [ "$DB_DATABASE_NAME_FILE" ]; then - export DB_DATABASE_NAME=$(cat $DB_DATABASE_NAME_FILE) - unset DB_DATABASE_NAME_FILE -fi - -if [ "$DB_USERNAME_FILE" ]; then - export DB_USERNAME=$(cat $DB_USERNAME_FILE) - unset DB_USERNAME_FILE -fi - -if [ "$DB_PASSWORD_FILE" ]; then - export DB_PASSWORD=$(cat $DB_PASSWORD_FILE) - unset DB_PASSWORD_FILE -fi - -exec node dist/apps/immich/apps/immich/src/main +./start.sh immich diff --git a/server/start.sh b/server/start.sh new file mode 100755 index 000000000..c0825dd51 --- /dev/null +++ b/server/start.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +if [ "$DB_HOSTNAME_FILE" ]; then + export DB_HOSTNAME=$(cat $DB_HOSTNAME_FILE) + unset DB_HOSTNAME_FILE +fi + +if [ "$DB_DATABASE_NAME_FILE" ]; then + export DB_DATABASE_NAME=$(cat $DB_DATABASE_NAME_FILE) + unset DB_DATABASE_NAME_FILE +fi + +if [ "$DB_USERNAME_FILE" ]; then + export DB_USERNAME=$(cat $DB_USERNAME_FILE) + unset DB_USERNAME_FILE +fi + +if [ "$DB_PASSWORD_FILE" ]; then + export DB_PASSWORD=$(cat $DB_PASSWORD_FILE) + unset DB_PASSWORD_FILE +fi + +exec node dist/main $1 diff --git a/server/libs/domain/test/fixtures.ts b/server/test/fixtures.ts similarity index 99% rename from server/libs/domain/test/fixtures.ts rename to server/test/fixtures.ts index 9bf05c024..0fa4cfd8a 100644 --- a/server/libs/domain/test/fixtures.ts +++ b/server/test/fixtures.ts @@ -30,7 +30,7 @@ import { VideoFormat, VideoInfo, VideoStreamInfo, -} from '../src'; +} from '@app/domain'; const today = new Date(); const tomorrow = new Date(); diff --git a/server/libs/domain/test/global-setup.js b/server/test/global-setup.js similarity index 100% rename from server/libs/domain/test/global-setup.js rename to server/test/global-setup.js diff --git a/server/test/index.ts b/server/test/index.ts new file mode 100644 index 000000000..176dc87ca --- /dev/null +++ b/server/test/index.ts @@ -0,0 +1,8 @@ +export * from './repositories'; +export * from './fixtures'; + +export async function asyncTick(steps: number) { + for (let i = 0; i < steps; i++) { + await Promise.resolve(); + } +} diff --git a/server/libs/domain/test/access.repository.mock.ts b/server/test/repositories/access.repository.mock.ts similarity index 81% rename from server/libs/domain/test/access.repository.mock.ts rename to server/test/repositories/access.repository.mock.ts index 75a91fc3c..da00474db 100644 --- a/server/libs/domain/test/access.repository.mock.ts +++ b/server/test/repositories/access.repository.mock.ts @@ -1,4 +1,4 @@ -import { IAccessRepository } from '../src'; +import { IAccessRepository } from '@app/domain'; export const newAccessRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/album.repository.mock.ts b/server/test/repositories/album.repository.mock.ts similarity index 90% rename from server/libs/domain/test/album.repository.mock.ts rename to server/test/repositories/album.repository.mock.ts index 593ae61d2..662b183d3 100644 --- a/server/libs/domain/test/album.repository.mock.ts +++ b/server/test/repositories/album.repository.mock.ts @@ -1,4 +1,4 @@ -import { IAlbumRepository } from '../src'; +import { IAlbumRepository } from '@app/domain'; export const newAlbumRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/api-key.repository.mock.ts b/server/test/repositories/api-key.repository.mock.ts similarity index 83% rename from server/libs/domain/test/api-key.repository.mock.ts rename to server/test/repositories/api-key.repository.mock.ts index dbf8405fc..5688978e7 100644 --- a/server/libs/domain/test/api-key.repository.mock.ts +++ b/server/test/repositories/api-key.repository.mock.ts @@ -1,4 +1,4 @@ -import { IKeyRepository } from '../src'; +import { IKeyRepository } from '@app/domain'; export const newKeyRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/asset.repository.mock.ts b/server/test/repositories/asset.repository.mock.ts similarity index 90% rename from server/libs/domain/test/asset.repository.mock.ts rename to server/test/repositories/asset.repository.mock.ts index 993b987ef..d05a5c172 100644 --- a/server/libs/domain/test/asset.repository.mock.ts +++ b/server/test/repositories/asset.repository.mock.ts @@ -1,4 +1,4 @@ -import { IAssetRepository } from '../src'; +import { IAssetRepository } from '@app/domain'; export const newAssetRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/communication.repository.mock.ts b/server/test/repositories/communication.repository.mock.ts similarity index 70% rename from server/libs/domain/test/communication.repository.mock.ts rename to server/test/repositories/communication.repository.mock.ts index 083da97c3..d4c2f8c8f 100644 --- a/server/libs/domain/test/communication.repository.mock.ts +++ b/server/test/repositories/communication.repository.mock.ts @@ -1,4 +1,4 @@ -import { ICommunicationRepository } from '../src'; +import { ICommunicationRepository } from '@app/domain'; export const newCommunicationRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/crypto.repository.mock.ts b/server/test/repositories/crypto.repository.mock.ts similarity index 89% rename from server/libs/domain/test/crypto.repository.mock.ts rename to server/test/repositories/crypto.repository.mock.ts index 1e37222e4..bbf315444 100644 --- a/server/libs/domain/test/crypto.repository.mock.ts +++ b/server/test/repositories/crypto.repository.mock.ts @@ -1,4 +1,4 @@ -import { ICryptoRepository } from '../src'; +import { ICryptoRepository } from '@app/domain'; export const newCryptoRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/face.repository.mock.ts b/server/test/repositories/face.repository.mock.ts similarity index 77% rename from server/libs/domain/test/face.repository.mock.ts rename to server/test/repositories/face.repository.mock.ts index 7e56de447..505a55624 100644 --- a/server/libs/domain/test/face.repository.mock.ts +++ b/server/test/repositories/face.repository.mock.ts @@ -1,4 +1,4 @@ -import { IFaceRepository } from '../src'; +import { IFaceRepository } from '@app/domain'; export const newFaceRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/index.ts b/server/test/repositories/index.ts similarity index 85% rename from server/libs/domain/test/index.ts rename to server/test/repositories/index.ts index a868009f4..aa62a5f01 100644 --- a/server/libs/domain/test/index.ts +++ b/server/test/repositories/index.ts @@ -5,7 +5,6 @@ export * from './asset.repository.mock'; export * from './communication.repository.mock'; export * from './crypto.repository.mock'; export * from './face.repository.mock'; -export * from './fixtures'; export * from './job.repository.mock'; export * from './machine-learning.repository.mock'; export * from './media.repository.mock'; @@ -19,9 +18,3 @@ export * from './system-config.repository.mock'; export * from './tag.repository.mock'; export * from './user-token.repository.mock'; export * from './user.repository.mock'; - -export async function asyncTick(steps: number) { - for (let i = 0; i < steps; i++) { - await Promise.resolve(); - } -} diff --git a/server/libs/domain/test/job.repository.mock.ts b/server/test/repositories/job.repository.mock.ts similarity index 88% rename from server/libs/domain/test/job.repository.mock.ts rename to server/test/repositories/job.repository.mock.ts index 073478e3b..16db4ca69 100644 --- a/server/libs/domain/test/job.repository.mock.ts +++ b/server/test/repositories/job.repository.mock.ts @@ -1,4 +1,4 @@ -import { IJobRepository } from '../src'; +import { IJobRepository } from '@app/domain'; export const newJobRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/machine-learning.repository.mock.ts b/server/test/repositories/machine-learning.repository.mock.ts similarity index 79% rename from server/libs/domain/test/machine-learning.repository.mock.ts rename to server/test/repositories/machine-learning.repository.mock.ts index 13e335e69..02af97221 100644 --- a/server/libs/domain/test/machine-learning.repository.mock.ts +++ b/server/test/repositories/machine-learning.repository.mock.ts @@ -1,4 +1,4 @@ -import { IMachineLearningRepository } from '../src'; +import { IMachineLearningRepository } from '@app/domain'; export const newMachineLearningRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/media.repository.mock.ts b/server/test/repositories/media.repository.mock.ts similarity index 84% rename from server/libs/domain/test/media.repository.mock.ts rename to server/test/repositories/media.repository.mock.ts index a819e9e5d..3d7cf7bfc 100644 --- a/server/libs/domain/test/media.repository.mock.ts +++ b/server/test/repositories/media.repository.mock.ts @@ -1,4 +1,4 @@ -import { IMediaRepository } from '../src'; +import { IMediaRepository } from '@app/domain'; export const newMediaRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/partner.repository.mock.ts b/server/test/repositories/partner.repository.mock.ts similarity index 79% rename from server/libs/domain/test/partner.repository.mock.ts rename to server/test/repositories/partner.repository.mock.ts index 396b33478..a283325d2 100644 --- a/server/libs/domain/test/partner.repository.mock.ts +++ b/server/test/repositories/partner.repository.mock.ts @@ -1,4 +1,4 @@ -import { IPartnerRepository } from '../src'; +import { IPartnerRepository } from '@app/domain'; export const newPartnerRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/person.repository.mock.ts b/server/test/repositories/person.repository.mock.ts similarity index 86% rename from server/libs/domain/test/person.repository.mock.ts rename to server/test/repositories/person.repository.mock.ts index 6a1b5e8c5..0d0219577 100644 --- a/server/libs/domain/test/person.repository.mock.ts +++ b/server/test/repositories/person.repository.mock.ts @@ -1,4 +1,4 @@ -import { IPersonRepository } from '../src'; +import { IPersonRepository } from '@app/domain'; export const newPersonRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/search.repository.mock.ts b/server/test/repositories/search.repository.mock.ts similarity index 91% rename from server/libs/domain/test/search.repository.mock.ts rename to server/test/repositories/search.repository.mock.ts index b845e30f9..5bf8f6339 100644 --- a/server/libs/domain/test/search.repository.mock.ts +++ b/server/test/repositories/search.repository.mock.ts @@ -1,4 +1,4 @@ -import { ISearchRepository } from '../src'; +import { ISearchRepository } from '@app/domain'; export const newSearchRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/shared-link.repository.mock.ts b/server/test/repositories/shared-link.repository.mock.ts similarity index 82% rename from server/libs/domain/test/shared-link.repository.mock.ts rename to server/test/repositories/shared-link.repository.mock.ts index dae72d9c6..fb34b0ad7 100644 --- a/server/libs/domain/test/shared-link.repository.mock.ts +++ b/server/test/repositories/shared-link.repository.mock.ts @@ -1,4 +1,4 @@ -import { ISharedLinkRepository } from '../src'; +import { ISharedLinkRepository } from '@app/domain'; export const newSharedLinkRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/smart-info.repository.mock.ts b/server/test/repositories/smart-info.repository.mock.ts similarity index 71% rename from server/libs/domain/test/smart-info.repository.mock.ts rename to server/test/repositories/smart-info.repository.mock.ts index 9eb5bc998..1b89fc393 100644 --- a/server/libs/domain/test/smart-info.repository.mock.ts +++ b/server/test/repositories/smart-info.repository.mock.ts @@ -1,4 +1,4 @@ -import { ISmartInfoRepository } from '../src'; +import { ISmartInfoRepository } from '@app/domain'; export const newSmartInfoRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/storage.repository.mock.ts b/server/test/repositories/storage.repository.mock.ts similarity index 87% rename from server/libs/domain/test/storage.repository.mock.ts rename to server/test/repositories/storage.repository.mock.ts index 758babd75..21b289f93 100644 --- a/server/libs/domain/test/storage.repository.mock.ts +++ b/server/test/repositories/storage.repository.mock.ts @@ -1,4 +1,4 @@ -import { IStorageRepository } from '../src'; +import { IStorageRepository } from '@app/domain'; export const newStorageRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/system-config.repository.mock.ts b/server/test/repositories/system-config.repository.mock.ts similarity index 80% rename from server/libs/domain/test/system-config.repository.mock.ts rename to server/test/repositories/system-config.repository.mock.ts index 23d69f99b..258ded0a7 100644 --- a/server/libs/domain/test/system-config.repository.mock.ts +++ b/server/test/repositories/system-config.repository.mock.ts @@ -1,4 +1,4 @@ -import { ISystemConfigRepository } from '../src'; +import { ISystemConfigRepository } from '@app/domain'; export const newSystemConfigRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/tag.repository.mock.ts b/server/test/repositories/tag.repository.mock.ts similarity index 88% rename from server/libs/domain/test/tag.repository.mock.ts rename to server/test/repositories/tag.repository.mock.ts index d42d97e28..cb1e05a09 100644 --- a/server/libs/domain/test/tag.repository.mock.ts +++ b/server/test/repositories/tag.repository.mock.ts @@ -1,4 +1,4 @@ -import { ITagRepository } from '../src'; +import { ITagRepository } from '@app/domain'; export const newTagRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/user-token.repository.mock.ts b/server/test/repositories/user-token.repository.mock.ts similarity index 81% rename from server/libs/domain/test/user-token.repository.mock.ts rename to server/test/repositories/user-token.repository.mock.ts index bebebb09f..9d1bacf1c 100644 --- a/server/libs/domain/test/user-token.repository.mock.ts +++ b/server/test/repositories/user-token.repository.mock.ts @@ -1,4 +1,4 @@ -import { IUserTokenRepository } from '../src'; +import { IUserTokenRepository } from '@app/domain'; export const newUserTokenRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/user.repository.mock.ts b/server/test/repositories/user.repository.mock.ts similarity index 89% rename from server/libs/domain/test/user.repository.mock.ts rename to server/test/repositories/user.repository.mock.ts index 011273dc2..09e2ef7bf 100644 --- a/server/libs/domain/test/user.repository.mock.ts +++ b/server/test/repositories/user.repository.mock.ts @@ -1,4 +1,4 @@ -import { IUserRepository } from '../src'; +import { IUserRepository } from '@app/domain'; export const newUserRepositoryMock = (): jest.Mocked => { return { diff --git a/server/libs/domain/test/setup.ts b/server/test/setup.ts similarity index 100% rename from server/libs/domain/test/setup.ts rename to server/test/setup.ts diff --git a/server/apps/immich/test/test-utils.ts b/server/test/test-utils.ts similarity index 89% rename from server/apps/immich/test/test-utils.ts rename to server/test/test-utils.ts index 12de38a64..708c4eede 100644 --- a/server/apps/immich/test/test-utils.ts +++ b/server/test/test-utils.ts @@ -1,8 +1,8 @@ import { CanActivate, ExecutionContext } from '@nestjs/common'; import { TestingModuleBuilder } from '@nestjs/testing'; import { DataSource } from 'typeorm'; -import { AuthUserDto } from '../src/decorators/auth-user.decorator'; -import { AuthGuard } from '../src/middlewares/auth.guard'; +import { AuthUserDto } from '@app/immich/decorators/auth-user.decorator'; +import { AuthGuard } from '@app/immich/middlewares/auth.guard'; type CustomAuthCallback = () => AuthUserDto; diff --git a/server/tsconfig.json b/server/tsconfig.json index ede4fd120..743d4a241 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -16,10 +16,14 @@ "esModuleInterop": true, "baseUrl": "./", "paths": { - "@app/infra": ["libs/infra/src"], - "@app/infra/*": ["libs/infra/src/*"], - "@app/domain": ["libs/domain/src"], - "@app/domain/*": ["libs/domain/src/*"] + "@test": ["test"], + "@test/*": ["test/*"], + "@app/immich": ["src/immich"], + "@app/immich/*": ["src/immich/*"], + "@app/infra": ["src/infra"], + "@app/infra/*": ["src/infra/*"], + "@app/domain": ["src/domain"], + "@app/domain/*": ["src/domain/*"] } }, "exclude": ["dist", "node_modules", "upload"]