@rushstack/rush-sdk 5.124.3 → 5.124.5

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.
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.43.4"
8
+ "packageVersion": "7.43.5"
9
9
  }
10
10
  ]
11
11
  }
@@ -35,7 +35,7 @@ export declare class RushCommandLineParser extends CommandLineParser {
35
35
  */
36
36
  static shouldRestrictConsoleOutput(): boolean;
37
37
  flushTelemetry(): void;
38
- execute(args?: string[]): Promise<boolean>;
38
+ executeAsync(args?: string[]): Promise<boolean>;
39
39
  protected onExecute(): Promise<void>;
40
40
  private _normalizeOptions;
41
41
  private _wrapOnExecuteAsync;
@@ -1,9 +1,8 @@
1
- import type { CommandLineFlagParameter, CommandLineIntegerParameter, CommandLineStringParameter, IRequiredCommandLineIntegerParameter } from '@rushstack/ts-command-line';
1
+ import type { CommandLineFlagParameter, CommandLineIntegerParameter, IRequiredCommandLineIntegerParameter } from '@rushstack/ts-command-line';
2
2
  import { type ITerminal } from '@rushstack/terminal';
3
3
  import { BaseRushAction, type IBaseRushActionOptions } from './BaseRushAction';
4
4
  import type { IInstallManagerOptions } from '../../logic/base/BaseInstallManagerTypes';
5
- import type { SelectionParameterSet } from '../parsing/SelectionParameterSet';
6
- import type { Subspace } from '../../api/Subspace';
5
+ import { type SelectionParameterSet } from '../parsing/SelectionParameterSet';
7
6
  /**
8
7
  * This is the common base class for InstallAction and UpdateAction.
9
8
  */
@@ -17,13 +16,11 @@ export declare abstract class BaseInstallAction extends BaseRushAction {
17
16
  protected readonly _maxInstallAttempts: IRequiredCommandLineIntegerParameter;
18
17
  protected readonly _ignoreHooksParameter: CommandLineFlagParameter;
19
18
  protected readonly _offlineParameter: CommandLineFlagParameter;
20
- protected readonly _subspaceParameter: CommandLineStringParameter;
21
19
  protected _selectionParameters?: SelectionParameterSet;
22
20
  constructor(options: IBaseRushActionOptions);
23
- protected abstract buildInstallOptionsAsync(): Promise<IInstallManagerOptions>;
24
- protected getTargetSubspace(): Subspace;
21
+ protected abstract buildInstallOptionsAsync(): Promise<Omit<IInstallManagerOptions, 'subspace'>>;
25
22
  protected runAsync(): Promise<void>;
26
- private _doInstall;
23
+ private _doInstallAsync;
27
24
  private _collectTelemetry;
28
25
  }
29
26
  //# sourceMappingURL=BaseInstallAction.d.ts.map
@@ -25,36 +25,36 @@ export declare class ChangeAction extends BaseRushAction {
25
25
  /**
26
26
  * The main loop which prompts the user for information on changed projects.
27
27
  */
28
- private _promptForChangeFileData;
28
+ private _promptForChangeFileDataAsync;
29
29
  /**
30
30
  * Asks all questions which are needed to generate changelist for a project.
31
31
  */
32
- private _askQuestions;
33
- private _promptForComments;
32
+ private _askQuestionsAsync;
33
+ private _promptForCommentsAsync;
34
34
  private _getBumpOptions;
35
35
  private _isEmailRequired;
36
36
  /**
37
37
  * Will determine a user's email by first detecting it from their Git config,
38
38
  * or will ask for it if it is not found or the Git config is wrong.
39
39
  */
40
- private _detectOrAskForEmail;
40
+ private _detectOrAskForEmailAsync;
41
41
  private _detectEmail;
42
42
  /**
43
43
  * Detects the user's email address from their Git configuration, prompts the user to approve the
44
44
  * detected email. It returns undefined if it cannot be detected.
45
45
  */
46
- private _detectAndConfirmEmail;
46
+ private _detectAndConfirmEmailAsync;
47
47
  /**
48
48
  * Asks the user for their email address
49
49
  */
50
- private _promptForEmail;
50
+ private _promptForEmailAsync;
51
51
  private _warnUnstagedChanges;
52
52
  /**
53
53
  * Writes change files to the common/changes folder. Will prompt for overwrite if file already exists.
54
54
  */
55
- private _writeChangeFiles;
56
- private _writeChangeFile;
57
- private _promptForOverwrite;
55
+ private _writeChangeFilesAsync;
56
+ private _writeChangeFileAsync;
57
+ private _promptForOverwriteAsync;
58
58
  /**
59
59
  * Writes a file to disk, ensuring the directory structure up to that point exists
60
60
  */
@@ -4,6 +4,6 @@ import type { RushCommandLineParser } from '../RushCommandLineParser';
4
4
  export declare class InstallAction extends BaseInstallAction {
5
5
  private readonly _checkOnlyParameter;
6
6
  constructor(parser: RushCommandLineParser);
7
- protected buildInstallOptionsAsync(): Promise<IInstallManagerOptions>;
7
+ protected buildInstallOptionsAsync(): Promise<Omit<IInstallManagerOptions, 'subspace'>>;
8
8
  }
9
9
  //# sourceMappingURL=InstallAction.d.ts.map
@@ -6,6 +6,6 @@ export declare class UpdateAction extends BaseInstallAction {
6
6
  private readonly _recheckParameter;
7
7
  constructor(parser: RushCommandLineParser);
8
8
  protected runAsync(): Promise<void>;
9
- protected buildInstallOptionsAsync(): Promise<IInstallManagerOptions>;
9
+ protected buildInstallOptionsAsync(): Promise<Omit<IInstallManagerOptions, 'subspace'>>;
10
10
  }
11
11
  //# sourceMappingURL=UpdateAction.d.ts.map
@@ -1,8 +1,13 @@
1
- import type { ITerminal } from '@rushstack/terminal';
1
+ import { type ITerminal } from '@rushstack/terminal';
2
2
  import type { CommandLineParameterProvider } from '@rushstack/ts-command-line';
3
3
  import type { RushConfiguration } from '../../api/RushConfiguration';
4
4
  import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
5
5
  import { type IGitSelectorParserOptions } from '../../logic/selectors/GitChangedProjectSelectorParser';
6
+ export declare const SUBSPACE_LONG_ARG_NAME: '--subspace';
7
+ interface ISelectionParameterSetOptions {
8
+ gitOptions: IGitSelectorParserOptions;
9
+ includeSubspaceSelector: boolean;
10
+ }
6
11
  /**
7
12
  * This class is provides the set of command line parameters used to select projects
8
13
  * based on dependencies.
@@ -17,10 +22,20 @@ export declare class SelectionParameterSet {
17
22
  private readonly _onlyProject;
18
23
  private readonly _toProject;
19
24
  private readonly _toExceptProject;
25
+ private readonly _subspaceParameter;
20
26
  private readonly _fromVersionPolicy;
21
27
  private readonly _toVersionPolicy;
22
28
  private readonly _selectorParserByScope;
23
- constructor(rushConfiguration: RushConfiguration, action: CommandLineParameterProvider, gitOptions: IGitSelectorParserOptions);
29
+ constructor(rushConfiguration: RushConfiguration, action: CommandLineParameterProvider, options: ISelectionParameterSetOptions);
30
+ /**
31
+ * Used to implement the `preventSelectingAllSubspaces` policy which checks for commands that accidentally
32
+ * select everything. Return `true` if the CLI was invoked with selection parameters.
33
+ *
34
+ * @remarks
35
+ * It is still possible for a user to select everything, but they must do so using an explicit selection
36
+ * such as `rush install --from thing-that-everything-depends-on`.
37
+ */
38
+ didUserSelectAnything(): boolean;
24
39
  /**
25
40
  * Computes the set of selected projects based on all parameter values.
26
41
  *
@@ -53,4 +68,5 @@ export declare class SelectionParameterSet {
53
68
  */
54
69
  private _evaluateProjectParameterAsync;
55
70
  }
71
+ export {};
56
72
  //# sourceMappingURL=SelectionParameterSet.d.ts.map
@@ -22,7 +22,7 @@ export declare class GlobalScriptAction extends BaseScriptAction<IGlobalCommandC
22
22
  private readonly _autoinstallerName;
23
23
  private readonly _autoinstallerFullPath;
24
24
  constructor(options: IGlobalScriptActionOptions);
25
- private _prepareAutoinstallerName;
25
+ private _prepareAutoinstallerNameAsync;
26
26
  runAsync(): Promise<void>;
27
27
  private _expandShellCommandWithTokens;
28
28
  private _rejectAnyTokensInShellCommand;
@@ -53,7 +53,7 @@ export declare class PhasedScriptAction extends BaseScriptAction<IPhasedCommandC
53
53
  private readonly _noIPCParameter;
54
54
  constructor(options: IPhasedScriptActionOptions);
55
55
  runAsync(): Promise<void>;
56
- private _runInitialPhases;
56
+ private _runInitialPhasesAsync;
57
57
  private _registerWatchModeInterface;
58
58
  /**
59
59
  * Runs the command in watch mode. Fundamentally is a simple loop:
@@ -62,11 +62,11 @@ export declare class PhasedScriptAction extends BaseScriptAction<IPhasedCommandC
62
62
  * Uses the same algorithm as --impacted-by
63
63
  * 3) Goto (1)
64
64
  */
65
- private _runWatchPhases;
65
+ private _runWatchPhasesAsync;
66
66
  /**
67
67
  * Runs a set of operations and reports the results.
68
68
  */
69
- private _executeOperations;
69
+ private _executeOperationsAsync;
70
70
  private _doBeforeTask;
71
71
  private _doAfterTask;
72
72
  }
