@rushstack/rush-sdk 5.97.1-pr3949.2 → 5.98.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 (44) hide show
  1. package/dist/rush-lib.d.ts +29 -265
  2. package/lib/api/CommandLineConfiguration.d.ts +9 -5
  3. package/lib/api/CommandLineJson.d.ts +4 -0
  4. package/lib/api/EnvironmentConfiguration.d.ts +0 -41
  5. package/lib/api/ExperimentsConfiguration.d.ts +4 -0
  6. package/lib/api/RushConfiguration.d.ts +1 -0
  7. package/lib/cli/RushPnpmCommandLineParser.d.ts +7 -8
  8. package/lib/cli/actions/DeployAction.d.ts +3 -1
  9. package/lib/cli/actions/PublishAction.d.ts +1 -1
  10. package/lib/index.d.ts +2 -4
  11. package/lib/logic/ChangeFiles.d.ts +3 -3
  12. package/lib/logic/ChangeManager.d.ts +2 -2
  13. package/lib/logic/PublishUtilities.d.ts +1 -1
  14. package/lib/logic/RushConstants.d.ts +4 -9
  15. package/lib/logic/base/BaseInstallManagerTypes.d.ts +4 -0
  16. package/lib/logic/buildCache/ProjectBuildCache.d.ts +4 -5
  17. package/lib/logic/deploy/DeployScenarioConfiguration.d.ts +3 -2
  18. package/lib/logic/operations/AsyncOperationQueue.d.ts +4 -23
  19. package/lib/logic/operations/IOperationRunner.d.ts +10 -29
  20. package/lib/logic/operations/OperationExecutionManager.d.ts +0 -5
  21. package/lib/logic/operations/OperationExecutionRecord.d.ts +1 -7
  22. package/lib/logic/operations/OperationStatus.d.ts +0 -8
  23. package/lib/logic/operations/ShellOperationRunner.d.ts +13 -4
  24. package/lib/logic/policy/EnvironmentPolicy.d.ts +7 -0
  25. package/lib/logic/{cobuild/CobuildLock.js → policy/EnvironmentPolicy.js} +1 -1
  26. package/lib/logic/policy/GitEmailPolicy.d.ts +4 -5
  27. package/lib/logic/policy/PolicyValidator.d.ts +3 -4
  28. package/lib/logic/policy/ShrinkwrapFilePolicy.d.ts +4 -6
  29. package/lib/pluginFramework/PhasedCommandHooks.d.ts +1 -15
  30. package/lib/pluginFramework/RushSession.d.ts +3 -12
  31. package/lib/utilities/PathConstants.d.ts +0 -1
  32. package/lib/utilities/Utilities.d.ts +0 -16
  33. package/package.json +7 -7
  34. package/lib/api/CobuildConfiguration.d.ts +0 -63
  35. package/lib/api/CobuildConfiguration.js +0 -1
  36. package/lib/logic/cobuild/CobuildLock.d.ts +0 -24
  37. package/lib/logic/cobuild/ICobuildLockProvider.d.ts +0 -46
  38. package/lib/logic/cobuild/ICobuildLockProvider.js +0 -1
  39. package/lib/logic/operations/CacheableOperationPlugin.d.ts +0 -21
  40. package/lib/logic/operations/CacheableOperationPlugin.js +0 -1
  41. package/lib/logic/operations/OperationRunnerHooks.d.ts +0 -50
  42. package/lib/logic/operations/OperationRunnerHooks.js +0 -1
  43. package/lib/logic/operations/PeriodicCallback.d.ts +0 -20
  44. package/lib/logic/operations/PeriodicCallback.js +0 -1
