From f8211797d24d18746bacdc7b597d92eff3c69800 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Fri, 5 Aug 2022 03:54:05 -0400 Subject: [PATCH] Removes git "models" export file --- src/annotations/annotations.ts | 2 +- src/annotations/autolinks.ts | 4 +- src/annotations/blameAnnotationProvider.ts | 9 ++-- src/annotations/gutterBlameAnnotationProvider.ts | 11 ++-- src/annotations/gutterChangesAnnotationProvider.ts | 7 +-- .../gutterHeatmapBlameAnnotationProvider.ts | 10 ++-- src/annotations/lineAnnotationController.ts | 7 +-- src/avatars.ts | 4 +- src/codelens/codeLensProvider.ts | 5 +- src/commands/base.ts | 21 ++++---- src/commands/createPullRequestOnRemote.ts | 4 +- src/commands/diffLineWithPrevious.ts | 4 +- src/commands/diffLineWithWorking.ts | 3 +- src/commands/diffWith.ts | 3 +- src/commands/diffWithNext.ts | 4 +- src/commands/diffWithPrevious.ts | 5 +- src/commands/diffWithRevision.ts | 6 +-- src/commands/diffWithRevisionFrom.ts | 4 +- src/commands/diffWithWorking.ts | 4 +- src/commands/externalDiff.ts | 4 +- src/commands/git/branch.ts | 7 +-- src/commands/git/cherry-pick.ts | 9 ++-- src/commands/git/coauthors.ts | 5 +- src/commands/git/fetch.ts | 7 +-- src/commands/git/log.ts | 9 ++-- src/commands/git/merge.ts | 9 ++-- src/commands/git/pull.ts | 8 +-- src/commands/git/push.ts | 8 +-- src/commands/git/rebase.ts | 9 ++-- src/commands/git/reset.ts | 9 ++-- src/commands/git/revert.ts | 9 ++-- src/commands/git/search.ts | 8 +-- src/commands/git/show.ts | 8 +-- src/commands/git/stash.ts | 10 ++-- src/commands/git/status.ts | 8 +-- src/commands/git/switch.ts | 7 +-- src/commands/git/tag.ts | 9 ++-- src/commands/git/worktree.ts | 6 ++- src/commands/gitCommands.actions.ts | 20 ++++---- src/commands/openCommitOnRemote.ts | 4 +- src/commands/openFileAtRevision.ts | 4 +- src/commands/openFileAtRevisionFrom.ts | 2 +- src/commands/openFileOnRemote.ts | 5 +- src/commands/openOnRemote.ts | 3 +- src/commands/openRevisionFile.ts | 4 +- src/commands/quickCommand.steps.ts | 27 +++++----- src/commands/remoteProviders.ts | 6 ++- src/commands/showQuickBranchHistory.ts | 2 +- src/commands/showQuickCommit.ts | 3 +- src/commands/showQuickCommitFile.ts | 3 +- src/commands/showQuickFileHistory.ts | 7 ++- src/commands/stashApply.ts | 5 +- src/env/node/git/git.ts | 6 ++- src/env/node/git/localGitProvider.ts | 54 +++++++------------ src/extension.ts | 3 +- src/git/formatters/commitFormatter.ts | 12 +++-- src/git/fsProvider.ts | 5 +- src/git/gitProvider.ts | 53 ++++++++----------- src/git/gitProviderService.ts | 57 +++++++++----------- src/git/gitUri.ts | 3 +- src/git/models.ts | 25 --------- src/git/parsers/blameParser.ts | 16 ++---- src/git/parsers/logParser.ts | 18 ++----- src/git/parsers/remoteParser.ts | 5 +- src/git/parsers/statusParser.ts | 2 +- src/git/parsers/tagParser.ts | 2 +- src/git/parsers/treeParser.ts | 2 +- src/git/remotes/bitbucket-server.ts | 6 +-- src/git/remotes/bitbucket.ts | 6 +-- src/git/remotes/gerrit.ts | 8 +-- src/git/remotes/gitea.ts | 6 +-- src/git/remotes/github.ts | 15 +++--- src/git/remotes/gitlab.ts | 17 +++--- src/git/remotes/provider.ts | 21 ++++---- src/git/search.ts | 2 +- src/hovers/hovers.ts | 6 ++- src/messages.ts | 2 +- src/plus/github/github.ts | 6 ++- src/plus/github/githubGitProvider.ts | 60 ++++++++-------------- src/plus/github/models.ts | 4 +- src/plus/gitlab/gitlab.ts | 5 +- src/plus/gitlab/models.ts | 2 +- src/plus/webviews/timeline/timelineWebview.ts | 6 ++- src/plus/webviews/timeline/timelineWebviewView.ts | 8 ++- src/quickpicks/commitPicker.ts | 4 +- src/quickpicks/items/commits.ts | 8 +-- src/quickpicks/items/gitCommands.ts | 21 ++++---- src/quickpicks/referencePicker.ts | 6 ++- src/quickpicks/remoteProviderPicker.ts | 5 +- src/quickpicks/repositoryPicker.ts | 2 +- src/statusbar/statusBarController.ts | 7 +-- src/terminal/linkProvider.ts | 8 +-- src/trackers/documentTracker.ts | 6 +-- src/trackers/gitDocumentTracker.ts | 4 +- src/trackers/gitLineTracker.ts | 6 +-- src/trackers/trackedDocument.ts | 4 +- src/views/branchesView.ts | 14 ++--- src/views/commitsView.ts | 7 ++- src/views/contributorsView.ts | 5 +- src/views/nodes/UncommittedFileNode.ts | 6 +-- src/views/nodes/UncommittedFilesNode.ts | 19 +++---- src/views/nodes/autolinkedItemNode.ts | 6 +-- src/views/nodes/autolinkedItemsNode.ts | 4 +- src/views/nodes/branchNode.ts | 16 +++--- src/views/nodes/branchTrackingStatusFilesNode.ts | 6 ++- src/views/nodes/branchTrackingStatusNode.ts | 7 ++- src/views/nodes/branchesNode.ts | 4 +- src/views/nodes/commitFileNode.ts | 9 ++-- src/views/nodes/commitNode.ts | 10 ++-- src/views/nodes/compareBranchNode.ts | 13 ++--- src/views/nodes/compareResultsNode.ts | 6 +-- src/views/nodes/contributorNode.ts | 11 ++-- src/views/nodes/contributorsNode.ts | 9 ++-- src/views/nodes/fileHistoryNode.ts | 10 ++-- src/views/nodes/fileHistoryTrackerNode.ts | 4 +- src/views/nodes/fileRevisionAsCommitNode.ts | 11 ++-- src/views/nodes/folderNode.ts | 6 +-- src/views/nodes/helpers.ts | 2 +- src/views/nodes/lineHistoryNode.ts | 15 +++--- src/views/nodes/lineHistoryTrackerNode.ts | 8 +-- src/views/nodes/mergeConflictCurrentChangesNode.ts | 11 ++-- src/views/nodes/mergeConflictFileNode.ts | 6 ++- .../nodes/mergeConflictIncomingChangesNode.ts | 11 ++-- src/views/nodes/mergeStatusNode.ts | 7 ++- src/views/nodes/pullRequestNode.ts | 6 ++- src/views/nodes/rebaseStatusNode.ts | 8 ++- src/views/nodes/reflogNode.ts | 7 +-- src/views/nodes/reflogRecordNode.ts | 5 +- src/views/nodes/remoteNode.ts | 7 +-- src/views/nodes/remotesNode.ts | 8 +-- src/views/nodes/repositoryNode.ts | 12 ++--- src/views/nodes/resultsCommitsNode.ts | 2 +- src/views/nodes/resultsFileNode.ts | 5 +- src/views/nodes/resultsFilesNode.ts | 5 +- src/views/nodes/searchResultsNode.ts | 4 +- src/views/nodes/stashFileNode.ts | 3 +- src/views/nodes/stashNode.ts | 7 +-- src/views/nodes/stashesNode.ts | 8 +-- src/views/nodes/statusFileNode.ts | 7 +-- src/views/nodes/statusFilesNode.ts | 8 ++- src/views/nodes/tagNode.ts | 10 ++-- src/views/nodes/tagsNode.ts | 6 +-- src/views/nodes/viewNode.ts | 15 +++--- src/views/nodes/worktreeNode.ts | 22 ++++---- src/views/nodes/worktreesNode.ts | 8 +-- src/views/remotesView.ts | 18 +++---- src/views/repositoriesView.ts | 14 ++--- src/views/searchAndCompareView.ts | 7 +-- src/views/stashesView.ts | 11 ++-- src/views/tagsView.ts | 11 ++-- src/views/viewCommands.ts | 2 +- src/views/viewDecorationProvider.ts | 2 +- src/views/worktreesView.ts | 5 +- .../commitDetails/commitDetailsWebviewView.ts | 4 +- src/webviews/rebase/rebaseEditor.ts | 2 +- src/webviews/webviewWithConfigBase.ts | 11 ++-- 156 files changed, 687 insertions(+), 691 deletions(-) delete mode 100644 src/git/models.ts diff --git a/src/annotations/annotations.ts b/src/annotations/annotations.ts index 427d7ce..5e0072e 100644 --- a/src/annotations/annotations.ts +++ b/src/annotations/annotations.ts @@ -14,7 +14,7 @@ import { HeatmapLocations } from '../config'; import { Config, configuration } from '../configuration'; import { Colors, GlyphChars } from '../constants'; import { CommitFormatOptions, CommitFormatter } from '../git/formatters'; -import { GitCommit } from '../git/models'; +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/autolinks.ts b/src/annotations/autolinks.ts index 6de7241..ae2db61 100644 --- a/src/annotations/autolinks.ts +++ b/src/annotations/autolinks.ts @@ -2,7 +2,9 @@ import { ConfigurationChangeEvent, Disposable } from 'vscode'; import { AutolinkReference, AutolinkType, configuration } from '../configuration'; import { GlyphChars } from '../constants'; import type { Container } from '../container'; -import { type GitRemote, IssueOrPullRequest, type RemoteProviderReference } from '../git/models'; +import { IssueOrPullRequest } from '../git/models/issue'; +import type { GitRemote } from '../git/models/remote'; +import type { RemoteProviderReference } from '../git/models/remoteProvider'; import { Logger } from '../logger'; import { fromNow } from '../system/date'; import { debug } from '../system/decorators/log'; diff --git a/src/annotations/blameAnnotationProvider.ts b/src/annotations/blameAnnotationProvider.ts index 81c517a..6a09191 100644 --- a/src/annotations/blameAnnotationProvider.ts +++ b/src/annotations/blameAnnotationProvider.ts @@ -1,12 +1,13 @@ import { CancellationToken, Disposable, Hover, languages, Position, Range, TextDocument, TextEditor } from 'vscode'; -import { FileAnnotationType } from '../config'; +import type { FileAnnotationType } from '../config'; import { configuration } from '../configuration'; -import { Container } from '../container'; +import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { GitBlame, GitCommit } from '../git/models'; +import type { GitBlame } from '../git/models/blame'; +import type { GitCommit } from '../git/models/commit'; import { Hovers } from '../hovers/hovers'; import { log } from '../system/decorators/log'; -import { GitDocumentState, TrackedDocument } from '../trackers/gitDocumentTracker'; +import type { GitDocumentState, TrackedDocument } from '../trackers/gitDocumentTracker'; import { AnnotationProviderBase } from './annotationProvider'; import { ComputedHeatmap, getHeatmapColors } from './annotations'; diff --git a/src/annotations/gutterBlameAnnotationProvider.ts b/src/annotations/gutterBlameAnnotationProvider.ts index d22eede..190517b 100644 --- a/src/annotations/gutterBlameAnnotationProvider.ts +++ b/src/annotations/gutterBlameAnnotationProvider.ts @@ -1,18 +1,19 @@ import { DecorationOptions, Range, TextEditor, ThemableDecorationAttachmentRenderOptions } from 'vscode'; import { configuration, FileAnnotationType, GravatarDefaultStyle } from '../configuration'; import { GlyphChars } from '../constants'; -import { Container } from '../container'; +import type { Container } from '../container'; import { CommitFormatOptions, CommitFormatter } from '../git/formatters'; -import { GitBlame, GitCommit } from '../git/models'; +import type { GitBlame } from '../git/models/blame'; +import type { GitCommit } from '../git/models/commit'; import { Logger } from '../logger'; import { filterMap } from '../system/array'; import { log } from '../system/decorators/log'; import { first } from '../system/iterable'; import { Stopwatch } from '../system/stopwatch'; import { getTokensFromTemplate, getWidth, TokenOptions } from '../system/string'; -import { GitDocumentState } from '../trackers/gitDocumentTracker'; -import { TrackedDocument } from '../trackers/trackedDocument'; -import { AnnotationContext } from './annotationProvider'; +import type { GitDocumentState } from '../trackers/gitDocumentTracker'; +import type { TrackedDocument } from '../trackers/trackedDocument'; +import type { AnnotationContext } from './annotationProvider'; import { Annotations } from './annotations'; import { BlameAnnotationProviderBase } from './blameAnnotationProvider'; import { Decorations } from './fileAnnotationController'; diff --git a/src/annotations/gutterChangesAnnotationProvider.ts b/src/annotations/gutterChangesAnnotationProvider.ts index 26fb474..8a32090 100644 --- a/src/annotations/gutterChangesAnnotationProvider.ts +++ b/src/annotations/gutterChangesAnnotationProvider.ts @@ -13,13 +13,14 @@ import { TextEditorRevealType, } from 'vscode'; import { configuration, FileAnnotationType } from '../configuration'; -import { Container } from '../container'; -import { GitCommit, GitDiff } from '../git/models'; +import type { Container } from '../container'; +import type { GitCommit } from '../git/models/commit'; +import type { GitDiff } from '../git/models/diff'; import { Hovers } from '../hovers/hovers'; import { Logger } from '../logger'; import { log } from '../system/decorators/log'; import { Stopwatch } from '../system/stopwatch'; -import { GitDocumentState, TrackedDocument } from '../trackers/gitDocumentTracker'; +import type { GitDocumentState, TrackedDocument } from '../trackers/gitDocumentTracker'; import { AnnotationContext, AnnotationProviderBase } from './annotationProvider'; import { Decorations } from './fileAnnotationController'; diff --git a/src/annotations/gutterHeatmapBlameAnnotationProvider.ts b/src/annotations/gutterHeatmapBlameAnnotationProvider.ts index 9b05381..a2dfabd 100644 --- a/src/annotations/gutterHeatmapBlameAnnotationProvider.ts +++ b/src/annotations/gutterHeatmapBlameAnnotationProvider.ts @@ -1,13 +1,13 @@ import { Range, TextEditor, TextEditorDecorationType } from 'vscode'; import { FileAnnotationType } from '../configuration'; -import { Container } from '../container'; -import { GitCommit } from '../git/models'; +import type { Container } from '../container'; +import type { GitCommit } from '../git/models/commit'; import { Logger } from '../logger'; import { log } from '../system/decorators/log'; import { Stopwatch } from '../system/stopwatch'; -import { GitDocumentState } from '../trackers/gitDocumentTracker'; -import { TrackedDocument } from '../trackers/trackedDocument'; -import { AnnotationContext } from './annotationProvider'; +import type { GitDocumentState } from '../trackers/gitDocumentTracker'; +import type { TrackedDocument } from '../trackers/trackedDocument'; +import type { AnnotationContext } from './annotationProvider'; import { Annotations } from './annotations'; import { BlameAnnotationProviderBase } from './blameAnnotationProvider'; diff --git a/src/annotations/lineAnnotationController.ts b/src/annotations/lineAnnotationController.ts index fd3132a..109a6c1 100644 --- a/src/annotations/lineAnnotationController.ts +++ b/src/annotations/lineAnnotationController.ts @@ -12,9 +12,10 @@ import { } from 'vscode'; import { configuration } from '../configuration'; import { GlyphChars } from '../constants'; -import { Container } from '../container'; +import type { Container } from '../container'; import { CommitFormatter } from '../git/formatters'; -import { GitCommit, PullRequest } from '../git/models'; +import type { GitCommit } from '../git/models/commit'; +import type { PullRequest } from '../git/models/pullRequest'; import { Authentication } from '../git/remotes/provider'; import { LogCorrelationContext, Logger } from '../logger'; import { debug, log } from '../system/decorators/log'; @@ -22,7 +23,7 @@ import { once } from '../system/event'; import { count, every, filterMap } from '../system/iterable'; import { PromiseCancelledError, PromiseCancelledErrorWithId, raceAll } from '../system/promise'; import { isTextEditor } from '../system/utils'; -import { LinesChangeEvent, LineSelection } from '../trackers/gitLineTracker'; +import type { LinesChangeEvent, LineSelection } from '../trackers/gitLineTracker'; import { Annotations } from './annotations'; const annotationDecoration: TextEditorDecorationType = window.createTextEditorDecorationType({ diff --git a/src/avatars.ts b/src/avatars.ts index fdd5f77..a63cd47 100644 --- a/src/avatars.ts +++ b/src/avatars.ts @@ -2,13 +2,13 @@ import { EventEmitter, Uri } from 'vscode'; import { GravatarDefaultStyle } from './config'; import { configuration } from './configuration'; import { Container } from './container'; -import { GitRevisionReference } from './git/models'; +import type { GitRevisionReference } from './git/models/reference'; import { getGitHubNoReplyAddressParts } from './git/remotes/github'; import { StorageKeys } from './storage'; import { debounce } from './system/function'; import { filterMap } from './system/iterable'; import { base64, equalsIgnoreCase, md5 } from './system/string'; -import { ContactPresenceStatus } from './vsls/vsls'; +import type { ContactPresenceStatus } from './vsls/vsls'; const maxSmallIntegerV8 = 2 ** 30; // Max number that can be stored in V8's smis (small integers) diff --git a/src/codelens/codeLensProvider.ts b/src/codelens/codeLensProvider.ts index 542c021..85ce9d1 100644 --- a/src/codelens/codeLensProvider.ts +++ b/src/codelens/codeLensProvider.ts @@ -33,9 +33,10 @@ import { FileAnnotationType, } from '../configuration'; import { Commands, CoreCommands, Schemes } from '../constants'; -import { Container } from '../container'; +import type { Container } from '../container'; import type { GitUri } from '../git/gitUri'; -import { GitBlame, GitBlameLines, GitCommit } from '../git/models'; +import type { GitBlame, GitBlameLines } from '../git/models/blame'; +import type { GitCommit } from '../git/models/commit'; import { RemoteResourceType } from '../git/remotes/provider'; import { Logger } from '../logger'; import { asCommand, executeCoreCommand } from '../system/command'; diff --git a/src/commands/base.ts b/src/commands/base.ts index 827fe1b..a6664a5 100644 --- a/src/commands/base.ts +++ b/src/commands/base.ts @@ -11,18 +11,15 @@ import { window, } from 'vscode'; import type { ActionContext } from '../api/gitlens'; -import { Commands } from '../constants'; -import { - GitBranch, - GitCommit, - GitContributor, - GitFile, - GitReference, - GitRemote, - GitStashCommit, - GitTag, - Repository, -} from '../git/models'; +import type { Commands } from '../constants'; +import { GitBranch } from '../git/models/branch'; +import { GitCommit, GitStashCommit } from '../git/models/commit'; +import { GitContributor } from '../git/models/contributor'; +import type { GitFile } from '../git/models/file'; +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'; export function getCommandUri(uri?: Uri, editor?: TextEditor): Uri | undefined { diff --git a/src/commands/createPullRequestOnRemote.ts b/src/commands/createPullRequestOnRemote.ts index e534ede..466ffef 100644 --- a/src/commands/createPullRequestOnRemote.ts +++ b/src/commands/createPullRequestOnRemote.ts @@ -1,10 +1,10 @@ import { Commands } from '../constants'; import type { Container } from '../container'; -import { GitRemote } from '../git/models'; +import type { GitRemote } from '../git/models/remote'; import { RemoteProvider, RemoteResource, RemoteResourceType } from '../git/remotes/provider'; import { command, executeCommand } from '../system/command'; import { Command } from './base'; -import { OpenOnRemoteCommandArgs } from './openOnRemote'; +import type { OpenOnRemoteCommandArgs } from './openOnRemote'; export interface CreatePullRequestOnRemoteCommandArgs { base?: string; diff --git a/src/commands/diffLineWithPrevious.ts b/src/commands/diffLineWithPrevious.ts index ac2b0d2..7de9794 100644 --- a/src/commands/diffLineWithPrevious.ts +++ b/src/commands/diffLineWithPrevious.ts @@ -2,12 +2,12 @@ import { TextDocumentShowOptions, TextEditor, Uri } from 'vscode'; import { Commands } from '../constants'; import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { GitCommit } from '../git/models'; +import type { GitCommit } from '../git/models/commit'; import { Logger } from '../logger'; import { Messages } from '../messages'; import { command, executeCommand } from '../system/command'; import { ActiveEditorCommand, getCommandUri } from './base'; -import { DiffWithCommandArgs } from './diffWith'; +import type { DiffWithCommandArgs } from './diffWith'; export interface DiffLineWithPreviousCommandArgs { commit?: GitCommit; diff --git a/src/commands/diffLineWithWorking.ts b/src/commands/diffLineWithWorking.ts index 3e56c65..f3a409e 100644 --- a/src/commands/diffLineWithWorking.ts +++ b/src/commands/diffLineWithWorking.ts @@ -2,7 +2,8 @@ import { TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode'; import { Commands } from '../constants'; import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { GitCommit, GitRevision } from '../git/models'; +import { GitCommit } from '../git/models/commit'; +import { GitRevision } from '../git/models/reference'; import { Logger } from '../logger'; import { Messages } from '../messages'; import { command, executeCommand } from '../system/command'; diff --git a/src/commands/diffWith.ts b/src/commands/diffWith.ts index 2d86fcf..9d99aac 100644 --- a/src/commands/diffWith.ts +++ b/src/commands/diffWith.ts @@ -1,7 +1,8 @@ import { Range, TextDocumentShowOptions, Uri, ViewColumn } from 'vscode'; import { Commands, CoreCommands, GlyphChars } from '../constants'; import type { Container } from '../container'; -import { GitCommit, GitRevision } from '../git/models'; +import { GitCommit } from '../git/models/commit'; +import { GitRevision } from '../git/models/reference'; import { Logger } from '../logger'; import { Messages } from '../messages'; import { command, executeCoreCommand } from '../system/command'; diff --git a/src/commands/diffWithNext.ts b/src/commands/diffWithNext.ts index 85ba2e7..7e00c67 100644 --- a/src/commands/diffWithNext.ts +++ b/src/commands/diffWithNext.ts @@ -2,12 +2,12 @@ import { Range, TextDocumentShowOptions, TextEditor, Uri } from 'vscode'; import { Commands } from '../constants'; import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { GitCommit } from '../git/models'; +import type { GitCommit } from '../git/models/commit'; import { Logger } from '../logger'; import { Messages } from '../messages'; import { command, executeCommand } from '../system/command'; import { ActiveEditorCommand, CommandContext, getCommandUri } from './base'; -import { DiffWithCommandArgs } from './diffWith'; +import type { DiffWithCommandArgs } from './diffWith'; export interface DiffWithNextCommandArgs { commit?: GitCommit; diff --git a/src/commands/diffWithPrevious.ts b/src/commands/diffWithPrevious.ts index 8472c0a..da5b799 100644 --- a/src/commands/diffWithPrevious.ts +++ b/src/commands/diffWithPrevious.ts @@ -2,13 +2,14 @@ import { TextDocumentShowOptions, TextEditor, Uri } from 'vscode'; import { Commands } from '../constants'; import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { GitCommit, GitRevision } from '../git/models'; +import type { GitCommit } from '../git/models/commit'; +import { GitRevision } from '../git/models/reference'; import { Logger } from '../logger'; import { Messages } from '../messages'; import { command, executeCommand } from '../system/command'; import { findOrOpenEditor } from '../system/utils'; import { ActiveEditorCommand, CommandContext, getCommandUri } from './base'; -import { DiffWithCommandArgs } from './diffWith'; +import type { DiffWithCommandArgs } from './diffWith'; export interface DiffWithPreviousCommandArgs { commit?: GitCommit; diff --git a/src/commands/diffWithRevision.ts b/src/commands/diffWithRevision.ts index 43929a1..7019972 100644 --- a/src/commands/diffWithRevision.ts +++ b/src/commands/diffWithRevision.ts @@ -2,7 +2,7 @@ import { TextDocumentShowOptions, TextEditor, Uri } from 'vscode'; import { Commands, GlyphChars, quickPickTitleMaxChars } from '../constants'; import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { GitRevision } from '../git/models'; +import { GitRevision } from '../git/models/reference'; import { Logger } from '../logger'; import { Messages } from '../messages'; import { CommitPicker } from '../quickpicks/commitPicker'; @@ -10,8 +10,8 @@ import { CommandQuickPickItem } from '../quickpicks/items/common'; import { command, executeCommand } from '../system/command'; import { pad } from '../system/string'; import { ActiveEditorCommand, getCommandUri } from './base'; -import { DiffWithCommandArgs } from './diffWith'; -import { DiffWithRevisionFromCommandArgs } from './diffWithRevisionFrom'; +import type { DiffWithCommandArgs } from './diffWith'; +import type { DiffWithRevisionFromCommandArgs } from './diffWithRevisionFrom'; export interface DiffWithRevisionCommandArgs { line?: number; diff --git a/src/commands/diffWithRevisionFrom.ts b/src/commands/diffWithRevisionFrom.ts index 0e293da..f9b8b2b 100644 --- a/src/commands/diffWithRevisionFrom.ts +++ b/src/commands/diffWithRevisionFrom.ts @@ -2,7 +2,7 @@ import { TextDocumentShowOptions, TextEditor, Uri } from 'vscode'; import { Commands, GlyphChars, quickPickTitleMaxChars } from '../constants'; import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { GitReference, GitRevision } from '../git/models'; +import { GitReference, GitRevision } from '../git/models/reference'; import { Messages } from '../messages'; import { StashPicker } from '../quickpicks/commitPicker'; import { ReferencePicker } from '../quickpicks/referencePicker'; @@ -10,7 +10,7 @@ import { command, executeCommand } from '../system/command'; import { basename } from '../system/path'; import { pad } from '../system/string'; import { ActiveEditorCommand, getCommandUri } from './base'; -import { DiffWithCommandArgs } from './diffWith'; +import type { DiffWithCommandArgs } from './diffWith'; export interface DiffWithRevisionFromCommandArgs { line?: number; diff --git a/src/commands/diffWithWorking.ts b/src/commands/diffWithWorking.ts index c1d741b..e2acdf6 100644 --- a/src/commands/diffWithWorking.ts +++ b/src/commands/diffWithWorking.ts @@ -2,12 +2,12 @@ import { TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode'; import { Commands } from '../constants'; import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { GitRevision } from '../git/models'; +import { GitRevision } from '../git/models/reference'; import { Logger } from '../logger'; import { Messages } from '../messages'; import { command, executeCommand } from '../system/command'; import { ActiveEditorCommand, getCommandUri } from './base'; -import { DiffWithCommandArgs } from './diffWith'; +import type { DiffWithCommandArgs } from './diffWith'; export interface DiffWithWorkingCommandArgs { inDiffRightEditor?: boolean; diff --git a/src/commands/externalDiff.ts b/src/commands/externalDiff.ts index 01d934a..0a8f36f 100644 --- a/src/commands/externalDiff.ts +++ b/src/commands/externalDiff.ts @@ -1,11 +1,11 @@ import { env, SourceControlResourceState, Uri, window } from 'vscode'; -import { ScmResource } from '../@types/vscode.git.resources'; +import type { ScmResource } from '../@types/vscode.git.resources'; import { ScmResourceGroupType, ScmStatus } from '../@types/vscode.git.resources.enums'; import { configuration } from '../configuration'; import { Commands } from '../constants'; import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { GitRevision } from '../git/models'; +import { GitRevision } from '../git/models/reference'; import { Logger } from '../logger'; import { Messages } from '../messages'; import { RepositoryPicker } from '../quickpicks/repositoryPicker'; diff --git a/src/commands/git/branch.ts b/src/commands/git/branch.ts index 735e13e..be59437 100644 --- a/src/commands/git/branch.ts +++ b/src/commands/git/branch.ts @@ -1,10 +1,11 @@ import { QuickInputButtons } from 'vscode'; import type { Container } from '../../container'; -import { GitBranchReference, GitReference, Repository } from '../../git/models'; -import { QuickPickItemOfT } from '../../quickpicks/items/common'; +import { GitBranchReference, GitReference } from '../../git/models/reference'; +import { Repository } from '../../git/models/repository'; +import type { QuickPickItemOfT } from '../../quickpicks/items/common'; import { FlagsQuickPickItem } from '../../quickpicks/items/flags'; import { pluralize } from '../../system/string'; -import { ViewsWithRepositoryFolders } from '../../views/viewBase'; +import type { ViewsWithRepositoryFolders } from '../../views/viewBase'; import { appendReposToTitle, AsyncStepResultGenerator, diff --git a/src/commands/git/cherry-pick.ts b/src/commands/git/cherry-pick.ts index a5d25a3..8e4e6c8 100644 --- a/src/commands/git/cherry-pick.ts +++ b/src/commands/git/cherry-pick.ts @@ -1,7 +1,10 @@ -import { Container } from '../../container'; -import { GitBranch, GitLog, GitReference, GitRevision, Repository } from '../../git/models'; +import type { Container } from '../../container'; +import type { GitBranch } from '../../git/models/branch'; +import type { GitLog } from '../../git/models/log'; +import { GitReference, GitRevision } from '../../git/models/reference'; +import type { Repository } from '../../git/models/repository'; import { FlagsQuickPickItem } from '../../quickpicks/items/flags'; -import { ViewsWithRepositoryFolders } from '../../views/viewBase'; +import type { ViewsWithRepositoryFolders } from '../../views/viewBase'; import { appendReposToTitle, PartialStepState, diff --git a/src/commands/git/coauthors.ts b/src/commands/git/coauthors.ts index 2128e4d..567f182 100644 --- a/src/commands/git/coauthors.ts +++ b/src/commands/git/coauthors.ts @@ -1,9 +1,10 @@ import { CoreCommands } from '../../constants'; import type { Container } from '../../container'; -import type { GitContributor, Repository } from '../../git/models'; +import type { GitContributor } from '../../git/models/contributor'; +import type { Repository } from '../../git/models/repository'; import { executeCoreCommand } from '../../system/command'; import { normalizePath } from '../../system/path'; -import { ViewsWithRepositoryFolders } from '../../views/viewBase'; +import type { ViewsWithRepositoryFolders } from '../../views/viewBase'; import { PartialStepState, pickContributorsStep, diff --git a/src/commands/git/fetch.ts b/src/commands/git/fetch.ts index e1f77fe..29154fb 100644 --- a/src/commands/git/fetch.ts +++ b/src/commands/git/fetch.ts @@ -1,11 +1,12 @@ import { GlyphChars } from '../../constants'; -import { Container } from '../../container'; -import { GitBranchReference, GitReference, Repository } from '../../git/models'; +import type { Container } from '../../container'; +import { GitBranchReference, GitReference } from '../../git/models/reference'; +import type { Repository } from '../../git/models/repository'; import { FlagsQuickPickItem } from '../../quickpicks/items/flags'; import { isStringArray } from '../../system/array'; import { fromNow } from '../../system/date'; import { pad } from '../../system/string'; -import { ViewsWithRepositoryFolders } from '../../views/viewBase'; +import type { ViewsWithRepositoryFolders } from '../../views/viewBase'; import { appendReposToTitle, AsyncStepResultGenerator, diff --git a/src/commands/git/log.ts b/src/commands/git/log.ts index 83ed40a..c2e48e7 100644 --- a/src/commands/git/log.ts +++ b/src/commands/git/log.ts @@ -1,9 +1,12 @@ import { GlyphChars, quickPickTitleMaxChars } from '../../constants'; -import { Container } from '../../container'; -import { GitCommit, GitLog, GitReference, Repository } from '../../git/models'; +import type { Container } from '../../container'; +import { GitCommit } from '../../git/models/commit'; +import type { GitLog } from '../../git/models/log'; +import { GitReference } from '../../git/models/reference'; +import { Repository } from '../../git/models/repository'; import { formatPath } from '../../system/formatPath'; import { pad } from '../../system/string'; -import { ViewsWithRepositoryFolders } from '../../views/viewBase'; +import type { ViewsWithRepositoryFolders } from '../../views/viewBase'; import { GitActions } from '../gitCommands.actions'; import { getSteps } from '../gitCommands.utils'; import { diff --git a/src/commands/git/merge.ts b/src/commands/git/merge.ts index 6df7ce5..5d82287 100644 --- a/src/commands/git/merge.ts +++ b/src/commands/git/merge.ts @@ -1,9 +1,12 @@ -import { Container } from '../../container'; -import { GitBranch, GitLog, GitReference, GitRevision, Repository } from '../../git/models'; +import type { Container } from '../../container'; +import type { GitBranch } from '../../git/models/branch'; +import type { GitLog } from '../../git/models/log'; +import { GitReference, GitRevision } from '../../git/models/reference'; +import type { Repository } from '../../git/models/repository'; import { Directive, DirectiveQuickPickItem } from '../../quickpicks/items/directive'; import { FlagsQuickPickItem } from '../../quickpicks/items/flags'; import { pluralize } from '../../system/string'; -import { ViewsWithRepositoryFolders } from '../../views/viewBase'; +import type { ViewsWithRepositoryFolders } from '../../views/viewBase'; import { appendReposToTitle, AsyncStepResultGenerator, diff --git a/src/commands/git/pull.ts b/src/commands/git/pull.ts index 1eaadc8..6335ccf 100644 --- a/src/commands/git/pull.ts +++ b/src/commands/git/pull.ts @@ -1,12 +1,14 @@ import { GlyphChars } from '../../constants'; -import { Container } from '../../container'; -import { GitBranch, GitBranchReference, GitReference, Repository } from '../../git/models'; +import type { Container } from '../../container'; +import { GitBranch } from '../../git/models/branch'; +import { GitBranchReference, GitReference } from '../../git/models/reference'; +import type { Repository } from '../../git/models/repository'; import { Directive, DirectiveQuickPickItem } from '../../quickpicks/items/directive'; import { FlagsQuickPickItem } from '../../quickpicks/items/flags'; import { isStringArray } from '../../system/array'; import { fromNow } from '../../system/date'; import { pad, pluralize } from '../../system/string'; -import { ViewsWithRepositoryFolders } from '../../views/viewBase'; +import type { ViewsWithRepositoryFolders } from '../../views/viewBase'; import { appendReposToTitle, AsyncStepResultGenerator, diff --git a/src/commands/git/push.ts b/src/commands/git/push.ts index d9e6336..345cebe 100644 --- a/src/commands/git/push.ts +++ b/src/commands/git/push.ts @@ -1,13 +1,15 @@ import { configuration } from '../../configuration'; import { CoreGitConfiguration, GlyphChars } from '../../constants'; -import { Container } from '../../container'; -import { GitBranch, GitBranchReference, GitReference, Repository } from '../../git/models'; +import type { Container } from '../../container'; +import { GitBranch } from '../../git/models/branch'; +import { GitBranchReference, GitReference } from '../../git/models/reference'; +import type { Repository } from '../../git/models/repository'; import { Directive, DirectiveQuickPickItem } from '../../quickpicks/items/directive'; import { FlagsQuickPickItem } from '../../quickpicks/items/flags'; import { isStringArray } from '../../system/array'; import { fromNow } from '../../system/date'; import { pad, pluralize } from '../../system/string'; -import { ViewsWithRepositoryFolders } from '../../views/viewBase'; +import type { ViewsWithRepositoryFolders } from '../../views/viewBase'; import { appendReposToTitle, AsyncStepResultGenerator, diff --git a/src/commands/git/rebase.ts b/src/commands/git/rebase.ts index e48148b..8da1e57 100644 --- a/src/commands/git/rebase.ts +++ b/src/commands/git/rebase.ts @@ -1,10 +1,13 @@ import { env } from 'vscode'; -import { Container } from '../../container'; -import { GitBranch, GitLog, GitReference, GitRevision, Repository } from '../../git/models'; +import type { Container } from '../../container'; +import type { GitBranch } from '../../git/models/branch'; +import type { GitLog } from '../../git/models/log'; +import { GitReference, GitRevision } from '../../git/models/reference'; +import type { Repository } from '../../git/models/repository'; import { Directive, DirectiveQuickPickItem } from '../../quickpicks/items/directive'; import { FlagsQuickPickItem } from '../../quickpicks/items/flags'; import { pluralize } from '../../system/string'; -import { ViewsWithRepositoryFolders } from '../../views/viewBase'; +import type { ViewsWithRepositoryFolders } from '../../views/viewBase'; import { appendReposToTitle, AsyncStepResultGenerator, diff --git a/src/commands/git/reset.ts b/src/commands/git/reset.ts index 208b28f..bd01b05 100644 --- a/src/commands/git/reset.ts +++ b/src/commands/git/reset.ts @@ -1,7 +1,10 @@ -import { Container } from '../../container'; -import { GitBranch, GitLog, GitReference, GitRevisionReference, Repository } from '../../git/models'; +import type { Container } from '../../container'; +import type { GitBranch } from '../../git/models/branch'; +import type { GitLog } from '../../git/models/log'; +import { GitReference, GitRevisionReference } from '../../git/models/reference'; +import type { Repository } from '../../git/models/repository'; import { FlagsQuickPickItem } from '../../quickpicks/items/flags'; -import { ViewsWithRepositoryFolders } from '../../views/viewBase'; +import type { ViewsWithRepositoryFolders } from '../../views/viewBase'; import { appendReposToTitle, PartialStepState, diff --git a/src/commands/git/revert.ts b/src/commands/git/revert.ts index e03cc5c..29b3ba8 100644 --- a/src/commands/git/revert.ts +++ b/src/commands/git/revert.ts @@ -1,7 +1,10 @@ -import { Container } from '../../container'; -import { GitBranch, GitLog, GitReference, GitRevisionReference, Repository } from '../../git/models'; +import type { Container } from '../../container'; +import type { GitBranch } from '../../git/models/branch'; +import type { GitLog } from '../../git/models/log'; +import { GitReference, GitRevisionReference } from '../../git/models/reference'; +import type { Repository } from '../../git/models/repository'; import { FlagsQuickPickItem } from '../../quickpicks/items/flags'; -import { ViewsWithRepositoryFolders } from '../../views/viewBase'; +import type { ViewsWithRepositoryFolders } from '../../views/viewBase'; import { appendReposToTitle, PartialStepState, diff --git a/src/commands/git/search.ts b/src/commands/git/search.ts index 1d60be8..cb63c90 100644 --- a/src/commands/git/search.ts +++ b/src/commands/git/search.ts @@ -1,13 +1,15 @@ import { configuration } from '../../configuration'; import { ContextKeys, GlyphChars } from '../../constants'; -import { Container } from '../../container'; +import type { Container } from '../../container'; import { getContext } from '../../context'; -import { GitCommit, GitLog, Repository } from '../../git/models'; +import type { GitCommit } from '../../git/models/commit'; +import type { GitLog } from '../../git/models/log'; +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 { ViewsWithRepositoryFolders } from '../../views/viewBase'; +import type { ViewsWithRepositoryFolders } from '../../views/viewBase'; import { GitActions } from '../gitCommands.actions'; import { getSteps } from '../gitCommands.utils'; import { diff --git a/src/commands/git/show.ts b/src/commands/git/show.ts index 4518ca7..f17932d 100644 --- a/src/commands/git/show.ts +++ b/src/commands/git/show.ts @@ -1,9 +1,11 @@ -import { Container } from '../../container'; -import { GitCommit, GitRevisionReference, GitStashCommit, Repository } from '../../git/models'; +import type { Container } from '../../container'; +import { GitCommit, GitStashCommit } from '../../git/models/commit'; +import type { GitRevisionReference } from '../../git/models/reference'; +import { Repository } from '../../git/models/repository'; import { CommitFilesQuickPickItem } from '../../quickpicks/items/commits'; import { CommandQuickPickItem } from '../../quickpicks/items/common'; import { GitCommandQuickPickItem } from '../../quickpicks/items/gitCommands'; -import { ViewsWithRepositoryFolders } from '../../views/viewBase'; +import type { ViewsWithRepositoryFolders } from '../../views/viewBase'; import { PartialStepState, pickCommitStep, diff --git a/src/commands/git/stash.ts b/src/commands/git/stash.ts index 2374551..7f52ef0 100644 --- a/src/commands/git/stash.ts +++ b/src/commands/git/stash.ts @@ -1,16 +1,18 @@ import { QuickInputButtons, QuickPickItem, Uri, window } from 'vscode'; import { ContextKeys, GlyphChars } from '../../constants'; -import { Container } from '../../container'; +import type { Container } from '../../container'; import { getContext } from '../../context'; import { StashApplyError, StashApplyErrorReason } from '../../git/errors'; -import { GitReference, GitStashCommit, GitStashReference, Repository } from '../../git/models'; +import type { GitStashCommit } from '../../git/models/commit'; +import { GitReference, GitStashReference } from '../../git/models/reference'; +import type { Repository } from '../../git/models/repository'; import { Logger } from '../../logger'; import { Messages } from '../../messages'; -import { QuickPickItemOfT } from '../../quickpicks/items/common'; +import type { QuickPickItemOfT } from '../../quickpicks/items/common'; import { FlagsQuickPickItem } from '../../quickpicks/items/flags'; import { formatPath } from '../../system/formatPath'; import { pad } from '../../system/string'; -import { ViewsWithRepositoryFolders } from '../../views/viewBase'; +import type { ViewsWithRepositoryFolders } from '../../views/viewBase'; import { GitActions } from '../gitCommands.actions'; import { getSteps } from '../gitCommands.utils'; import { diff --git a/src/commands/git/status.ts b/src/commands/git/status.ts index 6d0328f..6ccb995 100644 --- a/src/commands/git/status.ts +++ b/src/commands/git/status.ts @@ -1,10 +1,12 @@ import { GlyphChars } from '../../constants'; -import { Container } from '../../container'; -import { GitReference, GitStatus, Repository } from '../../git/models'; +import type { Container } from '../../container'; +import { GitReference } from '../../git/models/reference'; +import type { Repository } from '../../git/models/repository'; +import type { GitStatus } from '../../git/models/status'; import { CommandQuickPickItem } from '../../quickpicks/items/common'; import { GitCommandQuickPickItem } from '../../quickpicks/items/gitCommands'; import { pad } from '../../system/string'; -import { ViewsWithRepositoryFolders } from '../../views/viewBase'; +import type { ViewsWithRepositoryFolders } from '../../views/viewBase'; import { PartialStepState, pickRepositoryStep, diff --git a/src/commands/git/switch.ts b/src/commands/git/switch.ts index acf820b..465fdb1 100644 --- a/src/commands/git/switch.ts +++ b/src/commands/git/switch.ts @@ -1,9 +1,10 @@ import { ProgressLocation, QuickPickItem, window } from 'vscode'; import { BranchSorting } from '../../config'; -import { Container } from '../../container'; -import { GitReference, Repository } from '../../git/models'; +import type { Container } from '../../container'; +import { GitReference } from '../../git/models/reference'; +import type { Repository } from '../../git/models/repository'; import { isStringArray } from '../../system/array'; -import { ViewsWithRepositoryFolders } from '../../views/viewBase'; +import type { ViewsWithRepositoryFolders } from '../../views/viewBase'; import { appendReposToTitle, inputBranchNameStep, diff --git a/src/commands/git/tag.ts b/src/commands/git/tag.ts index 0bf51be..c21286a 100644 --- a/src/commands/git/tag.ts +++ b/src/commands/git/tag.ts @@ -1,10 +1,11 @@ import { QuickInputButtons, QuickPickItem } from 'vscode'; -import { Container } from '../../container'; -import { GitReference, GitTagReference, Repository } from '../../git/models'; -import { QuickPickItemOfT } from '../../quickpicks/items/common'; +import type { Container } from '../../container'; +import { GitReference, GitTagReference } from '../../git/models/reference'; +import type { Repository } from '../../git/models/repository'; +import type { QuickPickItemOfT } from '../../quickpicks/items/common'; import { FlagsQuickPickItem } from '../../quickpicks/items/flags'; import { pluralize } from '../../system/string'; -import { ViewsWithRepositoryFolders } from '../../views/viewBase'; +import type { ViewsWithRepositoryFolders } from '../../views/viewBase'; import { appendReposToTitle, AsyncStepResultGenerator, diff --git a/src/commands/git/worktree.ts b/src/commands/git/worktree.ts index 7c2af06..7d8fc98 100644 --- a/src/commands/git/worktree.ts +++ b/src/commands/git/worktree.ts @@ -8,7 +8,9 @@ import { WorktreeDeleteError, WorktreeDeleteErrorReason, } from '../../git/errors'; -import { GitReference, GitWorktree, Repository } from '../../git/models'; +import { GitReference } from '../../git/models/reference'; +import type { Repository } from '../../git/models/repository'; +import { GitWorktree } from '../../git/models/worktree'; import { Messages } from '../../messages'; import { QuickPickItemOfT, QuickPickSeparator } from '../../quickpicks/items/common'; import { Directive } from '../../quickpicks/items/directive'; @@ -16,7 +18,7 @@ import { FlagsQuickPickItem } from '../../quickpicks/items/flags'; import { basename, isDescendent } from '../../system/path'; import { pluralize, truncateLeft } from '../../system/string'; import { OpenWorkspaceLocation } from '../../system/utils'; -import { ViewsWithRepositoryFolders } from '../../views/viewBase'; +import type { ViewsWithRepositoryFolders } from '../../views/viewBase'; import { GitActions } from '../gitCommands.actions'; import { appendReposToTitle, diff --git a/src/commands/gitCommands.actions.ts b/src/commands/gitCommands.actions.ts index 205af2b..5f1f664 100644 --- a/src/commands/gitCommands.actions.ts +++ b/src/commands/gitCommands.actions.ts @@ -6,30 +6,30 @@ import type { GitCommandsCommandArgs, OpenWorkingFileCommandArgs, } from '../commands'; -import { FileAnnotationType } from '../configuration'; +import type { FileAnnotationType } from '../configuration'; import { Commands, CoreCommands } from '../constants'; import { Container } from '../container'; import { GitUri } from '../git/gitUri'; +import { GitCommit } from '../git/models/commit'; +import type { GitContributor } from '../git/models/contributor'; +import type { GitFile } from '../git/models/file'; import { GitBranchReference, - GitCommit, - GitContributor, - GitFile, GitReference, - GitRemote, GitRevision, GitRevisionReference, GitStashReference, GitTagReference, - GitWorktree, - Repository, -} from '../git/models'; +} from '../git/models/reference'; +import type { GitRemote } from '../git/models/remote'; +import type { Repository } from '../git/models/repository'; +import type { GitWorktree } from '../git/models/worktree'; import { RepositoryPicker } from '../quickpicks/repositoryPicker'; import { ensure } from '../system/array'; import { executeCommand, executeCoreCommand, executeEditorCommand } from '../system/command'; import { findOrOpenEditor, findOrOpenEditors, openWorkspace, OpenWorkspaceLocation } from '../system/utils'; -import { ViewsWithRepositoryFolders } from '../views/viewBase'; -import { ResetGitCommandArgs } from './git/reset'; +import type { ViewsWithRepositoryFolders } from '../views/viewBase'; +import type { ResetGitCommandArgs } from './git/reset'; export async function executeGitCommand(args: GitCommandsCommandArgs): Promise { void (await executeCommand(Commands.GitCommands, args)); diff --git a/src/commands/openCommitOnRemote.ts b/src/commands/openCommitOnRemote.ts index 49473cb..6da70e0 100644 --- a/src/commands/openCommitOnRemote.ts +++ b/src/commands/openCommitOnRemote.ts @@ -2,7 +2,7 @@ import { TextEditor, Uri, window } from 'vscode'; import { Commands } from '../constants'; import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { GitRevision } from '../git/models'; +import { GitRevision } from '../git/models/reference'; import { RemoteResourceType } from '../git/remotes/provider'; import { Logger } from '../logger'; import { Messages } from '../messages'; @@ -14,7 +14,7 @@ import { isCommandContextGitTimelineItem, isCommandContextViewNodeHasCommit, } from './base'; -import { OpenOnRemoteCommandArgs } from './openOnRemote'; +import type { OpenOnRemoteCommandArgs } from './openOnRemote'; export interface OpenCommitOnRemoteCommandArgs { clipboard?: boolean; diff --git a/src/commands/openFileAtRevision.ts b/src/commands/openFileAtRevision.ts index 0039aec..ffcd902 100644 --- a/src/commands/openFileAtRevision.ts +++ b/src/commands/openFileAtRevision.ts @@ -3,7 +3,7 @@ import { FileAnnotationType } from '../configuration'; import { Commands, GlyphChars, quickPickTitleMaxChars } from '../constants'; import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { GitRevision } from '../git/models'; +import { GitRevision } from '../git/models/reference'; import { Logger } from '../logger'; import { Messages } from '../messages'; import { CommitPicker } from '../quickpicks/commitPicker'; @@ -12,7 +12,7 @@ import { command } from '../system/command'; import { pad } from '../system/string'; import { ActiveEditorCommand, CommandContext, getCommandUri } from './base'; import { GitActions } from './gitCommands.actions'; -import { OpenFileAtRevisionFromCommandArgs } from './openFileAtRevisionFrom'; +import type { OpenFileAtRevisionFromCommandArgs } from './openFileAtRevisionFrom'; export interface OpenFileAtRevisionCommandArgs { revisionUri?: Uri; diff --git a/src/commands/openFileAtRevisionFrom.ts b/src/commands/openFileAtRevisionFrom.ts index 01bdb29..84cc922 100644 --- a/src/commands/openFileAtRevisionFrom.ts +++ b/src/commands/openFileAtRevisionFrom.ts @@ -3,7 +3,7 @@ import { FileAnnotationType } from '../configuration'; import { Commands, GlyphChars, quickPickTitleMaxChars } from '../constants'; import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { GitReference } from '../git/models'; +import type { GitReference } from '../git/models/reference'; import { Messages } from '../messages'; import { StashPicker } from '../quickpicks/commitPicker'; import { ReferencePicker } from '../quickpicks/referencePicker'; diff --git a/src/commands/openFileOnRemote.ts b/src/commands/openFileOnRemote.ts index 8267896..1696b10 100644 --- a/src/commands/openFileOnRemote.ts +++ b/src/commands/openFileOnRemote.ts @@ -4,7 +4,8 @@ import { BranchSorting, TagSorting } from '../configuration'; import { Commands, GlyphChars } from '../constants'; import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { GitBranch, GitRevision } from '../git/models'; +import { GitBranch } from '../git/models/branch'; +import { GitRevision } from '../git/models/reference'; import { RemoteResourceType } from '../git/remotes/provider'; import { Logger } from '../logger'; import { ReferencePicker } from '../quickpicks/referencePicker'; @@ -18,7 +19,7 @@ import { isCommandContextViewNodeHasBranch, isCommandContextViewNodeHasCommit, } from './base'; -import { OpenOnRemoteCommandArgs } from './openOnRemote'; +import type { OpenOnRemoteCommandArgs } from './openOnRemote'; export interface OpenFileOnRemoteCommandArgs { branchOrTag?: string; diff --git a/src/commands/openOnRemote.ts b/src/commands/openOnRemote.ts index a1c57a7..7a2fafa 100644 --- a/src/commands/openOnRemote.ts +++ b/src/commands/openOnRemote.ts @@ -1,6 +1,7 @@ import { Commands, GlyphChars } from '../constants'; import type { Container } from '../container'; -import { GitRemote, GitRevision } from '../git/models'; +import { GitRevision } from '../git/models/reference'; +import { GitRemote } from '../git/models/remote'; import { RemoteProvider, RemoteResource, RemoteResourceType } from '../git/remotes/provider'; import { Logger } from '../logger'; import { Messages } from '../messages'; diff --git a/src/commands/openRevisionFile.ts b/src/commands/openRevisionFile.ts index ed39039..66f613c 100644 --- a/src/commands/openRevisionFile.ts +++ b/src/commands/openRevisionFile.ts @@ -1,9 +1,9 @@ import { TextDocumentShowOptions, TextEditor, Uri } from 'vscode'; -import { FileAnnotationType } from '../configuration'; +import type { FileAnnotationType } from '../configuration'; import { Commands } from '../constants'; import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { GitRevision } from '../git/models'; +import { GitRevision } from '../git/models/reference'; import { Logger } from '../logger'; import { Messages } from '../messages'; import { command } from '../system/command'; diff --git a/src/commands/quickCommand.steps.ts b/src/commands/quickCommand.steps.ts index 31c3058..7bc441c 100644 --- a/src/commands/quickCommand.steps.ts +++ b/src/commands/quickCommand.steps.ts @@ -4,26 +4,23 @@ import { Commands, GlyphChars, quickPickTitleMaxChars } from '../constants'; import { Container } from '../container'; import type { PlusFeatures } from '../features'; import type { PagedResult } from '../git/gitProvider'; +import { BranchSortOptions, GitBranch } from '../git/models/branch'; +import { GitCommit, GitStashCommit } from '../git/models/commit'; +import type { GitContributor } from '../git/models/contributor'; +import type { GitLog } from '../git/models/log'; import { - BranchSortOptions, - GitBranch, GitBranchReference, - GitCommit, - GitContributor, - GitLog, GitReference, - GitRemote, GitRevision, GitRevisionReference, - GitStash, - GitStashCommit, - GitStatus, - GitTag, GitTagReference, - GitWorktree, - Repository, - TagSortOptions, -} from '../git/models'; +} from '../git/models/reference'; +import { GitRemote } from '../git/models/remote'; +import { Repository } from '../git/models/repository'; +import type { GitStash } from '../git/models/stash'; +import type { GitStatus } from '../git/models/status'; +import { GitTag, TagSortOptions } from '../git/models/tag'; +import type { GitWorktree } from '../git/models/worktree'; import { RemoteResourceType } from '../git/remotes/provider'; import { SearchPattern } from '../git/search'; import { @@ -63,7 +60,7 @@ import { TagQuickPickItem, WorktreeQuickPickItem, } from '../quickpicks/items/gitCommands'; -import { ReferencesQuickPickItem } from '../quickpicks/referencePicker'; +import type { ReferencesQuickPickItem } from '../quickpicks/referencePicker'; import { CopyRemoteResourceCommandQuickPickItem, OpenRemoteResourceCommandQuickPickItem, diff --git a/src/commands/remoteProviders.ts b/src/commands/remoteProviders.ts index 8a06a3a..faf3111 100644 --- a/src/commands/remoteProviders.ts +++ b/src/commands/remoteProviders.ts @@ -1,7 +1,9 @@ import { Commands } from '../constants'; import type { Container } from '../container'; -import { GitCommit, GitRemote, Repository } from '../git/models'; -import { RichRemoteProvider } from '../git/remotes/provider'; +import type { GitCommit } from '../git/models/commit'; +import { GitRemote } from '../git/models/remote'; +import type { Repository } from '../git/models/repository'; +import type { RichRemoteProvider } from '../git/remotes/provider'; import { RepositoryPicker } from '../quickpicks/repositoryPicker'; import { command } from '../system/command'; import { first } from '../system/iterable'; diff --git a/src/commands/showQuickBranchHistory.ts b/src/commands/showQuickBranchHistory.ts index de1ab7b..9d39a04 100644 --- a/src/commands/showQuickBranchHistory.ts +++ b/src/commands/showQuickBranchHistory.ts @@ -2,7 +2,7 @@ import { TextEditor, Uri } from 'vscode'; import { Commands } from '../constants'; import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { GitReference } from '../git/models'; +import { GitReference } from '../git/models/reference'; import { command } from '../system/command'; import { ActiveEditorCachedCommand, CommandContext, getCommandUri } from './base'; import { executeGitCommand } from './gitCommands.actions'; diff --git a/src/commands/showQuickCommit.ts b/src/commands/showQuickCommit.ts index 307d99e..d80b750 100644 --- a/src/commands/showQuickCommit.ts +++ b/src/commands/showQuickCommit.ts @@ -2,7 +2,8 @@ import { TextEditor, Uri } from 'vscode'; import { Commands } from '../constants'; import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { GitCommit, GitLog, GitStashCommit } from '../git/models'; +import type { GitCommit, GitStashCommit } from '../git/models/commit'; +import type { GitLog } from '../git/models/log'; import { Logger } from '../logger'; import { Messages } from '../messages'; import { command } from '../system/command'; diff --git a/src/commands/showQuickCommitFile.ts b/src/commands/showQuickCommitFile.ts index cc9ec62..7f37580 100644 --- a/src/commands/showQuickCommitFile.ts +++ b/src/commands/showQuickCommitFile.ts @@ -2,7 +2,8 @@ import { TextEditor, Uri, window } from 'vscode'; import { Commands } from '../constants'; import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { GitCommit, GitLog, GitStashCommit } from '../git/models'; +import { GitCommit, GitStashCommit } from '../git/models/commit'; +import type { GitLog } from '../git/models/log'; import { Logger } from '../logger'; import { Messages } from '../messages'; import { command } from '../system/command'; diff --git a/src/commands/showQuickFileHistory.ts b/src/commands/showQuickFileHistory.ts index 23cb10a..714ee57 100644 --- a/src/commands/showQuickFileHistory.ts +++ b/src/commands/showQuickFileHistory.ts @@ -2,8 +2,11 @@ import { Range, TextEditor, Uri } from 'vscode'; import { Commands } from '../constants'; import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { GitBranch, GitLog, GitReference, GitTag } from '../git/models'; -import { CommandQuickPickItem } from '../quickpicks/items/common'; +import type { GitBranch } from '../git/models/branch'; +import type { GitLog } from '../git/models/log'; +import type { GitReference } from '../git/models/reference'; +import type { GitTag } from '../git/models/tag'; +import type { CommandQuickPickItem } from '../quickpicks/items/common'; import { command } from '../system/command'; import { ActiveEditorCachedCommand, CommandContext, getCommandUri } from './base'; import { executeGitCommand } from './gitCommands.actions'; diff --git a/src/commands/stashApply.ts b/src/commands/stashApply.ts index 7e929df..2ee314a 100644 --- a/src/commands/stashApply.ts +++ b/src/commands/stashApply.ts @@ -1,8 +1,9 @@ import { GitActions } from '../commands/gitCommands.actions'; import { Commands } from '../constants'; import type { Container } from '../container'; -import { GitStashCommit, GitStashReference } from '../git/models'; -import { CommandQuickPickItem } from '../quickpicks/items/common'; +import type { GitStashCommit } from '../git/models/commit'; +import type { GitStashReference } from '../git/models/reference'; +import type { CommandQuickPickItem } from '../quickpicks/items/common'; import { command } from '../system/command'; import { Command, diff --git a/src/env/node/git/git.ts b/src/env/node/git/git.ts index f296d41..8e505b0 100644 --- a/src/env/node/git/git.ts +++ b/src/env/node/git/git.ts @@ -3,13 +3,15 @@ import { CancellationToken, Uri, window, workspace } from 'vscode'; import { hrtime } from '@env/hrtime'; import { GlyphChars } from '../../../constants'; import { GitCommandOptions, GitErrorHandling } from '../../../git/commandOptions'; -import { GitDiffFilter, GitRevision, GitUser } from '../../../git/models'; +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 { Logger } from '../../../logger'; import { dirname, isAbsolute, isFolderGlob, joinPaths, normalizePath, splitPath } from '../../../system/path'; import { getDurationMilliseconds } from '../../../system/string'; import { compare, fromString } from '../../../system/version'; -import { GitLocation } from './locator'; +import type { GitLocation } from './locator'; import { fsExists, run, RunError, RunOptions } from './shell'; const emptyArray = Object.freeze([]) as unknown as any[]; diff --git a/src/env/node/git/localGitProvider.ts b/src/env/node/git/localGitProvider.ts index 7ac7f2c..15d63d5 100644 --- a/src/env/node/git/localGitProvider.ts +++ b/src/env/node/git/localGitProvider.ts @@ -53,46 +53,30 @@ import { } from '../../../git/gitProvider'; import { GitProviderService } from '../../../git/gitProviderService'; import { encodeGitLensRevisionUriAuthority, GitUri } from '../../../git/gitUri'; +import type { GitBlame, GitBlameAuthor, GitBlameLine, GitBlameLines } from '../../../git/models/blame'; +import { BranchSortOptions, GitBranch } from '../../../git/models/branch'; +import { GitCommit, GitCommitIdentity, GitStashCommit } from '../../../git/models/commit'; +import { GitContributor } from '../../../git/models/contributor'; +import type { GitDiff, GitDiffFilter, GitDiffHunkLine, GitDiffShortStat } from '../../../git/models/diff'; +import { GitFile, GitFileChange, GitFileStatus } from '../../../git/models/file'; +import type { GitLog } from '../../../git/models/log'; +import type { GitMergeStatus } from '../../../git/models/merge'; +import type { GitRebaseStatus } from '../../../git/models/rebase'; +import { GitBranchReference, GitReference, GitRevision } from '../../../git/models/reference'; +import type { GitReflog } from '../../../git/models/reflog'; +import { GitRemote } from '../../../git/models/remote'; import { - BranchSortOptions, - GitBlame, - GitBlameAuthor, - GitBlameLine, - GitBlameLines, - GitBranch, - GitBranchReference, - GitCommit, - GitCommitIdentity, - GitContributor, - GitDiff, - GitDiffFilter, - GitDiffHunkLine, - GitDiffShortStat, - GitFile, - GitFileChange, - GitFileStatus, - GitLog, - GitMergeStatus, - GitRebaseStatus, - GitReference, - GitReflog, - GitRemote, - GitRevision, - GitStash, - GitStashCommit, - GitStatus, - GitStatusFile, - GitTag, - GitTreeEntry, - GitUser, - GitWorktree, - isUserMatch, Repository, RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent, - TagSortOptions, -} from '../../../git/models'; +} from '../../../git/models/repository'; +import type { GitStash } from '../../../git/models/stash'; +import { GitStatus, GitStatusFile } from '../../../git/models/status'; +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, diff --git a/src/extension.ts b/src/extension.ts index 14131f8..8a489c2 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -8,7 +8,8 @@ import { Commands, ContextKeys, CoreCommands } from './constants'; import { Container } from './container'; import { setContext } from './context'; import { GitUri } from './git/gitUri'; -import { GitBranch, GitCommit } from './git/models'; +import { GitBranch } from './git/models/branch'; +import { GitCommit } from './git/models/commit'; import { Logger, LogLevel } from './logger'; import { Messages } from './messages'; import { registerPartnerActionRunners } from './partners'; diff --git a/src/git/formatters/commitFormatter.ts b/src/git/formatters/commitFormatter.ts index 5ef27a6..71473fd 100644 --- a/src/git/formatters/commitFormatter.ts +++ b/src/git/formatters/commitFormatter.ts @@ -22,10 +22,14 @@ import { emojify } from '../../emojis'; import { join, map } from '../../system/iterable'; import { PromiseCancelledError } from '../../system/promise'; import { escapeMarkdown, getSuperscript, TokenOptions } from '../../system/string'; -import { ContactPresence } from '../../vsls/vsls'; -import { PreviousLineComparisonUrisResult } from '../gitProvider'; -import { GitCommit, GitRemote, GitRevision, IssueOrPullRequest, PullRequest } from '../models'; -import { RemoteProvider } from '../remotes/provider'; +import type { ContactPresence } from '../../vsls/vsls'; +import type { PreviousLineComparisonUrisResult } from '../gitProvider'; +import { GitCommit } from '../models/commit'; +import type { IssueOrPullRequest } from '../models/issue'; +import { PullRequest } from '../models/pullRequest'; +import { GitRevision } from '../models/reference'; +import { GitRemote } from '../models/remote'; +import type { RemoteProvider } from '../remotes/provider'; import { FormatOptions, Formatter } from './formatter'; export interface CommitFormatOptions extends FormatOptions { diff --git a/src/git/fsProvider.ts b/src/git/fsProvider.ts index cc9762a..acb8b08 100644 --- a/src/git/fsProvider.ts +++ b/src/git/fsProvider.ts @@ -12,13 +12,14 @@ import { } from 'vscode'; import { isLinux } from '@env/platform'; import { Schemes } from '../constants'; -import { Container } from '../container'; +import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; import { debug } from '../system/decorators/log'; import { map } from '../system/iterable'; import { normalizePath, relative } from '../system/path'; import { TernarySearchTree } from '../system/searchTree'; -import { GitRevision, GitTreeEntry } from './models'; +import { GitRevision } from './models/reference'; +import type { GitTreeEntry } from './models/tree'; const emptyArray = new Uint8Array(0); diff --git a/src/git/gitProvider.ts b/src/git/gitProvider.ts index 324c327..f76e642 100644 --- a/src/git/gitProvider.ts +++ b/src/git/gitProvider.ts @@ -1,38 +1,27 @@ import { Disposable, Event, Range, TextDocument, Uri, WorkspaceFolder } from 'vscode'; import type { Commit, InputBox } from '../@types/vscode.git'; -import { ForcePushMode } from '../@types/vscode.git.enums'; -import { Features } from '../features'; +import type { ForcePushMode } from '../@types/vscode.git.enums'; +import type { Features } from '../features'; import type { GitUri } from './gitUri'; -import type { - BranchSortOptions, - GitBlame, - GitBlameLine, - GitBlameLines, - GitBranch, - GitBranchReference, - GitCommit, - GitContributor, - GitDiff, - GitDiffFilter, - GitDiffHunkLine, - GitDiffShortStat, - GitFile, - GitLog, - GitMergeStatus, - GitRebaseStatus, - GitReflog, - GitRemote, - GitStash, - GitStatus, - GitStatusFile, - GitTag, - GitTreeEntry, - GitUser, - GitWorktree, - Repository, - RepositoryChangeEvent, - TagSortOptions, -} from './models'; +import type { GitBlame, GitBlameLine, GitBlameLines } from './models/blame'; +import type { BranchSortOptions, GitBranch } from './models/branch'; +import type { GitCommit } from './models/commit'; +import type { GitContributor } from './models/contributor'; +import type { GitDiff, GitDiffFilter, GitDiffHunkLine, GitDiffShortStat } from './models/diff'; +import type { GitFile } from './models/file'; +import type { GitLog } from './models/log'; +import type { GitMergeStatus } from './models/merge'; +import type { GitRebaseStatus } from './models/rebase'; +import type { GitBranchReference } from './models/reference'; +import type { GitReflog } from './models/reflog'; +import type { GitRemote } from './models/remote'; +import type { Repository, RepositoryChangeEvent } from './models/repository'; +import type { GitStash } from './models/stash'; +import type { GitStatus, GitStatusFile } from './models/status'; +import type { GitTag, TagSortOptions } from './models/tag'; +import type { GitTreeEntry } from './models/tree'; +import type { GitUser } from './models/user'; +import type { GitWorktree } from './models/worktree'; import type { RemoteProviders } from './remotes/factory'; import type { RemoteProvider, RichRemoteProvider } from './remotes/provider'; import type { SearchPattern } from './search'; diff --git a/src/git/gitProviderService.ts b/src/git/gitProviderService.ts index 07e5e3f..982df96 100644 --- a/src/git/gitProviderService.ts +++ b/src/git/gitProviderService.ts @@ -53,46 +53,35 @@ import { RepositoryVisibility, ScmRepository, } from './gitProvider'; -import { GitUri } from './gitUri'; +import type { GitUri } from './gitUri'; +import type { GitBlame, GitBlameLine, GitBlameLines } from './models/blame'; +import type { BranchSortOptions, GitBranch } from './models/branch'; +import type { GitCommit } from './models/commit'; +import type { GitContributor } from './models/contributor'; +import type { GitDiff, GitDiffFilter, GitDiffHunkLine, GitDiffShortStat } from './models/diff'; +import type { GitFile } from './models/file'; +import type { GitLog } from './models/log'; +import type { GitMergeStatus } from './models/merge'; +import type { PullRequest, PullRequestState } from './models/pullRequest'; +import type { GitRebaseStatus } from './models/rebase'; +import { GitBranchReference, GitReference, GitRevision } from './models/reference'; +import type { GitReflog } from './models/reflog'; +import { GitRemote } from './models/remote'; import { - BranchSortOptions, - GitBlame, - GitBlameLine, - GitBlameLines, - GitBranch, - GitBranchReference, - GitCommit, - GitContributor, - GitDiff, - GitDiffFilter, - GitDiffHunkLine, - GitDiffShortStat, - GitFile, - GitLog, - GitMergeStatus, - GitRebaseStatus, - GitReference, - GitReflog, - GitRemote, - GitRevision, - GitStash, - GitStatus, - GitStatusFile, - GitTag, - GitTreeEntry, - GitUser, - GitWorktree, - PullRequest, - PullRequestState, Repository, RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent, - TagSortOptions, -} from './models'; -import { RemoteProviders } from './remotes/factory'; +} from './models/repository'; +import type { GitStash } from './models/stash'; +import type { GitStatus, GitStatusFile } from './models/status'; +import type { GitTag, TagSortOptions } from './models/tag'; +import type { GitTreeEntry } from './models/tree'; +import type { GitUser } from './models/user'; +import type { GitWorktree } from './models/worktree'; +import type { RemoteProviders } from './remotes/factory'; import { Authentication, RemoteProvider, RichRemoteProvider } from './remotes/provider'; -import { SearchPattern } from './search'; +import type { SearchPattern } from './search'; const maxDefaultBranchWeight = 100; const weightedDefaultBranches = new Map([ diff --git a/src/git/gitUri.ts b/src/git/gitUri.ts index 6964aca..b9921b2 100644 --- a/src/git/gitUri.ts +++ b/src/git/gitUri.ts @@ -12,7 +12,8 @@ import { basename, getBestPath, normalizePath, relativeDir, splitPath } from '.. // import { CharCode } from '../system/string'; import { isVirtualUri } from '../system/utils'; import type { RevisionUriData } from './gitProvider'; -import { GitFile, GitRevision } from './models'; +import type { GitFile } from './models/file'; +import { GitRevision } from './models/reference'; const slash = 47; //CharCode.Slash; diff --git a/src/git/models.ts b/src/git/models.ts deleted file mode 100644 index 512bb59..0000000 --- a/src/git/models.ts +++ /dev/null @@ -1,25 +0,0 @@ -export * from './models/author'; -export * from './models/blame'; -export * from './models/branch'; -export * from './models/commit'; -export * from './models/contributor'; -export * from './models/defaultBranch'; -export * from './models/diff'; -export * from './models/file'; -export * from './models/issue'; -export * from './models/log'; -export * from './models/merge'; -export * from './models/pullRequest'; -export * from './models/reference'; -export * from './models/rebase'; -export * from './models/reflog'; -export * from './models/remote'; -export * from './models/remoteProvider'; -export * from './models/repository'; -export * from './models/shortlog'; -export * from './models/stash'; -export * from './models/status'; -export * from './models/tag'; -export * from './models/tree'; -export * from './models/user'; -export * from './models/worktree'; diff --git a/src/git/parsers/blameParser.ts b/src/git/parsers/blameParser.ts index 19d5706..7ed20d4 100644 --- a/src/git/parsers/blameParser.ts +++ b/src/git/parsers/blameParser.ts @@ -1,17 +1,11 @@ import type { Container } from '../../container'; import { debug } from '../../system/decorators/log'; import { getLines } from '../../system/string'; -import { - GitBlame, - GitBlameAuthor, - GitCommit, - GitCommitIdentity, - GitCommitLine, - GitFileChange, - GitFileIndexStatus, - GitRevision, - GitUser, -} from '../models'; +import type { GitBlame, GitBlameAuthor } from '../models/blame'; +import { GitCommit, GitCommitIdentity, GitCommitLine } from '../models/commit'; +import { GitFileChange, GitFileIndexStatus } from '../models/file'; +import { GitRevision } from '../models/reference'; +import type { GitUser } from '../models/user'; interface BlameEntry { sha: string; diff --git a/src/git/parsers/logParser.ts b/src/git/parsers/logParser.ts index 52576c7..64dc181 100644 --- a/src/git/parsers/logParser.ts +++ b/src/git/parsers/logParser.ts @@ -4,19 +4,11 @@ import { filterMap } from '../../system/array'; import { debug } from '../../system/decorators/log'; import { normalizePath, relative } from '../../system/path'; import { getLines } from '../../system/string'; -import { - GitCommit, - GitCommitIdentity, - GitCommitLine, - GitFile, - GitFileChange, - GitFileChangeStats, - GitFileIndexStatus, - GitLog, - GitRevision, - GitUser, - isUserMatch, -} from '../models'; +import { GitCommit, GitCommitIdentity, GitCommitLine } from '../models/commit'; +import { GitFile, GitFileChange, GitFileChangeStats, GitFileIndexStatus } from '../models/file'; +import type { GitLog } from '../models/log'; +import { GitRevision } from '../models/reference'; +import { GitUser, isUserMatch } from '../models/user'; const diffRegex = /diff --git a\/(.*) b\/(.*)/; const diffRangeRegex = /^@@ -(\d+?),(\d+?) \+(\d+?),(\d+?) @@/; diff --git a/src/git/parsers/remoteParser.ts b/src/git/parsers/remoteParser.ts index 44f9a98..3fb96b2 100644 --- a/src/git/parsers/remoteParser.ts +++ b/src/git/parsers/remoteParser.ts @@ -1,7 +1,6 @@ import { debug } from '../../system/decorators/log'; -import { GitRemote } from '../models'; -import { GitRemoteType } from '../models/remote'; -import { RemoteProvider } from '../remotes/provider'; +import { GitRemote, GitRemoteType } from '../models/remote'; +import type { RemoteProvider } from '../remotes/provider'; const emptyStr = ''; diff --git a/src/git/parsers/statusParser.ts b/src/git/parsers/statusParser.ts index 198af3f..d8c40c3 100644 --- a/src/git/parsers/statusParser.ts +++ b/src/git/parsers/statusParser.ts @@ -1,6 +1,6 @@ import { debug } from '../../system/decorators/log'; import { normalizePath } from '../../system/path'; -import { GitStatus, GitStatusFile } from '../models'; +import { GitStatus, GitStatusFile } from '../models/status'; const emptyStr = ''; diff --git a/src/git/parsers/tagParser.ts b/src/git/parsers/tagParser.ts index 1f0a87c..41117e8 100644 --- a/src/git/parsers/tagParser.ts +++ b/src/git/parsers/tagParser.ts @@ -1,5 +1,5 @@ import { debug } from '../../system/decorators/log'; -import { GitTag } from '../models'; +import { GitTag } from '../models/tag'; const tagRegex = /^(.+)<\*r>(.*)(.*)(.*)(.*)(.*)$/gm; diff --git a/src/git/parsers/treeParser.ts b/src/git/parsers/treeParser.ts index 8174d49..279a5a8 100644 --- a/src/git/parsers/treeParser.ts +++ b/src/git/parsers/treeParser.ts @@ -1,5 +1,5 @@ import { debug } from '../../system/decorators/log'; -import { GitTreeEntry } from '../models'; +import { GitTreeEntry } from '../models/tree'; const emptyStr = ''; const treeRegex = /(?:.+?)\s+(.+?)\s+(.+?)\s+(.+?)\s+(.+)/gm; diff --git a/src/git/remotes/bitbucket-server.ts b/src/git/remotes/bitbucket-server.ts index 206641e..7231026 100644 --- a/src/git/remotes/bitbucket-server.ts +++ b/src/git/remotes/bitbucket-server.ts @@ -1,8 +1,8 @@ import { Range, Uri } from 'vscode'; -import { DynamicAutolinkReference } from '../../annotations/autolinks'; +import type { DynamicAutolinkReference } from '../../annotations/autolinks'; import { AutolinkReference, AutolinkType } from '../../config'; -import { GitRevision } from '../models'; -import { Repository } from '../models/repository'; +import { GitRevision } from '../models/reference'; +import type { Repository } from '../models/repository'; import { RemoteProvider } from './provider'; const fileRegex = /^\/([^/]+)\/([^/]+?)\/src(.+)$/i; diff --git a/src/git/remotes/bitbucket.ts b/src/git/remotes/bitbucket.ts index bc5a9fc..9666caf 100644 --- a/src/git/remotes/bitbucket.ts +++ b/src/git/remotes/bitbucket.ts @@ -1,8 +1,8 @@ import { Range, Uri } from 'vscode'; -import { DynamicAutolinkReference } from '../../annotations/autolinks'; +import type { DynamicAutolinkReference } from '../../annotations/autolinks'; import { AutolinkReference, AutolinkType } from '../../config'; -import { GitRevision } from '../models'; -import { Repository } from '../models/repository'; +import { GitRevision } from '../models/reference'; +import type { Repository } from '../models/repository'; import { RemoteProvider } from './provider'; const fileRegex = /^\/([^/]+)\/([^/]+?)\/src(.+)$/i; diff --git a/src/git/remotes/gerrit.ts b/src/git/remotes/gerrit.ts index cb83521..a22cc9b 100644 --- a/src/git/remotes/gerrit.ts +++ b/src/git/remotes/gerrit.ts @@ -1,8 +1,8 @@ import { Range, Uri } from 'vscode'; -import { DynamicAutolinkReference } from '../../annotations/autolinks'; -import { AutolinkReference } from '../../config'; -import { GitRevision } from '../models'; -import { Repository } from '../models/repository'; +import type { DynamicAutolinkReference } from '../../annotations/autolinks'; +import type { AutolinkReference } from '../../config'; +import { GitRevision } from '../models/reference'; +import type { Repository } from '../models/repository'; import { RemoteProvider } from './provider'; const fileRegex = /^\/([^/]+)\/\+(.+)$/i; diff --git a/src/git/remotes/gitea.ts b/src/git/remotes/gitea.ts index 3355272..a2bffa2 100644 --- a/src/git/remotes/gitea.ts +++ b/src/git/remotes/gitea.ts @@ -1,8 +1,8 @@ import { Range, Uri } from 'vscode'; -import { DynamicAutolinkReference } from '../../annotations/autolinks'; +import type { DynamicAutolinkReference } from '../../annotations/autolinks'; import { AutolinkReference, AutolinkType } from '../../config'; -import { GitRevision } from '../models'; -import { Repository } from '../models/repository'; +import { GitRevision } from '../models/reference'; +import type { Repository } from '../models/repository'; import { RemoteProvider } from './provider'; const fileRegex = /^\/([^/]+)\/([^/]+?)\/src(.+)$/i; diff --git a/src/git/remotes/github.ts b/src/git/remotes/github.ts index cbf7b35..9f9f99b 100644 --- a/src/git/remotes/github.ts +++ b/src/git/remotes/github.ts @@ -6,15 +6,12 @@ import { isSubscriptionPaidPlan, isSubscriptionPreviewTrialExpired } from '../.. import { log } from '../../system/decorators/log'; import { memoize } from '../../system/decorators/memoize'; import { equalsIgnoreCase } from '../../system/string'; -import { - type Account, - type DefaultBranch, - GitRevision, - type IssueOrPullRequest, - type PullRequest, - type PullRequestState, - type Repository, -} from '../models'; +import type { Account } from '../models/author'; +import type { DefaultBranch } from '../models/defaultBranch'; +import type { IssueOrPullRequest } from '../models/issue'; +import type { PullRequest, PullRequestState } from '../models/pullRequest'; +import { GitRevision } from '../models/reference'; +import type { Repository } from '../models/repository'; import { RichRemoteProvider } from './provider'; const autolinkFullIssuesRegex = /\b(?[^/\s]+\/[^/\s]+)#(?[0-9]+)\b(?!]\()/g; diff --git a/src/git/remotes/gitlab.ts b/src/git/remotes/gitlab.ts index bf134df..adb9f63 100644 --- a/src/git/remotes/gitlab.ts +++ b/src/git/remotes/gitlab.ts @@ -2,22 +2,19 @@ import { AuthenticationSession, Disposable, env, QuickInputButton, Range, ThemeI import type { Autolink, DynamicAutolinkReference } from '../../annotations/autolinks'; import { AutolinkReference, AutolinkType } from '../../config'; import { Container } from '../../container'; -import { +import type { IntegrationAuthenticationProvider, IntegrationAuthenticationSessionDescriptor, } from '../../plus/integrationAuthentication'; import { isSubscriptionPaidPlan, isSubscriptionPreviewTrialExpired } from '../../subscription'; import { log } from '../../system/decorators/log'; import { equalsIgnoreCase } from '../../system/string'; -import { - type Account, - type DefaultBranch, - GitRevision, - type IssueOrPullRequest, - type PullRequest, - type PullRequestState, - type Repository, -} from '../models'; +import type { Account } from '../models/author'; +import type { DefaultBranch } from '../models/defaultBranch'; +import type { IssueOrPullRequest } from '../models/issue'; +import type { PullRequest, PullRequestState } from '../models/pullRequest'; +import { GitRevision } from '../models/reference'; +import type { Repository } from '../models/repository'; import { RichRemoteProvider } from './provider'; const autolinkFullIssuesRegex = /\b(?[^/\s]+\/[^/\s]+)#(?[0-9]+)\b(?!]\()/g; diff --git a/src/git/remotes/provider.ts b/src/git/remotes/provider.ts index a5ac65b..f95f07a 100644 --- a/src/git/remotes/provider.ts +++ b/src/git/remotes/provider.ts @@ -12,8 +12,8 @@ import { } from 'vscode'; import { wrapForForcedInsecureSSL } from '@env/fetch'; import { isWeb } from '@env/platform'; -import { DynamicAutolinkReference } from '../../annotations/autolinks'; -import { AutolinkReference } from '../../config'; +import type { DynamicAutolinkReference } from '../../annotations/autolinks'; +import type { AutolinkReference } from '../../config'; import { configuration } from '../../configuration'; import { Container } from '../../container'; import { AuthenticationError, ProviderRequestClientError } from '../../errors'; @@ -25,16 +25,13 @@ import { gate } from '../../system/decorators/gate'; import { debug, log } from '../../system/decorators/log'; import { encodeUrl } from '../../system/encoding'; import { isPromise } from '../../system/promise'; -import { - Account, - DefaultBranch, - GitCommit, - IssueOrPullRequest, - PullRequest, - PullRequestState, - RemoteProviderReference, - Repository, -} from '../models'; +import type { Account } from '../models/author'; +import type { GitCommit } from '../models/commit'; +import type { DefaultBranch } from '../models/defaultBranch'; +import type { IssueOrPullRequest } from '../models/issue'; +import type { PullRequest, PullRequestState } from '../models/pullRequest'; +import type { RemoteProviderReference } from '../models/remoteProvider'; +import type { Repository } from '../models/repository'; export const enum RemoteResourceType { Branch = 'branch', diff --git a/src/git/search.ts b/src/git/search.ts index f5ffcec..804ff8d 100644 --- a/src/git/search.ts +++ b/src/git/search.ts @@ -1,4 +1,4 @@ -import { GitRevision, GitRevisionReference } from './models'; +import { GitRevision, GitRevisionReference } from './models/reference'; export type SearchOperators = | '' diff --git a/src/hovers/hovers.ts b/src/hovers/hovers.ts index a8920d1..18440cf 100644 --- a/src/hovers/hovers.ts +++ b/src/hovers/hovers.ts @@ -6,7 +6,11 @@ import { GlyphChars } from '../constants'; import { Container } from '../container'; import { CommitFormatter } from '../git/formatters'; import { GitUri } from '../git/gitUri'; -import { GitCommit, GitDiffHunk, GitDiffHunkLine, GitRemote, GitRevision, PullRequest } from '../git/models'; +import type { GitCommit } from '../git/models/commit'; +import type { GitDiffHunk, GitDiffHunkLine } from '../git/models/diff'; +import type { PullRequest } from '../git/models/pullRequest'; +import { GitRevision } from '../git/models/reference'; +import type { GitRemote } from '../git/models/remote'; import { Logger, LogLevel } from '../logger'; import { count } from '../system/iterable'; import { PromiseCancelledError } from '../system/promise'; diff --git a/src/messages.ts b/src/messages.ts index 7553788..cc9dced 100644 --- a/src/messages.ts +++ b/src/messages.ts @@ -1,7 +1,7 @@ import { ConfigurationTarget, MessageItem, window } from 'vscode'; import { configuration, SuppressedMessages } from './configuration'; import { Commands } from './constants'; -import { GitCommit } from './git/models'; +import type { GitCommit } from './git/models/commit'; import { Logger } from './logger'; import { executeCommand } from './system/command'; diff --git a/src/plus/github/github.ts b/src/plus/github/github.ts index de33a42..1282e8a 100644 --- a/src/plus/github/github.ts +++ b/src/plus/github/github.ts @@ -16,8 +16,12 @@ import { ProviderRequestRateLimitError, } from '../../errors'; import { PagedResult, RepositoryVisibility } from '../../git/gitProvider'; -import { type DefaultBranch, GitRevision, type GitUser, type IssueOrPullRequest, PullRequest } from '../../git/models'; import type { Account } from '../../git/models/author'; +import type { DefaultBranch } from '../../git/models/defaultBranch'; +import type { IssueOrPullRequest } from '../../git/models/issue'; +import type { PullRequest } from '../../git/models/pullRequest'; +import { GitRevision } from '../../git/models/reference'; +import type { GitUser } from '../../git/models/user'; import { getGitHubNoReplyAddressParts } from '../../git/remotes/github'; import type { RichRemoteProvider } from '../../git/remotes/provider'; import { LogCorrelationContext, Logger, LogLevel } from '../../logger'; diff --git a/src/plus/github/githubGitProvider.ts b/src/plus/github/githubGitProvider.ts index 6469882..8c8191e 100644 --- a/src/plus/github/githubGitProvider.ts +++ b/src/plus/github/githubGitProvider.ts @@ -39,46 +39,26 @@ import { ScmRepository, } from '../../git/gitProvider'; import { GitUri } from '../../git/gitUri'; -import { - BranchSortOptions, - GitBlame, - GitBlameAuthor, - GitBlameLine, - GitBlameLines, - GitBranch, - GitBranchReference, - GitCommit, - GitCommitIdentity, - GitCommitLine, - GitContributor, - GitDiff, - GitDiffFilter, - GitDiffHunkLine, - GitDiffShortStat, - GitFile, - GitFileChange, - GitFileIndexStatus, - GitLog, - GitMergeStatus, - GitRebaseStatus, - GitReference, - GitReflog, - GitRemote, - GitRemoteType, - GitRevision, - GitStash, - GitStatus, - GitStatusFile, - GitTag, - GitTreeEntry, - GitUser, - isUserMatch, - Repository, - RepositoryChangeEvent, - TagSortOptions, -} from '../../git/models'; +import type { GitBlame, GitBlameAuthor, GitBlameLine, GitBlameLines } from '../../git/models/blame'; +import { BranchSortOptions, GitBranch } from '../../git/models/branch'; +import { GitCommit, GitCommitIdentity, GitCommitLine } from '../../git/models/commit'; +import { GitContributor } from '../../git/models/contributor'; +import type { GitDiff, GitDiffFilter, GitDiffHunkLine, GitDiffShortStat } from '../../git/models/diff'; +import { GitFile, GitFileChange, GitFileIndexStatus } from '../../git/models/file'; +import type { GitLog } from '../../git/models/log'; +import type { GitMergeStatus } from '../../git/models/merge'; +import type { GitRebaseStatus } from '../../git/models/rebase'; +import { GitBranchReference, GitReference, GitRevision } from '../../git/models/reference'; +import type { GitReflog } from '../../git/models/reflog'; +import { GitRemote, GitRemoteType } from '../../git/models/remote'; +import { Repository, RepositoryChangeEvent } from '../../git/models/repository'; +import type { GitStash } from '../../git/models/stash'; +import type { GitStatus, GitStatusFile } from '../../git/models/status'; +import { GitTag, TagSortOptions } from '../../git/models/tag'; +import type { GitTreeEntry } from '../../git/models/tree'; +import { GitUser, isUserMatch } from '../../git/models/user'; import { RemoteProviderFactory, RemoteProviders } from '../../git/remotes/factory'; -import { RemoteProvider, RichRemoteProvider } from '../../git/remotes/provider'; +import type { RemoteProvider, RichRemoteProvider } from '../../git/remotes/provider'; import { SearchPattern } from '../../git/search'; import { LogCorrelationContext, Logger } from '../../logger'; import { gate } from '../../system/decorators/gate'; @@ -87,7 +67,7 @@ import { filterMap, some } from '../../system/iterable'; import { isAbsolute, isFolderGlob, maybeUri, normalizePath, relative } from '../../system/path'; import { getSettledValue } from '../../system/promise'; import { CachedBlame, CachedLog, GitDocumentState } from '../../trackers/gitDocumentTracker'; -import { TrackedDocument } from '../../trackers/trackedDocument'; +import type { TrackedDocument } from '../../trackers/trackedDocument'; import { getRemoteHubApi, GitHubAuthorityMetadata, Metadata, RemoteHubApi } from '../remotehub'; import type { GitHubApi } from './github'; import { fromCommitFileStatus } from './models'; diff --git a/src/plus/github/models.ts b/src/plus/github/models.ts index 1b4f883..1c2f3b2 100644 --- a/src/plus/github/models.ts +++ b/src/plus/github/models.ts @@ -1,5 +1,7 @@ import type { Endpoints } from '@octokit/types'; -import { GitFileIndexStatus, type IssueOrPullRequestType, PullRequest, PullRequestState } from '../../git/models'; +import { GitFileIndexStatus } from '../../git/models/file'; +import type { IssueOrPullRequestType } from '../../git/models/issue'; +import { PullRequest, PullRequestState } from '../../git/models/pullRequest'; import type { RichRemoteProvider } from '../../git/remotes/provider'; export interface GitHubBlame { diff --git a/src/plus/gitlab/gitlab.ts b/src/plus/gitlab/gitlab.ts index 4e6dfa0..2db53be 100644 --- a/src/plus/gitlab/gitlab.ts +++ b/src/plus/gitlab/gitlab.ts @@ -13,7 +13,10 @@ import { ProviderRequestNotFoundError, ProviderRequestRateLimitError, } from '../../errors'; -import { Account, DefaultBranch, IssueOrPullRequest, IssueOrPullRequestType, PullRequest } from '../../git/models'; +import type { Account } from '../../git/models/author'; +import type { DefaultBranch } from '../../git/models/defaultBranch'; +import { IssueOrPullRequest, IssueOrPullRequestType } from '../../git/models/issue'; +import { PullRequest } from '../../git/models/pullRequest'; import type { RichRemoteProvider } from '../../git/remotes/provider'; import { LogCorrelationContext, Logger, LogLevel } from '../../logger'; import { Messages } from '../../messages'; diff --git a/src/plus/gitlab/models.ts b/src/plus/gitlab/models.ts index e8dfa7d..ed1a43a 100644 --- a/src/plus/gitlab/models.ts +++ b/src/plus/gitlab/models.ts @@ -1,4 +1,4 @@ -import { PullRequest, PullRequestState } from '../../git/models'; +import { PullRequest, PullRequestState } from '../../git/models/pullRequest'; import type { RichRemoteProvider } from '../../git/remotes/provider'; export interface GitLabUser { diff --git a/src/plus/webviews/timeline/timelineWebview.ts b/src/plus/webviews/timeline/timelineWebview.ts index 225451a..d40066a 100644 --- a/src/plus/webviews/timeline/timelineWebview.ts +++ b/src/plus/webviews/timeline/timelineWebview.ts @@ -7,7 +7,11 @@ import type { Container } from '../../../container'; import { setContext } from '../../../context'; import { PlusFeatures } from '../../../features'; import { GitUri } from '../../../git/gitUri'; -import { RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../../../git/models'; +import { + RepositoryChange, + RepositoryChangeComparisonMode, + RepositoryChangeEvent, +} from '../../../git/models/repository'; import { createFromDateDelta } from '../../../system/date'; import { debug } from '../../../system/decorators/log'; import { debounce, Deferrable } from '../../../system/function'; diff --git a/src/plus/webviews/timeline/timelineWebviewView.ts b/src/plus/webviews/timeline/timelineWebviewView.ts index 08e689b..7ffbd3f 100644 --- a/src/plus/webviews/timeline/timelineWebviewView.ts +++ b/src/plus/webviews/timeline/timelineWebviewView.ts @@ -3,11 +3,15 @@ import { commands, Disposable, TextEditor, Uri, window } from 'vscode'; import type { ShowQuickCommitFileCommandArgs } from '../../../commands'; import { configuration } from '../../../configuration'; import { Commands } from '../../../constants'; -import { Container } from '../../../container'; +import type { Container } from '../../../container'; import { PlusFeatures } from '../../../features'; import type { RepositoriesChangeEvent } from '../../../git/gitProviderService'; import { GitUri } from '../../../git/gitUri'; -import { RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../../../git/models'; +import { + RepositoryChange, + RepositoryChangeComparisonMode, + RepositoryChangeEvent, +} from '../../../git/models/repository'; import { createFromDateDelta } from '../../../system/date'; import { debug } from '../../../system/decorators/log'; import { debounce, Deferrable } from '../../../system/function'; diff --git a/src/quickpicks/commitPicker.ts b/src/quickpicks/commitPicker.ts index 79650f0..066384c 100644 --- a/src/quickpicks/commitPicker.ts +++ b/src/quickpicks/commitPicker.ts @@ -1,7 +1,9 @@ import { Disposable, window } from 'vscode'; +import { GitCommit, GitStashCommit } from 'src/git/models/commit'; +import { GitLog } from 'src/git/models/log'; +import { GitStash } from 'src/git/models/stash'; import { configuration } from '../configuration'; import { Container } from '../container'; -import { GitCommit, GitLog, GitStash, GitStashCommit } from '../git/models'; import { KeyboardScope, Keys } from '../keyboard'; import { CommandQuickPickItem } from '../quickpicks/items/common'; import { filter, map } from '../system/iterable'; diff --git a/src/quickpicks/items/commits.ts b/src/quickpicks/items/commits.ts index a19d892..772038c 100644 --- a/src/quickpicks/items/commits.ts +++ b/src/quickpicks/items/commits.ts @@ -1,12 +1,14 @@ import { QuickPickItem, window } from 'vscode'; import { GitActions } from '../../commands/gitCommands.actions'; -import { OpenChangedFilesCommandArgs } from '../../commands/openChangedFiles'; +import type { OpenChangedFilesCommandArgs } from '../../commands/openChangedFiles'; import { QuickCommandButtons } from '../../commands/quickCommand.buttons'; import { Commands, GlyphChars } from '../../constants'; import { Container } from '../../container'; import { CommitFormatter } from '../../git/formatters'; -import { GitCommit, GitFile, GitFileChange, GitStatusFile } from '../../git/models'; -import { Keys } from '../../keyboard'; +import { GitCommit } from '../../git/models/commit'; +import { GitFile, GitFileChange } from '../../git/models/file'; +import type { GitStatusFile } from '../../git/models/status'; +import type { Keys } from '../../keyboard'; import { basename } from '../../system/path'; import { pad } from '../../system/string'; import { CommandQuickPickItem } from './common'; diff --git a/src/quickpicks/items/gitCommands.ts b/src/quickpicks/items/gitCommands.ts index a24978f..22ce414 100644 --- a/src/quickpicks/items/gitCommands.ts +++ b/src/quickpicks/items/gitCommands.ts @@ -4,18 +4,15 @@ import { getSteps } from '../../commands/gitCommands.utils'; import { Commands, GlyphChars } from '../../constants'; import { Container } from '../../container'; import { emojify } from '../../emojis'; -import { - GitBranch, - GitCommit, - GitContributor, - GitReference, - GitRemoteType, - GitRevision, - GitStatus, - GitTag, - GitWorktree, - Repository, -} from '../../git/models'; +import type { GitBranch } from '../../git/models/branch'; +import { GitCommit } from '../../git/models/commit'; +import type { GitContributor } from '../../git/models/contributor'; +import { GitReference, GitRevision } from '../../git/models/reference'; +import { GitRemoteType } from '../../git/models/remote'; +import type { Repository } from '../../git/models/repository'; +import type { GitStatus } from '../../git/models/status'; +import type { GitTag } from '../../git/models/tag'; +import type { GitWorktree } from '../../git/models/worktree'; import { fromNow } from '../../system/date'; import { pad } from '../../system/string'; import { CommandQuickPickItem, QuickPickItemOfT } from './common'; diff --git a/src/quickpicks/referencePicker.ts b/src/quickpicks/referencePicker.ts index ea2eb38..4d967c5 100644 --- a/src/quickpicks/referencePicker.ts +++ b/src/quickpicks/referencePicker.ts @@ -3,8 +3,10 @@ import { GitActions } from '../commands/gitCommands.actions'; import { getBranchesAndOrTags, getValidateGitReferenceFn, QuickCommandButtons } from '../commands/quickCommand'; import { GlyphChars } from '../constants'; import { Container } from '../container'; -import { BranchSortOptions, GitBranch, GitReference, GitTag, TagSortOptions } from '../git/models'; -import { KeyboardScope, Keys } from '../keyboard'; +import type { BranchSortOptions, GitBranch } from '../git/models/branch'; +import { GitReference } from '../git/models/reference'; +import type { GitTag, TagSortOptions } from '../git/models/tag'; +import type { KeyboardScope, Keys } from '../keyboard'; import { getQuickPickIgnoreFocusOut } from '../system/utils'; import { BranchQuickPickItem, RefQuickPickItem, TagQuickPickItem } from './items/gitCommands'; diff --git a/src/quickpicks/remoteProviderPicker.ts b/src/quickpicks/remoteProviderPicker.ts index 56a7c76..84afcfe 100644 --- a/src/quickpicks/remoteProviderPicker.ts +++ b/src/quickpicks/remoteProviderPicker.ts @@ -2,9 +2,10 @@ import { Disposable, env, QuickInputButton, ThemeIcon, Uri, window } from 'vscod import type { OpenOnRemoteCommandArgs } from '../commands'; import { Commands, GlyphChars } from '../constants'; import { Container } from '../container'; -import { GitBranch, GitRemote } from '../git/models'; +import { GitBranch } from '../git/models/branch'; +import { GitRemote } from '../git/models/remote'; import { getNameFromRemoteResource, RemoteProvider, RemoteResource, RemoteResourceType } from '../git/remotes/provider'; -import { Keys } from '../keyboard'; +import type { Keys } from '../keyboard'; import { CommandQuickPickItem } from '../quickpicks/items/common'; import { getSettledValue } from '../system/promise'; import { getQuickPickIgnoreFocusOut } from '../system/utils'; diff --git a/src/quickpicks/repositoryPicker.ts b/src/quickpicks/repositoryPicker.ts index 5c52dcb..e3bd2ec 100644 --- a/src/quickpicks/repositoryPicker.ts +++ b/src/quickpicks/repositoryPicker.ts @@ -1,6 +1,6 @@ import { Disposable, TextEditor, Uri, window } from 'vscode'; import { Container } from '../container'; -import { Repository } from '../git/models'; +import type { Repository } from '../git/models/repository'; import { map } from '../system/iterable'; import { getQuickPickIgnoreFocusOut } from '../system/utils'; import { CommandQuickPickItem } from './items/common'; diff --git a/src/statusbar/statusBarController.ts b/src/statusbar/statusBarController.ts index a48dc45..9cd2509 100644 --- a/src/statusbar/statusBarController.ts +++ b/src/statusbar/statusBarController.ts @@ -13,9 +13,10 @@ import { import type { ToggleFileChangesAnnotationCommandArgs } from '../commands/toggleFileAnnotations'; import { configuration, FileAnnotationType, StatusBarCommand } from '../configuration'; import { Commands, GlyphChars } from '../constants'; -import { Container } from '../container'; +import type { Container } from '../container'; import { CommitFormatter } from '../git/formatters'; -import { GitCommit, PullRequest } from '../git/models'; +import type { GitCommit } from '../git/models/commit'; +import type { PullRequest } from '../git/models/pullRequest'; import { Hovers } from '../hovers/hovers'; import { LogCorrelationContext, Logger } from '../logger'; import { asCommand } from '../system/command'; @@ -23,7 +24,7 @@ import { debug } from '../system/decorators/log'; import { once } from '../system/event'; import { PromiseCancelledError } from '../system/promise'; import { isTextEditor } from '../system/utils'; -import { LinesChangeEvent } from '../trackers/gitLineTracker'; +import type { LinesChangeEvent } from '../trackers/gitLineTracker'; export class StatusBarController implements Disposable { private _pullRequestCancellation: CancellationTokenSource | undefined; diff --git a/src/terminal/linkProvider.ts b/src/terminal/linkProvider.ts index 295bec3..e83f305 100644 --- a/src/terminal/linkProvider.ts +++ b/src/terminal/linkProvider.ts @@ -5,9 +5,11 @@ import type { ShowQuickCommitCommandArgs, } from '../commands'; import { Commands } from '../constants'; -import { Container } from '../container'; -import { PagedResult } from '../git/gitProvider'; -import { GitBranch, GitReference, GitTag } from '../git/models'; +import type { Container } from '../container'; +import type { PagedResult } from '../git/gitProvider'; +import type { GitBranch } from '../git/models/branch'; +import { GitReference } from '../git/models/reference'; +import type { GitTag } from '../git/models/tag'; const commandsRegexShared = /\b(g(?:it)?\b\s*)\b(branch|checkout|cherry-pick|fetch|grep|log|merge|pull|push|rebase|reset|revert|show|stash|status|tag)\b/gi; diff --git a/src/trackers/documentTracker.ts b/src/trackers/documentTracker.ts index 88fe5dd..8218816 100644 --- a/src/trackers/documentTracker.ts +++ b/src/trackers/documentTracker.ts @@ -17,11 +17,11 @@ import { } from 'vscode'; import { configuration } from '../configuration'; import { ContextKeys } from '../constants'; -import { Container } from '../container'; +import type { Container } from '../container'; import { setContext } from '../context'; -import { RepositoriesChangeEvent } from '../git/gitProviderService'; +import type { RepositoriesChangeEvent } from '../git/gitProviderService'; import { GitUri } from '../git/gitUri'; -import { RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../git/models'; +import { RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../git/models/repository'; import { debug } from '../system/decorators/log'; import { once } from '../system/event'; import { debounce, Deferrable } from '../system/function'; diff --git a/src/trackers/gitDocumentTracker.ts b/src/trackers/gitDocumentTracker.ts index 89a2244..651a974 100644 --- a/src/trackers/gitDocumentTracker.ts +++ b/src/trackers/gitDocumentTracker.ts @@ -1,5 +1,7 @@ import { TextDocument, Uri } from 'vscode'; -import { GitBlame, GitDiff, GitLog } from '../git/models'; +import type { GitBlame } from '../git/models/blame'; +import type { GitDiff } from '../git/models/diff'; +import type { GitLog } from '../git/models/log'; import { DocumentTracker } from './documentTracker'; export * from './documentTracker'; diff --git a/src/trackers/gitLineTracker.ts b/src/trackers/gitLineTracker.ts index 7067268..b877cee 100644 --- a/src/trackers/gitLineTracker.ts +++ b/src/trackers/gitLineTracker.ts @@ -1,11 +1,11 @@ import { Disposable, TextEditor } from 'vscode'; import { configuration } from '../configuration'; import { GlyphChars } from '../constants'; -import { Container } from '../container'; -import { GitCommit } from '../git/models'; +import type { Container } from '../container'; +import type { GitCommit } from '../git/models/commit'; import { Logger } from '../logger'; import { debug } from '../system/decorators/log'; -import { +import type { DocumentBlameStateChangeEvent, DocumentContentChangeEvent, DocumentDirtyIdleTriggerEvent, diff --git a/src/trackers/trackedDocument.ts b/src/trackers/trackedDocument.ts index cb02190..8be5816 100644 --- a/src/trackers/trackedDocument.ts +++ b/src/trackers/trackedDocument.ts @@ -1,9 +1,9 @@ import { Disposable, Event, EventEmitter, TextDocument, TextEditor } from 'vscode'; import { ContextKeys } from '../constants'; -import { Container } from '../container'; +import type { Container } from '../container'; import { setContext } from '../context'; import { GitUri } from '../git/gitUri'; -import { GitRevision } from '../git/models'; +import { GitRevision } from '../git/models/reference'; import { Logger } from '../logger'; import { debounce, Deferrable } from '../system/function'; import { getEditorIfActive, isActiveDocument } from '../system/utils'; diff --git a/src/views/branchesView.ts b/src/views/branchesView.ts index 7c62369..c9cbc4d 100644 --- a/src/views/branchesView.ts +++ b/src/views/branchesView.ts @@ -16,17 +16,11 @@ import { ViewShowBranchComparison, } from '../configuration'; import { Commands } from '../constants'; -import { Container } from '../container'; +import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { - GitBranchReference, - GitCommit, - GitReference, - GitRevisionReference, - RepositoryChange, - RepositoryChangeComparisonMode, - RepositoryChangeEvent, -} from '../git/models'; +import { GitCommit } from '../git/models/commit'; +import { GitBranchReference, GitReference, GitRevisionReference } from '../git/models/reference'; +import { RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../git/models/repository'; import { executeCommand } from '../system/command'; import { gate } from '../system/decorators/gate'; import { diff --git a/src/views/commitsView.ts b/src/views/commitsView.ts index 4d623b9..86a5c8d 100644 --- a/src/views/commitsView.ts +++ b/src/views/commitsView.ts @@ -13,15 +13,14 @@ import { Commands, ContextKeys, GlyphChars } from '../constants'; import { Container } from '../container'; import { setContext } from '../context'; import { GitUri } from '../git/gitUri'; +import { GitCommit } from '../git/models/commit'; +import { GitReference, GitRevisionReference } from '../git/models/reference'; import { - GitCommit, - GitReference, - GitRevisionReference, Repository, RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent, -} from '../git/models'; +} from '../git/models/repository'; import { executeCommand } from '../system/command'; import { gate } from '../system/decorators/gate'; import { debug } from '../system/decorators/log'; diff --git a/src/views/contributorsView.ts b/src/views/contributorsView.ts index fe2c26c..eaa9186 100644 --- a/src/views/contributorsView.ts +++ b/src/views/contributorsView.ts @@ -11,9 +11,10 @@ import { import { Avatars } from '../avatars'; import { configuration, ContributorsViewConfig, ViewFilesLayout } from '../configuration'; import { Commands } from '../constants'; -import { Container } from '../container'; +import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { GitContributor, RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../git/models'; +import type { GitContributor } from '../git/models/contributor'; +import { RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../git/models/repository'; import { executeCommand } from '../system/command'; import { gate } from '../system/decorators/gate'; import { debug } from '../system/decorators/log'; diff --git a/src/views/nodes/UncommittedFileNode.ts b/src/views/nodes/UncommittedFileNode.ts index e7106f0..e0f17d0 100644 --- a/src/views/nodes/UncommittedFileNode.ts +++ b/src/views/nodes/UncommittedFileNode.ts @@ -1,11 +1,11 @@ import { Command, TreeItem, TreeItemCollapsibleState } from 'vscode'; -import { DiffWithPreviousCommandArgs } from '../../commands'; +import type { DiffWithPreviousCommandArgs } from '../../commands'; import { Commands } from '../../constants'; import { StatusFileFormatter } from '../../git/formatters'; import { GitUri } from '../../git/gitUri'; -import { GitFile } from '../../git/models'; +import { GitFile } from '../../git/models/file'; import { dirname, joinPaths } from '../../system/path'; -import { ViewsWithCommits } from '../viewBase'; +import type { ViewsWithCommits } from '../viewBase'; import { FileNode } from './folderNode'; import { ContextValues, ViewNode } from './viewNode'; diff --git a/src/views/nodes/UncommittedFilesNode.ts b/src/views/nodes/UncommittedFilesNode.ts index 485ae5d..a53911f 100644 --- a/src/views/nodes/UncommittedFilesNode.ts +++ b/src/views/nodes/UncommittedFilesNode.ts @@ -2,21 +2,16 @@ import { ThemeIcon, TreeItem, TreeItemCollapsibleState } from 'vscode'; import { ViewFilesLayout } from '../../config'; import { GitUri } from '../../git/gitUri'; -import { - GitCommit, - GitCommitIdentity, - GitFileChange, - GitFileWithCommit, - GitRevision, - GitStatus, - GitStatusFile, - GitTrackingState, -} from '../../git/models'; +import type { GitTrackingState } from '../../git/models/branch'; +import { GitCommit, GitCommitIdentity } from '../../git/models/commit'; +import { GitFileChange, GitFileWithCommit } from '../../git/models/file'; +import { GitRevision } from '../../git/models/reference'; +import type { GitStatus, GitStatusFile } from '../../git/models/status'; import { groupBy, makeHierarchical } from '../../system/array'; import { flatMap } from '../../system/iterable'; import { joinPaths, normalizePath } from '../../system/path'; -import { RepositoriesView } from '../repositoriesView'; -import { WorktreesView } from '../worktreesView'; +import type { RepositoriesView } from '../repositoriesView'; +import type { WorktreesView } from '../worktreesView'; import { FileNode, FolderNode } from './folderNode'; import { RepositoryNode } from './repositoryNode'; import { UncommittedFileNode } from './UncommittedFileNode'; diff --git a/src/views/nodes/autolinkedItemNode.ts b/src/views/nodes/autolinkedItemNode.ts index 598cbfd..79ab33b 100644 --- a/src/views/nodes/autolinkedItemNode.ts +++ b/src/views/nodes/autolinkedItemNode.ts @@ -1,10 +1,10 @@ import { MarkdownString, ThemeIcon, TreeItem, TreeItemCollapsibleState } from 'vscode'; -import { Autolink } from '../../annotations/autolinks'; +import type { Autolink } from '../../annotations/autolinks'; import { AutolinkType } from '../../config'; import { GitUri } from '../../git/gitUri'; -import { IssueOrPullRequest, IssueOrPullRequestType } from '../../git/models'; +import { IssueOrPullRequest, IssueOrPullRequestType } from '../../git/models/issue'; import { fromNow } from '../../system/date'; -import { ViewsWithCommits } from '../viewBase'; +import type { ViewsWithCommits } from '../viewBase'; import { ContextValues, ViewNode } from './viewNode'; export class AutolinkedItemNode extends ViewNode { diff --git a/src/views/nodes/autolinkedItemsNode.ts b/src/views/nodes/autolinkedItemsNode.ts index d1624da..1037c9a 100644 --- a/src/views/nodes/autolinkedItemsNode.ts +++ b/src/views/nodes/autolinkedItemsNode.ts @@ -1,7 +1,9 @@ import { TreeItem, TreeItemCollapsibleState } from 'vscode'; import type { Autolink } from '../../annotations/autolinks'; import { GitUri } from '../../git/gitUri'; -import { GitLog, IssueOrPullRequest, PullRequest } from '../../git/models'; +import type { IssueOrPullRequest } from '../../git/models/issue'; +import type { GitLog } from '../../git/models/log'; +import { PullRequest } from '../../git/models/pullRequest'; import { gate } from '../../system/decorators/gate'; import { debug } from '../../system/decorators/log'; import { union } from '../../system/iterable'; diff --git a/src/views/nodes/branchNode.ts b/src/views/nodes/branchNode.ts index 108467d..f7e59f5 100644 --- a/src/views/nodes/branchNode.ts +++ b/src/views/nodes/branchNode.ts @@ -3,16 +3,12 @@ import { ViewBranchesLayout, ViewShowBranchComparison } from '../../configuratio import { Colors, GlyphChars } from '../../constants'; import { Container } from '../../container'; import { GitUri } from '../../git/gitUri'; -import { - GitBranch, - GitBranchReference, - GitLog, - GitRemote, - GitRemoteType, - GitUser, - PullRequest, - PullRequestState, -} from '../../git/models'; +import { GitBranch } from '../../git/models/branch'; +import { GitLog } from '../../git/models/log'; +import { PullRequest, PullRequestState } from '../../git/models/pullRequest'; +import { GitBranchReference } from '../../git/models/reference'; +import { GitRemote, GitRemoteType } from '../../git/models/remote'; +import { GitUser } from '../../git/models/user'; import { gate } from '../../system/decorators/gate'; import { debug, log } from '../../system/decorators/log'; import { map } from '../../system/iterable'; diff --git a/src/views/nodes/branchTrackingStatusFilesNode.ts b/src/views/nodes/branchTrackingStatusFilesNode.ts index 5cb4555..1c9d902 100644 --- a/src/views/nodes/branchTrackingStatusFilesNode.ts +++ b/src/views/nodes/branchTrackingStatusFilesNode.ts @@ -1,12 +1,14 @@ import { TreeItem, TreeItemCollapsibleState } from 'vscode'; import { ViewFilesLayout } from '../../configuration'; import { GitUri } from '../../git/gitUri'; -import { GitBranch, GitFileWithCommit, GitRevision } from '../../git/models'; +import type { GitBranch } from '../../git/models/branch'; +import type { GitFileWithCommit } from '../../git/models/file'; +import { GitRevision } from '../../git/models/reference'; import { groupBy, makeHierarchical } from '../../system/array'; import { filter, flatMap, map } from '../../system/iterable'; import { joinPaths, normalizePath } from '../../system/path'; import { pluralize, sortCompare } from '../../system/string'; -import { ViewsWithCommits } from '../viewBase'; +import type { ViewsWithCommits } from '../viewBase'; import { BranchNode } from './branchNode'; import { BranchTrackingStatus } from './branchTrackingStatusNode'; import { FileNode, FolderNode } from './folderNode'; diff --git a/src/views/nodes/branchTrackingStatusNode.ts b/src/views/nodes/branchTrackingStatusNode.ts index b4d1d63..d45040b 100644 --- a/src/views/nodes/branchTrackingStatusNode.ts +++ b/src/views/nodes/branchTrackingStatusNode.ts @@ -1,13 +1,16 @@ import { MarkdownString, ThemeColor, ThemeIcon, TreeItem, TreeItemCollapsibleState, window } from 'vscode'; import { Colors } from '../../constants'; import { GitUri } from '../../git/gitUri'; -import { GitBranch, GitLog, GitRemote, GitRevision, GitTrackingState } from '../../git/models'; +import { GitBranch, GitTrackingState } from '../../git/models/branch'; +import type { GitLog } from '../../git/models/log'; +import { GitRevision } from '../../git/models/reference'; +import { GitRemote } from '../../git/models/remote'; import { fromNow } from '../../system/date'; import { gate } from '../../system/decorators/gate'; import { debug } from '../../system/decorators/log'; import { first, map } from '../../system/iterable'; import { pluralize } from '../../system/string'; -import { ViewsWithCommits } from '../viewBase'; +import type { ViewsWithCommits } from '../viewBase'; import { BranchNode } from './branchNode'; import { BranchTrackingStatusFilesNode } from './branchTrackingStatusFilesNode'; import { CommitNode } from './commitNode'; diff --git a/src/views/nodes/branchesNode.ts b/src/views/nodes/branchesNode.ts index efc9d79..55dadf4 100644 --- a/src/views/nodes/branchesNode.ts +++ b/src/views/nodes/branchesNode.ts @@ -1,11 +1,11 @@ import { ThemeIcon, TreeItem, TreeItemCollapsibleState } from 'vscode'; import { ViewBranchesLayout } from '../../configuration'; import { GitUri } from '../../git/gitUri'; -import { Repository } from '../../git/models'; +import type { Repository } from '../../git/models/repository'; import { makeHierarchical } from '../../system/array'; import { gate } from '../../system/decorators/gate'; import { debug } from '../../system/decorators/log'; -import { BranchesView } from '../branchesView'; +import type { BranchesView } from '../branchesView'; import { RepositoriesView } from '../repositoriesView'; import { BranchNode } from './branchNode'; import { BranchOrTagFolderNode } from './branchOrTagFolderNode'; diff --git a/src/views/nodes/commitFileNode.ts b/src/views/nodes/commitFileNode.ts index 1ad8480..34db808 100644 --- a/src/views/nodes/commitFileNode.ts +++ b/src/views/nodes/commitFileNode.ts @@ -3,10 +3,13 @@ import type { DiffWithPreviousCommandArgs } from '../../commands'; import { Commands } from '../../constants'; import { StatusFileFormatter } from '../../git/formatters'; import { GitUri } from '../../git/gitUri'; -import { GitBranch, GitCommit, GitFile, GitRevisionReference } from '../../git/models'; +import type { GitBranch } from '../../git/models/branch'; +import type { GitCommit } from '../../git/models/commit'; +import { GitFile } from '../../git/models/file'; +import type { GitRevisionReference } from '../../git/models/reference'; import { joinPaths, relativeDir } from '../../system/path'; -import { FileHistoryView } from '../fileHistoryView'; -import { View, ViewsWithCommits } from '../viewBase'; +import type { FileHistoryView } from '../fileHistoryView'; +import type { View, ViewsWithCommits } from '../viewBase'; import { ContextValues, ViewNode, ViewRefFileNode } from './viewNode'; export class CommitFileNode extends ViewRefFileNode { diff --git a/src/views/nodes/commitNode.ts b/src/views/nodes/commitNode.ts index 3b880bc..0918e31 100644 --- a/src/views/nodes/commitNode.ts +++ b/src/views/nodes/commitNode.ts @@ -3,8 +3,12 @@ import type { DiffWithPreviousCommandArgs } from '../../commands'; import { configuration, ViewFilesLayout } from '../../configuration'; import { Colors, Commands } from '../../constants'; import { CommitFormatter } from '../../git/formatters'; -import { GitBranch, GitCommit, GitRemote, GitRevisionReference, PullRequest } from '../../git/models'; -import { RichRemoteProvider } from '../../git/remotes/provider'; +import type { GitBranch } from '../../git/models/branch'; +import type { GitCommit } from '../../git/models/commit'; +import type { PullRequest } from '../../git/models/pullRequest'; +import type { GitRevisionReference } from '../../git/models/reference'; +import type { GitRemote } from '../../git/models/remote'; +import type { RichRemoteProvider } from '../../git/remotes/provider'; import { makeHierarchical } from '../../system/array'; import { gate } from '../../system/decorators/gate'; import { joinPaths, normalizePath } from '../../system/path'; @@ -12,7 +16,7 @@ import { getSettledValue } from '../../system/promise'; import { sortCompare } from '../../system/string'; import { FileHistoryView } from '../fileHistoryView'; import { TagsView } from '../tagsView'; -import { ViewsWithCommits } from '../viewBase'; +import type { ViewsWithCommits } from '../viewBase'; import { CommitFileNode } from './commitFileNode'; import { FileNode, FolderNode } from './folderNode'; import { PullRequestNode } from './pullRequestNode'; diff --git a/src/views/nodes/compareBranchNode.ts b/src/views/nodes/compareBranchNode.ts index 396bc03..798cf9e 100644 --- a/src/views/nodes/compareBranchNode.ts +++ b/src/views/nodes/compareBranchNode.ts @@ -1,8 +1,9 @@ import { ThemeIcon, TreeItem, TreeItemCollapsibleState } from 'vscode'; import { ViewShowBranchComparison } from '../../configuration'; import { GlyphChars } from '../../constants'; -import { GitUri } from '../../git/gitUri'; -import { GitBranch, GitRevision } from '../../git/models'; +import type { GitUri } from '../../git/gitUri'; +import type { GitBranch } from '../../git/models/branch'; +import { GitRevision } from '../../git/models/reference'; import { CommandQuickPickItem } from '../../quickpicks/items/common'; import { ReferencePicker } from '../../quickpicks/referencePicker'; import { BranchComparison, BranchComparisons, WorkspaceStorageKeys } from '../../storage'; @@ -10,10 +11,10 @@ import { gate } from '../../system/decorators/gate'; import { debug, log } from '../../system/decorators/log'; import { getSettledValue } from '../../system/promise'; import { pluralize } from '../../system/string'; -import { BranchesView } from '../branchesView'; -import { CommitsView } from '../commitsView'; -import { RepositoriesView } from '../repositoriesView'; -import { WorktreesView } from '../worktreesView'; +import type { BranchesView } from '../branchesView'; +import type { CommitsView } from '../commitsView'; +import type { RepositoriesView } from '../repositoriesView'; +import type { WorktreesView } from '../worktreesView'; import { RepositoryNode } from './repositoryNode'; import { CommitsQueryResults, ResultsCommitsNode } from './resultsCommitsNode'; import { FilesQueryResults, ResultsFilesNode } from './resultsFilesNode'; diff --git a/src/views/nodes/compareResultsNode.ts b/src/views/nodes/compareResultsNode.ts index a06c3f0..56c6683 100644 --- a/src/views/nodes/compareResultsNode.ts +++ b/src/views/nodes/compareResultsNode.ts @@ -1,12 +1,12 @@ import { ThemeIcon, TreeItem, TreeItemCollapsibleState, window } from 'vscode'; import { GitUri } from '../../git/gitUri'; -import { GitRevision } from '../../git/models'; -import { NamedRef } from '../../storage'; +import { GitRevision } from '../../git/models/reference'; +import type { NamedRef } from '../../storage'; import { gate } from '../../system/decorators/gate'; import { debug, log } from '../../system/decorators/log'; import { getSettledValue } from '../../system/promise'; import { md5, pluralize } from '../../system/string'; -import { SearchAndCompareView } from '../searchAndCompareView'; +import type { SearchAndCompareView } from '../searchAndCompareView'; import { RepositoryNode } from './repositoryNode'; import { CommitsQueryResults, ResultsCommitsNode } from './resultsCommitsNode'; import { FilesQueryResults, ResultsFilesNode } from './resultsFilesNode'; diff --git a/src/views/nodes/contributorNode.ts b/src/views/nodes/contributorNode.ts index 2d00ce7..bd720cc 100644 --- a/src/views/nodes/contributorNode.ts +++ b/src/views/nodes/contributorNode.ts @@ -2,15 +2,16 @@ import { MarkdownString, TreeItem, TreeItemCollapsibleState, window } from 'vsco import { getPresenceDataUri } from '../../avatars'; import { configuration } from '../../configuration'; import { GlyphChars } from '../../constants'; -import { GitUri } from '../../git/gitUri'; -import { GitContributor, GitLog } from '../../git/models'; +import type { GitUri } from '../../git/gitUri'; +import type { GitContributor } from '../../git/models/contributor'; +import type { GitLog } from '../../git/models/log'; import { gate } from '../../system/decorators/gate'; import { debug } from '../../system/decorators/log'; import { map } from '../../system/iterable'; import { pluralize } from '../../system/string'; -import { ContactPresence } from '../../vsls/vsls'; -import { ContributorsView } from '../contributorsView'; -import { RepositoriesView } from '../repositoriesView'; +import type { ContactPresence } from '../../vsls/vsls'; +import type { ContributorsView } from '../contributorsView'; +import type { RepositoriesView } from '../repositoriesView'; import { CommitNode } from './commitNode'; import { LoadMoreNode, MessageNode } from './common'; import { insertDateMarkers } from './helpers'; diff --git a/src/views/nodes/contributorsNode.ts b/src/views/nodes/contributorsNode.ts index f100c6f..a1cc165 100644 --- a/src/views/nodes/contributorsNode.ts +++ b/src/views/nodes/contributorsNode.ts @@ -1,12 +1,13 @@ import { ThemeIcon, TreeItem, TreeItemCollapsibleState } from 'vscode'; import { configuration } from '../../configuration'; -import { GitUri } from '../../git/gitUri'; -import { GitContributor, Repository } from '../../git/models'; +import type { GitUri } from '../../git/gitUri'; +import { GitContributor } from '../../git/models/contributor'; +import type { Repository } from '../../git/models/repository'; import { gate } from '../../system/decorators/gate'; import { debug } from '../../system/decorators/log'; import { timeout } from '../../system/decorators/timeout'; -import { ContributorsView } from '../contributorsView'; -import { RepositoriesView } from '../repositoriesView'; +import type { ContributorsView } from '../contributorsView'; +import type { RepositoriesView } from '../repositoriesView'; import { MessageNode } from './common'; import { ContributorNode } from './contributorNode'; import { RepositoryNode } from './repositoryNode'; diff --git a/src/views/nodes/fileHistoryNode.ts b/src/views/nodes/fileHistoryNode.ts index 64a3aed..105b68c 100644 --- a/src/views/nodes/fileHistoryNode.ts +++ b/src/views/nodes/fileHistoryNode.ts @@ -1,22 +1,22 @@ import { Disposable, TreeItem, TreeItemCollapsibleState, Uri, window } from 'vscode'; import { configuration } from '../../configuration'; import type { GitUri } from '../../git/gitUri'; +import type { GitBranch } from '../../git/models/branch'; +import type { GitLog } from '../../git/models/log'; +import { GitRevision } from '../../git/models/reference'; import { - GitBranch, - GitLog, - GitRevision, RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent, RepositoryFileSystemChangeEvent, -} from '../../git/models'; +} from '../../git/models/repository'; import { Logger } from '../../logger'; import { gate } from '../../system/decorators/gate'; import { debug } from '../../system/decorators/log'; import { memoize } from '../../system/decorators/memoize'; import { filterMap, flatMap, map, uniqueBy } from '../../system/iterable'; import { basename } from '../../system/path'; -import { FileHistoryView } from '../fileHistoryView'; +import type { FileHistoryView } from '../fileHistoryView'; import { CommitNode } from './commitNode'; import { LoadMoreNode, MessageNode } from './common'; import { FileHistoryTrackerNode } from './fileHistoryTrackerNode'; diff --git a/src/views/nodes/fileHistoryTrackerNode.ts b/src/views/nodes/fileHistoryTrackerNode.ts index 5266dfb..55b139b 100644 --- a/src/views/nodes/fileHistoryTrackerNode.ts +++ b/src/views/nodes/fileHistoryTrackerNode.ts @@ -3,14 +3,14 @@ import { UriComparer } from '../../comparers'; import { ContextKeys } from '../../constants'; import { setContext } from '../../context'; import { GitCommitish, GitUri } from '../../git/gitUri'; -import { GitReference, GitRevision } from '../../git/models'; +import { GitReference, GitRevision } from '../../git/models/reference'; import { Logger } from '../../logger'; import { ReferencePicker } from '../../quickpicks/referencePicker'; import { gate } from '../../system/decorators/gate'; import { debug, log } from '../../system/decorators/log'; import { debounce, Deferrable } from '../../system/function'; import { isVirtualUri } from '../../system/utils'; -import { FileHistoryView } from '../fileHistoryView'; +import type { FileHistoryView } from '../fileHistoryView'; import { FileHistoryNode } from './fileHistoryNode'; import { ContextValues, SubscribeableViewNode, ViewNode } from './viewNode'; diff --git a/src/views/nodes/fileRevisionAsCommitNode.ts b/src/views/nodes/fileRevisionAsCommitNode.ts index cc04ced..8f1713f 100644 --- a/src/views/nodes/fileRevisionAsCommitNode.ts +++ b/src/views/nodes/fileRevisionAsCommitNode.ts @@ -13,12 +13,15 @@ import { configuration } from '../../configuration'; import { Colors, Commands } from '../../constants'; import { CommitFormatter, StatusFileFormatter } from '../../git/formatters'; import { GitUri } from '../../git/gitUri'; -import { GitBranch, GitCommit, GitFile, GitRevisionReference } from '../../git/models'; +import type { GitBranch } from '../../git/models/branch'; +import type { GitCommit } from '../../git/models/commit'; +import { GitFile } from '../../git/models/file'; +import type { GitRevisionReference } from '../../git/models/reference'; import { joinPaths } from '../../system/path'; import { getSettledValue } from '../../system/promise'; -import { FileHistoryView } from '../fileHistoryView'; -import { LineHistoryView } from '../lineHistoryView'; -import { ViewsWithCommits } from '../viewBase'; +import type { FileHistoryView } from '../fileHistoryView'; +import type { LineHistoryView } from '../lineHistoryView'; +import type { ViewsWithCommits } from '../viewBase'; import { MergeConflictCurrentChangesNode } from './mergeConflictCurrentChangesNode'; import { MergeConflictIncomingChangesNode } from './mergeConflictIncomingChangesNode'; import { ContextValues, ViewNode, ViewRefFileNode } from './viewNode'; diff --git a/src/views/nodes/folderNode.ts b/src/views/nodes/folderNode.ts index 35417bf..a5c3718 100644 --- a/src/views/nodes/folderNode.ts +++ b/src/views/nodes/folderNode.ts @@ -3,9 +3,9 @@ import { ViewFilesLayout, ViewsFilesConfig } from '../../configuration'; import { GitUri } from '../../git/gitUri'; import { HierarchicalItem } from '../../system/array'; import { sortCompare } from '../../system/string'; -import { FileHistoryView } from '../fileHistoryView'; -import { StashesView } from '../stashesView'; -import { ViewsWithCommits } from '../viewBase'; +import type { FileHistoryView } from '../fileHistoryView'; +import type { StashesView } from '../stashesView'; +import type { ViewsWithCommits } from '../viewBase'; import { ContextValues, ViewNode } from './viewNode'; export interface FileNode extends ViewNode { diff --git a/src/views/nodes/helpers.ts b/src/views/nodes/helpers.ts index d0675ee..a228e2c 100644 --- a/src/views/nodes/helpers.ts +++ b/src/views/nodes/helpers.ts @@ -1,4 +1,4 @@ -import { GitCommit } from '../../git/models'; +import type { GitCommit } from '../../git/models/commit'; import { MessageNode } from './common'; import { ContextValues, ViewNode } from './viewNode'; diff --git a/src/views/nodes/lineHistoryNode.ts b/src/views/nodes/lineHistoryNode.ts index 7770455..46c76cb 100644 --- a/src/views/nodes/lineHistoryNode.ts +++ b/src/views/nodes/lineHistoryNode.ts @@ -1,23 +1,22 @@ import { Disposable, Selection, TreeItem, TreeItemCollapsibleState, window } from 'vscode'; import type { GitUri } from '../../git/gitUri'; +import type { GitBranch } from '../../git/models/branch'; +import { GitFile, GitFileIndexStatus } from '../../git/models/file'; +import type { GitLog } from '../../git/models/log'; +import { GitRevision } from '../../git/models/reference'; import { - GitBranch, - GitFile, - GitFileIndexStatus, - GitLog, - GitRevision, RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent, RepositoryFileSystemChangeEvent, -} from '../../git/models'; +} from '../../git/models/repository'; import { Logger } from '../../logger'; import { gate } from '../../system/decorators/gate'; import { debug } from '../../system/decorators/log'; import { memoize } from '../../system/decorators/memoize'; import { filterMap } from '../../system/iterable'; -import { FileHistoryView } from '../fileHistoryView'; -import { LineHistoryView } from '../lineHistoryView'; +import type { FileHistoryView } from '../fileHistoryView'; +import type { LineHistoryView } from '../lineHistoryView'; import { LoadMoreNode, MessageNode } from './common'; import { FileRevisionAsCommitNode } from './fileRevisionAsCommitNode'; import { insertDateMarkers } from './helpers'; diff --git a/src/views/nodes/lineHistoryTrackerNode.ts b/src/views/nodes/lineHistoryTrackerNode.ts index 80030ed..15570b5 100644 --- a/src/views/nodes/lineHistoryTrackerNode.ts +++ b/src/views/nodes/lineHistoryTrackerNode.ts @@ -3,15 +3,15 @@ import { UriComparer } from '../../comparers'; import { ContextKeys } from '../../constants'; import { setContext } from '../../context'; import { GitCommitish, GitUri } from '../../git/gitUri'; -import { GitReference, GitRevision } from '../../git/models'; +import { GitReference, GitRevision } from '../../git/models/reference'; import { Logger } from '../../logger'; import { ReferencePicker } from '../../quickpicks/referencePicker'; import { gate } from '../../system/decorators/gate'; import { debug, log } from '../../system/decorators/log'; import { debounce } from '../../system/function'; -import { LinesChangeEvent } from '../../trackers/gitLineTracker'; -import { FileHistoryView } from '../fileHistoryView'; -import { LineHistoryView } from '../lineHistoryView'; +import type { LinesChangeEvent } from '../../trackers/gitLineTracker'; +import type { FileHistoryView } from '../fileHistoryView'; +import type { LineHistoryView } from '../lineHistoryView'; import { LineHistoryNode } from './lineHistoryNode'; import { ContextValues, SubscribeableViewNode, ViewNode } from './viewNode'; diff --git a/src/views/nodes/mergeConflictCurrentChangesNode.ts b/src/views/nodes/mergeConflictCurrentChangesNode.ts index 67961bb..fcd3bfb 100644 --- a/src/views/nodes/mergeConflictCurrentChangesNode.ts +++ b/src/views/nodes/mergeConflictCurrentChangesNode.ts @@ -4,10 +4,13 @@ import { configuration } from '../../configuration'; import { Commands, CoreCommands, GlyphChars } from '../../constants'; import { CommitFormatter } from '../../git/formatters'; import { GitUri } from '../../git/gitUri'; -import { GitFile, GitMergeStatus, GitRebaseStatus, GitReference } from '../../git/models'; -import { FileHistoryView } from '../fileHistoryView'; -import { LineHistoryView } from '../lineHistoryView'; -import { ViewsWithCommits } from '../viewBase'; +import type { GitFile } from '../../git/models/file'; +import type { GitMergeStatus } from '../../git/models/merge'; +import type { GitRebaseStatus } from '../../git/models/rebase'; +import { GitReference } from '../../git/models/reference'; +import type { FileHistoryView } from '../fileHistoryView'; +import type { LineHistoryView } from '../lineHistoryView'; +import type { ViewsWithCommits } from '../viewBase'; import { ContextValues, ViewNode } from './viewNode'; export class MergeConflictCurrentChangesNode extends ViewNode { diff --git a/src/views/nodes/mergeConflictFileNode.ts b/src/views/nodes/mergeConflictFileNode.ts index c48eca5..01171f1 100644 --- a/src/views/nodes/mergeConflictFileNode.ts +++ b/src/views/nodes/mergeConflictFileNode.ts @@ -2,9 +2,11 @@ import { Command, MarkdownString, ThemeIcon, TreeItem, TreeItemCollapsibleState, import { CoreCommands } from '../../constants'; import { StatusFileFormatter } from '../../git/formatters'; import { GitUri } from '../../git/gitUri'; -import { GitFile, GitMergeStatus, GitRebaseStatus } from '../../git/models'; +import type { GitFile } from '../../git/models/file'; +import type { GitMergeStatus } from '../../git/models/merge'; +import type { GitRebaseStatus } from '../../git/models/rebase'; import { relativeDir } from '../../system/path'; -import { ViewsWithCommits } from '../viewBase'; +import type { ViewsWithCommits } from '../viewBase'; import { FileNode } from './folderNode'; import { MergeConflictCurrentChangesNode } from './mergeConflictCurrentChangesNode'; import { MergeConflictIncomingChangesNode } from './mergeConflictIncomingChangesNode'; diff --git a/src/views/nodes/mergeConflictIncomingChangesNode.ts b/src/views/nodes/mergeConflictIncomingChangesNode.ts index 79682d0..e66519a 100644 --- a/src/views/nodes/mergeConflictIncomingChangesNode.ts +++ b/src/views/nodes/mergeConflictIncomingChangesNode.ts @@ -4,10 +4,13 @@ import { configuration } from '../../configuration'; import { Commands, CoreCommands, GlyphChars } from '../../constants'; import { CommitFormatter } from '../../git/formatters'; import { GitUri } from '../../git/gitUri'; -import { GitFile, GitMergeStatus, GitRebaseStatus, GitReference } from '../../git/models'; -import { FileHistoryView } from '../fileHistoryView'; -import { LineHistoryView } from '../lineHistoryView'; -import { ViewsWithCommits } from '../viewBase'; +import type { GitFile } from '../../git/models/file'; +import type { GitMergeStatus } from '../../git/models/merge'; +import type { GitRebaseStatus } from '../../git/models/rebase'; +import { GitReference } from '../../git/models/reference'; +import type { FileHistoryView } from '../fileHistoryView'; +import type { LineHistoryView } from '../lineHistoryView'; +import type { ViewsWithCommits } from '../viewBase'; import { ContextValues, ViewNode } from './viewNode'; export class MergeConflictIncomingChangesNode extends ViewNode { diff --git a/src/views/nodes/mergeStatusNode.ts b/src/views/nodes/mergeStatusNode.ts index 8f4ecfe..3e04a07 100644 --- a/src/views/nodes/mergeStatusNode.ts +++ b/src/views/nodes/mergeStatusNode.ts @@ -1,11 +1,14 @@ import { MarkdownString, ThemeColor, ThemeIcon, TreeItem, TreeItemCollapsibleState } from 'vscode'; import { ViewFilesLayout } from '../../configuration'; import { GitUri } from '../../git/gitUri'; -import { GitBranch, GitMergeStatus, GitReference, GitStatus } from '../../git/models'; +import type { GitBranch } from '../../git/models/branch'; +import type { GitMergeStatus } from '../../git/models/merge'; +import { GitReference } from '../../git/models/reference'; +import type { GitStatus } from '../../git/models/status'; import { makeHierarchical } from '../../system/array'; import { joinPaths, normalizePath } from '../../system/path'; import { pluralize, sortCompare } from '../../system/string'; -import { ViewsWithCommits } from '../viewBase'; +import type { ViewsWithCommits } from '../viewBase'; import { BranchNode } from './branchNode'; import { FileNode, FolderNode } from './folderNode'; import { MergeConflictFileNode } from './mergeConflictFileNode'; diff --git a/src/views/nodes/pullRequestNode.ts b/src/views/nodes/pullRequestNode.ts index f763a8f..e3a3c43 100644 --- a/src/views/nodes/pullRequestNode.ts +++ b/src/views/nodes/pullRequestNode.ts @@ -1,7 +1,9 @@ import { MarkdownString, TreeItem, TreeItemCollapsibleState } from 'vscode'; import { GitUri } from '../../git/gitUri'; -import { GitBranch, GitCommit, PullRequest, PullRequestState } from '../../git/models'; -import { ViewsWithCommits } from '../viewBase'; +import type { GitBranch } from '../../git/models/branch'; +import { GitCommit } from '../../git/models/commit'; +import { PullRequest, PullRequestState } from '../../git/models/pullRequest'; +import type { ViewsWithCommits } from '../viewBase'; import { RepositoryNode } from './repositoryNode'; import { ContextValues, ViewNode } from './viewNode'; diff --git a/src/views/nodes/rebaseStatusNode.ts b/src/views/nodes/rebaseStatusNode.ts index b2b56c9..ee1d4c9 100644 --- a/src/views/nodes/rebaseStatusNode.ts +++ b/src/views/nodes/rebaseStatusNode.ts @@ -4,13 +4,17 @@ import { configuration, ViewFilesLayout } from '../../configuration'; import { Commands, CoreCommands } from '../../constants'; import { CommitFormatter } from '../../git/formatters'; import { GitUri } from '../../git/gitUri'; -import { GitBranch, GitCommit, GitRebaseStatus, GitReference, GitRevisionReference, GitStatus } from '../../git/models'; +import type { GitBranch } from '../../git/models/branch'; +import type { GitCommit } from '../../git/models/commit'; +import type { GitRebaseStatus } from '../../git/models/rebase'; +import { GitReference, GitRevisionReference } from '../../git/models/reference'; +import type { GitStatus } from '../../git/models/status'; import { makeHierarchical } from '../../system/array'; import { executeCoreCommand } from '../../system/command'; import { joinPaths, normalizePath } from '../../system/path'; import { getSettledValue } from '../../system/promise'; import { pluralize, sortCompare } from '../../system/string'; -import { ViewsWithCommits } from '../viewBase'; +import type { ViewsWithCommits } from '../viewBase'; import { BranchNode } from './branchNode'; import { CommitFileNode } from './commitFileNode'; import { FileNode, FolderNode } from './folderNode'; diff --git a/src/views/nodes/reflogNode.ts b/src/views/nodes/reflogNode.ts index cbee16a..d7ff572 100644 --- a/src/views/nodes/reflogNode.ts +++ b/src/views/nodes/reflogNode.ts @@ -1,9 +1,10 @@ import { TreeItem, TreeItemCollapsibleState } from 'vscode'; -import { GitUri } from '../../git/gitUri'; -import { GitReflog, Repository } from '../../git/models'; +import type { GitUri } from '../../git/gitUri'; +import type { GitReflog } from '../../git/models/reflog'; +import type { Repository } from '../../git/models/repository'; import { gate } from '../../system/decorators/gate'; import { debug } from '../../system/decorators/log'; -import { RepositoriesView } from '../repositoriesView'; +import type { RepositoriesView } from '../repositoriesView'; import { LoadMoreNode, MessageNode } from './common'; import { ReflogRecordNode } from './reflogRecordNode'; import { RepositoryNode } from './repositoryNode'; diff --git a/src/views/nodes/reflogRecordNode.ts b/src/views/nodes/reflogRecordNode.ts index 27cfa24..4332bc8 100644 --- a/src/views/nodes/reflogRecordNode.ts +++ b/src/views/nodes/reflogRecordNode.ts @@ -1,11 +1,12 @@ import { TreeItem, TreeItemCollapsibleState, window } from 'vscode'; import { GlyphChars } from '../../constants'; import { GitUri } from '../../git/gitUri'; -import { GitLog, GitReflogRecord } from '../../git/models'; +import type { GitLog } from '../../git/models/log'; +import type { GitReflogRecord } from '../../git/models/reflog'; import { gate } from '../../system/decorators/gate'; import { debug } from '../../system/decorators/log'; import { map } from '../../system/iterable'; -import { ViewsWithCommits } from '../viewBase'; +import type { ViewsWithCommits } from '../viewBase'; import { CommitNode } from './commitNode'; import { LoadMoreNode, MessageNode } from './common'; import { RepositoryNode } from './repositoryNode'; diff --git a/src/views/nodes/remoteNode.ts b/src/views/nodes/remoteNode.ts index 2adb8f3..7940e02 100644 --- a/src/views/nodes/remoteNode.ts +++ b/src/views/nodes/remoteNode.ts @@ -2,11 +2,12 @@ import { ThemeIcon, TreeItem, TreeItemCollapsibleState, Uri } from 'vscode'; import { ViewBranchesLayout } from '../../configuration'; import { GlyphChars } from '../../constants'; import { GitUri } from '../../git/gitUri'; -import { GitRemote, GitRemoteType, Repository } from '../../git/models'; +import { GitRemote, GitRemoteType } from '../../git/models/remote'; +import type { Repository } from '../../git/models/repository'; import { makeHierarchical } from '../../system/array'; import { log } from '../../system/decorators/log'; -import { RemotesView } from '../remotesView'; -import { RepositoriesView } from '../repositoriesView'; +import type { RemotesView } from '../remotesView'; +import type { RepositoriesView } from '../repositoriesView'; import { BranchNode } from './branchNode'; import { BranchOrTagFolderNode } from './branchOrTagFolderNode'; import { MessageNode } from './common'; diff --git a/src/views/nodes/remotesNode.ts b/src/views/nodes/remotesNode.ts index 1fef2ad..ad39c3a 100644 --- a/src/views/nodes/remotesNode.ts +++ b/src/views/nodes/remotesNode.ts @@ -1,10 +1,10 @@ import { ThemeIcon, TreeItem, TreeItemCollapsibleState } from 'vscode'; -import { GitUri } from '../../git/gitUri'; -import { Repository } from '../../git/models'; +import type { GitUri } from '../../git/gitUri'; +import type { Repository } from '../../git/models/repository'; import { gate } from '../../system/decorators/gate'; import { debug } from '../../system/decorators/log'; -import { RemotesView } from '../remotesView'; -import { RepositoriesView } from '../repositoriesView'; +import type { RemotesView } from '../remotesView'; +import type { RepositoriesView } from '../repositoriesView'; import { MessageNode } from './common'; import { RemoteNode } from './remoteNode'; import { RepositoryNode } from './repositoryNode'; diff --git a/src/views/nodes/repositoryNode.ts b/src/views/nodes/repositoryNode.ts index 9796d2b..20f07f7 100644 --- a/src/views/nodes/repositoryNode.ts +++ b/src/views/nodes/repositoryNode.ts @@ -1,23 +1,23 @@ import { Disposable, MarkdownString, TreeItem, TreeItemCollapsibleState } from 'vscode'; import { GlyphChars } from '../../constants'; import { Features } from '../../features'; -import { GitUri } from '../../git/gitUri'; +import type { GitUri } from '../../git/gitUri'; +import { GitBranch } from '../../git/models/branch'; +import { GitRemote } from '../../git/models/remote'; import { - GitBranch, - GitRemote, - GitStatus, Repository, RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent, RepositoryFileSystemChangeEvent, -} from '../../git/models'; +} from '../../git/models/repository'; +import type { GitStatus } from '../../git/models/status'; import { findLastIndex } from '../../system/array'; import { gate } from '../../system/decorators/gate'; import { debug, log } from '../../system/decorators/log'; import { disposableInterval } from '../../system/function'; import { pad } from '../../system/string'; -import { RepositoriesView } from '../repositoriesView'; +import type { RepositoriesView } from '../repositoriesView'; import { BranchesNode } from './branchesNode'; import { BranchNode } from './branchNode'; import { BranchTrackingStatusNode } from './branchTrackingStatusNode'; diff --git a/src/views/nodes/resultsCommitsNode.ts b/src/views/nodes/resultsCommitsNode.ts index 002fca2..62c1362 100644 --- a/src/views/nodes/resultsCommitsNode.ts +++ b/src/views/nodes/resultsCommitsNode.ts @@ -1,7 +1,7 @@ import { TreeItem, TreeItemCollapsibleState } from 'vscode'; import { configuration } from '../../configuration'; import { GitUri } from '../../git/gitUri'; -import type { GitLog } from '../../git/models'; +import type { GitLog } from '../../git/models/log'; import { gate } from '../../system/decorators/gate'; import { debug } from '../../system/decorators/log'; import { map } from '../../system/iterable'; diff --git a/src/views/nodes/resultsFileNode.ts b/src/views/nodes/resultsFileNode.ts index ec577fc..84d69e9 100644 --- a/src/views/nodes/resultsFileNode.ts +++ b/src/views/nodes/resultsFileNode.ts @@ -3,9 +3,10 @@ import type { DiffWithCommandArgs } from '../../commands'; import { Commands } from '../../constants'; import { StatusFileFormatter } from '../../git/formatters'; import { GitUri } from '../../git/gitUri'; -import { GitFile, GitReference, GitRevisionReference } from '../../git/models'; +import { GitFile } from '../../git/models/file'; +import { GitReference, GitRevisionReference } from '../../git/models/reference'; import { joinPaths, relativeDir } from '../../system/path'; -import { View } from '../viewBase'; +import type { View } from '../viewBase'; import { FileNode } from './folderNode'; import { ContextValues, ViewNode, ViewRefFileNode } from './viewNode'; diff --git a/src/views/nodes/resultsFilesNode.ts b/src/views/nodes/resultsFilesNode.ts index 67fd01c..b8624aa 100644 --- a/src/views/nodes/resultsFilesNode.ts +++ b/src/views/nodes/resultsFilesNode.ts @@ -1,7 +1,8 @@ import { ThemeIcon, TreeItem, TreeItemCollapsibleState } from 'vscode'; import { ViewFilesLayout } from '../../configuration'; import { GitUri } from '../../git/gitUri'; -import { GitDiffShortStat, GitFile } from '../../git/models'; +import type { GitDiffShortStat } from '../../git/models/diff'; +import type { GitFile } from '../../git/models/file'; import { makeHierarchical } from '../../system/array'; import { gate } from '../../system/decorators/gate'; import { debug } from '../../system/decorators/log'; @@ -9,7 +10,7 @@ import { map } from '../../system/iterable'; import { joinPaths, normalizePath } from '../../system/path'; import { cancellable, PromiseCancelledError } from '../../system/promise'; import { pluralize, sortCompare } from '../../system/string'; -import { ViewsWithCommits } from '../viewBase'; +import type { ViewsWithCommits } from '../viewBase'; import { FileNode, FolderNode } from './folderNode'; import { ResultsFileNode } from './resultsFileNode'; import { ContextValues, ViewNode } from './viewNode'; diff --git a/src/views/nodes/searchResultsNode.ts b/src/views/nodes/searchResultsNode.ts index c05afbf..b35bd87 100644 --- a/src/views/nodes/searchResultsNode.ts +++ b/src/views/nodes/searchResultsNode.ts @@ -1,12 +1,12 @@ import { ThemeIcon, TreeItem } from 'vscode'; import { executeGitCommand } from '../../commands/gitCommands.actions'; import { GitUri } from '../../git/gitUri'; -import { GitLog } from '../../git/models'; +import type { GitLog } from '../../git/models/log'; import { SearchPattern } from '../../git/search'; import { gate } from '../../system/decorators/gate'; import { debug, log } from '../../system/decorators/log'; import { md5, pluralize } from '../../system/string'; -import { SearchAndCompareView } from '../searchAndCompareView'; +import type { SearchAndCompareView } from '../searchAndCompareView'; import { RepositoryNode } from './repositoryNode'; import { CommitsQueryResults, ResultsCommitsNode } from './resultsCommitsNode'; import { ContextValues, PageableViewNode, ViewNode } from './viewNode'; diff --git a/src/views/nodes/stashFileNode.ts b/src/views/nodes/stashFileNode.ts index 036862a..fbdf4b4 100644 --- a/src/views/nodes/stashFileNode.ts +++ b/src/views/nodes/stashFileNode.ts @@ -1,4 +1,5 @@ -import { GitFile, GitStashCommit } from '../../git/models'; +import { GitStashCommit } from 'src/git/models/commit'; +import { GitFile } from 'src/git/models/file'; import { RepositoriesView } from '../repositoriesView'; import { StashesView } from '../stashesView'; import { CommitFileNode } from './commitFileNode'; diff --git a/src/views/nodes/stashNode.ts b/src/views/nodes/stashNode.ts index 873a66a..f7ec01e 100644 --- a/src/views/nodes/stashNode.ts +++ b/src/views/nodes/stashNode.ts @@ -2,13 +2,14 @@ import { TreeItem, TreeItemCollapsibleState } from 'vscode'; import { ViewFilesLayout } from '../../config'; import { configuration } from '../../configuration'; import { CommitFormatter } from '../../git/formatters'; -import { GitStashCommit, GitStashReference } from '../../git/models'; +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 { RepositoriesView } from '../repositoriesView'; -import { StashesView } from '../stashesView'; +import type { RepositoriesView } from '../repositoriesView'; +import type { StashesView } from '../stashesView'; export class StashNode extends ViewRefNode { static key = ':stash'; diff --git a/src/views/nodes/stashesNode.ts b/src/views/nodes/stashesNode.ts index b32f642..97aff6f 100644 --- a/src/views/nodes/stashesNode.ts +++ b/src/views/nodes/stashesNode.ts @@ -1,11 +1,11 @@ import { TreeItem, TreeItemCollapsibleState } from 'vscode'; -import { GitUri } from '../../git/gitUri'; -import { Repository } from '../../git/models'; +import type { GitUri } from '../../git/gitUri'; +import type { Repository } from '../../git/models/repository'; import { gate } from '../../system/decorators/gate'; import { debug } from '../../system/decorators/log'; import { map } from '../../system/iterable'; -import { RepositoriesView } from '../repositoriesView'; -import { StashesView } from '../stashesView'; +import type { RepositoriesView } from '../repositoriesView'; +import type { StashesView } from '../stashesView'; import { MessageNode } from './common'; import { RepositoryNode } from './repositoryNode'; import { StashNode } from './stashNode'; diff --git a/src/views/nodes/statusFileNode.ts b/src/views/nodes/statusFileNode.ts index 9b952a2..f9db19e 100644 --- a/src/views/nodes/statusFileNode.ts +++ b/src/views/nodes/statusFileNode.ts @@ -1,13 +1,14 @@ import { Command, ThemeIcon, TreeItem, TreeItemCollapsibleState } from 'vscode'; import type { DiffWithCommandArgs } from '../../commands'; -import { DiffWithPreviousCommandArgs } from '../../commands/diffWithPrevious'; +import type { DiffWithPreviousCommandArgs } from '../../commands/diffWithPrevious'; import { Commands } from '../../constants'; import { StatusFileFormatter } from '../../git/formatters/statusFormatter'; import { GitUri } from '../../git/gitUri'; -import { GitCommit, GitFile } from '../../git/models'; +import type { GitCommit } from '../../git/models/commit'; +import { GitFile } from '../../git/models/file'; import { joinPaths, relativeDir } from '../../system/path'; import { pluralize } from '../../system/string'; -import { ViewsWithCommits } from '../viewBase'; +import type { ViewsWithCommits } from '../viewBase'; import { FileRevisionAsCommitNode } from './fileRevisionAsCommitNode'; import { FileNode } from './folderNode'; import { ContextValues, ViewNode } from './viewNode'; diff --git a/src/views/nodes/statusFilesNode.ts b/src/views/nodes/statusFilesNode.ts index e8fd34b..344d976 100644 --- a/src/views/nodes/statusFilesNode.ts +++ b/src/views/nodes/statusFilesNode.ts @@ -1,12 +1,16 @@ import { TreeItem, TreeItemCollapsibleState } from 'vscode'; import { ViewFilesLayout } from '../../configuration'; import { GitUri } from '../../git/gitUri'; -import { GitCommit, GitFileWithCommit, GitLog, GitStatus, GitStatusFile, GitTrackingState } from '../../git/models'; +import type { GitTrackingState } from '../../git/models/branch'; +import type { GitCommit } from '../../git/models/commit'; +import type { GitFileWithCommit } from '../../git/models/file'; +import type { GitLog } from '../../git/models/log'; +import type { GitStatus, GitStatusFile } from '../../git/models/status'; import { groupBy, makeHierarchical } from '../../system/array'; import { filter, flatMap, map } from '../../system/iterable'; import { joinPaths, normalizePath } from '../../system/path'; import { pluralize, sortCompare } from '../../system/string'; -import { RepositoriesView } from '../repositoriesView'; +import type { RepositoriesView } from '../repositoriesView'; import { WorktreesView } from '../worktreesView'; import { FileNode, FolderNode } from './folderNode'; import { RepositoryNode } from './repositoryNode'; diff --git a/src/views/nodes/tagNode.ts b/src/views/nodes/tagNode.ts index 4be2af0..7291737 100644 --- a/src/views/nodes/tagNode.ts +++ b/src/views/nodes/tagNode.ts @@ -3,14 +3,16 @@ import { ViewBranchesLayout } from '../../configuration'; import { GlyphChars } from '../../constants'; import { Container } from '../../container'; import { emojify } from '../../emojis'; -import { GitUri } from '../../git/gitUri'; -import { GitLog, GitRevision, GitTag, GitTagReference } from '../../git/models'; +import type { GitUri } from '../../git/gitUri'; +import type { GitLog } from '../../git/models/log'; +import { GitRevision, GitTagReference } from '../../git/models/reference'; +import type { GitTag } from '../../git/models/tag'; import { gate } from '../../system/decorators/gate'; import { debug } from '../../system/decorators/log'; import { map } from '../../system/iterable'; import { pad } from '../../system/string'; -import { RepositoriesView } from '../repositoriesView'; -import { TagsView } from '../tagsView'; +import type { RepositoriesView } from '../repositoriesView'; +import type { TagsView } from '../tagsView'; import { CommitNode } from './commitNode'; import { LoadMoreNode, MessageNode } from './common'; import { insertDateMarkers } from './helpers'; diff --git a/src/views/nodes/tagsNode.ts b/src/views/nodes/tagsNode.ts index 1793371..8c666c1 100644 --- a/src/views/nodes/tagsNode.ts +++ b/src/views/nodes/tagsNode.ts @@ -1,12 +1,12 @@ import { ThemeIcon, TreeItem, TreeItemCollapsibleState } from 'vscode'; import { ViewBranchesLayout } from '../../configuration'; import { GitUri } from '../../git/gitUri'; -import { Repository } from '../../git/models'; +import type { Repository } from '../../git/models/repository'; import { makeHierarchical } from '../../system/array'; import { gate } from '../../system/decorators/gate'; import { debug } from '../../system/decorators/log'; -import { RepositoriesView } from '../repositoriesView'; -import { TagsView } from '../tagsView'; +import type { RepositoriesView } from '../repositoriesView'; +import type { TagsView } from '../tagsView'; import { BranchOrTagFolderNode } from './branchOrTagFolderNode'; import { MessageNode } from './common'; import { RepositoryNode } from './repositoryNode'; diff --git a/src/views/nodes/viewNode.ts b/src/views/nodes/viewNode.ts index 360302c..3448e7a 100644 --- a/src/views/nodes/viewNode.ts +++ b/src/views/nodes/viewNode.ts @@ -8,25 +8,24 @@ import { TreeViewVisibilityChangeEvent, } from 'vscode'; import { GlyphChars } from '../../constants'; -import { RepositoriesChangeEvent } from '../../git/gitProviderService'; +import type { RepositoriesChangeEvent } from '../../git/gitProviderService'; import { GitUri } from '../../git/gitUri'; +import type { GitFile } from '../../git/models/file'; +import { GitReference, GitRevisionReference } from '../../git/models/reference'; +import { GitRemote } from '../../git/models/remote'; import { - GitFile, - GitReference, - GitRemote, - GitRevisionReference, Repository, RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent, -} from '../../git/models'; +} from '../../git/models/repository'; import { Logger } from '../../logger'; -import { SubscriptionChangeEvent } from '../../plus/subscription/subscriptionService'; +import type { SubscriptionChangeEvent } from '../../plus/subscription/subscriptionService'; import { gate } from '../../system/decorators/gate'; import { debug, log, logName } from '../../system/decorators/log'; import { is as isA, szudzikPairing } from '../../system/function'; import { pad } from '../../system/string'; -import { TreeViewNodeCollapsibleStateChangeEvent, View } from '../viewBase'; +import type { TreeViewNodeCollapsibleStateChangeEvent, View } from '../viewBase'; export const enum ContextValues { ActiveFileHistory = 'gitlens:history:active:file', diff --git a/src/views/nodes/worktreeNode.ts b/src/views/nodes/worktreeNode.ts index 08e0011..8fe4cc1 100644 --- a/src/views/nodes/worktreeNode.ts +++ b/src/views/nodes/worktreeNode.ts @@ -1,23 +1,19 @@ import { MarkdownString, ThemeIcon, TreeItem, TreeItemCollapsibleState, Uri, window } from 'vscode'; import { GlyphChars } from '../../constants'; -import { GitUri } from '../../git/gitUri'; -import { - GitBranch, - GitLog, - GitRemote, - GitRemoteType, - GitRevision, - GitWorktree, - PullRequest, - PullRequestState, -} from '../../git/models'; +import type { GitUri } from '../../git/gitUri'; +import type { GitBranch } from '../../git/models/branch'; +import type { GitLog } from '../../git/models/log'; +import { PullRequest, PullRequestState } from '../../git/models/pullRequest'; +import { GitRevision } from '../../git/models/reference'; +import { GitRemote, GitRemoteType } from '../../git/models/remote'; +import type { GitWorktree } from '../../git/models/worktree'; import { gate } from '../../system/decorators/gate'; import { debug } from '../../system/decorators/log'; import { map } from '../../system/iterable'; import { getSettledValue } from '../../system/promise'; import { pad } from '../../system/string'; -import { RepositoriesView } from '../repositoriesView'; -import { WorktreesView } from '../worktreesView'; +import type { RepositoriesView } from '../repositoriesView'; +import type { WorktreesView } from '../worktreesView'; import { CommitNode } from './commitNode'; import { LoadMoreNode, MessageNode } from './common'; import { CompareBranchNode } from './compareBranchNode'; diff --git a/src/views/nodes/worktreesNode.ts b/src/views/nodes/worktreesNode.ts index 62028bf..c69c125 100644 --- a/src/views/nodes/worktreesNode.ts +++ b/src/views/nodes/worktreesNode.ts @@ -1,12 +1,12 @@ import { ThemeIcon, TreeItem, TreeItemCollapsibleState } from 'vscode'; import { GlyphChars } from '../../constants'; import { PlusFeatures } from '../../features'; -import { GitUri } from '../../git/gitUri'; -import { Repository } from '../../git/models'; +import type { GitUri } from '../../git/gitUri'; +import type { Repository } from '../../git/models/repository'; import { gate } from '../../system/decorators/gate'; import { debug } from '../../system/decorators/log'; -import { RepositoriesView } from '../repositoriesView'; -import { WorktreesView } from '../worktreesView'; +import type { RepositoriesView } from '../repositoriesView'; +import type { WorktreesView } from '../worktreesView'; import { MessageNode } from './common'; import { RepositoryNode } from './repositoryNode'; import { ContextValues, ViewNode } from './viewNode'; diff --git a/src/views/remotesView.ts b/src/views/remotesView.ts index 80e6403..5bdae6d 100644 --- a/src/views/remotesView.ts +++ b/src/views/remotesView.ts @@ -10,19 +10,13 @@ import { } from 'vscode'; import { configuration, RemotesViewConfig, ViewBranchesLayout, ViewFilesLayout } from '../configuration'; import { Commands } from '../constants'; -import { Container } from '../container'; +import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { - GitBranch, - GitBranchReference, - GitCommit, - GitReference, - GitRemote, - GitRevisionReference, - RepositoryChange, - RepositoryChangeComparisonMode, - RepositoryChangeEvent, -} from '../git/models'; +import { GitBranch } from '../git/models/branch'; +import { GitCommit } from '../git/models/commit'; +import { GitBranchReference, GitReference, GitRevisionReference } from '../git/models/reference'; +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 { diff --git a/src/views/repositoriesView.ts b/src/views/repositoriesView.ts index 474c811..3aa671b 100644 --- a/src/views/repositoriesView.ts +++ b/src/views/repositoriesView.ts @@ -16,20 +16,20 @@ import { ViewShowBranchComparison, } from '../configuration'; import { Commands, ContextKeys } from '../constants'; -import { Container } from '../container'; +import type { Container } from '../container'; import { setContext } from '../context'; +import { GitBranch } from '../git/models/branch'; +import { GitCommit } from '../git/models/commit'; +import type { GitContributor } from '../git/models/contributor'; import { - GitBranch, GitBranchReference, - GitCommit, - GitContributor, GitReference, - GitRemote, GitRevisionReference, GitStashReference, GitTagReference, - GitWorktree, -} from '../git/models'; +} from '../git/models/reference'; +import type { GitRemote } from '../git/models/remote'; +import type { GitWorktree } from '../git/models/worktree'; import { WorkspaceStorageKeys } from '../storage'; import { executeCommand } from '../system/command'; import { gate } from '../system/decorators/gate'; diff --git a/src/views/searchAndCompareView.ts b/src/views/searchAndCompareView.ts index b7e22e7..6469095 100644 --- a/src/views/searchAndCompareView.ts +++ b/src/views/searchAndCompareView.ts @@ -1,11 +1,12 @@ import { commands, ConfigurationChangeEvent, Disposable, TreeItem, TreeItemCollapsibleState } from 'vscode'; import { configuration, SearchAndCompareViewConfig, ViewFilesLayout } from '../configuration'; import { Commands, ContextKeys } from '../constants'; -import { Container } from '../container'; +import type { Container } from '../container'; import { setContext } from '../context'; import { GitUri } from '../git/gitUri'; -import { GitLog, GitRevision } from '../git/models'; -import { SearchPattern } from '../git/search'; +import type { GitLog } from '../git/models/log'; +import { GitRevision } from '../git/models/reference'; +import type { SearchPattern } from '../git/search'; import { ReferencePicker, ReferencesQuickPickIncludes } from '../quickpicks/referencePicker'; import { RepositoryPicker } from '../quickpicks/repositoryPicker'; import { NamedRef, PinnedItem, PinnedItems, WorkspaceStorageKeys } from '../storage'; diff --git a/src/views/stashesView.ts b/src/views/stashesView.ts index 7a1e05b..4763b2f 100644 --- a/src/views/stashesView.ts +++ b/src/views/stashesView.ts @@ -10,15 +10,10 @@ import { } from 'vscode'; import { configuration, StashesViewConfig, ViewFilesLayout } from '../configuration'; import { Commands } from '../constants'; -import { Container } from '../container'; +import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { - GitReference, - GitStashReference, - RepositoryChange, - RepositoryChangeComparisonMode, - RepositoryChangeEvent, -} from '../git/models'; +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 { diff --git a/src/views/tagsView.ts b/src/views/tagsView.ts index 80db664..1d9562c 100644 --- a/src/views/tagsView.ts +++ b/src/views/tagsView.ts @@ -10,15 +10,10 @@ import { } from 'vscode'; import { configuration, TagsViewConfig, ViewBranchesLayout, ViewFilesLayout } from '../configuration'; import { Commands } from '../constants'; -import { Container } from '../container'; +import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; -import { - GitReference, - GitTagReference, - RepositoryChange, - RepositoryChangeComparisonMode, - RepositoryChangeEvent, -} from '../git/models'; +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 { diff --git a/src/views/viewCommands.ts b/src/views/viewCommands.ts index 29e636f..1f37b63 100644 --- a/src/views/viewCommands.ts +++ b/src/views/viewCommands.ts @@ -12,7 +12,7 @@ import { Commands, ContextKeys, CoreCommands, CoreGitCommands } from '../constan import { Container } from '../container'; import { setContext } from '../context'; import { GitUri } from '../git/gitUri'; -import { GitReference, GitRevision } from '../git/models'; +import { GitReference, GitRevision } from '../git/models/reference'; import { executeActionCommand, executeCommand, diff --git a/src/views/viewDecorationProvider.ts b/src/views/viewDecorationProvider.ts index a48aabc..28e332b 100644 --- a/src/views/viewDecorationProvider.ts +++ b/src/views/viewDecorationProvider.ts @@ -10,7 +10,7 @@ import { window, } from 'vscode'; import { GlyphChars } from '../constants'; -import { GitBranchStatus } from '../git/models'; +import { GitBranchStatus } from '../git/models/branch'; export class ViewFileDecorationProvider implements FileDecorationProvider, Disposable { private readonly _onDidChange = new EventEmitter(); diff --git a/src/views/worktreesView.ts b/src/views/worktreesView.ts index c5b777a..2700cbe 100644 --- a/src/views/worktreesView.ts +++ b/src/views/worktreesView.ts @@ -11,10 +11,11 @@ import { window, } from 'vscode'; import { configuration, ViewFilesLayout, ViewShowBranchComparison, WorktreesViewConfig } from '../configuration'; -import { Container } from '../container'; +import type { Container } from '../container'; import { PlusFeatures } from '../features'; import { GitUri } from '../git/gitUri'; -import { GitWorktree, RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../git/models'; +import { RepositoryChange, RepositoryChangeComparisonMode, RepositoryChangeEvent } from '../git/models/repository'; +import type { GitWorktree } from '../git/models/worktree'; import { ensurePlusFeaturesEnabled } from '../plus/subscription/utils'; import { getSubscriptionTimeRemaining, SubscriptionState } from '../subscription'; import { gate } from '../system/decorators/gate'; diff --git a/src/webviews/commitDetails/commitDetailsWebviewView.ts b/src/webviews/commitDetails/commitDetailsWebviewView.ts index 8022cd0..2fb5103 100644 --- a/src/webviews/commitDetails/commitDetailsWebviewView.ts +++ b/src/webviews/commitDetails/commitDetailsWebviewView.ts @@ -8,7 +8,9 @@ import { executeGitCommand } from '../../commands/gitCommands.actions'; import { Commands, CoreCommands } from '../../constants'; import type { Container } from '../../container'; import { GitUri } from '../../git/gitUri'; -import { GitCommit, GitFile, IssueOrPullRequest } from '../../git/models'; +import type { GitCommit } from '../../git/models/commit'; +import { GitFile } from '../../git/models/file'; +import type { IssueOrPullRequest } from '../../git/models/issue'; import { executeCommand, executeCoreCommand } from '../../system/command'; import { debug } from '../../system/decorators/log'; import { IpcMessage, onIpc } from '../protocol'; diff --git a/src/webviews/rebase/rebaseEditor.ts b/src/webviews/rebase/rebaseEditor.ts index abb62f5..e072849 100644 --- a/src/webviews/rebase/rebaseEditor.ts +++ b/src/webviews/rebase/rebaseEditor.ts @@ -17,7 +17,7 @@ import { ShowQuickCommitCommand } from '../../commands'; import { configuration } from '../../configuration'; import { CoreCommands } from '../../constants'; import type { Container } from '../../container'; -import { RepositoryChange, RepositoryChangeComparisonMode } from '../../git/models'; +import { RepositoryChange, RepositoryChangeComparisonMode } from '../../git/models/repository'; import { Logger } from '../../logger'; import { Messages } from '../../messages'; import { executeCoreCommand } from '../../system/command'; diff --git a/src/webviews/webviewWithConfigBase.ts b/src/webviews/webviewWithConfigBase.ts index 907d921..f7c08f8 100644 --- a/src/webviews/webviewWithConfigBase.ts +++ b/src/webviews/webviewWithConfigBase.ts @@ -3,14 +3,9 @@ import { configuration } from '../configuration'; import { Commands } from '../constants'; import type { Container } from '../container'; import { CommitFormatter } from '../git/formatters'; -import { - GitCommit, - GitCommitIdentity, - GitFileChange, - GitFileIndexStatus, - PullRequest, - PullRequestState, -} from '../git/models'; +import { GitCommit, GitCommitIdentity } from '../git/models/commit'; +import { GitFileChange, GitFileIndexStatus } from '../git/models/file'; +import { PullRequest, PullRequestState } from '../git/models/pullRequest'; import { Logger } from '../logger'; import { DidChangeConfigurationNotificationType,