12 lines
400 B
JavaScript
12 lines
400 B
JavaScript
import fs from "fs";
|
|
import grabDirNames from "./backend/names/grab-dir-names";
|
|
import EJSON from "./ejson";
|
|
export default function grabAppMainDbSchema() {
|
|
const { appSchemaJSONFile } = grabDirNames();
|
|
if (!fs.existsSync(appSchemaJSONFile)) {
|
|
return undefined;
|
|
}
|
|
const parsedAppSchema = EJSON.parse(fs.readFileSync(appSchemaJSONFile, "utf-8"));
|
|
return parsedAppSchema;
|
|
}
|