@rushstack/rush-sdk 5.150.0 → 5.152.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.
Files changed (52) hide show
  1. package/dist/rush-lib.d.ts +33 -12
  2. package/dist/tsdoc-metadata.json +1 -1
  3. package/lib/api/CommandLineConfiguration.d.ts +2 -1
  4. package/lib/cli/RushCommandLineParser.d.ts +1 -0
  5. package/lib/cli/actions/AlertAction.d.ts +0 -1
  6. package/lib/cli/actions/BaseAutoinstallerAction.d.ts +0 -2
  7. package/lib/cli/actions/BaseHotlinkPackageAction.d.ts +10 -0
  8. package/lib/cli/actions/BaseHotlinkPackageAction.js +1 -0
  9. package/lib/cli/actions/BaseInstallAction.d.ts +0 -2
  10. package/lib/cli/actions/BaseRushAction.d.ts +6 -4
  11. package/lib/cli/actions/BridgePackageAction.d.ts +11 -0
  12. package/lib/cli/actions/BridgePackageAction.js +1 -0
  13. package/lib/cli/actions/ChangeAction.d.ts +0 -1
  14. package/lib/cli/actions/CheckAction.d.ts +0 -1
  15. package/lib/cli/actions/LinkPackageAction.d.ts +11 -0
  16. package/lib/cli/actions/LinkPackageAction.js +1 -0
  17. package/lib/cli/actions/RemoveAction.d.ts +0 -1
  18. package/lib/cli/scriptActions/PhasedScriptAction.d.ts +1 -0
  19. package/lib/index.d.ts +1 -0
  20. package/lib/logic/InteractiveUpgrader.d.ts +1 -0
  21. package/lib/logic/PackageJsonUpdater.d.ts +5 -5
  22. package/lib/logic/RushConstants.d.ts +13 -0
  23. package/lib/logic/base/BaseLinkManager.d.ts +3 -3
  24. package/lib/logic/buildCache/FileSystemBuildCacheProvider.d.ts +0 -2
  25. package/lib/logic/buildCache/ICloudBuildCacheProvider.d.ts +0 -2
  26. package/lib/logic/installManager/InstallHelpers.d.ts +0 -1
  27. package/lib/logic/npm/NpmLinkManager.d.ts +1 -1
  28. package/lib/logic/operations/CacheableOperationPlugin.d.ts +0 -1
  29. package/lib/logic/operations/DebugHashesPlugin.d.ts +8 -0
  30. package/lib/logic/operations/DebugHashesPlugin.js +1 -0
  31. package/lib/logic/operations/IOperationExecutionResult.d.ts +10 -0
  32. package/lib/logic/operations/IOperationRunner.d.ts +1 -1
  33. package/lib/logic/operations/Operation.d.ts +9 -9
  34. package/lib/logic/operations/OperationExecutionManager.d.ts +2 -2
  35. package/lib/logic/operations/OperationExecutionRecord.d.ts +7 -9
  36. package/lib/logic/operations/OperationMetadataManager.d.ts +0 -4
  37. package/lib/logic/operations/ShellOperationRunner.d.ts +5 -1
  38. package/lib/logic/setup/KeyboardLoop.d.ts +0 -2
  39. package/lib/utilities/HotlinkManager.d.ts +19 -0
  40. package/lib/utilities/HotlinkManager.js +1 -0
  41. package/lib/utilities/InteractiveUpgradeUI.d.ts +1 -1
  42. package/lib/utilities/RushAlerts.d.ts +3 -3
  43. package/lib/utilities/Utilities.d.ts +0 -1
  44. package/lib/utilities/WebClient.d.ts +0 -3
  45. package/lib/utilities/actionNameConstants.d.ts +4 -0
  46. package/lib/utilities/actionNameConstants.js +1 -0
  47. package/lib/utilities/npmrcUtilities.d.ts +0 -1
  48. package/lib-shim/index.js +63 -23
  49. package/lib-shim/index.js.map +1 -1
  50. package/lib-shim/loader.js +39 -18
  51. package/lib-shim/loader.js.map +1 -1
  52. package/package.json +14 -13
@@ -1788,6 +1788,16 @@ export declare interface IOperationExecutionResult {
1788
1788
  * The paths to the log files, if applicable.
1789
1789
  */
1790
1790
  readonly logFilePaths: ILogFilePaths | undefined;
1791
+ /**
1792
+ * Gets the hash of the state of all registered inputs to this operation.
1793
+ * Calling this method will throw if Git is not available.
1794
+ */
1795
+ getStateHash(): string;
1796
+ /**
1797
+ * Gets the components of the state hash. This is useful for debugging purposes.
1798
+ * Calling this method will throw if Git is not available.
1799
+ */
1800
+ getStateHashComponents(): ReadonlyArray<string>;
1791
1801
  }
