refactor(core): Refactor execution contexts to reduce code duplication, and improve type-safety (no-changelog) (#12138)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-12-11 11:26:27 +01:00
committed by GitHub
parent e6985f79db
commit ec54333f78
15 changed files with 329 additions and 449 deletions

View File

@@ -138,7 +138,10 @@ export class WebhookContext extends NodeExecutionContext implements IWebhookFunc
return this.webhookData.webhookDescription.name;
}
async getInputConnectionData(inputName: NodeConnectionType, itemIndex: number): Promise<unknown> {
async getInputConnectionData(
connectionType: NodeConnectionType,
itemIndex: number,
): Promise<unknown> {
// To be able to use expressions like "$json.sessionId" set the
// body data the webhook received to what is normally used for
// incoming node data.
@@ -170,7 +173,7 @@ export class WebhookContext extends NodeExecutionContext implements IWebhookFunc
executeData,
this.mode,
this.closeFunctions,
inputName,
connectionType,
itemIndex,
);
}