@rushstack/rush-http-build-cache-plugin 5.97.1 → 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 (53) hide show
  1. package/.heft/build-cache/jest-cache/haste-map-bae913f9b9aa720eb4deeae0a60a4b27-22ae7f4ce9de4306889d8c05e5cc39b9-f6b1af01a3130057bdfe3d86807211f9 +0 -0
  2. package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/{9d/commons_9d513d1d600f9112f73547da918dcbb7 → 2e/commons_2e52897dfe4222d991674613f5b35882} +356 -314
  3. package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/34/PrefixProxyTerminalProvider_34b4603b9c4455de1c3cc05820149fdd +65 -0
  4. package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/{53/index_53d9d5a344c3984994c801733764f503 → 46/index_46761981528d09d1a0e438f06cd2c548} +6 -2
  5. package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/{06/ConfigurationFile_06d7f35feb0bd944d9b9a2a4d9e112c8 → 57/ConfigurationFile_57c950e8ef4673e11bff94304a50823c} +10 -4
  6. package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/{68/rushlib_68c59fa059ba441c9c6883bcfed4a8d2 → 69/rushlib_695f6e29167e91482e2906a8d09b3a5a} +17 -6
  7. package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/8a/HttpBuildCacheProvidertest_8a1598e1f1b42d6933964acfb7612893 +116 -0
  8. package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/8a/HttpBuildCacheProvidertest_8a1598e1f1b42d6933964acfb7612893.map +1 -0
  9. package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/a3/RushHttpBuildCachePlugin_a3e8a9bb172ff361907e770dcf3268be +1551 -0
  10. package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/a3/RushHttpBuildCachePlugin_a3e8a9bb172ff361907e770dcf3268be.map +1 -0
  11. package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/ba/TerminalWritable_ba71b4b7bfe6a26c85f4fd0245057a0a +54 -0
  12. package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/{5d/Text_5da85b5db9a2f06bbe29cdcd91e6fbca → df/Text_df57ddd200e4237e617fc183dcb5fe67} +7 -1
  13. package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/ec/HttpBuildCacheProvider_ecceab34e8340fa24dde11b618ffa8a4 +4668 -0
  14. package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/ec/HttpBuildCacheProvider_ecceab34e8340fa24dde11b618ffa8a4.map +1 -0
  15. package/.heft/build-cache/jest-cache/perf-cache-bae913f9b9aa720eb4deeae0a60a4b27-da39a3ee5e6b4b0d3255bfef95601890 +1 -1
  16. package/.rush/temp/operation/_phase_build/state.json +1 -1
  17. package/.rush/temp/operation/_phase_test/all.log +14 -14
  18. package/.rush/temp/operation/_phase_test/state.json +1 -1
  19. package/.rush/temp/package-deps__phase_build.json +3 -3
  20. package/.rush/temp/package-deps__phase_test.json +3 -3
  21. package/.rush/temp/{rushstack+rush-http-build-cache-plugin-_phase_build-646439b80a2010050f5b4b8a916e50afae04c3ab.log → rushstack+rush-http-build-cache-plugin-_phase_build-08118e08afc6d454e5623f20498fd64b5e3e9051.log} +2 -2
  22. package/lib/HttpBuildCacheProvider.d.ts +2 -0
  23. package/lib/HttpBuildCacheProvider.d.ts.map +1 -1
  24. package/lib/HttpBuildCacheProvider.js +26 -7
  25. package/lib/HttpBuildCacheProvider.js.map +1 -1
  26. package/lib/RushHttpBuildCachePlugin.d.ts.map +1 -1
  27. package/lib/RushHttpBuildCachePlugin.js +28 -4
  28. package/lib/RushHttpBuildCachePlugin.js.map +1 -1
  29. package/lib/test/HttpBuildCacheProvider.test.d.ts.map +1 -0
  30. package/lib/{HttpBuildCacheProvider.test.js → test/HttpBuildCacheProvider.test.js} +46 -3
  31. package/lib/test/HttpBuildCacheProvider.test.js.map +1 -0
  32. package/package.json +6 -6
  33. package/rush-logs/rush-http-build-cache-plugin._phase_test.log +14 -14
  34. package/src/HttpBuildCacheProvider.ts +36 -7
  35. package/src/RushHttpBuildCachePlugin.ts +23 -28
  36. package/src/test/HttpBuildCacheProvider.test.ts +115 -0
  37. package/temp/coverage/clover.xml +117 -109
  38. package/temp/coverage/coverage-final.json +2 -2
  39. package/temp/coverage/lcov-report/HttpBuildCacheProvider.ts.html +166 -79
  40. package/temp/coverage/lcov-report/RushHttpBuildCachePlugin.ts.html +29 -44
  41. package/temp/coverage/lcov-report/index.html +24 -24
  42. package/temp/coverage/lcov-report/index.ts.html +1 -1
  43. package/temp/coverage/lcov.info +236 -218
  44. package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/e5/HttpBuildCacheProvider_e53bd002cf44ae62693f20b8c4682941 +0 -4367
  45. package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/e5/HttpBuildCacheProvider_e53bd002cf44ae62693f20b8c4682941.map +0 -1
  46. package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/e6/RushHttpBuildCachePlugin_e69b4b7cd4f95aa49455690c88f00247 +0 -362
  47. package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/e6/RushHttpBuildCachePlugin_e69b4b7cd4f95aa49455690c88f00247.map +0 -1
  48. package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/f7/HttpBuildCacheProvidertest_f710af633835df558cad54cb165c14fa +0 -73
  49. package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/f7/HttpBuildCacheProvidertest_f710af633835df558cad54cb165c14fa.map +0 -1
  50. package/lib/HttpBuildCacheProvider.test.d.ts.map +0 -1
  51. package/lib/HttpBuildCacheProvider.test.js.map +0 -1
  52. package/src/HttpBuildCacheProvider.test.ts +0 -58
  53. /package/lib/{HttpBuildCacheProvider.test.d.ts → test/HttpBuildCacheProvider.test.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- 6d75f3ef970a9c06c0cdc6c33cb8954c
1
+ 26b41193ef85c7f92e904562681296b8
2
2
  "use strict";
3
3
  exports.id = "commons";
4
4
  exports.ids = ["commons"];
@@ -19,16 +19,14 @@ __webpack_require__.r(__webpack_exports__);
19
19
  /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
20
20
  /* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @rushstack/node-core-library */ 132939);
21
21
  /* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__);
22
- /* harmony import */ var _utilities_Utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utilities/Utilities */ 827501);
23
22
  /* harmony import */ var _logic_JsonSchemaUrls__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../logic/JsonSchemaUrls */ 866717);
24
- /* harmony import */ var _schemas_approved_packages_schema_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../schemas/approved-packages.schema.json */ 405603);
23
+ /* harmony import */ var _schemas_approved_packages_schema_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../schemas/approved-packages.schema.json */ 405603);
25
24
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
26
25
  // See LICENSE in the project root for license information.
27
26
 
28
27
 
29
28
 
30
29
 
31
-
32
30
  /**
33
31
  * An item returned by ApprovedPackagesConfiguration
34
32
  * @public
@@ -121,8 +119,8 @@ class ApprovedPackagesConfiguration {
121
119
  return a.packageName.localeCompare(b.packageName);
122
120
  });
123
121
  for (const item of this.items) {
124
- // Sort the items from the set. Too bad we can't use the new Array.from().
125
- const allowedCategories = _utilities_Utilities__WEBPACK_IMPORTED_MODULE_3__.Utilities.getSetAsArray(item.allowedCategories);
122
+ // Sort the items from the set.
123
+ const allowedCategories = Array.from(item.allowedCategories);
126
124
  allowedCategories.sort();
127
125
  const itemJson = {
128
126
  name: item.packageName,
@@ -170,7 +168,7 @@ class ApprovedPackagesConfiguration {
170
168
  this._itemsByName.set(item.packageName, item);
171
169
  }
172
170
  }
173
- ApprovedPackagesConfiguration._jsonSchema = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.JsonSchema.fromLoadedObject(_schemas_approved_packages_schema_json__WEBPACK_IMPORTED_MODULE_4__);
171
+ ApprovedPackagesConfiguration._jsonSchema = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.JsonSchema.fromLoadedObject(_schemas_approved_packages_schema_json__WEBPACK_IMPORTED_MODULE_3__);
174
172
  //# sourceMappingURL=ApprovedPackagesConfiguration.js.map
175
173
 
176
174
  /***/ }),
@@ -262,26 +260,17 @@ __webpack_require__.r(__webpack_exports__);
262
260
  * @beta
263
261
  */
