{
  "version": 3,
  "sources": ["../../src/index.js", "../../src/errors/index.js", "../../src/errors/tsconfig-parse-error.js", "../../src/tsconfig-parser.js"],
  "sourcesContent": ["export * as Errors from './errors/index.js'\nexport { tsConfigParser } from './tsconfig-parser.js'\n", "export { TsConfigParseError } from './tsconfig-parse-error.js'\n", "/** Custom error class to indicate a failure while parsing the tsconfig.json file. */\nexport class TsConfigParseError extends Error {\n  /**\n   *\n   * @param {object} params - An object containing the parameters.\n   * @param {string | undefined} params.filepath - The full path, including the filename, to the `tsconfig.json` file (optional)\n   * @param {unknown} cause - The original error or additional information about the parsing failure.\n   */\n  constructor ({ filepath }, cause) {\n    super(`Failed to parse the tsconfig.json file${filepath != null ? ` at \"${filepath}\"` : ''}.`)\n    this.cause = cause\n    this.name = 'TsConfigParseError'\n  }\n}\n", "import { TsConfigParseError } from './errors/index.js'\n\n/** @typedef {import('./tsconfig.d.ts').default} TsConfig */\n\n/**\n * Parses a `tsconfig.json`\n *\n * @param {string} filepath - The full path, including the filename, to the `tsconfig.json` file.\n * @returns {Promise<TsConfig>}\n */\nexport async function tsConfigParser (filepath) {\n  const { parse } = await import('tsconfck')\n\n  try {\n    /** @type {{ tsconfig?: TsConfig }} */\n    const { tsconfig: { compilerOptions = { } } = {} } = await parse(filepath)\n\n    return {\n      compilerOptions: {\n        rootDir: compilerOptions.rootDir,\n        rootDirs: compilerOptions.rootDirs,\n        baseUrl: compilerOptions.baseUrl,\n        outDir: compilerOptions.outDir,\n        outFile: compilerOptions.outFile,\n        paths: compilerOptions.paths,\n        experimentalDecorators: compilerOptions.experimentalDecorators,\n        emitDecoratorMetadata: compilerOptions.emitDecoratorMetadata,\n        declaration: compilerOptions.declaration,\n        declarationDir: compilerOptions.declarationDir,\n        resolveJsonModule: compilerOptions.resolveJsonModule,\n        resolvePackageJsonExports: compilerOptions.resolvePackageJsonExports,\n        resolvePackageJsonImports: compilerOptions.resolvePackageJsonImports\n      }\n    }\n  } catch (error) {\n    throw new TsConfigParseError({ filepath }, error)\n  }\n}\n"],
  "mappings": "6mBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,mBAAAC,IAAA,eAAAC,EAAAJ,GCAA,IAAAK,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,ICCO,IAAMC,EAAN,cAAiC,KAAM,CAD9C,MAC8C,CAAAC,EAAA,2BAO5C,YAAa,CAAE,SAAAC,CAAS,EAAGC,EAAO,CAChC,MAAM,yCAAyCD,GAAY,KAAO,QAAQA,CAAQ,IAAM,EAAE,GAAG,EAC7F,KAAK,MAAQC,EACb,KAAK,KAAO,oBACd,CACF,ECHA,eAAsBC,EAAgBC,EAAU,CAC9C,GAAM,CAAE,MAAAC,CAAM,EAAI,KAAM,QAAO,UAAU,EAEzC,GAAI,CAEF,GAAM,CAAE,SAAU,CAAE,gBAAAC,EAAkB,CAAE,CAAE,EAAI,CAAC,CAAE,EAAI,MAAMD,EAAMD,CAAQ,EAEzE,MAAO,CACL,gBAAiB,CACf,QAASE,EAAgB,QACzB,SAAUA,EAAgB,SAC1B,QAASA,EAAgB,QACzB,OAAQA,EAAgB,OACxB,QAASA,EAAgB,QACzB,MAAOA,EAAgB,MACvB,uBAAwBA,EAAgB,uBACxC,sBAAuBA,EAAgB,sBACvC,YAAaA,EAAgB,YAC7B,eAAgBA,EAAgB,eAChC,kBAAmBA,EAAgB,kBACnC,0BAA2BA,EAAgB,0BAC3C,0BAA2BA,EAAgB,yBAC7C,CACF,CACF,OAASC,EAAO,CACd,MAAM,IAAIC,EAAmB,CAAE,SAAAJ,CAAS,EAAGG,CAAK,CAClD,CACF,CA3BsBE,EAAAN,EAAA",
  "names": ["src_exports", "__export", "errors_exports", "tsConfigParser", "__toCommonJS", "errors_exports", "__export", "TsConfigParseError", "TsConfigParseError", "__name", "filepath", "cause", "tsConfigParser", "filepath", "parse", "compilerOptions", "error", "TsConfigParseError", "__name"]
}
