addons/isl-server/src/serverTypes.tsblame
View source
b69ab311/**
b69ab312 * Copyright (c) Meta Platforms, Inc. and affiliates.
b69ab313 *
b69ab314 * This source code is licensed under the MIT license found in the
b69ab315 * LICENSE file in the root directory of this source tree.
b69ab316 */
b69ab317
b69ab318import type {ConfigName} from 'isl/src/types';
b69ab319import type {ServerSideTracker} from './analytics/serverSideTracker';
b69ab3110import type {Logger} from './logger';
b69ab3111
b69ab3112/**
b69ab3113 * Per-connection context with which to access a repository.
b69ab3114 * Repositories instances are shared and reused, but
b69ab3115 * this context is not. It's used for any state that cannot be shared.
b69ab3116 */
b69ab3117export type RepositoryContext = {
b69ab3118 cmd: string;
b69ab3119 cwd: string;
b69ab3120 logger: Logger;
b69ab3121 tracker: ServerSideTracker;
b69ab3122
b69ab3123 knownConfigs?: ReadonlyMap<ConfigName, string> | undefined;
b69ab3124 /** Whether we pass --debug to sl commands */
b69ab3125 debug?: boolean;
b69ab3126 /** Whether we pass --verbose to sl commands */
b69ab3127 verbose?: boolean;
b69ab3128 /**
b69ab3129 * Configured merge tool, from `ui.merge`, as long as merge-tools.$tool.gui is also True.
b69ab3130 * null -> no merge tool configured or not valid
b69ab3131 * undefined -> not cached yet
b69ab3132 */
b69ab3133 cachedMergeTool?: string | null;
b69ab3134 // TODO: visible commit age range
b69ab3135};