mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
⚡ Cleanup & Fix lint issues
This commit is contained in:
parent
e48f555f07
commit
ca50194d71
|
@ -948,9 +948,9 @@ export class EditImage implements INodeType {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||||
const items = this.getInputData();
|
const items = this.getInputData();
|
||||||
|
|
||||||
const returnData: INodeExecutionData[] = [];
|
const returnData: INodeExecutionData[] = [];
|
||||||
const length = items.length as unknown as number;
|
const length = items.length as unknown as number;
|
||||||
let item: INodeExecutionData;
|
let item: INodeExecutionData;
|
||||||
|
@ -1069,7 +1069,7 @@ export class EditImage implements INodeType {
|
||||||
if (operation === 'information') {
|
if (operation === 'information') {
|
||||||
// Just return the information
|
// Just return the information
|
||||||
const imageData = await new Promise<IDataObject>((resolve, reject) => {
|
const imageData = await new Promise<IDataObject>((resolve, reject) => {
|
||||||
gmInstance = gmInstance.identify((error:any, imageData:any) => {
|
gmInstance = gmInstance.identify((error, imageData) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(error);
|
reject(error);
|
||||||
return;
|
return;
|
||||||
|
@ -1241,7 +1241,7 @@ export class EditImage implements INodeType {
|
||||||
return resolve(newItem);
|
return resolve(newItem);
|
||||||
});
|
});
|
||||||
})));
|
})));
|
||||||
|
|
||||||
}
|
}
|
||||||
return this.prepareOutputData(returnData);
|
return this.prepareOutputData(returnData);
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,7 @@ export class EmailSend implements INodeType {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||||
const items = this.getInputData();
|
const items = this.getInputData();
|
||||||
|
|
||||||
const returnData: INodeExecutionData[] = [];
|
const returnData: INodeExecutionData[] = [];
|
||||||
|
@ -132,7 +132,7 @@ export class EmailSend implements INodeType {
|
||||||
let item: INodeExecutionData;
|
let item: INodeExecutionData;
|
||||||
|
|
||||||
for (let itemIndex = 0; itemIndex < length; itemIndex++) {
|
for (let itemIndex = 0; itemIndex < length; itemIndex++) {
|
||||||
|
|
||||||
item = items[itemIndex];
|
item = items[itemIndex];
|
||||||
|
|
||||||
const fromEmail = this.getNodeParameter('fromEmail', itemIndex) as string;
|
const fromEmail = this.getNodeParameter('fromEmail', itemIndex) as string;
|
||||||
|
@ -157,7 +157,7 @@ export class EmailSend implements INodeType {
|
||||||
secure: credentials.secure as boolean,
|
secure: credentials.secure as boolean,
|
||||||
};
|
};
|
||||||
|
|
||||||
if(credentials.user || credentials.password) {
|
if (credentials.user || credentials.password) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
connectionOptions.auth = {
|
connectionOptions.auth = {
|
||||||
user: credentials.user as string,
|
user: credentials.user as string,
|
||||||
|
@ -208,10 +208,10 @@ export class EmailSend implements INodeType {
|
||||||
|
|
||||||
// Send the email
|
// Send the email
|
||||||
const info = await transporter.sendMail(mailOptions);
|
const info = await transporter.sendMail(mailOptions);
|
||||||
|
|
||||||
returnData.push({ json: info });
|
returnData.push({ json: info });
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.prepareOutputData(returnData);
|
return this.prepareOutputData(returnData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ export class FunctionItem implements INodeType {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||||
const items = this.getInputData();
|
const items = this.getInputData();
|
||||||
|
|
||||||
const returnData: INodeExecutionData[] = [];
|
const returnData: INodeExecutionData[] = [];
|
||||||
|
@ -115,9 +115,9 @@ export class FunctionItem implements INodeType {
|
||||||
if (item.binary) {
|
if (item.binary) {
|
||||||
returnItem.binary = item.binary;
|
returnItem.binary = item.binary;
|
||||||
}
|
}
|
||||||
|
|
||||||
returnData.push(returnItem);
|
returnData.push(returnItem);
|
||||||
}
|
}
|
||||||
return this.prepareOutputData(returnData);
|
return this.prepareOutputData(returnData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,9 +105,9 @@ export class Mailgun implements INodeType {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||||
const items = this.getInputData();
|
const items = this.getInputData();
|
||||||
|
|
||||||
const returnData: INodeExecutionData[] = [];
|
const returnData: INodeExecutionData[] = [];
|
||||||
const length = items.length as unknown as number;
|
const length = items.length as unknown as number;
|
||||||
let item: INodeExecutionData;
|
let item: INodeExecutionData;
|
||||||
|
@ -187,7 +187,7 @@ export class Mailgun implements INodeType {
|
||||||
returnData.push({
|
returnData.push({
|
||||||
json: responseData,
|
json: responseData,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return this.prepareOutputData(returnData)
|
return this.prepareOutputData(returnData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ export class ReadBinaryFile implements INodeType {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||||
const items = this.getInputData();
|
const items = this.getInputData();
|
||||||
|
|
||||||
const returnData: INodeExecutionData[] = [];
|
const returnData: INodeExecutionData[] = [];
|
||||||
|
@ -86,8 +86,8 @@ export class ReadBinaryFile implements INodeType {
|
||||||
|
|
||||||
newItem.binary![dataPropertyName] = await this.helpers.prepareBinaryData(data, filePath);
|
newItem.binary![dataPropertyName] = await this.helpers.prepareBinaryData(data, filePath);
|
||||||
returnData.push(newItem);
|
returnData.push(newItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.prepareOutputData(returnData);
|
return this.prepareOutputData(returnData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ export class ReadPdf implements INodeType {
|
||||||
let item: INodeExecutionData;
|
let item: INodeExecutionData;
|
||||||
|
|
||||||
for (let itemIndex = 0; itemIndex < length; itemIndex++) {
|
for (let itemIndex = 0; itemIndex < length; itemIndex++) {
|
||||||
|
|
||||||
item = items[itemIndex];
|
item = items[itemIndex];
|
||||||
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', itemIndex) as string;
|
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', itemIndex) as string;
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ export class ReadPdf implements INodeType {
|
||||||
binary: item.binary,
|
binary: item.binary,
|
||||||
json: await pdf(binaryData),
|
json: await pdf(binaryData),
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
return this.prepareOutputData(returnData);
|
return this.prepareOutputData(returnData);
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ export class WriteBinaryFile implements INodeType {
|
||||||
|
|
||||||
|
|
||||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||||
|
|
||||||
const items = this.getInputData();
|
const items = this.getInputData();
|
||||||
|
|
||||||
const returnData: INodeExecutionData[] = [];
|
const returnData: INodeExecutionData[] = [];
|
||||||
|
@ -65,9 +65,9 @@ export class WriteBinaryFile implements INodeType {
|
||||||
for (let itemIndex = 0; itemIndex < length; itemIndex++) {
|
for (let itemIndex = 0; itemIndex < length; itemIndex++) {
|
||||||
|
|
||||||
const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex) as string;
|
const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex) as string;
|
||||||
|
|
||||||
const fileName = this.getNodeParameter('fileName', itemIndex) as string;
|
const fileName = this.getNodeParameter('fileName', itemIndex) as string;
|
||||||
|
|
||||||
item = items[itemIndex];
|
item = items[itemIndex];
|
||||||
|
|
||||||
if (item.binary === undefined) {
|
if (item.binary === undefined) {
|
||||||
|
@ -95,7 +95,7 @@ export class WriteBinaryFile implements INodeType {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the file name to data
|
// Add the file name to data
|
||||||
|
|
||||||
(newItem.json as IDataObject).fileName = fileName;
|
(newItem.json as IDataObject).fileName = fileName;
|
||||||
|
|
||||||
returnData.push(newItem);
|
returnData.push(newItem);
|
||||||
|
|
Loading…
Reference in a new issue