@rushstack/rush-sdk 5.170.0 → 5.170.1-pr5378.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 (39) hide show
  1. package/dist/rush-lib.d.ts +469 -132
  2. package/lib-commonjs/index.js +1 -0
  3. package/lib-commonjs/logic/operations/IOperationGraph.js +2 -0
  4. package/lib-commonjs/logic/operations/OperationGraph.js +3 -0
  5. package/lib-commonjs/logic/operations/OperationStatus.js +1 -0
  6. package/lib-commonjs/{cli/parsing → logic/operations}/ParseParallelism.js +2 -1
  7. package/lib-commonjs/pluginFramework/OperationGraphHooks.js +3 -0
  8. package/lib-dts/api/CommandLineConfiguration.d.ts +7 -0
  9. package/lib-dts/api/CommandLineJson.d.ts +1 -0
  10. package/lib-dts/api/EnvironmentConfiguration.d.ts +12 -0
  11. package/lib-dts/api/EventHooks.d.ts +1 -1
  12. package/lib-dts/cli/parsing/SelectionParameterSet.d.ts +1 -1
  13. package/lib-dts/cli/scriptActions/PhasedScriptAction.d.ts +2 -12
  14. package/lib-dts/index.d.ts +7 -4
  15. package/lib-dts/logic/ProjectWatcher.d.ts +64 -42
  16. package/lib-dts/logic/buildCache/OperationBuildCache.d.ts +2 -2
  17. package/lib-dts/logic/operations/IOperationExecutionResult.d.ts +57 -16
  18. package/lib-dts/logic/operations/IOperationGraph.d.ts +137 -0
  19. package/lib-dts/logic/operations/IOperationRunner.d.ts +32 -2
  20. package/lib-dts/logic/operations/IPCOperationRunner.d.ts +8 -8
  21. package/lib-dts/logic/operations/Operation.d.ts +50 -14
  22. package/lib-dts/logic/operations/OperationExecutionRecord.d.ts +21 -9
  23. package/lib-dts/logic/operations/OperationGraph.d.ts +125 -0
  24. package/lib-dts/logic/operations/OperationStatus.d.ts +4 -0
  25. package/lib-dts/logic/operations/ParseParallelism.d.ts +33 -0
  26. package/lib-dts/logic/operations/ShellOperationRunner.d.ts +6 -5
  27. package/lib-dts/logic/operations/ShellOperationRunnerPlugin.d.ts +2 -1
  28. package/lib-dts/logic/operations/ValidateOperationsPlugin.d.ts +1 -3
  29. package/lib-dts/pluginFramework/OperationGraphHooks.d.ts +129 -0
  30. package/lib-dts/pluginFramework/PhasedCommandHooks.d.ts +32 -98
  31. package/lib-dts/utilities/Stopwatch.d.ts +2 -2
  32. package/lib-shim/index.js +32 -2
  33. package/lib-shim/index.js.map +1 -1
  34. package/package.json +8 -8
  35. package/lib-commonjs/logic/operations/OperationExecutionManager.js +0 -3
  36. package/lib-commonjs/logic/operations/WeightedOperationPlugin.js +0 -3
  37. package/lib-dts/cli/parsing/ParseParallelism.d.ts +0 -17
  38. package/lib-dts/logic/operations/OperationExecutionManager.d.ts +0 -60
  39. package/lib-dts/logic/operations/WeightedOperationPlugin.d.ts +0 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rushstack/rush-sdk",
3
- "version": "5.170.0",
3
+ "version": "5.170.1-pr5378.0",
4
4
  "description": "An API for interacting with the Rush engine",
5
5
  "repository": {
6
6
  "type": "git",
@@ -41,22 +41,22 @@
41
41
  "tapable": "2.2.1",
42
42
  "@rushstack/credential-cache": "0.2.7",
43
43
  "@rushstack/node-core-library": "5.20.3",
44
- "@rushstack/terminal": "0.22.3",
45
44
  "@rushstack/lookup-by-path": "0.9.7",
46
- "@rushstack/package-deps-hash": "4.7.7"
45
+ "@rushstack/package-deps-hash": "4.7.7",
46
+ "@rushstack/terminal": "0.22.3"
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.170.0",
54
- "@rushstack/heft-webpack5-plugin": "1.3.7",
53
+ "@microsoft/rush-lib": "5.170.1-pr5378.0",
54
+ "@rushstack/heft": "1.2.7",
55
55
  "@rushstack/stream-collator": "4.2.7",
56
- "@rushstack/webpack-preserve-dynamic-require-plugin": "0.12.8",
57
56
  "@rushstack/ts-command-line": "5.3.3",
58
- "@rushstack/heft": "1.2.7",
59
- "local-node-rig": "1.0.0"
57
+ "@rushstack/heft-webpack5-plugin": "1.3.7",
58
+ "local-node-rig": "1.0.0",
59
+ "@rushstack/webpack-preserve-dynamic-require-plugin": "0.12.8"
60
60
  },
61
61
  "sideEffects": false,
62
62
  "scripts": {
@@ -1,3 +0,0 @@
1
- const _m = require("../../../lib-shim/index.js")._rushSdk_loadInternalModule("logic/operations/OperationExecutionManager");
2
- module.exports = _m;
3
- exports.OperationExecutionManager = _m.OperationExecutionManager;
@@ -1,3 +0,0 @@
1
- const _m = require("../../../lib-shim/index.js")._rushSdk_loadInternalModule("logic/operations/WeightedOperationPlugin");
2
- module.exports = _m;
3
- exports.WeightedOperationPlugin = _m.WeightedOperationPlugin;
@@ -1,17 +0,0 @@
1
- export declare function getNumberOfCores(): number;
2
- /**
3
- * Since the JSON value is a string, it must be a percentage like "50%",
4
- * which we convert to a number based on the available parallelism.
5
- * For example, if the available parallelism (not the -p flag) is 8 and the weight is "50%",
6
- * then the resulting weight will be 4.
7
- *
8
- * @param weight
9
- * @returns
10
- */
11
- export declare function parseParallelismPercent(weight: string, numberOfCores?: number): number;
12
- /**
13
- * Parses a command line specification for desired parallelism.
14
- * Factored out to enable unit tests
15
- */
16
- export declare function parseParallelism(rawParallelism: string | undefined, numberOfCores?: number): number;
17
- //# sourceMappingURL=ParseParallelism.d.ts.map
@@ -1,60 +0,0 @@
1
- import { type TerminalWritable } from '@rushstack/terminal';
2
- import type { Operation } from './Operation';
3
- import { OperationStatus } from './OperationStatus';
4
- import { OperationExecutionRecord } from './OperationExecutionRecord';
5
- import type { IExecutionResult } from './IOperationExecutionResult';
6
- import type { IEnvironment } from '../../utilities/Utilities';
7
- import type { IInputsSnapshot } from '../incremental/InputsSnapshot';
8
- export interface IOperationExecutionManagerOptions {
9
- quietMode: boolean;
10
- debugMode: boolean;
11
- parallelism: number;
12
- allowOversubscription: boolean;
13
- inputsSnapshot?: IInputsSnapshot;
14
- destination?: TerminalWritable;
15
- beforeExecuteOperationAsync?: (operation: OperationExecutionRecord) => Promise<OperationStatus | undefined>;
16
- afterExecuteOperationAsync?: (operation: OperationExecutionRecord) => Promise<void>;
17
- createEnvironmentForOperation?: (operation: OperationExecutionRecord) => IEnvironment;
18
- onOperationStatusChangedAsync?: (record: OperationExecutionRecord) => void;
19
- beforeExecuteOperationsAsync?: (records: Map<Operation, OperationExecutionRecord>) => Promise<void>;
20
- }
21
- /**
22
- * A class which manages the execution of a set of tasks with interdependencies.
23
- * Initially, and at the end of each task execution, all unblocked tasks
24
- * are added to a ready queue which is then executed. This is done continually until all
25
- * tasks are complete, or prematurely fails if any of the tasks fail.
26
- */
27
- export declare class OperationExecutionManager {
28
- private readonly _executionRecords;
29
- private readonly _quietMode;
30
- private readonly _parallelism;
31
- private readonly _allowOversubscription;
32
- private readonly _totalOperations;
33
- private readonly _outputWritable;
34
- private readonly _colorsNewlinesTransform;
35
- private readonly _streamCollator;
36
- private readonly _terminal;
37
- private readonly _beforeExecuteOperation?;
38
- private readonly _afterExecuteOperation?;
39
- private readonly _onOperationStatusChanged?;
40
- private readonly _beforeExecuteOperations?;
41
- private readonly _createEnvironmentForOperation?;
42
- private _hasAnyFailures;
43
- private _hasAnyNonAllowedWarnings;
44
- private _hasAnyAborted;
45
- private _completedOperations;
46
- private _executionQueue;
47
- constructor(operations: Set<Operation>, options: IOperationExecutionManagerOptions);
48
- private _streamCollator_onWriterActive;
49
- /**
50
- * Executes all operations which have been registered, returning a promise which is resolved when all the
51
- * operations are completed successfully, or rejects when any operation fails.
52
- */
53
- executeAsync(abortController: AbortController): Promise<IExecutionResult>;
54
- private _reportOperationErrorIfAny;
55
- /**
56
- * Handles the result of the operation and propagates any relevant effects.
57
- */
58
- private _onOperationComplete;
59
- }
60
- //# sourceMappingURL=OperationExecutionManager.d.ts.map
@@ -1,10 +0,0 @@
1
- import type { IPhasedCommandPlugin, PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
2
- /**
3
- * Add weights to operations based on the operation settings in rush-project.json.
4
- *
5
- * This also sets the weight of no-op operations to 0.
6
- */
7
- export declare class WeightedOperationPlugin implements IPhasedCommandPlugin {
8
- apply(hooks: PhasedCommandHooks): void;
9
- }
10
- //# sourceMappingURL=WeightedOperationPlugin.d.ts.map