Bez popisu
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.

checkMinRequiredVersion.js 806B

1234567891011121314
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.checkMinRequiredVersion = void 0;
  4. const semver = require("semver");
  5. const configstore_1 = require("./configstore");
  6. const error_1 = require("./error");
  7. const pkg = require("../package.json");
  8. function checkMinRequiredVersion(options, key) {
  9. const minVersion = configstore_1.configstore.get(`motd.${key}`);
  10. if (minVersion && semver.gt(minVersion, pkg.version)) {
  11. throw new error_1.FirebaseError(`This command requires at least version ${minVersion} of the CLI to use. To update to the latest version using npm, run \`npm install -g firebase-tools\`. For other CLI management options, see https://firebase.google.com/docs/cli#update-cli`);
  12. }
  13. }
  14. exports.checkMinRequiredVersion = checkMinRequiredVersion;