{"version":3,"file":"resolve-config-options.mjs","sources":["../../src/utils/resolve-config-options.ts"],"sourcesContent":["import * as ts from 'typescript';\n\nimport { reportDiagnostics } from './report-diagnostics';\n\nexport const resolveConfigOptions = (configPath: string) => {\n  // Parse the tsconfig.json file and resolve every file name & compiler options\n  const { errors, ...configOptions } = ts.getParsedCommandLineOfConfigFile(\n    configPath,\n    undefined,\n    ts.sys as unknown as ts.ParseConfigFileHost\n  )!;\n\n  // If there are errors in the tsconfig.json\n  // file, report them and exit early\n  if (errors.length > 0) {\n    reportDiagnostics(errors);\n    process.exit(1);\n  }\n\n  return configOptions;\n};\n"],"names":["resolveConfigOptions","configPath","errors","configOptions","ts","getParsedCommandLineOfConfigFile","undefined","sys","length","reportDiagnostics","process","exit"],"mappings":";;;AAIO,MAAMA,uBAAuB,CAACC,UAAAA,GAAAA;;AAEnC,IAAA,MAAM,EAAEC,MAAM,EAAE,GAAGC,aAAAA,EAAe,GAAGC,EAAAA,CAAGC,gCAAgC,CACtEJ,UAAAA,EACAK,SAAAA,EACAF,EAAAA,CAAGG,GAAG,CAAA;;;IAKR,IAAIL,MAAAA,CAAOM,MAAM,GAAG,CAAA,EAAG;QACrBC,iBAAAA,CAAkBP,MAAAA,CAAAA;AAClBQ,QAAAA,OAAAA,CAAQC,IAAI,CAAC,CAAA,CAAA;AACf,IAAA;IAEA,OAAOR,aAAAA;AACT;;;;"}