UNPKG

nestjs-auto-reflect-metadata-emitter

Version:

[![Actions Status](https://github.com/Codibre/nestjs-auto-reflect-metadata-emitter/workflows/build/badge.svg)](https://github.com/Codibre/nestjs-auto-reflect-metadata-emitter/actions) [![Actions Status](https://github.com/Codibre/nestjs-auto-reflect-metad

23 lines 943 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TsConfigProvider = void 0; const fs_1 = require("fs"); const path_1 = require("path"); class TsConfigProvider { typescriptLoader; constructor(typescriptLoader) { this.typescriptLoader = typescriptLoader; } getByConfigFilename(configFilename) { const configPath = (0, path_1.join)(process.cwd(), configFilename); if (!(0, fs_1.existsSync)(configPath)) { throw new Error('MISSING_TYPESCRIPT ${configFilename}'); } const tsBinary = this.typescriptLoader.load(); const parsedCmd = tsBinary.getParsedCommandLineOfConfigFile(configPath, undefined, tsBinary.sys); const { options, fileNames, projectReferences } = parsedCmd; return { options, fileNames, projectReferences }; } } exports.TsConfigProvider = TsConfigProvider; //# sourceMappingURL=tsconfig-provider.js.map