refactor: Setup typescript project references across workflow, core, and cli (#4519)

* refactor: use consistent folder structure across workflow, core, and cli

* setup typescript project references across workflow, core, and cli
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2022-11-09 15:25:00 +01:00
committed by GitHub
parent de96def372
commit 698d96a617
251 changed files with 1284 additions and 1134 deletions

View File

@@ -1,6 +1,6 @@
import { BeforeUpdate, CreateDateColumn, UpdateDateColumn } from 'typeorm';
import { IsDate, IsOptional } from 'class-validator';
import config from '../../../config';
import config from '@/config';
const dbType = config.getEnv('database.type');

View File

@@ -3,7 +3,7 @@ import { Column, Entity, Index, OneToMany, PrimaryGeneratedColumn } from 'typeor
import { IsArray, IsObject, IsString, Length } from 'class-validator';
import { SharedCredentials } from './SharedCredentials';
import { AbstractEntity, jsonColumnType } from './AbstractEntity';
import type { ICredentialsDb } from '../../Interfaces';
import type { ICredentialsDb } from '@/Interfaces';
@Entity()
export class CredentialsEntity extends AbstractEntity implements ICredentialsDb {

View File

@@ -1,7 +1,7 @@
import type { WorkflowExecuteMode } from 'n8n-workflow';
import { Column, Entity, Index, PrimaryGeneratedColumn } from 'typeorm';
import { datetimeColumnType, jsonColumnType } from './AbstractEntity';
import type { IExecutionFlattedDb, IWorkflowDb } from '../../Interfaces';
import type { IExecutionFlattedDb, IWorkflowDb } from '@/Interfaces';
@Entity()
@Index(['workflowId', 'id'])

View File

@@ -1,6 +1,11 @@
import type { IDataObject } from 'n8n-workflow';
import { Column, Entity, PrimaryColumn } from 'typeorm';
import { ISettingsDb } from '../..';
export interface ISettingsDb {
key: string;
value: string | boolean | IDataObject | number;
loadOnStartup: boolean;
}
@Entity()
export class Settings implements ISettingsDb {

View File

@@ -1,7 +1,7 @@
import { Column, Entity, Generated, Index, ManyToMany, PrimaryColumn } from 'typeorm';
import { IsString, Length } from 'class-validator';
import { ITagDb } from '../../Interfaces';
import { ITagDb } from '@/Interfaces';
import { idStringifier } from '../utils/transformers';
import { WorkflowEntity } from './WorkflowEntity';
import { AbstractEntity } from './AbstractEntity';

View File

@@ -18,7 +18,7 @@ import { SharedCredentials } from './SharedCredentials';
import { NoXss } from '../utils/customValidators';
import { objectRetriever, lowerCaser } from '../utils/transformers';
import { AbstractEntity, jsonColumnType } from './AbstractEntity';
import type { IPersonalizationSurveyAnswers, IUserSettings } from '../../Interfaces';
import type { IPersonalizationSurveyAnswers, IUserSettings } from '@/Interfaces';
export const MIN_PASSWORD_LENGTH = 8;

View File

@@ -1,6 +1,6 @@
import { Column, Entity, Index, PrimaryColumn } from 'typeorm';
import { IWebhookDb } from '../../Interfaces';
import { IWebhookDb } from '@/Interfaces';
@Entity()
@Index(['webhookId', 'method', 'pathLength'])

View File

@@ -23,13 +23,13 @@ import {
PrimaryGeneratedColumn,
} from 'typeorm';
import * as config from '../../../config';
import config from '@/config';
import { TagEntity } from './TagEntity';
import { SharedWorkflow } from './SharedWorkflow';
import { objectRetriever, sqlite } from '../utils/transformers';
import { AbstractEntity, jsonColumnType } from './AbstractEntity';
import type { IWorkflowDb } from '../../Interfaces';
import { alphabetizeKeys } from '../../utils';
import type { IWorkflowDb } from '@/Interfaces';
import { alphabetizeKeys } from '@/utils';
@Entity()
export class WorkflowEntity extends AbstractEntity implements IWorkflowDb {