From 06aad80165d09a8863ab8103149a8ff518b10641 Mon Sep 17 00:00:00 2001 From: lutangar Date: Tue, 2 Nov 2021 19:11:20 +0100 Subject: chore(refactor): remove shared folder dependencies to the server Many files from the `shared` folder were importing files from the `server` folder. When attempting to use Typescript project references to describe dependencies, it highlighted a circular dependency beetween `shared` <-> `server`. The Typescript project forbid such usages. Using project references greatly improve performance by rebuilding only the updated project and not all source files. > see https://www.typescriptlang.org/docs/handbook/project-references.html --- server/helpers/webtorrent.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/helpers/webtorrent.ts') diff --git a/server/helpers/webtorrent.ts b/server/helpers/webtorrent.ts index ecc703646..67cb3971d 100644 --- a/server/helpers/webtorrent.ts +++ b/server/helpers/webtorrent.ts @@ -14,7 +14,8 @@ import { MVideo } from '@server/types/models/video/video' import { MVideoFile, MVideoFileRedundanciesOpt } from '@server/types/models/video/video-file' import { MStreamingPlaylistVideo } from '@server/types/models/video/video-streaming-playlist' import { CONFIG } from '../initializers/config' -import { promisify2, sha1 } from './core-utils' +import { promisify2 } from './core-utils' +import { sha1 } from '@shared/core-utils/crypto' import { logger } from './logger' import { generateVideoImportTmpPath } from './utils' import { extractVideo } from './video' -- cgit v1.2.3