Skip to content

Commit

Permalink
Merge branch 'master' into ADO2-62-new-app-layout
Browse files Browse the repository at this point in the history
* master:
  refactor(core): Standardize filename casing for environments and eventbus (no-changelog) (#10527)
  fix(editor): Fix node positions update event in new canvas (no-changelog) (#10528)
  feat(editor): Set default canvas version to version 2 on internal deployment (no-changelog) (#10514)
  feat(editor): Overhaul handle rendering to allow dragging of plus button (no-changelog) (#10512)
  • Loading branch information
MiloradFilipovic committed Aug 26, 2024
2 parents e65a379 + 96e69ad commit 3b3d4ab
Show file tree
Hide file tree
Showing 117 changed files with 883 additions and 389 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { Container } from 'typedi';
import type { StatusResult } from 'simple-git';
import type { PublicSourceControlRequest } from '../../../types';
import { globalScope } from '../../shared/middlewares/global.middleware';
import type { ImportResult } from '@/environments/sourceControl/types/importResult';
import { SourceControlService } from '@/environments/sourceControl/sourceControl.service.ee';
import { SourceControlPreferencesService } from '@/environments/sourceControl/sourceControlPreferences.service.ee';
import type { ImportResult } from '@/environments/source-control/types/import-result';
import { SourceControlService } from '@/environments/source-control/source-control.service.ee';
import { SourceControlPreferencesService } from '@/environments/source-control/source-control-preferences.service.ee';
import {
getTrackingInformationFromPullResult,
isSourceControlLicensed,
} from '@/environments/sourceControl/sourceControlHelper.ee';
} from '@/environments/source-control/source-control-helper.ee';
import { EventService } from '@/events/event.service';

export = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { VariablesService } from '@/environments/variables/variables.service.ee';
import { mockInstance } from '@test/mocking';
import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus';
import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus';
import { getBase } from '@/workflow-execute-additional-data';
import Container from 'typedi';
import { CredentialsHelper } from '@/credentials-helper';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { ActiveExecutions } from '@/active-executions';
import { ActiveWorkflowManager } from '@/active-workflow-manager';
import { Server } from '@/server';
import { EDITOR_UI_DIST_DIR, LICENSE_FEATURES } from '@/constants';
import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus';
import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus';
import { License } from '@/license';
import { OrchestrationService } from '@/services/orchestration.service';
import { OrchestrationHandlerMainService } from '@/services/orchestration/main/orchestration.handler.main.service';
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/commands/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { N8N_VERSION, inTest } from '@/constants';
import type { ICredentialsOverwrite } from '@/Interfaces';
import { CredentialsOverwrites } from '@/credentials-overwrites';
import { rawBodyReader, bodyParser } from '@/middlewares';
import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus';
import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus';
import type { RedisServicePubSubSubscriber } from '@/services/redis/RedisServicePubSubSubscriber';
import { EventMessageGeneric } from '@/eventbus/EventMessageClasses/EventMessageGeneric';
import { EventMessageGeneric } from '@/eventbus/event-message-classes/event-message-generic';
import { OrchestrationHandlerWorkerService } from '@/services/orchestration/worker/orchestration.handler.worker.service';
import { OrchestrationWorkerService } from '@/services/orchestration/worker/orchestration.worker.service';
import { ServiceUnavailableError } from '@/errors/response-errors/service-unavailable.error';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/controllers/e2e.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import config from '@/config';
import { SettingsRepository } from '@db/repositories/settings.repository';
import { UserRepository } from '@db/repositories/user.repository';
import { ActiveWorkflowManager } from '@/active-workflow-manager';
import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus';
import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus';
import { License } from '@/license';
import { LICENSE_FEATURES, LICENSE_QUOTAS, UNLIMITED_LICENSE_QUOTA, inE2ETests } from '@/constants';
import { Patch, Post, RestController } from '@/decorators';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import mock from 'jest-mock-extended/lib/Mock';
import { SourceControlExportService } from '../sourceControlExport.service.ee';
import type { SourceControlledFile } from '../types/sourceControlledFile';
import { SourceControlExportService } from '../source-control-export.service.ee';
import type { SourceControlledFile } from '../types/source-controlled-file';
import { Cipher, type InstanceSettings } from 'n8n-core';
import { SharedCredentialsRepository } from '@/databases/repositories/sharedCredentials.repository';
import { mockInstance } from '@test/mocking';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { mock } from 'jest-mock-extended';
import { SourceControlGitService } from '../sourceControlGit.service.ee';
import { SourceControlGitService } from '../source-control-git.service.ee';
import { simpleGit } from 'simple-git';

const MOCK_BRANCHES = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ import {
getTrackingInformationFromPrePushResult,
getTrackingInformationFromPullResult,
sourceControlFoldersExistCheck,
} from '@/environments/sourceControl/sourceControlHelper.ee';
} from '@/environments/source-control/source-control-helper.ee';
import { License } from '@/license';
import { SourceControlPreferencesService } from '@/environments/sourceControl/sourceControlPreferences.service.ee';
import { SourceControlPreferencesService } from '@/environments/source-control/source-control-preferences.service.ee';
import { InstanceSettings } from 'n8n-core';
import path from 'path';
import {
SOURCE_CONTROL_SSH_FOLDER,
SOURCE_CONTROL_GIT_FOLDER,
} from '@/environments/sourceControl/constants';
} from '@/environments/source-control/constants';
import { constants as fsConstants, accessSync } from 'fs';
import type { SourceControlledFile } from '@/environments/sourceControl/types/sourceControlledFile';
import type { SourceControlPreferences } from '@/environments/sourceControl/types/sourceControlPreferences';
import type { SourceControlledFile } from '@/environments/source-control/types/source-controlled-file';
import type { SourceControlPreferences } from '@/environments/source-control/types/source-control-preferences';
import { mockInstance } from '@test/mocking';

const pushResult: SourceControlledFile[] = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SourceControlGitService } from '@/environments/sourceControl/sourceControlGit.service.ee';
import { SourceControlGitService } from '@/environments/source-control/source-control-git.service.ee';
import { mock } from 'jest-mock-extended';
import type { SourceControlPreferences } from '@/environments/sourceControl/types/sourceControlPreferences';
import type { SourceControlPreferences } from '@/environments/source-control/types/source-control-preferences';
import type { User } from '@/databases/entities/User';
import type { SimpleGit } from 'simple-git';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { RequestHandler } from 'express';
import { Container } from 'typedi';
import { isSourceControlLicensed } from '../sourceControlHelper.ee';
import { SourceControlPreferencesService } from '../sourceControlPreferences.service.ee';
import { isSourceControlLicensed } from '../source-control-helper.ee';
import { SourceControlPreferencesService } from '../source-control-preferences.service.ee';

