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/migrations | |
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/migrations')
-rw-r--r-- | scripts/migrations/peertube-2.1.ts | 15 | ||||
-rw-r--r-- | scripts/migrations/peertube-4.0.ts | 11 |
2 files changed, 10 insertions, 16 deletions
diff --git a/scripts/migrations/peertube-2.1.ts b/scripts/migrations/peertube-2.1.ts index 4bbc203c1..2e316d996 100644 --- a/scripts/migrations/peertube-2.1.ts +++ b/scripts/migrations/peertube-2.1.ts | |||
@@ -1,15 +1,12 @@ | |||
1 | import { registerTSPaths } from '../../server/helpers/register-ts-paths' | ||
2 | registerTSPaths() | ||
3 | |||
4 | import { initDatabaseModels, sequelizeTypescript } from '../../server/initializers/database' | ||
5 | import * as Sequelize from 'sequelize' | ||
6 | import { join } from 'path' | ||
7 | import { HLS_STREAMING_PLAYLIST_DIRECTORY, STATIC_PATHS, WEBSERVER } from '@server/initializers/constants' | ||
8 | import { pathExists, stat, writeFile } from 'fs-extra' | 1 | import { pathExists, stat, writeFile } from 'fs-extra' |
9 | import { createTorrentPromise } from '@server/helpers/webtorrent' | ||
10 | import { CONFIG } from '@server/initializers/config' | ||
11 | import parseTorrent from 'parse-torrent' | 2 | import parseTorrent from 'parse-torrent' |
3 | import { join } from 'path' | ||
4 | import * as Sequelize from 'sequelize' | ||
12 | import { logger } from '@server/helpers/logger' | 5 | import { logger } from '@server/helpers/logger' |
6 | import { createTorrentPromise } from '@server/helpers/webtorrent' | ||
7 | import { CONFIG } from '@server/initializers/config' | ||
8 | import { HLS_STREAMING_PLAYLIST_DIRECTORY, STATIC_PATHS, WEBSERVER } from '@server/initializers/constants' | ||
9 | import { initDatabaseModels, sequelizeTypescript } from '../../server/initializers/database' | ||
13 | 10 | ||
14 | run() | 11 | run() |
15 | .then(() => process.exit(0)) | 12 | .then(() => process.exit(0)) |
diff --git a/scripts/migrations/peertube-4.0.ts b/scripts/migrations/peertube-4.0.ts index abf431888..64cf45474 100644 --- a/scripts/migrations/peertube-4.0.ts +++ b/scripts/migrations/peertube-4.0.ts | |||
@@ -1,16 +1,13 @@ | |||
1 | import { registerTSPaths } from '../../server/helpers/register-ts-paths' | 1 | import Bluebird from 'bluebird' |
2 | registerTSPaths() | 2 | import { move, readFile, writeFile } from 'fs-extra' |
3 | |||
4 | import { join } from 'path' | 3 | import { join } from 'path' |
4 | import { federateVideoIfNeeded } from '@server/lib/activitypub/videos' | ||
5 | import { JobQueue } from '@server/lib/job-queue' | 5 | import { JobQueue } from '@server/lib/job-queue' |
6 | import { initDatabaseModels } from '../../server/initializers/database' | ||
7 | import { generateHLSMasterPlaylistFilename, generateHlsSha256SegmentsFilename, getHlsResolutionPlaylistFilename } from '@server/lib/paths' | 6 | import { generateHLSMasterPlaylistFilename, generateHlsSha256SegmentsFilename, getHlsResolutionPlaylistFilename } from '@server/lib/paths' |
8 | import { VideoPathManager } from '@server/lib/video-path-manager' | 7 | import { VideoPathManager } from '@server/lib/video-path-manager' |
9 | import { VideoModel } from '@server/models/video/video' | 8 | import { VideoModel } from '@server/models/video/video' |
10 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' | 9 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' |
11 | import { move, readFile, writeFile } from 'fs-extra' | 10 | import { initDatabaseModels } from '../../server/initializers/database' |
12 | import Bluebird from 'bluebird' | ||
13 | import { federateVideoIfNeeded } from '@server/lib/activitypub/videos' | ||
14 | 11 | ||
15 | run() | 12 | run() |
16 | .then(() => process.exit(0)) | 13 | .then(() => process.exit(0)) |