@rushstack/rush-sdk 5.114.3 → 5.116.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 +23 -9
- package/lib/api/ExperimentsConfiguration.d.ts +6 -0
- package/lib/api/RushConfigurationProject.d.ts +1 -0
- package/lib/cli/scriptActions/PhasedScriptAction.d.ts +1 -0
- package/lib/logic/PublishUtilities.d.ts +1 -0
- package/lib/logic/operations/IOperationRunner.d.ts +8 -10
- package/lib/logic/operations/OperationExecutionRecord.d.ts +9 -4
- package/lib/logic/operations/ProjectLogWritable.d.ts +0 -1
- package/lib/logic/operations/ShellOperationRunner.d.ts +3 -10
- package/lib/logic/operations/ShellOperationRunnerPlugin.d.ts +10 -0
- package/lib/pluginFramework/PhasedCommandHooks.d.ts +11 -1
- package/lib/utilities/Utilities.d.ts +4 -0
- package/package.json +6 -6
package/dist/rush-lib.d.ts
CHANGED
|
@@ -1155,6 +1155,12 @@ export declare interface ICreateOperationsContext {
|
|
|
1155
1155
|
* The Rush configuration
|
|
1156
1156
|
*/
|
|
1157
1157
|
readonly rushConfiguration: RushConfiguration;
|
|
1158
|
+
/**
|
|
1159
|
+
* Marks an operation's result as invalid, potentially triggering a new build. Only applicable in watch mode.
|
|
1160
|
+
* @param operation - The operation to invalidate
|
|
1161
|
+
* @param reason - The reason for invalidating the operation
|
|
1162
|
+
*/
|
|
1163
|
+
readonly invalidateOperation?: ((operation: Operation, reason: string) => void) | undefined;
|
|
1158
1164
|
}
|
|
1159
1165
|
|
|
1160
1166
|
/**
|
|
@@ -1349,6 +1355,12 @@ export declare interface IExperimentsJson {
|
|
|
1349
1355
|
* If set to true, Rush will generate a `project-impact-graph.yaml` file in the repository root during `rush update`.
|
|
1350
1356
|
*/
|
|
1351
1357
|
generateProjectImpactGraphDuringRushUpdate?: boolean;
|
|
1358
|
+
/**
|
|
1359
|
+
* If true, when running in watch mode, Rush will check for phase scripts named `_phase:<name>:ipc` and run them instead
|
|
1360
|
+
* of `_phase:<name>` if they exist. The created child process will be provided with an IPC channel and expected to persist
|
|
1361
|
+
* across invocations.
|
|
1362
|
+
*/
|
|
1363
|
+
useIPCScriptsInWatchMode?: boolean;
|
|
1352
1364
|
}
|
|
1353
1365
|
|
|
1354
1366
|
/**
|
|
@@ -1677,10 +1689,6 @@ export declare interface IOperationRunnerContext {
|
|
|
1677
1689
|
* Defaults to `true`. Will be `false` if Rush was invoked with `--verbose`.
|
|
1678
1690
|
*/
|
|
1679
1691
|
quietMode: boolean;
|
|
1680
|
-
/**
|
|
1681
|
-
* Object used to report a summary at the end of the Rush invocation.
|
|
1682
|
-
*/
|
|
1683
|
-
stdioSummarizer: StdioSummarizer;
|
|
1684
1692
|
/**
|
|
1685
1693
|
* Object used to manage metadata of the operation.
|
|
1686
1694
|
*
|
|
@@ -1704,12 +1712,14 @@ export declare interface IOperationRunnerContext {
|
|
|
1704
1712
|
*/
|
|
1705
1713
|
error?: Error;
|
|
1706
1714
|
/**
|
|
1707
|
-
*
|
|
1708
|
-
*
|
|
1709
|
-
*
|
|
1710
|
-
* ignore dependent projects.
|
|
1715
|
+
* Invokes the specified callback with a terminal that is associated with this operation.
|
|
1716
|
+
*
|
|
1717
|
+
* Will write to a log file corresponding to the phase and project, and clean it up upon completion.
|
|
1711
1718
|
*/
|
|
1712
|
-
|
|
1719
|
+
runWithTerminalAsync<T>(callback: (terminal: ITerminal, terminalProvider: ITerminalProvider) => Promise<T>, options: {
|
|
1720
|
+
createLogFile: boolean;
|
|
1721
|
+
logFileSuffix?: string;
|
|
1722
|
+
}): Promise<T>;
|
|
1713
1723
|
}
|
|
1714
1724
|
|
|
1715
1725
|
/**
|
|
@@ -2905,6 +2915,10 @@ export declare class PhasedCommandHooks {
|
|
|
2905
2915
|
readonly afterExecuteOperation: AsyncSeriesHook<[
|
|
2906
2916
|
IOperationRunnerContext & IOperationExecutionResult
|
|
2907
2917
|
]>;
|
|
2918
|
+
/**
|
|
2919
|
+
* Hook invoked to shutdown long-lived work in plugins.
|
|
2920
|
+
*/
|
|
2921
|
+
readonly shutdownAsync: AsyncParallelHook<void>;
|
|
2908
2922
|
/**
|
|
2909
2923
|
* Hook invoked after a run has finished and the command is watching for changes.
|
|
2910
2924
|
* May be used to display additional relevant data to the user.
|
|
@@ -75,6 +75,12 @@ export interface IExperimentsJson {
|
|
|
75
75
|
* If set to true, Rush will generate a `project-impact-graph.yaml` file in the repository root during `rush update`.
|
|
76
76
|
*/
|
|
77
77
|
generateProjectImpactGraphDuringRushUpdate?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* If true, when running in watch mode, Rush will check for phase scripts named `_phase:<name>:ipc` and run them instead
|
|
80
|
+
* of `_phase:<name>` if they exist. The created child process will be provided with an IPC channel and expected to persist
|
|
81
|
+
* across invocations.
|
|
82
|
+
*/
|
|
83
|
+
useIPCScriptsInWatchMode?: boolean;
|
|
78
84
|
}
|
|
79
85
|
/**
|
|
80
86
|
* Use this class to load the "common/config/rush/experiments.json" config file.
|
|
@@ -233,4 +233,5 @@ export declare class RushConfigurationProject {
|
|
|
233
233
|
*/
|
|
234
234
|
get isMainProject(): boolean;
|
|
235
235
|
}
|
|
236
|
+
export declare function validateRelativePathField(relativePath: string, field: string, file: string): void;
|
|
236
237
|
//# sourceMappingURL=RushConfigurationProject.d.ts.map
|
|
@@ -50,6 +50,7 @@ export declare class PhasedScriptAction extends BaseScriptAction<IPhasedCommandC
|
|
|
50
50
|
private readonly _watchParameter;
|
|
51
51
|
private readonly _timelineParameter;
|
|
52
52
|
private readonly _installParameter;
|
|
53
|
+
private readonly _noIPCParameter;
|
|
53
54
|
constructor(options: IPhasedScriptActionOptions);
|
|
54
55
|
runAsync(): Promise<void>;
|
|
55
56
|
private _runInitialPhases;
|
|
@@ -65,6 +65,7 @@ export declare class PublishUtilities {
|
|
|
65
65
|
private static _addChange;
|
|
66
66
|
private static _updateDownstreamDependencies;
|
|
67
67
|
private static _updateDownstreamDependency;
|
|
68
|
+
private static _getPublishDependencyVersion;
|
|
68
69
|
private static _updateDependencyVersion;
|
|
69
70
|
}
|
|
70
71
|
//# sourceMappingURL=PublishUtilities.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ITerminal, ITerminalProvider } from '@rushstack/terminal';
|
|
2
2
|
import type { CollatedWriter } from '@rushstack/stream-collator';
|
|
3
3
|
import type { OperationStatus } from './OperationStatus';
|
|
4
4
|
import type { OperationMetadataManager } from './OperationMetadataManager';
|
|
@@ -21,10 +21,6 @@ export interface IOperationRunnerContext {
|
|
|
21
21
|
* Defaults to `true`. Will be `false` if Rush was invoked with `--verbose`.
|
|
22
22
|
*/
|
|
23
23
|
quietMode: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Object used to report a summary at the end of the Rush invocation.
|
|
26
|
-
*/
|
|
27
|
-
stdioSummarizer: StdioSummarizer;
|
|
28
24
|
/**
|
|
29
25
|
* Object used to manage metadata of the operation.
|
|
30
26
|
*
|
|
@@ -48,12 +44,14 @@ export interface IOperationRunnerContext {
|
|
|
48
44
|
*/
|
|
49
45
|
error?: Error;
|
|
50
46
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* ignore dependent projects.
|
|
47
|
+
* Invokes the specified callback with a terminal that is associated with this operation.
|
|
48
|
+
*
|
|
49
|
+
* Will write to a log file corresponding to the phase and project, and clean it up upon completion.
|
|
55
50
|
*/
|
|
56
|
-
|
|
51
|
+
runWithTerminalAsync<T>(callback: (terminal: ITerminal, terminalProvider: ITerminalProvider) => Promise<T>, options: {
|
|
52
|
+
createLogFile: boolean;
|
|
53
|
+
logFileSuffix?: string;
|
|
54
|
+
}): Promise<T>;
|
|
57
55
|
}
|
|
58
56
|
/**
|
|
59
57
|
* The `Operation` class is a node in the dependency graph of work that needs to be scheduled by the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StdioSummarizer } from '@rushstack/terminal';
|
|
2
|
-
import type
|
|
1
|
+
import { type ITerminal, type ITerminalProvider, StdioSummarizer } from '@rushstack/terminal';
|
|
2
|
+
import { type CollatedWriter, type StreamCollator } from '@rushstack/stream-collator';
|
|
3
3
|
import { OperationStatus } from './OperationStatus';
|
|
4
4
|
import type { IOperationRunner, IOperationRunnerContext } from './IOperationRunner';
|
|
5
5
|
import type { Operation } from './Operation';
|
|
@@ -12,7 +12,6 @@ export interface IOperationExecutionRecordContext {
|
|
|
12
12
|
onOperationStatusChanged?: (record: OperationExecutionRecord) => void;
|
|
13
13
|
debugMode: boolean;
|
|
14
14
|
quietMode: boolean;
|
|
15
|
-
changedProjectsOnly: boolean;
|
|
16
15
|
}
|
|
17
16
|
/**
|
|
18
17
|
* Internal class representing everything about executing an operation
|
|
@@ -83,7 +82,6 @@ export declare class OperationExecutionRecord implements IOperationRunnerContext
|
|
|
83
82
|
get name(): string;
|
|
84
83
|
get debugMode(): boolean;
|
|
85
84
|
get quietMode(): boolean;
|
|
86
|
-
get changedProjectsOnly(): boolean;
|
|
87
85
|
get collatedWriter(): CollatedWriter;
|
|
88
86
|
get nonCachedDurationMs(): number | undefined;
|
|
89
87
|
get cobuildRunnerId(): string | undefined;
|
|
@@ -95,6 +93,13 @@ export declare class OperationExecutionRecord implements IOperationRunnerContext
|
|
|
95
93
|
*/
|
|
96
94
|
get status(): OperationStatus;
|
|
97
95
|
set status(newStatus: OperationStatus);
|
|
96
|
+
/**
|
|
97
|
+
* {@inheritdoc IOperationRunnerContext.runWithTerminalAsync}
|
|
98
|
+
*/
|
|
99
|
+
runWithTerminalAsync<T>(callback: (terminal: ITerminal, terminalProvider: ITerminalProvider) => Promise<T>, options: {
|
|
100
|
+
createLogFile: boolean;
|
|
101
|
+
logFileSuffix: string;
|
|
102
|
+
}): Promise<T>;
|
|
98
103
|
executeAsync({ onStart, onResult }: {
|
|
99
104
|
onStart: (record: OperationExecutionRecord) => Promise<OperationStatus | undefined>;
|
|
100
105
|
onResult: (record: OperationExecutionRecord) => Promise<void>;
|
|
@@ -2,7 +2,6 @@ import { TerminalWritable, type ITerminalChunk } from '@rushstack/terminal';
|
|
|
2
2
|
import type { CollatedTerminal } from '@rushstack/stream-collator';
|
|
3
3
|
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
4
4
|
export declare class ProjectLogWritable extends TerminalWritable {
|
|
5
|
-
private readonly _project;
|
|
6
5
|
private readonly _terminal;
|
|
7
6
|
readonly logPath: string;
|
|
8
7
|
readonly errorLogPath: string;
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { IOperationRunner, IOperationRunnerContext } from './IOperationRunner';
|
|
1
|
+
import type { IPhase } from '../../api/CommandLineConfiguration';
|
|
3
2
|
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
4
3
|
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
5
|
-
import type {
|
|
6
|
-
import
|
|
4
|
+
import type { IOperationRunner, IOperationRunnerContext } from './IOperationRunner';
|
|
5
|
+
import { OperationStatus } from './OperationStatus';
|
|
7
6
|
export interface IOperationRunnerOptions {
|
|
8
7
|
rushProject: RushConfigurationProject;
|
|
9
8
|
rushConfiguration: RushConfiguration;
|
|
10
9
|
commandToRun: string;
|
|
11
|
-
projectChangeAnalyzer: ProjectChangeAnalyzer;
|
|
12
10
|
displayName: string;
|
|
13
11
|
phase: IPhase;
|
|
14
|
-
/**
|
|
15
|
-
* The set of phases being executed in the current command, for validation of rush-project.json
|
|
16
|
-
*/
|
|
17
|
-
selectedPhases: Iterable<IPhase>;
|
|
18
12
|
}
|
|
19
13
|
/**
|
|
20
14
|
* An `IOperationRunner` subclass that performs an operation via a shell command.
|
|
@@ -28,7 +22,6 @@ export declare class ShellOperationRunner implements IOperationRunner {
|
|
|
28
22
|
readonly cacheable: boolean;
|
|
29
23
|
readonly warningsAreAllowed: boolean;
|
|
30
24
|
private readonly _commandToRun;
|
|
31
|
-
private readonly _logFilenameIdentifier;
|
|
32
25
|
private readonly _rushProject;
|
|
33
26
|
private readonly _rushConfiguration;
|
|
34
27
|
constructor(options: IOperationRunnerOptions);
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
import type { IPhase } from '../../api/CommandLineConfiguration';
|
|
2
|
+
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
1
3
|
import type { IPhasedCommandPlugin, PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
|
|
4
|
+
export declare const PLUGIN_NAME: 'ShellOperationRunnerPlugin';
|
|
2
5
|
/**
|
|
3
6
|
* Core phased command plugin that provides the functionality for executing an operation via shell command.
|
|
4
7
|
*/
|
|
5
8
|
export declare class ShellOperationRunnerPlugin implements IPhasedCommandPlugin {
|
|
6
9
|
apply(hooks: PhasedCommandHooks): void;
|
|
7
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Memoizer for custom parameter values by phase
|
|
13
|
+
* @returns A function that returns the custom parameter values for a given phase
|
|
14
|
+
*/
|
|
15
|
+
export declare function getCustomParameterValuesByPhase(): (phase: IPhase) => ReadonlyArray<string>;
|
|
16
|
+
export declare function formatCommand(rawCommand: string, customParameterValues: ReadonlyArray<string>): string;
|
|
17
|
+
export declare function getDisplayName(phase: IPhase, project: RushConfigurationProject): string;
|
|
8
18
|
//# sourceMappingURL=ShellOperationRunnerPlugin.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AsyncSeriesBailHook, AsyncSeriesHook, AsyncSeriesWaterfallHook, SyncHook } from 'tapable';
|
|
1
|
+
import { AsyncParallelHook, AsyncSeriesBailHook, AsyncSeriesHook, AsyncSeriesWaterfallHook, SyncHook } from 'tapable';
|
|
2
2
|
import type { CommandLineParameter } from '@rushstack/ts-command-line';
|
|
3
3
|
import type { BuildCacheConfiguration } from '../api/BuildCacheConfiguration';
|
|
4
4
|
import type { IPhase } from '../api/CommandLineConfiguration';
|
|
@@ -83,6 +83,12 @@ export interface ICreateOperationsContext {
|
|
|
83
83
|
* The Rush configuration
|
|
84
84
|
*/
|
|
85
85
|
readonly rushConfiguration: RushConfiguration;
|
|
86
|
+
/**
|
|
87
|
+
* Marks an operation's result as invalid, potentially triggering a new build. Only applicable in watch mode.
|
|
88
|
+
* @param operation - The operation to invalidate
|
|
89
|
+
* @param reason - The reason for invalidating the operation
|
|
90
|
+
*/
|
|
91
|
+
readonly invalidateOperation?: ((operation: Operation, reason: string) => void) | undefined;
|
|
86
92
|
}
|
|
87
93
|
/**
|
|
88
94
|
* Hooks into the execution process for phased commands
|
|
@@ -125,6 +131,10 @@ export declare class PhasedCommandHooks {
|
|
|
125
131
|
readonly afterExecuteOperation: AsyncSeriesHook<[
|
|
126
132
|
IOperationRunnerContext & IOperationExecutionResult
|
|
127
133
|
]>;
|
|
134
|
+
/**
|
|
135
|
+
* Hook invoked to shutdown long-lived work in plugins.
|
|
136
|
+
*/
|
|
137
|
+
readonly shutdownAsync: AsyncParallelHook<void>;
|
|
128
138
|
/**
|
|
129
139
|
* Hook invoked after a run has finished and the command is watching for changes.
|
|
130
140
|
* May be used to display additional relevant data to the user.
|
|
@@ -59,6 +59,10 @@ export interface ILifecycleCommandOptions {
|
|
|
59
59
|
* If true, attempt to establish a NodeJS IPC channel to the child process.
|
|
60
60
|
*/
|
|
61
61
|
ipc?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* If true, wire up SubprocessTerminator to the child process.
|
|
64
|
+
*/
|
|
65
|
+
connectSubprocessTerminator?: boolean;
|
|
62
66
|
}
|
|
63
67
|
export interface IEnvironmentPathOptions {
|
|
64
68
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/rush-sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.116.0",
|
|
4
4
|
"description": "An API for interacting with the Rush engine",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@types/node-fetch": "2.6.2",
|
|
27
27
|
"tapable": "2.2.1",
|
|
28
|
-
"@rushstack/
|
|
29
|
-
"@rushstack/
|
|
28
|
+
"@rushstack/node-core-library": "4.0.2",
|
|
29
|
+
"@rushstack/terminal": "0.9.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/semver": "7.5.0",
|
|
33
33
|
"@types/webpack-env": "1.18.0",
|
|
34
|
-
"@
|
|
34
|
+
"@rushstack/heft": "0.65.4",
|
|
35
35
|
"local-node-rig": "1.0.0",
|
|
36
|
-
"@rushstack/
|
|
37
|
-
"@
|
|
36
|
+
"@rushstack/stream-collator": "4.1.31",
|
|
37
|
+
"@microsoft/rush-lib": "5.116.0",
|
|
38
38
|
"@rushstack/ts-command-line": "4.17.3"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|