@@ -1,63 +0,0 @@
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
@@ -1 +0,0 @@
1
- module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("api/CobuildConfiguration");
@@ -1,24 +0,0 @@
1
- import type { CobuildConfiguration } from '../../api/CobuildConfiguration';
2
- import type { ProjectBuildCache } from '../buildCache/ProjectBuildCache';
3
- import type { OperationStatus } from '../operations/OperationStatus';
4
- import type { ICobuildContext } from './ICobuildLockProvider';
5
- export interface ICobuildLockOptions {
6
- cobuildConfiguration: CobuildConfiguration;
7
- projectBuildCache: ProjectBuildCache;
8
- }
9
- export interface ICobuildCompletedState {
10
- status: OperationStatus.Success | OperationStatus.SuccessWithWarning | OperationStatus.Failure;
11
- cacheId: string;
12
- }
13
- export declare class CobuildLock {
14
- readonly projectBuildCache: ProjectBuildCache;
15
- readonly cobuildConfiguration: CobuildConfiguration;
16
- private _cobuildContext;
17
- constructor(options: ICobuildLockOptions);
18
- setCompletedStateAsync(state: ICobuildCompletedState): Promise<void>;
19
- getCompletedStateAsync(): Promise<ICobuildCompletedState | undefined>;
20
- tryAcquireLockAsync(): Promise<boolean>;
21
- renewLockAsync(): Promise<void>;
22
- get cobuildContext(): ICobuildContext;
23
- }
24
- //# sourceMappingURL=CobuildLock.d.ts.map
@@ -1,46 +0,0 @@
1
- import type { OperationStatus } from '../operations/OperationStatus';
2
- /**
3
- * @beta
4
- */
5
- export interface ICobuildContext {
6
- /**
7
- * The contextId is provided by the monorepo maintainer, it reads from environment variable {@link EnvironmentVariableNames.RUSH_COBUILD_CONTEXT_ID}.
8
- * It ensure only the builds from the same given contextId cooperated. If user was more permissive,
9
- * and wanted all PR and CI builds building anything with the same contextId to cooperate, then just
10
- * set it to a static value.
11
- */
12
- contextId: string;
13
- /**
14
- * The id of cache. It should be keep same as the normal cacheId from ProjectBuildCache.
15
- * Otherwise, there is a discrepancy in the success case then turning on cobuilds will
16
- * fail to populate the normal build cache.
17
- */
18
- cacheId: string;
19
- /**
20
- * {@inheritdoc RushConstants.cobuildLockVersion}
21
- */
22
- version: number;
23
- }
24
- /**
25
- * @beta
26
- */
27
- export interface ICobuildCompletedState {
28
- status: OperationStatus.Success | OperationStatus.SuccessWithWarning | OperationStatus.Failure;
29
- /**
30
- * Completed state points to the cache id that was used to store the build cache.
31
- * Note: Cache failed builds in a separate cache id
32
- */
33
- cacheId: string;
34
- }
35
- /**
36
- * @beta
37
- */
38
- export interface ICobuildLockProvider {
39
- connectAsync(): Promise<void>;
40
- disconnectAsync(): Promise<void>;
41
- acquireLockAsync(context: ICobuildContext): Promise<boolean>;
42
- renewLockAsync(context: ICobuildContext): Promise<void>;
43
- setCompletedStateAsync(context: ICobuildContext, state: ICobuildCompletedState): Promise<void>;
44
- getCompletedStateAsync(context: ICobuildContext): Promise<ICobuildCompletedState | undefined>;
45
- }
46
- //# sourceMappingURL=ICobuildLockProvider.d.ts.map
@@ -1 +0,0 @@
1
- module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/cobuild/ICobuildLockProvider");
@@ -1,21 +0,0 @@
1
- import { CobuildLock } from '../cobuild/CobuildLock';
2
- import { ProjectBuildCache } from '../buildCache/ProjectBuildCache';
3
- import type { IPhasedCommandPlugin, PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
4
- export interface IOperationBuildCacheContext {
5
- isCacheWriteAllowed: boolean;
6
- isCacheReadAllowed: boolean;
7
- isSkipAllowed: boolean;
8
- projectBuildCache: ProjectBuildCache | undefined;
9
- cobuildLock: CobuildLock | undefined;
10
- }
11
- export declare class CacheableOperationPlugin implements IPhasedCommandPlugin {
12
- private _buildCacheContextByOperationRunner;
13
- apply(hooks: PhasedCommandHooks): void;
14
- private _applyShellOperationRunner;
15
- private _getBuildCacheContextByRunner;
16
- private _getBuildCacheContextByRunnerOrThrow;
17
- private _tryGetProjectBuildCacheAsync;
18
- private _tryGetLogOnlyProjectBuildCacheAsync;
19
- private _tryGetCobuildLockAsync;
20
- }
21
- //# sourceMappingURL=CacheableOperationPlugin.d.ts.map
@@ -1 +0,0 @@
1
- module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/operations/CacheableOperationPlugin");
@@ -1,50 +0,0 @@
1
- import { AsyncSeriesWaterfallHook } from 'tapable';
2
- import type { ITerminal } from '@rushstack/node-core-library';
3
- import type { IOperationRunnerContext } from './IOperationRunner';
4
- import type { OperationStatus } from './OperationStatus';
5
- import type { IProjectDeps, ShellOperationRunner } from './ShellOperationRunner';
6
- import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
7
- import type { IPhase } from '../../api/CommandLineConfiguration';
8
- /**
9
- * A plugin tht interacts with a operation runner
10
- */
11
- export interface IOperationRunnerPlugin {
12
- /**
13
- * Applies this plugin.
14
- */
15
- apply(hooks: OperationRunnerHooks): void;
16
- }
17
- export interface IOperationRunnerBeforeExecuteContext {
18
- context: IOperationRunnerContext;
19
- runner: ShellOperationRunner;
20
- earlyReturnStatus: OperationStatus | undefined;
21
- terminal: ITerminal;
22
- projectDeps: IProjectDeps | undefined;
23
- lastProjectDeps: IProjectDeps | undefined;
24
- trackedProjectFiles: string[] | undefined;
25
- logPath: string;
26
- errorLogPath: string;
27
- rushProject: RushConfigurationProject;
28
- phase: IPhase;
29
- commandName: string;
30
- commandToRun: string;
31
- }
32
- export interface IOperationRunnerAfterExecuteContext {
33
- context: IOperationRunnerContext;
34
- terminal: ITerminal;
35
- /**
36
- * Exit code of the operation command
37
- */
38
- exitCode: number;
39
- status: OperationStatus;
40
- taskIsSuccessful: boolean;
41
- }
42
- /**
43
- * Hooks into the lifecycle of the operation runner
44
- *
45
- */
46
- export declare class OperationRunnerHooks {
47
- beforeExecute: AsyncSeriesWaterfallHook<IOperationRunnerBeforeExecuteContext>;
48
- afterExecute: AsyncSeriesWaterfallHook<IOperationRunnerAfterExecuteContext>;
49
- }
50
- //# sourceMappingURL=OperationRunnerHooks.d.ts.map
@@ -1 +0,0 @@
1
- module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/operations/OperationRunnerHooks");
@@ -1,20 +0,0 @@
1
- export declare type ICallbackFn = () => Promise<void> | void;
2
- export interface IPeriodicCallbackOptions {
3
- interval: number;
4
- }
5
- /**
6
- * A help class to run callbacks in a loop with a specified interval.
7
- *
8
- * @beta
9
- */
10
- export declare class PeriodicCallback {
11
- private _callbacks;
12
- private _interval;
13
- private _intervalId;
14
- private _isRunning;
15
- constructor(options: IPeriodicCallbackOptions);
16
- addCallback(callback: ICallbackFn): void;
17
- start(): void;
18
- stop(): void;
19
- }
20
- //# sourceMappingURL=PeriodicCallback.d.ts.map
@@ -1 +0,0 @@
1
- module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/operations/PeriodicCallback");