@rushstack/rush-sdk 5.171.0 → 5.172.1
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 +16 -1
- package/lib-dts/api/CommandLineConfiguration.d.ts +6 -0
- package/lib-dts/api/CommandLineJson.d.ts +10 -2
- package/lib-dts/cli/scriptActions/GlobalScriptAction.d.ts +13 -0
- package/lib-dts/logic/RushConstants.d.ts +5 -0
- package/lib-dts/pluginFramework/RushLifeCycle.d.ts +12 -1
- package/package.json +5 -5
package/dist/rush-lib.d.ts
CHANGED
|
@@ -1611,6 +1611,16 @@ export declare interface IGetChangedProjectsOptions {
|
|
|
1611
1611
|
* @beta
|
|
1612
1612
|
*/
|
|
1613
1613
|
export declare interface IGlobalCommand extends IRushCommand {
|
|
1614
|
+
/**
|
|
1615
|
+
* Get a parameter by its long name (e.g. "--output-path") that was defined in command-line.json for this command.
|
|
1616
|
+
* If the parameter was not defined or not provided on the command line, this will throw.
|
|
1617
|
+
*/
|
|
1618
|
+
getCustomParametersByLongName<TParameter extends CommandLineParameter>(longName: string): TParameter;
|
|
1619
|
+
/**
|
|
1620
|
+
* Call this from a plugin hook to indicate that the command has been fully handled
|
|
1621
|
+
* by the plugin. When set, the default shell command execution will be skipped.
|
|
1622
|
+
*/
|
|
1623
|
+
setHandled(): void;
|
|
1614
1624
|
}
|
|
1615
1625
|
|
|
1616
1626
|
/**
|
|
@@ -4766,6 +4776,11 @@ export declare class RushConstants {
|
|
|
4766
4776
|
* The value of the "commandKind" property for a global command in command-line.json
|
|
4767
4777
|
*/
|
|
4768
4778
|
static readonly globalCommandKind: 'global';
|
|
4779
|
+
/**
|
|
4780
|
+
* The value of the "commandKind" property for a plugin-only global command in command-line.json.
|
|
4781
|
+
* This command kind can only be used in command-line.json files provided by Rush plugins.
|
|
4782
|
+
*/
|
|
4783
|
+
static readonly globalPluginCommandKind: 'globalPlugin';
|
|
4769
4784
|
/**
|
|
4770
4785
|
* The value of the "commandKind" property for a phased command in command-line.json
|
|
4771
4786
|
*/
|
|
@@ -4915,7 +4930,7 @@ export declare class RushLifecycleHooks {
|
|
|
4915
4930
|
* The hook to run between preparing the common/temp folder and invoking the package manager during "rush install" or "rush update".
|
|
4916
4931
|
*/
|
|
4917
4932
|
readonly beforeInstall: AsyncSeriesHook<[
|
|
4918
|
-
command:
|
|
4933
|
+
command: IRushCommand,
|
|
4919
4934
|
subspace: Subspace,
|
|
4920
4935
|
variant: string | undefined
|
|
4921
4936
|
]>;
|
|
@@ -93,6 +93,12 @@ export interface IPhasedCommandConfig extends IPhasedCommandWithoutPhasesJson, I
|
|
|
93
93
|
alwaysInstall: boolean | undefined;
|
|
94
94
|
}
|
|
95
95
|
export interface IGlobalCommandConfig extends IGlobalCommandJson, ICommandWithParameters {
|
|
96
|
+
/**
|
|
97
|
+
* If true, this command was declared with commandKind "globalPlugin" and its implementation
|
|
98
|
+
* is provided by a Rush plugin via the `runGlobalCustomCommand` hook. There is no shell
|
|
99
|
+
* command to execute.
|
|
100
|
+
*/
|
|
101
|
+
providedByPlugin: boolean;
|
|
96
102
|
}
|
|
97
103
|
export type Command = IGlobalCommandConfig | IPhasedCommandConfig;
|
|
98
104
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* "baseCommand" from command-line.schema.json
|
|
3
3
|
*/
|
|
4
4
|
export interface IBaseCommandJson {
|
|
5
|
-
commandKind: 'bulk' | 'global' | 'phased';
|
|
5
|
+
commandKind: 'bulk' | 'global' | 'globalPlugin' | 'phased';
|
|
6
6
|
name: string;
|
|
7
7
|
summary: string;
|
|
8
8
|
/**
|
|
@@ -58,7 +58,15 @@ export interface IGlobalCommandJson extends IBaseCommandJson {
|
|
|
58
58
|
commandKind: 'global';
|
|
59
59
|
shellCommand: string;
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
/**
|
|
62
|
+
* "globalPluginCommand" from command-line.schema.json.
|
|
63
|
+
* A global command whose implementation is provided entirely by a Rush plugin.
|
|
64
|
+
* This command kind can only be used in command-line.json files provided by Rush plugins.
|
|
65
|
+
*/
|
|
66
|
+
export interface IGlobalPluginCommandJson extends IBaseCommandJson {
|
|
67
|
+
commandKind: 'globalPlugin';
|
|
68
|
+
}
|
|
69
|
+
export type CommandJson = IBulkCommandJson | IGlobalCommandJson | IGlobalPluginCommandJson | IPhasedCommandJson;
|
|
62
70
|
/**
|
|
63
71
|
* The dependencies of a phase.
|
|
64
72
|
* @alpha
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CommandLineParameter } from '@rushstack/ts-command-line';
|
|
1
2
|
import { BaseScriptAction, type IBaseScriptActionOptions } from './BaseScriptAction';
|
|
2
3
|
import type { IGlobalCommandConfig } from '../../api/CommandLineConfiguration';
|
|
3
4
|
/**
|
|
@@ -6,6 +7,7 @@ import type { IGlobalCommandConfig } from '../../api/CommandLineConfiguration';
|
|
|
6
7
|
export interface IGlobalScriptActionOptions extends IBaseScriptActionOptions<IGlobalCommandConfig> {
|
|
7
8
|
shellCommand: string;
|
|
8
9
|
autoinstallerName: string | undefined;
|
|
10
|
+
providedByPlugin: boolean;
|
|
9
11
|
}
|
|
10
12
|
/**
|
|
11
13
|
* This class implements custom commands that are run once globally for the entire repo
|
|
@@ -21,7 +23,18 @@ export declare class GlobalScriptAction extends BaseScriptAction<IGlobalCommandC
|
|
|
21
23
|
private readonly _shellCommand;
|
|
22
24
|
private readonly _autoinstallerName;
|
|
23
25
|
private readonly _autoinstallerFullPath;
|
|
26
|
+
private readonly _providedByPlugin;
|
|
27
|
+
private _customParametersByLongName;
|
|
28
|
+
private _isHandled;
|
|
24
29
|
constructor(options: IGlobalScriptActionOptions);
|
|
30
|
+
/**
|
|
31
|
+
* {@inheritDoc IGlobalCommand.setHandled}
|
|
32
|
+
*/
|
|
33
|
+
setHandled(): void;
|
|
34
|
+
/**
|
|
35
|
+
* {@inheritDoc IGlobalCommand.getCustomParametersByLongName}
|
|
36
|
+
*/
|
|
37
|
+
getCustomParametersByLongName<TParameter extends CommandLineParameter>(longName: string): TParameter;
|
|
25
38
|
private _prepareAutoinstallerNameAsync;
|
|
26
39
|
runAsync(): Promise<void>;
|
|
27
40
|
private _expandShellCommandWithTokens;
|
|
@@ -217,6 +217,11 @@ export declare class RushConstants {
|
|
|
217
217
|
* The value of the "commandKind" property for a global command in command-line.json
|
|
218
218
|
*/
|
|
219
219
|
static readonly globalCommandKind: 'global';
|
|
220
|
+
/**
|
|
221
|
+
* The value of the "commandKind" property for a plugin-only global command in command-line.json.
|
|
222
|
+
* This command kind can only be used in command-line.json files provided by Rush plugins.
|
|
223
|
+
*/
|
|
224
|
+
static readonly globalPluginCommandKind: 'globalPlugin';
|
|
220
225
|
/**
|
|
221
226
|
* The value of the "commandKind" property for a phased command in command-line.json
|
|
222
227
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AsyncParallelHook, AsyncSeriesHook, HookMap } from 'tapable';
|
|
2
|
+
import type { CommandLineParameter } from '@rushstack/ts-command-line';
|
|
2
3
|
import type { ITelemetryData } from '../logic/Telemetry';
|
|
3
4
|
import type { PhasedCommandHooks } from './PhasedCommandHooks';
|
|
4
5
|
import type { Subspace } from '../api/Subspace';
|
|
@@ -17,6 +18,16 @@ export interface IRushCommand {
|
|
|
17
18
|
* @beta
|
|
18
19
|
*/
|
|
19
20
|
export interface IGlobalCommand extends IRushCommand {
|
|
21
|
+
/**
|
|
22
|
+
* Get a parameter by its long name (e.g. "--output-path") that was defined in command-line.json for this command.
|
|
23
|
+
* If the parameter was not defined or not provided on the command line, this will throw.
|
|
24
|
+
*/
|
|
25
|
+
getCustomParametersByLongName<TParameter extends CommandLineParameter>(longName: string): TParameter;
|
|
26
|
+
/**
|
|
27
|
+
* Call this from a plugin hook to indicate that the command has been fully handled
|
|
28
|
+
* by the plugin. When set, the default shell command execution will be skipped.
|
|
29
|
+
*/
|
|
30
|
+
setHandled(): void;
|
|
20
31
|
}
|
|
21
32
|
/**
|
|
22
33
|
* Information about the currently executing phased script command (as defined in command-line.json, or default "build" or "rebuild") provided to plugins.
|
|
@@ -65,7 +76,7 @@ export declare class RushLifecycleHooks {
|
|
|
65
76
|
* The hook to run between preparing the common/temp folder and invoking the package manager during "rush install" or "rush update".
|
|
66
77
|
*/
|
|
67
78
|
readonly beforeInstall: AsyncSeriesHook<[
|
|
68
|
-
command:
|
|
79
|
+
command: IRushCommand,
|
|
69
80
|
subspace: Subspace,
|
|
70
81
|
variant: string | undefined
|
|
71
82
|
]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/rush-sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.172.1",
|
|
4
4
|
"description": "An API for interacting with the Rush engine",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,20 +41,20 @@
|
|
|
41
41
|
"tapable": "2.2.1",
|
|
42
42
|
"@rushstack/credential-cache": "0.2.7",
|
|
43
43
|
"@rushstack/lookup-by-path": "0.9.7",
|
|
44
|
+
"@rushstack/node-core-library": "5.20.3",
|
|
44
45
|
"@rushstack/terminal": "0.22.3",
|
|
45
|
-
"@rushstack/package-deps-hash": "4.7.7"
|
|
46
|
-
"@rushstack/node-core-library": "5.20.3"
|
|
46
|
+
"@rushstack/package-deps-hash": "4.7.7"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/semver": "7.5.0",
|
|
50
50
|
"@types/webpack-env": "1.18.8",
|
|
51
51
|
"eslint": "~9.37.0",
|
|
52
52
|
"webpack": "~5.105.2",
|
|
53
|
-
"@microsoft/rush-lib": "5.
|
|
53
|
+
"@microsoft/rush-lib": "5.172.1",
|
|
54
54
|
"@rushstack/heft": "1.2.7",
|
|
55
|
+
"@rushstack/stream-collator": "4.2.7",
|
|
55
56
|
"@rushstack/heft-webpack5-plugin": "1.3.7",
|
|
56
57
|
"@rushstack/ts-command-line": "5.3.3",
|
|
57
|
-
"@rushstack/stream-collator": "4.2.7",
|
|
58
58
|
"@rushstack/webpack-preserve-dynamic-require-plugin": "0.12.8",
|
|
59
59
|
"local-node-rig": "1.0.0"
|
|
60
60
|
},
|