@alova/wormhole
Version:
More modern openAPI generating solution for alova.js
23 lines (22 loc) • 848 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getGlobalConfig = getGlobalConfig;
exports.setGlobalConfig = setGlobalConfig;
const node_path_1 = __importDefault(require("node:path"));
const DEFAULT_CONFIG = {
alovaTempPath: node_path_1.default.join('node_modules/.alova'),
templatePath: node_path_1.default.join(__dirname, './templates'),
templateData: new Map(),
Error,
};
globalThis.ALOVA_WORMHOLE_CONFIG = DEFAULT_CONFIG;
function getGlobalConfig() {
return globalThis.ALOVA_WORMHOLE_CONFIG;
}
function setGlobalConfig(config) {
Object.assign(globalThis.ALOVA_WORMHOLE_CONFIG, config);
}
exports.default = { getGlobalConfig, setGlobalConfig };