mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
refactor: Enable import/order for design-system, workflow and @n8n packages (#10847)
This commit is contained in:
parent
5a1db6db1a
commit
4f0a1a953f
|
@ -1,5 +1,5 @@
|
||||||
import { ROUTES } from '../constants';
|
|
||||||
import { getManualChatModal } from './modals/chat-modal';
|
import { getManualChatModal } from './modals/chat-modal';
|
||||||
|
import { ROUTES } from '../constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Types
|
* Types
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { WorkflowsPage as WorkflowsPageClass } from '../pages/workflows';
|
|
||||||
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
|
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
|
||||||
|
import { WorkflowsPage as WorkflowsPageClass } from '../pages/workflows';
|
||||||
import { getUniqueWorkflowName } from '../utils/workflowUtils';
|
import { getUniqueWorkflowName } from '../utils/workflowUtils';
|
||||||
|
|
||||||
const WorkflowsPage = new WorkflowsPageClass();
|
const WorkflowsPage = new WorkflowsPageClass();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { SettingsLogStreamingPage } from '../pages';
|
import { SettingsLogStreamingPage } from '../pages';
|
||||||
import { getVisibleModalOverlay } from '../utils/modal';
|
|
||||||
import { getVisibleDropdown } from '../utils';
|
import { getVisibleDropdown } from '../utils';
|
||||||
|
import { getVisibleModalOverlay } from '../utils/modal';
|
||||||
|
|
||||||
const settingsLogStreamingPage = new SettingsLogStreamingPage();
|
const settingsLogStreamingPage = new SettingsLogStreamingPage();
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@ import {
|
||||||
SET_NODE_NAME,
|
SET_NODE_NAME,
|
||||||
EDIT_FIELDS_SET_NODE_NAME,
|
EDIT_FIELDS_SET_NODE_NAME,
|
||||||
} from '../constants';
|
} from '../constants';
|
||||||
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
|
|
||||||
import { MessageBox as MessageBoxClass } from '../pages/modals/message-box';
|
import { MessageBox as MessageBoxClass } from '../pages/modals/message-box';
|
||||||
import { NDV } from '../pages/ndv';
|
import { NDV } from '../pages/ndv';
|
||||||
|
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
|
||||||
|
|
||||||
// Suite-specific constants
|
// Suite-specific constants
|
||||||
const CODE_NODE_NEW_NAME = 'Something else';
|
const CODE_NODE_NEW_NAME = 'Something else';
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
|
|
||||||
import { successToast } from '../pages/notifications';
|
|
||||||
import {
|
import {
|
||||||
MANUAL_TRIGGER_NODE_NAME,
|
MANUAL_TRIGGER_NODE_NAME,
|
||||||
MANUAL_TRIGGER_NODE_DISPLAY_NAME,
|
MANUAL_TRIGGER_NODE_DISPLAY_NAME,
|
||||||
|
@ -9,6 +7,8 @@ import {
|
||||||
IF_NODE_NAME,
|
IF_NODE_NAME,
|
||||||
HTTP_REQUEST_NODE_NAME,
|
HTTP_REQUEST_NODE_NAME,
|
||||||
} from './../constants';
|
} from './../constants';
|
||||||
|
import { successToast } from '../pages/notifications';
|
||||||
|
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
|
||||||
|
|
||||||
const WorkflowPage = new WorkflowPageClass();
|
const WorkflowPage = new WorkflowPageClass();
|
||||||
describe('Canvas Actions', () => {
|
describe('Canvas Actions', () => {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
|
|
||||||
import { NDV, WorkflowExecutionsTab } from '../pages';
|
|
||||||
import {
|
import {
|
||||||
MANUAL_TRIGGER_NODE_NAME,
|
MANUAL_TRIGGER_NODE_NAME,
|
||||||
MANUAL_TRIGGER_NODE_DISPLAY_NAME,
|
MANUAL_TRIGGER_NODE_DISPLAY_NAME,
|
||||||
|
@ -9,6 +7,8 @@ import {
|
||||||
SWITCH_NODE_NAME,
|
SWITCH_NODE_NAME,
|
||||||
MERGE_NODE_NAME,
|
MERGE_NODE_NAME,
|
||||||
} from './../constants';
|
} from './../constants';
|
||||||
|
import { NDV, WorkflowExecutionsTab } from '../pages';
|
||||||
|
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
|
||||||
|
|
||||||
const WorkflowPage = new WorkflowPageClass();
|
const WorkflowPage = new WorkflowPageClass();
|
||||||
const ExecutionsTab = new WorkflowExecutionsTab();
|
const ExecutionsTab = new WorkflowExecutionsTab();
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { WorkflowPage, NDV } from '../pages';
|
|
||||||
import { getVisibleSelect } from '../utils';
|
|
||||||
import {
|
import {
|
||||||
MANUAL_TRIGGER_NODE_NAME,
|
MANUAL_TRIGGER_NODE_NAME,
|
||||||
MANUAL_TRIGGER_NODE_DISPLAY_NAME,
|
MANUAL_TRIGGER_NODE_DISPLAY_NAME,
|
||||||
SCHEDULE_TRIGGER_NODE_NAME,
|
SCHEDULE_TRIGGER_NODE_NAME,
|
||||||
} from './../constants';
|
} from './../constants';
|
||||||
|
import { WorkflowPage, NDV } from '../pages';
|
||||||
|
import { getVisibleSelect } from '../utils';
|
||||||
|
|
||||||
const workflowPage = new WorkflowPage();
|
const workflowPage = new WorkflowPage();
|
||||||
const ndv = new NDV();
|
const ndv = new NDV();
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import { nanoid } from 'nanoid';
|
import { nanoid } from 'nanoid';
|
||||||
|
|
||||||
|
import { BACKEND_BASE_URL, EDIT_FIELDS_SET_NODE_NAME } from '../constants';
|
||||||
import { WorkflowPage, NDV, CredentialsModal } from '../pages';
|
import { WorkflowPage, NDV, CredentialsModal } from '../pages';
|
||||||
import { cowBase64 } from '../support/binaryTestFiles';
|
import { cowBase64 } from '../support/binaryTestFiles';
|
||||||
import { BACKEND_BASE_URL, EDIT_FIELDS_SET_NODE_NAME } from '../constants';
|
|
||||||
import { getVisibleSelect } from '../utils';
|
import { getVisibleSelect } from '../utils';
|
||||||
|
|
||||||
const workflowPage = new WorkflowPage();
|
const workflowPage = new WorkflowPage();
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import * as projects from '../composables/projects';
|
||||||
import { INSTANCE_MEMBERS, INSTANCE_OWNER, INSTANCE_ADMIN, NOTION_NODE_NAME } from '../constants';
|
import { INSTANCE_MEMBERS, INSTANCE_OWNER, INSTANCE_ADMIN, NOTION_NODE_NAME } from '../constants';
|
||||||
import {
|
import {
|
||||||
CredentialsModal,
|
CredentialsModal,
|
||||||
|
@ -8,7 +9,6 @@ import {
|
||||||
WorkflowsPage,
|
WorkflowsPage,
|
||||||
} from '../pages';
|
} from '../pages';
|
||||||
import { getVisibleDropdown, getVisiblePopper, getVisibleSelect } from '../utils';
|
import { getVisibleDropdown, getVisiblePopper, getVisibleSelect } from '../utils';
|
||||||
import * as projects from '../composables/projects';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User U1 - Instance owner
|
* User U1 - Instance owner
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { INSTANCE_MEMBERS, INSTANCE_OWNER, INSTANCE_ADMIN } from '../constants';
|
import { INSTANCE_MEMBERS, INSTANCE_OWNER, INSTANCE_ADMIN } from '../constants';
|
||||||
import { MainSidebar, SettingsSidebar, SettingsUsersPage } from '../pages';
|
import { MainSidebar, SettingsSidebar, SettingsUsersPage } from '../pages';
|
||||||
|
import { errorToast, successToast } from '../pages/notifications';
|
||||||
import { PersonalSettingsPage } from '../pages/settings-personal';
|
import { PersonalSettingsPage } from '../pages/settings-personal';
|
||||||
import { getVisibleSelect } from '../utils';
|
import { getVisibleSelect } from '../utils';
|
||||||
import { errorToast, successToast } from '../pages/notifications';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User A - Instance owner
|
* User A - Instance owner
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { NDV, WorkflowExecutionsTab, WorkflowPage as WorkflowPageClass } from '../pages';
|
|
||||||
import { SCHEDULE_TRIGGER_NODE_NAME, EDIT_FIELDS_SET_NODE_NAME } from '../constants';
|
import { SCHEDULE_TRIGGER_NODE_NAME, EDIT_FIELDS_SET_NODE_NAME } from '../constants';
|
||||||
|
import { NDV, WorkflowExecutionsTab, WorkflowPage as WorkflowPageClass } from '../pages';
|
||||||
import { clearNotifications, errorToast, successToast } from '../pages/notifications';
|
import { clearNotifications, errorToast, successToast } from '../pages/notifications';
|
||||||
|
|
||||||
const workflowPage = new WorkflowPageClass();
|
const workflowPage = new WorkflowPageClass();
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { type ICredentialType } from 'n8n-workflow';
|
import { type ICredentialType } from 'n8n-workflow';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AGENT_NODE_NAME,
|
AGENT_NODE_NAME,
|
||||||
AI_TOOL_HTTP_NODE_NAME,
|
AI_TOOL_HTTP_NODE_NAME,
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import type { RouteHandler } from 'cypress/types/net-stubbing';
|
import type { RouteHandler } from 'cypress/types/net-stubbing';
|
||||||
|
|
||||||
|
import executionOutOfMemoryServerResponse from '../fixtures/responses/execution-out-of-memory-server-response.json';
|
||||||
import { WorkflowPage } from '../pages';
|
import { WorkflowPage } from '../pages';
|
||||||
import { WorkflowExecutionsTab } from '../pages/workflow-executions-tab';
|
import { WorkflowExecutionsTab } from '../pages/workflow-executions-tab';
|
||||||
import executionOutOfMemoryServerResponse from '../fixtures/responses/execution-out-of-memory-server-response.json';
|
|
||||||
import { getVisibleSelect } from '../utils';
|
import { getVisibleSelect } from '../utils';
|
||||||
|
|
||||||
const workflowPage = new WorkflowPage();
|
const workflowPage = new WorkflowPage();
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import type { ICredentialType } from 'n8n-workflow';
|
import type { ICredentialType } from 'n8n-workflow';
|
||||||
import { NodeCreator } from '../pages/features/node-creator';
|
|
||||||
import CustomNodeFixture from '../fixtures/Custom_node.json';
|
|
||||||
import { CredentialsModal, WorkflowPage } from '../pages';
|
|
||||||
import CustomNodeWithN8nCredentialFixture from '../fixtures/Custom_node_n8n_credential.json';
|
|
||||||
import CustomNodeWithCustomCredentialFixture from '../fixtures/Custom_node_custom_credential.json';
|
|
||||||
import CustomCredential from '../fixtures/Custom_credential.json';
|
import CustomCredential from '../fixtures/Custom_credential.json';
|
||||||
import { getVisibleSelect } from '../utils';
|
import CustomNodeFixture from '../fixtures/Custom_node.json';
|
||||||
|
import CustomNodeWithCustomCredentialFixture from '../fixtures/Custom_node_custom_credential.json';
|
||||||
|
import CustomNodeWithN8nCredentialFixture from '../fixtures/Custom_node_n8n_credential.json';
|
||||||
|
import { CredentialsModal, WorkflowPage } from '../pages';
|
||||||
|
import { NodeCreator } from '../pages/features/node-creator';
|
||||||
import {
|
import {
|
||||||
confirmCommunityNodeUninstall,
|
confirmCommunityNodeUninstall,
|
||||||
confirmCommunityNodeUpdate,
|
confirmCommunityNodeUpdate,
|
||||||
|
@ -13,6 +13,7 @@ import {
|
||||||
installFirstCommunityNode,
|
installFirstCommunityNode,
|
||||||
visitCommunityNodesSettings,
|
visitCommunityNodesSettings,
|
||||||
} from '../pages/settings-community-nodes';
|
} from '../pages/settings-community-nodes';
|
||||||
|
import { getVisibleSelect } from '../utils';
|
||||||
|
|
||||||
const credentialsModal = new CredentialsModal();
|
const credentialsModal = new CredentialsModal();
|
||||||
const nodeCreatorFeature = new NodeCreator();
|
const nodeCreatorFeature = new NodeCreator();
|
||||||
|
|
|
@ -1,5 +1,18 @@
|
||||||
import type { ExecutionError } from 'n8n-workflow/src';
|
import type { ExecutionError } from 'n8n-workflow/src';
|
||||||
import { NDV, WorkflowPage as WorkflowPageClass } from '../pages';
|
|
||||||
|
import {
|
||||||
|
closeManualChatModal,
|
||||||
|
getManualChatMessages,
|
||||||
|
getManualChatModalLogs,
|
||||||
|
getManualChatModalLogsEntries,
|
||||||
|
sendManualChatMessage,
|
||||||
|
} from '../composables/modals/chat-modal';
|
||||||
|
import { setCredentialValues } from '../composables/modals/credential-modal';
|
||||||
|
import {
|
||||||
|
clickCreateNewCredential,
|
||||||
|
clickExecuteNode,
|
||||||
|
clickGetBackToCanvas,
|
||||||
|
} from '../composables/ndv';
|
||||||
import {
|
import {
|
||||||
addLanguageModelNodeToParent,
|
addLanguageModelNodeToParent,
|
||||||
addMemoryNodeToParent,
|
addMemoryNodeToParent,
|
||||||
|
@ -18,19 +31,7 @@ import {
|
||||||
MANUAL_TRIGGER_NODE_DISPLAY_NAME,
|
MANUAL_TRIGGER_NODE_DISPLAY_NAME,
|
||||||
MANUAL_TRIGGER_NODE_NAME,
|
MANUAL_TRIGGER_NODE_NAME,
|
||||||
} from '../constants';
|
} from '../constants';
|
||||||
import {
|
import { NDV, WorkflowPage as WorkflowPageClass } from '../pages';
|
||||||
clickCreateNewCredential,
|
|
||||||
clickExecuteNode,
|
|
||||||
clickGetBackToCanvas,
|
|
||||||
} from '../composables/ndv';
|
|
||||||
import { setCredentialValues } from '../composables/modals/credential-modal';
|
|
||||||
import {
|
|
||||||
closeManualChatModal,
|
|
||||||
getManualChatMessages,
|
|
||||||
getManualChatModalLogs,
|
|
||||||
getManualChatModalLogsEntries,
|
|
||||||
sendManualChatMessage,
|
|
||||||
} from '../composables/modals/chat-modal';
|
|
||||||
import { createMockNodeExecutionData, getVisibleSelect, runMockWorkflowExecution } from '../utils';
|
import { createMockNodeExecutionData, getVisibleSelect, runMockWorkflowExecution } from '../utils';
|
||||||
|
|
||||||
const ndv = new NDV();
|
const ndv = new NDV();
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import planData from '../fixtures/Plan_data_opt_in_trial.json';
|
||||||
import {
|
import {
|
||||||
BannerStack,
|
BannerStack,
|
||||||
MainSidebar,
|
MainSidebar,
|
||||||
|
@ -5,7 +6,6 @@ import {
|
||||||
visitPublicApiPage,
|
visitPublicApiPage,
|
||||||
getPublicApiUpgradeCTA,
|
getPublicApiUpgradeCTA,
|
||||||
} from '../pages';
|
} from '../pages';
|
||||||
import planData from '../fixtures/Plan_data_opt_in_trial.json';
|
|
||||||
|
|
||||||
const mainSidebar = new MainSidebar();
|
const mainSidebar = new MainSidebar();
|
||||||
const bannerStack = new BannerStack();
|
const bannerStack = new BannerStack();
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import generateOTPToken from 'cypress-otp';
|
import generateOTPToken from 'cypress-otp';
|
||||||
|
|
||||||
|
import { MainSidebar } from './../pages/sidebar/main-sidebar';
|
||||||
import { INSTANCE_OWNER, INSTANCE_ADMIN, BACKEND_BASE_URL } from '../constants';
|
import { INSTANCE_OWNER, INSTANCE_ADMIN, BACKEND_BASE_URL } from '../constants';
|
||||||
import { SigninPage } from '../pages';
|
import { SigninPage } from '../pages';
|
||||||
import { PersonalSettingsPage } from '../pages/settings-personal';
|
|
||||||
import { MfaLoginPage } from '../pages/mfa-login';
|
import { MfaLoginPage } from '../pages/mfa-login';
|
||||||
import { MainSidebar } from './../pages/sidebar/main-sidebar';
|
import { PersonalSettingsPage } from '../pages/settings-personal';
|
||||||
|
|
||||||
const MFA_SECRET = 'KVKFKRCPNZQUYMLXOVYDSQKJKZDTSRLD';
|
const MFA_SECRET = 'KVKFKRCPNZQUYMLXOVYDSQKJKZDTSRLD';
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
|
import OnboardingWorkflow from '../fixtures/Onboarding_workflow.json';
|
||||||
|
import WorkflowTemplate from '../fixtures/Workflow_template_write_http_query.json';
|
||||||
|
import { MainSidebar } from '../pages/sidebar/main-sidebar';
|
||||||
import { TemplatesPage } from '../pages/templates';
|
import { TemplatesPage } from '../pages/templates';
|
||||||
import { WorkflowPage } from '../pages/workflow';
|
import { WorkflowPage } from '../pages/workflow';
|
||||||
import { WorkflowsPage } from '../pages/workflows';
|
import { WorkflowsPage } from '../pages/workflows';
|
||||||
import { MainSidebar } from '../pages/sidebar/main-sidebar';
|
|
||||||
import OnboardingWorkflow from '../fixtures/Onboarding_workflow.json';
|
|
||||||
import WorkflowTemplate from '../fixtures/Workflow_template_write_http_query.json';
|
|
||||||
|
|
||||||
const templatesPage = new TemplatesPage();
|
const templatesPage = new TemplatesPage();
|
||||||
const workflowPage = new WorkflowPage();
|
const workflowPage = new WorkflowPage();
|
||||||
|
|
|
@ -1,4 +1,34 @@
|
||||||
import { createMockNodeExecutionData, runMockWorkflowExecution } from '../utils';
|
import {
|
||||||
|
AGENT_NODE_NAME,
|
||||||
|
MANUAL_CHAT_TRIGGER_NODE_NAME,
|
||||||
|
AI_LANGUAGE_MODEL_OPENAI_CHAT_MODEL_NODE_NAME,
|
||||||
|
MANUAL_TRIGGER_NODE_NAME,
|
||||||
|
AI_MEMORY_WINDOW_BUFFER_MEMORY_NODE_NAME,
|
||||||
|
AI_TOOL_CALCULATOR_NODE_NAME,
|
||||||
|
AI_OUTPUT_PARSER_AUTO_FIXING_NODE_NAME,
|
||||||
|
AI_TOOL_CODE_NODE_NAME,
|
||||||
|
AI_TOOL_WIKIPEDIA_NODE_NAME,
|
||||||
|
BASIC_LLM_CHAIN_NODE_NAME,
|
||||||
|
EDIT_FIELDS_SET_NODE_NAME,
|
||||||
|
CHAT_TRIGGER_NODE_DISPLAY_NAME,
|
||||||
|
} from './../constants';
|
||||||
|
import {
|
||||||
|
closeManualChatModal,
|
||||||
|
getManualChatDialog,
|
||||||
|
getManualChatMessages,
|
||||||
|
getManualChatModal,
|
||||||
|
getManualChatModalLogs,
|
||||||
|
getManualChatModalLogsEntries,
|
||||||
|
getManualChatModalLogsTree,
|
||||||
|
sendManualChatMessage,
|
||||||
|
} from '../composables/modals/chat-modal';
|
||||||
|
import { setCredentialValues } from '../composables/modals/credential-modal';
|
||||||
|
import {
|
||||||
|
clickCreateNewCredential,
|
||||||
|
clickExecuteNode,
|
||||||
|
clickGetBackToCanvas,
|
||||||
|
toggleParameterCheckboxInputByName,
|
||||||
|
} from '../composables/ndv';
|
||||||
import {
|
import {
|
||||||
addLanguageModelNodeToParent,
|
addLanguageModelNodeToParent,
|
||||||
addMemoryNodeToParent,
|
addMemoryNodeToParent,
|
||||||
|
@ -14,37 +44,7 @@ import {
|
||||||
openNode,
|
openNode,
|
||||||
getConnectionBySourceAndTarget,
|
getConnectionBySourceAndTarget,
|
||||||
} from '../composables/workflow';
|
} from '../composables/workflow';
|
||||||
import {
|
import { createMockNodeExecutionData, runMockWorkflowExecution } from '../utils';
|
||||||
clickCreateNewCredential,
|
|
||||||
clickExecuteNode,
|
|
||||||
clickGetBackToCanvas,
|
|
||||||
toggleParameterCheckboxInputByName,
|
|
||||||
} from '../composables/ndv';
|
|
||||||
import { setCredentialValues } from '../composables/modals/credential-modal';
|
|
||||||
import {
|
|
||||||
closeManualChatModal,
|
|
||||||
getManualChatDialog,
|
|
||||||
getManualChatMessages,
|
|
||||||
getManualChatModal,
|
|
||||||
getManualChatModalLogs,
|
|
||||||
getManualChatModalLogsEntries,
|
|
||||||
getManualChatModalLogsTree,
|
|
||||||
sendManualChatMessage,
|
|
||||||
} from '../composables/modals/chat-modal';
|
|
||||||
import {
|
|
||||||
AGENT_NODE_NAME,
|
|
||||||
MANUAL_CHAT_TRIGGER_NODE_NAME,
|
|
||||||
AI_LANGUAGE_MODEL_OPENAI_CHAT_MODEL_NODE_NAME,
|
|
||||||
MANUAL_TRIGGER_NODE_NAME,
|
|
||||||
AI_MEMORY_WINDOW_BUFFER_MEMORY_NODE_NAME,
|
|
||||||
AI_TOOL_CALCULATOR_NODE_NAME,
|
|
||||||
AI_OUTPUT_PARSER_AUTO_FIXING_NODE_NAME,
|
|
||||||
AI_TOOL_CODE_NODE_NAME,
|
|
||||||
AI_TOOL_WIKIPEDIA_NODE_NAME,
|
|
||||||
BASIC_LLM_CHAIN_NODE_NAME,
|
|
||||||
EDIT_FIELDS_SET_NODE_NAME,
|
|
||||||
CHAT_TRIGGER_NODE_DISPLAY_NAME,
|
|
||||||
} from './../constants';
|
|
||||||
|
|
||||||
describe('Langchain Integration', () => {
|
describe('Langchain Integration', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import workflow from '../fixtures/Manual_wait_set.json';
|
import workflow from '../fixtures/Manual_wait_set.json';
|
||||||
import { importWorkflow, visitDemoPage } from '../pages/demo';
|
import { importWorkflow, visitDemoPage } from '../pages/demo';
|
||||||
import { WorkflowPage } from '../pages/workflow';
|
|
||||||
import { errorToast } from '../pages/notifications';
|
import { errorToast } from '../pages/notifications';
|
||||||
|
import { WorkflowPage } from '../pages/workflow';
|
||||||
|
|
||||||
const workflowPage = new WorkflowPage();
|
const workflowPage = new WorkflowPage();
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
import * as setupCredsModal from '../composables/modals/workflow-credential-setup-modal';
|
||||||
|
import * as formStep from '../composables/setup-template-form-step';
|
||||||
|
import { getSetupWorkflowCredentialsButton } from '../composables/setup-workflow-credentials-button';
|
||||||
|
import TestTemplate1 from '../fixtures/Test_Template_1.json';
|
||||||
|
import TestTemplate2 from '../fixtures/Test_Template_2.json';
|
||||||
import {
|
import {
|
||||||
clickUseWorkflowButtonByTitle,
|
clickUseWorkflowButtonByTitle,
|
||||||
visitTemplateCollectionPage,
|
visitTemplateCollectionPage,
|
||||||
|
@ -5,11 +10,6 @@ import {
|
||||||
} from '../pages/template-collection';
|
} from '../pages/template-collection';
|
||||||
import * as templateCredentialsSetupPage from '../pages/template-credential-setup';
|
import * as templateCredentialsSetupPage from '../pages/template-credential-setup';
|
||||||
import { WorkflowPage } from '../pages/workflow';
|
import { WorkflowPage } from '../pages/workflow';
|
||||||
import * as formStep from '../composables/setup-template-form-step';
|
|
||||||
import { getSetupWorkflowCredentialsButton } from '../composables/setup-workflow-credentials-button';
|
|
||||||
import * as setupCredsModal from '../composables/modals/workflow-credential-setup-modal';
|
|
||||||
import TestTemplate1 from '../fixtures/Test_Template_1.json';
|
|
||||||
import TestTemplate2 from '../fixtures/Test_Template_2.json';
|
|
||||||
|
|
||||||
const workflowPage = new WorkflowPage();
|
const workflowPage = new WorkflowPage();
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { WorkflowsPage } from '../pages/workflows';
|
|
||||||
import {
|
import {
|
||||||
closeVersionUpdatesPanel,
|
closeVersionUpdatesPanel,
|
||||||
getVersionCard,
|
getVersionCard,
|
||||||
getVersionUpdatesPanelOpenButton,
|
getVersionUpdatesPanelOpenButton,
|
||||||
openVersionUpdatesPanel,
|
openVersionUpdatesPanel,
|
||||||
} from '../composables/versions';
|
} from '../composables/versions';
|
||||||
|
import { WorkflowsPage } from '../pages/workflows';
|
||||||
|
|
||||||
const workflowsPage = new WorkflowsPage();
|
const workflowsPage = new WorkflowsPage();
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import * as projects from '../composables/projects';
|
||||||
import { INSTANCE_MEMBERS, MANUAL_TRIGGER_NODE_NAME, NOTION_NODE_NAME } from '../constants';
|
import { INSTANCE_MEMBERS, MANUAL_TRIGGER_NODE_NAME, NOTION_NODE_NAME } from '../constants';
|
||||||
import {
|
import {
|
||||||
WorkflowsPage,
|
WorkflowsPage,
|
||||||
|
@ -8,7 +9,6 @@ import {
|
||||||
NDV,
|
NDV,
|
||||||
MainSidebar,
|
MainSidebar,
|
||||||
} from '../pages';
|
} from '../pages';
|
||||||
import * as projects from '../composables/projects';
|
|
||||||
import { getVisibleDropdown, getVisibleModalOverlay, getVisibleSelect } from '../utils';
|
import { getVisibleDropdown, getVisibleModalOverlay, getVisibleSelect } from '../utils';
|
||||||
|
|
||||||
const workflowsPage = new WorkflowsPage();
|
const workflowsPage = new WorkflowsPage();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { NodeCreator } from '../pages/features/node-creator';
|
|
||||||
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
|
|
||||||
import { NDV } from '../pages/ndv';
|
|
||||||
import { getVisibleSelect } from '../utils';
|
|
||||||
import { IF_NODE_NAME } from '../constants';
|
import { IF_NODE_NAME } from '../constants';
|
||||||
|
import { NodeCreator } from '../pages/features/node-creator';
|
||||||
|
import { NDV } from '../pages/ndv';
|
||||||
|
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
|
||||||
|
import { getVisibleSelect } from '../utils';
|
||||||
|
|
||||||
const nodeCreatorFeature = new NodeCreator();
|
const nodeCreatorFeature = new NodeCreator();
|
||||||
const WorkflowPage = new WorkflowPageClass();
|
const WorkflowPage = new WorkflowPageClass();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { WorkflowsPage as WorkflowsPageClass } from '../pages/workflows';
|
|
||||||
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
|
|
||||||
import { EDIT_FIELDS_SET_NODE_NAME } from '../constants';
|
|
||||||
import { getSaveChangesModal } from '../composables/modals/save-changes-modal';
|
import { getSaveChangesModal } from '../composables/modals/save-changes-modal';
|
||||||
|
import { EDIT_FIELDS_SET_NODE_NAME } from '../constants';
|
||||||
|
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
|
||||||
|
import { WorkflowsPage as WorkflowsPageClass } from '../pages/workflows';
|
||||||
|
|
||||||
const WorkflowsPage = new WorkflowsPageClass();
|
const WorkflowsPage = new WorkflowsPageClass();
|
||||||
const WorkflowPage = new WorkflowPageClass();
|
const WorkflowPage = new WorkflowPageClass();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
import { setCredentialValues } from '../composables/modals/credential-modal';
|
||||||
|
import { clickCreateNewCredential } from '../composables/ndv';
|
||||||
import { MANUAL_TRIGGER_NODE_DISPLAY_NAME, NOTION_NODE_NAME } from '../constants';
|
import { MANUAL_TRIGGER_NODE_DISPLAY_NAME, NOTION_NODE_NAME } from '../constants';
|
||||||
import { NDV, WorkflowPage } from '../pages';
|
import { NDV, WorkflowPage } from '../pages';
|
||||||
import { NodeCreator } from '../pages/features/node-creator';
|
import { NodeCreator } from '../pages/features/node-creator';
|
||||||
import { clickCreateNewCredential } from '../composables/ndv';
|
|
||||||
import { setCredentialValues } from '../composables/modals/credential-modal';
|
|
||||||
|
|
||||||
const workflowPage = new WorkflowPage();
|
const workflowPage = new WorkflowPage();
|
||||||
const ndv = new NDV();
|
const ndv = new NDV();
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import { nanoid } from 'nanoid';
|
import { nanoid } from 'nanoid';
|
||||||
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
|
|
||||||
import { NDV } from '../pages/ndv';
|
import { NDV } from '../pages/ndv';
|
||||||
import { successToast } from '../pages/notifications';
|
import { successToast } from '../pages/notifications';
|
||||||
|
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
|
||||||
|
|
||||||
const WorkflowPage = new WorkflowPageClass();
|
const WorkflowPage = new WorkflowPageClass();
|
||||||
const ndv = new NDV();
|
const ndv = new NDV();
|
||||||
|
|
|
@ -5,11 +5,11 @@ import {
|
||||||
EDIT_FIELDS_SET_NODE_NAME,
|
EDIT_FIELDS_SET_NODE_NAME,
|
||||||
NOTION_NODE_NAME,
|
NOTION_NODE_NAME,
|
||||||
} from '../constants';
|
} from '../constants';
|
||||||
|
import { WorkflowExecutionsTab } from '../pages';
|
||||||
|
import { errorToast, successToast } from '../pages/notifications';
|
||||||
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
|
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
|
||||||
import { WorkflowsPage as WorkflowsPageClass } from '../pages/workflows';
|
import { WorkflowsPage as WorkflowsPageClass } from '../pages/workflows';
|
||||||
import { getVisibleSelect } from '../utils';
|
import { getVisibleSelect } from '../utils';
|
||||||
import { WorkflowExecutionsTab } from '../pages';
|
|
||||||
import { errorToast, successToast } from '../pages/notifications';
|
|
||||||
|
|
||||||
const NEW_WORKFLOW_NAME = 'Something else';
|
const NEW_WORKFLOW_NAME = 'Something else';
|
||||||
const DUPLICATE_WORKFLOW_NAME = 'Duplicated workflow';
|
const DUPLICATE_WORKFLOW_NAME = 'Duplicated workflow';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { N8N_AUTH_COOKIE } from '../constants';
|
|
||||||
import { BasePage } from './base';
|
import { BasePage } from './base';
|
||||||
import { SigninPage } from './signin';
|
import { SigninPage } from './signin';
|
||||||
import { WorkflowsPage } from './workflows';
|
import { WorkflowsPage } from './workflows';
|
||||||
|
import { N8N_AUTH_COOKIE } from '../constants';
|
||||||
|
|
||||||
export class MfaLoginPage extends BasePage {
|
export class MfaLoginPage extends BasePage {
|
||||||
url = '/mfa';
|
url = '/mfa';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { BasePage } from '../base';
|
|
||||||
import { getVisibleSelect } from '../../utils';
|
import { getVisibleSelect } from '../../utils';
|
||||||
|
import { BasePage } from '../base';
|
||||||
|
|
||||||
export class CredentialsModal extends BasePage {
|
export class CredentialsModal extends BasePage {
|
||||||
getters = {
|
getters = {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { getVisiblePopper, getVisibleSelect } from '../utils';
|
|
||||||
import { BasePage } from './base';
|
import { BasePage } from './base';
|
||||||
|
import { getVisiblePopper, getVisibleSelect } from '../utils';
|
||||||
|
|
||||||
export class NDV extends BasePage {
|
export class NDV extends BasePage {
|
||||||
getters = {
|
getters = {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { getVisibleSelect } from '../utils';
|
|
||||||
import { BasePage } from './base';
|
import { BasePage } from './base';
|
||||||
|
import { getVisibleSelect } from '../utils';
|
||||||
|
|
||||||
export class SettingsLogStreamingPage extends BasePage {
|
export class SettingsLogStreamingPage extends BasePage {
|
||||||
url = '/settings/log-streaming';
|
url = '/settings/log-streaming';
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import generateOTPToken from 'cypress-otp';
|
import generateOTPToken from 'cypress-otp';
|
||||||
|
|
||||||
|
import { BasePage } from './base';
|
||||||
import { ChangePasswordModal } from './modals/change-password-modal';
|
import { ChangePasswordModal } from './modals/change-password-modal';
|
||||||
import { MfaSetupModal } from './modals/mfa-setup-modal';
|
import { MfaSetupModal } from './modals/mfa-setup-modal';
|
||||||
import { BasePage } from './base';
|
|
||||||
|
|
||||||
const changePasswordModal = new ChangePasswordModal();
|
const changePasswordModal = new ChangePasswordModal();
|
||||||
const mfaSetupModal = new MfaSetupModal();
|
const mfaSetupModal = new MfaSetupModal();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { SettingsSidebar } from './sidebar/settings-sidebar';
|
import { BasePage } from './base';
|
||||||
import { MainSidebar } from './sidebar/main-sidebar';
|
import { MainSidebar } from './sidebar/main-sidebar';
|
||||||
|
import { SettingsSidebar } from './sidebar/settings-sidebar';
|
||||||
import { WorkflowPage } from './workflow';
|
import { WorkflowPage } from './workflow';
|
||||||
import { WorkflowsPage } from './workflows';
|
import { WorkflowsPage } from './workflows';
|
||||||
import { BasePage } from './base';
|
|
||||||
|
|
||||||
const workflowPage = new WorkflowPage();
|
const workflowPage = new WorkflowPage();
|
||||||
const workflowsPage = new WorkflowsPage();
|
const workflowsPage = new WorkflowsPage();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { N8N_AUTH_COOKIE } from '../constants';
|
|
||||||
import { BasePage } from './base';
|
import { BasePage } from './base';
|
||||||
import { WorkflowsPage } from './workflows';
|
import { WorkflowsPage } from './workflows';
|
||||||
|
import { N8N_AUTH_COOKIE } from '../constants';
|
||||||
|
|
||||||
export class SigninPage extends BasePage {
|
export class SigninPage extends BasePage {
|
||||||
url = '/signin';
|
url = '/signin';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import * as formStep from '../composables/setup-template-form-step';
|
|
||||||
import { overrideFeatureFlag } from '../composables/featureFlags';
|
|
||||||
import { CredentialsModal, MessageBox } from './modals';
|
import { CredentialsModal, MessageBox } from './modals';
|
||||||
|
import { overrideFeatureFlag } from '../composables/featureFlags';
|
||||||
|
import * as formStep from '../composables/setup-template-form-step';
|
||||||
|
|
||||||
const credentialsModal = new CredentialsModal();
|
const credentialsModal = new CredentialsModal();
|
||||||
const messageBox = new MessageBox();
|
const messageBox = new MessageBox();
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { BasePage } from './base';
|
import { BasePage } from './base';
|
||||||
|
|
||||||
import Chainable = Cypress.Chainable;
|
import Chainable = Cypress.Chainable;
|
||||||
|
|
||||||
export class VariablesPage extends BasePage {
|
export class VariablesPage extends BasePage {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
import { BasePage } from './base';
|
||||||
|
import { NodeCreator } from './features/node-creator';
|
||||||
import { META_KEY } from '../constants';
|
import { META_KEY } from '../constants';
|
||||||
import { getVisibleSelect } from '../utils';
|
import { getVisibleSelect } from '../utils';
|
||||||
import { getUniqueWorkflowName } from '../utils/workflowUtils';
|
import { getUniqueWorkflowName } from '../utils/workflowUtils';
|
||||||
import { BasePage } from './base';
|
|
||||||
import { NodeCreator } from './features/node-creator';
|
|
||||||
|
|
||||||
const nodeCreator = new NodeCreator();
|
const nodeCreator = new NodeCreator();
|
||||||
export class WorkflowPage extends BasePage {
|
export class WorkflowPage extends BasePage {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import 'cypress-real-events';
|
import 'cypress-real-events';
|
||||||
import FakeTimers from '@sinonjs/fake-timers';
|
|
||||||
import type { FrontendSettings } from '@n8n/api-types';
|
import type { FrontendSettings } from '@n8n/api-types';
|
||||||
import { WorkflowPage } from '../pages';
|
import FakeTimers from '@sinonjs/fake-timers';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
BACKEND_BASE_URL,
|
BACKEND_BASE_URL,
|
||||||
INSTANCE_ADMIN,
|
INSTANCE_ADMIN,
|
||||||
|
@ -9,6 +9,7 @@ import {
|
||||||
INSTANCE_OWNER,
|
INSTANCE_OWNER,
|
||||||
N8N_AUTH_COOKIE,
|
N8N_AUTH_COOKIE,
|
||||||
} from '../constants';
|
} from '../constants';
|
||||||
|
import { WorkflowPage } from '../pages';
|
||||||
import { getUniqueWorkflowName } from '../utils/workflowUtils';
|
import { getUniqueWorkflowName } from '../utils/workflowUtils';
|
||||||
|
|
||||||
Cypress.Commands.add('setAppDate', (targetDate: number | Date) => {
|
Cypress.Commands.add('setAppDate', (targetDate: number | Date) => {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import cloneDeep from 'lodash/cloneDeep';
|
import cloneDeep from 'lodash/cloneDeep';
|
||||||
import merge from 'lodash/merge';
|
import merge from 'lodash/merge';
|
||||||
|
|
||||||
import { settings } from './commands';
|
import { settings } from './commands';
|
||||||
|
|
||||||
before(() => {
|
before(() => {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { nanoid } from 'nanoid';
|
|
||||||
import type { IDataObject, IPinData, ITaskData, ITaskDataConnections } from 'n8n-workflow';
|
import type { IDataObject, IPinData, ITaskData, ITaskDataConnections } from 'n8n-workflow';
|
||||||
|
import { nanoid } from 'nanoid';
|
||||||
|
|
||||||
import { clickExecuteWorkflowButton } from '../composables/workflow';
|
import { clickExecuteWorkflowButton } from '../composables/workflow';
|
||||||
|
|
||||||
export function createMockNodeExecutionData(
|
export function createMockNodeExecutionData(
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import type { ExecutionPushMessage } from './execution';
|
|
||||||
import type { WorkflowPushMessage } from './workflow';
|
|
||||||
import type { HotReloadPushMessage } from './hot-reload';
|
|
||||||
import type { WorkerPushMessage } from './worker';
|
|
||||||
import type { WebhookPushMessage } from './webhook';
|
|
||||||
import type { CollaborationPushMessage } from './collaboration';
|
import type { CollaborationPushMessage } from './collaboration';
|
||||||
import type { DebugPushMessage } from './debug';
|
import type { DebugPushMessage } from './debug';
|
||||||
|
import type { ExecutionPushMessage } from './execution';
|
||||||
|
import type { HotReloadPushMessage } from './hot-reload';
|
||||||
|
import type { WebhookPushMessage } from './webhook';
|
||||||
|
import type { WorkerPushMessage } from './worker';
|
||||||
|
import type { WorkflowPushMessage } from './workflow';
|
||||||
|
|
||||||
export type PushMessage =
|
export type PushMessage =
|
||||||
| ExecutionPushMessage
|
| ExecutionPushMessage
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { Command } from '@oclif/core';
|
import { Command } from '@oclif/core';
|
||||||
import { ScenarioLoader } from '@/scenario/scenario-loader';
|
|
||||||
import { testScenariosPath } from '@/config/common-flags';
|
import { testScenariosPath } from '@/config/common-flags';
|
||||||
|
import { ScenarioLoader } from '@/scenario/scenario-loader';
|
||||||
|
|
||||||
export default class ListCommand extends Command {
|
export default class ListCommand extends Command {
|
||||||
static description = 'List all available scenarios';
|
static description = 'List all available scenarios';
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
import { Command, Flags } from '@oclif/core';
|
import { Command, Flags } from '@oclif/core';
|
||||||
import { ScenarioLoader } from '@/scenario/scenario-loader';
|
|
||||||
import { ScenarioRunner } from '@/test-execution/scenario-runner';
|
import { testScenariosPath } from '@/config/common-flags';
|
||||||
import { N8nApiClient } from '@/n8n-api-client/n8n-api-client';
|
import { N8nApiClient } from '@/n8n-api-client/n8n-api-client';
|
||||||
import { ScenarioDataFileLoader } from '@/scenario/scenario-data-loader';
|
import { ScenarioDataFileLoader } from '@/scenario/scenario-data-loader';
|
||||||
|
import { ScenarioLoader } from '@/scenario/scenario-loader';
|
||||||
import type { K6Tag } from '@/test-execution/k6-executor';
|
import type { K6Tag } from '@/test-execution/k6-executor';
|
||||||
import { K6Executor } from '@/test-execution/k6-executor';
|
import { K6Executor } from '@/test-execution/k6-executor';
|
||||||
import { testScenariosPath } from '@/config/common-flags';
|
import { ScenarioRunner } from '@/test-execution/scenario-runner';
|
||||||
|
|
||||||
export default class RunCommand extends Command {
|
export default class RunCommand extends Command {
|
||||||
static description = 'Run all (default) or specified test scenarios';
|
static description = 'Run all (default) or specified test scenarios';
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import type { AxiosRequestConfig } from 'axios';
|
import type { AxiosRequestConfig } from 'axios';
|
||||||
|
|
||||||
import { N8nApiClient } from './n8n-api-client';
|
import { N8nApiClient } from './n8n-api-client';
|
||||||
|
|
||||||
export class AuthenticatedN8nApiClient extends N8nApiClient {
|
export class AuthenticatedN8nApiClient extends N8nApiClient {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import type { AuthenticatedN8nApiClient } from './authenticated-n8n-api-client';
|
|
||||||
import type { Workflow } from '@/n8n-api-client/n8n-api-client.types';
|
import type { Workflow } from '@/n8n-api-client/n8n-api-client.types';
|
||||||
|
|
||||||
|
import type { AuthenticatedN8nApiClient } from './authenticated-n8n-api-client';
|
||||||
|
|
||||||
export class WorkflowApiClient {
|
export class WorkflowApiClient {
|
||||||
constructor(private readonly apiClient: AuthenticatedN8nApiClient) {}
|
constructor(private readonly apiClient: AuthenticatedN8nApiClient) {}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import * as fs from 'node:fs';
|
import * as fs from 'node:fs';
|
||||||
import * as path from 'node:path';
|
import * as path from 'node:path';
|
||||||
import type { Scenario } from '@/types/scenario';
|
|
||||||
import type { Workflow } from '@/n8n-api-client/n8n-api-client.types';
|
import type { Workflow } from '@/n8n-api-client/n8n-api-client.types';
|
||||||
|
import type { Scenario } from '@/types/scenario';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads scenario data files from FS
|
* Loads scenario data files from FS
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
import { createHash } from 'node:crypto';
|
||||||
import * as fs from 'node:fs';
|
import * as fs from 'node:fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import { createHash } from 'node:crypto';
|
|
||||||
import type { Scenario, ScenarioManifest } from '@/types/scenario';
|
import type { Scenario, ScenarioManifest } from '@/types/scenario';
|
||||||
|
|
||||||
export class ScenarioLoader {
|
export class ScenarioLoader {
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
|
||||||
import assert from 'node:assert/strict';
|
import assert from 'node:assert/strict';
|
||||||
|
import path from 'path';
|
||||||
import { $, which, tmpfile } from 'zx';
|
import { $, which, tmpfile } from 'zx';
|
||||||
import type { Scenario } from '@/types/scenario';
|
|
||||||
import { buildTestReport, type K6Tag } from '@/test-execution/test-report';
|
import { buildTestReport, type K6Tag } from '@/test-execution/test-report';
|
||||||
|
import type { Scenario } from '@/types/scenario';
|
||||||
export type { K6Tag };
|
export type { K6Tag };
|
||||||
|
|
||||||
export type K6ExecutorOpts = {
|
export type K6ExecutorOpts = {
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import type { K6Executor } from './k6-executor';
|
import { AuthenticatedN8nApiClient } from '@/n8n-api-client/authenticated-n8n-api-client';
|
||||||
import type { Scenario } from '@/types/scenario';
|
|
||||||
import type { N8nApiClient } from '@/n8n-api-client/n8n-api-client';
|
import type { N8nApiClient } from '@/n8n-api-client/n8n-api-client';
|
||||||
import type { ScenarioDataFileLoader } from '@/scenario/scenario-data-loader';
|
import type { ScenarioDataFileLoader } from '@/scenario/scenario-data-loader';
|
||||||
import { ScenarioDataImporter } from '@/test-execution/scenario-data-importer';
|
import { ScenarioDataImporter } from '@/test-execution/scenario-data-importer';
|
||||||
import { AuthenticatedN8nApiClient } from '@/n8n-api-client/authenticated-n8n-api-client';
|
import type { Scenario } from '@/types/scenario';
|
||||||
|
|
||||||
|
import type { K6Executor } from './k6-executor';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs scenarios
|
* Runs scenarios
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { nanoid } from 'nanoid';
|
import { nanoid } from 'nanoid';
|
||||||
|
|
||||||
import type { Scenario } from '@/types/scenario';
|
import type { Scenario } from '@/types/scenario';
|
||||||
|
|
||||||
export type K6Tag = {
|
export type K6Tag = {
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, onMounted } from 'vue';
|
|
||||||
import hljs from 'highlight.js/lib/core';
|
import hljs from 'highlight.js/lib/core';
|
||||||
import hljsXML from 'highlight.js/lib/languages/xml';
|
|
||||||
import hljsJavascript from 'highlight.js/lib/languages/javascript';
|
import hljsJavascript from 'highlight.js/lib/languages/javascript';
|
||||||
|
import hljsXML from 'highlight.js/lib/languages/xml';
|
||||||
|
import { computed, onMounted } from 'vue';
|
||||||
|
|
||||||
import { Chat, ChatWindow } from '@n8n/chat/components';
|
import { Chat, ChatWindow } from '@n8n/chat/components';
|
||||||
import { useOptions } from '@n8n/chat/composables';
|
import { useOptions } from '@n8n/chat/composables';
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
/* eslint-disable @typescript-eslint/naming-convention */
|
/* eslint-disable @typescript-eslint/naming-convention */
|
||||||
import type { StoryObj } from '@storybook/vue3';
|
import type { StoryObj } from '@storybook/vue3';
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import type { ChatOptions } from '@n8n/chat/types';
|
|
||||||
import { createChat } from '@n8n/chat/index';
|
import { createChat } from '@n8n/chat/index';
|
||||||
|
import type { ChatOptions } from '@n8n/chat/types';
|
||||||
|
|
||||||
const webhookUrl = 'http://localhost:5678/webhook/f406671e-c954-4691-b39a-66c90aa2f103/chat';
|
const webhookUrl = 'http://localhost:5678/webhook/f406671e-c954-4691-b39a-66c90aa2f103/chat';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { fireEvent, waitFor } from '@testing-library/vue';
|
import { fireEvent, waitFor } from '@testing-library/vue';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
createFetchResponse,
|
createFetchResponse,
|
||||||
createGetLatestMessagesResponse,
|
createGetLatestMessagesResponse,
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { screen } from '@testing-library/vue';
|
import { screen } from '@testing-library/vue';
|
||||||
|
|
||||||
import { defaultMountingTarget } from '@n8n/chat/constants';
|
import { defaultMountingTarget } from '@n8n/chat/constants';
|
||||||
|
|
||||||
export function getMountingTarget(target = defaultMountingTarget) {
|
export function getMountingTarget(target = defaultMountingTarget) {
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Close from 'virtual:icons/mdi/close';
|
import Close from 'virtual:icons/mdi/close';
|
||||||
import { computed, nextTick, onMounted } from 'vue';
|
import { computed, nextTick, onMounted } from 'vue';
|
||||||
import Layout from '@n8n/chat/components/Layout.vue';
|
|
||||||
import GetStarted from '@n8n/chat/components/GetStarted.vue';
|
import GetStarted from '@n8n/chat/components/GetStarted.vue';
|
||||||
import GetStartedFooter from '@n8n/chat/components/GetStartedFooter.vue';
|
import GetStartedFooter from '@n8n/chat/components/GetStartedFooter.vue';
|
||||||
import MessagesList from '@n8n/chat/components/MessagesList.vue';
|
|
||||||
import Input from '@n8n/chat/components/Input.vue';
|
import Input from '@n8n/chat/components/Input.vue';
|
||||||
|
import Layout from '@n8n/chat/components/Layout.vue';
|
||||||
|
import MessagesList from '@n8n/chat/components/MessagesList.vue';
|
||||||
import { useI18n, useChat, useOptions } from '@n8n/chat/composables';
|
import { useI18n, useChat, useOptions } from '@n8n/chat/composables';
|
||||||
import { chatEventBus } from '@n8n/chat/event-buses';
|
import { chatEventBus } from '@n8n/chat/event-buses';
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import IconFileText from 'virtual:icons/mdi/fileText';
|
|
||||||
import IconFileMusic from 'virtual:icons/mdi/fileMusic';
|
|
||||||
import IconFileImage from 'virtual:icons/mdi/fileImage';
|
|
||||||
import IconFileVideo from 'virtual:icons/mdi/fileVideo';
|
|
||||||
import IconDelete from 'virtual:icons/mdi/closeThick';
|
import IconDelete from 'virtual:icons/mdi/closeThick';
|
||||||
|
import IconFileImage from 'virtual:icons/mdi/fileImage';
|
||||||
|
import IconFileMusic from 'virtual:icons/mdi/fileMusic';
|
||||||
|
import IconFileText from 'virtual:icons/mdi/fileText';
|
||||||
|
import IconFileVideo from 'virtual:icons/mdi/fileVideo';
|
||||||
import IconPreview from 'virtual:icons/mdi/openInNew';
|
import IconPreview from 'virtual:icons/mdi/openInNew';
|
||||||
|
|
||||||
import { computed, type FunctionalComponent } from 'vue';
|
import { computed, type FunctionalComponent } from 'vue';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import IconChat from 'virtual:icons/mdi/chat';
|
import IconChat from 'virtual:icons/mdi/chat';
|
||||||
import IconChevronDown from 'virtual:icons/mdi/chevron-down';
|
import IconChevronDown from 'virtual:icons/mdi/chevron-down';
|
||||||
import { nextTick, ref } from 'vue';
|
import { nextTick, ref } from 'vue';
|
||||||
|
|
||||||
import Chat from '@n8n/chat/components/Chat.vue';
|
import Chat from '@n8n/chat/components/Chat.vue';
|
||||||
import { chatEventBus } from '@n8n/chat/event-buses';
|
import { chatEventBus } from '@n8n/chat/event-buses';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useI18n } from '@n8n/chat/composables';
|
|
||||||
import PoweredBy from '@n8n/chat/components/PoweredBy.vue';
|
import PoweredBy from '@n8n/chat/components/PoweredBy.vue';
|
||||||
|
import { useI18n } from '@n8n/chat/composables';
|
||||||
|
|
||||||
const { t, te } = useI18n();
|
const { t, te } = useI18n();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import IconSend from 'virtual:icons/mdi/send';
|
|
||||||
import IconFilePlus from 'virtual:icons/mdi/filePlus';
|
|
||||||
import { computed, onMounted, onUnmounted, ref, unref } from 'vue';
|
|
||||||
import { useFileDialog } from '@vueuse/core';
|
import { useFileDialog } from '@vueuse/core';
|
||||||
import ChatFile from './ChatFile.vue';
|
import IconFilePlus from 'virtual:icons/mdi/filePlus';
|
||||||
|
import IconSend from 'virtual:icons/mdi/send';
|
||||||
|
import { computed, onMounted, onUnmounted, ref, unref } from 'vue';
|
||||||
|
|
||||||
import { useI18n, useChat, useOptions } from '@n8n/chat/composables';
|
import { useI18n, useChat, useOptions } from '@n8n/chat/composables';
|
||||||
import { chatEventBus } from '@n8n/chat/event-buses';
|
import { chatEventBus } from '@n8n/chat/event-buses';
|
||||||
|
|
||||||
|
import ChatFile from './ChatFile.vue';
|
||||||
|
|
||||||
export interface ArrowKeyDownPayload {
|
export interface ArrowKeyDownPayload {
|
||||||
key: 'ArrowUp' | 'ArrowDown';
|
key: 'ArrowUp' | 'ArrowDown';
|
||||||
currentInputValue: string;
|
currentInputValue: string;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onBeforeUnmount, onMounted, ref } from 'vue';
|
import { onBeforeUnmount, onMounted, ref } from 'vue';
|
||||||
|
|
||||||
import { chatEventBus } from '@n8n/chat/event-buses';
|
import { chatEventBus } from '@n8n/chat/event-buses';
|
||||||
|
|
||||||
const chatBodyRef = ref<HTMLElement | null>(null);
|
const chatBodyRef = ref<HTMLElement | null>(null);
|
||||||
|
|
|
@ -1,18 +1,20 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
/* eslint-disable @typescript-eslint/naming-convention */
|
/* eslint-disable @typescript-eslint/naming-convention */
|
||||||
|
import hljs from 'highlight.js/lib/core';
|
||||||
|
import bash from 'highlight.js/lib/languages/bash';
|
||||||
|
import javascript from 'highlight.js/lib/languages/javascript';
|
||||||
|
import python from 'highlight.js/lib/languages/python';
|
||||||
|
import typescript from 'highlight.js/lib/languages/typescript';
|
||||||
|
import xml from 'highlight.js/lib/languages/xml';
|
||||||
|
import type MarkdownIt from 'markdown-it';
|
||||||
|
import markdownLink from 'markdown-it-link-attributes';
|
||||||
import { computed, ref, toRefs, onMounted } from 'vue';
|
import { computed, ref, toRefs, onMounted } from 'vue';
|
||||||
import VueMarkdown from 'vue-markdown-render';
|
import VueMarkdown from 'vue-markdown-render';
|
||||||
import hljs from 'highlight.js/lib/core';
|
|
||||||
import javascript from 'highlight.js/lib/languages/javascript';
|
|
||||||
import typescript from 'highlight.js/lib/languages/typescript';
|
|
||||||
import python from 'highlight.js/lib/languages/python';
|
|
||||||
import xml from 'highlight.js/lib/languages/xml';
|
|
||||||
import bash from 'highlight.js/lib/languages/bash';
|
|
||||||
import markdownLink from 'markdown-it-link-attributes';
|
|
||||||
import type MarkdownIt from 'markdown-it';
|
|
||||||
import ChatFile from './ChatFile.vue';
|
|
||||||
import type { ChatMessage, ChatMessageText } from '@n8n/chat/types';
|
|
||||||
import { useOptions } from '@n8n/chat/composables';
|
import { useOptions } from '@n8n/chat/composables';
|
||||||
|
import type { ChatMessage, ChatMessageText } from '@n8n/chat/types';
|
||||||
|
|
||||||
|
import ChatFile from './ChatFile.vue';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
message: ChatMessage;
|
message: ChatMessage;
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, onMounted, ref } from 'vue';
|
import { computed, onMounted, ref } from 'vue';
|
||||||
import { Message } from './index';
|
|
||||||
import type { ChatMessage } from '@n8n/chat/types';
|
import type { ChatMessage } from '@n8n/chat/types';
|
||||||
|
|
||||||
|
import { Message } from './index';
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
animation?: 'bouncing' | 'scaling';
|
animation?: 'bouncing' | 'scaling';
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
|
|
||||||
import Message from '@n8n/chat/components/Message.vue';
|
import Message from '@n8n/chat/components/Message.vue';
|
||||||
import type { ChatMessage } from '@n8n/chat/types';
|
|
||||||
import MessageTyping from '@n8n/chat/components/MessageTyping.vue';
|
import MessageTyping from '@n8n/chat/components/MessageTyping.vue';
|
||||||
import { useChat } from '@n8n/chat/composables';
|
import { useChat } from '@n8n/chat/composables';
|
||||||
|
import type { ChatMessage } from '@n8n/chat/types';
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
messages: ChatMessage[];
|
messages: ChatMessage[];
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { inject } from 'vue';
|
import { inject } from 'vue';
|
||||||
|
|
||||||
import { ChatSymbol } from '@n8n/chat/constants';
|
import { ChatSymbol } from '@n8n/chat/constants';
|
||||||
import type { Chat } from '@n8n/chat/types';
|
import type { Chat } from '@n8n/chat/types';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { isRef } from 'vue';
|
import { isRef } from 'vue';
|
||||||
|
|
||||||
import { useOptions } from '@n8n/chat/composables/useOptions';
|
import { useOptions } from '@n8n/chat/composables/useOptions';
|
||||||
|
|
||||||
export function useI18n() {
|
export function useI18n() {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { inject } from 'vue';
|
import { inject } from 'vue';
|
||||||
|
|
||||||
import { ChatOptionsSymbol } from '@n8n/chat/constants';
|
import { ChatOptionsSymbol } from '@n8n/chat/constants';
|
||||||
import type { ChatOptions } from '@n8n/chat/types';
|
import type { ChatOptions } from '@n8n/chat/types';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import type { InjectionKey } from 'vue';
|
import type { InjectionKey } from 'vue';
|
||||||
|
|
||||||
import type { Chat, ChatOptions } from '@n8n/chat/types';
|
import type { Chat, ChatOptions } from '@n8n/chat/types';
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
import './main.scss';
|
import './main.scss';
|
||||||
|
|
||||||
import { createApp } from 'vue';
|
import { createApp } from 'vue';
|
||||||
import App from './App.vue';
|
|
||||||
import type { ChatOptions } from '@n8n/chat/types';
|
|
||||||
import { defaultMountingTarget, defaultOptions } from '@n8n/chat/constants';
|
import { defaultMountingTarget, defaultOptions } from '@n8n/chat/constants';
|
||||||
import { createDefaultMountingTarget } from '@n8n/chat/utils';
|
|
||||||
import { ChatPlugin } from '@n8n/chat/plugins';
|
import { ChatPlugin } from '@n8n/chat/plugins';
|
||||||
|
import type { ChatOptions } from '@n8n/chat/types';
|
||||||
|
import { createDefaultMountingTarget } from '@n8n/chat/utils';
|
||||||
|
|
||||||
|
import App from './App.vue';
|
||||||
|
|
||||||
export function createChat(options?: Partial<ChatOptions>) {
|
export function createChat(options?: Partial<ChatOptions>) {
|
||||||
const resolvedOptions: ChatOptions = {
|
const resolvedOptions: ChatOptions = {
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
import type { Plugin } from 'vue';
|
import type { Plugin } from 'vue';
|
||||||
import { computed, nextTick, ref } from 'vue';
|
import { computed, nextTick, ref } from 'vue';
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
|
||||||
import type { ChatMessage, ChatOptions } from '@n8n/chat/types';
|
|
||||||
import { chatEventBus } from '@n8n/chat/event-buses';
|
|
||||||
import * as api from '@n8n/chat/api';
|
import * as api from '@n8n/chat/api';
|
||||||
import { ChatOptionsSymbol, ChatSymbol, localStorageSessionIdKey } from '@n8n/chat/constants';
|
import { ChatOptionsSymbol, ChatSymbol, localStorageSessionIdKey } from '@n8n/chat/constants';
|
||||||
|
import { chatEventBus } from '@n8n/chat/event-buses';
|
||||||
|
import type { ChatMessage, ChatOptions } from '@n8n/chat/types';
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||||
export const ChatPlugin: Plugin<ChatOptions> = {
|
export const ChatPlugin: Plugin<ChatOptions> = {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import type { Ref } from 'vue';
|
import type { Ref } from 'vue';
|
||||||
|
|
||||||
import type { ChatMessage } from '@n8n/chat/types/messages';
|
import type { ChatMessage } from '@n8n/chat/types/messages';
|
||||||
|
|
||||||
export interface Chat {
|
export interface Chat {
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
||||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
import * as qs from 'querystring';
|
|
||||||
import { Agent } from 'https';
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import type { AxiosRequestConfig } from 'axios';
|
import type { AxiosRequestConfig } from 'axios';
|
||||||
import { getAuthError } from './utils';
|
import { Agent } from 'https';
|
||||||
|
import * as qs from 'querystring';
|
||||||
|
|
||||||
import type { ClientOAuth2TokenData } from './ClientOAuth2Token';
|
import type { ClientOAuth2TokenData } from './ClientOAuth2Token';
|
||||||
import { ClientOAuth2Token } from './ClientOAuth2Token';
|
import { ClientOAuth2Token } from './ClientOAuth2Token';
|
||||||
import { CodeFlow } from './CodeFlow';
|
import { CodeFlow } from './CodeFlow';
|
||||||
import { CredentialsFlow } from './CredentialsFlow';
|
import { CredentialsFlow } from './CredentialsFlow';
|
||||||
import type { Headers } from './types';
|
import type { Headers } from './types';
|
||||||
|
import { getAuthError } from './utils';
|
||||||
|
|
||||||
export interface ClientOAuth2RequestObject {
|
export interface ClientOAuth2RequestObject {
|
||||||
url: string;
|
url: string;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import type { ClientOAuth2, ClientOAuth2Options, ClientOAuth2RequestObject } from './ClientOAuth2';
|
import type { ClientOAuth2, ClientOAuth2Options, ClientOAuth2RequestObject } from './ClientOAuth2';
|
||||||
import { auth, expects, getRequestOptions } from './utils';
|
|
||||||
import { DEFAULT_HEADERS } from './constants';
|
import { DEFAULT_HEADERS } from './constants';
|
||||||
|
import { auth, expects, getRequestOptions } from './utils';
|
||||||
|
|
||||||
export interface ClientOAuth2TokenData extends Record<string, string | undefined> {
|
export interface ClientOAuth2TokenData extends Record<string, string | undefined> {
|
||||||
token_type?: string | undefined;
|
token_type?: string | undefined;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import * as qs from 'querystring';
|
import * as qs from 'querystring';
|
||||||
|
|
||||||
import type { ClientOAuth2, ClientOAuth2Options } from './ClientOAuth2';
|
import type { ClientOAuth2, ClientOAuth2Options } from './ClientOAuth2';
|
||||||
import type { ClientOAuth2Token, ClientOAuth2TokenData } from './ClientOAuth2Token';
|
import type { ClientOAuth2Token, ClientOAuth2TokenData } from './ClientOAuth2Token';
|
||||||
import { DEFAULT_HEADERS, DEFAULT_URL_BASE } from './constants';
|
import { DEFAULT_HEADERS, DEFAULT_URL_BASE } from './constants';
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
import nock from 'nock';
|
import nock from 'nock';
|
||||||
import { ClientOAuth2, ClientOAuth2Token } from '../src';
|
|
||||||
import * as config from './config';
|
|
||||||
import { AuthError } from '@/utils';
|
import { AuthError } from '@/utils';
|
||||||
|
|
||||||
|
import * as config from './config';
|
||||||
|
import { ClientOAuth2, ClientOAuth2Token } from '../src';
|
||||||
|
|
||||||
describe('CodeFlow', () => {
|
describe('CodeFlow', () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
nock.disableNetConnect();
|
nock.disableNetConnect();
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import nock from 'nock';
|
import nock from 'nock';
|
||||||
import type { Headers } from '../src/types';
|
|
||||||
|
import * as config from './config';
|
||||||
import type { ClientOAuth2Options } from '../src';
|
import type { ClientOAuth2Options } from '../src';
|
||||||
import { ClientOAuth2, ClientOAuth2Token } from '../src';
|
import { ClientOAuth2, ClientOAuth2Token } from '../src';
|
||||||
import * as config from './config';
|
import type { Headers } from '../src/types';
|
||||||
|
|
||||||
describe('CredentialsFlow', () => {
|
describe('CredentialsFlow', () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { LRLanguage, LanguageSupport, foldNodeProp, foldInside } from '@codemirror/language';
|
import { LRLanguage, LanguageSupport, foldNodeProp, foldInside } from '@codemirror/language';
|
||||||
import { styleTags, tags as t } from '@lezer/highlight';
|
import { styleTags, tags as t } from '@lezer/highlight';
|
||||||
|
|
||||||
import { parser } from './grammar';
|
import { parser } from './grammar';
|
||||||
|
|
||||||
export const parserWithMetaData = parser.configure({
|
export const parserWithMetaData = parser.configure({
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
import { fileTests as runTestFile } from '@lezer/generator/dist/test';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { fileTests as runTestFile } from '@lezer/generator/dist/test';
|
|
||||||
import { n8nLanguage } from '../../src/expressions/index';
|
import { n8nLanguage } from '../../src/expressions/index';
|
||||||
|
|
||||||
describe('expressions language', () => {
|
describe('expressions language', () => {
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
import { Config, Env, Nested } from './decorators';
|
import { CacheConfig } from './configs/cache.config';
|
||||||
import { CredentialsConfig } from './configs/credentials.config';
|
import { CredentialsConfig } from './configs/credentials.config';
|
||||||
import { DatabaseConfig } from './configs/database.config';
|
import { DatabaseConfig } from './configs/database.config';
|
||||||
import { VersionNotificationsConfig } from './configs/version-notifications.config';
|
|
||||||
import { PublicApiConfig } from './configs/public-api.config';
|
|
||||||
import { ExternalSecretsConfig } from './configs/external-secrets.config';
|
|
||||||
import { TemplatesConfig } from './configs/templates.config';
|
|
||||||
import { EventBusConfig } from './configs/event-bus.config';
|
|
||||||
import { NodesConfig } from './configs/nodes.config';
|
|
||||||
import { ExternalStorageConfig } from './configs/external-storage.config';
|
|
||||||
import { WorkflowsConfig } from './configs/workflows.config';
|
|
||||||
import { EndpointsConfig } from './configs/endpoints.config';
|
import { EndpointsConfig } from './configs/endpoints.config';
|
||||||
import { CacheConfig } from './configs/cache.config';
|
import { EventBusConfig } from './configs/event-bus.config';
|
||||||
|
import { ExternalSecretsConfig } from './configs/external-secrets.config';
|
||||||
|
import { ExternalStorageConfig } from './configs/external-storage.config';
|
||||||
|
import { NodesConfig } from './configs/nodes.config';
|
||||||
|
import { PublicApiConfig } from './configs/public-api.config';
|
||||||
import { ScalingModeConfig } from './configs/scaling-mode.config';
|
import { ScalingModeConfig } from './configs/scaling-mode.config';
|
||||||
|
import { TemplatesConfig } from './configs/templates.config';
|
||||||
import { UserManagementConfig } from './configs/user-management.config';
|
import { UserManagementConfig } from './configs/user-management.config';
|
||||||
|
import { VersionNotificationsConfig } from './configs/version-notifications.config';
|
||||||
|
import { WorkflowsConfig } from './configs/workflows.config';
|
||||||
|
import { Config, Env, Nested } from './decorators';
|
||||||
|
|
||||||
@Config
|
@Config
|
||||||
export class GlobalConfig {
|
export class GlobalConfig {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import { Container } from 'typedi';
|
|
||||||
import { mock } from 'jest-mock-extended';
|
import { mock } from 'jest-mock-extended';
|
||||||
|
import { Container } from 'typedi';
|
||||||
|
|
||||||
import { GlobalConfig } from '../src/index';
|
import { GlobalConfig } from '../src/index';
|
||||||
|
|
||||||
jest.mock('fs');
|
jest.mock('fs');
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { Container } from 'typedi';
|
import { Container } from 'typedi';
|
||||||
|
|
||||||
import { Config, Env } from '../src/decorators';
|
import { Config, Env } from '../src/decorators';
|
||||||
|
|
||||||
describe('decorators', () => {
|
describe('decorators', () => {
|
||||||
|
|
|
@ -4,8 +4,8 @@ import type Imap from 'imap';
|
||||||
import { type ImapMessage } from 'imap';
|
import { type ImapMessage } from 'imap';
|
||||||
|
|
||||||
import { getMessage } from './helpers/getMessage';
|
import { getMessage } from './helpers/getMessage';
|
||||||
import type { Message, MessagePart } from './types';
|
|
||||||
import { PartData } from './PartData';
|
import { PartData } from './PartData';
|
||||||
|
import type { Message, MessagePart } from './types';
|
||||||
|
|
||||||
const IMAP_EVENTS = ['alert', 'mail', 'expunge', 'uidvalidity', 'update', 'close', 'end'] as const;
|
const IMAP_EVENTS = ['alert', 'mail', 'expunge', 'uidvalidity', 'update', 'close', 'end'] as const;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable @typescript-eslint/no-use-before-define */
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
||||||
import * as qp from 'quoted-printable';
|
|
||||||
import * as iconvlite from 'iconv-lite';
|
import * as iconvlite from 'iconv-lite';
|
||||||
|
import * as qp from 'quoted-printable';
|
||||||
import * as utf8 from 'utf8';
|
import * as utf8 from 'utf8';
|
||||||
import * as uuencode from 'uuencode';
|
import * as uuencode from 'uuencode';
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ import {
|
||||||
type ImapMessageBodyInfo,
|
type ImapMessageBodyInfo,
|
||||||
type ImapMessageAttributes,
|
type ImapMessageAttributes,
|
||||||
} from 'imap';
|
} from 'imap';
|
||||||
|
|
||||||
import type { Message, MessageBodyPart } from '../types';
|
import type { Message, MessageBodyPart } from '../types';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||||
/* eslint-disable @typescript-eslint/no-use-before-define */
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
||||||
import Imap from 'imap';
|
import Imap from 'imap';
|
||||||
import { ImapSimple } from './ImapSimple';
|
|
||||||
import { ConnectionClosedError, ConnectionEndedError, ConnectionTimeoutError } from './errors';
|
import { ConnectionClosedError, ConnectionEndedError, ConnectionTimeoutError } from './errors';
|
||||||
|
import { ImapSimple } from './ImapSimple';
|
||||||
import type { ImapSimpleOptions, MessagePart } from './types';
|
import type { ImapSimpleOptions, MessagePart } from './types';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -338,7 +338,17 @@ const config = (module.exports = {
|
||||||
/**
|
/**
|
||||||
* https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/order.md
|
* https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/order.md
|
||||||
*/
|
*/
|
||||||
'import/order': 'error',
|
'import/order': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
alphabetize: {
|
||||||
|
order: 'asc',
|
||||||
|
caseInsensitive: true,
|
||||||
|
},
|
||||||
|
groups: [['builtin', 'external'], 'internal', ['parent', 'index', 'sibling'], 'object'],
|
||||||
|
'newlines-between': 'always',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// eslint-plugin-n8n-local-rules
|
// eslint-plugin-n8n-local-rules
|
||||||
|
|
|
@ -28,17 +28,6 @@ module.exports = {
|
||||||
|
|
||||||
// TODO: Remove this
|
// TODO: Remove this
|
||||||
'import/no-cycle': 'warn',
|
'import/no-cycle': 'warn',
|
||||||
'import/order': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
alphabetize: {
|
|
||||||
order: 'asc',
|
|
||||||
caseInsensitive: true,
|
|
||||||
},
|
|
||||||
groups: [['builtin', 'external'], 'internal', ['parent', 'index', 'sibling'], 'object'],
|
|
||||||
'newlines-between': 'always',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'import/extensions': 'warn',
|
'import/extensions': 'warn',
|
||||||
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }],
|
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }],
|
||||||
'@typescript-eslint/no-explicit-any': 'warn',
|
'@typescript-eslint/no-explicit-any': 'warn',
|
||||||
|
|
|
@ -11,7 +11,6 @@ module.exports = {
|
||||||
rules: {
|
rules: {
|
||||||
// TODO: Remove these
|
// TODO: Remove these
|
||||||
'import/no-default-export': 'warn',
|
'import/no-default-export': 'warn',
|
||||||
'import/order': 'off',
|
|
||||||
'@typescript-eslint/no-unsafe-argument': 'warn',
|
'@typescript-eslint/no-unsafe-argument': 'warn',
|
||||||
'@typescript-eslint/no-unsafe-return': 'warn',
|
'@typescript-eslint/no-unsafe-return': 'warn',
|
||||||
'@typescript-eslint/no-unsafe-member-access': 'warn',
|
'@typescript-eslint/no-unsafe-member-access': 'warn',
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import '@testing-library/jest-dom';
|
import '@testing-library/jest-dom';
|
||||||
import { config } from '@vue/test-utils';
|
import { config } from '@vue/test-utils';
|
||||||
|
|
||||||
import { N8nPlugin } from 'n8n-design-system/plugin';
|
import { N8nPlugin } from 'n8n-design-system/plugin';
|
||||||
|
|
||||||
config.global.plugins = [N8nPlugin];
|
config.global.plugins = [N8nPlugin];
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import AssistantAvatar from './AssistantAvatar.vue';
|
|
||||||
import type { StoryFn } from '@storybook/vue3';
|
import type { StoryFn } from '@storybook/vue3';
|
||||||
|
|
||||||
|
import AssistantAvatar from './AssistantAvatar.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Assistant/AssistantAvatar',
|
title: 'Assistant/AssistantAvatar',
|
||||||
component: AssistantAvatar,
|
component: AssistantAvatar,
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { render } from '@testing-library/vue';
|
import { render } from '@testing-library/vue';
|
||||||
|
|
||||||
import AssistantAvatar from '../AssistantAvatar.vue';
|
import AssistantAvatar from '../AssistantAvatar.vue';
|
||||||
|
|
||||||
describe('AskAssistantAvatar', () => {
|
describe('AskAssistantAvatar', () => {
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import AskAssistantButton from './AskAssistantButton.vue';
|
|
||||||
import { action } from '@storybook/addon-actions';
|
import { action } from '@storybook/addon-actions';
|
||||||
import type { StoryFn } from '@storybook/vue3';
|
import type { StoryFn } from '@storybook/vue3';
|
||||||
|
|
||||||
|
import AskAssistantButton from './AskAssistantButton.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Assistant/AskAssistantButton',
|
title: 'Assistant/AskAssistantButton',
|
||||||
component: AskAssistantButton,
|
component: AskAssistantButton,
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
|
import { useI18n } from '../../composables/useI18n';
|
||||||
import AssistantIcon from '../AskAssistantIcon/AssistantIcon.vue';
|
import AssistantIcon from '../AskAssistantIcon/AssistantIcon.vue';
|
||||||
import AssistantText from '../AskAssistantText/AssistantText.vue';
|
import AssistantText from '../AskAssistantText/AssistantText.vue';
|
||||||
import BetaTag from '../BetaTag/BetaTag.vue';
|
import BetaTag from '../BetaTag/BetaTag.vue';
|
||||||
import { useI18n } from '../../composables/useI18n';
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { render } from '@testing-library/vue';
|
import { render } from '@testing-library/vue';
|
||||||
|
|
||||||
import AskAssistantButton from '../AskAssistantButton.vue';
|
import AskAssistantButton from '../AskAssistantButton.vue';
|
||||||
|
|
||||||
describe('AskAssistantButton', () => {
|
describe('AskAssistantButton', () => {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import AskAssistantChat from './AskAssistantChat.vue';
|
|
||||||
import type { StoryFn } from '@storybook/vue3';
|
import type { StoryFn } from '@storybook/vue3';
|
||||||
|
|
||||||
|
import AskAssistantChat from './AskAssistantChat.vue';
|
||||||
import type { ChatUI } from '../../types/assistant';
|
import type { ChatUI } from '../../types/assistant';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, ref } from 'vue';
|
|
||||||
import AssistantIcon from '../AskAssistantIcon/AssistantIcon.vue';
|
|
||||||
import AssistantText from '../AskAssistantText/AssistantText.vue';
|
|
||||||
import AssistantAvatar from '../AskAssistantAvatar/AssistantAvatar.vue';
|
|
||||||
import AssistantLoadingMessage from '../AskAssistantLoadingMessage/AssistantLoadingMessage.vue';
|
|
||||||
import CodeDiff from '../CodeDiff/CodeDiff.vue';
|
|
||||||
import type { ChatUI } from '../../types/assistant';
|
|
||||||
import BlinkingCursor from '../BlinkingCursor/BlinkingCursor.vue';
|
|
||||||
|
|
||||||
import Markdown from 'markdown-it';
|
import Markdown from 'markdown-it';
|
||||||
import InlineAskAssistantButton from '../InlineAskAssistantButton/InlineAskAssistantButton.vue';
|
|
||||||
import BetaTag from '../BetaTag/BetaTag.vue';
|
|
||||||
import { useI18n } from '../../composables/useI18n';
|
|
||||||
import markdownLink from 'markdown-it-link-attributes';
|
import markdownLink from 'markdown-it-link-attributes';
|
||||||
|
import { computed, ref } from 'vue';
|
||||||
|
|
||||||
|
import { useI18n } from '../../composables/useI18n';
|
||||||
|
import type { ChatUI } from '../../types/assistant';
|
||||||
|
import AssistantAvatar from '../AskAssistantAvatar/AssistantAvatar.vue';
|
||||||
|
import AssistantIcon from '../AskAssistantIcon/AssistantIcon.vue';
|
||||||
|
import AssistantLoadingMessage from '../AskAssistantLoadingMessage/AssistantLoadingMessage.vue';
|
||||||
|
import AssistantText from '../AskAssistantText/AssistantText.vue';
|
||||||
|
import BetaTag from '../BetaTag/BetaTag.vue';
|
||||||
|
import BlinkingCursor from '../BlinkingCursor/BlinkingCursor.vue';
|
||||||
|
import CodeDiff from '../CodeDiff/CodeDiff.vue';
|
||||||
|
import InlineAskAssistantButton from '../InlineAskAssistantButton/InlineAskAssistantButton.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { render } from '@testing-library/vue';
|
import { render } from '@testing-library/vue';
|
||||||
|
|
||||||
import AskAssistantChat from '../AskAssistantChat.vue';
|
import AskAssistantChat from '../AskAssistantChat.vue';
|
||||||
import { n8nHtml } from 'n8n-design-system/directives';
|
import { n8nHtml } from 'n8n-design-system/directives';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import AssistantIcon from './AssistantIcon.vue';
|
|
||||||
import type { StoryFn } from '@storybook/vue3';
|
import type { StoryFn } from '@storybook/vue3';
|
||||||
|
|
||||||
|
import AssistantIcon from './AssistantIcon.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Assistant/AssistantIcon',
|
title: 'Assistant/AssistantIcon',
|
||||||
component: AssistantIcon,
|
component: AssistantIcon,
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { render } from '@testing-library/vue';
|
import { render } from '@testing-library/vue';
|
||||||
|
|
||||||
import AssistantIcon from '../AssistantIcon.vue';
|
import AssistantIcon from '../AssistantIcon.vue';
|
||||||
|
|
||||||
describe('AssistantIcon', () => {
|
describe('AssistantIcon', () => {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import AssistantLoadingMessage from './AssistantLoadingMessage.vue';
|
|
||||||
import type { StoryFn } from '@storybook/vue3';
|
import type { StoryFn } from '@storybook/vue3';
|
||||||
|
|
||||||
|
import AssistantLoadingMessage from './AssistantLoadingMessage.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Assistant/AskAssistantLoadingMessage',
|
title: 'Assistant/AskAssistantLoadingMessage',
|
||||||
component: AssistantLoadingMessage,
|
component: AssistantLoadingMessage,
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue