@rushstack/rush-sdk 5.97.0 → 5.97.1-pr3481.18

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 (53) hide show
  1. package/dist/rush-lib.d.ts +425 -29
  2. package/lib/api/CobuildConfiguration.d.ts +63 -0
  3. package/lib/api/CobuildConfiguration.js +1 -0
  4. package/lib/api/EnvironmentConfiguration.d.ts +41 -0
  5. package/lib/api/ExperimentsConfiguration.d.ts +5 -0
  6. package/lib/api/LastInstallFlag.d.ts +58 -21
  7. package/lib/api/LastLinkFlag.d.ts +3 -7
  8. package/lib/api/RushConfiguration.d.ts +52 -0
  9. package/lib/api/RushConfigurationProject.d.ts +6 -0
  10. package/lib/api/base/BaseFlag.d.ts +50 -0
  11. package/lib/api/base/BaseFlag.js +1 -0
  12. package/lib/api/packageManager/PnpmPackageManager.d.ts +14 -0
  13. package/lib/cli/actions/InstallAction.d.ts +7 -0
  14. package/lib/cli/actions/ListAction.d.ts +4 -0
  15. package/lib/cli/actions/UpdateAction.d.ts +7 -0
  16. package/lib/cli/parsing/SelectionParameterSet.d.ts +17 -3
  17. package/lib/index.d.ts +5 -2
  18. package/lib/logic/PurgeManager.d.ts +1 -0
  19. package/lib/logic/RushConstants.d.ts +15 -0
  20. package/lib/logic/base/BaseInstallManagerTypes.d.ts +23 -0
  21. package/lib/logic/buildCache/ProjectBuildCache.d.ts +5 -4
  22. package/lib/logic/cobuild/CobuildLock.d.ts +24 -0
  23. package/lib/logic/cobuild/CobuildLock.js +1 -0
  24. package/lib/logic/cobuild/ICobuildLockProvider.d.ts +46 -0
  25. package/lib/logic/cobuild/ICobuildLockProvider.js +1 -0
  26. package/lib/logic/installManager/InstallHelpers.d.ts +1 -0
  27. package/lib/logic/operations/AsyncOperationQueue.d.ts +23 -4
  28. package/lib/logic/operations/CacheableOperationPlugin.d.ts +21 -0
  29. package/lib/logic/operations/CacheableOperationPlugin.js +1 -0
  30. package/lib/logic/operations/IOperationRunner.d.ts +29 -10
  31. package/lib/logic/operations/OperationExecutionManager.d.ts +5 -0
  32. package/lib/logic/operations/OperationExecutionRecord.d.ts +7 -1
  33. package/lib/logic/operations/OperationRunnerHooks.d.ts +50 -0
  34. package/lib/logic/operations/OperationRunnerHooks.js +1 -0
  35. package/lib/logic/operations/OperationStatus.d.ts +8 -0
  36. package/lib/logic/operations/PeriodicCallback.d.ts +20 -0
  37. package/lib/logic/operations/PeriodicCallback.js +1 -0
  38. package/lib/logic/operations/ShellOperationRunner.d.ts +4 -13
  39. package/lib/logic/pnpm/IPnpmfile.d.ts +16 -0
  40. package/lib/logic/pnpm/PnpmProjectShrinkwrapFile.d.ts +7 -0
  41. package/lib/logic/pnpm/PnpmShrinkwrapFile.d.ts +26 -0
  42. package/lib/logic/pnpm/SplitWorkspaceGlobalPnpmfileShim.d.ts +3 -0
  43. package/lib/logic/pnpm/SplitWorkspaceGlobalPnpmfileShim.js +1 -0
  44. package/lib/logic/pnpm/SplitWorkspacePnpmfileConfiguration.d.ts +23 -0
  45. package/lib/logic/pnpm/SplitWorkspacePnpmfileConfiguration.js +1 -0
  46. package/lib/logic/selectors/SplitWorkspaceProjectSelectorParser.d.ts +10 -0
  47. package/lib/logic/selectors/SplitWorkspaceProjectSelectorParser.js +1 -0
  48. package/lib/logic/versionMismatch/VersionMismatchFinderProject.d.ts +2 -0
  49. package/lib/pluginFramework/PhasedCommandHooks.d.ts +15 -1
  50. package/lib/pluginFramework/RushSession.d.ts +11 -2
  51. package/lib/utilities/PathConstants.d.ts +1 -0
  52. package/lib/utilities/npmrcUtilities.d.ts +1 -1
  53. package/package.json +2 -2
@@ -0,0 +1,63 @@
1
+ import { ITerminal } from '@rushstack/node-core-library';
2
+ import { RushSession } from '../pluginFramework/RushSession';
3
+ import type { ICobuildLockProvider } from '../logic/cobuild/ICobuildLockProvider';
4
+ import type { RushConfiguration } from './RushConfiguration';
5
+ /**
6
+ * @beta
7
+ */
8
+ export interface ICobuildJson {
9
+ cobuildEnabled: boolean;
10
+ cobuildLockProvider: string;
11
+ }
12
+ /**
13
+ * @beta
14
+ */
15
+ export interface ICobuildConfigurationOptions {
16
+ cobuildJson: ICobuildJson;
17
+ rushConfiguration: RushConfiguration;
18
+ rushSession: RushSession;
19
+ }
20
+ /**
21
+ * Use this class to load and save the "common/config/rush/cobuild.json" config file.
22
+ * This file provides configuration options for the Rush Cobuild feature.
23
+ * @beta
24
+ */
25
+ export declare class CobuildConfiguration {
26
+ private static _jsonSchema;
27
+ /**
28
+ * Indicates whether the cobuild feature is enabled.
29
+ * Typically it is enabled in the cobuild.json config file.
30
+ *
31
+ * Note: The orchestrator (or local users) should always have to opt into running with cobuilds by
32
+ * providing a cobuild context id. Even if cobuilds are "enabled" as a feature, they don't
33
+ * actually turn on for that particular build unless the cobuild context id is provided as an
34
+ * non-empty string.
35
+ */
36
+ readonly cobuildEnabled: boolean;
37
+ /**
38
+ * Cobuild context id
39
+ *
40
+ * @remarks
41
+ * The cobuild feature won't be enabled until the context id is provided as an non-empty string.
42
+ */
43
+ readonly cobuildContextId: string | undefined;
44
+ /**
45
+ * If true, Rush will automatically handle the leaf project with build cache "disabled" by writing
46
+ * to the cache in a special "log files only mode". This is useful when you want to use Cobuilds
47
+ * to improve the performance in CI validations and the leaf projects have not enabled cache.
48
+ */
49
+ readonly cobuildLeafProjectLogOnlyAllowed: boolean;
50
+ readonly cobuildLockProvider: ICobuildLockProvider;
51
+ private constructor();
52
+ /**
53
+ * Attempts to load the cobuild.json data from the standard file path `common/config/rush/cobuild.json`.
54
+ * If the file has not been created yet, then undefined is returned.
55
+ */
56
+ static tryLoadAsync(terminal: ITerminal, rushConfiguration: RushConfiguration, rushSession: RushSession): Promise<CobuildConfiguration | undefined>;
57
+ static getCobuildConfigFilePath(rushConfiguration: RushConfiguration): string;
58
+ private static _loadAsync;
59
+ get contextId(): string | undefined;
60
+ connectLockProviderAsync(): Promise<void>;
61
+ disconnectLockProviderAsync(): Promise<void>;
62
+ }
63
+ //# sourceMappingURL=CobuildConfiguration.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("api/CobuildConfiguration");
@@ -120,6 +120,29 @@ export declare const EnvironmentVariableNames: {
120
120
  * this environment variable is ignored.
121
121
  */
122
122
  readonly RUSH_BUILD_CACHE_WRITE_ALLOWED: "RUSH_BUILD_CACHE_WRITE_ALLOWED";
123
+ /**
124
+ * Setting this environment variable overrides the value of `cobuildEnabled` in the `cobuild.json`
125
+ * configuration file.
126
+ *
127
+ * @remarks
128
+ * Specify `1` to enable the cobuild or `0` to disable it.
129
+ *
130
+ * If there is no cobuild configured, then this environment variable is ignored.
131
+ */
132
+ readonly RUSH_COBUILD_ENABLED: "RUSH_COBUILD_ENABLED";
133
+ /**
134
+ * Setting this environment variable opt into running with cobuilds.
135
+ *
136
+ * @remarks
137
+ * If there is no cobuild configured, then this environment variable is ignored.
138
+ */
139
+ readonly RUSH_COBUILD_CONTEXT_ID: "RUSH_COBUILD_CONTEXT_ID";
140
+ /**
141
+ * If this variable is set to "1", When getting distributed builds, Rush will automatically handle the leaf project
142
+ * with build cache "disabled" by writing to the cache in a special "log files only mode". This is useful when you
143
+ * want to use Cobuilds to improve the performance in CI validations and the leaf projects have not enabled cache.
144
+ */
145
+ readonly RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED: "RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED";
123
146
  /**
124
147
  * Explicitly specifies the path for the Git binary that is invoked by certain Rush operations.
125
148
  */
@@ -164,6 +187,9 @@ export declare class EnvironmentConfiguration {
164
187
  private static _buildCacheCredential;
165
188
  private static _buildCacheEnabled;
166
189
  private static _buildCacheWriteAllowed;
190
+ private static _cobuildEnabled;
191
+ private static _cobuildContextId;
192
+ private static _cobuildLeafProjectLogOnlyAllowed;
167
193
  private static _gitBinaryPath;
168
194
  private static _tarBinaryPath;
169
195
  /**
@@ -219,6 +245,21 @@ export declare class EnvironmentConfiguration {
219
245
  * See {@link EnvironmentVariableNames.RUSH_BUILD_CACHE_WRITE_ALLOWED}
220
246
  */
221
247
  static get buildCacheWriteAllowed(): boolean | undefined;
248
+ /**
249
+ * If set, enables or disables the cobuild feature.
250
+ * See {@link EnvironmentVariableNames.RUSH_COBUILD_ENABLED}
251
+ */
252
+ static get cobuildEnabled(): boolean | undefined;
253
+ /**
254
+ * Provides a determined cobuild context id if configured
255
+ * See {@link EnvironmentVariableNames.RUSH_COBUILD_CONTEXT_ID}
256
+ */
257
+ static get cobuildContextId(): string | undefined;
258
+ /**
259
+ * If set, enables or disables the cobuild leaf project log only feature.
260
+ * See {@link EnvironmentVariableNames.RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED}
261
+ */
262
+ static get cobuildLeafProjectLogOnlyAllowed(): boolean | undefined;
222
263
  /**
223
264
  * Allows the git binary path to be explicitly provided.
224
265
  * See {@link EnvironmentVariableNames.RUSH_GIT_BINARY_PATH}
@@ -35,6 +35,11 @@ export interface IExperimentsJson {
35
35
  * in common/config/rush/command-line.json.
36
36
  */
37
37
  phasedCommands?: boolean;
38
+ /**
39
+ * If true, rush install or rush update implicitly specify --ignore-scripts during pnpm install,
40
+ * and run install lifecycle scripts by pnpm rebuild --pending after pnpm install successfully.
41
+ */
42
+ deferredInstallationScripts?: boolean;
38
43
  /**
39
44
  * If true, perform a clean install after when running `rush install` or `rush update` if the
40
45
  * `.npmrc` file has changed since the last install.
@@ -1,6 +1,52 @@
1
- import { JsonObject } from '@rushstack/node-core-library';
1
+ import { IPackageJson } from '@rushstack/node-core-library';
2
+ import { BaseFlag } from './base/BaseFlag';
3
+ import { PackageManagerName } from './packageManager/PackageManager';
2
4
  import { RushConfiguration } from './RushConfiguration';
3
5
  export declare const LAST_INSTALL_FLAG_FILE_NAME: string;
6
+ /**
7
+ * This represents the JSON data structure for the "last-install.flag" file.
8
+ * @internal
9
+ */
10
+ export interface ILastInstallFlagJson {
11
+ /**
12
+ * Current node version
13
+ */
14
+ node: string;
15
+ /**
16
+ * Current package manager name
17
+ */
18
+ packageManager: PackageManagerName;
19
+ /**
20
+ * Current package manager version
21
+ */
22
+ packageManagerVersion: string;
23
+ /**
24
+ * Current rush json folder
25
+ */
26
+ rushJsonFolder: string;
27
+ /**
28
+ * The content of package.json, used in the flag file of autoinstaller
29
+ */
30
+ packageJson?: IPackageJson;
31
+ /**
32
+ * Same with pnpmOptions.pnpmStorePath in rush.json
33
+ */
34
+ storePath?: string;
35
+ /**
36
+ * True when "useWorkspaces" is true in rush.json
37
+ */
38
+ workspaces?: true;
39
+ /**
40
+ * True when user explicitly specify "--ignore-scripts" CLI parameter or deferredInstallationScripts
41
+ */
42
+ ignoreScripts?: true;
43
+ /**
44
+ * When specified, it is a list of selected projects during partial install
45
+ * It is undefined when full install
46
+ */
47
+ selectedProjectNames?: string[];
48
+ [key: string]: unknown;
49
+ }
4
50
  /**
5
51
  * @internal
6
52
  */
@@ -15,19 +61,9 @@ export interface ILockfileValidityCheckOptions {
15
61
  * it can invalidate the last install.
16
62
  * @internal
17
63
  */
18
- export declare class LastInstallFlag {
19
- private _state;
20
- /**
21
- * Returns the full path to the flag file
22
- */
23
- readonly path: string;
24
- /**
25
- * Creates a new LastInstall flag
26
- * @param folderPath - the folder that this flag is managing
27
- * @param state - optional, the state that should be managed or compared
28
- */
29
- constructor(folderPath: string, state?: JsonObject);
64
+ export declare class LastInstallFlag extends BaseFlag<ILastInstallFlagJson> {
30
65
  /**
66
+ * @override
31
67
  * Returns true if the file exists and the contents match the current state.
32
68
  */
33
69
  isValid(options?: ILockfileValidityCheckOptions): boolean;
@@ -41,14 +77,6 @@ export declare class LastInstallFlag {
41
77
  rushVerb: string;
42
78
  }): boolean;
43
79
  private _isValid;
44
- /**
45
- * Writes the flag file to disk with the current state
46
- */
47
- create(): void;
48
- /**
49
- * Removes the flag file
50
- */
51
- clear(): void;
52
80
  /**
53
81
  * Returns the name of the flag file
54
82
  */
@@ -69,5 +97,14 @@ export declare class LastInstallFlagFactory {
69
97
  * @internal
70
98
  */
71
99
  static getCommonTempFlag(rushConfiguration: RushConfiguration, extraState?: Record<string, string>): LastInstallFlag;
100
+ /**
101
+ * Gets the LastInstall flag and sets the current state. This state is used to compare
102
+ * against the last-known-good state tracked by the LastInstall flag.
103
+ * @param rushConfiguration - the configuration of the Rush repo to get the install
104
+ * state from
105
+ *
106
+ * @internal
107
+ */
108
+ static getCommonTempSplitFlag(rushConfiguration: RushConfiguration): LastInstallFlag;
72
109
  }
73
110
  //# sourceMappingURL=LastInstallFlag.d.ts.map
@@ -1,16 +1,12 @@
1
- import { LastInstallFlag } from './LastInstallFlag';
2
- import { RushConfiguration } from './RushConfiguration';
1
+ import { BaseFlag } from './base/BaseFlag';
2
+ import type { RushConfiguration } from './RushConfiguration';
3
3
  export declare const LAST_LINK_FLAG_FILE_NAME: string;
4
4
  /**
5
5
  * A helper class for managing the last-link flag, which is persistent and
6
6
  * indicates that linking was completed successfully.
7
7
  * @internal
8
8
  */
9
- export declare class LastLinkFlag extends LastInstallFlag {
10
- /**
11
- * @override
12
- */
13
- isValid(): boolean;
9
+ export declare class LastLinkFlag extends BaseFlag {
14
10
  /**
15
11
  * @override
16
12
  */
@@ -117,6 +117,15 @@ export interface IRushConfigurationJson {
117
117
  export interface ICurrentVariantJson {
118
118
  variant: string | JsonNull;
119
119
  }
120
+ /**
121
+ * The filter parameters to search from all projects.
122
+ */
123
+ export interface IRushConfigurationProjectsFilter {
124
+ /**
125
+ * If true, filter out projects that specify splitWorkspace as true.
126
+ */
127
+ splitWorkspace: boolean;
128
+ }
120
129
  /**
121
130
  * Options for `RushConfiguration.tryFindRushJsonLocation`.
122
131
  * @public
@@ -143,6 +152,8 @@ export declare class RushConfiguration {
143
152
  private _projects;
144
153
  private _projectsByName;
145
154
  private _projectsByTag;
155
+ private _filteredProjectsCache;
156
+ private _hasSplitWorkspaceProject;
146
157
  private _commonVersionsConfigurationsByVariant;
147
158
  /**
148
159
  * The name of the package manager being used to install dependencies
@@ -197,6 +208,12 @@ export declare class RushConfiguration {
197
208
  * Example: `C:\MyRepo\common\temp`
198
209
  */
199
210
  readonly commonTempFolder: string;
211
+ /**
212
+ * The folder where temporary files will be stored. This is always a subfolder called "temp"
213
+ * under the common folder.
214
+ * Example: `C:\MyRepo\common\temp-split`
215
+ */
216
+ readonly commonTempSplitFolder: string;
200
217
  /**
201
218
  * The folder where automation scripts are stored. This is always a subfolder called "scripts"
202
219
  * under the common folder.
@@ -251,6 +268,21 @@ export declare class RushConfiguration {
251
268
  * or `C:\MyRepo\common\temp\pnpm-lock-preinstall.yaml`
252
269
  */
253
270
  readonly tempShrinkwrapPreinstallFilename: string;
271
+ /**
272
+ * The filename (without any path) of the shrinkwrap file for split workspace that is used by the package manager.
273
+ * @remarks
274
+ * This property merely reports the filename; the file itself may not actually exist.
275
+ * Example: `pnpm-lock.yaml`
276
+ */
277
+ readonly splitWorkspaceShrinkwrapFilename: string;
278
+ /**
279
+ * The full path of the temporary shrinkwrap file for split workspace that is used during
280
+ * "rush install". This file may get rewritten by the package manager during installation.
281
+ * @remarks
282
+ * This property merely reports the filename; the file itself may not actually exist.
283
+ * Example: `C:\MyRepo\common\temp-split\pnpm-lock.yaml`
284
+ */
285
+ readonly tempSplitWorkspaceShrinkwrapFilename: string;
254
286
  /**
255
287
  * The filename of the variant dependency data file. By default this is
256
288
  * called 'current-variant.json' resides in the Rush common folder.
@@ -506,6 +538,11 @@ export declare class RushConfiguration {
506
538
  * @beta
507
539
  */
508
540
  get projectsByTag(): ReadonlyMap<string, ReadonlySet<RushConfigurationProject>>;
541
+ /**
542
+ * Search for projects according to filter
543
+ * @beta
544
+ */
545
+ getFilteredProjects(filter: IRushConfigurationProjectsFilter): RushConfigurationProject[];
509
546
  /**
510
547
  * Settings from the common-versions.json config file.
511
548
  * @remarks
@@ -524,6 +561,10 @@ export declare class RushConfiguration {
524
561
  * or "rush update".
525
562
  */
526
563
  get currentInstalledVariant(): string | undefined;
564
+ /**
565
+ * Is there any split workspace project.
566
+ */
567
+ get hasSplitWorkspaceProject(): boolean;
527
568
  /**
528
569
  * Gets the path to the common-versions.json config file for a specific variant.
529
570
  * @param variant - The name of the current variant in use by the active command.
@@ -556,6 +597,11 @@ export declare class RushConfiguration {
556
597
  * @param variant - The name of the current variant in use by the active command.
557
598
  */
558
599
  getCommittedShrinkwrapFilename(variant?: string | undefined): string;
600
+ /**
601
+ * Gets the committed shrinkwrap file name for split workspace.
602
+ * @param variant - The name of the current variant in use by the active command.
603
+ */
604
+ getCommittedSplitWorkspaceShrinkwrapFilename(): string;
559
605
  /**
560
606
  * Gets the absolute path for "pnpmfile.js" for a specific variant.
561
607
  * @param variant - The name of the current variant in use by the active command.
@@ -591,5 +637,11 @@ export declare class RushConfiguration {
591
637
  */
592
638
  tryGetProjectForPath(currentFolderPath: string): RushConfigurationProject | undefined;
593
639
  private _getVariantConfigFolderPath;
640
+ /**
641
+ * Split workspace can only works on PNPM with "useWorkspaces" enabled.
642
+ * The workspace project can NOT depend on a split workspace project.
643
+ * The split workspace project CAN depend on a workspace project.
644
+ */
645
+ private _validateSplitWorkspaceRelationships;
594
646
  }
595
647
  //# sourceMappingURL=RushConfiguration.d.ts.map
@@ -16,6 +16,7 @@ export interface IRushConfigurationProjectJson {
16
16
  skipRushCheck?: boolean;
17
17
  publishFolder?: string;
18
18
  tags?: string[];
19
+ splitWorkspace?: boolean;
19
20
  }
20
21
  /**
21
22
  * @internal
@@ -151,6 +152,11 @@ export declare class RushConfigurationProject {
151
152
  * @beta
152
153
  */
153
154
  readonly tags: ReadonlySet<string>;
155
+ /**
156
+ * Whether this project is a split workspace project.
157
+ * @beta
158
+ */
159
+ readonly splitWorkspace: boolean;
154
160
  /** @internal */
155
161
  constructor(options: IRushConfigurationProjectOptions);
156
162
  /**
@@ -0,0 +1,50 @@
1
+ import { JsonObject } from '@rushstack/node-core-library';
2
+ /**
3
+ * A base class for flag file.
4
+ * @internal
5
+ */
6
+ export declare class BaseFlag<T extends object = JsonObject> {
7
+ /**
8
+ * Flag file path
9
+ */
10
+ readonly path: string;
11
+ /**
12
+ * Content of the flag
13
+ */
14
+ protected _state: T;
15
+ /**
16
+ * Whether the current state is modified
17
+ */
18
+ protected _isModified: boolean;
19
+ /**
20
+ * Creates a new flag file
21
+ * @param folderPath - the folder that this flag is managing
22
+ * @param state - optional, the state that should be managed or compared
23
+ */
24
+ constructor(folderPath: string, state?: Partial<T>);
25
+ /**
26
+ * Returns true if the file exists and the contents match the current state.
27
+ */
28
+ isValid(): boolean;
29
+ /**
30
+ * Writes the flag file to disk with the current state
31
+ */
32
+ create(): void;
33
+ /**
34
+ * Merge new data into current state by lodash "merge"
35
+ */
36
+ mergeFromObject(data: JsonObject): void;
37
+ /**
38
+ * Writes the flag file to disk with the current state if modified
39
+ */
40
+ saveIfModified(): void;
41
+ /**
42
+ * Removes the flag file
43
+ */
44
+ clear(): void;
45
+ /**
46
+ * Returns Name of the flag file
47
+ */
48
+ protected get flagName(): string;
49
+ }
50
+ //# sourceMappingURL=BaseFlag.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("api/base/BaseFlag");
@@ -11,7 +11,21 @@ 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 split workspace that is used by the package manager.
16
+ *
17
+ * @remarks
18
+ * Example: `.pnpmfile-split-workspace.cjs`
19
+ */
20
+ splitWorkspacePnpmfileFilename: string;
14
21
  /** @internal */
15
22
  constructor(version: string);
23
+ /**
24
+ * The filename of the global shrinkwrap file that is used by the package manager.
25
+ *
26
+ * @remarks
27
+ * Example: `global-pnpmfile.cjs`
28
+ */
29
+ get globalPnpmfileFilename(): string;
16
30
  }
17
31
  //# sourceMappingURL=PnpmPackageManager.d.ts.map
@@ -3,6 +3,13 @@ import type { IInstallManagerOptions } from '../../logic/base/BaseInstallManager
3
3
  import { RushCommandLineParser } from '../RushCommandLineParser';
4
4
  export declare class InstallAction extends BaseInstallAction {
5
5
  private readonly _checkOnlyParameter;
6
+ private _ignoreScriptsParameter;
7
+ /**
8
+ * Whether split workspace projects are included in install
9
+ *
10
+ * This parameter only supported when there is split workspace project
11
+ */
12
+ private _includeSplitWorkspaceParameter?;
6
13
  constructor(parser: RushCommandLineParser);
7
14
  protected buildInstallOptionsAsync(): Promise<IInstallManagerOptions>;
8
15
  }
@@ -34,6 +34,10 @@ export interface IJsonEntry {
34
34
  * @see {@link ../../api/RushConfigurationProject#RushConfigurationProject.tags | RushConfigurationProject.tags}
35
35
  */
36
36
  tags: string[];
37
+ /**
38
+ * @see {@link ../../api/RushConfigurationProject#RushConfigurationProject.splitWorkspace | RushConfigurationProject.splitWorkspace}
39
+ */
40
+ splitWorkspace: boolean;
37
41
  }
38
42
  export interface IJsonOutput {
39
43
  projects: IJsonEntry[];
@@ -4,6 +4,13 @@ import { RushCommandLineParser } from '../RushCommandLineParser';
4
4
  export declare class UpdateAction extends BaseInstallAction {
5
5
  private readonly _fullParameter;
6
6
  private readonly _recheckParameter;
7
+ private _ignoreScriptsParameter;
8
+ /**
9
+ * Whether split workspace projects are included in update
10
+ *
11
+ * This parameter only supported when there is split workspace project
12
+ */
13
+ private _includeSplitWorkspaceParameter?;
7
14
  constructor(parser: RushCommandLineParser);
8
15
  protected runAsync(): Promise<void>;
9
16
  protected buildInstallOptionsAsync(): Promise<IInstallManagerOptions>;
@@ -20,7 +20,15 @@ export declare class SelectionParameterSet {
20
20
  private readonly _fromVersionPolicy;
21
21
  private readonly _toVersionPolicy;
22
22
  private readonly _selectorParserByScope;
23
+ private readonly _selectors;
24
+ private _isSelectionSpecified;
23
25
  constructor(rushConfiguration: RushConfiguration, action: CommandLineParameterProvider, gitOptions: IGitSelectorParserOptions);
26
+ /**
27
+ * Check if any of the selection parameters have a value specified on the command line
28
+ *
29
+ * Returns true if specifying any selection parameters, otherwise false.
30
+ */
31
+ get isSelectionSpecified(): boolean;
24
32
  /**
25
33
  * Computes the set of selected projects based on all parameter values.
26
34
  *
@@ -28,14 +36,19 @@ export declare class SelectionParameterSet {
28
36
  */
29
37
  getSelectedProjectsAsync(terminal: ITerminal): Promise<Set<RushConfigurationProject>>;
30
38
  /**
31
- * Represents the selection as `--filter` parameters to pnpm.
39
+ * Represents the selection as `--filter` parameters to pnpm, and selected projects when partial install
32
40
  *
33
41
  * @remarks
34
42
  * This is a separate from the selection to allow the filters to be represented more concisely.
35
43
  *
36
- * @see https://pnpm.js.org/en/filtering
44
+ * @see https://pnpm.io/filtering
37
45
  */
38
- getPnpmFilterArgumentsAsync(terminal: ITerminal): Promise<string[]>;
46
+ getPnpmFilterArgumentsAsync(terminal: ITerminal): Promise<{
47
+ pnpmFilterArguments: string[];
48
+ splitWorkspacePnpmFilterArguments: string[];
49
+ selectedProjects: Set<RushConfigurationProject> | undefined;
50
+ hasSelectSplitWorkspaceProject: boolean;
51
+ }>;
39
52
  /**
40
53
  * Usage telemetry for selection parameters. Only saved locally, and if requested in the config.
41
54
  */
@@ -47,5 +60,6 @@ export declare class SelectionParameterSet {
47
60
  * Handles '.', unscoped names, and scoped names.
48
61
  */
49
62
  private _evaluateProjectParameterAsync;
63
+ toArguments(): string[];
50
64
  }
51
65
  //# sourceMappingURL=SelectionParameterSet.d.ts.map
package/lib/index.d.ts CHANGED
@@ -9,6 +9,7 @@ export { INpmOptionsJson as _INpmOptionsJson, NpmOptionsConfiguration } from './
9
9
  export { IYarnOptionsJson as _IYarnOptionsJson, YarnOptionsConfiguration } from './logic/yarn/YarnOptionsConfiguration';
10
10
  export { IPnpmOptionsJson as _IPnpmOptionsJson, PnpmStoreOptions, PnpmOptionsConfiguration } from './logic/pnpm/PnpmOptionsConfiguration';
11
11
  export { BuildCacheConfiguration } from './api/BuildCacheConfiguration';
12
+ export { CobuildConfiguration, ICobuildJson } from './api/CobuildConfiguration';
12
13
  export { GetCacheEntryIdFunction, IGenerateCacheEntryIdOptions } from './logic/buildCache/CacheEntryId';
13
14
  export { FileSystemBuildCacheProvider, IFileSystemBuildCacheProviderOptions } from './logic/buildCache/FileSystemBuildCacheProvider';
14
15
  export { IPhase } from './api/CommandLineConfiguration';
@@ -25,7 +26,8 @@ export { RepoStateFile } from './logic/RepoStateFile';
25
26
  export { LookupByPath, IPrefixMatch } from './logic/LookupByPath';
26
27
  export { EventHooks, Event } from './api/EventHooks';
27
28
  export { ChangeManager } from './api/ChangeManager';
28
- export { LastInstallFlag as _LastInstallFlag, ILockfileValidityCheckOptions as _ILockfileValidityCheckOptions } from './api/LastInstallFlag';
29
+ export { LastInstallFlag as _LastInstallFlag, ILastInstallFlagJson as _ILastInstallFlagJson, ILockfileValidityCheckOptions as _ILockfileValidityCheckOptions } from './api/LastInstallFlag';
30
+ export { BaseFlag as _BaseFlag } from './api/base/BaseFlag';
29
31
  export { VersionPolicyDefinitionName, BumpType, LockStepVersionPolicy, IndividualVersionPolicy, VersionPolicy } from './api/VersionPolicy';
30
32
  export { VersionPolicyConfiguration } from './api/VersionPolicyConfiguration';
31
33
  export { ILaunchOptions, Rush } from './api/Rush';
@@ -36,7 +38,7 @@ export { IOperationRunner, IOperationRunnerContext } from './logic/operations/IO
36
38
  export { IExecutionResult, IOperationExecutionResult } from './logic/operations/IOperationExecutionResult';
37
39
  export { IOperationOptions, Operation } from './logic/operations/Operation';
38
40
  export { OperationStatus } from './logic/operations/OperationStatus';
39
- export { RushSession, IRushSessionOptions, CloudBuildCacheProviderFactory } from './pluginFramework/RushSession';
41
+ export { RushSession, IRushSessionOptions, CloudBuildCacheProviderFactory, CobuildLockProviderFactory } from './pluginFramework/RushSession';
40
42
  export { IRushCommand, IGlobalCommand, IPhasedCommand, RushLifecycleHooks } from './pluginFramework/RushLifeCycle';
41
43
  export { ICreateOperationsContext, PhasedCommandHooks } from './pluginFramework/PhasedCommandHooks';
42
44
  export { IRushPlugin } from './pluginFramework/IRushPlugin';
@@ -44,6 +46,7 @@ export { IBuiltInPluginConfiguration as _IBuiltInPluginConfiguration } from './p
44
46
  export { IRushPluginConfigurationBase as _IRushPluginConfigurationBase } from './api/RushPluginsConfiguration';
45
47
  export { ILogger } from './pluginFramework/logging/Logger';
46
48
  export { ICloudBuildCacheProvider } from './logic/buildCache/ICloudBuildCacheProvider';
49
+ export { ICobuildLockProvider, ICobuildContext, ICobuildCompletedState } from './logic/cobuild/ICobuildLockProvider';
47
50
  export { ICredentialCacheOptions, ICredentialCacheEntry, CredentialCache } from './logic/CredentialCache';
48
51
  export type { ITelemetryData, ITelemetryMachineInfo, ITelemetryOperationResult } from './logic/Telemetry';
49
52
  export { IStopwatchResult } from './utilities/Stopwatch';
@@ -9,6 +9,7 @@ export declare class PurgeManager {
9
9
  private _rushGlobalFolder;
10
10
  private _rushUserFolderRecycler;
11
11
  readonly commonTempFolderRecycler: AsyncRecycler;
12
+ readonly commonTempSplitFolderRecycler: AsyncRecycler;
12
13
  constructor(rushConfiguration: RushConfiguration, rushGlobalFolder: RushGlobalFolder);
13
14
  /**
14
15
  * Performs the AsyncRecycler.deleteAll() operation. This should be called before
@@ -43,6 +43,12 @@ export declare class RushConstants {
43
43
  * Example: `C:\MyRepo\common\temp`
44
44
  */
45
45
  static readonly rushTempFolderName: string;
46
+ /**
47
+ * The folder name ("temp-split") under the common folder, or under the .rush folder in each project's directory where
48
+ * temporary files will be stored.
49
+ * Example: `C:\MyRepo\common\temp-split`
50
+ */
51
+ static readonly rushTempSplitFolderName: string;
46
52
  /**
47
53
  * The folder name ("projects") where temporary projects will be stored.
48
54
  * Example: `C:\MyRepo\common\temp\projects`
@@ -148,6 +154,15 @@ export declare class RushConstants {
148
154
  * Changing this ensures that cache entries generated by an old version will no longer register as a cache hit.
149
155
  */
150
156
  static readonly buildCacheVersion: number;
157
+ /**
158
+ * Cobuild configuration file.
159
+ */
160
+ static readonly cobuildFilename: string;
161
+ /**
162
+ * Cobuild version number, incremented when the logic to create cobuild lock changes.
163
+ * Changing this ensures that lock generated by an old version will no longer access as a cobuild lock.
164
+ */
165
+ static readonly cobuildLockVersion: number;
151
166
  /**
152
167
  * Per-project configuration filename.
153
168
  */
@@ -1,3 +1,5 @@
1
+ import type { SelectionParameterSet } from '../../cli/parsing/SelectionParameterSet';
2
+ import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
1
3
  export interface IInstallManagerOptions {
2
4
  /**
3
5
  * Whether the global "--debug" flag was specified.
@@ -61,5 +63,26 @@ export interface IInstallManagerOptions {
61
63
  * Callback to invoke between preparing the common/temp folder and running installation.
62
64
  */
63
65
  beforeInstallAsync?: () => Promise<void>;
66
+ /**
67
+ * Whether to specify "--ignore-scripts" command-line parameter, which ignores
68
+ * install lifecycle scripts in package.json and its dependencies
69
+ */
70
+ ignoreScripts: boolean;
71
+ /**
72
+ * Whether to install for projects in split workspace
73
+ */
74
+ includeSplitWorkspace: boolean;
75
+ /**
76
+ * Filters to be passed to PNPM during installation for split workspace.
77
+ */
78
+ splitWorkspacePnpmFilterArguments: string[];
79
+ /**
80
+ * Selected projects during partial install.
81
+ */
82
+ selectedProjects?: Set<RushConfigurationProject>;
83
+ /**
84
+ * Selection parameters for partial install.
85
+ */
86
+ selectionParameters?: SelectionParameterSet;
64
87
  }
65
88
  //# sourceMappingURL=BaseInstallManagerTypes.d.ts.map