1792
1802
 
1793
1803
  /**
@@ -1806,8 +1816,6 @@ export declare interface _IOperationMetadata {
1806
1816
  * @internal
1807
1817
  */
1808
1818
  export declare interface _IOperationMetadataManagerOptions {
1809
- rushProject: RushConfigurationProject;
1810
- phase: IPhase;
1811
1819
  operation: Operation;
1812
1820
  }
1813
1821
 
@@ -1817,13 +1825,13 @@ export declare interface _IOperationMetadataManagerOptions {
1817
1825
  */
1818
1826
  export declare interface IOperationOptions {
1819
1827
  /**
1820
- * The Rush phase associated with this Operation, if any
1828
+ * The Rush phase associated with this Operation
1821
1829
  */
1822
- phase?: IPhase | undefined;
1830
+ phase: IPhase;
1823
1831
  /**
1824
- * The Rush project associated with this Operation, if any
1832
+ * The Rush project associated with this Operation
1825
1833
  */
1826
- project?: RushConfigurationProject | undefined;
1834
+ project: RushConfigurationProject;
1827
1835
  /**
1828
1836
  * When the scheduler is ready to process this `Operation`, the `runner` implements the actual work of
1829
1837
  * running the operation.
@@ -1906,7 +1914,7 @@ export declare interface IOperationRunnerContext {
1906
1914
  *
1907
1915
  * @internal
1908
1916
  */
1909
- _operationMetadataManager?: _OperationMetadataManager;
1917
+ _operationMetadataManager: _OperationMetadataManager;
1910
1918
  /**
1911
1919
  * Object used to track elapsed time.
1912
1920
  */
@@ -2771,13 +2779,13 @@ export declare class NpmOptionsConfiguration extends PackageManagerOptionsConfig
2771
2779
  */
2772
2780
  export declare class Operation {
2773
2781
  /**
2774
- * The Rush phase associated with this Operation, if any
2782
+ * The Rush phase associated with this Operation
2775
2783
  */
2776
- readonly associatedPhase: IPhase | undefined;
2784
+ readonly associatedPhase: IPhase;
2777
2785
  /**
2778
- * The Rush project associated with this Operation, if any
2786
+ * The Rush project associated with this Operation
2779
2787
  */
2780
- readonly associatedProject: RushConfigurationProject | undefined;
2788
+ readonly associatedProject: RushConfigurationProject;
2781
2789
  /**
2782
2790
  * A set of all operations which depend on this operation.
2783
2791
  */
@@ -2824,7 +2832,7 @@ export declare class Operation {
2824
2832
  /**
2825
2833
  * The name of this operation, for logging.
2826
2834
  */
2827
- get name(): string | undefined;
2835
+ get name(): string;
2828
2836
  /**
2829
2837
  * If set to true, this operation is considered a no-op and can be considered always skipped for analysis purposes.
2830
2838
  */
@@ -4346,6 +4354,10 @@ export declare class RushConstants {
4346
4354
  * The filename (".modules.yaml") used by pnpm to specify configurations in the node_modules directory
4347
4355
  */
4348
4356
  static readonly pnpmModulesFilename: '.modules.yaml';
4357
+ /**
4358
+ * The folder name (".pnpm") used by pnpm to store the code of the dependencies for this subspace
4359
+ */
4360
+ static readonly pnpmVirtualStoreFolderName: '.pnpm';
4349
4361
  /**
4350
4362
  * The filename ("global-pnpmfile.cjs") used to add custom configuration to subspaces
4351
4363
  */
@@ -4537,6 +4549,15 @@ export declare class RushConstants {
4537
4549
  * The filename for the file that tracks which variant is currently installed.
4538
4550
  */
4539
4551
  static readonly currentVariantsFilename: 'current-variants.json';
4552
+ /**
4553
+ * The filename ("rush-hotlink-state.json") used to store information about packages connected via
4554
+ * "rush link-package" and "rush bridge-package" commands.
4555
+ */
4556
+ static readonly rushHotlinkStateFilename: 'rush-hotlink-state.json';
4557
+ /**
4558
+ * The filename ("pnpm-sync.json") used to store the state of the pnpm sync command.
4559
+ */
4560
+ static readonly pnpmSyncFilename: '.pnpm-sync.json';
4540
4561
  }
4541
4562
 
4542
4563
  /**
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.51.0"
8
+ "packageVersion": "7.52.3"
9
9
  }
10
10
  ]
11
11
  }
@@ -140,6 +140,7 @@ export declare class CommandLineConfiguration {
140
140
  * @param cycleFreePhases Phases that have already been fully walked and confirmed to not be in any cycles
141
141
  */
142
142
  private _checkForPhaseSelfCycles;
143
+ private static _applyBuildCommandDefaults;
143
144
  /**
144
145
  * Load the command-line.json configuration file from the specified path. Note that this
145
146
  * does not include the default build settings. This option is intended to be used to load
@@ -154,7 +155,7 @@ export declare class CommandLineConfiguration {
154
155
  * settings. If the file does not exist, then a default instance is returned.
155
156
  * If the file contains errors, then an exception is thrown.
156
157
  */
157
- static loadFromFileOrDefault(jsonFilePath?: string): CommandLineConfiguration;
158
+ static loadFromFileOrDefault(jsonFilePath?: string, doNotIncludeDefaultBuildCommands?: boolean): CommandLineConfiguration;
158
159
  prependAdditionalPathFolder(pathFolder: string): void;
159
160
  private _translateBulkCommandToPhasedCommand;
160
161
  }
@@ -26,6 +26,7 @@ export declare class RushCommandLineParser extends CommandLineParser {
26
26
  private readonly _rushOptions;
27
27
  private readonly _terminalProvider;
28
28
  private readonly _terminal;
29
+ private readonly _autocreateBuildCommand;
29
30
  constructor(options?: Partial<IRushCommandLineParserOptions>);
30
31
  get isDebug(): boolean;
31
32
  get isQuiet(): boolean;
@@ -1,7 +1,6 @@
1
1
  import type { RushCommandLineParser } from '../RushCommandLineParser';
2
2
  import { BaseRushAction } from './BaseRushAction';
3
3
  export declare class AlertAction extends BaseRushAction {
4
- private readonly _terminal;
5
4
  private readonly _snoozeParameter;
6
5
  private readonly _snoozeTimeFlagParameter;
7
6
  constructor(parser: RushCommandLineParser);
@@ -1,10 +1,8 @@
1
1
  import type { IRequiredCommandLineStringParameter } from '@rushstack/ts-command-line';
2
- import type { ITerminal } from '@rushstack/terminal';
3
2
  import { BaseRushAction, type IBaseRushActionOptions } from './BaseRushAction';
4
3
  import { Autoinstaller } from '../../logic/Autoinstaller';
5
4
  export declare abstract class BaseAutoinstallerAction extends BaseRushAction {
6
5
  protected readonly _name: IRequiredCommandLineStringParameter;
7
- protected readonly _terminal: ITerminal;
8
6
  constructor(options: IBaseRushActionOptions);
9
7
  protected abstract prepareAsync(autoinstaller: Autoinstaller): Promise<void>;
10
8
  protected runAsync(): Promise<void>;
@@ -0,0 +1,10 @@
1
+ import type { IRequiredCommandLineStringParameter } from '@rushstack/ts-command-line';
2
+ import { HotlinkManager } from '../../utilities/HotlinkManager';
3
+ import { BaseRushAction, type IBaseRushActionOptions } from './BaseRushAction';
4
+ export declare abstract class BaseHotlinkPackageAction extends BaseRushAction {
5
+ protected readonly _pathParameter: IRequiredCommandLineStringParameter;
6
+ protected constructor(options: IBaseRushActionOptions);
7
+ protected abstract hotlinkPackageAsync(linkedPackagePath: string, hotlinkManager: HotlinkManager): Promise<void>;
8
+ protected runAsync(): Promise<void>;
9
+ }
10
+ //# sourceMappingURL=BaseHotlinkPackageAction.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("cli/actions/BaseHotlinkPackageAction");
@@ -1,5 +1,4 @@
1
1
  import type { CommandLineFlagParameter, CommandLineIntegerParameter, CommandLineStringParameter, IRequiredCommandLineIntegerParameter } from '@rushstack/ts-command-line';
2
- import { type ITerminal } from '@rushstack/terminal';
3
2
  import { BaseRushAction, type IBaseRushActionOptions } from './BaseRushAction';
4
3
  import type { IInstallManagerOptions } from '../../logic/base/BaseInstallManagerTypes';
5
4
  import { type SelectionParameterSet } from '../parsing/SelectionParameterSet';
@@ -7,7 +6,6 @@ import { type SelectionParameterSet } from '../parsing/SelectionParameterSet';
7
6
  * This is the common base class for InstallAction and UpdateAction.
8
7
  */
9
8
  export declare abstract class BaseInstallAction extends BaseRushAction {
10
- protected readonly _terminal: ITerminal;
11
9
  protected readonly _variantParameter: CommandLineStringParameter;
12
10
  protected readonly _purgeParameter: CommandLineFlagParameter;
13
11
  protected readonly _bypassPolicyParameter: CommandLineFlagParameter;
@@ -1,4 +1,5 @@
1
1
  import { CommandLineAction, type ICommandLineActionOptions } from '@rushstack/ts-command-line';
2
+ import { type ITerminal } from '@rushstack/terminal';
2
3
  import type { RushConfiguration } from '../../api/RushConfiguration';
3
4
  import { EventHooksManager } from '../../logic/EventHooksManager';
4
5
  import { RushCommandLineParser } from '../RushCommandLineParser';
@@ -25,9 +26,10 @@ export interface IBaseRushActionOptions extends ICommandLineActionOptions {
25
26
  */
26
27
  export declare abstract class BaseConfiglessRushAction extends CommandLineAction implements IRushCommand {
27
28
  private _safeForSimultaneousRushProcesses;
28
- protected get rushConfiguration(): RushConfiguration | undefined;
29
- protected get rushSession(): RushSession;
30
- protected get rushGlobalFolder(): RushGlobalFolder;
29
+ protected readonly rushConfiguration: RushConfiguration | undefined;
30
+ protected readonly terminal: ITerminal;
31
+ protected readonly rushSession: RushSession;
32
+ protected readonly rushGlobalFolder: RushGlobalFolder;
31
33
  protected readonly parser: RushCommandLineParser;
32
34
  constructor(options: IBaseRushActionOptions);
33
35
  protected onExecute(): Promise<void>;
@@ -44,7 +46,7 @@ export declare abstract class BaseConfiglessRushAction extends CommandLineAction
44
46
  export declare abstract class BaseRushAction extends BaseConfiglessRushAction {
45
47
  private _eventHooksManager;
46
48
  protected get eventHooksManager(): EventHooksManager;
47
- protected get rushConfiguration(): RushConfiguration;
49
+ protected readonly rushConfiguration: RushConfiguration;
48
50
  protected onExecute(): Promise<void>;
49
51
  /**
50
52
  * If an error is encountered while trying to load plugins, it is saved in the `PluginManager.error`
@@ -0,0 +1,11 @@
1
+ import type { RushCommandLineParser } from '../RushCommandLineParser';
2
+ import { BaseHotlinkPackageAction } from './BaseHotlinkPackageAction';
3
+ import type { HotlinkManager } from '../../utilities/HotlinkManager';
4
+ export declare class BridgePackageAction extends BaseHotlinkPackageAction {
5
+ private readonly _versionParameter;
6
+ private readonly _subspaceNamesParameter;
7
+ constructor(parser: RushCommandLineParser);
8
+ private _getSubspacesToBridgeAsync;
9
+ protected hotlinkPackageAsync(linkedPackagePath: string, hotlinkManager: HotlinkManager): Promise<void>;
10
+ }
11
+ //# sourceMappingURL=BridgePackageAction.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("cli/actions/BridgePackageAction");
@@ -2,7 +2,6 @@ import { BaseRushAction } from './BaseRushAction';
2
2
  import type { RushCommandLineParser } from '../RushCommandLineParser';
3
3
  export declare class ChangeAction extends BaseRushAction {
4
4
  private readonly _git;
5
- private readonly _terminal;
6
5
  private readonly _verifyParameter;
7
6
  private readonly _noFetchParameter;
8
7
  private readonly _targetBranchParameter;
@@ -1,7 +1,6 @@
1
1
  import type { RushCommandLineParser } from '../RushCommandLineParser';
2
2
  import { BaseRushAction } from './BaseRushAction';
3
3
  export declare class CheckAction extends BaseRushAction {
4
- private readonly _terminal;
5
4
  private readonly _jsonFlag;
6
5
  private readonly _verboseFlag;
7
6
  private readonly _subspaceParameter;
@@ -0,0 +1,11 @@
1
+ import type { CommandLineStringListParameter } from '@rushstack/ts-command-line';
2
+ import type { RushCommandLineParser } from '../RushCommandLineParser';
3
+ import { BaseHotlinkPackageAction } from './BaseHotlinkPackageAction';
4
+ import type { HotlinkManager } from '../../utilities/HotlinkManager';
5
+ export declare class LinkPackageAction extends BaseHotlinkPackageAction {
6
+ protected readonly _projectListParameter: CommandLineStringListParameter;
7
+ constructor(parser: RushCommandLineParser);
8
+ private _getProjectsToLinkAsync;
9
+ protected hotlinkPackageAsync(linkedPackagePath: string, hotlinkManager: HotlinkManager): Promise<void>;
10
+ }
11
+ //# sourceMappingURL=LinkPackageAction.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("cli/actions/LinkPackageAction");
@@ -6,7 +6,6 @@ export declare class RemoveAction extends BaseAddAndRemoveAction {
6
6
  protected readonly _allFlag: CommandLineFlagParameter;
7
7
  protected readonly _packageNameList: CommandLineStringListParameter;
8
8
  private readonly _variantParameter;
9
- private readonly _terminal;
10
9
  constructor(parser: RushCommandLineParser);
11
10
  getUpdateOptionsAsync(): Promise<IPackageJsonUpdaterRushRemoveOptions>;
12
11
  }
@@ -54,6 +54,7 @@ export declare class PhasedScriptAction extends BaseScriptAction<IPhasedCommandC
54
54
  private readonly _variantParameter;
55
55
  private readonly _noIPCParameter;
56
56
  private readonly _nodeDiagnosticDirParameter;
57
+ private readonly _debugBuildCacheIdsParameter;
57
58
  private readonly _includePhaseDeps;
58
59
  constructor(options: IPhasedScriptActionOptions);
59
60
  runAsync(): Promise<void>;
package/lib/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" preserve="true" />
1
2
  /**
2
3
  * A library for writing scripts that interact with the {@link https://rushjs.io/ | Rush} tool.
3
4
  * @packageDocumentation
@@ -1,3 +1,4 @@
1
+ /// <reference path="../../src/npm-check-typings.d.ts" preserve="true" />
1
2
  import type { RushConfiguration } from '../api/RushConfiguration';
2
3
  import { type IDepsToUpgradeAnswers } from '../utilities/InteractiveUpgradeUI';
3
4
  import type { RushConfigurationProject } from '../api/RushConfigurationProject';
@@ -1,5 +1,6 @@
1
- /// <reference path="../../src/npm-check-typings.d.ts" />
1
+ /// <reference path="../../src/npm-check-typings.d.ts" preserve="true" />
2
2
  import type * as NpmCheck from 'npm-check';
3
+ import { type ITerminal } from '@rushstack/terminal';
3
4
  import type { RushConfiguration } from '../api/RushConfiguration';
4
5
  import { DependencyType } from '../api/PackageJsonEditor';
5
6
  import type { RushGlobalFolder } from '../api/RushGlobalFolder';
@@ -72,11 +73,10 @@ export interface IRemoveProjectOptions extends IBaseUpdateProjectOptions {
72
73
  * @internal
73
74
  */
74
75
  export declare class PackageJsonUpdater {
75
- private _rushConfiguration;
76
- private _rushGlobalFolder;
77
- private readonly _terminalProvider;
78
76
  private readonly _terminal;
79
- constructor(rushConfiguration: RushConfiguration, rushGlobalFolder: RushGlobalFolder);
77
+ private readonly _rushConfiguration;
78
+ private readonly _rushGlobalFolder;
79
+ constructor(terminal: ITerminal, rushConfiguration: RushConfiguration, rushGlobalFolder: RushGlobalFolder);
80
80
  /**
81
81
  * Upgrade dependencies to a particular project, or across specified projects. This is the core business logic for
82
82
  * "rush upgrade-interactive".
@@ -83,6 +83,10 @@ export declare class RushConstants {
83
83
  * The filename (".modules.yaml") used by pnpm to specify configurations in the node_modules directory
84
84
  */
85
85
  static readonly pnpmModulesFilename: '.modules.yaml';
86
+ /**
87
+ * The folder name (".pnpm") used by pnpm to store the code of the dependencies for this subspace
88
+ */
89
+ static readonly pnpmVirtualStoreFolderName: '.pnpm';
86
90
  /**
87
91
  * The filename ("global-pnpmfile.cjs") used to add custom configuration to subspaces
88
92
  */
@@ -274,5 +278,14 @@ export declare class RushConstants {
274
278
  * The filename for the file that tracks which variant is currently installed.
275
279
  */
276
280
  static readonly currentVariantsFilename: 'current-variants.json';
281
+ /**
282
+ * The filename ("rush-hotlink-state.json") used to store information about packages connected via
283
+ * "rush link-package" and "rush bridge-package" commands.
284
+ */
285
+ static readonly rushHotlinkStateFilename: 'rush-hotlink-state.json';
286
+ /**
287
+ * The filename ("pnpm-sync.json") used to store the state of the pnpm sync command.
288
+ */
289
+ static readonly pnpmSyncFilename: '.pnpm-sync.json';
277
290
  }
278
291
  //# sourceMappingURL=RushConstants.d.ts.map
@@ -11,19 +11,19 @@ export interface IBaseLinkManagerCreateSymlinkOptions extends IFileSystemCreateL
11
11
  export declare abstract class BaseLinkManager {
12
12
  protected _rushConfiguration: RushConfiguration;
13
13
  constructor(rushConfiguration: RushConfiguration);
14
- static _createSymlink(options: IBaseLinkManagerCreateSymlinkOptions): void;
14
+ static _createSymlinkAsync(options: IBaseLinkManagerCreateSymlinkOptions): Promise<void>;
15
15
  /**
16
16
  * For a Package object that represents a top-level Rush project folder
17
17
  * (i.e. with source code that we will be building), this clears out its
18
18
  * node_modules folder and then recursively creates all the symlinked folders.
19
19
  */
20
- protected static _createSymlinksForTopLevelProject(localPackage: BasePackage): void;
20
+ protected static _createSymlinksForTopLevelProjectAsync(localPackage: BasePackage): Promise<void>;
21
21
  /**
22
22
  * This is a helper function used by createSymlinksForTopLevelProject().
23
23
  * It will recursively creates symlinked folders corresponding to each of the
24
24
  * Package objects in the provided tree.
25
25
  */
26
- private static _createSymlinksForDependencies;
26
+ private static _createSymlinksForDependenciesAsync;
27
27
  /**
28
28
  * Creates node_modules symlinks for all Rush projects defined in the RushConfiguration.
29
29
  * @param force - Normally the operation will be skipped if the links are already up to date;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import type { ITerminal } from '@rushstack/terminal';
4
2
  import type { RushConfiguration } from '../../api/RushConfiguration';
5
3
  import type { RushUserConfiguration } from '../../api/RushUserConfiguration';
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import type { ITerminal } from '@rushstack/terminal';
4
2
  /**
5
3
  * @beta
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { type ITerminal } from '@rushstack/terminal';
3
2
  import type { RushConfiguration } from '../../api/RushConfiguration';
4
3
  import type { RushGlobalFolder } from '../../api/RushGlobalFolder';
@@ -7,6 +7,6 @@ export declare class NpmLinkManager extends BaseLinkManager {
7
7
  * @param commonRootPackage The common/temp/package.json package
8
8
  * @param commonPackageLookup A dictionary for finding packages under common/temp/node_modules
9
9
  */
10
- private _linkProject;
10
+ private _linkProjectAsync;
11
11
  }
12
12
  //# sourceMappingURL=NpmLinkManager.d.ts.map
@@ -16,7 +16,6 @@ export interface IProjectDeps {
16
16
  export interface IOperationBuildCacheContext {
17
17
  isCacheWriteAllowed: boolean;
18
18
  isCacheReadAllowed: boolean;
19
- stateHash: string;
20
19
  operationBuildCache: ProjectBuildCache | undefined;
21
20
  cacheDisabledReason: string | undefined;
22
21
  outputFolderNames: ReadonlyArray<string>;
@@ -0,0 +1,8 @@
1
+ import { type ITerminal } from '@rushstack/terminal';
2
+ import type { IPhasedCommandPlugin, PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
3
+ export declare class DebugHashesPlugin implements IPhasedCommandPlugin {
4
+ private readonly _terminal;
5
+ constructor(terminal: ITerminal);
6
+ apply(hooks: PhasedCommandHooks): void;
7
+ }
8
+ //# sourceMappingURL=DebugHashesPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/operations/DebugHashesPlugin");
@@ -52,6 +52,16 @@ export interface IOperationExecutionResult {
52
52
  * The paths to the log files, if applicable.
53
53
  */
54
54
  readonly logFilePaths: ILogFilePaths | undefined;
55
+ /**
56
+ * Gets the hash of the state of all registered inputs to this operation.
57
+ * Calling this method will throw if Git is not available.
58
+ */
59
+ getStateHash(): string;
60
+ /**
61
+ * Gets the components of the state hash. This is useful for debugging purposes.
62
+ * Calling this method will throw if Git is not available.
63
+ */
64
+ getStateHashComponents(): ReadonlyArray<string>;
55
65
  }
56
66
  /**
57
67
  * The `IExecutionResult` interface represents the results of executing a set of {@link Operation}s.
@@ -27,7 +27,7 @@ export interface IOperationRunnerContext {
27
27
  *
28
28
  * @internal
29
29
  */
30
- _operationMetadataManager?: OperationMetadataManager;
30
+ _operationMetadataManager: OperationMetadataManager;
31
31
  /**
32
32
  * Object used to track elapsed time.
33
33
  */
@@ -8,13 +8,13 @@ import type { IOperationSettings } from '../../api/RushProjectConfiguration';
8
8
  */
9
9
  export interface IOperationOptions {
10
10
  /**
11
- * The Rush phase associated with this Operation, if any
11
+ * The Rush phase associated with this Operation
12
12
  */
13
- phase?: IPhase | undefined;
13
+ phase: IPhase;
14
14
  /**
15
- * The Rush project associated with this Operation, if any
15
+ * The Rush project associated with this Operation
16
16
  */
17
- project?: RushConfigurationProject | undefined;
17
+ project: RushConfigurationProject;
18
18
  /**
19
19
  * When the scheduler is ready to process this `Operation`, the `runner` implements the actual work of
20
20
  * running the operation.
@@ -40,13 +40,13 @@ export interface IOperationOptions {
40
40
  */
41
41
  export declare class Operation {
42
42
  /**
43
- * The Rush phase associated with this Operation, if any
43
+ * The Rush phase associated with this Operation
44
44
  */
45
- readonly associatedPhase: IPhase | undefined;
45
+ readonly associatedPhase: IPhase;
46
46
  /**
47
- * The Rush project associated with this Operation, if any
47
+ * The Rush project associated with this Operation
48
48
  */
49
- readonly associatedProject: RushConfigurationProject | undefined;
49
+ readonly associatedProject: RushConfigurationProject;
50
50
  /**
51
51
  * A set of all operations which depend on this operation.
52
52
  */
@@ -93,7 +93,7 @@ export declare class Operation {
93
93
  /**
94
94
  * The name of this operation, for logging.
95
95
  */
96
- get name(): string | undefined;
96
+ get name(): string;
97
97
  /**
98
98
  * If set to true, this operation is considered a no-op and can be considered always skipped for analysis purposes.
99
99
  */
@@ -4,11 +4,12 @@ import { OperationStatus } from './OperationStatus';
4
4
  import { OperationExecutionRecord } from './OperationExecutionRecord';
5
5
  import type { IExecutionResult } from './IOperationExecutionResult';
6
6
  import type { IEnvironment } from '../../utilities/Utilities';
7
+ import type { IInputsSnapshot } from '../incremental/InputsSnapshot';
7
8
  export interface IOperationExecutionManagerOptions {
8
9
  quietMode: boolean;
9
10
  debugMode: boolean;
10
11
  parallelism: number;
11
- changedProjectsOnly: boolean;
12
+ inputsSnapshot?: IInputsSnapshot;
12
13
  destination?: TerminalWritable;
13
14
  beforeExecuteOperationAsync?: (operation: OperationExecutionRecord) => Promise<OperationStatus | undefined>;
14
15
  afterExecuteOperationAsync?: (operation: OperationExecutionRecord) => Promise<void>;
@@ -23,7 +24,6 @@ export interface IOperationExecutionManagerOptions {
23
24
  * tasks are complete, or prematurely fails if any of the tasks fail.
24
25
  */
25
26
  export declare class OperationExecutionManager {
26
- private readonly _changedProjectsOnly;
27
27
  private readonly _executionRecords;
28
28
  private readonly _quietMode;
29
29
  private readonly _parallelism;
@@ -10,12 +10,12 @@ import type { RushConfigurationProject } from '../../api/RushConfigurationProjec
10
10
  import { type ILogFilePaths } from './ProjectLogWritable';
11
11
  import type { IOperationExecutionResult } from './IOperationExecutionResult';
12
12
  import type { IInputsSnapshot } from '../incremental/InputsSnapshot';
13
- import type { BuildCacheConfiguration } from '../../api/BuildCacheConfiguration';
14
13
  import type { IEnvironment } from '../../utilities/Utilities';
15
14
  export interface IOperationExecutionRecordContext {
16
15
  streamCollator: StreamCollator;
17
16
  onOperationStatusChanged?: (record: OperationExecutionRecord) => void;
18
17
  createEnvironment?: (record: OperationExecutionRecord) => IEnvironment;
18
+ inputsSnapshot: IInputsSnapshot | undefined;
19
19
  debugMode: boolean;
20
20
  quietMode: boolean;
21
21
  }
@@ -77,14 +77,15 @@ export declare class OperationExecutionRecord implements IOperationRunnerContext
77
77
  readonly stopwatch: Stopwatch;
78
78
  readonly stdioSummarizer: StdioSummarizer;
79
79
  readonly runner: IOperationRunner;
80
- readonly associatedPhase: IPhase | undefined;
81
- readonly associatedProject: RushConfigurationProject | undefined;
82
- readonly _operationMetadataManager: OperationMetadataManager | undefined;
80
+ readonly associatedPhase: IPhase;
81
+ readonly associatedProject: RushConfigurationProject;
82
+ readonly _operationMetadataManager: OperationMetadataManager;
83
83
  logFilePaths: ILogFilePaths | undefined;
84
84
  private readonly _context;
85
85
  private _collatedWriter;
86
86
  private _status;
87
87
  private _stateHash;
88
+ private _stateHashComponents;
88
89
  constructor(operation: Operation, context: IOperationExecutionRecordContext);
89
90
  get name(): string;
90
91
  get weight(): number;
@@ -105,7 +106,8 @@ export declare class OperationExecutionRecord implements IOperationRunnerContext
105
106
  get status(): OperationStatus;
106
107
  set status(newStatus: OperationStatus);
107
108
  get silent(): boolean;
108
- get stateHash(): string;
109
+ getStateHash(): string;
110
+ getStateHashComponents(): ReadonlyArray<string>;
109
111
  /**
110
112
  * {@inheritdoc IOperationRunnerContext.runWithTerminalAsync}
111
113
  */
@@ -117,9 +119,5 @@ export declare class OperationExecutionRecord implements IOperationRunnerContext
117
119
  onStart: (record: OperationExecutionRecord) => Promise<OperationStatus | undefined>;
118
120
  onResult: (record: OperationExecutionRecord) => Promise<void>;
119
121
  }): Promise<void>;
120
- calculateStateHash(options: {
121
- inputsSnapshot: IInputsSnapshot;
122
- buildCacheConfiguration: BuildCacheConfiguration;
123
- }): string;
124
122
  }
125
123
  //# sourceMappingURL=OperationExecutionRecord.d.ts.map
@@ -1,14 +1,10 @@
1
1
  import { type ITerminalChunk, type ITerminal, type ITerminalProvider } from '@rushstack/terminal';
2
2
  import { OperationStateFile } from './OperationStateFile';
3
- import type { IPhase } from '../../api/CommandLineConfiguration';
4
- import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
5
3
  import type { Operation } from './Operation';
6
4
  /**
7
5
  * @internal
8
6
  */
9
7
  export interface IOperationMetadataManagerOptions {
10
- rushProject: RushConfigurationProject;
11
- phase: IPhase;
12
8
  operation: Operation;
13
9
  }
14
10
  /**
@@ -10,7 +10,7 @@ export interface IShellOperationRunnerOptions {
10
10
  commandForHash: string;
11
11
  }
12
12
  /**
13
- * An `IOperationRunner` subclass that performs an operation via a shell command.
13
+ * An `IOperationRunner` implementation that performs an operation via a shell command.
14
14
  * Currently contains the build cache logic, pending extraction as separate operations.
15
15
  * Supports skipping an operation if allowed and it is already up-to-date.
16
16
  */
@@ -21,6 +21,10 @@ export declare class ShellOperationRunner implements IOperationRunner {
21
21
  readonly cacheable: boolean;
22
22
  readonly warningsAreAllowed: boolean;
23
23
  readonly commandToRun: string;
24
+ /**
25
+ * The creator is expected to use a different runner if the command is known to be a noop.
26
+ */
27
+ readonly isNoOp: boolean;
24
28
  private readonly _commandForHash;
25
29
  private readonly _rushProject;
26
30
  constructor(options: IShellOperationRunnerOptions);
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import * as readline from 'readline';
4
2
  export declare class KeyboardLoop {
5
3
  protected stdin: NodeJS.ReadStream;