暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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;