| 18 | explicitDeps: string[] = [] |
| 19 | |
| 20 | constructor(conf: LoadConfigResult) { |
| 21 | super(conf) |
| 22 | |
| 23 | const config = conf.config |
| 24 | this.runtime = nodeRuntime |
| 25 | |
| 26 | config.cwd ||= this.runtime.cwd() |
| 27 | |
| 28 | if (config.logLevel) { |
| 29 | logger.level = config.logLevel |
| 30 | } |
| 31 | |
| 32 | this.project = new Project({ |
| 33 | ...conf.tsconfig, |
| 34 | getFiles: this.getFiles.bind(this), |
| 35 | readFile: this.runtime.fs.readFileSync.bind(this), |
| 36 | hooks: conf.hooks, |
| 37 | parserOptions: { |
| 38 | ...this.parserOptions, |
| 39 | join: this.runtime.path.join || this.parserOptions.join, |
| 40 | }, |
| 41 | }) |
| 42 | |
| 43 | this.output = new OutputEngine(this) |
| 44 | this.diff = new DiffEngine(this) |
| 45 | this.explicitDeps = this.getExplicitDependencies() |
| 46 | } |
| 47 | |
| 48 | private getExplicitDependencies = () => { |
| 49 | const { cwd, dependencies } = this.config |