<commit_before>import * as _ from "lodash";
import * as clc from "cli-color";
import * as marked from "marked";
import * as semver from "semver";
import * as api from "../api";
import { FirebaseError } from "../error";
import * as logger from "../logger";
import { promptOnce } from "../prompt";

const EXTENSIONS_REGISTRY_ENDPOINT = "/extensions.json";
const AUDIENCE_WARNING_MESSAGES: { [key: string]: string } = {
  "open-alpha": marked(
    `${clc.bold("Important")}: This extension is part of the ${clc.bold(
      "preliminary-release program"
    )} for extensions.\n Its functionality might change in backward-incompatible ways before its official release. Learn more: https://github.com/firebase/extensions/tree/master/.preliminary-release-extensions`
  ),
  "closed-alpha": marked(
    `${clc.yellow.bold("Important")}: This extension is part of the ${clc.bold(
      "Firebase Alpha program"
    )}.\n This extension is strictly confidential, and its functionality might change in backward-incompatible ways before its official, public release. Learn more: https://dev-partners.googlesource.com/samples/firebase/extensions-alpha/+/refs/heads/master/README.md`
  ),
};

export interface RegistryEntry {
  icons?: { [key: string]: string };
  labels: { [key: string]: string };
  versions: { [key: string]: string };
  updateWarnings?: { [key: string]: UpdateWarning[] };
  audience?: string;
}

export interface UpdateWarning {<commit_msg>Support experimental extensions in CLI (#2830)<commit_after>import * as _ from "lodash";
import * as clc from "cli-color";
import * as marked from "marked";
import * as semver from "semver";
import * as api from "../api";
import { FirebaseError } from "../error";
import * as logger from "../logger";
import { promptOnce } from "../prompt";

const EXTENSIONS_REGISTRY_ENDPOINT = "/extensions.json";
const AUDIENCE_WARNING_MESSAGES: { [key: string]: string } = {
  "open-alpha": marked(
    `${clc.bold("Important")}: This extension is part of the ${clc.bold(
      "preliminary-release program"
    )} for extensions.\n Its functionality might change in backward-incompatible ways before its official release. Learn more: https://github.com/firebase/extensions/tree/master/.preliminary-release-extensions`
  ),
  "closed-alpha": marked(
    `${clc.yellow.bold("Important")}: This extension is part of the ${clc.bold(
      "Firebase Alpha program"
    )}.\n This extension is strictly confidential, and its functionality might change in backward-incompatible ways before its official, public release. Learn more: https://dev-partners.googlesource.com/samples/firebase/extensions-alpha/+/refs/heads/master/README.md`
  ),
  experimental: marked(
    `${clc.yellow.bold("Important")}: This extension is ${clc.bold(
      "experimental"
    )} and may not be production-ready. Its functionality might change in backward-incompatible ways before its official release, or it may be discontinued. Learn more: https://github.com/FirebaseExtended/experimental-extensions`
  ),
};

export interface RegistryEntry {
  icons?: { [key: string]: string };
  labels: { [key: string]: string };
  versions: { [key: string]: string };
  updateWarnings?: { [key: string]: UpdateWarning[] };
  audience?: string;
}

export interface UpdateWarning {
{'fraction_non_alphanumeric': 0.13662702043305885, 'fraction_numerical': 0.001219884111009454, 'mean_word_length': 4.403624382207578, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1859634', 'n_tokens_mistral': 948, 'n_tokens_neox': 920, 'n_words': 301}