Revert " Simplify config imports in cli package (#1840)" (#1931)

This reverts commit c21c8b3369.
This commit is contained in:
Ben Hesseldieck 2021-06-23 11:20:07 +02:00 committed by GitHub
parent 92a2e863f3
commit d3a1d3ffef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 97 additions and 107 deletions

View file

@ -1,7 +1,6 @@
#!/usr/bin/env node #!/usr/bin/env node
var alias = require('module-alias');
var path = require('path'); // tslint:disable-line:no-var-keyword var path = require('path'); // tslint:disable-line:no-var-keyword
alias(path.resolve(__dirname, "../"));
// Make sure that it also find the config folder when it // Make sure that it also find the config folder when it
// did get started from another folder that the root one. // did get started from another folder that the root one.

View file

@ -7,7 +7,7 @@ import { Command, flags } from '@oclif/command';
const open = require('open'); const open = require('open');
import * as Redis from 'ioredis'; import * as Redis from 'ioredis';
import { config } from '@config'; import * as config from '../config';
import { import {
ActiveExecutions, ActiveExecutions,
ActiveWorkflowRunner, ActiveWorkflowRunner,
@ -25,7 +25,7 @@ import {
} from '../src'; } from '../src';
import { IDataObject } from 'n8n-workflow'; import { IDataObject } from 'n8n-workflow';
import { import {
getLogger, getLogger,
} from '../src/Logger'; } from '../src/Logger';

View file

@ -4,7 +4,7 @@ import {
import { Command, flags } from '@oclif/command'; import { Command, flags } from '@oclif/command';
import * as Redis from 'ioredis'; import * as Redis from 'ioredis';
import { config } from '@config'; import * as config from '../config';
import { import {
ActiveExecutions, ActiveExecutions,
ActiveWorkflowRunner, ActiveWorkflowRunner,
@ -20,7 +20,7 @@ import {
} from '../src'; } from '../src';
import { IDataObject } from 'n8n-workflow'; import { IDataObject } from 'n8n-workflow';
import { import {
getLogger, getLogger,
} from '../src/Logger'; } from '../src/Logger';

View file

@ -37,7 +37,7 @@ import {
WorkflowExecuteAdditionalData, WorkflowExecuteAdditionalData,
} from '../src'; } from '../src';
import { import {
getLogger, getLogger,
} from '../src/Logger'; } from '../src/Logger';
@ -45,7 +45,7 @@ import {
LoggerProxy, LoggerProxy,
} from 'n8n-workflow'; } from 'n8n-workflow';
import { config } from '@config'; import * as config from '../config';
import * as Bull from 'bull'; import * as Bull from 'bull';
import * as Queue from '../src/Queue'; import * as Queue from '../src/Queue';

View file

@ -5,7 +5,7 @@ import * as core from 'n8n-core';
dotenv.config(); dotenv.config();
export const config = convict({ const config = convict({
database: { database: {
type: { type: {
@ -633,3 +633,4 @@ config.validate({
allowed: 'strict', allowed: 'strict',
}); });
export = config;

View file

@ -105,7 +105,6 @@
"jwks-rsa": "~1.12.1", "jwks-rsa": "~1.12.1",
"localtunnel": "^2.0.0", "localtunnel": "^2.0.0",
"lodash.get": "^4.4.2", "lodash.get": "^4.4.2",
"module-alias": "^2.2.2",
"mysql2": "~2.2.0", "mysql2": "~2.2.0",
"n8n-core": "~0.75.0", "n8n-core": "~0.75.0",
"n8n-editor-ui": "~0.95.0", "n8n-editor-ui": "~0.95.0",
@ -122,9 +121,6 @@
"typeorm": "^0.2.30", "typeorm": "^0.2.30",
"winston": "^3.3.3" "winston": "^3.3.3"
}, },
"_moduleAliases": {
"@config": "./dist/config/index.js"
},
"jest": { "jest": {
"transform": { "transform": {
"^.+\\.tsx?$": "ts-jest" "^.+\\.tsx?$": "ts-jest"

View file

@ -16,7 +16,7 @@ import {
import { TlsOptions } from 'tls'; import { TlsOptions } from 'tls';
import { config } from '@config'; import * as config from '../config';
import { entities } from './databases/entities'; import { entities } from './databases/entities';

View file

@ -5,7 +5,7 @@ import {
IExternalHooksFunctions, IExternalHooksFunctions,
} from './'; } from './';
import { config } from '@config'; import * as config from '../config';
class ExternalHooksClass implements IExternalHooksClass { class ExternalHooksClass implements IExternalHooksClass {

View file

@ -1,4 +1,4 @@
import { config } from '@config'; import * as config from '../config';
import * as express from 'express'; import * as express from 'express';
import { join as pathJoin } from 'path'; import { join as pathJoin } from 'path';
import { readFile as fsReadFile } from 'fs/promises'; import { readFile as fsReadFile } from 'fs/promises';

View file

@ -11,7 +11,7 @@ import {
LoggerProxy, LoggerProxy,
} from 'n8n-workflow'; } from 'n8n-workflow';
import { config } from '@config'; import * as config from '../config';
import { import {
getLogger, getLogger,

View file

@ -1,4 +1,4 @@
import { config } from '@config'; import config = require('../config');
import * as winston from 'winston'; import * as winston from 'winston';
import { import {

View file

@ -1,14 +1,14 @@
import * as Bull from 'bull'; import * as Bull from 'bull';
import { config } from '@config'; import * as config from '../config';
import { IBullJobData } from './Interfaces'; import { IBullJobData } from './Interfaces';
export class Queue { export class Queue {
private jobQueue: Bull.Queue; private jobQueue: Bull.Queue;
constructor() { constructor() {
const prefix = config.get('queue.bull.prefix') as string; const prefix = config.get('queue.bull.prefix') as string;
const redisOptions = config.get('queue.bull.redis') as object; const redisOptions = config.get('queue.bull.redis') as object;
// Disabling ready check is necessary as it allows worker to // Disabling ready check is necessary as it allows worker to
// quickly reconnect to Redis if Redis crashes or is unreachable // quickly reconnect to Redis if Redis crashes or is unreachable
// for some time. With it enabled, worker might take minutes to realize // for some time. With it enabled, worker might take minutes to realize
// redis is back up and resume working. // redis is back up and resume working.
@ -16,25 +16,25 @@ export class Queue {
// @ts-ignore // @ts-ignore
this.jobQueue = new Bull('jobs', { prefix, redis: redisOptions, enableReadyCheck: false }); this.jobQueue = new Bull('jobs', { prefix, redis: redisOptions, enableReadyCheck: false });
} }
async add(jobData: IBullJobData, jobOptions: object): Promise<Bull.Job> { async add(jobData: IBullJobData, jobOptions: object): Promise<Bull.Job> {
return await this.jobQueue.add(jobData,jobOptions); return await this.jobQueue.add(jobData,jobOptions);
} }
async getJob(jobId: Bull.JobId): Promise<Bull.Job | null> { async getJob(jobId: Bull.JobId): Promise<Bull.Job | null> {
return await this.jobQueue.getJob(jobId); return await this.jobQueue.getJob(jobId);
} }
async getJobs(jobTypes: Bull.JobStatus[]): Promise<Bull.Job[]> { async getJobs(jobTypes: Bull.JobStatus[]): Promise<Bull.Job[]> {
return await this.jobQueue.getJobs(jobTypes); return await this.jobQueue.getJobs(jobTypes);
} }
getBullObjectInstance(): Bull.Queue { getBullObjectInstance(): Bull.Queue {
return this.jobQueue; return this.jobQueue;
} }
/** /**
* *
* @param job A Bull.Job instance * @param job A Bull.Job instance
* @returns boolean true if we were able to securely stop the job * @returns boolean true if we were able to securely stop the job
*/ */
@ -62,6 +62,6 @@ export function getInstance(): Queue {
if (activeQueueInstance === undefined) { if (activeQueueInstance === undefined) {
activeQueueInstance = new Queue(); activeQueueInstance = new Queue();
} }
return activeQueueInstance; return activeQueueInstance;
} }

View file

@ -101,7 +101,7 @@ import {
import * as basicAuth from 'basic-auth'; import * as basicAuth from 'basic-auth';
import * as compression from 'compression'; import * as compression from 'compression';
import { config } from '@config'; import * as config from '../config';
import * as jwt from 'jsonwebtoken'; import * as jwt from 'jsonwebtoken';
import * as jwks from 'jwks-rsa'; import * as jwks from 'jwks-rsa';
// @ts-ignore // @ts-ignore

View file

@ -22,7 +22,7 @@ import {
} from './'; } from './';
import * as compression from 'compression'; import * as compression from 'compression';
import { config } from '@config'; import * as config from '../config';
import * as parseUrl from 'parseurl'; import * as parseUrl from 'parseurl';
export function registerProductionWebhooks() { export function registerProductionWebhooks() {
@ -111,7 +111,7 @@ export function registerProductionWebhooks() {
} }
class App { class App {
app: express.Application; app: express.Application;
activeWorkflowRunner: ActiveWorkflowRunner.ActiveWorkflowRunner; activeWorkflowRunner: ActiveWorkflowRunner.ActiveWorkflowRunner;
endpointWebhook: string; endpointWebhook: string;
@ -129,12 +129,12 @@ class App {
protocol: string; protocol: string;
sslKey: string; sslKey: string;
sslCert: string; sslCert: string;
presetCredentialsLoaded: boolean; presetCredentialsLoaded: boolean;
constructor() { constructor() {
this.app = express(); this.app = express();
this.endpointWebhook = config.get('endpoints.webhook') as string; this.endpointWebhook = config.get('endpoints.webhook') as string;
this.saveDataErrorExecution = config.get('executions.saveDataOnError') as string; this.saveDataErrorExecution = config.get('executions.saveDataOnError') as string;
this.saveDataSuccessExecution = config.get('executions.saveDataOnSuccess') as string; this.saveDataSuccessExecution = config.get('executions.saveDataOnSuccess') as string;
@ -143,22 +143,22 @@ class App {
this.maxExecutionTimeout = config.get('executions.maxTimeout') as number; this.maxExecutionTimeout = config.get('executions.maxTimeout') as number;
this.timezone = config.get('generic.timezone') as string; this.timezone = config.get('generic.timezone') as string;
this.restEndpoint = config.get('endpoints.rest') as string; this.restEndpoint = config.get('endpoints.rest') as string;
this.activeWorkflowRunner = ActiveWorkflowRunner.getInstance(); this.activeWorkflowRunner = ActiveWorkflowRunner.getInstance();
this.activeExecutionsInstance = ActiveExecutions.getInstance(); this.activeExecutionsInstance = ActiveExecutions.getInstance();
this.protocol = config.get('protocol'); this.protocol = config.get('protocol');
this.sslKey = config.get('ssl_key'); this.sslKey = config.get('ssl_key');
this.sslCert = config.get('ssl_cert'); this.sslCert = config.get('ssl_cert');
this.externalHooks = ExternalHooks(); this.externalHooks = ExternalHooks();
this.presetCredentialsLoaded = false; this.presetCredentialsLoaded = false;
this.endpointPresetCredentials = config.get('credentials.overwrite.endpoint') as string; this.endpointPresetCredentials = config.get('credentials.overwrite.endpoint') as string;
} }
/** /**
* Returns the current epoch time * Returns the current epoch time
* *
@ -168,15 +168,15 @@ class App {
getCurrentDate(): Date { getCurrentDate(): Date {
return new Date(); return new Date();
} }
async config(): Promise<void> { async config(): Promise<void> {
this.versions = await GenericHelpers.getVersions(); this.versions = await GenericHelpers.getVersions();
// Compress the response data // Compress the response data
this.app.use(compression()); this.app.use(compression());
// Make sure that each request has the "parsedUrl" parameter // Make sure that each request has the "parsedUrl" parameter
this.app.use((req: express.Request, res: express.Response, next: express.NextFunction) => { this.app.use((req: express.Request, res: express.Response, next: express.NextFunction) => {
(req as ICustomRequest).parsedUrl = parseUrl(req); (req as ICustomRequest).parsedUrl = parseUrl(req);
@ -184,7 +184,7 @@ class App {
req.rawBody = Buffer.from('', 'base64'); req.rawBody = Buffer.from('', 'base64');
next(); next();
}); });
// Support application/json type post data // Support application/json type post data
this.app.use(bodyParser.json({ this.app.use(bodyParser.json({
limit: '16mb', verify: (req, res, buf) => { limit: '16mb', verify: (req, res, buf) => {
@ -192,7 +192,7 @@ class App {
req.rawBody = buf; req.rawBody = buf;
}, },
})); }));
// Support application/xml type post data // Support application/xml type post data
// @ts-ignore // @ts-ignore
this.app.use(bodyParser.xml({ this.app.use(bodyParser.xml({
@ -202,14 +202,14 @@ class App {
explicitArray: false, // Only put properties in array if length > 1 explicitArray: false, // Only put properties in array if length > 1
}, },
})); }));
this.app.use(bodyParser.text({ this.app.use(bodyParser.text({
limit: '16mb', verify: (req, res, buf) => { limit: '16mb', verify: (req, res, buf) => {
// @ts-ignore // @ts-ignore
req.rawBody = buf; req.rawBody = buf;
}, },
})); }));
//support application/x-www-form-urlencoded post data //support application/x-www-form-urlencoded post data
this.app.use(bodyParser.urlencoded({ extended: false, this.app.use(bodyParser.urlencoded({ extended: false,
verify: (req, res, buf) => { verify: (req, res, buf) => {
@ -217,7 +217,7 @@ class App {
req.rawBody = buf; req.rawBody = buf;
}, },
})); }));
if (process.env['NODE_ENV'] !== 'production') { if (process.env['NODE_ENV'] !== 'production') {
this.app.use((req: express.Request, res: express.Response, next: express.NextFunction) => { this.app.use((req: express.Request, res: express.Response, next: express.NextFunction) => {
// Allow access also from frontend when developing // Allow access also from frontend when developing
@ -227,64 +227,64 @@ class App {
next(); next();
}); });
} }
this.app.use((req: express.Request, res: express.Response, next: express.NextFunction) => { this.app.use((req: express.Request, res: express.Response, next: express.NextFunction) => {
if (Db.collections.Workflow === null) { if (Db.collections.Workflow === null) {
const error = new ResponseHelper.ResponseError('Database is not ready!', undefined, 503); const error = new ResponseHelper.ResponseError('Database is not ready!', undefined, 503);
return ResponseHelper.sendErrorResponse(res, error); return ResponseHelper.sendErrorResponse(res, error);
} }
next(); next();
}); });
// ---------------------------------------- // ----------------------------------------
// Healthcheck // Healthcheck
// ---------------------------------------- // ----------------------------------------
// Does very basic health check // Does very basic health check
this.app.get('/healthz', async (req: express.Request, res: express.Response) => { this.app.get('/healthz', async (req: express.Request, res: express.Response) => {
const connectionManager = getConnectionManager(); const connectionManager = getConnectionManager();
if (connectionManager.connections.length === 0) { if (connectionManager.connections.length === 0) {
const error = new ResponseHelper.ResponseError('No Database connection found!', undefined, 503); const error = new ResponseHelper.ResponseError('No Database connection found!', undefined, 503);
return ResponseHelper.sendErrorResponse(res, error); return ResponseHelper.sendErrorResponse(res, error);
} }
if (connectionManager.connections[0].isConnected === false) { if (connectionManager.connections[0].isConnected === false) {
// Connection is not active // Connection is not active
const error = new ResponseHelper.ResponseError('Database connection not active!', undefined, 503); const error = new ResponseHelper.ResponseError('Database connection not active!', undefined, 503);
return ResponseHelper.sendErrorResponse(res, error); return ResponseHelper.sendErrorResponse(res, error);
} }
// Everything fine // Everything fine
const responseData = { const responseData = {
status: 'ok', status: 'ok',
}; };
ResponseHelper.sendSuccessResponse(res, responseData, true, 200); ResponseHelper.sendSuccessResponse(res, responseData, true, 200);
}); });
registerProductionWebhooks.apply(this); registerProductionWebhooks.apply(this);
} }
} }
export async function start(): Promise<void> { export async function start(): Promise<void> {
const PORT = config.get('port'); const PORT = config.get('port');
const ADDRESS = config.get('listen_address'); const ADDRESS = config.get('listen_address');
const app = new App(); const app = new App();
await app.config(); await app.config();
let server; let server;
if (app.protocol === 'https' && app.sslKey && app.sslCert) { if (app.protocol === 'https' && app.sslKey && app.sslCert) {
const https = require('https'); const https = require('https');
const privateKey = readFileSync(app.sslKey, 'utf8'); const privateKey = readFileSync(app.sslKey, 'utf8');
@ -295,12 +295,12 @@ export async function start(): Promise<void> {
const http = require('http'); const http = require('http');
server = http.createServer(app.app); server = http.createServer(app.app);
} }
server.listen(PORT, ADDRESS, async () => { server.listen(PORT, ADDRESS, async () => {
const versions = await GenericHelpers.getVersions(); const versions = await GenericHelpers.getVersions();
console.log(`n8n ready on ${ADDRESS}, port ${PORT}`); console.log(`n8n ready on ${ADDRESS}, port ${PORT}`);
console.log(`Version: ${versions.cli}`); console.log(`Version: ${versions.cli}`);
await app.externalHooks.run('n8n.ready', [app]); await app.externalHooks.run('n8n.ready', [app]);
}); });
} }

View file

@ -43,7 +43,7 @@ import {
WorkflowHooks, WorkflowHooks,
} from 'n8n-workflow'; } from 'n8n-workflow';
import { config } from '@config'; import * as config from '../config';
import { LessThanOrEqual } from 'typeorm'; import { LessThanOrEqual } from 'typeorm';

View file

@ -22,7 +22,7 @@ import {
LoggerProxy as Logger, LoggerProxy as Logger,
Workflow,} from 'n8n-workflow'; Workflow,} from 'n8n-workflow';
import { config } from '@config'; import * as config from '../config';
import { WorkflowEntity } from './databases/entities/WorkflowEntity'; import { WorkflowEntity } from './databases/entities/WorkflowEntity';
import { validate } from 'class-validator'; import { validate } from 'class-validator';

View file

@ -36,7 +36,7 @@ import {
WorkflowOperationError, WorkflowOperationError,
} from 'n8n-workflow'; } from 'n8n-workflow';
import { config } from '@config'; import * as config from '../config';
import * as PCancelable from 'p-cancelable'; import * as PCancelable from 'p-cancelable';
import { join as pathJoin } from 'path'; import { join as pathJoin } from 'path';
import { fork } from 'child_process'; import { fork } from 'child_process';

View file

@ -38,7 +38,7 @@ import {
getLogger, getLogger,
} from '../src/Logger'; } from '../src/Logger';
import { config } from '@config'; import * as config from '../config';
export class WorkflowRunnerProcess { export class WorkflowRunnerProcess {
data: IWorkflowExecutionDataProcessWithExecution | undefined; data: IWorkflowExecutionDataProcessWithExecution | undefined;

View file

@ -1,6 +1,6 @@
import { MigrationInterface, QueryRunner } from 'typeorm'; import { MigrationInterface, QueryRunner } from 'typeorm';
import { config } from '@config'; import * as config from '../../../../config';
export class InitialMigration1588157391238 implements MigrationInterface { export class InitialMigration1588157391238 implements MigrationInterface {
name = 'InitialMigration1588157391238'; name = 'InitialMigration1588157391238';

View file

@ -3,7 +3,7 @@ import {
QueryRunner, QueryRunner,
} from 'typeorm'; } from 'typeorm';
import { config } from '@config'; import * as config from '../../../../config';
export class WebhookModel1592447867632 implements MigrationInterface { export class WebhookModel1592447867632 implements MigrationInterface {
name = 'WebhookModel1592447867632'; name = 'WebhookModel1592447867632';

View file

@ -1,6 +1,6 @@
import { MigrationInterface, QueryRunner } from "typeorm"; import { MigrationInterface, QueryRunner } from "typeorm";
import { config } from '@config'; import * as config from '../../../../config';
export class CreateIndexStoppedAt1594902918301 implements MigrationInterface { export class CreateIndexStoppedAt1594902918301 implements MigrationInterface {
name = 'CreateIndexStoppedAt1594902918301'; name = 'CreateIndexStoppedAt1594902918301';

View file

@ -1,6 +1,6 @@
import { MigrationInterface, QueryRunner } from "typeorm"; import { MigrationInterface, QueryRunner } from "typeorm";
import { config } from '@config'; import * as config from '../../../../config';
export class MakeStoppedAtNullable1607431743767 implements MigrationInterface { export class MakeStoppedAtNullable1607431743767 implements MigrationInterface {

View file

@ -1,5 +1,5 @@
import {MigrationInterface, QueryRunner} from "typeorm"; import {MigrationInterface, QueryRunner} from "typeorm";
import { config } from '@config'; import * as config from '../../../../config';
export class AddWebhookId1611149998770 implements MigrationInterface { export class AddWebhookId1611149998770 implements MigrationInterface {
name = 'AddWebhookId1611149998770'; name = 'AddWebhookId1611149998770';

View file

@ -1,5 +1,5 @@
import { MigrationInterface, QueryRunner } from 'typeorm'; import { MigrationInterface, QueryRunner } from 'typeorm';
import { config } from '@config'; import * as config from '../../../../config';
export class ChangeDataSize1615306975123 implements MigrationInterface { export class ChangeDataSize1615306975123 implements MigrationInterface {
name = 'ChangeDataSize1615306975123'; name = 'ChangeDataSize1615306975123';

View file

@ -1,5 +1,5 @@
import {MigrationInterface, QueryRunner} from "typeorm"; import {MigrationInterface, QueryRunner} from "typeorm";
import { config } from '@config'; import * as config from '../../../../config';
export class CreateTagEntity1617268711084 implements MigrationInterface { export class CreateTagEntity1617268711084 implements MigrationInterface {
name = 'CreateTagEntity1617268711084'; name = 'CreateTagEntity1617268711084';

View file

@ -1,5 +1,5 @@
import { MigrationInterface, QueryRunner } from 'typeorm'; import { MigrationInterface, QueryRunner } from 'typeorm';
import { config } from '@config'; import * as config from '../../../../config';
export class ChangeCredentialDataSize1620729500000 implements MigrationInterface { export class ChangeCredentialDataSize1620729500000 implements MigrationInterface {
name = 'ChangeCredentialDataSize1620729500000'; name = 'ChangeCredentialDataSize1620729500000';

View file

@ -1,5 +1,5 @@
import {MigrationInterface, QueryRunner} from "typeorm"; import {MigrationInterface, QueryRunner} from "typeorm";
import { config } from '@config'; import config = require("../../../../config");
export class UniqueWorkflowNames1620826335440 implements MigrationInterface { export class UniqueWorkflowNames1620826335440 implements MigrationInterface {
name = 'UniqueWorkflowNames1620826335440'; name = 'UniqueWorkflowNames1620826335440';

View file

@ -1,5 +1,5 @@
import { MigrationInterface, QueryRunner } from 'typeorm'; import { MigrationInterface, QueryRunner } from 'typeorm';
import { config } from '@config'; import config = require('../../../../config');
export class CertifyCorrectCollation1623936588000 implements MigrationInterface { export class CertifyCorrectCollation1623936588000 implements MigrationInterface {
name = 'CertifyCorrectCollation1623936588000'; name = 'CertifyCorrectCollation1623936588000';

View file

@ -1,7 +1,7 @@
import { import {
MigrationInterface, QueryRunner } from 'typeorm'; MigrationInterface, QueryRunner } from 'typeorm';
import { config } from '@config'; import * as config from '../../../../config';
export class InitialMigration1587669153312 implements MigrationInterface { export class InitialMigration1587669153312 implements MigrationInterface {
name = 'InitialMigration1587669153312'; name = 'InitialMigration1587669153312';

View file

@ -3,7 +3,7 @@ import {
QueryRunner, QueryRunner,
} from 'typeorm'; } from 'typeorm';
import { config } from '@config'; import * as config from '../../../../config';
export class WebhookModel1589476000887 implements MigrationInterface { export class WebhookModel1589476000887 implements MigrationInterface {
name = 'WebhookModel1589476000887'; name = 'WebhookModel1589476000887';

View file

@ -1,6 +1,6 @@
import { MigrationInterface, QueryRunner } from "typeorm"; import { MigrationInterface, QueryRunner } from "typeorm";
import { config } from '@config'; import * as config from '../../../../config';
export class CreateIndexStoppedAt1594828256133 implements MigrationInterface { export class CreateIndexStoppedAt1594828256133 implements MigrationInterface {
name = 'CreateIndexStoppedAt1594828256133'; name = 'CreateIndexStoppedAt1594828256133';

View file

@ -1,6 +1,6 @@
import {MigrationInterface, QueryRunner} from "typeorm"; import {MigrationInterface, QueryRunner} from "typeorm";
import { config } from '@config'; import * as config from '../../../../config';
export class MakeStoppedAtNullable1607431743768 implements MigrationInterface { export class MakeStoppedAtNullable1607431743768 implements MigrationInterface {
name = 'MakeStoppedAtNullable1607431743768'; name = 'MakeStoppedAtNullable1607431743768';

View file

@ -1,5 +1,5 @@
import {MigrationInterface, QueryRunner} from "typeorm"; import {MigrationInterface, QueryRunner} from "typeorm";
import { config } from '@config'; import * as config from '../../../../config';
export class AddWebhookId1611144599516 implements MigrationInterface { export class AddWebhookId1611144599516 implements MigrationInterface {
name = 'AddWebhookId1611144599516'; name = 'AddWebhookId1611144599516';

View file

@ -1,5 +1,5 @@
import {MigrationInterface, QueryRunner} from "typeorm"; import {MigrationInterface, QueryRunner} from "typeorm";
import { config } from '@config'; import * as config from '../../../../config';
export class CreateTagEntity1617270242566 implements MigrationInterface { export class CreateTagEntity1617270242566 implements MigrationInterface {
name = 'CreateTagEntity1617270242566'; name = 'CreateTagEntity1617270242566';

View file

@ -1,5 +1,5 @@
import {MigrationInterface, QueryRunner} from "typeorm"; import {MigrationInterface, QueryRunner} from "typeorm";
import { config } from '@config'; import config = require("../../../../config");
export class UniqueWorkflowNames1620824779533 implements MigrationInterface { export class UniqueWorkflowNames1620824779533 implements MigrationInterface {
name = 'UniqueWorkflowNames1620824779533'; name = 'UniqueWorkflowNames1620824779533';

View file

@ -3,7 +3,7 @@ import {
QueryRunner, QueryRunner,
} from 'typeorm'; } from 'typeorm';
import { config } from '@config'; import * as config from '../../../../config';
export class InitialMigration1588102412422 implements MigrationInterface { export class InitialMigration1588102412422 implements MigrationInterface {
name = 'InitialMigration1588102412422'; name = 'InitialMigration1588102412422';

View file

@ -3,7 +3,7 @@ import {
QueryRunner, QueryRunner,
} from 'typeorm'; } from 'typeorm';
import { config } from '@config'; import * as config from '../../../../config';
export class WebhookModel1592445003908 implements MigrationInterface { export class WebhookModel1592445003908 implements MigrationInterface {
name = 'WebhookModel1592445003908'; name = 'WebhookModel1592445003908';

View file

@ -1,6 +1,6 @@
import { MigrationInterface, QueryRunner } from "typeorm"; import { MigrationInterface, QueryRunner } from "typeorm";
import { config } from '@config'; import * as config from '../../../../config';
export class CreateIndexStoppedAt1594825041918 implements MigrationInterface { export class CreateIndexStoppedAt1594825041918 implements MigrationInterface {
name = 'CreateIndexStoppedAt1594825041918'; name = 'CreateIndexStoppedAt1594825041918';

View file

@ -1,6 +1,6 @@
import {MigrationInterface, QueryRunner} from "typeorm"; import {MigrationInterface, QueryRunner} from "typeorm";
import { config } from '@config'; import * as config from '../../../../config';
export class MakeStoppedAtNullable1607431743769 implements MigrationInterface { export class MakeStoppedAtNullable1607431743769 implements MigrationInterface {

View file

@ -1,5 +1,5 @@
import {MigrationInterface, QueryRunner} from "typeorm"; import {MigrationInterface, QueryRunner} from "typeorm";
import { config } from '@config'; import * as config from '../../../../config';
export class AddWebhookId1611071044839 implements MigrationInterface { export class AddWebhookId1611071044839 implements MigrationInterface {
name = 'AddWebhookId1611071044839'; name = 'AddWebhookId1611071044839';

View file

@ -1,5 +1,5 @@
import {MigrationInterface, QueryRunner} from "typeorm"; import {MigrationInterface, QueryRunner} from "typeorm";
import { config } from '@config'; import * as config from '../../../../config';
export class CreateTagEntity1617213344594 implements MigrationInterface { export class CreateTagEntity1617213344594 implements MigrationInterface {
name = 'CreateTagEntity1617213344594'; name = 'CreateTagEntity1617213344594';

View file

@ -1,5 +1,5 @@
import {MigrationInterface, QueryRunner} from "typeorm"; import {MigrationInterface, QueryRunner} from "typeorm";
import { config } from '@config'; import config = require("../../../../config");
export class UniqueWorkflowNames1620821879465 implements MigrationInterface { export class UniqueWorkflowNames1620821879465 implements MigrationInterface {
name = 'UniqueWorkflowNames1620821879465'; name = 'UniqueWorkflowNames1620821879465';

View file

@ -19,13 +19,7 @@
"target": "es2017", "target": "es2017",
"sourceMap": true, "sourceMap": true,
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true
"baseUrl": ".",
"paths": {
"@config": [
"config/index"
]
}
}, },
"include": [ "include": [
"**/*.d.ts", "**/*.d.ts",