@rushstack/rush-sdk 5.102.0-pr3949.7 → 5.103.0
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 +10 -435
- package/lib/api/EnvironmentConfiguration.d.ts +0 -61
- package/lib/api/RushProjectConfiguration.d.ts +5 -19
- package/lib/index.d.ts +2 -5
- package/lib/logic/RushConstants.d.ts +0 -4
- package/lib/logic/buildCache/ProjectBuildCache.d.ts +7 -6
- package/lib/logic/operations/AsyncOperationQueue.d.ts +4 -23
- package/lib/logic/operations/IOperationExecutionResult.d.ts +1 -9
- package/lib/logic/operations/IOperationRunner.d.ts +6 -25
- package/lib/logic/operations/NullOperationRunner.d.ts +2 -2
- package/lib/logic/operations/OperationExecutionManager.d.ts +0 -6
- package/lib/logic/operations/OperationExecutionRecord.d.ts +1 -19
- package/lib/logic/operations/OperationMetadataManager.d.ts +1 -3
- package/lib/logic/operations/OperationStateFile.d.ts +0 -2
- package/lib/logic/operations/OperationStatus.d.ts +0 -8
- package/lib/logic/operations/ProjectLogWritable.d.ts +0 -11
- package/lib/logic/operations/ShellOperationRunner.d.ts +26 -4
- package/lib/pluginFramework/PhasedCommandHooks.d.ts +4 -31
- package/lib/pluginFramework/RushSession.d.ts +2 -11
- package/package.json +2 -2
- package/lib/api/CobuildConfiguration.d.ts +0 -71
- package/lib/api/CobuildConfiguration.js +0 -1
- package/lib/logic/cobuild/CobuildLock.d.ts +0 -43
- package/lib/logic/cobuild/CobuildLock.js +0 -1
- package/lib/logic/cobuild/DisjointSet.d.ts +0 -28
- package/lib/logic/cobuild/DisjointSet.js +0 -1
- package/lib/logic/cobuild/ICobuildLockProvider.d.ts +0 -99
- package/lib/logic/cobuild/ICobuildLockProvider.js +0 -1
- package/lib/logic/operations/CacheableOperationPlugin.d.ts +0 -51
- package/lib/logic/operations/CacheableOperationPlugin.js +0 -1
- package/lib/logic/operations/LegacySkipPlugin.d.ts +0 -22
- package/lib/logic/operations/LegacySkipPlugin.js +0 -1
- package/lib/logic/operations/PeriodicCallback.d.ts +0 -20
- package/lib/logic/operations/PeriodicCallback.js +0 -1
- package/lib/utilities/NullTerminalProvider.d.ts +0 -10
- package/lib/utilities/NullTerminalProvider.js +0 -1
package/dist/rush-lib.d.ts
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
/// <reference types="node" />
|
|
7
7
|
|
|
8
8
|
import { AsyncParallelHook } from 'tapable';
|
|
9
|
-
import { AsyncSeriesBailHook } from 'tapable';
|
|
10
9
|
import { AsyncSeriesHook } from 'tapable';
|
|
11
10
|
import { AsyncSeriesWaterfallHook } from 'tapable';
|
|
12
11
|
import type { CollatedWriter } from '@rushstack/stream-collator';
|
|
@@ -210,62 +209,6 @@ export declare class ChangeManager {
|
|
|
210
209
|
*/
|
|
211
210
|
export declare type CloudBuildCacheProviderFactory = (buildCacheJson: IBuildCacheJson) => ICloudBuildCacheProvider | Promise<ICloudBuildCacheProvider>;
|
|
212
211
|
|
|
213
|
-
/**
|
|
214
|
-
* Use this class to load and save the "common/config/rush/cobuild.json" config file.
|
|
215
|
-
* This file provides configuration options for the Rush Cobuild feature.
|
|
216
|
-
* @beta
|
|
217
|
-
*/
|
|
218
|
-
export declare class CobuildConfiguration {
|
|
219
|
-
private static _jsonSchema;
|
|
220
|
-
/**
|
|
221
|
-
* Indicates whether the cobuild feature is enabled.
|
|
222
|
-
* Typically it is enabled in the cobuild.json config file.
|
|
223
|
-
*
|
|
224
|
-
* Note: The orchestrator (or local users) should always have to opt into running with cobuilds by
|
|
225
|
-
* providing a cobuild context id. Even if cobuilds are "enabled" as a feature, they don't
|
|
226
|
-
* actually turn on for that particular build unless the cobuild context id is provided as an
|
|
227
|
-
* non-empty string.
|
|
228
|
-
*/
|
|
229
|
-
readonly cobuildEnabled: boolean;
|
|
230
|
-
/**
|
|
231
|
-
* Cobuild context id
|
|
232
|
-
*
|
|
233
|
-
* @remarks
|
|
234
|
-
* The cobuild feature won't be enabled until the context id is provided as an non-empty string.
|
|
235
|
-
*/
|
|
236
|
-
readonly cobuildContextId: string | undefined;
|
|
237
|
-
/**
|
|
238
|
-
* This is a name of the participating cobuild runner. It can be specified by the environment variable
|
|
239
|
-
* RUSH_COBUILD_RUNNER_ID. If it is not provided, a random id will be generated to identify the runner.
|
|
240
|
-
*/
|
|
241
|
-
readonly cobuildRunnerId: string;
|
|
242
|
-
/**
|
|
243
|
-
* If true, Rush will automatically handle the leaf project with build cache "disabled" by writing
|
|
244
|
-
* to the cache in a special "log files only mode". This is useful when you want to use Cobuilds
|
|
245
|
-
* to improve the performance in CI validations and the leaf projects have not enabled cache.
|
|
246
|
-
*/
|
|
247
|
-
readonly cobuildLeafProjectLogOnlyAllowed: boolean;
|
|
248
|
-
private _cobuildLockProvider;
|
|
249
|
-
private readonly _cobuildLockProviderFactory;
|
|
250
|
-
private readonly _cobuildJson;
|
|
251
|
-
private constructor();
|
|
252
|
-
/**
|
|
253
|
-
* Attempts to load the cobuild.json data from the standard file path `common/config/rush/cobuild.json`.
|
|
254
|
-
* If the file has not been created yet, then undefined is returned.
|
|
255
|
-
*/
|
|
256
|
-
static tryLoadAsync(terminal: ITerminal, rushConfiguration: RushConfiguration, rushSession: RushSession): Promise<CobuildConfiguration | undefined>;
|
|
257
|
-
static getCobuildConfigFilePath(rushConfiguration: RushConfiguration): string;
|
|
258
|
-
private static _loadAsync;
|
|
259
|
-
createLockProviderAsync(terminal: ITerminal): Promise<void>;
|
|
260
|
-
destroyLockProviderAsync(): Promise<void>;
|
|
261
|
-
get cobuildLockProvider(): ICobuildLockProvider;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* @beta
|
|
266
|
-
*/
|
|
267
|
-
export declare type CobuildLockProviderFactory = (cobuildJson: ICobuildJson) => ICobuildLockProvider | Promise<ICobuildLockProvider>;
|
|
268
|
-
|
|
269
212
|
/**
|
|
270
213
|
* Use this class to load and save the "common/config/rush/common-versions.json" config file.
|
|
271
214
|
* This config file stores dependency version information that affects all projects in the repo.
|
|
@@ -447,10 +390,6 @@ export declare class EnvironmentConfiguration {
|
|
|
447
390
|
private static _buildCacheCredential;
|
|
448
391
|
private static _buildCacheEnabled;
|
|
449
392
|
private static _buildCacheWriteAllowed;
|
|
450
|
-
private static _cobuildEnabled;
|
|
451
|
-
private static _cobuildContextId;
|
|
452
|
-
private static _cobuildRunnerId;
|
|
453
|
-
private static _cobuildLeafProjectLogOnlyAllowed;
|
|
454
393
|
private static _gitBinaryPath;
|
|
455
394
|
private static _tarBinaryPath;
|
|
456
395
|
/**
|
|
@@ -506,26 +445,6 @@ export declare class EnvironmentConfiguration {
|
|
|
506
445
|
* See {@link EnvironmentVariableNames.RUSH_BUILD_CACHE_WRITE_ALLOWED}
|
|
507
446
|
*/
|
|
508
447
|
static get buildCacheWriteAllowed(): boolean | undefined;
|
|
509
|
-
/**
|
|
510
|
-
* If set, enables or disables the cobuild feature.
|
|
511
|
-
* See {@link EnvironmentVariableNames.RUSH_COBUILD_ENABLED}
|
|
512
|
-
*/
|
|
513
|
-
static get cobuildEnabled(): boolean | undefined;
|
|
514
|
-
/**
|
|
515
|
-
* Provides a determined cobuild context id if configured
|
|
516
|
-
* See {@link EnvironmentVariableNames.RUSH_COBUILD_CONTEXT_ID}
|
|
517
|
-
*/
|
|
518
|
-
static get cobuildContextId(): string | undefined;
|
|
519
|
-
/**
|
|
520
|
-
* Provides a determined cobuild runner id if configured
|
|
521
|
-
* See {@link EnvironmentVariableNames.RUSH_COBUILD_RUNNER_ID}
|
|
522
|
-
*/
|
|
523
|
-
static get cobuildRunnerId(): string | undefined;
|
|
524
|
-
/**
|
|
525
|
-
* If set, enables or disables the cobuild leaf project log only feature.
|
|
526
|
-
* See {@link EnvironmentVariableNames.RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED}
|
|
527
|
-
*/
|
|
528
|
-
static get cobuildLeafProjectLogOnlyAllowed(): boolean | undefined;
|
|
529
448
|
/**
|
|
530
449
|
* Allows the git binary path to be explicitly provided.
|
|
531
450
|
* See {@link EnvironmentVariableNames.RUSH_GIT_BINARY_PATH}
|
|
@@ -683,43 +602,6 @@ export declare const EnvironmentVariableNames: {
|
|
|
683
602
|
* this environment variable is ignored.
|
|
684
603
|
*/
|
|
685
604
|
readonly RUSH_BUILD_CACHE_WRITE_ALLOWED: "RUSH_BUILD_CACHE_WRITE_ALLOWED";
|
|
686
|
-
/**
|
|
687
|
-
* Setting this environment variable overrides the value of `cobuildEnabled` in the `cobuild.json`
|
|
688
|
-
* configuration file.
|
|
689
|
-
*
|
|
690
|
-
* @remarks
|
|
691
|
-
* Specify `1` to enable the cobuild or `0` to disable it.
|
|
692
|
-
*
|
|
693
|
-
* If there is no cobuild configured, then this environment variable is ignored.
|
|
694
|
-
*/
|
|
695
|
-
readonly RUSH_COBUILD_ENABLED: "RUSH_COBUILD_ENABLED";
|
|
696
|
-
/**
|
|
697
|
-
* Setting this environment variable opts into running with cobuilds. The context id should be the same across
|
|
698
|
-
* multiple VMs, but changed when it is a new round of cobuilds.
|
|
699
|
-
*
|
|
700
|
-
* e.g. `Build.BuildNumber` in Azure DevOps Pipeline.
|
|
701
|
-
*
|
|
702
|
-
* @remarks
|
|
703
|
-
* If there is no cobuild configured, then this environment variable is ignored.
|
|
704
|
-
*/
|
|
705
|
-
readonly RUSH_COBUILD_CONTEXT_ID: "RUSH_COBUILD_CONTEXT_ID";
|
|
706
|
-
/**
|
|
707
|
-
* Explicitly specifies a name for each participating cobuild runner.
|
|
708
|
-
*
|
|
709
|
-
* Setting this environment variable opts into running with cobuilds.
|
|
710
|
-
*
|
|
711
|
-
* @remarks
|
|
712
|
-
* This environment variable is optional, if it is not provided, a random id is used.
|
|
713
|
-
*
|
|
714
|
-
* If there is no cobuild configured, then this environment variable is ignored.
|
|
715
|
-
*/
|
|
716
|
-
readonly RUSH_COBUILD_RUNNER_ID: "RUSH_COBUILD_RUNNER_ID";
|
|
717
|
-
/**
|
|
718
|
-
* If this variable is set to "1", When getting distributed builds, Rush will automatically handle the leaf project
|
|
719
|
-
* with build cache "disabled" by writing to the cache in a special "log files only mode". This is useful when you
|
|
720
|
-
* want to use Cobuilds to improve the performance in CI validations and the leaf projects have not enabled cache.
|
|
721
|
-
*/
|
|
722
|
-
readonly RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED: "RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED";
|
|
723
605
|
/**
|
|
724
606
|
* Explicitly specifies the path for the Git binary that is invoked by certain Rush operations.
|
|
725
607
|
*/
|
|
@@ -883,114 +765,6 @@ export declare interface ICloudBuildCacheProvider {
|
|
|
883
765
|
deleteCachedCredentialsAsync(terminal: ITerminal): Promise<void>;
|
|
884
766
|
}
|
|
885
767
|
|
|
886
|
-
/**
|
|
887
|
-
* @beta
|
|
888
|
-
*/
|
|
889
|
-
export declare interface ICobuildCompletedState {
|
|
890
|
-
status: OperationStatus.Success | OperationStatus.SuccessWithWarning | OperationStatus.Failure;
|
|
891
|
-
/**
|
|
892
|
-
* Completed state points to the cache id that was used to store the build cache.
|
|
893
|
-
* Note: Cache failed builds in a separate cache id
|
|
894
|
-
*/
|
|
895
|
-
cacheId: string;
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
/**
|
|
899
|
-
* @beta
|
|
900
|
-
*/
|
|
901
|
-
export declare interface ICobuildContext {
|
|
902
|
-
/**
|
|
903
|
-
* The key for acquiring lock.
|
|
904
|
-
*/
|
|
905
|
-
lockKey: string;
|
|
906
|
-
/**
|
|
907
|
-
* The expire time of the lock in seconds.
|
|
908
|
-
*/
|
|
909
|
-
lockExpireTimeInSeconds: number;
|
|
910
|
-
/**
|
|
911
|
-
* The key for storing completed state.
|
|
912
|
-
*/
|
|
913
|
-
completedStateKey: string;
|
|
914
|
-
/**
|
|
915
|
-
* The contextId is provided by the monorepo maintainer, it reads from environment variable {@link EnvironmentVariableNames.RUSH_COBUILD_CONTEXT_ID}.
|
|
916
|
-
* It ensure only the builds from the same given contextId cooperated.
|
|
917
|
-
*/
|
|
918
|
-
contextId: string;
|
|
919
|
-
/**
|
|
920
|
-
* The id of the cluster. The operations in the same cluster share the same clusterId and
|
|
921
|
-
* will be executed on the same machine.
|
|
922
|
-
*/
|
|
923
|
-
clusterId: string;
|
|
924
|
-
/**
|
|
925
|
-
* The id of the runner. The identifier for the running machine.
|
|
926
|
-
*
|
|
927
|
-
* It can be specified via assigning `RUSH_COBUILD_RUNNER_ID` environment variable.
|
|
928
|
-
*/
|
|
929
|
-
runnerId: string;
|
|
930
|
-
/**
|
|
931
|
-
* The id of the cache entry. It should be kept the same as the normal cacheId from ProjectBuildCache.
|
|
932
|
-
* Otherwise, there is a discrepancy in the success case wherein turning on cobuilds will
|
|
933
|
-
* fail to populate the normal build cache.
|
|
934
|
-
*/
|
|
935
|
-
cacheId: string;
|
|
936
|
-
/**
|
|
937
|
-
* The name of NPM package
|
|
938
|
-
*
|
|
939
|
-
* Example: `@scope/MyProject`
|
|
940
|
-
*/
|
|
941
|
-
packageName: string;
|
|
942
|
-
/**
|
|
943
|
-
* The name of the phase.
|
|
944
|
-
*
|
|
945
|
-
* Example: _phase:build
|
|
946
|
-
*/
|
|
947
|
-
phaseName: string;
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
/**
|
|
951
|
-
* @beta
|
|
952
|
-
*/
|
|
953
|
-
export declare interface ICobuildJson {
|
|
954
|
-
cobuildEnabled: boolean;
|
|
955
|
-
cobuildLockProvider: string;
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
/**
|
|
959
|
-
* @beta
|
|
960
|
-
*/
|
|
961
|
-
export declare interface ICobuildLockProvider {
|
|
962
|
-
/**
|
|
963
|
-
* The callback function invoked to connect to the lock provider.
|
|
964
|
-
* For example, initializing the connection to the redis server.
|
|
965
|
-
*/
|
|
966
|
-
connectAsync(): Promise<void>;
|
|
967
|
-
/**
|
|
968
|
-
* The callback function invoked to disconnect the lock provider.
|
|
969
|
-
*/
|
|
970
|
-
disconnectAsync(): Promise<void>;
|
|
971
|
-
/**
|
|
972
|
-
* The callback function to acquire a lock with a lock key and specific contexts.
|
|
973
|
-
*
|
|
974
|
-
* NOTE: This lock implementation must be a ReentrantLock. It says the lock might be acquired
|
|
975
|
-
* multiple times, since tasks in the same cluster can be run in the same VM.
|
|
976
|
-
*/
|
|
977
|
-
acquireLockAsync(context: Readonly<ICobuildContext>): Promise<boolean>;
|
|
978
|
-
/**
|
|
979
|
-
* The callback function to renew a lock with a lock key and specific contexts.
|
|
980
|
-
*
|
|
981
|
-
* NOTE: If the lock key expired
|
|
982
|
-
*/
|
|
983
|
-
renewLockAsync(context: Readonly<ICobuildContext>): Promise<void>;
|
|
984
|
-
/**
|
|
985
|
-
* The callback function to set completed state.
|
|
986
|
-
*/
|
|
987
|
-
setCompletedStateAsync(context: Readonly<ICobuildContext>, state: ICobuildCompletedState): Promise<void>;
|
|
988
|
-
/**
|
|
989
|
-
* The callback function to get completed state.
|
|
990
|
-
*/
|
|
991
|
-
getCompletedStateAsync(context: Readonly<ICobuildContext>): Promise<ICobuildCompletedState | undefined>;
|
|
992
|
-
}
|
|
993
|
-
|
|
994
768
|
/**
|
|
995
769
|
* A collection of environment variables
|
|
996
770
|
* @public
|
|
@@ -1028,10 +802,6 @@ export declare interface ICreateOperationsContext {
|
|
|
1028
802
|
* The configuration for the build cache, if the feature is enabled.
|
|
1029
803
|
*/
|
|
1030
804
|
readonly buildCacheConfiguration: BuildCacheConfiguration | undefined;
|
|
1031
|
-
/**
|
|
1032
|
-
* The configuration for the cobuild, if cobuild feature and build cache feature are both enabled.
|
|
1033
|
-
*/
|
|
1034
|
-
readonly cobuildConfiguration: CobuildConfiguration | undefined;
|
|
1035
805
|
/**
|
|
1036
806
|
* The set of custom parameters for the executing command.
|
|
1037
807
|
* Maps from the `longName` field in command-line.json to the parser configuration in ts-command-line.
|
|
@@ -1067,10 +837,6 @@ export declare interface ICreateOperationsContext {
|
|
|
1067
837
|
* The set of Rush projects selected for the current command execution.
|
|
1068
838
|
*/
|
|
1069
839
|
readonly projectSelection: ReadonlySet<RushConfigurationProject>;
|
|
1070
|
-
/**
|
|
1071
|
-
* All successfully loaded rush-project.json data for selected projects.
|
|
1072
|
-
*/
|
|
1073
|
-
readonly projectConfigurations: ReadonlyMap<RushConfigurationProject, RushProjectConfiguration>;
|
|
1074
840
|
/**
|
|
1075
841
|
* The set of Rush projects that have not been built in the current process since they were last modified.
|
|
1076
842
|
* When `isInitial` is true, this will be an exact match of `projectSelection`.
|
|
@@ -1416,10 +1182,6 @@ export declare interface _INpmOptionsJson extends IPackageManagerOptionsJsonBase
|
|
|
1416
1182
|
* @alpha
|
|
1417
1183
|
*/
|
|
1418
1184
|
export declare interface IOperationExecutionResult {
|
|
1419
|
-
/**
|
|
1420
|
-
* The operation itself
|
|
1421
|
-
*/
|
|
1422
|
-
readonly operation: Operation;
|
|
1423
1185
|
/**
|
|
1424
1186
|
* The current execution status of an operation. Operations start in the 'ready' state,
|
|
1425
1187
|
* but can be 'blocked' if an upstream operation failed. It is 'executing' when
|
|
@@ -1444,10 +1206,6 @@ export declare interface IOperationExecutionResult {
|
|
|
1444
1206
|
* The value indicates the duration of the same operation without cache hit.
|
|
1445
1207
|
*/
|
|
1446
1208
|
readonly nonCachedDurationMs: number | undefined;
|
|
1447
|
-
/**
|
|
1448
|
-
* The id of the runner which actually runs the building process in cobuild mode.
|
|
1449
|
-
*/
|
|
1450
|
-
readonly cobuildRunnerId: string | undefined;
|
|
1451
1209
|
}
|
|
1452
1210
|
|
|
1453
1211
|
/**
|
|
@@ -1457,8 +1215,6 @@ export declare interface _IOperationMetadata {
|
|
|
1457
1215
|
durationInSeconds: number;
|
|
1458
1216
|
logPath: string;
|
|
1459
1217
|
errorLogPath: string;
|
|
1460
|
-
cobuildContextId: string | undefined;
|
|
1461
|
-
cobuildRunnerId: string | undefined;
|
|
1462
1218
|
}
|
|
1463
1219
|
|
|
1464
1220
|
/**
|
|
@@ -1502,9 +1258,9 @@ export declare interface IOperationRunner {
|
|
|
1502
1258
|
*/
|
|
1503
1259
|
readonly name: string;
|
|
1504
1260
|
/**
|
|
1505
|
-
*
|
|
1261
|
+
* This flag determines if the operation is allowed to be skipped if up to date.
|
|
1506
1262
|
*/
|
|
1507
|
-
|
|
1263
|
+
isSkipAllowed: boolean;
|
|
1508
1264
|
/**
|
|
1509
1265
|
* Indicates that this runner's duration has meaning.
|
|
1510
1266
|
*/
|
|
@@ -1519,13 +1275,13 @@ export declare interface IOperationRunner {
|
|
|
1519
1275
|
*/
|
|
1520
1276
|
warningsAreAllowed: boolean;
|
|
1521
1277
|
/**
|
|
1522
|
-
*
|
|
1278
|
+
* Indicates if the output of this operation may be written to the cache
|
|
1523
1279
|
*/
|
|
1524
|
-
|
|
1280
|
+
isCacheWriteAllowed: boolean;
|
|
1525
1281
|
/**
|
|
1526
|
-
*
|
|
1282
|
+
* Method to be executed for the operation.
|
|
1527
1283
|
*/
|
|
1528
|
-
|
|
1284
|
+
executeAsync(context: IOperationRunnerContext): Promise<OperationStatus>;
|
|
1529
1285
|
}
|
|
1530
1286
|
|
|
1531
1287
|
/**
|
|
@@ -1560,73 +1316,6 @@ export declare interface IOperationRunnerContext {
|
|
|
1560
1316
|
* Object used to track elapsed time.
|
|
1561
1317
|
*/
|
|
1562
1318
|
stopwatch: IStopwatchResult;
|
|
1563
|
-
/**
|
|
1564
|
-
* The current execution status of an operation. Operations start in the 'ready' state,
|
|
1565
|
-
* but can be 'blocked' if an upstream operation failed. It is 'executing' when
|
|
1566
|
-
* the operation is executing. Once execution is complete, it is either 'success' or
|
|
1567
|
-
* 'failure'.
|
|
1568
|
-
*/
|
|
1569
|
-
status: OperationStatus;
|
|
1570
|
-
/**
|
|
1571
|
-
* Error which occurred while executing this operation, this is stored in case we need
|
|
1572
|
-
* it later (for example to re-print errors at end of execution).
|
|
1573
|
-
*/
|
|
1574
|
-
error?: Error;
|
|
1575
|
-
/**
|
|
1576
|
-
* Normally the incremental build logic will rebuild changed projects as well as
|
|
1577
|
-
* any projects that directly or indirectly depend on a changed project.
|
|
1578
|
-
* If true, then the incremental build logic will only rebuild changed projects and
|
|
1579
|
-
* ignore dependent projects.
|
|
1580
|
-
*/
|
|
1581
|
-
readonly changedProjectsOnly: boolean;
|
|
1582
|
-
}
|
|
1583
|
-
|
|
1584
|
-
/**
|
|
1585
|
-
* @alpha
|
|
1586
|
-
*/
|
|
1587
|
-
export declare interface IOperationSettings {
|
|
1588
|
-
/**
|
|
1589
|
-
* The name of the operation. This should be a key in the `package.json`'s `scripts` object.
|
|
1590
|
-
*/
|
|
1591
|
-
operationName: string;
|
|
1592
|
-
/**
|
|
1593
|
-
* Specify the folders where this operation writes its output files. If enabled, the Rush build
|
|
1594
|
-
* cache will restore these folders from the cache. The strings are folder names under the project
|
|
1595
|
-
* root folder.
|
|
1596
|
-
*
|
|
1597
|
-
* These folders should not be tracked by Git. They must not contain symlinks.
|
|
1598
|
-
*/
|
|
1599
|
-
outputFolderNames?: string[];
|
|
1600
|
-
/**
|
|
1601
|
-
* Disable caching for this operation. The operation will never be restored from cache.
|
|
1602
|
-
* This may be useful if this operation affects state outside of its folder.
|
|
1603
|
-
*
|
|
1604
|
-
* This option is only used when the build cache is enabled for the repo. You can set
|
|
1605
|
-
* disableBuildCacheForOperation=true to disable caching for a specific project operation.
|
|
1606
|
-
* This is a useful workaround if that project's build scripts violate the assumptions of the cache,
|
|
1607
|
-
* for example by writing files outside the project folder. Where possible, a better solution is to improve
|
|
1608
|
-
* the build scripts to be compatible with caching.
|
|
1609
|
-
*/
|
|
1610
|
-
disableBuildCacheForOperation?: boolean;
|
|
1611
|
-
/**
|
|
1612
|
-
* An optional list of environment variables that can affect this operation. The values of
|
|
1613
|
-
* these environment variables will become part of the hash when reading and writing the build cache.
|
|
1614
|
-
*
|
|
1615
|
-
* Note: generally speaking, all environment variables available to Rush are also available to any
|
|
1616
|
-
* operations performed -- Rush assumes that environment variables do not affect build outputs unless
|
|
1617
|
-
* you list them here.
|
|
1618
|
-
*/
|
|
1619
|
-
dependsOnEnvVars?: string[];
|
|
1620
|
-
/**
|
|
1621
|
-
* An optional list of glob (minimatch) patterns pointing to files that can affect this operation.
|
|
1622
|
-
* The hash values of the contents of these files will become part of the final hash when reading
|
|
1623
|
-
* and writing the build cache.
|
|
1624
|
-
*
|
|
1625
|
-
* Note: if a particular file will be matched by patterns provided by both `incrementalBuildIgnoredGlobs` and
|
|
1626
|
-
* `dependsOnAdditionalFiles` options - `dependsOnAdditionalFiles` will win and the file will be included
|
|
1627
|
-
* calculating final hash value when reading and writing the build cache
|
|
1628
|
-
*/
|
|
1629
|
-
dependsOnAdditionalFiles?: string[];
|
|
1630
1319
|
}
|
|
1631
1320
|
|
|
1632
1321
|
/**
|
|
@@ -1642,8 +1331,6 @@ export declare interface _IOperationStateFileOptions {
|
|
|
1642
1331
|
*/
|
|
1643
1332
|
export declare interface _IOperationStateJson {
|
|
1644
1333
|
nonCachedDurationMs: number;
|
|
1645
|
-
cobuildContextId: string | undefined;
|
|
1646
|
-
cobuildRunnerId: string | undefined;
|
|
1647
1334
|
}
|
|
1648
1335
|
|
|
1649
1336
|
/**
|
|
@@ -1812,7 +1499,7 @@ export declare interface IPrefixMatch<TItem> {
|
|
|
1812
1499
|
/**
|
|
1813
1500
|
* @internal
|
|
1814
1501
|
*/
|
|
1815
|
-
|
|
1502
|
+
declare interface IRawRepoState {
|
|
1816
1503
|
projectState: Map<RushConfigurationProject, Map<string, string>> | undefined;
|
|
1817
1504
|
rootDir: string;
|
|
1818
1505
|
rawHashes: Map<string, string>;
|
|
@@ -1933,33 +1620,6 @@ declare interface IRushPluginsConfigurationJson {
|
|
|
1933
1620
|
plugins: IRushPluginConfiguration[];
|
|
1934
1621
|
}
|
|
1935
1622
|
|
|
1936
|
-
/**
|
|
1937
|
-
* Describes the file structure for the `<project root>/config/rush-project.json` config file.
|
|
1938
|
-
* @internal
|
|
1939
|
-
*/
|
|
1940
|
-
export declare interface _IRushProjectJson {
|
|
1941
|
-
/**
|
|
1942
|
-
* The incremental analyzer can skip Rush commands for projects whose input files have
|
|
1943
|
-
* not changed since the last build. Normally, every Git-tracked file under the project
|
|
1944
|
-
* folder is assumed to be an input. Set incrementalBuildIgnoredGlobs to ignore specific
|
|
1945
|
-
* files, specified as globs relative to the project folder. The list of file globs will
|
|
1946
|
-
* be interpreted the same way your .gitignore file is.
|
|
1947
|
-
*/
|
|
1948
|
-
incrementalBuildIgnoredGlobs?: string[];
|
|
1949
|
-
/**
|
|
1950
|
-
* Disable caching for this project. The project will never be restored from cache.
|
|
1951
|
-
* This may be useful if this project affects state outside of its folder.
|
|
1952
|
-
*
|
|
1953
|
-
* This option is only used when the build cache is enabled for the repo. You can set
|
|
1954
|
-
* disableBuildCacheForProject=true to disable caching for a specific project. This is a useful workaround
|
|
1955
|
-
* if that project's build scripts violate the assumptions of the cache, for example by writing
|
|
1956
|
-
* files outside the project folder. Where possible, a better solution is to improve the build scripts
|
|
1957
|
-
* to be compatible with caching.
|
|
1958
|
-
*/
|
|
1959
|
-
disableBuildCacheForProject?: boolean;
|
|
1960
|
-
operationSettings?: IOperationSettings[];
|
|
1961
|
-
}
|
|
1962
|
-
|
|
1963
1623
|
declare type IRushRepositoryJson = IRushRepositoryJsonSingleUrl | IRushRepositoryJsonMultipleUrls;
|
|
1964
1624
|
|
|
1965
1625
|
/**
|
|
@@ -2493,7 +2153,7 @@ export declare class _OperationMetadataManager {
|
|
|
2493
2153
|
* Example: `.rush/temp/operation/_phase_build/error.log`
|
|
2494
2154
|
*/
|
|
2495
2155
|
get relativeFilepaths(): string[];
|
|
2496
|
-
saveAsync({ durationInSeconds,
|
|
2156
|
+
saveAsync({ durationInSeconds, logPath, errorLogPath }: _IOperationMetadata): Promise<void>;
|
|
2497
2157
|
tryRestoreAsync({ terminal, logPath, errorLogPath }: {
|
|
2498
2158
|
terminal: ITerminal;
|
|
2499
2159
|
logPath: string;
|
|
@@ -2536,18 +2196,10 @@ export declare enum OperationStatus {
|
|
|
2536
2196
|
* The Operation is on the queue, ready to execute (but may be waiting for dependencies)
|
|
2537
2197
|
*/
|
|
2538
2198
|
Ready = "READY",
|
|
2539
|
-
/**
|
|
2540
|
-
* The Operation is Queued
|
|
2541
|
-
*/
|
|
2542
|
-
Queued = "QUEUED",
|
|
2543
2199
|
/**
|
|
2544
2200
|
* The Operation is currently executing
|
|
2545
2201
|
*/
|
|
2546
2202
|
Executing = "EXECUTING",
|
|
2547
|
-
/**
|
|
2548
|
-
* The Operation is currently executing by a remote process
|
|
2549
|
-
*/
|
|
2550
|
-
RemoteExecuting = "REMOTE EXECUTING",
|
|
2551
2203
|
/**
|
|
2552
2204
|
* The Operation completed successfully and did not write to standard output
|
|
2553
2205
|
*/
|
|
@@ -2705,10 +2357,7 @@ export declare class PhasedCommandHooks {
|
|
|
2705
2357
|
* Hook invoked before operation start
|
|
2706
2358
|
* Hook is series for stable output.
|
|
2707
2359
|
*/
|
|
2708
|
-
readonly beforeExecuteOperations: AsyncSeriesHook<[
|
|
2709
|
-
Map<Operation, IOperationExecutionResult>,
|
|
2710
|
-
ICreateOperationsContext
|
|
2711
|
-
]>;
|
|
2360
|
+
readonly beforeExecuteOperations: AsyncSeriesHook<[Map<Operation, IOperationExecutionResult>]>;
|
|
2712
2361
|
/**
|
|
2713
2362
|
* Hook invoked when operation status changed
|
|
2714
2363
|
* Hook is series for stable output.
|
|
@@ -2720,18 +2369,6 @@ export declare class PhasedCommandHooks {
|
|
|
2720
2369
|
* Hook is series for stable output.
|
|
2721
2370
|
*/
|
|
2722
2371
|
readonly afterExecuteOperations: AsyncSeriesHook<[IExecutionResult, ICreateOperationsContext]>;
|
|
2723
|
-
/**
|
|
2724
|
-
* Hook invoked before executing a operation.
|
|
2725
|
-
*/
|
|
2726
|
-
readonly beforeExecuteOperation: AsyncSeriesBailHook<[
|
|
2727
|
-
IOperationRunnerContext & IOperationExecutionResult
|
|
2728
|
-
], OperationStatus | undefined>;
|
|
2729
|
-
/**
|
|
2730
|
-
* Hook invoked after executing a operation.
|
|
2731
|
-
*/
|
|
2732
|
-
readonly afterExecuteOperation: AsyncSeriesHook<[
|
|
2733
|
-
IOperationRunnerContext & IOperationExecutionResult
|
|
2734
|
-
]>;
|
|
2735
2372
|
/**
|
|
2736
2373
|
* Hook invoked after a run has finished and the command is watching for changes.
|
|
2737
2374
|
* May be used to display additional relevant data to the user.
|
|
@@ -2944,7 +2581,7 @@ export declare class ProjectChangeAnalyzer {
|
|
|
2944
2581
|
/**
|
|
2945
2582
|
* @internal
|
|
2946
2583
|
*/
|
|
2947
|
-
_ensureInitializedAsync(terminal: ITerminal): Promise<
|
|
2584
|
+
_ensureInitializedAsync(terminal: ITerminal): Promise<IRawRepoState | undefined>;
|
|
2948
2585
|
/**
|
|
2949
2586
|
* The project state hash is calculated in the following way:
|
|
2950
2587
|
* - Project dependencies are collected (see ProjectChangeAnalyzer.getPackageDeps)
|
|
@@ -3891,10 +3528,6 @@ export declare class RushConstants {
|
|
|
3891
3528
|
* Changing this ensures that cache entries generated by an old version will no longer register as a cache hit.
|
|
3892
3529
|
*/
|
|
3893
3530
|
static readonly buildCacheVersion: number;
|
|
3894
|
-
/**
|
|
3895
|
-
* Cobuild configuration file.
|
|
3896
|
-
*/
|
|
3897
|
-
static readonly cobuildFilename: string;
|
|
3898
3531
|
/**
|
|
3899
3532
|
* Per-project configuration filename.
|
|
3900
3533
|
*/
|
|
@@ -4058,76 +3691,18 @@ declare class RushPluginsConfiguration {
|
|
|
4058
3691
|
constructor(jsonFilename: string);
|
|
4059
3692
|
}
|
|
4060
3693
|
|
|
4061
|
-
/**
|
|
4062
|
-
* Use this class to load the "config/rush-project.json" config file.
|
|
4063
|
-
*
|
|
4064
|
-
* This file provides project-specific configuration options.
|
|
4065
|
-
* @alpha
|
|
4066
|
-
*/
|
|
4067
|
-
export declare class RushProjectConfiguration {
|
|
4068
|
-
private static readonly _configCache;
|
|
4069
|
-
readonly project: RushConfigurationProject;
|
|
4070
|
-
/**
|
|
4071
|
-
* {@inheritdoc _IRushProjectJson.incrementalBuildIgnoredGlobs}
|
|
4072
|
-
*/
|
|
4073
|
-
readonly incrementalBuildIgnoredGlobs: ReadonlyArray<string>;
|
|
4074
|
-
/**
|
|
4075
|
-
* {@inheritdoc _IRushProjectJson.disableBuildCacheForProject}
|
|
4076
|
-
*/
|
|
4077
|
-
readonly disableBuildCacheForProject: boolean;
|
|
4078
|
-
readonly operationSettingsByOperationName: ReadonlyMap<string, Readonly<IOperationSettings>>;
|
|
4079
|
-
private readonly _validationCache;
|
|
4080
|
-
private constructor();
|
|
4081
|
-
/**
|
|
4082
|
-
* Validates that the requested phases are compatible.
|
|
4083
|
-
* Deferral of this logic to its own method means that Rush no longer eagerly validates
|
|
4084
|
-
* all defined commands in command-line.json. As such, while validation will be run for a given
|
|
4085
|
-
* command upon invoking that command, defining overlapping phases in "rush custom-command"
|
|
4086
|
-
* that are not used by "rush build" will not cause "rush build" to exit with an error.
|
|
4087
|
-
*/
|
|
4088
|
-
validatePhaseConfiguration(phases: Iterable<IPhase>, terminal: ITerminal): void;
|
|
4089
|
-
/**
|
|
4090
|
-
* Examines the list of source files for the project and the target phase and returns a reason
|
|
4091
|
-
* why the project cannot enable the build cache for that phase, or undefined if it is safe to so do.
|
|
4092
|
-
*/
|
|
4093
|
-
getCacheDisabledReason(trackedFileNames: Iterable<string>, phaseName: string): string | undefined;
|
|
4094
|
-
/**
|
|
4095
|
-
* Loads the rush-project.json data for the specified project.
|
|
4096
|
-
*/
|
|
4097
|
-
static tryLoadForProjectAsync(project: RushConfigurationProject, terminal: ITerminal): Promise<RushProjectConfiguration | undefined>;
|
|
4098
|
-
/**
|
|
4099
|
-
* Load only the `incrementalBuildIgnoredGlobs` property from the rush-project.json file, skipping
|
|
4100
|
-
* validation of other parts of the config file.
|
|
4101
|
-
*
|
|
4102
|
-
* @remarks
|
|
4103
|
-
* This function exists to allow the ProjectChangeAnalyzer to load just the ignore globs without
|
|
4104
|
-
* having to validate the rest of the `rush-project.json` file against the repo's command-line configuration.
|
|
4105
|
-
*/
|
|
4106
|
-
static tryLoadIgnoreGlobsForProjectAsync(project: RushConfigurationProject, terminal: ITerminal): Promise<ReadonlyArray<string> | undefined>;
|
|
4107
|
-
/**
|
|
4108
|
-
* Load the rush-project.json data for all selected projects.
|
|
4109
|
-
* Validate compatibility of output folders across all selected phases.
|
|
4110
|
-
*/
|
|
4111
|
-
static tryLoadAndValidateForProjectsAsync(projects: Iterable<RushConfigurationProject>, phases: ReadonlySet<IPhase>, terminal: ITerminal): Promise<ReadonlyMap<RushConfigurationProject, RushProjectConfiguration>>;
|
|
4112
|
-
private static _tryLoadJsonForProjectAsync;
|
|
4113
|
-
private static _getRushProjectConfiguration;
|
|
4114
|
-
}
|
|
4115
|
-
|
|
4116
3694
|
/**
|
|
4117
3695
|
* @beta
|
|
4118
3696
|
*/
|
|
4119
3697
|
export declare class RushSession {
|
|
4120
3698
|
private readonly _options;
|
|
4121
3699
|
private readonly _cloudBuildCacheProviderFactories;
|
|
4122
|
-
private readonly _cobuildLockProviderFactories;
|
|
4123
3700
|
readonly hooks: RushLifecycleHooks;
|
|
4124
3701
|
constructor(options: IRushSessionOptions);
|
|
4125
3702
|
getLogger(name: string): ILogger;
|
|
4126
3703
|
get terminalProvider(): ITerminalProvider;
|
|
4127
3704
|
registerCloudBuildCacheProviderFactory(cacheProviderName: string, factory: CloudBuildCacheProviderFactory): void;
|
|
4128
3705
|
getCloudBuildCacheProviderFactory(cacheProviderName: string): CloudBuildCacheProviderFactory | undefined;
|
|
4129
|
-
registerCobuildLockProviderFactory(cobuildLockProviderName: string, factory: CobuildLockProviderFactory): void;
|
|
4130
|
-
getCobuildLockProviderFactory(cobuildLockProviderName: string): CobuildLockProviderFactory | undefined;
|
|
4131
3706
|
}
|
|
4132
3707
|
|
|
4133
3708
|
/**
|