@rushstack/rush-sdk 5.102.0-pr3949.7 → 5.103.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.
- package/dist/rush-lib.d.ts +10 -435
- package/lib/api/EnvironmentConfiguration.d.ts +0 -61
- package/lib/api/RushProjectConfiguration.d.ts +5 -19
- package/lib/index.d.ts +2 -5
- package/lib/logic/RushConstants.d.ts +0 -4
- package/lib/logic/buildCache/ProjectBuildCache.d.ts +7 -6
- package/lib/logic/operations/AsyncOperationQueue.d.ts +4 -23
- package/lib/logic/operations/IOperationExecutionResult.d.ts +1 -9
- package/lib/logic/operations/IOperationRunner.d.ts +6 -25
- package/lib/logic/operations/NullOperationRunner.d.ts +2 -2
- package/lib/logic/operations/OperationExecutionManager.d.ts +0 -6
- package/lib/logic/operations/OperationExecutionRecord.d.ts +1 -19
- package/lib/logic/operations/OperationMetadataManager.d.ts +1 -3
- package/lib/logic/operations/OperationStateFile.d.ts +0 -2
- package/lib/logic/operations/OperationStatus.d.ts +0 -8
- package/lib/logic/operations/ProjectLogWritable.d.ts +0 -11
- package/lib/logic/operations/ShellOperationRunner.d.ts +26 -4
- package/lib/pluginFramework/PhasedCommandHooks.d.ts +4 -31
- package/lib/pluginFramework/RushSession.d.ts +2 -11
- package/package.json +2 -2
- package/lib/api/CobuildConfiguration.d.ts +0 -71
- package/lib/api/CobuildConfiguration.js +0 -1
- package/lib/logic/cobuild/CobuildLock.d.ts +0 -43
- package/lib/logic/cobuild/CobuildLock.js +0 -1
- package/lib/logic/cobuild/DisjointSet.d.ts +0 -28
- package/lib/logic/cobuild/DisjointSet.js +0 -1
- package/lib/logic/cobuild/ICobuildLockProvider.d.ts +0 -99
- package/lib/logic/cobuild/ICobuildLockProvider.js +0 -1
- package/lib/logic/operations/CacheableOperationPlugin.d.ts +0 -51
- package/lib/logic/operations/CacheableOperationPlugin.js +0 -1
- package/lib/logic/operations/LegacySkipPlugin.d.ts +0 -22
- package/lib/logic/operations/LegacySkipPlugin.js +0 -1
- package/lib/logic/operations/PeriodicCallback.d.ts +0 -20
- package/lib/logic/operations/PeriodicCallback.js +0 -1
- package/lib/utilities/NullTerminalProvider.d.ts +0 -10
- package/lib/utilities/NullTerminalProvider.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AsyncSeriesHook, AsyncSeriesWaterfallHook, SyncHook } from 'tapable';
|
|
2
2
|
import type { CommandLineParameter } from '@rushstack/ts-command-line';
|
|
3
3
|
import type { BuildCacheConfiguration } from '../api/BuildCacheConfiguration';
|
|
4
4
|
import type { IPhase } from '../api/CommandLineConfiguration';
|
|
@@ -6,12 +6,8 @@ import type { RushConfiguration } from '../api/RushConfiguration';
|
|
|
6
6
|
import type { RushConfigurationProject } from '../api/RushConfigurationProject';
|
|
7
7
|
import type { Operation } from '../logic/operations/Operation';
|
|
8
8
|
import type { ProjectChangeAnalyzer } from '../logic/ProjectChangeAnalyzer';
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { RushProjectConfiguration } from '../api/RushProjectConfiguration';
|
|
12
|
-
import type { IOperationRunnerContext } from '../logic/operations/IOperationRunner';
|
|
13
|
-
import type { ITelemetryData } from '../logic/Telemetry';
|
|
14
|
-
import type { OperationStatus } from '../logic/operations/OperationStatus';
|
|
9
|
+
import { ITelemetryData } from '../logic/Telemetry';
|
|
10
|
+
import { IExecutionResult, IOperationExecutionResult } from '../logic/operations/IOperationExecutionResult';
|
|
15
11
|
/**
|
|
16
12
|
* A plugin that interacts with a phased commands.
|
|
17
13
|
* @alpha
|
|
@@ -31,10 +27,6 @@ export interface ICreateOperationsContext {
|
|
|
31
27
|
* The configuration for the build cache, if the feature is enabled.
|
|
32
28
|
*/
|
|
33
29
|
readonly buildCacheConfiguration: BuildCacheConfiguration | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* The configuration for the cobuild, if cobuild feature and build cache feature are both enabled.
|
|
36
|
-
*/
|
|
37
|
-
readonly cobuildConfiguration: CobuildConfiguration | undefined;
|
|
38
30
|
/**
|
|
39
31
|
* The set of custom parameters for the executing command.
|
|
40
32
|
* Maps from the `longName` field in command-line.json to the parser configuration in ts-command-line.
|
|
@@ -70,10 +62,6 @@ export interface ICreateOperationsContext {
|
|
|
70
62
|
* The set of Rush projects selected for the current command execution.
|
|
71
63
|
*/
|
|
72
64
|
readonly projectSelection: ReadonlySet<RushConfigurationProject>;
|
|
73
|
-
/**
|
|
74
|
-
* All successfully loaded rush-project.json data for selected projects.
|
|
75
|
-
*/
|
|
76
|
-
readonly projectConfigurations: ReadonlyMap<RushConfigurationProject, RushProjectConfiguration>;
|
|
77
65
|
/**
|
|
78
66
|
* The set of Rush projects that have not been built in the current process since they were last modified.
|
|
79
67
|
* When `isInitial` is true, this will be an exact match of `projectSelection`.
|
|
@@ -98,10 +86,7 @@ export declare class PhasedCommandHooks {
|
|
|
98
86
|
* Hook invoked before operation start
|
|
99
87
|
* Hook is series for stable output.
|
|
100
88
|
*/
|
|
101
|
-
readonly beforeExecuteOperations: AsyncSeriesHook<[
|
|
102
|
-
Map<Operation, IOperationExecutionResult>,
|
|
103
|
-
ICreateOperationsContext
|
|
104
|
-
]>;
|
|
89
|
+
readonly beforeExecuteOperations: AsyncSeriesHook<[Map<Operation, IOperationExecutionResult>]>;
|
|
105
90
|
/**
|
|
106
91
|
* Hook invoked when operation status changed
|
|
107
92
|
* Hook is series for stable output.
|
|
@@ -113,18 +98,6 @@ export declare class PhasedCommandHooks {
|
|
|
113
98
|
* Hook is series for stable output.
|
|
114
99
|
*/
|
|
115
100
|
readonly afterExecuteOperations: AsyncSeriesHook<[IExecutionResult, ICreateOperationsContext]>;
|
|
116
|
-
/**
|
|
117
|
-
* Hook invoked before executing a operation.
|
|
118
|
-
*/
|
|
119
|
-
readonly beforeExecuteOperation: AsyncSeriesBailHook<[
|
|
120
|
-
IOperationRunnerContext & IOperationExecutionResult
|
|
121
|
-
], OperationStatus | undefined>;
|
|
122
|
-
/**
|
|
123
|
-
* Hook invoked after executing a operation.
|
|
124
|
-
*/
|
|
125
|
-
readonly afterExecuteOperation: AsyncSeriesHook<[
|
|
126
|
-
IOperationRunnerContext & IOperationExecutionResult
|
|
127
|
-
]>;
|
|
128
101
|
/**
|
|
129
102
|
* Hook invoked after a run has finished and the command is watching for changes.
|
|
130
103
|
* May be used to display additional relevant data to the user.
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { ITerminalProvider } from '@rushstack/node-core-library';
|
|
2
|
+
import { IBuildCacheJson } from '../api/BuildCacheConfiguration';
|
|
3
|
+
import { ICloudBuildCacheProvider } from '../logic/buildCache/ICloudBuildCacheProvider';
|
|
2
4
|
import { ILogger } from './logging/Logger';
|
|
3
5
|
import { RushLifecycleHooks } from './RushLifeCycle';
|
|
4
|
-
import type { IBuildCacheJson } from '../api/BuildCacheConfiguration';
|
|
5
|
-
import type { ICloudBuildCacheProvider } from '../logic/buildCache/ICloudBuildCacheProvider';
|
|
6
|
-
import type { ICobuildJson } from '../api/CobuildConfiguration';
|
|
7
|
-
import type { ICobuildLockProvider } from '../logic/cobuild/ICobuildLockProvider';
|
|
8
6
|
/**
|
|
9
7
|
* @beta
|
|
10
8
|
*/
|
|
@@ -16,24 +14,17 @@ export interface IRushSessionOptions {
|
|
|
16
14
|
* @beta
|
|
17
15
|
*/
|
|
18
16
|
export type CloudBuildCacheProviderFactory = (buildCacheJson: IBuildCacheJson) => ICloudBuildCacheProvider | Promise<ICloudBuildCacheProvider>;
|
|
19
|
-
/**
|
|
20
|
-
* @beta
|
|
21
|
-
*/
|
|
22
|
-
export type CobuildLockProviderFactory = (cobuildJson: ICobuildJson) => ICobuildLockProvider | Promise<ICobuildLockProvider>;
|
|
23
17
|
/**
|
|
24
18
|
* @beta
|
|
25
19
|
*/
|
|
26
20
|
export declare class RushSession {
|
|
27
21
|
private readonly _options;
|
|
28
22
|
private readonly _cloudBuildCacheProviderFactories;
|
|
29
|
-
private readonly _cobuildLockProviderFactories;
|
|
30
23
|
readonly hooks: RushLifecycleHooks;
|
|
31
24
|
constructor(options: IRushSessionOptions);
|
|
32
25
|
getLogger(name: string): ILogger;
|
|
33
26
|
get terminalProvider(): ITerminalProvider;
|
|
34
27
|
registerCloudBuildCacheProviderFactory(cacheProviderName: string, factory: CloudBuildCacheProviderFactory): void;
|
|
35
28
|
getCloudBuildCacheProviderFactory(cacheProviderName: string): CloudBuildCacheProviderFactory | undefined;
|
|
36
|
-
registerCobuildLockProviderFactory(cobuildLockProviderName: string, factory: CobuildLockProviderFactory): void;
|
|
37
|
-
getCobuildLockProviderFactory(cobuildLockProviderName: string): CobuildLockProviderFactory | undefined;
|
|
38
29
|
}
|
|
39
30
|
//# sourceMappingURL=RushSession.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/rush-sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.103.0",
|
|
4
4
|
"description": "An API for interacting with the Rush engine",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@types/node": "14.18.36",
|
|
32
32
|
"@types/semver": "7.5.0",
|
|
33
33
|
"@types/webpack-env": "1.18.0",
|
|
34
|
-
"@microsoft/rush-lib": "5.
|
|
34
|
+
"@microsoft/rush-lib": "5.103.0",
|
|
35
35
|
"@rushstack/eslint-config": "3.3.3",
|
|
36
36
|
"@rushstack/heft": "0.58.2",
|
|
37
37
|
"@rushstack/heft-node-rig": "2.2.22",
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { ITerminal } from '@rushstack/node-core-library';
|
|
2
|
-
import { CobuildLockProviderFactory, 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
|
-
cobuildLockProviderFactory: CobuildLockProviderFactory;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Use this class to load and save the "common/config/rush/cobuild.json" config file.
|
|
23
|
-
* This file provides configuration options for the Rush Cobuild feature.
|
|
24
|
-
* @beta
|
|
25
|
-
*/
|
|
26
|
-
export declare class CobuildConfiguration {
|
|
27
|
-
private static _jsonSchema;
|
|
28
|
-
/**
|
|
29
|
-
* Indicates whether the cobuild feature is enabled.
|
|
30
|
-
* Typically it is enabled in the cobuild.json config file.
|
|
31
|
-
*
|
|
32
|
-
* Note: The orchestrator (or local users) should always have to opt into running with cobuilds by
|
|
33
|
-
* providing a cobuild context id. Even if cobuilds are "enabled" as a feature, they don't
|
|
34
|
-
* actually turn on for that particular build unless the cobuild context id is provided as an
|
|
35
|
-
* non-empty string.
|
|
36
|
-
*/
|
|
37
|
-
readonly cobuildEnabled: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Cobuild context id
|
|
40
|
-
*
|
|
41
|
-
* @remarks
|
|
42
|
-
* The cobuild feature won't be enabled until the context id is provided as an non-empty string.
|
|
43
|
-
*/
|
|
44
|
-
readonly cobuildContextId: string | undefined;
|
|
45
|
-
/**
|
|
46
|
-
* This is a name of the participating cobuild runner. It can be specified by the environment variable
|
|
47
|
-
* RUSH_COBUILD_RUNNER_ID. If it is not provided, a random id will be generated to identify the runner.
|
|
48
|
-
*/
|
|
49
|
-
readonly cobuildRunnerId: string;
|
|
50
|
-
/**
|
|
51
|
-
* If true, Rush will automatically handle the leaf project with build cache "disabled" by writing
|
|
52
|
-
* to the cache in a special "log files only mode". This is useful when you want to use Cobuilds
|
|
53
|
-
* to improve the performance in CI validations and the leaf projects have not enabled cache.
|
|
54
|
-
*/
|
|
55
|
-
readonly cobuildLeafProjectLogOnlyAllowed: boolean;
|
|
56
|
-
private _cobuildLockProvider;
|
|
57
|
-
private readonly _cobuildLockProviderFactory;
|
|
58
|
-
private readonly _cobuildJson;
|
|
59
|
-
private constructor();
|
|
60
|
-
/**
|
|
61
|
-
* Attempts to load the cobuild.json data from the standard file path `common/config/rush/cobuild.json`.
|
|
62
|
-
* If the file has not been created yet, then undefined is returned.
|
|
63
|
-
*/
|
|
64
|
-
static tryLoadAsync(terminal: ITerminal, rushConfiguration: RushConfiguration, rushSession: RushSession): Promise<CobuildConfiguration | undefined>;
|
|
65
|
-
static getCobuildConfigFilePath(rushConfiguration: RushConfiguration): string;
|
|
66
|
-
private static _loadAsync;
|
|
67
|
-
createLockProviderAsync(terminal: ITerminal): Promise<void>;
|
|
68
|
-
destroyLockProviderAsync(): Promise<void>;
|
|
69
|
-
get cobuildLockProvider(): ICobuildLockProvider;
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=CobuildConfiguration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("api/CobuildConfiguration");
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { CobuildConfiguration } from '../../api/CobuildConfiguration';
|
|
2
|
-
import type { OperationStatus } from '../operations/OperationStatus';
|
|
3
|
-
import type { ICobuildContext } from './ICobuildLockProvider';
|
|
4
|
-
import type { ProjectBuildCache } from '../buildCache/ProjectBuildCache';
|
|
5
|
-
export interface ICobuildLockOptions {
|
|
6
|
-
/**
|
|
7
|
-
* {@inheritdoc CobuildConfiguration}
|
|
8
|
-
*/
|
|
9
|
-
cobuildConfiguration: CobuildConfiguration;
|
|
10
|
-
/**
|
|
11
|
-
* {@inheritdoc ICobuildContext.clusterId}
|
|
12
|
-
*/
|
|
13
|
-
cobuildClusterId: string;
|
|
14
|
-
/**
|
|
15
|
-
* {@inheritdoc ICobuildContext.packageName}
|
|
16
|
-
*/
|
|
17
|
-
packageName: string;
|
|
18
|
-
/**
|
|
19
|
-
* {@inheritdoc ICobuildContext.phaseName}
|
|
20
|
-
*/
|
|
21
|
-
phaseName: string;
|
|
22
|
-
projectBuildCache: ProjectBuildCache;
|
|
23
|
-
/**
|
|
24
|
-
* The expire time of the lock in seconds.
|
|
25
|
-
*/
|
|
26
|
-
lockExpireTimeInSeconds: number;
|
|
27
|
-
}
|
|
28
|
-
export interface ICobuildCompletedState {
|
|
29
|
-
status: OperationStatus.Success | OperationStatus.SuccessWithWarning | OperationStatus.Failure;
|
|
30
|
-
cacheId: string;
|
|
31
|
-
}
|
|
32
|
-
export declare class CobuildLock {
|
|
33
|
-
readonly cobuildConfiguration: CobuildConfiguration;
|
|
34
|
-
readonly projectBuildCache: ProjectBuildCache;
|
|
35
|
-
private _cobuildContext;
|
|
36
|
-
constructor(options: ICobuildLockOptions);
|
|
37
|
-
setCompletedStateAsync(state: ICobuildCompletedState): Promise<void>;
|
|
38
|
-
getCompletedStateAsync(): Promise<ICobuildCompletedState | undefined>;
|
|
39
|
-
tryAcquireLockAsync(): Promise<boolean>;
|
|
40
|
-
renewLockAsync(): Promise<void>;
|
|
41
|
-
get cobuildContext(): ICobuildContext;
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=CobuildLock.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/cobuild/CobuildLock");
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A disjoint set data structure
|
|
3
|
-
*/
|
|
4
|
-
export declare class DisjointSet<T extends object> {
|
|
5
|
-
private _forest;
|
|
6
|
-
private _parentMap;
|
|
7
|
-
private _sizeMap;
|
|
8
|
-
private _setByElement;
|
|
9
|
-
constructor();
|
|
10
|
-
destroy(): void;
|
|
11
|
-
/**
|
|
12
|
-
* Adds a new set containing specific object
|
|
13
|
-
*/
|
|
14
|
-
add(x: T): void;
|
|
15
|
-
/**
|
|
16
|
-
* Unions the sets that contain two objects
|
|
17
|
-
*/
|
|
18
|
-
union(a: T, b: T): void;
|
|
19
|
-
getAllSets(): Iterable<Set<T>>;
|
|
20
|
-
/**
|
|
21
|
-
* Returns true if x and y are in the same set
|
|
22
|
-
*/
|
|
23
|
-
isConnected(x: T, y: T): boolean;
|
|
24
|
-
private _find;
|
|
25
|
-
private _getParent;
|
|
26
|
-
private _getSize;
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=DisjointSet.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/cobuild/DisjointSet");
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import type { OperationStatus } from '../operations/OperationStatus';
|
|
2
|
-
/**
|
|
3
|
-
* @beta
|
|
4
|
-
*/
|
|
5
|
-
export interface ICobuildContext {
|
|
6
|
-
/**
|
|
7
|
-
* The key for acquiring lock.
|
|
8
|
-
*/
|
|
9
|
-
lockKey: string;
|
|
10
|
-
/**
|
|
11
|
-
* The expire time of the lock in seconds.
|
|
12
|
-
*/
|
|
13
|
-
lockExpireTimeInSeconds: number;
|
|
14
|
-
/**
|
|
15
|
-
* The key for storing completed state.
|
|
16
|
-
*/
|
|
17
|
-
completedStateKey: string;
|
|
18
|
-
/**
|
|
19
|
-
* The contextId is provided by the monorepo maintainer, it reads from environment variable {@link EnvironmentVariableNames.RUSH_COBUILD_CONTEXT_ID}.
|
|
20
|
-
* It ensure only the builds from the same given contextId cooperated.
|
|
21
|
-
*/
|
|
22
|
-
contextId: string;
|
|
23
|
-
/**
|
|
24
|
-
* The id of the cluster. The operations in the same cluster share the same clusterId and
|
|
25
|
-
* will be executed on the same machine.
|
|
26
|
-
*/
|
|
27
|
-
clusterId: string;
|
|
28
|
-
/**
|
|
29
|
-
* The id of the runner. The identifier for the running machine.
|
|
30
|
-
*
|
|
31
|
-
* It can be specified via assigning `RUSH_COBUILD_RUNNER_ID` environment variable.
|
|
32
|
-
*/
|
|
33
|
-
runnerId: string;
|
|
34
|
-
/**
|
|
35
|
-
* The id of the cache entry. It should be kept the same as the normal cacheId from ProjectBuildCache.
|
|
36
|
-
* Otherwise, there is a discrepancy in the success case wherein turning on cobuilds will
|
|
37
|
-
* fail to populate the normal build cache.
|
|
38
|
-
*/
|
|
39
|
-
cacheId: string;
|
|
40
|
-
/**
|
|
41
|
-
* The name of NPM package
|
|
42
|
-
*
|
|
43
|
-
* Example: `@scope/MyProject`
|
|
44
|
-
*/
|
|
45
|
-
packageName: string;
|
|
46
|
-
/**
|
|
47
|
-
* The name of the phase.
|
|
48
|
-
*
|
|
49
|
-
* Example: _phase:build
|
|
50
|
-
*/
|
|
51
|
-
phaseName: string;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* @beta
|
|
55
|
-
*/
|
|
56
|
-
export interface ICobuildCompletedState {
|
|
57
|
-
status: OperationStatus.Success | OperationStatus.SuccessWithWarning | OperationStatus.Failure;
|
|
58
|
-
/**
|
|
59
|
-
* Completed state points to the cache id that was used to store the build cache.
|
|
60
|
-
* Note: Cache failed builds in a separate cache id
|
|
61
|
-
*/
|
|
62
|
-
cacheId: string;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* @beta
|
|
66
|
-
*/
|
|
67
|
-
export interface ICobuildLockProvider {
|
|
68
|
-
/**
|
|
69
|
-
* The callback function invoked to connect to the lock provider.
|
|
70
|
-
* For example, initializing the connection to the redis server.
|
|
71
|
-
*/
|
|
72
|
-
connectAsync(): Promise<void>;
|
|
73
|
-
/**
|
|
74
|
-
* The callback function invoked to disconnect the lock provider.
|
|
75
|
-
*/
|
|
76
|
-
disconnectAsync(): Promise<void>;
|
|
77
|
-
/**
|
|
78
|
-
* The callback function to acquire a lock with a lock key and specific contexts.
|
|
79
|
-
*
|
|
80
|
-
* NOTE: This lock implementation must be a ReentrantLock. It says the lock might be acquired
|
|
81
|
-
* multiple times, since tasks in the same cluster can be run in the same VM.
|
|
82
|
-
*/
|
|
83
|
-
acquireLockAsync(context: Readonly<ICobuildContext>): Promise<boolean>;
|
|
84
|
-
/**
|
|
85
|
-
* The callback function to renew a lock with a lock key and specific contexts.
|
|
86
|
-
*
|
|
87
|
-
* NOTE: If the lock key expired
|
|
88
|
-
*/
|
|
89
|
-
renewLockAsync(context: Readonly<ICobuildContext>): Promise<void>;
|
|
90
|
-
/**
|
|
91
|
-
* The callback function to set completed state.
|
|
92
|
-
*/
|
|
93
|
-
setCompletedStateAsync(context: Readonly<ICobuildContext>, state: ICobuildCompletedState): Promise<void>;
|
|
94
|
-
/**
|
|
95
|
-
* The callback function to get completed state.
|
|
96
|
-
*/
|
|
97
|
-
getCompletedStateAsync(context: Readonly<ICobuildContext>): Promise<ICobuildCompletedState | undefined>;
|
|
98
|
-
}
|
|
99
|
-
//# sourceMappingURL=ICobuildLockProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/cobuild/ICobuildLockProvider");
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { ITerminal } from '@rushstack/node-core-library';
|
|
2
|
-
import { CobuildLock } from '../cobuild/CobuildLock';
|
|
3
|
-
import { ProjectBuildCache } from '../buildCache/ProjectBuildCache';
|
|
4
|
-
import { IOperationSettings } from '../../api/RushProjectConfiguration';
|
|
5
|
-
import { ProjectLogWritable } from './ProjectLogWritable';
|
|
6
|
-
import { CobuildConfiguration } from '../../api/CobuildConfiguration';
|
|
7
|
-
import { PeriodicCallback } from './PeriodicCallback';
|
|
8
|
-
import type { IPhasedCommandPlugin, PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
|
|
9
|
-
import type { BuildCacheConfiguration } from '../../api/BuildCacheConfiguration';
|
|
10
|
-
export interface IProjectDeps {
|
|
11
|
-
files: {
|
|
12
|
-
[filePath: string]: string;
|
|
13
|
-
};
|
|
14
|
-
arguments: string;
|
|
15
|
-
}
|
|
16
|
-
export interface IOperationBuildCacheContext {
|
|
17
|
-
isCacheWriteAllowed: boolean;
|
|
18
|
-
isCacheReadAllowed: boolean;
|
|
19
|
-
projectBuildCache: ProjectBuildCache | undefined;
|
|
20
|
-
cacheDisabledReason: string | undefined;
|
|
21
|
-
operationSettings: IOperationSettings | undefined;
|
|
22
|
-
cobuildLock: CobuildLock | undefined;
|
|
23
|
-
cobuildClusterId: string | undefined;
|
|
24
|
-
buildCacheTerminal: ITerminal | undefined;
|
|
25
|
-
buildCacheProjectLogWritable: ProjectLogWritable | undefined;
|
|
26
|
-
periodicCallback: PeriodicCallback;
|
|
27
|
-
cacheRestored: boolean;
|
|
28
|
-
isCacheReadAttempted: boolean;
|
|
29
|
-
}
|
|
30
|
-
export interface ICacheableOperationPluginOptions {
|
|
31
|
-
allowWarningsInSuccessfulBuild: boolean;
|
|
32
|
-
buildCacheConfiguration: BuildCacheConfiguration;
|
|
33
|
-
cobuildConfiguration: CobuildConfiguration | undefined;
|
|
34
|
-
terminal: ITerminal;
|
|
35
|
-
}
|
|
36
|
-
export declare class CacheableOperationPlugin implements IPhasedCommandPlugin {
|
|
37
|
-
private _buildCacheContextByOperation;
|
|
38
|
-
private _createContext;
|
|
39
|
-
private readonly _options;
|
|
40
|
-
constructor(options: ICacheableOperationPluginOptions);
|
|
41
|
-
apply(hooks: PhasedCommandHooks): void;
|
|
42
|
-
private _getBuildCacheContextByOperation;
|
|
43
|
-
private _getBuildCacheContextByOperationOrThrow;
|
|
44
|
-
private _tryGetProjectBuildCacheAsync;
|
|
45
|
-
private _tryGetLogOnlyProjectBuildCacheAsync;
|
|
46
|
-
private _tryGetCobuildLockAsync;
|
|
47
|
-
private _getBuildCacheTerminal;
|
|
48
|
-
private _createBuildCacheTerminal;
|
|
49
|
-
private _tryGetBuildCacheProjectLogWritable;
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=CacheableOperationPlugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/operations/CacheableOperationPlugin");
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type ITerminal } from '@rushstack/node-core-library';
|
|
2
|
-
import type { IPhasedCommandPlugin, PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
|
|
3
|
-
export interface IProjectDeps {
|
|
4
|
-
files: {
|
|
5
|
-
[filePath: string]: string;
|
|
6
|
-
};
|
|
7
|
-
arguments: string;
|
|
8
|
-
}
|
|
9
|
-
export interface ILegacySkipPluginOptions {
|
|
10
|
-
terminal: ITerminal;
|
|
11
|
-
changedProjectsOnly: boolean;
|
|
12
|
-
isIncrementalBuildAllowed: boolean;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Core phased command plugin that implements the legacy skip detection logic, used when build cache is disabled.
|
|
16
|
-
*/
|
|
17
|
-
export declare class LegacySkipPlugin implements IPhasedCommandPlugin {
|
|
18
|
-
private readonly _options;
|
|
19
|
-
constructor(options: ILegacySkipPluginOptions);
|
|
20
|
-
apply(hooks: PhasedCommandHooks): void;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=LegacySkipPlugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/operations/LegacySkipPlugin");
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export 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");
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ITerminalProvider } from '@rushstack/node-core-library';
|
|
2
|
-
/**
|
|
3
|
-
* A terminal provider like /dev/null
|
|
4
|
-
*/
|
|
5
|
-
export declare class NullTerminalProvider implements ITerminalProvider {
|
|
6
|
-
supportsColor: boolean;
|
|
7
|
-
eolCharacter: string;
|
|
8
|
-
write(): void;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=NullTerminalProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("utilities/NullTerminalProvider");
|