From 6b5f72beda96d8b7e4d6329c4001827334de27dd Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 16 Dec 2021 18:04:16 +0100 Subject: Move typescript utils in its own directory --- server/types/models/abuse/abuse-message.ts | 2 +- server/types/models/abuse/abuse.ts | 2 +- server/types/models/account/account-blocklist.ts | 2 +- server/types/models/account/account.ts | 2 +- server/types/models/account/actor-custom-page.ts | 1 - server/types/models/actor/actor-follow.ts | 2 +- server/types/models/actor/actor-image.ts | 2 +- server/types/models/actor/actor.ts | 2 +- server/types/models/oauth/oauth-token.ts | 2 +- server/types/models/server/server-blocklist.ts | 2 +- server/types/models/server/server.ts | 2 +- server/types/models/user/user-notification.ts | 2 +- server/types/models/user/user.ts | 2 +- server/types/models/video/thumbnail.ts | 2 +- server/types/models/video/video-blacklist.ts | 2 +- server/types/models/video/video-caption.ts | 2 +- server/types/models/video/video-change-ownership.ts | 4 ++-- server/types/models/video/video-channels.ts | 2 +- server/types/models/video/video-comment.ts | 2 +- server/types/models/video/video-file.ts | 4 ++-- server/types/models/video/video-import.ts | 4 ++-- server/types/models/video/video-live.ts | 2 +- server/types/models/video/video-playlist-element.ts | 2 +- server/types/models/video/video-playlist.ts | 4 ++-- server/types/models/video/video-rate.ts | 2 +- server/types/models/video/video-redundancy.ts | 8 ++++---- server/types/models/video/video-share.ts | 2 +- server/types/models/video/video-streaming-playlist.ts | 4 ++-- server/types/models/video/video.ts | 2 +- server/types/sequelize.ts | 2 +- 30 files changed, 37 insertions(+), 38 deletions(-) (limited to 'server/types') diff --git a/server/types/models/abuse/abuse-message.ts b/server/types/models/abuse/abuse-message.ts index 565eca706..2d7d09316 100644 --- a/server/types/models/abuse/abuse-message.ts +++ b/server/types/models/abuse/abuse-message.ts @@ -1,5 +1,5 @@ import { AbuseMessageModel } from '@server/models/abuse/abuse-message' -import { PickWith } from '@shared/core-utils' +import { PickWith } from '@shared/typescript-utils' import { AbuseModel } from '../../../models/abuse/abuse' import { MAccountFormattable } from '../account' diff --git a/server/types/models/abuse/abuse.ts b/server/types/models/abuse/abuse.ts index 6fd83684c..1b45b3879 100644 --- a/server/types/models/abuse/abuse.ts +++ b/server/types/models/abuse/abuse.ts @@ -1,7 +1,7 @@ import { VideoAbuseModel } from '@server/models/abuse/video-abuse' import { VideoCommentAbuseModel } from '@server/models/abuse/video-comment-abuse' import { VideoCommentModel } from '@server/models/video/video-comment' -import { PickWith } from '@shared/core-utils' +import { PickWith } from '@shared/typescript-utils' import { AbuseModel } from '../../../models/abuse/abuse' import { MAccountDefault, MAccountFormattable, MAccountLight, MAccountUrl } from '../account' import { MComment, MCommentOwner, MCommentUrl, MCommentVideo, MVideoUrl } from '../video' diff --git a/server/types/models/account/account-blocklist.ts b/server/types/models/account/account-blocklist.ts index 3126fd0ab..9dae10915 100644 --- a/server/types/models/account/account-blocklist.ts +++ b/server/types/models/account/account-blocklist.ts @@ -1,5 +1,5 @@ import { AccountBlocklistModel } from '../../../models/account/account-blocklist' -import { PickWith } from '@shared/core-utils' +import { PickWith } from '@shared/typescript-utils' import { MAccountDefault, MAccountFormattable } from './account' type Use = PickWith diff --git a/server/types/models/account/account.ts b/server/types/models/account/account.ts index 71f6c79aa..282a2971b 100644 --- a/server/types/models/account/account.ts +++ b/server/types/models/account/account.ts @@ -1,4 +1,4 @@ -import { FunctionProperties, PickWith } from '@shared/core-utils' +import { FunctionProperties, PickWith } from '@shared/typescript-utils' import { AccountModel } from '../../../models/account/account' import { MActor, diff --git a/server/types/models/account/actor-custom-page.ts b/server/types/models/account/actor-custom-page.ts index 2cb8aa7e4..fcd8069be 100644 --- a/server/types/models/account/actor-custom-page.ts +++ b/server/types/models/account/actor-custom-page.ts @@ -1,4 +1,3 @@ - import { ActorCustomPageModel } from '../../../models/account/actor-custom-page' export type MActorCustomPage = Omit diff --git a/server/types/models/actor/actor-follow.ts b/server/types/models/actor/actor-follow.ts index 98a6ca8a5..338158561 100644 --- a/server/types/models/actor/actor-follow.ts +++ b/server/types/models/actor/actor-follow.ts @@ -1,4 +1,4 @@ -import { PickWith } from '@shared/core-utils' +import { PickWith } from '@shared/typescript-utils' import { ActorFollowModel } from '../../../models/actor/actor-follow' import { MActor, diff --git a/server/types/models/actor/actor-image.ts b/server/types/models/actor/actor-image.ts index 89adb01ae..521b4cc59 100644 --- a/server/types/models/actor/actor-image.ts +++ b/server/types/models/actor/actor-image.ts @@ -1,4 +1,4 @@ -import { FunctionProperties } from '@shared/core-utils' +import { FunctionProperties } from '@shared/typescript-utils' import { ActorImageModel } from '../../../models/actor/actor-image' export type MActorImage = ActorImageModel diff --git a/server/types/models/actor/actor.ts b/server/types/models/actor/actor.ts index b3a70cbce..9ce97094f 100644 --- a/server/types/models/actor/actor.ts +++ b/server/types/models/actor/actor.ts @@ -1,4 +1,4 @@ -import { FunctionProperties, PickWith, PickWithOpt } from '@shared/core-utils' +import { FunctionProperties, PickWith, PickWithOpt } from '@shared/typescript-utils' import { ActorModel } from '../../../models/actor/actor' import { MAccount, MAccountDefault, MAccountId, MAccountIdActor } from '../account' import { MServer, MServerHost, MServerHostBlocks, MServerRedundancyAllowed } from '../server' diff --git a/server/types/models/oauth/oauth-token.ts b/server/types/models/oauth/oauth-token.ts index 8399af8f1..6af087e3c 100644 --- a/server/types/models/oauth/oauth-token.ts +++ b/server/types/models/oauth/oauth-token.ts @@ -1,5 +1,5 @@ import { OAuthTokenModel } from '@server/models/oauth/oauth-token' -import { PickWith } from '@shared/core-utils' +import { PickWith } from '@shared/typescript-utils' import { MUserAccountUrl } from '../user/user' type Use = PickWith diff --git a/server/types/models/server/server-blocklist.ts b/server/types/models/server/server-blocklist.ts index 801f179fd..71a4ea963 100644 --- a/server/types/models/server/server-blocklist.ts +++ b/server/types/models/server/server-blocklist.ts @@ -1,5 +1,5 @@ import { ServerBlocklistModel } from '@server/models/server/server-blocklist' -import { PickWith } from '@shared/core-utils' +import { PickWith } from '@shared/typescript-utils' import { MAccountDefault, MAccountFormattable } from '../account/account' import { MServer, MServerFormattable } from './server' diff --git a/server/types/models/server/server.ts b/server/types/models/server/server.ts index 876186fc0..0b16186cd 100644 --- a/server/types/models/server/server.ts +++ b/server/types/models/server/server.ts @@ -1,5 +1,5 @@ +import { FunctionProperties, PickWith } from '@shared/typescript-utils' import { ServerModel } from '../../../models/server/server' -import { FunctionProperties, PickWith } from '@shared/core-utils' import { MAccountBlocklistId } from '../account' type Use = PickWith diff --git a/server/types/models/user/user-notification.ts b/server/types/models/user/user-notification.ts index 918614dd1..db9ec0400 100644 --- a/server/types/models/user/user-notification.ts +++ b/server/types/models/user/user-notification.ts @@ -3,7 +3,7 @@ import { VideoCommentAbuseModel } from '@server/models/abuse/video-comment-abuse import { ApplicationModel } from '@server/models/application/application' import { PluginModel } from '@server/models/server/plugin' import { UserNotificationModel } from '@server/models/user/user-notification' -import { PickWith, PickWithOpt } from '@shared/core-utils' +import { PickWith, PickWithOpt } from '@shared/typescript-utils' import { AbuseModel } from '../../../models/abuse/abuse' import { AccountModel } from '../../../models/account/account' import { ActorModel } from '../../../models/actor/actor' diff --git a/server/types/models/user/user.ts b/server/types/models/user/user.ts index f79220e11..89092c242 100644 --- a/server/types/models/user/user.ts +++ b/server/types/models/user/user.ts @@ -1,7 +1,7 @@ import { AccountModel } from '@server/models/account/account' import { UserModel } from '@server/models/user/user' import { MVideoPlaylist } from '@server/types/models' -import { PickWith, PickWithOpt } from '@shared/core-utils' +import { PickWith, PickWithOpt } from '@shared/typescript-utils' import { MAccount, MAccountDefault, diff --git a/server/types/models/video/thumbnail.ts b/server/types/models/video/thumbnail.ts index 81a29e062..c3b27681f 100644 --- a/server/types/models/video/thumbnail.ts +++ b/server/types/models/video/thumbnail.ts @@ -1,4 +1,4 @@ -import { PickWith } from '@shared/core-utils' +import { PickWith } from '@shared/typescript-utils' import { ThumbnailModel } from '../../../models/video/thumbnail' import { MVideo } from './video' diff --git a/server/types/models/video/video-blacklist.ts b/server/types/models/video/video-blacklist.ts index 2ac912405..048b63bd2 100644 --- a/server/types/models/video/video-blacklist.ts +++ b/server/types/models/video/video-blacklist.ts @@ -1,5 +1,5 @@ +import { PickWith } from '@shared/typescript-utils' import { VideoBlacklistModel } from '../../../models/video/video-blacklist' -import { PickWith } from '@shared/core-utils' import { MVideo, MVideoFormattable } from './video' type Use = PickWith diff --git a/server/types/models/video/video-caption.ts b/server/types/models/video/video-caption.ts index 1f761a866..8cd801064 100644 --- a/server/types/models/video/video-caption.ts +++ b/server/types/models/video/video-caption.ts @@ -1,4 +1,4 @@ -import { PickWith } from '@shared/core-utils' +import { PickWith } from '@shared/typescript-utils' import { VideoCaptionModel } from '../../../models/video/video-caption' import { MVideo, MVideoUUID } from './video' diff --git a/server/types/models/video/video-change-ownership.ts b/server/types/models/video/video-change-ownership.ts index 6cad48e4a..d99f25071 100644 --- a/server/types/models/video/video-change-ownership.ts +++ b/server/types/models/video/video-change-ownership.ts @@ -1,7 +1,7 @@ import { VideoChangeOwnershipModel } from '@server/models/video/video-change-ownership' -import { PickWith } from '@shared/core-utils' +import { PickWith } from '@shared/typescript-utils' import { MAccountDefault, MAccountFormattable } from '../account/account' -import { MVideoWithAllFiles, MVideoFormattable } from './video' +import { MVideoFormattable, MVideoWithAllFiles } from './video' type Use = PickWith diff --git a/server/types/models/video/video-channels.ts b/server/types/models/video/video-channels.ts index c147567d9..af8c2ffe4 100644 --- a/server/types/models/video/video-channels.ts +++ b/server/types/models/video/video-channels.ts @@ -1,4 +1,4 @@ -import { FunctionProperties, PickWith, PickWithOpt } from '@shared/core-utils' +import { FunctionProperties, PickWith, PickWithOpt } from '@shared/typescript-utils' import { VideoChannelModel } from '../../../models/video/video-channel' import { MAccountActor, diff --git a/server/types/models/video/video-comment.ts b/server/types/models/video/video-comment.ts index 83479e7b2..b66de064f 100644 --- a/server/types/models/video/video-comment.ts +++ b/server/types/models/video/video-comment.ts @@ -1,4 +1,4 @@ -import { PickWith, PickWithOpt } from '@shared/core-utils' +import { PickWith, PickWithOpt } from '@shared/typescript-utils' import { VideoCommentModel } from '../../../models/video/video-comment' import { MAccountDefault, MAccountFormattable, MAccountUrl } from '../account' import { MVideo, MVideoAccountLight, MVideoFeed, MVideoIdUrl, MVideoUrl } from './video' diff --git a/server/types/models/video/video-file.ts b/server/types/models/video/video-file.ts index 327a148ce..55603e59c 100644 --- a/server/types/models/video/video-file.ts +++ b/server/types/models/video/video-file.ts @@ -1,8 +1,8 @@ +import { PickWith, PickWithOpt } from '@shared/typescript-utils' import { VideoFileModel } from '../../../models/video/video-file' -import { PickWith, PickWithOpt } from '@shared/core-utils' import { MVideo, MVideoUUID } from './video' import { MVideoRedundancy, MVideoRedundancyFileUrl } from './video-redundancy' -import { MStreamingPlaylistVideo, MStreamingPlaylist } from './video-streaming-playlist' +import { MStreamingPlaylist, MStreamingPlaylistVideo } from './video-streaming-playlist' type Use = PickWith diff --git a/server/types/models/video/video-import.ts b/server/types/models/video/video-import.ts index 759b13c6e..650c293f7 100644 --- a/server/types/models/video/video-import.ts +++ b/server/types/models/video/video-import.ts @@ -1,7 +1,7 @@ import { VideoImportModel } from '@server/models/video/video-import' -import { PickWith, PickWithOpt } from '@shared/core-utils' -import { MVideo, MVideoAccountLight, MVideoFormattable, MVideoTag, MVideoThumbnail, MVideoWithFile } from './video' +import { PickWith, PickWithOpt } from '@shared/typescript-utils' import { MUser } from '../user/user' +import { MVideo, MVideoAccountLight, MVideoFormattable, MVideoTag, MVideoThumbnail, MVideoWithFile } from './video' type Use = PickWith diff --git a/server/types/models/video/video-live.ts b/server/types/models/video/video-live.ts index 346052417..903cea982 100644 --- a/server/types/models/video/video-live.ts +++ b/server/types/models/video/video-live.ts @@ -1,5 +1,5 @@ import { VideoLiveModel } from '@server/models/video/video-live' -import { PickWith } from '@shared/core-utils' +import { PickWith } from '@shared/typescript-utils' import { MVideo } from './video' type Use = PickWith diff --git a/server/types/models/video/video-playlist-element.ts b/server/types/models/video/video-playlist-element.ts index f46ff4d49..eae676096 100644 --- a/server/types/models/video/video-playlist-element.ts +++ b/server/types/models/video/video-playlist-element.ts @@ -1,5 +1,5 @@ import { VideoPlaylistElementModel } from '@server/models/video/video-playlist-element' -import { PickWith } from '@shared/core-utils' +import { PickWith } from '@shared/typescript-utils' import { MVideoFormattable, MVideoThumbnail, MVideoUrl } from './video' import { MVideoPlaylistPrivacy } from './video-playlist' diff --git a/server/types/models/video/video-playlist.ts b/server/types/models/video/video-playlist.ts index 2f9537cf5..33fe5416a 100644 --- a/server/types/models/video/video-playlist.ts +++ b/server/types/models/video/video-playlist.ts @@ -1,9 +1,9 @@ +import { MVideoPlaylistElementLight } from '@server/types/models/video/video-playlist-element' +import { PickWith } from '@shared/typescript-utils' import { VideoPlaylistModel } from '../../../models/video/video-playlist' -import { PickWith } from '@shared/core-utils' import { MAccount, MAccountDefault, MAccountSummary, MAccountSummaryFormattable } from '../account' import { MThumbnail } from './thumbnail' import { MChannelDefault, MChannelSummary, MChannelSummaryFormattable, MChannelUrl } from './video-channels' -import { MVideoPlaylistElementLight } from '@server/types/models/video/video-playlist-element' type Use = PickWith diff --git a/server/types/models/video/video-rate.ts b/server/types/models/video/video-rate.ts index 7bd54f7b0..0dbdf3c41 100644 --- a/server/types/models/video/video-rate.ts +++ b/server/types/models/video/video-rate.ts @@ -1,5 +1,5 @@ import { AccountVideoRateModel } from '@server/models/account/account-video-rate' -import { PickWith } from '@shared/core-utils' +import { PickWith } from '@shared/typescript-utils' import { MAccountAudience, MAccountUrl } from '../account/account' import { MVideo, MVideoFormattable } from './video' diff --git a/server/types/models/video/video-redundancy.ts b/server/types/models/video/video-redundancy.ts index 411375c81..e2a9beb93 100644 --- a/server/types/models/video/video-redundancy.ts +++ b/server/types/models/video/video-redundancy.ts @@ -1,10 +1,10 @@ -import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy' -import { PickWith, PickWithOpt } from '@shared/core-utils' -import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' import { VideoFileModel } from '@server/models/video/video-file' +import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' +import { PickWith, PickWithOpt } from '@shared/typescript-utils' +import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy' +import { MVideoUrl } from './video' import { MVideoFile, MVideoFileVideo } from './video-file' import { MStreamingPlaylistVideo } from './video-streaming-playlist' -import { MVideoUrl } from './video' type Use = PickWith diff --git a/server/types/models/video/video-share.ts b/server/types/models/video/video-share.ts index 78f44e58c..ffc0edad6 100644 --- a/server/types/models/video/video-share.ts +++ b/server/types/models/video/video-share.ts @@ -1,4 +1,4 @@ -import { PickWith } from '@shared/core-utils' +import { PickWith } from '@shared/typescript-utils' import { VideoShareModel } from '../../../models/video/video-share' import { MActorDefault } from '../actor' import { MVideo } from './video' diff --git a/server/types/models/video/video-streaming-playlist.ts b/server/types/models/video/video-streaming-playlist.ts index 1e4dccb8e..1c2f83489 100644 --- a/server/types/models/video/video-streaming-playlist.ts +++ b/server/types/models/video/video-streaming-playlist.ts @@ -1,8 +1,8 @@ +import { PickWith, PickWithOpt } from '@shared/typescript-utils' import { VideoStreamingPlaylistModel } from '../../../models/video/video-streaming-playlist' -import { PickWith, PickWithOpt } from '@shared/core-utils' -import { MVideoRedundancyFileUrl, MVideoRedundancy } from './video-redundancy' import { MVideo } from './video' import { MVideoFile } from './video-file' +import { MVideoRedundancy, MVideoRedundancyFileUrl } from './video-redundancy' type Use = PickWith diff --git a/server/types/models/video/video.ts b/server/types/models/video/video.ts index 9a6b27888..d1af53b92 100644 --- a/server/types/models/video/video.ts +++ b/server/types/models/video/video.ts @@ -1,4 +1,4 @@ -import { PickWith, PickWithOpt } from '@shared/core-utils' +import { PickWith, PickWithOpt } from '@shared/typescript-utils' import { VideoModel } from '../../../models/video/video' import { MTrackerUrl } from '../server/tracker' import { MUserVideoHistoryTime } from '../user/user-video-history' diff --git a/server/types/sequelize.ts b/server/types/sequelize.ts index 535113d01..e399c3d5d 100644 --- a/server/types/sequelize.ts +++ b/server/types/sequelize.ts @@ -1,4 +1,4 @@ -import { AttributesOnly } from '@shared/core-utils' +import { AttributesOnly } from '@shared/typescript-utils' import { Model } from 'sequelize' // Thanks to sequelize-typescript: https://github.com/RobinBuschmann/sequelize-typescript -- cgit v1.2.3