👕 Fix lint issue
This commit is contained in:
@@ -7,8 +7,8 @@ import {
|
||||
} from 'n8n-core';
|
||||
|
||||
import {
|
||||
IExecutionsCurrentSummary,
|
||||
IExecutingWorkflowData,
|
||||
IExecutionsCurrentSummary,
|
||||
IWorkflowExecutionDataProcess,
|
||||
} from '.';
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import {
|
||||
IActivationError,
|
||||
Db,
|
||||
NodeTypes,
|
||||
IActivationError,
|
||||
IResponseCallbackData,
|
||||
IWebhookDb,
|
||||
IWorkflowDb,
|
||||
IWorkflowExecutionDataProcess,
|
||||
NodeTypes,
|
||||
ResponseHelper,
|
||||
WebhookHelpers,
|
||||
WorkflowCredentials,
|
||||
WorkflowExecuteAdditionalData,
|
||||
WorkflowHelpers,
|
||||
WorkflowRunner,
|
||||
WorkflowExecuteAdditionalData,
|
||||
IWebhookDb,
|
||||
} from './';
|
||||
|
||||
import {
|
||||
@@ -26,8 +26,8 @@ import {
|
||||
INode,
|
||||
INodeExecutionData,
|
||||
IRunExecutionData,
|
||||
NodeHelpers,
|
||||
IWorkflowExecuteAdditionalData as IWorkflowExecuteAdditionalDataWorkflow,
|
||||
NodeHelpers,
|
||||
WebhookHttpMethod,
|
||||
Workflow,
|
||||
WorkflowExecuteMode,
|
||||
@@ -352,8 +352,8 @@ export class ActiveWorkflowRunner {
|
||||
node,
|
||||
data: {
|
||||
main: data,
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
const executionData: IRunExecutionData = {
|
||||
|
||||
@@ -9,8 +9,8 @@ import {
|
||||
INodeParameters,
|
||||
INodeProperties,
|
||||
INodeType,
|
||||
INodeTypes,
|
||||
INodeTypeData,
|
||||
INodeTypes,
|
||||
NodeHelpers,
|
||||
Workflow,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
@@ -4,8 +4,8 @@ import {
|
||||
|
||||
import {
|
||||
CredentialTypes,
|
||||
ICredentialsOverwrite,
|
||||
GenericHelpers,
|
||||
ICredentialsOverwrite,
|
||||
} from './';
|
||||
|
||||
|
||||
|
||||
@@ -33,27 +33,27 @@ export let collections: IDatabaseCollections = {
|
||||
};
|
||||
|
||||
import {
|
||||
CreateIndexStoppedAt1594828256133,
|
||||
InitialMigration1587669153312,
|
||||
WebhookModel1589476000887,
|
||||
CreateIndexStoppedAt1594828256133,
|
||||
} from './databases/postgresdb/migrations';
|
||||
|
||||
import {
|
||||
CreateIndexStoppedAt1594910478695,
|
||||
InitialMigration1587563438936,
|
||||
WebhookModel1592679094242,
|
||||
CreateIndexStoppedAt1594910478695,
|
||||
} from './databases/mongodb/migrations';
|
||||
|
||||
import {
|
||||
CreateIndexStoppedAt1594902918301,
|
||||
InitialMigration1588157391238,
|
||||
WebhookModel1592447867632,
|
||||
CreateIndexStoppedAt1594902918301,
|
||||
} from './databases/mysqldb/migrations';
|
||||
|
||||
import {
|
||||
CreateIndexStoppedAt1594825041918,
|
||||
InitialMigration1588102412422,
|
||||
WebhookModel1592445003908,
|
||||
CreateIndexStoppedAt1594825041918,
|
||||
} from './databases/sqlite/migrations';
|
||||
|
||||
import * as path from 'path';
|
||||
@@ -154,7 +154,7 @@ export async function init(): Promise<IDatabaseCollections> {
|
||||
migrations: [
|
||||
InitialMigration1588102412422,
|
||||
WebhookModel1592445003908,
|
||||
CreateIndexStoppedAt1594825041918
|
||||
CreateIndexStoppedAt1594825041918,
|
||||
],
|
||||
migrationsRun: true,
|
||||
migrationsTableName: `${entityPrefix}migrations`,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
Db,
|
||||
IExternalHooksFunctions,
|
||||
IExternalHooksClass,
|
||||
IExternalHooksFunctions,
|
||||
} from './';
|
||||
|
||||
import * as config from '../config';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
INodeType,
|
||||
INodeTypes,
|
||||
INodeTypeData,
|
||||
INodeTypes,
|
||||
NodeHelpers,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ export function sendSuccessResponse(res: Response, data: any, raw?: boolean, res
|
||||
res.json(data);
|
||||
} else {
|
||||
res.json({
|
||||
data
|
||||
data,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -183,7 +183,7 @@ export function unflattenExecutionData(fullExecutionData: IExecutionFlattedDb):
|
||||
mode: fullExecutionData.mode,
|
||||
startedAt: fullExecutionData.startedAt,
|
||||
stoppedAt: fullExecutionData.stoppedAt,
|
||||
finished: fullExecutionData.finished ? fullExecutionData.finished : false
|
||||
finished: fullExecutionData.finished ? fullExecutionData.finished : false,
|
||||
});
|
||||
|
||||
return returnData;
|
||||
|
||||
@@ -26,15 +26,18 @@ import {
|
||||
ActiveExecutions,
|
||||
ActiveWorkflowRunner,
|
||||
CredentialsHelper,
|
||||
CredentialsOverwrites,
|
||||
CredentialTypes,
|
||||
Db,
|
||||
ExternalHooks,
|
||||
GenericHelpers,
|
||||
IActivationError,
|
||||
ICustomRequest,
|
||||
ICredentialsDb,
|
||||
ICredentialsDecryptedDb,
|
||||
ICredentialsDecryptedResponse,
|
||||
ICredentialsOverwrite,
|
||||
ICredentialsResponse,
|
||||
ICustomRequest,
|
||||
IExecutionDeleteFilter,
|
||||
IExecutionFlatted,
|
||||
IExecutionFlattedDb,
|
||||
@@ -47,21 +50,18 @@ import {
|
||||
IN8nUISettings,
|
||||
IPackageVersions,
|
||||
IWorkflowBase,
|
||||
IWorkflowShortResponse,
|
||||
IWorkflowResponse,
|
||||
IWorkflowExecutionDataProcess,
|
||||
IWorkflowResponse,
|
||||
IWorkflowShortResponse,
|
||||
LoadNodesAndCredentials,
|
||||
NodeTypes,
|
||||
Push,
|
||||
ResponseHelper,
|
||||
TestWebhooks,
|
||||
WorkflowCredentials,
|
||||
WebhookHelpers,
|
||||
WorkflowCredentials,
|
||||
WorkflowExecuteAdditionalData,
|
||||
WorkflowRunner,
|
||||
GenericHelpers,
|
||||
CredentialsOverwrites,
|
||||
ICredentialsOverwrite,
|
||||
LoadNodesAndCredentials,
|
||||
} from './';
|
||||
|
||||
import {
|
||||
@@ -75,9 +75,9 @@ import {
|
||||
ICredentialType,
|
||||
IDataObject,
|
||||
INodeCredentials,
|
||||
INodeTypeDescription,
|
||||
INodeParameters,
|
||||
INodePropertyOptions,
|
||||
INodeTypeDescription,
|
||||
IRunData,
|
||||
IWorkflowCredentials,
|
||||
Workflow,
|
||||
@@ -172,7 +172,7 @@ class App {
|
||||
oauthCallbackUrls: {
|
||||
'oauth1': urlBaseWebhook + `${this.restEndpoint}/oauth1-credential/callback`,
|
||||
'oauth2': urlBaseWebhook + `${this.restEndpoint}/oauth2-credential/callback`,
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ class App {
|
||||
|
||||
const jwtVerifyOptions: jwt.VerifyOptions = {
|
||||
issuer: jwtIssuer !== '' ? jwtIssuer : undefined,
|
||||
ignoreExpiration: false
|
||||
ignoreExpiration: false,
|
||||
};
|
||||
|
||||
jwt.verify(token, getKey, jwtVerifyOptions, (err: jwt.VerifyErrors, decoded: object) => {
|
||||
@@ -355,7 +355,7 @@ class App {
|
||||
limit: '16mb', verify: (req, res, buf) => {
|
||||
// @ts-ignore
|
||||
req.rawBody = buf;
|
||||
}
|
||||
},
|
||||
}));
|
||||
|
||||
// Support application/xml type post data
|
||||
@@ -365,14 +365,14 @@ class App {
|
||||
normalize: true, // Trim whitespace inside text nodes
|
||||
normalizeTags: true, // Transform tags to lowercase
|
||||
explicitArray: false, // Only put properties in array if length > 1
|
||||
}
|
||||
},
|
||||
}));
|
||||
|
||||
this.app.use(bodyParser.text({
|
||||
limit: '16mb', verify: (req, res, buf) => {
|
||||
// @ts-ignore
|
||||
req.rawBody = buf;
|
||||
}
|
||||
},
|
||||
}));
|
||||
|
||||
// Make sure that Vue history mode works properly
|
||||
@@ -382,9 +382,9 @@ class App {
|
||||
from: new RegExp(`^\/(${this.restEndpoint}|healthz|css|js|${this.endpointWebhook}|${this.endpointWebhookTest})\/?.*$`),
|
||||
to: (context) => {
|
||||
return context.parsedUrl!.pathname!.toString();
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
],
|
||||
}));
|
||||
|
||||
//support application/x-www-form-urlencoded post data
|
||||
@@ -392,7 +392,7 @@ class App {
|
||||
verify: (req, res, buf) => {
|
||||
// @ts-ignore
|
||||
req.rawBody = buf;
|
||||
}
|
||||
},
|
||||
}));
|
||||
|
||||
if (process.env['NODE_ENV'] !== 'production') {
|
||||
@@ -1074,7 +1074,7 @@ class App {
|
||||
};
|
||||
|
||||
const oauthRequestData = {
|
||||
oauth_callback: `${WebhookHelpers.getWebhookBaseUrl()}${this.restEndpoint}/oauth1-credential/callback?cid=${req.query.id}`
|
||||
oauth_callback: `${WebhookHelpers.getWebhookBaseUrl()}${this.restEndpoint}/oauth1-credential/callback?cid=${req.query.id}`,
|
||||
};
|
||||
|
||||
await this.externalHooks.run('oauth1.authenticate', [oAuthOptions, oauthRequestData]);
|
||||
@@ -1153,7 +1153,7 @@ class App {
|
||||
qs: {
|
||||
oauth_token,
|
||||
oauth_verifier,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
let oauthToken;
|
||||
@@ -1329,7 +1329,7 @@ class App {
|
||||
accessTokenUri: _.get(oauthCredentials, 'accessTokenUrl', '') as string,
|
||||
authorizationUri: _.get(oauthCredentials, 'authUrl', '') as string,
|
||||
redirectUri: `${WebhookHelpers.getWebhookBaseUrl()}${this.restEndpoint}/oauth2-credential/callback`,
|
||||
scopes: _.split(_.get(oauthCredentials, 'scope', 'openid,') as string, ',')
|
||||
scopes: _.split(_.get(oauthCredentials, 'scope', 'openid,') as string, ','),
|
||||
};
|
||||
|
||||
if (_.get(oauthCredentials, 'authentication', 'header') as string === 'body') {
|
||||
@@ -1877,7 +1877,7 @@ class App {
|
||||
// got used
|
||||
res.setHeader('Last-Modified', startTime);
|
||||
}
|
||||
}
|
||||
},
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ import {
|
||||
IWorkflowDb,
|
||||
IWorkflowExecutionDataProcess,
|
||||
ResponseHelper,
|
||||
WorkflowHelpers,
|
||||
WorkflowRunner,
|
||||
WorkflowCredentials,
|
||||
WorkflowExecuteAdditionalData,
|
||||
WorkflowHelpers,
|
||||
WorkflowRunner,
|
||||
} from './';
|
||||
|
||||
import {
|
||||
@@ -252,7 +252,7 @@ export function getWorkflowWebhooksBasic(workflow: Workflow): IWebhookData[] {
|
||||
data: {
|
||||
main: webhookResultData.workflowData,
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
const runExecutionData: IRunExecutionData = {
|
||||
|
||||
@@ -25,8 +25,8 @@ import {
|
||||
IExecuteData,
|
||||
IExecuteWorkflowInfo,
|
||||
INode,
|
||||
INodeParameters,
|
||||
INodeExecutionData,
|
||||
INodeParameters,
|
||||
IRun,
|
||||
IRunExecutionData,
|
||||
ITaskData,
|
||||
@@ -74,7 +74,7 @@ function executeErrorWorkflow(workflowData: IWorkflowBase, fullRunData: IRun, mo
|
||||
workflow: {
|
||||
id: workflowData.id !== undefined ? workflowData.id.toString() as string : undefined,
|
||||
name: workflowData.name,
|
||||
}
|
||||
},
|
||||
};
|
||||
// Run the error workflow
|
||||
WorkflowHelpers.executeErrorWorkflow(workflowData.settings.errorWorkflow as string, workflowErrorData);
|
||||
@@ -191,13 +191,13 @@ function hookFunctionsPush(): IWorkflowExecuteHooks {
|
||||
workflowId: this.workflowData.id as string,
|
||||
workflowName: this.workflowData.name,
|
||||
});
|
||||
}
|
||||
},
|
||||
],
|
||||
workflowExecuteAfter: [
|
||||
async function (this: WorkflowHooks, fullRunData: IRun, newStaticData: IDataObject): Promise<void> {
|
||||
pushExecutionFinished(this.mode, fullRunData, this.executionId, undefined, this.retryOf);
|
||||
},
|
||||
]
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -298,7 +298,7 @@ function hookFunctionsSave(parentProcessMode?: string): IWorkflowExecuteHooks {
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -374,8 +374,8 @@ export async function executeWorkflow(workflowInfo: IExecuteWorkflowInfo, additi
|
||||
// Always start with empty data if no inputData got supplied
|
||||
inputData = inputData || [
|
||||
{
|
||||
json: {}
|
||||
}
|
||||
json: {},
|
||||
},
|
||||
];
|
||||
|
||||
// Initialize the incoming data
|
||||
@@ -386,7 +386,7 @@ export async function executeWorkflow(workflowInfo: IExecuteWorkflowInfo, additi
|
||||
data: {
|
||||
main: [inputData],
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
const runExecutionData: IRunExecutionData = {
|
||||
|
||||
@@ -3,8 +3,8 @@ import {
|
||||
Db,
|
||||
ICredentialsTypeData,
|
||||
ITransferNodeTypes,
|
||||
IWorkflowExecutionDataProcess,
|
||||
IWorkflowErrorData,
|
||||
IWorkflowExecutionDataProcess,
|
||||
NodeTypes,
|
||||
WorkflowCredentials,
|
||||
WorkflowRunner,
|
||||
@@ -120,12 +120,12 @@ export async function executeErrorWorkflow(workflowId: string, workflowErrorData
|
||||
main: [
|
||||
[
|
||||
{
|
||||
json: workflowErrorData
|
||||
}
|
||||
]
|
||||
json: workflowErrorData,
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
const runExecutionData: IRunExecutionData = {
|
||||
|
||||
@@ -24,8 +24,8 @@ import {
|
||||
IExecutionError,
|
||||
IRun,
|
||||
Workflow,
|
||||
WorkflowHooks,
|
||||
WorkflowExecuteMode,
|
||||
WorkflowHooks,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import * as config from '../config';
|
||||
|
||||
@@ -135,13 +135,13 @@ export class WorkflowRunnerProcess {
|
||||
workflowExecuteBefore: [
|
||||
async (): Promise<void> => {
|
||||
this.sendHookToParentProcess('workflowExecuteBefore', []);
|
||||
}
|
||||
},
|
||||
],
|
||||
workflowExecuteAfter: [
|
||||
async (fullRunData: IRun, newStaticData?: IDataObject): Promise<void> => {
|
||||
this.sendHookToParentProcess('workflowExecuteAfter', [fullRunData, newStaticData]);
|
||||
},
|
||||
]
|
||||
],
|
||||
};
|
||||
|
||||
return new WorkflowHooks(hookFunctions, this.data!.executionMode, this.data!.executionId, this.data!.workflowData, { sessionId: this.data!.sessionId, retryOf: this.data!.retryOf as string });
|
||||
|
||||
@@ -20,7 +20,7 @@ export class CredentialsEntity implements ICredentialsDb {
|
||||
id: number;
|
||||
|
||||
@Column({
|
||||
length: 128
|
||||
length: 128,
|
||||
})
|
||||
name: string;
|
||||
|
||||
@@ -29,7 +29,7 @@ export class CredentialsEntity implements ICredentialsDb {
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
length: 32
|
||||
length: 32,
|
||||
})
|
||||
type: string;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ export class WorkflowEntity implements IWorkflowDb {
|
||||
id: number;
|
||||
|
||||
@Column({
|
||||
length: 128
|
||||
length: 128,
|
||||
})
|
||||
name: string;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ export class CredentialsEntity implements ICredentialsDb {
|
||||
id: number;
|
||||
|
||||
@Column({
|
||||
length: 128
|
||||
length: 128,
|
||||
})
|
||||
name: string;
|
||||
|
||||
@@ -29,7 +29,7 @@ export class CredentialsEntity implements ICredentialsDb {
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
length: 32
|
||||
length: 32,
|
||||
})
|
||||
type: string;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ export class WorkflowEntity implements IWorkflowDb {
|
||||
id: number;
|
||||
|
||||
@Column({
|
||||
length: 128
|
||||
length: 128,
|
||||
})
|
||||
name: string;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ export class CredentialsEntity implements ICredentialsDb {
|
||||
id: number;
|
||||
|
||||
@Column({
|
||||
length: 128
|
||||
length: 128,
|
||||
})
|
||||
name: string;
|
||||
|
||||
@@ -29,7 +29,7 @@ export class CredentialsEntity implements ICredentialsDb {
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
length: 32
|
||||
length: 32,
|
||||
})
|
||||
type: string;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ export class WorkflowEntity implements IWorkflowDb {
|
||||
id: number;
|
||||
|
||||
@Column({
|
||||
length: 128
|
||||
length: 128,
|
||||
})
|
||||
name: string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user