UNPKG

@storm-software/workspace-tools

Version:

Tools for managing a Storm workspace, including various Nx generators and executors for common development tasks.

25 lines (22 loc) 1.05 kB
import { ProjectConfiguration } from '@nx/devkit'; import { CargoToml } from '@storm-software/config-tools/utilities/toml'; import { PackageJson } from 'nx/src/utils/package-json.js'; type PackageManagerType = "package.json" | "Cargo.toml"; declare const PackageManagerTypes: { PackageJson: PackageManagerType; CargoToml: PackageManagerType; }; type PackageInfo = { content: PackageJson | CargoToml; type: PackageManagerType; }; declare const getPackageInfo: (project: ProjectConfiguration) => null | PackageInfo; /** * Adds the current git HEAD commit hash to the package.json file at the specified path. * * @param filePath - The path to the package.json file. * @returns A promise that resolves when the file has been updated. * @throws Will throw an error if no file path is provided or if the file cannot be read or written. */ declare function addPackageJsonGitHead(packageRoot: string): Promise<void>; export { type PackageInfo, type PackageManagerType, PackageManagerTypes, addPackageJsonGitHead, getPackageInfo };