GOOD SHELL MAS BOY
Server: Apache/2.4.52 (Ubuntu)
System: Linux vmi1836763.contaboserver.net 5.15.0-130-generic #140-Ubuntu SMP Wed Dec 18 17:59:53 UTC 2024 x86_64
User: www-data (33)
PHP: 8.4.10
Disabled: NONE
Upload Files
File: //usr/local/lib/node_modules/firebase-tools/lib/commands/experiments-disable.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.command = void 0;
const colorette_1 = require("colorette");
const command_1 = require("../command");
const error_1 = require("../error");
const experiments = require("../experiments");
const logger_1 = require("../logger");
const utils_1 = require("../utils");
exports.command = new command_1.Command("experiments:disable <experiment>")
    .description("disable an experiment on this machine")
    .action((experiment) => {
    if (experiments.isValidExperiment(experiment)) {
        experiments.setEnabled(experiment, false);
        experiments.flushToDisk();
        logger_1.logger.info(`Disabled experiment ${(0, colorette_1.bold)(experiment)}`);
        return;
    }
    let message = `Cannot find experiment ${(0, colorette_1.bold)(experiment)}`;
    const potentials = experiments.experimentNameAutocorrect(experiment);
    if (potentials.length === 1) {
        message = `${message}\nDid you mean ${potentials[0]}?`;
    }
    else if (potentials.length) {
        message = `${message}\nDid you mean ${potentials.slice(0, -1).join(",")} or ${(0, utils_1.last)(potentials)}?`;
    }
    throw new error_1.FirebaseError(message);
});