Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6658 workflows add a first twenty piece email sender #6965

Merged
merged 24 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix lint
  • Loading branch information
martmull committed Sep 11, 2024
commit d0d9376f0d1589f4b83decae0e653a8a8846c30b
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from 'packages/twenty-server/src/engine/core-modules/captcha/interfaces/captcha.interface';
export * from 'src/engine/core-modules/captcha/interfaces/captcha.interface';
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,18 @@ import {
ValidateIf,
validateSync,
} from 'class-validator';
import { CastToBoolean } from 'src/engine/core-modules/environment/decorators/cast-to-boolean.decorator';
import { CastToLogLevelArray } from 'src/engine/core-modules/environment/decorators/cast-to-log-level-array.decorator';
import { CastToPositiveNumber } from 'src/engine/core-modules/environment/decorators/cast-to-positive-number.decorator';
import { IsAWSRegion } from 'src/engine/core-modules/environment/decorators/is-aws-region.decorator';
import { IsDuration } from 'src/engine/core-modules/environment/decorators/is-duration.decorator';

import { EmailDriver } from 'src/engine/core-modules/email/interfaces/email.interface';
import { NodeEnvironment } from 'src/engine/core-modules/environment/interfaces/node-environment.interface';
import { LLMChatModelDriver } from 'src/engine/core-modules/llm-chat-model/interfaces/llm-chat-model.interface';
import { LLMTracingDriver } from 'src/engine/core-modules/llm-tracing/interfaces/llm-tracing.interface';
import { AwsRegion } from 'src/engine/core-modules/environment/interfaces/aws-region.interface';
import { SupportDriver } from 'src/engine/core-modules/environment/interfaces/support.interface';

import { CacheStorageType } from 'src/engine/core-modules/cache-storage/types/cache-storage-type.enum';
import { CaptchaDriverType } from 'src/engine/core-modules/captcha/interfaces';
Expand All @@ -31,14 +38,6 @@ import { MessageQueueDriverType } from 'src/engine/core-modules/message-queue/in
import { ServerlessDriverType } from 'src/engine/core-modules/serverless/serverless.interface';
import { assert } from 'src/utils/assert';

import { CastToBoolean } from 'packages/twenty-server/src/engine/core-modules/environment/decorators/cast-to-boolean.decorator';
import { CastToLogLevelArray } from 'packages/twenty-server/src/engine/core-modules/environment/decorators/cast-to-log-level-array.decorator';
import { CastToPositiveNumber } from 'packages/twenty-server/src/engine/core-modules/environment/decorators/cast-to-positive-number.decorator';
import { IsAWSRegion } from 'packages/twenty-server/src/engine/core-modules/environment/decorators/is-aws-region.decorator';
import { IsDuration } from 'packages/twenty-server/src/engine/core-modules/environment/decorators/is-duration.decorator';
import { AwsRegion } from 'packages/twenty-server/src/engine/core-modules/environment/interfaces/aws-region.interface';
import { SupportDriver } from 'packages/twenty-server/src/engine/core-modules/environment/interfaces/support.interface';

