UNPKG

mastra

Version:
36 lines 1.38 kB
export interface BuildManifest { buildTime: string; sourceHash: string; } /** * Computes a single rolled-up hash of all source files. * * The hash is computed by: * 1. Collecting all relevant source files * 2. Sorting them alphabetically by relative path (for determinism) * 3. Hashing each file's content * 4. Combining path + hash into a final hash * * Also includes workspace root lockfiles if the project is in a monorepo. */ export declare function computeSourceHash(rootDir: string, mastraDir: string): Promise<string>; /** * Writes a build manifest to the output directory. */ export declare function writeBuildManifest(outputDirectory: string, sourceHash: string): Promise<void>; /** * Reads the build manifest from the output directory. * Returns null if the manifest doesn't exist or is invalid. */ export declare function readBuildManifest(outputDirectory: string): Promise<BuildManifest | null>; export interface StalenessCheckResult { isStale: boolean; reason: 'no-build' | 'no-manifest' | 'hash-mismatch' | 'up-to-date'; currentHash?: string; manifestHash?: string; } /** * Checks if the build output is stale compared to the current source files. */ export declare function checkBuildStaleness(rootDir: string, mastraDir: string, outputDirectory: string): Promise<StalenessCheckResult>; //# sourceMappingURL=source-hash.d.ts.map