UNPKG

contentful-management

Version:
25 lines (22 loc) 793 B
import { toPlainObject, freezeSys } from 'contentful-sdk-core'; import copy from 'fast-copy'; import { wrapCollection } from '../common-utils.js'; /** * @internal * @param makeRequest - function to make requests via an adapter * @param data - raw contentful-Function data * @returns Wrapped Function data */ function wrapFunctionLog(makeRequest, data) { const functionLog = toPlainObject(copy(data)); return freezeSys(functionLog); } /** * @internal * @param makeRequest - function to make requests via an adapter * @param data - raw contentful-function data * @returns Wrapped App Function collection data */ const wrapFunctionLogCollection = wrapCollection(wrapFunctionLog); export { wrapFunctionLog, wrapFunctionLogCollection }; //# sourceMappingURL=function-log.js.map