@jungvonmatt/sb-migrate
Version:
CLI tool for managing Storyblok schema and content migrations
25 lines (24 loc) • 1.02 kB
TypeScript
export declare function isStoryblokCliInstalled(): boolean;
/**
* Authenticates with Storyblok using the CLI and OAuth token.
*
* This function performs the following steps:
* 1. Checks if the Storyblok CLI is installed
* 2. Loads the configuration to get the OAuth token
* 3. Executes the Storyblok CLI login command with the token
*
* @throws {Error} If any of the following conditions are met:
* - Storyblok CLI is not installed
* - No OAuth token is found in the configuration
* - Login command execution fails
*
* @requires storyblok-cli - The Storyblok CLI must be installed globally
* @requires config - A valid configuration with an OAuth token must exist
*
* @remarks
* - Uses the EU region for Storyblok authentication
* - Provides clear error messages with installation instructions when CLI is missing
*
* @see {@link https://github.com/storyblok/storyblok-cli?tab=readme-ov-file#login|Storyblok CLI Documentation}
*/
export declare function loginToStoryblok(): Promise<void>;