@d-es-ign/stryker-js-core 9.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +96 -0
- package/bin/stryker +2 -0
- package/bin/stryker.js +6 -0
- package/dist/src/checker/checker-child-process-proxy.d.ts +16 -0
- package/dist/src/checker/checker-child-process-proxy.d.ts.map +1 -0
- package/dist/src/checker/checker-child-process-proxy.js +22 -0
- package/dist/src/checker/checker-child-process-proxy.js.map +1 -0
- package/dist/src/checker/checker-facade.d.ts +9 -0
- package/dist/src/checker/checker-facade.d.ts.map +1 -0
- package/dist/src/checker/checker-facade.js +52 -0
- package/dist/src/checker/checker-facade.js.map +1 -0
- package/dist/src/checker/checker-factory.d.ts +10 -0
- package/dist/src/checker/checker-factory.d.ts.map +1 -0
- package/dist/src/checker/checker-factory.js +10 -0
- package/dist/src/checker/checker-factory.js.map +1 -0
- package/dist/src/checker/checker-resource.d.ts +8 -0
- package/dist/src/checker/checker-resource.d.ts.map +1 -0
- package/dist/src/checker/checker-resource.js +2 -0
- package/dist/src/checker/checker-resource.js.map +1 -0
- package/dist/src/checker/checker-retry-decorator.d.ts +12 -0
- package/dist/src/checker/checker-retry-decorator.d.ts.map +1 -0
- package/dist/src/checker/checker-retry-decorator.js +37 -0
- package/dist/src/checker/checker-retry-decorator.js.map +1 -0
- package/dist/src/checker/checker-worker.d.ts +14 -0
- package/dist/src/checker/checker-worker.d.ts.map +1 -0
- package/dist/src/checker/checker-worker.js +41 -0
- package/dist/src/checker/checker-worker.js.map +1 -0
- package/dist/src/checker/index.d.ts +4 -0
- package/dist/src/checker/index.d.ts.map +1 -0
- package/dist/src/checker/index.js +4 -0
- package/dist/src/checker/index.js.map +1 -0
- package/dist/src/child-proxy/child-process-crashed-error.d.ts +8 -0
- package/dist/src/child-proxy/child-process-crashed-error.d.ts.map +1 -0
- package/dist/src/child-proxy/child-process-crashed-error.js +16 -0
- package/dist/src/child-proxy/child-process-crashed-error.js.map +1 -0
- package/dist/src/child-proxy/child-process-proxy-worker.d.ts +32 -0
- package/dist/src/child-proxy/child-process-proxy-worker.d.ts.map +1 -0
- package/dist/src/child-proxy/child-process-proxy-worker.js +148 -0
- package/dist/src/child-proxy/child-process-proxy-worker.js.map +1 -0
- package/dist/src/child-proxy/child-process-proxy.d.ts +45 -0
- package/dist/src/child-proxy/child-process-proxy.d.ts.map +1 -0
- package/dist/src/child-proxy/child-process-proxy.js +232 -0
- package/dist/src/child-proxy/child-process-proxy.js.map +1 -0
- package/dist/src/child-proxy/id-generator.d.ts +5 -0
- package/dist/src/child-proxy/id-generator.d.ts.map +1 -0
- package/dist/src/child-proxy/id-generator.js +7 -0
- package/dist/src/child-proxy/id-generator.js.map +1 -0
- package/dist/src/child-proxy/message-protocol.d.ts +71 -0
- package/dist/src/child-proxy/message-protocol.d.ts.map +1 -0
- package/dist/src/child-proxy/message-protocol.js +34 -0
- package/dist/src/child-proxy/message-protocol.js.map +1 -0
- package/dist/src/child-proxy/out-of-memory-error.d.ts +5 -0
- package/dist/src/child-proxy/out-of-memory-error.d.ts.map +1 -0
- package/dist/src/child-proxy/out-of-memory-error.js +11 -0
- package/dist/src/child-proxy/out-of-memory-error.js.map +1 -0
- package/dist/src/concurrent/concurrency-token-provider.d.ts +20 -0
- package/dist/src/concurrent/concurrency-token-provider.d.ts.map +1 -0
- package/dist/src/concurrent/concurrency-token-provider.js +68 -0
- package/dist/src/concurrent/concurrency-token-provider.js.map +1 -0
- package/dist/src/concurrent/index.d.ts +4 -0
- package/dist/src/concurrent/index.d.ts.map +1 -0
- package/dist/src/concurrent/index.js +4 -0
- package/dist/src/concurrent/index.js.map +1 -0
- package/dist/src/concurrent/pool.d.ts +49 -0
- package/dist/src/concurrent/pool.d.ts.map +1 -0
- package/dist/src/concurrent/pool.js +137 -0
- package/dist/src/concurrent/pool.js.map +1 -0
- package/dist/src/concurrent/resource-decorator.d.ts +14 -0
- package/dist/src/concurrent/resource-decorator.d.ts.map +1 -0
- package/dist/src/concurrent/resource-decorator.js +24 -0
- package/dist/src/concurrent/resource-decorator.js.map +1 -0
- package/dist/src/config/config-file-formats.d.ts +6 -0
- package/dist/src/config/config-file-formats.d.ts.map +1 -0
- package/dist/src/config/config-file-formats.js +23 -0
- package/dist/src/config/config-file-formats.js.map +1 -0
- package/dist/src/config/config-reader.d.ts +23 -0
- package/dist/src/config/config-reader.d.ts.map +1 -0
- package/dist/src/config/config-reader.js +141 -0
- package/dist/src/config/config-reader.js.map +1 -0
- package/dist/src/config/file-matcher.d.ts +10 -0
- package/dist/src/config/file-matcher.d.ts.map +1 -0
- package/dist/src/config/file-matcher.js +31 -0
- package/dist/src/config/file-matcher.js.map +1 -0
- package/dist/src/config/index.d.ts +6 -0
- package/dist/src/config/index.d.ts.map +1 -0
- package/dist/src/config/index.js +6 -0
- package/dist/src/config/index.js.map +1 -0
- package/dist/src/config/meta-schema-builder.d.ts +10 -0
- package/dist/src/config/meta-schema-builder.d.ts.map +1 -0
- package/dist/src/config/meta-schema-builder.js +30 -0
- package/dist/src/config/meta-schema-builder.js.map +1 -0
- package/dist/src/config/options-validator.d.ts +28 -0
- package/dist/src/config/options-validator.d.ts.map +1 -0
- package/dist/src/config/options-validator.js +213 -0
- package/dist/src/config/options-validator.js.map +1 -0
- package/dist/src/config/validation-errors.d.ts +7 -0
- package/dist/src/config/validation-errors.d.ts.map +1 -0
- package/dist/src/config/validation-errors.js +154 -0
- package/dist/src/config/validation-errors.js.map +1 -0
- package/dist/src/di/core-tokens.d.ts +40 -0
- package/dist/src/di/core-tokens.d.ts.map +1 -0
- package/dist/src/di/core-tokens.js +40 -0
- package/dist/src/di/core-tokens.js.map +1 -0
- package/dist/src/di/index.d.ts +4 -0
- package/dist/src/di/index.d.ts.map +1 -0
- package/dist/src/di/index.js +4 -0
- package/dist/src/di/index.js.map +1 -0
- package/dist/src/di/plugin-creator.d.ts +10 -0
- package/dist/src/di/plugin-creator.d.ts.map +1 -0
- package/dist/src/di/plugin-creator.js +51 -0
- package/dist/src/di/plugin-creator.js.map +1 -0
- package/dist/src/di/plugin-loader.d.ts +41 -0
- package/dist/src/di/plugin-loader.d.ts.map +1 -0
- package/dist/src/di/plugin-loader.js +153 -0
- package/dist/src/di/plugin-loader.js.map +1 -0
- package/dist/src/errors.d.ts +5 -0
- package/dist/src/errors.d.ts.map +1 -0
- package/dist/src/errors.js +13 -0
- package/dist/src/errors.js.map +1 -0
- package/dist/src/fs/file-system.d.ts +19 -0
- package/dist/src/fs/file-system.d.ts.map +1 -0
- package/dist/src/fs/file-system.js +52 -0
- package/dist/src/fs/file-system.js.map +1 -0
- package/dist/src/fs/index.d.ts +5 -0
- package/dist/src/fs/index.d.ts.map +1 -0
- package/dist/src/fs/index.js +5 -0
- package/dist/src/fs/index.js.map +1 -0
- package/dist/src/fs/project-file.d.ts +26 -0
- package/dist/src/fs/project-file.d.ts.map +1 -0
- package/dist/src/fs/project-file.js +87 -0
- package/dist/src/fs/project-file.js.map +1 -0
- package/dist/src/fs/project-reader.d.ts +51 -0
- package/dist/src/fs/project-reader.d.ts.map +1 -0
- package/dist/src/fs/project-reader.js +335 -0
- package/dist/src/fs/project-reader.js.map +1 -0
- package/dist/src/fs/project.d.ts +22 -0
- package/dist/src/fs/project.d.ts.map +1 -0
- package/dist/src/fs/project.js +65 -0
- package/dist/src/fs/project.js.map +1 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +6 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/initializer/custom-initializers/angular-initializer.d.ts +17 -0
- package/dist/src/initializer/custom-initializers/angular-initializer.d.ts.map +1 -0
- package/dist/src/initializer/custom-initializers/angular-initializer.js +74 -0
- package/dist/src/initializer/custom-initializers/angular-initializer.js.map +1 -0
- package/dist/src/initializer/custom-initializers/custom-initializer.d.ts +13 -0
- package/dist/src/initializer/custom-initializers/custom-initializer.d.ts.map +1 -0
- package/dist/src/initializer/custom-initializers/custom-initializer.js +2 -0
- package/dist/src/initializer/custom-initializers/custom-initializer.js.map +1 -0
- package/dist/src/initializer/custom-initializers/index.d.ts +14 -0
- package/dist/src/initializer/custom-initializers/index.d.ts.map +1 -0
- package/dist/src/initializer/custom-initializers/index.js +16 -0
- package/dist/src/initializer/custom-initializers/index.js.map +1 -0
- package/dist/src/initializer/custom-initializers/react-initializer.d.ts +12 -0
- package/dist/src/initializer/custom-initializers/react-initializer.d.ts.map +1 -0
- package/dist/src/initializer/custom-initializers/react-initializer.js +25 -0
- package/dist/src/initializer/custom-initializers/react-initializer.js.map +1 -0
- package/dist/src/initializer/custom-initializers/svelte-initializer.d.ts +6 -0
- package/dist/src/initializer/custom-initializers/svelte-initializer.d.ts.map +1 -0
- package/dist/src/initializer/custom-initializers/svelte-initializer.js +33 -0
- package/dist/src/initializer/custom-initializers/svelte-initializer.js.map +1 -0
- package/dist/src/initializer/custom-initializers/vue-js-initializer.d.ts +11 -0
- package/dist/src/initializer/custom-initializers/vue-js-initializer.d.ts.map +1 -0
- package/dist/src/initializer/custom-initializers/vue-js-initializer.js +20 -0
- package/dist/src/initializer/custom-initializers/vue-js-initializer.js.map +1 -0
- package/dist/src/initializer/gitignore-writer.d.ts +7 -0
- package/dist/src/initializer/gitignore-writer.d.ts.map +1 -0
- package/dist/src/initializer/gitignore-writer.js +28 -0
- package/dist/src/initializer/gitignore-writer.js.map +1 -0
- package/dist/src/initializer/index.d.ts +6 -0
- package/dist/src/initializer/index.d.ts.map +1 -0
- package/dist/src/initializer/index.js +29 -0
- package/dist/src/initializer/index.js.map +1 -0
- package/dist/src/initializer/initializer-tokens.d.ts +9 -0
- package/dist/src/initializer/initializer-tokens.d.ts.map +1 -0
- package/dist/src/initializer/initializer-tokens.js +9 -0
- package/dist/src/initializer/initializer-tokens.js.map +1 -0
- package/dist/src/initializer/inquire.d.ts +12 -0
- package/dist/src/initializer/inquire.d.ts.map +1 -0
- package/dist/src/initializer/inquire.js +12 -0
- package/dist/src/initializer/inquire.js.map +1 -0
- package/dist/src/initializer/npm-client.d.ts +22 -0
- package/dist/src/initializer/npm-client.d.ts.map +1 -0
- package/dist/src/initializer/npm-client.js +65 -0
- package/dist/src/initializer/npm-client.js.map +1 -0
- package/dist/src/initializer/npm-registry.d.ts +13 -0
- package/dist/src/initializer/npm-registry.d.ts.map +1 -0
- package/dist/src/initializer/npm-registry.js +36 -0
- package/dist/src/initializer/npm-registry.js.map +1 -0
- package/dist/src/initializer/package-info.d.ts +10 -0
- package/dist/src/initializer/package-info.d.ts.map +1 -0
- package/dist/src/initializer/package-info.js +2 -0
- package/dist/src/initializer/package-info.js.map +1 -0
- package/dist/src/initializer/prompt-option.d.ts +6 -0
- package/dist/src/initializer/prompt-option.d.ts.map +1 -0
- package/dist/src/initializer/prompt-option.js +2 -0
- package/dist/src/initializer/prompt-option.js.map +1 -0
- package/dist/src/initializer/stryker-config-writer.d.ts +27 -0
- package/dist/src/initializer/stryker-config-writer.d.ts.map +1 -0
- package/dist/src/initializer/stryker-config-writer.js +106 -0
- package/dist/src/initializer/stryker-config-writer.js.map +1 -0
- package/dist/src/initializer/stryker-initializer.d.ts +45 -0
- package/dist/src/initializer/stryker-initializer.d.ts.map +1 -0
- package/dist/src/initializer/stryker-initializer.js +184 -0
- package/dist/src/initializer/stryker-initializer.js.map +1 -0
- package/dist/src/initializer/stryker-inquirer.d.ts +15 -0
- package/dist/src/initializer/stryker-inquirer.d.ts.map +1 -0
- package/dist/src/initializer/stryker-inquirer.js +72 -0
- package/dist/src/initializer/stryker-inquirer.js.map +1 -0
- package/dist/src/logging/index.d.ts +6 -0
- package/dist/src/logging/index.d.ts.map +1 -0
- package/dist/src/logging/index.js +5 -0
- package/dist/src/logging/index.js.map +1 -0
- package/dist/src/logging/logger-impl.d.ts +19 -0
- package/dist/src/logging/logger-impl.d.ts.map +1 -0
- package/dist/src/logging/logger-impl.js +64 -0
- package/dist/src/logging/logger-impl.js.map +1 -0
- package/dist/src/logging/logging-backend.d.ts +22 -0
- package/dist/src/logging/logging-backend.d.ts.map +1 -0
- package/dist/src/logging/logging-backend.js +65 -0
- package/dist/src/logging/logging-backend.js.map +1 -0
- package/dist/src/logging/logging-client.d.ts +16 -0
- package/dist/src/logging/logging-client.d.ts.map +1 -0
- package/dist/src/logging/logging-client.js +44 -0
- package/dist/src/logging/logging-client.js.map +1 -0
- package/dist/src/logging/logging-event.d.ts +23 -0
- package/dist/src/logging/logging-event.d.ts.map +1 -0
- package/dist/src/logging/logging-event.js +63 -0
- package/dist/src/logging/logging-event.js.map +1 -0
- package/dist/src/logging/logging-server.d.ts +15 -0
- package/dist/src/logging/logging-server.d.ts.map +1 -0
- package/dist/src/logging/logging-server.js +43 -0
- package/dist/src/logging/logging-server.js.map +1 -0
- package/dist/src/logging/logging-sink.d.ts +7 -0
- package/dist/src/logging/logging-sink.d.ts.map +1 -0
- package/dist/src/logging/logging-sink.js +2 -0
- package/dist/src/logging/logging-sink.js.map +1 -0
- package/dist/src/logging/priority.d.ts +12 -0
- package/dist/src/logging/priority.d.ts.map +1 -0
- package/dist/src/logging/priority.js +13 -0
- package/dist/src/logging/priority.js.map +1 -0
- package/dist/src/logging/provide-logging.d.ts +30 -0
- package/dist/src/logging/provide-logging.d.ts.map +1 -0
- package/dist/src/logging/provide-logging.js +45 -0
- package/dist/src/logging/provide-logging.js.map +1 -0
- package/dist/src/mutants/diff-statistics-collector.d.ts +14 -0
- package/dist/src/mutants/diff-statistics-collector.d.ts.map +1 -0
- package/dist/src/mutants/diff-statistics-collector.js +40 -0
- package/dist/src/mutants/diff-statistics-collector.js.map +1 -0
- package/dist/src/mutants/incremental-differ.d.ts +39 -0
- package/dist/src/mutants/incremental-differ.d.ts.map +1 -0
- package/dist/src/mutants/incremental-differ.js +547 -0
- package/dist/src/mutants/incremental-differ.js.map +1 -0
- package/dist/src/mutants/index.d.ts +4 -0
- package/dist/src/mutants/index.d.ts.map +1 -0
- package/dist/src/mutants/index.js +4 -0
- package/dist/src/mutants/index.js.map +1 -0
- package/dist/src/mutants/mutant-test-planner.d.ts +36 -0
- package/dist/src/mutants/mutant-test-planner.d.ts.map +1 -0
- package/dist/src/mutants/mutant-test-planner.js +237 -0
- package/dist/src/mutants/mutant-test-planner.js.map +1 -0
- package/dist/src/mutants/test-coverage.d.ts +22 -0
- package/dist/src/mutants/test-coverage.d.ts.map +1 -0
- package/dist/src/mutants/test-coverage.js +87 -0
- package/dist/src/mutants/test-coverage.js.map +1 -0
- package/dist/src/process/1-prepare-executor.d.ts +22 -0
- package/dist/src/process/1-prepare-executor.d.ts.map +1 -0
- package/dist/src/process/1-prepare-executor.js +86 -0
- package/dist/src/process/1-prepare-executor.js.map +1 -0
- package/dist/src/process/2-mutant-instrumenter-executor.d.ts +39 -0
- package/dist/src/process/2-mutant-instrumenter-executor.d.ts.map +1 -0
- package/dist/src/process/2-mutant-instrumenter-executor.js +58 -0
- package/dist/src/process/2-mutant-instrumenter-executor.js.map +1 -0
- package/dist/src/process/3-dry-run-executor.d.ts +50 -0
- package/dist/src/process/3-dry-run-executor.d.ts.map +1 -0
- package/dist/src/process/3-dry-run-executor.js +164 -0
- package/dist/src/process/3-dry-run-executor.js.map +1 -0
- package/dist/src/process/4-mutation-test-executor.d.ts +56 -0
- package/dist/src/process/4-mutation-test-executor.d.ts.map +1 -0
- package/dist/src/process/4-mutation-test-executor.js +152 -0
- package/dist/src/process/4-mutation-test-executor.js.map +1 -0
- package/dist/src/process/index.d.ts +5 -0
- package/dist/src/process/index.d.ts.map +1 -0
- package/dist/src/process/index.js +5 -0
- package/dist/src/process/index.js.map +1 -0
- package/dist/src/reporters/broadcast-reporter.d.ts +25 -0
- package/dist/src/reporters/broadcast-reporter.d.ts.map +1 -0
- package/dist/src/reporters/broadcast-reporter.js +74 -0
- package/dist/src/reporters/broadcast-reporter.js.map +1 -0
- package/dist/src/reporters/ci/circle-provider.d.ts +11 -0
- package/dist/src/reporters/ci/circle-provider.d.ts.map +1 -0
- package/dist/src/reporters/ci/circle-provider.js +33 -0
- package/dist/src/reporters/ci/circle-provider.js.map +1 -0
- package/dist/src/reporters/ci/github-actions-provider.d.ts +9 -0
- package/dist/src/reporters/ci/github-actions-provider.d.ts.map +1 -0
- package/dist/src/reporters/ci/github-actions-provider.js +21 -0
- package/dist/src/reporters/ci/github-actions-provider.js.map +1 -0
- package/dist/src/reporters/ci/provider.d.ts +22 -0
- package/dist/src/reporters/ci/provider.d.ts.map +1 -0
- package/dist/src/reporters/ci/provider.js +24 -0
- package/dist/src/reporters/ci/provider.js.map +1 -0
- package/dist/src/reporters/ci/travis-provider.d.ts +9 -0
- package/dist/src/reporters/ci/travis-provider.d.ts.map +1 -0
- package/dist/src/reporters/ci/travis-provider.js +19 -0
- package/dist/src/reporters/ci/travis-provider.js.map +1 -0
- package/dist/src/reporters/clear-text-reporter.d.ts +23 -0
- package/dist/src/reporters/clear-text-reporter.d.ts.map +1 -0
- package/dist/src/reporters/clear-text-reporter.js +174 -0
- package/dist/src/reporters/clear-text-reporter.js.map +1 -0
- package/dist/src/reporters/clear-text-score-table.d.ts +22 -0
- package/dist/src/reporters/clear-text-score-table.d.ts.map +1 -0
- package/dist/src/reporters/clear-text-score-table.js +191 -0
- package/dist/src/reporters/clear-text-score-table.js.map +1 -0
- package/dist/src/reporters/dashboard-reporter/dashboard-reporter-client.d.ts +19 -0
- package/dist/src/reporters/dashboard-reporter/dashboard-reporter-client.d.ts.map +1 -0
- package/dist/src/reporters/dashboard-reporter/dashboard-reporter-client.js +54 -0
- package/dist/src/reporters/dashboard-reporter/dashboard-reporter-client.js.map +1 -0
- package/dist/src/reporters/dashboard-reporter/dashboard-reporter.d.ts +21 -0
- package/dist/src/reporters/dashboard-reporter/dashboard-reporter.d.ts.map +1 -0
- package/dist/src/reporters/dashboard-reporter/dashboard-reporter.js +62 -0
- package/dist/src/reporters/dashboard-reporter/dashboard-reporter.js.map +1 -0
- package/dist/src/reporters/dashboard-reporter/index.d.ts +7 -0
- package/dist/src/reporters/dashboard-reporter/index.d.ts.map +1 -0
- package/dist/src/reporters/dashboard-reporter/index.js +15 -0
- package/dist/src/reporters/dashboard-reporter/index.js.map +1 -0
- package/dist/src/reporters/dashboard-reporter/report.d.ts +6 -0
- package/dist/src/reporters/dashboard-reporter/report.d.ts.map +1 -0
- package/dist/src/reporters/dashboard-reporter/report.js +2 -0
- package/dist/src/reporters/dashboard-reporter/report.js.map +1 -0
- package/dist/src/reporters/dashboard-reporter/tokens.d.ts +6 -0
- package/dist/src/reporters/dashboard-reporter/tokens.d.ts.map +1 -0
- package/dist/src/reporters/dashboard-reporter/tokens.js +6 -0
- package/dist/src/reporters/dashboard-reporter/tokens.js.map +1 -0
- package/dist/src/reporters/dots-reporter.d.ts +7 -0
- package/dist/src/reporters/dots-reporter.d.ts.map +1 -0
- package/dist/src/reporters/dots-reporter.js +29 -0
- package/dist/src/reporters/dots-reporter.js.map +1 -0
- package/dist/src/reporters/event-recorder-reporter.d.ts +22 -0
- package/dist/src/reporters/event-recorder-reporter.d.ts.map +1 -0
- package/dist/src/reporters/event-recorder-reporter.js +53 -0
- package/dist/src/reporters/event-recorder-reporter.js.map +1 -0
- package/dist/src/reporters/html-reporter.d.ts +14 -0
- package/dist/src/reporters/html-reporter.d.ts.map +1 -0
- package/dist/src/reporters/html-reporter.js +65 -0
- package/dist/src/reporters/html-reporter.js.map +1 -0
- package/dist/src/reporters/index.d.ts +6 -0
- package/dist/src/reporters/index.d.ts.map +1 -0
- package/dist/src/reporters/index.js +24 -0
- package/dist/src/reporters/index.js.map +1 -0
- package/dist/src/reporters/json-reporter.d.ts +15 -0
- package/dist/src/reporters/json-reporter.d.ts.map +1 -0
- package/dist/src/reporters/json-reporter.js +29 -0
- package/dist/src/reporters/json-reporter.js.map +1 -0
- package/dist/src/reporters/mutation-test-report-helper.d.ts +40 -0
- package/dist/src/reporters/mutation-test-report-helper.d.ts.map +1 -0
- package/dist/src/reporters/mutation-test-report-helper.js +298 -0
- package/dist/src/reporters/mutation-test-report-helper.js.map +1 -0
- package/dist/src/reporters/mutation-timings-reporter.d.ts +14 -0
- package/dist/src/reporters/mutation-timings-reporter.d.ts.map +1 -0
- package/dist/src/reporters/mutation-timings-reporter.js +49 -0
- package/dist/src/reporters/mutation-timings-reporter.js.map +1 -0
- package/dist/src/reporters/progress-append-only-reporter.d.ts +10 -0
- package/dist/src/reporters/progress-append-only-reporter.d.ts.map +1 -0
- package/dist/src/reporters/progress-append-only-reporter.js +25 -0
- package/dist/src/reporters/progress-append-only-reporter.js.map +1 -0
- package/dist/src/reporters/progress-bar.d.ts +8 -0
- package/dist/src/reporters/progress-bar.d.ts.map +1 -0
- package/dist/src/reporters/progress-bar.js +6 -0
- package/dist/src/reporters/progress-bar.js.map +1 -0
- package/dist/src/reporters/progress-keeper.d.ts +27 -0
- package/dist/src/reporters/progress-keeper.d.ts.map +1 -0
- package/dist/src/reporters/progress-keeper.js +77 -0
- package/dist/src/reporters/progress-keeper.js.map +1 -0
- package/dist/src/reporters/progress-reporter.d.ts +11 -0
- package/dist/src/reporters/progress-reporter.d.ts.map +1 -0
- package/dist/src/reporters/progress-reporter.js +40 -0
- package/dist/src/reporters/progress-reporter.js.map +1 -0
- package/dist/src/reporters/reporter-util.d.ts +5 -0
- package/dist/src/reporters/reporter-util.d.ts.map +1 -0
- package/dist/src/reporters/reporter-util.js +19 -0
- package/dist/src/reporters/reporter-util.js.map +1 -0
- package/dist/src/reporters/strict-reporter.d.ts +3 -0
- package/dist/src/reporters/strict-reporter.d.ts.map +1 -0
- package/dist/src/reporters/strict-reporter.js +2 -0
- package/dist/src/reporters/strict-reporter.js.map +1 -0
- package/dist/src/sandbox/create-preprocessor.d.ts +7 -0
- package/dist/src/sandbox/create-preprocessor.d.ts.map +1 -0
- package/dist/src/sandbox/create-preprocessor.js +16 -0
- package/dist/src/sandbox/create-preprocessor.js.map +1 -0
- package/dist/src/sandbox/disable-type-checks-preprocessor.d.ts +18 -0
- package/dist/src/sandbox/disable-type-checks-preprocessor.d.ts.map +1 -0
- package/dist/src/sandbox/disable-type-checks-preprocessor.js +43 -0
- package/dist/src/sandbox/disable-type-checks-preprocessor.js.map +1 -0
- package/dist/src/sandbox/file-preprocessor.d.ts +10 -0
- package/dist/src/sandbox/file-preprocessor.d.ts.map +1 -0
- package/dist/src/sandbox/file-preprocessor.js +2 -0
- package/dist/src/sandbox/file-preprocessor.js.map +1 -0
- package/dist/src/sandbox/index.d.ts +4 -0
- package/dist/src/sandbox/index.d.ts.map +1 -0
- package/dist/src/sandbox/index.js +3 -0
- package/dist/src/sandbox/index.js.map +1 -0
- package/dist/src/sandbox/multi-preprocessor.d.ts +8 -0
- package/dist/src/sandbox/multi-preprocessor.d.ts.map +1 -0
- package/dist/src/sandbox/multi-preprocessor.js +12 -0
- package/dist/src/sandbox/multi-preprocessor.js.map +1 -0
- package/dist/src/sandbox/sandbox.d.ts +43 -0
- package/dist/src/sandbox/sandbox.d.ts.map +1 -0
- package/dist/src/sandbox/sandbox.js +134 -0
- package/dist/src/sandbox/sandbox.js.map +1 -0
- package/dist/src/sandbox/ts-config-preprocessor.d.ts +46 -0
- package/dist/src/sandbox/ts-config-preprocessor.d.ts.map +1 -0
- package/dist/src/sandbox/ts-config-preprocessor.js +112 -0
- package/dist/src/sandbox/ts-config-preprocessor.js.map +1 -0
- package/dist/src/stryker-cli.d.ts +15 -0
- package/dist/src/stryker-cli.d.ts.map +1 -0
- package/dist/src/stryker-cli.js +168 -0
- package/dist/src/stryker-cli.js.map +1 -0
- package/dist/src/stryker-package.d.ts +5 -0
- package/dist/src/stryker-package.d.ts.map +1 -0
- package/dist/src/stryker-package.js +7 -0
- package/dist/src/stryker-package.js.map +1 -0
- package/dist/src/stryker-server.d.ts +40 -0
- package/dist/src/stryker-server.d.ts.map +1 -0
- package/dist/src/stryker-server.js +234 -0
- package/dist/src/stryker-server.js.map +1 -0
- package/dist/src/stryker.d.ts +31 -0
- package/dist/src/stryker.d.ts.map +1 -0
- package/dist/src/stryker.js +86 -0
- package/dist/src/stryker.js.map +1 -0
- package/dist/src/test-runner/child-process-test-runner-proxy.d.ts +19 -0
- package/dist/src/test-runner/child-process-test-runner-proxy.d.ts.map +1 -0
- package/dist/src/test-runner/child-process-test-runner-proxy.js +45 -0
- package/dist/src/test-runner/child-process-test-runner-proxy.js.map +1 -0
- package/dist/src/test-runner/child-process-test-runner-worker.d.ts +14 -0
- package/dist/src/test-runner/child-process-test-runner-worker.d.ts.map +1 -0
- package/dist/src/test-runner/child-process-test-runner-worker.js +45 -0
- package/dist/src/test-runner/child-process-test-runner-worker.js.map +1 -0
- package/dist/src/test-runner/command-test-runner.d.ts +31 -0
- package/dist/src/test-runner/command-test-runner.d.ts.map +1 -0
- package/dist/src/test-runner/command-test-runner.js +144 -0
- package/dist/src/test-runner/command-test-runner.js.map +1 -0
- package/dist/src/test-runner/index.d.ts +11 -0
- package/dist/src/test-runner/index.d.ts.map +1 -0
- package/dist/src/test-runner/index.js +18 -0
- package/dist/src/test-runner/index.js.map +1 -0
- package/dist/src/test-runner/max-test-runner-reuse-decorator.d.ts +14 -0
- package/dist/src/test-runner/max-test-runner-reuse-decorator.d.ts.map +1 -0
- package/dist/src/test-runner/max-test-runner-reuse-decorator.js +25 -0
- package/dist/src/test-runner/max-test-runner-reuse-decorator.js.map +1 -0
- package/dist/src/test-runner/reload-environment-decorator.d.ts +11 -0
- package/dist/src/test-runner/reload-environment-decorator.d.ts.map +1 -0
- package/dist/src/test-runner/reload-environment-decorator.js +56 -0
- package/dist/src/test-runner/reload-environment-decorator.js.map +1 -0
- package/dist/src/test-runner/retry-rejected-decorator.d.ts +15 -0
- package/dist/src/test-runner/retry-rejected-decorator.d.ts.map +1 -0
- package/dist/src/test-runner/retry-rejected-decorator.js +59 -0
- package/dist/src/test-runner/retry-rejected-decorator.js.map +1 -0
- package/dist/src/test-runner/test-runner-decorator.d.ts +8 -0
- package/dist/src/test-runner/test-runner-decorator.d.ts.map +1 -0
- package/dist/src/test-runner/test-runner-decorator.js +13 -0
- package/dist/src/test-runner/test-runner-decorator.js.map +1 -0
- package/dist/src/test-runner/timeout-decorator.d.ts +15 -0
- package/dist/src/test-runner/timeout-decorator.d.ts.map +1 -0
- package/dist/src/test-runner/timeout-decorator.js +51 -0
- package/dist/src/test-runner/timeout-decorator.js.map +1 -0
- package/dist/src/unexpected-exit-handler.d.ts +13 -0
- package/dist/src/unexpected-exit-handler.d.ts.map +1 -0
- package/dist/src/unexpected-exit-handler.js +28 -0
- package/dist/src/unexpected-exit-handler.js.map +1 -0
- package/dist/src/utils/file-utils.d.ts +30 -0
- package/dist/src/utils/file-utils.d.ts.map +1 -0
- package/dist/src/utils/file-utils.js +101 -0
- package/dist/src/utils/file-utils.js.map +1 -0
- package/dist/src/utils/index.d.ts +7 -0
- package/dist/src/utils/index.d.ts.map +1 -0
- package/dist/src/utils/index.js +7 -0
- package/dist/src/utils/index.js.map +1 -0
- package/dist/src/utils/json-rpc-event-deserializer.d.ts +5 -0
- package/dist/src/utils/json-rpc-event-deserializer.d.ts.map +1 -0
- package/dist/src/utils/json-rpc-event-deserializer.js +42 -0
- package/dist/src/utils/json-rpc-event-deserializer.js.map +1 -0
- package/dist/src/utils/object-utils.d.ts +37 -0
- package/dist/src/utils/object-utils.d.ts.map +1 -0
- package/dist/src/utils/object-utils.js +91 -0
- package/dist/src/utils/object-utils.js.map +1 -0
- package/dist/src/utils/string-builder.d.ts +9 -0
- package/dist/src/utils/string-builder.d.ts.map +1 -0
- package/dist/src/utils/string-builder.js +26 -0
- package/dist/src/utils/string-builder.js.map +1 -0
- package/dist/src/utils/string-utils.d.ts +12 -0
- package/dist/src/utils/string-utils.d.ts.map +1 -0
- package/dist/src/utils/string-utils.js +54 -0
- package/dist/src/utils/string-utils.js.map +1 -0
- package/dist/src/utils/temporary-directory.d.ts +18 -0
- package/dist/src/utils/temporary-directory.d.ts.map +1 -0
- package/dist/src/utils/temporary-directory.js +63 -0
- package/dist/src/utils/temporary-directory.js.map +1 -0
- package/dist/src/utils/timer.d.ts +14 -0
- package/dist/src/utils/timer.d.ts.map +1 -0
- package/dist/src/utils/timer.js +53 -0
- package/dist/src/utils/timer.js.map +1 -0
- package/package.json +106 -0
- package/schema/stryker-schema.json +855 -0
- package/src/checker/checker-child-process-proxy.ts +67 -0
- package/src/checker/checker-facade.ts +90 -0
- package/src/checker/checker-factory.ts +46 -0
- package/src/checker/checker-resource.ts +12 -0
- package/src/checker/checker-retry-decorator.ts +57 -0
- package/src/checker/checker-worker.ts +62 -0
- package/src/checker/index.ts +3 -0
- package/src/child-proxy/child-process-crashed-error.ts +16 -0
- package/src/child-proxy/child-process-proxy-worker.ts +203 -0
- package/src/child-proxy/child-process-proxy.ts +353 -0
- package/src/child-proxy/id-generator.ts +6 -0
- package/src/child-proxy/message-protocol.ts +87 -0
- package/src/child-proxy/out-of-memory-error.ts +11 -0
- package/src/concurrent/concurrency-token-provider.ts +106 -0
- package/src/concurrent/index.ts +3 -0
- package/src/concurrent/pool.ts +209 -0
- package/src/concurrent/resource-decorator.ts +28 -0
- package/src/config/config-file-formats.ts +31 -0
- package/src/config/config-reader.ts +193 -0
- package/src/config/file-matcher.ts +36 -0
- package/src/config/index.ts +5 -0
- package/src/config/meta-schema-builder.ts +50 -0
- package/src/config/options-validator.ts +317 -0
- package/src/config/validation-errors.ts +192 -0
- package/src/di/core-tokens.ts +39 -0
- package/src/di/index.ts +4 -0
- package/src/di/plugin-creator.ts +102 -0
- package/src/di/plugin-loader.ts +245 -0
- package/src/errors.ts +12 -0
- package/src/fs/file-system.ts +63 -0
- package/src/fs/index.ts +4 -0
- package/src/fs/project-file.ts +100 -0
- package/src/fs/project-reader.ts +493 -0
- package/src/fs/project.ts +98 -0
- package/src/index.ts +7 -0
- package/src/initializer/custom-initializers/angular-initializer.ts +95 -0
- package/src/initializer/custom-initializers/custom-initializer.ts +14 -0
- package/src/initializer/custom-initializers/index.ts +31 -0
- package/src/initializer/custom-initializers/react-initializer.ts +35 -0
- package/src/initializer/custom-initializers/svelte-initializer.ts +40 -0
- package/src/initializer/custom-initializers/vue-js-initializer.ts +30 -0
- package/src/initializer/gitignore-writer.ts +33 -0
- package/src/initializer/index.ts +35 -0
- package/src/initializer/initializer-tokens.ts +8 -0
- package/src/initializer/inquire.ts +17 -0
- package/src/initializer/npm-client.ts +103 -0
- package/src/initializer/npm-registry.ts +48 -0
- package/src/initializer/package-info.ts +10 -0
- package/src/initializer/prompt-option.ts +6 -0
- package/src/initializer/stryker-config-writer.ts +158 -0
- package/src/initializer/stryker-initializer.ts +278 -0
- package/src/initializer/stryker-inquirer.ts +101 -0
- package/src/logging/index.ts +5 -0
- package/src/logging/logger-impl.ts +81 -0
- package/src/logging/logging-backend.ts +90 -0
- package/src/logging/logging-client.ts +56 -0
- package/src/logging/logging-event.ts +94 -0
- package/src/logging/logging-server.ts +56 -0
- package/src/logging/logging-sink.ts +7 -0
- package/src/logging/priority.ts +15 -0
- package/src/logging/provide-logging.ts +70 -0
- package/src/mutants/diff-statistics-collector.ts +47 -0
- package/src/mutants/incremental-differ.ts +771 -0
- package/src/mutants/index.ts +3 -0
- package/src/mutants/mutant-test-planner.ts +357 -0
- package/src/mutants/test-coverage.ts +125 -0
- package/src/process/1-prepare-executor.ts +133 -0
- package/src/process/2-mutant-instrumenter-executor.ts +122 -0
- package/src/process/3-dry-run-executor.ts +262 -0
- package/src/process/4-mutation-test-executor.ts +272 -0
- package/src/process/index.ts +4 -0
- package/src/reporters/broadcast-reporter.ts +129 -0
- package/src/reporters/ci/circle-provider.ts +50 -0
- package/src/reporters/ci/github-actions-provider.ts +22 -0
- package/src/reporters/ci/provider.ts +42 -0
- package/src/reporters/ci/travis-provider.ts +24 -0
- package/src/reporters/clear-text-reporter.ts +245 -0
- package/src/reporters/clear-text-score-table.ts +305 -0
- package/src/reporters/dashboard-reporter/dashboard-reporter-client.ts +89 -0
- package/src/reporters/dashboard-reporter/dashboard-reporter.ts +97 -0
- package/src/reporters/dashboard-reporter/index.ts +30 -0
- package/src/reporters/dashboard-reporter/report.ts +6 -0
- package/src/reporters/dashboard-reporter/tokens.ts +5 -0
- package/src/reporters/dots-reporter.ts +33 -0
- package/src/reporters/event-recorder-reporter.ts +88 -0
- package/src/reporters/html-reporter.ts +87 -0
- package/src/reporters/index.ts +48 -0
- package/src/reporters/json-reporter.ts +45 -0
- package/src/reporters/mutation-test-report-helper.ts +425 -0
- package/src/reporters/mutation-timings-reporter.ts +78 -0
- package/src/reporters/progress-append-only-reporter.ts +36 -0
- package/src/reporters/progress-bar.ts +6 -0
- package/src/reporters/progress-keeper.ts +113 -0
- package/src/reporters/progress-reporter.ts +62 -0
- package/src/reporters/reporter-util.ts +20 -0
- package/src/reporters/strict-reporter.ts +3 -0
- package/src/sandbox/create-preprocessor.ts +27 -0
- package/src/sandbox/disable-type-checks-preprocessor.ts +70 -0
- package/src/sandbox/file-preprocessor.ts +10 -0
- package/src/sandbox/index.ts +3 -0
- package/src/sandbox/multi-preprocessor.ts +13 -0
- package/src/sandbox/sandbox.ts +198 -0
- package/src/sandbox/ts-config-preprocessor.ts +168 -0
- package/src/stryker-cli.ts +363 -0
- package/src/stryker-package.ts +19 -0
- package/src/stryker-server.ts +334 -0
- package/src/stryker.ts +126 -0
- package/src/test-runner/child-process-test-runner-proxy.ts +94 -0
- package/src/test-runner/child-process-test-runner-worker.ts +66 -0
- package/src/test-runner/command-test-runner.ts +190 -0
- package/src/test-runner/index.ts +74 -0
- package/src/test-runner/max-test-runner-reuse-decorator.ts +41 -0
- package/src/test-runner/reload-environment-decorator.ts +72 -0
- package/src/test-runner/retry-rejected-decorator.ts +79 -0
- package/src/test-runner/test-runner-decorator.ts +22 -0
- package/src/test-runner/timeout-decorator.ts +71 -0
- package/src/unexpected-exit-handler.ts +36 -0
- package/src/utils/file-utils.ts +113 -0
- package/src/utils/index.ts +6 -0
- package/src/utils/json-rpc-event-deserializer.ts +48 -0
- package/src/utils/object-utils.ts +106 -0
- package/src/utils/string-builder.ts +30 -0
- package/src/utils/string-utils.ts +61 -0
- package/src/utils/temporary-directory.ts +83 -0
- package/src/utils/timer.ts +58 -0
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
|
|
3
|
+
import { TestResult } from '@stryker-mutator/api/test-runner';
|
|
4
|
+
import {
|
|
5
|
+
MutantRunPlan,
|
|
6
|
+
MutantTestPlan,
|
|
7
|
+
PlanKind,
|
|
8
|
+
Mutant,
|
|
9
|
+
StrykerOptions,
|
|
10
|
+
MutantStatus,
|
|
11
|
+
MutantEarlyResultPlan,
|
|
12
|
+
} from '@stryker-mutator/api/core';
|
|
13
|
+
import { commonTokens, tokens } from '@stryker-mutator/api/plugin';
|
|
14
|
+
import { Logger } from '@stryker-mutator/api/logging';
|
|
15
|
+
import { I, notEmpty, split } from '@stryker-mutator/util';
|
|
16
|
+
|
|
17
|
+
import { coreTokens } from '../di/index.js';
|
|
18
|
+
import { StrictReporter } from '../reporters/strict-reporter.js';
|
|
19
|
+
import { Sandbox } from '../sandbox/index.js';
|
|
20
|
+
import { objectUtils } from '../utils/object-utils.js';
|
|
21
|
+
import { optionsPath } from '../utils/index.js';
|
|
22
|
+
import { Project } from '../fs/project.js';
|
|
23
|
+
|
|
24
|
+
import {
|
|
25
|
+
IncrementalDiffer,
|
|
26
|
+
toRelativeNormalizedFileName,
|
|
27
|
+
} from './incremental-differ.js';
|
|
28
|
+
import { TestCoverage } from './test-coverage.js';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The factor by which hit count from dry run is multiplied to calculate the hit limit for a mutant.
|
|
32
|
+
* This is intentionally a high value to prevent false positives.
|
|
33
|
+
*
|
|
34
|
+
* For example, a property testing library might execute a failing scenario multiple times to determine the smallest possible counterexample.
|
|
35
|
+
* @see https://jsverify.github.io/#minimal-counterexample
|
|
36
|
+
*/
|
|
37
|
+
const HIT_LIMIT_FACTOR = 100;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Responsible for determining the tests to execute for each mutant, as well as other run option specific details
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
export class MutantTestPlanner {
|
|
44
|
+
public static readonly inject = tokens(
|
|
45
|
+
coreTokens.testCoverage,
|
|
46
|
+
coreTokens.incrementalDiffer,
|
|
47
|
+
coreTokens.reporter,
|
|
48
|
+
coreTokens.sandbox,
|
|
49
|
+
coreTokens.project,
|
|
50
|
+
coreTokens.timeOverheadMS,
|
|
51
|
+
commonTokens.options,
|
|
52
|
+
commonTokens.logger,
|
|
53
|
+
);
|
|
54
|
+
private readonly timeSpentAllTests: number;
|
|
55
|
+
private readonly globalTestFilter: string[] | undefined;
|
|
56
|
+
|
|
57
|
+
constructor(
|
|
58
|
+
private readonly testCoverage: I<TestCoverage>,
|
|
59
|
+
private readonly incrementalDiffer: IncrementalDiffer,
|
|
60
|
+
private readonly reporter: StrictReporter,
|
|
61
|
+
private readonly sandbox: I<Sandbox>,
|
|
62
|
+
private readonly project: I<Project>,
|
|
63
|
+
private readonly timeOverheadMS: number,
|
|
64
|
+
private readonly options: StrykerOptions,
|
|
65
|
+
private readonly logger: Logger,
|
|
66
|
+
) {
|
|
67
|
+
this.timeSpentAllTests = calculateTotalTime(
|
|
68
|
+
this.testCoverage.testsById.values(),
|
|
69
|
+
);
|
|
70
|
+
this.globalTestFilter =
|
|
71
|
+
this.project.testFiles.length > 0
|
|
72
|
+
? this.project.testFiles.map((file) =>
|
|
73
|
+
this.sandbox.sandboxFileFor(file),
|
|
74
|
+
)
|
|
75
|
+
: undefined;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
public async makePlan(
|
|
79
|
+
mutants: readonly Mutant[],
|
|
80
|
+
): Promise<readonly MutantTestPlan[]> {
|
|
81
|
+
const mutantsDiff = await this.incrementalDiff(mutants);
|
|
82
|
+
const mutantPlans = mutantsDiff.map((mutant) => this.planMutant(mutant));
|
|
83
|
+
this.reporter.onMutationTestingPlanReady({ mutantPlans });
|
|
84
|
+
this.warnAboutSlow(mutantPlans);
|
|
85
|
+
return mutantPlans;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
private planMutant(mutant: Mutant): MutantTestPlan {
|
|
89
|
+
const isStatic = this.testCoverage.hasStaticCoverage(mutant.id);
|
|
90
|
+
|
|
91
|
+
if (mutant.status) {
|
|
92
|
+
// If this mutant was already ignored, early result
|
|
93
|
+
return this.createMutantEarlyResultPlan(mutant, {
|
|
94
|
+
isStatic,
|
|
95
|
+
coveredBy: mutant.coveredBy,
|
|
96
|
+
killedBy: mutant.killedBy,
|
|
97
|
+
status: mutant.status,
|
|
98
|
+
statusReason: mutant.statusReason,
|
|
99
|
+
});
|
|
100
|
+
} else if (this.testCoverage.hasCoverage) {
|
|
101
|
+
// If there was coverage information (coverageAnalysis not "off")
|
|
102
|
+
const tests = this.testCoverage.testsByMutantId.get(mutant.id) ?? [];
|
|
103
|
+
const coveredBy = toTestIds(tests);
|
|
104
|
+
if (!isStatic || (this.options.ignoreStatic && coveredBy.length)) {
|
|
105
|
+
// If not static, or it was "hybrid" (both static and perTest coverage) and ignoreStatic is on.
|
|
106
|
+
// Only run covered tests with mutant active during runtime
|
|
107
|
+
const netTime = calculateTotalTime(tests);
|
|
108
|
+
return this.createMutantRunPlan(mutant, {
|
|
109
|
+
netTime,
|
|
110
|
+
coveredBy,
|
|
111
|
+
isStatic,
|
|
112
|
+
testFilter: coveredBy,
|
|
113
|
+
});
|
|
114
|
+
} else if (this.options.ignoreStatic) {
|
|
115
|
+
// Static (w/o perTest coverage) and ignoreStatic is on -> Ignore.
|
|
116
|
+
return this.createMutantEarlyResultPlan(mutant, {
|
|
117
|
+
status: 'Ignored',
|
|
118
|
+
statusReason: 'Static mutant (and "ignoreStatic" was enabled)',
|
|
119
|
+
isStatic,
|
|
120
|
+
coveredBy,
|
|
121
|
+
});
|
|
122
|
+
} else {
|
|
123
|
+
// Static (or hybrid) and `ignoreStatic` is off -> run all tests
|
|
124
|
+
return this.createMutantRunPlan(mutant, {
|
|
125
|
+
netTime: this.timeSpentAllTests,
|
|
126
|
+
isStatic,
|
|
127
|
+
coveredBy,
|
|
128
|
+
testFilter: this.globalTestFilter,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
} else {
|
|
132
|
+
// No coverage information exists, all tests need to run
|
|
133
|
+
return this.createMutantRunPlan(mutant, {
|
|
134
|
+
netTime: this.timeSpentAllTests,
|
|
135
|
+
testFilter: this.globalTestFilter,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
private createMutantEarlyResultPlan(
|
|
141
|
+
mutant: Mutant,
|
|
142
|
+
{
|
|
143
|
+
isStatic,
|
|
144
|
+
status,
|
|
145
|
+
statusReason,
|
|
146
|
+
coveredBy,
|
|
147
|
+
killedBy,
|
|
148
|
+
}: {
|
|
149
|
+
isStatic: boolean | undefined;
|
|
150
|
+
status: MutantStatus;
|
|
151
|
+
statusReason?: string;
|
|
152
|
+
coveredBy?: string[];
|
|
153
|
+
killedBy?: string[];
|
|
154
|
+
},
|
|
155
|
+
): MutantEarlyResultPlan {
|
|
156
|
+
return {
|
|
157
|
+
plan: PlanKind.EarlyResult,
|
|
158
|
+
mutant: {
|
|
159
|
+
...mutant,
|
|
160
|
+
status,
|
|
161
|
+
static: isStatic,
|
|
162
|
+
statusReason,
|
|
163
|
+
coveredBy,
|
|
164
|
+
killedBy,
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
private createMutantRunPlan(
|
|
170
|
+
mutant: Mutant,
|
|
171
|
+
{
|
|
172
|
+
netTime,
|
|
173
|
+
testFilter,
|
|
174
|
+
isStatic,
|
|
175
|
+
coveredBy,
|
|
176
|
+
}: {
|
|
177
|
+
netTime: number;
|
|
178
|
+
testFilter?: string[] | undefined;
|
|
179
|
+
isStatic?: boolean | undefined;
|
|
180
|
+
coveredBy?: string[] | undefined;
|
|
181
|
+
},
|
|
182
|
+
): MutantRunPlan {
|
|
183
|
+
const { disableBail, timeoutMS, timeoutFactor } = this.options;
|
|
184
|
+
const timeout = timeoutFactor * netTime + timeoutMS + this.timeOverheadMS;
|
|
185
|
+
const hitCount = this.testCoverage.hitsByMutantId.get(mutant.id);
|
|
186
|
+
const hitLimit =
|
|
187
|
+
hitCount === undefined ? undefined : hitCount * HIT_LIMIT_FACTOR;
|
|
188
|
+
|
|
189
|
+
// Hot swap is only safe when:
|
|
190
|
+
// 1. We have a specific test filter (not running all tests)
|
|
191
|
+
// 2. The mutant is NOT static (static mutants require full reload)
|
|
192
|
+
const canHotSwap = !!testFilter && isStatic === false;
|
|
193
|
+
|
|
194
|
+
return {
|
|
195
|
+
plan: PlanKind.Run,
|
|
196
|
+
netTime,
|
|
197
|
+
mutant: {
|
|
198
|
+
...mutant,
|
|
199
|
+
coveredBy,
|
|
200
|
+
static: isStatic,
|
|
201
|
+
},
|
|
202
|
+
runOptions: {
|
|
203
|
+
// Copy over relevant mutant fields, we don't want to copy over "static" and "coveredBy", test runners should only care about the testFilter
|
|
204
|
+
activeMutant: {
|
|
205
|
+
id: mutant.id,
|
|
206
|
+
fileName: mutant.fileName,
|
|
207
|
+
location: mutant.location,
|
|
208
|
+
mutatorName: mutant.mutatorName,
|
|
209
|
+
replacement: mutant.replacement,
|
|
210
|
+
},
|
|
211
|
+
mutantActivation: testFilter ? 'runtime' : 'static',
|
|
212
|
+
timeout,
|
|
213
|
+
testFilter,
|
|
214
|
+
sandboxFileName: this.sandbox.sandboxFileFor(mutant.fileName),
|
|
215
|
+
hitLimit,
|
|
216
|
+
disableBail,
|
|
217
|
+
reloadEnvironment: !canHotSwap,
|
|
218
|
+
},
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
private warnAboutSlow(mutantPlans: readonly MutantTestPlan[]) {
|
|
223
|
+
if (
|
|
224
|
+
!this.options.ignoreStatic &&
|
|
225
|
+
objectUtils.isWarningEnabled('slow', this.options.warnings)
|
|
226
|
+
) {
|
|
227
|
+
// Only warn when the estimated time to run all static mutants exceeds 40%
|
|
228
|
+
// ... and when the average performance impact of a static mutant is estimated to be twice that (or more) of a non-static mutant
|
|
229
|
+
const ABSOLUTE_CUT_OFF_PERUNAGE = 0.4;
|
|
230
|
+
const RELATIVE_CUT_OFF_FACTOR = 2;
|
|
231
|
+
const zeroIfNaN = (n: number) => (isNaN(n) ? 0 : n);
|
|
232
|
+
const totalNetTime = (runPlans: MutantRunPlan[]) =>
|
|
233
|
+
runPlans.reduce((acc, { netTime }) => acc + netTime, 0);
|
|
234
|
+
const runPlans = mutantPlans.filter(isRunPlan);
|
|
235
|
+
const [staticRunPlans, runTimeRunPlans] = split(runPlans, ({ mutant }) =>
|
|
236
|
+
Boolean(mutant.static),
|
|
237
|
+
);
|
|
238
|
+
const estimatedTimeForStaticMutants = totalNetTime(staticRunPlans);
|
|
239
|
+
const estimatedTimeForRunTimeMutants = totalNetTime(runTimeRunPlans);
|
|
240
|
+
const estimatedTotalTime =
|
|
241
|
+
estimatedTimeForRunTimeMutants + estimatedTimeForStaticMutants;
|
|
242
|
+
const avgTimeForAStaticMutant = zeroIfNaN(
|
|
243
|
+
estimatedTimeForStaticMutants / staticRunPlans.length,
|
|
244
|
+
);
|
|
245
|
+
const avgTimeForARunTimeMutant = zeroIfNaN(
|
|
246
|
+
estimatedTimeForRunTimeMutants / runTimeRunPlans.length,
|
|
247
|
+
);
|
|
248
|
+
const relativeTimeForStaticMutants =
|
|
249
|
+
estimatedTimeForStaticMutants / estimatedTotalTime;
|
|
250
|
+
const absoluteCondition =
|
|
251
|
+
relativeTimeForStaticMutants >= ABSOLUTE_CUT_OFF_PERUNAGE;
|
|
252
|
+
const relativeCondition =
|
|
253
|
+
avgTimeForAStaticMutant >=
|
|
254
|
+
RELATIVE_CUT_OFF_FACTOR * avgTimeForARunTimeMutant;
|
|
255
|
+
if (relativeCondition && absoluteCondition) {
|
|
256
|
+
const percentage = (perunage: number) => Math.round(perunage * 100);
|
|
257
|
+
this.logger.warn(
|
|
258
|
+
`Detected ${staticRunPlans.length} static mutants (${percentage(
|
|
259
|
+
staticRunPlans.length / runPlans.length,
|
|
260
|
+
)}% of total) that are estimated to take ${percentage(
|
|
261
|
+
relativeTimeForStaticMutants,
|
|
262
|
+
)}% of the time running the tests!\n You might want to enable "ignoreStatic" to ignore these static mutants for your next run. \n For more information about static mutants visit: https://stryker-mutator.io/docs/mutation-testing-elements/static-mutants\n (disable "${optionsPath(
|
|
263
|
+
'warnings',
|
|
264
|
+
'slow',
|
|
265
|
+
)}" to ignore this warning)`,
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
private async incrementalDiff(
|
|
272
|
+
currentMutants: readonly Mutant[],
|
|
273
|
+
): Promise<readonly Mutant[]> {
|
|
274
|
+
const { incrementalReport } = this.project;
|
|
275
|
+
|
|
276
|
+
if (incrementalReport) {
|
|
277
|
+
const currentFiles = await this.readAllOriginalFiles(
|
|
278
|
+
currentMutants,
|
|
279
|
+
this.testCoverage.testsById.values(),
|
|
280
|
+
Object.keys(incrementalReport.files),
|
|
281
|
+
Object.keys(incrementalReport.testFiles ?? {}),
|
|
282
|
+
);
|
|
283
|
+
const diffedMutants = this.incrementalDiffer.diff(
|
|
284
|
+
currentMutants,
|
|
285
|
+
this.testCoverage,
|
|
286
|
+
incrementalReport,
|
|
287
|
+
currentFiles,
|
|
288
|
+
);
|
|
289
|
+
|
|
290
|
+
return diffedMutants;
|
|
291
|
+
}
|
|
292
|
+
return currentMutants;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
private async readAllOriginalFiles(
|
|
296
|
+
...thingsWithFileNamesOrFileNames: Array<
|
|
297
|
+
Iterable<string | { fileName?: string }>
|
|
298
|
+
>
|
|
299
|
+
): Promise<Map<string, string>> {
|
|
300
|
+
const uniqueFileNames = [
|
|
301
|
+
...new Set(
|
|
302
|
+
thingsWithFileNamesOrFileNames
|
|
303
|
+
.flatMap((container) =>
|
|
304
|
+
[...container].map((thing) =>
|
|
305
|
+
typeof thing === 'string' ? thing : thing.fileName,
|
|
306
|
+
),
|
|
307
|
+
)
|
|
308
|
+
.filter(notEmpty)
|
|
309
|
+
.map((fileName) => path.resolve(fileName)),
|
|
310
|
+
),
|
|
311
|
+
];
|
|
312
|
+
const result = await Promise.all(
|
|
313
|
+
uniqueFileNames.map(async (fileName) => {
|
|
314
|
+
const originalContent = await this.project.files
|
|
315
|
+
.get(fileName)
|
|
316
|
+
?.readOriginal();
|
|
317
|
+
if (originalContent) {
|
|
318
|
+
return [
|
|
319
|
+
toRelativeNormalizedFileName(fileName),
|
|
320
|
+
originalContent,
|
|
321
|
+
] as const;
|
|
322
|
+
} else {
|
|
323
|
+
return undefined;
|
|
324
|
+
}
|
|
325
|
+
}),
|
|
326
|
+
);
|
|
327
|
+
|
|
328
|
+
return new Map(result.filter(notEmpty));
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
function calculateTotalTime(testResults: Iterable<TestResult>): number {
|
|
333
|
+
let total = 0;
|
|
334
|
+
for (const test of testResults) {
|
|
335
|
+
total += test.timeSpentMs;
|
|
336
|
+
}
|
|
337
|
+
return total;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
function toTestIds(testResults: Iterable<TestResult>): string[] {
|
|
341
|
+
const result = [];
|
|
342
|
+
for (const test of testResults) {
|
|
343
|
+
result.push(test.id);
|
|
344
|
+
}
|
|
345
|
+
return result;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export function isEarlyResult(
|
|
349
|
+
mutantPlan: MutantTestPlan,
|
|
350
|
+
): mutantPlan is MutantEarlyResultPlan {
|
|
351
|
+
return mutantPlan.plan === PlanKind.EarlyResult;
|
|
352
|
+
}
|
|
353
|
+
export function isRunPlan(
|
|
354
|
+
mutantPlan: MutantTestPlan,
|
|
355
|
+
): mutantPlan is MutantRunPlan {
|
|
356
|
+
return mutantPlan.plan === PlanKind.Run;
|
|
357
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { CoverageData } from '@stryker-mutator/api/core';
|
|
2
|
+
import { Logger } from '@stryker-mutator/api/logging';
|
|
3
|
+
import { commonTokens } from '@stryker-mutator/api/plugin';
|
|
4
|
+
import {
|
|
5
|
+
CompleteDryRunResult,
|
|
6
|
+
TestResult,
|
|
7
|
+
} from '@stryker-mutator/api/test-runner';
|
|
8
|
+
import { notEmpty } from '@stryker-mutator/util';
|
|
9
|
+
|
|
10
|
+
import { coreTokens } from '../di/index.js';
|
|
11
|
+
|
|
12
|
+
export class TestCoverage {
|
|
13
|
+
readonly #testsByMutantId;
|
|
14
|
+
readonly #testsById;
|
|
15
|
+
readonly #staticCoverage;
|
|
16
|
+
readonly #hitsByMutantId;
|
|
17
|
+
|
|
18
|
+
constructor(
|
|
19
|
+
testsByMutantId: Map<string, Set<TestResult>>,
|
|
20
|
+
testsById: Map<string, TestResult>,
|
|
21
|
+
staticCoverage: CoverageData | undefined,
|
|
22
|
+
hitsByMutantId: Map<string, number>,
|
|
23
|
+
) {
|
|
24
|
+
this.#testsByMutantId = testsByMutantId;
|
|
25
|
+
this.#testsById = testsById;
|
|
26
|
+
this.#staticCoverage = staticCoverage;
|
|
27
|
+
this.#hitsByMutantId = hitsByMutantId;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public get testsByMutantId(): ReadonlyMap<string, Set<TestResult>> {
|
|
31
|
+
return this.#testsByMutantId;
|
|
32
|
+
}
|
|
33
|
+
public get testsById(): ReadonlyMap<string, TestResult> {
|
|
34
|
+
return this.#testsById;
|
|
35
|
+
}
|
|
36
|
+
public get hitsByMutantId(): ReadonlyMap<string, number> {
|
|
37
|
+
return this.#hitsByMutantId;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
public get hasCoverage(): boolean {
|
|
41
|
+
// Since static coverage should always be reported when coverage analysis succeeded (albeit an empty object),
|
|
42
|
+
// we can use that to determine if there is any coverage at all
|
|
43
|
+
return !!this.#staticCoverage;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public hasStaticCoverage(mutantId: string): boolean {
|
|
47
|
+
return !!(this.#staticCoverage && this.#staticCoverage[mutantId] > 0);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public addTest(testResult: TestResult): void {
|
|
51
|
+
this.#testsById.set(testResult.id, testResult);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
public addCoverage(mutantId: string, testIds: string[]): void {
|
|
55
|
+
const tests = this.#testsByMutantId.get(mutantId) ?? new Set();
|
|
56
|
+
this.#testsByMutantId.set(mutantId, tests);
|
|
57
|
+
testIds
|
|
58
|
+
.map((testId) => this.#testsById.get(testId))
|
|
59
|
+
.filter(notEmpty)
|
|
60
|
+
.forEach((test) => tests.add(test));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public forMutant(mutantId: string): ReadonlySet<TestResult> | undefined {
|
|
64
|
+
return this.#testsByMutantId.get(mutantId);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
public static from = testCoverageFrom;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function testCoverageFrom(
|
|
71
|
+
{ tests, mutantCoverage }: CompleteDryRunResult,
|
|
72
|
+
logger: Logger,
|
|
73
|
+
): TestCoverage {
|
|
74
|
+
const hitsByMutantId = new Map<string, number>();
|
|
75
|
+
const testsByMutantId = new Map<string, Set<TestResult>>();
|
|
76
|
+
const testsById = tests.reduce(
|
|
77
|
+
(acc, test) => acc.set(test.id, test),
|
|
78
|
+
new Map<string, TestResult>(),
|
|
79
|
+
);
|
|
80
|
+
if (mutantCoverage) {
|
|
81
|
+
Object.entries(mutantCoverage.perTest).forEach(([testId, coverage]) => {
|
|
82
|
+
const foundTest = testsById.get(testId);
|
|
83
|
+
if (!foundTest) {
|
|
84
|
+
logger.warn(
|
|
85
|
+
`Found test with id "${testId}" in coverage data, but not in the test results of the dry run. Not taking coverage data for this test into account.`,
|
|
86
|
+
);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
Object.entries(coverage).forEach(([mutantId, count]) => {
|
|
90
|
+
if (count > 0) {
|
|
91
|
+
let cov = testsByMutantId.get(mutantId);
|
|
92
|
+
if (!cov) {
|
|
93
|
+
cov = new Set();
|
|
94
|
+
testsByMutantId.set(mutantId, cov);
|
|
95
|
+
}
|
|
96
|
+
cov.add(foundTest);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
// We don't care about the exact tests in this case, just the total number of hits
|
|
102
|
+
const coverageResultsPerMutant = [
|
|
103
|
+
mutantCoverage.static,
|
|
104
|
+
...Object.values(mutantCoverage.perTest),
|
|
105
|
+
];
|
|
106
|
+
coverageResultsPerMutant.forEach((coverageByMutantId) => {
|
|
107
|
+
Object.entries(coverageByMutantId).forEach(([mutantId, count]) => {
|
|
108
|
+
hitsByMutantId.set(
|
|
109
|
+
mutantId,
|
|
110
|
+
(hitsByMutantId.get(mutantId) ?? 0) + count,
|
|
111
|
+
);
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
return new TestCoverage(
|
|
116
|
+
testsByMutantId,
|
|
117
|
+
testsById,
|
|
118
|
+
mutantCoverage?.static,
|
|
119
|
+
hitsByMutantId,
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
testCoverageFrom.inject = [
|
|
123
|
+
coreTokens.dryRunResult,
|
|
124
|
+
commonTokens.logger,
|
|
125
|
+
] as const;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import {
|
|
2
|
+
StrykerOptions,
|
|
3
|
+
PartialStrykerOptions,
|
|
4
|
+
strykerCoreSchema,
|
|
5
|
+
} from '@stryker-mutator/api/core';
|
|
6
|
+
import {
|
|
7
|
+
BaseContext,
|
|
8
|
+
commonTokens,
|
|
9
|
+
Injector,
|
|
10
|
+
tokens,
|
|
11
|
+
} from '@stryker-mutator/api/plugin';
|
|
12
|
+
import { frameworkPluginsFileUrl } from '@stryker-mutator/instrumenter';
|
|
13
|
+
import { deepFreeze } from '@stryker-mutator/util';
|
|
14
|
+
import { execaCommand } from 'execa';
|
|
15
|
+
|
|
16
|
+
import { ConfigReader } from '../config/config-reader.js';
|
|
17
|
+
import { coreTokens, PluginCreator } from '../di/index.js';
|
|
18
|
+
import { TemporaryDirectory } from '../utils/temporary-directory.js';
|
|
19
|
+
import { ConfigError } from '../errors.js';
|
|
20
|
+
import { PluginLoader } from '../di/plugin-loader.js';
|
|
21
|
+
import { reporterPluginsFileUrl } from '../reporters/index.js';
|
|
22
|
+
import { Timer } from '../utils/timer.js';
|
|
23
|
+
import { MetaSchemaBuilder, OptionsValidator } from '../config/index.js';
|
|
24
|
+
import { BroadcastReporter } from '../reporters/broadcast-reporter.js';
|
|
25
|
+
import { UnexpectedExitHandler } from '../unexpected-exit-handler.js';
|
|
26
|
+
|
|
27
|
+
import { FileSystem, ProjectReader } from '../fs/index.js';
|
|
28
|
+
|
|
29
|
+
import { MutantInstrumenterContext } from './index.js';
|
|
30
|
+
import { Reporter } from '@stryker-mutator/api/report';
|
|
31
|
+
import { LoggingBackend, LoggingServerAddress } from '../logging/index.js';
|
|
32
|
+
|
|
33
|
+
export interface PrepareExecutorContext extends BaseContext {
|
|
34
|
+
[coreTokens.loggingServerAddress]: LoggingServerAddress;
|
|
35
|
+
[coreTokens.reporterOverride]?: Reporter;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface PrepareExecutorArgs {
|
|
39
|
+
cliOptions: PartialStrykerOptions;
|
|
40
|
+
targetMutatePatterns: string[] | undefined;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export class PrepareExecutor {
|
|
44
|
+
public static readonly inject = tokens(
|
|
45
|
+
commonTokens.injector,
|
|
46
|
+
coreTokens.loggingSink,
|
|
47
|
+
);
|
|
48
|
+
constructor(
|
|
49
|
+
private readonly injector: Injector<PrepareExecutorContext>,
|
|
50
|
+
private readonly loggingBackend: LoggingBackend,
|
|
51
|
+
) {}
|
|
52
|
+
|
|
53
|
+
public async execute({
|
|
54
|
+
cliOptions,
|
|
55
|
+
targetMutatePatterns,
|
|
56
|
+
}: PrepareExecutorArgs): Promise<Injector<MutantInstrumenterContext>> {
|
|
57
|
+
// greedy initialize, so the time starts immediately
|
|
58
|
+
const timer = new Timer();
|
|
59
|
+
|
|
60
|
+
// Already configure the logger, so next classes can use them
|
|
61
|
+
this.loggingBackend.configure(cliOptions);
|
|
62
|
+
|
|
63
|
+
// Read the config file
|
|
64
|
+
const configReaderInjector = this.injector
|
|
65
|
+
.provideValue(coreTokens.validationSchema, strykerCoreSchema)
|
|
66
|
+
.provideClass(coreTokens.optionsValidator, OptionsValidator);
|
|
67
|
+
const configReader = configReaderInjector.injectClass(ConfigReader);
|
|
68
|
+
const options: StrykerOptions = await configReader.readConfig(cliOptions);
|
|
69
|
+
|
|
70
|
+
// Load plugins
|
|
71
|
+
const pluginLoader = configReaderInjector.injectClass(PluginLoader);
|
|
72
|
+
const pluginDescriptors = [
|
|
73
|
+
...options.plugins,
|
|
74
|
+
frameworkPluginsFileUrl,
|
|
75
|
+
reporterPluginsFileUrl,
|
|
76
|
+
...options.appendPlugins,
|
|
77
|
+
];
|
|
78
|
+
const loadedPlugins = await pluginLoader.load(pluginDescriptors);
|
|
79
|
+
|
|
80
|
+
// Revalidate the options with plugin schema additions
|
|
81
|
+
const metaSchemaBuilder =
|
|
82
|
+
configReaderInjector.injectClass(MetaSchemaBuilder);
|
|
83
|
+
const metaSchema = metaSchemaBuilder.buildMetaSchema(
|
|
84
|
+
loadedPlugins.schemaContributions,
|
|
85
|
+
);
|
|
86
|
+
const optionsValidatorInjector = configReaderInjector.provideValue(
|
|
87
|
+
coreTokens.validationSchema,
|
|
88
|
+
metaSchema,
|
|
89
|
+
);
|
|
90
|
+
const validator: OptionsValidator =
|
|
91
|
+
optionsValidatorInjector.injectClass(OptionsValidator);
|
|
92
|
+
validator.validate(options, true);
|
|
93
|
+
|
|
94
|
+
// Done reading config, deep freeze it so it won't change unexpectedly
|
|
95
|
+
deepFreeze(options);
|
|
96
|
+
|
|
97
|
+
// Final logging configuration, update the logging configuration with the latest results
|
|
98
|
+
this.loggingBackend.configure(options);
|
|
99
|
+
|
|
100
|
+
// Resolve input files
|
|
101
|
+
const projectFileReaderInjector = optionsValidatorInjector
|
|
102
|
+
.provideValue(commonTokens.options, options)
|
|
103
|
+
.provideClass(coreTokens.temporaryDirectory, TemporaryDirectory)
|
|
104
|
+
.provideClass(coreTokens.fs, FileSystem)
|
|
105
|
+
.provideValue(coreTokens.pluginsByKind, loadedPlugins.pluginsByKind);
|
|
106
|
+
const project = await projectFileReaderInjector
|
|
107
|
+
.injectClass(ProjectReader)
|
|
108
|
+
.read(targetMutatePatterns);
|
|
109
|
+
|
|
110
|
+
if (project.isEmpty) {
|
|
111
|
+
throw new ConfigError('No input files found.');
|
|
112
|
+
} else {
|
|
113
|
+
// Done preparing, finish up and return
|
|
114
|
+
await projectFileReaderInjector
|
|
115
|
+
.resolve(coreTokens.temporaryDirectory)
|
|
116
|
+
.initialize();
|
|
117
|
+
return projectFileReaderInjector
|
|
118
|
+
.provideValue(coreTokens.project, project)
|
|
119
|
+
.provideValue(commonTokens.fileDescriptions, project.fileDescriptions)
|
|
120
|
+
.provideClass(coreTokens.pluginCreator, PluginCreator)
|
|
121
|
+
.provideClass(coreTokens.reporter, BroadcastReporter)
|
|
122
|
+
.provideValue(coreTokens.timer, timer)
|
|
123
|
+
.provideValue(coreTokens.project, project)
|
|
124
|
+
.provideValue(coreTokens.execa, execaCommand)
|
|
125
|
+
.provideValue(coreTokens.process, process)
|
|
126
|
+
.provideClass(coreTokens.unexpectedExitRegistry, UnexpectedExitHandler)
|
|
127
|
+
.provideValue(
|
|
128
|
+
coreTokens.pluginModulePaths,
|
|
129
|
+
loadedPlugins.pluginModulePaths,
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|