@monitoro/herd
Version:
Automate your browser, build AI web tools and MCP servers with Monitoro Herd
22 lines (21 loc) • 1.04 kB
TypeScript
/**
* Find package.json by walking up the directory tree from a starting directory
* @param startDir - Directory to start searching from (defaults to current file's directory)
* @returns Path to the found package.json file
* @throws Error if package.json is not found
*/
export declare function findPackageJson(startDir?: string): string;
/**
* Read and parse package.json from the directory tree
* @param startDir - Directory to start searching from (defaults to current file's directory)
* @returns Parsed package.json object
* @throws Error if package.json is not found or cannot be parsed
*/
export declare function readPackageJson(startDir?: string): any;
/**
* Get the version from package.json with fallback
* @param startDir - Directory to start searching from (defaults to current file's directory)
* @param fallbackVersion - Version to use if package.json cannot be read (defaults to '0.0.0')
* @returns Version string
*/
export declare function getPackageVersion(startDir?: string, fallbackVersion?: string): string;