@jungvonmatt/sb-migrate
Version:
CLI tool for managing Storyblok schema and content migrations
22 lines (21 loc) • 1.12 kB
TypeScript
import { ComponentGroupMigration } from "../../types/migration";
import { RunMigrationOptions } from "../../utils/migration";
/**
* Handles the update of an existing component group based on the provided migration schema.
* This function performs the following operations:
* 1. Checks if the operation is a dry run
* 2. Retrieves existing component groups
* 3. Updates the specified component group
* 4. Logs the update status
*
* @param {Object} migration - The migration object containing the component group ID and new name
* @param {number | string} migration.id - The ID of the component group to update
* @param {ComponentGroupMigration} migration.group - The new component group definition
* @param {RunMigrationOptions} options - Configuration options for the migration
* @param {boolean} [options.isDryrun] - Whether to perform a dry run without making actual changes
* @throws {Error} If the component group update fails
*/
export declare const handleUpdateComponentGroup: (migration: {
id: number | string;
group: ComponentGroupMigration;
}, options: RunMigrationOptions) => Promise<void>;