mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user