264
262
  class BuildCacheConfiguration {
265
- constructor(options) {
263
+ constructor({ getCacheEntryId, buildCacheJson, rushUserConfiguration, rushConfiguration, cloudCacheProvider }) {
266
264
  var _a;
267
- this.buildCacheEnabled =
268
- (_a = _EnvironmentConfiguration__WEBPACK_IMPORTED_MODULE_2__.EnvironmentConfiguration.buildCacheEnabled) !== null && _a !== void 0 ? _a : options.buildCacheJson.buildCacheEnabled;
265
+ this.buildCacheEnabled = (_a = _EnvironmentConfiguration__WEBPACK_IMPORTED_MODULE_2__.EnvironmentConfiguration.buildCacheEnabled) !== null && _a !== void 0 ? _a : buildCacheJson.buildCacheEnabled;
269
266
  this.cacheWriteEnabled =
270
267
  !!this.buildCacheEnabled && _EnvironmentConfiguration__WEBPACK_IMPORTED_MODULE_2__.EnvironmentConfiguration.buildCacheWriteAllowed !== false;
271
- this.getCacheEntryId = options.getCacheEntryId;
268
+ this.getCacheEntryId = getCacheEntryId;
272
269
  this.localCacheProvider = new _logic_buildCache_FileSystemBuildCacheProvider__WEBPACK_IMPORTED_MODULE_3__.FileSystemBuildCacheProvider({
273
- rushUserConfiguration: options.rushUserConfiguration,
274
- rushConfiguration: options.rushConfiguration
270
+ rushUserConfiguration: rushUserConfiguration,
271
+ rushConfiguration: rushConfiguration
275
272
  });
276
- const { buildCacheJson } = options;
277
- // Don't configure a cloud cache provider if local-only
278
- if (buildCacheJson.cacheProvider !== 'local-only') {
279
- const cloudCacheProviderFactory = options.rushSession.getCloudBuildCacheProviderFactory(buildCacheJson.cacheProvider);
280
- if (!cloudCacheProviderFactory) {
281
- throw new Error(`Unexpected cache provider: ${buildCacheJson.cacheProvider}`);
282
- }
283
- this.cloudCacheProvider = cloudCacheProviderFactory(buildCacheJson);
284
- }
273
+ this.cloudCacheProvider = cloudCacheProvider;
285
274
  }
286
275
  /**
287
276
  * Attempts to load the build-cache.json data from the standard file path `common/config/rush/build-cache.json`.
@@ -330,12 +319,22 @@ class BuildCacheConfiguration {
330
319
  terminal.writeErrorLine(`Error parsing cache entry name pattern "${buildCacheJson.cacheEntryNamePattern}": ${e}`);
331
320
  throw new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.AlreadyReportedError();
332
321
  }
322
+ let cloudCacheProvider;
323
+ // Don't configure a cloud cache provider if local-only
324
+ if (buildCacheJson.cacheProvider !== 'local-only') {
325
+ const cloudCacheProviderFactory = rushSession.getCloudBuildCacheProviderFactory(buildCacheJson.cacheProvider);
326
+ if (!cloudCacheProviderFactory) {
327
+ throw new Error(`Unexpected cache provider: ${buildCacheJson.cacheProvider}`);
328
+ }
329
+ cloudCacheProvider = await cloudCacheProviderFactory(buildCacheJson);
330
+ }
333
331
  return new BuildCacheConfiguration({
334
332
  buildCacheJson,
335
333
  getCacheEntryId,
336
334
  rushConfiguration,
337
335
  rushUserConfiguration,
338
- rushSession
336
+ rushSession,
337
+ cloudCacheProvider
339
338
  });
340
339
  }
341
340
  }
@@ -611,7 +610,7 @@ class CommandLineConfiguration {
611
610
  * @internal
612
611
  */
613
612
  constructor(commandLineJson, options = {}) {
614
- var _a, _b;
613
+ var _a, _b, _c;
615
614
  this.commands = new Map();
616
615
  this.phases = new Map();
617
616
  this.parameters = [];
@@ -638,6 +637,11 @@ class CommandLineConfiguration {
638
637
  'lowercase letters, numbers, or hyphens. The name must start with a letter and ' +
639
638
  'must not end with a hyphen.');
640
639
  }
640
+ if (phase.ignoreMissingScript !== undefined && phase.missingScriptBehavior !== undefined) {
641
+ throw new Error(`In ${_logic_RushConstants__WEBPACK_IMPORTED_MODULE_1__.RushConstants.commandLineFilename}, the phase "${phase.name}"'s defines ` +
642
+ 'both "ignoreMissingScript" and "missingScriptBehavior". If using the "missingScriptBehavior", ' +
643
+ `remove "ignoreMissingScript", since it subsumes the functionality.`);
644
+ }
641
645
  // This is a completely fresh object. Avoid use of the `...` operator in its construction
642
646
  // to guarantee monomorphism.
643
647
  const processedPhase = {
@@ -649,7 +653,7 @@ class CommandLineConfiguration {
649
653
  self: new Set(),
650
654
  upstream: new Set()
651
655
  },
652
- ignoreMissingScript: !!phase.ignoreMissingScript,
656
+ missingScriptBehavior: (_a = phase.missingScriptBehavior) !== null && _a !== void 0 ? _a : (phase.ignoreMissingScript ? 'log' : 'error'),
653
657
  allowWarningsOnSuccess: !!phase.allowWarningsOnSuccess
654
658
  };
655
659
  this.phases.set(phase.name, processedPhase);
@@ -658,8 +662,8 @@ class CommandLineConfiguration {
658
662
  for (const rawPhase of phasesJson) {
659
663
  // The named phase not existing was already handled in the loop above
660
664
  const phase = this.phases.get(rawPhase.name);
661
- const selfDependencies = (_a = rawPhase.dependencies) === null || _a === void 0 ? void 0 : _a.self;
662
- const upstreamDependencies = (_b = rawPhase.dependencies) === null || _b === void 0 ? void 0 : _b.upstream;
665
+ const selfDependencies = (_b = rawPhase.dependencies) === null || _b === void 0 ? void 0 : _b.self;
666
+ const upstreamDependencies = (_c = rawPhase.dependencies) === null || _c === void 0 ? void 0 : _c.upstream;
663
667
  if (selfDependencies) {
664
668
  for (const dependencyName of selfDependencies) {
665
669
  const dependency = this.phases.get(dependencyName);
@@ -970,7 +974,7 @@ class CommandLineConfiguration {
970
974
  self: new Set(),
971
975
  upstream: new Set()
972
976
  },
973
- ignoreMissingScript: !!command.ignoreMissingScript,
977
+ missingScriptBehavior: command.ignoreMissingScript ? 'log' : 'error',
974
978
  allowWarningsOnSuccess: !!command.allowWarningsInSuccessfulBuild,
975
979
  shellCommand: command.shellCommand
976
980
  };
@@ -2763,11 +2767,17 @@ class RushConfiguration {
2763
2767
  RushConfiguration._jsonSchema.validateObject(rushConfigurationJson, resolvedRushJsonFilename);
2764
2768
  return new RushConfiguration(rushConfigurationJson, resolvedRushJsonFilename);
2765
2769
  }
2766
- static loadFromDefaultLocation(options) {
2770
+ static tryLoadFromDefaultLocation(options) {
2767
2771
  const rushJsonLocation = RushConfiguration.tryFindRushJsonLocation(options);
2768
2772
  if (rushJsonLocation) {
2769
2773
  return RushConfiguration.loadFromConfigurationFile(rushJsonLocation);
2770
2774
  }
2775
+ }
2776
+ static loadFromDefaultLocation(options) {
2777
+ const rushConfiguration = RushConfiguration.tryLoadFromDefaultLocation(options);
2778
+ if (rushConfiguration) {
2779
+ return rushConfiguration;
2780
+ }
2771
2781
  else {
2772
2782
  throw _utilities_Utilities__WEBPACK_IMPORTED_MODULE_20__.Utilities.getRushConfigNotFoundError();
2773
2783
  }
@@ -4998,9 +5008,10 @@ __webpack_require__.r(__webpack_exports__);
4998
5008
 
4999
5009
  class RushPnpmCommandLine {
5000
5010
  static launch(launcherVersion, options) {
5001
- const rushPnpmCommandLineParser = new _RushPnpmCommandLineParser__WEBPACK_IMPORTED_MODULE_0__.RushPnpmCommandLineParser(options);
5002
- // RushPnpmCommandLineParser.executeAsync should never reject the promise
5003
- rushPnpmCommandLineParser.executeAsync().catch(console.error);
5011
+ _RushPnpmCommandLineParser__WEBPACK_IMPORTED_MODULE_0__.RushPnpmCommandLineParser.initializeAsync(options)
5012
+ // RushPnpmCommandLineParser.executeAsync should never reject the promise
5013
+ .then((rushPnpmCommandLineParser) => rushPnpmCommandLineParser.executeAsync())
5014
+ .catch(console.error);
5004
5015
  }
5005
5016
  }
5006
5017
  //# sourceMappingURL=RushPnpmCommandLine.js.map
@@ -5038,63 +5049,79 @@ __webpack_require__.r(__webpack_exports__);
5038
5049
 
5039
5050
 
5040
5051
 
5041
- const lodash = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Import.lazy('lodash', require);
5042
- const semver = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Import.lazy('semver', require);
5043
5052
  const RUSH_SKIP_CHECKS_PARAMETER = '--rush-skip-checks';
5053
+ function _reportErrorAndSetExitCode(error, terminal, debugEnabled) {
5054
+ var _a;
5055
+ if (!(error instanceof _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.AlreadyReportedError)) {
5056
+ const prefix = 'ERROR: ';
5057
+ terminal.writeErrorLine('\n' + _rushstack_terminal__WEBPACK_IMPORTED_MODULE_2__.PrintUtilities.wrapWords(prefix + error.message));
5058
+ }
5059
+ if (debugEnabled) {
5060
+ // If catchSyncErrors() called this, then show a call stack similar to what Node.js
5061
+ // would show for an uncaught error
5062
+ terminal.writeErrorLine('\n' + error.stack);
5063
+ }
5064
+ process.exit((_a = process.exitCode) !== null && _a !== void 0 ? _a : 1);
5065
+ }
5044
5066
  class RushPnpmCommandLineParser {
5045
- constructor(options) {
5046
- const { terminalProvider } = options;
5047
- this._debugEnabled = process.argv.indexOf('--debug') >= 0;
5048
- this._verboseEnabled = process.argv.indexOf('--verbose') >= 0;
5049
- const localTerminalProvider = terminalProvider !== null && terminalProvider !== void 0 ? terminalProvider : new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.ConsoleTerminalProvider({
5050
- debugEnabled: this._debugEnabled,
5051
- verboseEnabled: this._verboseEnabled
5067
+ constructor(options, terminal, debugEnabled) {
5068
+ this._debugEnabled = debugEnabled;
5069
+ this._terminal = terminal;
5070
+ // Are we in a Rush repo?
5071
+ const rushConfiguration = _api_RushConfiguration__WEBPACK_IMPORTED_MODULE_3__.RushConfiguration.tryLoadFromDefaultLocation({
5072
+ // showVerbose is false because the logging message may break JSON output
5073
+ showVerbose: false
5074
+ });
5075
+ _logic_NodeJsCompatibility__WEBPACK_IMPORTED_MODULE_4__.NodeJsCompatibility.warnAboutCompatibilityIssues({
5076
+ isRushLib: true,
5077
+ alreadyReportedNodeTooNewError: !!options.alreadyReportedNodeTooNewError,
5078
+ rushConfiguration
5052
5079
  });
5053
- this._terminal = new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Terminal(localTerminalProvider);
5080
+ if (!rushConfiguration) {
5081
+ throw new Error('The "rush-pnpm" command must be executed in a folder that is under a Rush workspace folder');
5082
+ }
5083
+ this._rushConfiguration = rushConfiguration;
5084
+ if (rushConfiguration.packageManager !== 'pnpm') {
5085
+ throw new Error('The "rush-pnpm" command requires your rush.json to be configured to use the PNPM package manager');
5086
+ }
5087
+ if (!rushConfiguration.pnpmOptions.useWorkspaces) {
5088
+ const pnpmConfigFilename = rushConfiguration.pnpmOptions.jsonFilename || 'rush.json';
5089
+ throw new Error(`The "rush-pnpm" command requires the "useWorkspaces" setting to be enabled in ${pnpmConfigFilename}`);
5090
+ }
5091
+ const workspaceFolder = rushConfiguration.commonTempFolder;
5092
+ const workspaceFilePath = path__WEBPACK_IMPORTED_MODULE_0__.join(workspaceFolder, 'pnpm-workspace.yaml');
5093
+ if (!_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.FileSystem.exists(workspaceFilePath)) {
5094
+ this._terminal.writeErrorLine('Error: The PNPM workspace file has not been generated:');
5095
+ this._terminal.writeErrorLine(` ${workspaceFilePath}\n`);
5096
+ this._terminal.writeLine(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Colors.cyan(`Do you need to run "rush install" or "rush update"?`));
5097
+ throw new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.AlreadyReportedError();
5098
+ }
5099
+ if (!_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.FileSystem.exists(rushConfiguration.packageManagerToolFilename)) {
5100
+ this._terminal.writeErrorLine('Error: The PNPM local binary has not been installed yet.');
5101
+ this._terminal.writeLine('\n' + _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Colors.cyan(`Do you need to run "rush install" or "rush update"?`));
5102
+ throw new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.AlreadyReportedError();
5103
+ }
5104
+ // 0 = node.exe
5105
+ // 1 = rush-pnpm
5106
+ const pnpmArgs = process.argv.slice(2);
5107
+ this._pnpmArgs = pnpmArgs;
5108
+ }
5109
+ static async initializeAsync(options) {
5110
+ var _a;
5111
+ const debugEnabled = process.argv.indexOf('--debug') >= 0;
5112
+ const verboseEnabled = process.argv.indexOf('--verbose') >= 0;
5113
+ const localTerminalProvider = (_a = options.terminalProvider) !== null && _a !== void 0 ? _a : new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.ConsoleTerminalProvider({
5114
+ debugEnabled,
5115
+ verboseEnabled
5116
+ });
5117
+ const terminal = new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Terminal(localTerminalProvider);
5054
5118
  try {
5055
- // Are we in a Rush repo?
5056
- let rushConfiguration = undefined;
5057
- if (_api_RushConfiguration__WEBPACK_IMPORTED_MODULE_3__.RushConfiguration.tryFindRushJsonLocation()) {
5058
- // showVerbose is false because the logging message may break JSON output
5059
- rushConfiguration = _api_RushConfiguration__WEBPACK_IMPORTED_MODULE_3__.RushConfiguration.loadFromDefaultLocation({ showVerbose: false });
5060
- }
5061
- _logic_NodeJsCompatibility__WEBPACK_IMPORTED_MODULE_4__.NodeJsCompatibility.warnAboutCompatibilityIssues({
5062
- isRushLib: true,
5063
- alreadyReportedNodeTooNewError: !!options.alreadyReportedNodeTooNewError,
5064
- rushConfiguration
5065
- });
5066
- if (!rushConfiguration) {
5067
- throw new Error('The "rush-pnpm" command must be executed in a folder that is under a Rush workspace folder');
5068
- }
5069
- this._rushConfiguration = rushConfiguration;
5070
- if (rushConfiguration.packageManager !== 'pnpm') {
5071
- throw new Error('The "rush-pnpm" command requires your rush.json to be configured to use the PNPM package manager');
5072
- }
5073
- if (!rushConfiguration.pnpmOptions.useWorkspaces) {
5074
- const pnpmConfigFilename = rushConfiguration.pnpmOptions.jsonFilename || 'rush.json';
5075
- throw new Error(`The "rush-pnpm" command requires the "useWorkspaces" setting to be enabled in ${pnpmConfigFilename}`);
5076
- }
5077
- const workspaceFolder = rushConfiguration.commonTempFolder;
5078
- const workspaceFilePath = path__WEBPACK_IMPORTED_MODULE_0__.join(workspaceFolder, 'pnpm-workspace.yaml');
5079
- if (!_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.FileSystem.exists(workspaceFilePath)) {
5080
- this._terminal.writeErrorLine('Error: The PNPM workspace file has not been generated:');
5081
- this._terminal.writeErrorLine(` ${workspaceFilePath}\n`);
5082
- this._terminal.writeLine(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Colors.cyan(`Do you need to run "rush install" or "rush update"?`));
5083
- throw new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.AlreadyReportedError();
5084
- }
5085
- if (!_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.FileSystem.exists(rushConfiguration.packageManagerToolFilename)) {
5086
- this._terminal.writeErrorLine('Error: The PNPM local binary has not been installed yet.');
5087
- this._terminal.writeLine('\n' + _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Colors.cyan(`Do you need to run "rush install" or "rush update"?`));
5088
- throw new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.AlreadyReportedError();
5089
- }
5090
- // 0 = node.exe
5091
- // 1 = rush-pnpm
5092
- const pnpmArgs = process.argv.slice(2);
5093
- this._validatePnpmUsage(pnpmArgs);
5094
- this._pnpmArgs = pnpmArgs;
5119
+ const rushPnpmCommandLineParser = new RushPnpmCommandLineParser(options, terminal, debugEnabled);
5120
+ await rushPnpmCommandLineParser._validatePnpmUsageAsync(rushPnpmCommandLineParser._pnpmArgs);
5121
+ return rushPnpmCommandLineParser;
5095
5122
  }
5096
5123
  catch (error) {
5097
- this._reportErrorAndSetExitCode(error);
5124
+ _reportErrorAndSetExitCode(error, terminal, debugEnabled);
5098
5125
  }
5099
5126
  }
5100
5127
  async executeAsync() {
@@ -5107,7 +5134,7 @@ class RushPnpmCommandLineParser {
5107
5134
  await this._postExecuteAsync();
5108
5135
  }
5109
5136
  }
5110
- _validatePnpmUsage(pnpmArgs) {
5137
+ async _validatePnpmUsageAsync(pnpmArgs) {
5111
5138
  if (pnpmArgs[0] === RUSH_SKIP_CHECKS_PARAMETER) {
5112
5139
  pnpmArgs.shift();
5113
5140
  // Ignore other checks
@@ -5186,6 +5213,7 @@ class RushPnpmCommandLineParser {
5186
5213
  }
5187
5214
  // Know safe after validation
5188
5215
  case 'patch': {
5216
+ const semver = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! semver */ 710912, 23));
5189
5217
  /**
5190
5218
  * If you were to accidentally attempt to use rush-pnpm patch with a pnpmVersion < 7.4.0, pnpm patch may fallback to the system patch command.
5191
5219
  * For instance, /usr/bin/patch which may just hangs forever
@@ -5286,7 +5314,8 @@ class RushPnpmCommandLineParser {
5286
5314
  const commonPackageJson = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.JsonFile.load(commonPackageJsonFilename);
5287
5315
  const newGlobalPatchedDependencies = (_a = commonPackageJson === null || commonPackageJson === void 0 ? void 0 : commonPackageJson.pnpm) === null || _a === void 0 ? void 0 : _a.patchedDependencies;
5288
5316
  const currentGlobalPatchedDependencies = this._rushConfiguration.pnpmOptions.globalPatchedDependencies;
5289
- if (!lodash.isEqual(currentGlobalPatchedDependencies, newGlobalPatchedDependencies)) {
5317
+ const { isEqual } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! lodash */ 546517, 23));
5318
+ if (!isEqual(currentGlobalPatchedDependencies, newGlobalPatchedDependencies)) {
5290
5319
  const commonTempPnpmPatchesFolder = `${this._rushConfiguration.commonTempFolder}/${_logic_RushConstants__WEBPACK_IMPORTED_MODULE_5__.RushConstants.pnpmPatchesFolderName}`;
5291
5320
  const rushPnpmPatchesFolder = `${this._rushConfiguration.commonFolder}/pnpm-${_logic_RushConstants__WEBPACK_IMPORTED_MODULE_5__.RushConstants.pnpmPatchesFolderName}`;
5292
5321
  // Copy (or delete) common\temp\patches\ --> common\pnpm-patches\
@@ -5345,23 +5374,6 @@ class RushPnpmCommandLineParser {
5345
5374
  purgeManager.deleteAll();
5346
5375
  }
5347
5376
  }
5348
- _reportErrorAndSetExitCode(error) {
5349
- if (!(error instanceof _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.AlreadyReportedError)) {
5350
- const prefix = 'ERROR: ';
5351
- this._terminal.writeErrorLine('\n' + _rushstack_terminal__WEBPACK_IMPORTED_MODULE_2__.PrintUtilities.wrapWords(prefix + error.message));
5352
- }
5353
- if (this._debugEnabled) {
5354
- // If catchSyncErrors() called this, then show a call stack similar to what Node.js
5355
- // would show for an uncaught error
5356
- this._terminal.writeErrorLine('\n' + error.stack);
5357
- }
5358
- if (process.exitCode !== undefined) {
5359
- process.exit(process.exitCode);
5360
- }
5361
- else {
5362
- process.exit(1);
5363
- }
5364
- }
5365
5377
  }
5366
5378
  //# sourceMappingURL=RushPnpmCommandLineParser.js.map
5367
5379
 
@@ -5471,10 +5483,9 @@ class RushXCommandLine {
5471
5483
  }
5472
5484
  try {
5473
5485
  // Are we in a Rush repo?
5474
- let rushConfiguration = undefined;
5475
- if (_api_RushConfiguration__WEBPACK_IMPORTED_MODULE_6__.RushConfiguration.tryFindRushJsonLocation()) {
5476
- rushConfiguration = _api_RushConfiguration__WEBPACK_IMPORTED_MODULE_6__.RushConfiguration.loadFromDefaultLocation({ showVerbose: false });
5477
- }
5486
+ const rushConfiguration = _api_RushConfiguration__WEBPACK_IMPORTED_MODULE_6__.RushConfiguration.tryLoadFromDefaultLocation({
5487
+ showVerbose: false
5488
+ });
5478
5489
  _logic_NodeJsCompatibility__WEBPACK_IMPORTED_MODULE_7__.NodeJsCompatibility.warnAboutCompatibilityIssues({
5479
5490
  isRushLib: true,
5480
5491
  alreadyReportedNodeTooNewError: !!options.alreadyReportedNodeTooNewError,
@@ -5868,7 +5879,7 @@ class BaseInstallAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_1__.Bas
5868
5879
  description: 'Perform "rush purge" before starting the installation'
5869
5880
  });
5870
5881
  this._bypassPolicyParameter = this.defineFlagParameter({
5871
- parameterLongName: '--bypass-policy',
5882
+ parameterLongName: _logic_RushConstants__WEBPACK_IMPORTED_MODULE_2__.RushConstants.bypassPolicyFlagLongName,
5872
5883
  description: 'Overrides enforcement of the "gitPolicy" rules from rush.json (use honorably!)'
5873
5884
  });
5874
5885
  this._noLinkParameter = this.defineFlagParameter({
@@ -6151,7 +6162,6 @@ __webpack_require__.r(__webpack_exports__);
6151
6162
 
6152
6163
 
6153
6164
 
6154
- const inquirer = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_3__.Import.lazy('inquirer', require);
6155
6165
  const BULK_LONG_NAME = '--bulk';
6156
6166
  const BULK_MESSAGE_LONG_NAME = '--message';
6157
6167
  const BULK_BUMP_TYPE_LONG_NAME = '--bump-type';
@@ -6282,6 +6292,7 @@ class ChangeAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_5__.BaseRush
6282
6292
  return;
6283
6293
  }
6284
6294
  this._warnUnstagedChanges();
6295
+ const inquirer = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! inquirer */ 493290, 23));
6285
6296
  const promptModule = inquirer.createPromptModule();
6286
6297
  let changeFileData = new Map();
6287
6298
  let interactiveMode = false;
@@ -6906,7 +6917,7 @@ class DeployAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_1__.BaseRush
6906
6917
  });
6907
6918
  }
6908
6919
  // Call the deploy manager
6909
- const { PackageExtractor } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @rushstack/package-extractor/lib/PackageExtractor */ 484344, 23));
6920
+ const { PackageExtractor } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @rushstack/package-extractor */ 297839, 23));
6910
6921
  const deployManager = new PackageExtractor();
6911
6922
  await deployManager.extractAsync({
6912
6923
  terminal: this._logger.terminal,
@@ -7440,6 +7451,7 @@ class InstallAction extends _BaseInstallAction__WEBPACK_IMPORTED_MODULE_1__.Base
7440
7451
  return {
7441
7452
  debug: this.parser.isDebug,
7442
7453
  allowShrinkwrapUpdates: false,
7454
+ bypassPolicyAllowed: true,
7443
7455
  bypassPolicy: this._bypassPolicyParameter.value,
7444
7456
  noLink: this._noLinkParameter.value,
7445
7457
  fullUpgrade: false,
@@ -7884,7 +7896,7 @@ class PublishAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_4__.BaseRus
7884
7896
  * Executes the publish action, which will read change request files, apply changes to package.jsons,
7885
7897
  */
7886
7898
  async runAsync() {
7887
- _logic_policy_PolicyValidator__WEBPACK_IMPORTED_MODULE_5__.PolicyValidator.validatePolicy(this.rushConfiguration, { bypassPolicy: false });
7899
+ await _logic_policy_PolicyValidator__WEBPACK_IMPORTED_MODULE_5__.validatePolicyAsync(this.rushConfiguration, { bypassPolicy: false });
7888
7900
  // Example: "common\temp\publish-home"
7889
7901
  this._targetNpmrcPublishFolder = path__WEBPACK_IMPORTED_MODULE_1__.join(this.rushConfiguration.commonTempFolder, 'publish-home');
7890
7902
  // Example: "common\temp\publish-home\.npmrc"
@@ -7904,7 +7916,7 @@ class PublishAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_4__.BaseRus
7904
7916
  }
7905
7917
  else {
7906
7918
  this._prereleaseToken = new _logic_PrereleaseToken__WEBPACK_IMPORTED_MODULE_9__.PrereleaseToken(this._prereleaseName.value, this._suffix.value, this._partialPrerelease.value);
7907
- this._publishChanges(git, publishGit, allPackages);
7919
+ await this._publishChangesAsync(git, publishGit, allPackages);
7908
7920
  }
7909
7921
  console.log('\n' + colors_safe__WEBPACK_IMPORTED_MODULE_0___default().green('Rush publish finished successfully.'));
7910
7922
  }
@@ -7922,9 +7934,9 @@ class PublishAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_4__.BaseRus
7922
7934
  throw new Error(`${this._applyGitTagsOnPack.longName} must be used with ${this._pack.longName}`);
7923
7935
  }
7924
7936
  }
7925
- _publishChanges(git, publishGit, allPackages) {
7937
+ async _publishChangesAsync(git, publishGit, allPackages) {
7926
7938
  const changeManager = new _logic_ChangeManager__WEBPACK_IMPORTED_MODULE_10__.ChangeManager(this.rushConfiguration);
7927
- changeManager.load(this.rushConfiguration.changesFolder, this._prereleaseToken, this._addCommitDetails.value);
7939
+ await changeManager.loadAsync(this.rushConfiguration.changesFolder, this._prereleaseToken, this._addCommitDetails.value);
7928
7940
  if (changeManager.hasChanges()) {
7929
7941
  const orderedChanges = changeManager.packageChanges;
7930
7942
  const tempBranchName = `publish-${Date.now()}`;
@@ -7933,7 +7945,7 @@ class PublishAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_4__.BaseRus
7933
7945
  this._setDependenciesBeforePublish();
7934
7946
  // Make changes to package.json and change logs.
7935
7947
  changeManager.apply(this._apply.value);
7936
- changeManager.updateChangelog(this._apply.value);
7948
+ await changeManager.updateChangelogAsync(this._apply.value);
7937
7949
  this._setDependenciesBeforeCommit();
7938
7950
  if (git.hasUncommittedChanges()) {
7939
7951
  // Stage, commit, and push the changes to remote temp branch.
@@ -8326,7 +8338,6 @@ __webpack_require__.r(__webpack_exports__);
8326
8338
 
8327
8339
 
8328
8340
 
8329
- const glob = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_3__.Import.lazy('glob', require);
8330
8341
  class ScanAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_4__.BaseConfiglessRushAction {
8331
8342
  constructor(parser) {
8332
8343
  super({
@@ -8389,7 +8400,9 @@ class ScanAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_4__.BaseConfig
8389
8400
  // Example: "@ms/my-package" --> "@ms/my-package"
8390
8401
  const packageRegExp = /^((@[a-z\-0-9!_]+\/)?[a-z\-0-9!_]+)\/?/;
8391
8402
  const requireMatches = new Set();
8392
- for (const filename of glob.sync('{./*.{ts,js,tsx,jsx},./{src,lib}/**/*.{ts,js,tsx,jsx}}')) {
8403
+ const { default: glob } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! glob */ 54230, 23));
8404
+ const scanResults = await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_3__.LegacyAdapters.convertCallbackToPromise(glob, '{./*.{ts,js,tsx,jsx},./{src,lib}/**/*.{ts,js,tsx,jsx}}');
8405
+ for (const filename of scanResults) {
8393
8406
  try {
8394
8407
  const contents = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_3__.FileSystem.readFile(filename);
8395
8408
  const lines = contents.split('\n');
@@ -8654,6 +8667,7 @@ class UpdateAction extends _BaseInstallAction__WEBPACK_IMPORTED_MODULE_0__.BaseI
8654
8667
  return {
8655
8668
  debug: this.parser.isDebug,
8656
8669
  allowShrinkwrapUpdates: true,
8670
+ bypassPolicyAllowed: true,
8657
8671
  bypassPolicy: this._bypassPolicyParameter.value,
8658
8672
  noLink: this._noLinkParameter.value,
8659
8673
  fullUpgrade: this._fullParameter.value,
@@ -8900,13 +8914,14 @@ __webpack_require__.r(__webpack_exports__);
8900
8914
  /* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(semver__WEBPACK_IMPORTED_MODULE_0__);
8901
8915
  /* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @rushstack/node-core-library */ 132939);
8902
8916
  /* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__);
8903
- /* harmony import */ var _api_VersionPolicy__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../api/VersionPolicy */ 734331);
8904
- /* harmony import */ var _api_RushConfiguration__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../api/RushConfiguration */ 126002);
8905
- /* harmony import */ var _logic_versionMismatch_VersionMismatchFinder__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../logic/versionMismatch/VersionMismatchFinder */ 936800);
8906
- /* harmony import */ var _logic_policy_PolicyValidator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logic/policy/PolicyValidator */ 999291);
8917
+ /* harmony import */ var _api_VersionPolicy__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../api/VersionPolicy */ 734331);
8918
+ /* harmony import */ var _api_RushConfiguration__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../api/RushConfiguration */ 126002);
8919
+ /* harmony import */ var _logic_versionMismatch_VersionMismatchFinder__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../logic/versionMismatch/VersionMismatchFinder */ 936800);
8920
+ /* harmony import */ var _logic_policy_PolicyValidator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../logic/policy/PolicyValidator */ 999291);
8907
8921
  /* harmony import */ var _BaseRushAction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BaseRushAction */ 164546);
8908
- /* harmony import */ var _logic_PublishGit__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../logic/PublishGit */ 797811);
8909
- /* harmony import */ var _logic_Git__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../logic/Git */ 668229);
8922
+ /* harmony import */ var _logic_PublishGit__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../logic/PublishGit */ 797811);
8923
+ /* harmony import */ var _logic_Git__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../logic/Git */ 668229);
8924
+ /* harmony import */ var _logic_RushConstants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logic/RushConstants */ 951904);
8910
8925
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
8911
8926
  // See LICENSE in the project root for license information.
