mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-13 16:14:07 -08:00
refactor: Move js task runner into own directory (#11146)
This commit is contained in:
parent
1ded08bf7e
commit
51606cb279
|
@ -1,8 +1,12 @@
|
|||
import type { CodeExecutionMode, IDataObject, WorkflowExecuteMode } from 'n8n-workflow';
|
||||
|
||||
import { JsTaskRunner, type AllCodeTaskData, type JSExecSettings } from '@/code';
|
||||
import { ValidationError } from '@/js-task-runner/errors/validation-error';
|
||||
import {
|
||||
JsTaskRunner,
|
||||
type AllCodeTaskData,
|
||||
type JSExecSettings,
|
||||
} from '@/js-task-runner/js-task-runner';
|
||||
import type { Task } from '@/task-runner';
|
||||
import { ValidationError } from '@/validation-error';
|
||||
|
||||
import { newAllCodeTaskData, newTaskWithSettings, withPairedItem, wrapIntoJson } from './test-data';
|
||||
|
|
@ -2,7 +2,7 @@ import type { IDataObject, INode, INodeExecutionData, ITaskData } from 'n8n-work
|
|||
import { NodeConnectionType } from 'n8n-workflow';
|
||||
import { nanoid } from 'nanoid';
|
||||
|
||||
import type { AllCodeTaskData, JSExecSettings } from '@/code';
|
||||
import type { AllCodeTaskData, JSExecSettings } from '@/js-task-runner/js-task-runner';
|
||||
import type { Task } from '@/task-runner';
|
||||
|
||||
/**
|
|
@ -21,10 +21,10 @@ import type {
|
|||
import * as a from 'node:assert';
|
||||
import { runInNewContext, type Context } from 'node:vm';
|
||||
|
||||
import { validateRunForAllItemsOutput, validateRunForEachItemOutput } from '@/result-validation';
|
||||
import type { TaskResultData } from '@/runner-types';
|
||||
import { type Task, TaskRunner } from '@/task-runner';
|
||||
|
||||
import type { TaskResultData } from './runner-types';
|
||||
import { type Task, TaskRunner } from './task-runner';
|
||||
import { validateRunForAllItemsOutput, validateRunForEachItemOutput } from './result-validation';
|
||||
|
||||
export interface JSExecSettings {
|
||||
code: string;
|
|
@ -1,8 +1,8 @@
|
|||
import { normalizeItems } from 'n8n-core';
|
||||
import type { INodeExecutionData } from 'n8n-workflow';
|
||||
|
||||
import { isObject } from '@/obj-utils';
|
||||
import { ValidationError } from '@/validation-error';
|
||||
import { ValidationError } from './errors/validation-error';
|
||||
import { isObject } from './obj-utils';
|
||||
|
||||
export const REQUIRED_N8N_ITEM_KEYS = new Set(['json', 'binary', 'pairedItem', 'error']);
|
||||
|
|
@ -2,7 +2,7 @@ import { ApplicationError, ensureError } from 'n8n-workflow';
|
|||
import * as a from 'node:assert/strict';
|
||||
|
||||
import { authenticate } from './authenticator';
|
||||
import { JsTaskRunner } from './code';
|
||||
import { JsTaskRunner } from './js-task-runner/js-task-runner';
|
||||
|
||||
let runner: JsTaskRunner | undefined;
|
||||
let isShuttingDown = false;
|
||||
|
|
Loading…
Reference in a new issue