No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

experiments-list.js 996B

123456789101112131415161718192021222324252627
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.command = void 0;
  4. const command_1 = require("../command");
  5. const Table = require("cli-table");
  6. const experiments = require("../experiments");
  7. const functional_1 = require("../functional");
  8. const logger_1 = require("../logger");
  9. exports.command = new command_1.Command("experiments:list").action(() => {
  10. const table = new Table({
  11. head: ["Enabled", "Name", "Description"],
  12. style: { head: ["yellow"] },
  13. });
  14. const [enabled, disabled] = (0, functional_1.partition)(Object.entries(experiments.ALL_EXPERIMENTS), ([name]) => {
  15. return experiments.isEnabled(name);
  16. });
  17. for (const [name, exp] of enabled) {
  18. table.push(["y", name, exp.shortDescription]);
  19. }
  20. for (const [name, exp] of disabled) {
  21. if (!exp.public) {
  22. continue;
  23. }
  24. table.push(["n", name, exp.shortDescription]);
  25. }
  26. logger_1.logger.info(table.toString());
  27. });