8912
8927
 
@@ -8918,6 +8933,7 @@ __webpack_require__.r(__webpack_exports__);
8918
8933
 
8919
8934
 
8920
8935
 
8936
+
8921
8937
  const DEFAULT_PACKAGE_UPDATE_MESSAGE = 'Bump versions [skip ci]';
8922
8938
  const DEFAULT_CHANGELOG_UPDATE_MESSAGE = 'Update changelogs [skip ci]';
8923
8939
  class VersionAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_2__.BaseRushAction {
@@ -8949,7 +8965,7 @@ class VersionAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_2__.BaseRus
8949
8965
  description: 'Bumps package version based on version policies.'
8950
8966
  });
8951
8967
  this._bypassPolicy = this.defineFlagParameter({
8952
- parameterLongName: '--bypass-policy',
8968
+ parameterLongName: _logic_RushConstants__WEBPACK_IMPORTED_MODULE_3__.RushConstants.bypassPolicyFlagLongName,
8953
8969
  description: 'Overrides "gitPolicy" enforcement (use honorably!)'
8954
8970
  });
8955
8971
  this._versionPolicy = this.defineStringParameter({
@@ -8979,8 +8995,11 @@ class VersionAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_2__.BaseRus
8979
8995
  });
8980
8996
  }
8981
8997
  async runAsync() {
8982
- _logic_policy_PolicyValidator__WEBPACK_IMPORTED_MODULE_3__.PolicyValidator.validatePolicy(this.rushConfiguration, { bypassPolicy: this._bypassPolicy.value });
8983
- const git = new _logic_Git__WEBPACK_IMPORTED_MODULE_4__.Git(this.rushConfiguration);
8998
+ await _logic_policy_PolicyValidator__WEBPACK_IMPORTED_MODULE_4__.validatePolicyAsync(this.rushConfiguration, {
8999
+ bypassPolicyAllowed: true,
9000
+ bypassPolicy: this._bypassPolicy.value
9001
+ });
9002
+ const git = new _logic_Git__WEBPACK_IMPORTED_MODULE_5__.Git(this.rushConfiguration);
8984
9003
  const userEmail = git.getGitEmail();
8985
9004
  this._validateInput();
8986
9005
  const versionManagerModule = await __webpack_require__.e(/*! import() | VersionManager */ "VersionManager").then(__webpack_require__.bind(__webpack_require__, /*! ../../logic/VersionManager */ 570488));
@@ -8997,7 +9016,7 @@ class VersionAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_2__.BaseRus
8997
9016
  }
8998
9017
  else if (this._bumpVersion.value) {
8999
9018
  const tempBranch = 'version/bump-' + new Date().getTime();
9000
- await versionManager.bumpAsync(this._versionPolicy.value, this._overwriteBump.value ? _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Enum.getValueByKey(_api_VersionPolicy__WEBPACK_IMPORTED_MODULE_5__.BumpType, this._overwriteBump.value) : undefined, this._prereleaseIdentifier.value, true);
9019
+ await versionManager.bumpAsync(this._versionPolicy.value, this._overwriteBump.value ? _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Enum.getValueByKey(_api_VersionPolicy__WEBPACK_IMPORTED_MODULE_6__.BumpType, this._overwriteBump.value) : undefined, this._prereleaseIdentifier.value, true);
9001
9020
  this._gitProcess(tempBranch, this._targetBranch.value);
9002
9021
  }
9003
9022
  }
@@ -9049,19 +9068,19 @@ class VersionAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_2__.BaseRus
9049
9068
  if (this._bumpVersion.value && this._ensureVersionPolicy.value) {
9050
9069
  throw new Error('Please choose --bump or --ensure-version-policy but not together.');
9051
9070
  }
9052
- if (this._overwriteBump.value && !_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Enum.tryGetValueByKey(_api_VersionPolicy__WEBPACK_IMPORTED_MODULE_5__.BumpType, this._overwriteBump.value)) {
9071
+ if (this._overwriteBump.value && !_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Enum.tryGetValueByKey(_api_VersionPolicy__WEBPACK_IMPORTED_MODULE_6__.BumpType, this._overwriteBump.value)) {
9053
9072
  throw new Error('The value of override-bump is not valid. ' +
9054
9073
  'Valid values include prerelease, patch, preminor, minor, and major');
9055
9074
  }
9056
9075
  }
9057
9076
  _validateResult() {
9058
9077
  // Load the config from file to avoid using inconsistent in-memory data.
9059
- const rushConfig = _api_RushConfiguration__WEBPACK_IMPORTED_MODULE_6__.RushConfiguration.loadFromConfigurationFile(this.rushConfiguration.rushJsonFile);
9078
+ const rushConfig = _api_RushConfiguration__WEBPACK_IMPORTED_MODULE_7__.RushConfiguration.loadFromConfigurationFile(this.rushConfiguration.rushJsonFile);
9060
9079
  // Respect the `ensureConsistentVersions` field in rush.json
9061
9080
  if (!rushConfig.ensureConsistentVersions) {
9062
9081
  return;
9063
9082
  }
9064
- const mismatchFinder = _logic_versionMismatch_VersionMismatchFinder__WEBPACK_IMPORTED_MODULE_7__.VersionMismatchFinder.getMismatches(rushConfig);
9083
+ const mismatchFinder = _logic_versionMismatch_VersionMismatchFinder__WEBPACK_IMPORTED_MODULE_8__.VersionMismatchFinder.getMismatches(rushConfig);
9065
9084
  if (mismatchFinder.numberOfMismatches) {
9066
9085
  throw new Error('Unable to finish version bump because inconsistencies were encountered. ' +
9067
9086
  'Run "rush check" to find more details.');
@@ -9070,8 +9089,8 @@ class VersionAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_2__.BaseRus
9070
9089
  _gitProcess(tempBranch, targetBranch) {
9071
9090
  // Validate the result before commit.
9072
9091
  this._validateResult();
9073
- const git = new _logic_Git__WEBPACK_IMPORTED_MODULE_4__.Git(this.rushConfiguration);
9074
- const publishGit = new _logic_PublishGit__WEBPACK_IMPORTED_MODULE_8__.PublishGit(git, targetBranch);
9092
+ const git = new _logic_Git__WEBPACK_IMPORTED_MODULE_5__.Git(this.rushConfiguration);
9093
+ const publishGit = new _logic_PublishGit__WEBPACK_IMPORTED_MODULE_9__.PublishGit(git, targetBranch);
9075
9094
  // Make changes in temp branch.
9076
9095
  publishGit.checkout(tempBranch, true);
9077
9096
  const uncommittedChanges = git.getUncommittedChanges();
@@ -10599,14 +10618,11 @@ __webpack_require__.r(__webpack_exports__);
10599
10618
  /* harmony export */ });
10600
10619
  /* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @rushstack/node-core-library */ 132939);
10601
10620
  /* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__);
10602
- /* harmony import */ var _utilities_Utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utilities/Utilities */ 827501);
10603
10621
  /* harmony import */ var _schemas_change_file_schema_json__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../schemas/change-file.schema.json */ 608725);
