chore: Lintfix nodes-base (#16877)

This commit is contained in:
Iván Ovejero
2025-07-01 15:05:40 +02:00
committed by GitHub
parent 38c2e6184c
commit 422aa82524
56 changed files with 64 additions and 88 deletions

View File

@@ -80,13 +80,7 @@ export async function handleListing(
const itemsKey = toItemsKey(endpoint);
do {
responseData = await actionNetworkApiRequest.call(
this,
method as IHttpRequestMethods,
endpoint,
body,
qs,
);
responseData = await actionNetworkApiRequest.call(this, method, endpoint, body, qs);
const items = responseData._embedded[itemsKey];
returnData.push(...(items as IDataObject[]));

View File

@@ -21,8 +21,8 @@ export const createMockExecuteFunction = (nodeParameters: IDataObject) => {
getNodeParameter(
parameterName: string,
_itemIndex: number,
fallbackValue?: IDataObject | undefined,
options?: IGetNodeParameterOptions | undefined,
fallbackValue?: IDataObject,
options?: IGetNodeParameterOptions,
) {
const parameter = options?.extractValue ? `${parameterName}.value` : parameterName;
return get(nodeParameters, parameter, fallbackValue);

View File

@@ -68,7 +68,7 @@ export async function execute(
this: IExecuteFunctions,
index: number,
): Promise<INodeExecutionData[]> {
const returnAll = this.getNodeParameter('returnAll', index, false) as boolean;
const returnAll = this.getNodeParameter('returnAll', index, false);
const limit = this.getNodeParameter('limit', index, 10);
const sessionIds = this.getNodeParameter('sessionIds', index, '') as string;
const outputSingleItem = this.getNodeParameter('outputSingleItem', index, true) as boolean;

View File

@@ -25,8 +25,8 @@ export const createMockExecuteFunction = (nodeParameters: IDataObject) => {
getNodeParameter(
parameterName: string,
_itemIndex: number,
fallbackValue?: IDataObject | undefined,
options?: IGetNodeParameterOptions | undefined,
fallbackValue?: IDataObject,
options?: IGetNodeParameterOptions,
) {
const parameter = options?.extractValue ? `${parameterName}.value` : parameterName;
return get(nodeParameters, parameter, fallbackValue);

View File

@@ -1,6 +1,5 @@
import { NodeApiError } from 'n8n-workflow';
import { createMockExecuteFunction } from './node/helpers';
import { ERROR_MESSAGES, SESSION_STATUS } from '../constants';
import {
createSession,
@@ -18,6 +17,7 @@ import {
convertScreenshotToBinary,
} from '../GenericFunctions';
import type * as transport from '../transport';
import { createMockExecuteFunction } from './node/helpers';
const mockCreatedSession = {
data: { id: 'new-session-123', status: SESSION_STATUS.RUNNING },

View File

@@ -19,7 +19,7 @@ export async function asanaApiRequest(
endpoint: `/${string}`,
body: object,
query?: IDataObject,
uri?: string | undefined,
uri?: string,
): Promise<any> {
const authenticationMethod = this.getNodeParameter('authentication', 0) as string;

View File

@@ -65,7 +65,7 @@ export function simplify(item: IAttributeValue): IDataObject {
for (const [attribute, value] of Object.entries(item)) {
const [type, content] = Object.entries(value)[0] as [AttributeValueType, string];
//nedded as simplify is used in decodeItem
// eslint-disable-next-line @typescript-eslint/no-use-before-define
output[attribute] = decodeAttribute(type, content);
}

View File

@@ -21,7 +21,7 @@ export async function brandfetchApiRequest(
): Promise<any> {
try {
let options: IRequestOptions = {
method: method as IHttpRequestMethods,
method,
qs,
body,
url: uri || `https://api.brandfetch.io/v2${resource}`,

View File

@@ -14,8 +14,8 @@ describe('Cron Node', () => {
const fakeExecuteFunction = {
getNodeParameter(
parameterName: string,
fallbackValue?: IDataObject | undefined,
options?: IGetNodeParameterOptions | undefined,
fallbackValue?: IDataObject,
options?: IGetNodeParameterOptions,
) {
const parameter = options?.extractValue ? `${parameterName}.value` : parameterName;

View File

@@ -117,7 +117,7 @@ export async function getNewEmails(
dataPropertyAttachmentsPrefixName,
);
(parsedEmail.json as IDataObject).attributes = {
parsedEmail.json.attributes = {
uid: message.attributes.uid,
};

View File

@@ -297,7 +297,6 @@ export class Form extends Node {
],
properties: [
{
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased
displayName: 'An n8n Form Trigger node must be set up before this node',
name: 'triggerNotice',
type: 'notice',

View File

@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-loop-func */
import type { NodeVMOptions } from '@n8n/vm2';
import { NodeVM } from '@n8n/vm2';
import type {

View File

@@ -6,7 +6,6 @@ import type { SchemaField, TableRawData, TableSchema } from './interfaces';
function getFieldValue(schemaField: SchemaField, field: IDataObject, parseTimestamps = false) {
if (schemaField.type === 'RECORD') {
// eslint-disable-next-line @typescript-eslint/no-use-before-define
return simplify([field.v as TableRawData], schemaField.fields as unknown as SchemaField[]);
} else {
let value = field.v;

View File

@@ -38,7 +38,7 @@ export async function googleApiRequest(
qs: IDataObject = {},
uri?: string,
noCredentials = false,
encoding?: null | undefined,
encoding?: null,
) {
const options: IRequestOptions = {
headers: {

View File

@@ -10,9 +10,9 @@ import type {
} from 'n8n-workflow';
import { NodeConnectionTypes, NodeApiError } from 'n8n-workflow';
import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_DRIVE_FOLDER_URL_REGEX } from '../constants';
import { extractId, googleApiRequest, googleApiRequestAllItems } from './v1/GenericFunctions';
import { fileSearch, folderSearch } from './v2/methods/listSearch';
import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_DRIVE_FOLDER_URL_REGEX } from '../constants';
export class GoogleDriveTrigger implements INodeType {
description: INodeTypeDescription = {

View File

@@ -21,8 +21,8 @@ export const createMockExecuteFunction = (
getNodeParameter(
parameterName: string,
_itemIndex: number,
fallbackValue?: IDataObject | undefined,
options?: IGetNodeParameterOptions | undefined,
fallbackValue?: IDataObject,
options?: IGetNodeParameterOptions,
) {
const parameter = options?.extractValue ? `${parameterName}.value` : parameterName;
return get(nodeParameters, parameter, fallbackValue);

View File

@@ -152,7 +152,7 @@ export function documentToJson(fields: IDataObject): IDataObject {
// @ts-ignore
const list = value.values as IDataObject[];
// @ts-ignore
return !!list ? list.map((l) => documentToJson(l)) : [];
return list ? list.map((l) => documentToJson(l)) : [];
}
} else {
// @ts-ignore

View File

@@ -1,4 +1,3 @@
/* eslint-disable n8n-nodes-base/node-param-display-name-miscased */
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import { jsonParse } from 'n8n-workflow';
import nock from 'nock';

View File

@@ -15,12 +15,12 @@ import {
getRevisionFile,
sheetBinaryToArrayOfArrays,
} from './GoogleSheetsTrigger.utils';
import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_SHEETS_SHEET_URL_REGEX } from '../constants';
import { GoogleSheet } from './v2/helpers/GoogleSheet';
import type { ResourceLocator, ValueRenderOption } from './v2/helpers/GoogleSheets.types';
import { sheetsSearch, spreadSheetsSearch } from './v2/methods/listSearch';
import { getSheetHeaderRowAndSkipEmpty } from './v2/methods/loadOptions';
import { apiRequest } from './v2/transport';
import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_SHEETS_SHEET_URL_REGEX } from '../constants';
export const document: INodeProperties = {
displayName: 'Document',

View File

@@ -48,7 +48,7 @@ export class GoogleSheet {
constructor(
spreadsheetId: string,
executeFunctions: IExecuteFunctions | ILoadOptionsFunctions,
options?: ISheetOptions | undefined,
options?: ISheetOptions,
) {
// options = <SheetOptions>options || {};
if (!options) {

View File

@@ -364,7 +364,7 @@ export async function execute(
"At least one value has to be added under 'Values to Send'",
);
}
// eslint-disable-next-line @typescript-eslint/no-loop-func
const fields = valuesToSend.reduce((acc, entry) => {
if (entry.column === 'newColumn') {
const columnName = entry.columnName as string;

View File

@@ -340,7 +340,7 @@ export async function execute(
"At least one value has to be added under 'Values to Send'",
);
}
// eslint-disable-next-line @typescript-eslint/no-loop-func
const fields = valuesToSend.reduce((acc, entry) => {
if (entry.column === 'newColumn') {
const columnName = entry.columnName as string;

View File

@@ -15,7 +15,7 @@ export async function gotifyApiRequest(
body: any = {},
qs: IDataObject = {},
uri?: string | undefined,
uri?: string,
_option = {},
): Promise<any> {
const credentials = await this.getCredentials('gotifyApi');
@@ -30,7 +30,7 @@ export async function gotifyApiRequest(
qs,
uri: uri || `${credentials.url}${path}`,
json: true,
rejectUnauthorized: !credentials.ignoreSSLIssues as boolean,
rejectUnauthorized: !credentials.ignoreSSLIssues,
};
try {
if (Object.keys(body as IDataObject).length === 0) {

View File

@@ -83,7 +83,6 @@ export function sanitizeUiMessage(
sendRequest = {
...sendRequest,
[requestProperty]: Object.keys(sendRequest[requestProperty] as object).reduce(
// eslint-disable-next-line @typescript-eslint/no-loop-func
(acc: IDataObject, curr) => {
acc[curr] = authDataKeys[requestProperty].includes(curr)
? REDACTED

View File

@@ -1112,7 +1112,6 @@ export class HttpRequestV1 implements INodeType {
}
if (options.splitIntoItems === true && Array.isArray(response)) {
// eslint-disable-next-line @typescript-eslint/no-loop-func
response.forEach((item) =>
returnItems.push({
json: item,

View File

@@ -1175,7 +1175,6 @@ export class HttpRequestV2 implements INodeType {
}
if (options.splitIntoItems === true && Array.isArray(response)) {
// eslint-disable-next-line @typescript-eslint/no-loop-func
response.forEach((item) =>
returnItems.push({
json: item,

View File

@@ -27,8 +27,6 @@ import type { Readable } from 'stream';
import { keysToLowercase } from '@utils/utilities';
import { mainProperties } from './Description';
import { setFilename } from './utils/binaryData';
import { mimeTypeFromResponse } from './utils/parse';
import type { BodyParameter, IAuthDataSanitizeKeys } from '../GenericFunctions';
import {
binaryContentTypes,
@@ -40,6 +38,8 @@ import {
sanitizeUiMessage,
setAgentOptions,
} from '../GenericFunctions';
import { setFilename } from './utils/binaryData';
import { mimeTypeFromResponse } from './utils/parse';
import { configureResponseOptimizer } from '../shared/optimizeResponse';
function toText<T>(data: T) {
@@ -1000,7 +1000,6 @@ export class HttpRequestV3 implements INodeType {
}
if (Array.isArray(response)) {
// eslint-disable-next-line @typescript-eslint/no-loop-func
response.forEach((item) =>
returnItems.push({
json: item,

View File

@@ -33,8 +33,8 @@ describe('Test IF v2 Node Tests', () => {
getNodeParameter(
parameterName: string,
itemIndex: number,
fallbackValue?: IDataObject | undefined,
options?: IGetNodeParameterOptions | undefined,
fallbackValue?: IDataObject,
options?: IGetNodeParameterOptions,
) {
const parameter = options?.extractValue ? `${parameterName}.value` : parameterName;

View File

@@ -55,7 +55,7 @@ export const createClient = async (credentials: MqttCredential): Promise<MqttCli
const onConnect = () => {
client.removeListener('connect', onConnect);
// eslint-disable-next-line @typescript-eslint/no-use-before-define
client.removeListener('error', onError);
resolve(client);
};

View File

@@ -1,4 +1,3 @@
/* eslint-disable n8n-nodes-base/node-param-display-name-miscased-id */
/* eslint-disable n8n-nodes-base/node-param-display-name-miscased */
export const microsoftEntraApiResponse = {

View File

@@ -27,8 +27,8 @@ const fakeExecute = (nodeParameters: IDataObject[]) => {
getNodeParameter(
parameterName: string,
itemIndex: number,
fallbackValue?: IDataObject | undefined,
options?: IGetNodeParameterOptions | undefined,
fallbackValue?: IDataObject,
options?: IGetNodeParameterOptions,
) {
const parameter = options?.extractValue ? `${parameterName}.value` : parameterName;
return get(nodeParameters[itemIndex], parameter, fallbackValue);

View File

@@ -20,14 +20,14 @@ describe('Azure Storage Node', () => {
value: 'mycontainer',
} as INodeParameterResourceLocator;
}
// eslint-disable-next-line n8n-local-rules/no-plain-errors
throw new Error('Unknown parameter');
});
const mockGetCredentials = jest.fn(async (type: string, _itemIndex?: number) => {
if (type === 'azureStorageSharedKeyApi') {
return credentials.azureStorageSharedKeyApi;
}
// eslint-disable-next-line n8n-local-rules/no-plain-errors
throw new Error('Unknown credentials');
});
const mockContext = {
@@ -70,14 +70,14 @@ describe('Azure Storage Node', () => {
if (parameterName === 'authentication') {
return 'sharedKey';
}
// eslint-disable-next-line n8n-local-rules/no-plain-errors
throw new Error('Unknown parameter');
});
const mockGetCredentials = jest.fn(async (type: string, _itemIndex?: number) => {
if (type === 'azureStorageSharedKeyApi') {
return credentials.azureStorageSharedKeyApi;
}
// eslint-disable-next-line n8n-local-rules/no-plain-errors
throw new Error('Unknown credentials');
});
const mockContext = {

View File

@@ -311,7 +311,7 @@ export class MicrosoftTeamsTrigger implements INodeType {
const webhookUrl = this.getNodeWebhookUrl('default');
const webhookData = this.getWorkflowStaticData('node');
if (!webhookUrl || !webhookUrl.startsWith('https://')) {
if (!webhookUrl?.startsWith('https://')) {
throw new NodeApiError(this.getNode(), {
message: 'Invalid Notification URL',
description: `The webhook URL "${webhookUrl}" is invalid. Microsoft Graph requires an HTTPS URL.`,

View File

@@ -14,7 +14,7 @@ export async function nasaApiRequest(
endpoint: string,
qs: IDataObject,
option: IDataObject = {},
uri?: string | undefined,
uri?: string,
): Promise<any> {
const credentials = await this.getCredentials('nasaApi');

View File

@@ -17,7 +17,7 @@ export async function nextCloudApiRequest(
endpoint: string,
body: object | string | Buffer,
headers?: IDataObject,
encoding?: null | undefined,
encoding?: null,
query?: IDataObject,
) {
const resource = this.getNodeParameter('resource', 0);

View File

@@ -1134,7 +1134,6 @@ export class NextCloud implements INodeType {
endpoint,
);
} else if (['file', 'folder'].includes(resource) && operation === 'share') {
// eslint-disable-next-line @typescript-eslint/no-loop-func
const jsonResponseData: IDataObject = await new Promise((resolve, reject) => {
parseString(responseData as string, { explicitArray: false }, (err, data) => {
if (err) {
@@ -1162,7 +1161,6 @@ export class NextCloud implements INodeType {
returnData.push(...executionData);
} else if (resource === 'user') {
if (operation !== 'getAll') {
// eslint-disable-next-line @typescript-eslint/no-loop-func
const jsonResponseData: IDataObject = await new Promise((resolve, reject) => {
parseString(responseData as string, { explicitArray: false }, (err, data) => {
if (err) {
@@ -1193,7 +1191,6 @@ export class NextCloud implements INodeType {
returnData.push(...executionData);
} else {
// eslint-disable-next-line @typescript-eslint/no-loop-func
const jsonResponseData: IDataObject[] = await new Promise((resolve, reject) => {
parseString(responseData as string, { explicitArray: false }, (err, data) => {
if (err) {
@@ -1219,7 +1216,6 @@ export class NextCloud implements INodeType {
});
}
} else if (resource === 'folder' && operation === 'list') {
// eslint-disable-next-line @typescript-eslint/no-loop-func
const jsonResponseData: IDataObject = await new Promise((resolve, reject) => {
parseString(responseData as string, { explicitArray: false }, (err, data) => {
if (err) {

View File

@@ -37,8 +37,8 @@ const createMockExecuteFunction = (nodeParameters: IDataObject) => {
getNodeParameter(
parameterName: string,
_itemIndex: number,
fallbackValue?: IDataObject | undefined,
options?: IGetNodeParameterOptions | undefined,
fallbackValue?: IDataObject,
options?: IGetNodeParameterOptions,
) {
const parameter = options?.extractValue ? `${parameterName}.value` : parameterName;
return get(nodeParameters, parameter, fallbackValue);

View File

@@ -15,7 +15,7 @@ export async function pushbulletApiRequest(
body: any = {},
qs: IDataObject = {},
uri?: string | undefined,
uri?: string,
option = {},
): Promise<any> {
const options: IRequestOptions = {

View File

@@ -16,7 +16,7 @@ export async function pushcutApiRequest(
body: any = {},
qs: IDataObject = {},
uri?: string | undefined,
uri?: string,
option = {},
): Promise<any> {
const credentials = await this.getCredentials('pushcutApi');

View File

@@ -80,7 +80,7 @@ export async function s3ApiRequest(
qs: query,
uri: endpoint.toString(),
body: signOpts.body,
rejectUnauthorized: !credentials.ignoreSSLIssues as boolean,
rejectUnauthorized: !credentials.ignoreSSLIssues,
};
if (Object.keys(option).length !== 0) {

View File

@@ -84,7 +84,7 @@ export const rowFields: INodeProperties[] = [
},
},
default: '',
// eslint-disable-next-line n8n-nodes-base/node-param-description-wrong-for-dynamic-options
description:
'The name of SeaTable table to access. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
},

View File

@@ -1,4 +1,3 @@
/* eslint-disable n8n-nodes-base/node-param-display-name-miscased */
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
import nock from 'nock';

View File

@@ -36,8 +36,8 @@ const createMockExecuteFunction = (
getNodeParameter(
parameterName: string,
_itemIndex: number,
fallbackValue?: IDataObject | undefined,
options?: IGetNodeParameterOptions | undefined,
fallbackValue?: IDataObject,
options?: IGetNodeParameterOptions,
) {
const parameter = options?.extractValue ? `${parameterName}.value` : parameterName;
return get(nodeParameters, parameter, fallbackValue);

View File

@@ -26,8 +26,8 @@ export const createMockExecuteFunction = (nodeParameters: IDataObject) => {
getNodeParameter(
parameterName: string,
_itemIndex: number,
fallbackValue?: IDataObject | undefined,
options?: IGetNodeParameterOptions | undefined,
fallbackValue?: IDataObject,
options?: IGetNodeParameterOptions,
) {
const parameter = options?.extractValue ? `${parameterName}.value` : parameterName;
return get(nodeParameters, parameter, fallbackValue);

View File

@@ -65,7 +65,7 @@ export async function shopifyApiRequest(
// Only limit and fields are allowed for page_info links
// https://shopify.dev/docs/api/usage/pagination-rest#limitations-and-considerations
if (uri && uri.includes('page_info')) {
if (uri?.includes('page_info')) {
options.qs = {};
if (query.limit) {

View File

@@ -762,7 +762,6 @@ export class SlackV1 implements INodeType {
} else if (block.type === 'section') {
const textUi = (blockUi.textUi as IDataObject).textValue as IDataObject;
if (textUi) {
// eslint-disable-next-line @typescript-eslint/no-shadow
const text: Text = {};
if (textUi.type === 'plainText') {
text.type = 'plain_text';
@@ -827,7 +826,7 @@ export class SlackV1 implements INodeType {
const confirm: Confirm = {};
const titleUi = (confirmUi.titleUi as IDataObject)
.titleValue as IDataObject;
// eslint-disable-next-line @typescript-eslint/no-shadow
const textUi = (confirmUi.textUi as IDataObject).textValue as IDataObject;
const confirmTextUi = (confirmUi.confirmTextUi as IDataObject)
.confirmValue as IDataObject;
@@ -979,7 +978,7 @@ export class SlackV1 implements INodeType {
if (operation === 'getPermalink') {
const channel = this.getNodeParameter('channelId', i) as string;
const timestamp = this.getNodeParameter('timestamp', i) as string;
// eslint-disable-next-line @typescript-eslint/no-shadow
const qs = {
channel,
message_ts: timestamp,
@@ -1270,7 +1269,6 @@ export class SlackV1 implements INodeType {
const additionalFields = this.getNodeParameter('additionalFields', i);
// eslint-disable-next-line @typescript-eslint/no-shadow
const qs: IDataObject = {};
Object.assign(qs, additionalFields);
@@ -1349,7 +1347,6 @@ export class SlackV1 implements INodeType {
if (operation === 'get') {
const additionalFields = this.getNodeParameter('additionalFields', i);
// eslint-disable-next-line @typescript-eslint/no-shadow
const qs: IDataObject = {};
Object.assign(qs, additionalFields);

View File

@@ -32,14 +32,14 @@ export type SnowflakeCredential = Pick<
);
const extractPrivateKey = (credential: { privateKey: string; passphrase?: string }) => {
const key = formatPrivateKey(credential.privateKey as string);
const key = formatPrivateKey(credential.privateKey);
if (!credential.passphrase) return key;
const privateKeyObject = createPrivateKey({
key,
format: 'pem',
passphrase: credential.passphrase as string,
passphrase: credential.passphrase,
});
return privateKeyObject.export({

View File

@@ -33,8 +33,8 @@ describe('Test Supabase Node', () => {
getNodeParameter(
parameterName: string,
itemIndex: number,
fallbackValue?: IDataObject | undefined,
options?: IGetNodeParameterOptions | undefined,
fallbackValue?: IDataObject,
options?: IGetNodeParameterOptions,
) {
const parameter = options?.extractValue ? `${parameterName}.value` : parameterName;
const parameterValue = get(nodeParameters, parameter, fallbackValue);

View File

@@ -48,7 +48,7 @@ export async function taigaApiRequest(
resource: string,
body = {},
query = {},
uri?: string | undefined,
uri?: string,
option = {},
): Promise<any> {
const credentials = await this.getCredentials('taigaApi');

View File

@@ -16,7 +16,7 @@ export async function tapfiliateApiRequest(
body: IDataObject = {},
qs: IDataObject = {},
uri?: string | undefined,
uri?: string,
option: IDataObject = {},
) {
const credentials = await this.getCredentials('tapfiliateApi');

View File

@@ -21,8 +21,8 @@ export const createMockExecuteFunction = (nodeParameters: IDataObject) => {
getNodeParameter(
parameterName: string,
_itemIndex: number,
fallbackValue?: IDataObject | undefined,
options?: IGetNodeParameterOptions | undefined,
fallbackValue?: IDataObject,
options?: IGetNodeParameterOptions,
) {
const parameter = options?.extractValue ? `${parameterName}.value` : parameterName;
return get(nodeParameters, parameter, fallbackValue);

View File

@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/dot-notation */
import set from 'lodash/set';
import {
NodeConnectionTypes,

View File

@@ -5,9 +5,9 @@ import type {
INodeTypeDescription,
} from 'n8n-workflow';
import { getSites, getCollections, getFields } from '../GenericFunctions';
import { router } from './actions/router';
import { versionDescription } from './actions/versionDescription';
import { getSites, getCollections, getFields } from '../GenericFunctions';
export class WebflowV2 implements INodeType {
description: INodeTypeDescription;

View File

@@ -76,7 +76,7 @@ export async function execute(
let responseData;
for (let i = 0; i < items.length; i++) {
try {
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
const returnAll = this.getNodeParameter('returnAll', i);
const collectionId = this.getNodeParameter('collectionId', i) as string;
const qs: IDataObject = {};

View File

@@ -135,7 +135,7 @@ export const isIpWhitelisted = (
}
for (const address of whitelist) {
if (ip && ip.includes(address)) {
if (ip?.includes(address)) {
return true;
}

View File

@@ -11,8 +11,8 @@ export const createMockExecuteFunction = <T = IExecuteFunctions>(
getNodeParameter(
parameterName: string,
_itemIndex: number,
fallbackValue?: IDataObject | undefined,
options?: IGetNodeParameterOptions | undefined,
fallbackValue?: IDataObject,
options?: IGetNodeParameterOptions,
) {
const parameter = options?.extractValue ? `${parameterName}.value` : parameterName;
return get(nodeParameters, parameter, fallbackValue);