constants.js 642 B

12345678910111213141516171819202122
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.MAGIC_VALUE = exports.MAGIC_KEY = exports.SHA = void 0;
  6. var _crypto = require("crypto");
  7. var _semver = require("semver");
  8. var _package = require("../package.json");
  9. // function to use for creating hashes
  10. const SHA = 'sha1'; // name of coverage data magic key
  11. exports.SHA = SHA;
  12. const MAGIC_KEY = '_coverageSchema'; // name of coverage data magic value
  13. exports.MAGIC_KEY = MAGIC_KEY;
  14. const MAGIC_VALUE = (0, _crypto.createHash)(SHA).update(_package.name + '@' + (0, _semver.major)(_package.version)).digest('hex');
  15. exports.MAGIC_VALUE = MAGIC_VALUE;