mastra
Version:
cli for mastra
32 lines • 1.32 kB
TypeScript
import type { MastraPackageInfo } from './mastra-packages.js';
export interface PeerDepMismatch {
package: string;
packageVersion: string;
peerDep: string;
requiredRange: string;
installedVersion: string;
}
/**
* Checks if the installed versions of @mastra packages satisfy each other's peer dependency requirements.
* Returns a list of mismatches that should be warned about.
*
* Set MASTRA_SKIP_PEERDEP_CHECK=1 to skip this check.
*/
export declare function checkMastraPeerDeps(packages: MastraPackageInfo[]): Promise<PeerDepMismatch[]>;
/**
* Detects the package manager being used in the project.
*/
export declare function detectPackageManager(): 'pnpm' | 'npm' | 'yarn';
/**
* Returns the command to update mismatched packages, or null if no mismatches.
*
* - If peer dep is BELOW the required range → upgrade the peer dep (e.g., @mastra/core)
* - If peer dep is ABOVE the required range → upgrade the package requiring it (e.g., @mastra/libsql)
*/
export declare function getUpdateCommand(mismatches: PeerDepMismatch[]): string | null;
/**
* Logs warnings for any peer dependency mismatches found.
* Returns true if any mismatches were found.
*/
export declare function logPeerDepWarnings(mismatches: PeerDepMismatch[]): boolean;
//# sourceMappingURL=check-peer-deps.d.ts.map