UNPKG

@itxch/contentful-import

Version:

This tool allows you to import JSON dump exported by contentful-export

20 lines (19 loc) 406 B
import { createClient } from "contentful-management"; import { logEmitter } from "contentful-batch-libs/dist/logging.js"; function logHandler(level, data) { logEmitter.emit(level, data); } function initClient(opts) { const defaultOpts = { timeout: 3e4, logHandler }; const config = { ...defaultOpts, ...opts }; return createClient(config); } export { initClient as default };