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

1234567891011121314
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.parseVersionPredicate = void 0;
  4. const error_1 = require("../error");
  5. function parseVersionPredicate(versionPredicate) {
  6. const versionPredicateRegex = "^(?<comparator>>=|<=|>|<)?(?<targetSemVer>.*)";
  7. const matches = versionPredicate.match(versionPredicateRegex);
  8. if (!matches || !matches.groups.targetSemVer) {
  9. throw new error_1.FirebaseError("Invalid version predicate.");
  10. }
  11. const comparator = matches.groups.comparator || "=";
  12. return { comparator, targetSemVer: matches.groups.targetSemVer };
  13. }
  14. exports.parseVersionPredicate = parseVersionPredicate;