@@ -30,7 +30,7 @@ export declare class ProjectBuildCache {
30
30
  private constructor();
31
31
  private static _tryGetTarUtility;
32
32
  get cacheId(): string | undefined;
33
- static tryGetProjectBuildCache(options: IProjectBuildCacheOptions): Promise<ProjectBuildCache | undefined>;
33
+ static tryGetProjectBuildCacheAsync(options: IProjectBuildCacheOptions): Promise<ProjectBuildCache | undefined>;
34
34
  tryRestoreFromCacheAsync(terminal: ITerminal, specifiedCacheId?: string): Promise<boolean>;
35
35
  trySetCacheEntryAsync(terminal: ITerminal, specifiedCacheId?: string): Promise<boolean>;
36
36
  /**
@@ -40,6 +40,6 @@ export declare class ProjectBuildCache {
40
40
  */
41
41
  private _tryCollectPathsToCacheAsync;
42
42
  private _getTarLogFilePath;
43
- private static _getCacheId;
43
+ private static _getCacheIdAsync;
44
44
  }
45
45
  //# sourceMappingURL=ProjectBuildCache.d.ts.map
@@ -11,7 +11,7 @@ export declare class InstallHelpers {
11
11
  * If the "(p)npm-local" symlink hasn't been set up yet, this creates it, installing the
12
12
  * specified (P)npm version in the user's home directory if needed.
13
13
  */
14
- static ensureLocalPackageManager(rushConfiguration: RushConfiguration, rushGlobalFolder: RushGlobalFolder, maxInstallAttempts: number, restrictConsoleOutput?: boolean): Promise<void>;
14
+ static ensureLocalPackageManagerAsync(rushConfiguration: RushConfiguration, rushGlobalFolder: RushGlobalFolder, maxInstallAttempts: number, restrictConsoleOutput?: boolean): Promise<void>;
15
15
  private static _mergeEnvironmentVariables;
16
16
  }
