@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
@@ -208,56 +208,7 @@ export declare class ChangeManager {
208
208
  /**
209
209
  * @beta
210
210
  */
211
- export declare type CloudBuildCacheProviderFactory = (buildCacheJson: IBuildCacheJson) => ICloudBuildCacheProvider;
212
-
213
- /**
214
- * Use this class to load and save the "common/config/rush/cobuild.json" config file.
215
- * This file provides configuration options for the Rush Cobuild feature.
216
- * @beta
217
- */
218
- export declare class CobuildConfiguration {
219
- private static _jsonSchema;
220
- /**
221
- * Indicates whether the cobuild feature is enabled.
222
- * Typically it is enabled in the cobuild.json config file.
223
- *
224
- * Note: The orchestrator (or local users) should always have to opt into running with cobuilds by
225
- * providing a cobuild context id. Even if cobuilds are "enabled" as a feature, they don't
226
- * actually turn on for that particular build unless the cobuild context id is provided as an
227
- * non-empty string.
228
- */
229
- readonly cobuildEnabled: boolean;
230
- /**
231
- * Cobuild context id
232
- *
233
- * @remarks
234
- * The cobuild feature won't be enabled until the context id is provided as an non-empty string.
235
- */
236
- readonly cobuildContextId: string | undefined;
237
- /**
238
- * If true, Rush will automatically handle the leaf project with build cache "disabled" by writing
239
- * to the cache in a special "log files only mode". This is useful when you want to use Cobuilds
240
- * to improve the performance in CI validations and the leaf projects have not enabled cache.
241
- */
242
- readonly cobuildLeafProjectLogOnlyAllowed: boolean;
243
- readonly cobuildLockProvider: ICobuildLockProvider;
244
- private constructor();
245
- /**
246
- * Attempts to load the cobuild.json data from the standard file path `common/config/rush/cobuild.json`.
247
- * If the file has not been created yet, then undefined is returned.
248
- */
249
- static tryLoadAsync(terminal: ITerminal, rushConfiguration: RushConfiguration, rushSession: RushSession): Promise<CobuildConfiguration | undefined>;
250
- static getCobuildConfigFilePath(rushConfiguration: RushConfiguration): string;
251
- private static _loadAsync;
252
- get contextId(): string | undefined;
253
- connectLockProviderAsync(): Promise<void>;
254
- disconnectLockProviderAsync(): Promise<void>;
255
- }
256
-
257
- /**
258
- * @beta
259
- */
260
- export declare type CobuildLockProviderFactory = (cobuildJson: ICobuildJson) => ICobuildLockProvider;
211
+ export declare type CloudBuildCacheProviderFactory = (buildCacheJson: IBuildCacheJson) => ICloudBuildCacheProvider | Promise<ICloudBuildCacheProvider>;
261
212
 
262
213
  /**
263
214
  * Use this class to load and save the "common/config/rush/common-versions.json" config file.
@@ -388,9 +339,6 @@ export declare class EnvironmentConfiguration {
388
339
  private static _buildCacheCredential;
389
340
  private static _buildCacheEnabled;
390
341
  private static _buildCacheWriteAllowed;
391
- private static _cobuildEnabled;
392
- private static _cobuildContextId;
393
- private static _cobuildLeafProjectLogOnlyAllowed;
394
342
  private static _gitBinaryPath;
395
343
  private static _tarBinaryPath;
396
344
  /**
@@ -446,21 +394,6 @@ export declare class EnvironmentConfiguration {
446
394
  * See {@link EnvironmentVariableNames.RUSH_BUILD_CACHE_WRITE_ALLOWED}
447
395
  */
448
396
  static get buildCacheWriteAllowed(): boolean | undefined;
449
- /**
450
- * If set, enables or disables the cobuild feature.
451
- * See {@link EnvironmentVariableNames.RUSH_COBUILD_ENABLED}
452
- */
453
- static get cobuildEnabled(): boolean | undefined;
454
- /**
455
- * Provides a determined cobuild context id if configured
456
- * See {@link EnvironmentVariableNames.RUSH_COBUILD_CONTEXT_ID}
457
- */
458
- static get cobuildContextId(): string | undefined;
459
- /**
460
- * If set, enables or disables the cobuild leaf project log only feature.
461
- * See {@link EnvironmentVariableNames.RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED}
462
- */
463
- static get cobuildLeafProjectLogOnlyAllowed(): boolean | undefined;
464
397
  /**
465
398
  * Allows the git binary path to be explicitly provided.
466
399
  * See {@link EnvironmentVariableNames.RUSH_GIT_BINARY_PATH}
@@ -618,29 +551,6 @@ export declare const EnvironmentVariableNames: {
618
551
  * this environment variable is ignored.
619
552
  */
620
553
  readonly RUSH_BUILD_CACHE_WRITE_ALLOWED: "RUSH_BUILD_CACHE_WRITE_ALLOWED";
621
- /**
622
- * Setting this environment variable overrides the value of `cobuildEnabled` in the `cobuild.json`
623
- * configuration file.
624
- *
625
- * @remarks
626
- * Specify `1` to enable the cobuild or `0` to disable it.
627
- *
628
- * If there is no cobuild configured, then this environment variable is ignored.
629
- */
630
- readonly RUSH_COBUILD_ENABLED: "RUSH_COBUILD_ENABLED";
631
- /**
632
- * Setting this environment variable opt into running with cobuilds.
633
- *
634
- * @remarks
635
- * If there is no cobuild configured, then this environment variable is ignored.
636
- */
637
- readonly RUSH_COBUILD_CONTEXT_ID: "RUSH_COBUILD_CONTEXT_ID";
638
- /**
639
- * If this variable is set to "1", When getting distributed builds, Rush will automatically handle the leaf project
640
- * with build cache "disabled" by writing to the cache in a special "log files only mode". This is useful when you
641
- * want to use Cobuilds to improve the performance in CI validations and the leaf projects have not enabled cache.
642
- */
643
- readonly RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED: "RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED";
644
554
  /**
645
555
  * Explicitly specifies the path for the Git binary that is invoked by certain Rush operations.
646
556
  */
@@ -804,61 +714,6 @@ export declare interface ICloudBuildCacheProvider {
804
714
  deleteCachedCredentialsAsync(terminal: ITerminal): Promise<void>;
805
715
  }
806
716
 
807
- /**
808
- * @beta
809
- */
810
- export declare interface ICobuildCompletedState {
811
- status: OperationStatus.Success | OperationStatus.SuccessWithWarning | OperationStatus.Failure;
812
- /**
813
- * Completed state points to the cache id that was used to store the build cache.
814
- * Note: Cache failed builds in a separate cache id
815
- */
816
- cacheId: string;
817
- }
818
-
819
- /**
820
- * @beta
821
- */
822
- export declare interface ICobuildContext {
823
- /**
824
- * The contextId is provided by the monorepo maintainer, it reads from environment variable {@link EnvironmentVariableNames.RUSH_COBUILD_CONTEXT_ID}.
825
- * It ensure only the builds from the same given contextId cooperated. If user was more permissive,
826
- * and wanted all PR and CI builds building anything with the same contextId to cooperate, then just
827
- * set it to a static value.
828
- */
829
- contextId: string;
830
- /**
831
- * The id of cache. It should be keep same as the normal cacheId from ProjectBuildCache.
832
- * Otherwise, there is a discrepancy in the success case then turning on cobuilds will
833
- * fail to populate the normal build cache.
834
- */
835
- cacheId: string;
836
- /**
837
- * {@inheritdoc RushConstants.cobuildLockVersion}
838
- */
839
- version: number;
840
- }
841
-
842
- /**
843
- * @beta
844
- */
845
- export declare interface ICobuildJson {
846
- cobuildEnabled: boolean;
847
- cobuildLockProvider: string;
848
- }
849
-
850
- /**
851
- * @beta
852
- */
853
- export declare interface ICobuildLockProvider {
854
- connectAsync(): Promise<void>;
855
- disconnectAsync(): Promise<void>;
856
- acquireLockAsync(context: ICobuildContext): Promise<boolean>;
857
- renewLockAsync(context: ICobuildContext): Promise<void>;
858
- setCompletedStateAsync(context: ICobuildContext, state: ICobuildCompletedState): Promise<void>;
859
- getCompletedStateAsync(context: ICobuildContext): Promise<ICobuildCompletedState | undefined>;
860
- }
861
-
862
717
  /**
863
718
  * A collection of environment variables
864
719
  * @public
@@ -896,10 +751,6 @@ export declare interface ICreateOperationsContext {
896
751
  * The configuration for the build cache, if the feature is enabled.
897
752
  */
898
753
  readonly buildCacheConfiguration: BuildCacheConfiguration | undefined;
899
- /**
900
- * The configuration for the cobuild, if cobuild feature and build cache feature are both enabled.
901
- */
902
- readonly cobuildConfiguration: CobuildConfiguration | undefined;
903
754
  /**
904
755
  * The set of custom parameters for the executing command.
905
756
  * Maps from the `longName` field in command-line.json to the parser configuration in ts-command-line.
@@ -1045,6 +896,10 @@ export declare interface IExperimentsJson {
1045
896
  * If true, print the outputs of shell commands defined in event hooks to the console.
1046
897
  */
1047
898
  printEventHooksOutputToConsole?: boolean;
899
+ /**
900
+ * If true, Rush will not allow node_modules in the repo folder or in parent folders.
901
+ */
902
+ forbidPhantomResolvableNodeModulesFolders?: boolean;
1048
903
  }
