wangzhibo
2026-05-09 53418655c061ac26f66058253f39200aced1ab1d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.loadAppConfig = loadAppConfig;
exports.loadLdapConfig = loadLdapConfig;
exports.loadScenariosConfig = loadScenariosConfig;
exports.loadWarehousePlansConfig = loadWarehousePlansConfig;
exports.getConfigDir = getConfigDir;
const node_fs_1 = __importDefault(require("node:fs"));
const node_path_1 = __importDefault(require("node:path"));
const CONFIG_DIR = process.env.BOARD_CONFIG_DIR
    ? node_path_1.default.resolve(process.env.BOARD_CONFIG_DIR)
    : node_path_1.default.join(process.cwd(), "config");
function readJson(file) {
    const full = node_path_1.default.join(CONFIG_DIR, file);
    const raw = node_fs_1.default.readFileSync(full, "utf8");
    return JSON.parse(raw);
}
function loadAppConfig() {
    return readJson("app.config.json");
}
function loadLdapConfig() {
    return readJson("ldap.config.json");
}
function loadScenariosConfig() {
    return readJson("scenarios.config.json");
}
function loadWarehousePlansConfig() {
    return readJson("warehousePlans.config.json");
}
function getConfigDir() {
    return CONFIG_DIR;
}
//# sourceMappingURL=loadConfig.js.map