UNPKG

sb-mig

Version:

CLI to rule the world. (and handle stuff related to Storyblok CMS)

31 lines (30 loc) 1.52 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.syncComponents = syncComponents; exports.syncDatasources = syncDatasources; exports.syncRoles = syncRoles; exports.syncPlugins = syncPlugins; const components_sync_js_1 = require("../../api/components/components.sync.js"); const datasources_js_1 = require("../../api/datasources/datasources.js"); const plugins_js_1 = require("../../api/plugins/plugins.js"); const roles_js_1 = require("../../api/roles/roles.js"); const requestConfig_js_1 = require("../requestConfig.js"); async function syncComponents(client, args) { const presets = args.presets ?? false; return (await (0, components_sync_js_1.syncComponentsData)({ components: args.components, presets, ssot: args.ssot, dryRun: args.dryRun, onProgress: args.onProgress, }, (0, requestConfig_js_1.toRequestConfig)(client))); } async function syncDatasources(client, args) { return (await (0, datasources_js_1.syncDatasourcesData)({ datasources: args.datasources, dryRun: args.dryRun }, (0, requestConfig_js_1.toRequestConfig)(client))); } async function syncRoles(client, args) { return (await (0, roles_js_1.syncRolesData)({ roles: args.roles, dryRun: args.dryRun }, (0, requestConfig_js_1.toRequestConfig)(client))); } async function syncPlugins(client, args) { return (await (0, plugins_js_1.syncPluginsData)({ plugins: args.plugins, dryRun: args.dryRun }, (0, requestConfig_js_1.toRequestConfig)(client))); }