mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-25 04:55:30 +03:00
parent
b31153105f
commit
d022837b5b
@ -1,8 +1,8 @@
|
|||||||
import { CommandFactory } from 'nest-commander';
|
import { CommandFactory } from 'nest-commander';
|
||||||
|
|
||||||
import { shouldFilterException } from 'src/engine/utils/global-exception-handler.util';
|
|
||||||
import { ExceptionHandlerService } from 'src/engine/integrations/exception-handler/exception-handler.service';
|
import { ExceptionHandlerService } from 'src/engine/integrations/exception-handler/exception-handler.service';
|
||||||
import { LoggerService } from 'src/engine/integrations/logger/logger.service';
|
import { LoggerService } from 'src/engine/integrations/logger/logger.service';
|
||||||
|
import { shouldFilterException } from 'src/engine/utils/global-exception-handler.util';
|
||||||
|
|
||||||
import { CommandModule } from './command.module';
|
import { CommandModule } from './command.module';
|
||||||
|
|
||||||
@ -18,6 +18,7 @@ async function bootstrap() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const app = await CommandFactory.createWithoutRunning(CommandModule, {
|
const app = await CommandFactory.createWithoutRunning(CommandModule, {
|
||||||
|
logger: ['error', 'warn', 'log'],
|
||||||
bufferLogs: process.env.LOGGER_IS_BUFFER_ENABLED === 'true',
|
bufferLogs: process.env.LOGGER_IS_BUFFER_ENABLED === 'true',
|
||||||
errorHandler,
|
errorHandler,
|
||||||
serviceErrorHandler: errorHandler,
|
serviceErrorHandler: errorHandler,
|
||||||
|
@ -1,35 +1,35 @@
|
|||||||
import { Command, CommandRunner } from 'nest-commander';
|
import { Command, CommandRunner } from 'nest-commander';
|
||||||
import { EntityManager } from 'typeorm';
|
import { EntityManager } from 'typeorm';
|
||||||
|
|
||||||
import { DataSourceService } from 'src/engine/metadata-modules/data-source/data-source.service';
|
|
||||||
import { seedCompanies } from 'src/database/typeorm-seeds/workspace/companies';
|
|
||||||
import { TypeORMService } from 'src/database/typeorm/typeorm.service';
|
|
||||||
import { seedOpportunity } from 'src/database/typeorm-seeds/workspace/opportunities';
|
|
||||||
import { seedWorkspaceMember } from 'src/database/typeorm-seeds/workspace/workspace-members';
|
|
||||||
import { seedPeople } from 'src/database/typeorm-seeds/workspace/people';
|
|
||||||
import { seedCoreSchema } from 'src/database/typeorm-seeds/core';
|
import { seedCoreSchema } from 'src/database/typeorm-seeds/core';
|
||||||
import { ObjectMetadataService } from 'src/engine/metadata-modules/object-metadata/object-metadata.service';
|
|
||||||
import { WorkspaceDataSourceService } from 'src/engine/workspace-datasource/workspace-datasource.service';
|
|
||||||
import { WorkspaceSyncMetadataService } from 'src/engine/workspace-manager/workspace-sync-metadata/workspace-sync-metadata.service';
|
|
||||||
import {
|
import {
|
||||||
SEED_APPLE_WORKSPACE_ID,
|
SEED_APPLE_WORKSPACE_ID,
|
||||||
SEED_TWENTY_WORKSPACE_ID,
|
SEED_TWENTY_WORKSPACE_ID,
|
||||||
} from 'src/database/typeorm-seeds/core/workspaces';
|
} from 'src/database/typeorm-seeds/core/workspaces';
|
||||||
import { seedConnectedAccount } from 'src/database/typeorm-seeds/workspace/connected-account';
|
|
||||||
import { seedMessage } from 'src/database/typeorm-seeds/workspace/messages';
|
|
||||||
import { seedMessageChannel } from 'src/database/typeorm-seeds/workspace/message-channels';
|
|
||||||
import { seedMessageChannelMessageAssociation } from 'src/database/typeorm-seeds/workspace/message-channel-message-associations';
|
|
||||||
import { seedMessageParticipant } from 'src/database/typeorm-seeds/workspace/message-participants';
|
|
||||||
import { seedMessageThread } from 'src/database/typeorm-seeds/workspace/message-threads';
|
|
||||||
import { viewPrefillData } from 'src/engine/workspace-manager/standard-objects-prefill-data/view';
|
|
||||||
import { seedCalendarEvents } from 'src/database/typeorm-seeds/workspace/calendar-events';
|
|
||||||
import { seedCalendarChannels } from 'src/database/typeorm-seeds/workspace/calendar-channel';
|
import { seedCalendarChannels } from 'src/database/typeorm-seeds/workspace/calendar-channel';
|
||||||
import { seedCalendarChannelEventAssociations } from 'src/database/typeorm-seeds/workspace/calendar-channel-event-association';
|
import { seedCalendarChannelEventAssociations } from 'src/database/typeorm-seeds/workspace/calendar-channel-event-association';
|
||||||
import { seedCalendarEventParticipants } from 'src/database/typeorm-seeds/workspace/calendar-event-participants';
|
import { seedCalendarEventParticipants } from 'src/database/typeorm-seeds/workspace/calendar-event-participants';
|
||||||
|
import { seedCalendarEvents } from 'src/database/typeorm-seeds/workspace/calendar-events';
|
||||||
|
import { seedCompanies } from 'src/database/typeorm-seeds/workspace/companies';
|
||||||
|
import { seedConnectedAccount } from 'src/database/typeorm-seeds/workspace/connected-account';
|
||||||
|
import { seedMessageChannelMessageAssociation } from 'src/database/typeorm-seeds/workspace/message-channel-message-associations';
|
||||||
|
import { seedMessageChannel } from 'src/database/typeorm-seeds/workspace/message-channels';
|
||||||
|
import { seedMessageParticipant } from 'src/database/typeorm-seeds/workspace/message-participants';
|
||||||
|
import { seedMessageThread } from 'src/database/typeorm-seeds/workspace/message-threads';
|
||||||
|
import { seedMessage } from 'src/database/typeorm-seeds/workspace/messages';
|
||||||
|
import { seedOpportunity } from 'src/database/typeorm-seeds/workspace/opportunities';
|
||||||
|
import { seedPeople } from 'src/database/typeorm-seeds/workspace/people';
|
||||||
|
import { seedWorkspaceMember } from 'src/database/typeorm-seeds/workspace/workspace-members';
|
||||||
import { rawDataSource } from 'src/database/typeorm/raw/raw.datasource';
|
import { rawDataSource } from 'src/database/typeorm/raw/raw.datasource';
|
||||||
|
import { TypeORMService } from 'src/database/typeorm/typeorm.service';
|
||||||
import { CacheStorageService } from 'src/engine/integrations/cache-storage/cache-storage.service';
|
import { CacheStorageService } from 'src/engine/integrations/cache-storage/cache-storage.service';
|
||||||
import { InjectCacheStorage } from 'src/engine/integrations/cache-storage/decorators/cache-storage.decorator';
|
import { InjectCacheStorage } from 'src/engine/integrations/cache-storage/decorators/cache-storage.decorator';
|
||||||
import { CacheStorageNamespace } from 'src/engine/integrations/cache-storage/types/cache-storage-namespace.enum';
|
import { CacheStorageNamespace } from 'src/engine/integrations/cache-storage/types/cache-storage-namespace.enum';
|
||||||
|
import { DataSourceService } from 'src/engine/metadata-modules/data-source/data-source.service';
|
||||||
|
import { ObjectMetadataService } from 'src/engine/metadata-modules/object-metadata/object-metadata.service';
|
||||||
|
import { WorkspaceDataSourceService } from 'src/engine/workspace-datasource/workspace-datasource.service';
|
||||||
|
import { viewPrefillData } from 'src/engine/workspace-manager/standard-objects-prefill-data/view';
|
||||||
|
import { WorkspaceSyncMetadataService } from 'src/engine/workspace-manager/workspace-sync-metadata/workspace-sync-metadata.service';
|
||||||
|
|
||||||
// TODO: implement dry-run
|
// TODO: implement dry-run
|
||||||
@Command({
|
@Command({
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
import { NestFactory } from '@nestjs/core';
|
|
||||||
import { ValidationPipe } from '@nestjs/common';
|
import { ValidationPipe } from '@nestjs/common';
|
||||||
|
import { NestFactory } from '@nestjs/core';
|
||||||
import { NestExpressApplication } from '@nestjs/platform-express';
|
import { NestExpressApplication } from '@nestjs/platform-express';
|
||||||
|
|
||||||
import * as Sentry from '@sentry/node';
|
import * as Sentry from '@sentry/node';
|
||||||
import { graphqlUploadExpress } from 'graphql-upload';
|
import '@sentry/tracing';
|
||||||
import bytes from 'bytes';
|
import bytes from 'bytes';
|
||||||
import { useContainer } from 'class-validator';
|
import { useContainer } from 'class-validator';
|
||||||
import '@sentry/tracing';
|
import { graphqlUploadExpress } from 'graphql-upload';
|
||||||
|
|
||||||
import { ApplyCorsToExceptions } from 'src/utils/apply-cors-to-exceptions';
|
import { ApplyCorsToExceptions } from 'src/utils/apply-cors-to-exceptions';
|
||||||
|
|
||||||
import { AppModule } from './app.module';
|
import { AppModule } from './app.module';
|
||||||
|
|
||||||
import { generateFrontConfig } from './utils/generate-front-config';
|
|
||||||
import { settings } from './engine/constants/settings';
|
import { settings } from './engine/constants/settings';
|
||||||
import { LoggerService } from './engine/integrations/logger/logger.service';
|
import { LoggerService } from './engine/integrations/logger/logger.service';
|
||||||
|
import { generateFrontConfig } from './utils/generate-front-config';
|
||||||
|
|
||||||
const bootstrap = async () => {
|
const bootstrap = async () => {
|
||||||
const app = await NestFactory.create<NestExpressApplication>(AppModule, {
|
const app = await NestFactory.create<NestExpressApplication>(AppModule, {
|
||||||
|
Loading…
Reference in New Issue
Block a user