mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
ci: Fix linting issues (no-changelog) (#6788)
* ci: Fix linting (no-changelog) * lintfix for nodes-base as well
This commit is contained in:
committed by
GitHub
parent
4e491b754f
commit
6fb8a9ee39
@@ -198,9 +198,12 @@ export class AmqpTrigger implements INodeType {
|
||||
this.emit([this.helpers.returnJsonArray([data as any])]);
|
||||
|
||||
if (!context.receiver?.has_credit()) {
|
||||
setTimeout(() => {
|
||||
context.receiver?.add_credit(pullMessagesNumber);
|
||||
}, (options.sleepTime as number) || 10);
|
||||
setTimeout(
|
||||
() => {
|
||||
context.receiver?.add_credit(pullMessagesNumber);
|
||||
},
|
||||
(options.sleepTime as number) || 10,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -572,7 +572,9 @@ export class AwsS3V2 implements INodeType {
|
||||
const servicePath = bucketName.includes('.') ? 's3' : `${bucketName}.s3`;
|
||||
const basePath = bucketName.includes('.') ? `/${bucketName}` : '';
|
||||
|
||||
const destination = `${basePath}/${destinationParts.slice(2, destinationParts.length).join('/')}`;
|
||||
const destination = `${basePath}/${destinationParts
|
||||
.slice(2, destinationParts.length)
|
||||
.join('/')}`;
|
||||
|
||||
responseData = await awsApiRequestREST.call(this, servicePath, 'GET', basePath, '', {
|
||||
location: '',
|
||||
|
||||
@@ -619,12 +619,15 @@ export class EmailReadImapV1 implements INodeType {
|
||||
let reconnectionInterval: NodeJS.Timeout | undefined;
|
||||
|
||||
if (options.forceReconnect !== undefined) {
|
||||
reconnectionInterval = setInterval(async () => {
|
||||
this.logger.verbose('Forcing reconnection of IMAP node.');
|
||||
connection.end();
|
||||
connection = await establishConnection();
|
||||
await connection.openBox(mailbox);
|
||||
}, (options.forceReconnect as number) * 1000 * 60);
|
||||
reconnectionInterval = setInterval(
|
||||
async () => {
|
||||
this.logger.verbose('Forcing reconnection of IMAP node.');
|
||||
connection.end();
|
||||
connection = await establishConnection();
|
||||
await connection.openBox(mailbox);
|
||||
},
|
||||
(options.forceReconnect as number) * 1000 * 60,
|
||||
);
|
||||
}
|
||||
|
||||
// When workflow and so node gets set to inactive close the connectoin
|
||||
|
||||
@@ -628,20 +628,23 @@ export class EmailReadImapV2 implements INodeType {
|
||||
let reconnectionInterval: NodeJS.Timeout | undefined;
|
||||
|
||||
if (options.forceReconnect !== undefined) {
|
||||
reconnectionInterval = setInterval(async () => {
|
||||
this.logger.verbose('Forcing reconnect to IMAP server');
|
||||
try {
|
||||
isCurrentlyReconnecting = true;
|
||||
if (connection.closeBox) await connection.closeBox(false);
|
||||
connection.end();
|
||||
connection = await establishConnection();
|
||||
await connection.openBox(mailbox);
|
||||
} catch (error) {
|
||||
this.logger.error(error as string);
|
||||
} finally {
|
||||
isCurrentlyReconnecting = false;
|
||||
}
|
||||
}, (options.forceReconnect as number) * 1000 * 60);
|
||||
reconnectionInterval = setInterval(
|
||||
async () => {
|
||||
this.logger.verbose('Forcing reconnect to IMAP server');
|
||||
try {
|
||||
isCurrentlyReconnecting = true;
|
||||
if (connection.closeBox) await connection.closeBox(false);
|
||||
connection.end();
|
||||
connection = await establishConnection();
|
||||
await connection.openBox(mailbox);
|
||||
} catch (error) {
|
||||
this.logger.error(error as string);
|
||||
} finally {
|
||||
isCurrentlyReconnecting = false;
|
||||
}
|
||||
},
|
||||
(options.forceReconnect as number) * 1000 * 60,
|
||||
);
|
||||
}
|
||||
|
||||
// When workflow and so node gets set to inactive close the connectoin
|
||||
|
||||
@@ -76,12 +76,11 @@ export async function getToken(
|
||||
|
||||
return response.response.token;
|
||||
} catch (error) {
|
||||
let message
|
||||
if ( error.statusCode === 502 ) {
|
||||
message = 'The server is not responding. Is the DataAPI enabled?'
|
||||
}
|
||||
else if (error.error ) {
|
||||
message = error.error.messages[0].code + ' - ' + error.error.messages[0].message
|
||||
let message;
|
||||
if (error.statusCode === 502) {
|
||||
message = 'The server is not responding. Is the DataAPI enabled?';
|
||||
} else if (error.error) {
|
||||
message = error.error.messages[0].code + ' - ' + error.error.messages[0].message;
|
||||
} else {
|
||||
message = error.message;
|
||||
}
|
||||
@@ -267,7 +266,7 @@ export async function logout(
|
||||
};
|
||||
|
||||
const response = await this.helpers.request(requestOptions);
|
||||
return response
|
||||
return response;
|
||||
}
|
||||
|
||||
export function parseSort(this: IExecuteFunctions, i: number): object | null {
|
||||
|
||||
@@ -1167,7 +1167,7 @@ return 0;`,
|
||||
({
|
||||
json: { ...item.json, __INDEX: index },
|
||||
pairedItem: { item: index },
|
||||
} as INodeExecutionData),
|
||||
}) as INodeExecutionData,
|
||||
);
|
||||
//sort items using the compare keys
|
||||
newItems.sort((a, b) => {
|
||||
|
||||
@@ -1207,7 +1207,7 @@ return 0;`,
|
||||
({
|
||||
json: { ...item.json, __INDEX: index },
|
||||
pairedItem: { item: index },
|
||||
} as INodeExecutionData),
|
||||
}) as INodeExecutionData,
|
||||
);
|
||||
//sort items using the compare keys
|
||||
newItems.sort((a, b) => {
|
||||
|
||||
@@ -162,7 +162,7 @@ export async function execute(
|
||||
({
|
||||
json: { ...item.json, __INDEX: index },
|
||||
pairedItem: { item: index },
|
||||
} as INodeExecutionData),
|
||||
}) as INodeExecutionData,
|
||||
);
|
||||
//sort items using the compare keys
|
||||
newItems.sort((a, b) => {
|
||||
|
||||
@@ -92,7 +92,7 @@ export const packageOperations: INodeProperties[] = [
|
||||
return items.flatMap(({ json }) =>
|
||||
(json.objects as Array<{ package: PackageJson }>).map(
|
||||
({ package: { name, version, description } }) =>
|
||||
({ json: { name, version, description } } as INodeExecutionData),
|
||||
({ json: { name, version, description } }) as INodeExecutionData,
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
@@ -131,7 +131,6 @@ export class Rundeck implements INodeType {
|
||||
},
|
||||
default: '',
|
||||
placeholder: 'Add Filters',
|
||||
required: false,
|
||||
description: 'Filter Rundeck nodes by name',
|
||||
},
|
||||
|
||||
|
||||
@@ -56,16 +56,12 @@ export type TEndpointVariableName = 'access_token' | 'dtable_uuid' | 'server';
|
||||
|
||||
// Template Literal Types requires-ts-4.1.5 -- deferred
|
||||
export type TMethod = 'GET' | 'POST';
|
||||
type TDeferredEndpoint = string;
|
||||
type TDeferredEndpointExpr = string;
|
||||
type TEndpoint =
|
||||
| '/api/v2.1/dtable/app-access-token/'
|
||||
| '/dtable-server/api/v1/dtables/{{dtable_uuid}}/rows/'
|
||||
| TDeferredEndpoint;
|
||||
export type TEndpointExpr = TEndpoint | TDeferredEndpointExpr;
|
||||
| '/dtable-server/api/v1/dtables/{{dtable_uuid}}/rows/';
|
||||
export type TEndpointExpr = TEndpoint;
|
||||
export type TEndpointResolvedExpr =
|
||||
| TEndpoint
|
||||
| string; /* deferred: but already in use for header values, e.g. authentication */
|
||||
TEndpoint; /* deferred: but already in use for header values, e.g. authentication */
|
||||
|
||||
export type TDateTimeFormat = 'YYYY-MM-DDTHH:mm:ss.SSSZ' /* moment.js */;
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ export declare type queryIndexSignature =
|
||||
| '_id'
|
||||
| '_between'
|
||||
| '_parent'
|
||||
| '_parent'
|
||||
| '_child'
|
||||
| '_type'
|
||||
| '_string'
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
export class WebhookAuthorizationError extends Error {
|
||||
constructor(readonly responseCode: number, message?: string) {
|
||||
constructor(
|
||||
readonly responseCode: number,
|
||||
message?: string,
|
||||
) {
|
||||
if (message === undefined) {
|
||||
message = 'Authorization problem!';
|
||||
if (responseCode === 401) {
|
||||
|
||||
@@ -87,9 +87,7 @@ export function getAutomaticSecret(credentials: ICredentialDataDecryptedObject)
|
||||
return createHash('md5').update(data).digest('hex');
|
||||
}
|
||||
|
||||
export function setMetadata(
|
||||
data: IShoppingLine[] | IShoppingLine[] | IFeeLine[] | ILineItem[] | ICouponLine[],
|
||||
) {
|
||||
export function setMetadata(data: IShoppingLine[] | IFeeLine[] | ILineItem[] | ICouponLine[]) {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
//@ts-ignore\
|
||||
if (data[i].metadataUi?.metadataValues) {
|
||||
@@ -105,7 +103,7 @@ export function setMetadata(
|
||||
}
|
||||
|
||||
export function toSnakeCase(
|
||||
data: IShoppingLine[] | IShoppingLine[] | IFeeLine[] | ILineItem[] | ICouponLine[] | IDataObject,
|
||||
data: IShoppingLine[] | IFeeLine[] | ILineItem[] | ICouponLine[] | IDataObject,
|
||||
) {
|
||||
if (!Array.isArray(data)) {
|
||||
data = [data];
|
||||
|
||||
Reference in New Issue
Block a user