@rushstack/rush-sdk 5.63.1 → 5.65.1
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/README.md +1 -1
- package/dist/rush-lib.d.ts +452 -3
- package/package.json +8 -5
package/README.md
CHANGED
|
@@ -25,6 +25,6 @@ Verbose logging can be turn on by set environment variable `RUSH_SDK_DEBUG` to `
|
|
|
25
25
|
- [CHANGELOG.md](
|
|
26
26
|
https://github.com/microsoft/rushstack/blob/master/apps/rush/CHANGELOG.md) - Find
|
|
27
27
|
out what's new in the latest version
|
|
28
|
-
- [API Reference](https://rushstack.io/pages/
|
|
28
|
+
- [API Reference](https://api.rushstack.io/pages/rush-lib/)
|
|
29
29
|
|
|
30
30
|
Rush is part of the [Rush Stack](https://rushstack.io/) family of projects.
|
package/dist/rush-lib.d.ts
CHANGED
|
@@ -5,13 +5,19 @@
|
|
|
5
5
|
|
|
6
6
|
/// <reference types="node" />
|
|
7
7
|
|
|
8
|
+
import { AsyncParallelHook } from 'tapable';
|
|
8
9
|
import { AsyncSeriesHook } from 'tapable';
|
|
10
|
+
import { AsyncSeriesWaterfallHook } from 'tapable';
|
|
11
|
+
import type { CollatedWriter } from '@rushstack/stream-collator';
|
|
12
|
+
import type { CommandLineParameter } from '@rushstack/ts-command-line';
|
|
9
13
|
import { HookMap } from 'tapable';
|
|
10
14
|
import { IPackageJson } from '@rushstack/node-core-library';
|
|
11
15
|
import { ITerminal } from '@rushstack/node-core-library';
|
|
12
16
|
import { ITerminalProvider } from '@rushstack/node-core-library';
|
|
13
17
|
import { JsonObject } from '@rushstack/node-core-library';
|
|
14
18
|
import { PackageNameParser } from '@rushstack/node-core-library';
|
|
19
|
+
import type { StdioSummarizer } from '@rushstack/terminal';
|
|
20
|
+
import { SyncHook } from 'tapable';
|
|
15
21
|
import { Terminal } from '@rushstack/node-core-library';
|
|
16
22
|
|
|
17
23
|
/**
|
|
@@ -130,6 +136,52 @@ export declare class ApprovedPackagesPolicy {
|
|
|
130
136
|
get nonbrowserApprovedPackages(): ApprovedPackagesConfiguration;
|
|
131
137
|
}
|
|
132
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Use this class to load and save the "common/config/rush/build-cache.json" config file.
|
|
141
|
+
* This file provides configuration options for cached project build output.
|
|
142
|
+
* @beta
|
|
143
|
+
*/
|
|
144
|
+
export declare class BuildCacheConfiguration {
|
|
145
|
+
private static _jsonSchema;
|
|
146
|
+
/**
|
|
147
|
+
* Indicates whether the build cache feature is enabled.
|
|
148
|
+
* Typically it is enabled in the build-cache.json config file.
|
|
149
|
+
*/
|
|
150
|
+
readonly buildCacheEnabled: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* Indicates whether or not writing to the cache is enabled.
|
|
153
|
+
*/
|
|
154
|
+
cacheWriteEnabled: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Method to calculate the cache entry id for a project, phase, and project state.
|
|
157
|
+
*/
|
|
158
|
+
readonly getCacheEntryId: GetCacheEntryIdFunction;
|
|
159
|
+
/**
|
|
160
|
+
* The provider for interacting with the local build cache.
|
|
161
|
+
*/
|
|
162
|
+
readonly localCacheProvider: FileSystemBuildCacheProvider;
|
|
163
|
+
/**
|
|
164
|
+
* The provider for interacting with the cloud build cache, if configured.
|
|
165
|
+
*/
|
|
166
|
+
readonly cloudCacheProvider: ICloudBuildCacheProvider | undefined;
|
|
167
|
+
private constructor();
|
|
168
|
+
/**
|
|
169
|
+
* Attempts to load the build-cache.json data from the standard file path `common/config/rush/build-cache.json`.
|
|
170
|
+
* If the file has not been created yet, then undefined is returned.
|
|
171
|
+
*/
|
|
172
|
+
static tryLoadAsync(terminal: ITerminal, rushConfiguration: RushConfiguration, rushSession: RushSession): Promise<BuildCacheConfiguration | undefined>;
|
|
173
|
+
/**
|
|
174
|
+
* Loads the build-cache.json data from the standard file path `common/config/rush/build-cache.json`.
|
|
175
|
+
* If the file has not been created yet, or if the feature is not enabled, then an error is reported.
|
|
176
|
+
*/
|
|
177
|
+
static loadAndRequireEnabledAsync(terminal: ITerminal, rushConfiguration: RushConfiguration, rushSession: RushSession): Promise<BuildCacheConfiguration>;
|
|
178
|
+
/**
|
|
179
|
+
* Gets the absolute path to the build-cache.json file in the specified rush workspace.
|
|
180
|
+
*/
|
|
181
|
+
static getBuildCacheConfigFilePath(rushConfiguration: RushConfiguration): string;
|
|
182
|
+
private static _loadAsync;
|
|
183
|
+
}
|
|
184
|
+
|
|
133
185
|
/**
|
|
134
186
|
* Type of version bumps
|
|
135
187
|
* @public
|
|
@@ -582,6 +634,34 @@ export declare class ExperimentsConfiguration {
|
|
|
582
634
|
get configuration(): Readonly<IExperimentsJson>;
|
|
583
635
|
}
|
|
584
636
|
|
|
637
|
+
/**
|
|
638
|
+
* A build cache provider using the local file system.
|
|
639
|
+
* Required by all cloud cache providers.
|
|
640
|
+
* @beta
|
|
641
|
+
*/
|
|
642
|
+
export declare class FileSystemBuildCacheProvider {
|
|
643
|
+
private readonly _cacheFolderPath;
|
|
644
|
+
constructor(options: IFileSystemBuildCacheProviderOptions);
|
|
645
|
+
/**
|
|
646
|
+
* Returns the absolute disk path for the specified cache id.
|
|
647
|
+
*/
|
|
648
|
+
getCacheEntryPath(cacheId: string): string;
|
|
649
|
+
/**
|
|
650
|
+
* Validates that the specified cache id exists on disk, and returns the path if it does.
|
|
651
|
+
*/
|
|
652
|
+
tryGetCacheEntryPathByIdAsync(terminal: ITerminal, cacheId: string): Promise<string | undefined>;
|
|
653
|
+
/**
|
|
654
|
+
* Writes the specified buffer to the corresponding file system path for the cache id.
|
|
655
|
+
*/
|
|
656
|
+
trySetCacheEntryBufferAsync(terminal: ITerminal, cacheId: string, entryBuffer: Buffer): Promise<string>;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* Calculates the cache entry id string for an operation.
|
|
661
|
+
* @beta
|
|
662
|
+
*/
|
|
663
|
+
export declare type GetCacheEntryIdFunction = (options: IGenerateCacheEntryIdOptions) => string;
|
|
664
|
+
|
|
585
665
|
/**
|
|
586
666
|
* Part of IRushConfigurationJson.
|
|
587
667
|
*/
|
|
@@ -659,6 +739,52 @@ export declare interface IConfigurationEnvironmentVariable {
|
|
|
659
739
|
override?: boolean;
|
|
660
740
|
}
|
|
661
741
|
|
|
742
|
+
/**
|
|
743
|
+
* Context used for creating operations to be executed.
|
|
744
|
+
* @alpha
|
|
745
|
+
*/
|
|
746
|
+
export declare interface ICreateOperationsContext {
|
|
747
|
+
/**
|
|
748
|
+
* The configuration for the build cache, if the feature is enabled.
|
|
749
|
+
*/
|
|
750
|
+
readonly buildCacheConfiguration: BuildCacheConfiguration | undefined;
|
|
751
|
+
/**
|
|
752
|
+
* The set of custom parameters for the executing command.
|
|
753
|
+
* Maps from the `longName` field in command-line.json to the parser configuration in ts-command-line.
|
|
754
|
+
*/
|
|
755
|
+
readonly customParameters: ReadonlyMap<string, CommandLineParameter>;
|
|
756
|
+
/**
|
|
757
|
+
* If true, projects may read their output from cache or be skipped if already up to date.
|
|
758
|
+
* If false, neither of the above may occur, e.g. "rush rebuild"
|
|
759
|
+
*/
|
|
760
|
+
readonly isIncrementalBuildAllowed: boolean;
|
|
761
|
+
/**
|
|
762
|
+
* If true, this is the initial run of the command.
|
|
763
|
+
* If false, this execution is in response to changes.
|
|
764
|
+
*/
|
|
765
|
+
readonly isInitial: boolean;
|
|
766
|
+
/**
|
|
767
|
+
* If true, the command is running in watch mode.
|
|
768
|
+
*/
|
|
769
|
+
readonly isWatch: boolean;
|
|
770
|
+
/**
|
|
771
|
+
* The set of phases selected for the current command execution.
|
|
772
|
+
*/
|
|
773
|
+
readonly phaseSelection: ReadonlySet<IPhase>;
|
|
774
|
+
/**
|
|
775
|
+
* The current state of the repository
|
|
776
|
+
*/
|
|
777
|
+
readonly projectChangeAnalyzer: ProjectChangeAnalyzer;
|
|
778
|
+
/**
|
|
779
|
+
* The set of Rush projects selected for the current command execution.
|
|
780
|
+
*/
|
|
781
|
+
readonly projectSelection: ReadonlySet<RushConfigurationProject>;
|
|
782
|
+
/**
|
|
783
|
+
* The Rush configuration
|
|
784
|
+
*/
|
|
785
|
+
readonly rushConfiguration: RushConfiguration;
|
|
786
|
+
}
|
|
787
|
+
|
|
662
788
|
/**
|
|
663
789
|
* @beta
|
|
664
790
|
*/
|
|
@@ -735,6 +861,40 @@ export declare interface IExperimentsJson {
|
|
|
735
861
|
phasedCommands?: boolean;
|
|
736
862
|
}
|
|
737
863
|
|
|
864
|
+
/**
|
|
865
|
+
* Options for creating a file system build cache provider.
|
|
866
|
+
* @beta
|
|
867
|
+
*/
|
|
868
|
+
export declare interface IFileSystemBuildCacheProviderOptions {
|
|
869
|
+
/**
|
|
870
|
+
* The workspace Rush configuration
|
|
871
|
+
*/
|
|
872
|
+
rushConfiguration: RushConfiguration;
|
|
873
|
+
/**
|
|
874
|
+
* The user Rush configuration
|
|
875
|
+
*/
|
|
876
|
+
rushUserConfiguration: RushUserConfiguration;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
/**
|
|
880
|
+
* Options for generating the cache id for an operation.
|
|
881
|
+
* @beta
|
|
882
|
+
*/
|
|
883
|
+
export declare interface IGenerateCacheEntryIdOptions {
|
|
884
|
+
/**
|
|
885
|
+
* The name of the project
|
|
886
|
+
*/
|
|
887
|
+
projectName: string;
|
|
888
|
+
/**
|
|
889
|
+
* The name of the phase
|
|
890
|
+
*/
|
|
891
|
+
phaseName: string;
|
|
892
|
+
/**
|
|
893
|
+
* A hash of the input files
|
|
894
|
+
*/
|
|
895
|
+
projectStateHash: string;
|
|
896
|
+
}
|
|
897
|
+
|
|
738
898
|
/**
|
|
739
899
|
* @beta
|
|
740
900
|
*/
|
|
@@ -869,6 +1029,89 @@ export declare class IndividualVersionPolicy extends VersionPolicy {
|
|
|
869
1029
|
export declare interface _INpmOptionsJson extends IPackageManagerOptionsJsonBase {
|
|
870
1030
|
}
|
|
871
1031
|
|
|
1032
|
+
/**
|
|
1033
|
+
* Options for constructing a new Operation.
|
|
1034
|
+
* @alpha
|
|
1035
|
+
*/
|
|
1036
|
+
export declare interface IOperationOptions {
|
|
1037
|
+
/**
|
|
1038
|
+
* The Rush phase associated with this Operation, if any
|
|
1039
|
+
*/
|
|
1040
|
+
phase?: IPhase | undefined;
|
|
1041
|
+
/**
|
|
1042
|
+
* The Rush project associated with this Operation, if any
|
|
1043
|
+
*/
|
|
1044
|
+
project?: RushConfigurationProject | undefined;
|
|
1045
|
+
/**
|
|
1046
|
+
* When the scheduler is ready to process this `Operation`, the `runner` implements the actual work of
|
|
1047
|
+
* running the operation.
|
|
1048
|
+
*/
|
|
1049
|
+
runner?: IOperationRunner | undefined;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* The `Operation` class is a node in the dependency graph of work that needs to be scheduled by the
|
|
1054
|
+
* `OperationExecutionManager`. Each `Operation` has a `runner` member of type `IOperationRunner`, whose
|
|
1055
|
+
* implementation manages the actual process for running a single operation.
|
|
1056
|
+
*
|
|
1057
|
+
* @beta
|
|
1058
|
+
*/
|
|
1059
|
+
export declare interface IOperationRunner {
|
|
1060
|
+
/**
|
|
1061
|
+
* Name of the operation, for logging.
|
|
1062
|
+
*/
|
|
1063
|
+
readonly name: string;
|
|
1064
|
+
/**
|
|
1065
|
+
* This flag determines if the operation is allowed to be skipped if up to date.
|
|
1066
|
+
*/
|
|
1067
|
+
isSkipAllowed: boolean;
|
|
1068
|
+
/**
|
|
1069
|
+
* Indicates that this runner's duration has meaning.
|
|
1070
|
+
*/
|
|
1071
|
+
reportTiming: boolean;
|
|
1072
|
+
/**
|
|
1073
|
+
* Indicates that this runner is architectural and should not be reported on.
|
|
1074
|
+
*/
|
|
1075
|
+
silent: boolean;
|
|
1076
|
+
/**
|
|
1077
|
+
* If set to true, a warning result should not make Rush exit with a nonzero
|
|
1078
|
+
* exit code
|
|
1079
|
+
*/
|
|
1080
|
+
warningsAreAllowed: boolean;
|
|
1081
|
+
/**
|
|
1082
|
+
* Indicates if the output of this operation may be written to the cache
|
|
1083
|
+
*/
|
|
1084
|
+
isCacheWriteAllowed: boolean;
|
|
1085
|
+
/**
|
|
1086
|
+
* Method to be executed for the operation.
|
|
1087
|
+
*/
|
|
1088
|
+
executeAsync(context: IOperationRunnerContext): Promise<OperationStatus>;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
/**
|
|
1092
|
+
* Information passed to the executing `IOperationRunner`
|
|
1093
|
+
*
|
|
1094
|
+
* @beta
|
|
1095
|
+
*/
|
|
1096
|
+
export declare interface IOperationRunnerContext {
|
|
1097
|
+
/**
|
|
1098
|
+
* The writer into which this `IOperationRunner` should write its logs.
|
|
1099
|
+
*/
|
|
1100
|
+
collatedWriter: CollatedWriter;
|
|
1101
|
+
/**
|
|
1102
|
+
* If Rush was invoked with `--debug`
|
|
1103
|
+
*/
|
|
1104
|
+
debugMode: boolean;
|
|
1105
|
+
/**
|
|
1106
|
+
* Defaults to `true`. Will be `false` if Rush was invoked with `--verbose`.
|
|
1107
|
+
*/
|
|
1108
|
+
quietMode: boolean;
|
|
1109
|
+
/**
|
|
1110
|
+
* Object used to report a summary at the end of the Rush invocation.
|
|
1111
|
+
*/
|
|
1112
|
+
stdioSummarizer: StdioSummarizer;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
872
1115
|
/**
|
|
873
1116
|
* Options for the package manager.
|
|
874
1117
|
* @public
|
|
@@ -880,11 +1123,57 @@ export declare interface IPackageManagerOptionsJsonBase {
|
|
|
880
1123
|
environmentVariables?: IConfigurationEnvironment;
|
|
881
1124
|
}
|
|
882
1125
|
|
|
1126
|
+
/**
|
|
1127
|
+
* Metadata about a phase.
|
|
1128
|
+
* @alpha
|
|
1129
|
+
*/
|
|
1130
|
+
export declare interface IPhase {
|
|
1131
|
+
/**
|
|
1132
|
+
* The name of this phase.
|
|
1133
|
+
*/
|
|
1134
|
+
name: string;
|
|
1135
|
+
/**
|
|
1136
|
+
* If set to "true," this this phase was generated from a bulk command, and
|
|
1137
|
+
* was not explicitly defined in the command-line.json file.
|
|
1138
|
+
*/
|
|
1139
|
+
isSynthetic: boolean;
|
|
1140
|
+
/**
|
|
1141
|
+
* This property is used in the name of the filename for the logs generated by this
|
|
1142
|
+
* phase. This is a filesystem-safe version of the phase name. For example,
|
|
1143
|
+
* a phase with name "_phase:compile" has a `logFilenameIdentifier` of "_phase_compile".
|
|
1144
|
+
*/
|
|
1145
|
+
logFilenameIdentifier: string;
|
|
1146
|
+
/**
|
|
1147
|
+
* The set of custom command line parameters that are relevant to this phase.
|
|
1148
|
+
*/
|
|
1149
|
+
associatedParameters: Set<CommandLineParameter>;
|
|
1150
|
+
/**
|
|
1151
|
+
* The resolved dependencies of the phase
|
|
1152
|
+
*/
|
|
1153
|
+
dependencies: {
|
|
1154
|
+
self: Set<IPhase>;
|
|
1155
|
+
upstream: Set<IPhase>;
|
|
1156
|
+
};
|
|
1157
|
+
/**
|
|
1158
|
+
* Normally Rush requires that each project's package.json has a \"scripts\" entry matching the phase name. To disable this check, set \"ignoreMissingScript\" to true.
|
|
1159
|
+
*/
|
|
1160
|
+
ignoreMissingScript: boolean;
|
|
1161
|
+
/**
|
|
1162
|
+
* By default, Rush returns a nonzero exit code if errors or warnings occur during a command. If this option is set to \"true\", Rush will return a zero exit code if warnings occur during the execution of this phase.
|
|
1163
|
+
*/
|
|
1164
|
+
allowWarningsOnSuccess: boolean;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
883
1167
|
/**
|
|
884
1168
|
* Information about the currently executing phased script command (as defined in command-line.json, or default "build" or "rebuild") provided to plugins.
|
|
885
1169
|
* @beta
|
|
886
1170
|
*/
|
|
887
1171
|
export declare interface IPhasedCommand extends IRushCommand {
|
|
1172
|
+
/**
|
|
1173
|
+
* Hooks into the execution of the current phased command
|
|
1174
|
+
* @alpha
|
|
1175
|
+
*/
|
|
1176
|
+
readonly hooks: PhasedCommandHooks;
|
|
888
1177
|
}
|
|
889
1178
|
|
|
890
1179
|
/**
|
|
@@ -940,6 +1229,7 @@ declare interface IRushConfigurationJson {
|
|
|
940
1229
|
approvedPackagesPolicy?: IApprovedPackagesPolicyJson;
|
|
941
1230
|
gitPolicy?: IRushGitPolicyJson;
|
|
942
1231
|
telemetryEnabled?: boolean;
|
|
1232
|
+
allowedProjectTags?: string[];
|
|
943
1233
|
projects: IRushConfigurationProjectJson[];
|
|
944
1234
|
eventHooks?: IEventHooksJson;
|
|
945
1235
|
hotfixChangeEnabled?: boolean;
|
|
@@ -962,6 +1252,7 @@ declare interface IRushConfigurationProjectJson {
|
|
|
962
1252
|
shouldPublish?: boolean;
|
|
963
1253
|
skipRushCheck?: boolean;
|
|
964
1254
|
publishFolder?: string;
|
|
1255
|
+
tags?: string[];
|
|
965
1256
|
}
|
|
966
1257
|
|
|
967
1258
|
/**
|
|
@@ -980,6 +1271,10 @@ declare interface IRushConfigurationProjectOptions {
|
|
|
980
1271
|
* A unique string name for this project
|
|
981
1272
|
*/
|
|
982
1273
|
tempProjectName: string;
|
|
1274
|
+
/**
|
|
1275
|
+
* If specified, validate project tags against this list.
|
|
1276
|
+
*/
|
|
1277
|
+
allowedProjectTags: Set<string> | undefined;
|
|
983
1278
|
}
|
|
984
1279
|
|
|
985
1280
|
/**
|
|
@@ -1069,6 +1364,43 @@ declare interface IRushVariantOptionsJson {
|
|
|
1069
1364
|
description: string;
|
|
1070
1365
|
}
|
|
1071
1366
|
|
|
1367
|
+
/**
|
|
1368
|
+
* @beta
|
|
1369
|
+
*/
|
|
1370
|
+
export declare interface ITelemetryData {
|
|
1371
|
+
/**
|
|
1372
|
+
* Command name
|
|
1373
|
+
* @example 'build'
|
|
1374
|
+
*/
|
|
1375
|
+
readonly name: string;
|
|
1376
|
+
/**
|
|
1377
|
+
* Duration in seconds
|
|
1378
|
+
*/
|
|
1379
|
+
readonly durationInSeconds: number;
|
|
1380
|
+
/**
|
|
1381
|
+
* The result of the command
|
|
1382
|
+
*/
|
|
1383
|
+
readonly result: 'Succeeded' | 'Failed';
|
|
1384
|
+
/**
|
|
1385
|
+
* The timestamp of the telemetry logging
|
|
1386
|
+
* @example 1648001893024
|
|
1387
|
+
*/
|
|
1388
|
+
readonly timestamp?: number;
|
|
1389
|
+
/**
|
|
1390
|
+
* The platform the command was executed on, reads from process.platform
|
|
1391
|
+
* @example darwin, win32, linux...
|
|
1392
|
+
*/
|
|
1393
|
+
readonly platform?: string;
|
|
1394
|
+
/**
|
|
1395
|
+
* The rush version
|
|
1396
|
+
* @example 5.63.0
|
|
1397
|
+
*/
|
|
1398
|
+
readonly rushVersion?: string;
|
|
1399
|
+
readonly extraData?: {
|
|
1400
|
+
[key: string]: string;
|
|
1401
|
+
};
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1072
1404
|
/**
|
|
1073
1405
|
* Options for `RushConfiguration.tryFindRushJsonLocation`.
|
|
1074
1406
|
* @public
|
|
@@ -1321,6 +1653,91 @@ export declare class NpmOptionsConfiguration extends PackageManagerOptionsConfig
|
|
|
1321
1653
|
constructor(json: _INpmOptionsJson);
|
|
1322
1654
|
}
|
|
1323
1655
|
|
|
1656
|
+
/**
|
|
1657
|
+
* The `Operation` class is a node in the dependency graph of work that needs to be scheduled by the
|
|
1658
|
+
* `OperationExecutionManager`. Each `Operation` has a `runner` member of type `IOperationRunner`, whose
|
|
1659
|
+
* implementation manages the actual process of running a single operation.
|
|
1660
|
+
*
|
|
1661
|
+
* The graph of `Operation` instances will be cloned into a separate execution graph after processing.
|
|
1662
|
+
*
|
|
1663
|
+
* @alpha
|
|
1664
|
+
*/
|
|
1665
|
+
export declare class Operation {
|
|
1666
|
+
/**
|
|
1667
|
+
* The Rush phase associated with this Operation, if any
|
|
1668
|
+
*/
|
|
1669
|
+
readonly associatedPhase: IPhase | undefined;
|
|
1670
|
+
/**
|
|
1671
|
+
* The Rush project associated with this Operation, if any
|
|
1672
|
+
*/
|
|
1673
|
+
readonly associatedProject: RushConfigurationProject | undefined;
|
|
1674
|
+
/**
|
|
1675
|
+
* A set of all dependencies which must be executed before this operation is complete.
|
|
1676
|
+
*/
|
|
1677
|
+
readonly dependencies: Set<Operation>;
|
|
1678
|
+
/**
|
|
1679
|
+
* When the scheduler is ready to process this `Operation`, the `runner` implements the actual work of
|
|
1680
|
+
* running the operation.
|
|
1681
|
+
*/
|
|
1682
|
+
runner: IOperationRunner | undefined;
|
|
1683
|
+
/**
|
|
1684
|
+
* The weight for this operation. This scalar is the contribution of this operation to the
|
|
1685
|
+
* `criticalPathLength` calculation above. Modify to indicate the following:
|
|
1686
|
+
* - `weight` === 1: indicates that this operation has an average duration
|
|
1687
|
+
* - `weight` > 1: indicates that this operation takes longer than average and so the scheduler
|
|
1688
|
+
* should try to favor starting it over other, shorter operations. An example might be an operation that
|
|
1689
|
+
* bundles an entire application and runs whole-program optimization.
|
|
1690
|
+
* - `weight` < 1: indicates that this operation takes less time than average and so the scheduler
|
|
1691
|
+
* should favor other, longer operations over it. An example might be an operation to unpack a cached
|
|
1692
|
+
* output, or an operation using NullOperationRunner, which might use a value of 0.
|
|
1693
|
+
*/
|
|
1694
|
+
weight: number;
|
|
1695
|
+
constructor(options?: IOperationOptions);
|
|
1696
|
+
/**
|
|
1697
|
+
* The name of this operation, for logging.
|
|
1698
|
+
*/
|
|
1699
|
+
get name(): string | undefined;
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
/**
|
|
1703
|
+
* Enumeration defining potential states of an operation
|
|
1704
|
+
* @beta
|
|
1705
|
+
*/
|
|
1706
|
+
export declare enum OperationStatus {
|
|
1707
|
+
/**
|
|
1708
|
+
* The Operation is on the queue, ready to execute (but may be waiting for dependencies)
|
|
1709
|
+
*/
|
|
1710
|
+
Ready = "READY",
|
|
1711
|
+
/**
|
|
1712
|
+
* The Operation is currently executing
|
|
1713
|
+
*/
|
|
1714
|
+
Executing = "EXECUTING",
|
|
1715
|
+
/**
|
|
1716
|
+
* The Operation completed successfully and did not write to standard output
|
|
1717
|
+
*/
|
|
1718
|
+
Success = "SUCCESS",
|
|
1719
|
+
/**
|
|
1720
|
+
* The Operation completed successfully, but wrote to standard output
|
|
1721
|
+
*/
|
|
1722
|
+
SuccessWithWarning = "SUCCESS WITH WARNINGS",
|
|
1723
|
+
/**
|
|
1724
|
+
* The Operation was skipped via the legacy incremental build logic
|
|
1725
|
+
*/
|
|
1726
|
+
Skipped = "SKIPPED",
|
|
1727
|
+
/**
|
|
1728
|
+
* The Operation had its outputs restored from the build cache
|
|
1729
|
+
*/
|
|
1730
|
+
FromCache = "FROM CACHE",
|
|
1731
|
+
/**
|
|
1732
|
+
* The Operation failed
|
|
1733
|
+
*/
|
|
1734
|
+
Failure = "FAILURE",
|
|
1735
|
+
/**
|
|
1736
|
+
* The Operation could not be executed because one or more of its dependencies failed
|
|
1737
|
+
*/
|
|
1738
|
+
Blocked = "BLOCKED"
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1324
1741
|
/**
|
|
1325
1742
|
* @public
|
|
1326
1743
|
*/
|
|
@@ -1434,6 +1851,24 @@ export declare abstract class PackageManagerOptionsConfigurationBase implements
|
|
|
1434
1851
|
protected constructor(json: IPackageManagerOptionsJsonBase);
|
|
1435
1852
|
}
|
|
1436
1853
|
|
|
1854
|
+
/**
|
|
1855
|
+
* Hooks into the execution process for phased commands
|
|
1856
|
+
* @alpha
|
|
1857
|
+
*/
|
|
1858
|
+
export declare class PhasedCommandHooks {
|
|
1859
|
+
/**
|
|
1860
|
+
* Hook invoked to create operations for execution.
|
|
1861
|
+
* Use the context to distinguish between the initial run and phased runs.
|
|
1862
|
+
*/
|
|
1863
|
+
readonly createOperations: AsyncSeriesWaterfallHook<[Set<Operation>, ICreateOperationsContext]>;
|
|
1864
|
+
/**
|
|
1865
|
+
* Hook invoked after a run has finished and the command is watching for changes.
|
|
1866
|
+
* May be used to display additional relevant data to the user.
|
|
1867
|
+
* Only relevant when running in watch mode.
|
|
1868
|
+
*/
|
|
1869
|
+
readonly waitingForChanges: SyncHook<void>;
|
|
1870
|
+
}
|
|
1871
|
+
|
|
1437
1872
|
/**
|
|
1438
1873
|
* Options that are only used when the PNPM package manager is selected.
|
|
1439
1874
|
*
|
|
@@ -1712,8 +2147,8 @@ export declare class RushConfiguration {
|
|
|
1712
2147
|
private _telemetryEnabled;
|
|
1713
2148
|
private _projects;
|
|
1714
2149
|
private _projectsByName;
|
|
1715
|
-
private
|
|
1716
|
-
private
|
|
2150
|
+
private _projectsByTag;
|
|
2151
|
+
private _commonVersionsConfigurationsByVariant;
|
|
1717
2152
|
private _versionPolicyConfiguration;
|
|
1718
2153
|
private _versionPolicyConfigurationFilePath;
|
|
1719
2154
|
private _experimentsConfiguration;
|
|
@@ -2024,6 +2459,11 @@ export declare class RushConfiguration {
|
|
|
2024
2459
|
get telemetryEnabled(): boolean;
|
|
2025
2460
|
get projects(): RushConfigurationProject[];
|
|
2026
2461
|
get projectsByName(): Map<string, RushConfigurationProject>;
|
|
2462
|
+
/**
|
|
2463
|
+
* Obtains the mapping from custom tags to projects.
|
|
2464
|
+
* @beta
|
|
2465
|
+
*/
|
|
2466
|
+
get projectsByTag(): ReadonlyMap<string, ReadonlySet<RushConfigurationProject>>;
|
|
2027
2467
|
/**
|
|
2028
2468
|
* {@inheritDoc NpmOptionsConfiguration}
|
|
2029
2469
|
*/
|
|
@@ -2155,7 +2595,6 @@ export declare class RushConfiguration {
|
|
|
2155
2595
|
* If the path is not under any project's folder, returns undefined.
|
|
2156
2596
|
*/
|
|
2157
2597
|
tryGetProjectForPath(currentFolderPath: string): RushConfigurationProject | undefined;
|
|
2158
|
-
private _collectVersionsForDependencies;
|
|
2159
2598
|
private _getVariantConfigFolderPath;
|
|
2160
2599
|
}
|
|
2161
2600
|
|
|
@@ -2181,6 +2620,7 @@ export declare class RushConfigurationProject {
|
|
|
2181
2620
|
private readonly _skipRushCheck;
|
|
2182
2621
|
private readonly _publishFolder;
|
|
2183
2622
|
private readonly _rushConfiguration;
|
|
2623
|
+
private readonly _tags;
|
|
2184
2624
|
private _versionPolicy;
|
|
2185
2625
|
private _dependencyProjects;
|
|
2186
2626
|
private _consumingProjects;
|
|
@@ -2328,6 +2768,11 @@ export declare class RushConfigurationProject {
|
|
|
2328
2768
|
* @beta
|
|
2329
2769
|
*/
|
|
2330
2770
|
get isMainProject(): boolean;
|
|
2771
|
+
/**
|
|
2772
|
+
* The set of tags applied to this project.
|
|
2773
|
+
* @beta
|
|
2774
|
+
*/
|
|
2775
|
+
get tags(): ReadonlySet<string>;
|
|
2331
2776
|
}
|
|
2332
2777
|
|
|
2333
2778
|
/**
|
|
@@ -2593,6 +3038,10 @@ export declare class RushLifecycleHooks {
|
|
|
2593
3038
|
* A hook map to allow plugins to hook specific named phased commands (defined in command-line.json) before execution.
|
|
2594
3039
|
*/
|
|
2595
3040
|
runPhasedCommand: HookMap<AsyncSeriesHook<IPhasedCommand>>;
|
|
3041
|
+
/**
|
|
3042
|
+
* A hook to allow plugins to hook custom logic to process telemetry data.
|
|
3043
|
+
*/
|
|
3044
|
+
flushTelemetry: AsyncParallelHook<[ReadonlyArray<ITelemetryData>]>;
|
|
2596
3045
|
}
|
|
2597
3046
|
|
|
2598
3047
|
declare class RushPluginsConfiguration {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/rush-sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.65.1",
|
|
4
4
|
"description": "An API for interacting with the Rush engine",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,10 +17,13 @@
|
|
|
17
17
|
"tapable": "2.2.1"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@microsoft/rush-lib": "5.
|
|
20
|
+
"@microsoft/rush-lib": "5.65.1",
|
|
21
21
|
"@rushstack/eslint-config": "2.5.2",
|
|
22
|
-
"@rushstack/heft": "0.44.
|
|
23
|
-
"@rushstack/heft-node-rig": "1.8.
|
|
22
|
+
"@rushstack/heft": "0.44.7",
|
|
23
|
+
"@rushstack/heft-node-rig": "1.8.5",
|
|
24
|
+
"@rushstack/stream-collator": "4.0.162",
|
|
25
|
+
"@rushstack/ts-command-line": "4.10.7",
|
|
26
|
+
"@rushstack/terminal": "0.3.31",
|
|
24
27
|
"@types/heft-jest": "1.0.1",
|
|
25
28
|
"@types/semver": "7.3.5",
|
|
26
29
|
"@types/webpack-env": "1.13.0"
|
|
@@ -30,5 +33,5 @@
|
|
|
30
33
|
"_phase:build": "heft build --clean",
|
|
31
34
|
"_phase:test": "heft test --no-build"
|
|
32
35
|
},
|
|
33
|
-
"readme": "## @rushstack/rush-sdk\n\nThis is a companion package for the Rush tool. See the [@microsoft/rush](https://www.npmjs.com/package/@microsoft/rush) package for details.\n\n⚠ ***THIS PACKAGE IS EXPERIMENTAL*** ⚠\n\nThe **@rushstack/rush-sdk** package acts as a lightweight proxy for accessing the APIs of the **@microsoft/rush-lib** engine. It is intended to support three different use cases:\n\n1. Rush plugins should import from **@rushstack/rush-sdk** instead of **@microsoft/rush-lib**. This gives plugins full access to Rush APIs while avoiding a redundant installation of those packages. At runtime, the APIs will be bound to the correct `rushVersion` from **rush.json**, and guaranteed to be the same **@microsoft/rush-lib** module instance as the plugin host.\n\n2. When authoring unit tests for a Rush plugin, developers should add **@microsoft/rush-lib** to their **package.json** `devDependencies`. In this context, **@rushstack/rush-sdk** will resolve to that instance for testing purposes.\n\n3. For scripts and tools that are designed to be used in a Rush monorepo, in the future **@rushstack/rush-sdk** will automatically invoke **install-run-rush.js** and load the local installation. This ensures that tools load a compatible version of the Rush engine for the given branch. Once this is implemented, **@rushstack/rush-sdk** can replace **@microsoft/rush-lib** entirely as the official API interface, with the latter serving as the underlying implementation.\n\n\nThe **@rushstack/rush-sdk** API declarations are identical to the corresponding version of **@microsoft/rush-lib**.\n\n## Debugging\n\nVerbose logging can be turn on by set environment variable `RUSH_SDK_DEBUG` to `1`\n\n\n## Links\n\n- [CHANGELOG.md](\n https://github.com/microsoft/rushstack/blob/master/apps/rush/CHANGELOG.md) - Find\n out what's new in the latest version\n- [API Reference](https://rushstack.io/pages/
|
|
36
|
+
"readme": "## @rushstack/rush-sdk\n\nThis is a companion package for the Rush tool. See the [@microsoft/rush](https://www.npmjs.com/package/@microsoft/rush) package for details.\n\n⚠ ***THIS PACKAGE IS EXPERIMENTAL*** ⚠\n\nThe **@rushstack/rush-sdk** package acts as a lightweight proxy for accessing the APIs of the **@microsoft/rush-lib** engine. It is intended to support three different use cases:\n\n1. Rush plugins should import from **@rushstack/rush-sdk** instead of **@microsoft/rush-lib**. This gives plugins full access to Rush APIs while avoiding a redundant installation of those packages. At runtime, the APIs will be bound to the correct `rushVersion` from **rush.json**, and guaranteed to be the same **@microsoft/rush-lib** module instance as the plugin host.\n\n2. When authoring unit tests for a Rush plugin, developers should add **@microsoft/rush-lib** to their **package.json** `devDependencies`. In this context, **@rushstack/rush-sdk** will resolve to that instance for testing purposes.\n\n3. For scripts and tools that are designed to be used in a Rush monorepo, in the future **@rushstack/rush-sdk** will automatically invoke **install-run-rush.js** and load the local installation. This ensures that tools load a compatible version of the Rush engine for the given branch. Once this is implemented, **@rushstack/rush-sdk** can replace **@microsoft/rush-lib** entirely as the official API interface, with the latter serving as the underlying implementation.\n\n\nThe **@rushstack/rush-sdk** API declarations are identical to the corresponding version of **@microsoft/rush-lib**.\n\n## Debugging\n\nVerbose logging can be turn on by set environment variable `RUSH_SDK_DEBUG` to `1`\n\n\n## Links\n\n- [CHANGELOG.md](\n https://github.com/microsoft/rushstack/blob/master/apps/rush/CHANGELOG.md) - Find\n out what's new in the latest version\n- [API Reference](https://api.rushstack.io/pages/rush-lib/)\n\nRush is part of the [Rush Stack](https://rushstack.io/) family of projects.\n"
|
|
34
37
|
}
|