Explorar el Código

💄prettiers

main
Eric Amodio hace 1 año
padre
commit
4dba461267
Se han modificado 48 ficheros con 332 adiciones y 125 borrados
  1. +4
    -1
      src/api/actionRunners.ts
  2. +4
    -1
      src/commands/gitCommands.utils.ts
  3. +4
    -1
      src/env/node/git/localGitProvider.ts
  4. +9
    -2
      src/errors.ts
  5. +3
    -3
      src/git/gitProviderService.ts
  6. +4
    -1
      src/git/models/repository.ts
  7. +4
    -1
      src/plus/subscription/authenticationProvider.ts
  8. +4
    -3
      src/plus/subscription/serverConnection.ts
  9. +12
    -6
      src/plus/subscription/subscriptionService.ts
  10. +4
    -1
      src/plus/webviews/account/accountWebview.ts
  11. +4
    -1
      src/plus/webviews/focus/focusWebview.ts
  12. +4
    -1
      src/plus/webviews/graph/graphWebview.ts
  13. +4
    -1
      src/plus/webviews/timeline/timelineWebview.ts
  14. +4
    -1
      src/plus/workspaces/workspacesApi.ts
  15. +4
    -1
      src/plus/workspaces/workspacesService.ts
  16. +92
    -21
      src/quickpicks/items/commits.ts
  17. +4
    -1
      src/system/mru.ts
  18. +13
    -6
      src/system/promise.ts
  19. +4
    -1
      src/system/searchTree.ts
  20. +5
    -1
      src/system/stopwatch.ts
  21. +4
    -1
      src/telemetry/usageTracker.ts
  22. +7
    -6
      src/trackers/gitLineTracker.ts
  23. +5
    -1
      src/views/nodes/comparePickerNode.ts
  24. +5
    -1
      src/views/nodes/rebaseStatusNode.ts
  25. +5
    -1
      src/views/nodes/reflogRecordNode.ts
  26. +6
    -1
      src/views/nodes/tagNode.ts
  27. +11
    -2
      src/views/nodes/viewNode.ts
  28. +17
    -16
      src/views/viewBase.ts
  29. +2
    -1
      src/views/workspacesView.ts
  30. +1
    -1
      src/webviews/apps/commitDetails/commitDetails.html
  31. +1
    -1
      src/webviews/apps/home/home.html
  32. +7
    -2
      src/webviews/apps/home/home.scss
  33. +1
    -1
      src/webviews/apps/plus/account/account.html
  34. +1
    -1
      src/webviews/apps/plus/focus/focus.html
  35. +1
    -1
      src/webviews/apps/plus/graph/graph.html
  36. +17
    -17
      src/webviews/apps/plus/graph/minimap/minimap.ts
  37. +4
    -1
      src/webviews/apps/plus/timeline/chart.ts
  38. +1
    -1
      src/webviews/apps/plus/timeline/timeline.html
  39. +1
    -1
      src/webviews/apps/rebase/rebase.html
  40. +1
    -1
      src/webviews/apps/settings/settings.html
  41. +3
    -1
      src/webviews/apps/settings/settings.scss
  42. +20
    -5
      src/webviews/apps/shared/buttons.scss
  43. +4
    -1
      src/webviews/apps/shared/snow.scss
  44. +1
    -1
      src/webviews/apps/welcome/welcome.html
  45. +4
    -1
      src/webviews/home/homeWebview.ts
  46. +4
    -1
      src/webviews/protocol.ts
  47. +4
    -1
      src/webviews/settings/settingsWebview.ts
  48. +4
    -1
      src/webviews/welcome/welcomeWebview.ts

+ 4
- 1
src/api/actionRunners.ts Ver fichero