1049
904
 
1050
905
  /**
@@ -1306,6 +1161,10 @@ export declare interface IOperationRunner {
1306
1161
  * Name of the operation, for logging.
1307
1162
  */
1308
1163
  readonly name: string;
1164
+ /**
1165
+ * This flag determines if the operation is allowed to be skipped if up to date.
1166
+ */
1167
+ isSkipAllowed: boolean;
1309
1168
  /**
1310
1169
  * Indicates that this runner's duration has meaning.
1311
1170
  */
@@ -1319,6 +1178,10 @@ export declare interface IOperationRunner {
1319
1178
  * exit code
1320
1179
  */
1321
1180
  warningsAreAllowed: boolean;
1181
+ /**
1182
+ * Indicates if the output of this operation may be written to the cache
1183
+ */
1184
+ isCacheWriteAllowed: boolean;
1322
1185
  /**
1323
1186
  * Method to be executed for the operation.
1324
1187
  */
@@ -1356,34 +1219,7 @@ export declare interface IOperationRunnerContext {
1356
1219
  /**
1357
1220
  * Object used to track elapsed time.
1358
1221
  */
1359
- stopwatch: Stopwatch;
1360
- /**
1361
- * The current execution status of an operation. Operations start in the 'ready' state,
1362
- * but can be 'blocked' if an upstream operation failed. It is 'executing' when
1363
- * the operation is executing. Once execution is complete, it is either 'success' or
1364
- * 'failure'.
1365
- */
1366
- status: OperationStatus;
1367
- /**
1368
- * Error which occurred while executing this operation, this is stored in case we need
1369
- * it later (for example to re-print errors at end of execution).
1370
- */
1371
- error?: Error;
1372
- /**
1373
- * The set of operations that depend on this operation.
1374
- */
1375
- readonly consumers: Set<IOperationRunnerContext>;
1376
- /**
1377
- * The operation runner that is executing this operation.
1378
- */
1379
- readonly runner: IOperationRunner;
1380
- /**
1381
- * Normally the incremental build logic will rebuild changed projects as well as
1382
- * any projects that directly or indirectly depend on a changed project.
1383
- * If true, then the incremental build logic will only rebuild changed projects and
1384
- * ignore dependent projects.
1385
- */
1386
- readonly changedProjectsOnly: boolean;
1222
+ stopwatch: IStopwatchResult;
1387
1223
  }
1388
1224
 
1389
1225
  /**
@@ -1443,16 +1279,15 @@ export declare interface IPhase {
1443
1279
  self: Set<IPhase>;
1444
1280
  upstream: Set<IPhase>;
1445
1281
  };
1446
- /**
1447
- * Normally Rush requires that each project's package.json has a `"scripts"` entry matching the phase name.
1448
- * To disable this check, set `ignoreMissingScript` to true.
1449
- */
1450
- ignoreMissingScript: boolean;
1451
1282
  /**
1452
1283
  * By default, Rush returns a nonzero exit code if errors or warnings occur during a command. If this option is
1453
1284
  * set to `true`, Rush will return a zero exit code if warnings occur during the execution of this phase.
1454
1285
  */
1455
1286
  allowWarningsOnSuccess: boolean;
1287
+ /**
1288
+ * What should happen if the script is not defined in a project's package.json scripts field. Default is "error".
1289
+ */
1290
+ missingScriptBehavior: IPhaseBehaviorForMissingScript;
1456
1291
  /**
1457
1292
  * (Optional) If the `shellCommand` field is set for a bulk command, Rush will invoke it for each
1458
1293
  * selected project; otherwise, Rush will invoke the package.json `"scripts"` entry matching Rush command/phase name.
@@ -1464,6 +1299,12 @@ export declare interface IPhase {
1464
1299
  shellCommand?: string;
1465
1300
  }
1466
1301
 
1302
+ /**
1303
+ * The set of valid behaviors for a missing script in a project's package.json scripts for a given phase.
1304
+ * @alpha
1305
+ */
1306
+ export declare type IPhaseBehaviorForMissingScript = 'silent' | 'log' | 'error';
1307
+
1467
1308
  /**
1468
1309
  * Information about the currently executing phased script command (as defined in command-line.json, or default "build" or "rebuild") provided to plugins.
1469
1310
  * @beta
@@ -2259,18 +2100,10 @@ export declare enum OperationStatus {
2259
2100
  * The Operation is on the queue, ready to execute (but may be waiting for dependencies)
2260
2101
  */
2261
2102
  Ready = "READY",
2262
- /**
2263
- * The Operation is Queued
2264
- */
2265
- Queued = "QUEUED",
2266
2103
  /**
2267
2104
  * The Operation is currently executing
2268
2105
  */
2269
2106
  Executing = "EXECUTING",
2270
- /**
2271
- * The Operation is currently executing by a remote process
2272
- */
2273
- RemoteExecuting = "REMOTE EXECUTING",
2274
2107
  /**
2275
2108
  * The Operation completed successfully and did not write to standard output
2276
2109
  */
@@ -2440,14 +2273,6 @@ export declare class PhasedCommandHooks {
2440
2273
  * Hook is series for stable output.
2441
2274
  */
2442
2275
  readonly afterExecuteOperations: AsyncSeriesHook<[IExecutionResult, ICreateOperationsContext]>;
2443
- /**
2444
- * Hook invoked before executing a operation.
2445
- */
2446
- readonly beforeExecuteOperation: AsyncSeriesHook<[IOperationRunnerContext]>;
2447
- /**
2448
- * Hook invoked after executing a operation.
2449
- */
2450
- readonly afterExecuteOperation: AsyncSeriesHook<[IOperationRunnerContext]>;
2451
2276
  /**
2452
2277
  * Hook invoked after a run has finished and the command is watching for changes.
2453
2278
  * May be used to display additional relevant data to the user.
@@ -3100,6 +2925,7 @@ export declare class RushConfiguration {
3100
2925
  * an RushConfiguration object.
3101
2926
  */
3102
2927
  static loadFromConfigurationFile(rushJsonFilename: string): RushConfiguration;
2928
+ static tryLoadFromDefaultLocation(options?: ITryFindRushJsonLocationOptions): RushConfiguration | undefined;
3103
2929
  static loadFromDefaultLocation(options?: ITryFindRushJsonLocationOptions): RushConfiguration;
3104
2930
  /**
3105
2931
  * Find the rush.json location and return the path, or undefined if a rush.json can't be found.
@@ -3585,15 +3411,6 @@ export declare class RushConstants {
3585
3411
  * Changing this ensures that cache entries generated by an old version will no longer register as a cache hit.
3586
3412
  */
3587
3413
  static readonly buildCacheVersion: number;
3588
- /**
3589
- * Cobuild configuration file.
3590
- */
3591
- static readonly cobuildFilename: string;
3592
- /**
3593
- * Cobuild version number, incremented when the logic to create cobuild lock changes.
3594
- * Changing this ensures that lock generated by an old version will no longer access as a cobuild lock.
3595
- */
3596
- static readonly cobuildLockVersion: number;
3597
3414
  /**
3598
3415
  * Per-project configuration filename.
3599
3416
  */
@@ -3661,6 +3478,10 @@ export declare class RushConstants {
3661
3478
  * file system event occurs in this interval, the timeout will reset.
3662
3479
  */
3663
3480
  static readonly defaultWatchDebounceMs: number;
3481
+ /**
3482
+ * The name of the parameter that can be used to bypass policies.
3483
+ */
3484
+ static readonly bypassPolicyFlagLongName: '--bypass-policy';
3664
3485
  }
3665
3486
 
3666
3487
  /**
@@ -3759,15 +3580,12 @@ declare class RushPluginsConfiguration {
3759
3580
  export declare class RushSession {
3760
3581
  private readonly _options;
3761
3582
  private readonly _cloudBuildCacheProviderFactories;
3762
- private readonly _cobuildLockProviderFactories;
3763
3583
  readonly hooks: RushLifecycleHooks;
3764
3584
  constructor(options: IRushSessionOptions);
3765
3585
  getLogger(name: string): ILogger;
3766
3586
  get terminalProvider(): ITerminalProvider;
3767
3587
  registerCloudBuildCacheProviderFactory(cacheProviderName: string, factory: CloudBuildCacheProviderFactory): void;
3768
3588
  getCloudBuildCacheProviderFactory(cacheProviderName: string): CloudBuildCacheProviderFactory | undefined;
3769
- registerCobuildLockProviderFactory(cobuildLockProviderName: string, factory: CobuildLockProviderFactory): void;
3770
- getCobuildLockProviderFactory(cobuildLockProviderName: string): CobuildLockProviderFactory | undefined;
3771
3589
  }
3772
3590
 
3773
3591
  /**
@@ -3786,60 +3604,6 @@ export declare class RushUserConfiguration {
3786
3604
  static getRushUserFolderPath(): string;
3787
3605
  }
3788
3606
 
3789
- /**
3790
- * Represents a typical timer/stopwatch which keeps track
3791
- * of elapsed time in between two events.
3792
- */
3793
- declare class Stopwatch implements IStopwatchResult {
3794
- private _startTime;
3795
- private _endTime;
3796
- private _state;
3797
- private _getTime;
3798
- constructor(getTime?: () => number);
3799
- /**
3800
- * Static helper function which creates a stopwatch which is immediately started
3801
- */
3802
- static start(): Stopwatch;
3803
- get state(): StopwatchState;
3804
- /**
3805
- * Starts the stopwatch. Note that if end() has been called,
3806
- * reset() should be called before calling start() again.
3807
- */
3808
- start(): Stopwatch;
3809
- /**
3810
- * Stops executing the stopwatch and saves the current timestamp
3811
- */
3812
- stop(): Stopwatch;
3813
- /**
3814
- * Resets all values of the stopwatch back to the original
3815
- */
3816
- reset(): Stopwatch;
3817
- /**
3818
- * Displays how long the stopwatch has been executing in a human readable format.
3819
- */
3820
- toString(): string;
3821
- /**
3822
- * Get the duration in seconds.
3823
- */
3824
- get duration(): number;
3825
- /**
3826
- * Return the start time of the most recent stopwatch run.
3827
- */
3828
- get startTime(): number | undefined;
3829
- /**
3830
- * Return the end time of the most recent stopwatch run.
3831
- */
3832
- get endTime(): number | undefined;
3833
- }
3834
-
3835
- /**
3836
- * Used with the Stopwatch class.
3837
- */
3838
- declare enum StopwatchState {
3839
- Stopped = 1,
3840
- Started = 2
3841
- }
3842
-
3843
3607
  declare enum VersionFormatForCommit {
3844
3608
  wildcard = "wildcard",
3845
3609
  original = "original"
@@ -3,6 +3,11 @@ import type { ICommandLineJson, IGlobalCommandJson, IFlagParameterJson, IChoiceP
3
3
  export interface IShellCommandTokenContext {
4
4
  packageFolder: string;
5
5
  }
6
+ /**
7
+ * The set of valid behaviors for a missing script in a project's package.json scripts for a given phase.
8
+ * @alpha
9
+ */
10
+ export declare type PhaseBehaviorForMissingScript = 'silent' | 'log' | 'error';
6
11
  /**
7
12
  * Metadata about a phase.
8
13
  * @alpha
@@ -34,16 +39,15 @@ export interface IPhase {
34
39
  self: Set<IPhase>;
35
40
  upstream: Set<IPhase>;
36
41
  };
37
- /**
38
- * Normally Rush requires that each project's package.json has a `"scripts"` entry matching the phase name.
39
- * To disable this check, set `ignoreMissingScript` to true.
40
- */
41
- ignoreMissingScript: boolean;
42
42
  /**
43
43
  * By default, Rush returns a nonzero exit code if errors or warnings occur during a command. If this option is
44
44
  * set to `true`, Rush will return a zero exit code if warnings occur during the execution of this phase.
45
45
  */
46
46
  allowWarningsOnSuccess: boolean;
47
+ /**
48
+ * What should happen if the script is not defined in a project's package.json scripts field. Default is "error".
49
+ */
50
+ missingScriptBehavior: PhaseBehaviorForMissingScript;
47
51
  /**
48
52
  * (Optional) If the `shellCommand` field is set for a bulk command, Rush will invoke it for each
49
53
  * selected project; otherwise, Rush will invoke the package.json `"scripts"` entry matching Rush command/phase name.
@@ -88,6 +88,10 @@ export interface IPhaseJson {
88
88
  * Normally Rush requires that each project's package.json has a \"scripts\" entry matching the phase name. To disable this check, set \"ignoreMissingScript\" to true.
89
89
  */
90
90
  ignoreMissingScript?: boolean;
91
+ /**
92
+ * What should happen if the script is not defined in a project's package.json scripts field. Default is "error". Supersedes \"ignoreMissingScript\".
93
+ */
94
+ missingScriptBehavior?: 'silent' | 'log' | 'error';
91
95
  /**
92
96
  * By default, Rush returns a nonzero exit code if errors or warnings occur during a command. If this option is set to \"true\", Rush will return a zero exit code if warnings occur during the execution of this phase.
93
97
  */
@@ -120,29 +120,6 @@ 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";
146
123
  /**
147
124
  * Explicitly specifies the path for the Git binary that is invoked by certain Rush operations.
148
125
  */
@@ -187,9 +164,6 @@ export declare class EnvironmentConfiguration {
187
164
  private static _buildCacheCredential;
188
165
  private static _buildCacheEnabled;
189
166
  private static _buildCacheWriteAllowed;
190
- private static _cobuildEnabled;
191
- private static _cobuildContextId;
192
- private static _cobuildLeafProjectLogOnlyAllowed;
193
167
  private static _gitBinaryPath;
194
168
  private static _tarBinaryPath;
195
169
  /**
@@ -245,21 +219,6 @@ export declare class EnvironmentConfiguration {
245
219
  * See {@link EnvironmentVariableNames.RUSH_BUILD_CACHE_WRITE_ALLOWED}
246
220
  */
247
221
  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;
263
222
  /**
264
223
  * Allows the git binary path to be explicitly provided.
265
224
  * See {@link EnvironmentVariableNames.RUSH_GIT_BINARY_PATH}
@@ -44,6 +44,10 @@ export interface IExperimentsJson {
44
44
  * If true, print the outputs of shell commands defined in event hooks to the console.
45
45
  */
46
46
  printEventHooksOutputToConsole?: boolean;
47
+ /**
48
+ * If true, Rush will not allow node_modules in the repo folder or in parent folders.
49
+ */
50
+ forbidPhantomResolvableNodeModulesFolders?: boolean;
47
51
  }
48
52
  /**
49
53
  * Use this class to load the "common/config/rush/experiments.json" config file.
@@ -435,6 +435,7 @@ export declare class RushConfiguration {
435
435
  * an RushConfiguration object.
436
436
  */
437
437
  static loadFromConfigurationFile(rushJsonFilename: string): RushConfiguration;
438
+ static tryLoadFromDefaultLocation(options?: ITryFindRushJsonLocationOptions): RushConfiguration | undefined;
438
439
  static loadFromDefaultLocation(options?: ITryFindRushJsonLocationOptions): RushConfiguration;
439
440
  /**
440
441
  * Find the rush.json location and return the path, or undefined if a rush.json can't be found.
@@ -9,18 +9,17 @@ export interface IRushPnpmCommandLineParserOptions {
9
9
  terminalProvider?: ITerminalProvider;
10
10
  }
11
11
  export declare class RushPnpmCommandLineParser {
12
- private _terminal;
13
- private _rushConfiguration;
14
- private _pnpmArgs;
12
+ private readonly _terminal;
13
+ private readonly _rushConfiguration;
14
+ private readonly _pnpmArgs;
15
15
  private _commandName;
16
- private _debugEnabled;
17
- private _verboseEnabled;
18
- constructor(options: IRushPnpmCommandLineParserOptions);
16
+ private readonly _debugEnabled;
17
+ private constructor();
18
+ static initializeAsync(options: IRushPnpmCommandLineParserOptions): Promise<RushPnpmCommandLineParser>;
19
19
  executeAsync(): Promise<void>;
20
- private _validatePnpmUsage;
20
+ private _validatePnpmUsageAsync;
21
21
  private _execute;
22
22
  private _postExecuteAsync;
23
23
  private _doRushUpdateAsync;
24
- private _reportErrorAndSetExitCode;
25
24
  }
26
25
  //# sourceMappingURL=RushPnpmCommandLineParser.d.ts.map
@@ -1,11 +1,13 @@
1
1
  import { BaseRushAction } from './BaseRushAction';
2
- import { RushCommandLineParser } from '../RushCommandLineParser';
2
+ import type { RushCommandLineParser } from '../RushCommandLineParser';
3
3
  export declare class DeployAction extends BaseRushAction {
4
+ private readonly _logger;
4
5
  private readonly _scenario;
5
6
  private readonly _project;
6
7
  private readonly _overwrite;
7
8
  private readonly _targetFolder;
8
9
  private readonly _createArchivePath;
10
+ private readonly _createArchiveOnly;
9
11
  constructor(parser: RushCommandLineParser);
10
12
  protected runAsync(): Promise<void>;
11
13
  }
@@ -34,7 +34,7 @@ export declare class PublishAction extends BaseRushAction {
34
34
  * Validate some input parameters
35
35
  */
36
36
  private _validate;
37
- private _publishChanges;
37
+ private _publishChangesAsync;
38
38
  private _publishAll;
39
39
  private _gitAddTags;
40
40
  private _npmPublish;
package/lib/index.d.ts CHANGED
@@ -9,10 +9,9 @@ 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';
13
12
  export { GetCacheEntryIdFunction, IGenerateCacheEntryIdOptions } from './logic/buildCache/CacheEntryId';
14
13
  export { FileSystemBuildCacheProvider, IFileSystemBuildCacheProviderOptions } from './logic/buildCache/FileSystemBuildCacheProvider';
15
- export { IPhase } from './api/CommandLineConfiguration';
14
+ export { IPhase, PhaseBehaviorForMissingScript as IPhaseBehaviorForMissingScript } from './api/CommandLineConfiguration';
16
15
  export { EnvironmentConfiguration, EnvironmentVariableNames, IEnvironmentConfigurationInitializeOptions } from './api/EnvironmentConfiguration';
17
16
  export { RushConstants } from './logic/RushConstants';
18
17
  export { PackageManagerName, PackageManager } from './api/packageManager/PackageManager';
@@ -37,7 +36,7 @@ export { IOperationRunner, IOperationRunnerContext } from './logic/operations/IO
37
36
  export { IExecutionResult, IOperationExecutionResult } from './logic/operations/IOperationExecutionResult';
38
37
  export { IOperationOptions, Operation } from './logic/operations/Operation';
39
38
  export { OperationStatus } from './logic/operations/OperationStatus';
40
- export { RushSession, IRushSessionOptions, CloudBuildCacheProviderFactory, CobuildLockProviderFactory } from './pluginFramework/RushSession';
39
+ export { RushSession, IRushSessionOptions, CloudBuildCacheProviderFactory } from './pluginFramework/RushSession';
41
40
  export { IRushCommand, IGlobalCommand, IPhasedCommand, RushLifecycleHooks } from './pluginFramework/RushLifeCycle';
42
41
  export { ICreateOperationsContext, PhasedCommandHooks } from './pluginFramework/PhasedCommandHooks';
43
42
  export { IRushPlugin } from './pluginFramework/IRushPlugin';
@@ -45,7 +44,6 @@ export { IBuiltInPluginConfiguration as _IBuiltInPluginConfiguration } from './p
45
44
  export { IRushPluginConfigurationBase as _IRushPluginConfigurationBase } from './api/RushPluginsConfiguration';
46
45
  export { ILogger } from './pluginFramework/logging/Logger';
47
46
  export { ICloudBuildCacheProvider } from './logic/buildCache/ICloudBuildCacheProvider';
48
- export { ICobuildLockProvider, ICobuildContext, ICobuildCompletedState } from './logic/cobuild/ICobuildLockProvider';
49
47
  export { ICredentialCacheOptions, ICredentialCacheEntry, CredentialCache } from './logic/CredentialCache';
50
48
  export type { ITelemetryData, ITelemetryMachineInfo, ITelemetryOperationResult } from './logic/Telemetry';
51
49
  export { IStopwatchResult } from './utilities/Stopwatch';
@@ -19,7 +19,7 @@ export declare class ChangeFiles {
19
19
  /**
20
20
  * Get the array of absolute paths of change files.
21
21
  */
22
- getFiles(): string[];
22
+ getFilesAsync(): Promise<string[]>;
23
23
  /**
24
24
  * Get the path of changes folder.
25
25
  */
@@ -27,7 +27,7 @@ export declare class ChangeFiles {
27
27
  /**
28
28
  * Delete all change files
29
29
  */
30
- deleteAll(shouldDelete: boolean, updatedChangelogs?: IChangelog[]): number;
31
- private _deleteFiles;
30
+ deleteAllAsync(shouldDelete: boolean, updatedChangelogs?: IChangelog[]): Promise<number>;
31
+ private _deleteFilesAsync;
32
32
  }
33
33
  //# sourceMappingURL=ChangeFiles.d.ts.map