17
17
  //# sourceMappingURL=InstallHelpers.d.ts.map
@@ -9,10 +9,10 @@ export interface IOperationExecutionManagerOptions {
9
9
  parallelism: number;
10
10
  changedProjectsOnly: boolean;
11
11
  destination?: TerminalWritable;
12
- beforeExecuteOperation?: (operation: OperationExecutionRecord) => Promise<OperationStatus | undefined>;
13
- afterExecuteOperation?: (operation: OperationExecutionRecord) => Promise<void>;
14
- onOperationStatusChanged?: (record: OperationExecutionRecord) => void;
15
- beforeExecuteOperations?: (records: Map<Operation, OperationExecutionRecord>) => Promise<void>;
12
+ beforeExecuteOperationAsync?: (operation: OperationExecutionRecord) => Promise<OperationStatus | undefined>;
13
+ afterExecuteOperationAsync?: (operation: OperationExecutionRecord) => Promise<void>;
14
+ onOperationStatusChangedAsync?: (record: OperationExecutionRecord) => void;
15
+ beforeExecuteOperationsAsync?: (records: Map<Operation, OperationExecutionRecord>) => Promise<void>;
16
16
  }
17
17
  /**
18
18
  * A class which manages the execution of a set of tasks with interdependencies.
@@ -45,6 +45,7 @@ export declare class OperationExecutionManager {
45
45
  * operations are completed successfully, or rejects when any operation fails.
46
46
  */
