"use strict";
/**
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.TEST_VCS = exports.VcsPresetNames = void 0;
exports.findVcsPreset = findVcsPreset;
exports.getVcsPreset = getVcsPreset;
const vcsHardcoded_1 = require("./vcsHardcoded");
const vcsGitAdHoc_1 = require("./vcsGitAdHoc");
const vcsGitEager_1 = require("./vcsGitEager");
const vcsDisabled_1 = require("./vcsDisabled");
const vcsDefaultV1_1 = require("./vcsDefaultV1");
const vcsDefaultV2_1 = require("./vcsDefaultV2");
const VcsPresets = {
    'git-ad-hoc': vcsGitAdHoc_1.VcsGitAdHoc,
    'git-eager': vcsGitEager_1.VscGitEager,
    hardcoded: vcsHardcoded_1.VcsHardcoded,
    disabled: vcsDisabled_1.VcsDisabled,
    'default-v1': vcsDefaultV1_1.VcsDefaultV1,
    'default-v2': vcsDefaultV2_1.VcsDefaultV2,
};
exports.VcsPresetNames = Object.keys(VcsPresets);
function findVcsPreset(presetName) {
    return VcsPresets[presetName];
}
function getVcsPreset(presetName) {
    const vcs = findVcsPreset(presetName);
    if (vcs) {
        return vcs;
    }
    else {
        throw new Error(`Unknown Docusaurus VCS preset name: ${process.env.DOCUSAURUS_VCS}`);
    }
}
// Convenient export for writing unit tests depending on VCS
exports.TEST_VCS = {
    CREATION_INFO: vcsHardcoded_1.VCS_HARDCODED_CREATION_INFO,
    LAST_UPDATE_INFO: vcsHardcoded_1.VCS_HARDCODED_LAST_UPDATE_INFO,
    UNTRACKED_FILE_PATH: vcsHardcoded_1.VCS_HARDCODED_UNTRACKED_FILE_PATH,
    ...vcsHardcoded_1.VcsHardcoded,
};
//# sourceMappingURL=vcs.js.map