UNPKG

stryker

Version:
32 lines 1.79 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var objectUtils_1 = require("../utils/objectUtils"); var os = require("os"); var InputFileCollection = /** @class */ (function () { function InputFileCollection(files, mutateGlobResult) { this.files = files; this.filesToMutate = files.filter(function (file) { return mutateGlobResult.some(function (name) { return name === file.name; }); }); } InputFileCollection.prototype.logFiles = function (log) { if (!this.files.length) { log.warn("No files selected. Please make sure you either" + os.EOL + (" (1) Run Stryker inside a Git repository; or" + os.EOL) + " (2) Specify the `files` property in your Stryker configuration (`--files via command line`)."); } else { if (this.filesToMutate.length) { log.info("Found " + this.filesToMutate.length + " of " + this.files.length + " file(s) to be mutated."); } else { log.warn(objectUtils_1.normalizeWhiteSpaces("No files marked to be mutated, Stryker will perform a dry-run without actually mutating anything.\n You can configure the `mutate` property in your stryker.conf.js file (or use `--mutate` via command line).")); } if (log.isDebugEnabled) { log.debug("All input files: " + JSON.stringify(this.files.map(function (file) { return file.name; }), null, 2)); log.debug("Files to mutate: " + JSON.stringify(this.filesToMutate.map(function (file) { return file.name; }), null, 2)); } } }; return InputFileCollection; }()); exports.default = InputFileCollection; //# sourceMappingURL=InputFileCollection.js.map