import path from 'node:path'; import { fileURLToPath } from 'node:url'; import postcss from 'postcss'; import { themeAnalysis } from './guard-theme-analysis.mjs'; const workspace = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); const result = themeAnalysis({ records: [{ edges: [{ runtime: true, spec: '@hm-design/ui/theme.css' }, { runtime: true, spec: '@hm-design/ui/dashboard-status.css' }] }], workspace, postcss, walk() {}, selectedFile() { return true; }, add() {} }); console.log(JSON.stringify({ source: '@hm-design/ui/theme.css + @hm-design/ui/dashboard-status.css', definitionCount: result.definitions.length, definitions: result.definitions, incomplete: result.incomplete, note: 'CSS declarations, not a promise that each variable is an overridable Runtime JSON key. See the public Runtime contract.' }, null, 2)); if (result.incomplete) process.exitCode = 1;