@@ -13,6 +13,7 @@ import {
1313import { RushConfiguration } from '../api/RushConfiguration' ;
1414import { VersionPolicy , LockStepVersionPolicy } from './VersionPolicy' ;
1515import { PackageJsonEditor } from './PackageJsonEditor' ;
16+ import { RushConstants } from '../logic/RushConstants' ;
1617
1718/**
1819 * This represents the JSON data object for a project entry in the rush.json configuration file.
@@ -36,6 +37,7 @@ export class RushConfigurationProject {
3637 private _packageName : string ;
3738 private _projectFolder : string ;
3839 private _projectRelativeFolder : string ;
40+ private _projectRushTempFolder : string ;
3941 private _reviewCategory : string ;
4042 private _packageJson : IPackageJson ;
4143 private _packageJsonEditor : PackageJsonEditor ;
@@ -50,9 +52,11 @@ export class RushConfigurationProject {
5052 private readonly _rushConfiguration : RushConfiguration ;
5153
5254 /** @internal */
53- constructor ( projectJson : IRushConfigurationProjectJson ,
54- rushConfiguration : RushConfiguration ,
55- tempProjectName : string ) {
55+ constructor (
56+ projectJson : IRushConfigurationProjectJson ,
57+ rushConfiguration : RushConfiguration ,
58+ tempProjectName : string
59+ ) {
5660 this . _rushConfiguration = rushConfiguration ;
5761 this . _packageName = projectJson . packageName ;
5862 this . _projectRelativeFolder = projectJson . projectFolder ;
@@ -76,6 +80,12 @@ export class RushConfigurationProject {
7680 throw new Error ( `Project folder not found: ${ projectJson . projectFolder } ` ) ;
7781 }
7882
83+ this . _projectRushTempFolder = path . join (
84+ this . _projectFolder ,
85+ RushConstants . projectRushFolderName ,
86+ RushConstants . rushTempFolderName
87+ ) ;
88+
7989 // Are we using a package review file?
8090 if ( rushConfiguration . approvedPackagesPolicy . enabled ) {
8191 // If so, then every project needs to have a reviewCategory that was defined
@@ -148,6 +158,15 @@ export class RushConfigurationProject {
148158 return this . _projectRelativeFolder ;
149159 }
150160
161+ /**
162+ * The project-specific Rush temp folder. This folder is used to store Rush-specific temporary files.
163+ *
164+ * Example: `C:\MyRepo\libraries\my-project\.rush\temp`
165+ */
166+ public get projectRushTempFolder ( ) : string {
167+ return this . _projectRushTempFolder ;
168+ }
169+
151170 /**
152171 * The review category name, or undefined if no category was assigned.
153172 * This name must be one of the valid choices listed in RushConfiguration.reviewCategories.
0 commit comments