@rushstack/heft
Version:
Build all your JavaScript projects the same way: A way that works.
85 lines • 2.76 kB
TypeScript
import { type IPackageJson } from '@rushstack/node-core-library';
import { type ITerminalProvider, type ITerminal } from '@rushstack/terminal';
import { type IRigConfig } from '@rushstack/rig-package';
import { type IRigPackageResolver } from './RigPackageResolver';
/**
* @internal
*/
export interface IHeftConfigurationInitializationOptions {
/**
* The working directory the tool was executed in.
*/
cwd: string;
/**
* Terminal instance to facilitate logging.
*/
terminalProvider: ITerminalProvider;
}
/**
* @public
*/
export declare class HeftConfiguration {
private _buildFolderPath;
private _slashNormalizedBuildFolderPath;
private _projectConfigFolderPath;
private _tempFolderPath;
private _rigConfig;
private _globalTerminal;
private _terminalProvider;
private _rigPackageResolver;
/**
* Project build folder path. This is the folder containing the project's package.json file.
*/
get buildFolderPath(): string;
/**
* {@link HeftConfiguration.buildFolderPath} with all path separators converted to forward slashes.
*/
get slashNormalizedBuildFolderPath(): string;
/**
* The path to the project's "config" folder.
*/
get projectConfigFolderPath(): string;
/**
* The project's temporary folder.
*
* @remarks This folder exists at \<project root\>/temp. In general, this folder is used to store temporary
* output from tasks under task-specific subfolders, and is not intended to be directly written to.
* Instead, plugins should write to the directory provided by HeftTaskSession.taskTempFolderPath
*/
get tempFolderPath(): string;
/**
* The rig.json configuration for this project, if present.
*/
get rigConfig(): IRigConfig;
/**
* The rig package resolver, which can be used to rig-resolve a requested package.
*/
get rigPackageResolver(): IRigPackageResolver;
/**
* Terminal instance to facilitate logging.
*/
get globalTerminal(): ITerminal;
/**
* Terminal provider for the provided terminal.
*/
get terminalProvider(): ITerminalProvider;
/**
* The Heft tool's package.json
*/
get heftPackageJson(): IPackageJson;
/**
* The package.json of the project being built
*/
get projectPackageJson(): IPackageJson;
private constructor();
/**
* Performs the search for rig.json and initializes the `HeftConfiguration.rigConfig` object.
* @internal
*/
_checkForRigAsync(): Promise<void>;
/**
* @internal
*/
static initialize(options: IHeftConfigurationInitializationOptions): HeftConfiguration;
}
//# sourceMappingURL=HeftConfiguration.d.ts.map