From 0628157fe9662fdb2b6fa658b8b53fe684c013ce Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 29 Dec 2021 14:44:58 +0100 Subject: Move uuid stuff in extra utils Since it requires an external dependency --- server/lib/activitypub/actors/shared/object-to-model-attributes.ts | 3 ++- server/lib/local-actor.ts | 3 ++- server/lib/paths.ts | 3 ++- server/lib/user.ts | 2 +- server/lib/video-path-manager.ts | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) (limited to 'server/lib') diff --git a/server/lib/activitypub/actors/shared/object-to-model-attributes.ts b/server/lib/activitypub/actors/shared/object-to-model-attributes.ts index 38d93c108..23bc972e5 100644 --- a/server/lib/activitypub/actors/shared/object-to-model-attributes.ts +++ b/server/lib/activitypub/actors/shared/object-to-model-attributes.ts @@ -2,7 +2,8 @@ import { isActivityPubUrlValid } from '@server/helpers/custom-validators/activit import { MIMETYPES } from '@server/initializers/constants' import { ActorModel } from '@server/models/actor/actor' import { FilteredModelAttributes } from '@server/types' -import { buildUUID, getLowercaseExtension } from '@shared/core-utils' +import { getLowercaseExtension } from '@shared/core-utils' +import { buildUUID } from '@shared/extra-utils' import { ActivityPubActor, ActorImageType } from '@shared/models' function getActorAttributesFromObject ( diff --git a/server/lib/local-actor.ts b/server/lib/local-actor.ts index 04ad98f3e..c6826759b 100644 --- a/server/lib/local-actor.ts +++ b/server/lib/local-actor.ts @@ -3,7 +3,8 @@ import { queue } from 'async' import LRUCache from 'lru-cache' import { join } from 'path' import { ActorModel } from '@server/models/actor/actor' -import { buildUUID, getLowercaseExtension } from '@shared/core-utils' +import { getLowercaseExtension } from '@shared/core-utils' +import { buildUUID } from '@shared/extra-utils' import { ActivityPubActorType, ActorImageType } from '@shared/models' import { retryTransactionWrapper } from '../helpers/database-utils' import { processImage } from '../helpers/image-utils' diff --git a/server/lib/paths.ts b/server/lib/paths.ts index bf0c3a86b..5a85bea42 100644 --- a/server/lib/paths.ts +++ b/server/lib/paths.ts @@ -2,7 +2,8 @@ import { join } from 'path' import { CONFIG } from '@server/initializers/config' import { HLS_REDUNDANCY_DIRECTORY, HLS_STREAMING_PLAYLIST_DIRECTORY } from '@server/initializers/constants' import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo, MVideoFile, MVideoUUID } from '@server/types/models' -import { buildUUID, removeFragmentedMP4Ext } from '@shared/core-utils' +import { removeFragmentedMP4Ext } from '@shared/core-utils' +import { buildUUID } from '@shared/extra-utils' // ################## Video file name ################## diff --git a/server/lib/user.ts b/server/lib/user.ts index 3ba0c0ca4..0d292ac90 100644 --- a/server/lib/user.ts +++ b/server/lib/user.ts @@ -1,7 +1,7 @@ import { Transaction } from 'sequelize/types' import { UserModel } from '@server/models/user/user' import { MActorDefault } from '@server/types/models/actor' -import { buildUUID } from '@shared/core-utils' +import { buildUUID } from '@shared/extra-utils' import { ActivityPubActorType } from '../../shared/models/activitypub' import { UserNotificationSetting, UserNotificationSettingValue } from '../../shared/models/users' import { SERVER_ACTOR_NAME, WEBSERVER } from '../initializers/constants' diff --git a/server/lib/video-path-manager.ts b/server/lib/video-path-manager.ts index 4027f885d..c3f55fd95 100644 --- a/server/lib/video-path-manager.ts +++ b/server/lib/video-path-manager.ts @@ -10,7 +10,7 @@ import { MVideoFileVideo, MVideoUUID } from '@server/types/models' -import { buildUUID } from '@shared/core-utils' +import { buildUUID } from '@shared/extra-utils' import { VideoStorage } from '@shared/models' import { makeHLSFileAvailable, makeWebTorrentFileAvailable } from './object-storage' import { getHLSDirectory, getHLSRedundancyDirectory, getHlsResolutionPlaylistFilename } from './paths' -- cgit v1.2.3