import { CoreModels } from 'tnp-core';
import { PackageJson as PackageJsonBase } from 'type-fest';
import { BaseJsonFileReader, BaseJsonFileReaderOptions } from './base-json-file-reader';
export type PackageJson = PackageJsonBase & {
    lastBuildTagHash?: string;
    publisher?: string;
    displayName?: string;
};
export type PackageJsonDependencyObj = 'dependencies' | 'devDependencies' | 'peerDependencies' | 'resolutions';
export declare const PackageJsonDependencyObjArr: PackageJsonDependencyObj[];
export declare class BasePackageJson extends BaseJsonFileReader<PackageJson> {
    constructor(options: Omit<BaseJsonFileReaderOptions<PackageJson>, 'fileName'>);
    /**
     * 'dependencies'
     * 'devDependencies'
     * 'peerDependencies'
     * 'resolutions';
     * and whatever is in package.json to npm install
     */
    get dependenciesTypesArray(): PackageJsonDependencyObj[];
    get name(): string;
    get exists(): boolean;
    setName(name: string): Promise<void>;
    /**
     * devDependencies dependencies
     */
    get devDependencies(): PackageJson['devDependencies'];
    /**
     * resolutions dependencies
     */
    get resolutions(): PackageJson['resolutions'];
    /**
     * npm dependencies from package.json
     */
    get dependencies(): PackageJson['dependencies'];
    get optionalDependencies(): PackageJson['optionalDependencies'];
    get description(): string;
    get displayName(): string;
    get license(): string;
    get publisher(): string;
    get contributes(): PackageJson['contributes'];
    get repository(): PackageJson['repository'];
    setRepository(repository: PackageJson['repository']): void;
    /**
     * set the WHOLE dependencies object
     * THIS WILL NOT MERGE -> IT WILL REPLACE WHOLE DEPENDENCIES OBJECT
     */
    setDependencies(dependencies: PackageJson['dependencies']): void;
    /**
     * set the WHOLE dependencies object
     * THIS WILL NOT MERGE -> IT WILL REPLACE WHOLE DEPENDENCIES OBJECT
     */
    setDevDependencies(devDependencies: PackageJson['devDependencies']): void;
    /**
     * peerDependencies dependencies
     */
    get peerDependencies(): PackageJson['peerDependencies'];
    /**
     * set the WHOLE peerDependencies object
     * THIS WILL NOT MERGE -> IT WILL REPLACE WHOLE PEER DEPENDENCIES OBJECT
     */
    setPeerDependencies(peerDependencies: PackageJson['peerDependencies']): void;
    setOptionalDependencies(optionalDependencies: PackageJson['optionalDependencies']): void;
    removeDevDependencies(): void;
    /**
     * @returns object witl all deps from current project package json
     */
    get allDependencies(): {
        [packageName: string]: string;
    };
    /**
     * @returns object witl all deps from package json
     */
    allDepsFromPackageJson(packageJson: PackageJson): any;
    /**
     * version from package.json -> property version
     */
    get version(): string;
    setVersion(version: string): void;
    /**
     * bin with cli config from package.json
     */
    get bin(): Partial<Record<string, string>>;
    set bin(value: Partial<Record<string, string>>);
    get engines(): PackageJson['engines'];
    setEngines(engines: PackageJson['engines']): Promise<void>;
    get homepage(): PackageJson['homepage'];
    setHomepage(homepage: PackageJson['homepage']): Promise<void>;
    get versionWithPatchPlusOne(): string;
    get versionWithMinorPlusOneAndPatchZero(): string;
    get versionWithMajorPlusOneAndMinorZeroAndPatchZero(): string;
    get versionPathAsNumber(): number;
    /**
     * Major Version from package.json
     */
    get majorVersion(): number;
    /**
     * Minor Version from package.json
     */
    get minorVersion(): number;
    /**
     * @deprecated TODO not usefull ?
     */
    getVersionAsNumber(releaseType: CoreModels.ReleaseVersionType): number;
    bumpPatchVersion(): Promise<void>;
    getBumpedVersionFor(releaseType: CoreModels.ReleaseVersionType): string;
    getBumpedOrCurrentVersionFor(releaseType?: CoreModels.ReleaseVersionType): string;
    updateDepsFrom(locations: string[]): void;
    /**
     * this will NOT SET dependency if
     * dependency name is not in package.json
     */
    updateDependency({ packageName, version, createNewEntryIfNotExist, }: {
        packageName: string;
        version: string | null;
        createNewEntryIfNotExist?: boolean;
    }): void;
    get isPrivate(): boolean;
    setIsPrivate(value: boolean): void;
    get sideEffects(): boolean;
    setMainProperty(main: string, purpose?: string): Promise<void>;
    setBuildHash(hash: string): void;
    getBuildHash(): string;
    copyTo(location: string | string[]): void;
}