UNPKG

sb-mig

Version:

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

25 lines (24 loc) 1.14 kB
import { syncComponentsData } from "../../api/components/components.sync.js"; import { syncDatasourcesData } from "../../api/datasources/datasources.js"; import { syncPluginsData } from "../../api/plugins/plugins.js"; import { syncRolesData } from "../../api/roles/roles.js"; import { toRequestConfig } from "../requestConfig.js"; export async function syncComponents(client, args) { const presets = args.presets ?? false; return (await syncComponentsData({ components: args.components, presets, ssot: args.ssot, dryRun: args.dryRun, onProgress: args.onProgress, }, toRequestConfig(client))); } export async function syncDatasources(client, args) { return (await syncDatasourcesData({ datasources: args.datasources, dryRun: args.dryRun }, toRequestConfig(client))); } export async function syncRoles(client, args) { return (await syncRolesData({ roles: args.roles, dryRun: args.dryRun }, toRequestConfig(client))); } export async function syncPlugins(client, args) { return (await syncPluginsData({ plugins: args.plugins, dryRun: args.dryRun }, toRequestConfig(client))); }