ci: Fix linting issues (no-changelog) (#6788)

* ci: Fix linting (no-changelog)

* lintfix for nodes-base as well
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-07-28 18:28:17 +02:00
committed by GitHub
parent 4e491b754f
commit 6fb8a9ee39
40 changed files with 204 additions and 154 deletions

View File

@@ -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,
);
}
});

View File

@@ -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: '',

View File

@@ -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

View File

@@ -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

View File

@@ -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 {

View File

@@ -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) => {

View File

@@ -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) => {

View File

@@ -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) => {

View File

@@ -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,
),
);
},

View File

@@ -131,7 +131,6 @@ export class Rundeck implements INodeType {
},
default: '',
placeholder: 'Add Filters',
required: false,
description: 'Filter Rundeck nodes by name',
},

View File

@@ -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 */;

View File

@@ -14,7 +14,6 @@ export declare type queryIndexSignature =
| '_id'
| '_between'
| '_parent'
| '_parent'
| '_child'
| '_type'
| '_string'

View File

@@ -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) {

View File

@@ -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];