export const sourceControlLicensedAndEnabledMiddleware: RequestHandler = (_req, res, next) => {
const sourceControlPreferencesService = Container.get(SourceControlPreferencesService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ import { ApplicationError, type ICredentialDataDecryptedObject } from 'n8n-workf
import { writeFile as fsWriteFile, rm as fsRm } from 'fs/promises';
import { rmSync } from 'fs';
import { Credentials, InstanceSettings } from 'n8n-core';
import type { ExportableWorkflow } from './types/exportableWorkflow';
import type { ExportableCredential } from './types/exportableCredential';
import type { ExportResult } from './types/exportResult';
import type { ExportableWorkflow } from './types/exportable-workflow';
import type { ExportableCredential } from './types/exportable-credential';
import type { ExportResult } from './types/export-result';
import {
getCredentialExportPath,
getVariablesPath,
getWorkflowExportPath,
sourceControlFoldersExistCheck,
stringContainsExpression,
} from './sourceControlHelper.ee';
} from './source-control-helper.ee';
import type { WorkflowEntity } from '@db/entities/WorkflowEntity';
import type { SourceControlledFile } from './types/sourceControlledFile';
import type { SourceControlledFile } from './types/source-controlled-file';
import { VariablesService } from '../variables/variables.service.ee';
import { TagRepository } from '@db/repositories/tag.repository';
import { WorkflowRepository } from '@db/repositories/workflow.repository';
import { Logger } from '@/logger';
import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository';
import { SharedWorkflowRepository } from '@db/repositories/sharedWorkflow.repository';
import { WorkflowTagMappingRepository } from '@db/repositories/workflowTagMapping.repository';
import type { ResourceOwner } from './types/resourceOwner';
import type { ResourceOwner } from './types/resource-owner';

@Service()
export class SourceControlExportService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ import type {
SimpleGitOptions,
StatusResult,
} from 'simple-git';
import type { SourceControlPreferences } from './types/sourceControlPreferences';
import type { SourceControlPreferences } from './types/source-control-preferences';
import {
SOURCE_CONTROL_DEFAULT_BRANCH,
SOURCE_CONTROL_DEFAULT_EMAIL,
SOURCE_CONTROL_DEFAULT_NAME,
SOURCE_CONTROL_ORIGIN,
} from './constants';
import { sourceControlFoldersExistCheck } from './sourceControlHelper.ee';
import { sourceControlFoldersExistCheck } from './source-control-helper.ee';
import type { User } from '@db/entities/User';
import { Logger } from '@/logger';
import { ApplicationError } from 'n8n-workflow';
import { OwnershipService } from '@/services/ownership.service';
import { SourceControlPreferencesService } from './sourceControlPreferences.service.ee';
import { SourceControlPreferencesService } from './source-control-preferences.service.ee';

@Service()
export class SourceControlGitService {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { Container } from 'typedi';
import { License } from '@/license';
import { generateKeyPairSync } from 'crypto';
import type { KeyPair } from './types/keyPair';
import type { KeyPair } from './types/key-pair';
import { constants as fsConstants, mkdirSync, accessSync } from 'fs';
import {
SOURCE_CONTROL_GIT_KEY_COMMENT,
SOURCE_CONTROL_TAGS_EXPORT_FILE,
SOURCE_CONTROL_VARIABLES_EXPORT_FILE,
} from './constants';
import type { SourceControlledFile } from './types/sourceControlledFile';
import type { SourceControlledFile } from './types/source-controlled-file';
import path from 'path';
import type { KeyPairType } from './types/keyPairType';
import type { KeyPairType } from './types/key-pair-type';
import { Logger } from '@/logger';

export function stringContainsExpression(testString: string): boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { ApplicationError, jsonParse, ErrorReporterProxy as ErrorReporter } from
import { readFile as fsReadFile } from 'fs/promises';
import { Credentials, InstanceSettings } from 'n8n-core';
import type { IWorkflowToImport } from '@/Interfaces';
import type { ExportableCredential } from './types/exportableCredential';
import type { ExportableCredential } from './types/exportable-credential';
import type { Variables } from '@db/entities/Variables';
import { SharedCredentials } from '@db/entities/SharedCredentials';
import type { WorkflowTagMapping } from '@db/entities/WorkflowTagMapping';
Expand All @@ -21,9 +21,9 @@ import { ActiveWorkflowManager } from '@/active-workflow-manager';
// eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import
import { In } from '@n8n/typeorm';
import { isUniqueConstraintError } from '@/response-helper';
import type { SourceControlWorkflowVersionId } from './types/sourceControlWorkflowVersionId';
import { getCredentialExportPath, getWorkflowExportPath } from './sourceControlHelper.ee';
import type { SourceControlledFile } from './types/sourceControlledFile';
import type { SourceControlWorkflowVersionId } from './types/source-control-workflow-version-id';
import { getCredentialExportPath, getWorkflowExportPath } from './source-control-helper.ee';
import type { SourceControlledFile } from './types/source-controlled-file';
import { VariablesService } from '../variables/variables.service.ee';
import { TagRepository } from '@db/repositories/tag.repository';
import { WorkflowRepository } from '@db/repositories/workflow.repository';
Expand All @@ -35,7 +35,7 @@ import { WorkflowTagMappingRepository } from '@db/repositories/workflowTagMappin
import { VariablesRepository } from '@db/repositories/variables.repository';
import { ProjectRepository } from '@/databases/repositories/project.repository';
import type { Project } from '@/databases/entities/Project';
import type { ResourceOwner } from './types/resourceOwner';
import type { ResourceOwner } from './types/resource-owner';
import { assertNever } from '@/utils';
import { UserRepository } from '@/databases/repositories/user.repository';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { writeFile, chmod, readFile } from 'node:fs/promises';
import Container, { Service } from 'typedi';
import { SourceControlPreferences } from './types/sourceControlPreferences';
import { SourceControlPreferences } from './types/source-control-preferences';
import type { ValidationError } from 'class-validator';
import { validate } from 'class-validator';
import { rm as fsRm } from 'fs/promises';
import { generateSshKeyPair, isSourceControlLicensed } from './sourceControlHelper.ee';
import { generateSshKeyPair, isSourceControlLicensed } from './source-control-helper.ee';
import { Cipher, InstanceSettings } from 'n8n-core';
import { ApplicationError, jsonParse } from 'n8n-workflow';
import {
Expand All @@ -14,7 +14,7 @@ import {
SOURCE_CONTROL_PREFERENCES_DB_KEY,
} from './constants';
import path from 'path';
import type { KeyPairType } from './types/keyPairType';
import type { KeyPairType } from './types/key-pair-type';
import config from '@/config';
import { Logger } from '@/logger';
import { SettingsRepository } from '@db/repositories/settings.repository';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ import { Get, Post, Patch, RestController, GlobalScope } from '@/decorators';
import {
sourceControlLicensedMiddleware,
sourceControlLicensedAndEnabledMiddleware,
} from './middleware/sourceControlEnabledMiddleware.ee';
import { SourceControlService } from './sourceControl.service.ee';
} from './middleware/source-control-enabled-middleware.ee';
import { SourceControlService } from './source-control.service.ee';
import { SourceControlRequest } from './types/requests';
import { SourceControlPreferencesService } from './sourceControlPreferences.service.ee';
import type { SourceControlPreferences } from './types/sourceControlPreferences';
import type { SourceControlledFile } from './types/sourceControlledFile';
import { SourceControlPreferencesService } from './source-control-preferences.service.ee';
import type { SourceControlPreferences } from './types/source-control-preferences';
import type { SourceControlledFile } from './types/source-controlled-file';
import { SOURCE_CONTROL_DEFAULT_BRANCH } from './constants';
import type { ImportResult } from './types/importResult';
import type { ImportResult } from './types/import-result';
import { EventService } from '@/events/event.service';
import { getRepoType } from './sourceControlHelper.ee';
import { SourceControlGetStatus } from './types/sourceControlGetStatus';
import { getRepoType } from './source-control-helper.ee';
import { SourceControlGetStatus } from './types/source-control-get-status';
import { BadRequestError } from '@/errors/response-errors/bad-request.error';

@RestController('/source-control')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,29 @@ import {
getTrackingInformationFromPullResult,
getVariablesPath,
sourceControlFoldersExistCheck,
} from './sourceControlHelper.ee';
import type { SourceControlPreferences } from './types/sourceControlPreferences';
} from './source-control-helper.ee';
import type { SourceControlPreferences } from './types/source-control-preferences';
import {
SOURCE_CONTROL_DEFAULT_EMAIL,
SOURCE_CONTROL_DEFAULT_NAME,
SOURCE_CONTROL_README,
} from './constants';
import { SourceControlGitService } from './sourceControlGit.service.ee';
import { SourceControlGitService } from './source-control-git.service.ee';
import type { PushResult } from 'simple-git';
import { SourceControlExportService } from './sourceControlExport.service.ee';
import type { ImportResult } from './types/importResult';
import type { SourceControlPushWorkFolder } from './types/sourceControlPushWorkFolder';
import type { SourceControllPullOptions } from './types/sourceControlPullWorkFolder';
import type { SourceControlledFile } from './types/sourceControlledFile';
import { SourceControlPreferencesService } from './sourceControlPreferences.service.ee';
import { SourceControlExportService } from './source-control-export.service.ee';
import type { ImportResult } from './types/import-result';
import type { SourceControlPushWorkFolder } from './types/source-control-push-work-folder';
import type { SourceControllPullOptions } from './types/source-control-pull-work-folder';
import type { SourceControlledFile } from './types/source-controlled-file';
import { SourceControlPreferencesService } from './source-control-preferences.service.ee';
import { writeFileSync } from 'fs';
import { SourceControlImportService } from './sourceControlImport.service.ee';
import { SourceControlImportService } from './source-control-import.service.ee';
import type { User } from '@db/entities/User';
import type { SourceControlGetStatus } from './types/sourceControlGetStatus';
import type { SourceControlGetStatus } from './types/source-control-get-status';
import type { TagEntity } from '@db/entities/TagEntity';
import type { Variables } from '@db/entities/Variables';
import type { SourceControlWorkflowVersionId } from './types/sourceControlWorkflowVersionId';
import type { ExportableCredential } from './types/exportableCredential';
import type { SourceControlWorkflowVersionId } from './types/source-control-workflow-version-id';
import type { ExportableCredential } from './types/exportable-credential';
import { EventService } from '@/events/event.service';
import { TagRepository } from '@db/repositories/tag.repository';
import { Logger } from '@/logger';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ICredentialDataDecryptedObject } from 'n8n-workflow';
import type { ResourceOwner } from './resourceOwner';
import type { ResourceOwner } from './resource-owner';

export interface ExportableCredential {
id: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { INode, IConnections, IWorkflowSettings } from 'n8n-workflow';
import type { ResourceOwner } from './resourceOwner';
import type { ResourceOwner } from './resource-owner';

export interface ExportableWorkflow {
id: string;
Expand Down
Loading

0 comments on commit 3b3d4ab

Please sign in to comment.