()
| 3952 | } |
| 3953 | |
| 3954 | private readConfiguration() { |
| 3955 | if (this.config === undefined) { |
| 3956 | return { |
| 3957 | module: undefined, |
| 3958 | modules: [], |
| 3959 | call: undefined, |
| 3960 | version: undefined, |
| 3961 | files: undefined |
| 3962 | } |
| 3963 | } |
| 3964 | const module = this.graph.moduleOf(this.config) |
| 3965 | if (!(module instanceof SourceModule)) { |
| 3966 | return throwError( |
| 3967 | writeUnreadableConfigMessage(this.graph.pathOf(this.config)) |
| 3968 | ) |
| 3969 | } |
| 3970 | const modules = this.importClosureOf(module.id) |
| 3971 | const call = this.configureCallsOf(module)[0] |
| 3972 | return { |
| 3973 | module, |
| 3974 | modules, |
| 3975 | call, |
| 3976 | version: |
| 3977 | call && |
| 3978 | hashOf( |
| 3979 | modules |
| 3980 | .map(id => `${this.graph.pathOf(id)}\n${this.sourceOf(id)}`) |
| 3981 | .join("\n") |
| 3982 | ), |
| 3983 | files: call && hashOf(this.filesOf(module.id).join("\n")) |
| 3984 | } |
| 3985 | } |
| 3986 | |
| 3987 | // a host may give other text than the file's |
| 3988 | private filesOf(id: string): string[] { |
no test coverage detected