import { assemble } from "./assemble.js"; import { render } from "../../render/index.js"; import { functionContextClient } from "../../fn/functionContextClient.js"; /** * Populate cache by assembling the document and triggering a render */ export async function populateCache(config, cmdLog, dir) { const log = cmdLog.prefix('cache'); try { const document = await assemble(dir); const fn = functionContextClient(config.serverUrl, { username: config.username, password: config.password, }, { cache: true, log: (msg) => log.http(msg) }); await render(document, { fn }); } catch (error) { throw error; } } //# sourceMappingURL=populateCache.js.map