refactor: Delete unnecessary interface re-exports from core, and delete unused code in nodes-base (no-changelog) (#6631)
This commit is contained in:
committed by
GitHub
parent
329d22f5d1
commit
e57e85edf7
@@ -1,7 +1,6 @@
|
||||
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||
import type { IExecuteFunctions } from 'n8n-core';
|
||||
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
INodeExecutionData,
|
||||
INodeType,
|
||||
INodeTypeBaseDescription,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import type { IExecuteFunctions } from 'n8n-core';
|
||||
|
||||
import type { IDataObject, INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
||||
import type {
|
||||
IDataObject,
|
||||
IExecuteFunctions,
|
||||
INodeExecutionData,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { NodeOperationError, sleep } from 'n8n-workflow';
|
||||
import { getResolvables, updateDisplayOptions } from '@utils/utilities';
|
||||
@@ -232,7 +235,7 @@ export async function execute(this: IExecuteFunctions): Promise<INodeExecutionDa
|
||||
qs,
|
||||
);
|
||||
|
||||
returnData.push(...prepareOutput(queryResponse, i, raw, includeSchema));
|
||||
returnData.push(...prepareOutput.call(this, queryResponse, i, raw, includeSchema));
|
||||
} else {
|
||||
jobs.push({ jobId, projectId, i, raw, includeSchema, location: options.location });
|
||||
}
|
||||
@@ -271,7 +274,7 @@ export async function execute(this: IExecuteFunctions): Promise<INodeExecutionDa
|
||||
if (response.jobComplete) {
|
||||
completedJobs.push(job.jobId);
|
||||
|
||||
returnData.push(...prepareOutput(response, job.i, job.raw, job.includeSchema));
|
||||
returnData.push(...prepareOutput.call(this, response, job.i, job.raw, job.includeSchema));
|
||||
}
|
||||
if ((response?.errors as IDataObject[])?.length) {
|
||||
const errorMessages = (response.errors as IDataObject[]).map((error) => error.message);
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import type { IExecuteFunctions } from 'n8n-core';
|
||||
import type { IDataObject, INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
||||
import type {
|
||||
IDataObject,
|
||||
IExecuteFunctions,
|
||||
INodeExecutionData,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { IExecuteFunctions } from 'n8n-core';
|
||||
import type { INodeExecutionData } from 'n8n-workflow';
|
||||
import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
import type { GoogleBigQuery } from './node.type';
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import type { IExecuteFunctions } from 'n8n-core';
|
||||
import { constructExecutionMetaData } from 'n8n-core';
|
||||
import type { IDataObject, INodeExecutionData } from 'n8n-workflow';
|
||||
import type { IDataObject, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
|
||||
import { jsonParse, NodeOperationError } from 'n8n-workflow';
|
||||
import type { SchemaField, TableRawData, TableSchema } from './interfaces';
|
||||
|
||||
@@ -56,6 +54,7 @@ export function simplify(data: TableRawData[], schema: SchemaField[], includeSch
|
||||
}
|
||||
|
||||
export function prepareOutput(
|
||||
this: IExecuteFunctions,
|
||||
response: IDataObject,
|
||||
itemIndex: number,
|
||||
rawOutput: boolean,
|
||||
@@ -82,9 +81,12 @@ export function prepareOutput(
|
||||
}
|
||||
}
|
||||
|
||||
const executionData = constructExecutionMetaData(wrapData(responseData as IDataObject[]), {
|
||||
itemData: { item: itemIndex },
|
||||
});
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
wrapData(responseData as IDataObject[]),
|
||||
{
|
||||
itemData: { item: itemIndex },
|
||||
},
|
||||
);
|
||||
|
||||
return executionData;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
import type { OptionsWithUri } from 'request';
|
||||
|
||||
import type { IExecuteFunctions, IExecuteSingleFunctions, ILoadOptionsFunctions } from 'n8n-core';
|
||||
import type { IDataObject, JsonObject } from 'n8n-workflow';
|
||||
import type {
|
||||
IDataObject,
|
||||
IExecuteFunctions,
|
||||
IExecuteSingleFunctions,
|
||||
ILoadOptionsFunctions,
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
import { getGoogleAccessToken } from '../../../GenericFunctions';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user