mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor: Impose import/order linting rule across nodes packages (no-changelog) (#12314)
This commit is contained in:
committed by
GitHub
parent
8c635993bd
commit
bafac73eb5
@@ -6,11 +6,11 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeConnectionType } from 'n8n-workflow';
|
||||
|
||||
import * as iCall from './actions/iCall.operation';
|
||||
import * as spreadsheet from './actions/spreadsheet.operation';
|
||||
import * as toBinary from './actions/toBinary.operation';
|
||||
import * as toText from './actions/toText.operation';
|
||||
import * as toJson from './actions/toJson.operation';
|
||||
import * as iCall from './actions/iCall.operation';
|
||||
import * as toText from './actions/toText.operation';
|
||||
|
||||
export class ConvertToFile implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import * as createEvent from '../../../ICalendar/createEvent.operation';
|
||||
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import * as createEvent from '../../../ICalendar/createEvent.operation';
|
||||
|
||||
export const description: INodeProperties[] = updateDisplayOptions(
|
||||
{
|
||||
show: {
|
||||
|
||||
@@ -5,10 +5,9 @@ import {
|
||||
type INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { generatePairedItemData, updateDisplayOptions } from '@utils/utilities';
|
||||
import type { JsonToSpreadsheetBinaryOptions, JsonToSpreadsheetBinaryFormat } from '@utils/binary';
|
||||
|
||||
import { convertJsonToSpreadsheetBinary } from '@utils/binary';
|
||||
import { generatePairedItemData, updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
export const operations = ['csv', 'html', 'rtf', 'ods', 'xls', 'xlsx'];
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import type { JsonToBinaryOptions } from '@utils/binary';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import { generatePairedItemData, updateDisplayOptions } from '@utils/utilities';
|
||||
import { createBinaryFromJson } from '@utils/binary';
|
||||
import { encodeDecodeOptions } from '@utils/descriptions';
|
||||
import { generatePairedItemData, updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
export const properties: INodeProperties[] = [
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import type { JsonToBinaryOptions } from '@utils/binary';
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import iconv from 'iconv-lite';
|
||||
import get from 'lodash/get';
|
||||
import set from 'lodash/set';
|
||||
import unset from 'lodash/unset';
|
||||
import type {
|
||||
IDataObject,
|
||||
IExecuteFunctions,
|
||||
INodeExecutionData,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { BINARY_ENCODING, NodeOperationError, deepCopy, jsonParse } from 'n8n-workflow';
|
||||
|
||||
import get from 'lodash/get';
|
||||
import set from 'lodash/set';
|
||||
import unset from 'lodash/unset';
|
||||
|
||||
import iconv from 'iconv-lite';
|
||||
|
||||
import { icsCalendarToObject } from 'ts-ics';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import { encodeDecodeOptions } from '@utils/descriptions';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
export const properties: INodeProperties[] = [
|
||||
{
|
||||
@@ -122,8 +119,7 @@ export async function execute(
|
||||
if (!value) continue;
|
||||
|
||||
const buffer = await this.helpers.getBinaryDataBuffer(itemIndex, binaryPropertyName);
|
||||
const encoding =
|
||||
(options.encoding as string) || (this.helpers.detectBinaryEncoding(buffer) as string);
|
||||
const encoding = (options.encoding as string) || this.helpers.detectBinaryEncoding(buffer);
|
||||
|
||||
if (options.keepSource && options.keepSource !== 'binary') {
|
||||
newItem.json = deepCopy(item.json);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import { NodeOperationError, deepCopy } from 'n8n-workflow';
|
||||
|
||||
import unset from 'lodash/unset';
|
||||
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
||||
import { NodeOperationError, deepCopy } from 'n8n-workflow';
|
||||
|
||||
import { extractDataFromPDF } from '@utils/binary';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import glob from 'fast-glob';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
@@ -6,10 +7,10 @@ import type {
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import glob from 'fast-glob';
|
||||
import { errorMapper, escapeSpecialCharacters } from '../helpers/utils';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import { errorMapper, escapeSpecialCharacters } from '../helpers/utils';
|
||||
|
||||
export const properties: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'File(s) Selector',
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import type { Readable } from 'stream';
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
INodeExecutionData,
|
||||
@@ -6,9 +5,11 @@ import type {
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { BINARY_ENCODING, NodeApiError } from 'n8n-workflow';
|
||||
import type { Readable } from 'stream';
|
||||
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import { errorMapper } from '../helpers/utils';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
export const properties: INodeProperties[] = [
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-loop-func */
|
||||
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
import * as Helpers from '@test/nodes/Helpers';
|
||||
import type { WorkflowTestData } from '@test/nodes/types';
|
||||
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
|
||||
describe('Test ReadWriteFile Node', () => {
|
||||
beforeEach(async () => {
|
||||
|
||||
Reference in New Issue
Block a user