UNPKG

n8n

Version:

n8n Workflow Automation Tool

89 lines (88 loc) 4.27 kB
import type { SourceControlPreferences } from './types/sourceControlPreferences'; import { SourceControlGitService } from './sourceControlGit.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 { SourceControlImportService } from './sourceControlImport.service.ee'; import type { User } from '../../databases/entities/User'; import type { SourceControlGetStatus } from './types/sourceControlGetStatus'; import type { TagEntity } from '../../databases/entities/TagEntity'; import type { Variables } from '../../databases/entities/Variables'; import type { SourceControlWorkflowVersionId } from './types/sourceControlWorkflowVersionId'; import type { ExportableCredential } from './types/exportableCredential'; import { TagRepository } from '../../databases/repositories/tag.repository'; import { Logger } from '../../Logger'; export declare class SourceControlService { private readonly logger; private gitService; private sourceControlPreferencesService; private sourceControlExportService; private sourceControlImportService; private tagRepository; private sshKeyName; private sshFolder; private gitFolder; constructor(logger: Logger, gitService: SourceControlGitService, sourceControlPreferencesService: SourceControlPreferencesService, sourceControlExportService: SourceControlExportService, sourceControlImportService: SourceControlImportService, tagRepository: TagRepository); init(): Promise<void>; private initGitService; private sanityCheck; disconnect(options?: { keepKeyPair?: boolean; }): Promise<SourceControlPreferences>; initializeRepository(preferences: SourceControlPreferences, user: User): Promise<{ branches: string[]; currentBranch: string; }>; getBranches(): Promise<{ branches: string[]; currentBranch: string; }>; setBranch(branch: string): Promise<{ branches: string[]; currentBranch: string; }>; resetWorkfolder(): Promise<ImportResult | undefined>; pushWorkfolder(options: SourceControlPushWorkFolder): Promise<{ statusCode: number; pushResult: PushResult | undefined; statusResult: SourceControlledFile[]; }>; pullWorkfolder(options: SourceControllPullOptions): Promise<{ statusCode: number; statusResult: SourceControlledFile[]; }>; getStatus(options: SourceControlGetStatus): Promise<SourceControlledFile[] | { wfRemoteVersionIds: SourceControlWorkflowVersionId[]; wfLocalVersionIds: SourceControlWorkflowVersionId[]; wfMissingInLocal: SourceControlWorkflowVersionId[]; wfMissingInRemote: SourceControlWorkflowVersionId[]; wfModifiedInEither: SourceControlWorkflowVersionId[]; credMissingInLocal: (ExportableCredential & { filename: string; })[]; credMissingInRemote: (ExportableCredential & { filename: string; })[]; credModifiedInEither: (ExportableCredential & { filename: string; })[]; varMissingInLocal: Variables[]; varMissingInRemote: Variables[]; varModifiedInEither: Variables[]; tagsMissingInLocal: TagEntity[]; tagsMissingInRemote: TagEntity[]; tagsModifiedInEither: TagEntity[]; mappingsMissingInLocal: import("../../databases/entities/WorkflowTagMapping").WorkflowTagMapping[]; mappingsMissingInRemote: import("../../databases/entities/WorkflowTagMapping").WorkflowTagMapping[]; sourceControlledFiles: SourceControlledFile[]; }>; private getStatusWorkflows; private getStatusCredentials; private getStatusVariables; private getStatusTagsMappings; setGitUserDetails(name?: string, email?: string): Promise<void>; }