mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
refactor(editor): Apply Prettier (no-changelog) (#4920)
* ⚡ Adjust `format` script * 🔥 Remove exemption for `editor-ui` * 🎨 Prettify * 👕 Fix lint
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
EndpointRectangle,
|
||||
EndpointRectangleOptions,
|
||||
EndpointSpec,
|
||||
} from "jsplumb";
|
||||
} from 'jsplumb';
|
||||
import {
|
||||
GenericValue,
|
||||
IConnections,
|
||||
@@ -58,10 +58,10 @@ declare module 'jsplumb' {
|
||||
|
||||
interface Connection {
|
||||
__meta?: {
|
||||
sourceNodeName: string,
|
||||
sourceOutputIndex: number,
|
||||
targetNodeName: string,
|
||||
targetOutputIndex: number,
|
||||
sourceNodeName: string;
|
||||
sourceOutputIndex: number;
|
||||
targetNodeName: string;
|
||||
targetOutputIndex: number;
|
||||
};
|
||||
canvas?: HTMLElement;
|
||||
connector?: {
|
||||
@@ -72,7 +72,7 @@ declare module 'jsplumb' {
|
||||
maxX: number;
|
||||
minY: number;
|
||||
maxY: number;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// bind(event: string, (connection: Connection): void;): void; // tslint:disable-line:no-any
|
||||
@@ -90,9 +90,9 @@ declare module 'jsplumb' {
|
||||
endpoint: any; // tslint:disable-line:no-any
|
||||
elementId: string;
|
||||
__meta?: {
|
||||
nodeName: string,
|
||||
nodeId: string,
|
||||
index: number,
|
||||
nodeName: string;
|
||||
nodeId: string;
|
||||
index: number;
|
||||
totalEndpoints: number;
|
||||
};
|
||||
getUuid(): string;
|
||||
@@ -120,44 +120,57 @@ declare module 'jsplumb' {
|
||||
|
||||
// EndpointOptions from jsplumb seems incomplete and wrong so we define an own one
|
||||
export type IEndpointOptions = Omit<EndpointOptions, 'endpoint' | 'dragProxy'> & {
|
||||
endpointStyle: EndpointStyle
|
||||
endpointHoverStyle: EndpointStyle
|
||||
endpoint?: EndpointSpec | string
|
||||
dragAllowedWhenFull?: boolean
|
||||
endpointStyle: EndpointStyle;
|
||||
endpointHoverStyle: EndpointStyle;
|
||||
endpoint?: EndpointSpec | string;
|
||||
dragAllowedWhenFull?: boolean;
|
||||
dropOptions?: DropOptions & {
|
||||
tolerance: string
|
||||
tolerance: string;
|
||||
};
|
||||
dragProxy?: string | string[] | EndpointSpec | [ EndpointRectangle, EndpointRectangleOptions & { strokeWidth: number } ]
|
||||
dragProxy?:
|
||||
| string
|
||||
| string[]
|
||||
| EndpointSpec
|
||||
| [EndpointRectangle, EndpointRectangleOptions & { strokeWidth: number }];
|
||||
};
|
||||
|
||||
export type EndpointStyle = {
|
||||
width?: number
|
||||
height?: number
|
||||
fill?: string
|
||||
stroke?: string
|
||||
outlineStroke?:string
|
||||
lineWidth?: number
|
||||
hover?: boolean
|
||||
showOutputLabel?: boolean
|
||||
size?: string
|
||||
hoverMessage?: string
|
||||
width?: number;
|
||||
height?: number;
|
||||
fill?: string;
|
||||
stroke?: string;
|
||||
outlineStroke?: string;
|
||||
lineWidth?: number;
|
||||
hover?: boolean;
|
||||
showOutputLabel?: boolean;
|
||||
size?: string;
|
||||
hoverMessage?: string;
|
||||
};
|
||||
|
||||
export type IDragOptions = DragOptions & {
|
||||
grid: [number, number]
|
||||
filter: string
|
||||
grid: [number, number];
|
||||
filter: string;
|
||||
};
|
||||
|
||||
export type IJsPlumbInstance = Omit<jsPlumbInstance, 'addEndpoint' | 'draggable'> & {
|
||||
clearDragSelection: () => void
|
||||
addEndpoint(el: ElementGroupRef, params?: IEndpointOptions, referenceParams?: IEndpointOptions): Endpoint | Endpoint[]
|
||||
draggable(el: {}, options?: IDragOptions): IJsPlumbInstance
|
||||
clearDragSelection: () => void;
|
||||
addEndpoint(
|
||||
el: ElementGroupRef,
|
||||
params?: IEndpointOptions,
|
||||
referenceParams?: IEndpointOptions,
|
||||
): Endpoint | Endpoint[];
|
||||
draggable(el: {}, options?: IDragOptions): IJsPlumbInstance;
|
||||
};
|
||||
|
||||
export interface IUpdateInformation {
|
||||
name: string;
|
||||
key?: string;
|
||||
value: string | number | { [key: string]: string | number | boolean } | NodeParameterValueType | INodeParameters; // with null makes problems in NodeSettings.vue
|
||||
value:
|
||||
| string
|
||||
| number
|
||||
| { [key: string]: string | number | boolean }
|
||||
| NodeParameterValueType
|
||||
| INodeParameters; // with null makes problems in NodeSettings.vue
|
||||
node?: string;
|
||||
oldValue?: string | number;
|
||||
}
|
||||
@@ -197,9 +210,14 @@ export interface IExternalHooks {
|
||||
*/
|
||||
export interface IRestApi {
|
||||
getActiveWorkflows(): Promise<string[]>;
|
||||
getActivationError(id: string): Promise<IActivationError | undefined >;
|
||||
getActivationError(id: string): Promise<IActivationError | undefined>;
|
||||
getCurrentExecutions(filter: object): Promise<IExecutionsCurrentSummaryExtended[]>;
|
||||
getPastExecutions(filter: object, limit: number, lastId?: string | number, firstId?: string | number): Promise<IExecutionsListResponse>;
|
||||
getPastExecutions(
|
||||
filter: object,
|
||||
limit: number,
|
||||
lastId?: string | number,
|
||||
firstId?: string | number,
|
||||
): Promise<IExecutionsListResponse>;
|
||||
stopCurrentExecution(executionId: string): Promise<IExecutionsStopData>;
|
||||
makeRestApiRequest(method: string, endpoint: string, data?: any): Promise<any>; // tslint:disable-line:no-any
|
||||
getCredentialTranslation(credentialType: string): Promise<object>;
|
||||
@@ -224,7 +242,7 @@ export interface INodeTranslationHeaders {
|
||||
[key: string]: {
|
||||
displayName: string;
|
||||
description: string;
|
||||
},
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -239,7 +257,7 @@ export interface IStartRunData {
|
||||
export interface ITableData {
|
||||
columns: string[];
|
||||
data: GenericValue[][];
|
||||
hasJson: {[key: string]: boolean};
|
||||
hasJson: { [key: string]: boolean };
|
||||
}
|
||||
|
||||
export interface IVariableItemSelected {
|
||||
@@ -336,7 +354,6 @@ export interface IWorkflowsShareResponse {
|
||||
ownedBy?: Partial<IUser>;
|
||||
}
|
||||
|
||||
|
||||
// Identical or almost identical to cli.Interfaces.ts
|
||||
|
||||
export interface IActivationError {
|
||||
@@ -368,7 +385,7 @@ export interface ICredentialsBase {
|
||||
updatedAt: number | string;
|
||||
}
|
||||
|
||||
export interface ICredentialsDecryptedResponse extends ICredentialsBase, ICredentialsDecrypted{
|
||||
export interface ICredentialsDecryptedResponse extends ICredentialsBase, ICredentialsDecrypted {
|
||||
id: string;
|
||||
}
|
||||
|
||||
@@ -598,7 +615,10 @@ export type IPersonalizationSurveyAnswersV3 = {
|
||||
|
||||
export type IPersonalizationLatestVersion = IPersonalizationSurveyAnswersV3;
|
||||
|
||||
export type IPersonalizationSurveyVersions = IPersonalizationSurveyAnswersV1 | IPersonalizationSurveyAnswersV2 | IPersonalizationSurveyAnswersV3;
|
||||
export type IPersonalizationSurveyVersions =
|
||||
| IPersonalizationSurveyAnswersV1
|
||||
| IPersonalizationSurveyAnswersV2
|
||||
| IPersonalizationSurveyAnswersV3;
|
||||
|
||||
export type IRole = 'default' | 'owner' | 'member';
|
||||
|
||||
@@ -679,7 +699,7 @@ export interface ITemplatesCollection {
|
||||
id: number;
|
||||
name: string;
|
||||
nodes: ITemplatesNode[];
|
||||
workflows: Array<{id: number}>;
|
||||
workflows: Array<{ id: number }>;
|
||||
}
|
||||
|
||||
interface ITemplatesImage {
|
||||
@@ -861,7 +881,11 @@ export interface ActionCreateElement extends CreateElementBase {
|
||||
properties: IActionItemProps;
|
||||
}
|
||||
|
||||
export type INodeCreateElement = NodeCreateElement | CategoryCreateElement | SubcategoryCreateElement | ActionCreateElement;
|
||||
export type INodeCreateElement =
|
||||
| NodeCreateElement
|
||||
| CategoryCreateElement
|
||||
| SubcategoryCreateElement
|
||||
| ActionCreateElement;
|
||||
|
||||
export interface ICategoriesWithNodes {
|
||||
[category: string]: {
|
||||
@@ -946,7 +970,7 @@ export interface WorkflowsState {
|
||||
usedCredentials: Record<string, IUsedCredential>;
|
||||
workflow: IWorkflowDb;
|
||||
workflowExecutionData: IExecutionResponse | null;
|
||||
workflowExecutionPairedItemMappings: {[itemId: string]: Set<string>};
|
||||
workflowExecutionPairedItemMappings: { [itemId: string]: Set<string> };
|
||||
workflowsById: IWorkflowsMap;
|
||||
}
|
||||
|
||||
@@ -998,7 +1022,7 @@ export interface IRootState {
|
||||
oauthCallbackUrls: object;
|
||||
n8nMetadata: object;
|
||||
workflowExecutionData: IExecutionResponse | null;
|
||||
workflowExecutionPairedItemMappings: {[itemId: string]: Set<string>};
|
||||
workflowExecutionPairedItemMappings: { [itemId: string]: Set<string> };
|
||||
lastSelectedNode: string | null;
|
||||
lastSelectedNodeOutputIndex: number | null;
|
||||
nodeViewOffsetPosition: XYPosition;
|
||||
@@ -1065,7 +1089,7 @@ export interface TargetItem {
|
||||
|
||||
export interface NDVState {
|
||||
activeNodeName: string | null;
|
||||
mainPanelDimensions: {[key: string]: {[key: string]: number}};
|
||||
mainPanelDimensions: { [key: string]: { [key: string]: number } };
|
||||
sessionId: string;
|
||||
input: {
|
||||
displayMode: IRunDataDisplayMode;
|
||||
@@ -1074,21 +1098,21 @@ export interface NDVState {
|
||||
branch?: number;
|
||||
data: {
|
||||
isEmpty: boolean;
|
||||
}
|
||||
};
|
||||
};
|
||||
output: {
|
||||
branch?: number;
|
||||
displayMode: IRunDataDisplayMode;
|
||||
data: {
|
||||
isEmpty: boolean;
|
||||
}
|
||||
};
|
||||
editMode: {
|
||||
enabled: boolean;
|
||||
value: string;
|
||||
};
|
||||
};
|
||||
focusedMappableInput: string;
|
||||
mappingTelemetry: {[key: string]: string | number | boolean};
|
||||
mappingTelemetry: { [key: string]: string | number | boolean };
|
||||
hoveringItem: null | TargetItem;
|
||||
draggable: {
|
||||
isDragging: boolean;
|
||||
@@ -1099,7 +1123,6 @@ export interface NDVState {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
export interface IUiState {
|
||||
sidebarMenuCollapsed: boolean;
|
||||
modalStack: string[];
|
||||
@@ -1149,20 +1172,20 @@ export interface UIState {
|
||||
export type ILogLevel = 'info' | 'debug' | 'warn' | 'error' | 'verbose';
|
||||
|
||||
export type IFakeDoor = {
|
||||
id: FAKE_DOOR_FEATURES,
|
||||
featureName: string,
|
||||
icon?: string,
|
||||
infoText?: string,
|
||||
actionBoxTitle: string,
|
||||
actionBoxDescription: string,
|
||||
actionBoxButtonLabel?: string,
|
||||
linkURL: string,
|
||||
uiLocations: IFakeDoorLocation[],
|
||||
id: FAKE_DOOR_FEATURES;
|
||||
featureName: string;
|
||||
icon?: string;
|
||||
infoText?: string;
|
||||
actionBoxTitle: string;
|
||||
actionBoxDescription: string;
|
||||
actionBoxButtonLabel?: string;
|
||||
linkURL: string;
|
||||
uiLocations: IFakeDoorLocation[];
|
||||
};
|
||||
|
||||
export type IFakeDoorLocation = 'settings' | 'credentialsModal' | 'workflowShareModal';
|
||||
|
||||
export type INodeFilterType = "Regular" | "Trigger" | "All";
|
||||
export type INodeFilterType = 'Regular' | 'Trigger' | 'All';
|
||||
|
||||
export interface INodeCreatorState {
|
||||
itemsFilter: string;
|
||||
@@ -1191,25 +1214,25 @@ export interface INodeTypesState {
|
||||
nodeTypes: {
|
||||
[nodeType: string]: {
|
||||
[version: number]: INodeTypeDescription;
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export interface ITemplateState {
|
||||
categories: {[id: string]: ITemplatesCategory};
|
||||
collections: {[id: string]: ITemplatesCollection};
|
||||
workflows: {[id: string]: ITemplatesWorkflow};
|
||||
categories: { [id: string]: ITemplatesCategory };
|
||||
collections: { [id: string]: ITemplatesCollection };
|
||||
workflows: { [id: string]: ITemplatesWorkflow };
|
||||
workflowSearches: {
|
||||
[search: string]: {
|
||||
workflowIds: string[];
|
||||
totalWorkflows: number;
|
||||
loadingMore?: boolean;
|
||||
}
|
||||
};
|
||||
};
|
||||
collectionSearches: {
|
||||
[search: string]: {
|
||||
collectionIds: string[];
|
||||
}
|
||||
};
|
||||
};
|
||||
currentSessionId: string;
|
||||
previousSessionId: string;
|
||||
@@ -1223,7 +1246,7 @@ export interface IVersionsState {
|
||||
|
||||
export interface IUsersState {
|
||||
currentUserId: null | string;
|
||||
users: {[userId: string]: IUser};
|
||||
users: { [userId: string]: IUser };
|
||||
}
|
||||
|
||||
export interface IWorkflowsState {
|
||||
@@ -1231,7 +1254,7 @@ export interface IWorkflowsState {
|
||||
activeWorkflowExecution: IExecutionsSummary | null;
|
||||
finishedExecutionsCount: number;
|
||||
}
|
||||
export interface IWorkflowsMap {
|
||||
export interface IWorkflowsMap {
|
||||
[name: string]: IWorkflowDb;
|
||||
}
|
||||
|
||||
@@ -1308,14 +1331,14 @@ export interface IResourceLocatorResultExpanded extends INodeListSearchItems {
|
||||
}
|
||||
|
||||
export interface CurlToJSONResponse {
|
||||
"parameters.url": string;
|
||||
"parameters.authentication": string;
|
||||
"parameters.method": string;
|
||||
"parameters.sendHeaders": boolean;
|
||||
"parameters.headerParameters.parameters.0.name": string;
|
||||
"parameters.headerParameters.parameters.0.value": string;
|
||||
"parameters.sendQuery": boolean;
|
||||
"parameters.sendBody": boolean;
|
||||
'parameters.url': string;
|
||||
'parameters.authentication': string;
|
||||
'parameters.method': string;
|
||||
'parameters.sendHeaders': boolean;
|
||||
'parameters.headerParameters.parameters.0.name': string;
|
||||
'parameters.headerParameters.parameters.0.value': string;
|
||||
'parameters.sendQuery': boolean;
|
||||
'parameters.sendBody': boolean;
|
||||
}
|
||||
|
||||
export interface HistoryState {
|
||||
@@ -1340,4 +1363,4 @@ export type SchemaType =
|
||||
| 'function'
|
||||
| 'null'
|
||||
| 'undefined';
|
||||
export type Schema = { type: SchemaType, key?: string, value: string | Schema[], path: string };
|
||||
export type Schema = { type: SchemaType; key?: string; value: string | Schema[]; path: string };
|
||||
|
||||
Reference in New Issue
Block a user