Skip to content
Snippets Groups Projects
Unverified Commit 94315564 authored by Pierre Lehnen's avatar Pierre Lehnen Committed by GitHub
Browse files

chore: restore FOSS startup process (#35198)

parent 67ae2886
No related branches found
No related tags found
No related merge requests found
export { startLicense } from '../ee/app/license/server/startup';
export { registerEEBroker } from '../ee/server';
......@@ -11,9 +11,7 @@ import { configureServer } from './configuration';
import { registerServices } from './services/startup';
import { startup } from './startup';
import { settings } from '../app/settings/server';
import { startLicense } from '../ee/app/license/server/startup';
import { registerEEBroker } from '../ee/server';
import { startFederationService } from '../ee/server/startup/services';
import { startRocketChat } from '../startRocketChat';
import './routes';
import '../app/lib/server/startup';
......@@ -24,8 +22,6 @@ import '../lib/oauthRedirectUriServer';
import './lib/pushConfig';
import './features/EmailInbox/index';
await Promise.all([configureServer(settings), registerServices(), registerEEBroker(), startup()]);
await Promise.all([configureServer(settings), registerServices(), startup()]);
await startLicense();
await Promise.all([startFederationService()]);
await startRocketChat();
import { startLicense } from './ee/app/license/server/startup';
import { registerEEBroker } from './ee/server';
import { startFederationService } from './ee/server/startup/services';
const loadBeforeLicense = async () => {
await registerEEBroker();
};
const loadAfterLicense = async () => {
await startFederationService();
};
export const startRocketChat = async () => {
await loadBeforeLicense();
await startLicense();
await loadAfterLicense();
};
// This file is used in FOSS builds of Rocket.Chat to replace the default ee.ts file with mocked functions
export const startLicense = async () => undefined;
export const registerEEBroker = async () => undefined;
// This file is used in FOSS builds of Rocket.Chat to replace the default startRocketChat.ts file, removing references to licensed code.
export const startRocketChat = async () => {
// Nothing to do here
};
......@@ -16,9 +16,9 @@ const fossify = async () => {
await fs.rmdir('./apps/meteor/ee', removeOptions);
console.log('Replacing main files...');
await fs.unlink('./apps/meteor/server/ee.ts');
await fs.unlink('./apps/meteor/startRocketChat.ts');
await fs.rename('./apps/meteor/server/foss.ts', './apps/meteor/server/ee.ts');
await fs.rename('./apps/meteor/startRocketChatFOSS.ts', './apps/meteor/startRocketChat.ts');
console.log('Done.');
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment