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
@@ -2,7 +2,6 @@ import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow'
|
||||
import { VersionedNodeType } from 'n8n-workflow';
|
||||
|
||||
import { SlackV1 } from './V1/SlackV1.node';
|
||||
|
||||
import { SlackV2 } from './V2/SlackV2.node';
|
||||
|
||||
export class Slack extends VersionedNodeType {
|
||||
|
||||
@@ -13,8 +13,8 @@ import {
|
||||
NodeConnectionType,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { slackApiRequestAllItems } from './V2/GenericFunctions';
|
||||
import { downloadFile, getChannelInfo, getUserInfo } from './SlackTriggerHelpers';
|
||||
import { slackApiRequestAllItems } from './V2/GenericFunctions';
|
||||
|
||||
export class SlackTrigger implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { IHttpRequestOptions, IWebhookFunctions } from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import { slackApiRequest } from './V2/GenericFunctions';
|
||||
|
||||
export async function getUserInfo(this: IWebhookFunctions, userId: string): Promise<any> {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import get from 'lodash/get';
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
ILoadOptionsFunctions,
|
||||
@@ -9,8 +10,6 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import get from 'lodash/get';
|
||||
|
||||
export async function slackApiRequest(
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
method: IHttpRequestMethods,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import moment from 'moment-timezone';
|
||||
import type {
|
||||
IDataObject,
|
||||
IExecuteFunctions,
|
||||
@@ -11,20 +12,19 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeConnectionType, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment-timezone';
|
||||
import { channelFields, channelOperations } from './ChannelDescription';
|
||||
import { messageFields, messageOperations } from './MessageDescription';
|
||||
import { starFields, starOperations } from './StarDescription';
|
||||
import { fileFields, fileOperations } from './FileDescription';
|
||||
import { reactionFields, reactionOperations } from './ReactionDescription';
|
||||
import { userGroupFields, userGroupOperations } from './UserGroupDescription';
|
||||
import { userFields, userOperations } from './UserDescription';
|
||||
import { userProfileFields, userProfileOperations } from './UserProfileDescription';
|
||||
import { slackApiRequest, slackApiRequestAllItems, validateJSON } from './GenericFunctions';
|
||||
import type { IAttachment } from './MessageInterface';
|
||||
|
||||
import { oldVersionNotice } from '@utils/descriptions';
|
||||
|
||||
import { channelFields, channelOperations } from './ChannelDescription';
|
||||
import { fileFields, fileOperations } from './FileDescription';
|
||||
import { slackApiRequest, slackApiRequestAllItems, validateJSON } from './GenericFunctions';
|
||||
import { messageFields, messageOperations } from './MessageDescription';
|
||||
import type { IAttachment } from './MessageInterface';
|
||||
import { reactionFields, reactionOperations } from './ReactionDescription';
|
||||
import { starFields, starOperations } from './StarDescription';
|
||||
import { userFields, userOperations } from './UserDescription';
|
||||
import { userGroupFields, userGroupOperations } from './UserGroupDescription';
|
||||
import { userProfileFields, userProfileOperations } from './UserProfileDescription';
|
||||
|
||||
interface Attachment {
|
||||
fields: {
|
||||
item?: object[];
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { Readable } from 'stream';
|
||||
|
||||
import moment from 'moment-timezone';
|
||||
import type {
|
||||
IDataObject,
|
||||
IExecuteFunctions,
|
||||
@@ -14,7 +13,6 @@ import type {
|
||||
INodeTypeDescription,
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
BINARY_ENCODING,
|
||||
NodeConnectionType,
|
||||
@@ -22,21 +20,10 @@ import {
|
||||
SEND_AND_WAIT_OPERATION,
|
||||
WAIT_INDEFINITELY,
|
||||
} from 'n8n-workflow';
|
||||
import type { Readable } from 'stream';
|
||||
|
||||
import moment from 'moment-timezone';
|
||||
import { channelFields, channelOperations } from './ChannelDescription';
|
||||
import {
|
||||
channelRLC,
|
||||
messageFields,
|
||||
messageOperations,
|
||||
sendToSelector,
|
||||
userRLC,
|
||||
} from './MessageDescription';
|
||||
import { starFields, starOperations } from './StarDescription';
|
||||
import { fileFields, fileOperations } from './FileDescription';
|
||||
import { reactionFields, reactionOperations } from './ReactionDescription';
|
||||
import { userGroupFields, userGroupOperations } from './UserGroupDescription';
|
||||
import { userFields, userOperations } from './UserDescription';
|
||||
import {
|
||||
slackApiRequest,
|
||||
slackApiRequestAllItems,
|
||||
@@ -44,6 +31,17 @@ import {
|
||||
getTarget,
|
||||
createSendAndWaitMessageBody,
|
||||
} from './GenericFunctions';
|
||||
import {
|
||||
channelRLC,
|
||||
messageFields,
|
||||
messageOperations,
|
||||
sendToSelector,
|
||||
userRLC,
|
||||
} from './MessageDescription';
|
||||
import { reactionFields, reactionOperations } from './ReactionDescription';
|
||||
import { starFields, starOperations } from './StarDescription';
|
||||
import { userFields, userOperations } from './UserDescription';
|
||||
import { userGroupFields, userGroupOperations } from './UserGroupDescription';
|
||||
import { getSendAndWaitProperties, sendAndWaitWebhook } from '../../../utils/sendAndWait/utils';
|
||||
|
||||
export class SlackV2 implements INodeType {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import nock from 'nock';
|
||||
import type { IHttpRequestMethods } from 'n8n-workflow';
|
||||
import nock from 'nock';
|
||||
|
||||
import { equalityTest, setup, workflowToTests } from '@test/nodes/Helpers';
|
||||
|
||||
const API_RESPONSE = {
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import nock from 'nock';
|
||||
import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow';
|
||||
import nock from 'nock';
|
||||
|
||||
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
const API_RESPONSE = {
|
||||
ok: true,
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import nock from 'nock';
|
||||
import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow';
|
||||
import nock from 'nock';
|
||||
|
||||
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
const API_RESPONSE = {
|
||||
ok: true,
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import nock from 'nock';
|
||||
import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow';
|
||||
import nock from 'nock';
|
||||
|
||||
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
const API_RESPONSE = {
|
||||
ok: true,
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import nock from 'nock';
|
||||
import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow';
|
||||
import nock from 'nock';
|
||||
|
||||
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
const API_RESPONSE = [
|
||||
{
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import nock from 'nock';
|
||||
import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow';
|
||||
import nock from 'nock';
|
||||
|
||||
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
const API_RESPONSE = { files: { test: 'OK' } };
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import nock from 'nock';
|
||||
import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow';
|
||||
import nock from 'nock';
|
||||
|
||||
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
const API_RESPONSE = {
|
||||
ok: true,
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import nock from 'nock';
|
||||
import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow';
|
||||
import nock from 'nock';
|
||||
|
||||
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
const API_RESPONSE = {
|
||||
ok: true,
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import nock from 'nock';
|
||||
import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow';
|
||||
import nock from 'nock';
|
||||
|
||||
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
const API_RESPONSE = {
|
||||
ok: true,
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import nock from 'nock';
|
||||
import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow';
|
||||
import nock from 'nock';
|
||||
|
||||
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
const API_RESPONSE = {
|
||||
ok: true,
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import nock from 'nock';
|
||||
import type { IHttpRequestMethods, INodeTypes, WorkflowTestData } from 'n8n-workflow';
|
||||
import nock from 'nock';
|
||||
|
||||
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
const API_RESPONSE = {
|
||||
ok: true,
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import nock from 'nock';
|
||||
import type { INodeTypes, WorkflowTestData } from 'n8n-workflow';
|
||||
import nock from 'nock';
|
||||
|
||||
import { getResultNodeData, setup, workflowToTests } from '@test/nodes/Helpers';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
import { executeWorkflow } from '../../../../../../test/nodes/ExecuteWorkflow';
|
||||
import * as genericFunctions from '../../../../V2/GenericFunctions';
|
||||
|
||||
const API_RESPONSE = { profile: { test: 'OK' } };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user