10604
10622
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
10605
10623
  // See LICENSE in the project root for license information.
10606
10624
 
10607
10625
 
10608
-
10609
- const glob = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.Import.lazy('glob', require);
10610
10626
  /**
10611
10627
  * This class represents the collection of change files existing in the repo and provides operations
10612
10628
  * for those change files.
@@ -10679,9 +10695,11 @@ class ChangeFiles {
10679
10695
  /**
10680
10696
  * Get the array of absolute paths of change files.
10681
10697
  */
10682
- getFiles() {
10698
+ async getFilesAsync() {
10683
10699
  if (!this._files) {
10684
- this._files = glob.sync(`${this._changesPath}/**/*.json`) || [];
10700
+ const { default: glob } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! glob */ 54230, 23));
10701
+ this._files =
10702
+ (await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.LegacyAdapters.convertCallbackToPromise(glob, `${this._changesPath}/**/*.json`)) || [];
10685
10703
  }
10686
10704
  return this._files;
10687
10705
  }
@@ -10694,38 +10712,45 @@ class ChangeFiles {
10694
10712
  /**
10695
10713
  * Delete all change files
10696
10714
  */
10697
- deleteAll(shouldDelete, updatedChangelogs) {
10715
+ async deleteAllAsync(shouldDelete, updatedChangelogs) {
10698
10716
  if (updatedChangelogs) {
10699
10717
  // Skip changes files if the package's change log is not updated.
10700
10718
  const packagesToInclude = new Set();
10701
10719
  updatedChangelogs.forEach((changelog) => {
10702
10720
  packagesToInclude.add(changelog.name);
10703
10721
  });
10704
- const filesToDelete = this.getFiles().filter((filePath) => {
10705
- const changeRequest = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.JsonFile.load(filePath);
10722
+ const files = await this.getFilesAsync();
10723
+ const filesToDelete = [];
10724
+ await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.Async.forEachAsync(files, async (filePath) => {
10725
+ const changeRequest = await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.JsonFile.loadAsync(filePath);
10726
+ let shouldDelete = true;
10706
10727
  for (const changeInfo of changeRequest.changes) {
10707
10728
  if (!packagesToInclude.has(changeInfo.packageName)) {
10708
- return false;
10729
+ shouldDelete = false;
10730
+ break;
10709
10731
  }
10710
10732
  }
10711
- return true;
10712
- });
10713
- return this._deleteFiles(filesToDelete, shouldDelete);
10733
+ if (shouldDelete) {
10734
+ filesToDelete.push(filePath);
10735
+ }
10736
+ }, { concurrency: 5 });
10737
+ return await this._deleteFilesAsync(filesToDelete, shouldDelete);
10714
10738
  }
10715
10739
  else {
10716
10740
  // Delete all change files.
10717
- return this._deleteFiles(this.getFiles(), shouldDelete);
10741
+ const files = await this.getFilesAsync();
10742
+ return await this._deleteFilesAsync(files, shouldDelete);
10718
10743
  }
10719
10744
  }
10720
- _deleteFiles(files, shouldDelete) {
10745
+ async _deleteFilesAsync(files, shouldDelete) {
10721
10746
  if (files.length) {
10722
10747
  console.log(`\n* ${shouldDelete ? 'DELETING:' : 'DRYRUN: Deleting'} ${files.length} change file(s).`);
10723
- for (const filePath of files) {
10748
+ await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.Async.forEachAsync(files, async (filePath) => {
10724
10749
  console.log(` - ${filePath}`);
10725
10750
  if (shouldDelete) {
10726
- _utilities_Utilities__WEBPACK_IMPORTED_MODULE_2__.Utilities.deleteFile(filePath);
10751
+ await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.FileSystem.deleteFileAsync(filePath);
10727
10752
  }
10728
- }
10753
+ }, { concurrency: 5 });
10729
10754
  }
10730
10755
  return files.length;
10731
10756
  }
@@ -10769,11 +10794,11 @@ class ChangeManager {
10769
10794
  * @param prereleaseToken - prerelease token
10770
10795
  * @param includeCommitDetails - whether commit details need to be included in changes
10771
10796
  */
10772
- load(changesPath, prereleaseToken = new _PrereleaseToken__WEBPACK_IMPORTED_MODULE_0__.PrereleaseToken(), includeCommitDetails = false) {
10797
+ async loadAsync(changesPath, prereleaseToken = new _PrereleaseToken__WEBPACK_IMPORTED_MODULE_0__.PrereleaseToken(), includeCommitDetails = false) {
10773
10798
  this._allPackages = this._rushConfiguration.projectsByName;
10774
10799
  this._prereleaseToken = prereleaseToken;
10775
10800
  this._changeFiles = new _ChangeFiles__WEBPACK_IMPORTED_MODULE_1__.ChangeFiles(changesPath);
10776
- this._allChanges = _PublishUtilities__WEBPACK_IMPORTED_MODULE_2__.PublishUtilities.findChangeRequests(this._allPackages, this._rushConfiguration, this._changeFiles, includeCommitDetails, this._prereleaseToken, this._projectsToExclude);
10801
+ this._allChanges = await _PublishUtilities__WEBPACK_IMPORTED_MODULE_2__.PublishUtilities.findChangeRequestsAsync(this._allPackages, this._rushConfiguration, this._changeFiles, includeCommitDetails, this._prereleaseToken, this._projectsToExclude);
10777
10802
  this._orderedChanges = _PublishUtilities__WEBPACK_IMPORTED_MODULE_2__.PublishUtilities.sortChangeRequests(this._allChanges.packageChanges);
10778
10803
  }
10779
10804
  hasChanges() {
@@ -10813,14 +10838,14 @@ class ChangeManager {
10813
10838
  const updatedPackages = _PublishUtilities__WEBPACK_IMPORTED_MODULE_2__.PublishUtilities.updatePackages(this._allChanges, this._allPackages, this._rushConfiguration, shouldCommit, this._prereleaseToken, this._projectsToExclude);
10814
10839
  return updatedPackages;
10815
10840
  }
10816
- updateChangelog(shouldCommit) {
10841
+ async updateChangelogAsync(shouldCommit) {
10817
10842
  // Do not update changelog or delete the change files for prerelease.
10818
10843
  // Save them for the official release.
10819
10844
  if (!this._prereleaseToken.hasValue) {
10820
10845
  // Update changelogs.
10821
10846
  const updatedChangelogs = _ChangelogGenerator__WEBPACK_IMPORTED_MODULE_3__.ChangelogGenerator.updateChangelogs(this._allChanges, this._allPackages, this._rushConfiguration, shouldCommit);
10822
10847
  // Remove the change request files only if "-a" was provided.
10823
- this._changeFiles.deleteAll(shouldCommit, updatedChangelogs);
10848
+ await this._changeFiles.deleteAllAsync(shouldCommit, updatedChangelogs);
10824
10849
  }
10825
10850
  }
10826
10851
  }
@@ -11637,7 +11662,7 @@ class Git {
11637
11662
  '',
11638
11663
  `If you didn't configure your email yet, try something like this:`,
11639
11664
  '',
11640
- ..._policy_GitEmailPolicy__WEBPACK_IMPORTED_MODULE_8__.GitEmailPolicy.getEmailExampleLines(this._rushConfiguration),
11665
+ ..._policy_GitEmailPolicy__WEBPACK_IMPORTED_MODULE_8__.getEmailExampleLines(this._rushConfiguration),
11641
11666
  ''
11642
11667
  ].join('\n'));
11643
11668
  throw new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_5__.AlreadyReportedError();
@@ -13262,13 +13287,13 @@ class PublishUtilities {
13262
13287
  * @param changesPath Path to the changes folder.
13263
13288
  * @returns Dictionary of all change requests, keyed by package name.
13264
13289
  */
13265
- static findChangeRequests(allPackages, rushConfiguration, changeFiles, includeCommitDetails, prereleaseToken, projectsToExclude) {
13290
+ static async findChangeRequestsAsync(allPackages, rushConfiguration, changeFiles, includeCommitDetails, prereleaseToken, projectsToExclude) {
13266
13291
  const allChanges = {
13267
13292
  packageChanges: new Map(),
13268
13293
  versionPolicyChanges: new Map()
13269
13294
  };
13270
13295
  console.log(`Finding changes in: ${changeFiles.getChangesPath()}`);
13271
- const files = changeFiles.getFiles();
13296
+ const files = await changeFiles.getFilesAsync();
13272
13297
  // Add the minimum changes defined by the change descriptions.
13273
13298
  for (const changeFilePath of files) {
13274
13299
  const changeRequest = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_3__.JsonFile.load(changeFilePath);
@@ -14322,6 +14347,10 @@ RushConstants.phaseNamePrefix = '_phase:';
14322
14347
  * file system event occurs in this interval, the timeout will reset.
14323
14348
  */
14324
14349
  RushConstants.defaultWatchDebounceMs = 1000;
14350
+ /**
14351
+ * The name of the parameter that can be used to bypass policies.
14352
+ */
14353
+ RushConstants.bypassPolicyFlagLongName = '--bypass-policy';
14325
14354
  //# sourceMappingURL=RushConstants.js.map
14326
14355
 
14327
14356
  /***/ }),
@@ -15821,12 +15850,12 @@ __webpack_require__.r(__webpack_exports__);
15821
15850
 
15822
15851
 
15823
15852
 
15824
- const glob = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.Import.lazy('glob', require);
15825
- const globAsync = (pattern, options = {}) => {
15826
- return _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.LegacyAdapters.convertCallbackToPromise(glob, pattern, options);
15827
- };
15828
15853
  async function expandGlobPatternsAsync(globPatterns, packagePath) {
15829
15854
  const allMatches = new Set();
15855
+ const { default: glob } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! glob */ 54230, 23));
15856
+ const globAsync = (pattern, options = {}) => {
15857
+ return _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.LegacyAdapters.convertCallbackToPromise(glob, pattern, options);
15858
+ };
15830
15859
  await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.Async.forEachAsync(globPatterns, async (pattern) => {
15831
15860
  const matches = await globAsync(pattern, {
15832
15861
  cwd: packagePath,
@@ -18192,7 +18221,7 @@ function createShellOperations(operations, context) {
18192
18221
  // to specify a runner type requested in rush-project.json
18193
18222
  const customParameterValues = getCustomParameterValuesForPhase(phase);
18194
18223
  const commandToRun = getScriptToRun(project, phase.name, customParameterValues, phase.shellCommand);
18195
- if (commandToRun === undefined && !phase.ignoreMissingScript) {
18224
+ if (commandToRun === undefined && phase.missingScriptBehavior === 'error') {
18196
18225
  throw new Error(`The project '${project.packageName}' does not define a '${phase.name}' command in the 'scripts' section of its package.json`);
18197
18226
  }
18198
18227
  const displayName = getDisplayName(phase, project);
@@ -18214,7 +18243,7 @@ function createShellOperations(operations, context) {
18214
18243
  operation.runner = new _NullOperationRunner__WEBPACK_IMPORTED_MODULE_1__.NullOperationRunner({
18215
18244
  name: displayName,
18216
18245
  result: _OperationStatus__WEBPACK_IMPORTED_MODULE_2__.OperationStatus.NoOp,
18217
- silent: false
18246
+ silent: phase.missingScriptBehavior === 'silent'
18218
18247
  });
18219
18248
  }
18220
18249
  }
@@ -19343,6 +19372,53 @@ const hooks = {
19343
19372
 
19344
19373
  /***/ }),
19345
19374
 
19375
+ /***/ 764917:
19376
+ /*!******************************************************!*\
19377
+ !*** ./lib-esnext/logic/policy/EnvironmentPolicy.js ***!
19378
+ \******************************************************/
19379
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
19380
+
19381
+ __webpack_require__.r(__webpack_exports__);
19382
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19383
+ /* harmony export */ "validateAsync": () => (/* binding */ validateAsync)
19384
+ /* harmony export */ });
19385
+ /* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @rushstack/node-core-library */ 132939);
19386
+ /* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__);
19387
+ /* harmony import */ var _RushConstants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../RushConstants */ 951904);
19388
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
19389
+ // See LICENSE in the project root for license information.
19390
+
19391
+
19392
+ /**
19393
+ * Ensures the environment where the Rush repo exists is valid
19394
+ */
19395
+ async function validateAsync(rushConfiguration, options) {
19396
+ if (rushConfiguration.experimentsConfiguration.configuration.forbidPhantomResolvableNodeModulesFolders) {
19397
+ const pathParts = rushConfiguration.rushJsonFolder.split(/[\/\\]/);
19398
+ const existingNodeModulesPaths = [];
19399
+ await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.Async.forEachAsync(pathParts, async (pathPart, index) => {
19400
+ const potentialNodeModulesPath = `${pathParts.slice(0, index + 1).join('/')}/node_modules`;
19401
+ const pathExists = await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.FileSystem.existsAsync(potentialNodeModulesPath);
19402
+ if (pathExists) {
19403
+ existingNodeModulesPaths.push(potentialNodeModulesPath);
19404
+ }
19405
+ }, { concurrency: 5 });
19406
+ if (existingNodeModulesPaths.length > 0) {
19407
+ const paths = existingNodeModulesPaths.sort().join(', ');
19408
+ let errorMessage = `The following node_modules folders exist in the path to the Rush repo: ${paths}. ` +
19409
+ `This is not supported, and may cause issues.`;
19410
+ if (options.bypassPolicyAllowed) {
19411
+ errorMessage += ` To ignore, use the "${_RushConstants__WEBPACK_IMPORTED_MODULE_1__.RushConstants.bypassPolicyFlagLongName}" flag.`;
19412
+ }
19413
+ console.error(errorMessage);
19414
+ throw new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.AlreadyReportedError();
19415
+ }
19416
+ }
19417
+ }
19418
+ //# sourceMappingURL=EnvironmentPolicy.js.map
19419
+
19420
+ /***/ }),
19421
+
19346
19422
  /***/ 613207:
19347
19423
  /*!***************************************************!*\
19348
19424
  !*** ./lib-esnext/logic/policy/GitEmailPolicy.js ***!
@@ -19351,118 +19427,127 @@ const hooks = {
19351
19427
 
19352
19428
  __webpack_require__.r(__webpack_exports__);
19353
19429
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19354
- /* harmony export */ "GitEmailPolicy": () => (/* binding */ GitEmailPolicy)
19430
+ /* harmony export */ "getEmailExampleLines": () => (/* binding */ getEmailExampleLines),
19431
+ /* harmony export */ "validate": () => (/* binding */ validate)
19355
19432
  /* harmony export */ });
19356
19433
  /* harmony import */ var colors_safe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! colors/safe */ 623211);
19357
19434
  /* harmony import */ var colors_safe__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(colors_safe__WEBPACK_IMPORTED_MODULE_0__);
19358
19435
  /* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @rushstack/node-core-library */ 132939);
19359
19436
  /* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__);
19360
- /* harmony import */ var _utilities_Utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utilities/Utilities */ 827501);
19437
+ /* harmony import */ var _utilities_Utilities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utilities/Utilities */ 827501);
19361
19438
  /* harmony import */ var _Git__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Git */ 668229);
19439
+ /* harmony import */ var _RushConstants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../RushConstants */ 951904);
19362
19440
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
19363
19441
  // See LICENSE in the project root for license information.
19364
19442
 
19365
19443
 
19366
19444
 
19367
19445
 