@ -28,7 +28,10 @@ export const builtInActionRunnerName = 'Built In';
class ActionRunnerQuickPickItem implements QuickPickItem {
private readonly _label: string;
constructor(public readonly runner: RegisteredActionRunner, context: ActionContext) {
constructor(
public readonly runner: RegisteredActionRunner,
context: ActionContext,
) {
this._label = typeof runner.label === 'string' ? runner.label : runner.label(context);
}

+ 4
- 1
src/commands/gitCommands.utils.ts Ver fichero

@ -53,7 +53,10 @@ export class PickCommandStep implements QuickPickStep {
readonly placeholder = 'Choose a git command';
readonly title = 'GitLens';
constructor(private readonly container: Container, args?: GitCommandsCommandArgs) {
constructor(
private readonly container: Container,
args?: GitCommandsCommandArgs,
) {
const hasVirtualFolders = getContext<boolean>('gitlens:hasVirtualFolders', false);
const readonly =
hasVirtualFolders ||

+ 4
- 1
src/env/node/git/localGitProvider.ts Ver fichero

@ -246,7 +246,10 @@ export class LocalGitProvider implements GitProvider, Disposable {
private _disposables: Disposable[] = [];
constructor(protected readonly container: Container, protected readonly git: Git) {
constructor(
protected readonly container: Container,
protected readonly git: Git,
) {
this.git.setLocator(this.ensureGit.bind(this));
this._disposables.push(

+ 9
- 2
src/errors.ts Ver fichero

@ -86,7 +86,10 @@ export class AuthenticationError extends Error {
}
export class ExtensionNotFoundError extends Error {
constructor(public readonly extensionId: string, public readonly extensionName: string) {
constructor(
public readonly extensionId: string,
public readonly extensionName: string,
) {
super(
`Unable to find the ${extensionName} extension (${extensionId}). Please ensure it is installed and enabled.`,
);
@ -158,7 +161,11 @@ export class ProviderFetchError extends Error {
return this.response.statusText;
}
constructor(provider: string, public readonly response: Response, errors?: { message: string }[]) {
constructor(
provider: string,
public readonly response: Response,
errors?: { message: string }[],
) {
super(
`${provider} request failed: ${!response.ok ? `(${response.status}) ${response.statusText}. ` : ''}${
errors?.length ? errors[0].message : ''

+ 3
- 3
src/git/gitProviderService.ts Ver fichero

@ -1959,9 +1959,9 @@ export class GitProviderService implements Disposable {
): Promise<PullRequest | undefined>;
@gate<GitProviderService['getPullRequestForCommit']>((ref, remoteOrProvider, options) => {
const provider = GitRemote.is(remoteOrProvider) ? remoteOrProvider.provider : remoteOrProvider;
return `${ref}${provider != null ? `|${provider.id}:${provider.domain}/${provider.path}` : ''}|${
options?.timeout
}`;
return `${ref}${
provider != null ? `|${provider.id}:${provider.domain}/${provider.path}` : ''
}|${options?.timeout}`;
})
@debug<GitProviderService['getPullRequestForCommit']>({ args: { 1: remoteOrProvider => remoteOrProvider.name } })
async getPullRequestForCommit(

+ 4
- 1
src/git/models/repository.ts Ver fichero

@ -92,7 +92,10 @@ export const enum RepositoryChangeComparisonMode {
export class RepositoryChangeEvent {
private readonly _changes: Set<RepositoryChange>;
constructor(public readonly repository: Repository, changes: RepositoryChange[]) {
constructor(
public readonly repository: Repository,
changes: RepositoryChange[],
) {
this._changes = new Set(changes);
}

+ 4
- 1
src/plus/subscription/authenticationProvider.ts Ver fichero

@ -34,7 +34,10 @@ export class SubscriptionAuthenticationProvider implements AuthenticationProvide
private readonly _disposable: Disposable;
private _sessionsPromise: Promise<AuthenticationSession[]>;
constructor(private readonly container: Container, private readonly server: ServerConnection) {
constructor(
private readonly container: Container,
private readonly server: ServerConnection,
) {
// Contains the current state of the sessions we have available.
this._sessionsPromise = this.getSessionsFromStorage();

+ 4
- 3
src/plus/subscription/serverConnection.ts Ver fichero

@ -141,9 +141,10 @@ export class ServerConnection implements Disposable {
return Promise.race([
deferredCodeExchange.promise,
new Promise<string>((_, reject) =>
// eslint-disable-next-line prefer-promise-reject-errors
this._cancellationSource?.token.onCancellationRequested(() => reject('Cancelled')),
new Promise<string>(
(_, reject) =>
// eslint-disable-next-line prefer-promise-reject-errors
this._cancellationSource?.token.onCancellationRequested(() => reject('Cancelled')),
),
new Promise<string>((_, reject) => setTimeout(reject, 120000, 'Cancelled')),
]).finally(() => {

+ 12
- 6
src/plus/subscription/subscriptionService.ts Ver fichero

@ -82,7 +82,10 @@ export class SubscriptionService implements Disposable {
private _statusBarSubscription: StatusBarItem | undefined;
private _validationTimer: ReturnType<typeof setInterval> | undefined;
constructor(private readonly container: Container, previousVersion: string | undefined) {
constructor(
private readonly container: Container,
previousVersion: string | undefined,
) {
this._disposable = Disposable.from(
once(container.onReady)(this.onReady, this),
this.container.subscriptionAuthentication.onDidChangeSessions(
@ -627,11 +630,14 @@ export class SubscriptionService implements Disposable {
}
// Check 4 times a day to ensure we validate at least once a day
this._validationTimer = setInterval(() => {
if (this._lastCheckInDate == null || this._lastCheckInDate.getDate() !== new Date().getDate()) {
void this.ensureSession(false, true);
}
}, 1000 * 60 * 60 * 6);
this._validationTimer = setInterval(
() => {
if (this._lastCheckInDate == null || this._lastCheckInDate.getDate() !== new Date().getDate()) {
void this.ensureSession(false, true);
}
},
1000 * 60 * 60 * 6,
);
}
@debug()

+ 4
- 1
src/plus/webviews/account/accountWebview.ts Ver fichero

@ -14,7 +14,10 @@ import { DidChangeSubscriptionNotificationType } from './protocol';
export class AccountWebviewProvider implements WebviewProvider<State> {
private readonly _disposable: Disposable;
constructor(private readonly container: Container, private readonly host: WebviewController<State>) {
constructor(
private readonly container: Container,
private readonly host: WebviewController<State>,
) {
this._disposable = Disposable.from(this.container.subscription.onDidChange(this.onSubscriptionChanged, this));
}

+ 4
- 1
src/plus/webviews/focus/focusWebview.ts Ver fichero

@ -56,7 +56,10 @@ export class FocusWebviewProvider implements WebviewProvider {
private _repositoryEventsDisposable?: Disposable;
private _repos?: RepoWithRichRemote[];
constructor(private readonly container: Container, private readonly host: WebviewController<State>) {
constructor(
private readonly container: Container,
private readonly host: WebviewController<State>,
) {
this._disposable = Disposable.from(
this.container.subscription.onDidChange(this.onSubscriptionChanged, this),
this.container.git.onDidChangeRepositories(() => void this.host.refresh(true)),

+ 4
- 1
src/plus/webviews/graph/graphWebview.ts Ver fichero

@ -249,7 +249,10 @@ export class GraphWebviewProvider implements WebviewProvider {
private isWindowFocused: boolean = true;
constructor(private readonly container: Container, private readonly host: WebviewController<State>) {
constructor(
private readonly container: Container,
private readonly host: WebviewController<State>,
) {
this._showDetailsView = configuration.get('graph.showDetailsView');
this._theme = window.activeColorTheme;
this.ensureRepositorySubscriptions();

+ 4
- 1
src/plus/webviews/timeline/timelineWebview.ts Ver fichero

@ -46,7 +46,10 @@ export class TimelineWebviewProvider implements WebviewProvider {
private _pendingContext: Partial<Context> | undefined;
private readonly _disposable: Disposable;
constructor(private readonly container: Container, private readonly host: WebviewController<State>) {
constructor(
private readonly container: Container,
private readonly host: WebviewController<State>,
) {
this._context = {
uri: undefined,
period: defaultPeriod,

+ 4
- 1
src/plus/workspaces/workspacesApi.ts Ver fichero

@ -16,7 +16,10 @@ import type {
import { CloudWorkspaceProviderInputType, defaultWorkspaceCount, defaultWorkspaceRepoCount } from './models';
export class WorkspacesApi {
constructor(private readonly container: Container, private readonly server: ServerConnection) {}
constructor(
private readonly container: Container,
private readonly server: ServerConnection,
) {}
private async getAccessToken() {
// TODO: should probably get scopes from somewhere

+ 4
- 1
src/plus/workspaces/workspacesService.ts Ver fichero

@ -51,7 +51,10 @@ export class WorkspacesService implements Disposable {
private _currentWorkspaceId: string | undefined;
private _currentWorkspaceSyncSetting: WorkspaceSyncSetting = WorkspaceSyncSetting.Never;
constructor(private readonly container: Container, private readonly server: ServerConnection) {
constructor(
private readonly container: Container,
private readonly server: ServerConnection,
) {
this._workspacesApi = new WorkspacesApi(this.container, this.server);
this._workspacesPathProvider = getSupportedWorkspacesPathMappingProvider();
this._currentWorkspaceId = workspace.getConfiguration('gitkraken')?.get<string>('workspaceId');

+ 92
- 21
src/quickpicks/items/commits.ts Ver fichero

@ -61,7 +61,11 @@ export class CommitFilesQuickPickItem extends CommandQuickPickItem {
}
export class CommitFileQuickPickItem extends CommandQuickPickItem {
constructor(readonly commit: GitCommit, readonly file: GitFile, picked?: boolean) {
constructor(
readonly commit: GitCommit,
readonly file: GitFile,
picked?: boolean,
) {
super({
label: `${pad(getGitFileStatusCodicon(file.status), 0, 2)}${basename(file.path)}`,
description: getGitFileFormattedDirectory(file, true),
@ -123,7 +127,10 @@ export class CommitBrowseRepositoryFromHereCommandQuickPickItem extends CommandQ
}
export class CommitCompareWithHEADCommandQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
item?: QuickPickItem,
) {
super(item ?? '$(compare-changes) Compare with HEAD');
}
@ -133,7 +140,10 @@ export class CommitCompareWithHEADCommandQuickPickItem extends CommandQuickPickI
}
export class CommitCompareWithWorkingCommandQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
item?: QuickPickItem,
) {
super(item ?? '$(compare-changes) Compare with Working Tree');
}
@ -143,7 +153,10 @@ export class CommitCompareWithWorkingCommandQuickPickItem extends CommandQuickPi
}
export class CommitCopyIdQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
item?: QuickPickItem,
) {
super(item ?? '$(copy) Copy SHA');
}
@ -158,7 +171,10 @@ export class CommitCopyIdQuickPickItem extends CommandQuickPickItem {
}
export class CommitCopyMessageQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
item?: QuickPickItem,
) {
super(item ?? '$(copy) Copy Message');
}
@ -175,7 +191,10 @@ export class CommitCopyMessageQuickPickItem extends CommandQuickPickItem {
}
export class CommitOpenAllChangesCommandQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
item?: QuickPickItem,
) {
super(item ?? '$(git-compare) Open All Changes');
}
@ -185,7 +204,10 @@ export class CommitOpenAllChangesCommandQuickPickItem extends CommandQuickPickIt
}
export class CommitOpenAllChangesWithDiffToolCommandQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
item?: QuickPickItem,
) {
super(item ?? '$(git-compare) Open All Changes (difftool)');
}
@ -195,7 +217,10 @@ export class CommitOpenAllChangesWithDiffToolCommandQuickPickItem extends Comman
}
export class CommitOpenAllChangesWithWorkingCommandQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
item?: QuickPickItem,
) {
super(item ?? '$(git-compare) Open All Changes with Working Tree');
}
@ -205,7 +230,11 @@ export class CommitOpenAllChangesWithWorkingCommandQuickPickItem extends Command
}
export class CommitOpenChangesCommandQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, private readonly file: string | GitFile, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
private readonly file: string | GitFile,
item?: QuickPickItem,
) {
super(item ?? '$(git-compare) Open Changes');
}
@ -215,7 +244,11 @@ export class CommitOpenChangesCommandQuickPickItem extends CommandQuickPickItem
}
export class CommitOpenChangesWithDiffToolCommandQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, private readonly file: string | GitFile, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
private readonly file: string | GitFile,
item?: QuickPickItem,
) {
super(item ?? '$(git-compare) Open Changes (difftool)');
}
@ -225,7 +258,11 @@ export class CommitOpenChangesWithDiffToolCommandQuickPickItem extends CommandQu
}
export class CommitOpenChangesWithWorkingCommandQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, private readonly file: string | GitFile, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
private readonly file: string | GitFile,
item?: QuickPickItem,
) {
super(item ?? '$(git-compare) Open Changes with Working File');
}
@ -235,7 +272,10 @@ export class CommitOpenChangesWithWorkingCommandQuickPickItem extends CommandQui
}
export class CommitOpenDirectoryCompareCommandQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
item?: QuickPickItem,
) {
super(item ?? '$(git-compare) Open Directory Compare');
}
@ -245,7 +285,10 @@ export class CommitOpenDirectoryCompareCommandQuickPickItem extends CommandQuick
}
export class CommitOpenDirectoryCompareWithWorkingCommandQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
item?: QuickPickItem,
) {
super(item ?? '$(git-compare) Open Directory Compare with Working Tree');
}
@ -255,7 +298,10 @@ export class CommitOpenDirectoryCompareWithWorkingCommandQuickPickItem extends C
}
export class CommitOpenDetailsCommandQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
item?: QuickPickItem,
) {
super(item ?? '$(eye) Open Details');
}
@ -265,7 +311,10 @@ export class CommitOpenDetailsCommandQuickPickItem extends CommandQuickPickItem
}
export class CommitOpenInGraphCommandQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
item?: QuickPickItem,
) {
super(item ?? '$(gitlens-graph) Open in Commit Graph');
}
@ -275,7 +324,10 @@ export class CommitOpenInGraphCommandQuickPickItem extends CommandQuickPickItem
}
export class CommitOpenFilesCommandQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
item?: QuickPickItem,
) {
super(item ?? '$(files) Open Files');
}
@ -285,7 +337,11 @@ export class CommitOpenFilesCommandQuickPickItem extends CommandQuickPickItem {
}
export class CommitOpenFileCommandQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, private readonly file: string | GitFile, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
private readonly file: string | GitFile,
item?: QuickPickItem,
) {
super(item ?? '$(file) Open File');
}
@ -295,7 +351,10 @@ export class CommitOpenFileCommandQuickPickItem extends CommandQuickPickItem {
}
export class CommitOpenRevisionsCommandQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
item?: QuickPickItem,
) {
super(item ?? '$(files) Open Files at Revision');
}
@ -305,7 +364,11 @@ export class CommitOpenRevisionsCommandQuickPickItem extends CommandQuickPickIte
}
export class CommitOpenRevisionCommandQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, private readonly file: string | GitFile, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
private readonly file: string | GitFile,
item?: QuickPickItem,
) {
super(item ?? '$(file) Open File at Revision');
}
@ -315,7 +378,11 @@ export class CommitOpenRevisionCommandQuickPickItem extends CommandQuickPickItem
}
export class CommitApplyFileChangesCommandQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, private readonly file: string | GitFile, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
private readonly file: string | GitFile,
item?: QuickPickItem,
) {
super(item ?? 'Apply Changes');
}
@ -325,7 +392,11 @@ export class CommitApplyFileChangesCommandQuickPickItem extends CommandQuickPick
}
export class CommitRestoreFileChangesCommandQuickPickItem extends CommandQuickPickItem {
constructor(private readonly commit: GitCommit, private readonly file: string | GitFile, item?: QuickPickItem) {
constructor(
private readonly commit: GitCommit,
private readonly file: string | GitFile,
item?: QuickPickItem,
) {
super(
item ?? {
label: 'Restore',

+ 4
- 1
src/system/mru.ts Ver fichero

@ -1,7 +1,10 @@
export class MRU<T> {
private stack: T[] = [];
constructor(public readonly maxSize: number = 10, private readonly comparator?: (a: T, b: T) => boolean) {}
constructor(
public readonly maxSize: number = 10,
private readonly comparator?: (a: T, b: T) => boolean,
) {}
get count(): number {
return this.stack.length;

+ 13
- 6
src/system/promise.ts Ver fichero

@ -38,13 +38,13 @@ export async function* asSettled(promises: Promise[]): AsyncIterable
i,
promise.then(
v =>
({ index: i, value: v, status: 'fulfilled' } as unknown as PromiseFulfilledResult<T> & {
({ index: i, value: v, status: 'fulfilled' }) as unknown as PromiseFulfilledResult<T> & {
index: number;
}),
},
e =>
({ index: i, reason: e, status: 'rejected' } as unknown as PromiseRejectedResult & {
({ index: i, reason: e, status: 'rejected' }) as unknown as PromiseRejectedResult & {
index: number;
}),
},
),
]),
);
@ -57,13 +57,20 @@ export async function* asSettled(promises: Promise[]): AsyncIterable
}
export class PromiseCancelledError<T extends Promise<any> = Promise<any>> extends Error {
constructor(public readonly promise: T, message: string) {
constructor(
public readonly promise: T,
message: string,
) {
super(message);
}
}
export class PromiseCancelledErrorWithId<TKey, T extends Promise<any> = Promise<any>> extends PromiseCancelledError<T> {
constructor(public readonly id: TKey, promise: T, message: string) {
constructor(
public readonly id: TKey,
promise: T,
message: string,
) {
super(promise, message);
}
}

+ 4
- 1
src/system/searchTree.ts Ver fichero

@ -49,7 +49,10 @@ export class PathIterator implements IKeyIterator {
private _from!: number;
private _to!: number;
constructor(private readonly _splitOnBackslash: boolean = true, private readonly _caseSensitive: boolean = true) {}
constructor(
private readonly _splitOnBackslash: boolean = true,
private readonly _caseSensitive: boolean = true,
) {}
reset(key: string): this {
this._value = key.replace(/\\$|\/$/, '');

+ 5
- 1
src/system/stopwatch.ts Ver fichero

@ -23,7 +23,11 @@ export class Stopwatch {
return this._time;
}
constructor(public readonly scope: string | LogScope | undefined, options?: StopwatchOptions, ...params: any[]) {
constructor(
public readonly scope: string | LogScope | undefined,
options?: StopwatchOptions,
...params: any[]
) {
let logScope;
if (typeof scope !== 'string') {
logScope = scope;

+ 4
- 1
src/telemetry/usageTracker.ts Ver fichero

@ -49,7 +49,10 @@ export class UsageTracker implements Disposable {
return this._onDidChange.event;
}
constructor(private readonly container: Container, private readonly storage: Storage) {}
constructor(
private readonly container: Container,
private readonly storage: Storage,
) {}
dispose(): void {}

+ 7
- 6
src/trackers/gitLineTracker.ts Ver fichero

@ -85,12 +85,13 @@ export class GitLineTracker extends LineTracker {
})
private onContentChanged(e: DocumentContentChangeEvent<GitDocumentState>) {
if (
e.contentChanges.some(scope =>
this.selections?.some(
selection =>
(scope.range.end.line >= selection.active && selection.active >= scope.range.start.line) ||
(scope.range.start.line >= selection.active && selection.active >= scope.range.end.line),
),
e.contentChanges.some(
scope =>
this.selections?.some(
selection =>
(scope.range.end.line >= selection.active && selection.active >= scope.range.start.line) ||
(scope.range.start.line >= selection.active && selection.active >= scope.range.end.line),
),
)
) {
this.trigger('editor');

+ 5
- 1
src/views/nodes/comparePickerNode.ts Ver fichero

@ -15,7 +15,11 @@ export class ComparePickerNode extends ViewNode {
readonly order: number = Date.now();
readonly pinned: boolean = false;
constructor(view: SearchAndCompareView, parent: SearchAndCompareViewNode, public readonly selectedRef: RepoRef) {
constructor(
view: SearchAndCompareView,
parent: SearchAndCompareViewNode,
public readonly selectedRef: RepoRef,
) {
super(unknownGitUri, view, parent);
}

+ 5
- 1
src/views/nodes/rebaseStatusNode.ts Ver fichero

@ -118,7 +118,11 @@ export class RebaseStatusNode extends ViewNode {
}
export class RebaseCommitNode extends ViewRefNode<ViewsWithCommits, GitRevisionReference> {
constructor(view: ViewsWithCommits, parent: ViewNode, public readonly commit: GitCommit) {
constructor(
view: ViewsWithCommits,
parent: ViewNode,
public readonly commit: GitCommit,
) {
super(commit.getGitUri(), view, parent);
}

+ 5
- 1
src/views/nodes/reflogRecordNode.ts Ver fichero

@ -15,7 +15,11 @@ import { ContextValues, getViewNodeId, ViewNode } from './viewNode';
export class ReflogRecordNode extends ViewNode<ViewsWithCommits> implements PageableViewNode {
limit: number | undefined;
constructor(view: ViewsWithCommits, parent: ViewNode, public readonly record: GitReflogRecord) {
constructor(
view: ViewsWithCommits,
parent: ViewNode,
public readonly record: GitReflogRecord,
) {
super(GitUri.fromRepoPath(record.repoPath), view, parent);
this.updateContext({ reflog: record });

+ 6
- 1
src/views/nodes/tagNode.ts Ver fichero

@ -21,7 +21,12 @@ import { ContextValues, getViewNodeId, ViewRefNode } from './viewNode';
export class TagNode extends ViewRefNode<ViewsWithTags, GitTagReference> implements PageableViewNode {
limit: number | undefined;
constructor(uri: GitUri, view: ViewsWithTags, public override parent: ViewNode, public readonly tag: GitTag) {
constructor(
uri: GitUri,
view: ViewsWithTags,
public override parent: ViewNode,
public readonly tag: GitTag,
) {
super(uri, view, parent);
this.updateContext({ tag: tag });

+ 11
- 2
src/views/nodes/viewNode.ts Ver fichero

@ -295,7 +295,12 @@ export abstract class ViewFileNode
TView,
State
> {
constructor(uri: GitUri, view: TView, public override parent: ViewNode, public readonly file: GitFile) {
constructor(
uri: GitUri,
view: TView,
public override parent: ViewNode,
public readonly file: GitFile,
) {
super(uri, view, parent);
}
@ -313,7 +318,11 @@ export abstract class ViewRefNode<
TReference extends GitReference = GitReference,
State extends object = any,
> extends ViewNode<TView, State> {
constructor(uri: GitUri, view: TView, protected override readonly parent: ViewNode) {
constructor(
uri: GitUri,
view: TView,
protected override readonly parent: ViewNode,
) {
super(uri, view, parent);
}

+ 17
- 16
src/views/viewBase.ts Ver fichero

@ -94,22 +94,23 @@ export interface TreeViewNodeCollapsibleStateChangeEvent extends TreeViewExpa
}
export abstract class ViewBase<
Type extends TreeViewTypes,
RootNode extends ViewNode,
ViewConfig extends
| BranchesViewConfig
| ContributorsViewConfig
| FileHistoryViewConfig
| CommitsViewConfig
| LineHistoryViewConfig
| RemotesViewConfig
| RepositoriesViewConfig
| SearchAndCompareViewConfig
| StashesViewConfig
| TagsViewConfig
| WorkspacesViewConfig
| WorktreesViewConfig,
> implements TreeDataProvider<ViewNode>, Disposable
Type extends TreeViewTypes,
RootNode extends ViewNode,
ViewConfig extends
| BranchesViewConfig
| ContributorsViewConfig
| FileHistoryViewConfig
| CommitsViewConfig
| LineHistoryViewConfig
| RemotesViewConfig
| RepositoriesViewConfig
| SearchAndCompareViewConfig
| StashesViewConfig
| TagsViewConfig
| WorkspacesViewConfig
| WorktreesViewConfig,
>
implements TreeDataProvider<ViewNode>, Disposable
{
get id(): `gitlens.views.${Type}` {
return `gitlens.views.${this.type}`;

+ 2
- 1
src/views/workspacesView.ts Ver fichero

@ -57,7 +57,8 @@ export class WorkspacesView extends ViewBase<'workspaces', WorkspacesViewNode, W
return [
registerViewCommand(
this.getQualifiedCommand('info'),
() => env.openExternal(Uri.parse('https://help.gitkraken.com/gitlens/side-bar/#workspaces-☁%ef%b8%8f')),
() =>
env.openExternal(Uri.parse('https://help.gitkraken.com/gitlens/side-bar/#workspaces-☁%ef%b8%8f')),
this,
),
registerViewCommand(

+ 1
- 1
src/webviews/apps/commitDetails/commitDetails.html Ver fichero

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />

+ 1
- 1
src/webviews/apps/home/home.html Ver fichero

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />

+ 7
- 2
src/webviews/apps/home/home.scss Ver fichero

@ -159,14 +159,19 @@ ul {
overflow: auto;
padding: 0.8rem 2rem 0.4rem;
background: linear-gradient(var(--color-view-background) 33%, var(--color-view-background)),
background:
linear-gradient(var(--color-view-background) 33%, var(--color-view-background)),
linear-gradient(var(--color-view-background), var(--color-view-background) 66%) 0 100%,
linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)),
linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)) 0 100%;
background-color: var(--color-view-background);
background-repeat: no-repeat;
background-attachment: local, local, scroll, scroll;
background-size: 100% 12px, 100% 12px, 100% 6px, 100% 6px;
background-size:
100% 12px,
100% 12px,
100% 6px,
100% 6px;
}
&__nav {
flex: none;

+ 1
- 1
src/webviews/apps/plus/account/account.html Ver fichero

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />

+ 1
- 1
src/webviews/apps/plus/focus/focus.html Ver fichero

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />

+ 1
- 1
src/webviews/apps/plus/graph/graph.html Ver fichero

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />

+ 17
- 17
src/webviews/apps/plus/graph/minimap/minimap.ts Ver fichero

@ -634,7 +634,7 @@ export class GraphMinimap extends FASTElement {
start: day,
end: day,
class: 'marker-result',
} satisfies RegionOptions),
}) satisfies RegionOptions,
);
}
@ -917,17 +917,17 @@ export class GraphMinimap extends FASTElement {
})}</span>`
: ''
}${
groups
?.get('branch')
?.sort((a, b) => (a.current ? -1 : 1) - (b.current ? -1 : 1))
.map(
m =>
/*html*/ `<span class="branch${m.current ? ' current' : ''}">${
m.name
}</span>`,
)
.join('') ?? ''
}</div>
groups
?.get('branch')
?.sort((a, b) => (a.current ? -1 : 1) - (b.current ? -1 : 1))
.map(
m =>
/*html*/ `<span class="branch${m.current ? ' current' : ''}">${
m.name
}</span>`,
)
.join('') ?? ''
}</div>
<div class="refs">${
groups
?.get('remote')
@ -940,11 +940,11 @@ export class GraphMinimap extends FASTElement {
)
.join('') ?? ''
}${
groups
?.get('tag')
?.map(m => /*html*/ `<span class="tag">${m.name}</span>`)
.join('') ?? ''
}</div>`
groups
?.get('tag')
?.map(m => /*html*/ `<span class="tag">${m.name}</span>`)
.join('') ?? ''
}</div>`
: ''
}
</div>`;

+ 4
- 1
src/webviews/apps/plus/timeline/chart.ts Ver fichero

@ -40,7 +40,10 @@ export class TimelineChart implements Disposable {
return this.placement !== 'editor';
}
constructor(selector: string, private readonly placement: 'editor' | 'view') {
constructor(
selector: string,
private readonly placement: 'editor' | 'view',
) {
this._selector = selector;
const fn = () => {

+ 1
- 1
src/webviews/apps/plus/timeline/timeline.html Ver fichero

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />

+ 1
- 1
src/webviews/apps/rebase/rebase.html Ver fichero

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />

+ 1
- 1
src/webviews/apps/settings/settings.html Ver fichero

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />

+ 3
- 1
src/webviews/apps/settings/settings.scss Ver fichero

@ -245,7 +245,9 @@ header {
.image__preview {
border-radius: 8px;
box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.8), 0px 0px 12px 1px rgba(0, 0, 0, 0.5);
box-shadow:
0px 0px 1px 0px rgba(0, 0, 0, 0.8),
0px 0px 12px 1px rgba(0, 0, 0, 0.5);
width: 600px;
height: auto;
}

+ 20
- 5
src/webviews/apps/shared/buttons.scss Ver fichero

@ -54,7 +54,10 @@
border: 1px solid rgba(255, 255, 255, 0.6);
color: white;
}
transition: background-color 250ms, border-color 250ms, color 250ms;
transition:
background-color 250ms,
border-color 250ms,
color 250ms;
&:not([disabled]):hover,
&:not([disabled]):focus {
@ -80,7 +83,10 @@
border: 1px solid white;
color: black;
font-weight: 600;
transition: background-color 250ms, border-color 250ms, color 250ms;
transition:
background-color 250ms,
border-color 250ms,
color 250ms;
&:not([disabled]):hover,
&:not([disabled]):focus {
@ -99,7 +105,10 @@
border: 1px solid var(--color-button-background);
color: var(--color-button-foreground);
font-weight: 600;
transition: background-color 250ms, border-color 250ms, color 250ms;
transition:
background-color 250ms,
border-color 250ms,
color 250ms;
&:not([disabled]):hover,
&:not([disabled]):focus {
@ -126,7 +135,10 @@
border: 1px solid var(--color-button-secondary-background);
color: var(--color-button-foreground);
font-weight: 600;
transition: background-color 250ms, border-color 250ms, color 250ms;
transition:
background-color 250ms,
border-color 250ms,
color 250ms;
&:not([disabled]):hover,
&:not([disabled]):focus {
@ -157,7 +169,10 @@
border: 1px solid rgba(255, 255, 255, 0.2);
color: rgba(255, 255, 255, 0.6);
}
transition: background-color 250ms, border-color 250ms, color 250ms;
transition:
background-color 250ms,
border-color 250ms,
color 250ms;
&:not([disabled]):hover,
&:not([disabled]):focus {

+ 4
- 1
src/webviews/apps/shared/snow.scss Ver fichero

@ -10,7 +10,10 @@ canvas.snow {
width: 28px; //36px;
opacity: 0.6;
transform: rotate(-7deg);
transition: filter 250ms, opacity 250ms, transform 250ms;
transition:
filter 250ms,
opacity 250ms,
transform 250ms;
body:not(.snowing) & {
filter: grayscale(100%);

+ 1
- 1
src/webviews/apps/welcome/welcome.html Ver fichero

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />

+ 4
- 1
src/webviews/home/homeWebview.ts Ver fichero

@ -14,7 +14,10 @@ const emptyDisposable = Object.freeze({
export class HomeWebviewProvider implements WebviewProvider<State> {
private readonly _disposable: Disposable;
constructor(private readonly container: Container, private readonly host: WebviewController<State>) {
constructor(
private readonly container: Container,
private readonly host: WebviewController<State>,
) {
this._disposable = Disposable.from(
this.container.git.onDidChangeRepositories(this.onRepositoriesChanged, this),
!workspace.isTrusted

+ 4
- 1
src/webviews/protocol.ts Ver fichero

@ -10,7 +10,10 @@ export interface IpcMessage {
abstract class IpcMessageType<Params = void> {
_?: Params; // Required for type inferencing to work properly
constructor(public readonly method: string, public readonly reset: boolean = false) {}
constructor(
public readonly method: string,
public readonly reset: boolean = false,
) {}
}
export type IpcMessageParams<T> = T extends IpcMessageType<infer P> ? P : never;

+ 4
- 1
src/webviews/settings/settingsWebview.ts Ver fichero

@ -29,7 +29,10 @@ export class SettingsWebviewProvider implements WebviewProvider {
private readonly _disposable: Disposable;
private _pendingJumpToAnchor: string | undefined;
constructor(protected readonly container: Container, protected readonly host: WebviewController<State>) {
constructor(
protected readonly container: Container,
protected readonly host: WebviewController<State>,
) {
this._disposable = configuration.onDidChangeAny(this.onAnyConfigurationChanged, this);
}

+ 4
- 1
src/webviews/welcome/welcomeWebview.ts Ver fichero

@ -17,7 +17,10 @@ const emptyDisposable = Object.freeze({
export class WelcomeWebviewProvider implements WebviewProvider<State> {
private readonly _disposable: Disposable;
constructor(private readonly container: Container, private readonly host: WebviewController<State>) {
constructor(
private readonly container: Container,
private readonly host: WebviewController<State>,
) {
this._disposable = Disposable.from(
configuration.onDidChange(this.onConfigurationChanged, this),
this.container.git.onDidChangeRepositories(this.notifyDidChange, this),

Cargando…
Cancelar
Guardar