47
47
  executeAsync(): Promise<IExecutionResult>;
48
+ private _reportOperationErrorIfAny;
48
49
  /**
49
50
  * Handles the result of the operation and propagates any relevant effects.
50
51
  */
@@ -20,16 +20,16 @@ export declare class SetupPackageRegistry {
20
20
  *
21
21
  * @returns - `true` if valid, `false` if not valid
22
22
  */
23
- checkOnly(): Promise<boolean>;
23
+ checkOnlyAsync(): Promise<boolean>;
24
24
  /**
25
25
  * Test whether the NPM token is valid. If not, prompt to update it.
26
26
  */
27
- checkAndSetup(): Promise<void>;
27
+ checkAndSetupAsync(): Promise<void>;
28
28
  /**
29
29
  * Fetch a valid NPM token from the Artifactory service and add it to the `~/.npmrc` file,
30
30
  * preserving other settings in that file.
31
31
  */
32
- private _fetchTokenAndUpdateNpmrc;
32
+ private _fetchTokenAndUpdateNpmrcAsync;
33
33
  /**
34
34
  * Update the `~/.npmrc` file by adding `linesToAdd` to it.
35
35
  * @remarks
@@ -14,9 +14,9 @@ export interface IPromptPasswordOptions extends IBasePromptOptions {
14
14
  export interface IPromptLineOptions extends IBasePromptOptions {
15
15
  }
16
16
  export declare class TerminalInput {
17
- private static _readLine;
18
- static promptYesNo(options: IPromptYesNoOptions): Promise<boolean>;
19
- static promptLine(options: IPromptLineOptions): Promise<string>;
20
- static promptPasswordLine(options: IPromptLineOptions): Promise<string>;
17
+ private static _readLineAsync;
18
+ static promptYesNoAsync(options: IPromptYesNoOptions): Promise<boolean>;
19
+ static promptLineAsync(options: IPromptLineOptions): Promise<string>;
20
+ static promptPasswordLineAsync(options: IPromptLineOptions): Promise<string>;
21
21
  }
22
22
  //# sourceMappingURL=TerminalInput.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rushstack/rush-sdk",
3
- "version": "5.124.3",
3
+ "version": "5.124.5",
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": "4.2.1",
29
- "@rushstack/terminal": "0.10.3"
28
+ "@rushstack/node-core-library": "4.3.0",
29
+ "@rushstack/terminal": "0.11.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/semver": "7.5.0",
33
33
  "@types/webpack-env": "1.18.0",
34
- "@microsoft/rush-lib": "5.124.3",
35
- "@rushstack/heft": "0.66.6",
34
+ "@rushstack/heft": "0.66.8",
35
+ "@rushstack/stream-collator": "4.1.46",
36
36
  "local-node-rig": "1.0.0",
37
- "@rushstack/ts-command-line": "4.19.5",
38
- "@rushstack/stream-collator": "4.1.44"
37
+ "@microsoft/rush-lib": "5.124.5",
38
+ "@rushstack/ts-command-line": "4.20.1"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "heft build --clean",