Skip to content

Commit

Permalink
fix import order in nodes-base and node-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
netroy committed Dec 19, 2024
1 parent 356b088 commit 3aaa973
Show file tree
Hide file tree
Showing 1,113 changed files with 2,582 additions and 2,731 deletions.
1 change: 0 additions & 1 deletion packages/node-dev/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module.exports = {
'templates/**', // TODO: remove this
],
rules: {
'import/order': 'off', // TODO: remove this
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }],
'n8n-local-rules/no-plain-errors': 'off',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/node-dev/commands/build.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Container } from 'typedi';
import { Command, Flags } from '@oclif/core';
import { InstanceSettings } from 'n8n-core';
import { Container } from 'typedi';

import type { IBuildOptions } from '../src';
import { buildFiles } from '../src';
Expand Down
8 changes: 4 additions & 4 deletions packages/node-dev/src/Build.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/* eslint-disable @typescript-eslint/no-unsafe-argument */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import glob from 'fast-glob';
import { spawn } from 'child_process';
import glob from 'fast-glob';
import { copyFile, mkdir, readFile, writeFile } from 'fs/promises';
import { InstanceSettings } from 'n8n-core';
import { jsonParse } from 'n8n-workflow';
import { join, dirname, resolve as resolvePath } from 'path';
import { Container } from 'typedi';
import { file as tmpFile } from 'tmp-promise';
import { Container } from 'typedi';

import { jsonParse } from 'n8n-workflow';
import { InstanceSettings } from 'n8n-core';
import type { IBuildOptions } from './Interfaces';

