1- import fs from 'fs'
2- import path from 'path'
3- import { fileURLToPath } from 'url'
41import configModule from 'config'
52import * as Sentry from '@sentry/node'
63import Server from './core/server/server.js'
@@ -16,7 +13,7 @@ Sentry.init({
1613 )
1714 if ( filtered . length !== integrations . length - disabledIntegrations . length ) {
1815 throw Error (
19- `An error occurred while filtering integrations. The following inetgrations were found: ${ integrations . map (
16+ `An error occurred while filtering integrations. The following integrations were found: ${ integrations . map (
2017 ( { name } ) => name ,
2118 ) } `,
2219 )
@@ -35,31 +32,6 @@ if (process.argv[3]) {
3532console . log ( 'Configuration:' )
3633console . dir ( config . public , { depth : null } )
3734
38- if ( fs . existsSync ( '.env' ) ) {
39- console . error (
40- 'Legacy .env file found. It should be deleted and replaced with environment variables or config/local.yml' ,
41- )
42- process . exit ( 1 )
43- }
44-
45- if ( config . private . redis_url != null ) {
46- console . error (
47- 'RedisTokenPersistence has been removed. Migrate to SqlTokenPersistence' ,
48- )
49- process . exit ( 1 )
50- }
51-
52- const legacySecretsPath = path . join (
53- path . dirname ( fileURLToPath ( import . meta. url ) ) ,
54- 'private' ,
55- 'secret.json' ,
56- )
57- if ( fs . existsSync ( legacySecretsPath ) ) {
58- console . error (
59- `Legacy secrets file found at ${ legacySecretsPath } . It should be deleted and secrets replaced with environment variables or config/local.yml` ,
60- )
61- process . exit ( 1 )
62- }
6335export const server = new Server ( config )
6436
6537process . on ( 'SIGTERM' , async ( ) => {
0 commit comments