UNPKG

@quell/server

Version:

Quell is an open-source NPM package providing a light-weight caching layer implementation and cache invalidation for GraphQL responses on both the client- and server-side. Use Quell to prevent redundant client-side API requests and to minimize costly serv

51 lines 1.8 kB
export interface FileCreationResult { created: boolean; existed: boolean; path: string; } export interface InstallResult { success: boolean; output: string; error?: string; } /** * Detects which package manager is being used in the project */ export declare function detectPackageManager(): 'npm' | 'yarn' | 'pnpm'; /** * Installs packages using the detected package manager */ export declare function installPackages(dependencies: string[], devDependencies?: string[], logger?: any): Promise<InstallResult>; /** * Creates a file with content, optionally checking if it already exists */ export declare function createFile(filePath: string, content: string, overwrite?: boolean): Promise<FileCreationResult>; /** * Appends content to an existing file or creates it if it doesn't exist */ export declare function appendToFile(filePath: string, content: string, separator?: string): Promise<FileCreationResult>; /** * Updates .gitignore file with Quell-specific entries */ export declare function updateGitignore(additions: string): Promise<FileCreationResult>; /** * Checks if a package.json exists and reads it */ export declare function readPackageJson(): Promise<any | null>; /** * Updates package.json with new scripts and dependencies */ export declare function updatePackageJson(scripts: Record<string, string>, dependencies: string[], devDependencies: string[]): Promise<FileCreationResult>; /** * Creates a directory structure */ export declare function createDirectories(dirs: string[]): Promise<void>; /** * Checks if we're in a Git repository */ export declare function isGitRepository(): Promise<boolean>; /** * Gets the current working directory name */ export declare function getCurrentDirName(): string; //# sourceMappingURL=file-helpers.d.ts.map