@rushstack/rush-sdk 5.97.0 → 5.97.1-pr3481.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rush-lib.d.ts +425 -29
- package/lib/api/CobuildConfiguration.d.ts +63 -0
- package/lib/api/CobuildConfiguration.js +1 -0
- package/lib/api/EnvironmentConfiguration.d.ts +41 -0
- package/lib/api/ExperimentsConfiguration.d.ts +5 -0
- package/lib/api/LastInstallFlag.d.ts +58 -21
- package/lib/api/LastLinkFlag.d.ts +3 -7
- package/lib/api/RushConfiguration.d.ts +52 -0
- package/lib/api/RushConfigurationProject.d.ts +6 -0
- package/lib/api/base/BaseFlag.d.ts +50 -0
- package/lib/api/base/BaseFlag.js +1 -0
- package/lib/api/packageManager/PnpmPackageManager.d.ts +14 -0
- package/lib/cli/actions/InstallAction.d.ts +7 -0
- package/lib/cli/actions/ListAction.d.ts +4 -0
- package/lib/cli/actions/UpdateAction.d.ts +7 -0
- package/lib/cli/parsing/SelectionParameterSet.d.ts +17 -3
- package/lib/index.d.ts +5 -2
- package/lib/logic/PurgeManager.d.ts +1 -0
- package/lib/logic/RushConstants.d.ts +15 -0
- package/lib/logic/base/BaseInstallManagerTypes.d.ts +23 -0
- package/lib/logic/buildCache/ProjectBuildCache.d.ts +5 -4
- package/lib/logic/cobuild/CobuildLock.d.ts +24 -0
- package/lib/logic/cobuild/CobuildLock.js +1 -0
- package/lib/logic/cobuild/ICobuildLockProvider.d.ts +46 -0
- package/lib/logic/cobuild/ICobuildLockProvider.js +1 -0
- package/lib/logic/installManager/InstallHelpers.d.ts +1 -0
- package/lib/logic/operations/AsyncOperationQueue.d.ts +23 -4
- package/lib/logic/operations/CacheableOperationPlugin.d.ts +21 -0
- package/lib/logic/operations/CacheableOperationPlugin.js +1 -0
- package/lib/logic/operations/IOperationRunner.d.ts +29 -10
- package/lib/logic/operations/OperationExecutionManager.d.ts +5 -0
- package/lib/logic/operations/OperationExecutionRecord.d.ts +7 -1
- package/lib/logic/operations/OperationRunnerHooks.d.ts +50 -0
- package/lib/logic/operations/OperationRunnerHooks.js +1 -0
- package/lib/logic/operations/OperationStatus.d.ts +8 -0
- package/lib/logic/operations/PeriodicCallback.d.ts +20 -0
- package/lib/logic/operations/PeriodicCallback.js +1 -0
- package/lib/logic/operations/ShellOperationRunner.d.ts +4 -13
- package/lib/logic/pnpm/IPnpmfile.d.ts +16 -0
- package/lib/logic/pnpm/PnpmProjectShrinkwrapFile.d.ts +7 -0
- package/lib/logic/pnpm/PnpmShrinkwrapFile.d.ts +26 -0
- package/lib/logic/pnpm/SplitWorkspaceGlobalPnpmfileShim.d.ts +3 -0
- package/lib/logic/pnpm/SplitWorkspaceGlobalPnpmfileShim.js +1 -0
- package/lib/logic/pnpm/SplitWorkspacePnpmfileConfiguration.d.ts +23 -0
- package/lib/logic/pnpm/SplitWorkspacePnpmfileConfiguration.js +1 -0
- package/lib/logic/selectors/SplitWorkspaceProjectSelectorParser.d.ts +10 -0
- package/lib/logic/selectors/SplitWorkspaceProjectSelectorParser.js +1 -0
- package/lib/logic/versionMismatch/VersionMismatchFinderProject.d.ts +2 -0
- package/lib/pluginFramework/PhasedCommandHooks.d.ts +15 -1
- package/lib/pluginFramework/RushSession.d.ts +11 -2
- package/lib/utilities/PathConstants.d.ts +1 -0
- package/lib/utilities/npmrcUtilities.d.ts +1 -1
- package/package.json +2 -2
package/dist/rush-lib.d.ts
CHANGED
|
@@ -131,6 +131,55 @@ export declare class ApprovedPackagesPolicy {
|
|
|
131
131
|
constructor(rushConfiguration: RushConfiguration, rushConfigurationJson: IRushConfigurationJson);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
/**
|
|
135
|
+
* A base class for flag file.
|
|
136
|
+
* @internal
|
|
137
|
+
*/
|
|
138
|
+
export declare class _BaseFlag<T extends object = JsonObject> {
|
|
139
|
+
/**
|
|
140
|
+
* Flag file path
|
|
141
|
+
*/
|
|
142
|
+
readonly path: string;
|
|
143
|
+
/**
|
|
144
|
+
* Content of the flag
|
|
145
|
+
*/
|
|
146
|
+
protected _state: T;
|
|
147
|
+
/**
|
|
148
|
+
* Whether the current state is modified
|
|
149
|
+
*/
|
|
150
|
+
protected _isModified: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* Creates a new flag file
|
|
153
|
+
* @param folderPath - the folder that this flag is managing
|
|
154
|
+
* @param state - optional, the state that should be managed or compared
|
|
155
|
+
*/
|
|
156
|
+
constructor(folderPath: string, state?: Partial<T>);
|
|
157
|
+
/**
|
|
158
|
+
* Returns true if the file exists and the contents match the current state.
|
|
159
|
+
*/
|
|
160
|
+
isValid(): boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Writes the flag file to disk with the current state
|
|
163
|
+
*/
|
|
164
|
+
create(): void;
|
|
165
|
+
/**
|
|
166
|
+
* Merge new data into current state by lodash "merge"
|
|
167
|
+
*/
|
|
168
|
+
mergeFromObject(data: JsonObject): void;
|
|
169
|
+
/**
|
|
170
|
+
* Writes the flag file to disk with the current state if modified
|
|
171
|
+
*/
|
|
172
|
+
saveIfModified(): void;
|
|
173
|
+
/**
|
|
174
|
+
* Removes the flag file
|
|
175
|
+
*/
|
|
176
|
+
clear(): void;
|
|
177
|
+
/**
|
|
178
|
+
* Returns Name of the flag file
|
|
179
|
+
*/
|
|
180
|
+
protected get flagName(): string;
|
|
181
|
+
}
|
|
182
|
+
|
|
134
183
|
/**
|
|
135
184
|
* Use this class to load and save the "common/config/rush/build-cache.json" config file.
|
|
136
185
|
* This file provides configuration options for cached project build output.
|
|
@@ -210,6 +259,55 @@ export declare class ChangeManager {
|
|
|
210
259
|
*/
|
|
211
260
|
export declare type CloudBuildCacheProviderFactory = (buildCacheJson: IBuildCacheJson) => ICloudBuildCacheProvider;
|
|
212
261
|
|
|
262
|
+
/**
|
|
263
|
+
* Use this class to load and save the "common/config/rush/cobuild.json" config file.
|
|
264
|
+
* This file provides configuration options for the Rush Cobuild feature.
|
|
265
|
+
* @beta
|
|
266
|
+
*/
|
|
267
|
+
export declare class CobuildConfiguration {
|
|
268
|
+
private static _jsonSchema;
|
|
269
|
+
/**
|
|
270
|
+
* Indicates whether the cobuild feature is enabled.
|
|
271
|
+
* Typically it is enabled in the cobuild.json config file.
|
|
272
|
+
*
|
|
273
|
+
* Note: The orchestrator (or local users) should always have to opt into running with cobuilds by
|
|
274
|
+
* providing a cobuild context id. Even if cobuilds are "enabled" as a feature, they don't
|
|
275
|
+
* actually turn on for that particular build unless the cobuild context id is provided as an
|
|
276
|
+
* non-empty string.
|
|
277
|
+
*/
|
|
278
|
+
readonly cobuildEnabled: boolean;
|
|
279
|
+
/**
|
|
280
|
+
* Cobuild context id
|
|
281
|
+
*
|
|
282
|
+
* @remarks
|
|
283
|
+
* The cobuild feature won't be enabled until the context id is provided as an non-empty string.
|
|
284
|
+
*/
|
|
285
|
+
readonly cobuildContextId: string | undefined;
|
|
286
|
+
/**
|
|
287
|
+
* If true, Rush will automatically handle the leaf project with build cache "disabled" by writing
|
|
288
|
+
* to the cache in a special "log files only mode". This is useful when you want to use Cobuilds
|
|
289
|
+
* to improve the performance in CI validations and the leaf projects have not enabled cache.
|
|
290
|
+
*/
|
|
291
|
+
readonly cobuildLeafProjectLogOnlyAllowed: boolean;
|
|
292
|
+
readonly cobuildLockProvider: ICobuildLockProvider;
|
|
293
|
+
private constructor();
|
|
294
|
+
/**
|
|
295
|
+
* Attempts to load the cobuild.json data from the standard file path `common/config/rush/cobuild.json`.
|
|
296
|
+
* If the file has not been created yet, then undefined is returned.
|
|
297
|
+
*/
|
|
298
|
+
static tryLoadAsync(terminal: ITerminal, rushConfiguration: RushConfiguration, rushSession: RushSession): Promise<CobuildConfiguration | undefined>;
|
|
299
|
+
static getCobuildConfigFilePath(rushConfiguration: RushConfiguration): string;
|
|
300
|
+
private static _loadAsync;
|
|
301
|
+
get contextId(): string | undefined;
|
|
302
|
+
connectLockProviderAsync(): Promise<void>;
|
|
303
|
+
disconnectLockProviderAsync(): Promise<void>;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* @beta
|
|
308
|
+
*/
|
|
309
|
+
export declare type CobuildLockProviderFactory = (cobuildJson: ICobuildJson) => ICobuildLockProvider;
|
|
310
|
+
|
|
213
311
|
/**
|
|
214
312
|
* Use this class to load and save the "common/config/rush/common-versions.json" config file.
|
|
215
313
|
* This config file stores dependency version information that affects all projects in the repo.
|
|
@@ -339,6 +437,9 @@ export declare class EnvironmentConfiguration {
|
|
|
339
437
|
private static _buildCacheCredential;
|
|
340
438
|
private static _buildCacheEnabled;
|
|
341
439
|
private static _buildCacheWriteAllowed;
|
|
440
|
+
private static _cobuildEnabled;
|
|
441
|
+
private static _cobuildContextId;
|
|
442
|
+
private static _cobuildLeafProjectLogOnlyAllowed;
|
|
342
443
|
private static _gitBinaryPath;
|
|
343
444
|
private static _tarBinaryPath;
|
|
344
445
|
/**
|
|
@@ -394,6 +495,21 @@ export declare class EnvironmentConfiguration {
|
|
|
394
495
|
* See {@link EnvironmentVariableNames.RUSH_BUILD_CACHE_WRITE_ALLOWED}
|
|
395
496
|
*/
|
|
396
497
|
static get buildCacheWriteAllowed(): boolean | undefined;
|
|
498
|
+
/**
|
|
499
|
+
* If set, enables or disables the cobuild feature.
|
|
500
|
+
* See {@link EnvironmentVariableNames.RUSH_COBUILD_ENABLED}
|
|
501
|
+
*/
|
|
502
|
+
static get cobuildEnabled(): boolean | undefined;
|
|
503
|
+
/**
|
|
504
|
+
* Provides a determined cobuild context id if configured
|
|
505
|
+
* See {@link EnvironmentVariableNames.RUSH_COBUILD_CONTEXT_ID}
|
|
506
|
+
*/
|
|
507
|
+
static get cobuildContextId(): string | undefined;
|
|
508
|
+
/**
|
|
509
|
+
* If set, enables or disables the cobuild leaf project log only feature.
|
|
510
|
+
* See {@link EnvironmentVariableNames.RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED}
|
|
511
|
+
*/
|
|
512
|
+
static get cobuildLeafProjectLogOnlyAllowed(): boolean | undefined;
|
|
397
513
|
/**
|
|
398
514
|
* Allows the git binary path to be explicitly provided.
|
|
399
515
|
* See {@link EnvironmentVariableNames.RUSH_GIT_BINARY_PATH}
|
|
@@ -551,6 +667,29 @@ export declare const EnvironmentVariableNames: {
|
|
|
551
667
|
* this environment variable is ignored.
|
|
552
668
|
*/
|
|
553
669
|
readonly RUSH_BUILD_CACHE_WRITE_ALLOWED: "RUSH_BUILD_CACHE_WRITE_ALLOWED";
|
|
670
|
+
/**
|
|
671
|
+
* Setting this environment variable overrides the value of `cobuildEnabled` in the `cobuild.json`
|
|
672
|
+
* configuration file.
|
|
673
|
+
*
|
|
674
|
+
* @remarks
|
|
675
|
+
* Specify `1` to enable the cobuild or `0` to disable it.
|
|
676
|
+
*
|
|
677
|
+
* If there is no cobuild configured, then this environment variable is ignored.
|
|
678
|
+
*/
|
|
679
|
+
readonly RUSH_COBUILD_ENABLED: "RUSH_COBUILD_ENABLED";
|
|
680
|
+
/**
|
|
681
|
+
* Setting this environment variable opt into running with cobuilds.
|
|
682
|
+
*
|
|
683
|
+
* @remarks
|
|
684
|
+
* If there is no cobuild configured, then this environment variable is ignored.
|
|
685
|
+
*/
|
|
686
|
+
readonly RUSH_COBUILD_CONTEXT_ID: "RUSH_COBUILD_CONTEXT_ID";
|
|
687
|
+
/**
|
|
688
|
+
* If this variable is set to "1", When getting distributed builds, Rush will automatically handle the leaf project
|
|
689
|
+
* with build cache "disabled" by writing to the cache in a special "log files only mode". This is useful when you
|
|
690
|
+
* want to use Cobuilds to improve the performance in CI validations and the leaf projects have not enabled cache.
|
|
691
|
+
*/
|
|
692
|
+
readonly RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED: "RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED";
|
|
554
693
|
/**
|
|
555
694
|
* Explicitly specifies the path for the Git binary that is invoked by certain Rush operations.
|
|
556
695
|
*/
|
|
@@ -714,6 +853,61 @@ export declare interface ICloudBuildCacheProvider {
|
|
|
714
853
|
deleteCachedCredentialsAsync(terminal: ITerminal): Promise<void>;
|
|
715
854
|
}
|
|
716
855
|
|
|
856
|
+
/**
|
|
857
|
+
* @beta
|
|
858
|
+
*/
|
|
859
|
+
export declare interface ICobuildCompletedState {
|
|
860
|
+
status: OperationStatus.Success | OperationStatus.SuccessWithWarning | OperationStatus.Failure;
|
|
861
|
+
/**
|
|
862
|
+
* Completed state points to the cache id that was used to store the build cache.
|
|
863
|
+
* Note: Cache failed builds in a separate cache id
|
|
864
|
+
*/
|
|
865
|
+
cacheId: string;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* @beta
|
|
870
|
+
*/
|
|
871
|
+
export declare interface ICobuildContext {
|
|
872
|
+
/**
|
|
873
|
+
* The contextId is provided by the monorepo maintainer, it reads from environment variable {@link EnvironmentVariableNames.RUSH_COBUILD_CONTEXT_ID}.
|
|
874
|
+
* It ensure only the builds from the same given contextId cooperated. If user was more permissive,
|
|
875
|
+
* and wanted all PR and CI builds building anything with the same contextId to cooperate, then just
|
|
876
|
+
* set it to a static value.
|
|
877
|
+
*/
|
|
878
|
+
contextId: string;
|
|
879
|
+
/**
|
|
880
|
+
* The id of cache. It should be keep same as the normal cacheId from ProjectBuildCache.
|
|
881
|
+
* Otherwise, there is a discrepancy in the success case then turning on cobuilds will
|
|
882
|
+
* fail to populate the normal build cache.
|
|
883
|
+
*/
|
|
884
|
+
cacheId: string;
|
|
885
|
+
/**
|
|
886
|
+
* {@inheritdoc RushConstants.cobuildLockVersion}
|
|
887
|
+
*/
|
|
888
|
+
version: number;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* @beta
|
|
893
|
+
*/
|
|
894
|
+
export declare interface ICobuildJson {
|
|
895
|
+
cobuildEnabled: boolean;
|
|
896
|
+
cobuildLockProvider: string;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* @beta
|
|
901
|
+
*/
|
|
902
|
+
export declare interface ICobuildLockProvider {
|
|
903
|
+
connectAsync(): Promise<void>;
|
|
904
|
+
disconnectAsync(): Promise<void>;
|
|
905
|
+
acquireLockAsync(context: ICobuildContext): Promise<boolean>;
|
|
906
|
+
renewLockAsync(context: ICobuildContext): Promise<void>;
|
|
907
|
+
setCompletedStateAsync(context: ICobuildContext, state: ICobuildCompletedState): Promise<void>;
|
|
908
|
+
getCompletedStateAsync(context: ICobuildContext): Promise<ICobuildCompletedState | undefined>;
|
|
909
|
+
}
|
|
910
|
+
|
|
717
911
|
/**
|
|
718
912
|
* A collection of environment variables
|
|
719
913
|
* @public
|
|
@@ -751,6 +945,10 @@ export declare interface ICreateOperationsContext {
|
|
|
751
945
|
* The configuration for the build cache, if the feature is enabled.
|
|
752
946
|
*/
|
|
753
947
|
readonly buildCacheConfiguration: BuildCacheConfiguration | undefined;
|
|
948
|
+
/**
|
|
949
|
+
* The configuration for the cobuild, if cobuild feature and build cache feature are both enabled.
|
|
950
|
+
*/
|
|
951
|
+
readonly cobuildConfiguration: CobuildConfiguration | undefined;
|
|
754
952
|
/**
|
|
755
953
|
* The set of custom parameters for the executing command.
|
|
756
954
|
* Maps from the `longName` field in command-line.json to the parser configuration in ts-command-line.
|
|
@@ -887,6 +1085,11 @@ export declare interface IExperimentsJson {
|
|
|
887
1085
|
* in common/config/rush/command-line.json.
|
|
888
1086
|
*/
|
|
889
1087
|
phasedCommands?: boolean;
|
|
1088
|
+
/**
|
|
1089
|
+
* If true, rush install or rush update implicitly specify --ignore-scripts during pnpm install,
|
|
1090
|
+
* and run install lifecycle scripts by pnpm rebuild --pending after pnpm install successfully.
|
|
1091
|
+
*/
|
|
1092
|
+
deferredInstallationScripts?: boolean;
|
|
890
1093
|
/**
|
|
891
1094
|
* If true, perform a clean install after when running `rush install` or `rush update` if the
|
|
892
1095
|
* `.npmrc` file has changed since the last install.
|
|
@@ -962,6 +1165,51 @@ declare interface IIndividualVersionJson extends IVersionPolicyJson {
|
|
|
962
1165
|
lockedMajor?: number;
|
|
963
1166
|
}
|
|
964
1167
|
|
|
1168
|
+
/**
|
|
1169
|
+
* This represents the JSON data structure for the "last-install.flag" file.
|
|
1170
|
+
* @internal
|
|
1171
|
+
*/
|
|
1172
|
+
export declare interface _ILastInstallFlagJson {
|
|
1173
|
+
/**
|
|
1174
|
+
* Current node version
|
|
1175
|
+
*/
|
|
1176
|
+
node: string;
|
|
1177
|
+
/**
|
|
1178
|
+
* Current package manager name
|
|
1179
|
+
*/
|
|
1180
|
+
packageManager: PackageManagerName;
|
|
1181
|
+
/**
|
|
1182
|
+
* Current package manager version
|
|
1183
|
+
*/
|
|
1184
|
+
packageManagerVersion: string;
|
|
1185
|
+
/**
|
|
1186
|
+
* Current rush json folder
|
|
1187
|
+
*/
|
|
1188
|
+
rushJsonFolder: string;
|
|
1189
|
+
/**
|
|
1190
|
+
* The content of package.json, used in the flag file of autoinstaller
|
|
1191
|
+
*/
|
|
1192
|
+
packageJson?: IPackageJson;
|
|
1193
|
+
/**
|
|
1194
|
+
* Same with pnpmOptions.pnpmStorePath in rush.json
|
|
1195
|
+
*/
|
|
1196
|
+
storePath?: string;
|
|
1197
|
+
/**
|
|
1198
|
+
* True when "useWorkspaces" is true in rush.json
|
|
1199
|
+
*/
|
|
1200
|
+
workspaces?: true;
|
|
1201
|
+
/**
|
|
1202
|
+
* True when user explicitly specify "--ignore-scripts" CLI parameter or deferredInstallationScripts
|
|
1203
|
+
*/
|
|
1204
|
+
ignoreScripts?: true;
|
|
1205
|
+
/**
|
|
1206
|
+
* When specified, it is a list of selected projects during partial install
|
|
1207
|
+
* It is undefined when full install
|
|
1208
|
+
*/
|
|
1209
|
+
selectedProjectNames?: string[];
|
|
1210
|
+
[key: string]: unknown;
|
|
1211
|
+
}
|
|
1212
|
+
|
|
965
1213
|
/**
|
|
966
1214
|
* Options to pass to the rush "launch" functions.
|
|
967
1215
|
*
|
|
@@ -1157,10 +1405,6 @@ export declare interface IOperationRunner {
|
|
|
1157
1405
|
* Name of the operation, for logging.
|
|
1158
1406
|
*/
|
|
1159
1407
|
readonly name: string;
|
|
1160
|
-
/**
|
|
1161
|
-
* This flag determines if the operation is allowed to be skipped if up to date.
|
|
1162
|
-
*/
|
|
1163
|
-
isSkipAllowed: boolean;
|
|
1164
1408
|
/**
|
|
1165
1409
|
* Indicates that this runner's duration has meaning.
|
|
1166
1410
|
*/
|
|
@@ -1174,10 +1418,6 @@ export declare interface IOperationRunner {
|
|
|
1174
1418
|
* exit code
|
|
1175
1419
|
*/
|
|
1176
1420
|
warningsAreAllowed: boolean;
|
|
1177
|
-
/**
|
|
1178
|
-
* Indicates if the output of this operation may be written to the cache
|
|
1179
|
-
*/
|
|
1180
|
-
isCacheWriteAllowed: boolean;
|
|
1181
1421
|
/**
|
|
1182
1422
|
* Method to be executed for the operation.
|
|
1183
1423
|
*/
|
|
@@ -1215,7 +1455,34 @@ export declare interface IOperationRunnerContext {
|
|
|
1215
1455
|
/**
|
|
1216
1456
|
* Object used to track elapsed time.
|
|
1217
1457
|
*/
|
|
1218
|
-
stopwatch:
|
|
1458
|
+
stopwatch: Stopwatch;
|
|
1459
|
+
/**
|
|
1460
|
+
* The current execution status of an operation. Operations start in the 'ready' state,
|
|
1461
|
+
* but can be 'blocked' if an upstream operation failed. It is 'executing' when
|
|
1462
|
+
* the operation is executing. Once execution is complete, it is either 'success' or
|
|
1463
|
+
* 'failure'.
|
|
1464
|
+
*/
|
|
1465
|
+
status: OperationStatus;
|
|
1466
|
+
/**
|
|
1467
|
+
* Error which occurred while executing this operation, this is stored in case we need
|
|
1468
|
+
* it later (for example to re-print errors at end of execution).
|
|
1469
|
+
*/
|
|
1470
|
+
error?: Error;
|
|
1471
|
+
/**
|
|
1472
|
+
* The set of operations that depend on this operation.
|
|
1473
|
+
*/
|
|
1474
|
+
readonly consumers: Set<IOperationRunnerContext>;
|
|
1475
|
+
/**
|
|
1476
|
+
* The operation runner that is executing this operation.
|
|
1477
|
+
*/
|
|
1478
|
+
readonly runner: IOperationRunner;
|
|
1479
|
+
/**
|
|
1480
|
+
* Normally the incremental build logic will rebuild changed projects as well as
|
|
1481
|
+
* any projects that directly or indirectly depend on a changed project.
|
|
1482
|
+
* If true, then the incremental build logic will only rebuild changed projects and
|
|
1483
|
+
* ignore dependent projects.
|
|
1484
|
+
*/
|
|
1485
|
+
readonly changedProjectsOnly: boolean;
|
|
1219
1486
|
}
|
|
1220
1487
|
|
|
1221
1488
|
/**
|
|
@@ -1456,6 +1723,7 @@ declare interface IRushConfigurationProjectJson {
|
|
|
1456
1723
|
skipRushCheck?: boolean;
|
|
1457
1724
|
publishFolder?: string;
|
|
1458
1725
|
tags?: string[];
|
|
1726
|
+
splitWorkspace?: boolean;
|
|
1459
1727
|
}
|
|
1460
1728
|
|
|
1461
1729
|
/**
|
|
@@ -1480,6 +1748,16 @@ declare interface IRushConfigurationProjectOptions {
|
|
|
1480
1748
|
allowedProjectTags: Set<string> | undefined;
|
|
1481
1749
|
}
|
|
1482
1750
|
|
|
1751
|
+
/**
|
|
1752
|
+
* The filter parameters to search from all projects.
|
|
1753
|
+
*/
|
|
1754
|
+
declare interface IRushConfigurationProjectsFilter {
|
|
1755
|
+
/**
|
|
1756
|
+
* If true, filter out projects that specify splitWorkspace as true.
|
|
1757
|
+
*/
|
|
1758
|
+
splitWorkspace: boolean;
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1483
1761
|
/**
|
|
1484
1762
|
* Part of IRushConfigurationJson.
|
|
1485
1763
|
*/
|
|
@@ -1743,19 +2021,9 @@ export declare interface _IYarnOptionsJson extends IPackageManagerOptionsJsonBas
|
|
|
1743
2021
|
* it can invalidate the last install.
|
|
1744
2022
|
* @internal
|
|
1745
2023
|
*/
|
|
1746
|
-
export declare class _LastInstallFlag {
|
|
1747
|
-
private _state;
|
|
1748
|
-
/**
|
|
1749
|
-
* Returns the full path to the flag file
|
|
1750
|
-
*/
|
|
1751
|
-
readonly path: string;
|
|
1752
|
-
/**
|
|
1753
|
-
* Creates a new LastInstall flag
|
|
1754
|
-
* @param folderPath - the folder that this flag is managing
|
|
1755
|
-
* @param state - optional, the state that should be managed or compared
|
|
1756
|
-
*/
|
|
1757
|
-
constructor(folderPath: string, state?: JsonObject);
|
|
2024
|
+
export declare class _LastInstallFlag extends _BaseFlag<_ILastInstallFlagJson> {
|
|
1758
2025
|
/**
|
|
2026
|
+
* @override
|
|
1759
2027
|
* Returns true if the file exists and the contents match the current state.
|
|
1760
2028
|
*/
|
|
1761
2029
|
isValid(options?: _ILockfileValidityCheckOptions): boolean;
|
|
@@ -1769,14 +2037,6 @@ export declare class _LastInstallFlag {
|
|
|
1769
2037
|
rushVerb: string;
|
|
1770
2038
|
}): boolean;
|
|
1771
2039
|
private _isValid;
|
|
1772
|
-
/**
|
|
1773
|
-
* Writes the flag file to disk with the current state
|
|
1774
|
-
*/
|
|
1775
|
-
create(): void;
|
|
1776
|
-
/**
|
|
1777
|
-
* Removes the flag file
|
|
1778
|
-
*/
|
|
1779
|
-
clear(): void;
|
|
1780
2040
|
/**
|
|
1781
2041
|
* Returns the name of the flag file
|
|
1782
2042
|
*/
|
|
@@ -2091,10 +2351,18 @@ export declare enum OperationStatus {
|
|
|
2091
2351
|
* The Operation is on the queue, ready to execute (but may be waiting for dependencies)
|
|
2092
2352
|
*/
|
|
2093
2353
|
Ready = "READY",
|
|
2354
|
+
/**
|
|
2355
|
+
* The Operation is Queued
|
|
2356
|
+
*/
|
|
2357
|
+
Queued = "QUEUED",
|
|
2094
2358
|
/**
|
|
2095
2359
|
* The Operation is currently executing
|
|
2096
2360
|
*/
|
|
2097
2361
|
Executing = "EXECUTING",
|
|
2362
|
+
/**
|
|
2363
|
+
* The Operation is currently executing by a remote process
|
|
2364
|
+
*/
|
|
2365
|
+
RemoteExecuting = "REMOTE EXECUTING",
|
|
2098
2366
|
/**
|
|
2099
2367
|
* The Operation completed successfully and did not write to standard output
|
|
2100
2368
|
*/
|
|
@@ -2264,6 +2532,14 @@ export declare class PhasedCommandHooks {
|
|
|
2264
2532
|
* Hook is series for stable output.
|
|
2265
2533
|
*/
|
|
2266
2534
|
readonly afterExecuteOperations: AsyncSeriesHook<[IExecutionResult, ICreateOperationsContext]>;
|
|
2535
|
+
/**
|
|
2536
|
+
* Hook invoked before executing a operation.
|
|
2537
|
+
*/
|
|
2538
|
+
readonly beforeExecuteOperation: AsyncSeriesHook<[IOperationRunnerContext]>;
|
|
2539
|
+
/**
|
|
2540
|
+
* Hook invoked after executing a operation.
|
|
2541
|
+
*/
|
|
2542
|
+
readonly afterExecuteOperation: AsyncSeriesHook<[IOperationRunnerContext]>;
|
|
2267
2543
|
/**
|
|
2268
2544
|
* Hook invoked after a run has finished and the command is watching for changes.
|
|
2269
2545
|
* May be used to display additional relevant data to the user.
|
|
@@ -2624,6 +2900,8 @@ export declare class RushConfiguration {
|
|
|
2624
2900
|
private _projects;
|
|
2625
2901
|
private _projectsByName;
|
|
2626
2902
|
private _projectsByTag;
|
|
2903
|
+
private _filteredProjectsCache;
|
|
2904
|
+
private _hasSplitWorkspaceProject;
|
|
2627
2905
|
private _commonVersionsConfigurationsByVariant;
|
|
2628
2906
|
/**
|
|
2629
2907
|
* The name of the package manager being used to install dependencies
|
|
@@ -2678,6 +2956,12 @@ export declare class RushConfiguration {
|
|
|
2678
2956
|
* Example: `C:\MyRepo\common\temp`
|
|
2679
2957
|
*/
|
|
2680
2958
|
readonly commonTempFolder: string;
|
|
2959
|
+
/**
|
|
2960
|
+
* The folder where temporary files will be stored. This is always a subfolder called "temp"
|
|
2961
|
+
* under the common folder.
|
|
2962
|
+
* Example: `C:\MyRepo\common\temp-split`
|
|
2963
|
+
*/
|
|
2964
|
+
readonly commonTempSplitFolder: string;
|
|
2681
2965
|
/**
|
|
2682
2966
|
* The folder where automation scripts are stored. This is always a subfolder called "scripts"
|
|
2683
2967
|
* under the common folder.
|
|
@@ -2732,6 +3016,21 @@ export declare class RushConfiguration {
|
|
|
2732
3016
|
* or `C:\MyRepo\common\temp\pnpm-lock-preinstall.yaml`
|
|
2733
3017
|
*/
|
|
2734
3018
|
readonly tempShrinkwrapPreinstallFilename: string;
|
|
3019
|
+
/**
|
|
3020
|
+
* The filename (without any path) of the shrinkwrap file for split workspace that is used by the package manager.
|
|
3021
|
+
* @remarks
|
|
3022
|
+
* This property merely reports the filename; the file itself may not actually exist.
|
|
3023
|
+
* Example: `pnpm-lock.yaml`
|
|
3024
|
+
*/
|
|
3025
|
+
readonly splitWorkspaceShrinkwrapFilename: string;
|
|
3026
|
+
/**
|
|
3027
|
+
* The full path of the temporary shrinkwrap file for split workspace that is used during
|
|
3028
|
+
* "rush install". This file may get rewritten by the package manager during installation.
|
|
3029
|
+
* @remarks
|
|
3030
|
+
* This property merely reports the filename; the file itself may not actually exist.
|
|
3031
|
+
* Example: `C:\MyRepo\common\temp-split\pnpm-lock.yaml`
|
|
3032
|
+
*/
|
|
3033
|
+
readonly tempSplitWorkspaceShrinkwrapFilename: string;
|
|
2735
3034
|
/**
|
|
2736
3035
|
* The filename of the variant dependency data file. By default this is
|
|
2737
3036
|
* called 'current-variant.json' resides in the Rush common folder.
|
|
@@ -2987,6 +3286,11 @@ export declare class RushConfiguration {
|
|
|
2987
3286
|
* @beta
|
|
2988
3287
|
*/
|
|
2989
3288
|
get projectsByTag(): ReadonlyMap<string, ReadonlySet<RushConfigurationProject>>;
|
|
3289
|
+
/**
|
|
3290
|
+
* Search for projects according to filter
|
|
3291
|
+
* @beta
|
|
3292
|
+
*/
|
|
3293
|
+
getFilteredProjects(filter: IRushConfigurationProjectsFilter): RushConfigurationProject[];
|
|
2990
3294
|
/**
|
|
2991
3295
|
* Settings from the common-versions.json config file.
|
|
2992
3296
|
* @remarks
|
|
@@ -3005,6 +3309,10 @@ export declare class RushConfiguration {
|
|
|
3005
3309
|
* or "rush update".
|
|
3006
3310
|
*/
|
|
3007
3311
|
get currentInstalledVariant(): string | undefined;
|
|
3312
|
+
/**
|
|
3313
|
+
* Is there any split workspace project.
|
|
3314
|
+
*/
|
|
3315
|
+
get hasSplitWorkspaceProject(): boolean;
|
|
3008
3316
|
/**
|
|
3009
3317
|
* Gets the path to the common-versions.json config file for a specific variant.
|
|
3010
3318
|
* @param variant - The name of the current variant in use by the active command.
|
|
@@ -3037,6 +3345,11 @@ export declare class RushConfiguration {
|
|
|
3037
3345
|
* @param variant - The name of the current variant in use by the active command.
|
|
3038
3346
|
*/
|
|
3039
3347
|
getCommittedShrinkwrapFilename(variant?: string | undefined): string;
|
|
3348
|
+
/**
|
|
3349
|
+
* Gets the committed shrinkwrap file name for split workspace.
|
|
3350
|
+
* @param variant - The name of the current variant in use by the active command.
|
|
3351
|
+
*/
|
|
3352
|
+
getCommittedSplitWorkspaceShrinkwrapFilename(): string;
|
|
3040
3353
|
/**
|
|
3041
3354
|
* Gets the absolute path for "pnpmfile.js" for a specific variant.
|
|
3042
3355
|
* @param variant - The name of the current variant in use by the active command.
|
|
@@ -3072,6 +3385,12 @@ export declare class RushConfiguration {
|
|
|
3072
3385
|
*/
|
|
3073
3386
|
tryGetProjectForPath(currentFolderPath: string): RushConfigurationProject | undefined;
|
|
3074
3387
|
private _getVariantConfigFolderPath;
|
|
3388
|
+
/**
|
|
3389
|
+
* Split workspace can only works on PNPM with "useWorkspaces" enabled.
|
|
3390
|
+
* The workspace project can NOT depend on a split workspace project.
|
|
3391
|
+
* The split workspace project CAN depend on a workspace project.
|
|
3392
|
+
*/
|
|
3393
|
+
private _validateSplitWorkspaceRelationships;
|
|
3075
3394
|
}
|
|
3076
3395
|
|
|
3077
3396
|
/**
|
|
@@ -3187,6 +3506,11 @@ export declare class RushConfigurationProject {
|
|
|
3187
3506
|
* @beta
|
|
3188
3507
|
*/
|
|
3189
3508
|
readonly tags: ReadonlySet<string>;
|
|
3509
|
+
/**
|
|
3510
|
+
* Whether this project is a split workspace project.
|
|
3511
|
+
* @beta
|
|
3512
|
+
*/
|
|
3513
|
+
readonly splitWorkspace: boolean;
|
|
3190
3514
|
/** @internal */
|
|
3191
3515
|
constructor(options: IRushConfigurationProjectOptions);
|
|
3192
3516
|
/**
|
|
@@ -3296,6 +3620,12 @@ export declare class RushConstants {
|
|
|
3296
3620
|
* Example: `C:\MyRepo\common\temp`
|
|
3297
3621
|
*/
|
|
3298
3622
|
static readonly rushTempFolderName: string;
|
|
3623
|
+
/**
|
|
3624
|
+
* The folder name ("temp-split") under the common folder, or under the .rush folder in each project's directory where
|
|
3625
|
+
* temporary files will be stored.
|
|
3626
|
+
* Example: `C:\MyRepo\common\temp-split`
|
|
3627
|
+
*/
|
|
3628
|
+
static readonly rushTempSplitFolderName: string;
|
|
3299
3629
|
/**
|
|
3300
3630
|
* The folder name ("projects") where temporary projects will be stored.
|
|
3301
3631
|
* Example: `C:\MyRepo\common\temp\projects`
|
|
@@ -3401,6 +3731,15 @@ export declare class RushConstants {
|
|
|
3401
3731
|
* Changing this ensures that cache entries generated by an old version will no longer register as a cache hit.
|
|
3402
3732
|
*/
|
|
3403
3733
|
static readonly buildCacheVersion: number;
|
|
3734
|
+
/**
|
|
3735
|
+
* Cobuild configuration file.
|
|
3736
|
+
*/
|
|
3737
|
+
static readonly cobuildFilename: string;
|
|
3738
|
+
/**
|
|
3739
|
+
* Cobuild version number, incremented when the logic to create cobuild lock changes.
|
|
3740
|
+
* Changing this ensures that lock generated by an old version will no longer access as a cobuild lock.
|
|
3741
|
+
*/
|
|
3742
|
+
static readonly cobuildLockVersion: number;
|
|
3404
3743
|
/**
|
|
3405
3744
|
* Per-project configuration filename.
|
|
3406
3745
|
*/
|
|
@@ -3566,12 +3905,15 @@ declare class RushPluginsConfiguration {
|
|
|
3566
3905
|
export declare class RushSession {
|
|
3567
3906
|
private readonly _options;
|
|
3568
3907
|
private readonly _cloudBuildCacheProviderFactories;
|
|
3908
|
+
private readonly _cobuildLockProviderFactories;
|
|
3569
3909
|
readonly hooks: RushLifecycleHooks;
|
|
3570
3910
|
constructor(options: IRushSessionOptions);
|
|
3571
3911
|
getLogger(name: string): ILogger;
|
|
3572
3912
|
get terminalProvider(): ITerminalProvider;
|
|
3573
3913
|
registerCloudBuildCacheProviderFactory(cacheProviderName: string, factory: CloudBuildCacheProviderFactory): void;
|
|
3574
3914
|
getCloudBuildCacheProviderFactory(cacheProviderName: string): CloudBuildCacheProviderFactory | undefined;
|
|
3915
|
+
registerCobuildLockProviderFactory(cobuildLockProviderName: string, factory: CobuildLockProviderFactory): void;
|
|
3916
|
+
getCobuildLockProviderFactory(cobuildLockProviderName: string): CobuildLockProviderFactory | undefined;
|
|
3575
3917
|
}
|
|
3576
3918
|
|
|
3577
3919
|
/**
|
|
@@ -3590,6 +3932,60 @@ export declare class RushUserConfiguration {
|
|
|
3590
3932
|
static getRushUserFolderPath(): string;
|
|
3591
3933
|
}
|
|
3592
3934
|
|
|
3935
|
+
/**
|
|
3936
|
+
* Represents a typical timer/stopwatch which keeps track
|
|
3937
|
+
* of elapsed time in between two events.
|
|
3938
|
+
*/
|
|
3939
|
+
declare class Stopwatch implements IStopwatchResult {
|
|
3940
|
+
private _startTime;
|
|
3941
|
+
private _endTime;
|
|
3942
|
+
private _state;
|
|
3943
|
+
private _getTime;
|
|
3944
|
+
constructor(getTime?: () => number);
|
|
3945
|
+
/**
|
|
3946
|
+
* Static helper function which creates a stopwatch which is immediately started
|
|
3947
|
+
*/
|
|
3948
|
+
static start(): Stopwatch;
|
|
3949
|
+
get state(): StopwatchState;
|
|
3950
|
+
/**
|
|
3951
|
+
* Starts the stopwatch. Note that if end() has been called,
|
|
3952
|
+
* reset() should be called before calling start() again.
|
|
3953
|
+
*/
|
|
3954
|
+
start(): Stopwatch;
|
|
3955
|
+
/**
|
|
3956
|
+
* Stops executing the stopwatch and saves the current timestamp
|
|
3957
|
+
*/
|
|
3958
|
+
stop(): Stopwatch;
|
|
3959
|
+
/**
|
|
3960
|
+
* Resets all values of the stopwatch back to the original
|
|
3961
|
+
*/
|
|
3962
|
+
reset(): Stopwatch;
|
|
3963
|
+
/**
|
|
3964
|
+
* Displays how long the stopwatch has been executing in a human readable format.
|
|
3965
|
+
*/
|
|
3966
|
+
toString(): string;
|
|
3967
|
+
/**
|
|
3968
|
+
* Get the duration in seconds.
|
|
3969
|
+
*/
|
|
3970
|
+
get duration(): number;
|
|
3971
|
+
/**
|
|
3972
|
+
* Return the start time of the most recent stopwatch run.
|
|
3973
|
+
*/
|
|
3974
|
+
get startTime(): number | undefined;
|
|
3975
|
+
/**
|
|
3976
|
+
* Return the end time of the most recent stopwatch run.
|
|
3977
|
+
*/
|
|
3978
|
+
get endTime(): number | undefined;
|
|
3979
|
+
}
|
|
3980
|
+
|
|
3981
|
+
/**
|
|
3982
|
+
* Used with the Stopwatch class.
|
|
3983
|
+
*/
|
|
3984
|
+
declare enum StopwatchState {
|
|
3985
|
+
Stopped = 1,
|
|
3986
|
+
Started = 2
|
|
3987
|
+
}
|
|
3988
|
+
|
|
3593
3989
|
declare enum VersionFormatForCommit {
|
|
3594
3990
|
wildcard = "wildcard",
|
|
3595
3991
|
original = "original"
|