/**
Expand Down
1 change: 0 additions & 1 deletion packages/nodes-base/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ module.exports = {
eqeqeq: 'warn',
'id-denylist': 'warn',
'import/extensions': 'warn',
'import/order': 'warn',
'prefer-spread': 'warn',
'import/no-extraneous-dependencies': 'warn',

Expand Down
1 change: 0 additions & 1 deletion packages/nodes-base/credentials/Aws.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Request } from 'aws4';
import { sign } from 'aws4';

import type {
ICredentialDataDecryptedObject,
ICredentialTestRequest,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import axios from 'axios';
import type {
ICredentialDataDecryptedObject,
ICredentialTestRequest,
Expand All @@ -6,8 +7,6 @@ import type {
INodeProperties,
} from 'n8n-workflow';

import axios from 'axios';

export class CiscoSecureEndpointApi implements ICredentialType {
name = 'ciscoSecureEndpointApi';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import jwt from 'jsonwebtoken';
import type {
ICredentialDataDecryptedObject,
ICredentialTestRequest,
Expand All @@ -6,7 +7,6 @@ import type {
INodeProperties,
} from 'n8n-workflow';

import jwt from 'jsonwebtoken';
export class GhostAdminApi implements ICredentialType {
name = 'ghostAdminApi';

Expand Down
12 changes: 4 additions & 8 deletions packages/nodes-base/credentials/GoogleApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import type { AxiosRequestConfig } from 'axios';
import axios from 'axios';
import jwt from 'jsonwebtoken';
import moment from 'moment-timezone';
import type {
ICredentialDataDecryptedObject,
ICredentialType,
Expand All @@ -6,14 +10,6 @@ import type {
Icon,
} from 'n8n-workflow';

import moment from 'moment-timezone';

import jwt from 'jsonwebtoken';

import type { AxiosRequestConfig } from 'axios';

import axios from 'axios';

export class GoogleApi implements ICredentialType {
name = 'googleApi';

Expand Down
1 change: 1 addition & 0 deletions packages/nodes-base/credentials/MySql.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

import { sshTunnelProperties } from '@utils/sshTunnel.properties';

export class MySql implements ICredentialType {
Expand Down
1 change: 1 addition & 0 deletions packages/nodes-base/credentials/Postgres.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { ICredentialType, INodeProperties } from 'n8n-workflow';

import { sshTunnelProperties } from '@utils/sshTunnel.properties';

export class Postgres implements ICredentialType {
Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/credentials/SeaTableApi.credentials.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { ICredentialType, INodeProperties, INodePropertyOptions } from 'n8n-workflow';

import moment from 'moment-timezone';
import type { ICredentialType, INodeProperties, INodePropertyOptions } from 'n8n-workflow';

// Get options for timezones
const timezones: INodePropertyOptions[] = moment.tz
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { sign, type Request } from 'aws4';
import type { IHttpRequestOptions } from 'n8n-workflow';

import { Aws, type AwsCredentialsType } from '../Aws.credentials';

jest.mock('aws4', () => ({
Expand Down
22 changes: 10 additions & 12 deletions packages/nodes-base/nodes/ActionNetwork/ActionNetwork.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@ import type {
} from 'n8n-workflow';
import { NodeConnectionType, NodeOperationError } from 'n8n-workflow';

import {
actionNetworkApiRequest,
adjustEventPayload,
adjustPersonPayload,
adjustPetitionPayload,
handleListing,
makeOsdiLink,
resourceLoaders,
simplifyResponse,
} from './GenericFunctions';

import {
attendanceFields,
attendanceOperations,
Expand All @@ -34,7 +23,16 @@ import {
tagFields,
tagOperations,
} from './descriptions';

import {
actionNetworkApiRequest,
adjustEventPayload,
adjustPersonPayload,
adjustPetitionPayload,
handleListing,
makeOsdiLink,
resourceLoaders,
simplifyResponse,
} from './GenericFunctions';
import type {
AllFieldsUi,
EmailAddressUi,
Expand Down
5 changes: 2 additions & 3 deletions packages/nodes-base/nodes/ActionNetwork/GenericFunctions.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import flow from 'lodash/flow';
import omit from 'lodash/omit';
import type {
IDataObject,
IExecuteFunctions,
Expand All @@ -6,9 +8,6 @@ import type {
IRequestOptions,
} from 'n8n-workflow';

import flow from 'lodash/flow';
import omit from 'lodash/omit';

import type {
AllFieldsUi,
FieldWithPrimaryField,
Expand Down
30 changes: 9 additions & 21 deletions packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,23 @@ import type {
} from 'n8n-workflow';
import { NodeConnectionType, NodeOperationError } from 'n8n-workflow';

import type { IProduct } from './GenericFunctions';
import { activeCampaignApiRequest, activeCampaignApiRequestAllItems } from './GenericFunctions';

import { accountContactFields, accountContactOperations } from './AccountContactDescription';
import { accountFields, accountOperations } from './AccountDescription';
import { connectionFields, connectionOperations } from './ConnectionDescription';
import { contactFields, contactOperations } from './ContactDescription';

import { contactListFields, contactListOperations } from './ContactListDescription';
import { contactTagFields, contactTagOperations } from './ContactTagDescription';
import { dealFields, dealOperations } from './DealDescription';

import { ecomOrderFields, ecomOrderOperations } from './EcomOrderDescription';

import { ecomCustomerFields, ecomCustomerOperations } from './EcomCustomerDescription';

import { ecomOrderFields, ecomOrderOperations } from './EcomOrderDescription';
import {
ecomOrderProductsFields,
ecomOrderProductsOperations,
} from './EcomOrderProductsDescription';

import { connectionFields, connectionOperations } from './ConnectionDescription';

import { accountFields, accountOperations } from './AccountDescription';

import { tagFields, tagOperations } from './TagDescription';

import { accountContactFields, accountContactOperations } from './AccountContactDescription';

import { contactListFields, contactListOperations } from './ContactListDescription';

import { contactTagFields, contactTagOperations } from './ContactTagDescription';

import { activeCampaignApiRequest, activeCampaignApiRequestAllItems } from './GenericFunctions';
import type { IProduct } from './GenericFunctions';
import { listFields, listOperations } from './ListDescription';
import { tagFields, tagOperations } from './TagDescription';

interface CustomProperty {
name: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { INodeProperties } from 'n8n-workflow';

import { allCurrencies } from './currencies';

import { activeCampaignDefaultGetAllProperties } from './GenericFunctions';

export const dealOperations: INodeProperties[] = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { INodeProperties } from 'n8n-workflow';

import { allCurrencies } from './currencies';

import { activeCampaignDefaultGetAllProperties } from './GenericFunctions';

export const ecomOrderOperations: INodeProperties[] = [
Expand Down
1 change: 1 addition & 0 deletions packages/nodes-base/nodes/Adalo/Adalo.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
type INodeType,
type INodeTypeDescription,
} from 'n8n-workflow';

import { collectionFields } from './CollectionDescription';
import type { FieldsUiValues } from './types';

Expand Down
10 changes: 2 additions & 8 deletions packages/nodes-base/nodes/Affinity/Affinity.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@ import type {
import { NodeConnectionType } from 'n8n-workflow';

import { affinityApiRequest, affinityApiRequestAllItems } from './GenericFunctions';

import { organizationFields, organizationOperations } from './OrganizationDescription';

import { personFields, personOperations } from './PersonDescription';

import { listFields, listOperations } from './ListDescription';

import { listEntryFields, listEntryOperations } from './ListEntryDescription';

import { organizationFields, organizationOperations } from './OrganizationDescription';
import type { IOrganization } from './OrganizationInterface';

import { personFields, personOperations } from './PersonDescription';
import type { IPerson } from './PersonInterface';

export class Affinity implements INodeType {
Expand Down
14 changes: 4 additions & 10 deletions packages/nodes-base/nodes/AgileCrm/AgileCrm.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ import type {
} from 'n8n-workflow';
import { NodeConnectionType, jsonParse, NodeOperationError } from 'n8n-workflow';

import { contactFields, contactOperations } from './ContactDescription';

import { companyFields, companyOperations } from './CompanyDescription';

import { dealFields, dealOperations } from './DealDescription';

import { contactFields, contactOperations } from './ContactDescription';
import type { IContact, IContactUpdate } from './ContactInterface';

import { dealFields, dealOperations } from './DealDescription';
import type { IDeal } from './DealInterface';
import type { IFilter, ISearchConditions } from './FilterInterface';
import {
agileCrmApiRequest,
agileCrmApiRequestAllItems,
Expand All @@ -24,10 +22,6 @@ import {
validateJSON,
} from './GenericFunctions';

import type { IDeal } from './DealInterface';

import type { IFilter, ISearchConditions } from './FilterInterface';

export class AgileCrm implements INodeType {
description: INodeTypeDescription = {
displayName: 'Agile CRM',
Expand Down
1 change: 0 additions & 1 deletion packages/nodes-base/nodes/AgileCrm/GenericFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import type {
import { NodeApiError } from 'n8n-workflow';

import type { IContactUpdate } from './ContactInterface';

import type { IFilterRules, ISearchConditions } from './FilterInterface';

export async function agileCrmApiRequest(
Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/AiTransform/AiTransform.node.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import set from 'lodash/set';
import {
NodeOperationError,
NodeConnectionType,
Expand All @@ -9,8 +10,6 @@ import {
AI_TRANSFORM_JS_CODE,
} from 'n8n-workflow';

import set from 'lodash/set';

import { JavaScriptSandbox } from '../Code/JavaScriptSandbox';
import { getSandboxContext } from '../Code/Sandbox';
import { standardizeOutput } from '../Code/utils';
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/nodes/Airtable/AirtableTrigger.node.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import moment from 'moment-timezone';
import type {
IPollFunctions,
IDataObject,
Expand All @@ -7,7 +8,6 @@ import type {
} from 'n8n-workflow';
import { NodeConnectionType, NodeOperationError } from 'n8n-workflow';

import moment from 'moment-timezone';
import type { IRecord } from './v1/GenericFunctions';
import { apiRequestAllItems, downloadRecordAttachments } from './v1/GenericFunctions';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import nock from 'nock';

import * as getMany from '../../../../v2/actions/base/getMany.operation';

import * as transport from '../../../../v2/transport';
import { createMockExecuteFunction } from '../helpers';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import nock from 'nock';

import * as getSchema from '../../../../v2/actions/base/getSchema.operation';

import * as transport from '../../../../v2/transport';
import { createMockExecuteFunction } from '../helpers';

Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/nodes/Airtable/test/v2/node/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { IDataObject, IExecuteFunctions, IGetNodeParameterOptions, INode } from 'n8n-workflow';

import { get } from 'lodash';
import { constructExecutionMetaData } from 'n8n-core';
import type { IDataObject, IExecuteFunctions, IGetNodeParameterOptions, INode } from 'n8n-workflow';

export const node: INode = {
id: '11',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import nock from 'nock';

import * as create from '../../../../v2/actions/record/create.operation';

import * as transport from '../../../../v2/transport';
import { createMockExecuteFunction } from '../helpers';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import nock from 'nock';

import * as deleteRecord from '../../../../v2/actions/record/deleteRecord.operation';

import * as transport from '../../../../v2/transport';
import { createMockExecuteFunction } from '../helpers';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import nock from 'nock';

import * as get from '../../../../v2/actions/record/get.operation';

import * as transport from '../../../../v2/transport';
import { createMockExecuteFunction } from '../helpers';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import nock from 'nock';

import * as search from '../../../../v2/actions/record/search.operation';

import * as transport from '../../../../v2/transport';
import { createMockExecuteFunction } from '../helpers';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import nock from 'nock';

import * as update from '../../../../v2/actions/record/update.operation';

import * as transport from '../../../../v2/transport';
import { createMockExecuteFunction } from '../helpers';

Expand Down
Loading

0 comments on commit 3aaa973

Please sign in to comment.