Files
james.maes 4810c80390 feat(core): implement Markdown to Confluence publisher
- Confluence Cloud API client with auth, CRUD, attachments, labels
- Tree builder with glob matching, title extraction, hierarchy mapping
- Markdown to Confluence Storage Format converter
- Publisher orchestration with idempotent updates via content hash
- CLI and GitHub Action stubs
2025-12-17 17:04:11 -06:00

21 lines
483 B
TypeScript

/**
* Config loading for GitHub Action
*/
import { readFile } from 'node:fs/promises';
import { parse as parseYaml } from 'yaml';
import type { Config } from '@forma/publisher';
export async function loadConfig(configPath: string): Promise<Config> {
const content = await readFile(configPath, 'utf-8');
let parsed: unknown;
if (configPath.endsWith('.json')) {
parsed = JSON.parse(content);
} else {
parsed = parseYaml(content);
}
return parsed as Config;
}