@rushstack/rush-sdk 5.136.1 → 5.138.0-pr4476.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 +83 -50
- package/lib/api/BuildCacheConfiguration.d.ts +8 -0
- package/lib/index.d.ts +2 -1
- package/lib/logic/ProjectChangeAnalyzer.d.ts +12 -33
- package/lib/logic/buildCache/ProjectBuildCache.d.ts +22 -13
- package/lib/logic/incremental/InputsSnapshot.d.ts +149 -0
- package/lib/logic/{buildCache/getHashesForGlobsAsync.js → incremental/InputsSnapshot.js} +1 -1
- package/lib/logic/operations/CacheableOperationPlugin.d.ts +4 -6
- package/lib/logic/operations/IOperationExecutionResult.d.ts +8 -0
- package/lib/logic/operations/Operation.d.ts +6 -0
- package/lib/logic/operations/OperationExecutionRecord.d.ts +4 -1
- package/lib/logic/operations/OperationMetadataManager.d.ts +1 -4
- package/lib/logic/operations/ShellOperationRunner.d.ts +2 -0
- package/lib/logic/operations/ShellOperationRunnerPlugin.d.ts +2 -1
- package/lib/pluginFramework/PhasedCommandHooks.d.ts +4 -5
- package/lib-shim/index.js +219 -320
- package/lib-shim/index.js.map +1 -1
- package/package.json +10 -9
- package/lib/logic/buildCache/getHashesForGlobsAsync.d.ts +0 -3
|
@@ -8,6 +8,7 @@ import { OperationMetadataManager } from './OperationMetadataManager';
|
|
|
8
8
|
import type { IPhase } from '../../api/CommandLineConfiguration';
|
|
9
9
|
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
10
10
|
import { type ILogFilePaths } from './ProjectLogWritable';
|
|
11
|
+
import type { IOperationExecutionResult } from './IOperationExecutionResult';
|
|
11
12
|
export interface IOperationExecutionRecordContext {
|
|
12
13
|
streamCollator: StreamCollator;
|
|
13
14
|
onOperationStatusChanged?: (record: OperationExecutionRecord) => void;
|
|
@@ -19,7 +20,7 @@ export interface IOperationExecutionRecordContext {
|
|
|
19
20
|
*
|
|
20
21
|
* @internal
|
|
21
22
|
*/
|
|
22
|
-
export declare class OperationExecutionRecord implements IOperationRunnerContext {
|
|
23
|
+
export declare class OperationExecutionRecord implements IOperationRunnerContext, IOperationExecutionResult {
|
|
23
24
|
/**
|
|
24
25
|
* The associated operation.
|
|
25
26
|
*/
|
|
@@ -87,6 +88,7 @@ export declare class OperationExecutionRecord implements IOperationRunnerContext
|
|
|
87
88
|
get collatedWriter(): CollatedWriter;
|
|
88
89
|
get nonCachedDurationMs(): number | undefined;
|
|
89
90
|
get cobuildRunnerId(): string | undefined;
|
|
91
|
+
get metadataFolderPath(): string | undefined;
|
|
90
92
|
get isTerminal(): boolean;
|
|
91
93
|
/**
|
|
92
94
|
* The current execution status of an operation. Operations start in the 'ready' state,
|
|
@@ -96,6 +98,7 @@ export declare class OperationExecutionRecord implements IOperationRunnerContext
|
|
|
96
98
|
*/
|
|
97
99
|
get status(): OperationStatus;
|
|
98
100
|
set status(newStatus: OperationStatus);
|
|
101
|
+
get silent(): boolean;
|
|
99
102
|
/**
|
|
100
103
|
* {@inheritdoc IOperationRunnerContext.runWithTerminalAsync}
|
|
101
104
|
*/
|
|
@@ -37,9 +37,6 @@ export declare class OperationMetadataManager {
|
|
|
37
37
|
private readonly _logPath;
|
|
38
38
|
private readonly _errorLogPath;
|
|
39
39
|
private readonly _logChunksPath;
|
|
40
|
-
private readonly _relativeLogPath;
|
|
41
|
-
private readonly _relativeLogChunksPath;
|
|
42
|
-
private readonly _relativeErrorLogPath;
|
|
43
40
|
constructor(options: IOperationMetadataManagerOptions);
|
|
44
41
|
/**
|
|
45
42
|
* Returns the relative paths of the metadata files to project folder.
|
|
@@ -48,7 +45,7 @@ export declare class OperationMetadataManager {
|
|
|
48
45
|
* Example: `.rush/temp/operation/_phase_build/all.log`
|
|
49
46
|
* Example: `.rush/temp/operation/_phase_build/error.log`
|
|
50
47
|
*/
|
|
51
|
-
get
|
|
48
|
+
get metadataFolderPath(): string;
|
|
52
49
|
saveAsync({ durationInSeconds, cobuildContextId, cobuildRunnerId, logPath, errorLogPath, logChunksPath }: IOperationMetaData): Promise<void>;
|
|
53
50
|
tryRestoreAsync({ terminal, terminalProvider, errorLogPath }: {
|
|
54
51
|
terminalProvider: ITerminalProvider;
|
|
@@ -8,6 +8,7 @@ export interface IOperationRunnerOptions {
|
|
|
8
8
|
rushProject: RushConfigurationProject;
|
|
9
9
|
rushConfiguration: RushConfiguration;
|
|
10
10
|
commandToRun: string;
|
|
11
|
+
commandForHash: string;
|
|
11
12
|
displayName: string;
|
|
12
13
|
phase: IPhase;
|
|
13
14
|
environment?: IEnvironment;
|
|
@@ -24,6 +25,7 @@ export declare class ShellOperationRunner implements IOperationRunner {
|
|
|
24
25
|
readonly cacheable: boolean;
|
|
25
26
|
readonly warningsAreAllowed: boolean;
|
|
26
27
|
private readonly _commandToRun;
|
|
28
|
+
private readonly _commandForHash;
|
|
27
29
|
private readonly _rushProject;
|
|
28
30
|
private readonly _rushConfiguration;
|
|
29
31
|
private readonly _environment?;
|
|
@@ -16,8 +16,9 @@ export declare function initializeShellOperationRunner(options: {
|
|
|
16
16
|
displayName: string;
|
|
17
17
|
rushConfiguration: RushConfiguration;
|
|
18
18
|
commandToRun: string | undefined;
|
|
19
|
+
commandForHash?: string;
|
|
20
|
+
customParameterValues: ReadonlyArray<string>;
|
|
19
21
|
}): IOperationRunner;
|
|
20
|
-
export declare function getScriptToRun(rushProject: RushConfigurationProject, commandToRun: string, shellCommand: string | undefined): string | undefined;
|
|
21
22
|
/**
|
|
22
23
|
* Memoizer for custom parameter values by phase
|
|
23
24
|
* @returns A function that returns the custom parameter values for a given phase
|
|
@@ -5,13 +5,13 @@ import type { IPhase } from '../api/CommandLineConfiguration';
|
|
|
5
5
|
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
6
6
|
import type { RushConfigurationProject } from '../api/RushConfigurationProject';
|
|
7
7
|
import type { Operation } from '../logic/operations/Operation';
|
|
8
|
-
import type { ProjectChangeAnalyzer } from '../logic/ProjectChangeAnalyzer';
|
|
9
8
|
import type { IExecutionResult, IOperationExecutionResult } from '../logic/operations/IOperationExecutionResult';
|
|
10
9
|
import type { CobuildConfiguration } from '../api/CobuildConfiguration';
|
|
11
10
|
import type { RushProjectConfiguration } from '../api/RushProjectConfiguration';
|
|
12
11
|
import type { IOperationRunnerContext } from '../logic/operations/IOperationRunner';
|
|
13
12
|
import type { ITelemetryData } from '../logic/Telemetry';
|
|
14
13
|
import type { OperationStatus } from '../logic/operations/OperationStatus';
|
|
14
|
+
import type { IInputsSnapshot } from '../logic/incremental/InputsSnapshot';
|
|
15
15
|
/**
|
|
16
16
|
* A plugin that interacts with a phased commands.
|
|
17
17
|
* @alpha
|
|
@@ -92,11 +92,10 @@ export interface ICreateOperationsContext {
|
|
|
92
92
|
*/
|
|
93
93
|
export interface IExecuteOperationsContext extends ICreateOperationsContext {
|
|
94
94
|
/**
|
|
95
|
-
* The current state of the repository.
|
|
96
|
-
*
|
|
97
|
-
* Note that this is not defined during the initial operation creation.
|
|
95
|
+
* The current state of the repository, if available.
|
|
96
|
+
* Not part of the creation context to avoid the overhead of Git calls when initializing the graph.
|
|
98
97
|
*/
|
|
99
|
-
readonly
|
|
98
|
+
readonly inputsSnapshot?: IInputsSnapshot;
|
|
100
99
|
}
|
|
101
100
|
/**
|
|
102
101
|
* Hooks into the execution process for phased commands
|