@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.
- package/dist/rush-lib.d.ts +29 -265
- package/lib/api/CommandLineConfiguration.d.ts +9 -5
- package/lib/api/CommandLineJson.d.ts +4 -0
- package/lib/api/EnvironmentConfiguration.d.ts +0 -41
- package/lib/api/ExperimentsConfiguration.d.ts +4 -0
- package/lib/api/RushConfiguration.d.ts +1 -0
- package/lib/cli/RushPnpmCommandLineParser.d.ts +7 -8
- package/lib/cli/actions/DeployAction.d.ts +3 -1
- package/lib/cli/actions/PublishAction.d.ts +1 -1
- package/lib/index.d.ts +2 -4
- package/lib/logic/ChangeFiles.d.ts +3 -3
- package/lib/logic/ChangeManager.d.ts +2 -2
- package/lib/logic/PublishUtilities.d.ts +1 -1
- package/lib/logic/RushConstants.d.ts +4 -9
- package/lib/logic/base/BaseInstallManagerTypes.d.ts +4 -0
- package/lib/logic/buildCache/ProjectBuildCache.d.ts +4 -5
- package/lib/logic/deploy/DeployScenarioConfiguration.d.ts +3 -2
- package/lib/logic/operations/AsyncOperationQueue.d.ts +4 -23
- package/lib/logic/operations/IOperationRunner.d.ts +10 -29
- package/lib/logic/operations/OperationExecutionManager.d.ts +0 -5
- package/lib/logic/operations/OperationExecutionRecord.d.ts +1 -7
- package/lib/logic/operations/OperationStatus.d.ts +0 -8
- package/lib/logic/operations/ShellOperationRunner.d.ts +13 -4
- package/lib/logic/policy/EnvironmentPolicy.d.ts +7 -0
- package/lib/logic/{cobuild/CobuildLock.js → policy/EnvironmentPolicy.js} +1 -1
- package/lib/logic/policy/GitEmailPolicy.d.ts +4 -5
- package/lib/logic/policy/PolicyValidator.d.ts +3 -4
- package/lib/logic/policy/ShrinkwrapFilePolicy.d.ts +4 -6
- package/lib/pluginFramework/PhasedCommandHooks.d.ts +1 -15
- package/lib/pluginFramework/RushSession.d.ts +3 -12
- package/lib/utilities/PathConstants.d.ts +0 -1
- package/lib/utilities/Utilities.d.ts +0 -16
- package/package.json +7 -7
- package/lib/api/CobuildConfiguration.d.ts +0 -63
- package/lib/api/CobuildConfiguration.js +0 -1
- package/lib/logic/cobuild/CobuildLock.d.ts +0 -24
- package/lib/logic/cobuild/ICobuildLockProvider.d.ts +0 -46
- package/lib/logic/cobuild/ICobuildLockProvider.js +0 -1
- package/lib/logic/operations/CacheableOperationPlugin.d.ts +0 -21
- package/lib/logic/operations/CacheableOperationPlugin.js +0 -1
- package/lib/logic/operations/OperationRunnerHooks.d.ts +0 -50
- package/lib/logic/operations/OperationRunnerHooks.js +0 -1
- package/lib/logic/operations/PeriodicCallback.d.ts +0 -20
- package/lib/logic/operations/PeriodicCallback.js +0 -1
|
@@ -23,7 +23,7 @@ export declare class ChangeManager {
|
|
|
23
23
|
* @param prereleaseToken - prerelease token
|
|
24
24
|
* @param includeCommitDetails - whether commit details need to be included in changes
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
loadAsync(changesPath: string, prereleaseToken?: PrereleaseToken, includeCommitDetails?: boolean): Promise<void>;
|
|
27
27
|
hasChanges(): boolean;
|
|
28
28
|
get packageChanges(): IChangeInfo[];
|
|
29
29
|
get allPackages(): Map<string, RushConfigurationProject>;
|
|
@@ -34,6 +34,6 @@ export declare class ChangeManager {
|
|
|
34
34
|
* If the value is false, package.json and change logs will not be updated. It will only do a dry-run.
|
|
35
35
|
*/
|
|
36
36
|
apply(shouldCommit: boolean): Map<string, IPackageJson> | undefined;
|
|
37
|
-
|
|
37
|
+
updateChangelogAsync(shouldCommit: boolean): Promise<void>;
|
|
38
38
|
}
|
|
39
39
|
//# sourceMappingURL=ChangeManager.d.ts.map
|
|
@@ -15,7 +15,7 @@ export declare class PublishUtilities {
|
|
|
15
15
|
* @param changesPath Path to the changes folder.
|
|
16
16
|
* @returns Dictionary of all change requests, keyed by package name.
|
|
17
17
|
*/
|
|
18
|
-
static
|
|
18
|
+
static findChangeRequestsAsync(allPackages: Map<string, RushConfigurationProject>, rushConfiguration: RushConfiguration, changeFiles: ChangeFiles, includeCommitDetails?: boolean, prereleaseToken?: PrereleaseToken, projectsToExclude?: Set<string>): Promise<IChangeRequests>;
|
|
19
19
|
/**
|
|
20
20
|
* Given the changes hash, flattens them into a sorted array based on their dependency order.
|
|
21
21
|
* @params packageChanges - hash of change requests.
|
|
@@ -148,15 +148,6 @@ export declare class RushConstants {
|
|
|
148
148
|
* Changing this ensures that cache entries generated by an old version will no longer register as a cache hit.
|
|
149
149
|
*/
|
|
150
150
|
static readonly buildCacheVersion: number;
|
|
151
|
-
/**
|
|
152
|
-
* Cobuild configuration file.
|
|
153
|
-
*/
|
|
154
|
-
static readonly cobuildFilename: string;
|
|
155
|
-
/**
|
|
156
|
-
* Cobuild version number, incremented when the logic to create cobuild lock changes.
|
|
157
|
-
* Changing this ensures that lock generated by an old version will no longer access as a cobuild lock.
|
|
158
|
-
*/
|
|
159
|
-
static readonly cobuildLockVersion: number;
|
|
160
151
|
/**
|
|
161
152
|
* Per-project configuration filename.
|
|
162
153
|
*/
|
|
@@ -224,5 +215,9 @@ export declare class RushConstants {
|
|
|
224
215
|
* file system event occurs in this interval, the timeout will reset.
|
|
225
216
|
*/
|
|
226
217
|
static readonly defaultWatchDebounceMs: number;
|
|
218
|
+
/**
|
|
219
|
+
* The name of the parameter that can be used to bypass policies.
|
|
220
|
+
*/
|
|
221
|
+
static readonly bypassPolicyFlagLongName: '--bypass-policy';
|
|
227
222
|
}
|
|
228
223
|
//# sourceMappingURL=RushConstants.d.ts.map
|
|
@@ -12,6 +12,10 @@ export interface IInstallManagerOptions {
|
|
|
12
12
|
* Whether to check the validation before install only, without actually installing anything.
|
|
13
13
|
*/
|
|
14
14
|
checkOnly: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether a "--bypass-policy" flag can be specified.
|
|
17
|
+
*/
|
|
18
|
+
bypassPolicyAllowed?: boolean;
|
|
15
19
|
/**
|
|
16
20
|
* Whether to skip policy checks.
|
|
17
21
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ITerminal } from '@rushstack/node-core-library';
|
|
2
|
-
import { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
3
2
|
import { ProjectChangeAnalyzer } from '../ProjectChangeAnalyzer';
|
|
3
|
+
import { RushProjectConfiguration } from '../../api/RushProjectConfiguration';
|
|
4
4
|
import { BuildCacheConfiguration } from '../../api/BuildCacheConfiguration';
|
|
5
5
|
export interface IProjectBuildCacheOptions {
|
|
6
6
|
buildCacheConfiguration: BuildCacheConfiguration;
|
|
7
|
-
|
|
7
|
+
projectConfiguration: RushProjectConfiguration;
|
|
8
8
|
projectOutputFolderNames: ReadonlyArray<string>;
|
|
9
9
|
additionalProjectOutputFilePaths?: ReadonlyArray<string>;
|
|
10
10
|
additionalContext?: Record<string, string>;
|
|
@@ -30,11 +30,10 @@ export declare class ProjectBuildCache {
|
|
|
30
30
|
private _cacheId;
|
|
31
31
|
private constructor();
|
|
32
32
|
private static _tryGetTarUtility;
|
|
33
|
-
get cacheId(): string | undefined;
|
|
34
33
|
static tryGetProjectBuildCache(options: IProjectBuildCacheOptions): Promise<ProjectBuildCache | undefined>;
|
|
35
34
|
private static _validateProject;
|
|
36
|
-
tryRestoreFromCacheAsync(terminal: ITerminal
|
|
37
|
-
trySetCacheEntryAsync(terminal: ITerminal
|
|
35
|
+
tryRestoreFromCacheAsync(terminal: ITerminal): Promise<boolean>;
|
|
36
|
+
trySetCacheEntryAsync(terminal: ITerminal): Promise<boolean>;
|
|
38
37
|
/**
|
|
39
38
|
* Walks the declared output folders of the project and collects a list of files.
|
|
40
39
|
* @returns The list of output files as project-relative paths, or `undefined` if a
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type ITerminal } from '@rushstack/node-core-library';
|
|
2
|
+
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
2
3
|
export interface IDeployScenarioProjectJson {
|
|
3
4
|
projectName: string;
|
|
4
5
|
additionalProjectsToInclude?: string[];
|
|
@@ -34,6 +35,6 @@ export declare class DeployScenarioConfiguration {
|
|
|
34
35
|
* Example: undefined --> "...common/config/rush/deploy.json"
|
|
35
36
|
*/
|
|
36
37
|
static getConfigFilePath(scenarioName: string | undefined, rushConfiguration: RushConfiguration): string;
|
|
37
|
-
static loadFromFile(scenarioFilePath: string, rushConfiguration: RushConfiguration): DeployScenarioConfiguration;
|
|
38
|
+
static loadFromFile(terminal: ITerminal, scenarioFilePath: string, rushConfiguration: RushConfiguration): DeployScenarioConfiguration;
|
|
38
39
|
}
|
|
39
40
|
//# sourceMappingURL=DeployScenarioConfiguration.d.ts.map
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import { OperationExecutionRecord } from './OperationExecutionRecord';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* at this time, the caller has a chance to make a decision:
|
|
5
|
-
* 1. Manually invoke `tryGetRemoteExecutingOperation()` to get the remote executing operation.
|
|
6
|
-
* 2. If there is no remote executing operation available, wait for some time and return in callback, which
|
|
7
|
-
* internally invoke `assignOperations()` to assign new operations.
|
|
8
|
-
* NOTE: the caller must wait for some time to avoid busy loop and burn CPU cycles.
|
|
9
|
-
*/
|
|
10
|
-
export declare const UNASSIGNED_OPERATION: 'UNASSIGNED_OPERATION';
|
|
11
|
-
export declare type IOperationIteratorResult = OperationExecutionRecord | typeof UNASSIGNED_OPERATION;
|
|
12
|
-
/**
|
|
13
|
-
* Implementation of the async iteration protocol for a collection of IOperation objects.
|
|
3
|
+
* Implmentation of the async iteration protocol for a collection of IOperation objects.
|
|
14
4
|
* The async iterator will wait for an operation to be ready for execution, or terminate if there are no more operations.
|
|
15
5
|
*
|
|
16
6
|
* @remarks
|
|
@@ -18,12 +8,9 @@ export declare type IOperationIteratorResult = OperationExecutionRecord | typeof
|
|
|
18
8
|
* it must manually invoke `assignOperations()` after performing the updates, otherwise iterators will
|
|
19
9
|
* stall until another operations completes.
|
|
20
10
|
*/
|
|
21
|
-
export declare class AsyncOperationQueue implements AsyncIterable<
|
|
11
|
+
export declare class AsyncOperationQueue implements AsyncIterable<OperationExecutionRecord>, AsyncIterator<OperationExecutionRecord> {
|
|
22
12
|
private readonly _queue;
|
|
23
13
|
private readonly _pendingIterators;
|
|
24
|
-
private readonly _totalOperations;
|
|
25
|
-
private readonly _completedOperations;
|
|
26
|
-
private _isDone;
|
|
27
14
|
/**
|
|
28
15
|
* @param operations - The set of operations to be executed
|
|
29
16
|
* @param sortFn - A function that sorts operations in reverse priority order:
|
|
@@ -36,23 +23,17 @@ export declare class AsyncOperationQueue implements AsyncIterable<IOperationIter
|
|
|
36
23
|
* For use with `for await (const operation of taskQueue)`
|
|
37
24
|
* @see {AsyncIterator}
|
|
38
25
|
*/
|
|
39
|
-
next(): Promise<IteratorResult<
|
|
40
|
-
/**
|
|
41
|
-
* Set a callback to be invoked when one operation is completed.
|
|
42
|
-
* If all operations are completed, set the queue to done, resolve all pending iterators in next cycle.
|
|
43
|
-
*/
|
|
44
|
-
complete(record: OperationExecutionRecord): void;
|
|
26
|
+
next(): Promise<IteratorResult<OperationExecutionRecord>>;
|
|
45
27
|
/**
|
|
46
28
|
* Routes ready operations with 0 dependencies to waiting iterators. Normally invoked as part of `next()`, but
|
|
47
29
|
* if the caller does not update operation dependencies prior to calling `next()`, may need to be invoked manually.
|
|
48
30
|
*/
|
|
49
31
|
assignOperations(): void;
|
|
50
|
-
tryGetRemoteExecutingOperation(): OperationExecutionRecord | undefined;
|
|
51
32
|
/**
|
|
52
33
|
* Returns this queue as an async iterator, such that multiple functions iterating this object concurrently
|
|
53
34
|
* receive distinct iteration results.
|
|
54
35
|
*/
|
|
55
|
-
[Symbol.asyncIterator](): AsyncIterator<
|
|
36
|
+
[Symbol.asyncIterator](): AsyncIterator<OperationExecutionRecord>;
|
|
56
37
|
}
|
|
57
38
|
export interface IOperationSortFunction {
|
|
58
39
|
/**
|
|
@@ -2,7 +2,7 @@ import type { StdioSummarizer } from '@rushstack/terminal';
|
|
|
2
2
|
import type { CollatedWriter } from '@rushstack/stream-collator';
|
|
3
3
|
import type { OperationStatus } from './OperationStatus';
|
|
4
4
|
import type { OperationMetadataManager } from './OperationMetadataManager';
|
|
5
|
-
import type {
|
|
5
|
+
import type { IStopwatchResult } from '../../utilities/Stopwatch';
|
|
6
6
|
/**
|
|
7
7
|
* Information passed to the executing `IOperationRunner`
|
|
8
8
|
*
|
|
@@ -34,34 +34,7 @@ export interface IOperationRunnerContext {
|
|
|
34
34
|
/**
|
|
35
35
|
* Object used to track elapsed time.
|
|
36
36
|
*/
|
|
37
|
-
stopwatch:
|
|
38
|
-
/**
|
|
39
|
-
* The current execution status of an operation. Operations start in the 'ready' state,
|
|
40
|
-
* but can be 'blocked' if an upstream operation failed. It is 'executing' when
|
|
41
|
-
* the operation is executing. Once execution is complete, it is either 'success' or
|
|
42
|
-
* 'failure'.
|
|
43
|
-
*/
|
|
44
|
-
status: OperationStatus;
|
|
45
|
-
/**
|
|
46
|
-
* Error which occurred while executing this operation, this is stored in case we need
|
|
47
|
-
* it later (for example to re-print errors at end of execution).
|
|
48
|
-
*/
|
|
49
|
-
error?: Error;
|
|
50
|
-
/**
|
|
51
|
-
* The set of operations that depend on this operation.
|
|
52
|
-
*/
|
|
53
|
-
readonly consumers: Set<IOperationRunnerContext>;
|
|
54
|
-
/**
|
|
55
|
-
* The operation runner that is executing this operation.
|
|
56
|
-
*/
|
|
57
|
-
readonly runner: IOperationRunner;
|
|
58
|
-
/**
|
|
59
|
-
* Normally the incremental build logic will rebuild changed projects as well as
|
|
60
|
-
* any projects that directly or indirectly depend on a changed project.
|
|
61
|
-
* If true, then the incremental build logic will only rebuild changed projects and
|
|
62
|
-
* ignore dependent projects.
|
|
63
|
-
*/
|
|
64
|
-
readonly changedProjectsOnly: boolean;
|
|
37
|
+
stopwatch: IStopwatchResult;
|
|
65
38
|
}
|
|
66
39
|
/**
|
|
67
40
|
* The `Operation` class is a node in the dependency graph of work that needs to be scheduled by the
|
|
@@ -75,6 +48,10 @@ export interface IOperationRunner {
|
|
|
75
48
|
* Name of the operation, for logging.
|
|
76
49
|
*/
|
|
77
50
|
readonly name: string;
|
|
51
|
+
/**
|
|
52
|
+
* This flag determines if the operation is allowed to be skipped if up to date.
|
|
53
|
+
*/
|
|
54
|
+
isSkipAllowed: boolean;
|
|
78
55
|
/**
|
|
79
56
|
* Indicates that this runner's duration has meaning.
|
|
80
57
|
*/
|
|
@@ -88,6 +65,10 @@ export interface IOperationRunner {
|
|
|
88
65
|
* exit code
|
|
89
66
|
*/
|
|
90
67
|
warningsAreAllowed: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Indicates if the output of this operation may be written to the cache
|
|
70
|
+
*/
|
|
71
|
+
isCacheWriteAllowed: boolean;
|
|
91
72
|
/**
|
|
92
73
|
* Method to be executed for the operation.
|
|
93
74
|
*/
|
|
@@ -8,8 +8,6 @@ export interface IOperationExecutionManagerOptions {
|
|
|
8
8
|
parallelism: number;
|
|
9
9
|
changedProjectsOnly: boolean;
|
|
10
10
|
destination?: TerminalWritable;
|
|
11
|
-
beforeExecuteOperation?: (operation: OperationExecutionRecord) => Promise<void>;
|
|
12
|
-
afterExecuteOperation?: (operation: OperationExecutionRecord) => Promise<void>;
|
|
13
11
|
onOperationStatusChanged?: (record: OperationExecutionRecord) => void;
|
|
14
12
|
beforeExecuteOperations?: (records: Map<Operation, OperationExecutionRecord>) => Promise<void>;
|
|
15
13
|
}
|
|
@@ -29,14 +27,11 @@ export declare class OperationExecutionManager {
|
|
|
29
27
|
private readonly _colorsNewlinesTransform;
|
|
30
28
|
private readonly _streamCollator;
|
|
31
29
|
private readonly _terminal;
|
|
32
|
-
private readonly _beforeExecuteOperation?;
|
|
33
|
-
private readonly _afterExecuteOperation?;
|
|
34
30
|
private readonly _onOperationStatusChanged?;
|
|
35
31
|
private readonly _beforeExecuteOperations?;
|
|
36
32
|
private _hasAnyFailures;
|
|
37
33
|
private _hasAnyNonAllowedWarnings;
|
|
38
34
|
private _completedOperations;
|
|
39
|
-
private _executionQueue;
|
|
40
35
|
constructor(operations: Set<Operation>, options: IOperationExecutionManagerOptions);
|
|
41
36
|
private _streamCollator_onWriterActive;
|
|
42
37
|
/**
|
|
@@ -10,12 +10,9 @@ export interface IOperationExecutionRecordContext {
|
|
|
10
10
|
onOperationStatusChanged?: (record: OperationExecutionRecord) => void;
|
|
11
11
|
debugMode: boolean;
|
|
12
12
|
quietMode: boolean;
|
|
13
|
-
changedProjectsOnly: boolean;
|
|
14
13
|
}
|
|
15
14
|
/**
|
|
16
15
|
* Internal class representing everything about executing an operation
|
|
17
|
-
*
|
|
18
|
-
* @internal
|
|
19
16
|
*/
|
|
20
17
|
export declare class OperationExecutionRecord implements IOperationRunnerContext {
|
|
21
18
|
/**
|
|
@@ -40,7 +37,6 @@ export declare class OperationExecutionRecord implements IOperationRunnerContext
|
|
|
40
37
|
* operation to execute, the operation with the highest criticalPathLength is chosen.
|
|
41
38
|
*
|
|
42
39
|
* Example:
|
|
43
|
-
* ```
|
|
44
40
|
* (0) A
|
|
45
41
|
* \
|
|
46
42
|
* (1) B C (0) (applications)
|
|
@@ -57,7 +53,6 @@ export declare class OperationExecutionRecord implements IOperationRunnerContext
|
|
|
57
53
|
* X has a score of 1, since the only package which depends on it is A
|
|
58
54
|
* Z has a score of 2, since only X depends on it, and X has a score of 1
|
|
59
55
|
* Y has a score of 2, since the chain Y->X->C is longer than Y->C
|
|
60
|
-
* ```
|
|
61
56
|
*
|
|
62
57
|
* The algorithm is implemented in AsyncOperationQueue.ts as calculateCriticalPathLength()
|
|
63
58
|
*/
|
|
@@ -81,9 +76,8 @@ export declare class OperationExecutionRecord implements IOperationRunnerContext
|
|
|
81
76
|
get name(): string;
|
|
82
77
|
get debugMode(): boolean;
|
|
83
78
|
get quietMode(): boolean;
|
|
84
|
-
get changedProjectsOnly(): boolean;
|
|
85
79
|
get collatedWriter(): CollatedWriter;
|
|
86
80
|
get nonCachedDurationMs(): number | undefined;
|
|
87
|
-
executeAsync(onResult: (record: OperationExecutionRecord) =>
|
|
81
|
+
executeAsync(onResult: (record: OperationExecutionRecord) => void): Promise<void>;
|
|
88
82
|
}
|
|
89
83
|
//# sourceMappingURL=OperationExecutionRecord.d.ts.map
|
|
@@ -7,18 +7,10 @@ export declare enum OperationStatus {
|
|
|
7
7
|
* The Operation is on the queue, ready to execute (but may be waiting for dependencies)
|
|
8
8
|
*/
|
|
9
9
|
Ready = "READY",
|
|
10
|
-
/**
|
|
11
|
-
* The Operation is Queued
|
|
12
|
-
*/
|
|
13
|
-
Queued = "QUEUED",
|
|
14
10
|
/**
|
|
15
11
|
* The Operation is currently executing
|
|
16
12
|
*/
|
|
17
13
|
Executing = "EXECUTING",
|
|
18
|
-
/**
|
|
19
|
-
* The Operation is currently executing by a remote process
|
|
20
|
-
*/
|
|
21
|
-
RemoteExecuting = "REMOTE EXECUTING",
|
|
22
14
|
/**
|
|
23
15
|
* The Operation completed successfully and did not write to standard output
|
|
24
16
|
*/
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { OperationStatus } from './OperationStatus';
|
|
2
2
|
import { IOperationRunner, IOperationRunnerContext } from './IOperationRunner';
|
|
3
|
-
import { PeriodicCallback } from './PeriodicCallback';
|
|
4
|
-
import { OperationRunnerHooks } from './OperationRunnerHooks';
|
|
5
3
|
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
6
4
|
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
7
5
|
import type { ProjectChangeAnalyzer } from '../ProjectChangeAnalyzer';
|
|
6
|
+
import type { BuildCacheConfiguration } from '../../api/BuildCacheConfiguration';
|
|
8
7
|
import type { IPhase } from '../../api/CommandLineConfiguration';
|
|
9
8
|
export interface IProjectDeps {
|
|
10
9
|
files: {
|
|
@@ -15,7 +14,9 @@ export interface IProjectDeps {
|
|
|
15
14
|
export interface IOperationRunnerOptions {
|
|
16
15
|
rushProject: RushConfigurationProject;
|
|
17
16
|
rushConfiguration: RushConfiguration;
|
|
17
|
+
buildCacheConfiguration: BuildCacheConfiguration | undefined;
|
|
18
18
|
commandToRun: string;
|
|
19
|
+
isIncrementalBuildAllowed: boolean;
|
|
19
20
|
projectChangeAnalyzer: ProjectChangeAnalyzer;
|
|
20
21
|
displayName: string;
|
|
21
22
|
phase: IPhase;
|
|
@@ -31,23 +32,31 @@ export interface IOperationRunnerOptions {
|
|
|
31
32
|
*/
|
|
32
33
|
export declare class ShellOperationRunner implements IOperationRunner {
|
|
33
34
|
readonly name: string;
|
|
35
|
+
isCacheWriteAllowed: boolean;
|
|
36
|
+
isSkipAllowed: boolean;
|
|
34
37
|
readonly reportTiming: boolean;
|
|
35
38
|
readonly silent: boolean;
|
|
36
39
|
readonly warningsAreAllowed: boolean;
|
|
37
|
-
readonly hooks: OperationRunnerHooks;
|
|
38
|
-
readonly periodicCallback: PeriodicCallback;
|
|
39
40
|
private readonly _rushProject;
|
|
40
41
|
private readonly _phase;
|
|
41
42
|
private readonly _rushConfiguration;
|
|
43
|
+
private readonly _buildCacheConfiguration;
|
|
42
44
|
private readonly _commandName;
|
|
43
45
|
private readonly _commandToRun;
|
|
46
|
+
private readonly _isCacheReadAllowed;
|
|
44
47
|
private readonly _projectChangeAnalyzer;
|
|
45
48
|
private readonly _packageDepsFilename;
|
|
46
49
|
private readonly _logFilenameIdentifier;
|
|
47
50
|
private readonly _selectedPhases;
|
|
51
|
+
/**
|
|
52
|
+
* UNINITIALIZED === we haven't tried to initialize yet
|
|
53
|
+
* undefined === we didn't create one because the feature is not enabled
|
|
54
|
+
*/
|
|
55
|
+
private _projectBuildCache;
|
|
48
56
|
constructor(options: IOperationRunnerOptions);
|
|
49
57
|
executeAsync(context: IOperationRunnerContext): Promise<OperationStatus>;
|
|
50
58
|
private _executeAsync;
|
|
59
|
+
private _tryGetProjectBuildCacheAsync;
|
|
51
60
|
}
|
|
52
61
|
/**
|
|
53
62
|
* When running a command from the "scripts" block in package.json, if the command
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
2
|
+
import type { IPolicyValidatorOptions } from './PolicyValidator';
|
|
3
|
+
/**
|
|
4
|
+
* Ensures the environment where the Rush repo exists is valid
|
|
5
|
+
*/
|
|
6
|
+
export declare function validateAsync(rushConfiguration: RushConfiguration, options: IPolicyValidatorOptions): Promise<void>;
|
|
7
|
+
//# sourceMappingURL=EnvironmentPolicy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/policy/EnvironmentPolicy");
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { RushConfiguration } from '../../api/RushConfiguration';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
2
|
+
import type { IPolicyValidatorOptions } from './PolicyValidator';
|
|
3
|
+
export declare function validate(rushConfiguration: RushConfiguration, options: IPolicyValidatorOptions): void;
|
|
4
|
+
export declare function getEmailExampleLines(rushConfiguration: RushConfiguration): string[];
|
|
6
5
|
//# sourceMappingURL=GitEmailPolicy.d.ts.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { RushConfiguration } from '../../api/RushConfiguration';
|
|
1
|
+
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
2
2
|
export interface IPolicyValidatorOptions {
|
|
3
|
+
bypassPolicyAllowed?: boolean;
|
|
3
4
|
bypassPolicy?: boolean;
|
|
4
5
|
allowShrinkwrapUpdates?: boolean;
|
|
5
6
|
shrinkwrapVariant?: string;
|
|
6
7
|
}
|
|
7
|
-
export declare
|
|
8
|
-
static validatePolicy(rushConfiguration: RushConfiguration, options: IPolicyValidatorOptions): void;
|
|
9
|
-
}
|
|
8
|
+
export declare function validatePolicyAsync(rushConfiguration: RushConfiguration, options: IPolicyValidatorOptions): Promise<void>;
|
|
10
9
|
//# sourceMappingURL=PolicyValidator.d.ts.map
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { RushConfiguration } from '../../api/RushConfiguration';
|
|
2
|
-
import { IPolicyValidatorOptions } from './PolicyValidator';
|
|
3
|
-
import { RepoStateFile } from '../RepoStateFile';
|
|
1
|
+
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
2
|
+
import type { IPolicyValidatorOptions } from './PolicyValidator';
|
|
3
|
+
import type { RepoStateFile } from '../RepoStateFile';
|
|
4
4
|
export interface IShrinkwrapFilePolicyValidatorOptions extends IPolicyValidatorOptions {
|
|
5
5
|
repoState: RepoStateFile;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* A policy that validates shrinkwrap files used by package managers.
|
|
9
9
|
*/
|
|
10
|
-
export declare
|
|
11
|
-
static validate(rushConfiguration: RushConfiguration, options: IPolicyValidatorOptions): void;
|
|
12
|
-
}
|
|
10
|
+
export declare function validate(rushConfiguration: RushConfiguration, options: IPolicyValidatorOptions): void;
|
|
13
11
|
//# sourceMappingURL=ShrinkwrapFilePolicy.d.ts.map
|
|
@@ -6,9 +6,7 @@ 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 type { CobuildConfiguration } from '../api/CobuildConfiguration';
|
|
11
|
-
import type { IOperationRunnerContext } from '../logic/operations/IOperationRunner';
|
|
9
|
+
import { IExecutionResult, IOperationExecutionResult } from '../logic/operations/IOperationExecutionResult';
|
|
12
10
|
/**
|
|
13
11
|
* A plugin that interacts with a phased commands.
|
|
14
12
|
* @alpha
|
|
@@ -28,10 +26,6 @@ export interface ICreateOperationsContext {
|
|
|
28
26
|
* The configuration for the build cache, if the feature is enabled.
|
|
29
27
|
*/
|
|
30
28
|
readonly buildCacheConfiguration: BuildCacheConfiguration | undefined;
|
|
31
|
-
/**
|
|
32
|
-
* The configuration for the cobuild, if cobuild feature and build cache feature are both enabled.
|
|
33
|
-
*/
|
|
34
|
-
readonly cobuildConfiguration: CobuildConfiguration | undefined;
|
|
35
29
|
/**
|
|
36
30
|
* The set of custom parameters for the executing command.
|
|
37
31
|
* Maps from the `longName` field in command-line.json to the parser configuration in ts-command-line.
|
|
@@ -103,14 +97,6 @@ export declare class PhasedCommandHooks {
|
|
|
103
97
|
* Hook is series for stable output.
|
|
104
98
|
*/
|
|
105
99
|
readonly afterExecuteOperations: AsyncSeriesHook<[IExecutionResult, ICreateOperationsContext]>;
|
|
106
|
-
/**
|
|
107
|
-
* Hook invoked before executing a operation.
|
|
108
|
-
*/
|
|
109
|
-
readonly beforeExecuteOperation: AsyncSeriesHook<[IOperationRunnerContext]>;
|
|
110
|
-
/**
|
|
111
|
-
* Hook invoked after executing a operation.
|
|
112
|
-
*/
|
|
113
|
-
readonly afterExecuteOperation: AsyncSeriesHook<[IOperationRunnerContext]>;
|
|
114
100
|
/**
|
|
115
101
|
* Hook invoked after a run has finished and the command is watching for changes.
|
|
116
102
|
* 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
|
*/
|
|
@@ -15,25 +13,18 @@ export interface IRushSessionOptions {
|
|
|
15
13
|
/**
|
|
16
14
|
* @beta
|
|
17
15
|
*/
|
|
18
|
-
export declare type CloudBuildCacheProviderFactory = (buildCacheJson: IBuildCacheJson) => ICloudBuildCacheProvider
|
|
19
|
-
/**
|
|
20
|
-
* @beta
|
|
21
|
-
*/
|
|
22
|
-
export declare type CobuildLockProviderFactory = (cobuildJson: ICobuildJson) => ICobuildLockProvider;
|
|
16
|
+
export declare type CloudBuildCacheProviderFactory = (buildCacheJson: IBuildCacheJson) => ICloudBuildCacheProvider | Promise<ICloudBuildCacheProvider>;
|
|
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
|
|
@@ -15,7 +15,6 @@ export declare const installRunScriptFilename: string;
|
|
|
15
15
|
export declare const installRunRushScriptFilename: string;
|
|
16
16
|
export declare const installRunRushxScriptFilename: string;
|
|
17
17
|
export declare const installRunRushPnpmScriptFilename: string;
|
|
18
|
-
export declare const createLinksScriptFilename: string;
|
|
19
18
|
/**
|
|
20
19
|
* The path to the scripts folder in rush-lib/dist.
|
|
21
20
|
*/
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
/// <reference types="node" />
|
|
4
2
|
import * as child_process from 'child_process';
|
|
5
|
-
import type * as stream from 'stream';
|
|
6
3
|
import { RushConfiguration } from '../api/RushConfiguration';
|
|
7
4
|
import { syncNpmrc } from './npmrcUtilities';
|
|
8
5
|
export declare type UNINITIALIZED = 'UNINITIALIZED';
|
|
@@ -84,10 +81,6 @@ export declare class Utilities {
|
|
|
84
81
|
* Node.js equivalent of performance.now().
|
|
85
82
|
*/
|
|
86
83
|
static getTimeInMs(): number;
|
|
87
|
-
/**
|
|
88
|
-
* Returns the values from a Set<T>
|
|
89
|
-
*/
|
|
90
|
-
static getSetAsArray<T>(set: Set<T> | ReadonlySet<T>): T[];
|
|
91
84
|
/**
|
|
92
85
|
* Retries a function until a timeout is reached. The function is expected to throw if it failed and
|
|
93
86
|
* should be retried.
|
|
@@ -99,10 +92,6 @@ export declare class Utilities {
|
|
|
99
92
|
* If the folder already exists, no error occurs.
|
|
100
93
|
*/
|
|
101
94
|
static createFolderWithRetry(folderName: string): void;
|
|
102
|
-
/**
|
|
103
|
-
* Determines if the path points to a file and that it exists.
|
|
104
|
-
*/
|
|
105
|
-
static fileExists(filePath: string): boolean;
|
|
106
95
|
/**
|
|
107
96
|
* Determines if a path points to a directory and that it exists.
|
|
108
97
|
*/
|
|
@@ -113,10 +102,6 @@ export declare class Utilities {
|
|
|
113
102
|
* hard disk.
|
|
114
103
|
*/
|
|
115
104
|
static dangerouslyDeletePath(folderPath: string): void;
|
|
116
|
-
/**
|
|
117
|
-
* Attempts to delete a file. If it does not exist, or the path is not a file, it no-ops.
|
|
118
|
-
*/
|
|
119
|
-
static deleteFile(filePath: string): void;
|
|
120
105
|
static isFileTimestampCurrent(dateToCompare: Date, inputFilenames: string[]): boolean;
|
|
121
106
|
/**
|
|
122
107
|
* Executes the command with the specified command-line parameters, and waits for it to complete.
|
|
@@ -162,7 +147,6 @@ export declare class Utilities {
|
|
|
162
147
|
static syncFile(sourcePath: string, destinationPath: string): void;
|
|
163
148
|
static getRushConfigNotFoundError(): Error;
|
|
164
149
|
static usingAsync<TDisposable extends IDisposable>(getDisposableAsync: () => Promise<TDisposable> | IDisposable, doActionAsync: (disposable: TDisposable) => Promise<void> | void): Promise<void>;
|
|
165
|
-
static readStreamToBufferAsync(stream: stream.Readable): Promise<Buffer>;
|
|
166
150
|
private static _executeLifecycleCommandInternal;
|
|
167
151
|
/**
|
|
168
152
|
* Returns a process.env environment suitable for executing lifecycle scripts.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/rush-sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.98.0",
|
|
4
4
|
"description": "An API for interacting with the Rush engine",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,19 +14,19 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@types/node-fetch": "2.6.2",
|
|
16
16
|
"tapable": "2.2.1",
|
|
17
|
-
"@rushstack/node-core-library": "3.
|
|
17
|
+
"@rushstack/node-core-library": "3.59.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@types/heft-jest": "1.0.1",
|
|
21
21
|
"@types/semver": "7.3.5",
|
|
22
22
|
"@types/webpack-env": "1.18.0",
|
|
23
|
-
"@microsoft/rush-lib": "5.
|
|
23
|
+
"@microsoft/rush-lib": "5.98.0",
|
|
24
24
|
"@rushstack/eslint-config": "3.2.0",
|
|
25
|
-
"@rushstack/heft": "0.50.
|
|
26
|
-
"@rushstack/heft-node-rig": "1.12.
|
|
27
|
-
"@rushstack/stream-collator": "4.0.
|
|
25
|
+
"@rushstack/heft": "0.50.5",
|
|
26
|
+
"@rushstack/heft-node-rig": "1.12.11",
|
|
27
|
+
"@rushstack/stream-collator": "4.0.234",
|
|
28
28
|
"@rushstack/ts-command-line": "4.13.2",
|
|
29
|
-
"@rushstack/terminal": "0.5.
|
|
29
|
+
"@rushstack/terminal": "0.5.9"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "heft build --clean",
|