mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Lint for cyclomatic complexity in BE packages (no-changelog) (#9111)
This commit is contained in:
@@ -274,6 +274,7 @@ const getBeforeRedirectFn =
|
||||
}
|
||||
};
|
||||
|
||||
// eslint-disable-next-line complexity
|
||||
export async function parseRequestObject(requestObject: IRequestOptions) {
|
||||
// This function is a temporary implementation
|
||||
// That translates all http requests done via
|
||||
@@ -866,6 +867,7 @@ export async function proxyRequestToAxios(
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line complexity
|
||||
function convertN8nRequestToAxios(n8nRequest: IHttpRequestOptions): AxiosRequestConfig {
|
||||
// Destructure properties with the same name first.
|
||||
const { headers, method, timeout, auth, proxy, url } = n8nRequest;
|
||||
@@ -1175,6 +1177,7 @@ export async function copyBinaryFile(
|
||||
* Takes a buffer and converts it into the format n8n uses. It encodes the binary data as
|
||||
* base64 and adds metadata.
|
||||
*/
|
||||
// eslint-disable-next-line complexity
|
||||
async function prepareBinaryData(
|
||||
binaryData: Buffer | Readable,
|
||||
executionId: string,
|
||||
@@ -2894,6 +2897,7 @@ const getRequestHelperFunctions = (
|
||||
|
||||
return {
|
||||
httpRequest,
|
||||
// eslint-disable-next-line complexity
|
||||
async requestWithAuthenticationPaginated(
|
||||
this: IExecuteFunctions,
|
||||
requestOptions: IRequestOptions,
|
||||
|
||||
@@ -154,7 +154,7 @@ export class WorkflowExecute {
|
||||
// IMPORTANT: Do not add "async" to this function, it will then convert the
|
||||
// PCancelable to a regular Promise and does so not allow canceling
|
||||
// active executions anymore
|
||||
// eslint-disable-next-line @typescript-eslint/promise-function-async
|
||||
// eslint-disable-next-line @typescript-eslint/promise-function-async, complexity
|
||||
runPartialWorkflow(
|
||||
workflow: Workflow,
|
||||
runData: IRunData,
|
||||
@@ -371,6 +371,7 @@ export class WorkflowExecute {
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line complexity
|
||||
addNodeToBeExecuted(
|
||||
workflow: Workflow,
|
||||
connectionData: IConnection,
|
||||
@@ -836,6 +837,7 @@ export class WorkflowExecute {
|
||||
setTimeout(() => resolve(fullRunData), 10);
|
||||
});
|
||||
|
||||
// eslint-disable-next-line complexity
|
||||
const returnPromise = (async () => {
|
||||
try {
|
||||
if (!this.additionalData.restartExecutionId) {
|
||||
|
||||
Reference in New Issue
Block a user