Нема описа
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.

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.command = void 0;
  4. const clc = require("colorette");
  5. const checkMinRequiredVersion_1 = require("../checkMinRequiredVersion");
  6. const command_1 = require("../command");
  7. const projectUtils_1 = require("../projectUtils");
  8. const extensionsHelper_1 = require("../extensions/extensionsHelper");
  9. const listExtensions_1 = require("../extensions/listExtensions");
  10. const requirePermissions_1 = require("../requirePermissions");
  11. const logger_1 = require("../logger");
  12. const utils = require("../utils");
  13. exports.command = new command_1.Command("ext")
  14. .description("display information on how to use ext commands and extensions installed to your project")
  15. .before(checkMinRequiredVersion_1.checkMinRequiredVersion, "extMinVersion")
  16. .action(async (options) => {
  17. utils.logLabeledBullet(extensionsHelper_1.logPrefix, "list of extensions commands:");
  18. const firebaseTools = require("../");
  19. const commandNames = [
  20. "ext:install",
  21. "ext:info",
  22. "ext:list",
  23. "ext:configure",
  24. "ext:update",
  25. "ext:uninstall",
  26. ];
  27. for (const commandName of commandNames) {
  28. const command = firebaseTools.getCommand(commandName);
  29. logger_1.logger.info(clc.bold("\n" + command.name()));
  30. command.outputHelp();
  31. }
  32. logger_1.logger.info();
  33. try {
  34. await (0, requirePermissions_1.requirePermissions)(options, ["firebaseextensions.instances.list"]);
  35. const projectId = (0, projectUtils_1.needProjectId)(options);
  36. return (0, listExtensions_1.listExtensions)(projectId);
  37. }
  38. catch (err) {
  39. return;
  40. }
  41. });