@rushstack/rush-sdk 5.170.1-pr5378.0 → 5.171.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 +132 -457
- package/lib-commonjs/{logic/operations → cli/parsing}/ParseParallelism.js +1 -2
- package/lib-commonjs/index.js +0 -1
- package/lib-commonjs/logic/operations/OperationExecutionManager.js +3 -0
- package/lib-commonjs/logic/operations/OperationStatus.js +0 -1
- package/lib-commonjs/logic/operations/WeightedOperationPlugin.js +3 -0
- package/lib-dts/api/CommandLineConfiguration.d.ts +0 -7
- package/lib-dts/api/CommandLineJson.d.ts +0 -1
- package/lib-dts/api/EventHooks.d.ts +1 -1
- package/lib-dts/cli/parsing/ParseParallelism.d.ts +17 -0
- package/lib-dts/cli/parsing/SelectionParameterSet.d.ts +1 -1
- package/lib-dts/cli/scriptActions/PhasedScriptAction.d.ts +12 -2
- package/lib-dts/index.d.ts +4 -7
- package/lib-dts/logic/ProjectWatcher.d.ts +42 -64
- package/lib-dts/logic/buildCache/OperationBuildCache.d.ts +2 -2
- package/lib-dts/logic/operations/IOperationExecutionResult.d.ts +16 -57
- package/lib-dts/logic/operations/IOperationRunner.d.ts +2 -32
- package/lib-dts/logic/operations/IPCOperationRunner.d.ts +8 -8
- package/lib-dts/logic/operations/Operation.d.ts +14 -50
- package/lib-dts/logic/operations/OperationExecutionManager.d.ts +60 -0
- package/lib-dts/logic/operations/OperationExecutionRecord.d.ts +9 -21
- package/lib-dts/logic/operations/OperationStatus.d.ts +0 -4
- package/lib-dts/logic/operations/ShellOperationRunner.d.ts +5 -6
- package/lib-dts/logic/operations/ShellOperationRunnerPlugin.d.ts +1 -2
- package/lib-dts/logic/operations/ValidateOperationsPlugin.d.ts +3 -1
- package/lib-dts/logic/operations/WeightedOperationPlugin.d.ts +10 -0
- package/lib-dts/pluginFramework/PhasedCommandHooks.d.ts +98 -32
- package/lib-dts/utilities/Stopwatch.d.ts +2 -2
- package/lib-shim/index.js +0 -1
- package/package.json +8 -8
- package/lib-commonjs/logic/operations/IOperationGraph.js +0 -2
- package/lib-commonjs/logic/operations/OperationGraph.js +0 -3
- package/lib-commonjs/pluginFramework/OperationGraphHooks.js +0 -3
- package/lib-dts/logic/operations/IOperationGraph.d.ts +0 -137
- package/lib-dts/logic/operations/OperationGraph.d.ts +0 -125
- package/lib-dts/logic/operations/ParseParallelism.d.ts +0 -33
- package/lib-dts/pluginFramework/OperationGraphHooks.d.ts +0 -129
package/dist/rush-lib.d.ts
CHANGED
|
@@ -31,7 +31,6 @@ import type { StdioSummarizer } from '@rushstack/terminal';
|
|
|
31
31
|
import { SyncHook } from 'tapable';
|
|
32
32
|
import { SyncWaterfallHook } from 'tapable';
|
|
33
33
|
import { Terminal } from '@rushstack/terminal';
|
|
34
|
-
import type { TerminalWritable } from '@rushstack/terminal';
|
|
35
34
|
|
|
36
35
|
/**
|
|
37
36
|
* This represents the JSON file specified via the "approvedPackagesFile" option in rush.json.
|
|
@@ -883,7 +882,7 @@ export declare const EnvironmentVariableNames: {
|
|
|
883
882
|
};
|
|
884
883
|
|
|
885
884
|
/**
|
|
886
|
-
* Events happen during Rush
|
|
885
|
+
* Events happen during Rush runs.
|
|
887
886
|
* @beta
|
|
888
887
|
*/
|
|
889
888
|
declare enum Event_2 {
|
|
@@ -1055,31 +1054,6 @@ declare interface IBaseBuildCacheJson {
|
|
|
1055
1054
|
cacheHashSalt?: string;
|
|
1056
1055
|
}
|
|
1057
1056
|
|
|
1058
|
-
/**
|
|
1059
|
-
* @alpha
|
|
1060
|
-
*/
|
|
1061
|
-
export declare interface IBaseOperationExecutionResult {
|
|
1062
|
-
/**
|
|
1063
|
-
* The operation itself
|
|
1064
|
-
*/
|
|
1065
|
-
readonly operation: Operation;
|
|
1066
|
-
/**
|
|
1067
|
-
* The relative path to the folder that contains operation metadata. This folder will be automatically included in cache entries.
|
|
1068
|
-
*/
|
|
1069
|
-
readonly metadataFolderPath: string;
|
|
1070
|
-
/**
|
|
1071
|
-
* Gets the hash of the state of all registered inputs to this operation.
|
|
1072
|
-
* Calling this method will throw if Git is not available.
|
|
1073
|
-
*/
|
|
1074
|
-
getStateHash(): string;
|
|
1075
|
-
/**
|
|
1076
|
-
* Gets the structured components of the state hash. This is useful for debugging and
|
|
1077
|
-
* incremental change detection.
|
|
1078
|
-
* Calling this method will throw if Git is not available.
|
|
1079
|
-
*/
|
|
1080
|
-
getStateHashComponents(): IOperationStateHashComponents;
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
1057
|
/**
|
|
1084
1058
|
* @beta
|
|
1085
1059
|
*/
|
|
@@ -1220,18 +1194,6 @@ export declare interface ICobuildLockProvider {
|
|
|
1220
1194
|
getCompletedStateAsync(context: Readonly<ICobuildContext>): Promise<ICobuildCompletedState | undefined>;
|
|
1221
1195
|
}
|
|
1222
1196
|
|
|
1223
|
-
/**
|
|
1224
|
-
* The `IConfigurableOperation` interface represents an {@link Operation} whose
|
|
1225
|
-
* execution can be configured before running.
|
|
1226
|
-
* @alpha
|
|
1227
|
-
*/
|
|
1228
|
-
export declare interface IConfigurableOperation extends IBaseOperationExecutionResult {
|
|
1229
|
-
/**
|
|
1230
|
-
* True if the operation should execute in this iteration, false otherwise.
|
|
1231
|
-
*/
|
|
1232
|
-
enabled: boolean;
|
|
1233
|
-
}
|
|
1234
|
-
|
|
1235
1197
|
/**
|
|
1236
1198
|
* A collection of environment variables
|
|
1237
1199
|
* @public
|
|
@@ -1284,15 +1246,16 @@ export declare interface ICreateOperationsContext {
|
|
|
1284
1246
|
* Maps from the `longName` field in command-line.json to the parser configuration in ts-command-line.
|
|
1285
1247
|
*/
|
|
1286
1248
|
readonly customParameters: ReadonlyMap<string, CommandLineParameter>;
|
|
1287
|
-
/**
|
|
1288
|
-
* If true, dependencies of the selected phases will be automatically enabled in the execution.
|
|
1289
|
-
*/
|
|
1290
|
-
readonly includePhaseDeps: boolean;
|
|
1291
1249
|
/**
|
|
1292
1250
|
* If true, projects may read their output from cache or be skipped if already up to date.
|
|
1293
1251
|
* If false, neither of the above may occur, e.g. "rush rebuild"
|
|
1294
1252
|
*/
|
|
1295
1253
|
readonly isIncrementalBuildAllowed: boolean;
|
|
1254
|
+
/**
|
|
1255
|
+
* If true, this is the initial run of the command.
|
|
1256
|
+
* If false, this execution is in response to changes.
|
|
1257
|
+
*/
|
|
1258
|
+
readonly isInitial: boolean;
|
|
1296
1259
|
/**
|
|
1297
1260
|
* If true, the command is running in watch mode.
|
|
1298
1261
|
*/
|
|
@@ -1300,28 +1263,45 @@ export declare interface ICreateOperationsContext {
|
|
|
1300
1263
|
/**
|
|
1301
1264
|
* The currently configured maximum parallelism for the command.
|
|
1302
1265
|
*/
|
|
1303
|
-
readonly parallelism:
|
|
1266
|
+
readonly parallelism: number;
|
|
1304
1267
|
/**
|
|
1305
|
-
* The set of phases
|
|
1268
|
+
* The set of phases original for the current command execution.
|
|
1306
1269
|
*/
|
|
1307
|
-
readonly
|
|
1270
|
+
readonly phaseOriginal: ReadonlySet<IPhase>;
|
|
1308
1271
|
/**
|
|
1309
|
-
*
|
|
1272
|
+
* The set of phases selected for the current command execution.
|
|
1310
1273
|
*/
|
|
1311
|
-
readonly
|
|
1274
|
+
readonly phaseSelection: ReadonlySet<IPhase>;
|
|
1312
1275
|
/**
|
|
1313
|
-
* The set of Rush projects selected for execution.
|
|
1276
|
+
* The set of Rush projects selected for the current command execution.
|
|
1314
1277
|
*/
|
|
1315
1278
|
readonly projectSelection: ReadonlySet<RushConfigurationProject>;
|
|
1316
1279
|
/**
|
|
1317
|
-
*
|
|
1318
|
-
* Only the projects in projectSelection should start enabled; others are present but disabled.
|
|
1280
|
+
* All successfully loaded rush-project.json data for selected projects.
|
|
1319
1281
|
*/
|
|
1320
|
-
readonly
|
|
1282
|
+
readonly projectConfigurations: ReadonlyMap<RushConfigurationProject, RushProjectConfiguration>;
|
|
1283
|
+
/**
|
|
1284
|
+
* The set of Rush projects that have not been built in the current process since they were last modified.
|
|
1285
|
+
* When `isInitial` is true, this will be an exact match of `projectSelection`.
|
|
1286
|
+
*/
|
|
1287
|
+
readonly projectsInUnknownState: ReadonlySet<RushConfigurationProject>;
|
|
1321
1288
|
/**
|
|
1322
1289
|
* The Rush configuration
|
|
1323
1290
|
*/
|
|
1324
1291
|
readonly rushConfiguration: RushConfiguration;
|
|
1292
|
+
/**
|
|
1293
|
+
* If true, Rush will automatically include the dependent phases for the specified set of phases.
|
|
1294
|
+
* @remarks
|
|
1295
|
+
* If the selection of projects was "unsafe" (i.e. missing some dependencies), this will add the
|
|
1296
|
+
* minimum number of phases required to make it safe.
|
|
1297
|
+
*/
|
|
1298
|
+
readonly includePhaseDeps: boolean;
|
|
1299
|
+
/**
|
|
1300
|
+
* Marks an operation's result as invalid, potentially triggering a new build. Only applicable in watch mode.
|
|
1301
|
+
* @param operation - The operation to invalidate
|
|
1302
|
+
* @param reason - The reason for invalidating the operation
|
|
1303
|
+
*/
|
|
1304
|
+
readonly invalidateOperation?: ((operation: Operation, reason: string) => void) | undefined;
|
|
1325
1305
|
}
|
|
1326
1306
|
|
|
1327
1307
|
export { ICredentialCacheEntry }
|
|
@@ -1419,6 +1399,22 @@ declare interface IEventHooksJson {
|
|
|
1419
1399
|
postRushBuild?: string[];
|
|
1420
1400
|
}
|
|
1421
1401
|
|
|
1402
|
+
/**
|
|
1403
|
+
* Context used for executing operations.
|
|
1404
|
+
* @alpha
|
|
1405
|
+
*/
|
|
1406
|
+
export declare interface IExecuteOperationsContext extends ICreateOperationsContext {
|
|
1407
|
+
/**
|
|
1408
|
+
* The current state of the repository, if available.
|
|
1409
|
+
* Not part of the creation context to avoid the overhead of Git calls when initializing the graph.
|
|
1410
|
+
*/
|
|
1411
|
+
readonly inputsSnapshot?: IInputsSnapshot;
|
|
1412
|
+
/**
|
|
1413
|
+
* An abort controller that can be used to abort the current set of queued operations.
|
|
1414
|
+
*/
|
|
1415
|
+
readonly abortController: AbortController;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1422
1418
|
/**
|
|
1423
1419
|
* The `IExecutionResult` interface represents the results of executing a set of {@link Operation}s.
|
|
1424
1420
|
* @alpha
|
|
@@ -1836,7 +1832,11 @@ export declare interface _IOperationBuildCacheOptions {
|
|
|
1836
1832
|
* The `IOperationExecutionResult` interface represents the results of executing an {@link Operation}.
|
|
1837
1833
|
* @alpha
|
|
1838
1834
|
*/
|
|
1839
|
-
export declare interface IOperationExecutionResult
|
|
1835
|
+
export declare interface IOperationExecutionResult {
|
|
1836
|
+
/**
|
|
1837
|
+
* The operation itself
|
|
1838
|
+
*/
|
|
1839
|
+
readonly operation: Operation;
|
|
1840
1840
|
/**
|
|
1841
1841
|
* The current execution status of an operation. Operations start in the 'ready' state,
|
|
1842
1842
|
* but can be 'blocked' if an upstream operation failed. It is 'executing' when
|
|
@@ -1853,10 +1853,6 @@ export declare interface IOperationExecutionResult extends IBaseOperationExecuti
|
|
|
1853
1853
|
* If this operation is only present in the graph to maintain dependency relationships, this flag will be set to true.
|
|
1854
1854
|
*/
|
|
1855
1855
|
readonly silent: boolean;
|
|
1856
|
-
/**
|
|
1857
|
-
* True if the operation should execute in this iteration, false otherwise.
|
|
1858
|
-
*/
|
|
1859
|
-
readonly enabled: boolean;
|
|
1860
1856
|
/**
|
|
1861
1857
|
* Object tracking execution timing.
|
|
1862
1858
|
*/
|
|
@@ -1874,164 +1870,23 @@ export declare interface IOperationExecutionResult extends IBaseOperationExecuti
|
|
|
1874
1870
|
*/
|
|
1875
1871
|
readonly nonCachedDurationMs: number | undefined;
|
|
1876
1872
|
/**
|
|
1877
|
-
* The
|
|
1878
|
-
*/
|
|
1879
|
-
readonly logFilePaths: ILogFilePaths | undefined;
|
|
1880
|
-
}
|
|
1881
|
-
|
|
1882
|
-
/**
|
|
1883
|
-
* Public API for the operation graph.
|
|
1884
|
-
* @alpha
|
|
1885
|
-
*/
|
|
1886
|
-
export declare interface IOperationGraph {
|
|
1887
|
-
/**
|
|
1888
|
-
* Hooks into the execution process for operations
|
|
1889
|
-
*/
|
|
1890
|
-
readonly hooks: OperationGraphHooks;
|
|
1891
|
-
/**
|
|
1892
|
-
* The set of operations in the graph.
|
|
1893
|
-
*/
|
|
1894
|
-
readonly operations: ReadonlySet<Operation>;
|
|
1895
|
-
/**
|
|
1896
|
-
* A map from each `Operation` in the graph to its current result record.
|
|
1897
|
-
* The map is updated in real time as operations execute during an iteration.
|
|
1898
|
-
* Only statuses representing a completed execution (e.g. `Success`, `Failure`,
|
|
1899
|
-
* `SuccessWithWarning`) write to this map; statuses such as `Skipped` or `Aborted` —
|
|
1900
|
-
* which indicate that an operation did not actually run — do not update it.
|
|
1901
|
-
* For operations that have not yet run in the current iteration, the map retains the
|
|
1902
|
-
* result from whichever prior iteration the operation last ran in.
|
|
1903
|
-
* An entry with status `Ready` indicates that the operation is considered stale and
|
|
1904
|
-
* has been queued to run again.
|
|
1905
|
-
* Empty until at least one operation has completed execution.
|
|
1906
|
-
*/
|
|
1907
|
-
readonly resultByOperation: ReadonlyMap<Operation, IOperationExecutionResult>;
|
|
1908
|
-
/**
|
|
1909
|
-
* The maximum allowed parallelism for this operation graph.
|
|
1910
|
-
* Reads as a concrete integer. Accepts a `Parallelism` value and coerces it on write.
|
|
1911
|
-
*/
|
|
1912
|
-
get parallelism(): number;
|
|
1913
|
-
set parallelism(value: Parallelism);
|
|
1914
|
-
/**
|
|
1915
|
-
* If additional debug information should be printed during execution.
|
|
1916
|
-
*/
|
|
1917
|
-
debugMode: boolean;
|
|
1918
|
-
/**
|
|
1919
|
-
* If true, operations will be executed in "quiet mode" where only errors are reported.
|
|
1920
|
-
*/
|
|
1921
|
-
quietMode: boolean;
|
|
1922
|
-
/**
|
|
1923
|
-
* If true, allow operations to oversubscribe the CPU. Defaults to true.
|
|
1924
|
-
*/
|
|
1925
|
-
allowOversubscription: boolean;
|
|
1926
|
-
/**
|
|
1927
|
-
* When true, the operation graph will pause before running the next iteration (manual mode).
|
|
1928
|
-
* When false, iterations run automatically when scheduled.
|
|
1929
|
-
*/
|
|
1930
|
-
pauseNextIteration: boolean;
|
|
1931
|
-
/**
|
|
1932
|
-
* The current overall status of the execution.
|
|
1933
|
-
*/
|
|
1934
|
-
readonly status: OperationStatus;
|
|
1935
|
-
/**
|
|
1936
|
-
* The current set of terminal destinations.
|
|
1937
|
-
*/
|
|
1938
|
-
readonly terminalDestinations: ReadonlySet<TerminalWritable>;
|
|
1939
|
-
/**
|
|
1940
|
-
* True if there is a scheduled (but not yet executing) iteration.
|
|
1941
|
-
* This will be false while an iteration is actively executing, or when no work is scheduled.
|
|
1942
|
-
*/
|
|
1943
|
-
readonly hasScheduledIteration: boolean;
|
|
1944
|
-
/**
|
|
1945
|
-
* AbortController controlling the lifetime of the overall session (e.g. watch mode).
|
|
1946
|
-
* Aborting this controller should signal all listeners (such as file system watchers) to dispose
|
|
1947
|
-
* and prevent further iterations from being scheduled.
|
|
1948
|
-
*/
|
|
1949
|
-
readonly abortController: AbortController;
|
|
1950
|
-
/**
|
|
1951
|
-
* Abort the current execution iteration, if any. Operations that have already started
|
|
1952
|
-
* will run to completion; only operations that have not yet begun will be aborted.
|
|
1953
|
-
*/
|
|
1954
|
-
abortCurrentIterationAsync(): Promise<void>;
|
|
1955
|
-
/**
|
|
1956
|
-
* Cleans up any resources used by the operation runners, if applicable.
|
|
1957
|
-
* @param operations - The operations whose runners should be closed, or undefined to close all runners.
|
|
1958
|
-
*/
|
|
1959
|
-
closeRunnersAsync(operations?: Iterable<Operation>): Promise<void>;
|
|
1960
|
-
/**
|
|
1961
|
-
* Executes a single iteration of the operations.
|
|
1962
|
-
* @param options - Options for this execution iteration.
|
|
1963
|
-
* @returns A promise that resolves to true if the iteration has work to be done, or false if the iteration was empty and therefore not scheduled.
|
|
1964
|
-
*/
|
|
1965
|
-
scheduleIterationAsync(options: IOperationGraphIterationOptions): Promise<boolean>;
|
|
1966
|
-
/**
|
|
1967
|
-
* Executes all operations in the currently scheduled iteration, if any.
|
|
1968
|
-
* @returns A promise which is resolved when all operations have been processed to a final state.
|
|
1969
|
-
*/
|
|
1970
|
-
executeScheduledIterationAsync(): Promise<boolean>;
|
|
1971
|
-
/**
|
|
1972
|
-
* Invalidates the specified operations, causing them to be re-executed.
|
|
1973
|
-
* @param operations - The operations to invalidate, or undefined to invalidate all operations.
|
|
1974
|
-
* @param reason - Optional reason for invalidation.
|
|
1975
|
-
*/
|
|
1976
|
-
invalidateOperations(operations?: Iterable<Operation>, reason?: string): void;
|
|
1977
|
-
/**
|
|
1978
|
-
* Sets the enabled state for a collection of operations.
|
|
1979
|
-
*
|
|
1980
|
-
* @param operations - The operations whose enabled state should be updated.
|
|
1981
|
-
* @param targetState - The target enabled state to apply.
|
|
1982
|
-
* @param mode - 'unsafe' to directly mutate only the provided operations, 'safe' to also enable
|
|
1983
|
-
* transitive dependencies of enabled operations and disable transitive dependents of disabled operations.
|
|
1984
|
-
* @returns true if any operation's enabled state changed, false otherwise.
|
|
1985
|
-
*/
|
|
1986
|
-
setEnabledStates(operations: Iterable<Operation>, targetState: Operation['enabled'], mode: 'safe' | 'unsafe'): boolean;
|
|
1987
|
-
/**
|
|
1988
|
-
* Adds a terminal destination for output. Only new output will be sent to the destination.
|
|
1989
|
-
* @param destination - The destination to add.
|
|
1990
|
-
*/
|
|
1991
|
-
addTerminalDestination(destination: TerminalWritable): void;
|
|
1992
|
-
/**
|
|
1993
|
-
* Removes a terminal destination for output. Optionally closes the stream.
|
|
1994
|
-
* New output will no longer be sent to the destination.
|
|
1995
|
-
* @param destination - The destination to remove.
|
|
1996
|
-
* @param close - Whether to close the stream. Defaults to `true`.
|
|
1873
|
+
* The relative path to the folder that contains operation metadata. This folder will be automatically included in cache entries.
|
|
1997
1874
|
*/
|
|
1998
|
-
|
|
1999
|
-
}
|
|
2000
|
-
|
|
2001
|
-
/**
|
|
2002
|
-
* Context used for configuring the operation graph.
|
|
2003
|
-
* @alpha
|
|
2004
|
-
*/
|
|
2005
|
-
export declare interface IOperationGraphContext extends ICreateOperationsContext {
|
|
1875
|
+
readonly metadataFolderPath: string | undefined;
|
|
2006
1876
|
/**
|
|
2007
|
-
* The
|
|
2008
|
-
* Not part of the creation context to avoid the overhead of Git calls when initializing the graph.
|
|
1877
|
+
* The paths to the log files, if applicable.
|
|
2009
1878
|
*/
|
|
2010
|
-
readonly
|
|
2011
|
-
}
|
|
2012
|
-
|
|
2013
|
-
/**
|
|
2014
|
-
* Options for a single iteration of operation execution.
|
|
2015
|
-
* @alpha
|
|
2016
|
-
*/
|
|
2017
|
-
export declare interface IOperationGraphIterationOptions {
|
|
2018
|
-
inputsSnapshot?: IInputsSnapshot;
|
|
1879
|
+
readonly logFilePaths: ILogFilePaths | undefined;
|
|
2019
1880
|
/**
|
|
2020
|
-
*
|
|
1881
|
+
* Gets the hash of the state of all registered inputs to this operation.
|
|
1882
|
+
* Calling this method will throw if Git is not available.
|
|
2021
1883
|
*/
|
|
2022
|
-
|
|
2023
|
-
}
|
|
2024
|
-
|
|
2025
|
-
/**
|
|
2026
|
-
* A snapshot of a previous operation execution, passed to runners to inform incremental behavior.
|
|
2027
|
-
*
|
|
2028
|
-
* @beta
|
|
2029
|
-
*/
|
|
2030
|
-
export declare interface IOperationLastState {
|
|
1884
|
+
getStateHash(): string;
|
|
2031
1885
|
/**
|
|
2032
|
-
*
|
|
1886
|
+
* Gets the components of the state hash. This is useful for debugging purposes.
|
|
1887
|
+
* Calling this method will throw if Git is not available.
|
|
2033
1888
|
*/
|
|
2034
|
-
|
|
1889
|
+
getStateHashComponents(): ReadonlyArray<string>;
|
|
2035
1890
|
}
|
|
2036
1891
|
|
|
2037
1892
|
/**
|
|
@@ -2066,18 +1921,6 @@ export declare interface IOperationOptions {
|
|
|
2066
1921
|
* The Rush project associated with this Operation
|
|
2067
1922
|
*/
|
|
2068
1923
|
project: RushConfigurationProject;
|
|
2069
|
-
/**
|
|
2070
|
-
* If set to false, this operation will be skipped during evaluation (return OperationStatus.Skipped).
|
|
2071
|
-
* This is useful for plugins to alter the scope of the operation graph across executions,
|
|
2072
|
-
* e.g. to enable or disable unit test execution, or to include or exclude dependencies.
|
|
2073
|
-
*
|
|
2074
|
-
* The special value "ignore-dependency-changes" can be used to indicate that this operation should only
|
|
2075
|
-
* be executed if there are local changes in the project. This is useful for operations like
|
|
2076
|
-
* "test" where you may want to skip testing projects that haven't changed.
|
|
2077
|
-
*
|
|
2078
|
-
* The default value is `true`, meaning the operation will be executed if it or any dependencies change.
|
|
2079
|
-
*/
|
|
2080
|
-
enabled?: OperationEnabledState;
|
|
2081
1924
|
/**
|
|
2082
1925
|
* When the scheduler is ready to process this `Operation`, the `runner` implements the actual work of
|
|
2083
1926
|
* running the operation.
|
|
@@ -2095,7 +1938,7 @@ export declare interface IOperationOptions {
|
|
|
2095
1938
|
|
|
2096
1939
|
/**
|
|
2097
1940
|
* The `Operation` class is a node in the dependency graph of work that needs to be scheduled by the
|
|
2098
|
-
* `
|
|
1941
|
+
* `OperationExecutionManager`. Each `Operation` has a `runner` member of type `IOperationRunner`, whose
|
|
2099
1942
|
* implementation manages the actual process for running a single operation.
|
|
2100
1943
|
*
|
|
2101
1944
|
* @beta
|
|
@@ -2127,27 +1970,14 @@ export declare interface IOperationRunner {
|
|
|
2127
1970
|
* analysis purposes.
|
|
2128
1971
|
*/
|
|
2129
1972
|
readonly isNoOp?: boolean;
|
|
2130
|
-
/**
|
|
2131
|
-
* If true, this runner currently owns some kind of active resource (e.g. a service or a watch process).
|
|
2132
|
-
* This can be used to determine if the operation is "in progress" even if it is not currently executing.
|
|
2133
|
-
* If the runner supports this property, it should update it as appropriate during execution.
|
|
2134
|
-
* The property is optional to avoid breaking existing implementations of IOperationRunner.
|
|
2135
|
-
*/
|
|
2136
|
-
readonly isActive?: boolean;
|
|
2137
1973
|
/**
|
|
2138
1974
|
* Method to be executed for the operation.
|
|
2139
|
-
* @param context - The context object containing information about the execution environment.
|
|
2140
|
-
* @param lastState - The last execution result of this operation, if any.
|
|
2141
1975
|
*/
|
|
2142
|
-
executeAsync(context: IOperationRunnerContext
|
|
1976
|
+
executeAsync(context: IOperationRunnerContext): Promise<OperationStatus>;
|
|
2143
1977
|
/**
|
|
2144
1978
|
* Return a hash of the configuration that affects the operation.
|
|
2145
1979
|
*/
|
|
2146
1980
|
getConfigHash(): string;
|
|
2147
|
-
/**
|
|
2148
|
-
* If this runner performs any background work to optimize future runs, this method will clean it up.
|
|
2149
|
-
*/
|
|
2150
|
-
closeAsync?(): Promise<void>;
|
|
2151
1981
|
}
|
|
2152
1982
|
|
|
2153
1983
|
/**
|
|
@@ -2195,12 +2025,6 @@ export declare interface IOperationRunnerContext {
|
|
|
2195
2025
|
* it later (for example to re-print errors at end of execution).
|
|
2196
2026
|
*/
|
|
2197
2027
|
error?: Error;
|
|
2198
|
-
/**
|
|
2199
|
-
* Returns a callback that invalidates this operation so that it will be re-executed in the next iteration.
|
|
2200
|
-
* The returned callback captures only the minimal state needed, avoiding retention of the full context.
|
|
2201
|
-
* Callers should store the result rather than calling this method repeatedly.
|
|
2202
|
-
*/
|
|
2203
|
-
getInvalidateCallback(): (reason: string) => void;
|
|
2204
2028
|
/**
|
|
2205
2029
|
* Invokes the specified callback with a terminal that is associated with this operation.
|
|
2206
2030
|
*
|
|
@@ -2308,26 +2132,6 @@ export declare interface _IOperationStateFileOptions {
|
|
|
2308
2132
|
metadataFolder: string;
|
|
2309
2133
|
}
|
|
2310
2134
|
|
|
2311
|
-
/**
|
|
2312
|
-
* Structured components of the state hash for an operation.
|
|
2313
|
-
* @alpha
|
|
2314
|
-
*/
|
|
2315
|
-
export declare interface IOperationStateHashComponents {
|
|
2316
|
-
/**
|
|
2317
|
-
* The state hashes of operation dependencies, sorted by name.
|
|
2318
|
-
* Each entry is of the form `{dependencyName}={hash}`.
|
|
2319
|
-
*/
|
|
2320
|
-
readonly dependencies: readonly string[];
|
|
2321
|
-
/**
|
|
2322
|
-
* The hash of the operation's own local inputs (e.g. tracked files, environment variables).
|
|
2323
|
-
*/
|
|
2324
|
-
readonly local: string;
|
|
2325
|
-
/**
|
|
2326
|
-
* The hash of the operation's configuration (e.g. CLI parameters).
|
|
2327
|
-
*/
|
|
2328
|
-
readonly config: string;
|
|
2329
|
-
}
|
|
2330
|
-
|
|
2331
2135
|
/**
|
|
2332
2136
|
* @internal
|
|
2333
2137
|
*/
|
|
@@ -2348,14 +2152,6 @@ export declare interface IPackageManagerOptionsJsonBase {
|
|
|
2348
2152
|
environmentVariables?: IConfigurationEnvironment;
|
|
2349
2153
|
}
|
|
2350
2154
|
|
|
2351
|
-
/**
|
|
2352
|
-
* A parallelism value expressed as a fraction of total available concurrency slots.
|
|
2353
|
-
* @beta
|
|
2354
|
-
*/
|
|
2355
|
-
export declare interface IParallelismScalar {
|
|
2356
|
-
readonly scalar: number;
|
|
2357
|
-
}
|
|
2358
|
-
|
|
2359
2155
|
/**
|
|
2360
2156
|
* Metadata about a phase.
|
|
2361
2157
|
* @alpha
|
|
@@ -2431,17 +2227,6 @@ export declare interface IPhasedCommand extends IRushCommand {
|
|
|
2431
2227
|
readonly sessionAbortController: AbortController;
|
|
2432
2228
|
}
|
|
2433
2229
|
|
|
2434
|
-
/**
|
|
2435
|
-
* A plugin that interacts with a phased commands.
|
|
2436
|
-
* @alpha
|
|
2437
|
-
*/
|
|
2438
|
-
export declare interface IPhasedCommandPlugin {
|
|
2439
|
-
/**
|
|
2440
|
-
* Applies this plugin.
|
|
2441
|
-
*/
|
|
2442
|
-
apply(hooks: PhasedCommandHooks): void;
|
|
2443
|
-
}
|
|
2444
|
-
|
|
2445
2230
|
/**
|
|
2446
2231
|
* Possible values for the `pnpmLockfilePolicies` setting in Rush's pnpm-config.json file.
|
|
2447
2232
|
* @public
|
|
@@ -3169,7 +2954,7 @@ export declare class NpmOptionsConfiguration extends PackageManagerOptionsConfig
|
|
|
3169
2954
|
|
|
3170
2955
|
/**
|
|
3171
2956
|
* The `Operation` class is a node in the dependency graph of work that needs to be scheduled by the
|
|
3172
|
-
* `
|
|
2957
|
+
* `OperationExecutionManager`. Each `Operation` has a `runner` member of type `IOperationRunner`, whose
|
|
3173
2958
|
* implementation manages the actual process of running a single operation.
|
|
3174
2959
|
*
|
|
3175
2960
|
* The graph of `Operation` instances will be cloned into a separate execution graph after processing.
|
|
@@ -3205,23 +2990,17 @@ export declare class Operation {
|
|
|
3205
2990
|
*/
|
|
3206
2991
|
runner: IOperationRunner | undefined;
|
|
3207
2992
|
/**
|
|
3208
|
-
* The
|
|
3209
|
-
*
|
|
3210
|
-
*
|
|
3211
|
-
*
|
|
3212
|
-
*
|
|
3213
|
-
*
|
|
3214
|
-
*
|
|
3215
|
-
*
|
|
3216
|
-
*
|
|
3217
|
-
* Coerced values guide scheduling as follows:
|
|
3218
|
-
* - `1` slot: typical operation consuming one logical thread.
|
|
3219
|
-
* - `> 1` slots: operation that spawns multiple threads or requires significant RAM; reserving
|
|
3220
|
-
* extra slots prevents overloading the machine (e.g. a whole-program bundler or a test suite
|
|
3221
|
-
* that runs its own internal parallelism).
|
|
3222
|
-
* - `0` slots: effectively free (e.g. a no-op or cache-restore step).
|
|
2993
|
+
* The weight for this operation. This scalar is the contribution of this operation to the
|
|
2994
|
+
* `criticalPathLength` calculation above. Modify to indicate the following:
|
|
2995
|
+
* - `weight` === 1: indicates that this operation has an average duration
|
|
2996
|
+
* - `weight` > 1: indicates that this operation takes longer than average and so the scheduler
|
|
2997
|
+
* should try to favor starting it over other, shorter operations. An example might be an operation that
|
|
2998
|
+
* bundles an entire application and runs whole-program optimization.
|
|
2999
|
+
* - `weight` < 1: indicates that this operation takes less time than average and so the scheduler
|
|
3000
|
+
* should favor other, longer operations over it. An example might be an operation to unpack a cached
|
|
3001
|
+
* output, or an operation using NullOperationRunner, which might use a value of 0.
|
|
3223
3002
|
*/
|
|
3224
|
-
weight:
|
|
3003
|
+
weight: number;
|
|
3225
3004
|
/**
|
|
3226
3005
|
* Get the operation settings for this operation, defaults to the values defined in
|
|
3227
3006
|
* the project configuration.
|
|
@@ -3231,14 +3010,8 @@ export declare class Operation {
|
|
|
3231
3010
|
* If set to false, this operation will be skipped during evaluation (return OperationStatus.Skipped).
|
|
3232
3011
|
* This is useful for plugins to alter the scope of the operation graph across executions,
|
|
3233
3012
|
* e.g. to enable or disable unit test execution, or to include or exclude dependencies.
|
|
3234
|
-
*
|
|
3235
|
-
* The special value "ignore-dependency-changes" can be used to indicate that this operation should only
|
|
3236
|
-
* be executed if there are local changes in the project. This is useful for operations like
|
|
3237
|
-
* "test" where you may want to skip testing projects that haven't changed.
|
|
3238
|
-
*
|
|
3239
|
-
* The default value is `true`, meaning the operation will be executed if it or any dependencies change.
|
|
3240
3013
|
*/
|
|
3241
|
-
enabled:
|
|
3014
|
+
enabled: boolean;
|
|
3242
3015
|
constructor(options: IOperationOptions);
|
|
3243
3016
|
/**
|
|
3244
3017
|
* The name of this operation, for logging.
|
|
@@ -3275,7 +3048,7 @@ export declare class _OperationBuildCache {
|
|
|
3275
3048
|
private static _tryGetTarUtility;
|
|
3276
3049
|
get cacheId(): string | undefined;
|
|
3277
3050
|
static getOperationBuildCache(options: _IProjectBuildCacheOptions): _OperationBuildCache;
|
|
3278
|
-
static forOperation(executionResult:
|
|
3051
|
+
static forOperation(executionResult: IOperationExecutionResult, options: _IOperationBuildCacheOptions): _OperationBuildCache;
|
|
3279
3052
|
tryRestoreFromCacheAsync(terminal: ITerminal, specifiedCacheId?: string): Promise<boolean>;
|
|
3280
3053
|
trySetCacheEntryAsync(terminal: ITerminal, specifiedCacheId?: string): Promise<boolean>;
|
|
3281
3054
|
/**
|
|
@@ -3288,139 +3061,6 @@ export declare class _OperationBuildCache {
|
|
|
3288
3061
|
private static _getCacheId;
|
|
3289
3062
|
}
|
|
3290
3063
|
|
|
3291
|
-
/**
|
|
3292
|
-
* State for the `enabled` property of an `Operation`.
|
|
3293
|
-
*
|
|
3294
|
-
* - `true`: The operation should be executed if it or any dependencies changed.
|
|
3295
|
-
* - `false`: The operation should be skipped.
|
|
3296
|
-
* - `"ignore-dependency-changes"`: The operation should be executed if there are local changes in the project,
|
|
3297
|
-
* otherwise it should be skipped. This is useful for operations like "test" where you may want to skip
|
|
3298
|
-
* testing projects that haven't changed.
|
|
3299
|
-
* @alpha
|
|
3300
|
-
*/
|
|
3301
|
-
export declare type OperationEnabledState = boolean | 'ignore-dependency-changes';
|
|
3302
|
-
|
|
3303
|
-
/**
|
|
3304
|
-
* Hooks into the execution process for operations within the graph.
|
|
3305
|
-
*
|
|
3306
|
-
* Per-iteration lifecycle:
|
|
3307
|
-
* 1. `configureIteration` - Synchronously decide which operations to enable for the next iteration.
|
|
3308
|
-
* 2. `onIterationScheduled` - Fires after the iteration is prepared but before execution begins, if it has any enabled operations.
|
|
3309
|
-
* 3. `beforeExecuteIterationAsync` - Async hook that can bail out the iteration entirely.
|
|
3310
|
-
* 4. Operations execute (status changes reported via `onExecutionStatesUpdated`).
|
|
3311
|
-
* 5. `afterExecuteIterationAsync` - Fires after all operations in the iteration have settled.
|
|
3312
|
-
* 6. `onIdle` - Fires when the graph enters idle state awaiting changes (watch mode only).
|
|
3313
|
-
*
|
|
3314
|
-
* Additional hooks:
|
|
3315
|
-
* - `onEnableStatesChanged` - Fires when `setEnabledStates` mutates operation enabled flags.
|
|
3316
|
-
* - `onInvalidateOperations` - Fires when operations are invalidated (e.g. by file watchers).
|
|
3317
|
-
* - `onGraphStateChanged` - Fires on any observable graph state change.
|
|
3318
|
-
*
|
|
3319
|
-
* @alpha
|
|
3320
|
-
*/
|
|
3321
|
-
export declare class OperationGraphHooks {
|
|
3322
|
-
/**
|
|
3323
|
-
* Hook invoked to decide what work a potential new iteration contains.
|
|
3324
|
-
* Use the `lastExecutedRecords` to determine which operations are new or have had their inputs changed.
|
|
3325
|
-
* Set the `enabled` states on the values in `initialRecords` to control which operations will be executed.
|
|
3326
|
-
*
|
|
3327
|
-
* @remarks
|
|
3328
|
-
* This hook is synchronous to guarantee that the `lastExecutedRecords` map remains stable for the
|
|
3329
|
-
* duration of configuration. This hook often executes while an execution iteration is currently running, so
|
|
3330
|
-
* operations could complete if there were async ticks during the configuration phase.
|
|
3331
|
-
*
|
|
3332
|
-
* If no operations are marked for execution, the iteration will not be scheduled.
|
|
3333
|
-
* If there is an existing scheduled iteration, it will remain.
|
|
3334
|
-
*/
|
|
3335
|
-
readonly configureIteration: SyncHook<[
|
|
3336
|
-
ReadonlyMap<Operation, IConfigurableOperation>,
|
|
3337
|
-
ReadonlyMap<Operation, IOperationExecutionResult>,
|
|
3338
|
-
IOperationGraphIterationOptions
|
|
3339
|
-
]>;
|
|
3340
|
-
/**
|
|
3341
|
-
* Hook invoked before operation start for an iteration. Allows a plugin to perform side-effects or
|
|
3342
|
-
* short-circuit the entire iteration.
|
|
3343
|
-
*
|
|
3344
|
-
* If any tap returns an {@link OperationStatus}, the remaining taps are skipped and the iteration will
|
|
3345
|
-
* end immediately with that status. All operations which have not yet executed will be marked
|
|
3346
|
-
* Aborted.
|
|
3347
|
-
*/
|
|
3348
|
-
readonly beforeExecuteIterationAsync: AsyncSeriesBailHook<[
|
|
3349
|
-
ReadonlyMap<Operation, IOperationExecutionResult>,
|
|
3350
|
-
IOperationGraphIterationOptions
|
|
3351
|
-
], OperationStatus | undefined | void>;
|
|
3352
|
-
/**
|
|
3353
|
-
* Batched hook invoked when one or more operation statuses have changed during the same microtask.
|
|
3354
|
-
* The hook receives an array of the operation execution results that changed status.
|
|
3355
|
-
* @remarks
|
|
3356
|
-
* This hook is batched to reduce noise when updating many operations synchronously in quick succession.
|
|
3357
|
-
*/
|
|
3358
|
-
readonly onExecutionStatesUpdated: SyncHook<[ReadonlySet<IOperationExecutionResult>]>;
|
|
3359
|
-
/**
|
|
3360
|
-
* Hook invoked when one or more operations have their enabled state mutated via
|
|
3361
|
-
* {@link IOperationGraph.setEnabledStates}. Provides the set of operations whose
|
|
3362
|
-
* enabled state actually changed.
|
|
3363
|
-
*/
|
|
3364
|
-
readonly onEnableStatesChanged: SyncHook<[ReadonlySet<Operation>]>;
|
|
3365
|
-
/**
|
|
3366
|
-
* Hook invoked immediately after a new execution iteration is scheduled (i.e. operations selected and prepared),
|
|
3367
|
-
* before any operations in that iteration have started executing. Can be used to snapshot planned work,
|
|
3368
|
-
* drive UIs, or pre-compute auxiliary data.
|
|
3369
|
-
*/
|
|
3370
|
-
readonly onIterationScheduled: SyncHook<[ReadonlyMap<Operation, IOperationExecutionResult>]>;
|
|
3371
|
-
/**
|
|
3372
|
-
* Hook invoked when any observable state on the operation graph changes.
|
|
3373
|
-
* This includes configuration mutations (parallelism, quiet/debug modes, pauseNextIteration)
|
|
3374
|
-
* as well as dynamic state (status transitions, scheduled iteration availability, etc.).
|
|
3375
|
-
* Hook is series for stable output.
|
|
3376
|
-
*/
|
|
3377
|
-
readonly onGraphStateChanged: SyncHook<[IOperationGraph]>;
|
|
3378
|
-
/**
|
|
3379
|
-
* Hook invoked when operations are invalidated for any reason.
|
|
3380
|
-
*/
|
|
3381
|
-
readonly onInvalidateOperations: SyncHook<[Iterable<Operation>, string | undefined]>;
|
|
3382
|
-
/**
|
|
3383
|
-
* Hook invoked after an iteration has finished and the command is watching for changes.
|
|
3384
|
-
* May be used to display additional relevant data to the user.
|
|
3385
|
-
* Only relevant when running in watch mode.
|
|
3386
|
-
*/
|
|
3387
|
-
readonly onIdle: SyncHook<void>;
|
|
3388
|
-
/**
|
|
3389
|
-
* Hook invoked after executing a set of operations.
|
|
3390
|
-
* Hook is series for stable output.
|
|
3391
|
-
*/
|
|
3392
|
-
readonly afterExecuteIterationAsync: AsyncSeriesWaterfallHook<[
|
|
3393
|
-
OperationStatus,
|
|
3394
|
-
ReadonlyMap<Operation, IOperationExecutionResult>,
|
|
3395
|
-
IOperationGraphIterationOptions
|
|
3396
|
-
]>;
|
|
3397
|
-
/**
|
|
3398
|
-
* Hook invoked after executing an iteration, before the telemetry entry is written.
|
|
3399
|
-
* Allows the caller to augment or modify the log entry.
|
|
3400
|
-
*/
|
|
3401
|
-
readonly beforeLog: SyncHook<ITelemetryData, void>;
|
|
3402
|
-
/**
|
|
3403
|
-
* Hook invoked before executing a operation.
|
|
3404
|
-
*/
|
|
3405
|
-
readonly beforeExecuteOperationAsync: AsyncSeriesBailHook<[
|
|
3406
|
-
IOperationRunnerContext & IOperationExecutionResult
|
|
3407
|
-
], OperationStatus | undefined>;
|
|
3408
|
-
/**
|
|
3409
|
-
* Hook invoked to define environment variables for an operation.
|
|
3410
|
-
* May be invoked by the runner to get the environment for the operation.
|
|
3411
|
-
*/
|
|
3412
|
-
readonly createEnvironmentForOperation: SyncWaterfallHook<[
|
|
3413
|
-
IEnvironment,
|
|
3414
|
-
IOperationRunnerContext & IOperationExecutionResult
|
|
3415
|
-
]>;
|
|
3416
|
-
/**
|
|
3417
|
-
* Hook invoked after executing a operation.
|
|
3418
|
-
*/
|
|
3419
|
-
readonly afterExecuteOperationAsync: AsyncSeriesHook<[
|
|
3420
|
-
IOperationRunnerContext & IOperationExecutionResult
|
|
3421
|
-
]>;
|
|
3422
|
-
}
|
|
3423
|
-
|
|
3424
3064
|
/**
|
|
3425
3065
|
* A helper class for managing the meta files of a operation.
|
|
3426
3066
|
*
|
|
@@ -3665,34 +3305,69 @@ export declare abstract class PackageManagerOptionsConfigurationBase implements
|
|
|
3665
3305
|
}
|
|
3666
3306
|
|
|
3667
3307
|
/**
|
|
3668
|
-
*
|
|
3669
|
-
* @beta
|
|
3670
|
-
*/
|
|
3671
|
-
export declare type Parallelism = number | IParallelismScalar;
|
|
3672
|
-
|
|
3673
|
-
/**
|
|
3674
|
-
* Hooks into the execution process for phased commands.
|
|
3675
|
-
*
|
|
3676
|
-
* Lifecycle:
|
|
3677
|
-
* 1. `createOperationsAsync` - Invoked to populate the set of operations for execution.
|
|
3678
|
-
* 2. `onGraphCreatedAsync` - Invoked after the operation graph is created, allowing plugins to
|
|
3679
|
-
* tap into graph-level hooks (e.g. `configureIteration`, `onIdle`).
|
|
3680
|
-
* See {@link OperationGraphHooks} for the per-iteration lifecycle.
|
|
3681
|
-
*
|
|
3308
|
+
* Hooks into the execution process for phased commands
|
|
3682
3309
|
* @alpha
|
|
3683
3310
|
*/
|
|
3684
3311
|
export declare class PhasedCommandHooks {
|
|
3685
3312
|
/**
|
|
3686
3313
|
* Hook invoked to create operations for execution.
|
|
3314
|
+
* Use the context to distinguish between the initial run and phased runs.
|
|
3315
|
+
*/
|
|
3316
|
+
readonly createOperations: AsyncSeriesWaterfallHook<[Set<Operation>, ICreateOperationsContext]>;
|
|
3317
|
+
/**
|
|
3318
|
+
* Hook invoked before operation start
|
|
3319
|
+
* Hook is series for stable output.
|
|
3320
|
+
*/
|
|
3321
|
+
readonly beforeExecuteOperations: AsyncSeriesHook<[
|
|
3322
|
+
Map<Operation, IOperationExecutionResult>,
|
|
3323
|
+
IExecuteOperationsContext
|
|
3324
|
+
]>;
|
|
3325
|
+
/**
|
|
3326
|
+
* Hook invoked when operation status changed
|
|
3327
|
+
* Hook is series for stable output.
|
|
3328
|
+
*/
|
|
3329
|
+
readonly onOperationStatusChanged: SyncHook<[IOperationExecutionResult]>;
|
|
3330
|
+
/**
|
|
3331
|
+
* Hook invoked after executing a set of operations.
|
|
3332
|
+
* Use the context to distinguish between the initial run and phased runs.
|
|
3333
|
+
* Hook is series for stable output.
|
|
3334
|
+
*/
|
|
3335
|
+
readonly afterExecuteOperations: AsyncSeriesHook<[IExecutionResult, IExecuteOperationsContext]>;
|
|
3336
|
+
/**
|
|
3337
|
+
* Hook invoked before executing a operation.
|
|
3338
|
+
*/
|
|
3339
|
+
readonly beforeExecuteOperation: AsyncSeriesBailHook<[
|
|
3340
|
+
IOperationRunnerContext & IOperationExecutionResult
|
|
3341
|
+
], OperationStatus | undefined>;
|
|
3342
|
+
/**
|
|
3343
|
+
* Hook invoked to define environment variables for an operation.
|
|
3344
|
+
* May be invoked by the runner to get the environment for the operation.
|
|
3345
|
+
*/
|
|
3346
|
+
readonly createEnvironmentForOperation: SyncWaterfallHook<[
|
|
3347
|
+
IEnvironment,
|
|
3348
|
+
IOperationRunnerContext & IOperationExecutionResult
|
|
3349
|
+
]>;
|
|
3350
|
+
/**
|
|
3351
|
+
* Hook invoked after executing a operation.
|
|
3687
3352
|
*/
|
|
3688
|
-
readonly
|
|
3689
|
-
|
|
3690
|
-
ICreateOperationsContext
|
|
3353
|
+
readonly afterExecuteOperation: AsyncSeriesHook<[
|
|
3354
|
+
IOperationRunnerContext & IOperationExecutionResult
|
|
3691
3355
|
]>;
|
|
3692
3356
|
/**
|
|
3693
|
-
* Hook invoked
|
|
3357
|
+
* Hook invoked to shutdown long-lived work in plugins.
|
|
3694
3358
|
*/
|
|
3695
|
-
readonly
|
|
3359
|
+
readonly shutdownAsync: AsyncParallelHook<void>;
|
|
3360
|
+
/**
|
|
3361
|
+
* Hook invoked after a run has finished and the command is watching for changes.
|
|
3362
|
+
* May be used to display additional relevant data to the user.
|
|
3363
|
+
* Only relevant when running in watch mode.
|
|
3364
|
+
*/
|
|
3365
|
+
readonly waitingForChanges: SyncHook<void>;
|
|
3366
|
+
/**
|
|
3367
|
+
* Hook invoked after executing operations and before waitingForChanges. Allows the caller
|
|
3368
|
+
* to augment or modify the log entry about to be written.
|
|
3369
|
+
*/
|
|
3370
|
+
readonly beforeLog: SyncHook<ITelemetryData, void>;
|
|
3696
3371
|
}
|
|
3697
3372
|
|
|
3698
3373
|
/**
|