import { ProjectConfiguration, Tree } from '@nx/devkit'; import { Assets } from './coerce-assets'; import { UpdateJsonFileOptions } from './json-file'; import { TreeLike } from './tree'; export interface NgPackageJson { $schema?: string; lib?: { entryFile?: string; }; dist?: string; assets?: Assets; allowedNonPeerDependencies?: string[]; } /** * Reads and parses the `ng-package.json` file from a specified project within a workspace tree. * * This function is designed to retrieve the configuration details specific to Angular libraries * from the `ng-package.json` file located in the project's root directory. It ensures that the * file exists before attempting to read it, throwing an error if the file is not found. * * @param {Tree} tree - The abstract representation of the file system within a workspace. * @param {ProjectConfiguration} project - The configuration object for the specific project. * @returns {NgPackageJson} The parsed JSON object from the `ng-package.json` file. * @throws {Error} Throws an error if the `ng-package.json` file does not exist in the project's root directory. */ export declare function ReadNgPackageJson(tree: Tree, project: ProjectConfiguration): NgPackageJson; /** * Writes the Angular package configuration file (`ng-package.json`) to the specified project directory. * * @param tree - The abstract representation of the file tree used for performing file operations. * @param project - The configuration object containing details about the project, including the root directory. * @param ngPackageJson - The JSON object representing the contents to be written to the `ng-package.json` file. */ export declare function WriteNgPackageJson(tree: Tree, project: ProjectConfiguration, ngPackageJson: NgPackageJson): void; export declare function HasNgPackageJson(tree: TreeLike, projectOrRoot: ProjectConfiguration | string): boolean; export interface UpdateNgPackageJsonOptions extends UpdateJsonFileOptions { projectName?: string; project?: { root: string; }; projectRoot?: string; } export declare function UpdateNgPackageJson(tree: Tree, updaterOrJsonFile: NgPackageJson | ((ngPackageJson: NgPackageJson) => void), options: UpdateNgPackageJsonOptions): void; export declare function UpdateNgPackageJson(tree: Tree, updaterOrJsonFile: NgPackageJson | ((ngPackageJson: NgPackageJson) => Promise), options: UpdateNgPackageJsonOptions): Promise; export declare function isNgPackagrProject(tree: TreeLike, project: ProjectConfiguration): boolean;