| 654 | }; |
| 655 | |
| 656 | function readDataSourceConfigFromTypeScript(datasourcesDir, dataSourceClass) { |
| 657 | const srcFile = path.join( |
| 658 | datasourcesDir, |
| 659 | exports.dataSourceToArtifactFileName(dataSourceClass), |
| 660 | ); |
| 661 | debug( |
| 662 | 'Reading datasource config for class %s from %s', |
| 663 | dataSourceClass, |
| 664 | srcFile, |
| 665 | ); |
| 666 | |
| 667 | const fileContent = fs.readFileSync(srcFile, 'utf-8'); |
| 668 | return tsquery.getDataSourceConfig(fileContent); |
| 669 | } |
| 670 | |
| 671 | function readDataSourceConfigFromJSON(datasourcesDir, dataSourceClass) { |
| 672 | const datasourceJSONFile = path.join( |