"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CliConfig = exports.ProjectEnviro = exports.CliEnviro = exports.ApiClientKindEnum = exports.Verbosity = void 0;
const tslib_1 = require("tslib");
const inversify_1 = require("inversify");
const codiac_api_1 = require("../../apis/codiac-api");
const codiac_relay_nats_1 = require("../../apis/codiac-relay-nats");
/** User setting for console output volume.
 * LogLevels rendered for each setting are as follows:
 * normal: notice, warn, error, and fatal;
 * detail: adds detail;
 * debug: adds debug and trace. */
var Verbosity;
(function (Verbosity) {
    Verbosity["normal"] = "normal";
    Verbosity["detail"] = "detail";
    Verbosity["debug"] = "debug";
})(Verbosity = exports.Verbosity || (exports.Verbosity = {}));
/** Declaration of which client to use to access the api, Rest vs Nats. */
exports.ApiClientKindEnum = {
    rest: "rest",
    nats: "nats"
};
/** Basic local environment info about the current instance of the cli process.
 */
let CliEnviro = class CliEnviro {
    constructor(cliConfigDir, localProgramFolder, version, relayVersion) {
        this.cliConfigDir = cliConfigDir;
        this.localProgramFolder = localProgramFolder;
        this.version = version;
        this.relayVersion = relayVersion;
        // this.installFolder = installFolder;
    }
};
CliEnviro = tslib_1.__decorate([
    (0, inversify_1.injectable)(),
    tslib_1.__metadata("design:paramtypes", [String, String, String, String])
], CliEnviro);
exports.CliEnviro = CliEnviro;
/** Basic codiac project info for the current instance of the cli process.
 */
let ProjectEnviro = class ProjectEnviro {
    constructor(projectRoot) {
        this.projectRoot = projectRoot;
    }
};
ProjectEnviro = tslib_1.__decorate([
    (0, inversify_1.injectable)(),
    tslib_1.__metadata("design:paramtypes", [String])
], ProjectEnviro);
exports.ProjectEnviro = ProjectEnviro;
/** Configuration for the Toyhauler CLI (command Line Interface) itself.
 *  This onfiguration is global for the install of the CLI.
 */
let CliConfig = class CliConfig {
    constructor() {
        /** Declares that the console should render all output details
         * LogLevels rendered for each setting are as follows:
         * normal: notice, warn, error, and fatal;
         * detail: adds detail;
         * debug: adds debug and trace. */
        this.verbosity = Verbosity.normal;
    }
};
CliConfig.FILENAME = 'globalconfig.json';
/** Prefix to apply to any env values that are intended to be applied (as overrides) to the ultimate CliConfig.
 *
 * eg:
 * To set an env variable to apply to (override) the CliConfig's `"codiacNatsUrl"` property:
 * ```
 * APPCONFIG__CODIAC_NATS_URL=wss://codiac-nats.codiac.io
 * ```
*/
CliConfig.ENV_PREFIX = "CLICONFIG__";
CliConfig.DEFAULTS = {
    apiClientKind: exports.ApiClientKindEnum.nats,
    codiacApiBaseUrl: codiac_api_1.CodiacRestClient.DEFAULT_API_URL,
    /** @deprecated This property is no longer in use - use the api client instead. */
    authApiBaseUrl: codiac_api_1.CodiacRestClient.DEFAULT_API_URL,
    addBranchNameToPrereleases: false,
    localEntities: false,
    verbosity: Verbosity.normal,
    codiacNatsUrl: "wss://codiac-nats.codiac.io",
    skipRelayAutoStart: false,
    natsRequestTimeoutInMs: codiac_relay_nats_1.RelayNatsClient.DEFAULTS.requestTimeoutInMs,
    natsConnectTimeoutInMs: codiac_relay_nats_1.RelayNatsClient.DEFAULTS.connectTimeoutInMs,
    useLocalRelay: true
};
CliConfig = tslib_1.__decorate([
    (0, inversify_1.injectable)(),
    tslib_1.__metadata("design:paramtypes", [])
], CliConfig);
exports.CliConfig = CliConfig;
//# sourceMappingURL=cli-config.js.map