refactor(core): Decouple datastore from workflow execution context (#18963)

This commit is contained in:
Iván Ovejero
2025-08-29 14:33:03 +02:00
committed by GitHub
parent 7cfef64799
commit 140e1b082e
6 changed files with 12 additions and 13 deletions

View File

@@ -7,7 +7,7 @@ declare module 'n8n-workflow' {
interface IWorkflowExecuteAdditionalData {
hooks?: ExecutionLifecycleHooks;
externalSecretsProxy: ExternalSecretsProxy;
dataStoreProxyProvider?: DataStoreProxyProvider;
'data-table'?: { dataStoreProxyProvider: DataStoreProxyProvider };
dataStoreProjectId?: string;
}
}

View File

@@ -10,8 +10,8 @@ export function getDataStoreHelperFunctions(
workflow: Workflow,
node: INode,
): Partial<DataStoreProxyFunctions> {
if (additionalData.dataStoreProxyProvider === undefined) return {};
const dataStoreProxyProvider = additionalData.dataStoreProxyProvider;
const dataStoreProxyProvider = additionalData['data-table']?.dataStoreProxyProvider;
if (!dataStoreProxyProvider) return {};
return {
getDataStoreAggregateProxy: async () =>
await dataStoreProxyProvider.getDataStoreAggregateProxy(