UNPKG

@patchworkdev/pdk

Version:

Patchwork Development Kit

62 lines 2.18 kB
import fs from 'fs'; import { Address } from 'viem'; type Deployment = { contract: string; hash: string; address: Address; network: string; timestamp: string; block: number; }; type LockFile = { currentNetwork: string; lastDeployment: Deployment | null; fileHashes: { [filepath: string]: string; }; directoryHashes: { [dirpath: string]: string; }; deploymentHistory: Array<Deployment>; projectHash: string; }; declare class LockFileManager { protected lockFilePath: string; protected rootDir: string; protected lockData: LockFile; protected excludePatterns: string[]; constructor(configPath: string, excludePatterns?: string[]); protected readLockFile(): LockFile; protected saveLockFile(): void; protected shouldExclude(itemPath: string): boolean; protected getRelativePath(absolutePath: string): string; protected getAbsolutePath(relativePath: string): string; updateNetwork(network: string): void; logDeployment(contract: string, hash: string, address: Address, network: string, timestamp: string, block: number): void; getLatestDeploymentForContract(contract: string, network: string): Deployment | null; calculateFileHash(filepath: string): string; updateFileHash(filepath: string, hash?: string): void; hasFileChanged(filepath: string): boolean; getMatchingFiles(pattern: string): Promise<string[]>; calculateDirectoryHash(dirpath: string): string; getChangedFiles(): string[]; watchDirectory(callback: (changes: { files: string[]; directories: string[]; }) => void): fs.FSWatcher; updateProjectHash(): void; hasProjectChanged(): boolean; getAllChangedItems(): { files: string[]; directories: string[]; }; getDeploymentHistory(): Array<Deployment>; getCurrentNetwork(): string; getLastDeployment(): Deployment | null; getFileHash(filepath: string): string | undefined; getDirectoryHash(dirpath: string): string | undefined; getProjectHash(): string; getRootDir(): string; } export default LockFileManager; //# sourceMappingURL=lockFile.d.ts.map