@proofkit/better-auth
Version:
FileMaker adapter for Better Auth
19 lines (18 loc) • 588 B
JavaScript
import path from "node:path";
import fs from "fs-extra";
function stripJsonComments(jsonString) {
return jsonString.replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g, (m, g) => g ? "" : m).replace(/,(?=\s*[}\]])/g, "");
}
function getTsconfigInfo(cwd, flatPath) {
let tsConfigPath;
{
tsConfigPath = cwd ? path.join(cwd, "tsconfig.json") : path.join("tsconfig.json");
}
const text = fs.readFileSync(tsConfigPath, "utf-8");
return JSON.parse(stripJsonComments(text));
}
export {
getTsconfigInfo,
stripJsonComments
};
//# sourceMappingURL=get-tsconfig-info.js.map