]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/initializers/checker-before-init.ts
Fix playlist more button with long video names
[github/Chocobozzz/PeerTube.git] / server / initializers / checker-before-init.ts
index 622ad7d6b12b249aa2c0bff3374c22a9d7abbbc0..55bc820f5e32e5c62e9b4b518e2787e5dd54648d 100644 (file)
@@ -1,5 +1,6 @@
 import * as config from 'config'
 import { promisify0 } from '../helpers/core-utils'
+import { logger } from '../helpers/logger'
 
 // ONLY USE CORE MODULES IN THIS FILE!
 
@@ -10,8 +11,9 @@ function checkMissedConfig () {
     'trust_proxy',
     'database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password', 'database.pool.max',
     'smtp.hostname', 'smtp.port', 'smtp.username', 'smtp.password', 'smtp.tls', 'smtp.from_address',
+    'email.body.signature', 'email.object.prefix',
     'storage.avatars', 'storage.videos', 'storage.logs', 'storage.previews', 'storage.thumbnails', 'storage.torrents', 'storage.cache',
-    'storage.redundancy', 'storage.tmp', 'storage.streaming_playlists',
+    'storage.redundancy', 'storage.tmp', 'storage.streaming_playlists', 'storage.plugins',
     'log.level',
     'user.video_quota', 'user.video_quota_daily',
     'csp.enabled', 'csp.report_only', 'csp.report_uri',
@@ -28,7 +30,8 @@ function checkMissedConfig () {
     'followers.instance.enabled', 'followers.instance.manual_approval',
     'tracker.enabled', 'tracker.private', 'tracker.reject_too_many_announces',
     'history.videos.max_age', 'views.videos.remote.max_age',
-    'rates_limit.login.window', 'rates_limit.login.max', 'rates_limit.ask_send_email.window', 'rates_limit.ask_send_email.max'
+    'rates_limit.login.window', 'rates_limit.login.max', 'rates_limit.ask_send_email.window', 'rates_limit.ask_send_email.max',
+    'theme.default'
   ]
   const requiredAlternatives = [
     [ // set
@@ -107,10 +110,23 @@ async function checkFFmpegEncoders (): Promise<Map<string, boolean>> {
   return supportedOptionalEncoders
 }
 
+function checkNodeVersion () {
+  const v = process.version
+  const majorString = v.split('.')[0].replace('v', '')
+  const major = parseInt(majorString, 10)
+
+  logger.debug('Checking NodeJS version %s.', v)
+
+  if (major < 10) {
+    logger.warn('Your NodeJS version %s is deprecated. Please use Node 10.', v)
+  }
+}
+
 // ---------------------------------------------------------------------------
 
 export {
   checkFFmpeg,
   checkFFmpegEncoders,
-  checkMissedConfig
+  checkMissedConfig,
+  checkNodeVersion
 }