18 lines
761 B
JavaScript
18 lines
761 B
JavaScript
"use strict";
|
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
};
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.default = grabAppMainDbSchema;
|
|
const fs_1 = __importDefault(require("fs"));
|
|
const grab_dir_names_1 = __importDefault(require("./backend/names/grab-dir-names"));
|
|
const ejson_1 = __importDefault(require("./ejson"));
|
|
function grabAppMainDbSchema() {
|
|
const { appSchemaJSONFile } = (0, grab_dir_names_1.default)();
|
|
if (!fs_1.default.existsSync(appSchemaJSONFile)) {
|
|
return undefined;
|
|
}
|
|
const parsedAppSchema = ejson_1.default.parse(fs_1.default.readFileSync(appSchemaJSONFile, "utf-8"));
|
|
return parsedAppSchema;
|
|
}
|