diff options
author | Chocobozzz <me@florianbigard.com> | 2022-01-03 17:13:11 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-01-06 08:26:14 +0100 |
commit | f8360396ffabd2f95e9ece9c5755173bae0114b6 (patch) | |
tree | 83467f70bb5d5c2faa61c45e1d87b538c6c8fe5e /scripts/prune-storage.ts | |
parent | cea093bca5b9d311b5c1d0539d53e965c901015b (diff) | |
download | PeerTube-f8360396ffabd2f95e9ece9c5755173bae0114b6.tar.gz PeerTube-f8360396ffabd2f95e9ece9c5755173bae0114b6.tar.zst PeerTube-f8360396ffabd2f95e9ece9c5755173bae0114b6.zip |
Stop using tsconfig register
Prefer to replace paths at compile time
Diffstat (limited to 'scripts/prune-storage.ts')
-rwxr-xr-x | scripts/prune-storage.ts | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/scripts/prune-storage.ts b/scripts/prune-storage.ts index 12d78fdc6..bb1e8e024 100755 --- a/scripts/prune-storage.ts +++ b/scripts/prune-storage.ts | |||
@@ -1,22 +1,19 @@ | |||
1 | import { registerTSPaths } from '../server/helpers/register-ts-paths' | ||
2 | registerTSPaths() | ||
3 | |||
4 | import { start, get } from 'prompt' | ||
5 | import { join, basename } from 'path' | ||
6 | import { CONFIG } from '../server/initializers/config' | ||
7 | import { VideoModel } from '../server/models/video/video' | ||
8 | import { initDatabaseModels } from '../server/initializers/database' | ||
9 | import { readdir, remove, stat } from 'fs-extra' | ||
10 | import { VideoRedundancyModel } from '../server/models/redundancy/video-redundancy' | ||
11 | import { map } from 'bluebird' | 1 | import { map } from 'bluebird' |
12 | import { getUUIDFromFilename } from '../server/helpers/utils' | 2 | import { readdir, remove, stat } from 'fs-extra' |
13 | import { ThumbnailModel } from '../server/models/video/thumbnail' | ||
14 | import { ActorImageModel } from '../server/models/actor/actor-image' | ||
15 | import { uniq, values } from 'lodash' | 3 | import { uniq, values } from 'lodash' |
16 | import { ThumbnailType } from '@shared/models' | 4 | import { basename, join } from 'path' |
17 | import { VideoFileModel } from '@server/models/video/video-file' | 5 | import { get, start } from 'prompt' |
18 | import { HLS_REDUNDANCY_DIRECTORY, HLS_STREAMING_PLAYLIST_DIRECTORY } from '@server/initializers/constants' | 6 | import { HLS_REDUNDANCY_DIRECTORY, HLS_STREAMING_PLAYLIST_DIRECTORY } from '@server/initializers/constants' |
7 | import { VideoFileModel } from '@server/models/video/video-file' | ||
19 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' | 8 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' |
9 | import { ThumbnailType } from '@shared/models' | ||
10 | import { getUUIDFromFilename } from '../server/helpers/utils' | ||
11 | import { CONFIG } from '../server/initializers/config' | ||
12 | import { initDatabaseModels } from '../server/initializers/database' | ||
13 | import { ActorImageModel } from '../server/models/actor/actor-image' | ||
14 | import { VideoRedundancyModel } from '../server/models/redundancy/video-redundancy' | ||
15 | import { ThumbnailModel } from '../server/models/video/thumbnail' | ||
16 | import { VideoModel } from '../server/models/video/video' | ||
20 | 17 | ||
21 | run() | 18 | run() |
22 | .then(() => process.exit(0)) | 19 | .then(() => process.exit(0)) |