diff --git a/src/annotations/annotations.ts b/src/annotations/annotations.ts index 5e0072e..fcc1378 100644 --- a/src/annotations/annotations.ts +++ b/src/annotations/annotations.ts @@ -13,7 +13,7 @@ import { import { HeatmapLocations } from '../config'; import { Config, configuration } from '../configuration'; import { Colors, GlyphChars } from '../constants'; -import { CommitFormatOptions, CommitFormatter } from '../git/formatters'; +import { CommitFormatOptions, CommitFormatter } from '../git/formatters/commitFormatter'; import type { GitCommit } from '../git/models/commit'; import { getWidth, interpolate, pad } from '../system/string'; import { toRgba } from '../webviews/apps/shared/colors'; diff --git a/src/annotations/gutterBlameAnnotationProvider.ts b/src/annotations/gutterBlameAnnotationProvider.ts index 190517b..edbf198 100644 --- a/src/annotations/gutterBlameAnnotationProvider.ts +++ b/src/annotations/gutterBlameAnnotationProvider.ts @@ -2,7 +2,7 @@ import { DecorationOptions, Range, TextEditor, ThemableDecorationAttachmentRende import { configuration, FileAnnotationType, GravatarDefaultStyle } from '../configuration'; import { GlyphChars } from '../constants'; import type { Container } from '../container'; -import { CommitFormatOptions, CommitFormatter } from '../git/formatters'; +import { CommitFormatOptions, CommitFormatter } from '../git/formatters/commitFormatter'; import type { GitBlame } from '../git/models/blame'; import type { GitCommit } from '../git/models/commit'; import { Logger } from '../logger'; diff --git a/src/annotations/lineAnnotationController.ts b/src/annotations/lineAnnotationController.ts index 109a6c1..b7cc0d1 100644 --- a/src/annotations/lineAnnotationController.ts +++ b/src/annotations/lineAnnotationController.ts @@ -13,7 +13,7 @@ import { import { configuration } from '../configuration'; import { GlyphChars } from '../constants'; import type { Container } from '../container'; -import { CommitFormatter } from '../git/formatters'; +import { CommitFormatter } from '../git/formatters/commitFormatter'; import type { GitCommit } from '../git/models/commit'; import type { PullRequest } from '../git/models/pullRequest'; import { Authentication } from '../git/remotes/provider'; diff --git a/src/commands/base.ts b/src/commands/base.ts index a6664a5..cf94369 100644 --- a/src/commands/base.ts +++ b/src/commands/base.ts @@ -20,7 +20,7 @@ import type { GitReference } from '../git/models/reference'; import { GitRemote } from '../git/models/remote'; import { Repository } from '../git/models/repository'; import { GitTag } from '../git/models/tag'; -import { ViewNode, ViewRefNode } from '../views/nodes'; +import { ViewNode, ViewRefNode } from '../views/nodes/viewNode'; export function getCommandUri(uri?: Uri, editor?: TextEditor): Uri | undefined { // Always use the editor.uri (if we have one), so we are correct for a split diff diff --git a/src/commands/git/search.ts b/src/commands/git/search.ts index cb63c90..f627afa 100644 --- a/src/commands/git/search.ts +++ b/src/commands/git/search.ts @@ -8,7 +8,7 @@ import type { Repository } from '../../git/models/repository'; import { searchOperators, SearchOperators, SearchPattern } from '../../git/search'; import { ActionQuickPickItem, QuickPickItemOfT } from '../../quickpicks/items/common'; import { pluralize } from '../../system/string'; -import { SearchResultsNode } from '../../views/nodes'; +import { SearchResultsNode } from '../../views/nodes/searchResultsNode'; import type { ViewsWithRepositoryFolders } from '../../views/viewBase'; import { GitActions } from '../gitCommands.actions'; import { getSteps } from '../gitCommands.utils'; diff --git a/src/commands/openComparisonOnRemote.ts b/src/commands/openComparisonOnRemote.ts index 9d1f8a8..edbcbba 100644 --- a/src/commands/openComparisonOnRemote.ts +++ b/src/commands/openComparisonOnRemote.ts @@ -4,7 +4,7 @@ import type { Container } from '../container'; import { RemoteResourceType } from '../git/remotes/provider'; import { Logger } from '../logger'; import { command, executeCommand } from '../system/command'; -import { ResultsCommitsNode } from '../views/nodes'; +import { ResultsCommitsNode } from '../views/nodes/resultsCommitsNode'; import { Command, CommandContext } from './base'; import { OpenOnRemoteCommandArgs } from './openOnRemote'; diff --git a/src/commands/openDirectoryCompare.ts b/src/commands/openDirectoryCompare.ts index aa078a0..350e064 100644 --- a/src/commands/openDirectoryCompare.ts +++ b/src/commands/openDirectoryCompare.ts @@ -7,7 +7,7 @@ import { Messages } from '../messages'; import { ReferencePicker } from '../quickpicks/referencePicker'; import { RepositoryPicker } from '../quickpicks/repositoryPicker'; import { command } from '../system/command'; -import { CompareResultsNode } from '../views/nodes'; +import { CompareResultsNode } from '../views/nodes/compareResultsNode'; import { ActiveEditorCommand, CommandContext, getCommandUri, isCommandContextViewNodeHasRef } from './base'; export interface OpenDirectoryCompareCommandArgs { diff --git a/src/commands/openFileOnRemote.ts b/src/commands/openFileOnRemote.ts index 1696b10..28a6a5d 100644 --- a/src/commands/openFileOnRemote.ts +++ b/src/commands/openFileOnRemote.ts @@ -11,7 +11,7 @@ import { Logger } from '../logger'; import { ReferencePicker } from '../quickpicks/referencePicker'; import { command, executeCommand } from '../system/command'; import { pad, splitSingle } from '../system/string'; -import { StatusFileNode } from '../views/nodes'; +import { StatusFileNode } from '../views/nodes/statusFileNode'; import { ActiveEditorCommand, CommandContext, diff --git a/src/commands/openPullRequestOnRemote.ts b/src/commands/openPullRequestOnRemote.ts index bd99df1..7771602 100644 --- a/src/commands/openPullRequestOnRemote.ts +++ b/src/commands/openPullRequestOnRemote.ts @@ -2,7 +2,7 @@ import { env, Uri } from 'vscode'; import { Commands } from '../constants'; import type { Container } from '../container'; import { command } from '../system/command'; -import { PullRequestNode } from '../views/nodes'; +import { PullRequestNode } from '../views/nodes/pullRequestNode'; import { Command, CommandContext } from './base'; export interface OpenPullRequestOnRemoteCommandArgs { diff --git a/src/commands/searchCommits.ts b/src/commands/searchCommits.ts index 66b679b..593eca7 100644 --- a/src/commands/searchCommits.ts +++ b/src/commands/searchCommits.ts @@ -4,7 +4,7 @@ import { Commands } from '../constants'; import type { Container } from '../container'; import { SearchPattern } from '../git/search'; import { command } from '../system/command'; -import { SearchResultsNode } from '../views/nodes'; +import { SearchResultsNode } from '../views/nodes/searchResultsNode'; import { Command, CommandContext, isCommandContextViewNodeHasRepository } from './base'; export interface SearchCommitsCommandArgs { diff --git a/src/env/node/git/git.ts b/src/env/node/git/git.ts index 8e505b0..2f8b782 100644 --- a/src/env/node/git/git.ts +++ b/src/env/node/git/git.ts @@ -6,7 +6,10 @@ import { GitCommandOptions, GitErrorHandling } from '../../../git/commandOptions import type { GitDiffFilter } from '../../../git/models/diff'; import { GitRevision } from '../../../git/models/reference'; import type { GitUser } from '../../../git/models/user'; -import { GitBranchParser, GitLogParser, GitReflogParser, GitTagParser } from '../../../git/parsers'; +import { GitBranchParser } from '../../../git/parsers/branchParser'; +import { GitLogParser } from '../../../git/parsers/logParser'; +import { GitReflogParser } from '../../../git/parsers/reflogParser'; +import { GitTagParser } from '../../../git/parsers/tagParser'; import { Logger } from '../../../logger'; import { dirname, isAbsolute, isFolderGlob, joinPaths, normalizePath, splitPath } from '../../../system/path'; import { getDurationMilliseconds } from '../../../system/string'; diff --git a/src/env/node/git/localGitProvider.ts b/src/env/node/git/localGitProvider.ts index 15d63d5..8a7a9ec 100644 --- a/src/env/node/git/localGitProvider.ts +++ b/src/env/node/git/localGitProvider.ts @@ -77,19 +77,16 @@ import { GitTag, TagSortOptions } from '../../../git/models/tag'; import type { GitTreeEntry } from '../../../git/models/tree'; import { GitUser, isUserMatch } from '../../../git/models/user'; import type { GitWorktree } from '../../../git/models/worktree'; -import { - GitBlameParser, - GitBranchParser, - GitDiffParser, - GitLogParser, - GitReflogParser, - GitRemoteParser, - GitStatusParser, - GitTagParser, - GitTreeParser, - GitWorktreeParser, - LogType, -} from '../../../git/parsers'; +import { GitBlameParser } from '../../../git/parsers/blameParser'; +import { GitBranchParser } from '../../../git/parsers/branchParser'; +import { GitDiffParser } from '../../../git/parsers/diffParser'; +import { GitLogParser, LogType } from '../../../git/parsers/logParser'; +import { GitReflogParser } from '../../../git/parsers/reflogParser'; +import { GitRemoteParser } from '../../../git/parsers/remoteParser'; +import { GitStatusParser } from '../../../git/parsers/statusParser'; +import { GitTagParser } from '../../../git/parsers/tagParser'; +import { GitTreeParser } from '../../../git/parsers/treeParser'; +import { GitWorktreeParser } from '../../../git/parsers/worktreeParser'; import { RemoteProviderFactory, RemoteProviders } from '../../../git/remotes/factory'; import { RemoteProvider, RemoteResourceType, RichRemoteProvider } from '../../../git/remotes/provider'; import { SearchPattern } from '../../../git/search'; diff --git a/src/extension.ts b/src/extension.ts index 8a489c2..51a41e9 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -19,7 +19,7 @@ import { setDefaultDateLocales } from './system/date'; import { once } from './system/event'; import { Stopwatch } from './system/stopwatch'; import { compare, satisfies } from './system/version'; -import { ViewNode } from './views/nodes'; +import { ViewNode } from './views/nodes/viewNode'; export async function activate(context: ExtensionContext): Promise { const gitlensVersion = context.extension.packageJSON.version; diff --git a/src/git/formatters.ts b/src/git/formatters.ts deleted file mode 100644 index 6bd12c5..0000000 --- a/src/git/formatters.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './formatters/commitFormatter'; -export * from './formatters/statusFormatter'; diff --git a/src/git/parsers.ts b/src/git/parsers.ts deleted file mode 100644 index 28a0a8c..0000000 --- a/src/git/parsers.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from './parsers/blameParser'; -export * from './parsers/branchParser'; -export * from './parsers/diffParser'; -export * from './parsers/logParser'; -export * from './parsers/reflogParser'; -export * from './parsers/remoteParser'; -export * from './parsers/statusParser'; -export * from './parsers/tagParser'; -export * from './parsers/treeParser'; -export * from './parsers/worktreeParser'; diff --git a/src/hovers/hovers.ts b/src/hovers/hovers.ts index 18440cf..e57734a 100644 --- a/src/hovers/hovers.ts +++ b/src/hovers/hovers.ts @@ -4,7 +4,7 @@ import { DiffWithCommand, ShowQuickCommitCommand } from '../commands'; import { configuration } from '../configuration'; import { GlyphChars } from '../constants'; import { Container } from '../container'; -import { CommitFormatter } from '../git/formatters'; +import { CommitFormatter } from '../git/formatters/commitFormatter'; import { GitUri } from '../git/gitUri'; import type { GitCommit } from '../git/models/commit'; import type { GitDiffHunk, GitDiffHunkLine } from '../git/models/diff'; diff --git a/src/quickpicks/items/commits.ts b/src/quickpicks/items/commits.ts index 772038c..5a68b57 100644 --- a/src/quickpicks/items/commits.ts +++ b/src/quickpicks/items/commits.ts @@ -4,7 +4,7 @@ import type { OpenChangedFilesCommandArgs } from '../../commands/openChangedFile import { QuickCommandButtons } from '../../commands/quickCommand.buttons'; import { Commands, GlyphChars } from '../../constants'; import { Container } from '../../container'; -import { CommitFormatter } from '../../git/formatters'; +import { CommitFormatter } from '../../git/formatters/commitFormatter'; import { GitCommit } from '../../git/models/commit'; import { GitFile, GitFileChange } from '../../git/models/file'; import type { GitStatusFile } from '../../git/models/status'; diff --git a/src/statusbar/statusBarController.ts b/src/statusbar/statusBarController.ts index 9cd2509..468d0e2 100644 --- a/src/statusbar/statusBarController.ts +++ b/src/statusbar/statusBarController.ts @@ -14,7 +14,7 @@ import type { ToggleFileChangesAnnotationCommandArgs } from '../commands/toggleF import { configuration, FileAnnotationType, StatusBarCommand } from '../configuration'; import { Commands, GlyphChars } from '../constants'; import type { Container } from '../container'; -import { CommitFormatter } from '../git/formatters'; +import { CommitFormatter } from '../git/formatters/commitFormatter'; import type { GitCommit } from '../git/models/commit'; import type { PullRequest } from '../git/models/pullRequest'; import { Hovers } from '../hovers/hovers'; diff --git a/src/views/branchesView.ts b/src/views/branchesView.ts index c9cbc4d..fa837d0 100644 --- a/src/views/branchesView.ts +++ b/src/views/branchesView.ts @@ -23,15 +23,11 @@ import { GitBranchReference, GitReference, GitRevisionReference } from '../git/m import { RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../git/models/repository'; import { executeCommand } from '../system/command'; import { gate } from '../system/decorators/gate'; -import { - BranchesNode, - BranchNode, - BranchOrTagFolderNode, - RepositoriesSubscribeableNode, - RepositoryFolderNode, - RepositoryNode, - ViewNode, -} from './nodes'; +import { BranchesNode } from './nodes/branchesNode'; +import { BranchNode } from './nodes/branchNode'; +import { BranchOrTagFolderNode } from './nodes/branchOrTagFolderNode'; +import { RepositoryNode } from './nodes/repositoryNode'; +import { RepositoriesSubscribeableNode, RepositoryFolderNode, ViewNode } from './nodes/viewNode'; import { ViewBase } from './viewBase'; export class BranchesRepositoryNode extends RepositoryFolderNode { diff --git a/src/views/commitsView.ts b/src/views/commitsView.ts index 86a5c8d..9fa49c8 100644 --- a/src/views/commitsView.ts +++ b/src/views/commitsView.ts @@ -25,14 +25,10 @@ import { executeCommand } from '../system/command'; import { gate } from '../system/decorators/gate'; import { debug } from '../system/decorators/log'; import { disposableInterval } from '../system/function'; -import { - BranchNode, - BranchTrackingStatusNode, - RepositoriesSubscribeableNode, - RepositoryFolderNode, - RepositoryNode, - ViewNode, -} from './nodes'; +import { BranchNode } from './nodes/branchNode'; +import { BranchTrackingStatusNode } from './nodes/branchTrackingStatusNode'; +import { RepositoryNode } from './nodes/repositoryNode'; +import { RepositoriesSubscribeableNode, RepositoryFolderNode, ViewNode } from './nodes/viewNode'; import { ViewBase } from './viewBase'; export class CommitsRepositoryNode extends RepositoryFolderNode { diff --git a/src/views/contributorsView.ts b/src/views/contributorsView.ts index eaa9186..c68a4c1 100644 --- a/src/views/contributorsView.ts +++ b/src/views/contributorsView.ts @@ -18,14 +18,10 @@ import { RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent import { executeCommand } from '../system/command'; import { gate } from '../system/decorators/gate'; import { debug } from '../system/decorators/log'; -import { - ContributorNode, - ContributorsNode, - RepositoriesSubscribeableNode, - RepositoryFolderNode, - RepositoryNode, - ViewNode, -} from './nodes'; +import { ContributorNode } from './nodes/contributorNode'; +import { ContributorsNode } from './nodes/contributorsNode'; +import { RepositoryNode } from './nodes/repositoryNode'; +import { RepositoriesSubscribeableNode, RepositoryFolderNode, ViewNode } from './nodes/viewNode'; import { ViewBase } from './viewBase'; export class ContributorsRepositoryNode extends RepositoryFolderNode { diff --git a/src/views/fileHistoryView.ts b/src/views/fileHistoryView.ts index 9337c58..ab658df 100644 --- a/src/views/fileHistoryView.ts +++ b/src/views/fileHistoryView.ts @@ -5,7 +5,8 @@ import { Container } from '../container'; import { setContext } from '../context'; import { GitUri } from '../git/gitUri'; import { executeCommand } from '../system/command'; -import { FileHistoryTrackerNode, LineHistoryTrackerNode } from './nodes'; +import { FileHistoryTrackerNode } from './nodes/fileHistoryTrackerNode'; +import { LineHistoryTrackerNode } from './nodes/lineHistoryTrackerNode'; import { ViewBase } from './viewBase'; const pinnedSuffix = ' (pinned)'; diff --git a/src/views/lineHistoryView.ts b/src/views/lineHistoryView.ts index 54ca5b2..6501b7e 100644 --- a/src/views/lineHistoryView.ts +++ b/src/views/lineHistoryView.ts @@ -4,7 +4,7 @@ import { Commands, ContextKeys } from '../constants'; import { Container } from '../container'; import { setContext } from '../context'; import { executeCommand } from '../system/command'; -import { LineHistoryTrackerNode } from './nodes'; +import { LineHistoryTrackerNode } from './nodes/lineHistoryTrackerNode'; import { ViewBase } from './viewBase'; const pinnedSuffix = ' (pinned)'; diff --git a/src/views/nodes.ts b/src/views/nodes.ts deleted file mode 100644 index cad7ac1..0000000 --- a/src/views/nodes.ts +++ /dev/null @@ -1,46 +0,0 @@ -export * from './nodes/common'; - -export * from './nodes/viewNode'; -export * from './nodes/branchesNode'; -export * from './nodes/branchNode'; -export * from './nodes/branchOrTagFolderNode'; -export * from './nodes/branchTrackingStatusFilesNode'; -export * from './nodes/branchTrackingStatusNode'; -export * from './nodes/commitFileNode'; -export * from './nodes/commitNode'; -export * from './nodes/compareBranchNode'; -export * from './nodes/comparePickerNode'; -export * from './nodes/compareResultsNode'; -export * from './nodes/contributorNode'; -export * from './nodes/contributorsNode'; -export * from './nodes/fileHistoryNode'; -export * from './nodes/fileHistoryTrackerNode'; -export * from './nodes/fileRevisionAsCommitNode'; -export * from './nodes/folderNode'; -export * from './nodes/lineHistoryNode'; -export * from './nodes/lineHistoryTrackerNode'; -export * from './nodes/mergeConflictFileNode'; -export * from './nodes/mergeConflictCurrentChangesNode'; -export * from './nodes/mergeConflictIncomingChangesNode'; -export * from './nodes/mergeStatusNode'; -export * from './nodes/pullRequestNode'; -export * from './nodes/rebaseStatusNode'; -export * from './nodes/reflogNode'; -export * from './nodes/reflogRecordNode'; -export * from './nodes/remoteNode'; -export * from './nodes/remotesNode'; -export * from './nodes/repositoriesNode'; -export * from './nodes/repositoryNode'; -export * from './nodes/resultsCommitsNode'; -export * from './nodes/resultsFileNode'; -export * from './nodes/resultsFilesNode'; -export * from './nodes/searchResultsNode'; -export * from './nodes/stashesNode'; -export * from './nodes/stashFileNode'; -export * from './nodes/stashNode'; -export * from './nodes/statusFileNode'; -export * from './nodes/statusFilesNode'; -export * from './nodes/tagsNode'; -export * from './nodes/tagNode'; -export * from './nodes/worktreeNode'; -export * from './nodes/worktreesNode'; diff --git a/src/views/nodes/UncommittedFileNode.ts b/src/views/nodes/UncommittedFileNode.ts index e0f17d0..b13f06c 100644 --- a/src/views/nodes/UncommittedFileNode.ts +++ b/src/views/nodes/UncommittedFileNode.ts @@ -1,7 +1,7 @@ import { Command, TreeItem, TreeItemCollapsibleState } from 'vscode'; import type { DiffWithPreviousCommandArgs } from '../../commands'; import { Commands } from '../../constants'; -import { StatusFileFormatter } from '../../git/formatters'; +import { StatusFileFormatter } from '../../git/formatters/statusFormatter'; import { GitUri } from '../../git/gitUri'; import { GitFile } from '../../git/models/file'; import { dirname, joinPaths } from '../../system/path'; diff --git a/src/views/nodes/commitFileNode.ts b/src/views/nodes/commitFileNode.ts index 34db808..874541c 100644 --- a/src/views/nodes/commitFileNode.ts +++ b/src/views/nodes/commitFileNode.ts @@ -1,7 +1,7 @@ import { Command, MarkdownString, Selection, TreeItem, TreeItemCollapsibleState, Uri } from 'vscode'; import type { DiffWithPreviousCommandArgs } from '../../commands'; import { Commands } from '../../constants'; -import { StatusFileFormatter } from '../../git/formatters'; +import { StatusFileFormatter } from '../../git/formatters/statusFormatter'; import { GitUri } from '../../git/gitUri'; import type { GitBranch } from '../../git/models/branch'; import type { GitCommit } from '../../git/models/commit'; diff --git a/src/views/nodes/commitNode.ts b/src/views/nodes/commitNode.ts index 0918e31..f124cb5 100644 --- a/src/views/nodes/commitNode.ts +++ b/src/views/nodes/commitNode.ts @@ -2,7 +2,7 @@ import { Command, MarkdownString, ThemeColor, ThemeIcon, TreeItem, TreeItemColla import type { DiffWithPreviousCommandArgs } from '../../commands'; import { configuration, ViewFilesLayout } from '../../configuration'; import { Colors, Commands } from '../../constants'; -import { CommitFormatter } from '../../git/formatters'; +import { CommitFormatter } from '../../git/formatters/commitFormatter'; import type { GitBranch } from '../../git/models/branch'; import type { GitCommit } from '../../git/models/commit'; import type { PullRequest } from '../../git/models/pullRequest'; diff --git a/src/views/nodes/fileRevisionAsCommitNode.ts b/src/views/nodes/fileRevisionAsCommitNode.ts index 8f1713f..4bc2f33 100644 --- a/src/views/nodes/fileRevisionAsCommitNode.ts +++ b/src/views/nodes/fileRevisionAsCommitNode.ts @@ -11,7 +11,8 @@ import { import type { DiffWithPreviousCommandArgs } from '../../commands'; import { configuration } from '../../configuration'; import { Colors, Commands } from '../../constants'; -import { CommitFormatter, StatusFileFormatter } from '../../git/formatters'; +import { CommitFormatter } from '../../git/formatters/commitFormatter'; +import { StatusFileFormatter } from '../../git/formatters/statusFormatter'; import { GitUri } from '../../git/gitUri'; import type { GitBranch } from '../../git/models/branch'; import type { GitCommit } from '../../git/models/commit'; diff --git a/src/views/nodes/mergeConflictCurrentChangesNode.ts b/src/views/nodes/mergeConflictCurrentChangesNode.ts index fcd3bfb..5928de9 100644 --- a/src/views/nodes/mergeConflictCurrentChangesNode.ts +++ b/src/views/nodes/mergeConflictCurrentChangesNode.ts @@ -2,7 +2,7 @@ import { Command, MarkdownString, ThemeIcon, TreeItem, TreeItemCollapsibleState import type { DiffWithCommandArgs } from '../../commands'; import { configuration } from '../../configuration'; import { Commands, CoreCommands, GlyphChars } from '../../constants'; -import { CommitFormatter } from '../../git/formatters'; +import { CommitFormatter } from '../../git/formatters/commitFormatter'; import { GitUri } from '../../git/gitUri'; import type { GitFile } from '../../git/models/file'; import type { GitMergeStatus } from '../../git/models/merge'; diff --git a/src/views/nodes/mergeConflictFileNode.ts b/src/views/nodes/mergeConflictFileNode.ts index 01171f1..9bff185 100644 --- a/src/views/nodes/mergeConflictFileNode.ts +++ b/src/views/nodes/mergeConflictFileNode.ts @@ -1,6 +1,6 @@ import { Command, MarkdownString, ThemeIcon, TreeItem, TreeItemCollapsibleState, Uri } from 'vscode'; import { CoreCommands } from '../../constants'; -import { StatusFileFormatter } from '../../git/formatters'; +import { StatusFileFormatter } from '../../git/formatters/statusFormatter'; import { GitUri } from '../../git/gitUri'; import type { GitFile } from '../../git/models/file'; import type { GitMergeStatus } from '../../git/models/merge'; diff --git a/src/views/nodes/mergeConflictIncomingChangesNode.ts b/src/views/nodes/mergeConflictIncomingChangesNode.ts index e66519a..29fa2e5 100644 --- a/src/views/nodes/mergeConflictIncomingChangesNode.ts +++ b/src/views/nodes/mergeConflictIncomingChangesNode.ts @@ -2,7 +2,7 @@ import { Command, MarkdownString, ThemeIcon, TreeItem, TreeItemCollapsibleState import type { DiffWithCommandArgs } from '../../commands'; import { configuration } from '../../configuration'; import { Commands, CoreCommands, GlyphChars } from '../../constants'; -import { CommitFormatter } from '../../git/formatters'; +import { CommitFormatter } from '../../git/formatters/commitFormatter'; import { GitUri } from '../../git/gitUri'; import type { GitFile } from '../../git/models/file'; import type { GitMergeStatus } from '../../git/models/merge'; diff --git a/src/views/nodes/rebaseStatusNode.ts b/src/views/nodes/rebaseStatusNode.ts index ee1d4c9..eb19509 100644 --- a/src/views/nodes/rebaseStatusNode.ts +++ b/src/views/nodes/rebaseStatusNode.ts @@ -2,7 +2,7 @@ import { Command, MarkdownString, ThemeColor, ThemeIcon, TreeItem, TreeItemColla import type { DiffWithPreviousCommandArgs } from '../../commands'; import { configuration, ViewFilesLayout } from '../../configuration'; import { Commands, CoreCommands } from '../../constants'; -import { CommitFormatter } from '../../git/formatters'; +import { CommitFormatter } from '../../git/formatters/commitFormatter'; import { GitUri } from '../../git/gitUri'; import type { GitBranch } from '../../git/models/branch'; import type { GitCommit } from '../../git/models/commit'; diff --git a/src/views/nodes/resultsFileNode.ts b/src/views/nodes/resultsFileNode.ts index 84d69e9..9d328f5 100644 --- a/src/views/nodes/resultsFileNode.ts +++ b/src/views/nodes/resultsFileNode.ts @@ -1,7 +1,7 @@ import { Command, TreeItem, TreeItemCollapsibleState } from 'vscode'; import type { DiffWithCommandArgs } from '../../commands'; import { Commands } from '../../constants'; -import { StatusFileFormatter } from '../../git/formatters'; +import { StatusFileFormatter } from '../../git/formatters/statusFormatter'; import { GitUri } from '../../git/gitUri'; import { GitFile } from '../../git/models/file'; import { GitReference, GitRevisionReference } from '../../git/models/reference'; diff --git a/src/views/nodes/stashNode.ts b/src/views/nodes/stashNode.ts index f7ec01e..4f9fa4e 100644 --- a/src/views/nodes/stashNode.ts +++ b/src/views/nodes/stashNode.ts @@ -1,15 +1,18 @@ import { TreeItem, TreeItemCollapsibleState } from 'vscode'; import { ViewFilesLayout } from '../../config'; import { configuration } from '../../configuration'; -import { CommitFormatter } from '../../git/formatters'; +import { CommitFormatter } from '../../git/formatters/commitFormatter'; import type { GitStashCommit } from '../../git/models/commit'; import type { GitStashReference } from '../../git/models/reference'; import { makeHierarchical } from '../../system/array'; import { joinPaths, normalizePath } from '../../system/path'; import { sortCompare } from '../../system/string'; -import { ContextValues, FileNode, FolderNode, RepositoryNode, StashFileNode, ViewNode, ViewRefNode } from '../nodes'; import type { RepositoriesView } from '../repositoriesView'; import type { StashesView } from '../stashesView'; +import { FileNode, FolderNode } from './folderNode'; +import { RepositoryNode } from './repositoryNode'; +import { StashFileNode } from './stashFileNode'; +import { ContextValues, ViewNode, ViewRefNode } from './viewNode'; export class StashNode extends ViewRefNode { static key = ':stash'; diff --git a/src/views/remotesView.ts b/src/views/remotesView.ts index 5bdae6d..ecfdb53 100644 --- a/src/views/remotesView.ts +++ b/src/views/remotesView.ts @@ -19,16 +19,12 @@ import type { GitRemote } from '../git/models/remote'; import { RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../git/models/repository'; import { executeCommand } from '../system/command'; import { gate } from '../system/decorators/gate'; -import { - BranchNode, - BranchOrTagFolderNode, - RemoteNode, - RemotesNode, - RepositoriesSubscribeableNode, - RepositoryFolderNode, - RepositoryNode, - ViewNode, -} from './nodes'; +import { BranchNode } from './nodes/branchNode'; +import { BranchOrTagFolderNode } from './nodes/branchOrTagFolderNode'; +import { RemoteNode } from './nodes/remoteNode'; +import { RemotesNode } from './nodes/remotesNode'; +import { RepositoryNode } from './nodes/repositoryNode'; +import { RepositoriesSubscribeableNode, RepositoryFolderNode, ViewNode } from './nodes/viewNode'; import { ViewBase } from './viewBase'; export class RemotesRepositoryNode extends RepositoryFolderNode { diff --git a/src/views/repositoriesView.ts b/src/views/repositoriesView.ts index 3aa671b..70d1038 100644 --- a/src/views/repositoriesView.ts +++ b/src/views/repositoriesView.ts @@ -33,25 +33,23 @@ import type { GitWorktree } from '../git/models/worktree'; import { WorkspaceStorageKeys } from '../storage'; import { executeCommand } from '../system/command'; import { gate } from '../system/decorators/gate'; -import { - BranchesNode, - BranchNode, - BranchOrTagFolderNode, - BranchTrackingStatusNode, - CompareBranchNode, - ContributorNode, - ContributorsNode, - ReflogNode, - RemoteNode, - RemotesNode, - RepositoriesNode, - RepositoryNode, - StashesNode, - StashNode, - TagsNode, - WorktreeNode, - WorktreesNode, -} from './nodes'; +import { BranchesNode } from './nodes/branchesNode'; +import { BranchNode } from './nodes/branchNode'; +import { BranchOrTagFolderNode } from './nodes/branchOrTagFolderNode'; +import { BranchTrackingStatusNode } from './nodes/branchTrackingStatusNode'; +import { CompareBranchNode } from './nodes/compareBranchNode'; +import { ContributorNode } from './nodes/contributorNode'; +import { ContributorsNode } from './nodes/contributorsNode'; +import { ReflogNode } from './nodes/reflogNode'; +import { RemoteNode } from './nodes/remoteNode'; +import { RemotesNode } from './nodes/remotesNode'; +import { RepositoriesNode } from './nodes/repositoriesNode'; +import { RepositoryNode } from './nodes/repositoryNode'; +import { StashesNode } from './nodes/stashesNode'; +import { StashNode } from './nodes/stashNode'; +import { TagsNode } from './nodes/tagsNode'; +import { WorktreeNode } from './nodes/worktreeNode'; +import { WorktreesNode } from './nodes/worktreesNode'; import { ViewBase } from './viewBase'; export class RepositoriesView extends ViewBase { diff --git a/src/views/searchAndCompareView.ts b/src/views/searchAndCompareView.ts index 6469095..3de04b7 100644 --- a/src/views/searchAndCompareView.ts +++ b/src/views/searchAndCompareView.ts @@ -15,16 +15,11 @@ import { executeCommand } from '../system/command'; import { gate } from '../system/decorators/gate'; import { debug, log } from '../system/decorators/log'; import { isPromise } from '../system/promise'; -import { - CompareResultsNode, - ContextValues, - FilesQueryFilter, - RepositoryFolderNode, - ResultsFilesNode, - SearchResultsNode, - ViewNode, -} from './nodes'; import { ComparePickerNode } from './nodes/comparePickerNode'; +import { CompareResultsNode } from './nodes/compareResultsNode'; +import { FilesQueryFilter, ResultsFilesNode } from './nodes/resultsFilesNode'; +import { SearchResultsNode } from './nodes/searchResultsNode'; +import { ContextValues, RepositoryFolderNode, ViewNode } from './nodes/viewNode'; import { ViewBase } from './viewBase'; interface DeprecatedPinnedComparison { diff --git a/src/views/stashesView.ts b/src/views/stashesView.ts index 4763b2f..1d11f23 100644 --- a/src/views/stashesView.ts +++ b/src/views/stashesView.ts @@ -16,14 +16,10 @@ import { GitReference, GitStashReference } from '../git/models/reference'; import { RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../git/models/repository'; import { executeCommand } from '../system/command'; import { gate } from '../system/decorators/gate'; -import { - RepositoriesSubscribeableNode, - RepositoryFolderNode, - RepositoryNode, - StashesNode, - StashNode, - ViewNode, -} from './nodes'; +import { RepositoryNode } from './nodes/repositoryNode'; +import { StashesNode } from './nodes/stashesNode'; +import { StashNode } from './nodes/stashNode'; +import { RepositoriesSubscribeableNode, RepositoryFolderNode, ViewNode } from './nodes/viewNode'; import { ViewBase } from './viewBase'; export class StashesRepositoryNode extends RepositoryFolderNode { diff --git a/src/views/tagsView.ts b/src/views/tagsView.ts index 1d9562c..a950915 100644 --- a/src/views/tagsView.ts +++ b/src/views/tagsView.ts @@ -16,14 +16,10 @@ import { GitReference, GitTagReference } from '../git/models/reference'; import { RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../git/models/repository'; import { executeCommand } from '../system/command'; import { gate } from '../system/decorators/gate'; -import { - BranchOrTagFolderNode, - RepositoriesSubscribeableNode, - RepositoryFolderNode, - RepositoryNode, - TagsNode, - ViewNode, -} from './nodes'; +import { BranchOrTagFolderNode } from './nodes/branchOrTagFolderNode'; +import { RepositoryNode } from './nodes/repositoryNode'; +import { TagsNode } from './nodes/tagsNode'; +import { RepositoriesSubscribeableNode, RepositoryFolderNode, ViewNode } from './nodes/viewNode'; import { ViewBase } from './viewBase'; export class TagsRepositoryNode extends RepositoryFolderNode { diff --git a/src/views/viewBase.ts b/src/views/viewBase.ts index e34646e..b483622 100644 --- a/src/views/viewBase.ts +++ b/src/views/viewBase.ts @@ -43,7 +43,7 @@ import { CommitsView } from './commitsView'; import { ContributorsView } from './contributorsView'; import { FileHistoryView } from './fileHistoryView'; import { LineHistoryView } from './lineHistoryView'; -import { PageableViewNode, ViewNode } from './nodes'; +import { PageableViewNode, ViewNode } from './nodes/viewNode'; import { RemotesView } from './remotesView'; import { RepositoriesView } from './repositoriesView'; import { SearchAndCompareView } from './searchAndCompareView'; diff --git a/src/views/viewCommands.ts b/src/views/viewCommands.ts index 1f37b63..02c9115 100644 --- a/src/views/viewCommands.ts +++ b/src/views/viewCommands.ts @@ -23,43 +23,43 @@ import { import { debug } from '../system/decorators/log'; import { OpenWorkspaceLocation } from '../system/utils'; import { runGitCommandInTerminal } from '../terminal'; +import { BranchesNode } from './nodes/branchesNode'; +import { BranchNode } from './nodes/branchNode'; +import { BranchTrackingStatusNode } from './nodes/branchTrackingStatusNode'; +import { CommitFileNode } from './nodes/commitFileNode'; +import { CommitNode } from './nodes/commitNode'; +import { PagerNode } from './nodes/common'; +import { CompareBranchNode } from './nodes/compareBranchNode'; +import { ContributorNode } from './nodes/contributorNode'; +import { ContributorsNode } from './nodes/contributorsNode'; +import { FileHistoryNode } from './nodes/fileHistoryNode'; +import { FileRevisionAsCommitNode } from './nodes/fileRevisionAsCommitNode'; +import { FolderNode } from './nodes/folderNode'; +import { LineHistoryNode } from './nodes/lineHistoryNode'; +import { MergeConflictFileNode } from './nodes/mergeConflictFileNode'; +import { PullRequestNode } from './nodes/pullRequestNode'; +import { RemoteNode } from './nodes/remoteNode'; +import { RemotesNode } from './nodes/remotesNode'; +import { RepositoryNode } from './nodes/repositoryNode'; +import { ResultsFileNode } from './nodes/resultsFileNode'; +import { ResultsFilesNode } from './nodes/resultsFilesNode'; +import { StashFileNode } from './nodes/stashFileNode'; +import { StashNode } from './nodes/stashNode'; +import { StatusFileNode } from './nodes/statusFileNode'; +import { TagNode } from './nodes/tagNode'; +import { TagsNode } from './nodes/tagsNode'; import { - BranchesNode, - BranchNode, - BranchTrackingStatusNode, canClearNode, canEditNode, canViewDismissNode, - CommitFileNode, - CommitNode, - CompareBranchNode, - ContributorNode, - ContributorsNode, - FileHistoryNode, - FileRevisionAsCommitNode, - FolderNode, - LineHistoryNode, - MergeConflictFileNode, PageableViewNode, - PagerNode, - PullRequestNode, - RemoteNode, - RemotesNode, RepositoryFolderNode, - RepositoryNode, - ResultsFileNode, - ResultsFilesNode, - StashFileNode, - StashNode, - StatusFileNode, - TagNode, - TagsNode, ViewNode, ViewRefFileNode, ViewRefNode, - WorktreeNode, - WorktreesNode, -} from './nodes'; +} from './nodes/viewNode'; +import { WorktreeNode } from './nodes/worktreeNode'; +import { WorktreesNode } from './nodes/worktreesNode'; interface CompareSelectedInfo { ref: string; diff --git a/src/views/worktreesView.ts b/src/views/worktreesView.ts index 2700cbe..5b21f95 100644 --- a/src/views/worktreesView.ts +++ b/src/views/worktreesView.ts @@ -20,14 +20,10 @@ import { ensurePlusFeaturesEnabled } from '../plus/subscription/utils'; import { getSubscriptionTimeRemaining, SubscriptionState } from '../subscription'; import { gate } from '../system/decorators/gate'; import { pluralize } from '../system/string'; -import { - RepositoriesSubscribeableNode, - RepositoryFolderNode, - RepositoryNode, - ViewNode, - WorktreeNode, - WorktreesNode, -} from './nodes'; +import { RepositoryNode } from './nodes/repositoryNode'; +import { RepositoriesSubscribeableNode, RepositoryFolderNode, ViewNode } from './nodes/viewNode'; +import { WorktreeNode } from './nodes/worktreeNode'; +import { WorktreesNode } from './nodes/worktreesNode'; import { ViewBase } from './viewBase'; export class WorktreesRepositoryNode extends RepositoryFolderNode { diff --git a/src/webviews/webviewWithConfigBase.ts b/src/webviews/webviewWithConfigBase.ts index f7c08f8..432969e 100644 --- a/src/webviews/webviewWithConfigBase.ts +++ b/src/webviews/webviewWithConfigBase.ts @@ -2,7 +2,7 @@ import { ConfigurationChangeEvent, ConfigurationTarget, WebviewPanelOnDidChangeV import { configuration } from '../configuration'; import { Commands } from '../constants'; import type { Container } from '../container'; -import { CommitFormatter } from '../git/formatters'; +import { CommitFormatter } from '../git/formatters/commitFormatter'; import { GitCommit, GitCommitIdentity } from '../git/models/commit'; import { GitFileChange, GitFileIndexStatus } from '../git/models/file'; import { PullRequest, PullRequestState } from '../git/models/pullRequest';