export class EnvironmentVariables {
// Misc
@CastToBoolean()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Global, Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';

import { EnvironmentService } from 'packages/twenty-server/src/engine/core-modules/environment/environment.service';
import { ConfigurableModuleClass } from 'packages/twenty-server/src/engine/core-modules/environment/environment.module-definition';
import { validate } from 'packages/twenty-server/src/engine/core-modules/environment/environment-variables';
import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service';
import { ConfigurableModuleClass } from 'src/engine/core-modules/environment/environment.module-definition';
import { validate } from 'src/engine/core-modules/environment/environment-variables';

@Global()
@Module({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Test, TestingModule } from '@nestjs/testing';
import { ConfigService } from '@nestjs/config';

import { EnvironmentService } from 'packages/twenty-server/src/engine/core-modules/environment/environment.service';
import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service';

describe('EnvironmentService', () => {
let service: EnvironmentService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ConfigurableModuleBuilder } from '@nestjs/common';

import { ExceptionHandlerModuleOptions } from 'packages/twenty-server/src/engine/core-modules/exception-handler/interfaces';
import { ExceptionHandlerModuleOptions } from 'src/engine/core-modules/exception-handler/interfaces';

export const {
ConfigurableModuleClass,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { DynamicModule, Global, Module } from '@nestjs/common';

import { ExceptionHandlerSentryDriver } from 'src/engine/core-modules/exception-handler/drivers/sentry.driver';
import { ExceptionHandlerConsoleDriver } from 'src/engine/core-modules/exception-handler/drivers/console.driver';

import { ExceptionHandlerService } from 'packages/twenty-server/src/engine/core-modules/exception-handler/exception-handler.service';
import { ExceptionHandlerDriver } from 'packages/twenty-server/src/engine/core-modules/exception-handler/interfaces';
import { EXCEPTION_HANDLER_DRIVER } from 'packages/twenty-server/src/engine/core-modules/exception-handler/exception-handler.constants';
import { ExceptionHandlerService } from 'src/engine/core-modules/exception-handler/exception-handler.service';
import { ExceptionHandlerDriver } from 'src/engine/core-modules/exception-handler/interfaces';
import { EXCEPTION_HANDLER_DRIVER } from 'src/engine/core-modules/exception-handler/exception-handler.constants';
import {
ConfigurableModuleClass,
OPTIONS_TYPE,
ASYNC_OPTIONS_TYPE,
} from 'packages/twenty-server/src/engine/core-modules/exception-handler/exception-handler.module-definition';
} from 'src/engine/core-modules/exception-handler/exception-handler.module-definition';

import { ExceptionHandlerConsoleDriver } from 'src/engine/core-modules/exception-handler/drivers/console.driver';
import { ExceptionHandlerSentryDriver } from 'src/engine/core-modules/exception-handler/drivers/sentry.driver';

@Global()
@Module({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ExceptionHandlerOptions } from 'packages/twenty-server/src/engine/core-modules/exception-handler/interfaces/exception-handler-options.interface';
import { ExceptionHandlerUser } from 'packages/twenty-server/src/engine/core-modules/exception-handler/interfaces/exception-handler-user.interface';
import { ExceptionHandlerOptions } from 'src/engine/core-modules/exception-handler/interfaces/exception-handler-options.interface';
import { ExceptionHandlerUser } from 'src/engine/core-modules/exception-handler/interfaces/exception-handler-user.interface';

export interface ExceptionHandlerDriverInterface {
captureExceptions(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { OperationTypeNode } from 'graphql';

import { ExceptionHandlerUser } from 'packages/twenty-server/src/engine/core-modules/exception-handler/interfaces/exception-handler-user.interface';
import { ExceptionHandlerUser } from 'src/engine/core-modules/exception-handler/interfaces/exception-handler-user.interface';

export interface ExceptionHandlerOptions {
operation?: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from 'packages/twenty-server/src/engine/core-modules/exception-handler/interfaces/exception-handler.interface';
export * from 'packages/twenty-server/src/engine/core-modules/exception-handler/interfaces/exception-handler-driver.interface';
export * from 'src/engine/core-modules/exception-handler/interfaces/exception-handler.interface';
export * from 'src/engine/core-modules/exception-handler/interfaces/exception-handler-driver.interface';
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import {
FileStorageException,
FileStorageExceptionCode,
} from 'src/engine/core-modules/file-storage/interfaces/file-storage-exception';

import { StorageDriver } from 'packages/twenty-server/src/engine/core-modules/file-storage/drivers/interfaces/storage-driver.interface';
import { StorageDriver } from 'src/engine/core-modules/file-storage/drivers/interfaces/storage-driver.interface';

export interface LocalDriverOptions {
storagePath: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ import {
FileStorageException,
FileStorageExceptionCode,
} from 'src/engine/core-modules/file-storage/interfaces/file-storage-exception';
import { StorageDriver } from 'src/engine/core-modules/file-storage/drivers/interfaces/storage-driver.interface';

import { isDefined } from 'src/utils/is-defined';

import { StorageDriver } from 'packages/twenty-server/src/engine/core-modules/file-storage/drivers/interfaces/storage-driver.interface';

export interface S3DriverOptions extends S3ClientConfig {
bucketName: string;
endpoint?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ConfigurableModuleBuilder } from '@nestjs/common';

import { FileStorageModuleOptions } from 'packages/twenty-server/src/engine/core-modules/file-storage/interfaces';
import { FileStorageModuleOptions } from 'src/engine/core-modules/file-storage/interfaces';

export const {
ConfigurableModuleClass,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { DynamicModule, Global } from '@nestjs/common';

import { FileStorageService } from 'packages/twenty-server/src/engine/core-modules/file-storage/file-storage.service';
import { FileStorageService } from 'src/engine/core-modules/file-storage/file-storage.service';
import {
FileStorageModuleAsyncOptions,
FileStorageModuleOptions,
} from 'packages/twenty-server/src/engine/core-modules/file-storage/interfaces';
import { STORAGE_DRIVER } from 'packages/twenty-server/src/engine/core-modules/file-storage/file-storage.constants';

import { LocalDriver } from 'packages/twenty-server/src/engine/core-modules/file-storage/drivers/local.driver';
import { S3Driver } from 'packages/twenty-server/src/engine/core-modules/file-storage/drivers/s3.driver';
} from 'src/engine/core-modules/file-storage/interfaces';
import { STORAGE_DRIVER } from 'src/engine/core-modules/file-storage/file-storage.constants';
import { LocalDriver } from 'src/engine/core-modules/file-storage/drivers/local.driver';
import { S3Driver } from 'src/engine/core-modules/file-storage/drivers/s3.driver';

@Global()
export class FileStorageModule {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { Inject, Injectable } from '@nestjs/common';

import { Readable } from 'stream';

import { STORAGE_DRIVER } from 'packages/twenty-server/src/engine/core-modules/file-storage/file-storage.constants';
import { STORAGE_DRIVER } from 'src/engine/core-modules/file-storage/file-storage.constants';

import { StorageDriver } from 'packages/twenty-server/src/engine/core-modules/file-storage/drivers/interfaces/storage-driver.interface';
import { StorageDriver } from 'src/engine/core-modules/file-storage/drivers/interfaces/storage-driver.interface';

@Injectable()
export class FileStorageService implements StorageDriver {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from 'packages/twenty-server/src/engine/core-modules/file-storage/interfaces/file-storage.interface';
export * from 'src/engine/core-modules/file-storage/interfaces/file-storage.interface';
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from 'packages/twenty-server/src/engine/core-modules/logger/interfaces/logger.interface';
export * from 'src/engine/core-modules/logger/interfaces/logger.interface';
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ConfigurableModuleBuilder } from '@nestjs/common';

import { LoggerModuleOptions } from 'packages/twenty-server/src/engine/core-modules/logger/interfaces';
import { LoggerModuleOptions } from 'src/engine/core-modules/logger/interfaces';

export const {
ConfigurableModuleClass,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { DynamicModule, Global, ConsoleLogger, Module } from '@nestjs/common';

import { LoggerDriverType } from 'src/engine/core-modules/logger/interfaces';

import { LoggerService } from 'packages/twenty-server/src/engine/core-modules/logger/logger.service';
import { LOGGER_DRIVER } from 'packages/twenty-server/src/engine/core-modules/logger/logger.constants';
import { LoggerService } from 'src/engine/core-modules/logger/logger.service';
import { LOGGER_DRIVER } from 'src/engine/core-modules/logger/logger.constants';
import {
ASYNC_OPTIONS_TYPE,
ConfigurableModuleClass,
OPTIONS_TYPE,
} from 'packages/twenty-server/src/engine/core-modules/logger/logger.module-definition';
} from 'src/engine/core-modules/logger/logger.module-definition';

import { LoggerDriverType } from 'src/engine/core-modules/logger/interfaces';

@Global()
@Module({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
LoggerService as LoggerServiceInterface,
} from '@nestjs/common';

import { LOGGER_DRIVER } from 'packages/twenty-server/src/engine/core-modules/logger/logger.constants';
import { LOGGER_DRIVER } from 'src/engine/core-modules/logger/logger.constants';

@Injectable()
export class LoggerService implements LoggerServiceInterface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ import {
} from 'src/engine/core-modules/message-queue/drivers/interfaces/job-options.interface';
import { MessageQueueJob } from 'src/engine/core-modules/message-queue/interfaces/message-queue-job.interface';
import { MessageQueueWorkerOptions } from 'src/engine/core-modules/message-queue/interfaces/message-queue-worker-options.interface';
import { MessageQueueDriver } from 'src/engine/core-modules/message-queue/drivers/interfaces/message-queue-driver.interface';

import { MessageQueue } from 'src/engine/core-modules/message-queue/message-queue.constants';

import { MessageQueueDriver } from 'packages/twenty-server/src/engine/core-modules/message-queue/drivers/interfaces/message-queue-driver.interface';

export type BullMQDriverOptions = QueueOptions;

export class BullMQDriver implements MessageQueueDriver, OnModuleDestroy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ import {
} from 'src/engine/core-modules/message-queue/drivers/interfaces/job-options.interface';
import { MessageQueueJob } from 'src/engine/core-modules/message-queue/interfaces/message-queue-job.interface';
import { MessageQueueWorkerOptions } from 'src/engine/core-modules/message-queue/interfaces/message-queue-worker-options.interface';
import { MessageQueueDriver } from 'src/engine/core-modules/message-queue/drivers/interfaces/message-queue-driver.interface';

import { MessageQueue } from 'src/engine/core-modules/message-queue/message-queue.constants';

import { MessageQueueDriver } from 'packages/twenty-server/src/engine/core-modules/message-queue/drivers/interfaces/message-queue-driver.interface';

export type PgBossDriverOptions = PgBoss.ConstructorOptions;

const DEFAULT_PG_BOSS_CRON_PATTERN_WHEN_NOT_PROVIDED = '*/1 * * * *';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import {
MessageQueueJobData,
MessageQueueJob,
} from 'src/engine/core-modules/message-queue/interfaces/message-queue-job.interface';
import { MessageQueueDriver } from 'src/engine/core-modules/message-queue/drivers/interfaces/message-queue-driver.interface';

import { MessageQueue } from 'src/engine/core-modules/message-queue/message-queue.constants';

import { MessageQueueDriver } from 'packages/twenty-server/src/engine/core-modules/message-queue/drivers/interfaces/message-queue-driver.interface';

export class SyncDriver implements MessageQueueDriver {
private readonly logger = new Logger(SyncDriver.name);
private workersMap: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from 'packages/twenty-server/src/engine/core-modules/message-queue/interfaces/message-queue-module-options.interface';
export * from 'src/engine/core-modules/message-queue/interfaces/message-queue-module-options.interface';
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { Module } from '@nestjs/core/injector/module';
import { Injector } from '@nestjs/core/injector/injector';
import { InstanceWrapper } from '@nestjs/core/injector/instance-wrapper';

import { MessageQueueMetadataAccessor } from 'src/engine/core-modules/message-queue/message-queue-metadata.accessor';

import { MessageQueueWorkerOptions } from 'src/engine/core-modules/message-queue/interfaces/message-queue-worker-options.interface';
import {
MessageQueueJob,
Expand All @@ -20,8 +22,6 @@ import { getQueueToken } from 'src/engine/core-modules/message-queue/utils/get-q
import { ExceptionHandlerService } from 'src/engine/core-modules/exception-handler/exception-handler.service';
import { shouldFilterException } from 'src/engine/utils/global-exception-handler.util';

import { MessageQueueMetadataAccessor } from 'packages/twenty-server/src/engine/core-modules/message-queue/message-queue-metadata.accessor';

interface ProcessorGroup {
instance: object;
host: Module;
Expand Down
2 changes: 1 addition & 1 deletion packages/twenty-server/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import { useContainer } from 'class-validator';
import { graphqlUploadExpress } from 'graphql-upload';

import { ApplyCorsToExceptions } from 'src/utils/apply-cors-to-exceptions';
import { LoggerService } from 'src/engine/core-modules/logger/logger.service';

import { AppModule } from './app.module';

import { settings } from './engine/constants/settings';
import { LoggerService } from 'src/engine/core-modules/logger/logger.service';
import { generateFrontConfig } from './utils/generate-front-config';

const bootstrap = async () => {
Expand Down
Loading