@strapi/typescript-utils 0.0.0-next.f5107c72369ee86a8ec1b6782f2e890925033ca3 → 0.0.0-next.f5312617ca16b870c2bf1adcea2c69b676979e29

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.
@@ -1,37 +0,0 @@
1
- 'use strict';
2
-
3
- const ts = require('typescript');
4
-
5
- const reportDiagnostics = require('../utils/report-diagnostics');
6
- const formatHost = require('../utils/format-host');
7
- const resolveConfigOptions = require('../utils/resolve-config-options');
8
-
9
- /**
10
- * Prints a diagnostic every time the watch status changes.
11
- * This is mainly for messages like "Starting compilation" or "Compilation completed".
12
- */
13
- const reportWatchStatusChanged = (diagnostic) => {
14
- console.info(ts.formatDiagnostic(diagnostic, formatHost));
15
- };
16
-
17
- module.exports = {
18
- run(configPath) {
19
- const createProgram = ts.createSemanticDiagnosticsBuilderProgram;
20
-
21
- const { fileNames, options, projectReferences, watchOptions } =
22
- resolveConfigOptions(configPath);
23
-
24
- const host = ts.createWatchCompilerHost(
25
- fileNames,
26
- options,
27
- ts.sys,
28
- createProgram,
29
- reportDiagnostics,
30
- reportWatchStatusChanged,
31
- projectReferences,
32
- watchOptions
33
- );
34
-
35
- ts.createWatchProgram(host);
36
- },
37
- };