19368
- class GitEmailPolicy {
19369
- static validate(rushConfiguration) {
19370
- const git = new _Git__WEBPACK_IMPORTED_MODULE_2__.Git(rushConfiguration);
19371
- if (!git.isGitPresent()) {
19372
- // If Git isn't installed, or this Rush project is not under a Git working folder,
19373
- // then we don't care about the Git email
19374
- console.log(colors_safe__WEBPACK_IMPORTED_MODULE_0___default().cyan('Ignoring Git validation because the Git binary was not found in the shell path.') + '\n');
19375
- return;
19376
- }
19377
- if (!git.isPathUnderGitWorkingTree()) {
19378
- // If Git isn't installed, or this Rush project is not under a Git working folder,
19379
- // then we don't care about the Git email
19380
- console.log(colors_safe__WEBPACK_IMPORTED_MODULE_0___default().cyan('Ignoring Git validation because this is not a Git working folder.') + '\n');
19446
+
19447
+ function validate(rushConfiguration, options) {
19448
+ const git = new _Git__WEBPACK_IMPORTED_MODULE_2__.Git(rushConfiguration);
19449
+ if (!git.isGitPresent()) {
19450
+ // If Git isn't installed, or this Rush project is not under a Git working folder,
19451
+ // then we don't care about the Git email
19452
+ console.log(colors_safe__WEBPACK_IMPORTED_MODULE_0___default().cyan('Ignoring Git validation because the Git binary was not found in the shell path.') + '\n');
19453
+ return;
19454
+ }
19455
+ if (!git.isPathUnderGitWorkingTree()) {
19456
+ // If Git isn't installed, or this Rush project is not under a Git working folder,
19457
+ // then we don't care about the Git email
19458
+ console.log(colors_safe__WEBPACK_IMPORTED_MODULE_0___default().cyan('Ignoring Git validation because this is not a Git working folder.') + '\n');
19459
+ return;
19460
+ }
19461
+ // If there isn't a Git policy, then we don't care whether the person configured
19462
+ // a Git email address at all. This helps people who don't
19463
+ if (rushConfiguration.gitAllowedEmailRegExps.length === 0) {
19464
+ if (git.tryGetGitEmail() === undefined) {
19381
19465
  return;
19382
19466
  }
19383
- // If there isn't a Git policy, then we don't care whether the person configured
19384
- // a Git email address at all. This helps people who don't
19385
- if (rushConfiguration.gitAllowedEmailRegExps.length === 0) {
19386
- if (git.tryGetGitEmail() === undefined) {
19387
- return;
19388
- }
19389
- // Otherwise, if an email *is* configured at all, then we still perform the basic
19390
- // sanity checks (e.g. no spaces in the address).
19467
+ // Otherwise, if an email *is* configured at all, then we still perform the basic
19468
+ // sanity checks (e.g. no spaces in the address).
19469
+ }
19470
+ let userEmail;
19471
+ try {
19472
+ userEmail = git.getGitEmail();
19473
+ // sanity check; a valid email should not contain any whitespace
19474
+ // if this fails, then we have another issue to report
19475
+ if (!userEmail.match(/^\S+$/g)) {
19476
+ console.log([
19477
+ colors_safe__WEBPACK_IMPORTED_MODULE_0___default().red('Your Git email address is invalid: ' + JSON.stringify(userEmail)),
19478
+ '',
19479
+ `To configure your Git email address, try something like this:`,
19480
+ '',
19481
+ ...getEmailExampleLines(rushConfiguration),
19482
+ ''
19483
+ ].join('\n'));
19484
+ throw new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.AlreadyReportedError();
19391
19485
  }
19392
- let userEmail;
19393
- try {
19394
- userEmail = git.getGitEmail();
19395
- // sanity check; a valid email should not contain any whitespace
19396
- // if this fails, then we have another issue to report
19397
- if (!userEmail.match(/^\S+$/g)) {
19398
- console.log([
19399
- colors_safe__WEBPACK_IMPORTED_MODULE_0___default().red('Your Git email address is invalid: ' + JSON.stringify(userEmail)),
19400
- '',
19401
- `To configure your Git email address, try something like this:`,
19402
- '',
19403
- ...GitEmailPolicy.getEmailExampleLines(rushConfiguration),
19404
- ''
19405
- ].join('\n'));
19406
- throw new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.AlreadyReportedError();
19486
+ }
19487
+ catch (e) {
19488
+ if (e instanceof _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.AlreadyReportedError) {
19489
+ let errorMessage = 'Aborting, so you can go fix your settings.';
19490
+ if (options.bypassPolicyAllowed) {
19491
+ errorMessage += ` (Or use "${_RushConstants__WEBPACK_IMPORTED_MODULE_3__.RushConstants.bypassPolicyFlagLongName}" to skip.)`;
19407
19492
  }
19493
+ console.log(colors_safe__WEBPACK_IMPORTED_MODULE_0___default().red(errorMessage));
19494
+ throw e;
19408
19495
  }
19409
- catch (e) {
19410
- if (e instanceof _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.AlreadyReportedError) {
19411
- console.log(colors_safe__WEBPACK_IMPORTED_MODULE_0___default().red('Aborting, so you can go fix your settings. (Or use --bypass-policy to skip.)'));
19412
- throw e;
19413
- }
19414
- else {
19415
- throw e;
19416
- }
19496
+ else {
19497
+ throw e;
19417
19498
  }
19418
- if (rushConfiguration.gitAllowedEmailRegExps.length === 0) {
19419
- // If there is no policy, then we're good
19499
+ }
19500
+ if (rushConfiguration.gitAllowedEmailRegExps.length === 0) {
19501
+ // If there is no policy, then we're good
19502
+ return;
19503
+ }
19504
+ console.log('Checking Git policy for this repository.\n');
19505
+ // If there is a policy, at least one of the RegExp's must match
19506
+ for (const pattern of rushConfiguration.gitAllowedEmailRegExps) {
19507
+ const regex = new RegExp(`^${pattern}$`, 'i');
19508
+ if (userEmail.match(regex)) {
19420
19509
  return;
19421
19510
  }
19422
- console.log('Checking Git policy for this repository.\n');
19423
- // If there is a policy, at least one of the RegExp's must match
19424
- for (const pattern of rushConfiguration.gitAllowedEmailRegExps) {
19425
- const regex = new RegExp(`^${pattern}$`, 'i');
19426
- if (userEmail.match(regex)) {
19427
- return;
19428
- }
19429
- }
19430
- // Show the user's name as well.
19431
- // Ex. "Example Name <name@example.com>"
19432
- let fancyEmail = colors_safe__WEBPACK_IMPORTED_MODULE_0___default().cyan(userEmail);
19433
- try {
19434
- const userName = _utilities_Utilities__WEBPACK_IMPORTED_MODULE_3__.Utilities.executeCommandAndCaptureOutput(git.gitPath, ['config', 'user.name'], '.').trim();
19435
- if (userName) {
19436
- fancyEmail = `${userName} <${fancyEmail}>`;
19437
- }
19438
- }
19439
- catch (e) {
19440
- // but if it fails, this isn't critical, so don't bother them about it
19441
- }
19442
- console.log([
19443
- 'Hey there! To keep things tidy, this repo asks you to submit your Git commits using an email like ' +
19444
- (rushConfiguration.gitAllowedEmailRegExps.length > 1 ? 'one of these patterns:' : 'this pattern:'),
19445
- '',
19446
- ...rushConfiguration.gitAllowedEmailRegExps.map((pattern) => ' ' + colors_safe__WEBPACK_IMPORTED_MODULE_0___default().cyan(pattern)),
19447
- '',
19448
- '...but yours is configured like this:',
19449
- '',
19450
- ` ${fancyEmail}`,
19451
- '',
19452
- 'To fix it, you can use commands like this:',
19453
- '',
19454
- ...GitEmailPolicy.getEmailExampleLines(rushConfiguration),
19455
- ''
19456
- ].join('\n'));
19457
- console.log(colors_safe__WEBPACK_IMPORTED_MODULE_0___default().red('Aborting, so you can go fix your settings. (Or use --bypass-policy to skip.)'));
19458
- throw new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.AlreadyReportedError();
19459
19511
  }
19460
- static getEmailExampleLines(rushConfiguration) {
19461
- return [
19462
- colors_safe__WEBPACK_IMPORTED_MODULE_0___default().cyan(' git config --local user.name "Example Name"'),
19463
- colors_safe__WEBPACK_IMPORTED_MODULE_0___default().cyan(` git config --local user.email "${rushConfiguration.gitSampleEmail || 'name@example.com'}"`)
19464
- ];
19512
+ // Show the user's name as well.
19513
+ // Ex. "Example Name <name@example.com>"
19514
+ let fancyEmail = colors_safe__WEBPACK_IMPORTED_MODULE_0___default().cyan(userEmail);
19515
+ try {
19516
+ const userName = _utilities_Utilities__WEBPACK_IMPORTED_MODULE_4__.Utilities.executeCommandAndCaptureOutput(git.gitPath, ['config', 'user.name'], '.').trim();
19517
+ if (userName) {
19518
+ fancyEmail = `${userName} <${fancyEmail}>`;
19519
+ }
19465
19520
  }
19521
+ catch (e) {
19522
+ // but if it fails, this isn't critical, so don't bother them about it
19523
+ }
19524
+ console.log([
19525
+ 'Hey there! To keep things tidy, this repo asks you to submit your Git commits using an email like ' +
19526
+ (rushConfiguration.gitAllowedEmailRegExps.length > 1 ? 'one of these patterns:' : 'this pattern:'),
19527
+ '',
19528
+ ...rushConfiguration.gitAllowedEmailRegExps.map((pattern) => ' ' + colors_safe__WEBPACK_IMPORTED_MODULE_0___default().cyan(pattern)),
19529
+ '',
19530
+ '...but yours is configured like this:',
19531
+ '',
19532
+ ` ${fancyEmail}`,
19533
+ '',
19534
+ 'To fix it, you can use commands like this:',
19535
+ '',
19536
+ ...getEmailExampleLines(rushConfiguration),
19537
+ ''
19538
+ ].join('\n'));
19539
+ let errorMessage = 'Aborting, so you can go fix your settings.';
19540
+ if (options.bypassPolicyAllowed) {
19541
+ errorMessage += ` (Or use "${_RushConstants__WEBPACK_IMPORTED_MODULE_3__.RushConstants.bypassPolicyFlagLongName}" to skip.)`;
19542
+ }
19543
+ console.log(colors_safe__WEBPACK_IMPORTED_MODULE_0___default().red(errorMessage));
19544
+ throw new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.AlreadyReportedError();
19545
+ }
19546
+ function getEmailExampleLines(rushConfiguration) {
19547
+ return [
19548
+ colors_safe__WEBPACK_IMPORTED_MODULE_0___default().cyan(' git config --local user.name "Example Name"'),
19549
+ colors_safe__WEBPACK_IMPORTED_MODULE_0___default().cyan(` git config --local user.email "${rushConfiguration.gitSampleEmail || 'name@example.com'}"`)
19550
+ ];
19466
19551
  }
19467
19552
  //# sourceMappingURL=GitEmailPolicy.js.map
19468
19553
 
@@ -19476,24 +19561,24 @@ class GitEmailPolicy {
19476
19561
 
19477
19562
  __webpack_require__.r(__webpack_exports__);
19478
19563
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19479
- /* harmony export */ "PolicyValidator": () => (/* binding */ PolicyValidator)
19564
+ /* harmony export */ "validatePolicyAsync": () => (/* binding */ validatePolicyAsync)
19480
19565
  /* harmony export */ });
19481
19566
  /* harmony import */ var _GitEmailPolicy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./GitEmailPolicy */ 613207);
19482
- /* harmony import */ var _ShrinkwrapFilePolicy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ShrinkwrapFilePolicy */ 915640);
19567
+ /* harmony import */ var _ShrinkwrapFilePolicy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ShrinkwrapFilePolicy */ 915640);
19568
+ /* harmony import */ var _EnvironmentPolicy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./EnvironmentPolicy */ 764917);
19483
19569
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
19484
19570
  // See LICENSE in the project root for license information.
19485
19571
 
19486
19572
 
19487
- class PolicyValidator {
19488
- static validatePolicy(rushConfiguration, options) {
19489
- if (options.bypassPolicy) {
19490
- return;
19491
- }
19492
- _GitEmailPolicy__WEBPACK_IMPORTED_MODULE_0__.GitEmailPolicy.validate(rushConfiguration);
19573
+
19574
+ async function validatePolicyAsync(rushConfiguration, options) {
19575
+ if (!options.bypassPolicy) {
19576
+ _GitEmailPolicy__WEBPACK_IMPORTED_MODULE_0__.validate(rushConfiguration, options);
19577
+ await _EnvironmentPolicy__WEBPACK_IMPORTED_MODULE_1__.validateAsync(rushConfiguration, options);
19493
19578
  if (!options.allowShrinkwrapUpdates) {
19494
19579
  // Don't validate the shrinkwrap if updates are allowed, as it's likely to change
19495
19580
  // It also may have merge conflict markers, which PNPM can gracefully handle, but the validator cannot
19496
- _ShrinkwrapFilePolicy__WEBPACK_IMPORTED_MODULE_1__.ShrinkwrapFilePolicy.validate(rushConfiguration, options);
19581
+ _ShrinkwrapFilePolicy__WEBPACK_IMPORTED_MODULE_2__.validate(rushConfiguration, options);
19497
19582
  }
19498
19583
  }
19499
19584
  }
@@ -19509,7 +19594,7 @@ class PolicyValidator {
19509
19594
 
19510
19595
  __webpack_require__.r(__webpack_exports__);
19511
19596
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19512
- /* harmony export */ "ShrinkwrapFilePolicy": () => (/* binding */ ShrinkwrapFilePolicy)
19597
+ /* harmony export */ "validate": () => (/* binding */ validate)
19513
19598
  /* harmony export */ });
19514
19599
  /* harmony import */ var _ShrinkwrapFileFactory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ShrinkwrapFileFactory */ 819779);
19515
19600
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
@@ -19518,17 +19603,15 @@ __webpack_require__.r(__webpack_exports__);
19518
19603
  /**
19519
19604
  * A policy that validates shrinkwrap files used by package managers.
19520
19605
  */
19521
- class ShrinkwrapFilePolicy {
19522
- static validate(rushConfiguration, options) {
19523
- console.log('Validating package manager shrinkwrap file.\n');
19524
- const shrinkwrapFile = _ShrinkwrapFileFactory__WEBPACK_IMPORTED_MODULE_0__.ShrinkwrapFileFactory.getShrinkwrapFile(rushConfiguration.packageManager, rushConfiguration.packageManagerOptions, rushConfiguration.getCommittedShrinkwrapFilename(options.shrinkwrapVariant));
19525
- if (!shrinkwrapFile) {
19526
- console.log('Shrinkwrap file could not be found, skipping validation.\n');
19527
- return;
19528
- }
19529
- // Run shrinkwrap-specific validation
19530
- shrinkwrapFile.validate(rushConfiguration.packageManagerOptions, Object.assign(Object.assign({}, options), { repoState: rushConfiguration.getRepoState(options.shrinkwrapVariant) }), rushConfiguration.experimentsConfiguration.configuration);
19606
+ function validate(rushConfiguration, options) {
19607
+ console.log('Validating package manager shrinkwrap file.\n');
19608
+ const shrinkwrapFile = _ShrinkwrapFileFactory__WEBPACK_IMPORTED_MODULE_0__.ShrinkwrapFileFactory.getShrinkwrapFile(rushConfiguration.packageManager, rushConfiguration.packageManagerOptions, rushConfiguration.getCommittedShrinkwrapFilename(options.shrinkwrapVariant));
19609
+ if (!shrinkwrapFile) {
19610
+ console.log('Shrinkwrap file could not be found, skipping validation.\n');
19611
+ return;
19531
19612
  }
19613
+ // Run shrinkwrap-specific validation
19614
+ shrinkwrapFile.validate(rushConfiguration.packageManagerOptions, Object.assign(Object.assign({}, options), { repoState: rushConfiguration.getRepoState(options.shrinkwrapVariant) }), rushConfiguration.experimentsConfiguration.configuration);
19532
19615
  }
19533
19616
  //# sourceMappingURL=ShrinkwrapFilePolicy.js.map
19534
19617
 
@@ -22609,13 +22692,6 @@ class Utilities {
22609
22692
  static getTimeInMs() {
22610
22693
  return perf_hooks__WEBPACK_IMPORTED_MODULE_3__.performance.now();
22611
22694
  }
22612
- /**
22613
- * Returns the values from a Set<T>
22614
- */
22615
- static getSetAsArray(set) {
22616
- // When ES6 is supported, we can use Array.from() instead.
22617
- return Array.from(set);
22618
- }
22619
22695
  /**
22620
22696
  * Retries a function until a timeout is reached. The function is expected to throw if it failed and
22621
22697
  * should be retried.
@@ -22667,20 +22743,6 @@ class Utilities {
22667
22743
  'from a process such as your text editor, command prompt, ' +
22668
22744
  'or a filesystem watcher.'), 'createFolderWithRetry');
22669
22745
  }
22670
- /**
22671
- * Determines if the path points to a file and that it exists.
22672
- */
22673
- static fileExists(filePath) {
22674
- let exists = false;
22675
- try {
22676
- const lstat = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_4__.FileSystem.getLinkStatistics(filePath);
22677
- exists = lstat.isFile();
22678
- }
22679
- catch (e) {
22680
- /* no-op */
22681
- }
22682
- return exists;
22683
- }
22684
22746
  /**
22685
22747
  * Determines if a path points to a directory and that it exists.
22686
22748
  */
@@ -22709,15 +22771,6 @@ class Utilities {
22709
22771
  'such as your text editor, command prompt, or a filesystem watcher');
22710
22772
  }
22711
22773
  }
22712
- /**
22713
- * Attempts to delete a file. If it does not exist, or the path is not a file, it no-ops.
22714
- */
22715
- static deleteFile(filePath) {
22716
- if (Utilities.fileExists(filePath)) {
22717
- console.log(`Deleting: ${filePath}`);
22718
- _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_4__.FileSystem.deleteFile(filePath);
22719
- }
22720
- }
22721
22774
  /*
22722
22775
  * Returns true if dateToCompare is more recent than all of the inputFilenames, which
22723
22776
  * would imply that we don't need to rebuild it. Returns false if any of the files
@@ -22883,17 +22936,6 @@ class Utilities {
22883
22936
  disposable === null || disposable === void 0 ? void 0 : disposable.dispose();
22884
22937
  }
22885
22938
  }
22886
- static async readStreamToBufferAsync(stream) {
22887
- return await new Promise((resolve, reject) => {
22888
- const parts = [];
22889
- stream.on('data', (chunk) => parts.push(chunk));
22890
- stream.on('error', (error) => reject(error));
22891
- stream.on('end', () => {
22892
- const result = Buffer.concat(parts);
22893
- resolve(result);
22894
- });
22895
- });
22896
- }
22897
22939
  static _executeLifecycleCommandInternal(command, spawnFunction, options) {
22898
22940
  var _a;
22899
22941
  let shellCommand = process.env.comspec || 'cmd';
@@ -23321,7 +23363,7 @@ module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#
23321
23363
  \*****************************************************/
23322
23364
  /***/ ((module) => {
23323
23365
 
23324
- module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"Rush command-line.json config file","description":"For use with the Rush tool, this file defines custom command line commands. See http://rushjs.io for details.","definitions":{"anything":{"type":["array","boolean","integer","number","object","string"],"items":{"$ref":"#/definitions/anything"}},"baseCommand":{"type":"object","additionalProperties":true,"required":["commandKind","name","summary"],"properties":{"commandKind":{"title":"Command Kind","description":"Indicates the kind of command: \\"bulk\\" commands are run separately for each project; \\"global\\" commands are run once for the entire repository.","type":"string","enum":["bulk","global","phased"]},"name":{"title":"Custom Command Name","description":"The name of the custom command, which can be invoked via \\"rush <name>\\"","type":"string"},"summary":{"title":"Custom Command Summary","description":"A short summary of the custom command, which will appear when printing command line usage (e.g. \\"rush --help\\")","type":"string"},"description":{"title":"Custom Command Description","description":"A detailed description of the command, which appears when requesting help for the command (e.g. \\"rush --help my-command\\"). If omitted, the summary will be used.","type":"string"},"safeForSimultaneousRushProcesses":{"title":"Safe For Simultaneous Rush Processes","description":"By default, Rush operations acquire a lock file which prevents multiple commands from executing simultaneously in the same repo folder. (For example, it would be a mistake to run \\"rush install\\" and \\"rush build\\" at the same time.) If your command makes sense to run concurrently with other operations, set safeForSimultaneousRushProcesses=true to disable this protection. In particular, this is needed for custom scripts that invoke other Rush commands.","type":"boolean"}}},"bulkCommand":{"title":"Bulk Command","description":"A custom command that is run separately for each project in the repository","type":"object","allOf":[{"$ref":"#/definitions/baseCommand"},{"type":"object","additionalProperties":true,"required":["enableParallelism"],"properties":{"commandKind":{"enum":["bulk"]},"shellCommand":{"title":"Shell Command","description":"(Optional) If the \\"shellCommand\\" field is set for a bulk command, Rush will invoke it for each selected project; otherwise, Rush will invoke the package.json \\"scripts\\" entry matching Rush command name.\\n\\nThe string is the path to a script that will be invoked using the OS shell. The working directory will be the folder that contains rush.json. If custom parameters are associated with this command, their values will be appended to the end of this string.","type":"string"},"enableParallelism":{"title":"enableParallelism","description":"If true then this command can be run in parallel, i.e. executed simultaneously for multiple projects.","type":"boolean"},"ignoreDependencyOrder":{"title":"ignoreDependencyOrder","description":"Normally projects will be processed according to their dependency order: a given project will not start processing the command until all of its dependencies have completed. This restriction doesn\'t apply for certain operations, for example, a \\"clean\\" task that deletes output files. In this case you can set \\"ignoreDependencyOrder\\" to true to increase parallelism.","type":"boolean"},"ignoreMissingScript":{"title":"Ignore Missing Script","description":"Normally Rush requires that each project\'s package.json has a \\"scripts\\" entry matching the custom command name. To disable this check, set \\"ignoreMissingScript\\" to true.","type":"boolean"},"incremental":{"title":"Incremental","description":"If true then this command will be incremental like the built-in \\"build\\" and \\"rebuild\\" commands","type":"boolean"},"allowWarningsInSuccessfulBuild":{"title":"Allow Warnings in Successful Build","description":"By default, Rush returns a nonzero exit code if errors or warnings occur during build. If this option is set to \\"true\\", Rush will return a zero exit code if warnings occur.","type":"boolean"},"watchForChanges":{"title":"Watch For Changes","description":"(EXPERIMENTAL) Normally Rush terminates after the command finishes. If this option is set to \\"true\\" Rush will instead enter a loop where it watches the file system for changes to the selected projects. Whenever a change is detected, the command will be invoked again for the changed project and any selected projects that directly or indirectly depend on it. For details, refer to the website article \\"Using watch mode\\".","type":"boolean"},"disableBuildCache":{"title":"Disable build cache.","description":"Disable build cache for this action. This may be useful if this command affects state outside of projects\' own folders.","type":"boolean"}}},{"type":"object","additionalProperties":false,"properties":{"commandKind":{"$ref":"#/definitions/anything"},"name":{"$ref":"#/definitions/anything"},"summary":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"safeForSimultaneousRushProcesses":{"$ref":"#/definitions/anything"},"shellCommand":{"$ref":"#/definitions/anything"},"enableParallelism":{"$ref":"#/definitions/anything"},"ignoreDependencyOrder":{"$ref":"#/definitions/anything"},"ignoreMissingScript":{"$ref":"#/definitions/anything"},"incremental":{"$ref":"#/definitions/anything"},"allowWarningsInSuccessfulBuild":{"$ref":"#/definitions/anything"},"watchForChanges":{"$ref":"#/definitions/anything"},"disableBuildCache":{"$ref":"#/definitions/anything"}}}]},"globalCommand":{"title":"Global Command","description":"A custom command that is run once for the entire repository","type":"object","allOf":[{"$ref":"#/definitions/baseCommand"},{"type":"object","additionalProperties":true,"required":["shellCommand"],"properties":{"commandKind":{"enum":["global"]},"shellCommand":{"title":"Shell Command","description":"A command that that will be invoked using the OS shell. The working directory will be the folder that contains rush.json. Additional command-line parameters may be appended to the end of this string.","type":"string"},"autoinstallerName":{"title":"Autoinstaller Name","description":"If your \\"shellCommand\\" script depends on NPM packages, the recommended best practice is to make it into a regular Rush project that builds using your normal toolchain. In cases where the command needs to work without first having to run \\"rush build\\", the recommended practice is to publish the project to an NPM registry and use common/scripts/install-run.js to launch it.\\n\\nAutoinstallers offer another possibility: They are folders under \\"common/autoinstallers\\" with a package.json file and shrinkwrap file. Rush will automatically invoke the package manager to install these dependencies before an associated command is invoked. Autoinstallers have the advantage that they work even in a branch where \\"rush install\\" is broken, which makes them a good solution for Git hook scripts. But they have the disadvantages of not being buildable projects, and of increasing the overall installation footprint for your monorepo.\\n\\nThe \\"autoinstallerName\\" setting must not contain a path and must be a valid NPM package name.\\n\\nFor example, the name \\"my-task\\" would map to \\"common/autoinstallers/my-task/package.json\\", and the \\"common/autoinstallers/my-task/node_modules/.bin\\" folder would be added to the shell PATH when invoking the \\"shellCommand\\".","type":"string"}}},{"type":"object","additionalProperties":false,"properties":{"commandKind":{"$ref":"#/definitions/anything"},"name":{"$ref":"#/definitions/anything"},"summary":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"safeForSimultaneousRushProcesses":{"$ref":"#/definitions/anything"},"shellCommand":{"$ref":"#/definitions/anything"},"autoinstallerName":{"$ref":"#/definitions/anything"}}}]},"phasedCommand":{"title":"Phased Command","description":"A command that contains multiple phases, that are run separately for each project","type":"object","allOf":[{"$ref":"#/definitions/baseCommand"},{"type":"object","additionalProperties":true,"required":["enableParallelism","phases"],"properties":{"commandKind":{"enum":["phased"]},"enableParallelism":{"title":"enableParallelism","description":"If true then this command can be run in parallel, i.e. executed simultaneously for multiple projects.","type":"boolean"},"incremental":{"title":"Incremental","description":"If true then this command\'s phases will be incremental and support caching.","type":"boolean"},"phases":{"title":"Phases","description":"List the phases associated with this command. Note that phases with dependencies will be implicitly included even if they aren\'t explicitly enumerated in this property.","type":"array","items":{"type":"string"}},"watchOptions":{"title":"Watch Options","description":"Controls the file watching behavior of this command. If not specified, this command does not watch files.","type":"object","additionalProperties":false,"required":["alwaysWatch","watchPhases"],"properties":{"alwaysWatch":{"title":"Always Watch","description":"Indicates that this command will always watch for changes after the initial execution, as if the \\"--watch\\" CLI flag was passed.","type":"boolean"},"debounceMs":{"title":"Debounce Timeout in Milliseconds","description":"When watching, how long to wait after the last encountered file system event before execution. If another file system event occurs in this interval, the timeout will reset. Defaults to 1000ms (1 second).","type":"number"},"watchPhases":{"title":"Watch Phases","description":"List *exactly* the phases that should be run in watch mode for this command. If this property is specified and non-empty, after the phases defined in the \\"phases\\" property run, a file watcher will be started to watch projects for changes, and will run the phases listed in this property on changed projects.","type":"array","items":{"type":"string"}}}},"installOptions":{"title":"Install Options","description":"Controls behavior related to performing installation as part of executing this command.","type":"object","additionalProperties":false,"required":["alwaysInstall"],"properties":{"alwaysInstall":{"title":"Always Install","description":"Indicates that this command will always perform a standard \\"rush install\\" before executing, as if the \\"--install\\" CLI flag was passed.","type":"boolean"}}}}},{"type":"object","additionalProperties":false,"properties":{"commandKind":{"$ref":"#/definitions/anything"},"name":{"$ref":"#/definitions/anything"},"summary":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"safeForSimultaneousRushProcesses":{"$ref":"#/definitions/anything"},"enableParallelism":{"$ref":"#/definitions/anything"},"incremental":{"$ref":"#/definitions/anything"},"phases":{"$ref":"#/definitions/anything"},"watchOptions":{"$ref":"#/definitions/anything"},"installOptions":{"$ref":"#/definitions/anything"}}}]},"phase":{"title":"Phase","description":"A phase, used in the phased command feature.","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"title":"Name","description":"The name of the phase. Note that this value must start with the \\"_phase:\\" prefix.","type":"string"},"dependencies":{"title":"Dependencies","description":"The dependencies of this phase.","type":"object","additionalProperties":false,"properties":{"self":{"title":"Self","description":"Dependency phases within the same project.","type":"array","uniqueItems":true,"items":{"type":"string"}},"upstream":{"title":"Upstream","description":"Dependency phases in upstream projects.","type":"array","uniqueItems":true,"items":{"type":"string"}}}},"ignoreMissingScript":{"title":"Ignore Missing Script","description":"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.","type":"boolean"},"allowWarningsOnSuccess":{"title":"Allow Warnings on Success","description":"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.","type":"boolean"}}},"baseParameter":{"type":"object","additionalProperties":true,"required":["parameterKind","longName","description"],"properties":{"parameterKind":{"title":"Parameter Kind","description":"Indicates the kind of syntax for this command-line parameter: \\"flag\\" or \\"choice\\" or \\"string\\"","type":"string","enum":["flag","choice","string","integer","stringList","integerList","choiceList"]},"longName":{"title":"Long Name","description":"The name of the parameter (e.g. \\"--verbose\\"). This is a required field.","type":"string","pattern":"^-(-[a-z0-9]+)+$"},"shortName":{"title":"Short Name","description":"A optional short form of the parameter (e.g. \\"-v\\" instead of \\"--verbose\\")","type":"string","pattern":"^-[a-zA-Z]$"},"description":{"title":"Custom Parameter Description","description":"A detailed description of the parameter, which appears when requesting help for the command (e.g. \\"rush --help my-command\\").","type":"string"},"associatedCommands":{"title":"Associated Commands","description":"A list of custom commands and/or built-in Rush commands that this parameter may be used with","type":"array","items":{"type":"string"}},"associatedPhases":{"title":"Associated Phases","description":"A list of the names of the phases that this command-line parameter should be provided to.","type":"array","items":{"type":"string"}},"required":{"title":"Required","description":"If true, then this parameter must be included on the command line","type":"boolean"}}},"flagParameter":{"title":"Flag Parameter","description":"A custom command-line parameter whose presence acts as an on/off switch","type":"object","allOf":[{"$ref":"#/definitions/baseParameter"},{"type":"object","additionalProperties":true,"properties":{"parameterKind":{"enum":["flag"]}}},{"type":"object","additionalProperties":false,"properties":{"parameterKind":{"$ref":"#/definitions/anything"},"longName":{"$ref":"#/definitions/anything"},"shortName":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"associatedCommands":{"$ref":"#/definitions/anything"},"associatedPhases":{"$ref":"#/definitions/anything"},"required":{"$ref":"#/definitions/anything"}}}]},"stringParameter":{"title":"String Parameter","description":"A custom command-line parameter whose value is interpreted as a string","type":"object","allOf":[{"$ref":"#/definitions/baseParameter"},{"type":"object","additionalProperties":true,"required":["argumentName"],"properties":{"parameterKind":{"enum":["string"]},"argumentName":{"title":"Argument Name","description":"The name of the argument for this parameter.","type":"string"}}},{"type":"object","additionalProperties":false,"properties":{"parameterKind":{"$ref":"#/definitions/anything"},"longName":{"$ref":"#/definitions/anything"},"shortName":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"associatedCommands":{"$ref":"#/definitions/anything"},"associatedPhases":{"$ref":"#/definitions/anything"},"required":{"$ref":"#/definitions/anything"},"argumentName":{"$ref":"#/definitions/anything"}}}]},"choiceParameter":{"title":"Choice Parameter","description":"A custom command-line parameter whose argument must be chosen from a list of allowable alternatives","type":"object","allOf":[{"$ref":"#/definitions/baseParameter"},{"type":"object","additionalProperties":true,"required":["alternatives"],"properties":{"parameterKind":{"enum":["choice"]},"alternatives":{"title":"Alternatives","description":"A list of alternative argument values that can be chosen for this parameter.","type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["name","description"],"properties":{"name":{"title":"Name of Alternative","description":"A token that is one of the alternatives that can be used with the choice parameter, e.g. \\"vanilla\\" in \\"--flavor vanilla\\"","type":"string"},"description":{"title":"Description of Alternative","description":"A detailed description for the alternative that will be shown in the command-line help.","type":"string"}}}},"defaultValue":{"title":"Default Value","description":"If the parameter is omitted from the command line, this value will be inserted by default","type":"string"}}},{"type":"object","additionalProperties":false,"properties":{"parameterKind":{"$ref":"#/definitions/anything"},"longName":{"$ref":"#/definitions/anything"},"shortName":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"associatedCommands":{"$ref":"#/definitions/anything"},"associatedPhases":{"$ref":"#/definitions/anything"},"required":{"$ref":"#/definitions/anything"},"alternatives":{"$ref":"#/definitions/anything"},"defaultValue":{"$ref":"#/definitions/anything"}}}]},"integerParameter":{"title":"Integer Parameter","description":"A custom command-line parameter whose value is interpreted as a integer","type":"object","allOf":[{"$ref":"#/definitions/baseParameter"},{"type":"object","additionalProperties":true,"required":["argumentName"],"properties":{"parameterKind":{"enum":["integer"]},"argumentName":{"title":"Argument Name","description":"The name of the argument for this parameter.","type":"string"}}},{"type":"object","additionalProperties":false,"properties":{"parameterKind":{"$ref":"#/definitions/anything"},"longName":{"$ref":"#/definitions/anything"},"shortName":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"associatedCommands":{"$ref":"#/definitions/anything"},"associatedPhases":{"$ref":"#/definitions/anything"},"required":{"$ref":"#/definitions/anything"},"argumentName":{"$ref":"#/definitions/anything"}}}]},"stringListParameter":{"title":"String List Parameter","description":"A custom command-line parameter whose value is interpreted as a list of string","type":"object","allOf":[{"$ref":"#/definitions/baseParameter"},{"type":"object","additionalProperties":true,"required":["argumentName"],"properties":{"parameterKind":{"enum":["stringList"]},"argumentName":{"title":"Argument Name","description":"The name of the argument for this parameter.","type":"string"}}},{"type":"object","additionalProperties":false,"properties":{"parameterKind":{"$ref":"#/definitions/anything"},"longName":{"$ref":"#/definitions/anything"},"shortName":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"associatedCommands":{"$ref":"#/definitions/anything"},"associatedPhases":{"$ref":"#/definitions/anything"},"required":{"$ref":"#/definitions/anything"},"argumentName":{"$ref":"#/definitions/anything"}}}]},"integerListParameter":{"title":"Integer List Parameter","description":"A custom command-line parameter whose value is interpreted as a list of integer","type":"object","allOf":[{"$ref":"#/definitions/baseParameter"},{"type":"object","additionalProperties":true,"required":["argumentName"],"properties":{"parameterKind":{"enum":["integerList"]},"argumentName":{"title":"Argument Name","description":"The name of the argument for this parameter.","type":"string"}}},{"type":"object","additionalProperties":false,"properties":{"parameterKind":{"$ref":"#/definitions/anything"},"longName":{"$ref":"#/definitions/anything"},"shortName":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"associatedCommands":{"$ref":"#/definitions/anything"},"associatedPhases":{"$ref":"#/definitions/anything"},"required":{"$ref":"#/definitions/anything"},"argumentName":{"$ref":"#/definitions/anything"}}}]},"choiceListParameter":{"title":"Choice List Parameter","description":"A custom command-line parameter whose argument must be chosen from a list of allowable alternatives, value is interpreted as a list of choice","type":"object","allOf":[{"$ref":"#/definitions/baseParameter"},{"type":"object","additionalProperties":true,"required":["alternatives"],"properties":{"parameterKind":{"enum":["choiceList"]},"alternatives":{"title":"Alternatives","description":"A list of alternative argument values that can be chosen for this parameter.","type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["name","description"],"properties":{"name":{"title":"Name of Alternative","description":"A token that is one of the alternatives that can be used with the choice parameter, e.g. \\"vanilla\\" in \\"--flavor vanilla\\"","type":"string"},"description":{"title":"Description of Alternative","description":"A detailed description for the alternative that will be shown in the command-line help.","type":"string"}}}},"defaultValue":{"title":"Default Value","description":"If the parameter is omitted from the command line, this value will be inserted by default","type":"string"}}},{"type":"object","additionalProperties":false,"properties":{"parameterKind":{"$ref":"#/definitions/anything"},"longName":{"$ref":"#/definitions/anything"},"shortName":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"associatedCommands":{"$ref":"#/definitions/anything"},"associatedPhases":{"$ref":"#/definitions/anything"},"required":{"$ref":"#/definitions/anything"},"alternatives":{"$ref":"#/definitions/anything"},"defaultValue":{"$ref":"#/definitions/anything"}}}]}},"type":"object","additionalProperties":false,"properties":{"$schema":{"description":"Part of the JSON Schema standard, this optional keyword declares the URL of the schema that the file conforms to. Editors may download the schema and use it to perform syntax highlighting.","type":"string"},"commands":{"title":"Custom Commands","description":"A list of custom commands that affect all projects in the repository. These commands are invoked from the Rush command line.","type":"array","items":{"type":"object","oneOf":[{"$ref":"#/definitions/bulkCommand"},{"$ref":"#/definitions/globalCommand"},{"$ref":"#/definitions/phasedCommand"}]}},"phases":{"title":"Phases","description":"A list of phases that are associated with phased commands.","type":"array","items":{"$ref":"#/definitions/phase"}},"parameters":{"title":"Custom Parameters","description":"A list of custom command-line parameters that can be associated with custom commands and Rush\'s built-in commands.","type":"array","items":{"type":"object","oneOf":[{"$ref":"#/definitions/flagParameter"},{"$ref":"#/definitions/choiceParameter"},{"$ref":"#/definitions/stringParameter"},{"$ref":"#/definitions/integerParameter"},{"$ref":"#/definitions/stringListParameter"},{"$ref":"#/definitions/integerListParameter"},{"$ref":"#/definitions/choiceListParameter"}]}}}}');
23366
+ module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"Rush command-line.json config file","description":"For use with the Rush tool, this file defines custom command line commands. See http://rushjs.io for details.","definitions":{"anything":{"type":["array","boolean","integer","number","object","string"],"items":{"$ref":"#/definitions/anything"}},"baseCommand":{"type":"object","additionalProperties":true,"required":["commandKind","name","summary"],"properties":{"commandKind":{"title":"Command Kind","description":"Indicates the kind of command: \\"bulk\\" commands are run separately for each project; \\"global\\" commands are run once for the entire repository.","type":"string","enum":["bulk","global","phased"]},"name":{"title":"Custom Command Name","description":"The name of the custom command, which can be invoked via \\"rush <name>\\"","type":"string"},"summary":{"title":"Custom Command Summary","description":"A short summary of the custom command, which will appear when printing command line usage (e.g. \\"rush --help\\")","type":"string"},"description":{"title":"Custom Command Description","description":"A detailed description of the command, which appears when requesting help for the command (e.g. \\"rush --help my-command\\"). If omitted, the summary will be used.","type":"string"},"safeForSimultaneousRushProcesses":{"title":"Safe For Simultaneous Rush Processes","description":"By default, Rush operations acquire a lock file which prevents multiple commands from executing simultaneously in the same repo folder. (For example, it would be a mistake to run \\"rush install\\" and \\"rush build\\" at the same time.) If your command makes sense to run concurrently with other operations, set safeForSimultaneousRushProcesses=true to disable this protection. In particular, this is needed for custom scripts that invoke other Rush commands.","type":"boolean"}}},"bulkCommand":{"title":"Bulk Command","description":"A custom command that is run separately for each project in the repository","type":"object","allOf":[{"$ref":"#/definitions/baseCommand"},{"type":"object","additionalProperties":true,"required":["enableParallelism"],"properties":{"commandKind":{"enum":["bulk"]},"shellCommand":{"title":"Shell Command","description":"(Optional) If the \\"shellCommand\\" field is set for a bulk command, Rush will invoke it for each selected project; otherwise, Rush will invoke the package.json \\"scripts\\" entry matching Rush command name.\\n\\nThe string is the path to a script that will be invoked using the OS shell. The working directory will be the folder that contains rush.json. If custom parameters are associated with this command, their values will be appended to the end of this string.","type":"string"},"enableParallelism":{"title":"enableParallelism","description":"If true then this command can be run in parallel, i.e. executed simultaneously for multiple projects.","type":"boolean"},"ignoreDependencyOrder":{"title":"ignoreDependencyOrder","description":"Normally projects will be processed according to their dependency order: a given project will not start processing the command until all of its dependencies have completed. This restriction doesn\'t apply for certain operations, for example, a \\"clean\\" task that deletes output files. In this case you can set \\"ignoreDependencyOrder\\" to true to increase parallelism.","type":"boolean"},"ignoreMissingScript":{"title":"Ignore Missing Script","description":"Normally Rush requires that each project\'s package.json has a \\"scripts\\" entry matching the custom command name. To disable this check, set \\"ignoreMissingScript\\" to true.","type":"boolean"},"incremental":{"title":"Incremental","description":"If true then this command will be incremental like the built-in \\"build\\" and \\"rebuild\\" commands","type":"boolean"},"allowWarningsInSuccessfulBuild":{"title":"Allow Warnings in Successful Build","description":"By default, Rush returns a nonzero exit code if errors or warnings occur during build. If this option is set to \\"true\\", Rush will return a zero exit code if warnings occur.","type":"boolean"},"watchForChanges":{"title":"Watch For Changes","description":"(EXPERIMENTAL) Normally Rush terminates after the command finishes. If this option is set to \\"true\\" Rush will instead enter a loop where it watches the file system for changes to the selected projects. Whenever a change is detected, the command will be invoked again for the changed project and any selected projects that directly or indirectly depend on it. For details, refer to the website article \\"Using watch mode\\".","type":"boolean"},"disableBuildCache":{"title":"Disable build cache.","description":"Disable build cache for this action. This may be useful if this command affects state outside of projects\' own folders.","type":"boolean"}}},{"type":"object","additionalProperties":false,"properties":{"commandKind":{"$ref":"#/definitions/anything"},"name":{"$ref":"#/definitions/anything"},"summary":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"safeForSimultaneousRushProcesses":{"$ref":"#/definitions/anything"},"shellCommand":{"$ref":"#/definitions/anything"},"enableParallelism":{"$ref":"#/definitions/anything"},"ignoreDependencyOrder":{"$ref":"#/definitions/anything"},"ignoreMissingScript":{"$ref":"#/definitions/anything"},"incremental":{"$ref":"#/definitions/anything"},"allowWarningsInSuccessfulBuild":{"$ref":"#/definitions/anything"},"watchForChanges":{"$ref":"#/definitions/anything"},"disableBuildCache":{"$ref":"#/definitions/anything"}}}]},"globalCommand":{"title":"Global Command","description":"A custom command that is run once for the entire repository","type":"object","allOf":[{"$ref":"#/definitions/baseCommand"},{"type":"object","additionalProperties":true,"required":["shellCommand"],"properties":{"commandKind":{"enum":["global"]},"shellCommand":{"title":"Shell Command","description":"A command that that will be invoked using the OS shell. The working directory will be the folder that contains rush.json. Additional command-line parameters may be appended to the end of this string.","type":"string"},"autoinstallerName":{"title":"Autoinstaller Name","description":"If your \\"shellCommand\\" script depends on NPM packages, the recommended best practice is to make it into a regular Rush project that builds using your normal toolchain. In cases where the command needs to work without first having to run \\"rush build\\", the recommended practice is to publish the project to an NPM registry and use common/scripts/install-run.js to launch it.\\n\\nAutoinstallers offer another possibility: They are folders under \\"common/autoinstallers\\" with a package.json file and shrinkwrap file. Rush will automatically invoke the package manager to install these dependencies before an associated command is invoked. Autoinstallers have the advantage that they work even in a branch where \\"rush install\\" is broken, which makes them a good solution for Git hook scripts. But they have the disadvantages of not being buildable projects, and of increasing the overall installation footprint for your monorepo.\\n\\nThe \\"autoinstallerName\\" setting must not contain a path and must be a valid NPM package name.\\n\\nFor example, the name \\"my-task\\" would map to \\"common/autoinstallers/my-task/package.json\\", and the \\"common/autoinstallers/my-task/node_modules/.bin\\" folder would be added to the shell PATH when invoking the \\"shellCommand\\".","type":"string"}}},{"type":"object","additionalProperties":false,"properties":{"commandKind":{"$ref":"#/definitions/anything"},"name":{"$ref":"#/definitions/anything"},"summary":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"safeForSimultaneousRushProcesses":{"$ref":"#/definitions/anything"},"shellCommand":{"$ref":"#/definitions/anything"},"autoinstallerName":{"$ref":"#/definitions/anything"}}}]},"phasedCommand":{"title":"Phased Command","description":"A command that contains multiple phases, that are run separately for each project","type":"object","allOf":[{"$ref":"#/definitions/baseCommand"},{"type":"object","additionalProperties":true,"required":["enableParallelism","phases"],"properties":{"commandKind":{"enum":["phased"]},"enableParallelism":{"title":"enableParallelism","description":"If true then this command can be run in parallel, i.e. executed simultaneously for multiple projects.","type":"boolean"},"incremental":{"title":"Incremental","description":"If true then this command\'s phases will be incremental and support caching.","type":"boolean"},"phases":{"title":"Phases","description":"List the phases associated with this command. Note that phases with dependencies will be implicitly included even if they aren\'t explicitly enumerated in this property.","type":"array","items":{"type":"string"}},"watchOptions":{"title":"Watch Options","description":"Controls the file watching behavior of this command. If not specified, this command does not watch files.","type":"object","additionalProperties":false,"required":["alwaysWatch","watchPhases"],"properties":{"alwaysWatch":{"title":"Always Watch","description":"Indicates that this command will always watch for changes after the initial execution, as if the \\"--watch\\" CLI flag was passed.","type":"boolean"},"debounceMs":{"title":"Debounce Timeout in Milliseconds","description":"When watching, how long to wait after the last encountered file system event before execution. If another file system event occurs in this interval, the timeout will reset. Defaults to 1000ms (1 second).","type":"number"},"watchPhases":{"title":"Watch Phases","description":"List *exactly* the phases that should be run in watch mode for this command. If this property is specified and non-empty, after the phases defined in the \\"phases\\" property run, a file watcher will be started to watch projects for changes, and will run the phases listed in this property on changed projects.","type":"array","items":{"type":"string"}}}},"installOptions":{"title":"Install Options","description":"Controls behavior related to performing installation as part of executing this command.","type":"object","additionalProperties":false,"required":["alwaysInstall"],"properties":{"alwaysInstall":{"title":"Always Install","description":"Indicates that this command will always perform a standard \\"rush install\\" before executing, as if the \\"--install\\" CLI flag was passed.","type":"boolean"}}}}},{"type":"object","additionalProperties":false,"properties":{"commandKind":{"$ref":"#/definitions/anything"},"name":{"$ref":"#/definitions/anything"},"summary":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"safeForSimultaneousRushProcesses":{"$ref":"#/definitions/anything"},"enableParallelism":{"$ref":"#/definitions/anything"},"incremental":{"$ref":"#/definitions/anything"},"phases":{"$ref":"#/definitions/anything"},"watchOptions":{"$ref":"#/definitions/anything"},"installOptions":{"$ref":"#/definitions/anything"}}}]},"phase":{"title":"Phase","description":"A phase, used in the phased command feature.","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"title":"Name","description":"The name of the phase. Note that this value must start with the \\"_phase:\\" prefix.","type":"string"},"dependencies":{"title":"Dependencies","description":"The dependencies of this phase.","type":"object","additionalProperties":false,"properties":{"self":{"title":"Self","description":"Dependency phases within the same project.","type":"array","uniqueItems":true,"items":{"type":"string"}},"upstream":{"title":"Upstream","description":"Dependency phases in upstream projects.","type":"array","uniqueItems":true,"items":{"type":"string"}}}},"ignoreMissingScript":{"title":"Ignore Missing Script","description":"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.","type":"boolean"},"allowWarningsOnSuccess":{"title":"Allow Warnings on Success","description":"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.","type":"boolean"},"missingScriptBehavior":{"title":"Missing Script Behavior","description":"What should happen if a project\'s package.json does not have a \\"scripts\\" entry matching the phase name, or it is an empty string. Supersedes \\"ignoreMissingScript\\". Defaults to \\"error\\".","type":"string","enum":["silent","log","error"]}}},"baseParameter":{"type":"object","additionalProperties":true,"required":["parameterKind","longName","description"],"properties":{"parameterKind":{"title":"Parameter Kind","description":"Indicates the kind of syntax for this command-line parameter: \\"flag\\" or \\"choice\\" or \\"string\\"","type":"string","enum":["flag","choice","string","integer","stringList","integerList","choiceList"]},"longName":{"title":"Long Name","description":"The name of the parameter (e.g. \\"--verbose\\"). This is a required field.","type":"string","pattern":"^-(-[a-z0-9]+)+$"},"shortName":{"title":"Short Name","description":"A optional short form of the parameter (e.g. \\"-v\\" instead of \\"--verbose\\")","type":"string","pattern":"^-[a-zA-Z]$"},"description":{"title":"Custom Parameter Description","description":"A detailed description of the parameter, which appears when requesting help for the command (e.g. \\"rush --help my-command\\").","type":"string"},"associatedCommands":{"title":"Associated Commands","description":"A list of custom commands and/or built-in Rush commands that this parameter may be used with","type":"array","items":{"type":"string"}},"associatedPhases":{"title":"Associated Phases","description":"A list of the names of the phases that this command-line parameter should be provided to.","type":"array","items":{"type":"string"}},"required":{"title":"Required","description":"If true, then this parameter must be included on the command line","type":"boolean"}}},"flagParameter":{"title":"Flag Parameter","description":"A custom command-line parameter whose presence acts as an on/off switch","type":"object","allOf":[{"$ref":"#/definitions/baseParameter"},{"type":"object","additionalProperties":true,"properties":{"parameterKind":{"enum":["flag"]}}},{"type":"object","additionalProperties":false,"properties":{"parameterKind":{"$ref":"#/definitions/anything"},"longName":{"$ref":"#/definitions/anything"},"shortName":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"associatedCommands":{"$ref":"#/definitions/anything"},"associatedPhases":{"$ref":"#/definitions/anything"},"required":{"$ref":"#/definitions/anything"}}}]},"stringParameter":{"title":"String Parameter","description":"A custom command-line parameter whose value is interpreted as a string","type":"object","allOf":[{"$ref":"#/definitions/baseParameter"},{"type":"object","additionalProperties":true,"required":["argumentName"],"properties":{"parameterKind":{"enum":["string"]},"argumentName":{"title":"Argument Name","description":"The name of the argument for this parameter.","type":"string"}}},{"type":"object","additionalProperties":false,"properties":{"parameterKind":{"$ref":"#/definitions/anything"},"longName":{"$ref":"#/definitions/anything"},"shortName":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"associatedCommands":{"$ref":"#/definitions/anything"},"associatedPhases":{"$ref":"#/definitions/anything"},"required":{"$ref":"#/definitions/anything"},"argumentName":{"$ref":"#/definitions/anything"}}}]},"choiceParameter":{"title":"Choice Parameter","description":"A custom command-line parameter whose argument must be chosen from a list of allowable alternatives","type":"object","allOf":[{"$ref":"#/definitions/baseParameter"},{"type":"object","additionalProperties":true,"required":["alternatives"],"properties":{"parameterKind":{"enum":["choice"]},"alternatives":{"title":"Alternatives","description":"A list of alternative argument values that can be chosen for this parameter.","type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["name","description"],"properties":{"name":{"title":"Name of Alternative","description":"A token that is one of the alternatives that can be used with the choice parameter, e.g. \\"vanilla\\" in \\"--flavor vanilla\\"","type":"string"},"description":{"title":"Description of Alternative","description":"A detailed description for the alternative that will be shown in the command-line help.","type":"string"}}}},"defaultValue":{"title":"Default Value","description":"If the parameter is omitted from the command line, this value will be inserted by default","type":"string"}}},{"type":"object","additionalProperties":false,"properties":{"parameterKind":{"$ref":"#/definitions/anything"},"longName":{"$ref":"#/definitions/anything"},"shortName":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"associatedCommands":{"$ref":"#/definitions/anything"},"associatedPhases":{"$ref":"#/definitions/anything"},"required":{"$ref":"#/definitions/anything"},"alternatives":{"$ref":"#/definitions/anything"},"defaultValue":{"$ref":"#/definitions/anything"}}}]},"integerParameter":{"title":"Integer Parameter","description":"A custom command-line parameter whose value is interpreted as a integer","type":"object","allOf":[{"$ref":"#/definitions/baseParameter"},{"type":"object","additionalProperties":true,"required":["argumentName"],"properties":{"parameterKind":{"enum":["integer"]},"argumentName":{"title":"Argument Name","description":"The name of the argument for this parameter.","type":"string"}}},{"type":"object","additionalProperties":false,"properties":{"parameterKind":{"$ref":"#/definitions/anything"},"longName":{"$ref":"#/definitions/anything"},"shortName":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"associatedCommands":{"$ref":"#/definitions/anything"},"associatedPhases":{"$ref":"#/definitions/anything"},"required":{"$ref":"#/definitions/anything"},"argumentName":{"$ref":"#/definitions/anything"}}}]},"stringListParameter":{"title":"String List Parameter","description":"A custom command-line parameter whose value is interpreted as a list of string","type":"object","allOf":[{"$ref":"#/definitions/baseParameter"},{"type":"object","additionalProperties":true,"required":["argumentName"],"properties":{"parameterKind":{"enum":["stringList"]},"argumentName":{"title":"Argument Name","description":"The name of the argument for this parameter.","type":"string"}}},{"type":"object","additionalProperties":false,"properties":{"parameterKind":{"$ref":"#/definitions/anything"},"longName":{"$ref":"#/definitions/anything"},"shortName":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"associatedCommands":{"$ref":"#/definitions/anything"},"associatedPhases":{"$ref":"#/definitions/anything"},"required":{"$ref":"#/definitions/anything"},"argumentName":{"$ref":"#/definitions/anything"}}}]},"integerListParameter":{"title":"Integer List Parameter","description":"A custom command-line parameter whose value is interpreted as a list of integer","type":"object","allOf":[{"$ref":"#/definitions/baseParameter"},{"type":"object","additionalProperties":true,"required":["argumentName"],"properties":{"parameterKind":{"enum":["integerList"]},"argumentName":{"title":"Argument Name","description":"The name of the argument for this parameter.","type":"string"}}},{"type":"object","additionalProperties":false,"properties":{"parameterKind":{"$ref":"#/definitions/anything"},"longName":{"$ref":"#/definitions/anything"},"shortName":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"associatedCommands":{"$ref":"#/definitions/anything"},"associatedPhases":{"$ref":"#/definitions/anything"},"required":{"$ref":"#/definitions/anything"},"argumentName":{"$ref":"#/definitions/anything"}}}]},"choiceListParameter":{"title":"Choice List Parameter","description":"A custom command-line parameter whose argument must be chosen from a list of allowable alternatives, value is interpreted as a list of choice","type":"object","allOf":[{"$ref":"#/definitions/baseParameter"},{"type":"object","additionalProperties":true,"required":["alternatives"],"properties":{"parameterKind":{"enum":["choiceList"]},"alternatives":{"title":"Alternatives","description":"A list of alternative argument values that can be chosen for this parameter.","type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["name","description"],"properties":{"name":{"title":"Name of Alternative","description":"A token that is one of the alternatives that can be used with the choice parameter, e.g. \\"vanilla\\" in \\"--flavor vanilla\\"","type":"string"},"description":{"title":"Description of Alternative","description":"A detailed description for the alternative that will be shown in the command-line help.","type":"string"}}}},"defaultValue":{"title":"Default Value","description":"If the parameter is omitted from the command line, this value will be inserted by default","type":"string"}}},{"type":"object","additionalProperties":false,"properties":{"parameterKind":{"$ref":"#/definitions/anything"},"longName":{"$ref":"#/definitions/anything"},"shortName":{"$ref":"#/definitions/anything"},"description":{"$ref":"#/definitions/anything"},"associatedCommands":{"$ref":"#/definitions/anything"},"associatedPhases":{"$ref":"#/definitions/anything"},"required":{"$ref":"#/definitions/anything"},"alternatives":{"$ref":"#/definitions/anything"},"defaultValue":{"$ref":"#/definitions/anything"}}}]}},"type":"object","additionalProperties":false,"properties":{"$schema":{"description":"Part of the JSON Schema standard, this optional keyword declares the URL of the schema that the file conforms to. Editors may download the schema and use it to perform syntax highlighting.","type":"string"},"commands":{"title":"Custom Commands","description":"A list of custom commands that affect all projects in the repository. These commands are invoked from the Rush command line.","type":"array","items":{"type":"object","oneOf":[{"$ref":"#/definitions/bulkCommand"},{"$ref":"#/definitions/globalCommand"},{"$ref":"#/definitions/phasedCommand"}]}},"phases":{"title":"Phases","description":"A list of phases that are associated with phased commands.","type":"array","items":{"$ref":"#/definitions/phase"}},"parameters":{"title":"Custom Parameters","description":"A list of custom command-line parameters that can be associated with custom commands and Rush\'s built-in commands.","type":"array","items":{"type":"object","oneOf":[{"$ref":"#/definitions/flagParameter"},{"$ref":"#/definitions/choiceParameter"},{"$ref":"#/definitions/stringParameter"},{"$ref":"#/definitions/integerParameter"},{"$ref":"#/definitions/stringListParameter"},{"$ref":"#/definitions/integerListParameter"},{"$ref":"#/definitions/choiceListParameter"}]}}}}');
23325
23367
 
23326
23368
  /***/ }),
23327
23369
 
@@ -23361,7 +23403,7 @@ module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#
23361
23403
  \****************************************************/
23362
23404
  /***/ ((module) => {
23363
23405
 
23364
- module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"Rush experiments.json config file","description":"For use with the Rush tool, this file allows repo maintainers to enable and disable experimental Rush features.","type":"object","properties":{"$schema":{"description":"Part of the JSON Schema standard, this optional keyword declares the URL of the schema that the file conforms to. Editors may download the schema and use it to perform syntax highlighting.","type":"string"},"usePnpmFrozenLockfileForRushInstall":{"description":"By default, \'rush install\' passes --no-prefer-frozen-lockfile to \'pnpm install\'. Set this option to true to pass \'--frozen-lockfile\' instead.","type":"boolean"},"usePnpmPreferFrozenLockfileForRushUpdate":{"description":"By default, \'rush update\' passes --no-prefer-frozen-lockfile to \'pnpm install\'. Set this option to true to pass \'--prefer-frozen-lockfile\' instead.","type":"boolean"},"omitImportersFromPreventManualShrinkwrapChanges":{"description":"If using the \'preventManualShrinkwrapChanges\' option, only prevent manual changes to the total set of external dependencies referenced by the repository, not which projects reference which dependencies. This offers a balance between lockfile integrity and merge conflicts.","type":"boolean"},"noChmodFieldInTarHeaderNormalization":{"description":"If true, the chmod field in temporary project tar headers will not be normalized. This normalization can help ensure consistent tarball integrity across platforms.","type":"boolean"},"buildCacheWithAllowWarningsInSuccessfulBuild":{"description":"If true, build caching will respect the allowWarningsInSuccessfulBuild flag and cache builds with warnings. This will not replay warnings from the cached build.","type":"boolean"},"phasedCommands":{"description":"If true, the phased commands feature is enabled. To use this feature, create a \\"phased\\" command in common/config/rush/command-line.json.","type":"boolean"},"cleanInstallAfterNpmrcChanges":{"description":"If true, perform a clean install after when running `rush install` or `rush update` if the `.npmrc` file has changed since the last install.","type":"boolean"},"printEventHooksOutputToConsole":{"description":"If true, print the outputs of shell commands defined in event hooks to the console.","type":"boolean"}},"additionalProperties":false}');
23406
+ module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"Rush experiments.json config file","description":"For use with the Rush tool, this file allows repo maintainers to enable and disable experimental Rush features.","type":"object","properties":{"$schema":{"description":"Part of the JSON Schema standard, this optional keyword declares the URL of the schema that the file conforms to. Editors may download the schema and use it to perform syntax highlighting.","type":"string"},"usePnpmFrozenLockfileForRushInstall":{"description":"By default, \'rush install\' passes --no-prefer-frozen-lockfile to \'pnpm install\'. Set this option to true to pass \'--frozen-lockfile\' instead.","type":"boolean"},"usePnpmPreferFrozenLockfileForRushUpdate":{"description":"By default, \'rush update\' passes --no-prefer-frozen-lockfile to \'pnpm install\'. Set this option to true to pass \'--prefer-frozen-lockfile\' instead.","type":"boolean"},"omitImportersFromPreventManualShrinkwrapChanges":{"description":"If using the \'preventManualShrinkwrapChanges\' option, only prevent manual changes to the total set of external dependencies referenced by the repository, not which projects reference which dependencies. This offers a balance between lockfile integrity and merge conflicts.","type":"boolean"},"noChmodFieldInTarHeaderNormalization":{"description":"If true, the chmod field in temporary project tar headers will not be normalized. This normalization can help ensure consistent tarball integrity across platforms.","type":"boolean"},"buildCacheWithAllowWarningsInSuccessfulBuild":{"description":"If true, build caching will respect the allowWarningsInSuccessfulBuild flag and cache builds with warnings. This will not replay warnings from the cached build.","type":"boolean"},"phasedCommands":{"description":"If true, the phased commands feature is enabled. To use this feature, create a \\"phased\\" command in common/config/rush/command-line.json.","type":"boolean"},"cleanInstallAfterNpmrcChanges":{"description":"If true, perform a clean install after when running `rush install` or `rush update` if the `.npmrc` file has changed since the last install.","type":"boolean"},"printEventHooksOutputToConsole":{"description":"If true, print the outputs of shell commands defined in event hooks to the console.","type":"boolean"},"forbidPhantomResolvableNodeModulesFolders":{"description":"If true, Rush will not allow node_modules in the repo folder or in parent folders.","type":"boolean"}},"additionalProperties":false}');
23365
23407
 
23366
23408
  /***/ }),
23367
23409