import { getPage } from "../operations/getPage.js"; import { getPages } from "../operations/getPages.js"; import { getUploads } from "../operations/getUploads.js"; export const functionContext = (client, doc, requestQuery, renderingPaths) => { const safeQuery = requestQuery || {}; return { getPage: async (query) => { return await getPage(client, query, safeQuery, functionContext); }, getPages: async (options) => { const excludePaths = [doc.path, ...(renderingPaths || []), ...(options?.excludePaths || [])]; return await getPages(client, { ...options, excludePaths }, safeQuery, functionContext); }, getUploads: async (options) => { const docQuery = options?.path ? { path: options.path } : doc; return await getUploads(client, docQuery, options); }, }; }; //# sourceMappingURL=functionContext.js.map