Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/n8n-io/n8n into node-1974-…
Browse files Browse the repository at this point in the history
…add-a-github-star-button-in-app
  • Loading branch information
michael-radency committed Nov 13, 2024
2 parents 32d047b + ca8cb45 commit 9320ca3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
9 changes: 9 additions & 0 deletions packages/core/src/NodeExecuteFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,10 @@ function convertN8nRequestToAxios(n8nRequest: IHttpRequestOptions): AxiosRequest

axiosRequest.params = n8nRequest.qs;

if (n8nRequest.abortSignal) {
axiosRequest.signal = n8nRequest.abortSignal;
}

if (n8nRequest.baseURL !== undefined) {
axiosRequest.baseURL = n8nRequest.baseURL;
}
Expand Down Expand Up @@ -1718,6 +1722,11 @@ export async function httpRequestWithAuthentication(
) {
removeEmptyBody(requestOptions);

// Cancel this request on execution cancellation
if ('getExecutionCancelSignal' in this) {
requestOptions.abortSignal = this.getExecutionCancelSignal();
}

let credentialsDecrypted: ICredentialDataDecryptedObject | undefined;
try {
const parentTypes = additionalData.credentialsHelper.getParentTypes(credentialsType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,12 @@ function onKeyDown(e: KeyboardEvent) {
}
}
} else if (e.key === 'Enter') {
emit('update:modelValue', sortedResources.value[hoverIndex.value].value);
const selected = sortedResources.value[hoverIndex.value]?.value;
// Selected resource can be empty when loading or empty results
if (selected) {
emit('update:modelValue', selected);
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion packages/workflow/src/Interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */

import type { CallbackManager as CallbackManagerLC } from '@langchain/core/callbacks/manager';
import type { AxiosProxyConfig } from 'axios';
import type { AxiosProxyConfig, GenericAbortSignal } from 'axios';
import type * as express from 'express';
import type FormData from 'form-data';
import type { PathLike } from 'fs';
Expand Down Expand Up @@ -529,6 +529,7 @@ export interface IHttpRequestOptions {
};
timeout?: number;
json?: boolean;
abortSignal?: GenericAbortSignal;
}

/**
Expand Down

0 comments on commit 9320ca3

Please sign in to comment.