@puls-atlas/cli
Version:
The Puls Atlas CLI tool for managing Atlas projects
22 lines • 642 B
JavaScript
import { getAtlasGeneratedDir } from '../../utils/atlas.js';
import { loadSearchConfig } from '../search/config/searchConfig.js';
export const validateAtlasProject = (cwd = process.cwd()) => {
const sections = [];
let configPath = null;
try {
const resolvedSection = loadSearchConfig(cwd);
configPath = resolvedSection.configPath;
sections.push({
configPath: resolvedSection.configPath,
name: 'search',
resolvedConfigPaths: resolvedSection.configPaths,
validated: true
});
} catch {}
return {
config: null,
configPath,
generatedDir: getAtlasGeneratedDir(cwd),
sections
};
};