fix: Set '@typescript-eslint/return-await' rule to 'always' for node code (no-changelog) (#8363)

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
Tomi Turtiainen
2024-01-17 17:08:50 +02:00
committed by GitHub
parent 2eb829a6b4
commit 9a1cc56806
369 changed files with 1041 additions and 928 deletions

View File

@@ -111,20 +111,20 @@ export class BinaryDataService {
}
async toBuffer(bufferOrStream: Buffer | Readable) {
return toBuffer(bufferOrStream);
return await toBuffer(bufferOrStream);
}
async getAsStream(binaryDataId: string, chunkSize?: number) {
const [mode, fileId] = binaryDataId.split(':');
return this.getManager(mode).getAsStream(fileId, chunkSize);
return await this.getManager(mode).getAsStream(fileId, chunkSize);
}
async getAsBuffer(binaryData: IBinaryData) {
if (binaryData.id) {
const [mode, fileId] = binaryData.id.split(':');
return this.getManager(mode).getAsBuffer(fileId);
return await this.getManager(mode).getAsBuffer(fileId);
}
return Buffer.from(binaryData.data, BINARY_ENCODING);
@@ -139,7 +139,7 @@ export class BinaryDataService {
async getMetadata(binaryDataId: string) {
const [mode, fileId] = binaryDataId.split(':');
return this.getManager(mode).getMetadata(fileId);
return await this.getManager(mode).getMetadata(fileId);
}
async deleteMany(ids: BinaryData.IdsForDeletion) {
@@ -159,10 +159,14 @@ export class BinaryDataService {
const returnInputData = (inputData as INodeExecutionData[][]).map(
async (executionDataArray) => {
if (executionDataArray) {
return Promise.all(
return await Promise.all(
executionDataArray.map(async (executionData) => {
if (executionData.binary) {
return this.duplicateBinaryDataInExecData(workflowId, executionId, executionData);
return await this.duplicateBinaryDataInExecData(
workflowId,
executionId,
executionData,
);
}
return executionData;
@@ -174,7 +178,7 @@ export class BinaryDataService {
},
);
return Promise.all(returnInputData);
return await Promise.all(returnInputData);
}
return inputData as INodeExecutionData[][];
@@ -217,13 +221,13 @@ export class BinaryDataService {
const [_mode, fileId] = binaryDataId.split(':');
return manager?.copyByFileId(workflowId, executionId, fileId).then((newFileId) => ({
return await manager?.copyByFileId(workflowId, executionId, fileId).then((newFileId) => ({
newId: this.createBinaryDataId(newFileId),
key,
}));
});
return Promise.all(bdPromises).then((b) => {
return await Promise.all(bdPromises).then((b) => {
return b.reduce((acc, curr) => {
if (acc.binary && curr) {
acc.binary[curr.key].id = curr.newId;