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

@@ -46,7 +46,7 @@ export const VectorStoreInMemory = createVectorStoreNode({
const memoryKey = context.getNodeParameter('memoryKey', itemIndex) as string;
const vectorStoreSingleton = MemoryVectorStoreManager.getInstance(embeddings);
return vectorStoreSingleton.getVectorStore(`${workflowId}__${memoryKey}`);
return await vectorStoreSingleton.getVectorStore(`${workflowId}__${memoryKey}`);
},
async populateVectorStore(context, embeddings, documents, itemIndex) {
const memoryKey = context.getNodeParameter('memoryKey', itemIndex) as string;

View File

@@ -108,6 +108,6 @@ export class VectorStoreInMemoryInsert implements INodeType {
clearStore,
);
return this.prepareOutputData(serializedDocuments);
return await this.prepareOutputData(serializedDocuments);
}
}

View File

@@ -97,7 +97,7 @@ export const VectorStorePinecone = createVectorStoreNode({
filter,
};
return PineconeStore.fromExistingIndex(embeddings, config);
return await PineconeStore.fromExistingIndex(embeddings, config);
},
async populateVectorStore(context, embeddings, documents, itemIndex) {
const index = context.getNodeParameter('pineconeIndex', itemIndex, '', {

View File

@@ -134,6 +134,6 @@ export class VectorStorePineconeInsert implements INodeType {
pineconeIndex,
});
return this.prepareOutputData(serializedDocuments);
return await this.prepareOutputData(serializedDocuments);
}
}

View File

@@ -59,7 +59,7 @@ export const VectorStoreQdrant = createVectorStoreNode({
collectionName: collection,
};
return QdrantVectorStore.fromExistingCollection(embeddings, config);
return await QdrantVectorStore.fromExistingCollection(embeddings, config);
},
async populateVectorStore(context, embeddings, documents, itemIndex) {
const collectionName = context.getNodeParameter('qdrantCollection', itemIndex, '', {

View File

@@ -76,7 +76,7 @@ export const VectorStoreSupabase = createVectorStoreNode({
const credentials = await context.getCredentials('supabaseApi');
const client = createClient(credentials.host as string, credentials.serviceRole as string);
return SupabaseVectorStore.fromExistingIndex(embeddings, {
return await SupabaseVectorStore.fromExistingIndex(embeddings, {
client,
tableName,
queryName: options.queryName ?? 'match_documents',

View File

@@ -122,6 +122,6 @@ export class VectorStoreSupabaseInsert implements INodeType {
queryName,
});
return this.prepareOutputData(serializedDocuments);
return await this.prepareOutputData(serializedDocuments);
}
}

View File

@@ -139,6 +139,6 @@ export class VectorStoreZepInsert implements INodeType {
await ZepVectorStore.fromDocuments(processedDocuments, embeddings, zepConfig);
return this.prepareOutputData(serializedDocuments);
return await this.prepareOutputData(serializedDocuments);
}
}

View File

@@ -239,7 +239,7 @@ export const createVectorStoreNode = (args: VectorStoreNodeConstructorArgs) =>
resultData.push(...serializedDocs);
}
return this.prepareOutputData(resultData);
return await this.prepareOutputData(resultData);
}
if (mode === 'insert') {
@@ -267,7 +267,7 @@ export const createVectorStoreNode = (args: VectorStoreNodeConstructorArgs) =>
}
}
return this.prepareOutputData(resultData);
return await this.prepareOutputData(resultData);
}
throw new NodeOperationError(