mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(core): Remove linting exceptions in nodes-base, @typescript-eslint/no-unsafe-argument (no-changelog)
This commit is contained in:
@@ -12,6 +12,7 @@ import type {
|
||||
INodeExecutionData,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
@@ -96,7 +97,7 @@ export class S3 implements INodeType {
|
||||
try {
|
||||
credentials = await this.getCredentials('s3');
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
@@ -186,7 +187,7 @@ export class S3 implements INodeType {
|
||||
responseData = responseData.slice(0, qs.limit);
|
||||
}
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData),
|
||||
this.helpers.returnJsonArray(responseData as IDataObject[]),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
@@ -260,7 +261,7 @@ export class S3 implements INodeType {
|
||||
}
|
||||
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData),
|
||||
this.helpers.returnJsonArray(responseData as IDataObject[]),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
@@ -305,7 +306,7 @@ export class S3 implements INodeType {
|
||||
qs,
|
||||
headers,
|
||||
{},
|
||||
region,
|
||||
region as string,
|
||||
);
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray({ success: true }),
|
||||
@@ -335,7 +336,7 @@ export class S3 implements INodeType {
|
||||
{ 'list-type': 2, prefix: folderKey },
|
||||
{},
|
||||
{},
|
||||
region,
|
||||
region as string,
|
||||
);
|
||||
|
||||
// folder empty then just delete it
|
||||
@@ -349,7 +350,7 @@ export class S3 implements INodeType {
|
||||
qs,
|
||||
{},
|
||||
{},
|
||||
region,
|
||||
region as string,
|
||||
);
|
||||
|
||||
responseData = { deleted: [{ Key: folderKey }] };
|
||||
@@ -387,7 +388,7 @@ export class S3 implements INodeType {
|
||||
{ delete: '' },
|
||||
headers,
|
||||
{},
|
||||
region,
|
||||
region as string,
|
||||
);
|
||||
|
||||
responseData = { deleted: responseData.DeleteResult.Deleted };
|
||||
@@ -432,7 +433,7 @@ export class S3 implements INodeType {
|
||||
qs,
|
||||
{},
|
||||
{},
|
||||
region,
|
||||
region as string,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
@@ -446,7 +447,7 @@ export class S3 implements INodeType {
|
||||
qs,
|
||||
{},
|
||||
{},
|
||||
region,
|
||||
region as string,
|
||||
);
|
||||
}
|
||||
if (Array.isArray(responseData)) {
|
||||
@@ -460,7 +461,7 @@ export class S3 implements INodeType {
|
||||
}
|
||||
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData),
|
||||
this.helpers.returnJsonArray(responseData as IDataObject[]),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
@@ -568,10 +569,10 @@ export class S3 implements INodeType {
|
||||
qs,
|
||||
headers,
|
||||
{},
|
||||
region,
|
||||
region as string,
|
||||
);
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData.CopyObjectResult),
|
||||
this.helpers.returnJsonArray(responseData.CopyObjectResult as IDataObject),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
@@ -607,7 +608,7 @@ export class S3 implements INodeType {
|
||||
qs,
|
||||
{},
|
||||
{ encoding: null, resolveWithFullResponse: true },
|
||||
region,
|
||||
region as string,
|
||||
);
|
||||
|
||||
let mimeType: string | undefined;
|
||||
@@ -666,7 +667,7 @@ export class S3 implements INodeType {
|
||||
qs,
|
||||
{},
|
||||
{},
|
||||
region,
|
||||
region as string,
|
||||
);
|
||||
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
@@ -711,7 +712,7 @@ export class S3 implements INodeType {
|
||||
qs,
|
||||
{},
|
||||
{},
|
||||
region,
|
||||
region as string,
|
||||
);
|
||||
} else {
|
||||
qs.limit = this.getNodeParameter('limit', 0);
|
||||
@@ -725,7 +726,7 @@ export class S3 implements INodeType {
|
||||
qs,
|
||||
{},
|
||||
{},
|
||||
region,
|
||||
region as string,
|
||||
);
|
||||
responseData = responseData.splice(0, qs.limit);
|
||||
}
|
||||
@@ -739,7 +740,7 @@ export class S3 implements INodeType {
|
||||
}
|
||||
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData),
|
||||
this.helpers.returnJsonArray(responseData as IDataObject[]),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
@@ -867,7 +868,7 @@ export class S3 implements INodeType {
|
||||
qs,
|
||||
headers,
|
||||
{},
|
||||
region,
|
||||
region as string,
|
||||
);
|
||||
} else {
|
||||
const fileContent = this.getNodeParameter('fileContent', i) as string;
|
||||
@@ -887,7 +888,7 @@ export class S3 implements INodeType {
|
||||
qs,
|
||||
headers,
|
||||
{},
|
||||
region,
|
||||
region as string,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user