@rushstack/rush-sdk 5.124.6 → 5.125.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 +66 -10
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/api/CommandLineConfiguration.d.ts +0 -7
- package/lib/api/RushProjectConfiguration.d.ts +38 -1
- package/lib/api/packageManager/PnpmPackageManager.d.ts +0 -7
- package/lib/cli/actions/CheckAction.d.ts +1 -0
- package/lib/cli/scriptActions/PhasedScriptAction.d.ts +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/logic/operations/CacheableOperationPlugin.d.ts +5 -0
- package/lib/logic/operations/Operation.d.ts +14 -0
- package/lib/logic/operations/OperationMetadataManager.d.ts +19 -9
- package/lib/logic/operations/ProjectLogWritable.d.ts +34 -1
- package/lib/logic/operations/ShardedPhaseOperationPlugin.d.ts +9 -0
- package/lib/logic/operations/ShardedPhaseOperationPlugin.js +1 -0
- package/lib/logic/operations/ShellOperationRunner.d.ts +3 -0
- package/lib/logic/operations/ShellOperationRunnerPlugin.d.ts +10 -0
- package/lib/logic/versionMismatch/VersionMismatchFinder.d.ts +1 -0
- package/lib/utilities/Utilities.d.ts +2 -1
- package/package.json +7 -7
package/dist/rush-lib.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { CommandLineParameterKind } from '@rushstack/ts-command-line';
|
|
|
15
15
|
import { HookMap } from 'tapable';
|
|
16
16
|
import { IPackageJson } from '@rushstack/node-core-library';
|
|
17
17
|
import { ITerminal } from '@rushstack/terminal';
|
|
18
|
-
import
|
|
18
|
+
import { ITerminalProvider } from '@rushstack/terminal';
|
|
19
19
|
import { JsonObject } from '@rushstack/node-core-library';
|
|
20
20
|
import { PackageNameParser } from '@rushstack/node-core-library';
|
|
21
21
|
import type { StdioSummarizer } from '@rushstack/terminal';
|
|
@@ -1647,6 +1647,7 @@ export declare interface _IOperationMetadata {
|
|
|
1647
1647
|
durationInSeconds: number;
|
|
1648
1648
|
logPath: string;
|
|
1649
1649
|
errorLogPath: string;
|
|
1650
|
+
logChunksPath: string;
|
|
1650
1651
|
cobuildContextId: string | undefined;
|
|
1651
1652
|
cobuildRunnerId: string | undefined;
|
|
1652
1653
|
}
|
|
@@ -1657,6 +1658,7 @@ export declare interface _IOperationMetadata {
|
|
|
1657
1658
|
export declare interface _IOperationMetadataManagerOptions {
|
|
1658
1659
|
rushProject: RushConfigurationProject;
|
|
1659
1660
|
phase: IPhase;
|
|
1661
|
+
operation: Operation;
|
|
1660
1662
|
}
|
|
1661
1663
|
|
|
1662
1664
|
/**
|
|
@@ -1677,6 +1679,10 @@ export declare interface IOperationOptions {
|
|
|
1677
1679
|
* running the operation.
|
|
1678
1680
|
*/
|
|
1679
1681
|
runner?: IOperationRunner | undefined;
|
|
1682
|
+
/**
|
|
1683
|
+
* Settings defined in the project configuration for this operation, can be overriden.
|
|
1684
|
+
*/
|
|
1685
|
+
settings?: IOperationSettings | undefined;
|
|
1680
1686
|
}
|
|
1681
1687
|
|
|
1682
1688
|
/**
|
|
@@ -1820,6 +1826,13 @@ export declare interface IOperationSettings {
|
|
|
1820
1826
|
* calculating final hash value when reading and writing the build cache
|
|
1821
1827
|
*/
|
|
1822
1828
|
dependsOnAdditionalFiles?: string[];
|
|
1829
|
+
/**
|
|
1830
|
+
* An optional config object for sharding the operation. If specified, the operation will be sharded
|
|
1831
|
+
* into multiple invocations. The `count` property specifies the number of shards to create. The
|
|
1832
|
+
* `shardArgumentFormat` property specifies the format of the argument to pass to the command to
|
|
1833
|
+
* indicate the shard index and count. The default value is `--shard={shardIndex}/{shardCount}`.
|
|
1834
|
+
*/
|
|
1835
|
+
sharding?: IRushPhaseSharding;
|
|
1823
1836
|
/**
|
|
1824
1837
|
* How many concurrency units this operation should take up during execution. The maximum concurrent units is
|
|
1825
1838
|
* determined by the -p flag.
|
|
@@ -2204,6 +2217,37 @@ declare interface IRushGitPolicyJson {
|
|
|
2204
2217
|
tagSeparator?: string;
|
|
2205
2218
|
}
|
|
2206
2219
|
|
|
2220
|
+
/** @alpha */
|
|
2221
|
+
export declare interface IRushPhaseSharding {
|
|
2222
|
+
/**
|
|
2223
|
+
* The number of shards to create.
|
|
2224
|
+
*/
|
|
2225
|
+
count: number;
|
|
2226
|
+
/**
|
|
2227
|
+
* The format of the argument to pass to the command to indicate the shard index and count.
|
|
2228
|
+
*
|
|
2229
|
+
* @defaultValue `--shard={shardIndex}/{shardCount}`
|
|
2230
|
+
*/
|
|
2231
|
+
shardArgumentFormat?: string;
|
|
2232
|
+
/**
|
|
2233
|
+
* An optional argument to pass to the command to indicate the output folder for the shard.
|
|
2234
|
+
* It must end with `{shardIndex}`.
|
|
2235
|
+
*
|
|
2236
|
+
* @defaultValue `--shard-output-folder=.rush/operations/{phaseName}/shards/{shardIndex}`.
|
|
2237
|
+
*/
|
|
2238
|
+
outputFolderArgumentFormat?: string;
|
|
2239
|
+
/**
|
|
2240
|
+
* Configuration for the shard operation. All other configuration applies to the collator operation.
|
|
2241
|
+
*/
|
|
2242
|
+
shardOperationSettings?: {
|
|
2243
|
+
/**
|
|
2244
|
+
* How many concurrency units this operation should take up during execution. The maximum concurrent units is
|
|
2245
|
+
* determined by the -p flag.
|
|
2246
|
+
*/
|
|
2247
|
+
weight?: number;
|
|
2248
|
+
};
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2207
2251
|
/**
|
|
2208
2252
|
* @beta
|
|
2209
2253
|
*/
|
|
@@ -2705,11 +2749,20 @@ export declare class Operation {
|
|
|
2705
2749
|
* output, or an operation using NullOperationRunner, which might use a value of 0.
|
|
2706
2750
|
*/
|
|
2707
2751
|
weight: number;
|
|
2752
|
+
/**
|
|
2753
|
+
* Get the operation settings for this operation, defaults to the values defined in
|
|
2754
|
+
* the project configuration.
|
|
2755
|
+
*/
|
|
2756
|
+
settings: IOperationSettings | undefined;
|
|
2708
2757
|
constructor(options?: IOperationOptions);
|
|
2709
2758
|
/**
|
|
2710
2759
|
* The name of this operation, for logging.
|
|
2711
2760
|
*/
|
|
2712
2761
|
get name(): string | undefined;
|
|
2762
|
+
/**
|
|
2763
|
+
* If set to true, this operation is considered a no-op and can be considered always skipped for analysis purposes.
|
|
2764
|
+
*/
|
|
2765
|
+
get isNoOp(): boolean;
|
|
2713
2766
|
/**
|
|
2714
2767
|
* Adds the specified operation as a dependency and updates the consumer list.
|
|
2715
2768
|
*/
|
|
@@ -2727,11 +2780,14 @@ export declare class Operation {
|
|
|
2727
2780
|
*/
|
|
2728
2781
|
export declare class _OperationMetadataManager {
|
|
2729
2782
|
readonly stateFile: _OperationStateFile;
|
|
2730
|
-
|
|
2731
|
-
private
|
|
2732
|
-
private
|
|
2733
|
-
private
|
|
2734
|
-
private
|
|
2783
|
+
readonly logFilenameIdentifier: string;
|
|
2784
|
+
private readonly _metadataFolder;
|
|
2785
|
+
private readonly _logPath;
|
|
2786
|
+
private readonly _errorLogPath;
|
|
2787
|
+
private readonly _logChunksPath;
|
|
2788
|
+
private readonly _relativeLogPath;
|
|
2789
|
+
private readonly _relativeLogChunksPath;
|
|
2790
|
+
private readonly _relativeErrorLogPath;
|
|
2735
2791
|
constructor(options: _IOperationMetadataManagerOptions);
|
|
2736
2792
|
/**
|
|
2737
2793
|
* Returns the relative paths of the metadata files to project folder.
|
|
@@ -2741,10 +2797,10 @@ export declare class _OperationMetadataManager {
|
|
|
2741
2797
|
* Example: `.rush/temp/operation/_phase_build/error.log`
|
|
2742
2798
|
*/
|
|
2743
2799
|
get relativeFilepaths(): string[];
|
|
2744
|
-
saveAsync({ durationInSeconds, cobuildContextId, cobuildRunnerId, logPath, errorLogPath }: _IOperationMetadata): Promise<void>;
|
|
2745
|
-
tryRestoreAsync({ terminal,
|
|
2800
|
+
saveAsync({ durationInSeconds, cobuildContextId, cobuildRunnerId, logPath, errorLogPath, logChunksPath }: _IOperationMetadata): Promise<void>;
|
|
2801
|
+
tryRestoreAsync({ terminal, terminalProvider, errorLogPath }: {
|
|
2802
|
+
terminalProvider: ITerminalProvider;
|
|
2746
2803
|
terminal: ITerminal;
|
|
2747
|
-
logPath: string;
|
|
2748
2804
|
errorLogPath: string;
|
|
2749
2805
|
}): Promise<void>;
|
|
2750
2806
|
}
|
|
@@ -4495,7 +4551,7 @@ export declare class RushProjectConfiguration {
|
|
|
4495
4551
|
* Examines the list of source files for the project and the target phase and returns a reason
|
|
4496
4552
|
* why the project cannot enable the build cache for that phase, or undefined if it is safe to so do.
|
|
4497
4553
|
*/
|
|
4498
|
-
getCacheDisabledReason(trackedFileNames: Iterable<string>, phaseName: string): string | undefined;
|
|
4554
|
+
getCacheDisabledReason(trackedFileNames: Iterable<string>, phaseName: string, isNoOp: boolean): string | undefined;
|
|
4499
4555
|
/**
|
|
4500
4556
|
* Loads the rush-project.json data for the specified project.
|
|
4501
4557
|
*/
|
package/dist/tsdoc-metadata.json
CHANGED
|
@@ -156,13 +156,6 @@ export declare class CommandLineConfiguration {
|
|
|
156
156
|
*/
|
|
157
157
|
static loadFromFileOrDefault(jsonFilePath?: string): CommandLineConfiguration;
|
|
158
158
|
prependAdditionalPathFolder(pathFolder: string): void;
|
|
159
|
-
/**
|
|
160
|
-
* This function replaces colons (":") with underscores ("_").
|
|
161
|
-
*
|
|
162
|
-
* ts-command-line restricts command names to lowercase letters, numbers, underscores, and colons.
|
|
163
|
-
* Replacing colons with underscores produces a filesystem-safe name.
|
|
164
|
-
*/
|
|
165
|
-
private _normalizeNameForLogFilenameIdentifiers;
|
|
166
159
|
private _translateBulkCommandToPhasedCommand;
|
|
167
160
|
}
|
|
168
161
|
export {};
|
|
@@ -27,6 +27,36 @@ export interface IRushProjectJson {
|
|
|
27
27
|
disableBuildCacheForProject?: boolean;
|
|
28
28
|
operationSettings?: IOperationSettings[];
|
|
29
29
|
}
|
|
30
|
+
/** @alpha */
|
|
31
|
+
export interface IRushPhaseSharding {
|
|
32
|
+
/**
|
|
33
|
+
* The number of shards to create.
|
|
34
|
+
*/
|
|
35
|
+
count: number;
|
|
36
|
+
/**
|
|
37
|
+
* The format of the argument to pass to the command to indicate the shard index and count.
|
|
38
|
+
*
|
|
39
|
+
* @defaultValue `--shard={shardIndex}/{shardCount}`
|
|
40
|
+
*/
|
|
41
|
+
shardArgumentFormat?: string;
|
|
42
|
+
/**
|
|
43
|
+
* An optional argument to pass to the command to indicate the output folder for the shard.
|
|
44
|
+
* It must end with `{shardIndex}`.
|
|
45
|
+
*
|
|
46
|
+
* @defaultValue `--shard-output-folder=.rush/operations/{phaseName}/shards/{shardIndex}`.
|
|
47
|
+
*/
|
|
48
|
+
outputFolderArgumentFormat?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Configuration for the shard operation. All other configuration applies to the collator operation.
|
|
51
|
+
*/
|
|
52
|
+
shardOperationSettings?: {
|
|
53
|
+
/**
|
|
54
|
+
* How many concurrency units this operation should take up during execution. The maximum concurrent units is
|
|
55
|
+
* determined by the -p flag.
|
|
56
|
+
*/
|
|
57
|
+
weight?: number;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
30
60
|
/**
|
|
31
61
|
* @alpha
|
|
32
62
|
*/
|
|
@@ -73,6 +103,13 @@ export interface IOperationSettings {
|
|
|
73
103
|
* calculating final hash value when reading and writing the build cache
|
|
74
104
|
*/
|
|
75
105
|
dependsOnAdditionalFiles?: string[];
|
|
106
|
+
/**
|
|
107
|
+
* An optional config object for sharding the operation. If specified, the operation will be sharded
|
|
108
|
+
* into multiple invocations. The `count` property specifies the number of shards to create. The
|
|
109
|
+
* `shardArgumentFormat` property specifies the format of the argument to pass to the command to
|
|
110
|
+
* indicate the shard index and count. The default value is `--shard={shardIndex}/{shardCount}`.
|
|
111
|
+
*/
|
|
112
|
+
sharding?: IRushPhaseSharding;
|
|
76
113
|
/**
|
|
77
114
|
* How many concurrency units this operation should take up during execution. The maximum concurrent units is
|
|
78
115
|
* determined by the -p flag.
|
|
@@ -111,7 +148,7 @@ export declare class RushProjectConfiguration {
|
|
|
111
148
|
* Examines the list of source files for the project and the target phase and returns a reason
|
|
112
149
|
* why the project cannot enable the build cache for that phase, or undefined if it is safe to so do.
|
|
113
150
|
*/
|
|
114
|
-
getCacheDisabledReason(trackedFileNames: Iterable<string>, phaseName: string): string | undefined;
|
|
151
|
+
getCacheDisabledReason(trackedFileNames: Iterable<string>, phaseName: string, isNoOp: boolean): string | undefined;
|
|
115
152
|
/**
|
|
116
153
|
* Loads the rush-project.json data for the specified project.
|
|
117
154
|
*/
|
|
@@ -11,13 +11,6 @@ export declare class PnpmPackageManager extends PackageManager {
|
|
|
11
11
|
* Example: `pnpmfile.js` or `.pnpmfile.cjs`
|
|
12
12
|
*/
|
|
13
13
|
readonly pnpmfileFilename: string;
|
|
14
|
-
/**
|
|
15
|
-
* The filename of the shrinkwrap file of a subspace that is used by the package manager.
|
|
16
|
-
*
|
|
17
|
-
* @remarks
|
|
18
|
-
* Example: `.pnpmfile-subspace.cjs`
|
|
19
|
-
*/
|
|
20
|
-
subspacePnpmfileFilename: string;
|
|
21
14
|
/** @internal */
|
|
22
15
|
constructor(version: string);
|
|
23
16
|
}
|
|
@@ -4,6 +4,7 @@ export declare class CheckAction extends BaseRushAction {
|
|
|
4
4
|
private readonly _terminal;
|
|
5
5
|
private readonly _jsonFlag;
|
|
6
6
|
private readonly _verboseFlag;
|
|
7
|
+
private readonly _subspaceParameter;
|
|
7
8
|
constructor(parser: RushCommandLineParser);
|
|
8
9
|
protected runAsync(): Promise<void>;
|
|
9
10
|
}
|
|
@@ -49,6 +49,7 @@ export declare class PhasedScriptAction extends BaseScriptAction<IPhasedCommandC
|
|
|
49
49
|
private readonly _ignoreHooksParameter;
|
|
50
50
|
private readonly _watchParameter;
|
|
51
51
|
private readonly _timelineParameter;
|
|
52
|
+
private readonly _cobuildPlanParameter;
|
|
52
53
|
private readonly _installParameter;
|
|
53
54
|
private readonly _noIPCParameter;
|
|
54
55
|
constructor(options: IPhasedScriptActionOptions);
|
package/lib/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export { EnvironmentConfiguration, EnvironmentVariableNames, IEnvironmentConfigu
|
|
|
19
19
|
export { RushConstants } from './logic/RushConstants';
|
|
20
20
|
export { PackageManagerName, PackageManager } from './api/packageManager/PackageManager';
|
|
21
21
|
export { RushConfigurationProject } from './api/RushConfigurationProject';
|
|
22
|
-
export { IRushProjectJson as _IRushProjectJson, IOperationSettings, RushProjectConfiguration } from './api/RushProjectConfiguration';
|
|
22
|
+
export { IRushProjectJson as _IRushProjectJson, IOperationSettings, RushProjectConfiguration, IRushPhaseSharding } from './api/RushProjectConfiguration';
|
|
23
23
|
export { RushUserConfiguration } from './api/RushUserConfiguration';
|
|
24
24
|
export { RushGlobalFolder as _RushGlobalFolder } from './api/RushGlobalFolder';
|
|
25
25
|
export { ApprovedPackagesItem, ApprovedPackagesConfiguration } from './api/ApprovedPackagesConfiguration';
|
|
@@ -4,7 +4,9 @@ import { ProjectBuildCache } from '../buildCache/ProjectBuildCache';
|
|
|
4
4
|
import type { IOperationSettings } from '../../api/RushProjectConfiguration';
|
|
5
5
|
import { ProjectLogWritable } from './ProjectLogWritable';
|
|
6
6
|
import type { CobuildConfiguration } from '../../api/CobuildConfiguration';
|
|
7
|
+
import { DisjointSet } from '../cobuild/DisjointSet';
|
|
7
8
|
import { PeriodicCallback } from './PeriodicCallback';
|
|
9
|
+
import type { Operation } from './Operation';
|
|
8
10
|
import type { IPhasedCommandPlugin, PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
|
|
9
11
|
import type { ProjectChangeAnalyzer } from '../ProjectChangeAnalyzer';
|
|
10
12
|
import type { BuildCacheConfiguration } from '../../api/BuildCacheConfiguration';
|
|
@@ -49,4 +51,7 @@ export declare class CacheableOperationPlugin implements IPhasedCommandPlugin {
|
|
|
49
51
|
private _createBuildCacheTerminal;
|
|
50
52
|
private _tryGetBuildCacheProjectLogWritable;
|
|
51
53
|
}
|
|
54
|
+
export declare function clusterOperations(initialClusters: DisjointSet<Operation>, operationBuildCacheMap: Map<Operation, {
|
|
55
|
+
cacheDisabledReason: string | undefined;
|
|
56
|
+
}>): void;
|
|
52
57
|
//# sourceMappingURL=CacheableOperationPlugin.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
2
2
|
import type { IPhase } from '../../api/CommandLineConfiguration';
|
|
3
3
|
import type { IOperationRunner } from './IOperationRunner';
|
|
4
|
+
import type { IOperationSettings } from '../../api/RushProjectConfiguration';
|
|
4
5
|
/**
|
|
5
6
|
* Options for constructing a new Operation.
|
|
6
7
|
* @alpha
|
|
@@ -19,6 +20,10 @@ export interface IOperationOptions {
|
|
|
19
20
|
* running the operation.
|
|
20
21
|
*/
|
|
21
22
|
runner?: IOperationRunner | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Settings defined in the project configuration for this operation, can be overriden.
|
|
25
|
+
*/
|
|
26
|
+
settings?: IOperationSettings | undefined;
|
|
22
27
|
}
|
|
23
28
|
/**
|
|
24
29
|
* The `Operation` class is a node in the dependency graph of work that needs to be scheduled by the
|
|
@@ -63,11 +68,20 @@ export declare class Operation {
|
|
|
63
68
|
* output, or an operation using NullOperationRunner, which might use a value of 0.
|
|
64
69
|
*/
|
|
65
70
|
weight: number;
|
|
71
|
+
/**
|
|
72
|
+
* Get the operation settings for this operation, defaults to the values defined in
|
|
73
|
+
* the project configuration.
|
|
74
|
+
*/
|
|
75
|
+
settings: IOperationSettings | undefined;
|
|
66
76
|
constructor(options?: IOperationOptions);
|
|
67
77
|
/**
|
|
68
78
|
* The name of this operation, for logging.
|
|
69
79
|
*/
|
|
70
80
|
get name(): string | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* If set to true, this operation is considered a no-op and can be considered always skipped for analysis purposes.
|
|
83
|
+
*/
|
|
84
|
+
get isNoOp(): boolean;
|
|
71
85
|
/**
|
|
72
86
|
* Adds the specified operation as a dependency and updates the consumer list.
|
|
73
87
|
*/
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ITerminalChunk, type ITerminal, type ITerminalProvider } from '@rushstack/terminal';
|
|
2
2
|
import { OperationStateFile } from './OperationStateFile';
|
|
3
3
|
import type { IPhase } from '../../api/CommandLineConfiguration';
|
|
4
4
|
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
5
|
+
import type { Operation } from './Operation';
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
8
9
|
export interface IOperationMetadataManagerOptions {
|
|
9
10
|
rushProject: RushConfigurationProject;
|
|
10
11
|
phase: IPhase;
|
|
12
|
+
operation: Operation;
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
15
|
* @internal
|
|
@@ -16,9 +18,13 @@ export interface IOperationMetaData {
|
|
|
16
18
|
durationInSeconds: number;
|
|
17
19
|
logPath: string;
|
|
18
20
|
errorLogPath: string;
|
|
21
|
+
logChunksPath: string;
|
|
19
22
|
cobuildContextId: string | undefined;
|
|
20
23
|
cobuildRunnerId: string | undefined;
|
|
21
24
|
}
|
|
25
|
+
export interface ILogChunkStorage {
|
|
26
|
+
chunks: ITerminalChunk[];
|
|
27
|
+
}
|
|
22
28
|
/**
|
|
23
29
|
* A helper class for managing the meta files of a operation.
|
|
24
30
|
*
|
|
@@ -26,11 +32,14 @@ export interface IOperationMetaData {
|
|
|
26
32
|
*/
|
|
27
33
|
export declare class OperationMetadataManager {
|
|
28
34
|
readonly stateFile: OperationStateFile;
|
|
29
|
-
|
|
30
|
-
private
|
|
31
|
-
private
|
|
32
|
-
private
|
|
33
|
-
private
|
|
35
|
+
readonly logFilenameIdentifier: string;
|
|
36
|
+
private readonly _metadataFolder;
|
|
37
|
+
private readonly _logPath;
|
|
38
|
+
private readonly _errorLogPath;
|
|
39
|
+
private readonly _logChunksPath;
|
|
40
|
+
private readonly _relativeLogPath;
|
|
41
|
+
private readonly _relativeLogChunksPath;
|
|
42
|
+
private readonly _relativeErrorLogPath;
|
|
34
43
|
constructor(options: IOperationMetadataManagerOptions);
|
|
35
44
|
/**
|
|
36
45
|
* Returns the relative paths of the metadata files to project folder.
|
|
@@ -40,11 +49,12 @@ export declare class OperationMetadataManager {
|
|
|
40
49
|
* Example: `.rush/temp/operation/_phase_build/error.log`
|
|
41
50
|
*/
|
|
42
51
|
get relativeFilepaths(): string[];
|
|
43
|
-
saveAsync({ durationInSeconds, cobuildContextId, cobuildRunnerId, logPath, errorLogPath }: IOperationMetaData): Promise<void>;
|
|
44
|
-
tryRestoreAsync({ terminal,
|
|
52
|
+
saveAsync({ durationInSeconds, cobuildContextId, cobuildRunnerId, logPath, errorLogPath, logChunksPath }: IOperationMetaData): Promise<void>;
|
|
53
|
+
tryRestoreAsync({ terminal, terminalProvider, errorLogPath }: {
|
|
54
|
+
terminalProvider: ITerminalProvider;
|
|
45
55
|
terminal: ITerminal;
|
|
46
|
-
logPath: string;
|
|
47
56
|
errorLogPath: string;
|
|
48
57
|
}): Promise<void>;
|
|
49
58
|
}
|
|
59
|
+
export declare function normalizeNameForLogFilenameIdentifiers(name: string): string;
|
|
50
60
|
//# sourceMappingURL=OperationMetadataManager.d.ts.map
|
|
@@ -5,20 +5,53 @@ export declare class ProjectLogWritable extends TerminalWritable {
|
|
|
5
5
|
private readonly _terminal;
|
|
6
6
|
readonly logPath: string;
|
|
7
7
|
readonly errorLogPath: string;
|
|
8
|
+
readonly logChunksPath: string;
|
|
8
9
|
readonly relativeLogPath: string;
|
|
9
10
|
readonly relativeErrorLogPath: string;
|
|
11
|
+
readonly relativeLogChunksPath: string;
|
|
10
12
|
private _logWriter;
|
|
11
13
|
private _errorLogWriter;
|
|
12
|
-
|
|
14
|
+
/**
|
|
15
|
+
* A new terminal stream that writes all log chunks to a JSON format so they can be faithfully reconstructed
|
|
16
|
+
* during build cache restores. This is used for adding warning + error messages in cobuilds where the original
|
|
17
|
+
* logs cannot be completely restored from the existing `all.log` and `error.log` files.
|
|
18
|
+
*
|
|
19
|
+
* Example output:
|
|
20
|
+
* libraries/rush-lib/.rush/temp/operations/rush-lib._phase_build.chunks.jsonl
|
|
21
|
+
* ```
|
|
22
|
+
* {"kind":"O","text":"Invoking: heft run --only build -- --clean \n"}
|
|
23
|
+
* {"kind":"O","text":" ---- build started ---- \n"}
|
|
24
|
+
* {"kind":"O","text":"[build:clean] Deleted 0 files and 5 folders\n"}
|
|
25
|
+
* {"kind":"O","text":"[build:typescript] Using TypeScript version 5.4.2\n"}
|
|
26
|
+
* {"kind":"O","text":"[build:lint] Using ESLint version 8.57.0\n"}
|
|
27
|
+
* {"kind":"E","text":"[build:lint] Warning: libraries/rush-lib/src/logic/operations/LogChunksWritable.ts:15:7 - (@typescript-eslint/typedef) Expected test to have a type annotation.\n"}
|
|
28
|
+
* {"kind":"E","text":"[build:lint] Warning: libraries/rush-lib/src/logic/operations/LogChunksWritable.ts:15:7 - (@typescript-eslint/no-unused-vars) 'test' is assigned a value but never used.\n"}
|
|
29
|
+
* {"kind":"O","text":"[build:typescript] Copied 1138 folders or files and linked 0 files\n"}
|
|
30
|
+
* {"kind":"O","text":"[build:webpack] Using Webpack version 5.82.1\n"}
|
|
31
|
+
* {"kind":"O","text":"[build:webpack] Running Webpack compilation\n"}
|
|
32
|
+
* {"kind":"O","text":"[build:api-extractor] Using API Extractor version 7.43.1\n"}
|
|
33
|
+
* {"kind":"O","text":"[build:api-extractor] Analysis will use the bundled TypeScript version 5.4.2\n"}
|
|
34
|
+
* {"kind":"O","text":"[build:copy-mock-flush-telemetry-plugin] Copied 1260 folders or files and linked 5 files\n"}
|
|
35
|
+
* {"kind":"O","text":" ---- build finished (6.856s) ---- \n"}
|
|
36
|
+
* {"kind":"O","text":"-------------------- Finished (6.858s) --------------------\n"}
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
private _chunkWriter;
|
|
40
|
+
private _enableChunkedOutput;
|
|
41
|
+
constructor(project: RushConfigurationProject, terminal: CollatedTerminal, logFilenameIdentifier: string, options?: {
|
|
42
|
+
enableChunkedOutput?: boolean;
|
|
43
|
+
});
|
|
13
44
|
static getLogFilePaths({ project, logFilenameIdentifier, isLegacyLog }: {
|
|
14
45
|
project: RushConfigurationProject;
|
|
15
46
|
logFilenameIdentifier: string;
|
|
16
47
|
isLegacyLog?: boolean;
|
|
17
48
|
}): {
|
|
18
49
|
logPath: string;
|
|
50
|
+
logChunksPath: string;
|
|
19
51
|
errorLogPath: string;
|
|
20
52
|
relativeLogPath: string;
|
|
21
53
|
relativeErrorLogPath: string;
|
|
54
|
+
relativeLogChunksPath: string;
|
|
22
55
|
};
|
|
23
56
|
writeChunk(chunk: ITerminalChunk): void;
|
|
24
57
|
protected onWriteChunk(chunk: ITerminalChunk): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IPhasedCommandPlugin, PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
|
|
2
|
+
export declare const PLUGIN_NAME: 'ShardedPhasedOperationPlugin';
|
|
3
|
+
/**
|
|
4
|
+
* Phased command that shards a phase into multiple operations.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ShardedPhasedOperationPlugin implements IPhasedCommandPlugin {
|
|
7
|
+
apply(hooks: PhasedCommandHooks): void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ShardedPhaseOperationPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/operations/ShardedPhaseOperationPlugin");
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IPhase } from '../../api/CommandLineConfiguration';
|
|
2
2
|
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
3
3
|
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
4
|
+
import { type IEnvironment } from '../../utilities/Utilities';
|
|
4
5
|
import type { IOperationRunner, IOperationRunnerContext } from './IOperationRunner';
|
|
5
6
|
import { OperationStatus } from './OperationStatus';
|
|
6
7
|
export interface IOperationRunnerOptions {
|
|
@@ -9,6 +10,7 @@ export interface IOperationRunnerOptions {
|
|
|
9
10
|
commandToRun: string;
|
|
10
11
|
displayName: string;
|
|
11
12
|
phase: IPhase;
|
|
13
|
+
environment?: IEnvironment;
|
|
12
14
|
}
|
|
13
15
|
/**
|
|
14
16
|
* An `IOperationRunner` subclass that performs an operation via a shell command.
|
|
@@ -24,6 +26,7 @@ export declare class ShellOperationRunner implements IOperationRunner {
|
|
|
24
26
|
private readonly _commandToRun;
|
|
25
27
|
private readonly _rushProject;
|
|
26
28
|
private readonly _rushConfiguration;
|
|
29
|
+
private readonly _environment?;
|
|
27
30
|
constructor(options: IOperationRunnerOptions);
|
|
28
31
|
executeAsync(context: IOperationRunnerContext): Promise<OperationStatus>;
|
|
29
32
|
getConfigHash(): string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { IPhase } from '../../api/CommandLineConfiguration';
|
|
2
2
|
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
3
3
|
import type { IPhasedCommandPlugin, PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
|
|
4
|
+
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
5
|
+
import type { IOperationRunner } from './IOperationRunner';
|
|
4
6
|
export declare const PLUGIN_NAME: 'ShellOperationRunnerPlugin';
|
|
5
7
|
/**
|
|
6
8
|
* Core phased command plugin that provides the functionality for executing an operation via shell command.
|
|
@@ -8,6 +10,14 @@ export declare const PLUGIN_NAME: 'ShellOperationRunnerPlugin';
|
|
|
8
10
|
export declare class ShellOperationRunnerPlugin implements IPhasedCommandPlugin {
|
|
9
11
|
apply(hooks: PhasedCommandHooks): void;
|
|
10
12
|
}
|
|
13
|
+
export declare function initializeShellOperationRunner(options: {
|
|
14
|
+
phase: IPhase;
|
|
15
|
+
project: RushConfigurationProject;
|
|
16
|
+
displayName: string;
|
|
17
|
+
rushConfiguration: RushConfiguration;
|
|
18
|
+
commandToRun: string | undefined;
|
|
19
|
+
}): IOperationRunner;
|
|
20
|
+
export declare function getScriptToRun(rushProject: RushConfigurationProject, commandToRun: string, shellCommand: string | undefined): string | undefined;
|
|
11
21
|
/**
|
|
12
22
|
* Memoizer for custom parameter values by phase
|
|
13
23
|
* @returns A function that returns the custom parameter values for a given phase
|
|
@@ -8,6 +8,7 @@ export interface IVersionMismatchFinderOptions {
|
|
|
8
8
|
export interface IVersionMismatchFinderRushCheckOptions extends IVersionMismatchFinderOptions {
|
|
9
9
|
printAsJson?: boolean | undefined;
|
|
10
10
|
truncateLongPackageNameLists?: boolean | undefined;
|
|
11
|
+
subspace?: Subspace | undefined;
|
|
11
12
|
}
|
|
12
13
|
export interface IVersionMismatchFinderEnsureConsistentVersionsOptions extends IVersionMismatchFinderOptions {
|
|
13
14
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
2
3
|
import * as child_process from 'child_process';
|
|
3
4
|
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
4
5
|
import { syncNpmrc } from './npmrcUtilities';
|
|
@@ -126,7 +127,7 @@ export declare class Utilities {
|
|
|
126
127
|
*
|
|
127
128
|
* It's basically the same as executeCommand() except that it returns a Promise.
|
|
128
129
|
*/
|
|
129
|
-
static executeCommandAndInspectOutputAsync(options: IExecuteCommandOptions, onStdoutStreamChunk?: (chunk: string) => string | void, onExit?: (
|
|
130
|
+
static executeCommandAndInspectOutputAsync(options: IExecuteCommandOptions, onStdoutStreamChunk?: (chunk: string) => string | void, onExit?: (exitCode: number | null, signal: NodeJS.Signals | null) => void): Promise<void>;
|
|
130
131
|
/**
|
|
131
132
|
* Executes the command with the specified command-line parameters, and waits for it to complete.
|
|
132
133
|
* The current directory will be set to the specified workingDirectory.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/rush-sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.125.0",
|
|
4
4
|
"description": "An API for interacting with the Rush engine",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@types/node-fetch": "2.6.2",
|
|
27
27
|
"tapable": "2.2.1",
|
|
28
|
-
"@rushstack/node-core-library": "
|
|
29
|
-
"@rushstack/terminal": "0.
|
|
28
|
+
"@rushstack/node-core-library": "5.1.0",
|
|
29
|
+
"@rushstack/terminal": "0.12.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/semver": "7.5.0",
|
|
33
33
|
"@types/webpack-env": "1.18.0",
|
|
34
|
-
"@rushstack/heft": "0.66.
|
|
35
|
-
"@microsoft/rush-lib": "5.124.6",
|
|
36
|
-
"@rushstack/stream-collator": "4.1.46",
|
|
34
|
+
"@rushstack/heft": "0.66.12",
|
|
37
35
|
"local-node-rig": "1.0.0",
|
|
38
|
-
"@
|
|
36
|
+
"@microsoft/rush-lib": "5.125.0",
|
|
37
|
+
"@rushstack/stream-collator": "4.1.50",
|
|
38
|
+
"@rushstack/ts-command-line": "4.21.2"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "heft build --clean",
|