@rushstack/rush-sdk 5.158.1 → 5.159.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 +37 -11
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/api/Subspace.d.ts +17 -10
- package/lib/cli/scriptActions/PhasedScriptAction.d.ts +4 -1
- package/lib/logic/operations/IOperationExecutionResult.d.ts +5 -1
- package/lib/logic/operations/IPCOperationRunner.d.ts +2 -1
- package/lib/logic/operations/OperationExecutionManager.d.ts +2 -1
- package/lib/logic/operations/OperationExecutionRecord.d.ts +2 -1
- package/lib/logic/operations/OperationStatus.d.ts +5 -1
- package/lib/pluginFramework/PhasedCommandHooks.d.ts +4 -0
- package/lib/pluginFramework/RushLifeCycle.d.ts +6 -0
- package/package.json +12 -12
package/dist/rush-lib.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { HookMap } from 'tapable';
|
|
|
16
16
|
import { IFileDiffStatus } from '@rushstack/package-deps-hash';
|
|
17
17
|
import { IPackageJson } from '@rushstack/node-core-library';
|
|
18
18
|
import { IPrefixMatch } from '@rushstack/lookup-by-path';
|
|
19
|
+
import type { IProblemCollector } from '@rushstack/terminal';
|
|
19
20
|
import { ITerminal } from '@rushstack/terminal';
|
|
20
21
|
import { ITerminalProvider } from '@rushstack/terminal';
|
|
21
22
|
import { JsonNull } from '@rushstack/node-core-library';
|
|
@@ -1428,6 +1429,10 @@ export declare interface IExecuteOperationsContext extends ICreateOperationsCont
|
|
|
1428
1429
|
* Not part of the creation context to avoid the overhead of Git calls when initializing the graph.
|
|
1429
1430
|
*/
|
|
1430
1431
|
readonly inputsSnapshot?: IInputsSnapshot;
|
|
1432
|
+
/**
|
|
1433
|
+
* An abort controller that can be used to abort the current set of queued operations.
|
|
1434
|
+
*/
|
|
1435
|
+
readonly abortController: AbortController;
|
|
1431
1436
|
}
|
|
1432
1437
|
|
|
1433
1438
|
/**
|
|
@@ -1855,6 +1860,10 @@ export declare interface IOperationExecutionResult {
|
|
|
1855
1860
|
* Object used to report a summary at the end of the Rush invocation.
|
|
1856
1861
|
*/
|
|
1857
1862
|
readonly stdioSummarizer: StdioSummarizer;
|
|
1863
|
+
/**
|
|
1864
|
+
* Object used to collect problems (errors/warnings/info) encountered during the operation.
|
|
1865
|
+
*/
|
|
1866
|
+
readonly problemCollector: IProblemCollector;
|
|
1858
1867
|
/**
|
|
1859
1868
|
* The value indicates the duration of the same operation without cache hit.
|
|
1860
1869
|
*/
|
|
@@ -2189,6 +2198,12 @@ export declare interface IPhasedCommand extends IRushCommand {
|
|
|
2189
2198
|
* @alpha
|
|
2190
2199
|
*/
|
|
2191
2200
|
readonly hooks: PhasedCommandHooks;
|
|
2201
|
+
/**
|
|
2202
|
+
* An abort controller that can be used to abort the command.
|
|
2203
|
+
* Long-lived plugins should listen to the signal to handle any cleanup logic.
|
|
2204
|
+
* @alpha
|
|
2205
|
+
*/
|
|
2206
|
+
readonly sessionAbortController: AbortController;
|
|
2192
2207
|
}
|
|
2193
2208
|
|
|
2194
2209
|
/**
|
|
@@ -3103,7 +3118,11 @@ export declare enum OperationStatus {
|
|
|
3103
3118
|
/**
|
|
3104
3119
|
* The Operation was a no-op (for example, it had an empty script)
|
|
3105
3120
|
*/
|
|
3106
|
-
NoOp = "NO OP"
|
|
3121
|
+
NoOp = "NO OP",
|
|
3122
|
+
/**
|
|
3123
|
+
* The Operation was aborted before it could execute.
|
|
3124
|
+
*/
|
|
3125
|
+
Aborted = "ABORTED"
|
|
3107
3126
|
}
|
|
3108
3127
|
|
|
3109
3128
|
/**
|
|
@@ -4944,7 +4963,10 @@ export declare class Subspace {
|
|
|
4944
4963
|
* Returns the full path of the folder containing this subspace's variant-dependent configuration files
|
|
4945
4964
|
* such as `pnpm-lock.yaml`.
|
|
4946
4965
|
*
|
|
4947
|
-
* Example:
|
|
4966
|
+
* Example (variants): `C:\MyRepo\common\config\rush\variants\my-variant`
|
|
4967
|
+
* Example (variants and subspaces): `C:\MyRepo\common\config\subspaces\my-subspace\variants\my-variant`
|
|
4968
|
+
* Example (subspaces): `C:\MyRepo\common\config\subspaces\my-subspace`
|
|
4969
|
+
* Example (neither): `C:\MyRepo\common\config\rush`
|
|
4948
4970
|
* @beta
|
|
4949
4971
|
*
|
|
4950
4972
|
* @remarks
|
|
@@ -4957,22 +4979,24 @@ export declare class Subspace {
|
|
|
4957
4979
|
/**
|
|
4958
4980
|
* Returns the full path of the folder containing this subspace's configuration files such as `pnpm-lock.yaml`.
|
|
4959
4981
|
*
|
|
4960
|
-
* Example:
|
|
4982
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\config\subspaces\my-subspace`
|
|
4983
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\config\rush`
|
|
4961
4984
|
* @beta
|
|
4962
4985
|
*/
|
|
4963
4986
|
getSubspaceConfigFolderPath(): string;
|
|
4964
4987
|
/**
|
|
4965
4988
|
* Returns the full path of the folder containing this subspace's configuration files such as `pnpm-lock.yaml`.
|
|
4966
4989
|
*
|
|
4967
|
-
* Example:
|
|
4968
|
-
* Example
|
|
4990
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\config\subspaces\my-subspace\pnpm-patches`
|
|
4991
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\pnpm-patches`
|
|
4969
4992
|
* @beta
|
|
4970
4993
|
*/
|
|
4971
4994
|
getSubspacePnpmPatchesFolderPath(): string;
|
|
4972
4995
|
/**
|
|
4973
|
-
* The folder where the subspace's node_modules and other temporary files will be stored.
|
|
4996
|
+
* The full path of the folder where the subspace's node_modules and other temporary files will be stored.
|
|
4974
4997
|
*
|
|
4975
|
-
* Example:
|
|
4998
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\temp\subspaces\my-subspace`
|
|
4999
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\temp`
|
|
4976
5000
|
* @beta
|
|
4977
5001
|
*/
|
|
4978
5002
|
getSubspaceTempFolderPath(): string;
|
|
@@ -5004,16 +5028,18 @@ export declare class Subspace {
|
|
|
5004
5028
|
*/
|
|
5005
5029
|
getTempShrinkwrapPreinstallFilePath(): string;
|
|
5006
5030
|
/**
|
|
5007
|
-
* Gets the path to the common-versions.json config file for this subspace.
|
|
5031
|
+
* Gets the full path to the common-versions.json config file for this subspace.
|
|
5008
5032
|
*
|
|
5009
|
-
* Example:
|
|
5033
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\config\subspaces\my-subspace\common-versions.json`
|
|
5034
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\config\rush\common-versions.json`
|
|
5010
5035
|
* @beta
|
|
5011
5036
|
*/
|
|
5012
5037
|
getCommonVersionsFilePath(variant?: string): string;
|
|
5013
5038
|
/**
|
|
5014
|
-
* Gets the path to the pnpm-config.json config file for this subspace.
|
|
5039
|
+
* Gets the full path to the pnpm-config.json config file for this subspace.
|
|
5015
5040
|
*
|
|
5016
|
-
* Example:
|
|
5041
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\config\subspaces\my-subspace\pnpm-config.json`
|
|
5042
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\config\rush\pnpm-config.json`
|
|
5017
5043
|
* @beta
|
|
5018
5044
|
*/
|
|
5019
5045
|
getPnpmConfigFilePath(): string;
|
package/dist/tsdoc-metadata.json
CHANGED
package/lib/api/Subspace.d.ts
CHANGED
|
@@ -41,7 +41,10 @@ export declare class Subspace {
|
|
|
41
41
|
* Returns the full path of the folder containing this subspace's variant-dependent configuration files
|
|
42
42
|
* such as `pnpm-lock.yaml`.
|
|
43
43
|
*
|
|
44
|
-
* Example:
|
|
44
|
+
* Example (variants): `C:\MyRepo\common\config\rush\variants\my-variant`
|
|
45
|
+
* Example (variants and subspaces): `C:\MyRepo\common\config\subspaces\my-subspace\variants\my-variant`
|
|
46
|
+
* Example (subspaces): `C:\MyRepo\common\config\subspaces\my-subspace`
|
|
47
|
+
* Example (neither): `C:\MyRepo\common\config\rush`
|
|
45
48
|
* @beta
|
|
46
49
|
*
|
|
47
50
|
* @remarks
|
|
@@ -54,22 +57,24 @@ export declare class Subspace {
|
|
|
54
57
|
/**
|
|
55
58
|
* Returns the full path of the folder containing this subspace's configuration files such as `pnpm-lock.yaml`.
|
|
56
59
|
*
|
|
57
|
-
* Example:
|
|
60
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\config\subspaces\my-subspace`
|
|
61
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\config\rush`
|
|
58
62
|
* @beta
|
|
59
63
|
*/
|
|
60
64
|
getSubspaceConfigFolderPath(): string;
|
|
61
65
|
/**
|
|
62
66
|
* Returns the full path of the folder containing this subspace's configuration files such as `pnpm-lock.yaml`.
|
|
63
67
|
*
|
|
64
|
-
* Example:
|
|
65
|
-
* Example
|
|
68
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\config\subspaces\my-subspace\pnpm-patches`
|
|
69
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\pnpm-patches`
|
|
66
70
|
* @beta
|
|
67
71
|
*/
|
|
68
72
|
getSubspacePnpmPatchesFolderPath(): string;
|
|
69
73
|
/**
|
|
70
|
-
* The folder where the subspace's node_modules and other temporary files will be stored.
|
|
74
|
+
* The full path of the folder where the subspace's node_modules and other temporary files will be stored.
|
|
71
75
|
*
|
|
72
|
-
* Example:
|
|
76
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\temp\subspaces\my-subspace`
|
|
77
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\temp`
|
|
73
78
|
* @beta
|
|
74
79
|
*/
|
|
75
80
|
getSubspaceTempFolderPath(): string;
|
|
@@ -101,16 +106,18 @@ export declare class Subspace {
|
|
|
101
106
|
*/
|
|
102
107
|
getTempShrinkwrapPreinstallFilePath(): string;
|
|
103
108
|
/**
|
|
104
|
-
* Gets the path to the common-versions.json config file for this subspace.
|
|
109
|
+
* Gets the full path to the common-versions.json config file for this subspace.
|
|
105
110
|
*
|
|
106
|
-
* Example:
|
|
111
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\config\subspaces\my-subspace\common-versions.json`
|
|
112
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\config\rush\common-versions.json`
|
|
107
113
|
* @beta
|
|
108
114
|
*/
|
|
109
115
|
getCommonVersionsFilePath(variant?: string): string;
|
|
110
116
|
/**
|
|
111
|
-
* Gets the path to the pnpm-config.json config file for this subspace.
|
|
117
|
+
* Gets the full path to the pnpm-config.json config file for this subspace.
|
|
112
118
|
*
|
|
113
|
-
* Example:
|
|
119
|
+
* Example (subspaces feature enabled): `C:\MyRepo\common\config\subspaces\my-subspace\pnpm-config.json`
|
|
120
|
+
* Example (subspaces feature disabled): `C:\MyRepo\common\config\rush\pnpm-config.json`
|
|
114
121
|
* @beta
|
|
115
122
|
*/
|
|
116
123
|
getPnpmConfigFilePath(): string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IPhasedCommand } from '../../pluginFramework/RushLifeCycle';
|
|
1
2
|
import { PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
|
|
2
3
|
import { BaseScriptAction, type IBaseScriptActionOptions } from './BaseScriptAction';
|
|
3
4
|
import type { IPhase, IPhasedCommandConfig } from '../../api/CommandLineConfiguration';
|
|
@@ -25,12 +26,13 @@ export interface IPhasedScriptActionOptions extends IBaseScriptActionOptions<IPh
|
|
|
25
26
|
* and "rebuild" commands are also modeled as phased commands with a single phase that invokes the npm
|
|
26
27
|
* "build" script for each project.
|
|
27
28
|
*/
|
|
28
|
-
export declare class PhasedScriptAction extends BaseScriptAction<IPhasedCommandConfig> {
|
|
29
|
+
export declare class PhasedScriptAction extends BaseScriptAction<IPhasedCommandConfig> implements IPhasedCommand {
|
|
29
30
|
/**
|
|
30
31
|
* @internal
|
|
31
32
|
*/
|
|
32
33
|
_runsBeforeInstall: boolean | undefined;
|
|
33
34
|
readonly hooks: PhasedCommandHooks;
|
|
35
|
+
readonly sessionAbortController: AbortController;
|
|
34
36
|
private readonly _enableParallelism;
|
|
35
37
|
private readonly _isIncrementalBuildAllowed;
|
|
36
38
|
private readonly _disableBuildCache;
|
|
@@ -43,6 +45,7 @@ export declare class PhasedScriptAction extends BaseScriptAction<IPhasedCommandC
|
|
|
43
45
|
private readonly _knownPhases;
|
|
44
46
|
private readonly _terminal;
|
|
45
47
|
private _changedProjectsOnly;
|
|
48
|
+
private _executionAbortController;
|
|
46
49
|
private readonly _changedProjectsOnlyParameter;
|
|
47
50
|
private readonly _selectionParameters;
|
|
48
51
|
private readonly _verboseParameter;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StdioSummarizer } from '@rushstack/terminal';
|
|
1
|
+
import type { StdioSummarizer, IProblemCollector } from '@rushstack/terminal';
|
|
2
2
|
import type { OperationStatus } from './OperationStatus';
|
|
3
3
|
import type { Operation } from './Operation';
|
|
4
4
|
import type { IStopwatchResult } from '../../utilities/Stopwatch';
|
|
@@ -36,6 +36,10 @@ export interface IOperationExecutionResult {
|
|
|
36
36
|
* Object used to report a summary at the end of the Rush invocation.
|
|
37
37
|
*/
|
|
38
38
|
readonly stdioSummarizer: StdioSummarizer;
|
|
39
|
+
/**
|
|
40
|
+
* Object used to collect problems (errors/warnings/info) encountered during the operation.
|
|
41
|
+
*/
|
|
42
|
+
readonly problemCollector: IProblemCollector;
|
|
39
43
|
/**
|
|
40
44
|
* The value indicates the duration of the same operation without cache hit.
|
|
41
45
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { OperationRequestRunCallback } from '@rushstack/operation-graph';
|
|
1
2
|
import type { IPhase } from '../../api/CommandLineConfiguration';
|
|
2
3
|
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
3
4
|
import type { IOperationRunner, IOperationRunnerContext } from './IOperationRunner';
|
|
@@ -9,7 +10,7 @@ export interface IIPCOperationRunnerOptions {
|
|
|
9
10
|
commandToRun: string;
|
|
10
11
|
commandForHash: string;
|
|
11
12
|
persist: boolean;
|
|
12
|
-
requestRun:
|
|
13
|
+
requestRun: OperationRequestRunCallback;
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* Runner that hosts a long-lived process to which it communicates via IPC.
|
|
@@ -39,6 +39,7 @@ export declare class OperationExecutionManager {
|
|
|
39
39
|
private readonly _createEnvironmentForOperation?;
|
|
40
40
|
private _hasAnyFailures;
|
|
41
41
|
private _hasAnyNonAllowedWarnings;
|
|
42
|
+
private _hasAnyAborted;
|
|
42
43
|
private _completedOperations;
|
|
43
44
|
private _executionQueue;
|
|
44
45
|
constructor(operations: Set<Operation>, options: IOperationExecutionManagerOptions);
|
|
@@ -47,7 +48,7 @@ export declare class OperationExecutionManager {
|
|
|
47
48
|
* Executes all operations which have been registered, returning a promise which is resolved when all the
|
|
48
49
|
* operations are completed successfully, or rejects when any operation fails.
|
|
49
50
|
*/
|
|
50
|
-
executeAsync(): Promise<IExecutionResult>;
|
|
51
|
+
executeAsync(abortController: AbortController): Promise<IExecutionResult>;
|
|
51
52
|
private _reportOperationErrorIfAny;
|
|
52
53
|
/**
|
|
53
54
|
* Handles the result of the operation and propagates any relevant effects.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ITerminal, type ITerminalProvider, StdioSummarizer } from '@rushstack/terminal';
|
|
1
|
+
import { type ITerminal, type ITerminalProvider, StdioSummarizer, ProblemCollector } from '@rushstack/terminal';
|
|
2
2
|
import { type CollatedWriter, type StreamCollator } from '@rushstack/stream-collator';
|
|
3
3
|
import { OperationStatus } from './OperationStatus';
|
|
4
4
|
import type { IOperationRunner, IOperationRunnerContext } from './IOperationRunner';
|
|
@@ -79,6 +79,7 @@ export declare class OperationExecutionRecord implements IOperationRunnerContext
|
|
|
79
79
|
readonly consumers: Set<OperationExecutionRecord>;
|
|
80
80
|
readonly stopwatch: Stopwatch;
|
|
81
81
|
readonly stdioSummarizer: StdioSummarizer;
|
|
82
|
+
readonly problemCollector: ProblemCollector;
|
|
82
83
|
readonly runner: IOperationRunner;
|
|
83
84
|
readonly associatedPhase: IPhase;
|
|
84
85
|
readonly associatedProject: RushConfigurationProject;
|
|
@@ -46,7 +46,11 @@ export declare enum OperationStatus {
|
|
|
46
46
|
/**
|
|
47
47
|
* The Operation was a no-op (for example, it had an empty script)
|
|
48
48
|
*/
|
|
49
|
-
NoOp = "NO OP"
|
|
49
|
+
NoOp = "NO OP",
|
|
50
|
+
/**
|
|
51
|
+
* The Operation was aborted before it could execute.
|
|
52
|
+
*/
|
|
53
|
+
Aborted = "ABORTED"
|
|
50
54
|
}
|
|
51
55
|
/**
|
|
52
56
|
* The set of statuses that are considered terminal.
|
|
@@ -114,6 +114,10 @@ export interface IExecuteOperationsContext extends ICreateOperationsContext {
|
|
|
114
114
|
* Not part of the creation context to avoid the overhead of Git calls when initializing the graph.
|
|
115
115
|
*/
|
|
116
116
|
readonly inputsSnapshot?: IInputsSnapshot;
|
|
117
|
+
/**
|
|
118
|
+
* An abort controller that can be used to abort the current set of queued operations.
|
|
119
|
+
*/
|
|
120
|
+
readonly abortController: AbortController;
|
|
117
121
|
}
|
|
118
122
|
/**
|
|
119
123
|
* Hooks into the execution process for phased commands
|
|
@@ -28,6 +28,12 @@ export interface IPhasedCommand extends IRushCommand {
|
|
|
28
28
|
* @alpha
|
|
29
29
|
*/
|
|
30
30
|
readonly hooks: PhasedCommandHooks;
|
|
31
|
+
/**
|
|
32
|
+
* An abort controller that can be used to abort the command.
|
|
33
|
+
* Long-lived plugins should listen to the signal to handle any cleanup logic.
|
|
34
|
+
* @alpha
|
|
35
|
+
*/
|
|
36
|
+
readonly sessionAbortController: AbortController;
|
|
31
37
|
}
|
|
32
38
|
/**
|
|
33
39
|
* Hooks into the lifecycle of the Rush process invocation that plugins may tap into.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/rush-sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.159.0",
|
|
4
4
|
"description": "An API for interacting with the Rush engine",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,23 +36,23 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@pnpm/lockfile.types": "~1.0.3",
|
|
38
38
|
"tapable": "2.2.1",
|
|
39
|
-
"@rushstack/
|
|
40
|
-
"@rushstack/
|
|
41
|
-
"@rushstack/
|
|
42
|
-
"@rushstack/terminal": "0.
|
|
39
|
+
"@rushstack/lookup-by-path": "0.8.1",
|
|
40
|
+
"@rushstack/node-core-library": "5.15.1",
|
|
41
|
+
"@rushstack/package-deps-hash": "4.4.9",
|
|
42
|
+
"@rushstack/terminal": "0.18.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/semver": "7.5.0",
|
|
46
46
|
"@types/webpack-env": "1.18.8",
|
|
47
47
|
"eslint": "~9.25.1",
|
|
48
48
|
"webpack": "~5.98.0",
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"@rushstack/
|
|
52
|
-
"@rushstack/
|
|
53
|
-
"
|
|
54
|
-
"@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.
|
|
55
|
-
"
|
|
49
|
+
"@rushstack/heft": "1.0.0",
|
|
50
|
+
"@microsoft/rush-lib": "5.159.0",
|
|
51
|
+
"@rushstack/stream-collator": "4.1.111",
|
|
52
|
+
"@rushstack/ts-command-line": "5.0.5",
|
|
53
|
+
"local-node-rig": "1.0.0",
|
|
54
|
+
"@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.110",
|
|
55
|
+
"@rushstack/heft-webpack5-plugin": "1.0.0"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build": "heft build --clean",
|