import { MainJsonSchema, Page, PageFileStructure, SidebarJsonSchema } from "@kottster/common"; interface FileWriterOptions { usingTsc?: boolean; } /** * Service for writing files */ export declare class FileWriter { private readonly usingTsc; constructor(options: FileWriterOptions); /** * Update the page config file * @param pageKey The page ID * @param pageConfig The page config to update */ updatePageConfig(pageKey: string, pageConfig: Page): void; /** * Remove page directory and all its files * @param pageKey The page ID */ removePage(pageKey: string): void; /** * Rename page directory * @param oldPageKey The old page ID * @param newPageKey The new page ID */ renamePage(oldPageKey: string, newPageKey: string): void; /** * Write the page to the file * @param page The page to write */ writePageToFile({ dirPath, files }: PageFileStructure): void; /** * Write the schema to the kottster-app.json file * @param schema The schema to write */ writeMainSchemaJsonFile(schema: MainJsonSchema): void; /** * Write the sidebar schema to the app/schemas/sidebar.json file * @param sidebarSchema The sidebar schema to write */ writeSidebarSchemaJsonFile(sidebarSchema: SidebarJsonSchema): void; /** * Write the .env file * @param variables The variables to write */ writeDotEnvFile(variables: Record): void; /** * Write app/_server/app.ts file with the secret key * @param secretKey The secret key */ writeAppServerFile(secretKey: string, jwtSecretSalt: string, kottsterApiToken: string | undefined, rootUsername: string, rootPassword: string): void; /** * Remove data source directory * @param dataSourceName The data source name */ removeDataSource(dataSourceName: string): void; /** * Delete all files in the directory * @param dir The directory */ private deleteFilesInDirectory; /** * Write the content to the file * @param filePath The file path * @param content The content */ private writeFile; /** * Write the content to the debug file * @param content The content */ writeDebugJsonFile(prefix: string, content: string): void; } export {};