Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
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.

debug.js 1.0KB

123456789101112131415161718192021222324252627282930313233
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.getInclusionReasons = getInclusionReasons;
  6. var _semver = require("semver");
  7. var _pretty = require("./pretty");
  8. var _utils = require("./utils");
  9. function getInclusionReasons(item, targetVersions, list) {
  10. const minVersions = list[item] || {};
  11. return Object.keys(targetVersions).reduce((result, env) => {
  12. const minVersion = (0, _utils.getLowestImplementedVersion)(minVersions, env);
  13. const targetVersion = targetVersions[env];
  14. if (!minVersion) {
  15. result[env] = (0, _pretty.prettifyVersion)(targetVersion);
  16. } else {
  17. const minIsUnreleased = (0, _utils.isUnreleasedVersion)(minVersion, env);
  18. const targetIsUnreleased = (0, _utils.isUnreleasedVersion)(targetVersion, env);
  19. if (!targetIsUnreleased && (minIsUnreleased || _semver.lt(targetVersion.toString(), (0, _utils.semverify)(minVersion)))) {
  20. result[env] = (0, _pretty.prettifyVersion)(targetVersion);
  21. }
  22. }
  23. return result;
  24. }, {});
  25. }