@reliverse/rse
Version:
@reliverse/rse is your all-in-one companion for bootstrapping and improving any kind of projects (especially web apps built with frameworks like Next.js) — whether you're kicking off something new or upgrading an existing app. It is also a little AI-power
30 lines (29 loc) • 1.1 kB
TypeScript
import type { RseConfig } from "@reliverse/cfg";
/**
* Type for template update check results
*/
export interface TemplateUpdateInfo {
hasUpdate: boolean;
currentDate: string;
latestDate: string | null;
}
/**
* Checks if a project template has an update available
* @param projectConfig The project's rseg
* @returns Object containing update info
*/
export declare function checkForTemplateUpdate(projectConfig: RseConfig): Promise<TemplateUpdateInfo>;
/**
* Updates the project template date in the config to the latest date
* @param projectPath The path to the project directory
* @param latestDate The latest template date to update to
* @param isDev Whether running in development mode
*/
export declare function updateProjectTemplateDate(projectPath: string, latestDate: string, isDev: boolean): Promise<void>;
/**
* Retrieves template update info (if any) based on rseg presence.
*/
export declare function getTemplateUpdateInfo(cwd: string, isDev: boolean, hasRseConfig: boolean): Promise<{
updateAvailable: boolean;
updateInfo: TemplateUpdateInfo | null;
}>;