@rushstack/rush-http-build-cache-plugin 5.97.1-pr3481.18 → 5.97.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.heft/build-cache/jest-cache/haste-map-bae913f9b9aa720eb4deeae0a60a4b27-22ae7f4ce9de4306889d8c05e5cc39b9-f6b1af01a3130057bdfe3d86807211f9 +0 -0
- package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/{42/Import_42731f0220476b7d949a2d8f3a6f3333 → 12/Import_12af6d2ca109ffba883fc5079062e0e8} +157 -14
- package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/{26/package_263c59db6933ba9581588638fb19da5c → 2f/package_2f923ac6ad9bbd4966f8472750ef7770} +2 -2
- package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/{58/index_58c57a8f2a96bf6fdf5db35a2e44baa7 → 53/index_53d9d5a344c3984994c801733764f503} +3 -2
- package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/{fa/rushlib_fa830331d24a41292b5cb91040384188 → 68/rushlib_68c59fa059ba441c9c6883bcfed4a8d2} +12 -34
- package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/{c7/commons_c77bee95093c1098b4a591f2dadf398d → 9d/commons_9d513d1d600f9112f73547da918dcbb7} +622 -2238
- package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/{c2/Async_c2ea5cc2edc0a460dcf394ef8277e88e → b4/Async_b43c9d64ab6a035dbce65b9f1a28e166} +78 -2
- package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/ce/index_ce3464019fb882539ee9a6f3e36e615a +2 -2
- package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/ce/index_ce3464019fb882539ee9a6f3e36e615a.map +1 -1
- package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/e5/HttpBuildCacheProvider_e53bd002cf44ae62693f20b8c4682941 +2 -2
- package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/e5/HttpBuildCacheProvider_e53bd002cf44ae62693f20b8c4682941.map +1 -1
- package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/e6/RushHttpBuildCachePlugin_e69b4b7cd4f95aa49455690c88f00247 +2 -2
- package/.heft/build-cache/jest-cache/jest-transform-cache-bae913f9b9aa720eb4deeae0a60a4b27-474488b31a4a940a3990e9eaf06f1647/e6/RushHttpBuildCachePlugin_e69b4b7cd4f95aa49455690c88f00247.map +1 -1
- package/.heft/build-cache/jest-cache/perf-cache-bae913f9b9aa720eb4deeae0a60a4b27-da39a3ee5e6b4b0d3255bfef95601890 +1 -1
- package/.rush/temp/operation/_phase_build/state.json +1 -1
- package/.rush/temp/operation/_phase_test/all.log +29 -0
- package/.rush/temp/operation/_phase_test/state.json +1 -1
- package/.rush/temp/package-deps__phase_build.json +2 -2
- package/.rush/temp/package-deps__phase_test.json +2 -2
- package/.rush/temp/rushstack+rush-http-build-cache-plugin-_phase_build-646439b80a2010050f5b4b8a916e50afae04c3ab.log +10 -0
- package/.rush/temp/shrinkwrap-deps.json +10 -10
- package/package.json +6 -6
- package/rush-logs/rush-http-build-cache-plugin._phase_build.log +4 -23
- package/rush-logs/rush-http-build-cache-plugin._phase_test.log +4 -4
- package/temp/coverage/clover.xml +2 -2
- package/temp/coverage/lcov-report/HttpBuildCacheProvider.ts.html +1 -1
- package/temp/coverage/lcov-report/RushHttpBuildCachePlugin.ts.html +1 -1
- package/temp/coverage/lcov-report/index.html +1 -1
- package/temp/coverage/lcov-report/index.ts.html +1 -1
- package/.rush/temp/rushstack+rush-http-build-cache-plugin-_phase_build-5e3cfa01506c2ac77af487ee9732b935a5bbe122.log +0 -27
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
6d75f3ef970a9c06c0cdc6c33cb8954c
|
|
2
2
|
"use strict";
|
|
3
3
|
exports.id = "commons";
|
|
4
4
|
exports.ids = ["commons"];
|
|
@@ -551,93 +551,6 @@ class ChangeManager {
|
|
|
551
551
|
|
|
552
552
|
/***/ }),
|
|
553
553
|
|
|
554
|
-
/***/ 13111:
|
|
555
|
-
/*!************************************************!*\
|
|
556
|
-
!*** ./lib-esnext/api/CobuildConfiguration.js ***!
|
|
557
|
-
\************************************************/
|
|
558
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
559
|
-
|
|
560
|
-
__webpack_require__.r(__webpack_exports__);
|
|
561
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
562
|
-
/* harmony export */ "CobuildConfiguration": () => (/* binding */ CobuildConfiguration)
|
|
563
|
-
/* harmony export */ });
|
|
564
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ 371017);
|
|
565
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
|
566
|
-
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @rushstack/node-core-library */ 132939);
|
|
567
|
-
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__);
|
|
568
|
-
/* harmony import */ var _schemas_cobuild_schema_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../schemas/cobuild.schema.json */ 222518);
|
|
569
|
-
/* harmony import */ var _EnvironmentConfiguration__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./EnvironmentConfiguration */ 382806);
|
|
570
|
-
/* harmony import */ var _logic_RushConstants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../logic/RushConstants */ 951904);
|
|
571
|
-
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
572
|
-
// See LICENSE in the project root for license information.
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
/**
|
|
579
|
-
* Use this class to load and save the "common/config/rush/cobuild.json" config file.
|
|
580
|
-
* This file provides configuration options for the Rush Cobuild feature.
|
|
581
|
-
* @beta
|
|
582
|
-
*/
|
|
583
|
-
class CobuildConfiguration {
|
|
584
|
-
constructor(options) {
|
|
585
|
-
var _a, _b;
|
|
586
|
-
const { cobuildJson } = options;
|
|
587
|
-
this.cobuildEnabled = (_a = _EnvironmentConfiguration__WEBPACK_IMPORTED_MODULE_2__.EnvironmentConfiguration.cobuildEnabled) !== null && _a !== void 0 ? _a : cobuildJson.cobuildEnabled;
|
|
588
|
-
this.cobuildContextId = _EnvironmentConfiguration__WEBPACK_IMPORTED_MODULE_2__.EnvironmentConfiguration.cobuildContextId;
|
|
589
|
-
this.cobuildLeafProjectLogOnlyAllowed =
|
|
590
|
-
(_b = _EnvironmentConfiguration__WEBPACK_IMPORTED_MODULE_2__.EnvironmentConfiguration.cobuildLeafProjectLogOnlyAllowed) !== null && _b !== void 0 ? _b : false;
|
|
591
|
-
if (!this.cobuildContextId) {
|
|
592
|
-
this.cobuildEnabled = false;
|
|
593
|
-
}
|
|
594
|
-
const cobuildLockProviderFactory = options.rushSession.getCobuildLockProviderFactory(cobuildJson.cobuildLockProvider);
|
|
595
|
-
if (!cobuildLockProviderFactory) {
|
|
596
|
-
throw new Error(`Unexpected cobuild lock provider: ${cobuildJson.cobuildLockProvider}`);
|
|
597
|
-
}
|
|
598
|
-
this.cobuildLockProvider = cobuildLockProviderFactory(cobuildJson);
|
|
599
|
-
}
|
|
600
|
-
/**
|
|
601
|
-
* Attempts to load the cobuild.json data from the standard file path `common/config/rush/cobuild.json`.
|
|
602
|
-
* If the file has not been created yet, then undefined is returned.
|
|
603
|
-
*/
|
|
604
|
-
static async tryLoadAsync(terminal, rushConfiguration, rushSession) {
|
|
605
|
-
const jsonFilePath = CobuildConfiguration.getCobuildConfigFilePath(rushConfiguration);
|
|
606
|
-
if (!_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.FileSystem.exists(jsonFilePath)) {
|
|
607
|
-
return undefined;
|
|
608
|
-
}
|
|
609
|
-
return await CobuildConfiguration._loadAsync(jsonFilePath, terminal, rushConfiguration, rushSession);
|
|
610
|
-
}
|
|
611
|
-
static getCobuildConfigFilePath(rushConfiguration) {
|
|
612
|
-
return path__WEBPACK_IMPORTED_MODULE_0__.resolve(rushConfiguration.commonRushConfigFolder, _logic_RushConstants__WEBPACK_IMPORTED_MODULE_3__.RushConstants.cobuildFilename);
|
|
613
|
-
}
|
|
614
|
-
static async _loadAsync(jsonFilePath, terminal, rushConfiguration, rushSession) {
|
|
615
|
-
const cobuildJson = await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.JsonFile.loadAndValidateAsync(jsonFilePath, CobuildConfiguration._jsonSchema);
|
|
616
|
-
return new CobuildConfiguration({
|
|
617
|
-
cobuildJson,
|
|
618
|
-
rushConfiguration,
|
|
619
|
-
rushSession
|
|
620
|
-
});
|
|
621
|
-
}
|
|
622
|
-
get contextId() {
|
|
623
|
-
return this.cobuildContextId;
|
|
624
|
-
}
|
|
625
|
-
async connectLockProviderAsync() {
|
|
626
|
-
if (this.cobuildEnabled) {
|
|
627
|
-
await this.cobuildLockProvider.connectAsync();
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
async disconnectLockProviderAsync() {
|
|
631
|
-
if (this.cobuildEnabled) {
|
|
632
|
-
await this.cobuildLockProvider.disconnectAsync();
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
CobuildConfiguration._jsonSchema = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.JsonSchema.fromLoadedObject(_schemas_cobuild_schema_json__WEBPACK_IMPORTED_MODULE_4__);
|
|
637
|
-
//# sourceMappingURL=CobuildConfiguration.js.map
|
|
638
|
-
|
|
639
|
-
/***/ }),
|
|
640
|
-
|
|
641
554
|
/***/ 563114:
|
|
642
555
|
/*!****************************************************!*\
|
|
643
556
|
!*** ./lib-esnext/api/CommandLineConfiguration.js ***!
|
|
@@ -1361,29 +1274,6 @@ const EnvironmentVariableNames = {
|
|
|
1361
1274
|
* this environment variable is ignored.
|
|
1362
1275
|
*/
|
|
1363
1276
|
RUSH_BUILD_CACHE_WRITE_ALLOWED: 'RUSH_BUILD_CACHE_WRITE_ALLOWED',
|
|
1364
|
-
/**
|
|
1365
|
-
* Setting this environment variable overrides the value of `cobuildEnabled` in the `cobuild.json`
|
|
1366
|
-
* configuration file.
|
|
1367
|
-
*
|
|
1368
|
-
* @remarks
|
|
1369
|
-
* Specify `1` to enable the cobuild or `0` to disable it.
|
|
1370
|
-
*
|
|
1371
|
-
* If there is no cobuild configured, then this environment variable is ignored.
|
|
1372
|
-
*/
|
|
1373
|
-
RUSH_COBUILD_ENABLED: 'RUSH_COBUILD_ENABLED',
|
|
1374
|
-
/**
|
|
1375
|
-
* Setting this environment variable opt into running with cobuilds.
|
|
1376
|
-
*
|
|
1377
|
-
* @remarks
|
|
1378
|
-
* If there is no cobuild configured, then this environment variable is ignored.
|
|
1379
|
-
*/
|
|
1380
|
-
RUSH_COBUILD_CONTEXT_ID: 'RUSH_COBUILD_CONTEXT_ID',
|
|
1381
|
-
/**
|
|
1382
|
-
* If this variable is set to "1", When getting distributed builds, Rush will automatically handle the leaf project
|
|
1383
|
-
* with build cache "disabled" by writing to the cache in a special "log files only mode". This is useful when you
|
|
1384
|
-
* want to use Cobuilds to improve the performance in CI validations and the leaf projects have not enabled cache.
|
|
1385
|
-
*/
|
|
1386
|
-
RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED: 'RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED',
|
|
1387
1277
|
/**
|
|
1388
1278
|
* Explicitly specifies the path for the Git binary that is invoked by certain Rush operations.
|
|
1389
1279
|
*/
|
|
@@ -1500,30 +1390,6 @@ class EnvironmentConfiguration {
|
|
|
1500
1390
|
EnvironmentConfiguration._ensureValidated();
|
|
1501
1391
|
return EnvironmentConfiguration._buildCacheWriteAllowed;
|
|
1502
1392
|
}
|
|
1503
|
-
/**
|
|
1504
|
-
* If set, enables or disables the cobuild feature.
|
|
1505
|
-
* See {@link EnvironmentVariableNames.RUSH_COBUILD_ENABLED}
|
|
1506
|
-
*/
|
|
1507
|
-
static get cobuildEnabled() {
|
|
1508
|
-
EnvironmentConfiguration._ensureValidated();
|
|
1509
|
-
return EnvironmentConfiguration._cobuildEnabled;
|
|
1510
|
-
}
|
|
1511
|
-
/**
|
|
1512
|
-
* Provides a determined cobuild context id if configured
|
|
1513
|
-
* See {@link EnvironmentVariableNames.RUSH_COBUILD_CONTEXT_ID}
|
|
1514
|
-
*/
|
|
1515
|
-
static get cobuildContextId() {
|
|
1516
|
-
EnvironmentConfiguration._ensureValidated();
|
|
1517
|
-
return EnvironmentConfiguration._cobuildContextId;
|
|
1518
|
-
}
|
|
1519
|
-
/**
|
|
1520
|
-
* If set, enables or disables the cobuild leaf project log only feature.
|
|
1521
|
-
* See {@link EnvironmentVariableNames.RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED}
|
|
1522
|
-
*/
|
|
1523
|
-
static get cobuildLeafProjectLogOnlyAllowed() {
|
|
1524
|
-
EnvironmentConfiguration._ensureValidated();
|
|
1525
|
-
return EnvironmentConfiguration._cobuildLeafProjectLogOnlyAllowed;
|
|
1526
|
-
}
|
|
1527
1393
|
/**
|
|
1528
1394
|
* Allows the git binary path to be explicitly provided.
|
|
1529
1395
|
* See {@link EnvironmentVariableNames.RUSH_GIT_BINARY_PATH}
|
|
@@ -1625,20 +1491,6 @@ class EnvironmentConfiguration {
|
|
|
1625
1491
|
EnvironmentConfiguration.parseBooleanEnvironmentVariable(EnvironmentVariableNames.RUSH_BUILD_CACHE_WRITE_ALLOWED, value);
|
|
1626
1492
|
break;
|
|
1627
1493
|
}
|
|
1628
|
-
case EnvironmentVariableNames.RUSH_COBUILD_ENABLED: {
|
|
1629
|
-
EnvironmentConfiguration._cobuildEnabled =
|
|
1630
|
-
EnvironmentConfiguration.parseBooleanEnvironmentVariable(EnvironmentVariableNames.RUSH_COBUILD_ENABLED, value);
|
|
1631
|
-
break;
|
|
1632
|
-
}
|
|
1633
|
-
case EnvironmentVariableNames.RUSH_COBUILD_CONTEXT_ID: {
|
|
1634
|
-
EnvironmentConfiguration._cobuildContextId = value;
|
|
1635
|
-
break;
|
|
1636
|
-
}
|
|
1637
|
-
case EnvironmentVariableNames.RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED: {
|
|
1638
|
-
EnvironmentConfiguration._cobuildLeafProjectLogOnlyAllowed =
|
|
1639
|
-
EnvironmentConfiguration.parseBooleanEnvironmentVariable(EnvironmentVariableNames.RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED, value);
|
|
1640
|
-
break;
|
|
1641
|
-
}
|
|
1642
1494
|
case EnvironmentVariableNames.RUSH_GIT_BINARY_PATH: {
|
|
1643
1495
|
EnvironmentConfiguration._gitBinaryPath = value;
|
|
1644
1496
|
break;
|
|
@@ -1874,14 +1726,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1874
1726
|
/* harmony export */ "LastInstallFlag": () => (/* binding */ LastInstallFlag),
|
|
1875
1727
|
/* harmony export */ "LastInstallFlagFactory": () => (/* binding */ LastInstallFlagFactory)
|
|
1876
1728
|
/* harmony export */ });
|
|
1877
|
-
/* harmony import */ var
|
|
1878
|
-
/* harmony import */ var
|
|
1879
|
-
/* harmony import */ var
|
|
1729
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ 371017);
|
|
1730
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
|
1731
|
+
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @rushstack/node-core-library */ 132939);
|
|
1732
|
+
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__);
|
|
1880
1733
|
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
1881
1734
|
// See LICENSE in the project root for license information.
|
|
1882
1735
|
|
|
1883
1736
|
|
|
1884
|
-
const lodash =
|
|
1737
|
+
const lodash = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Import.lazy('lodash', require);
|
|
1885
1738
|
const LAST_INSTALL_FLAG_FILE_NAME = 'last-install.flag';
|
|
1886
1739
|
/**
|
|
1887
1740
|
* A helper class for managing last-install flags, which are persistent and
|
|
@@ -1890,9 +1743,17 @@ const LAST_INSTALL_FLAG_FILE_NAME = 'last-install.flag';
|
|
|
1890
1743
|
* it can invalidate the last install.
|
|
1891
1744
|
* @internal
|
|
1892
1745
|
*/
|
|
1893
|
-
class LastInstallFlag
|
|
1746
|
+
class LastInstallFlag {
|
|
1747
|
+
/**
|
|
1748
|
+
* Creates a new LastInstall flag
|
|
1749
|
+
* @param folderPath - the folder that this flag is managing
|
|
1750
|
+
* @param state - optional, the state that should be managed or compared
|
|
1751
|
+
*/
|
|
1752
|
+
constructor(folderPath, state = {}) {
|
|
1753
|
+
this.path = path__WEBPACK_IMPORTED_MODULE_0__.join(folderPath, this.flagName);
|
|
1754
|
+
this._state = state;
|
|
1755
|
+
}
|
|
1894
1756
|
/**
|
|
1895
|
-
* @override
|
|
1896
1757
|
* Returns true if the file exists and the contents match the current state.
|
|
1897
1758
|
*/
|
|
1898
1759
|
isValid(options) {
|
|
@@ -1910,12 +1771,12 @@ class LastInstallFlag extends _base_BaseFlag__WEBPACK_IMPORTED_MODULE_1__.BaseFl
|
|
|
1910
1771
|
_isValid(checkValidAndReportStoreIssues, { rushVerb = 'update', statePropertiesToIgnore } = {}) {
|
|
1911
1772
|
let oldState;
|
|
1912
1773
|
try {
|
|
1913
|
-
oldState =
|
|
1774
|
+
oldState = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.JsonFile.load(this.path);
|
|
1914
1775
|
}
|
|
1915
1776
|
catch (err) {
|
|
1916
1777
|
return false;
|
|
1917
1778
|
}
|
|
1918
|
-
const newState = this._state;
|
|
1779
|
+
const newState = Object.assign({}, this._state);
|
|
1919
1780
|
if (statePropertiesToIgnore) {
|
|
1920
1781
|
for (const optionToIgnore of statePropertiesToIgnore) {
|
|
1921
1782
|
delete newState[optionToIgnore];
|
|
@@ -1930,10 +1791,10 @@ class LastInstallFlag extends _base_BaseFlag__WEBPACK_IMPORTED_MODULE_1__.BaseFl
|
|
|
1930
1791
|
// Only throw an error if the package manager hasn't changed from PNPM
|
|
1931
1792
|
oldState.packageManager === pkgManager) {
|
|
1932
1793
|
const normalizedOldStorePath = oldState.storePath
|
|
1933
|
-
?
|
|
1794
|
+
? _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Path.convertToPlatformDefault(oldState.storePath)
|
|
1934
1795
|
: '<global>';
|
|
1935
1796
|
const normalizedNewStorePath = newState.storePath
|
|
1936
|
-
?
|
|
1797
|
+
? _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Path.convertToPlatformDefault(newState.storePath)
|
|
1937
1798
|
: '<global>';
|
|
1938
1799
|
if (
|
|
1939
1800
|
// Throw if the store path changed
|
|
@@ -1944,33 +1805,26 @@ class LastInstallFlag extends _base_BaseFlag__WEBPACK_IMPORTED_MODULE_1__.BaseFl
|
|
|
1944
1805
|
`New Path: ${normalizedNewStorePath}`);
|
|
1945
1806
|
}
|
|
1946
1807
|
}
|
|
1947
|
-
// check ignoreScripts
|
|
1948
|
-
if (newState.ignoreScripts !== oldState.ignoreScripts) {
|
|
1949
|
-
return false;
|
|
1950
|
-
}
|
|
1951
|
-
else {
|
|
1952
|
-
// full install
|
|
1953
|
-
if (!newState.selectedProjectNames && !oldState.selectedProjectNames) {
|
|
1954
|
-
return true;
|
|
1955
|
-
}
|
|
1956
|
-
}
|
|
1957
|
-
// check whether new selected projects are installed
|
|
1958
|
-
if (newState.selectedProjectNames) {
|
|
1959
|
-
if (!oldState.selectedProjectNames) {
|
|
1960
|
-
// used to be a full install
|
|
1961
|
-
return true;
|
|
1962
|
-
}
|
|
1963
|
-
else if (lodash.difference(newState.selectedProjectNames, oldState.selectedProjectNames).length === 0) {
|
|
1964
|
-
// current selected projects are included in old selected projects
|
|
1965
|
-
return true;
|
|
1966
|
-
}
|
|
1967
|
-
}
|
|
1968
1808
|
}
|
|
1969
1809
|
}
|
|
1970
1810
|
return false;
|
|
1971
1811
|
}
|
|
1972
1812
|
return true;
|
|
1973
1813
|
}
|
|
1814
|
+
/**
|
|
1815
|
+
* Writes the flag file to disk with the current state
|
|
1816
|
+
*/
|
|
1817
|
+
create() {
|
|
1818
|
+
_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.JsonFile.save(this._state, this.path, {
|
|
1819
|
+
ensureFolderExists: true
|
|
1820
|
+
});
|
|
1821
|
+
}
|
|
1822
|
+
/**
|
|
1823
|
+
* Removes the flag file
|
|
1824
|
+
*/
|
|
1825
|
+
clear() {
|
|
1826
|
+
_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.FileSystem.deleteFile(this.path);
|
|
1827
|
+
}
|
|
1974
1828
|
/**
|
|
1975
1829
|
* Returns the name of the flag file
|
|
1976
1830
|
*/
|
|
@@ -2002,26 +1856,6 @@ class LastInstallFlagFactory {
|
|
|
2002
1856
|
}
|
|
2003
1857
|
return new LastInstallFlag(rushConfiguration.commonTempFolder, currentState);
|
|
2004
1858
|
}
|
|
2005
|
-
/**
|
|
2006
|
-
* Gets the LastInstall flag and sets the current state. This state is used to compare
|
|
2007
|
-
* against the last-known-good state tracked by the LastInstall flag.
|
|
2008
|
-
* @param rushConfiguration - the configuration of the Rush repo to get the install
|
|
2009
|
-
* state from
|
|
2010
|
-
*
|
|
2011
|
-
* @internal
|
|
2012
|
-
*/
|
|
2013
|
-
static getCommonTempSplitFlag(rushConfiguration) {
|
|
2014
|
-
const currentState = {
|
|
2015
|
-
node: process.versions.node,
|
|
2016
|
-
packageManager: rushConfiguration.packageManager,
|
|
2017
|
-
packageManagerVersion: rushConfiguration.packageManagerToolVersion,
|
|
2018
|
-
rushJsonFolder: rushConfiguration.rushJsonFolder
|
|
2019
|
-
};
|
|
2020
|
-
if (currentState.packageManager === 'pnpm' && rushConfiguration.pnpmOptions) {
|
|
2021
|
-
currentState.storePath = rushConfiguration.pnpmOptions.pnpmStorePath;
|
|
2022
|
-
}
|
|
2023
|
-
return new LastInstallFlag(rushConfiguration.commonTempSplitFolder, currentState);
|
|
2024
|
-
}
|
|
2025
1859
|
}
|
|
2026
1860
|
//# sourceMappingURL=LastInstallFlag.js.map
|
|
2027
1861
|
|
|
@@ -2039,9 +1873,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2039
1873
|
/* harmony export */ "LastLinkFlag": () => (/* binding */ LastLinkFlag),
|
|
2040
1874
|
/* harmony export */ "LastLinkFlagFactory": () => (/* binding */ LastLinkFlagFactory)
|
|
2041
1875
|
/* harmony export */ });
|
|
1876
|
+
/* harmony import */ var _LastInstallFlag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LastInstallFlag */ 919846);
|
|
2042
1877
|
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @rushstack/node-core-library */ 132939);
|
|
2043
1878
|
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__);
|
|
2044
|
-
/* harmony import */ var _base_BaseFlag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base/BaseFlag */ 192765);
|
|
2045
1879
|
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
2046
1880
|
// See LICENSE in the project root for license information.
|
|
2047
1881
|
|
|
@@ -2052,7 +1886,20 @@ const LAST_LINK_FLAG_FILE_NAME = 'last-link.flag';
|
|
|
2052
1886
|
* indicates that linking was completed successfully.
|
|
2053
1887
|
* @internal
|
|
2054
1888
|
*/
|
|
2055
|
-
class LastLinkFlag extends
|
|
1889
|
+
class LastLinkFlag extends _LastInstallFlag__WEBPACK_IMPORTED_MODULE_1__.LastInstallFlag {
|
|
1890
|
+
/**
|
|
1891
|
+
* @override
|
|
1892
|
+
*/
|
|
1893
|
+
isValid() {
|
|
1894
|
+
let oldState;
|
|
1895
|
+
try {
|
|
1896
|
+
oldState = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.JsonFile.load(this.path);
|
|
1897
|
+
}
|
|
1898
|
+
catch (err) {
|
|
1899
|
+
// Swallow error
|
|
1900
|
+
}
|
|
1901
|
+
return !!oldState;
|
|
1902
|
+
}
|
|
2056
1903
|
/**
|
|
2057
1904
|
* @override
|
|
2058
1905
|
*/
|
|
@@ -2625,7 +2472,6 @@ const knownRushConfigFilenames = [
|
|
|
2625
2472
|
_logic_RushConstants__WEBPACK_IMPORTED_MODULE_4__.RushConstants.artifactoryFilename,
|
|
2626
2473
|
_logic_RushConstants__WEBPACK_IMPORTED_MODULE_4__.RushConstants.browserApprovedPackagesFilename,
|
|
2627
2474
|
_logic_RushConstants__WEBPACK_IMPORTED_MODULE_4__.RushConstants.buildCacheFilename,
|
|
2628
|
-
_logic_RushConstants__WEBPACK_IMPORTED_MODULE_4__.RushConstants.cobuildFilename,
|
|
2629
2475
|
_logic_RushConstants__WEBPACK_IMPORTED_MODULE_4__.RushConstants.commandLineFilename,
|
|
2630
2476
|
_logic_RushConstants__WEBPACK_IMPORTED_MODULE_4__.RushConstants.commonVersionsFilename,
|
|
2631
2477
|
_logic_RushConstants__WEBPACK_IMPORTED_MODULE_4__.RushConstants.experimentsFilename,
|
|
@@ -2676,7 +2522,6 @@ class RushConfiguration {
|
|
|
2676
2522
|
this.commonTempFolder =
|
|
2677
2523
|
_EnvironmentConfiguration__WEBPACK_IMPORTED_MODULE_5__.EnvironmentConfiguration.rushTempFolderOverride ||
|
|
2678
2524
|
path__WEBPACK_IMPORTED_MODULE_0__.join(this.commonFolder, _logic_RushConstants__WEBPACK_IMPORTED_MODULE_4__.RushConstants.rushTempFolderName);
|
|
2679
|
-
this.commonTempSplitFolder = path__WEBPACK_IMPORTED_MODULE_0__.join(this.commonFolder, _logic_RushConstants__WEBPACK_IMPORTED_MODULE_4__.RushConstants.rushTempSplitFolderName);
|
|
2680
2525
|
this.commonScriptsFolder = path__WEBPACK_IMPORTED_MODULE_0__.join(this.commonFolder, 'scripts');
|
|
2681
2526
|
this.npmCacheFolder = path__WEBPACK_IMPORTED_MODULE_0__.resolve(path__WEBPACK_IMPORTED_MODULE_0__.join(this.commonTempFolder, 'npm-cache'));
|
|
2682
2527
|
this.npmTmpFolder = path__WEBPACK_IMPORTED_MODULE_0__.resolve(path__WEBPACK_IMPORTED_MODULE_0__.join(this.commonTempFolder, 'npm-tmp'));
|
|
@@ -2685,7 +2530,6 @@ class RushConfiguration {
|
|
|
2685
2530
|
this.currentVariantJsonFilename = path__WEBPACK_IMPORTED_MODULE_0__.join(this.commonTempFolder, 'current-variant.json');
|
|
2686
2531
|
this.suppressNodeLtsWarning = !!rushConfigurationJson.suppressNodeLtsWarning;
|
|
2687
2532
|
this.ensureConsistentVersions = !!rushConfigurationJson.ensureConsistentVersions;
|
|
2688
|
-
this._filteredProjectsCache = new Map();
|
|
2689
2533
|
const experimentsConfigFile = path__WEBPACK_IMPORTED_MODULE_0__.join(this.commonRushConfigFolder, _logic_RushConstants__WEBPACK_IMPORTED_MODULE_4__.RushConstants.experimentsFilename);
|
|
2690
2534
|
this.experimentsConfiguration = new _ExperimentsConfiguration__WEBPACK_IMPORTED_MODULE_6__.ExperimentsConfiguration(experimentsConfigFile);
|
|
2691
2535
|
const rushPluginsConfigFilename = path__WEBPACK_IMPORTED_MODULE_0__.join(this.commonRushConfigFolder, _logic_RushConstants__WEBPACK_IMPORTED_MODULE_4__.RushConstants.rushPluginsConfigFilename);
|
|
@@ -2744,10 +2588,6 @@ class RushConfiguration {
|
|
|
2744
2588
|
this.packageManagerWrapper = new _packageManager_YarnPackageManager__WEBPACK_IMPORTED_MODULE_13__.YarnPackageManager(this.packageManagerToolVersion);
|
|
2745
2589
|
}
|
|
2746
2590
|
this.shrinkwrapFilename = this.packageManagerWrapper.shrinkwrapFilename;
|
|
2747
|
-
/// From "pnpm-lock.yaml" --> "split-workspace-pnpm-lock.yaml"
|
|
2748
|
-
const shrinkwrapFilenameParsedPath = path__WEBPACK_IMPORTED_MODULE_0__.parse(this.shrinkwrapFilename);
|
|
2749
|
-
this.splitWorkspaceShrinkwrapFilename = path__WEBPACK_IMPORTED_MODULE_0__.join(shrinkwrapFilenameParsedPath.dir, 'split-workspace-' + shrinkwrapFilenameParsedPath.name + shrinkwrapFilenameParsedPath.ext);
|
|
2750
|
-
this.tempSplitWorkspaceShrinkwrapFilename = path__WEBPACK_IMPORTED_MODULE_0__.join(this.commonTempSplitFolder, this.shrinkwrapFilename);
|
|
2751
2591
|
this.tempShrinkwrapFilename = path__WEBPACK_IMPORTED_MODULE_0__.join(this.commonTempFolder, this.shrinkwrapFilename);
|
|
2752
2592
|
this.packageManagerToolFilename = path__WEBPACK_IMPORTED_MODULE_0__.resolve(path__WEBPACK_IMPORTED_MODULE_0__.join(this.commonTempFolder, `${this.packageManager}-local`, 'node_modules', '.bin', `${this.packageManager}`));
|
|
2753
2593
|
/// From "C:\repo\common\temp\pnpm-lock.yaml" --> "C:\repo\common\temp\pnpm-lock-preinstall.yaml"
|
|
@@ -2865,7 +2705,6 @@ class RushConfiguration {
|
|
|
2865
2705
|
}
|
|
2866
2706
|
this._projectsByName.set(project.packageName, project);
|
|
2867
2707
|
}
|
|
2868
|
-
this._hasSplitWorkspaceProject = false;
|
|
2869
2708
|
for (const project of this._projects) {
|
|
2870
2709
|
project.decoupledLocalDependencies.forEach((decoupledLocalDependency) => {
|
|
2871
2710
|
if (!this.getProjectByName(decoupledLocalDependency)) {
|
|
@@ -2876,9 +2715,6 @@ class RushConfiguration {
|
|
|
2876
2715
|
this.versionPolicyConfiguration.validate(this.projectsByName);
|
|
2877
2716
|
// Consumer relationships will be established the first time one is requested
|
|
2878
2717
|
}
|
|
2879
|
-
if (this.hasSplitWorkspaceProject) {
|
|
2880
|
-
this._validateSplitWorkspaceRelationships();
|
|
2881
|
-
}
|
|
2882
2718
|
}
|
|
2883
2719
|
/**
|
|
2884
2720
|
* Loads the configuration data from an Rush.json configuration file and returns
|
|
@@ -3022,13 +2858,7 @@ class RushConfiguration {
|
|
|
3022
2858
|
knownSet.add(packageManagerWrapper.shrinkwrapFilename.toUpperCase());
|
|
3023
2859
|
// If the package manager is pnpm, then also add the pnpm file to the known set.
|
|
3024
2860
|
if (packageManagerWrapper.packageManager === 'pnpm') {
|
|
3025
|
-
|
|
3026
|
-
knownSet.add(pnpmPackageManager.pnpmfileFilename.toUpperCase());
|
|
3027
|
-
knownSet.add(pnpmPackageManager.splitWorkspacePnpmfileFilename.toUpperCase());
|
|
3028
|
-
/// From "pnpm-lock.yaml" --> "split-workspace-pnpm-lock.yaml"
|
|
3029
|
-
const shrinkwrapFilenameParsedPath = path__WEBPACK_IMPORTED_MODULE_0__.parse(pnpmPackageManager.shrinkwrapFilename);
|
|
3030
|
-
const splitWorkspaceShrinkwrapFilename = path__WEBPACK_IMPORTED_MODULE_0__.join(shrinkwrapFilenameParsedPath.dir, 'split-workspace-' + shrinkwrapFilenameParsedPath.name + shrinkwrapFilenameParsedPath.ext);
|
|
3031
|
-
knownSet.add(splitWorkspaceShrinkwrapFilename.toUpperCase());
|
|
2861
|
+
knownSet.add(packageManagerWrapper.pnpmfileFilename.toUpperCase());
|
|
3032
2862
|
}
|
|
3033
2863
|
// Is the filename something we know? If not, report an error.
|
|
3034
2864
|
if (!knownSet.has(filename.toUpperCase())) {
|
|
@@ -3138,20 +2968,6 @@ class RushConfiguration {
|
|
|
3138
2968
|
}
|
|
3139
2969
|
return this._projectsByTag;
|
|
3140
2970
|
}
|
|
3141
|
-
/**
|
|
3142
|
-
* Search for projects according to filter
|
|
3143
|
-
* @beta
|
|
3144
|
-
*/
|
|
3145
|
-
getFilteredProjects(filter) {
|
|
3146
|
-
const { splitWorkspace } = filter;
|
|
3147
|
-
const cacheKey = `${splitWorkspace}`;
|
|
3148
|
-
let filteredProjects = this._filteredProjectsCache.get(cacheKey);
|
|
3149
|
-
if (!filteredProjects) {
|
|
3150
|
-
filteredProjects = this.projects.filter((project) => project.splitWorkspace === splitWorkspace);
|
|
3151
|
-
this._filteredProjectsCache.set(cacheKey, filteredProjects);
|
|
3152
|
-
}
|
|
3153
|
-
return filteredProjects;
|
|
3154
|
-
}
|
|
3155
2971
|
/**
|
|
3156
2972
|
* Settings from the common-versions.json config file.
|
|
3157
2973
|
* @remarks
|
|
@@ -3179,18 +2995,6 @@ class RushConfiguration {
|
|
|
3179
2995
|
}
|
|
3180
2996
|
return variant;
|
|
3181
2997
|
}
|
|
3182
|
-
/**
|
|
3183
|
-
* Is there any split workspace project.
|
|
3184
|
-
*/
|
|
3185
|
-
get hasSplitWorkspaceProject() {
|
|
3186
|
-
if (undefined === this._hasSplitWorkspaceProject) {
|
|
3187
|
-
const splitWorkspaceProjects = this.getFilteredProjects({
|
|
3188
|
-
splitWorkspace: true
|
|
3189
|
-
});
|
|
3190
|
-
this._hasSplitWorkspaceProject = splitWorkspaceProjects.length > 0;
|
|
3191
|
-
}
|
|
3192
|
-
return this._hasSplitWorkspaceProject;
|
|
3193
|
-
}
|
|
3194
2998
|
/**
|
|
3195
2999
|
* Gets the path to the common-versions.json config file for a specific variant.
|
|
3196
3000
|
* @param variant - The name of the current variant in use by the active command.
|
|
@@ -3265,13 +3069,6 @@ class RushConfiguration {
|
|
|
3265
3069
|
const variantConfigFolderPath = this._getVariantConfigFolderPath(variant);
|
|
3266
3070
|
return path__WEBPACK_IMPORTED_MODULE_0__.join(variantConfigFolderPath, this.shrinkwrapFilename);
|
|
3267
3071
|
}
|
|
3268
|
-
/**
|
|
3269
|
-
* Gets the committed shrinkwrap file name for split workspace.
|
|
3270
|
-
* @param variant - The name of the current variant in use by the active command.
|
|
3271
|
-
*/
|
|
3272
|
-
getCommittedSplitWorkspaceShrinkwrapFilename() {
|
|
3273
|
-
return path__WEBPACK_IMPORTED_MODULE_0__.join(this.commonRushConfigFolder, this.splitWorkspaceShrinkwrapFilename);
|
|
3274
|
-
}
|
|
3275
3072
|
/**
|
|
3276
3073
|
* Gets the absolute path for "pnpmfile.js" for a specific variant.
|
|
3277
3074
|
* @param variant - The name of the current variant in use by the active command.
|
|
@@ -3370,29 +3167,6 @@ class RushConfiguration {
|
|
|
3370
3167
|
}
|
|
3371
3168
|
return path__WEBPACK_IMPORTED_MODULE_0__.join(this.commonRushConfigFolder, ...(variant ? [_logic_RushConstants__WEBPACK_IMPORTED_MODULE_4__.RushConstants.rushVariantsFolderName, variant] : []));
|
|
3372
3169
|
}
|
|
3373
|
-
/**
|
|
3374
|
-
* Split workspace can only works on PNPM with "useWorkspaces" enabled.
|
|
3375
|
-
* The workspace project can NOT depend on a split workspace project.
|
|
3376
|
-
* The split workspace project CAN depend on a workspace project.
|
|
3377
|
-
*/
|
|
3378
|
-
_validateSplitWorkspaceRelationships() {
|
|
3379
|
-
if (this.packageManager !== 'pnpm' || !this.pnpmOptions.useWorkspaces) {
|
|
3380
|
-
throw new Error(`Split workspace is only supported on PNPM with "useWorkspaces" enabled. Please specify "pnpmVersion" and set "useWorkspaces": true in your rush.json.`);
|
|
3381
|
-
}
|
|
3382
|
-
for (const project of this.projects) {
|
|
3383
|
-
if (!project.splitWorkspace) {
|
|
3384
|
-
for (const dependencyProject of project.dependencyProjects) {
|
|
3385
|
-
if (dependencyProject.splitWorkspace) {
|
|
3386
|
-
throw new Error(`The "${project.packageName}" cannot depend on "${dependencyProject.packageName}" because regular workspace projects cannot depend on projects from the split workspace.`);
|
|
3387
|
-
}
|
|
3388
|
-
}
|
|
3389
|
-
// For regular workspace project has a shrinkwrap file in its project folder, print a warning about this to avoid confusion.
|
|
3390
|
-
if (_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_2__.FileSystem.exists(path__WEBPACK_IMPORTED_MODULE_0__.join(project.projectFolder, this.packageManagerWrapper.shrinkwrapFilename))) {
|
|
3391
|
-
console.warn(`Project ${project.packageName} has a ${this.packageManagerWrapper.shrinkwrapFilename} file in its project folder. Please consider to delete it to avoid confusion.`);
|
|
3392
|
-
}
|
|
3393
|
-
}
|
|
3394
|
-
}
|
|
3395
|
-
}
|
|
3396
3170
|
}
|
|
3397
3171
|
RushConfiguration._jsonSchema = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_2__.JsonSchema.fromLoadedObject(_schemas_rush_schema_json__WEBPACK_IMPORTED_MODULE_24__);
|
|
3398
3172
|
//# sourceMappingURL=RushConfiguration.js.map
|
|
@@ -3540,7 +3314,6 @@ class RushConfigurationProject {
|
|
|
3540
3314
|
else {
|
|
3541
3315
|
this.tags = new Set(projectJson.tags);
|
|
3542
3316
|
}
|
|
3543
|
-
this.splitWorkspace = Boolean(projectJson.splitWorkspace);
|
|
3544
3317
|
}
|
|
3545
3318
|
/**
|
|
3546
3319
|
* The parsed NPM "package.json" file from projectFolder.
|
|
@@ -4653,102 +4426,6 @@ VersionPolicyConfiguration._jsonSchema = _rushstack_node_core_library__WEBPACK_I
|
|
|
4653
4426
|
|
|
4654
4427
|
/***/ }),
|
|
4655
4428
|
|
|
4656
|
-
/***/ 192765:
|
|
4657
|
-
/*!*****************************************!*\
|
|
4658
|
-
!*** ./lib-esnext/api/base/BaseFlag.js ***!
|
|
4659
|
-
\*****************************************/
|
|
4660
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4661
|
-
|
|
4662
|
-
__webpack_require__.r(__webpack_exports__);
|
|
4663
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4664
|
-
/* harmony export */ "BaseFlag": () => (/* binding */ BaseFlag)
|
|
4665
|
-
/* harmony export */ });
|
|
4666
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ 371017);
|
|
4667
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
|
4668
|
-
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @rushstack/node-core-library */ 132939);
|
|
4669
|
-
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__);
|
|
4670
|
-
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
4671
|
-
// See LICENSE in the project root for license information.
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
const lodash = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Import.lazy('lodash', require);
|
|
4675
|
-
/**
|
|
4676
|
-
* A base class for flag file.
|
|
4677
|
-
* @internal
|
|
4678
|
-
*/
|
|
4679
|
-
class BaseFlag {
|
|
4680
|
-
/**
|
|
4681
|
-
* Creates a new flag file
|
|
4682
|
-
* @param folderPath - the folder that this flag is managing
|
|
4683
|
-
* @param state - optional, the state that should be managed or compared
|
|
4684
|
-
*/
|
|
4685
|
-
constructor(folderPath, state) {
|
|
4686
|
-
if (!this.flagName) {
|
|
4687
|
-
throw new Error('Do not use this class directly, extends this class instead');
|
|
4688
|
-
}
|
|
4689
|
-
this.path = path__WEBPACK_IMPORTED_MODULE_0__.join(folderPath, this.flagName);
|
|
4690
|
-
this._state = (state || {});
|
|
4691
|
-
this._isModified = true;
|
|
4692
|
-
}
|
|
4693
|
-
/**
|
|
4694
|
-
* Returns true if the file exists and the contents match the current state.
|
|
4695
|
-
*/
|
|
4696
|
-
isValid() {
|
|
4697
|
-
let oldState;
|
|
4698
|
-
try {
|
|
4699
|
-
oldState = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.JsonFile.load(this.path);
|
|
4700
|
-
}
|
|
4701
|
-
catch (err) {
|
|
4702
|
-
// Swallow error
|
|
4703
|
-
}
|
|
4704
|
-
return !!oldState;
|
|
4705
|
-
}
|
|
4706
|
-
/**
|
|
4707
|
-
* Writes the flag file to disk with the current state
|
|
4708
|
-
*/
|
|
4709
|
-
create() {
|
|
4710
|
-
_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.JsonFile.save(this._state, this.path, {
|
|
4711
|
-
ensureFolderExists: true
|
|
4712
|
-
});
|
|
4713
|
-
}
|
|
4714
|
-
/**
|
|
4715
|
-
* Merge new data into current state by lodash "merge"
|
|
4716
|
-
*/
|
|
4717
|
-
mergeFromObject(data) {
|
|
4718
|
-
if (lodash.isMatch(this._state, data)) {
|
|
4719
|
-
return;
|
|
4720
|
-
}
|
|
4721
|
-
lodash.merge(this._state, data);
|
|
4722
|
-
this._isModified = true;
|
|
4723
|
-
}
|
|
4724
|
-
/**
|
|
4725
|
-
* Writes the flag file to disk with the current state if modified
|
|
4726
|
-
*/
|
|
4727
|
-
saveIfModified() {
|
|
4728
|
-
if (this._isModified) {
|
|
4729
|
-
_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.JsonFile.save(this._state, this.path, {
|
|
4730
|
-
ensureFolderExists: true
|
|
4731
|
-
});
|
|
4732
|
-
this._isModified = false;
|
|
4733
|
-
}
|
|
4734
|
-
}
|
|
4735
|
-
/**
|
|
4736
|
-
* Removes the flag file
|
|
4737
|
-
*/
|
|
4738
|
-
clear() {
|
|
4739
|
-
_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.FileSystem.deleteFile(this.path);
|
|
4740
|
-
}
|
|
4741
|
-
/**
|
|
4742
|
-
* Returns Name of the flag file
|
|
4743
|
-
*/
|
|
4744
|
-
get flagName() {
|
|
4745
|
-
throw new Error('Do not use this class directly, extends this class instead');
|
|
4746
|
-
}
|
|
4747
|
-
}
|
|
4748
|
-
//# sourceMappingURL=BaseFlag.js.map
|
|
4749
|
-
|
|
4750
|
-
/***/ }),
|
|
4751
|
-
|
|
4752
4429
|
/***/ 820330:
|
|
4753
4430
|
/*!************************************************************!*\
|
|
4754
4431
|
!*** ./lib-esnext/api/packageManager/NpmPackageManager.js ***!
|
|
@@ -4843,20 +4520,10 @@ class PnpmPackageManager extends _PackageManager__WEBPACK_IMPORTED_MODULE_2__.Pa
|
|
|
4843
4520
|
else {
|
|
4844
4521
|
this.pnpmfileFilename = _logic_RushConstants__WEBPACK_IMPORTED_MODULE_3__.RushConstants.pnpmfileV1Filename;
|
|
4845
4522
|
}
|
|
4846
|
-
this.splitWorkspacePnpmfileFilename = '.pnpmfile-split-workspace.cjs';
|
|
4847
4523
|
// node_modules/.pnpm/lock.yaml
|
|
4848
4524
|
// See https://github.com/pnpm/pnpm/releases/tag/v4.0.0 for more details.
|
|
4849
4525
|
this.internalShrinkwrapRelativePath = path__WEBPACK_IMPORTED_MODULE_1__.join('node_modules', '.pnpm', 'lock.yaml');
|
|
4850
4526
|
}
|
|
4851
|
-
/**
|
|
4852
|
-
* The filename of the global shrinkwrap file that is used by the package manager.
|
|
4853
|
-
*
|
|
4854
|
-
* @remarks
|
|
4855
|
-
* Example: `global-pnpmfile.cjs`
|
|
4856
|
-
*/
|
|
4857
|
-
get globalPnpmfileFilename() {
|
|
4858
|
-
return 'global-pnpmfile.cjs';
|
|
4859
|
-
}
|
|
4860
4527
|
}
|
|
4861
4528
|
//# sourceMappingURL=PnpmPackageManager.js.map
|
|
4862
4529
|
|
|
@@ -5140,8 +4807,7 @@ class RushCommandLineParser extends _rushstack_ts_command_line__WEBPACK_IMPORTED
|
|
|
5140
4807
|
(_a = this.telemetry) === null || _a === void 0 ? void 0 : _a.flush();
|
|
5141
4808
|
}
|
|
5142
4809
|
async execute(args) {
|
|
5143
|
-
|
|
5144
|
-
this._terminalProvider.debugEnabled = process.argv.indexOf('--debug') >= 0;
|
|
4810
|
+
this._terminalProvider.verboseEnabled = this.isDebug;
|
|
5145
4811
|
await this.pluginManager.tryInitializeUnassociatedPluginsAsync();
|
|
5146
4812
|
return await super.execute(args);
|
|
5147
4813
|
}
|
|
@@ -5668,10 +5334,7 @@ class RushPnpmCommandLineParser {
|
|
|
5668
5334
|
variant: undefined,
|
|
5669
5335
|
maxInstallAttempts: _logic_RushConstants__WEBPACK_IMPORTED_MODULE_5__.RushConstants.defaultMaxInstallAttempts,
|
|
5670
5336
|
pnpmFilterArguments: [],
|
|
5671
|
-
checkOnly: false
|
|
5672
|
-
includeSplitWorkspace: false,
|
|
5673
|
-
ignoreScripts: false,
|
|
5674
|
-
splitWorkspacePnpmFilterArguments: []
|
|
5337
|
+
checkOnly: false
|
|
5675
5338
|
};
|
|
5676
5339
|
const installManagerFactoryModule = await __webpack_require__.e(/*! import() | InstallManagerFactory */ "InstallManagerFactory").then(__webpack_require__.bind(__webpack_require__, /*! ../logic/InstallManagerFactory */ 611779));
|
|
5677
5340
|
const installManager = await installManagerFactoryModule.InstallManagerFactory.getInstallManagerAsync(this._rushConfiguration, rushGlobalFolder, purgeManager, installManagerOptions);
|
|
@@ -5825,11 +5488,7 @@ class RushXCommandLine {
|
|
|
5825
5488
|
console.log(`Unable to find a package.json file in the current working directory or any of its parents.`);
|
|
5826
5489
|
return;
|
|
5827
5490
|
}
|
|
5828
|
-
|
|
5829
|
-
if (rushConfiguration) {
|
|
5830
|
-
rushProject = rushConfiguration.tryGetProjectForPath(process.cwd());
|
|
5831
|
-
}
|
|
5832
|
-
if (!rushConfiguration || !rushProject) {
|
|
5491
|
+
if (rushConfiguration && !rushConfiguration.tryGetProjectForPath(process.cwd())) {
|
|
5833
5492
|
// GitHub #2713: Users reported confusion resulting from a situation where "rush install"
|
|
5834
5493
|
// did not install the project's dependencies, because the project was not registered.
|
|
5835
5494
|
console.log(colors_safe__WEBPACK_IMPORTED_MODULE_0___default().yellow('Warning: You are invoking "rushx" inside a Rush repository, but this project is not registered in rush.json.'));
|
|
@@ -5865,21 +5524,12 @@ class RushXCommandLine {
|
|
|
5865
5524
|
console.log(`> ${JSON.stringify(commandWithArgsForDisplay)}\n`);
|
|
5866
5525
|
}
|
|
5867
5526
|
const packageFolder = path__WEBPACK_IMPORTED_MODULE_1__.dirname(packageJsonFilePath);
|
|
5868
|
-
// If there is a rush.json then use its .npmrc from the temp folder.
|
|
5869
|
-
// Otherwise look for npmrc in the project folder.
|
|
5870
|
-
let initCwd = packageFolder;
|
|
5871
|
-
if (rushProject === null || rushProject === void 0 ? void 0 : rushProject.splitWorkspace) {
|
|
5872
|
-
if (rushConfiguration === null || rushConfiguration === void 0 ? void 0 : rushConfiguration.commonTempSplitFolder) {
|
|
5873
|
-
initCwd = rushConfiguration.commonTempFolder;
|
|
5874
|
-
}
|
|
5875
|
-
}
|
|
5876
|
-
else if (rushConfiguration === null || rushConfiguration === void 0 ? void 0 : rushConfiguration.commonTempFolder) {
|
|
5877
|
-
initCwd = rushConfiguration === null || rushConfiguration === void 0 ? void 0 : rushConfiguration.commonTempFolder;
|
|
5878
|
-
}
|
|
5879
5527
|
const exitCode = _utilities_Utilities__WEBPACK_IMPORTED_MODULE_9__.Utilities.executeLifecycleCommand(commandWithArgs, {
|
|
5880
5528
|
rushConfiguration,
|
|
5881
5529
|
workingDirectory: packageFolder,
|
|
5882
|
-
|
|
5530
|
+
// If there is a rush.json then use its .npmrc from the temp folder.
|
|
5531
|
+
// Otherwise look for npmrc in the project folder.
|
|
5532
|
+
initCwd: rushConfiguration ? rushConfiguration.commonTempFolder : packageFolder,
|
|
5883
5533
|
handleOutput: false,
|
|
5884
5534
|
environmentPathOptions: {
|
|
5885
5535
|
includeProjectBin: true
|
|
@@ -7137,11 +6787,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7137
6787
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7138
6788
|
/* harmony export */ "DeployAction": () => (/* binding */ DeployAction)
|
|
7139
6789
|
/* harmony export */ });
|
|
7140
|
-
/* harmony import */ var
|
|
7141
|
-
|
|
7142
|
-
|
|
6790
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ 371017);
|
|
6791
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
|
6792
|
+
/* harmony import */ var _BaseRushAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BaseRushAction */ 164546);
|
|
6793
|
+
/* harmony import */ var _logic_pnpm_PnpmfileConfiguration__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logic/pnpm/PnpmfileConfiguration */ 238032);
|
|
6794
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
6795
|
+
// See LICENSE in the project root for license information.
|
|
6796
|
+
|
|
7143
6797
|
|
|
7144
|
-
|
|
6798
|
+
|
|
6799
|
+
class DeployAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_1__.BaseRushAction {
|
|
7145
6800
|
constructor(parser) {
|
|
7146
6801
|
super({
|
|
7147
6802
|
actionName: 'deploy',
|
|
@@ -7156,6 +6811,7 @@ class DeployAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_0__.BaseRush
|
|
|
7156
6811
|
// to different target folders.
|
|
7157
6812
|
safeForSimultaneousRushProcesses: true
|
|
7158
6813
|
});
|
|
6814
|
+
this._logger = this.rushSession.getLogger('deploy');
|
|
7159
6815
|
this._project = this.defineStringParameter({
|
|
7160
6816
|
parameterLongName: '--project',
|
|
7161
6817
|
parameterShortName: '-p',
|
|
@@ -7193,11 +6849,81 @@ class DeployAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_0__.BaseRush
|
|
|
7193
6849
|
' The newly created archive file will be placed according to the designated path, relative' +
|
|
7194
6850
|
' to the target folder. Supported file extensions: .zip'
|
|
7195
6851
|
});
|
|
6852
|
+
this._createArchiveOnly = this.defineFlagParameter({
|
|
6853
|
+
parameterLongName: '--create-archive-only',
|
|
6854
|
+
description: 'If specified, "rush deploy" will only create an archive containing the contents of the target folder.' +
|
|
6855
|
+
' The target folder will not be modified other than to create the archive file.'
|
|
6856
|
+
});
|
|
7196
6857
|
}
|
|
7197
6858
|
async runAsync() {
|
|
7198
|
-
const
|
|
7199
|
-
const
|
|
7200
|
-
|
|
6859
|
+
const scenarioName = this._scenario.value;
|
|
6860
|
+
const { DeployScenarioConfiguration } = await Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ../../logic/deploy/DeployScenarioConfiguration */ 544987));
|
|
6861
|
+
const scenarioFilePath = DeployScenarioConfiguration.getConfigFilePath(scenarioName, this.rushConfiguration);
|
|
6862
|
+
const scenarioConfiguration = DeployScenarioConfiguration.loadFromFile(this._logger.terminal, scenarioFilePath, this.rushConfiguration);
|
|
6863
|
+
let mainProjectName = this._project.value;
|
|
6864
|
+
if (!mainProjectName) {
|
|
6865
|
+
if (scenarioConfiguration.json.deploymentProjectNames.length === 1) {
|
|
6866
|
+
// If there is only one project, then "--project" is optional
|
|
6867
|
+
mainProjectName = scenarioConfiguration.json.deploymentProjectNames[0];
|
|
6868
|
+
}
|
|
6869
|
+
else {
|
|
6870
|
+
throw new Error(`The ${path__WEBPACK_IMPORTED_MODULE_0__.basename(scenarioFilePath)} configuration specifies multiple items for` +
|
|
6871
|
+
` "deploymentProjectNames". Use the "--project" parameter to indicate the project to be deployed.`);
|
|
6872
|
+
}
|
|
6873
|
+
}
|
|
6874
|
+
else {
|
|
6875
|
+
if (scenarioConfiguration.json.deploymentProjectNames.indexOf(mainProjectName) < 0) {
|
|
6876
|
+
throw new Error(`The project "${mainProjectName}" does not appear in the list of "deploymentProjectNames"` +
|
|
6877
|
+
` from ${path__WEBPACK_IMPORTED_MODULE_0__.basename(scenarioFilePath)}.`);
|
|
6878
|
+
}
|
|
6879
|
+
}
|
|
6880
|
+
const targetRootFolder = this._targetFolder.value
|
|
6881
|
+
? path__WEBPACK_IMPORTED_MODULE_0__.resolve(this._targetFolder.value)
|
|
6882
|
+
: path__WEBPACK_IMPORTED_MODULE_0__.join(this.rushConfiguration.commonFolder, 'deploy');
|
|
6883
|
+
const createArchiveFilePath = this._createArchivePath.value
|
|
6884
|
+
? path__WEBPACK_IMPORTED_MODULE_0__.resolve(targetRootFolder, this._createArchivePath.value)
|
|
6885
|
+
: undefined;
|
|
6886
|
+
const createArchiveOnly = this._createArchiveOnly.value;
|
|
6887
|
+
let transformPackageJson;
|
|
6888
|
+
let pnpmInstallFolder;
|
|
6889
|
+
if (this.rushConfiguration.packageManager === 'pnpm') {
|
|
6890
|
+
const pnpmfileConfiguration = await _logic_pnpm_PnpmfileConfiguration__WEBPACK_IMPORTED_MODULE_2__.PnpmfileConfiguration.initializeAsync(this.rushConfiguration);
|
|
6891
|
+
transformPackageJson = pnpmfileConfiguration.transform.bind(pnpmfileConfiguration);
|
|
6892
|
+
if (!scenarioConfiguration.json.omitPnpmWorkaroundLinks) {
|
|
6893
|
+
pnpmInstallFolder = this.rushConfiguration.commonTempFolder;
|
|
6894
|
+
}
|
|
6895
|
+
}
|
|
6896
|
+
// Construct the project list for the deployer
|
|
6897
|
+
const projectConfigurations = [];
|
|
6898
|
+
for (const project of this.rushConfiguration.projects) {
|
|
6899
|
+
const scenarioProjectJson = scenarioConfiguration.projectJsonsByName.get(project.packageName);
|
|
6900
|
+
projectConfigurations.push({
|
|
6901
|
+
projectName: project.packageName,
|
|
6902
|
+
projectFolder: project.projectFolder,
|
|
6903
|
+
additionalProjectsToInclude: scenarioProjectJson === null || scenarioProjectJson === void 0 ? void 0 : scenarioProjectJson.additionalProjectsToInclude,
|
|
6904
|
+
additionalDependenciesToInclude: scenarioProjectJson === null || scenarioProjectJson === void 0 ? void 0 : scenarioProjectJson.additionalDependenciesToInclude,
|
|
6905
|
+
dependenciesToExclude: scenarioProjectJson === null || scenarioProjectJson === void 0 ? void 0 : scenarioProjectJson.dependenciesToExclude
|
|
6906
|
+
});
|
|
6907
|
+
}
|
|
6908
|
+
// 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));
|
|
6910
|
+
const deployManager = new PackageExtractor();
|
|
6911
|
+
await deployManager.extractAsync({
|
|
6912
|
+
terminal: this._logger.terminal,
|
|
6913
|
+
overwriteExisting: !!this._overwrite.value,
|
|
6914
|
+
includeDevDependencies: scenarioConfiguration.json.includeDevDependencies,
|
|
6915
|
+
includeNpmIgnoreFiles: scenarioConfiguration.json.includeNpmIgnoreFiles,
|
|
6916
|
+
folderToCopy: scenarioConfiguration.json.folderToCopy,
|
|
6917
|
+
linkCreation: scenarioConfiguration.json.linkCreation,
|
|
6918
|
+
sourceRootFolder: this.rushConfiguration.rushJsonFolder,
|
|
6919
|
+
targetRootFolder,
|
|
6920
|
+
mainProjectName,
|
|
6921
|
+
projectConfigurations,
|
|
6922
|
+
createArchiveFilePath,
|
|
6923
|
+
createArchiveOnly,
|
|
6924
|
+
pnpmInstallFolder,
|
|
6925
|
+
transformPackageJson
|
|
6926
|
+
});
|
|
7201
6927
|
}
|
|
7202
6928
|
}
|
|
7203
6929
|
//# sourceMappingURL=DeployAction.js.map
|
|
@@ -7341,7 +7067,6 @@ class InitAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_3__.BaseConfig
|
|
|
7341
7067
|
'common/config/rush/[dot]npmrc-publish',
|
|
7342
7068
|
'common/config/rush/artifactory.json',
|
|
7343
7069
|
'common/config/rush/build-cache.json',
|
|
7344
|
-
'common/config/rush/cobuild.json',
|
|
7345
7070
|
'common/config/rush/command-line.json',
|
|
7346
7071
|
'common/config/rush/common-versions.json',
|
|
7347
7072
|
'common/config/rush/experiments.json',
|
|
@@ -7683,7 +7408,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7683
7408
|
|
|
7684
7409
|
class InstallAction extends _BaseInstallAction__WEBPACK_IMPORTED_MODULE_1__.BaseInstallAction {
|
|
7685
7410
|
constructor(parser) {
|
|
7686
|
-
var _a;
|
|
7687
7411
|
super({
|
|
7688
7412
|
actionName: 'install',
|
|
7689
7413
|
summary: 'Install package dependencies for all projects in the repo according to the shrinkwrap file',
|
|
@@ -7706,57 +7430,20 @@ class InstallAction extends _BaseInstallAction__WEBPACK_IMPORTED_MODULE_1__.Base
|
|
|
7706
7430
|
// Disable filtering because rush-project.json is riggable and therefore may not be available
|
|
7707
7431
|
enableFiltering: false
|
|
7708
7432
|
});
|
|
7709
|
-
if ((_a = this.rushConfiguration) === null || _a === void 0 ? void 0 : _a.hasSplitWorkspaceProject) {
|
|
7710
|
-
this._includeSplitWorkspaceParameter = this.defineFlagParameter({
|
|
7711
|
-
parameterLongName: '--include-split-workspace',
|
|
7712
|
-
description: 'Normally "rush install" only install projects in normal rush workspace.' +
|
|
7713
|
-
' When you want to install for split workspace projects, you can run' +
|
|
7714
|
-
' "rush install --include-split-workspace", which installs entire split workspace projects.' +
|
|
7715
|
-
' Or, you can specify selection parameters to do partial install for split workspace projects, ' +
|
|
7716
|
-
' such as "rush install --to <split_workspace_package_name>".'
|
|
7717
|
-
});
|
|
7718
|
-
}
|
|
7719
7433
|
this._checkOnlyParameter = this.defineFlagParameter({
|
|
7720
7434
|
parameterLongName: '--check-only',
|
|
7721
7435
|
description: `Only check the validity of the shrinkwrap file without performing an install.`
|
|
7722
7436
|
});
|
|
7723
|
-
this._ignoreScriptsParameter = this.defineFlagParameter({
|
|
7724
|
-
parameterLongName: '--ignore-scripts',
|
|
7725
|
-
description: 'Do not execute any install lifecycle scripts specified in package.json files and its' +
|
|
7726
|
-
' dependencies when "rush install". Running with this flag leaves your installation in a uncompleted' +
|
|
7727
|
-
' state, you need to run without this flag again to complete a full installation. Meanwhile, it makes' +
|
|
7728
|
-
' your installing faster. Later, you can run "rush install" to run all ignored scripts. Moreover, you' +
|
|
7729
|
-
' can partial install such as "rush install --to <package>" to run ignored scripts of the dependencies' +
|
|
7730
|
-
' of the selected projects.'
|
|
7731
|
-
});
|
|
7732
7437
|
}
|
|
7733
7438
|
async buildInstallOptionsAsync() {
|
|
7734
|
-
var _a, _b, _c;
|
|
7735
7439
|
const terminal = new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.Terminal(new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.ConsoleTerminalProvider());
|
|
7736
|
-
const { pnpmFilterArguments, splitWorkspacePnpmFilterArguments, selectedProjects, hasSelectSplitWorkspaceProject } = await this._selectionParameters.getPnpmFilterArgumentsAsync(terminal);
|
|
7737
|
-
// Warn when fully install without selecting any split workspace project
|
|
7738
|
-
if (this._includeSplitWorkspaceParameter &&
|
|
7739
|
-
!this._includeSplitWorkspaceParameter.value &&
|
|
7740
|
-
!((_a = this._selectionParameters) === null || _a === void 0 ? void 0 : _a.isSelectionSpecified)) {
|
|
7741
|
-
terminal.writeWarningLine('Run "rush install" without any selection parameter will not install for split workspace' +
|
|
7742
|
-
' projects, please run the command again with specifying --include-split-workspace' +
|
|
7743
|
-
' if you really want to install for split workspace projects.');
|
|
7744
|
-
terminal.writeLine();
|
|
7745
|
-
}
|
|
7746
|
-
let includeSplitWorkspace = (_c = (_b = this._includeSplitWorkspaceParameter) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : false;
|
|
7747
|
-
// turn on includeSplitWorkspace when selecting any split workspace project
|
|
7748
|
-
if (selectedProjects && hasSelectSplitWorkspaceProject) {
|
|
7749
|
-
includeSplitWorkspace = true;
|
|
7750
|
-
}
|
|
7751
7440
|
return {
|
|
7752
7441
|
debug: this.parser.isDebug,
|
|
7753
7442
|
allowShrinkwrapUpdates: false,
|
|
7754
|
-
ignoreScripts: this._ignoreScriptsParameter.value,
|
|
7755
7443
|
bypassPolicy: this._bypassPolicyParameter.value,
|
|
7756
7444
|
noLink: this._noLinkParameter.value,
|
|
7757
7445
|
fullUpgrade: false,
|
|
7758
7446
|
recheckShrinkwrap: false,
|
|
7759
|
-
includeSplitWorkspace,
|
|
7760
7447
|
networkConcurrency: this._networkConcurrencyParameter.value,
|
|
7761
7448
|
collectLogFile: this._debugPackageManagerParameter.value,
|
|
7762
7449
|
variant: this._variant.value,
|
|
@@ -7764,10 +7451,7 @@ class InstallAction extends _BaseInstallAction__WEBPACK_IMPORTED_MODULE_1__.Base
|
|
|
7764
7451
|
// it is safe to assume that the value is not null
|
|
7765
7452
|
maxInstallAttempts: this._maxInstallAttempts.value,
|
|
7766
7453
|
// These are derived independently of the selection for command line brevity
|
|
7767
|
-
pnpmFilterArguments,
|
|
7768
|
-
splitWorkspacePnpmFilterArguments,
|
|
7769
|
-
selectedProjects,
|
|
7770
|
-
selectionParameters: this._selectionParameters,
|
|
7454
|
+
pnpmFilterArguments: await this._selectionParameters.getPnpmFilterArgumentsAsync(terminal),
|
|
7771
7455
|
checkOnly: this._checkOnlyParameter.value,
|
|
7772
7456
|
beforeInstallAsync: () => this.rushSession.hooks.beforeInstall.promise(this)
|
|
7773
7457
|
};
|
|
@@ -7930,8 +7614,7 @@ class ListAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_1__.BaseRushAc
|
|
|
7930
7614
|
versionPolicyName,
|
|
7931
7615
|
shouldPublish,
|
|
7932
7616
|
reviewCategory,
|
|
7933
|
-
tags: Array.from(config.tags)
|
|
7934
|
-
splitWorkspace: config.splitWorkspace
|
|
7617
|
+
tags: Array.from(config.tags)
|
|
7935
7618
|
};
|
|
7936
7619
|
});
|
|
7937
7620
|
const output = {
|
|
@@ -7961,9 +7644,6 @@ class ListAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_1__.BaseRushAc
|
|
|
7961
7644
|
tableHeader.push('Should publish');
|
|
7962
7645
|
tableHeader.push('Review category');
|
|
7963
7646
|
tableHeader.push('Tags');
|
|
7964
|
-
if (this.rushConfiguration.hasSplitWorkspaceProject) {
|
|
7965
|
-
tableHeader.push('Split workspace');
|
|
7966
|
-
}
|
|
7967
7647
|
}
|
|
7968
7648
|
const { default: CliTable } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! cli-table */ 13593, 23));
|
|
7969
7649
|
const table = new CliTable({
|
|
@@ -8007,9 +7687,6 @@ class ListAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_1__.BaseRushAc
|
|
|
8007
7687
|
appendToPackageRow(shouldPublish);
|
|
8008
7688
|
appendToPackageRow(reviewCategory);
|
|
8009
7689
|
appendToPackageRow(Array.from(project.tags).join(', '));
|
|
8010
|
-
if (this.rushConfiguration.hasSplitWorkspaceProject) {
|
|
8011
|
-
appendToPackageRow(String(Boolean(project.splitWorkspace)));
|
|
8012
|
-
}
|
|
8013
7690
|
}
|
|
8014
7691
|
table.push(packageRow);
|
|
8015
7692
|
}
|
|
@@ -8208,8 +7885,6 @@ class PublishAction extends _BaseRushAction__WEBPACK_IMPORTED_MODULE_4__.BaseRus
|
|
|
8208
7885
|
*/
|
|
8209
7886
|
async runAsync() {
|
|
8210
7887
|
_logic_policy_PolicyValidator__WEBPACK_IMPORTED_MODULE_5__.PolicyValidator.validatePolicy(this.rushConfiguration, { bypassPolicy: false });
|
|
8211
|
-
// FIXME: How to publish for packages in split workspace?
|
|
8212
|
-
// Or, maybe we can not publish packages in split workspace (?)
|
|
8213
7888
|
// Example: "common\temp\publish-home"
|
|
8214
7889
|
this._targetNpmrcPublishFolder = path__WEBPACK_IMPORTED_MODULE_1__.join(this.rushConfiguration.commonTempFolder, 'publish-home');
|
|
8215
7890
|
// Example: "common\temp\publish-home\.npmrc"
|
|
@@ -8928,18 +8603,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8928
8603
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8929
8604
|
/* harmony export */ "UpdateAction": () => (/* binding */ UpdateAction)
|
|
8930
8605
|
/* harmony export */ });
|
|
8931
|
-
/* harmony import */ var
|
|
8932
|
-
/* harmony import */ var _parsing_SelectionParameterSet__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../parsing/SelectionParameterSet */ 40787);
|
|
8933
|
-
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @rushstack/node-core-library */ 132939);
|
|
8934
|
-
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__);
|
|
8606
|
+
/* harmony import */ var _BaseInstallAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BaseInstallAction */ 823791);
|
|
8935
8607
|
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
8936
8608
|
// See LICENSE in the project root for license information.
|
|
8937
8609
|
|
|
8938
|
-
|
|
8939
|
-
|
|
8940
|
-
class UpdateAction extends _BaseInstallAction__WEBPACK_IMPORTED_MODULE_1__.BaseInstallAction {
|
|
8610
|
+
class UpdateAction extends _BaseInstallAction__WEBPACK_IMPORTED_MODULE_0__.BaseInstallAction {
|
|
8941
8611
|
constructor(parser) {
|
|
8942
|
-
var _a;
|
|
8943
8612
|
super({
|
|
8944
8613
|
actionName: 'update',
|
|
8945
8614
|
summary: 'Install package dependencies for all projects in the repo,' +
|
|
@@ -8956,24 +8625,6 @@ class UpdateAction extends _BaseInstallAction__WEBPACK_IMPORTED_MODULE_1__.BaseI
|
|
|
8956
8625
|
' -- for details, see the command help for "rush install".',
|
|
8957
8626
|
parser
|
|
8958
8627
|
});
|
|
8959
|
-
if ((_a = this.rushConfiguration) === null || _a === void 0 ? void 0 : _a.hasSplitWorkspaceProject) {
|
|
8960
|
-
// Partial update is supported only when there is split workspace project
|
|
8961
|
-
this._selectionParameters = new _parsing_SelectionParameterSet__WEBPACK_IMPORTED_MODULE_2__.SelectionParameterSet(this.rushConfiguration, this, {
|
|
8962
|
-
// Include lockfile processing since this expands the selection, and we need to select
|
|
8963
|
-
// at least the same projects selected with the same query to "rush build"
|
|
8964
|
-
includeExternalDependencies: true,
|
|
8965
|
-
// Disable filtering because rush-project.json is riggable and therefore may not be available
|
|
8966
|
-
enableFiltering: false
|
|
8967
|
-
});
|
|
8968
|
-
this._includeSplitWorkspaceParameter = this.defineFlagParameter({
|
|
8969
|
-
parameterLongName: '--include-split-workspace',
|
|
8970
|
-
description: 'Normally "rush update" only updates projects in normal rush workspace.' +
|
|
8971
|
-
' When you want to update for split workspace projects, you can run' +
|
|
8972
|
-
' "rush update --include-split-workspace", which updates entire split workspace projects.' +
|
|
8973
|
-
' Or, you can specify selection parameters to do partial update for split workspace projects, ' +
|
|
8974
|
-
' such as "rush update --to <split_workspace_package_name>".'
|
|
8975
|
-
});
|
|
8976
|
-
}
|
|
8977
8628
|
this._fullParameter = this.defineFlagParameter({
|
|
8978
8629
|
parameterLongName: '--full',
|
|
8979
8630
|
description: 'Normally "rush update" tries to preserve your existing installed versions' +
|
|
@@ -8991,15 +8642,6 @@ class UpdateAction extends _BaseInstallAction__WEBPACK_IMPORTED_MODULE_1__.BaseI
|
|
|
8991
8642
|
" to process the shrinkwrap file. This will also update your shrinkwrap file with Rush's fixups." +
|
|
8992
8643
|
' (To minimize shrinkwrap churn, these fixups are normally performed only in the temporary folder.)'
|
|
8993
8644
|
});
|
|
8994
|
-
this._ignoreScriptsParameter = this.defineFlagParameter({
|
|
8995
|
-
parameterLongName: '--ignore-scripts',
|
|
8996
|
-
description: 'Do not execute any install lifecycle scripts specified in package.json files and its' +
|
|
8997
|
-
' dependencies when "rush update". Running with this flag leaves your installation in a uncompleted' +
|
|
8998
|
-
' state, you need to run this command without this flag again or run "rush install" to complete a ' +
|
|
8999
|
-
' full installation. Meanwhile, it makes faster retries on running install lifecycle scripts. You' +
|
|
9000
|
-
' can partial install such as "rush install --to <package>" to run the ignored scripts of the' +
|
|
9001
|
-
' dependencies of the selected projects.'
|
|
9002
|
-
});
|
|
9003
8645
|
}
|
|
9004
8646
|
async runAsync() {
|
|
9005
8647
|
await this.parser.pluginManager.updateAsync();
|
|
@@ -9009,55 +8651,20 @@ class UpdateAction extends _BaseInstallAction__WEBPACK_IMPORTED_MODULE_1__.BaseI
|
|
|
9009
8651
|
return super.runAsync();
|
|
9010
8652
|
}
|
|
9011
8653
|
async buildInstallOptionsAsync() {
|
|
9012
|
-
var _a, _b, _c, _d, _e;
|
|
9013
|
-
const terminal = new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.Terminal(new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.ConsoleTerminalProvider());
|
|
9014
|
-
/**
|
|
9015
|
-
* Partial update should only affects on split workspace project, and
|
|
9016
|
-
* not affects on normal rush workspace projects.
|
|
9017
|
-
*/
|
|
9018
|
-
const pnpmFilterArguments = [];
|
|
9019
|
-
const { splitWorkspacePnpmFilterArguments = [], selectedProjects, hasSelectSplitWorkspaceProject = false } = (await ((_a = this._selectionParameters) === null || _a === void 0 ? void 0 : _a.getPnpmFilterArgumentsAsync(terminal))) || {};
|
|
9020
|
-
if (((_b = this._selectionParameters) === null || _b === void 0 ? void 0 : _b.isSelectionSpecified) && !hasSelectSplitWorkspaceProject) {
|
|
9021
|
-
// Warn when there is no split workspace project selected
|
|
9022
|
-
if (splitWorkspacePnpmFilterArguments.length === 0) {
|
|
9023
|
-
terminal.writeWarningLine('Project filtering arguments are using without selecting any split workspace' +
|
|
9024
|
-
' projects. Better run "rush update" without specifying selection parameters.');
|
|
9025
|
-
terminal.writeLine();
|
|
9026
|
-
}
|
|
9027
|
-
}
|
|
9028
|
-
// Warn when fully update without selecting any split workspace project
|
|
9029
|
-
if (this._includeSplitWorkspaceParameter &&
|
|
9030
|
-
!this._includeSplitWorkspaceParameter.value &&
|
|
9031
|
-
!((_c = this._selectionParameters) === null || _c === void 0 ? void 0 : _c.isSelectionSpecified)) {
|
|
9032
|
-
terminal.writeWarningLine('Run "rush update" without any selection parameter will not update for split workspace' +
|
|
9033
|
-
' projects, please run the command again with specifying --include-split-workspace' +
|
|
9034
|
-
' if you really want to update for split workspace projects.');
|
|
9035
|
-
terminal.writeLine();
|
|
9036
|
-
}
|
|
9037
|
-
let includeSplitWorkspace = (_e = (_d = this._includeSplitWorkspaceParameter) === null || _d === void 0 ? void 0 : _d.value) !== null && _e !== void 0 ? _e : false;
|
|
9038
|
-
// turn on includeSplitWorkspace when selecting any split workspace project
|
|
9039
|
-
if (selectedProjects && hasSelectSplitWorkspaceProject) {
|
|
9040
|
-
includeSplitWorkspace = true;
|
|
9041
|
-
}
|
|
9042
8654
|
return {
|
|
9043
8655
|
debug: this.parser.isDebug,
|
|
9044
8656
|
allowShrinkwrapUpdates: true,
|
|
9045
|
-
ignoreScripts: this._ignoreScriptsParameter.value,
|
|
9046
8657
|
bypassPolicy: this._bypassPolicyParameter.value,
|
|
9047
8658
|
noLink: this._noLinkParameter.value,
|
|
9048
8659
|
fullUpgrade: this._fullParameter.value,
|
|
9049
8660
|
recheckShrinkwrap: this._recheckParameter.value,
|
|
9050
|
-
includeSplitWorkspace,
|
|
9051
8661
|
networkConcurrency: this._networkConcurrencyParameter.value,
|
|
9052
8662
|
collectLogFile: this._debugPackageManagerParameter.value,
|
|
9053
8663
|
variant: this._variant.value,
|
|
9054
8664
|
// Because the 'defaultValue' option on the _maxInstallAttempts parameter is set,
|
|
9055
8665
|
// it is safe to assume that the value is not null
|
|
9056
8666
|
maxInstallAttempts: this._maxInstallAttempts.value,
|
|
9057
|
-
pnpmFilterArguments,
|
|
9058
|
-
splitWorkspacePnpmFilterArguments,
|
|
9059
|
-
selectedProjects,
|
|
9060
|
-
selectionParameters: this._selectionParameters,
|
|
8667
|
+
pnpmFilterArguments: [],
|
|
9061
8668
|
checkOnly: false,
|
|
9062
8669
|
beforeInstallAsync: () => this.rushSession.hooks.beforeInstall.promise(this)
|
|
9063
8670
|
};
|
|
@@ -9584,11 +9191,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9584
9191
|
/* harmony export */ });
|
|
9585
9192
|
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @rushstack/node-core-library */ 132939);
|
|
9586
9193
|
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__);
|
|
9587
|
-
/* harmony import */ var
|
|
9194
|
+
/* harmony import */ var _logic_Selection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../logic/Selection */ 138705);
|
|
9588
9195
|
/* harmony import */ var _logic_selectors_GitChangedProjectSelectorParser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logic/selectors/GitChangedProjectSelectorParser */ 920415);
|
|
9589
9196
|
/* harmony import */ var _logic_selectors_NamedProjectSelectorParser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../logic/selectors/NamedProjectSelectorParser */ 92382);
|
|
9590
9197
|
/* harmony import */ var _logic_selectors_TagProjectSelectorParser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logic/selectors/TagProjectSelectorParser */ 858595);
|
|
9591
|
-
/* harmony import */ var _logic_selectors_SplitWorkspaceProjectSelectorParser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../logic/selectors/SplitWorkspaceProjectSelectorParser */ 357196);
|
|
9592
9198
|
/* harmony import */ var _logic_selectors_VersionPolicyProjectSelectorParser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../logic/selectors/VersionPolicyProjectSelectorParser */ 71589);
|
|
9593
9199
|
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
9594
9200
|
// See LICENSE in the project root for license information.
|
|
@@ -9598,7 +9204,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9598
9204
|
|
|
9599
9205
|
|
|
9600
9206
|
|
|
9601
|
-
|
|
9602
9207
|
/**
|
|
9603
9208
|
* This class is provides the set of command line parameters used to select projects
|
|
9604
9209
|
* based on dependencies.
|
|
@@ -9607,7 +9212,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9607
9212
|
*/
|
|
9608
9213
|
class SelectionParameterSet {
|
|
9609
9214
|
constructor(rushConfiguration, action, gitOptions) {
|
|
9610
|
-
this._selectors = [];
|
|
9611
9215
|
this._rushConfiguration = rushConfiguration;
|
|
9612
9216
|
const selectorParsers = new Map();
|
|
9613
9217
|
const nameSelectorParser = new _logic_selectors_NamedProjectSelectorParser__WEBPACK_IMPORTED_MODULE_1__.NamedProjectSelectorParser(rushConfiguration);
|
|
@@ -9615,7 +9219,6 @@ class SelectionParameterSet {
|
|
|
9615
9219
|
selectorParsers.set('git', new _logic_selectors_GitChangedProjectSelectorParser__WEBPACK_IMPORTED_MODULE_2__.GitChangedProjectSelectorParser(rushConfiguration, gitOptions));
|
|
9616
9220
|
selectorParsers.set('tag', new _logic_selectors_TagProjectSelectorParser__WEBPACK_IMPORTED_MODULE_3__.TagProjectSelectorParser(rushConfiguration));
|
|
9617
9221
|
selectorParsers.set('version-policy', new _logic_selectors_VersionPolicyProjectSelectorParser__WEBPACK_IMPORTED_MODULE_4__.VersionPolicyProjectSelectorParser(rushConfiguration));
|
|
9618
|
-
selectorParsers.set('split', new _logic_selectors_SplitWorkspaceProjectSelectorParser__WEBPACK_IMPORTED_MODULE_5__.SplitWorkspaceProjectSelectorParser(rushConfiguration));
|
|
9619
9222
|
this._selectorParserByScope = selectorParsers;
|
|
9620
9223
|
const getSpecifierCompletions = async () => {
|
|
9621
9224
|
const completions = ['.'];
|
|
@@ -9721,25 +9324,6 @@ class SelectionParameterSet {
|
|
|
9721
9324
|
' belonging to VERSION_POLICY_NAME.' +
|
|
9722
9325
|
' For details, refer to the website article "Selecting subsets of projects".'
|
|
9723
9326
|
});
|
|
9724
|
-
this._selectors = [
|
|
9725
|
-
this._onlyProject,
|
|
9726
|
-
this._fromProject,
|
|
9727
|
-
this._toProject,
|
|
9728
|
-
this._toExceptProject,
|
|
9729
|
-
this._impactedByProject,
|
|
9730
|
-
this._impactedByExceptProject
|
|
9731
|
-
];
|
|
9732
|
-
}
|
|
9733
|
-
/**
|
|
9734
|
-
* Check if any of the selection parameters have a value specified on the command line
|
|
9735
|
-
*
|
|
9736
|
-
* Returns true if specifying any selection parameters, otherwise false.
|
|
9737
|
-
*/
|
|
9738
|
-
get isSelectionSpecified() {
|
|
9739
|
-
if (undefined === this._isSelectionSpecified) {
|
|
9740
|
-
this._isSelectionSpecified = this._selectors.some((param) => param.values.length > 0);
|
|
9741
|
-
}
|
|
9742
|
-
return this._isSelectionSpecified;
|
|
9743
9327
|
}
|
|
9744
9328
|
/**
|
|
9745
9329
|
* Computes the set of selected projects based on all parameter values.
|
|
@@ -9754,8 +9338,18 @@ class SelectionParameterSet {
|
|
|
9754
9338
|
for (const value of this._toVersionPolicy.values) {
|
|
9755
9339
|
this._toProject.values.push(`version-policy:${value}`);
|
|
9756
9340
|
}
|
|
9341
|
+
const selectors = [
|
|
9342
|
+
this._onlyProject,
|
|
9343
|
+
this._fromProject,
|
|
9344
|
+
this._toProject,
|
|
9345
|
+
this._toExceptProject,
|
|
9346
|
+
this._impactedByProject,
|
|
9347
|
+
this._impactedByExceptProject
|
|
9348
|
+
];
|
|
9349
|
+
// Check if any of the selection parameters have a value specified on the command line
|
|
9350
|
+
const isSelectionSpecified = selectors.some((param) => param.values.length > 0);
|
|
9757
9351
|
// If no selection parameters are specified, return everything
|
|
9758
|
-
if (!
|
|
9352
|
+
if (!isSelectionSpecified) {
|
|
9759
9353
|
return new Set(this._rushConfiguration.projects);
|
|
9760
9354
|
}
|
|
9761
9355
|
const [
|
|
@@ -9770,107 +9364,62 @@ class SelectionParameterSet {
|
|
|
9770
9364
|
// --impacted-by
|
|
9771
9365
|
impactedByProjects,
|
|
9772
9366
|
// --impacted-by-except
|
|
9773
|
-
impactedByExceptProjects] = await Promise.all(
|
|
9367
|
+
impactedByExceptProjects] = await Promise.all(selectors.map((param) => {
|
|
9774
9368
|
return this._evaluateProjectParameterAsync(param, terminal);
|
|
9775
9369
|
}));
|
|
9776
|
-
const selection =
|
|
9370
|
+
const selection = _logic_Selection__WEBPACK_IMPORTED_MODULE_5__.Selection.union(
|
|
9777
9371
|
// Safe command line options
|
|
9778
|
-
|
|
9372
|
+
_logic_Selection__WEBPACK_IMPORTED_MODULE_5__.Selection.expandAllDependencies(_logic_Selection__WEBPACK_IMPORTED_MODULE_5__.Selection.union(toRaw, _logic_Selection__WEBPACK_IMPORTED_MODULE_5__.Selection.directDependenciesOf(toExceptProjects),
|
|
9779
9373
|
// --from / --from-version-policy
|
|
9780
|
-
|
|
9374
|
+
_logic_Selection__WEBPACK_IMPORTED_MODULE_5__.Selection.expandAllConsumers(fromProjects))),
|
|
9781
9375
|
// Unsafe command line option: --only
|
|
9782
9376
|
onlyProjects,
|
|
9783
9377
|
// Unsafe command line options: --impacted-by, --impacted-by-except
|
|
9784
|
-
|
|
9378
|
+
_logic_Selection__WEBPACK_IMPORTED_MODULE_5__.Selection.expandAllConsumers(_logic_Selection__WEBPACK_IMPORTED_MODULE_5__.Selection.union(impactedByProjects, _logic_Selection__WEBPACK_IMPORTED_MODULE_5__.Selection.directConsumersOf(impactedByExceptProjects))));
|
|
9785
9379
|
return selection;
|
|
9786
9380
|
}
|
|
9787
9381
|
/**
|
|
9788
|
-
* Represents the selection as `--filter` parameters to pnpm
|
|
9382
|
+
* Represents the selection as `--filter` parameters to pnpm.
|
|
9789
9383
|
*
|
|
9790
9384
|
* @remarks
|
|
9791
9385
|
* This is a separate from the selection to allow the filters to be represented more concisely.
|
|
9792
9386
|
*
|
|
9793
|
-
* @see https://pnpm.
|
|
9387
|
+
* @see https://pnpm.js.org/en/filtering
|
|
9794
9388
|
*/
|
|
9795
9389
|
async getPnpmFilterArgumentsAsync(terminal) {
|
|
9796
|
-
const
|
|
9797
|
-
|
|
9798
|
-
|
|
9799
|
-
|
|
9800
|
-
// when there are split workspace projects, the selected projects are computed inside Rush.js.
|
|
9801
|
-
const selection = await this.getSelectedProjectsAsync(terminal);
|
|
9802
|
-
const selectedRushProjects = new Set();
|
|
9803
|
-
const selectedSplitWorkspaceProjects = new Set();
|
|
9804
|
-
for (const project of selection) {
|
|
9805
|
-
if (!project.splitWorkspace) {
|
|
9806
|
-
selectedRushProjects.add(project);
|
|
9807
|
-
}
|
|
9808
|
-
else {
|
|
9809
|
-
hasSelectSplitWorkspaceProject = true;
|
|
9810
|
-
selectedSplitWorkspaceProjects.add(project);
|
|
9811
|
-
}
|
|
9812
|
-
}
|
|
9813
|
-
// It is no need to push pnpm filter args if projects are fully selected.
|
|
9814
|
-
if (this._rushConfiguration.getFilteredProjects({
|
|
9815
|
-
splitWorkspace: false
|
|
9816
|
-
}).length !== selectedRushProjects.size) {
|
|
9817
|
-
for (const selectedProject of selectedRushProjects.values()) {
|
|
9818
|
-
pnpmFilterArguments.push('--filter', `${selectedProject.packageName}`);
|
|
9819
|
-
}
|
|
9820
|
-
}
|
|
9821
|
-
if (this._rushConfiguration.getFilteredProjects({
|
|
9822
|
-
splitWorkspace: true
|
|
9823
|
-
}).length !== selectedSplitWorkspaceProjects.size) {
|
|
9824
|
-
for (const selectedProject of selectedSplitWorkspaceProjects.values()) {
|
|
9825
|
-
splitWorkspacePnpmFilterArguments.push('--filter', `${selectedProject.packageName}`);
|
|
9826
|
-
}
|
|
9827
|
-
}
|
|
9390
|
+
const args = [];
|
|
9391
|
+
// Include exactly these projects (--only)
|
|
9392
|
+
for (const project of await this._evaluateProjectParameterAsync(this._onlyProject, terminal)) {
|
|
9393
|
+
args.push('--filter', project.packageName);
|
|
9828
9394
|
}
|
|
9829
|
-
|
|
9830
|
-
|
|
9831
|
-
|
|
9832
|
-
|
|
9833
|
-
|
|
9834
|
-
|
|
9835
|
-
|
|
9836
|
-
|
|
9837
|
-
|
|
9838
|
-
|
|
9839
|
-
|
|
9840
|
-
for (const project of _logic_Selection__WEBPACK_IMPORTED_MODULE_6__.Selection.union(
|
|
9841
|
-
// --to
|
|
9842
|
-
await this._evaluateProjectParameterAsync(this._toProject, terminal),
|
|
9843
|
-
// --from / --from-version-policy
|
|
9844
|
-
_logic_Selection__WEBPACK_IMPORTED_MODULE_6__.Selection.expandAllConsumers(fromProjects))) {
|
|
9845
|
-
pnpmFilterArguments.push('--filter', `${project.packageName}...`);
|
|
9846
|
-
}
|
|
9847
|
-
// --to-except
|
|
9848
|
-
// All projects that the project directly or indirectly declares as a dependency
|
|
9849
|
-
for (const project of await this._evaluateProjectParameterAsync(this._toExceptProject, terminal)) {
|
|
9850
|
-
pnpmFilterArguments.push('--filter', `${project.packageName}^...`);
|
|
9851
|
-
}
|
|
9852
|
-
// --impacted-by
|
|
9853
|
-
// The project and all projects directly or indirectly declare it as a dependency
|
|
9854
|
-
for (const project of await this._evaluateProjectParameterAsync(this._impactedByProject, terminal)) {
|
|
9855
|
-
pnpmFilterArguments.push('--filter', `...${project.packageName}`);
|
|
9856
|
-
}
|
|
9857
|
-
// --impacted-by-except
|
|
9858
|
-
// All projects that directly or indirectly declare the specified project as a dependency
|
|
9859
|
-
for (const project of await this._evaluateProjectParameterAsync(this._impactedByExceptProject, terminal)) {
|
|
9860
|
-
pnpmFilterArguments.push('--filter', `...^${project.packageName}`);
|
|
9861
|
-
}
|
|
9862
|
-
}
|
|
9863
|
-
// Undefined when full install
|
|
9864
|
-
let selectedProjects;
|
|
9865
|
-
if (this.isSelectionSpecified) {
|
|
9866
|
-
selectedProjects = await this.getSelectedProjectsAsync(terminal);
|
|
9395
|
+
// Include all projects that depend on these projects, and all dependencies thereof
|
|
9396
|
+
const fromProjects = _logic_Selection__WEBPACK_IMPORTED_MODULE_5__.Selection.union(
|
|
9397
|
+
// --from
|
|
9398
|
+
await this._evaluateProjectParameterAsync(this._fromProject, terminal));
|
|
9399
|
+
// All specified projects and all projects that they depend on
|
|
9400
|
+
for (const project of _logic_Selection__WEBPACK_IMPORTED_MODULE_5__.Selection.union(
|
|
9401
|
+
// --to
|
|
9402
|
+
await this._evaluateProjectParameterAsync(this._toProject, terminal),
|
|
9403
|
+
// --from / --from-version-policy
|
|
9404
|
+
_logic_Selection__WEBPACK_IMPORTED_MODULE_5__.Selection.expandAllConsumers(fromProjects))) {
|
|
9405
|
+
args.push('--filter', `${project.packageName}...`);
|
|
9867
9406
|
}
|
|
9868
|
-
|
|
9869
|
-
|
|
9870
|
-
|
|
9871
|
-
|
|
9872
|
-
|
|
9873
|
-
|
|
9407
|
+
// --to-except
|
|
9408
|
+
// All projects that the project directly or indirectly declares as a dependency
|
|
9409
|
+
for (const project of await this._evaluateProjectParameterAsync(this._toExceptProject, terminal)) {
|
|
9410
|
+
args.push('--filter', `${project.packageName}^...`);
|
|
9411
|
+
}
|
|
9412
|
+
// --impacted-by
|
|
9413
|
+
// The project and all projects directly or indirectly declare it as a dependency
|
|
9414
|
+
for (const project of await this._evaluateProjectParameterAsync(this._impactedByProject, terminal)) {
|
|
9415
|
+
args.push('--filter', `...${project.packageName}`);
|
|
9416
|
+
}
|
|
9417
|
+
// --impacted-by-except
|
|
9418
|
+
// All projects that directly or indirectly declare the specified project as a dependency
|
|
9419
|
+
for (const project of await this._evaluateProjectParameterAsync(this._impactedByExceptProject, terminal)) {
|
|
9420
|
+
args.push('--filter', `...^${project.packageName}`);
|
|
9421
|
+
}
|
|
9422
|
+
return args;
|
|
9874
9423
|
}
|
|
9875
9424
|
/**
|
|
9876
9425
|
* Usage telemetry for selection parameters. Only saved locally, and if requested in the config.
|
|
@@ -9936,15 +9485,6 @@ class SelectionParameterSet {
|
|
|
9936
9485
|
}
|
|
9937
9486
|
return selection;
|
|
9938
9487
|
}
|
|
9939
|
-
toArguments() {
|
|
9940
|
-
const args = [];
|
|
9941
|
-
for (const selector of this._selectors) {
|
|
9942
|
-
for (const value of selector.values) {
|
|
9943
|
-
args.push(selector.longName, value);
|
|
9944
|
-
}
|
|
9945
|
-
}
|
|
9946
|
-
return args;
|
|
9947
|
-
}
|
|
9948
9488
|
}
|
|
9949
9489
|
//# sourceMappingURL=SelectionParameterSet.js.map
|
|
9950
9490
|
|
|
@@ -10252,24 +9792,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10252
9792
|
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @rushstack/node-core-library */ 132939);
|
|
10253
9793
|
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__);
|
|
10254
9794
|
/* harmony import */ var _pluginFramework_PhasedCommandHooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../pluginFramework/PhasedCommandHooks */ 580814);
|
|
10255
|
-
/* harmony import */ var
|
|
10256
|
-
/* harmony import */ var
|
|
9795
|
+
/* harmony import */ var _logic_SetupChecks__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../logic/SetupChecks */ 60296);
|
|
9796
|
+
/* harmony import */ var _utilities_Stopwatch__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utilities/Stopwatch */ 314318);
|
|
10257
9797
|
/* harmony import */ var _BaseScriptAction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BaseScriptAction */ 994567);
|
|
10258
|
-
/* harmony import */ var
|
|
9798
|
+
/* harmony import */ var _logic_operations_OperationExecutionManager__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../logic/operations/OperationExecutionManager */ 576472);
|
|
10259
9799
|
/* harmony import */ var _logic_RushConstants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logic/RushConstants */ 951904);
|
|
10260
|
-
/* harmony import */ var
|
|
10261
|
-
/* harmony import */ var
|
|
10262
|
-
/* harmony import */ var
|
|
10263
|
-
/* harmony import */ var
|
|
9800
|
+
/* harmony import */ var _api_EnvironmentConfiguration__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../api/EnvironmentConfiguration */ 382806);
|
|
9801
|
+
/* harmony import */ var _api_LastLinkFlag__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../api/LastLinkFlag */ 986208);
|
|
9802
|
+
/* harmony import */ var _api_BuildCacheConfiguration__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../api/BuildCacheConfiguration */ 541976);
|
|
9803
|
+
/* harmony import */ var _parsing_SelectionParameterSet__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../parsing/SelectionParameterSet */ 40787);
|
|
10264
9804
|
/* harmony import */ var _logic_operations_PhasedOperationPlugin__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../logic/operations/PhasedOperationPlugin */ 797379);
|
|
10265
9805
|
/* harmony import */ var _logic_operations_ShellOperationRunnerPlugin__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../logic/operations/ShellOperationRunnerPlugin */ 658087);
|
|
10266
|
-
/* harmony import */ var
|
|
10267
|
-
/* harmony import */ var
|
|
10268
|
-
/* harmony import */ var
|
|
10269
|
-
/* harmony import */ var
|
|
10270
|
-
/* harmony import */ var
|
|
10271
|
-
/* harmony import */ var _api_CobuildConfiguration__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../api/CobuildConfiguration */ 13111);
|
|
10272
|
-
/* harmony import */ var _logic_operations_CacheableOperationPlugin__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../logic/operations/CacheableOperationPlugin */ 223875);
|
|
9806
|
+
/* harmony import */ var _api_EventHooks__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../api/EventHooks */ 519005);
|
|
9807
|
+
/* harmony import */ var _logic_ProjectChangeAnalyzer__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../logic/ProjectChangeAnalyzer */ 311605);
|
|
9808
|
+
/* harmony import */ var _logic_operations_OperationStatus__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../logic/operations/OperationStatus */ 476597);
|
|
9809
|
+
/* harmony import */ var _logic_operations_OperationResultSummarizerPlugin__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../logic/operations/OperationResultSummarizerPlugin */ 195183);
|
|
9810
|
+
/* harmony import */ var _parsing_ParseParallelism__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../parsing/ParseParallelism */ 798601);
|
|
10273
9811
|
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
10274
9812
|
// See LICENSE in the project root for license information.
|
|
10275
9813
|
|
|
@@ -10290,8 +9828,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10290
9828
|
|
|
10291
9829
|
|
|
10292
9830
|
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
9831
|
|
|
10296
9832
|
/**
|
|
10297
9833
|
* This class implements phased commands which are run individually for each project in the repo,
|
|
@@ -10323,14 +9859,12 @@ class PhasedScriptAction extends _BaseScriptAction__WEBPACK_IMPORTED_MODULE_2__.
|
|
|
10323
9859
|
new _logic_operations_PhasedOperationPlugin__WEBPACK_IMPORTED_MODULE_5__.PhasedOperationPlugin().apply(this.hooks);
|
|
10324
9860
|
// Applies the Shell Operation Runner to selected operations
|
|
10325
9861
|
new _logic_operations_ShellOperationRunnerPlugin__WEBPACK_IMPORTED_MODULE_6__.ShellOperationRunnerPlugin().apply(this.hooks);
|
|
10326
|
-
// Applies the build cache related logic to the selected operations
|
|
10327
|
-
new _logic_operations_CacheableOperationPlugin__WEBPACK_IMPORTED_MODULE_7__.CacheableOperationPlugin().apply(this.hooks);
|
|
10328
9862
|
if (this._enableParallelism) {
|
|
10329
9863
|
this._parallelismParameter = this.defineStringParameter({
|
|
10330
9864
|
parameterLongName: '--parallelism',
|
|
10331
9865
|
parameterShortName: '-p',
|
|
10332
9866
|
argumentName: 'COUNT',
|
|
10333
|
-
environmentVariable:
|
|
9867
|
+
environmentVariable: _api_EnvironmentConfiguration__WEBPACK_IMPORTED_MODULE_7__.EnvironmentVariableNames.RUSH_PARALLELISM,
|
|
10334
9868
|
description: 'Specifies the maximum number of concurrent processes to launch during a build.' +
|
|
10335
9869
|
' The COUNT should be a positive integer, a percentage value (eg. "50%%") or the word "max"' +
|
|
10336
9870
|
' to specify a count that is equal to the number of CPU cores. If this parameter is omitted,' +
|
|
@@ -10342,7 +9876,7 @@ class PhasedScriptAction extends _BaseScriptAction__WEBPACK_IMPORTED_MODULE_2__.
|
|
|
10342
9876
|
' including an ASCII chart of the start and stop times for each operation.'
|
|
10343
9877
|
});
|
|
10344
9878
|
}
|
|
10345
|
-
this._selectionParameters = new
|
|
9879
|
+
this._selectionParameters = new _parsing_SelectionParameterSet__WEBPACK_IMPORTED_MODULE_8__.SelectionParameterSet(this.rushConfiguration, this, {
|
|
10346
9880
|
// Include lockfile processing since this expands the selection, and we need to select
|
|
10347
9881
|
// at least the same projects selected with the same query to "rush build"
|
|
10348
9882
|
includeExternalDependencies: true,
|
|
@@ -10409,7 +9943,7 @@ class PhasedScriptAction extends _BaseScriptAction__WEBPACK_IMPORTED_MODULE_2__.
|
|
|
10409
9943
|
});
|
|
10410
9944
|
}
|
|
10411
9945
|
// TODO: Replace with last-install.flag when "rush link" and "rush unlink" are deprecated
|
|
10412
|
-
const lastLinkFlag =
|
|
9946
|
+
const lastLinkFlag = _api_LastLinkFlag__WEBPACK_IMPORTED_MODULE_9__.LastLinkFlagFactory.getCommonTempFlag(this.rushConfiguration);
|
|
10413
9947
|
if (!lastLinkFlag.isValid()) {
|
|
10414
9948
|
const useWorkspaces = this.rushConfiguration.pnpmOptions && this.rushConfiguration.pnpmOptions.useWorkspaces;
|
|
10415
9949
|
if (useWorkspaces) {
|
|
@@ -10423,17 +9957,17 @@ class PhasedScriptAction extends _BaseScriptAction__WEBPACK_IMPORTED_MODULE_2__.
|
|
|
10423
9957
|
// if this is parallelizable, then use the value from the flag (undefined or a number),
|
|
10424
9958
|
// if parallelism is not enabled, then restrict to 1 core
|
|
10425
9959
|
const parallelism = this._enableParallelism
|
|
10426
|
-
? (0,
|
|
9960
|
+
? (0,_parsing_ParseParallelism__WEBPACK_IMPORTED_MODULE_10__.parseParallelism)((_b = this._parallelismParameter) === null || _b === void 0 ? void 0 : _b.value)
|
|
10427
9961
|
: 1;
|
|
10428
9962
|
const terminal = this._terminal;
|
|
10429
|
-
const stopwatch =
|
|
9963
|
+
const stopwatch = _utilities_Stopwatch__WEBPACK_IMPORTED_MODULE_11__.Stopwatch.start();
|
|
10430
9964
|
const showTimeline = this._timelineParameter ? this._timelineParameter.value : false;
|
|
10431
9965
|
if (showTimeline) {
|
|
10432
9966
|
const { ConsoleTimelinePlugin } = await __webpack_require__.e(/*! import() | ConsoleTimelinePlugin */ "ConsoleTimelinePlugin").then(__webpack_require__.bind(__webpack_require__, /*! ../../logic/operations/ConsoleTimelinePlugin */ 598358));
|
|
10433
9967
|
new ConsoleTimelinePlugin(terminal).apply(this.hooks);
|
|
10434
9968
|
}
|
|
10435
9969
|
// Enable the standard summary
|
|
10436
|
-
new
|
|
9970
|
+
new _logic_operations_OperationResultSummarizerPlugin__WEBPACK_IMPORTED_MODULE_12__.OperationResultSummarizerPlugin(terminal).apply(this.hooks);
|
|
10437
9971
|
const { hooks: sessionHooks } = this.rushSession;
|
|
10438
9972
|
if (sessionHooks.runAnyPhasedCommand.isUsed()) {
|
|
10439
9973
|
// Avoid the cost of compiling the hook if it wasn't tapped.
|
|
@@ -10447,11 +9981,8 @@ class PhasedScriptAction extends _BaseScriptAction__WEBPACK_IMPORTED_MODULE_2__.
|
|
|
10447
9981
|
const isQuietMode = !this._verboseParameter.value;
|
|
10448
9982
|
const changedProjectsOnly = !!((_c = this._changedProjectsOnly) === null || _c === void 0 ? void 0 : _c.value);
|
|
10449
9983
|
let buildCacheConfiguration;
|
|
10450
|
-
let cobuildConfiguration;
|
|
10451
9984
|
if (!this._disableBuildCache) {
|
|
10452
|
-
buildCacheConfiguration = await
|
|
10453
|
-
cobuildConfiguration = await _api_CobuildConfiguration__WEBPACK_IMPORTED_MODULE_15__.CobuildConfiguration.tryLoadAsync(terminal, this.rushConfiguration, this.rushSession);
|
|
10454
|
-
await (cobuildConfiguration === null || cobuildConfiguration === void 0 ? void 0 : cobuildConfiguration.connectLockProviderAsync());
|
|
9985
|
+
buildCacheConfiguration = await _api_BuildCacheConfiguration__WEBPACK_IMPORTED_MODULE_13__.BuildCacheConfiguration.tryLoadAsync(terminal, this.rushConfiguration, this.rushSession);
|
|
10455
9986
|
}
|
|
10456
9987
|
const projectSelection = await this._selectionParameters.getSelectedProjectsAsync(terminal);
|
|
10457
9988
|
if (!projectSelection.size) {
|
|
@@ -10463,10 +9994,9 @@ class PhasedScriptAction extends _BaseScriptAction__WEBPACK_IMPORTED_MODULE_2__.
|
|
|
10463
9994
|
for (const [configParameter, parserParameter] of this.customParameters) {
|
|
10464
9995
|
customParametersByName.set(configParameter.longName, parserParameter);
|
|
10465
9996
|
}
|
|
10466
|
-
const projectChangeAnalyzer = new
|
|
9997
|
+
const projectChangeAnalyzer = new _logic_ProjectChangeAnalyzer__WEBPACK_IMPORTED_MODULE_14__.ProjectChangeAnalyzer(this.rushConfiguration);
|
|
10467
9998
|
const initialCreateOperationsContext = {
|
|
10468
9999
|
buildCacheConfiguration,
|
|
10469
|
-
cobuildConfiguration,
|
|
10470
10000
|
customParameters: customParametersByName,
|
|
10471
10001
|
isIncrementalBuildAllowed: this._isIncrementalBuildAllowed,
|
|
10472
10002
|
isInitial: true,
|
|
@@ -10483,12 +10013,6 @@ class PhasedScriptAction extends _BaseScriptAction__WEBPACK_IMPORTED_MODULE_2__.
|
|
|
10483
10013
|
debugMode: this.parser.isDebug,
|
|
10484
10014
|
parallelism,
|
|
10485
10015
|
changedProjectsOnly,
|
|
10486
|
-
beforeExecuteOperation: async (record) => {
|
|
10487
|
-
await this.hooks.beforeExecuteOperation.promise(record);
|
|
10488
|
-
},
|
|
10489
|
-
afterExecuteOperation: async (record) => {
|
|
10490
|
-
await this.hooks.afterExecuteOperation.promise(record);
|
|
10491
|
-
},
|
|
10492
10016
|
beforeExecuteOperations: async (records) => {
|
|
10493
10017
|
await this.hooks.beforeExecuteOperations.promise(records);
|
|
10494
10018
|
},
|
|
@@ -10503,7 +10027,7 @@ class PhasedScriptAction extends _BaseScriptAction__WEBPACK_IMPORTED_MODULE_2__.
|
|
|
10503
10027
|
terminal
|
|
10504
10028
|
};
|
|
10505
10029
|
terminal.write('Analyzing repo state... ');
|
|
10506
|
-
const repoStateStopwatch = new
|
|
10030
|
+
const repoStateStopwatch = new _utilities_Stopwatch__WEBPACK_IMPORTED_MODULE_11__.Stopwatch();
|
|
10507
10031
|
repoStateStopwatch.start();
|
|
10508
10032
|
await projectChangeAnalyzer._ensureInitializedAsync(terminal);
|
|
10509
10033
|
repoStateStopwatch.stop();
|
|
@@ -10517,7 +10041,6 @@ class PhasedScriptAction extends _BaseScriptAction__WEBPACK_IMPORTED_MODULE_2__.
|
|
|
10517
10041
|
}
|
|
10518
10042
|
await this._runWatchPhases(internalOptions);
|
|
10519
10043
|
}
|
|
10520
|
-
await (cobuildConfiguration === null || cobuildConfiguration === void 0 ? void 0 : cobuildConfiguration.disconnectLockProviderAsync());
|
|
10521
10044
|
}
|
|
10522
10045
|
async _runInitialPhases(options) {
|
|
10523
10046
|
const { initialCreateOperationsContext, executionManagerOptions, stopwatch, terminal } = options;
|
|
@@ -10564,7 +10087,7 @@ class PhasedScriptAction extends _BaseScriptAction__WEBPACK_IMPORTED_MODULE_2__.
|
|
|
10564
10087
|
while (true) {
|
|
10565
10088
|
// On the initial invocation, this promise will return immediately with the full set of projects
|
|
10566
10089
|
const { changedProjects, state } = await projectWatcher.waitForChange(onWaitingForChanges);
|
|
10567
|
-
if (stopwatch.state ===
|
|
10090
|
+
if (stopwatch.state === _utilities_Stopwatch__WEBPACK_IMPORTED_MODULE_11__.StopwatchState.Stopped) {
|
|
10568
10091
|
// Clear and reset the stopwatch so that we only report time from a single execution at a time
|
|
10569
10092
|
stopwatch.reset();
|
|
10570
10093
|
stopwatch.start();
|
|
@@ -10605,17 +10128,17 @@ class PhasedScriptAction extends _BaseScriptAction__WEBPACK_IMPORTED_MODULE_2__.
|
|
|
10605
10128
|
async _executeOperations(options) {
|
|
10606
10129
|
var _a;
|
|
10607
10130
|
const { executionManagerOptions, ignoreHooks, operations, stopwatch, terminal } = options;
|
|
10608
|
-
const executionManager = new
|
|
10131
|
+
const executionManager = new _logic_operations_OperationExecutionManager__WEBPACK_IMPORTED_MODULE_15__.OperationExecutionManager(operations, executionManagerOptions);
|
|
10609
10132
|
const { isInitial, isWatch } = options.createOperationsContext;
|
|
10610
10133
|
let success = false;
|
|
10611
10134
|
let result;
|
|
10612
10135
|
try {
|
|
10613
10136
|
result = await executionManager.executeAsync();
|
|
10614
|
-
success = result.status ===
|
|
10137
|
+
success = result.status === _logic_operations_OperationStatus__WEBPACK_IMPORTED_MODULE_16__.OperationStatus.Success;
|
|
10615
10138
|
await this.hooks.afterExecuteOperations.promise(result, options.createOperationsContext);
|
|
10616
10139
|
stopwatch.stop();
|
|
10617
10140
|
const message = `rush ${this.actionName} (${stopwatch.toString()})`;
|
|
10618
|
-
if (result.status ===
|
|
10141
|
+
if (result.status === _logic_operations_OperationStatus__WEBPACK_IMPORTED_MODULE_16__.OperationStatus.Success) {
|
|
10619
10142
|
terminal.writeLine(colors_safe__WEBPACK_IMPORTED_MODULE_0___default().green(message));
|
|
10620
10143
|
}
|
|
10621
10144
|
else {
|
|
@@ -10683,25 +10206,25 @@ class PhasedScriptAction extends _BaseScriptAction__WEBPACK_IMPORTED_MODULE_2__.
|
|
|
10683
10206
|
};
|
|
10684
10207
|
extraData.countAll++;
|
|
10685
10208
|
switch (operationResult.status) {
|
|
10686
|
-
case
|
|
10209
|
+
case _logic_operations_OperationStatus__WEBPACK_IMPORTED_MODULE_16__.OperationStatus.Success:
|
|
10687
10210
|
extraData.countSuccess++;
|
|
10688
10211
|
break;
|
|
10689
|
-
case
|
|
10212
|
+
case _logic_operations_OperationStatus__WEBPACK_IMPORTED_MODULE_16__.OperationStatus.SuccessWithWarning:
|
|
10690
10213
|
extraData.countSuccessWithWarnings++;
|
|
10691
10214
|
break;
|
|
10692
|
-
case
|
|
10215
|
+
case _logic_operations_OperationStatus__WEBPACK_IMPORTED_MODULE_16__.OperationStatus.Failure:
|
|
10693
10216
|
extraData.countFailure++;
|
|
10694
10217
|
break;
|
|
10695
|
-
case
|
|
10218
|
+
case _logic_operations_OperationStatus__WEBPACK_IMPORTED_MODULE_16__.OperationStatus.Blocked:
|
|
10696
10219
|
extraData.countBlocked++;
|
|
10697
10220
|
break;
|
|
10698
|
-
case
|
|
10221
|
+
case _logic_operations_OperationStatus__WEBPACK_IMPORTED_MODULE_16__.OperationStatus.FromCache:
|
|
10699
10222
|
extraData.countFromCache++;
|
|
10700
10223
|
break;
|
|
10701
|
-
case
|
|
10224
|
+
case _logic_operations_OperationStatus__WEBPACK_IMPORTED_MODULE_16__.OperationStatus.Skipped:
|
|
10702
10225
|
extraData.countSkipped++;
|
|
10703
10226
|
break;
|
|
10704
|
-
case
|
|
10227
|
+
case _logic_operations_OperationStatus__WEBPACK_IMPORTED_MODULE_16__.OperationStatus.NoOp:
|
|
10705
10228
|
extraData.countNoOp++;
|
|
10706
10229
|
break;
|
|
10707
10230
|
default:
|
|
@@ -10729,8 +10252,8 @@ class PhasedScriptAction extends _BaseScriptAction__WEBPACK_IMPORTED_MODULE_2__.
|
|
|
10729
10252
|
// Only collects information for built-in commands like build or rebuild.
|
|
10730
10253
|
return;
|
|
10731
10254
|
}
|
|
10732
|
-
|
|
10733
|
-
this.eventHooksManager.handle(
|
|
10255
|
+
_logic_SetupChecks__WEBPACK_IMPORTED_MODULE_17__.SetupChecks.validate(this.rushConfiguration);
|
|
10256
|
+
this.eventHooksManager.handle(_api_EventHooks__WEBPACK_IMPORTED_MODULE_18__.Event.preRushBuild, this.parser.isDebug, this._ignoreHooksParameter.value);
|
|
10734
10257
|
}
|
|
10735
10258
|
_doAfterTask() {
|
|
10736
10259
|
if (this.actionName !== _logic_RushConstants__WEBPACK_IMPORTED_MODULE_3__.RushConstants.buildCommandName &&
|
|
@@ -10738,7 +10261,7 @@ class PhasedScriptAction extends _BaseScriptAction__WEBPACK_IMPORTED_MODULE_2__.
|
|
|
10738
10261
|
// Only collects information for built-in commands like build or rebuild.
|
|
10739
10262
|
return;
|
|
10740
10263
|
}
|
|
10741
|
-
this.eventHooksManager.handle(
|
|
10264
|
+
this.eventHooksManager.handle(_api_EventHooks__WEBPACK_IMPORTED_MODULE_18__.Event.postRushBuild, this.parser.isDebug, this._ignoreHooksParameter.value);
|
|
10742
10265
|
}
|
|
10743
10266
|
}
|
|
10744
10267
|
//# sourceMappingURL=PhasedScriptAction.js.map
|
|
@@ -10753,53 +10276,51 @@ class PhasedScriptAction extends _BaseScriptAction__WEBPACK_IMPORTED_MODULE_2__.
|
|
|
10753
10276
|
|
|
10754
10277
|
__webpack_require__.r(__webpack_exports__);
|
|
10755
10278
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10756
|
-
/* harmony export */ "ApprovedPackagesConfiguration": () => (/* reexport safe */
|
|
10757
|
-
/* harmony export */ "ApprovedPackagesItem": () => (/* reexport safe */
|
|
10279
|
+
/* harmony export */ "ApprovedPackagesConfiguration": () => (/* reexport safe */ _api_ApprovedPackagesConfiguration__WEBPACK_IMPORTED_MODULE_14__.ApprovedPackagesConfiguration),
|
|
10280
|
+
/* harmony export */ "ApprovedPackagesItem": () => (/* reexport safe */ _api_ApprovedPackagesConfiguration__WEBPACK_IMPORTED_MODULE_14__.ApprovedPackagesItem),
|
|
10758
10281
|
/* harmony export */ "ApprovedPackagesPolicy": () => (/* reexport safe */ _api_ApprovedPackagesPolicy__WEBPACK_IMPORTED_MODULE_0__.ApprovedPackagesPolicy),
|
|
10759
10282
|
/* harmony export */ "BuildCacheConfiguration": () => (/* reexport safe */ _api_BuildCacheConfiguration__WEBPACK_IMPORTED_MODULE_6__.BuildCacheConfiguration),
|
|
10760
|
-
/* harmony export */ "BumpType": () => (/* reexport safe */
|
|
10761
|
-
/* harmony export */ "ChangeManager": () => (/* reexport safe */
|
|
10762
|
-
/* harmony export */ "
|
|
10763
|
-
/* harmony export */ "
|
|
10764
|
-
/* harmony export */ "
|
|
10765
|
-
/* harmony export */ "
|
|
10766
|
-
/* harmony export */ "
|
|
10767
|
-
/* harmony export */ "
|
|
10768
|
-
/* harmony export */ "
|
|
10769
|
-
/* harmony export */ "
|
|
10770
|
-
/* harmony export */ "
|
|
10771
|
-
/* harmony export */ "
|
|
10772
|
-
/* harmony export */ "
|
|
10773
|
-
/* harmony export */ "
|
|
10774
|
-
/* harmony export */ "LookupByPath": () => (/* reexport safe */ _logic_LookupByPath__WEBPACK_IMPORTED_MODULE_19__.LookupByPath),
|
|
10283
|
+
/* harmony export */ "BumpType": () => (/* reexport safe */ _api_VersionPolicy__WEBPACK_IMPORTED_MODULE_22__.BumpType),
|
|
10284
|
+
/* harmony export */ "ChangeManager": () => (/* reexport safe */ _api_ChangeManager__WEBPACK_IMPORTED_MODULE_20__.ChangeManager),
|
|
10285
|
+
/* harmony export */ "CommonVersionsConfiguration": () => (/* reexport safe */ _api_CommonVersionsConfiguration__WEBPACK_IMPORTED_MODULE_15__.CommonVersionsConfiguration),
|
|
10286
|
+
/* harmony export */ "CredentialCache": () => (/* reexport safe */ _logic_CredentialCache__WEBPACK_IMPORTED_MODULE_33__.CredentialCache),
|
|
10287
|
+
/* harmony export */ "DependencyType": () => (/* reexport safe */ _api_PackageJsonEditor__WEBPACK_IMPORTED_MODULE_16__.DependencyType),
|
|
10288
|
+
/* harmony export */ "EnvironmentConfiguration": () => (/* reexport safe */ _api_EnvironmentConfiguration__WEBPACK_IMPORTED_MODULE_8__.EnvironmentConfiguration),
|
|
10289
|
+
/* harmony export */ "EnvironmentVariableNames": () => (/* reexport safe */ _api_EnvironmentConfiguration__WEBPACK_IMPORTED_MODULE_8__.EnvironmentVariableNames),
|
|
10290
|
+
/* harmony export */ "Event": () => (/* reexport safe */ _api_EventHooks__WEBPACK_IMPORTED_MODULE_19__.Event),
|
|
10291
|
+
/* harmony export */ "EventHooks": () => (/* reexport safe */ _api_EventHooks__WEBPACK_IMPORTED_MODULE_19__.EventHooks),
|
|
10292
|
+
/* harmony export */ "ExperimentsConfiguration": () => (/* reexport safe */ _api_ExperimentsConfiguration__WEBPACK_IMPORTED_MODULE_26__.ExperimentsConfiguration),
|
|
10293
|
+
/* harmony export */ "FileSystemBuildCacheProvider": () => (/* reexport safe */ _logic_buildCache_FileSystemBuildCacheProvider__WEBPACK_IMPORTED_MODULE_7__.FileSystemBuildCacheProvider),
|
|
10294
|
+
/* harmony export */ "IndividualVersionPolicy": () => (/* reexport safe */ _api_VersionPolicy__WEBPACK_IMPORTED_MODULE_22__.IndividualVersionPolicy),
|
|
10295
|
+
/* harmony export */ "LockStepVersionPolicy": () => (/* reexport safe */ _api_VersionPolicy__WEBPACK_IMPORTED_MODULE_22__.LockStepVersionPolicy),
|
|
10296
|
+
/* harmony export */ "LookupByPath": () => (/* reexport safe */ _logic_LookupByPath__WEBPACK_IMPORTED_MODULE_18__.LookupByPath),
|
|
10775
10297
|
/* harmony export */ "NpmOptionsConfiguration": () => (/* reexport safe */ _logic_npm_NpmOptionsConfiguration__WEBPACK_IMPORTED_MODULE_3__.NpmOptionsConfiguration),
|
|
10776
|
-
/* harmony export */ "Operation": () => (/* reexport safe */
|
|
10777
|
-
/* harmony export */ "OperationStatus": () => (/* reexport safe */
|
|
10778
|
-
/* harmony export */ "PackageJsonDependency": () => (/* reexport safe */
|
|
10779
|
-
/* harmony export */ "PackageJsonEditor": () => (/* reexport safe */
|
|
10780
|
-
/* harmony export */ "PackageManager": () => (/* reexport safe */
|
|
10298
|
+
/* harmony export */ "Operation": () => (/* reexport safe */ _logic_operations_Operation__WEBPACK_IMPORTED_MODULE_28__.Operation),
|
|
10299
|
+
/* harmony export */ "OperationStatus": () => (/* reexport safe */ _logic_operations_OperationStatus__WEBPACK_IMPORTED_MODULE_29__.OperationStatus),
|
|
10300
|
+
/* harmony export */ "PackageJsonDependency": () => (/* reexport safe */ _api_PackageJsonEditor__WEBPACK_IMPORTED_MODULE_16__.PackageJsonDependency),
|
|
10301
|
+
/* harmony export */ "PackageJsonEditor": () => (/* reexport safe */ _api_PackageJsonEditor__WEBPACK_IMPORTED_MODULE_16__.PackageJsonEditor),
|
|
10302
|
+
/* harmony export */ "PackageManager": () => (/* reexport safe */ _api_packageManager_PackageManager__WEBPACK_IMPORTED_MODULE_10__.PackageManager),
|
|
10781
10303
|
/* harmony export */ "PackageManagerOptionsConfigurationBase": () => (/* reexport safe */ _logic_base_BasePackageManagerOptionsConfiguration__WEBPACK_IMPORTED_MODULE_2__.PackageManagerOptionsConfigurationBase),
|
|
10782
|
-
/* harmony export */ "PhasedCommandHooks": () => (/* reexport safe */
|
|
10304
|
+
/* harmony export */ "PhasedCommandHooks": () => (/* reexport safe */ _pluginFramework_PhasedCommandHooks__WEBPACK_IMPORTED_MODULE_32__.PhasedCommandHooks),
|
|
10783
10305
|
/* harmony export */ "PnpmOptionsConfiguration": () => (/* reexport safe */ _logic_pnpm_PnpmOptionsConfiguration__WEBPACK_IMPORTED_MODULE_5__.PnpmOptionsConfiguration),
|
|
10784
|
-
/* harmony export */ "ProjectChangeAnalyzer": () => (/* reexport safe */
|
|
10785
|
-
/* harmony export */ "RepoStateFile": () => (/* reexport safe */
|
|
10786
|
-
/* harmony export */ "Rush": () => (/* reexport safe */
|
|
10306
|
+
/* harmony export */ "ProjectChangeAnalyzer": () => (/* reexport safe */ _logic_ProjectChangeAnalyzer__WEBPACK_IMPORTED_MODULE_27__.ProjectChangeAnalyzer),
|
|
10307
|
+
/* harmony export */ "RepoStateFile": () => (/* reexport safe */ _logic_RepoStateFile__WEBPACK_IMPORTED_MODULE_17__.RepoStateFile),
|
|
10308
|
+
/* harmony export */ "Rush": () => (/* reexport safe */ _api_Rush__WEBPACK_IMPORTED_MODULE_24__.Rush),
|
|
10787
10309
|
/* harmony export */ "RushConfiguration": () => (/* reexport safe */ _api_RushConfiguration__WEBPACK_IMPORTED_MODULE_1__.RushConfiguration),
|
|
10788
|
-
/* harmony export */ "RushConfigurationProject": () => (/* reexport safe */
|
|
10789
|
-
/* harmony export */ "RushConstants": () => (/* reexport safe */
|
|
10790
|
-
/* harmony export */ "RushLifecycleHooks": () => (/* reexport safe */
|
|
10791
|
-
/* harmony export */ "RushSession": () => (/* reexport safe */
|
|
10792
|
-
/* harmony export */ "RushUserConfiguration": () => (/* reexport safe */
|
|
10793
|
-
/* harmony export */ "VersionPolicy": () => (/* reexport safe */
|
|
10794
|
-
/* harmony export */ "VersionPolicyConfiguration": () => (/* reexport safe */
|
|
10795
|
-
/* harmony export */ "VersionPolicyDefinitionName": () => (/* reexport safe */
|
|
10310
|
+
/* harmony export */ "RushConfigurationProject": () => (/* reexport safe */ _api_RushConfigurationProject__WEBPACK_IMPORTED_MODULE_11__.RushConfigurationProject),
|
|
10311
|
+
/* harmony export */ "RushConstants": () => (/* reexport safe */ _logic_RushConstants__WEBPACK_IMPORTED_MODULE_9__.RushConstants),
|
|
10312
|
+
/* harmony export */ "RushLifecycleHooks": () => (/* reexport safe */ _pluginFramework_RushLifeCycle__WEBPACK_IMPORTED_MODULE_31__.RushLifecycleHooks),
|
|
10313
|
+
/* harmony export */ "RushSession": () => (/* reexport safe */ _pluginFramework_RushSession__WEBPACK_IMPORTED_MODULE_30__.RushSession),
|
|
10314
|
+
/* harmony export */ "RushUserConfiguration": () => (/* reexport safe */ _api_RushUserConfiguration__WEBPACK_IMPORTED_MODULE_12__.RushUserConfiguration),
|
|
10315
|
+
/* harmony export */ "VersionPolicy": () => (/* reexport safe */ _api_VersionPolicy__WEBPACK_IMPORTED_MODULE_22__.VersionPolicy),
|
|
10316
|
+
/* harmony export */ "VersionPolicyConfiguration": () => (/* reexport safe */ _api_VersionPolicyConfiguration__WEBPACK_IMPORTED_MODULE_23__.VersionPolicyConfiguration),
|
|
10317
|
+
/* harmony export */ "VersionPolicyDefinitionName": () => (/* reexport safe */ _api_VersionPolicy__WEBPACK_IMPORTED_MODULE_22__.VersionPolicyDefinitionName),
|
|
10796
10318
|
/* harmony export */ "YarnOptionsConfiguration": () => (/* reexport safe */ _logic_yarn_YarnOptionsConfiguration__WEBPACK_IMPORTED_MODULE_4__.YarnOptionsConfiguration),
|
|
10797
|
-
/* harmony export */ "
|
|
10798
|
-
/* harmony export */ "
|
|
10799
|
-
/* harmony export */ "
|
|
10800
|
-
/* harmony export */ "
|
|
10801
|
-
/* harmony export */ "
|
|
10802
|
-
/* harmony export */ "_RushInternals": () => (/* reexport safe */ _api_RushInternals__WEBPACK_IMPORTED_MODULE_27__.RushInternals)
|
|
10319
|
+
/* harmony export */ "_LastInstallFlag": () => (/* reexport safe */ _api_LastInstallFlag__WEBPACK_IMPORTED_MODULE_21__.LastInstallFlag),
|
|
10320
|
+
/* harmony export */ "_OperationMetadataManager": () => (/* reexport safe */ _logic_operations_OperationMetadataManager__WEBPACK_IMPORTED_MODULE_35__.OperationMetadataManager),
|
|
10321
|
+
/* harmony export */ "_OperationStateFile": () => (/* reexport safe */ _logic_operations_OperationStateFile__WEBPACK_IMPORTED_MODULE_34__.OperationStateFile),
|
|
10322
|
+
/* harmony export */ "_RushGlobalFolder": () => (/* reexport safe */ _api_RushGlobalFolder__WEBPACK_IMPORTED_MODULE_13__.RushGlobalFolder),
|
|
10323
|
+
/* harmony export */ "_RushInternals": () => (/* reexport safe */ _api_RushInternals__WEBPACK_IMPORTED_MODULE_25__.RushInternals)
|
|
10803
10324
|
/* harmony export */ });
|
|
10804
10325
|
/* harmony import */ var _api_ApprovedPackagesPolicy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./api/ApprovedPackagesPolicy */ 986096);
|
|
10805
10326
|
/* harmony import */ var _api_RushConfiguration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./api/RushConfiguration */ 126002);
|
|
@@ -10808,37 +10329,35 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10808
10329
|
/* harmony import */ var _logic_yarn_YarnOptionsConfiguration__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./logic/yarn/YarnOptionsConfiguration */ 17314);
|
|
10809
10330
|
/* harmony import */ var _logic_pnpm_PnpmOptionsConfiguration__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./logic/pnpm/PnpmOptionsConfiguration */ 402835);
|
|
10810
10331
|
/* harmony import */ var _api_BuildCacheConfiguration__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./api/BuildCacheConfiguration */ 541976);
|
|
10811
|
-
/* harmony import */ var
|
|
10812
|
-
/* harmony import */ var
|
|
10813
|
-
/* harmony import */ var
|
|
10814
|
-
/* harmony import */ var
|
|
10815
|
-
/* harmony import */ var
|
|
10816
|
-
/* harmony import */ var
|
|
10817
|
-
/* harmony import */ var
|
|
10818
|
-
/* harmony import */ var
|
|
10819
|
-
/* harmony import */ var
|
|
10820
|
-
/* harmony import */ var
|
|
10821
|
-
/* harmony import */ var
|
|
10822
|
-
/* harmony import */ var
|
|
10823
|
-
/* harmony import */ var
|
|
10824
|
-
/* harmony import */ var
|
|
10825
|
-
/* harmony import */ var
|
|
10826
|
-
/* harmony import */ var
|
|
10827
|
-
/* harmony import */ var
|
|
10828
|
-
/* harmony import */ var
|
|
10829
|
-
/* harmony import */ var
|
|
10830
|
-
/* harmony import */ var
|
|
10831
|
-
/* harmony import */ var
|
|
10832
|
-
/* harmony import */ var
|
|
10833
|
-
/* harmony import */ var
|
|
10834
|
-
/* harmony import */ var
|
|
10835
|
-
/* harmony import */ var
|
|
10836
|
-
/* harmony import */ var
|
|
10837
|
-
/* harmony import */ var
|
|
10838
|
-
/* harmony import */ var
|
|
10839
|
-
/* harmony import */ var
|
|
10840
|
-
/* harmony import */ var _logic_operations_OperationStateFile__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./logic/operations/OperationStateFile */ 600463);
|
|
10841
|
-
/* harmony import */ var _logic_operations_OperationMetadataManager__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./logic/operations/OperationMetadataManager */ 441895);
|
|
10332
|
+
/* harmony import */ var _logic_buildCache_FileSystemBuildCacheProvider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./logic/buildCache/FileSystemBuildCacheProvider */ 339043);
|
|
10333
|
+
/* harmony import */ var _api_EnvironmentConfiguration__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./api/EnvironmentConfiguration */ 382806);
|
|
10334
|
+
/* harmony import */ var _logic_RushConstants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./logic/RushConstants */ 951904);
|
|
10335
|
+
/* harmony import */ var _api_packageManager_PackageManager__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./api/packageManager/PackageManager */ 923109);
|
|
10336
|
+
/* harmony import */ var _api_RushConfigurationProject__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./api/RushConfigurationProject */ 900491);
|
|
10337
|
+
/* harmony import */ var _api_RushUserConfiguration__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./api/RushUserConfiguration */ 354981);
|
|
10338
|
+
/* harmony import */ var _api_RushGlobalFolder__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./api/RushGlobalFolder */ 164409);
|
|
10339
|
+
/* harmony import */ var _api_ApprovedPackagesConfiguration__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./api/ApprovedPackagesConfiguration */ 589083);
|
|
10340
|
+
/* harmony import */ var _api_CommonVersionsConfiguration__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./api/CommonVersionsConfiguration */ 989216);
|
|
10341
|
+
/* harmony import */ var _api_PackageJsonEditor__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./api/PackageJsonEditor */ 73666);
|
|
10342
|
+
/* harmony import */ var _logic_RepoStateFile__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./logic/RepoStateFile */ 880175);
|
|
10343
|
+
/* harmony import */ var _logic_LookupByPath__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./logic/LookupByPath */ 590211);
|
|
10344
|
+
/* harmony import */ var _api_EventHooks__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./api/EventHooks */ 519005);
|
|
10345
|
+
/* harmony import */ var _api_ChangeManager__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./api/ChangeManager */ 714304);
|
|
10346
|
+
/* harmony import */ var _api_LastInstallFlag__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./api/LastInstallFlag */ 919846);
|
|
10347
|
+
/* harmony import */ var _api_VersionPolicy__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./api/VersionPolicy */ 734331);
|
|
10348
|
+
/* harmony import */ var _api_VersionPolicyConfiguration__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./api/VersionPolicyConfiguration */ 904624);
|
|
10349
|
+
/* harmony import */ var _api_Rush__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./api/Rush */ 465002);
|
|
10350
|
+
/* harmony import */ var _api_RushInternals__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./api/RushInternals */ 882917);
|
|
10351
|
+
/* harmony import */ var _api_ExperimentsConfiguration__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./api/ExperimentsConfiguration */ 259205);
|
|
10352
|
+
/* harmony import */ var _logic_ProjectChangeAnalyzer__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./logic/ProjectChangeAnalyzer */ 311605);
|
|
10353
|
+
/* harmony import */ var _logic_operations_Operation__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./logic/operations/Operation */ 768667);
|
|
10354
|
+
/* harmony import */ var _logic_operations_OperationStatus__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./logic/operations/OperationStatus */ 476597);
|
|
10355
|
+
/* harmony import */ var _pluginFramework_RushSession__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./pluginFramework/RushSession */ 964818);
|
|
10356
|
+
/* harmony import */ var _pluginFramework_RushLifeCycle__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./pluginFramework/RushLifeCycle */ 804876);
|
|
10357
|
+
/* harmony import */ var _pluginFramework_PhasedCommandHooks__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./pluginFramework/PhasedCommandHooks */ 580814);
|
|
10358
|
+
/* harmony import */ var _logic_CredentialCache__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./logic/CredentialCache */ 963954);
|
|
10359
|
+
/* harmony import */ var _logic_operations_OperationStateFile__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./logic/operations/OperationStateFile */ 600463);
|
|
10360
|
+
/* harmony import */ var _logic_operations_OperationMetadataManager__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./logic/operations/OperationMetadataManager */ 441895);
|
|
10842
10361
|
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
10843
10362
|
// See LICENSE in the project root for license information.
|
|
10844
10363
|
/**
|
|
@@ -10878,8 +10397,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10878
10397
|
|
|
10879
10398
|
|
|
10880
10399
|
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
10400
|
|
|
10884
10401
|
|
|
10885
10402
|
|
|
@@ -11731,9 +11248,6 @@ class DependencyAnalyzer {
|
|
|
11731
11248
|
const allVersionsByPackageName = new Map();
|
|
11732
11249
|
const allowedAlternativeVersions = commonVersionsConfiguration.allowedAlternativeVersions;
|
|
11733
11250
|
for (const project of this._rushConfiguration.projects) {
|
|
11734
|
-
if (project.splitWorkspace) {
|
|
11735
|
-
continue;
|
|
11736
|
-
}
|
|
11737
11251
|
const dependencies = [
|
|
11738
11252
|
...project.packageJsonEditor.dependencyList,
|
|
11739
11253
|
...project.packageJsonEditor.devDependencyList
|
|
@@ -12904,7 +12418,7 @@ class LookupByPath {
|
|
|
12904
12418
|
nextIndex = input.indexOf(delimiter, previousIndex);
|
|
12905
12419
|
}
|
|
12906
12420
|
// Last segment
|
|
12907
|
-
if (previousIndex
|
|
12421
|
+
if (previousIndex < input.length) {
|
|
12908
12422
|
yield {
|
|
12909
12423
|
prefix: input.slice(previousIndex, input.length),
|
|
12910
12424
|
index: input.length
|
|
@@ -13506,18 +13020,18 @@ class ProjectChangeAnalyzer {
|
|
|
13506
13020
|
// Include project shrinkwrap files as part of the computation
|
|
13507
13021
|
const additionalFilesToHash = [];
|
|
13508
13022
|
if (this._rushConfiguration.packageManager === 'pnpm') {
|
|
13509
|
-
|
|
13023
|
+
const absoluteFilePathsToCheck = [];
|
|
13024
|
+
for (const project of this._rushConfiguration.projects) {
|
|
13510
13025
|
const projectShrinkwrapFilePath = _base_BaseProjectShrinkwrapFile__WEBPACK_IMPORTED_MODULE_10__.BaseProjectShrinkwrapFile.getFilePathForProject(project);
|
|
13511
|
-
|
|
13512
|
-
// Missing shrinkwrap of split workspace project is allowed because split workspace project can be partial installed
|
|
13513
|
-
if (project.splitWorkspace) {
|
|
13514
|
-
return;
|
|
13515
|
-
}
|
|
13516
|
-
throw new Error(`A project dependency file (${projectShrinkwrapFilePath}) is missing. You may need to run ` +
|
|
13517
|
-
'"rush install" or "rush update".');
|
|
13518
|
-
}
|
|
13026
|
+
absoluteFilePathsToCheck.push(projectShrinkwrapFilePath);
|
|
13519
13027
|
const relativeProjectShrinkwrapFilePath = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_4__.Path.convertToSlashes(path__WEBPACK_IMPORTED_MODULE_0__.relative(rootDir, projectShrinkwrapFilePath));
|
|
13520
13028
|
additionalFilesToHash.push(relativeProjectShrinkwrapFilePath);
|
|
13029
|
+
}
|
|
13030
|
+
await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_4__.Async.forEachAsync(absoluteFilePathsToCheck, async (filePath) => {
|
|
13031
|
+
if (!(await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_4__.FileSystem.existsAsync(filePath))) {
|
|
13032
|
+
throw new Error(`A project dependency file (${filePath}) is missing. You may need to run ` +
|
|
13033
|
+
'"rush install" or "rush update".');
|
|
13034
|
+
}
|
|
13521
13035
|
});
|
|
13522
13036
|
}
|
|
13523
13037
|
const hashes = await (0,_rushstack_package_deps_hash__WEBPACK_IMPORTED_MODULE_3__.getRepoStateAsync)(rootDir, additionalFilesToHash, gitPath);
|
|
@@ -14334,8 +13848,6 @@ class PurgeManager {
|
|
|
14334
13848
|
this._rushGlobalFolder = rushGlobalFolder;
|
|
14335
13849
|
const commonAsyncRecyclerPath = path__WEBPACK_IMPORTED_MODULE_1__.join(this._rushConfiguration.commonTempFolder, _logic_RushConstants__WEBPACK_IMPORTED_MODULE_2__.RushConstants.rushRecyclerFolderName);
|
|
14336
13850
|
this.commonTempFolderRecycler = new _utilities_AsyncRecycler__WEBPACK_IMPORTED_MODULE_3__.AsyncRecycler(commonAsyncRecyclerPath);
|
|
14337
|
-
const commonSplitAsyncRecyclerPath = path__WEBPACK_IMPORTED_MODULE_1__.join(this._rushConfiguration.commonTempSplitFolder, _logic_RushConstants__WEBPACK_IMPORTED_MODULE_2__.RushConstants.rushRecyclerFolderName);
|
|
14338
|
-
this.commonTempSplitFolderRecycler = new _utilities_AsyncRecycler__WEBPACK_IMPORTED_MODULE_3__.AsyncRecycler(commonSplitAsyncRecyclerPath);
|
|
14339
13851
|
const rushUserAsyncRecyclerPath = path__WEBPACK_IMPORTED_MODULE_1__.join(this._rushGlobalFolder.path, _logic_RushConstants__WEBPACK_IMPORTED_MODULE_2__.RushConstants.rushRecyclerFolderName);
|
|
14340
13852
|
this._rushUserFolderRecycler = new _utilities_AsyncRecycler__WEBPACK_IMPORTED_MODULE_3__.AsyncRecycler(rushUserAsyncRecyclerPath);
|
|
14341
13853
|
}
|
|
@@ -14345,7 +13857,6 @@ class PurgeManager {
|
|
|
14345
13857
|
*/
|
|
14346
13858
|
deleteAll() {
|
|
14347
13859
|
this.commonTempFolderRecycler.deleteAll();
|
|
14348
|
-
this.commonTempSplitFolderRecycler.deleteAll();
|
|
14349
13860
|
this._rushUserFolderRecycler.deleteAll();
|
|
14350
13861
|
}
|
|
14351
13862
|
/**
|
|
@@ -14355,7 +13866,6 @@ class PurgeManager {
|
|
|
14355
13866
|
// Delete everything under common\temp except for the recycler folder itself
|
|
14356
13867
|
console.log('Purging ' + this._rushConfiguration.commonTempFolder);
|
|
14357
13868
|
this.commonTempFolderRecycler.moveAllItemsInFolder(this._rushConfiguration.commonTempFolder, this._getMembersToExclude(this._rushConfiguration.commonTempFolder, true));
|
|
14358
|
-
this.commonTempSplitFolderRecycler.moveAllItemsInFolder(this._rushConfiguration.commonTempSplitFolder, this._getMembersToExclude(this._rushConfiguration.commonTempFolder, true));
|
|
14359
13869
|
}
|
|
14360
13870
|
/**
|
|
14361
13871
|
* In addition to performing the purgeNormal() operation, this method also cleans the
|
|
@@ -14638,12 +14148,6 @@ RushConstants.rushTempNpmScope = '@rush-temp';
|
|
|
14638
14148
|
* Example: `C:\MyRepo\common\temp`
|
|
14639
14149
|
*/
|
|
14640
14150
|
RushConstants.rushTempFolderName = 'temp';
|
|
14641
|
-
/**
|
|
14642
|
-
* The folder name ("temp-split") under the common folder, or under the .rush folder in each project's directory where
|
|
14643
|
-
* temporary files will be stored.
|
|
14644
|
-
* Example: `C:\MyRepo\common\temp-split`
|
|
14645
|
-
*/
|
|
14646
|
-
RushConstants.rushTempSplitFolderName = 'temp-split';
|
|
14647
14151
|
/**
|
|
14648
14152
|
* The folder name ("projects") where temporary projects will be stored.
|
|
14649
14153
|
* Example: `C:\MyRepo\common\temp\projects`
|
|
@@ -14751,15 +14255,6 @@ RushConstants.buildCacheFilename = 'build-cache.json';
|
|
|
14751
14255
|
* Changing this ensures that cache entries generated by an old version will no longer register as a cache hit.
|
|
14752
14256
|
*/
|
|
14753
14257
|
RushConstants.buildCacheVersion = 1;
|
|
14754
|
-
/**
|
|
14755
|
-
* Cobuild configuration file.
|
|
14756
|
-
*/
|
|
14757
|
-
RushConstants.cobuildFilename = 'cobuild.json';
|
|
14758
|
-
/**
|
|
14759
|
-
* Cobuild version number, incremented when the logic to create cobuild lock changes.
|
|
14760
|
-
* Changing this ensures that lock generated by an old version will no longer access as a cobuild lock.
|
|
14761
|
-
*/
|
|
14762
|
-
RushConstants.cobuildLockVersion = 1;
|
|
14763
14258
|
/**
|
|
14764
14259
|
* Per-project configuration filename.
|
|
14765
14260
|
*/
|
|
@@ -15000,8 +14495,7 @@ class SetupChecks {
|
|
|
15000
14495
|
`, but NPM ${MINIMUM_SUPPORTED_NPM_VERSION} is the minimum supported by Rush.`);
|
|
15001
14496
|
}
|
|
15002
14497
|
}
|
|
15003
|
-
|
|
15004
|
-
// SetupChecks._checkForPhantomFolders(rushConfiguration);
|
|
14498
|
+
SetupChecks._checkForPhantomFolders(rushConfiguration);
|
|
15005
14499
|
}
|
|
15006
14500
|
static _checkForPhantomFolders(rushConfiguration) {
|
|
15007
14501
|
const phantomFolders = [];
|
|
@@ -15950,8 +15444,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15950
15444
|
|
|
15951
15445
|
class ProjectBuildCache {
|
|
15952
15446
|
constructor(cacheId, options) {
|
|
15953
|
-
const { buildCacheConfiguration,
|
|
15954
|
-
this._project = project;
|
|
15447
|
+
const { buildCacheConfiguration, projectConfiguration, projectOutputFolderNames, additionalProjectOutputFilePaths } = options;
|
|
15448
|
+
this._project = projectConfiguration.project;
|
|
15955
15449
|
this._localBuildCacheProvider = buildCacheConfiguration.localCacheProvider;
|
|
15956
15450
|
this._cloudBuildCacheProvider = buildCacheConfiguration.cloudCacheProvider;
|
|
15957
15451
|
this._buildCacheEnabled = buildCacheConfiguration.buildCacheEnabled;
|
|
@@ -15966,22 +15460,19 @@ class ProjectBuildCache {
|
|
|
15966
15460
|
}
|
|
15967
15461
|
return ProjectBuildCache._tarUtilityPromise;
|
|
15968
15462
|
}
|
|
15969
|
-
get cacheId() {
|
|
15970
|
-
return this._cacheId;
|
|
15971
|
-
}
|
|
15972
15463
|
static async tryGetProjectBuildCache(options) {
|
|
15973
|
-
const { terminal,
|
|
15464
|
+
const { terminal, projectConfiguration, projectOutputFolderNames, trackedProjectFiles } = options;
|
|
15974
15465
|
if (!trackedProjectFiles) {
|
|
15975
15466
|
return undefined;
|
|
15976
15467
|
}
|
|
15977
|
-
if (!ProjectBuildCache._validateProject(terminal,
|
|
15468
|
+
if (!ProjectBuildCache._validateProject(terminal, projectConfiguration, projectOutputFolderNames, trackedProjectFiles)) {
|
|
15978
15469
|
return undefined;
|
|
15979
15470
|
}
|
|
15980
15471
|
const cacheId = await ProjectBuildCache._getCacheId(options);
|
|
15981
15472
|
return new ProjectBuildCache(cacheId, options);
|
|
15982
15473
|
}
|
|
15983
|
-
static _validateProject(terminal,
|
|
15984
|
-
const normalizedProjectRelativeFolder = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_2__.Path.convertToSlashes(project.projectRelativeFolder);
|
|
15474
|
+
static _validateProject(terminal, projectConfiguration, projectOutputFolderNames, trackedProjectFiles) {
|
|
15475
|
+
const normalizedProjectRelativeFolder = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_2__.Path.convertToSlashes(projectConfiguration.project.projectRelativeFolder);
|
|
15985
15476
|
const outputFolders = [];
|
|
15986
15477
|
if (projectOutputFolderNames) {
|
|
15987
15478
|
for (const outputFolderName of projectOutputFolderNames) {
|
|
@@ -16005,8 +15496,8 @@ class ProjectBuildCache {
|
|
|
16005
15496
|
return true;
|
|
16006
15497
|
}
|
|
16007
15498
|
}
|
|
16008
|
-
async tryRestoreFromCacheAsync(terminal
|
|
16009
|
-
const cacheId =
|
|
15499
|
+
async tryRestoreFromCacheAsync(terminal) {
|
|
15500
|
+
const cacheId = this._cacheId;
|
|
16010
15501
|
if (!cacheId) {
|
|
16011
15502
|
terminal.writeWarningLine('Unable to get cache ID. Ensure Git is installed.');
|
|
16012
15503
|
return false;
|
|
@@ -16062,13 +15553,13 @@ class ProjectBuildCache {
|
|
|
16062
15553
|
}
|
|
16063
15554
|
return restoreSuccess;
|
|
16064
15555
|
}
|
|
16065
|
-
async trySetCacheEntryAsync(terminal
|
|
15556
|
+
async trySetCacheEntryAsync(terminal) {
|
|
16066
15557
|
var _a, _b, _c;
|
|
16067
15558
|
if (!this._cacheWriteEnabled) {
|
|
16068
15559
|
// Skip writing local and cloud build caches, without any noise
|
|
16069
15560
|
return true;
|
|
16070
15561
|
}
|
|
16071
|
-
const cacheId =
|
|
15562
|
+
const cacheId = this._cacheId;
|
|
16072
15563
|
if (!cacheId) {
|
|
16073
15564
|
terminal.writeWarningLine('Unable to get cache ID. Ensure Git is installed.');
|
|
16074
15565
|
return false;
|
|
@@ -16245,7 +15736,7 @@ class ProjectBuildCache {
|
|
|
16245
15736
|
const projectStates = [];
|
|
16246
15737
|
const projectsThatHaveBeenProcessed = new Set();
|
|
16247
15738
|
let projectsToProcess = new Set();
|
|
16248
|
-
projectsToProcess.add(options.project);
|
|
15739
|
+
projectsToProcess.add(options.projectConfiguration.project);
|
|
16249
15740
|
while (projectsToProcess.size > 0) {
|
|
16250
15741
|
const newProjectsToProcess = new Set();
|
|
16251
15742
|
for (const projectToProcess of projectsToProcess) {
|
|
@@ -16294,7 +15785,7 @@ class ProjectBuildCache {
|
|
|
16294
15785
|
}
|
|
16295
15786
|
const projectStateHash = hash.digest('hex');
|
|
16296
15787
|
return options.buildCacheConfiguration.getCacheEntryId({
|
|
16297
|
-
projectName: options.project.packageName,
|
|
15788
|
+
projectName: options.projectConfiguration.project.packageName,
|
|
16298
15789
|
projectStateHash,
|
|
16299
15790
|
phaseName: options.phaseName
|
|
16300
15791
|
});
|
|
@@ -16410,66 +15901,6 @@ async function getHashesForGlobsAsync(globPatterns, packagePath, repoState) {
|
|
|
16410
15901
|
|
|
16411
15902
|
/***/ }),
|
|
16412
15903
|
|
|
16413
|
-
/***/ 676896:
|
|
16414
|
-
/*!*************************************************!*\
|
|
16415
|
-
!*** ./lib-esnext/logic/cobuild/CobuildLock.js ***!
|
|
16416
|
-
\*************************************************/
|
|
16417
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
16418
|
-
|
|
16419
|
-
__webpack_require__.r(__webpack_exports__);
|
|
16420
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16421
|
-
/* harmony export */ "CobuildLock": () => (/* binding */ CobuildLock)
|
|
16422
|
-
/* harmony export */ });
|
|
16423
|
-
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @rushstack/node-core-library */ 132939);
|
|
16424
|
-
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__);
|
|
16425
|
-
/* harmony import */ var _RushConstants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../RushConstants */ 951904);
|
|
16426
|
-
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
16427
|
-
// See LICENSE in the project root for license information.
|
|
16428
|
-
|
|
16429
|
-
|
|
16430
|
-
class CobuildLock {
|
|
16431
|
-
constructor(options) {
|
|
16432
|
-
const { cobuildConfiguration, projectBuildCache } = options;
|
|
16433
|
-
this.projectBuildCache = projectBuildCache;
|
|
16434
|
-
this.cobuildConfiguration = cobuildConfiguration;
|
|
16435
|
-
const { contextId } = cobuildConfiguration;
|
|
16436
|
-
const { cacheId } = projectBuildCache;
|
|
16437
|
-
if (!cacheId) {
|
|
16438
|
-
// This should never happen
|
|
16439
|
-
throw new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.InternalError(`Cache id is require for cobuild lock`);
|
|
16440
|
-
}
|
|
16441
|
-
if (!contextId) {
|
|
16442
|
-
// This should never happen
|
|
16443
|
-
throw new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.InternalError(`Cobuild context id is require for cobuild lock`);
|
|
16444
|
-
}
|
|
16445
|
-
this._cobuildContext = {
|
|
16446
|
-
contextId,
|
|
16447
|
-
cacheId,
|
|
16448
|
-
version: _RushConstants__WEBPACK_IMPORTED_MODULE_1__.RushConstants.cobuildLockVersion
|
|
16449
|
-
};
|
|
16450
|
-
}
|
|
16451
|
-
async setCompletedStateAsync(state) {
|
|
16452
|
-
await this.cobuildConfiguration.cobuildLockProvider.setCompletedStateAsync(this._cobuildContext, state);
|
|
16453
|
-
}
|
|
16454
|
-
async getCompletedStateAsync() {
|
|
16455
|
-
const state = await this.cobuildConfiguration.cobuildLockProvider.getCompletedStateAsync(this._cobuildContext);
|
|
16456
|
-
return state;
|
|
16457
|
-
}
|
|
16458
|
-
async tryAcquireLockAsync() {
|
|
16459
|
-
const acquireLockResult = await this.cobuildConfiguration.cobuildLockProvider.acquireLockAsync(this._cobuildContext);
|
|
16460
|
-
return acquireLockResult;
|
|
16461
|
-
}
|
|
16462
|
-
async renewLockAsync() {
|
|
16463
|
-
await this.cobuildConfiguration.cobuildLockProvider.renewLockAsync(this._cobuildContext);
|
|
16464
|
-
}
|
|
16465
|
-
get cobuildContext() {
|
|
16466
|
-
return this._cobuildContext;
|
|
16467
|
-
}
|
|
16468
|
-
}
|
|
16469
|
-
//# sourceMappingURL=CobuildLock.js.map
|
|
16470
|
-
|
|
16471
|
-
/***/ }),
|
|
16472
|
-
|
|
16473
15904
|
/***/ 544987:
|
|
16474
15905
|
/*!****************************************************************!*\
|
|
16475
15906
|
!*** ./lib-esnext/logic/deploy/DeployScenarioConfiguration.js ***!
|
|
@@ -16480,19 +15911,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16480
15911
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16481
15912
|
/* harmony export */ "DeployScenarioConfiguration": () => (/* binding */ DeployScenarioConfiguration)
|
|
16482
15913
|
/* harmony export */ });
|
|
16483
|
-
/* harmony import */ var
|
|
16484
|
-
/* harmony import */ var
|
|
16485
|
-
/* harmony import */ var
|
|
16486
|
-
/* harmony import */ var
|
|
16487
|
-
/* harmony import */ var
|
|
16488
|
-
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_2__);
|
|
16489
|
-
/* harmony import */ var _schemas_deploy_scenario_schema_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../schemas/deploy-scenario.schema.json */ 173533);
|
|
15914
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ 371017);
|
|
15915
|
+
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
|
15916
|
+
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @rushstack/node-core-library */ 132939);
|
|
15917
|
+
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__);
|
|
15918
|
+
/* harmony import */ var _schemas_deploy_scenario_schema_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../schemas/deploy-scenario.schema.json */ 173533);
|
|
16490
15919
|
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
16491
15920
|
// See LICENSE in the project root for license information.
|
|
16492
15921
|
|
|
16493
15922
|
|
|
16494
15923
|
|
|
16495
|
-
|
|
16496
15924
|
class DeployScenarioConfiguration {
|
|
16497
15925
|
constructor(json, projectJsonsByName) {
|
|
16498
15926
|
this.json = json;
|
|
@@ -16525,14 +15953,14 @@ class DeployScenarioConfiguration {
|
|
|
16525
15953
|
else {
|
|
16526
15954
|
scenarioFileName = `deploy.json`;
|
|
16527
15955
|
}
|
|
16528
|
-
return
|
|
15956
|
+
return path__WEBPACK_IMPORTED_MODULE_0__.join(rushConfiguration.commonRushConfigFolder, scenarioFileName);
|
|
16529
15957
|
}
|
|
16530
|
-
static loadFromFile(scenarioFilePath, rushConfiguration) {
|
|
16531
|
-
if (!
|
|
15958
|
+
static loadFromFile(terminal, scenarioFilePath, rushConfiguration) {
|
|
15959
|
+
if (!_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.FileSystem.exists(scenarioFilePath)) {
|
|
16532
15960
|
throw new Error('The scenario config file was not found: ' + scenarioFilePath);
|
|
16533
15961
|
}
|
|
16534
|
-
|
|
16535
|
-
const deployScenarioJson =
|
|
15962
|
+
terminal.writeLine(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Colors.cyan(`Loading deployment scenario: ${scenarioFilePath}`));
|
|
15963
|
+
const deployScenarioJson = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.JsonFile.loadAndValidate(scenarioFilePath, DeployScenarioConfiguration._jsonSchema);
|
|
16536
15964
|
// Apply the defaults
|
|
16537
15965
|
if (!deployScenarioJson.linkCreation) {
|
|
16538
15966
|
deployScenarioJson.linkCreation = 'default';
|
|
@@ -16559,7 +15987,7 @@ class DeployScenarioConfiguration {
|
|
|
16559
15987
|
// Matches lowercase words separated by dashes.
|
|
16560
15988
|
// Example: "deploy-the-thing123"
|
|
16561
15989
|
DeployScenarioConfiguration._scenarioNameRegExp = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
16562
|
-
DeployScenarioConfiguration._jsonSchema =
|
|
15990
|
+
DeployScenarioConfiguration._jsonSchema = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.JsonSchema.fromLoadedObject(_schemas_deploy_scenario_schema_json__WEBPACK_IMPORTED_MODULE_2__);
|
|
16563
15991
|
//# sourceMappingURL=DeployScenarioConfiguration.js.map
|
|
16564
15992
|
|
|
16565
15993
|
/***/ }),
|
|
@@ -16634,20 +16062,6 @@ class InstallHelpers {
|
|
|
16634
16062
|
// will consider this timestamp
|
|
16635
16063
|
_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_2__.JsonFile.save(commonPackageJson, commonPackageJsonFilename, { onlyIfChanged: true });
|
|
16636
16064
|
}
|
|
16637
|
-
static generateCommonSplitPackageJson(rushConfiguration) {
|
|
16638
|
-
const commonPackageJson = {
|
|
16639
|
-
dependencies: {},
|
|
16640
|
-
description: 'Temporary file generated by the Rush tool',
|
|
16641
|
-
name: 'rush-common-split',
|
|
16642
|
-
private: true,
|
|
16643
|
-
version: '0.0.0'
|
|
16644
|
-
};
|
|
16645
|
-
// Example: "C:\MyRepo\common\temp-split\package.json"
|
|
16646
|
-
const commonPackageJsonFilename = path__WEBPACK_IMPORTED_MODULE_1__.join(rushConfiguration.commonTempSplitFolder, _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_2__.FileConstants.PackageJson);
|
|
16647
|
-
// Don't update the file timestamp unless the content has changed, since "rush install"
|
|
16648
|
-
// will consider this timestamp
|
|
16649
|
-
_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_2__.JsonFile.save(commonPackageJson, commonPackageJsonFilename, { onlyIfChanged: true });
|
|
16650
|
-
}
|
|
16651
16065
|
static getPackageManagerEnvironment(rushConfiguration, options = {}) {
|
|
16652
16066
|
let configurationEnvironment = undefined;
|
|
16653
16067
|
if (rushConfiguration.packageManager === 'npm') {
|
|
@@ -16725,9 +16139,6 @@ class InstallHelpers {
|
|
|
16725
16139
|
packageManagerMarker.create();
|
|
16726
16140
|
// Example: "C:\MyRepo\common\temp"
|
|
16727
16141
|
_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_2__.FileSystem.ensureFolder(rushConfiguration.commonTempFolder);
|
|
16728
|
-
if (rushConfiguration.hasSplitWorkspaceProject) {
|
|
16729
|
-
_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_2__.FileSystem.ensureFolder(rushConfiguration.commonTempSplitFolder);
|
|
16730
|
-
}
|
|
16731
16142
|
// Example: "C:\MyRepo\common\temp\pnpm-local"
|
|
16732
16143
|
const localPackageManagerToolFolder = path__WEBPACK_IMPORTED_MODULE_1__.join(rushConfiguration.commonTempFolder, `${packageManager}-local`);
|
|
16733
16144
|
logIfConsoleOutputIsNotRestricted(`\nSymlinking "${localPackageManagerToolFolder}"`);
|
|
@@ -16932,24 +16343,14 @@ class NpmShrinkwrapFile extends _base_BaseShrinkwrapFile__WEBPACK_IMPORTED_MODUL
|
|
|
16932
16343
|
|
|
16933
16344
|
__webpack_require__.r(__webpack_exports__);
|
|
16934
16345
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16935
|
-
/* harmony export */ "AsyncOperationQueue": () => (/* binding */ AsyncOperationQueue)
|
|
16936
|
-
/* harmony export */ "UNASSIGNED_OPERATION": () => (/* binding */ UNASSIGNED_OPERATION)
|
|
16346
|
+
/* harmony export */ "AsyncOperationQueue": () => (/* binding */ AsyncOperationQueue)
|
|
16937
16347
|
/* harmony export */ });
|
|
16938
16348
|
/* harmony import */ var _OperationStatus__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./OperationStatus */ 476597);
|
|
16939
16349
|
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
16940
16350
|
// See LICENSE in the project root for license information.
|
|
16941
16351
|
|
|
16942
16352
|
/**
|
|
16943
|
-
*
|
|
16944
|
-
* at this time, the caller has a chance to make a decision:
|
|
16945
|
-
* 1. Manually invoke `tryGetRemoteExecutingOperation()` to get the remote executing operation.
|
|
16946
|
-
* 2. If there is no remote executing operation available, wait for some time and return in callback, which
|
|
16947
|
-
* internally invoke `assignOperations()` to assign new operations.
|
|
16948
|
-
* NOTE: the caller must wait for some time to avoid busy loop and burn CPU cycles.
|
|
16949
|
-
*/
|
|
16950
|
-
const UNASSIGNED_OPERATION = 'UNASSIGNED_OPERATION';
|
|
16951
|
-
/**
|
|
16952
|
-
* Implementation of the async iteration protocol for a collection of IOperation objects.
|
|
16353
|
+
* Implmentation of the async iteration protocol for a collection of IOperation objects.
|
|
16953
16354
|
* The async iterator will wait for an operation to be ready for execution, or terminate if there are no more operations.
|
|
16954
16355
|
*
|
|
16955
16356
|
* @remarks
|
|
@@ -16968,9 +16369,6 @@ class AsyncOperationQueue {
|
|
|
16968
16369
|
constructor(operations, sortFn) {
|
|
16969
16370
|
this._queue = computeTopologyAndSort(operations, sortFn);
|
|
16970
16371
|
this._pendingIterators = [];
|
|
16971
|
-
this._totalOperations = this._queue.length;
|
|
16972
|
-
this._isDone = false;
|
|
16973
|
-
this._completedOperations = new Set();
|
|
16974
16372
|
}
|
|
16975
16373
|
/**
|
|
16976
16374
|
* For use with `for await (const operation of taskQueue)`
|
|
@@ -16984,63 +16382,27 @@ class AsyncOperationQueue {
|
|
|
16984
16382
|
this.assignOperations();
|
|
16985
16383
|
return promise;
|
|
16986
16384
|
}
|
|
16987
|
-
/**
|
|
16988
|
-
* Set a callback to be invoked when one operation is completed.
|
|
16989
|
-
* If all operations are completed, set the queue to done, resolve all pending iterators in next cycle.
|
|
16990
|
-
*/
|
|
16991
|
-
complete(record) {
|
|
16992
|
-
this._completedOperations.add(record);
|
|
16993
|
-
if (this._completedOperations.size === this._totalOperations) {
|
|
16994
|
-
this._isDone = true;
|
|
16995
|
-
}
|
|
16996
|
-
}
|
|
16997
16385
|
/**
|
|
16998
16386
|
* Routes ready operations with 0 dependencies to waiting iterators. Normally invoked as part of `next()`, but
|
|
16999
16387
|
* if the caller does not update operation dependencies prior to calling `next()`, may need to be invoked manually.
|
|
17000
16388
|
*/
|
|
17001
16389
|
assignOperations() {
|
|
17002
16390
|
const { _queue: queue, _pendingIterators: waitingIterators } = this;
|
|
17003
|
-
if (this._isDone) {
|
|
17004
|
-
for (const resolveAsyncIterator of waitingIterators.splice(0)) {
|
|
17005
|
-
resolveAsyncIterator({
|
|
17006
|
-
value: undefined,
|
|
17007
|
-
done: true
|
|
17008
|
-
});
|
|
17009
|
-
}
|
|
17010
|
-
return;
|
|
17011
|
-
}
|
|
17012
16391
|
// By iterating in reverse order we do less array shuffling when removing operations
|
|
17013
16392
|
for (let i = queue.length - 1; waitingIterators.length > 0 && i >= 0; i--) {
|
|
17014
16393
|
const operation = queue[i];
|
|
17015
|
-
if (operation.status === _OperationStatus__WEBPACK_IMPORTED_MODULE_0__.OperationStatus.Blocked
|
|
17016
|
-
operation.status === _OperationStatus__WEBPACK_IMPORTED_MODULE_0__.OperationStatus.Skipped ||
|
|
17017
|
-
operation.status === _OperationStatus__WEBPACK_IMPORTED_MODULE_0__.OperationStatus.Success ||
|
|
17018
|
-
operation.status === _OperationStatus__WEBPACK_IMPORTED_MODULE_0__.OperationStatus.SuccessWithWarning ||
|
|
17019
|
-
operation.status === _OperationStatus__WEBPACK_IMPORTED_MODULE_0__.OperationStatus.FromCache ||
|
|
17020
|
-
operation.status === _OperationStatus__WEBPACK_IMPORTED_MODULE_0__.OperationStatus.NoOp ||
|
|
17021
|
-
operation.status === _OperationStatus__WEBPACK_IMPORTED_MODULE_0__.OperationStatus.Failure) {
|
|
16394
|
+
if (operation.status === _OperationStatus__WEBPACK_IMPORTED_MODULE_0__.OperationStatus.Blocked) {
|
|
17022
16395
|
// It shouldn't be on the queue, remove it
|
|
17023
16396
|
queue.splice(i, 1);
|
|
17024
16397
|
}
|
|
17025
|
-
else if (operation.status === _OperationStatus__WEBPACK_IMPORTED_MODULE_0__.OperationStatus.Queued ||
|
|
17026
|
-
operation.status === _OperationStatus__WEBPACK_IMPORTED_MODULE_0__.OperationStatus.Executing) {
|
|
17027
|
-
// This operation is currently executing
|
|
17028
|
-
// next one plz :)
|
|
17029
|
-
continue;
|
|
17030
|
-
}
|
|
17031
|
-
else if (operation.status === _OperationStatus__WEBPACK_IMPORTED_MODULE_0__.OperationStatus.RemoteExecuting) {
|
|
17032
|
-
// This operation is not ready to execute yet, but it may become ready later
|
|
17033
|
-
// next one plz :)
|
|
17034
|
-
continue;
|
|
17035
|
-
}
|
|
17036
16398
|
else if (operation.status !== _OperationStatus__WEBPACK_IMPORTED_MODULE_0__.OperationStatus.Ready) {
|
|
17037
16399
|
// Sanity check
|
|
17038
16400
|
throw new Error(`Unexpected status "${operation.status}" for queued operation: ${operation.name}`);
|
|
17039
16401
|
}
|
|
17040
16402
|
else if (operation.dependencies.size === 0) {
|
|
17041
16403
|
// This task is ready to process, hand it to the iterator.
|
|
16404
|
+
queue.splice(i, 1);
|
|
17042
16405
|
// Needs to have queue semantics, otherwise tools that iterate it get confused
|
|
17043
|
-
operation.status = _OperationStatus__WEBPACK_IMPORTED_MODULE_0__.OperationStatus.Queued;
|
|
17044
16406
|
waitingIterators.shift()({
|
|
17045
16407
|
value: operation,
|
|
17046
16408
|
done: false
|
|
@@ -17048,28 +16410,16 @@ class AsyncOperationQueue {
|
|
|
17048
16410
|
}
|
|
17049
16411
|
// Otherwise operation is still waiting
|
|
17050
16412
|
}
|
|
17051
|
-
if (
|
|
17052
|
-
//
|
|
17053
|
-
|
|
17054
|
-
|
|
17055
|
-
|
|
17056
|
-
|
|
17057
|
-
done: false
|
|
16413
|
+
if (queue.length === 0) {
|
|
16414
|
+
// Queue is empty, flush
|
|
16415
|
+
for (const resolveAsyncIterator of waitingIterators.splice(0)) {
|
|
16416
|
+
resolveAsyncIterator({
|
|
16417
|
+
value: undefined,
|
|
16418
|
+
done: true
|
|
17058
16419
|
});
|
|
17059
16420
|
}
|
|
17060
16421
|
}
|
|
17061
16422
|
}
|
|
17062
|
-
tryGetRemoteExecutingOperation() {
|
|
17063
|
-
const { _queue: queue } = this;
|
|
17064
|
-
// cycle through the queue to find the next operation that is executed remotely
|
|
17065
|
-
for (let i = queue.length - 1; i >= 0; i--) {
|
|
17066
|
-
const operation = queue[i];
|
|
17067
|
-
if (operation.status === _OperationStatus__WEBPACK_IMPORTED_MODULE_0__.OperationStatus.RemoteExecuting) {
|
|
17068
|
-
return operation;
|
|
17069
|
-
}
|
|
17070
|
-
}
|
|
17071
|
-
return undefined;
|
|
17072
|
-
}
|
|
17073
16423
|
/**
|
|
17074
16424
|
* Returns this queue as an async iterator, such that multiple functions iterating this object concurrently
|
|
17075
16425
|
* receive distinct iteration results.
|
|
@@ -17127,500 +16477,49 @@ function calculateCriticalPathLength(operation, dependencyChain) {
|
|
|
17127
16477
|
|
|
17128
16478
|
/***/ }),
|
|
17129
16479
|
|
|
17130
|
-
/***/
|
|
17131
|
-
|
|
17132
|
-
!*** ./lib-esnext/logic/operations/
|
|
17133
|
-
|
|
16480
|
+
/***/ 969003:
|
|
16481
|
+
/*!************************************************************!*\
|
|
16482
|
+
!*** ./lib-esnext/logic/operations/NullOperationRunner.js ***!
|
|
16483
|
+
\************************************************************/
|
|
17134
16484
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17135
16485
|
|
|
17136
16486
|
__webpack_require__.r(__webpack_exports__);
|
|
17137
16487
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17138
|
-
/* harmony export */ "
|
|
16488
|
+
/* harmony export */ "NullOperationRunner": () => (/* binding */ NullOperationRunner)
|
|
17139
16489
|
/* harmony export */ });
|
|
17140
|
-
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @rushstack/node-core-library */ 132939);
|
|
17141
|
-
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__);
|
|
17142
|
-
/* harmony import */ var _ShellOperationRunner__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ShellOperationRunner */ 953621);
|
|
17143
|
-
/* harmony import */ var _OperationStatus__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./OperationStatus */ 476597);
|
|
17144
|
-
/* harmony import */ var _cobuild_CobuildLock__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../cobuild/CobuildLock */ 676896);
|
|
17145
|
-
/* harmony import */ var _buildCache_ProjectBuildCache__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../buildCache/ProjectBuildCache */ 700587);
|
|
17146
|
-
/* harmony import */ var _rushstack_terminal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @rushstack/terminal */ 569956);
|
|
17147
|
-
/* harmony import */ var _rushstack_terminal__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_rushstack_terminal__WEBPACK_IMPORTED_MODULE_1__);
|
|
17148
|
-
/* harmony import */ var _RushConstants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../RushConstants */ 951904);
|
|
17149
|
-
/* harmony import */ var _api_RushProjectConfiguration__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../api/RushProjectConfiguration */ 514639);
|
|
17150
|
-
/* harmony import */ var _buildCache_getHashesForGlobsAsync__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../buildCache/getHashesForGlobsAsync */ 653062);
|
|
17151
16490
|
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
17152
16491
|
// See LICENSE in the project root for license information.
|
|
16492
|
+
/**
|
|
16493
|
+
* Implementation of `IOperationRunner` for operations that require no work, such as empty scripts,
|
|
16494
|
+
* skipped operations, or blocked operations.
|
|
16495
|
+
*/
|
|
16496
|
+
class NullOperationRunner {
|
|
16497
|
+
constructor({ name, result, silent }) {
|
|
16498
|
+
// This operation does nothing, so timing is meaningless
|
|
16499
|
+
this.reportTiming = false;
|
|
16500
|
+
// The operation may be skipped; it doesn't do anything anyway
|
|
16501
|
+
this.isSkipAllowed = true;
|
|
16502
|
+
// The operation is a no-op, so is cacheable.
|
|
16503
|
+
this.isCacheWriteAllowed = true;
|
|
16504
|
+
// Nothing will get logged, no point allowing warnings
|
|
16505
|
+
this.warningsAreAllowed = false;
|
|
16506
|
+
this.name = name;
|
|
16507
|
+
this.result = result;
|
|
16508
|
+
this.silent = silent;
|
|
16509
|
+
}
|
|
16510
|
+
async executeAsync(context) {
|
|
16511
|
+
return this.result;
|
|
16512
|
+
}
|
|
16513
|
+
}
|
|
16514
|
+
//# sourceMappingURL=NullOperationRunner.js.map
|
|
17153
16515
|
|
|
16516
|
+
/***/ }),
|
|
17154
16517
|
|
|
17155
|
-
|
|
17156
|
-
|
|
17157
|
-
|
|
17158
|
-
|
|
17159
|
-
|
|
17160
|
-
|
|
17161
|
-
|
|
17162
|
-
const PLUGIN_NAME = 'CacheablePhasedOperationPlugin';
|
|
17163
|
-
class CacheableOperationPlugin {
|
|
17164
|
-
constructor() {
|
|
17165
|
-
this._buildCacheContextByOperationRunner = new Map();
|
|
17166
|
-
}
|
|
17167
|
-
apply(hooks) {
|
|
17168
|
-
hooks.createOperations.tapPromise(PLUGIN_NAME, async (operations, context) => {
|
|
17169
|
-
const { buildCacheConfiguration, isIncrementalBuildAllowed } = context;
|
|
17170
|
-
if (!buildCacheConfiguration) {
|
|
17171
|
-
return operations;
|
|
17172
|
-
}
|
|
17173
|
-
for (const operation of operations) {
|
|
17174
|
-
if (operation.runner) {
|
|
17175
|
-
const buildCacheContext = {
|
|
17176
|
-
// ShellOperationRunner supports cache writes by default.
|
|
17177
|
-
isCacheWriteAllowed: true,
|
|
17178
|
-
isCacheReadAllowed: isIncrementalBuildAllowed,
|
|
17179
|
-
isSkipAllowed: isIncrementalBuildAllowed,
|
|
17180
|
-
projectBuildCache: undefined,
|
|
17181
|
-
cobuildLock: undefined
|
|
17182
|
-
};
|
|
17183
|
-
// Upstream runners may mutate the property of build cache context for downstream runners
|
|
17184
|
-
this._buildCacheContextByOperationRunner.set(operation.runner, buildCacheContext);
|
|
17185
|
-
if (operation.runner instanceof _ShellOperationRunner__WEBPACK_IMPORTED_MODULE_2__.ShellOperationRunner) {
|
|
17186
|
-
this._applyShellOperationRunner(operation.runner, context);
|
|
17187
|
-
}
|
|
17188
|
-
}
|
|
17189
|
-
}
|
|
17190
|
-
return operations;
|
|
17191
|
-
});
|
|
17192
|
-
hooks.afterExecuteOperation.tapPromise(PLUGIN_NAME, async (runnerContext) => {
|
|
17193
|
-
const { runner, status, consumers, changedProjectsOnly } = runnerContext;
|
|
17194
|
-
const buildCacheContext = this._getBuildCacheContextByRunner(runner);
|
|
17195
|
-
let blockCacheWrite = !(buildCacheContext === null || buildCacheContext === void 0 ? void 0 : buildCacheContext.isCacheWriteAllowed);
|
|
17196
|
-
let blockSkip = !(buildCacheContext === null || buildCacheContext === void 0 ? void 0 : buildCacheContext.isSkipAllowed);
|
|
17197
|
-
switch (status) {
|
|
17198
|
-
case _OperationStatus__WEBPACK_IMPORTED_MODULE_3__.OperationStatus.Skipped: {
|
|
17199
|
-
// Skipping means cannot guarantee integrity, so prevent cache writes in dependents.
|
|
17200
|
-
blockCacheWrite = true;
|
|
17201
|
-
break;
|
|
17202
|
-
}
|
|
17203
|
-
case _OperationStatus__WEBPACK_IMPORTED_MODULE_3__.OperationStatus.SuccessWithWarning:
|
|
17204
|
-
case _OperationStatus__WEBPACK_IMPORTED_MODULE_3__.OperationStatus.Success: {
|
|
17205
|
-
// Legacy incremental build, if asked, prevent skip in dependents if the operation executed.
|
|
17206
|
-
blockSkip || (blockSkip = !changedProjectsOnly);
|
|
17207
|
-
break;
|
|
17208
|
-
}
|
|
17209
|
-
}
|
|
17210
|
-
// Apply status changes to direct dependents
|
|
17211
|
-
for (const item of consumers) {
|
|
17212
|
-
const itemRunnerBuildCacheContext = this._getBuildCacheContextByRunner(item.runner);
|
|
17213
|
-
if (itemRunnerBuildCacheContext) {
|
|
17214
|
-
if (blockCacheWrite) {
|
|
17215
|
-
itemRunnerBuildCacheContext.isCacheWriteAllowed = false;
|
|
17216
|
-
}
|
|
17217
|
-
if (blockSkip) {
|
|
17218
|
-
itemRunnerBuildCacheContext.isSkipAllowed = false;
|
|
17219
|
-
}
|
|
17220
|
-
}
|
|
17221
|
-
}
|
|
17222
|
-
});
|
|
17223
|
-
hooks.afterExecuteOperations.tapPromise(PLUGIN_NAME, async () => {
|
|
17224
|
-
this._buildCacheContextByOperationRunner.clear();
|
|
17225
|
-
});
|
|
17226
|
-
}
|
|
17227
|
-
_applyShellOperationRunner(runner, context) {
|
|
17228
|
-
const { buildCacheConfiguration, cobuildConfiguration, phaseSelection: selectedPhases, projectChangeAnalyzer } = context;
|
|
17229
|
-
const { hooks } = runner;
|
|
17230
|
-
const buildCacheContext = this._getBuildCacheContextByRunnerOrThrow(runner);
|
|
17231
|
-
hooks.beforeExecute.tapPromise(PLUGIN_NAME, async (beforeExecuteContext) => {
|
|
17232
|
-
const earlyReturnStatus = await (async () => {
|
|
17233
|
-
var _a, _b;
|
|
17234
|
-
const { context, runner, terminal, lastProjectDeps, projectDeps, trackedProjectFiles, logPath, errorLogPath, rushProject, phase, commandName, commandToRun, earlyReturnStatus } = beforeExecuteContext;
|
|
17235
|
-
if (earlyReturnStatus) {
|
|
17236
|
-
// If there is existing early return status, we don't need to do anything
|
|
17237
|
-
return earlyReturnStatus;
|
|
17238
|
-
}
|
|
17239
|
-
if (!projectDeps && buildCacheContext.isSkipAllowed) {
|
|
17240
|
-
// To test this code path:
|
|
17241
|
-
// Remove the `.git` folder then run "rush build --verbose"
|
|
17242
|
-
terminal.writeLine({
|
|
17243
|
-
text: _rushstack_terminal__WEBPACK_IMPORTED_MODULE_1__.PrintUtilities.wrapWords('This workspace does not appear to be tracked by Git. ' +
|
|
17244
|
-
'Rush will proceed without incremental execution, caching, and change detection.'),
|
|
17245
|
-
foregroundColor: _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.ColorValue.Cyan
|
|
17246
|
-
});
|
|
17247
|
-
}
|
|
17248
|
-
let projectBuildCache = await this._tryGetProjectBuildCacheAsync({
|
|
17249
|
-
buildCacheConfiguration,
|
|
17250
|
-
runner,
|
|
17251
|
-
rushProject,
|
|
17252
|
-
phase,
|
|
17253
|
-
selectedPhases,
|
|
17254
|
-
projectChangeAnalyzer,
|
|
17255
|
-
commandName,
|
|
17256
|
-
commandToRun,
|
|
17257
|
-
terminal,
|
|
17258
|
-
trackedProjectFiles,
|
|
17259
|
-
operationMetadataManager: context._operationMetadataManager
|
|
17260
|
-
});
|
|
17261
|
-
// Try to acquire the cobuild lock
|
|
17262
|
-
let cobuildLock;
|
|
17263
|
-
if (cobuildConfiguration === null || cobuildConfiguration === void 0 ? void 0 : cobuildConfiguration.cobuildEnabled) {
|
|
17264
|
-
if ((cobuildConfiguration === null || cobuildConfiguration === void 0 ? void 0 : cobuildConfiguration.cobuildLeafProjectLogOnlyAllowed) &&
|
|
17265
|
-
rushProject.consumingProjects.size === 0 &&
|
|
17266
|
-
!projectBuildCache) {
|
|
17267
|
-
// When the leaf project log only is allowed and the leaf project is build cache "disabled", try to get
|
|
17268
|
-
// a log files only project build cache
|
|
17269
|
-
projectBuildCache = await this._tryGetLogOnlyProjectBuildCacheAsync({
|
|
17270
|
-
buildCacheConfiguration,
|
|
17271
|
-
runner,
|
|
17272
|
-
rushProject,
|
|
17273
|
-
phase,
|
|
17274
|
-
projectChangeAnalyzer,
|
|
17275
|
-
commandName,
|
|
17276
|
-
commandToRun,
|
|
17277
|
-
terminal,
|
|
17278
|
-
trackedProjectFiles,
|
|
17279
|
-
operationMetadataManager: context._operationMetadataManager
|
|
17280
|
-
});
|
|
17281
|
-
if (projectBuildCache) {
|
|
17282
|
-
terminal.writeVerboseLine(`Log files only build cache is enabled for the project "${rushProject.packageName}" because the cobuild leaf project log only is allowed`);
|
|
17283
|
-
}
|
|
17284
|
-
else {
|
|
17285
|
-
terminal.writeWarningLine(`Failed to get log files only build cache for the project "${rushProject.packageName}"`);
|
|
17286
|
-
}
|
|
17287
|
-
}
|
|
17288
|
-
cobuildLock = await this._tryGetCobuildLockAsync({
|
|
17289
|
-
runner,
|
|
17290
|
-
projectBuildCache,
|
|
17291
|
-
cobuildConfiguration
|
|
17292
|
-
});
|
|
17293
|
-
}
|
|
17294
|
-
// eslint-disable-next-line require-atomic-updates -- we are mutating the build cache context intentionally
|
|
17295
|
-
buildCacheContext.cobuildLock = cobuildLock;
|
|
17296
|
-
// If possible, we want to skip this operation -- either by restoring it from the
|
|
17297
|
-
// cache, if caching is enabled, or determining that the project
|
|
17298
|
-
// is unchanged (using the older incremental execution logic). These two approaches,
|
|
17299
|
-
// "caching" and "skipping", are incompatible, so only one applies.
|
|
17300
|
-
//
|
|
17301
|
-
// Note that "caching" and "skipping" take two different approaches
|
|
17302
|
-
// to tracking dependents:
|
|
17303
|
-
//
|
|
17304
|
-
// - For caching, "isCacheReadAllowed" is set if a project supports
|
|
17305
|
-
// incremental builds, and determining whether this project or a dependent
|
|
17306
|
-
// has changed happens inside the hashing logic.
|
|
17307
|
-
//
|
|
17308
|
-
// - For skipping, "isSkipAllowed" is set to true initially, and during
|
|
17309
|
-
// the process of running dependents, it will be changed by OperationExecutionManager to
|
|
17310
|
-
// false if a dependency wasn't able to be skipped.
|
|
17311
|
-
//
|
|
17312
|
-
let buildCacheReadAttempted = false;
|
|
17313
|
-
if (cobuildLock) {
|
|
17314
|
-
// handling rebuilds. "rush rebuild" or "rush retest" command will save operations to
|
|
17315
|
-
// the build cache once completed, but does not retrieve them (since the "incremental"
|
|
17316
|
-
// flag is disabled). However, we still need a cobuild to be able to retrieve a finished
|
|
17317
|
-
// build from another cobuild in this case.
|
|
17318
|
-
const cobuildCompletedState = await cobuildLock.getCompletedStateAsync();
|
|
17319
|
-
if (cobuildCompletedState) {
|
|
17320
|
-
const { status, cacheId } = cobuildCompletedState;
|
|
17321
|
-
const restoreFromCacheSuccess = await cobuildLock.projectBuildCache.tryRestoreFromCacheAsync(terminal, cacheId);
|
|
17322
|
-
if (restoreFromCacheSuccess) {
|
|
17323
|
-
// Restore the original state of the operation without cache
|
|
17324
|
-
await ((_a = context._operationMetadataManager) === null || _a === void 0 ? void 0 : _a.tryRestoreAsync({
|
|
17325
|
-
terminal,
|
|
17326
|
-
logPath,
|
|
17327
|
-
errorLogPath
|
|
17328
|
-
}));
|
|
17329
|
-
if (cobuildCompletedState) {
|
|
17330
|
-
return cobuildCompletedState.status;
|
|
17331
|
-
}
|
|
17332
|
-
return status;
|
|
17333
|
-
}
|
|
17334
|
-
}
|
|
17335
|
-
}
|
|
17336
|
-
else if (buildCacheContext.isCacheReadAllowed) {
|
|
17337
|
-
buildCacheReadAttempted = !!projectBuildCache;
|
|
17338
|
-
const restoreFromCacheSuccess = await (projectBuildCache === null || projectBuildCache === void 0 ? void 0 : projectBuildCache.tryRestoreFromCacheAsync(terminal));
|
|
17339
|
-
if (restoreFromCacheSuccess) {
|
|
17340
|
-
// Restore the original state of the operation without cache
|
|
17341
|
-
await ((_b = context._operationMetadataManager) === null || _b === void 0 ? void 0 : _b.tryRestoreAsync({
|
|
17342
|
-
terminal,
|
|
17343
|
-
logPath,
|
|
17344
|
-
errorLogPath
|
|
17345
|
-
}));
|
|
17346
|
-
return _OperationStatus__WEBPACK_IMPORTED_MODULE_3__.OperationStatus.FromCache;
|
|
17347
|
-
}
|
|
17348
|
-
}
|
|
17349
|
-
if (buildCacheContext.isSkipAllowed && !buildCacheReadAttempted) {
|
|
17350
|
-
const isPackageUnchanged = !!(lastProjectDeps &&
|
|
17351
|
-
projectDeps &&
|
|
17352
|
-
projectDeps.arguments === lastProjectDeps.arguments &&
|
|
17353
|
-
_areShallowEqual(projectDeps.files, lastProjectDeps.files));
|
|
17354
|
-
if (isPackageUnchanged) {
|
|
17355
|
-
return _OperationStatus__WEBPACK_IMPORTED_MODULE_3__.OperationStatus.Skipped;
|
|
17356
|
-
}
|
|
17357
|
-
}
|
|
17358
|
-
if (buildCacheContext.isCacheWriteAllowed && cobuildLock) {
|
|
17359
|
-
const acquireSuccess = await cobuildLock.tryAcquireLockAsync();
|
|
17360
|
-
if (acquireSuccess) {
|
|
17361
|
-
// The operation may be used to marked remote executing, now change it to executing
|
|
17362
|
-
context.status = _OperationStatus__WEBPACK_IMPORTED_MODULE_3__.OperationStatus.Executing;
|
|
17363
|
-
runner.periodicCallback.addCallback(async () => {
|
|
17364
|
-
await (cobuildLock === null || cobuildLock === void 0 ? void 0 : cobuildLock.renewLockAsync());
|
|
17365
|
-
});
|
|
17366
|
-
}
|
|
17367
|
-
else {
|
|
17368
|
-
// failed to acquire the lock, mark current operation to remote executing
|
|
17369
|
-
context.stopwatch.reset();
|
|
17370
|
-
return _OperationStatus__WEBPACK_IMPORTED_MODULE_3__.OperationStatus.RemoteExecuting;
|
|
17371
|
-
}
|
|
17372
|
-
}
|
|
17373
|
-
})();
|
|
17374
|
-
if (earlyReturnStatus) {
|
|
17375
|
-
beforeExecuteContext.earlyReturnStatus = earlyReturnStatus;
|
|
17376
|
-
}
|
|
17377
|
-
return beforeExecuteContext;
|
|
17378
|
-
});
|
|
17379
|
-
runner.hooks.afterExecute.tapPromise(PLUGIN_NAME, async (afterExecuteContext) => {
|
|
17380
|
-
var _a;
|
|
17381
|
-
const { context, terminal, status, taskIsSuccessful } = afterExecuteContext;
|
|
17382
|
-
const { cobuildLock, projectBuildCache, isCacheWriteAllowed } = buildCacheContext;
|
|
17383
|
-
let setCompletedStatePromiseFunction;
|
|
17384
|
-
let setCacheEntryPromise;
|
|
17385
|
-
if (cobuildLock && isCacheWriteAllowed) {
|
|
17386
|
-
if (context.error) {
|
|
17387
|
-
// In order to preventing the worst case that all cobuild tasks go through the same failure,
|
|
17388
|
-
// allowing a failing build to be cached and retrieved, print the error message to the terminal
|
|
17389
|
-
// and clear the error in context.
|
|
17390
|
-
const message = (_a = context.error) === null || _a === void 0 ? void 0 : _a.message;
|
|
17391
|
-
if (message) {
|
|
17392
|
-
context.collatedWriter.terminal.writeStderrLine(message);
|
|
17393
|
-
}
|
|
17394
|
-
context.error = undefined;
|
|
17395
|
-
}
|
|
17396
|
-
const { cacheId, contextId } = cobuildLock.cobuildContext;
|
|
17397
|
-
const finalCacheId = status === _OperationStatus__WEBPACK_IMPORTED_MODULE_3__.OperationStatus.Failure ? `${cacheId}-${contextId}-failed` : cacheId;
|
|
17398
|
-
switch (status) {
|
|
17399
|
-
case _OperationStatus__WEBPACK_IMPORTED_MODULE_3__.OperationStatus.SuccessWithWarning:
|
|
17400
|
-
case _OperationStatus__WEBPACK_IMPORTED_MODULE_3__.OperationStatus.Success:
|
|
17401
|
-
case _OperationStatus__WEBPACK_IMPORTED_MODULE_3__.OperationStatus.Failure: {
|
|
17402
|
-
const currentStatus = status;
|
|
17403
|
-
setCompletedStatePromiseFunction = () => {
|
|
17404
|
-
return cobuildLock === null || cobuildLock === void 0 ? void 0 : cobuildLock.setCompletedStateAsync({
|
|
17405
|
-
status: currentStatus,
|
|
17406
|
-
cacheId: finalCacheId
|
|
17407
|
-
});
|
|
17408
|
-
};
|
|
17409
|
-
setCacheEntryPromise = cobuildLock.projectBuildCache.trySetCacheEntryAsync(terminal, finalCacheId);
|
|
17410
|
-
}
|
|
17411
|
-
}
|
|
17412
|
-
}
|
|
17413
|
-
// If the command is successful, we can calculate project hash, and no dependencies were skipped,
|
|
17414
|
-
// write a new cache entry.
|
|
17415
|
-
if (!setCacheEntryPromise && taskIsSuccessful && isCacheWriteAllowed && projectBuildCache) {
|
|
17416
|
-
setCacheEntryPromise = projectBuildCache.trySetCacheEntryAsync(terminal);
|
|
17417
|
-
}
|
|
17418
|
-
const cacheWriteSuccess = await setCacheEntryPromise;
|
|
17419
|
-
await (setCompletedStatePromiseFunction === null || setCompletedStatePromiseFunction === void 0 ? void 0 : setCompletedStatePromiseFunction());
|
|
17420
|
-
if (cacheWriteSuccess === false && afterExecuteContext.status === _OperationStatus__WEBPACK_IMPORTED_MODULE_3__.OperationStatus.Success) {
|
|
17421
|
-
afterExecuteContext.status = _OperationStatus__WEBPACK_IMPORTED_MODULE_3__.OperationStatus.SuccessWithWarning;
|
|
17422
|
-
}
|
|
17423
|
-
return afterExecuteContext;
|
|
17424
|
-
});
|
|
17425
|
-
}
|
|
17426
|
-
_getBuildCacheContextByRunner(runner) {
|
|
17427
|
-
const buildCacheContext = this._buildCacheContextByOperationRunner.get(runner);
|
|
17428
|
-
return buildCacheContext;
|
|
17429
|
-
}
|
|
17430
|
-
_getBuildCacheContextByRunnerOrThrow(runner) {
|
|
17431
|
-
const buildCacheContext = this._getBuildCacheContextByRunner(runner);
|
|
17432
|
-
if (!buildCacheContext) {
|
|
17433
|
-
// This should not happen
|
|
17434
|
-
throw new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.InternalError(`Build cache context for runner ${runner.name} should be defined`);
|
|
17435
|
-
}
|
|
17436
|
-
return buildCacheContext;
|
|
17437
|
-
}
|
|
17438
|
-
async _tryGetProjectBuildCacheAsync({ buildCacheConfiguration, runner, rushProject, phase, selectedPhases, projectChangeAnalyzer, commandName, commandToRun, terminal, trackedProjectFiles, operationMetadataManager }) {
|
|
17439
|
-
const buildCacheContext = this._getBuildCacheContextByRunnerOrThrow(runner);
|
|
17440
|
-
if (!buildCacheContext.projectBuildCache) {
|
|
17441
|
-
if (buildCacheConfiguration && buildCacheConfiguration.buildCacheEnabled) {
|
|
17442
|
-
// Disable legacy skip logic if the build cache is in play
|
|
17443
|
-
buildCacheContext.isSkipAllowed = false;
|
|
17444
|
-
const projectConfiguration = await _api_RushProjectConfiguration__WEBPACK_IMPORTED_MODULE_4__.RushProjectConfiguration.tryLoadForProjectAsync(rushProject, terminal);
|
|
17445
|
-
if (projectConfiguration) {
|
|
17446
|
-
projectConfiguration.validatePhaseConfiguration(selectedPhases, terminal);
|
|
17447
|
-
if (projectConfiguration.disableBuildCacheForProject) {
|
|
17448
|
-
terminal.writeVerboseLine('Caching has been disabled for this project.');
|
|
17449
|
-
}
|
|
17450
|
-
else {
|
|
17451
|
-
const operationSettings = projectConfiguration.operationSettingsByOperationName.get(commandName);
|
|
17452
|
-
if (!operationSettings) {
|
|
17453
|
-
terminal.writeVerboseLine(`This project does not define the caching behavior of the "${commandName}" command, so caching has been disabled.`);
|
|
17454
|
-
}
|
|
17455
|
-
else if (operationSettings.disableBuildCacheForOperation) {
|
|
17456
|
-
terminal.writeVerboseLine(`Caching has been disabled for this project's "${commandName}" command.`);
|
|
17457
|
-
}
|
|
17458
|
-
else {
|
|
17459
|
-
const projectOutputFolderNames = operationSettings.outputFolderNames || [];
|
|
17460
|
-
const additionalProjectOutputFilePaths = [
|
|
17461
|
-
...((operationMetadataManager === null || operationMetadataManager === void 0 ? void 0 : operationMetadataManager.relativeFilepaths) || [])
|
|
17462
|
-
];
|
|
17463
|
-
const additionalContext = {};
|
|
17464
|
-
if (operationSettings.dependsOnEnvVars) {
|
|
17465
|
-
for (const varName of operationSettings.dependsOnEnvVars) {
|
|
17466
|
-
additionalContext['$' + varName] = process.env[varName] || '';
|
|
17467
|
-
}
|
|
17468
|
-
}
|
|
17469
|
-
if (operationSettings.dependsOnAdditionalFiles) {
|
|
17470
|
-
const repoState = await projectChangeAnalyzer._ensureInitializedAsync(terminal);
|
|
17471
|
-
const additionalFiles = await (0,_buildCache_getHashesForGlobsAsync__WEBPACK_IMPORTED_MODULE_5__.getHashesForGlobsAsync)(operationSettings.dependsOnAdditionalFiles, rushProject.projectFolder, repoState);
|
|
17472
|
-
terminal.writeDebugLine(`Including additional files to calculate build cache hash:\n ${Array.from(additionalFiles.keys()).join('\n ')} `);
|
|
17473
|
-
for (const [filePath, fileHash] of additionalFiles) {
|
|
17474
|
-
additionalContext['file://' + filePath] = fileHash;
|
|
17475
|
-
}
|
|
17476
|
-
}
|
|
17477
|
-
buildCacheContext.projectBuildCache = await _buildCache_ProjectBuildCache__WEBPACK_IMPORTED_MODULE_6__.ProjectBuildCache.tryGetProjectBuildCache({
|
|
17478
|
-
project: rushProject,
|
|
17479
|
-
projectOutputFolderNames,
|
|
17480
|
-
additionalProjectOutputFilePaths,
|
|
17481
|
-
additionalContext,
|
|
17482
|
-
buildCacheConfiguration,
|
|
17483
|
-
terminal,
|
|
17484
|
-
command: commandToRun,
|
|
17485
|
-
trackedProjectFiles: trackedProjectFiles,
|
|
17486
|
-
projectChangeAnalyzer: projectChangeAnalyzer,
|
|
17487
|
-
phaseName: phase.name
|
|
17488
|
-
});
|
|
17489
|
-
}
|
|
17490
|
-
}
|
|
17491
|
-
}
|
|
17492
|
-
else {
|
|
17493
|
-
terminal.writeVerboseLine(`Project does not have a ${_RushConstants__WEBPACK_IMPORTED_MODULE_7__.RushConstants.rushProjectConfigFilename} configuration file, ` +
|
|
17494
|
-
'or one provided by a rig, so it does not support caching.');
|
|
17495
|
-
}
|
|
17496
|
-
}
|
|
17497
|
-
}
|
|
17498
|
-
return buildCacheContext.projectBuildCache;
|
|
17499
|
-
}
|
|
17500
|
-
async _tryGetLogOnlyProjectBuildCacheAsync({ runner, rushProject, terminal, commandName, commandToRun, buildCacheConfiguration, phase, trackedProjectFiles, projectChangeAnalyzer, operationMetadataManager }) {
|
|
17501
|
-
const buildCacheContext = this._getBuildCacheContextByRunnerOrThrow(runner);
|
|
17502
|
-
if (buildCacheConfiguration && buildCacheConfiguration.buildCacheEnabled) {
|
|
17503
|
-
// Disable legacy skip logic if the build cache is in play
|
|
17504
|
-
buildCacheContext.isSkipAllowed = false;
|
|
17505
|
-
const projectConfiguration = await _api_RushProjectConfiguration__WEBPACK_IMPORTED_MODULE_4__.RushProjectConfiguration.tryLoadForProjectAsync(rushProject, terminal);
|
|
17506
|
-
let projectOutputFolderNames = [];
|
|
17507
|
-
const additionalProjectOutputFilePaths = [
|
|
17508
|
-
...((operationMetadataManager === null || operationMetadataManager === void 0 ? void 0 : operationMetadataManager.relativeFilepaths) || [])
|
|
17509
|
-
];
|
|
17510
|
-
const additionalContext = {
|
|
17511
|
-
// Force the cache to be a log files only cache
|
|
17512
|
-
logFilesOnly: '1'
|
|
17513
|
-
};
|
|
17514
|
-
if (projectConfiguration) {
|
|
17515
|
-
const operationSettings = projectConfiguration.operationSettingsByOperationName.get(commandName);
|
|
17516
|
-
if (operationSettings) {
|
|
17517
|
-
if (operationSettings.outputFolderNames) {
|
|
17518
|
-
projectOutputFolderNames = operationSettings.outputFolderNames;
|
|
17519
|
-
}
|
|
17520
|
-
if (operationSettings.dependsOnEnvVars) {
|
|
17521
|
-
for (const varName of operationSettings.dependsOnEnvVars) {
|
|
17522
|
-
additionalContext['$' + varName] = process.env[varName] || '';
|
|
17523
|
-
}
|
|
17524
|
-
}
|
|
17525
|
-
if (operationSettings.dependsOnAdditionalFiles) {
|
|
17526
|
-
const repoState = await projectChangeAnalyzer._ensureInitializedAsync(terminal);
|
|
17527
|
-
const additionalFiles = await (0,_buildCache_getHashesForGlobsAsync__WEBPACK_IMPORTED_MODULE_5__.getHashesForGlobsAsync)(operationSettings.dependsOnAdditionalFiles, rushProject.projectFolder, repoState);
|
|
17528
|
-
for (const [filePath, fileHash] of additionalFiles) {
|
|
17529
|
-
additionalContext['file://' + filePath] = fileHash;
|
|
17530
|
-
}
|
|
17531
|
-
}
|
|
17532
|
-
}
|
|
17533
|
-
}
|
|
17534
|
-
const projectBuildCache = await _buildCache_ProjectBuildCache__WEBPACK_IMPORTED_MODULE_6__.ProjectBuildCache.tryGetProjectBuildCache({
|
|
17535
|
-
project: rushProject,
|
|
17536
|
-
projectOutputFolderNames,
|
|
17537
|
-
additionalProjectOutputFilePaths,
|
|
17538
|
-
additionalContext,
|
|
17539
|
-
buildCacheConfiguration,
|
|
17540
|
-
terminal,
|
|
17541
|
-
command: commandToRun,
|
|
17542
|
-
trackedProjectFiles,
|
|
17543
|
-
projectChangeAnalyzer: projectChangeAnalyzer,
|
|
17544
|
-
phaseName: phase.name
|
|
17545
|
-
});
|
|
17546
|
-
buildCacheContext.projectBuildCache = projectBuildCache;
|
|
17547
|
-
return projectBuildCache;
|
|
17548
|
-
}
|
|
17549
|
-
}
|
|
17550
|
-
async _tryGetCobuildLockAsync({ cobuildConfiguration, runner, projectBuildCache }) {
|
|
17551
|
-
const buildCacheContext = this._getBuildCacheContextByRunnerOrThrow(runner);
|
|
17552
|
-
if (!buildCacheContext.cobuildLock) {
|
|
17553
|
-
buildCacheContext.cobuildLock = undefined;
|
|
17554
|
-
if (projectBuildCache && cobuildConfiguration && cobuildConfiguration.cobuildEnabled) {
|
|
17555
|
-
buildCacheContext.cobuildLock = new _cobuild_CobuildLock__WEBPACK_IMPORTED_MODULE_8__.CobuildLock({
|
|
17556
|
-
cobuildConfiguration,
|
|
17557
|
-
projectBuildCache
|
|
17558
|
-
});
|
|
17559
|
-
}
|
|
17560
|
-
}
|
|
17561
|
-
return buildCacheContext.cobuildLock;
|
|
17562
|
-
}
|
|
17563
|
-
}
|
|
17564
|
-
function _areShallowEqual(object1, object2) {
|
|
17565
|
-
for (const n in object1) {
|
|
17566
|
-
if (!(n in object2) || object1[n] !== object2[n]) {
|
|
17567
|
-
return false;
|
|
17568
|
-
}
|
|
17569
|
-
}
|
|
17570
|
-
for (const n in object2) {
|
|
17571
|
-
if (!(n in object1)) {
|
|
17572
|
-
return false;
|
|
17573
|
-
}
|
|
17574
|
-
}
|
|
17575
|
-
return true;
|
|
17576
|
-
}
|
|
17577
|
-
//# sourceMappingURL=CacheableOperationPlugin.js.map
|
|
17578
|
-
|
|
17579
|
-
/***/ }),
|
|
17580
|
-
|
|
17581
|
-
/***/ 969003:
|
|
17582
|
-
/*!************************************************************!*\
|
|
17583
|
-
!*** ./lib-esnext/logic/operations/NullOperationRunner.js ***!
|
|
17584
|
-
\************************************************************/
|
|
17585
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17586
|
-
|
|
17587
|
-
__webpack_require__.r(__webpack_exports__);
|
|
17588
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17589
|
-
/* harmony export */ "NullOperationRunner": () => (/* binding */ NullOperationRunner)
|
|
17590
|
-
/* harmony export */ });
|
|
17591
|
-
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
17592
|
-
// See LICENSE in the project root for license information.
|
|
17593
|
-
/**
|
|
17594
|
-
* Implementation of `IOperationRunner` for operations that require no work, such as empty scripts,
|
|
17595
|
-
* skipped operations, or blocked operations.
|
|
17596
|
-
*/
|
|
17597
|
-
class NullOperationRunner {
|
|
17598
|
-
constructor({ name, result, silent }) {
|
|
17599
|
-
// This operation does nothing, so timing is meaningless
|
|
17600
|
-
this.reportTiming = false;
|
|
17601
|
-
// The operation may be skipped; it doesn't do anything anyway
|
|
17602
|
-
this.isSkipAllowed = true;
|
|
17603
|
-
// The operation is a no-op, so is cacheable.
|
|
17604
|
-
this.isCacheWriteAllowed = true;
|
|
17605
|
-
// Nothing will get logged, no point allowing warnings
|
|
17606
|
-
this.warningsAreAllowed = false;
|
|
17607
|
-
this.name = name;
|
|
17608
|
-
this.result = result;
|
|
17609
|
-
this.silent = silent;
|
|
17610
|
-
}
|
|
17611
|
-
async executeAsync(context) {
|
|
17612
|
-
return this.result;
|
|
17613
|
-
}
|
|
17614
|
-
}
|
|
17615
|
-
//# sourceMappingURL=NullOperationRunner.js.map
|
|
17616
|
-
|
|
17617
|
-
/***/ }),
|
|
17618
|
-
|
|
17619
|
-
/***/ 768667:
|
|
17620
|
-
/*!**************************************************!*\
|
|
17621
|
-
!*** ./lib-esnext/logic/operations/Operation.js ***!
|
|
17622
|
-
\**************************************************/
|
|
17623
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
16518
|
+
/***/ 768667:
|
|
16519
|
+
/*!**************************************************!*\
|
|
16520
|
+
!*** ./lib-esnext/logic/operations/Operation.js ***!
|
|
16521
|
+
\**************************************************/
|
|
16522
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17624
16523
|
|
|
17625
16524
|
__webpack_require__.r(__webpack_exports__);
|
|
17626
16525
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -17762,9 +16661,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17762
16661
|
* Format "======" lines for a shell window with classic 80 columns
|
|
17763
16662
|
*/
|
|
17764
16663
|
const ASCII_HEADER_WIDTH = 79;
|
|
17765
|
-
const prioritySort = (a, b) => {
|
|
17766
|
-
return a.criticalPathLength - b.criticalPathLength;
|
|
17767
|
-
};
|
|
17768
16664
|
/**
|
|
17769
16665
|
* A class which manages the execution of a set of tasks with interdependencies.
|
|
17770
16666
|
* Initially, and at the end of each task execution, all unblocked tasks
|
|
@@ -17796,15 +16692,13 @@ class OperationExecutionManager {
|
|
|
17796
16692
|
}
|
|
17797
16693
|
}
|
|
17798
16694
|
};
|
|
17799
|
-
const { quietMode, debugMode, parallelism, changedProjectsOnly,
|
|
16695
|
+
const { quietMode, debugMode, parallelism, changedProjectsOnly, onOperationStatusChanged, beforeExecuteOperations } = options;
|
|
17800
16696
|
this._completedOperations = 0;
|
|
17801
16697
|
this._quietMode = quietMode;
|
|
17802
16698
|
this._hasAnyFailures = false;
|
|
17803
16699
|
this._hasAnyNonAllowedWarnings = false;
|
|
17804
16700
|
this._changedProjectsOnly = changedProjectsOnly;
|
|
17805
16701
|
this._parallelism = parallelism;
|
|
17806
|
-
this._beforeExecuteOperation = beforeExecuteOperation;
|
|
17807
|
-
this._afterExecuteOperation = afterExecuteOperation;
|
|
17808
16702
|
this._beforeExecuteOperations = beforeExecuteOperations;
|
|
17809
16703
|
this._onOperationStatusChanged = onOperationStatusChanged;
|
|
17810
16704
|
// TERMINAL PIPELINE:
|
|
@@ -17827,8 +16721,7 @@ class OperationExecutionManager {
|
|
|
17827
16721
|
streamCollator: this._streamCollator,
|
|
17828
16722
|
onOperationStatusChanged,
|
|
17829
16723
|
debugMode,
|
|
17830
|
-
quietMode
|
|
17831
|
-
changedProjectsOnly
|
|
16724
|
+
quietMode
|
|
17832
16725
|
};
|
|
17833
16726
|
let totalOperations = 0;
|
|
17834
16727
|
const executionRecords = (this._executionRecords = new Map());
|
|
@@ -17851,8 +16744,6 @@ class OperationExecutionManager {
|
|
|
17851
16744
|
dependencyRecord.consumers.add(consumer);
|
|
17852
16745
|
}
|
|
17853
16746
|
}
|
|
17854
|
-
const executionQueue = new _AsyncOperationQueue__WEBPACK_IMPORTED_MODULE_5__.AsyncOperationQueue(this._executionRecords.values(), prioritySort);
|
|
17855
|
-
this._executionQueue = executionQueue;
|
|
17856
16747
|
}
|
|
17857
16748
|
/**
|
|
17858
16749
|
* Executes all operations which have been registered, returning a promise which is resolved when all the
|
|
@@ -17879,38 +16770,18 @@ class OperationExecutionManager {
|
|
|
17879
16770
|
}
|
|
17880
16771
|
this._terminal.writeStdoutLine(`Executing a maximum of ${this._parallelism} simultaneous processes...`);
|
|
17881
16772
|
const maxParallelism = Math.min(totalOperations, this._parallelism);
|
|
16773
|
+
const prioritySort = (a, b) => {
|
|
16774
|
+
return a.criticalPathLength - b.criticalPathLength;
|
|
16775
|
+
};
|
|
16776
|
+
const executionQueue = new _AsyncOperationQueue__WEBPACK_IMPORTED_MODULE_5__.AsyncOperationQueue(this._executionRecords.values(), prioritySort);
|
|
17882
16777
|
await ((_a = this._beforeExecuteOperations) === null || _a === void 0 ? void 0 : _a.call(this, this._executionRecords));
|
|
17883
16778
|
// This function is a callback because it may write to the collatedWriter before
|
|
17884
16779
|
// operation.executeAsync returns (and cleans up the writer)
|
|
17885
|
-
const onOperationComplete =
|
|
17886
|
-
var _a;
|
|
16780
|
+
const onOperationComplete = (record) => {
|
|
17887
16781
|
this._onOperationComplete(record);
|
|
17888
|
-
await ((_a = this._afterExecuteOperation) === null || _a === void 0 ? void 0 : _a.call(this, record));
|
|
17889
16782
|
};
|
|
17890
|
-
await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_3__.Async.forEachAsync(
|
|
17891
|
-
|
|
17892
|
-
let record;
|
|
17893
|
-
/**
|
|
17894
|
-
* If the operation is UNASSIGNED_OPERATION, it means that the queue is not able to assign a operation.
|
|
17895
|
-
* This happens when some operations run remotely. So, we should try to get a remote executing operation
|
|
17896
|
-
* from the queue manually here.
|
|
17897
|
-
*/
|
|
17898
|
-
if (operation === _AsyncOperationQueue__WEBPACK_IMPORTED_MODULE_5__.UNASSIGNED_OPERATION) {
|
|
17899
|
-
// Pause for a few time
|
|
17900
|
-
await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_3__.Async.sleep(5000);
|
|
17901
|
-
record = this._executionQueue.tryGetRemoteExecutingOperation();
|
|
17902
|
-
}
|
|
17903
|
-
else {
|
|
17904
|
-
record = operation;
|
|
17905
|
-
}
|
|
17906
|
-
if (!record) {
|
|
17907
|
-
// Fail to assign a operation, start over again
|
|
17908
|
-
return;
|
|
17909
|
-
}
|
|
17910
|
-
else {
|
|
17911
|
-
await ((_a = this._beforeExecuteOperation) === null || _a === void 0 ? void 0 : _a.call(this, record));
|
|
17912
|
-
await record.executeAsync(onOperationComplete);
|
|
17913
|
-
}
|
|
16783
|
+
await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_3__.Async.forEachAsync(executionQueue, async (operation) => {
|
|
16784
|
+
await operation.executeAsync(onOperationComplete);
|
|
17914
16785
|
}, {
|
|
17915
16786
|
concurrency: maxParallelism
|
|
17916
16787
|
});
|
|
@@ -17930,6 +16801,8 @@ class OperationExecutionManager {
|
|
|
17930
16801
|
_onOperationComplete(record) {
|
|
17931
16802
|
var _a, _b;
|
|
17932
16803
|
const { runner, name, status } = record;
|
|
16804
|
+
let blockCacheWrite = !runner.isCacheWriteAllowed;
|
|
16805
|
+
let blockSkip = !runner.isSkipAllowed;
|
|
17933
16806
|
const silent = runner.silent;
|
|
17934
16807
|
switch (status) {
|
|
17935
16808
|
/**
|
|
@@ -17948,7 +16821,6 @@ class OperationExecutionManager {
|
|
|
17948
16821
|
const blockedQueue = new Set(record.consumers);
|
|
17949
16822
|
for (const blockedRecord of blockedQueue) {
|
|
17950
16823
|
if (blockedRecord.status === _OperationStatus__WEBPACK_IMPORTED_MODULE_6__.OperationStatus.Ready) {
|
|
17951
|
-
this._executionQueue.complete(blockedRecord);
|
|
17952
16824
|
this._completedOperations++;
|
|
17953
16825
|
// Now that we have the concept of architectural no-ops, we could implement this by replacing
|
|
17954
16826
|
// {blockedRecord.runner} with a no-op that sets status to Blocked and logs the blocking
|
|
@@ -17982,6 +16854,8 @@ class OperationExecutionManager {
|
|
|
17982
16854
|
if (!silent) {
|
|
17983
16855
|
record.collatedWriter.terminal.writeStdoutLine(colors_safe__WEBPACK_IMPORTED_MODULE_0___default().green(`"${name}" was skipped.`));
|
|
17984
16856
|
}
|
|
16857
|
+
// Skipping means cannot guarantee integrity, so prevent cache writes in dependents.
|
|
16858
|
+
blockCacheWrite = true;
|
|
17985
16859
|
break;
|
|
17986
16860
|
}
|
|
17987
16861
|
/**
|
|
@@ -17997,24 +16871,30 @@ class OperationExecutionManager {
|
|
|
17997
16871
|
if (!silent) {
|
|
17998
16872
|
record.collatedWriter.terminal.writeStdoutLine(colors_safe__WEBPACK_IMPORTED_MODULE_0___default().green(`"${name}" completed successfully in ${record.stopwatch.toString()}.`));
|
|
17999
16873
|
}
|
|
16874
|
+
// Legacy incremental build, if asked, prevent skip in dependents if the operation executed.
|
|
16875
|
+
blockSkip || (blockSkip = !this._changedProjectsOnly);
|
|
18000
16876
|
break;
|
|
18001
16877
|
}
|
|
18002
16878
|
case _OperationStatus__WEBPACK_IMPORTED_MODULE_6__.OperationStatus.SuccessWithWarning: {
|
|
18003
16879
|
if (!silent) {
|
|
18004
16880
|
record.collatedWriter.terminal.writeStderrLine(colors_safe__WEBPACK_IMPORTED_MODULE_0___default().yellow(`"${name}" completed with warnings in ${record.stopwatch.toString()}.`));
|
|
18005
16881
|
}
|
|
16882
|
+
// Legacy incremental build, if asked, prevent skip in dependents if the operation executed.
|
|
16883
|
+
blockSkip || (blockSkip = !this._changedProjectsOnly);
|
|
18006
16884
|
this._hasAnyNonAllowedWarnings = this._hasAnyNonAllowedWarnings || !runner.warningsAreAllowed;
|
|
18007
16885
|
break;
|
|
18008
16886
|
}
|
|
18009
16887
|
}
|
|
18010
|
-
|
|
18011
|
-
|
|
18012
|
-
|
|
18013
|
-
|
|
18014
|
-
for (const item of record.consumers) {
|
|
18015
|
-
// Remove this operation from the dependencies, to unblock the scheduler
|
|
18016
|
-
item.dependencies.delete(record);
|
|
16888
|
+
// Apply status changes to direct dependents
|
|
16889
|
+
for (const item of record.consumers) {
|
|
16890
|
+
if (blockCacheWrite) {
|
|
16891
|
+
item.runner.isCacheWriteAllowed = false;
|
|
18017
16892
|
}
|
|
16893
|
+
if (blockSkip) {
|
|
16894
|
+
item.runner.isSkipAllowed = false;
|
|
16895
|
+
}
|
|
16896
|
+
// Remove this operation from the dependencies, to unblock the scheduler
|
|
16897
|
+
item.dependencies.delete(record);
|
|
18018
16898
|
}
|
|
18019
16899
|
}
|
|
18020
16900
|
}
|
|
@@ -18048,8 +16928,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18048
16928
|
|
|
18049
16929
|
/**
|
|
18050
16930
|
* Internal class representing everything about executing an operation
|
|
18051
|
-
*
|
|
18052
|
-
* @internal
|
|
18053
16931
|
*/
|
|
18054
16932
|
class OperationExecutionRecord {
|
|
18055
16933
|
constructor(operation, context) {
|
|
@@ -18076,7 +16954,6 @@ class OperationExecutionRecord {
|
|
|
18076
16954
|
* operation to execute, the operation with the highest criticalPathLength is chosen.
|
|
18077
16955
|
*
|
|
18078
16956
|
* Example:
|
|
18079
|
-
* ```
|
|
18080
16957
|
* (0) A
|
|
18081
16958
|
* \
|
|
18082
16959
|
* (1) B C (0) (applications)
|
|
@@ -18093,7 +16970,6 @@ class OperationExecutionRecord {
|
|
|
18093
16970
|
* X has a score of 1, since the only package which depends on it is A
|
|
18094
16971
|
* Z has a score of 2, since only X depends on it, and X has a score of 1
|
|
18095
16972
|
* Y has a score of 2, since the chain Y->X->C is longer than Y->C
|
|
18096
|
-
* ```
|
|
18097
16973
|
*
|
|
18098
16974
|
* The algorithm is implemented in AsyncOperationQueue.ts as calculateCriticalPathLength()
|
|
18099
16975
|
*/
|
|
@@ -18132,9 +17008,6 @@ class OperationExecutionRecord {
|
|
|
18132
17008
|
get quietMode() {
|
|
18133
17009
|
return this._context.quietMode;
|
|
18134
17010
|
}
|
|
18135
|
-
get changedProjectsOnly() {
|
|
18136
|
-
return this._context.changedProjectsOnly;
|
|
18137
|
-
}
|
|
18138
17011
|
get collatedWriter() {
|
|
18139
17012
|
// Lazy instantiate because the registerTask() call affects display ordering
|
|
18140
17013
|
if (!this._collatedWriter) {
|
|
@@ -18155,20 +17028,18 @@ class OperationExecutionRecord {
|
|
|
18155
17028
|
try {
|
|
18156
17029
|
this.status = await this.runner.executeAsync(this);
|
|
18157
17030
|
// Delegate global state reporting
|
|
18158
|
-
|
|
17031
|
+
onResult(this);
|
|
18159
17032
|
}
|
|
18160
17033
|
catch (error) {
|
|
18161
17034
|
this.status = _OperationStatus__WEBPACK_IMPORTED_MODULE_2__.OperationStatus.Failure;
|
|
18162
17035
|
this.error = error;
|
|
18163
17036
|
// Delegate global state reporting
|
|
18164
|
-
|
|
17037
|
+
onResult(this);
|
|
18165
17038
|
}
|
|
18166
17039
|
finally {
|
|
18167
|
-
|
|
18168
|
-
|
|
18169
|
-
|
|
18170
|
-
this.stopwatch.stop();
|
|
18171
|
-
}
|
|
17040
|
+
(_c = this._collatedWriter) === null || _c === void 0 ? void 0 : _c.close();
|
|
17041
|
+
this.stdioSummarizer.close();
|
|
17042
|
+
this.stopwatch.stop();
|
|
18172
17043
|
(_e = (_d = this._context).onOperationStatusChanged) === null || _e === void 0 ? void 0 : _e.call(_d, this);
|
|
18173
17044
|
}
|
|
18174
17045
|
}
|
|
@@ -18496,35 +17367,6 @@ function writeSummaryHeader(terminal, status, operations, headingColor) {
|
|
|
18496
17367
|
|
|
18497
17368
|
/***/ }),
|
|
18498
17369
|
|
|
18499
|
-
/***/ 478998:
|
|
18500
|
-
/*!*************************************************************!*\
|
|
18501
|
-
!*** ./lib-esnext/logic/operations/OperationRunnerHooks.js ***!
|
|
18502
|
-
\*************************************************************/
|
|
18503
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
18504
|
-
|
|
18505
|
-
__webpack_require__.r(__webpack_exports__);
|
|
18506
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18507
|
-
/* harmony export */ "OperationRunnerHooks": () => (/* binding */ OperationRunnerHooks)
|
|
18508
|
-
/* harmony export */ });
|
|
18509
|
-
/* harmony import */ var tapable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tapable */ 934828);
|
|
18510
|
-
/* harmony import */ var tapable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(tapable__WEBPACK_IMPORTED_MODULE_0__);
|
|
18511
|
-
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
18512
|
-
// See LICENSE in the project root for license information.
|
|
18513
|
-
|
|
18514
|
-
/**
|
|
18515
|
-
* Hooks into the lifecycle of the operation runner
|
|
18516
|
-
*
|
|
18517
|
-
*/
|
|
18518
|
-
class OperationRunnerHooks {
|
|
18519
|
-
constructor() {
|
|
18520
|
-
this.beforeExecute = new tapable__WEBPACK_IMPORTED_MODULE_0__.AsyncSeriesWaterfallHook(['beforeExecuteContext'], 'beforeExecute');
|
|
18521
|
-
this.afterExecute = new tapable__WEBPACK_IMPORTED_MODULE_0__.AsyncSeriesWaterfallHook(['afterExecuteContext'], 'afterExecute');
|
|
18522
|
-
}
|
|
18523
|
-
}
|
|
18524
|
-
//# sourceMappingURL=OperationRunnerHooks.js.map
|
|
18525
|
-
|
|
18526
|
-
/***/ }),
|
|
18527
|
-
|
|
18528
17370
|
/***/ 600463:
|
|
18529
17371
|
/*!***********************************************************!*\
|
|
18530
17372
|
!*** ./lib-esnext/logic/operations/OperationStateFile.js ***!
|
|
@@ -18555,7 +17397,7 @@ class OperationStateFile {
|
|
|
18555
17397
|
return this._state;
|
|
18556
17398
|
}
|
|
18557
17399
|
async writeAsync(json) {
|
|
18558
|
-
await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.JsonFile.saveAsync(json, this.filepath, { ensureFolderExists: true });
|
|
17400
|
+
await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.JsonFile.saveAsync(json, this.filepath, { ensureFolderExists: true, updateExistingFile: true });
|
|
18559
17401
|
this._state = json;
|
|
18560
17402
|
}
|
|
18561
17403
|
async tryRestoreAsync() {
|
|
@@ -18601,18 +17443,10 @@ var OperationStatus;
|
|
|
18601
17443
|
* The Operation is on the queue, ready to execute (but may be waiting for dependencies)
|
|
18602
17444
|
*/
|
|
18603
17445
|
OperationStatus["Ready"] = "READY";
|
|
18604
|
-
/**
|
|
18605
|
-
* The Operation is Queued
|
|
18606
|
-
*/
|
|
18607
|
-
OperationStatus["Queued"] = "QUEUED";
|
|
18608
17446
|
/**
|
|
18609
17447
|
* The Operation is currently executing
|
|
18610
17448
|
*/
|
|
18611
17449
|
OperationStatus["Executing"] = "EXECUTING";
|
|
18612
|
-
/**
|
|
18613
|
-
* The Operation is currently executing by a remote process
|
|
18614
|
-
*/
|
|
18615
|
-
OperationStatus["RemoteExecuting"] = "REMOTE EXECUTING";
|
|
18616
17450
|
/**
|
|
18617
17451
|
* The Operation completed successfully and did not write to standard output
|
|
18618
17452
|
*/
|
|
@@ -18646,59 +17480,6 @@ var OperationStatus;
|
|
|
18646
17480
|
|
|
18647
17481
|
/***/ }),
|
|
18648
17482
|
|
|
18649
|
-
/***/ 476093:
|
|
18650
|
-
/*!*********************************************************!*\
|
|
18651
|
-
!*** ./lib-esnext/logic/operations/PeriodicCallback.js ***!
|
|
18652
|
-
\*********************************************************/
|
|
18653
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
18654
|
-
|
|
18655
|
-
__webpack_require__.r(__webpack_exports__);
|
|
18656
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18657
|
-
/* harmony export */ "PeriodicCallback": () => (/* binding */ PeriodicCallback)
|
|
18658
|
-
/* harmony export */ });
|
|
18659
|
-
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
18660
|
-
// See LICENSE in the project root for license information.
|
|
18661
|
-
/**
|
|
18662
|
-
* A help class to run callbacks in a loop with a specified interval.
|
|
18663
|
-
*
|
|
18664
|
-
* @beta
|
|
18665
|
-
*/
|
|
18666
|
-
class PeriodicCallback {
|
|
18667
|
-
constructor(options) {
|
|
18668
|
-
this._callbacks = [];
|
|
18669
|
-
this._interval = options.interval;
|
|
18670
|
-
this._isRunning = false;
|
|
18671
|
-
}
|
|
18672
|
-
addCallback(callback) {
|
|
18673
|
-
if (this._isRunning) {
|
|
18674
|
-
throw new Error('Can not add callback while watcher is running');
|
|
18675
|
-
}
|
|
18676
|
-
this._callbacks.push(callback);
|
|
18677
|
-
}
|
|
18678
|
-
start() {
|
|
18679
|
-
if (this._intervalId) {
|
|
18680
|
-
throw new Error('Watcher already started');
|
|
18681
|
-
}
|
|
18682
|
-
if (this._callbacks.length === 0) {
|
|
18683
|
-
return;
|
|
18684
|
-
}
|
|
18685
|
-
this._isRunning = true;
|
|
18686
|
-
this._intervalId = setInterval(() => {
|
|
18687
|
-
this._callbacks.forEach((callback) => callback());
|
|
18688
|
-
}, this._interval);
|
|
18689
|
-
}
|
|
18690
|
-
stop() {
|
|
18691
|
-
if (this._intervalId) {
|
|
18692
|
-
clearInterval(this._intervalId);
|
|
18693
|
-
this._intervalId = undefined;
|
|
18694
|
-
this._isRunning = false;
|
|
18695
|
-
}
|
|
18696
|
-
}
|
|
18697
|
-
}
|
|
18698
|
-
//# sourceMappingURL=PeriodicCallback.js.map
|
|
18699
|
-
|
|
18700
|
-
/***/ }),
|
|
18701
|
-
|
|
18702
17483
|
/***/ 797379:
|
|
18703
17484
|
/*!**************************************************************!*\
|
|
18704
17485
|
!*** ./lib-esnext/logic/operations/PhasedOperationPlugin.js ***!
|
|
@@ -18930,14 +17711,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18930
17711
|
/* harmony import */ var _rushstack_terminal__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_rushstack_terminal__WEBPACK_IMPORTED_MODULE_2__);
|
|
18931
17712
|
/* harmony import */ var _rushstack_stream_collator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @rushstack/stream-collator */ 121452);
|
|
18932
17713
|
/* harmony import */ var _rushstack_stream_collator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_rushstack_stream_collator__WEBPACK_IMPORTED_MODULE_3__);
|
|
18933
|
-
/* harmony import */ var
|
|
18934
|
-
/* harmony import */ var
|
|
18935
|
-
/* harmony import */ var
|
|
18936
|
-
/* harmony import */ var
|
|
18937
|
-
/* harmony import */ var
|
|
18938
|
-
/* harmony import */ var
|
|
18939
|
-
/* harmony import */ var
|
|
18940
|
-
/* harmony import */ var
|
|
17714
|
+
/* harmony import */ var _utilities_Utilities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utilities/Utilities */ 827501);
|
|
17715
|
+
/* harmony import */ var _OperationStatus__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./OperationStatus */ 476597);
|
|
17716
|
+
/* harmony import */ var _OperationError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./OperationError */ 593956);
|
|
17717
|
+
/* harmony import */ var _ProjectLogWritable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ProjectLogWritable */ 471311);
|
|
17718
|
+
/* harmony import */ var _buildCache_ProjectBuildCache__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../buildCache/ProjectBuildCache */ 700587);
|
|
17719
|
+
/* harmony import */ var _buildCache_getHashesForGlobsAsync__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../buildCache/getHashesForGlobsAsync */ 653062);
|
|
17720
|
+
/* harmony import */ var _api_RushProjectConfiguration__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../api/RushProjectConfiguration */ 514639);
|
|
17721
|
+
/* harmony import */ var _utilities_CollatedTerminalProvider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utilities/CollatedTerminalProvider */ 782038);
|
|
17722
|
+
/* harmony import */ var _RushConstants__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../RushConstants */ 951904);
|
|
17723
|
+
/* harmony import */ var _api_EnvironmentConfiguration__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../api/EnvironmentConfiguration */ 382806);
|
|
18941
17724
|
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
18942
17725
|
// See LICENSE in the project root for license information.
|
|
18943
17726
|
|
|
@@ -18952,6 +17735,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18952
17735
|
|
|
18953
17736
|
|
|
18954
17737
|
|
|
17738
|
+
|
|
17739
|
+
|
|
17740
|
+
function _areShallowEqual(object1, object2) {
|
|
17741
|
+
for (const n in object1) {
|
|
17742
|
+
if (!(n in object2) || object1[n] !== object2[n]) {
|
|
17743
|
+
return false;
|
|
17744
|
+
}
|
|
17745
|
+
}
|
|
17746
|
+
for (const n in object2) {
|
|
17747
|
+
if (!(n in object1)) {
|
|
17748
|
+
return false;
|
|
17749
|
+
}
|
|
17750
|
+
}
|
|
17751
|
+
return true;
|
|
17752
|
+
}
|
|
18955
17753
|
/**
|
|
18956
17754
|
* An `IOperationRunner` subclass that performs an operation via a shell command.
|
|
18957
17755
|
* Currently contains the build cache logic, pending extraction as separate operations.
|
|
@@ -18959,36 +17757,42 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18959
17757
|
*/
|
|
18960
17758
|
class ShellOperationRunner {
|
|
18961
17759
|
constructor(options) {
|
|
17760
|
+
// This runner supports cache writes by default.
|
|
17761
|
+
this.isCacheWriteAllowed = true;
|
|
18962
17762
|
this.reportTiming = true;
|
|
18963
17763
|
this.silent = false;
|
|
17764
|
+
/**
|
|
17765
|
+
* UNINITIALIZED === we haven't tried to initialize yet
|
|
17766
|
+
* undefined === we didn't create one because the feature is not enabled
|
|
17767
|
+
*/
|
|
17768
|
+
this._projectBuildCache = _utilities_Utilities__WEBPACK_IMPORTED_MODULE_4__.UNINITIALIZED;
|
|
18964
17769
|
const { phase } = options;
|
|
18965
17770
|
this.name = options.displayName;
|
|
18966
17771
|
this._rushProject = options.rushProject;
|
|
18967
17772
|
this._phase = phase;
|
|
18968
17773
|
this._rushConfiguration = options.rushConfiguration;
|
|
17774
|
+
this._buildCacheConfiguration = options.buildCacheConfiguration;
|
|
18969
17775
|
this._commandName = phase.name;
|
|
18970
17776
|
this._commandToRun = options.commandToRun;
|
|
17777
|
+
this._isCacheReadAllowed = options.isIncrementalBuildAllowed;
|
|
17778
|
+
this.isSkipAllowed = options.isIncrementalBuildAllowed;
|
|
18971
17779
|
this._projectChangeAnalyzer = options.projectChangeAnalyzer;
|
|
18972
17780
|
this._packageDepsFilename = `package-deps_${phase.logFilenameIdentifier}.json`;
|
|
18973
17781
|
this.warningsAreAllowed =
|
|
18974
|
-
|
|
17782
|
+
_api_EnvironmentConfiguration__WEBPACK_IMPORTED_MODULE_5__.EnvironmentConfiguration.allowWarningsInSuccessfulBuild || phase.allowWarningsOnSuccess || false;
|
|
18975
17783
|
this._logFilenameIdentifier = phase.logFilenameIdentifier;
|
|
18976
17784
|
this._selectedPhases = options.selectedPhases;
|
|
18977
|
-
this.hooks = new _OperationRunnerHooks__WEBPACK_IMPORTED_MODULE_5__.OperationRunnerHooks();
|
|
18978
|
-
this.periodicCallback = new _PeriodicCallback__WEBPACK_IMPORTED_MODULE_6__.PeriodicCallback({
|
|
18979
|
-
interval: 10 * 1000
|
|
18980
|
-
});
|
|
18981
17785
|
}
|
|
18982
17786
|
async executeAsync(context) {
|
|
18983
17787
|
try {
|
|
18984
17788
|
return await this._executeAsync(context);
|
|
18985
17789
|
}
|
|
18986
17790
|
catch (error) {
|
|
18987
|
-
throw new
|
|
17791
|
+
throw new _OperationError__WEBPACK_IMPORTED_MODULE_6__.OperationError('executing', error.message);
|
|
18988
17792
|
}
|
|
18989
17793
|
}
|
|
18990
17794
|
async _executeAsync(context) {
|
|
18991
|
-
var _a;
|
|
17795
|
+
var _a, _b, _c;
|
|
18992
17796
|
// TERMINAL PIPELINE:
|
|
18993
17797
|
//
|
|
18994
17798
|
// +--> quietModeTransform? --> collatedWriter
|
|
@@ -18996,7 +17800,7 @@ class ShellOperationRunner {
|
|
|
18996
17800
|
// normalizeNewlineTransform --1--> stderrLineTransform --2--> removeColorsTransform --> projectLogWritable
|
|
18997
17801
|
// |
|
|
18998
17802
|
// +--> stdioSummarizer
|
|
18999
|
-
const projectLogWritable = new
|
|
17803
|
+
const projectLogWritable = new _ProjectLogWritable__WEBPACK_IMPORTED_MODULE_7__.ProjectLogWritable(this._rushProject, context.collatedWriter.terminal, this._logFilenameIdentifier);
|
|
19000
17804
|
try {
|
|
19001
17805
|
const removeColorsTransform = new _rushstack_terminal__WEBPACK_IMPORTED_MODULE_2__.TextRewriterTransform({
|
|
19002
17806
|
destination: projectLogWritable,
|
|
@@ -19022,7 +17826,7 @@ class ShellOperationRunner {
|
|
|
19022
17826
|
ensureNewlineAtEnd: true
|
|
19023
17827
|
});
|
|
19024
17828
|
const collatedTerminal = new _rushstack_stream_collator__WEBPACK_IMPORTED_MODULE_3__.CollatedTerminal(normalizeNewlineTransform);
|
|
19025
|
-
const terminalProvider = new
|
|
17829
|
+
const terminalProvider = new _utilities_CollatedTerminalProvider__WEBPACK_IMPORTED_MODULE_8__.CollatedTerminalProvider(collatedTerminal, {
|
|
19026
17830
|
debugEnabled: context.debugMode
|
|
19027
17831
|
});
|
|
19028
17832
|
const terminal = new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Terminal(terminalProvider);
|
|
@@ -19056,6 +17860,15 @@ class ShellOperationRunner {
|
|
|
19056
17860
|
arguments: this._commandToRun
|
|
19057
17861
|
};
|
|
19058
17862
|
}
|
|
17863
|
+
else if (this.isSkipAllowed) {
|
|
17864
|
+
// To test this code path:
|
|
17865
|
+
// Remove the `.git` folder then run "rush build --verbose"
|
|
17866
|
+
terminal.writeLine({
|
|
17867
|
+
text: _rushstack_terminal__WEBPACK_IMPORTED_MODULE_2__.PrintUtilities.wrapWords('This workspace does not appear to be tracked by Git. ' +
|
|
17868
|
+
'Rush will proceed without incremental execution, caching, and change detection.'),
|
|
17869
|
+
foregroundColor: _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.ColorValue.Cyan
|
|
17870
|
+
});
|
|
17871
|
+
}
|
|
19059
17872
|
}
|
|
19060
17873
|
catch (error) {
|
|
19061
17874
|
// To test this code path:
|
|
@@ -19066,24 +17879,49 @@ class ShellOperationRunner {
|
|
|
19066
17879
|
foregroundColor: _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.ColorValue.Cyan
|
|
19067
17880
|
});
|
|
19068
17881
|
}
|
|
19069
|
-
|
|
19070
|
-
|
|
19071
|
-
|
|
19072
|
-
|
|
19073
|
-
|
|
19074
|
-
|
|
19075
|
-
|
|
19076
|
-
|
|
19077
|
-
|
|
19078
|
-
|
|
19079
|
-
|
|
19080
|
-
|
|
19081
|
-
|
|
19082
|
-
|
|
19083
|
-
|
|
19084
|
-
|
|
19085
|
-
|
|
19086
|
-
|
|
17882
|
+
// If possible, we want to skip this operation -- either by restoring it from the
|
|
17883
|
+
// cache, if caching is enabled, or determining that the project
|
|
17884
|
+
// is unchanged (using the older incremental execution logic). These two approaches,
|
|
17885
|
+
// "caching" and "skipping", are incompatible, so only one applies.
|
|
17886
|
+
//
|
|
17887
|
+
// Note that "caching" and "skipping" take two different approaches
|
|
17888
|
+
// to tracking dependents:
|
|
17889
|
+
//
|
|
17890
|
+
// - For caching, "isCacheReadAllowed" is set if a project supports
|
|
17891
|
+
// incremental builds, and determining whether this project or a dependent
|
|
17892
|
+
// has changed happens inside the hashing logic.
|
|
17893
|
+
//
|
|
17894
|
+
// - For skipping, "isSkipAllowed" is set to true initially, and during
|
|
17895
|
+
// the process of running dependents, it will be changed by OperationExecutionManager to
|
|
17896
|
+
// false if a dependency wasn't able to be skipped.
|
|
17897
|
+
//
|
|
17898
|
+
let buildCacheReadAttempted = false;
|
|
17899
|
+
if (this._isCacheReadAllowed) {
|
|
17900
|
+
const projectBuildCache = await this._tryGetProjectBuildCacheAsync({
|
|
17901
|
+
terminal,
|
|
17902
|
+
trackedProjectFiles,
|
|
17903
|
+
operationMetadataManager: context._operationMetadataManager
|
|
17904
|
+
});
|
|
17905
|
+
buildCacheReadAttempted = !!projectBuildCache;
|
|
17906
|
+
const restoreFromCacheSuccess = await (projectBuildCache === null || projectBuildCache === void 0 ? void 0 : projectBuildCache.tryRestoreFromCacheAsync(terminal));
|
|
17907
|
+
if (restoreFromCacheSuccess) {
|
|
17908
|
+
// Restore the original state of the operation without cache
|
|
17909
|
+
await ((_a = context._operationMetadataManager) === null || _a === void 0 ? void 0 : _a.tryRestoreAsync({
|
|
17910
|
+
terminal,
|
|
17911
|
+
logPath: projectLogWritable.logPath,
|
|
17912
|
+
errorLogPath: projectLogWritable.errorLogPath
|
|
17913
|
+
}));
|
|
17914
|
+
return _OperationStatus__WEBPACK_IMPORTED_MODULE_9__.OperationStatus.FromCache;
|
|
17915
|
+
}
|
|
17916
|
+
}
|
|
17917
|
+
if (this.isSkipAllowed && !buildCacheReadAttempted) {
|
|
17918
|
+
const isPackageUnchanged = !!(lastProjectDeps &&
|
|
17919
|
+
projectDeps &&
|
|
17920
|
+
projectDeps.arguments === lastProjectDeps.arguments &&
|
|
17921
|
+
_areShallowEqual(projectDeps.files, lastProjectDeps.files));
|
|
17922
|
+
if (isPackageUnchanged) {
|
|
17923
|
+
return _OperationStatus__WEBPACK_IMPORTED_MODULE_9__.OperationStatus.Skipped;
|
|
17924
|
+
}
|
|
19087
17925
|
}
|
|
19088
17926
|
// If the deps file exists, remove it before starting execution.
|
|
19089
17927
|
_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.FileSystem.deleteFile(currentDepsPath);
|
|
@@ -19098,12 +17936,11 @@ class ShellOperationRunner {
|
|
|
19098
17936
|
ensureFolderExists: true
|
|
19099
17937
|
});
|
|
19100
17938
|
}
|
|
19101
|
-
return
|
|
17939
|
+
return _OperationStatus__WEBPACK_IMPORTED_MODULE_9__.OperationStatus.Success;
|
|
19102
17940
|
}
|
|
19103
17941
|
// Run the operation
|
|
19104
17942
|
terminal.writeLine('Invoking: ' + this._commandToRun);
|
|
19105
|
-
|
|
19106
|
-
const subProcess = _utilities_Utilities__WEBPACK_IMPORTED_MODULE_11__.Utilities.executeLifecycleCommandAsync(this._commandToRun, {
|
|
17943
|
+
const subProcess = _utilities_Utilities__WEBPACK_IMPORTED_MODULE_4__.Utilities.executeLifecycleCommandAsync(this._commandToRun, {
|
|
19107
17944
|
rushConfiguration: this._rushConfiguration,
|
|
19108
17945
|
workingDirectory: projectFolder,
|
|
19109
17946
|
initCwd: this._rushConfiguration.commonTempFolder,
|
|
@@ -19126,21 +17963,17 @@ class ShellOperationRunner {
|
|
|
19126
17963
|
hasWarningOrError = true;
|
|
19127
17964
|
});
|
|
19128
17965
|
}
|
|
19129
|
-
let exitCode = 1;
|
|
19130
17966
|
let status = await new Promise((resolve, reject) => {
|
|
19131
17967
|
subProcess.on('close', (code) => {
|
|
19132
|
-
exitCode = code;
|
|
19133
17968
|
try {
|
|
19134
17969
|
if (code !== 0) {
|
|
19135
|
-
|
|
19136
|
-
context.error = new _OperationError__WEBPACK_IMPORTED_MODULE_7__.OperationError('error', `Returned error code: ${code}`);
|
|
19137
|
-
resolve(_OperationStatus__WEBPACK_IMPORTED_MODULE_10__.OperationStatus.Failure);
|
|
17970
|
+
reject(new _OperationError__WEBPACK_IMPORTED_MODULE_6__.OperationError('error', `Returned error code: ${code}`));
|
|
19138
17971
|
}
|
|
19139
17972
|
else if (hasWarningOrError) {
|
|
19140
|
-
resolve(
|
|
17973
|
+
resolve(_OperationStatus__WEBPACK_IMPORTED_MODULE_9__.OperationStatus.SuccessWithWarning);
|
|
19141
17974
|
}
|
|
19142
17975
|
else {
|
|
19143
|
-
resolve(
|
|
17976
|
+
resolve(_OperationStatus__WEBPACK_IMPORTED_MODULE_9__.OperationStatus.Success);
|
|
19144
17977
|
}
|
|
19145
17978
|
}
|
|
19146
17979
|
catch (error) {
|
|
@@ -19148,39 +17981,39 @@ class ShellOperationRunner {
|
|
|
19148
17981
|
}
|
|
19149
17982
|
});
|
|
19150
17983
|
});
|
|
19151
|
-
|
|
19152
|
-
|
|
19153
|
-
await ((_a = context._operationMetadataManager) === null || _a === void 0 ? void 0 : _a.saveAsync({
|
|
19154
|
-
durationInSeconds,
|
|
19155
|
-
logPath: projectLogWritable.logPath,
|
|
19156
|
-
errorLogPath: projectLogWritable.errorLogPath
|
|
19157
|
-
}));
|
|
19158
|
-
const taskIsSuccessful = status === _OperationStatus__WEBPACK_IMPORTED_MODULE_10__.OperationStatus.Success ||
|
|
19159
|
-
(status === _OperationStatus__WEBPACK_IMPORTED_MODULE_10__.OperationStatus.SuccessWithWarning &&
|
|
17984
|
+
const taskIsSuccessful = status === _OperationStatus__WEBPACK_IMPORTED_MODULE_9__.OperationStatus.Success ||
|
|
17985
|
+
(status === _OperationStatus__WEBPACK_IMPORTED_MODULE_9__.OperationStatus.SuccessWithWarning &&
|
|
19160
17986
|
this.warningsAreAllowed &&
|
|
19161
17987
|
!!this._rushConfiguration.experimentsConfiguration.configuration
|
|
19162
17988
|
.buildCacheWithAllowWarningsInSuccessfulBuild);
|
|
19163
17989
|
if (taskIsSuccessful && projectDeps) {
|
|
19164
17990
|
// Write deps on success.
|
|
19165
|
-
|
|
17991
|
+
const writeProjectStatePromise = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.JsonFile.saveAsync(projectDeps, currentDepsPath, {
|
|
19166
17992
|
ensureFolderExists: true
|
|
19167
17993
|
});
|
|
19168
|
-
|
|
19169
|
-
|
|
19170
|
-
context
|
|
19171
|
-
|
|
19172
|
-
|
|
19173
|
-
|
|
19174
|
-
|
|
19175
|
-
|
|
19176
|
-
|
|
19177
|
-
|
|
19178
|
-
|
|
19179
|
-
|
|
19180
|
-
|
|
19181
|
-
|
|
19182
|
-
|
|
19183
|
-
|
|
17994
|
+
// If the operation without cache was successful, we can save the metadata to disk
|
|
17995
|
+
const { duration: durationInSeconds } = context.stopwatch;
|
|
17996
|
+
await ((_b = context._operationMetadataManager) === null || _b === void 0 ? void 0 : _b.saveAsync({
|
|
17997
|
+
durationInSeconds,
|
|
17998
|
+
logPath: projectLogWritable.logPath,
|
|
17999
|
+
errorLogPath: projectLogWritable.errorLogPath
|
|
18000
|
+
}));
|
|
18001
|
+
// If the command is successful, we can calculate project hash, and no dependencies were skipped,
|
|
18002
|
+
// write a new cache entry.
|
|
18003
|
+
const setCacheEntryPromise = this.isCacheWriteAllowed
|
|
18004
|
+
? (_c = (await this._tryGetProjectBuildCacheAsync({
|
|
18005
|
+
terminal,
|
|
18006
|
+
trackedProjectFiles,
|
|
18007
|
+
operationMetadataManager: context._operationMetadataManager
|
|
18008
|
+
}))) === null || _c === void 0 ? void 0 : _c.trySetCacheEntryAsync(terminal)
|
|
18009
|
+
: undefined;
|
|
18010
|
+
const [, cacheWriteSuccess] = await Promise.all([writeProjectStatePromise, setCacheEntryPromise]);
|
|
18011
|
+
if (terminalProvider.hasErrors) {
|
|
18012
|
+
status = _OperationStatus__WEBPACK_IMPORTED_MODULE_9__.OperationStatus.Failure;
|
|
18013
|
+
}
|
|
18014
|
+
else if (cacheWriteSuccess === false) {
|
|
18015
|
+
status = _OperationStatus__WEBPACK_IMPORTED_MODULE_9__.OperationStatus.SuccessWithWarning;
|
|
18016
|
+
}
|
|
19184
18017
|
}
|
|
19185
18018
|
normalizeNewlineTransform.close();
|
|
19186
18019
|
// If the pipeline is wired up correctly, then closing normalizeNewlineTransform should
|
|
@@ -19192,9 +18025,70 @@ class ShellOperationRunner {
|
|
|
19192
18025
|
}
|
|
19193
18026
|
finally {
|
|
19194
18027
|
projectLogWritable.close();
|
|
19195
|
-
this.periodicCallback.stop();
|
|
19196
18028
|
}
|
|
19197
18029
|
}
|
|
18030
|
+
async _tryGetProjectBuildCacheAsync({ terminal, trackedProjectFiles, operationMetadataManager }) {
|
|
18031
|
+
if (this._projectBuildCache === _utilities_Utilities__WEBPACK_IMPORTED_MODULE_4__.UNINITIALIZED) {
|
|
18032
|
+
this._projectBuildCache = undefined;
|
|
18033
|
+
if (this._buildCacheConfiguration && this._buildCacheConfiguration.buildCacheEnabled) {
|
|
18034
|
+
// Disable legacy skip logic if the build cache is in play
|
|
18035
|
+
this.isSkipAllowed = false;
|
|
18036
|
+
const projectConfiguration = await _api_RushProjectConfiguration__WEBPACK_IMPORTED_MODULE_10__.RushProjectConfiguration.tryLoadForProjectAsync(this._rushProject, terminal);
|
|
18037
|
+
if (projectConfiguration) {
|
|
18038
|
+
projectConfiguration.validatePhaseConfiguration(this._selectedPhases, terminal);
|
|
18039
|
+
if (projectConfiguration.disableBuildCacheForProject) {
|
|
18040
|
+
terminal.writeVerboseLine('Caching has been disabled for this project.');
|
|
18041
|
+
}
|
|
18042
|
+
else {
|
|
18043
|
+
const operationSettings = projectConfiguration.operationSettingsByOperationName.get(this._commandName);
|
|
18044
|
+
if (!operationSettings) {
|
|
18045
|
+
terminal.writeVerboseLine(`This project does not define the caching behavior of the "${this._commandName}" command, so caching has been disabled.`);
|
|
18046
|
+
}
|
|
18047
|
+
else if (operationSettings.disableBuildCacheForOperation) {
|
|
18048
|
+
terminal.writeVerboseLine(`Caching has been disabled for this project's "${this._commandName}" command.`);
|
|
18049
|
+
}
|
|
18050
|
+
else {
|
|
18051
|
+
const projectOutputFolderNames = operationSettings.outputFolderNames || [];
|
|
18052
|
+
const additionalProjectOutputFilePaths = [
|
|
18053
|
+
...((operationMetadataManager === null || operationMetadataManager === void 0 ? void 0 : operationMetadataManager.relativeFilepaths) || [])
|
|
18054
|
+
];
|
|
18055
|
+
const additionalContext = {};
|
|
18056
|
+
if (operationSettings.dependsOnEnvVars) {
|
|
18057
|
+
for (const varName of operationSettings.dependsOnEnvVars) {
|
|
18058
|
+
additionalContext['$' + varName] = process.env[varName] || '';
|
|
18059
|
+
}
|
|
18060
|
+
}
|
|
18061
|
+
if (operationSettings.dependsOnAdditionalFiles) {
|
|
18062
|
+
const repoState = await this._projectChangeAnalyzer._ensureInitializedAsync(terminal);
|
|
18063
|
+
const additionalFiles = await (0,_buildCache_getHashesForGlobsAsync__WEBPACK_IMPORTED_MODULE_11__.getHashesForGlobsAsync)(operationSettings.dependsOnAdditionalFiles, this._rushProject.projectFolder, repoState);
|
|
18064
|
+
terminal.writeDebugLine(`Including additional files to calculate build cache hash:\n ${Array.from(additionalFiles.keys()).join('\n ')} `);
|
|
18065
|
+
for (const [filePath, fileHash] of additionalFiles) {
|
|
18066
|
+
additionalContext['file://' + filePath] = fileHash;
|
|
18067
|
+
}
|
|
18068
|
+
}
|
|
18069
|
+
this._projectBuildCache = await _buildCache_ProjectBuildCache__WEBPACK_IMPORTED_MODULE_12__.ProjectBuildCache.tryGetProjectBuildCache({
|
|
18070
|
+
projectConfiguration,
|
|
18071
|
+
projectOutputFolderNames,
|
|
18072
|
+
additionalProjectOutputFilePaths,
|
|
18073
|
+
additionalContext,
|
|
18074
|
+
buildCacheConfiguration: this._buildCacheConfiguration,
|
|
18075
|
+
terminal,
|
|
18076
|
+
command: this._commandToRun,
|
|
18077
|
+
trackedProjectFiles: trackedProjectFiles,
|
|
18078
|
+
projectChangeAnalyzer: this._projectChangeAnalyzer,
|
|
18079
|
+
phaseName: this._phase.name
|
|
18080
|
+
});
|
|
18081
|
+
}
|
|
18082
|
+
}
|
|
18083
|
+
}
|
|
18084
|
+
else {
|
|
18085
|
+
terminal.writeVerboseLine(`Project does not have a ${_RushConstants__WEBPACK_IMPORTED_MODULE_13__.RushConstants.rushProjectConfigFilename} configuration file, ` +
|
|
18086
|
+
'or one provided by a rig, so it does not support caching.');
|
|
18087
|
+
}
|
|
18088
|
+
}
|
|
18089
|
+
}
|
|
18090
|
+
return this._projectBuildCache;
|
|
18091
|
+
}
|
|
19198
18092
|
}
|
|
19199
18093
|
/**
|
|
19200
18094
|
* When running a command from the "scripts" block in package.json, if the command
|
|
@@ -19278,7 +18172,7 @@ class ShellOperationRunnerPlugin {
|
|
|
19278
18172
|
}
|
|
19279
18173
|
}
|
|
19280
18174
|
function createShellOperations(operations, context) {
|
|
19281
|
-
const { phaseSelection: selectedPhases, projectChangeAnalyzer, rushConfiguration } = context;
|
|
18175
|
+
const { buildCacheConfiguration, isIncrementalBuildAllowed, phaseSelection: selectedPhases, projectChangeAnalyzer, rushConfiguration } = context;
|
|
19282
18176
|
const customParametersByPhase = new Map();
|
|
19283
18177
|
function getCustomParameterValuesForPhase(phase) {
|
|
19284
18178
|
let customParameterValues = customParametersByPhase.get(phase);
|
|
@@ -19303,16 +18197,17 @@ function createShellOperations(operations, context) {
|
|
|
19303
18197
|
}
|
|
19304
18198
|
const displayName = getDisplayName(phase, project);
|
|
19305
18199
|
if (commandToRun) {
|
|
19306
|
-
|
|
18200
|
+
operation.runner = new _ShellOperationRunner__WEBPACK_IMPORTED_MODULE_0__.ShellOperationRunner({
|
|
18201
|
+
buildCacheConfiguration,
|
|
19307
18202
|
commandToRun: commandToRun || '',
|
|
19308
18203
|
displayName,
|
|
18204
|
+
isIncrementalBuildAllowed,
|
|
19309
18205
|
phase,
|
|
19310
18206
|
projectChangeAnalyzer,
|
|
19311
18207
|
rushConfiguration,
|
|
19312
18208
|
rushProject: project,
|
|
19313
18209
|
selectedPhases
|
|
19314
18210
|
});
|
|
19315
|
-
operation.runner = shellOperationRunner;
|
|
19316
18211
|
}
|
|
19317
18212
|
else {
|
|
19318
18213
|
// Empty build script indicates a no-op, so use a no-op runner
|
|
@@ -19461,40 +18356,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19461
18356
|
/* harmony export */ });
|
|
19462
18357
|
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! crypto */ 706113);
|
|
19463
18358
|
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_0__);
|
|
19464
|
-
/* harmony import */ var
|
|
19465
|
-
/* harmony import */ var
|
|
19466
|
-
/* harmony import */ var
|
|
19467
|
-
/* harmony import */ var
|
|
19468
|
-
/* harmony import */ var _base_BaseProjectShrinkwrapFile__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../base/BaseProjectShrinkwrapFile */ 894306);
|
|
19469
|
-
/* harmony import */ var _PnpmShrinkwrapFile__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./PnpmShrinkwrapFile */ 930997);
|
|
19470
|
-
/* harmony import */ var _RushConstants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../RushConstants */ 951904);
|
|
18359
|
+
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @rushstack/node-core-library */ 132939);
|
|
18360
|
+
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__);
|
|
18361
|
+
/* harmony import */ var _base_BaseProjectShrinkwrapFile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/BaseProjectShrinkwrapFile */ 894306);
|
|
18362
|
+
/* harmony import */ var _RushConstants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../RushConstants */ 951904);
|
|
19471
18363
|
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
19472
18364
|
// See LICENSE in the project root for license information.
|
|
19473
18365
|
|
|
19474
18366
|
|
|
19475
18367
|
|
|
19476
18368
|
|
|
19477
|
-
|
|
19478
|
-
|
|
19479
18369
|
/**
|
|
19480
18370
|
*
|
|
19481
18371
|
*/
|
|
19482
|
-
class PnpmProjectShrinkwrapFile extends
|
|
19483
|
-
/**
|
|
19484
|
-
* When split workspace projects turn off shared-workspace-lockfiles, Pnpm creates individual
|
|
19485
|
-
* shrinkwrap files for each project.
|
|
19486
|
-
*/
|
|
19487
|
-
static async generateIndividualProjectShrinkwrapAsync(project) {
|
|
19488
|
-
const shrinkwrapPath = path__WEBPACK_IMPORTED_MODULE_1__.join(project.projectFolder, _RushConstants__WEBPACK_IMPORTED_MODULE_4__.RushConstants.pnpmV3ShrinkwrapFilename);
|
|
19489
|
-
const shrinkwrapFile = _PnpmShrinkwrapFile__WEBPACK_IMPORTED_MODULE_5__.PnpmShrinkwrapFile.loadFromFile(shrinkwrapPath);
|
|
19490
|
-
if (!shrinkwrapFile) {
|
|
19491
|
-
// Individual shrinkwrap may does not exist when partial install.
|
|
19492
|
-
return;
|
|
19493
|
-
}
|
|
19494
|
-
shrinkwrapFile.setIndividualPackage(project.packageName);
|
|
19495
|
-
const projectShrinkwrapFile = new PnpmProjectShrinkwrapFile(shrinkwrapFile, project);
|
|
19496
|
-
await projectShrinkwrapFile.updateProjectShrinkwrapAsync();
|
|
19497
|
-
}
|
|
18372
|
+
class PnpmProjectShrinkwrapFile extends _base_BaseProjectShrinkwrapFile__WEBPACK_IMPORTED_MODULE_2__.BaseProjectShrinkwrapFile {
|
|
19498
18373
|
/**
|
|
19499
18374
|
* Generate and write the project shrinkwrap file to <project>/.rush/temp/shrinkwrap-deps.json.
|
|
19500
18375
|
* @returns True if the project shrinkwrap was created or updated, false otherwise.
|
|
@@ -19531,16 +18406,9 @@ class PnpmProjectShrinkwrapFile extends _base_BaseProjectShrinkwrapFile__WEBPACK
|
|
|
19531
18406
|
* Generate the project shrinkwrap file content
|
|
19532
18407
|
*/
|
|
19533
18408
|
generateProjectShrinkwrapMap() {
|
|
19534
|
-
|
|
19535
|
-
|
|
19536
|
-
|
|
19537
|
-
}
|
|
19538
|
-
else if (this.shrinkwrapFile.isWorkspaceCompatible) {
|
|
19539
|
-
projectShrinkwrapMap = this.generateWorkspaceProjectShrinkwrapMap();
|
|
19540
|
-
}
|
|
19541
|
-
else {
|
|
19542
|
-
projectShrinkwrapMap = this.generateLegacyProjectShrinkwrapMap();
|
|
19543
|
-
}
|
|
18409
|
+
const projectShrinkwrapMap = this.shrinkwrapFile.isWorkspaceCompatible
|
|
18410
|
+
? this.generateWorkspaceProjectShrinkwrapMap()
|
|
18411
|
+
: this.generateLegacyProjectShrinkwrapMap();
|
|
19544
18412
|
return projectShrinkwrapMap;
|
|
19545
18413
|
}
|
|
19546
18414
|
generateWorkspaceProjectShrinkwrapMap() {
|
|
@@ -19561,7 +18429,7 @@ class PnpmProjectShrinkwrapFile extends _base_BaseProjectShrinkwrapFile__WEBPACK
|
|
|
19561
18429
|
];
|
|
19562
18430
|
const projectShrinkwrapMap = new Map();
|
|
19563
18431
|
for (const [name, version] of allDependencies) {
|
|
19564
|
-
if (name.indexOf(`${
|
|
18432
|
+
if (name.indexOf(`${_RushConstants__WEBPACK_IMPORTED_MODULE_3__.RushConstants.rushTempNpmScope}/`) < 0) {
|
|
19565
18433
|
// Only select the shrinkwrap dependencies that are non-local since we already handle local
|
|
19566
18434
|
// project changes
|
|
19567
18435
|
this._addDependencyRecursive(projectShrinkwrapMap, name, version, parentShrinkwrapEntry);
|
|
@@ -19572,10 +18440,6 @@ class PnpmProjectShrinkwrapFile extends _base_BaseProjectShrinkwrapFile__WEBPACK
|
|
|
19572
18440
|
this._resolveAndAddPeerDependencies(projectShrinkwrapMap, parentShrinkwrapEntry);
|
|
19573
18441
|
return projectShrinkwrapMap;
|
|
19574
18442
|
}
|
|
19575
|
-
generateIndividualProjectShrinkwrapMap() {
|
|
19576
|
-
const projectShrinkwrapMap = this.shrinkwrapFile.getIntegrityForIndividualProject();
|
|
19577
|
-
return projectShrinkwrapMap;
|
|
19578
|
-
}
|
|
19579
18443
|
_addDependencyRecursive(projectShrinkwrapMap, name, version, parentShrinkwrapEntry, throwIfShrinkwrapEntryMissing = true) {
|
|
19580
18444
|
var _a;
|
|
19581
18445
|
const specifier = `${name}@${version}`;
|
|
@@ -19586,7 +18450,7 @@ class PnpmProjectShrinkwrapFile extends _base_BaseProjectShrinkwrapFile__WEBPACK
|
|
|
19586
18450
|
const shrinkwrapEntry = this.shrinkwrapFile.getShrinkwrapEntry(name, version);
|
|
19587
18451
|
if (!shrinkwrapEntry) {
|
|
19588
18452
|
if (throwIfShrinkwrapEntryMissing) {
|
|
19589
|
-
throw new
|
|
18453
|
+
throw new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.InternalError(`Unable to find dependency ${name} with version ${version} in shrinkwrap.`);
|
|
19590
18454
|
}
|
|
19591
18455
|
return;
|
|
19592
18456
|
}
|
|
@@ -19627,7 +18491,7 @@ class PnpmProjectShrinkwrapFile extends _base_BaseProjectShrinkwrapFile__WEBPACK
|
|
|
19627
18491
|
var _a, _b, _c;
|
|
19628
18492
|
for (const peerDependencyName of Object.keys(shrinkwrapEntry.peerDependencies || {})) {
|
|
19629
18493
|
// Skip peer dependency resolution of local package peer dependencies
|
|
19630
|
-
if (peerDependencyName.indexOf(
|
|
18494
|
+
if (peerDependencyName.indexOf(_RushConstants__WEBPACK_IMPORTED_MODULE_3__.RushConstants.rushTempNpmScope) !== -1) {
|
|
19631
18495
|
continue;
|
|
19632
18496
|
}
|
|
19633
18497
|
// Check to see if the peer dependency is satisfied with the current shrinkwrap
|
|
@@ -19658,7 +18522,7 @@ class PnpmProjectShrinkwrapFile extends _base_BaseProjectShrinkwrapFile__WEBPACK
|
|
|
19658
18522
|
for (const key of keys) {
|
|
19659
18523
|
file[key] = projectShrinkwrapMap.get(key);
|
|
19660
18524
|
}
|
|
19661
|
-
await
|
|
18525
|
+
await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.JsonFile.saveAsync(file, this.projectShrinkwrapFilePath, { ensureFolderExists: true });
|
|
19662
18526
|
}
|
|
19663
18527
|
}
|
|
19664
18528
|
//# sourceMappingURL=PnpmProjectShrinkwrapFile.js.map
|
|
@@ -19688,10 +18552,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19688
18552
|
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_4__);
|
|
19689
18553
|
/* harmony import */ var _base_BaseShrinkwrapFile__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../base/BaseShrinkwrapFile */ 411534);
|
|
19690
18554
|
/* harmony import */ var _DependencySpecifier__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../DependencySpecifier */ 68654);
|
|
19691
|
-
/* harmony import */ var
|
|
18555
|
+
/* harmony import */ var _PnpmYamlCommon__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./PnpmYamlCommon */ 730862);
|
|
19692
18556
|
/* harmony import */ var _RushConstants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../RushConstants */ 951904);
|
|
19693
18557
|
/* harmony import */ var _api_PackageJsonEditor__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../api/PackageJsonEditor */ 73666);
|
|
19694
|
-
/* harmony import */ var _SplitWorkspacePnpmfileConfiguration__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./SplitWorkspacePnpmfileConfiguration */ 608961);
|
|
19695
18558
|
/* harmony import */ var _PnpmfileConfiguration__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./PnpmfileConfiguration */ 238032);
|
|
19696
18559
|
/* harmony import */ var _PnpmProjectShrinkwrapFile__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./PnpmProjectShrinkwrapFile */ 390053);
|
|
19697
18560
|
/* harmony import */ var _PnpmOptionsConfiguration__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./PnpmOptionsConfiguration */ 402835);
|
|
@@ -19710,7 +18573,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19710
18573
|
|
|
19711
18574
|
|
|
19712
18575
|
|
|
19713
|
-
|
|
19714
18576
|
const yamlModule = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_4__.Import.lazy('js-yaml', require);
|
|
19715
18577
|
/**
|
|
19716
18578
|
* Given an encoded "dependency key" from the PNPM shrinkwrap file, this parses it into an equivalent
|
|
@@ -19799,12 +18661,9 @@ class PnpmShrinkwrapFile extends _base_BaseShrinkwrapFile__WEBPACK_IMPORTED_MODU
|
|
|
19799
18661
|
// Normalize the data
|
|
19800
18662
|
this.registry = shrinkwrapJson.registry || '';
|
|
19801
18663
|
this.dependencies = new Map(Object.entries(shrinkwrapJson.dependencies || {}));
|
|
19802
|
-
this.devDependencies = new Map(Object.entries(shrinkwrapJson.devDependencies || {}));
|
|
19803
|
-
this.optionalDependencies = new Map(Object.entries(shrinkwrapJson.optionalDependencies || {}));
|
|
19804
18664
|
this.importers = new Map(Object.entries(shrinkwrapJson.importers || {}));
|
|
19805
18665
|
this.specifiers = new Map(Object.entries(shrinkwrapJson.specifiers || {}));
|
|
19806
18666
|
this.packages = new Map(Object.entries(shrinkwrapJson.packages || {}));
|
|
19807
|
-
this.overrides = new Map(Object.entries(shrinkwrapJson.overrides || {}));
|
|
19808
18667
|
// Importers only exist in workspaces
|
|
19809
18668
|
this.isWorkspaceCompatible = this.importers.size > 0;
|
|
19810
18669
|
this._integrities = new Map();
|
|
@@ -19825,15 +18684,6 @@ class PnpmShrinkwrapFile extends _base_BaseShrinkwrapFile__WEBPACK_IMPORTED_MODU
|
|
|
19825
18684
|
const parsedData = yamlModule.safeLoad(shrinkwrapContent);
|
|
19826
18685
|
return new PnpmShrinkwrapFile(parsedData);
|
|
19827
18686
|
}
|
|
19828
|
-
setIndividualPackage(packageName, splitWorkspaceGlobalPnpmfileConfiguration) {
|
|
19829
|
-
this._individualPackageName = packageName;
|
|
19830
|
-
if (splitWorkspaceGlobalPnpmfileConfiguration) {
|
|
19831
|
-
this._splitWorkspaceGlobalPnpmfileConfiguration = splitWorkspaceGlobalPnpmfileConfiguration;
|
|
19832
|
-
}
|
|
19833
|
-
}
|
|
19834
|
-
get isIndividual() {
|
|
19835
|
-
return this._individualPackageName !== undefined;
|
|
19836
|
-
}
|
|
19837
18687
|
getShrinkwrapHash(experimentsConfig) {
|
|
19838
18688
|
// The 'omitImportersFromPreventManualShrinkwrapChanges' experiment skips the 'importers' section
|
|
19839
18689
|
// when computing the hash, since the main concern is changes to the overall external dependency footprint
|
|
@@ -20069,34 +18919,6 @@ class PnpmShrinkwrapFile extends _base_BaseShrinkwrapFile__WEBPACK_IMPORTED_MODU
|
|
|
20069
18919
|
}
|
|
20070
18920
|
return integrityMap;
|
|
20071
18921
|
}
|
|
20072
|
-
getIntegrityForIndividualProject() {
|
|
20073
|
-
const packageName = this._individualPackageName;
|
|
20074
|
-
if (undefined === packageName) {
|
|
20075
|
-
throw new Error(`Can not generate integrities for shared shrinkwrap file`);
|
|
20076
|
-
}
|
|
20077
|
-
let integrityMap = this._integrities.get(packageName);
|
|
20078
|
-
if (!integrityMap) {
|
|
20079
|
-
integrityMap = new Map();
|
|
20080
|
-
this._integrities.set(packageName, integrityMap);
|
|
20081
|
-
const shrinkwrapHash = this.getShrinkwrapHash();
|
|
20082
|
-
const selfIntegrity = `${packageName}:${shrinkwrapHash}:`;
|
|
20083
|
-
integrityMap.set(packageName, selfIntegrity);
|
|
20084
|
-
const { dependencies, devDependencies, optionalDependencies } = this._getIndividualShrinkwrapImporter();
|
|
20085
|
-
const externalFilter = (name, version) => {
|
|
20086
|
-
return !version.includes('link:');
|
|
20087
|
-
};
|
|
20088
|
-
if (dependencies) {
|
|
20089
|
-
this._addIntegrities(integrityMap, dependencies, false, externalFilter);
|
|
20090
|
-
}
|
|
20091
|
-
if (devDependencies) {
|
|
20092
|
-
this._addIntegrities(integrityMap, devDependencies, false, externalFilter);
|
|
20093
|
-
}
|
|
20094
|
-
if (optionalDependencies) {
|
|
20095
|
-
this._addIntegrities(integrityMap, optionalDependencies, true, externalFilter);
|
|
20096
|
-
}
|
|
20097
|
-
}
|
|
20098
|
-
return integrityMap;
|
|
20099
|
-
}
|
|
20100
18922
|
/** @override */
|
|
20101
18923
|
async isWorkspaceProjectModifiedAsync(project, variant) {
|
|
20102
18924
|
const importerKey = this.getImporterKeyByPath(project.rushConfiguration.commonTempFolder, project.projectFolder);
|
|
@@ -20114,76 +18936,7 @@ class PnpmShrinkwrapFile extends _base_BaseShrinkwrapFile__WEBPACK_IMPORTED_MODU
|
|
|
20114
18936
|
}
|
|
20115
18937
|
// Use a new PackageJsonEditor since it will classify each dependency type, making tracking the
|
|
20116
18938
|
// found versions much simpler.
|
|
20117
|
-
const
|
|
20118
|
-
return this._isProjectModified(transformedPackageJsonEditor, importer);
|
|
20119
|
-
}
|
|
20120
|
-
isSplitWorkspaceProjectModified(project) {
|
|
20121
|
-
const importerKey = this.getImporterKeyByPath(project.rushConfiguration.commonTempSplitFolder, project.projectFolder);
|
|
20122
|
-
const importer = this.getImporter(importerKey);
|
|
20123
|
-
if (!importer) {
|
|
20124
|
-
return true;
|
|
20125
|
-
}
|
|
20126
|
-
if (!this._splitWorkspaceGlobalPnpmfileConfiguration) {
|
|
20127
|
-
this._splitWorkspaceGlobalPnpmfileConfiguration = new _SplitWorkspacePnpmfileConfiguration__WEBPACK_IMPORTED_MODULE_12__.SplitWorkspacePnpmfileConfiguration(project.rushConfiguration);
|
|
20128
|
-
}
|
|
20129
|
-
const packageJson = project.packageJsonEditor.saveToObject();
|
|
20130
|
-
// Use a new PackageJsonEditor since it will classify each dependency type, making tracking the
|
|
20131
|
-
// found versions much simpler.
|
|
20132
|
-
const transformedPackageJsonEditor = _api_PackageJsonEditor__WEBPACK_IMPORTED_MODULE_11__.PackageJsonEditor.fromObject(this._splitWorkspaceGlobalPnpmfileConfiguration.transform(packageJson), project.packageJsonEditor.filePath);
|
|
20133
|
-
return this._isProjectModified(transformedPackageJsonEditor, importer);
|
|
20134
|
-
}
|
|
20135
|
-
isSplitWorkspaceIndividualProjectModified(project) {
|
|
20136
|
-
var _a, _b;
|
|
20137
|
-
if (!this.isIndividual) {
|
|
20138
|
-
throw new Error(`Can not calculate modified for shared workspace shrinkwrap file`);
|
|
20139
|
-
}
|
|
20140
|
-
if (!this._splitWorkspaceGlobalPnpmfileConfiguration) {
|
|
20141
|
-
this._splitWorkspaceGlobalPnpmfileConfiguration = new _SplitWorkspacePnpmfileConfiguration__WEBPACK_IMPORTED_MODULE_12__.SplitWorkspacePnpmfileConfiguration(project.rushConfiguration);
|
|
20142
|
-
}
|
|
20143
|
-
const packageJson = project.packageJsonEditor.saveToObject();
|
|
20144
|
-
let transformedPackageJson = packageJson;
|
|
20145
|
-
// .pnpmfile.cjs under project folder
|
|
20146
|
-
const individualPnpmfilePath = path__WEBPACK_IMPORTED_MODULE_0__.join(project.projectFolder, _RushConstants__WEBPACK_IMPORTED_MODULE_8__.RushConstants.pnpmfileV6Filename);
|
|
20147
|
-
let individualPnpmfile;
|
|
20148
|
-
if (_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_4__.FileSystem.exists(individualPnpmfilePath)) {
|
|
20149
|
-
try {
|
|
20150
|
-
individualPnpmfile = require(individualPnpmfilePath);
|
|
20151
|
-
}
|
|
20152
|
-
catch (err) {
|
|
20153
|
-
if (err instanceof SyntaxError) {
|
|
20154
|
-
console.error(colors_safe__WEBPACK_IMPORTED_MODULE_3___default().red(`A syntax error in the ${_RushConstants__WEBPACK_IMPORTED_MODULE_8__.RushConstants.pnpmfileV6Filename} at ${individualPnpmfilePath}\n`));
|
|
20155
|
-
}
|
|
20156
|
-
else {
|
|
20157
|
-
console.error(colors_safe__WEBPACK_IMPORTED_MODULE_3___default().red(`Error during pnpmfile execution. pnpmfile: "${individualPnpmfilePath}". Error: "${err.message}".` +
|
|
20158
|
-
'\n'));
|
|
20159
|
-
}
|
|
20160
|
-
}
|
|
20161
|
-
}
|
|
20162
|
-
transformedPackageJson =
|
|
20163
|
-
this._splitWorkspaceGlobalPnpmfileConfiguration.transform(transformedPackageJson);
|
|
20164
|
-
if (individualPnpmfile) {
|
|
20165
|
-
const individualContext = {
|
|
20166
|
-
log: (message) => {
|
|
20167
|
-
console.log(message);
|
|
20168
|
-
}
|
|
20169
|
-
};
|
|
20170
|
-
try {
|
|
20171
|
-
transformedPackageJson =
|
|
20172
|
-
((_b = (_a = individualPnpmfile.hooks) === null || _a === void 0 ? void 0 : _a.readPackage) === null || _b === void 0 ? void 0 : _b.call(_a, transformedPackageJson, individualContext)) ||
|
|
20173
|
-
transformedPackageJson;
|
|
20174
|
-
}
|
|
20175
|
-
catch (err) {
|
|
20176
|
-
console.error(colors_safe__WEBPACK_IMPORTED_MODULE_3___default().red(`Error during readPackage hook execution. pnpmfile: "${individualPnpmfilePath}". Error: "${err.message}".` +
|
|
20177
|
-
'\n'));
|
|
20178
|
-
}
|
|
20179
|
-
}
|
|
20180
|
-
// Use a new PackageJsonEditor since it will classify each dependency type, making tracking the
|
|
20181
|
-
// found versions much simpler.
|
|
20182
|
-
const transformedPackageJsonEditor = _api_PackageJsonEditor__WEBPACK_IMPORTED_MODULE_11__.PackageJsonEditor.fromObject(transformedPackageJson, project.packageJsonEditor.filePath);
|
|
20183
|
-
return this._isProjectModified(transformedPackageJsonEditor, this._getIndividualShrinkwrapImporter());
|
|
20184
|
-
}
|
|
20185
|
-
_isProjectModified(packageJsonEditor, projectShrinkwrap) {
|
|
20186
|
-
const { dependencyList, devDependencyList } = packageJsonEditor;
|
|
18939
|
+
const { dependencyList, devDependencyList } = _api_PackageJsonEditor__WEBPACK_IMPORTED_MODULE_11__.PackageJsonEditor.fromObject(this._pnpmfileConfiguration.transform(packageJson), project.packageJsonEditor.filePath);
|
|
20187
18940
|
// Then get the unique package names and map them to package versions.
|
|
20188
18941
|
const dependencyVersions = new Map();
|
|
20189
18942
|
for (const packageDependency of [...dependencyList, ...devDependencyList]) {
|
|
@@ -20218,42 +18971,30 @@ class PnpmShrinkwrapFile extends _base_BaseShrinkwrapFile__WEBPACK_IMPORTED_MODU
|
|
|
20218
18971
|
for (const dependencyVersion of dependencyVersions.values()) {
|
|
20219
18972
|
switch (dependencyVersion.dependencyType) {
|
|
20220
18973
|
case _api_PackageJsonEditor__WEBPACK_IMPORTED_MODULE_11__.DependencyType.Optional:
|
|
20221
|
-
if (!
|
|
20222
|
-
!projectShrinkwrap.optionalDependencies[dependencyVersion.name])
|
|
18974
|
+
if (!importer.optionalDependencies || !importer.optionalDependencies[dependencyVersion.name])
|
|
20223
18975
|
return true;
|
|
20224
18976
|
break;
|
|
20225
18977
|
case _api_PackageJsonEditor__WEBPACK_IMPORTED_MODULE_11__.DependencyType.Regular:
|
|
20226
|
-
if (!
|
|
18978
|
+
if (!importer.dependencies || !importer.dependencies[dependencyVersion.name])
|
|
20227
18979
|
return true;
|
|
20228
18980
|
break;
|
|
20229
18981
|
case _api_PackageJsonEditor__WEBPACK_IMPORTED_MODULE_11__.DependencyType.Dev:
|
|
20230
|
-
if (!
|
|
20231
|
-
!projectShrinkwrap.devDependencies[dependencyVersion.name])
|
|
18982
|
+
if (!importer.devDependencies || !importer.devDependencies[dependencyVersion.name])
|
|
20232
18983
|
return true;
|
|
20233
18984
|
break;
|
|
20234
18985
|
}
|
|
20235
18986
|
}
|
|
20236
18987
|
// Then validate the length matches between the importer and the dependency list, since duplicates are
|
|
20237
18988
|
// a valid use-case. Importers will only take one of these values, so no need to do more work here.
|
|
20238
|
-
if (dependencyVersions.size !== Object.keys(
|
|
18989
|
+
if (dependencyVersions.size !== Object.keys(importer.specifiers).length) {
|
|
20239
18990
|
return true;
|
|
20240
18991
|
}
|
|
20241
18992
|
// Finally, validate that all values in the importer are also present in the dependency list.
|
|
20242
|
-
for (const [importerPackageName, importerVersionSpecifier] of Object.entries(
|
|
18993
|
+
for (const [importerPackageName, importerVersionSpecifier] of Object.entries(importer.specifiers)) {
|
|
20243
18994
|
const foundDependency = dependencyVersions.get(importerPackageName);
|
|
20244
|
-
if (!foundDependency) {
|
|
18995
|
+
if (!foundDependency || foundDependency.version !== importerVersionSpecifier) {
|
|
20245
18996
|
return true;
|
|
20246
18997
|
}
|
|
20247
|
-
if (this.overrides.has(importerPackageName)) {
|
|
20248
|
-
if (this.overrides.get(importerPackageName) !== importerVersionSpecifier) {
|
|
20249
|
-
return true;
|
|
20250
|
-
}
|
|
20251
|
-
}
|
|
20252
|
-
else {
|
|
20253
|
-
if (foundDependency.version !== importerVersionSpecifier) {
|
|
20254
|
-
return true;
|
|
20255
|
-
}
|
|
20256
|
-
}
|
|
20257
18998
|
}
|
|
20258
18999
|
return false;
|
|
20259
19000
|
}
|
|
@@ -20353,22 +19094,7 @@ class PnpmShrinkwrapFile extends _base_BaseShrinkwrapFile__WEBPACK_IMPORTED_MODU
|
|
|
20353
19094
|
shrinkwrapToSerialize[key] = value;
|
|
20354
19095
|
}
|
|
20355
19096
|
}
|
|
20356
|
-
return yamlModule.safeDump(shrinkwrapToSerialize,
|
|
20357
|
-
}
|
|
20358
|
-
_getIndividualShrinkwrapImporter() {
|
|
20359
|
-
if (!this._individualShrinkwrapImporter) {
|
|
20360
|
-
const dependencies = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_4__.MapExtensions.toObject(this.dependencies);
|
|
20361
|
-
const devDependencies = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_4__.MapExtensions.toObject(this.devDependencies);
|
|
20362
|
-
const optionalDependencies = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_4__.MapExtensions.toObject(this.optionalDependencies);
|
|
20363
|
-
const specifiers = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_4__.MapExtensions.toObject(this.specifiers);
|
|
20364
|
-
this._individualShrinkwrapImporter = {
|
|
20365
|
-
dependencies,
|
|
20366
|
-
devDependencies,
|
|
20367
|
-
optionalDependencies,
|
|
20368
|
-
specifiers
|
|
20369
|
-
};
|
|
20370
|
-
}
|
|
20371
|
-
return this._individualShrinkwrapImporter;
|
|
19097
|
+
return yamlModule.safeDump(shrinkwrapToSerialize, _PnpmYamlCommon__WEBPACK_IMPORTED_MODULE_12__.PNPM_SHRINKWRAP_YAML_FORMAT);
|
|
20372
19098
|
}
|
|
20373
19099
|
}
|
|
20374
19100
|
//# sourceMappingURL=PnpmShrinkwrapFile.js.map
|
|
@@ -20470,9 +19196,6 @@ class PnpmfileConfiguration {
|
|
|
20470
19196
|
allPreferredVersions = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.MapExtensions.toObject(preferredVersions);
|
|
20471
19197
|
allowedAlternativeVersions = _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.MapExtensions.toObject(commonVersionsConfiguration.allowedAlternativeVersions);
|
|
20472
19198
|
for (const project of rushConfiguration.projects) {
|
|
20473
|
-
if (!project.packageJson.version) {
|
|
20474
|
-
throw new Error(`Missing version for the "${project.packageName}" project. Please specify "version" field in package.json under ${project.projectFolder}`);
|
|
20475
|
-
}
|
|
20476
19199
|
workspaceVersions[project.packageName] = project.packageJson.version;
|
|
20477
19200
|
}
|
|
20478
19201
|
}
|
|
@@ -20620,250 +19343,6 @@ const hooks = {
|
|
|
20620
19343
|
|
|
20621
19344
|
/***/ }),
|
|
20622
19345
|
|
|
20623
|
-
/***/ 848654:
|
|
20624
|
-
/*!*******************************************************************!*\
|
|
20625
|
-
!*** ./lib-esnext/logic/pnpm/SplitWorkspaceGlobalPnpmfileShim.js ***!
|
|
20626
|
-
\*******************************************************************/
|
|
20627
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
20628
|
-
|
|
20629
|
-
__webpack_require__.r(__webpack_exports__);
|
|
20630
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
20631
|
-
/* harmony export */ "hooks": () => (/* binding */ hooks)
|
|
20632
|
-
/* harmony export */ });
|
|
20633
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ 371017);
|
|
20634
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
|
20635
|
-
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
20636
|
-
// See LICENSE in the project root for license information.
|
|
20637
|
-
var _a;
|
|
20638
|
-
// The "rush install" or "rush update" commands will copy this template to
|
|
20639
|
-
// "common/temp-split/global-pnpmfile.js" so that it can implement Rush-specific features.
|
|
20640
|
-
// It reads its input data from "common/temp/pnpmfileSettings.json",
|
|
20641
|
-
// which includes the path to the user's pnpmfile for the currently selected variant. The pnpmfile is
|
|
20642
|
-
// required directly by this shim and is called after Rush's transformations are applied.
|
|
20643
|
-
|
|
20644
|
-
let settings;
|
|
20645
|
-
let userPnpmfile;
|
|
20646
|
-
let semver;
|
|
20647
|
-
let normalizePath;
|
|
20648
|
-
// Initialize all external aspects of the pnpmfile shim. When using the shim, settings
|
|
20649
|
-
// are always expected to be available. Init must be called before running any hook that
|
|
20650
|
-
// depends on a resource obtained from or related to the settings, and will require modules
|
|
20651
|
-
// once so they aren't repeatedly required in the hook functions.
|
|
20652
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20653
|
-
function init(context) {
|
|
20654
|
-
// Sometimes PNPM may provide us a context arg that doesn't fit spec, ex.:
|
|
20655
|
-
// https://github.com/pnpm/pnpm/blob/97c64bae4d14a8c8f05803f1d94075ee29c2df2f/packages/get-context/src/index.ts#L134
|
|
20656
|
-
// So we need to normalize the context format before we move on
|
|
20657
|
-
if (typeof context !== 'object' || Array.isArray(context)) {
|
|
20658
|
-
context = {
|
|
20659
|
-
log: (message) => { },
|
|
20660
|
-
originalContext: context
|
|
20661
|
-
};
|
|
20662
|
-
}
|
|
20663
|
-
if (!settings) {
|
|
20664
|
-
// Initialize the settings from file
|
|
20665
|
-
if (!context.splitWorkspacePnpmfileShimSettings) {
|
|
20666
|
-
context.splitWorkspacePnpmfileShimSettings = require('./pnpmfileSettings.json');
|
|
20667
|
-
}
|
|
20668
|
-
settings = context.splitWorkspacePnpmfileShimSettings;
|
|
20669
|
-
}
|
|
20670
|
-
else if (!context.splitWorkspacePnpmfileShimSettings) {
|
|
20671
|
-
// Reuse the already initialized settings
|
|
20672
|
-
context.splitWorkspacePnpmfileShimSettings = settings;
|
|
20673
|
-
}
|
|
20674
|
-
// If a userPnpmfilePath is provided, we expect it to exist
|
|
20675
|
-
if (!userPnpmfile && settings.userPnpmfilePath) {
|
|
20676
|
-
userPnpmfile = require(settings.userPnpmfilePath);
|
|
20677
|
-
}
|
|
20678
|
-
// If a semverPath is provided, we expect it to exist
|
|
20679
|
-
if (!semver && settings.semverPath) {
|
|
20680
|
-
semver = require(settings.semverPath);
|
|
20681
|
-
}
|
|
20682
|
-
if (!normalizePath && settings.pathNormalizerPath) {
|
|
20683
|
-
normalizePath = require(settings.pathNormalizerPath);
|
|
20684
|
-
}
|
|
20685
|
-
// Return the normalized context
|
|
20686
|
-
return context;
|
|
20687
|
-
}
|
|
20688
|
-
// Rewrite rush project referenced in split workspace.
|
|
20689
|
-
// For example: "project-a": "workspace:*" --> "project-a": "link:../../project-a"
|
|
20690
|
-
function rewriteRushProjectVersions(packageName, dependencies) {
|
|
20691
|
-
if (!dependencies) {
|
|
20692
|
-
return;
|
|
20693
|
-
}
|
|
20694
|
-
if (!settings || !normalizePath) {
|
|
20695
|
-
throw new Error(`splitWorkspaceGlobalPnpmfileShimSettings not initialized`);
|
|
20696
|
-
}
|
|
20697
|
-
const splitWorkspaceProject = settings.splitWorkspaceProjects[packageName];
|
|
20698
|
-
if (!splitWorkspaceProject) {
|
|
20699
|
-
return;
|
|
20700
|
-
}
|
|
20701
|
-
for (const dependencyName of Object.keys(dependencies)) {
|
|
20702
|
-
const currentVersion = dependencies[dependencyName];
|
|
20703
|
-
if (currentVersion.startsWith('workspace:')) {
|
|
20704
|
-
const workspaceProjectInfo = settings.workspaceProjects[dependencyName];
|
|
20705
|
-
if (workspaceProjectInfo) {
|
|
20706
|
-
// Case 1. "<package_name>": "workspace:*"
|
|
20707
|
-
const relativePath = normalizePath(path__WEBPACK_IMPORTED_MODULE_0___default().relative(splitWorkspaceProject.projectRelativeFolder, workspaceProjectInfo.projectRelativeFolder));
|
|
20708
|
-
const newVersion = 'link:' + relativePath;
|
|
20709
|
-
dependencies[dependencyName] = newVersion;
|
|
20710
|
-
}
|
|
20711
|
-
else {
|
|
20712
|
-
// Case 2. "<alias>": "workspace:<aliased_package_name>@<version>"
|
|
20713
|
-
const packageSpec = currentVersion.slice('workspace:'.length);
|
|
20714
|
-
const nameEndsAt = packageSpec[0] === '@' ? packageSpec.slice(1).indexOf('@') + 1 : packageSpec.indexOf('@');
|
|
20715
|
-
const aliasedPackageName = nameEndsAt > 0 ? packageSpec.slice(0, nameEndsAt) : packageSpec;
|
|
20716
|
-
// const depVersion: string = nameEndsAt > 0 ? packageSpec.slice(nameEndsAt + 1) : '';
|
|
20717
|
-
const aliasedWorkspaceProjectInfo = settings.workspaceProjects[aliasedPackageName];
|
|
20718
|
-
if (aliasedWorkspaceProjectInfo) {
|
|
20719
|
-
const relativePath = normalizePath(path__WEBPACK_IMPORTED_MODULE_0___default().relative(splitWorkspaceProject.projectRelativeFolder, aliasedWorkspaceProjectInfo.projectRelativeFolder));
|
|
20720
|
-
const newVersion = 'link:' + relativePath;
|
|
20721
|
-
dependencies[dependencyName] = newVersion;
|
|
20722
|
-
}
|
|
20723
|
-
}
|
|
20724
|
-
}
|
|
20725
|
-
else if (currentVersion.startsWith('npm:')) {
|
|
20726
|
-
// Case 3. "<alias>": "npm:<package_name>@<dep_version>"
|
|
20727
|
-
const packageSpec = currentVersion.slice('npm:'.length);
|
|
20728
|
-
const nameEndsAt = packageSpec[0] === '@' ? packageSpec.slice(1).indexOf('@') + 1 : packageSpec.indexOf('@');
|
|
20729
|
-
const aliasedPackageName = nameEndsAt > 0 ? packageSpec.slice(0, nameEndsAt) : packageSpec;
|
|
20730
|
-
// const depVersion: string = nameEndsAt > 0 ? packageSpec.slice(nameEndsAt + 1) : '';
|
|
20731
|
-
const aliasedWorkspaceProjectInfo = settings.workspaceProjects[aliasedPackageName];
|
|
20732
|
-
if (aliasedWorkspaceProjectInfo) {
|
|
20733
|
-
const relativePath = normalizePath(path__WEBPACK_IMPORTED_MODULE_0___default().relative(splitWorkspaceProject.projectRelativeFolder, aliasedWorkspaceProjectInfo.projectRelativeFolder));
|
|
20734
|
-
const newVersion = 'link:' + relativePath;
|
|
20735
|
-
dependencies[dependencyName] = newVersion;
|
|
20736
|
-
}
|
|
20737
|
-
}
|
|
20738
|
-
}
|
|
20739
|
-
}
|
|
20740
|
-
const hooks = {
|
|
20741
|
-
// Call the original pnpmfile (if it exists)
|
|
20742
|
-
afterAllResolved: (lockfile, context) => {
|
|
20743
|
-
var _a;
|
|
20744
|
-
context = init(context);
|
|
20745
|
-
return ((_a = userPnpmfile === null || userPnpmfile === void 0 ? void 0 : userPnpmfile.hooks) === null || _a === void 0 ? void 0 : _a.afterAllResolved)
|
|
20746
|
-
? userPnpmfile.hooks.afterAllResolved(lockfile, context)
|
|
20747
|
-
: lockfile;
|
|
20748
|
-
},
|
|
20749
|
-
// Rewrite workspace protocol to link protocol for non split workspace projects
|
|
20750
|
-
readPackage: (pkg, context) => {
|
|
20751
|
-
var _a;
|
|
20752
|
-
context = init(context);
|
|
20753
|
-
rewriteRushProjectVersions(pkg.name, pkg.dependencies);
|
|
20754
|
-
rewriteRushProjectVersions(pkg.name, pkg.devDependencies);
|
|
20755
|
-
return ((_a = userPnpmfile === null || userPnpmfile === void 0 ? void 0 : userPnpmfile.hooks) === null || _a === void 0 ? void 0 : _a.readPackage) ? userPnpmfile.hooks.readPackage(pkg, context) : pkg;
|
|
20756
|
-
},
|
|
20757
|
-
// Call the original pnpmfile (if it exists)
|
|
20758
|
-
filterLog: (_a = userPnpmfile === null || userPnpmfile === void 0 ? void 0 : userPnpmfile.hooks) === null || _a === void 0 ? void 0 : _a.filterLog
|
|
20759
|
-
};
|
|
20760
|
-
//# sourceMappingURL=SplitWorkspaceGlobalPnpmfileShim.js.map
|
|
20761
|
-
|
|
20762
|
-
/***/ }),
|
|
20763
|
-
|
|
20764
|
-
/***/ 608961:
|
|
20765
|
-
/*!**********************************************************************!*\
|
|
20766
|
-
!*** ./lib-esnext/logic/pnpm/SplitWorkspacePnpmfileConfiguration.js ***!
|
|
20767
|
-
\**********************************************************************/
|
|
20768
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
20769
|
-
|
|
20770
|
-
__webpack_require__.r(__webpack_exports__);
|
|
20771
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
20772
|
-
/* harmony export */ "SplitWorkspacePnpmfileConfiguration": () => (/* binding */ SplitWorkspacePnpmfileConfiguration)
|
|
20773
|
-
/* harmony export */ });
|
|
20774
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ 371017);
|
|
20775
|
-
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
|
|
20776
|
-
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @rushstack/node-core-library */ 132939);
|
|
20777
|
-
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__);
|
|
20778
|
-
/* harmony import */ var _SplitWorkspaceGlobalPnpmfileShim__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SplitWorkspaceGlobalPnpmfileShim */ 848654);
|
|
20779
|
-
/* harmony import */ var _utilities_PathConstants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utilities/PathConstants */ 287644);
|
|
20780
|
-
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
20781
|
-
// See LICENSE in the project root for license information.
|
|
20782
|
-
|
|
20783
|
-
|
|
20784
|
-
|
|
20785
|
-
|
|
20786
|
-
/**
|
|
20787
|
-
* Loads PNPM's pnpmfile.js configuration, and invokes it to preprocess package.json files,
|
|
20788
|
-
* optionally utilizing a pnpmfile shim to inject preferred versions.
|
|
20789
|
-
*/
|
|
20790
|
-
class SplitWorkspacePnpmfileConfiguration {
|
|
20791
|
-
constructor(rushConfiguration) {
|
|
20792
|
-
if (rushConfiguration.packageManager !== 'pnpm') {
|
|
20793
|
-
throw new Error(`PnpmfileConfiguration cannot be used with package manager "${rushConfiguration.packageManager}"`);
|
|
20794
|
-
}
|
|
20795
|
-
// Set the context to swallow log output and store our settings
|
|
20796
|
-
this._context = {
|
|
20797
|
-
log: (message) => { },
|
|
20798
|
-
splitWorkspacePnpmfileShimSettings: SplitWorkspacePnpmfileConfiguration._getSplitWorkspacePnpmfileShimSettings(rushConfiguration)
|
|
20799
|
-
};
|
|
20800
|
-
}
|
|
20801
|
-
/**
|
|
20802
|
-
* Split workspace use global pnpmfile, because in split workspace, user may set `shared-workspace-lockfile=false`.
|
|
20803
|
-
* That means each project owns their individual pnpmfile under project folder. While the global pnpmfile could be
|
|
20804
|
-
* under the common/temp-split/ folder and be used by all split workspace projects.
|
|
20805
|
-
*/
|
|
20806
|
-
static async writeCommonTempSplitGlobalPnpmfileAsync(rushConfiguration) {
|
|
20807
|
-
if (rushConfiguration.packageManager !== 'pnpm') {
|
|
20808
|
-
throw new Error(`PnpmfileConfiguration cannot be used with package manager "${rushConfiguration.packageManager}"`);
|
|
20809
|
-
}
|
|
20810
|
-
const targetDir = rushConfiguration.commonTempSplitFolder;
|
|
20811
|
-
const splitWorkspaceGlobalPnpmfilePath = path__WEBPACK_IMPORTED_MODULE_0__.join(targetDir, rushConfiguration.packageManagerWrapper.globalPnpmfileFilename);
|
|
20812
|
-
// Write the shim itself
|
|
20813
|
-
await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.FileSystem.copyFileAsync({
|
|
20814
|
-
sourcePath: `${_utilities_PathConstants__WEBPACK_IMPORTED_MODULE_2__.scriptsFolderPath}/${_utilities_PathConstants__WEBPACK_IMPORTED_MODULE_2__.splitWorkspacePnpmfileShimFilename}`,
|
|
20815
|
-
destinationPath: splitWorkspaceGlobalPnpmfilePath
|
|
20816
|
-
});
|
|
20817
|
-
const splitWorkspaceGlobalPnpmfileShimSettings = SplitWorkspacePnpmfileConfiguration._getSplitWorkspacePnpmfileShimSettings(rushConfiguration);
|
|
20818
|
-
// Write the settings file used by the shim
|
|
20819
|
-
await _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.JsonFile.saveAsync(splitWorkspaceGlobalPnpmfileShimSettings, path__WEBPACK_IMPORTED_MODULE_0__.join(targetDir, 'pnpmfileSettings.json'), {
|
|
20820
|
-
ensureFolderExists: true
|
|
20821
|
-
});
|
|
20822
|
-
}
|
|
20823
|
-
static _getSplitWorkspacePnpmfileShimSettings(rushConfiguration) {
|
|
20824
|
-
const workspaceProjects = {};
|
|
20825
|
-
const splitWorkspaceProjects = {};
|
|
20826
|
-
for (const project of rushConfiguration.projects) {
|
|
20827
|
-
const { packageName, projectRelativeFolder, packageJson } = project;
|
|
20828
|
-
const workspaceProjectInfo = {
|
|
20829
|
-
packageName,
|
|
20830
|
-
projectRelativeFolder,
|
|
20831
|
-
packageVersion: packageJson.version
|
|
20832
|
-
};
|
|
20833
|
-
(project.splitWorkspace ? splitWorkspaceProjects : workspaceProjects)[packageName] =
|
|
20834
|
-
workspaceProjectInfo;
|
|
20835
|
-
}
|
|
20836
|
-
const settings = {
|
|
20837
|
-
workspaceProjects,
|
|
20838
|
-
splitWorkspaceProjects,
|
|
20839
|
-
semverPath: _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Import.resolveModule({ modulePath: 'semver', baseFolderPath: __dirname }),
|
|
20840
|
-
pathNormalizerPath: _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.Import.resolveModule({ modulePath: 'normalize-path', baseFolderPath: __dirname })
|
|
20841
|
-
};
|
|
20842
|
-
// common/config/rush/.pnpmfile-split-workspace.cjs
|
|
20843
|
-
const userPnpmfilePath = path__WEBPACK_IMPORTED_MODULE_0__.join(rushConfiguration.commonRushConfigFolder, rushConfiguration.packageManagerWrapper.splitWorkspacePnpmfileFilename);
|
|
20844
|
-
if (_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_1__.FileSystem.exists(userPnpmfilePath)) {
|
|
20845
|
-
settings.userPnpmfilePath = userPnpmfilePath;
|
|
20846
|
-
}
|
|
20847
|
-
return settings;
|
|
20848
|
-
}
|
|
20849
|
-
/**
|
|
20850
|
-
* Transform a package.json file using the pnpmfile.js hook.
|
|
20851
|
-
* @returns the tranformed object, or the original input if pnpmfile.js was not found.
|
|
20852
|
-
*/
|
|
20853
|
-
transform(packageJson) {
|
|
20854
|
-
var _a;
|
|
20855
|
-
if (!((_a = _SplitWorkspaceGlobalPnpmfileShim__WEBPACK_IMPORTED_MODULE_3__.hooks) === null || _a === void 0 ? void 0 : _a.readPackage) || !this._context) {
|
|
20856
|
-
return packageJson;
|
|
20857
|
-
}
|
|
20858
|
-
else {
|
|
20859
|
-
return _SplitWorkspaceGlobalPnpmfileShim__WEBPACK_IMPORTED_MODULE_3__.hooks.readPackage(packageJson, this._context);
|
|
20860
|
-
}
|
|
20861
|
-
}
|
|
20862
|
-
}
|
|
20863
|
-
//# sourceMappingURL=SplitWorkspacePnpmfileConfiguration.js.map
|
|
20864
|
-
|
|
20865
|
-
/***/ }),
|
|
20866
|
-
|
|
20867
19346
|
/***/ 613207:
|
|
20868
19347
|
/*!***************************************************!*\
|
|
20869
19348
|
!*** ./lib-esnext/logic/policy/GitEmailPolicy.js ***!
|
|
@@ -21137,58 +19616,6 @@ class NamedProjectSelectorParser {
|
|
|
21137
19616
|
|
|
21138
19617
|
/***/ }),
|
|
21139
19618
|
|
|
21140
|
-
/***/ 357196:
|
|
21141
|
-
/*!***************************************************************************!*\
|
|
21142
|
-
!*** ./lib-esnext/logic/selectors/SplitWorkspaceProjectSelectorParser.js ***!
|
|
21143
|
-
\***************************************************************************/
|
|
21144
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
21145
|
-
|
|
21146
|
-
__webpack_require__.r(__webpack_exports__);
|
|
21147
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
21148
|
-
/* harmony export */ "SplitWorkspaceProjectSelectorParser": () => (/* binding */ SplitWorkspaceProjectSelectorParser)
|
|
21149
|
-
/* harmony export */ });
|
|
21150
|
-
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @rushstack/node-core-library */ 132939);
|
|
21151
|
-
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__);
|
|
21152
|
-
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
21153
|
-
// See LICENSE in the project root for license information.
|
|
21154
|
-
|
|
21155
|
-
class SplitWorkspaceProjectSelectorParser {
|
|
21156
|
-
constructor(rushConfiguration) {
|
|
21157
|
-
this._rushConfiguration = rushConfiguration;
|
|
21158
|
-
}
|
|
21159
|
-
async evaluateSelectorAsync({ unscopedSelector, terminal, parameterName }) {
|
|
21160
|
-
let selection;
|
|
21161
|
-
let projectsFilter;
|
|
21162
|
-
switch (unscopedSelector) {
|
|
21163
|
-
case 'true': {
|
|
21164
|
-
projectsFilter = {
|
|
21165
|
-
splitWorkspace: true
|
|
21166
|
-
};
|
|
21167
|
-
break;
|
|
21168
|
-
}
|
|
21169
|
-
case 'false': {
|
|
21170
|
-
projectsFilter = {
|
|
21171
|
-
splitWorkspace: false
|
|
21172
|
-
};
|
|
21173
|
-
}
|
|
21174
|
-
}
|
|
21175
|
-
if (projectsFilter) {
|
|
21176
|
-
selection = this._rushConfiguration.getFilteredProjects(projectsFilter);
|
|
21177
|
-
}
|
|
21178
|
-
if (!selection) {
|
|
21179
|
-
terminal.writeErrorLine(`The split "${unscopedSelector}" passed to "${parameterName}" is not specified for any projects in rush.json.`);
|
|
21180
|
-
throw new _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__.AlreadyReportedError();
|
|
21181
|
-
}
|
|
21182
|
-
return selection;
|
|
21183
|
-
}
|
|
21184
|
-
getCompletions() {
|
|
21185
|
-
return ['true', 'false'];
|
|
21186
|
-
}
|
|
21187
|
-
}
|
|
21188
|
-
//# sourceMappingURL=SplitWorkspaceProjectSelectorParser.js.map
|
|
21189
|
-
|
|
21190
|
-
/***/ }),
|
|
21191
|
-
|
|
21192
19619
|
/***/ 858595:
|
|
21193
19620
|
/*!****************************************************************!*\
|
|
21194
19621
|
!*** ./lib-esnext/logic/selectors/TagProjectSelectorParser.js ***!
|
|
@@ -22140,7 +20567,7 @@ class VersionMismatchFinder {
|
|
|
22140
20567
|
// Create an object for the purposes of reporting conflicts with preferredVersions from common-versions.json
|
|
22141
20568
|
// Make sure this one is first so it doesn't get truncated when a long list is printed
|
|
22142
20569
|
projects.push(new _VersionMismatchFinderCommonVersions__WEBPACK_IMPORTED_MODULE_2__.VersionMismatchFinderCommonVersions(commonVersions));
|
|
22143
|
-
for (const project of rushConfiguration.
|
|
20570
|
+
for (const project of rushConfiguration.projects) {
|
|
22144
20571
|
projects.push(new _VersionMismatchFinderProject__WEBPACK_IMPORTED_MODULE_3__.VersionMismatchFinderProject(project));
|
|
22145
20572
|
}
|
|
22146
20573
|
return new VersionMismatchFinder(projects, commonVersions.allowedAlternativeVersions);
|
|
@@ -22412,15 +20839,11 @@ class VersionMismatchFinderProject extends _VersionMismatchFinderEntity__WEBPACK
|
|
|
22412
20839
|
skipRushCheck: project.skipRushCheck
|
|
22413
20840
|
});
|
|
22414
20841
|
this._fileManager = project.packageJsonEditor;
|
|
22415
|
-
this._project = project;
|
|
22416
20842
|
this.packageName = project.packageName;
|
|
22417
20843
|
}
|
|
22418
20844
|
get filePath() {
|
|
22419
20845
|
return this._fileManager.filePath;
|
|
22420
20846
|
}
|
|
22421
|
-
get project() {
|
|
22422
|
-
return this._project;
|
|
22423
|
-
}
|
|
22424
20847
|
get allDependencies() {
|
|
22425
20848
|
return [...this._fileManager.dependencyList, ...this._fileManager.devDependencyList];
|
|
22426
20849
|
}
|
|
@@ -22699,14 +21122,6 @@ class PhasedCommandHooks {
|
|
|
22699
21122
|
* Hook is series for stable output.
|
|
22700
21123
|
*/
|
|
22701
21124
|
this.afterExecuteOperations = new tapable__WEBPACK_IMPORTED_MODULE_0__.AsyncSeriesHook(['results', 'context']);
|
|
22702
|
-
/**
|
|
22703
|
-
* Hook invoked before executing a operation.
|
|
22704
|
-
*/
|
|
22705
|
-
this.beforeExecuteOperation = new tapable__WEBPACK_IMPORTED_MODULE_0__.AsyncSeriesHook(['runnerContext'], 'beforeExecuteOperation');
|
|
22706
|
-
/**
|
|
22707
|
-
* Hook invoked after executing a operation.
|
|
22708
|
-
*/
|
|
22709
|
-
this.afterExecuteOperation = new tapable__WEBPACK_IMPORTED_MODULE_0__.AsyncSeriesHook(['runnerContext'], 'afterExecuteOperation');
|
|
22710
21125
|
/**
|
|
22711
21126
|
* Hook invoked after a run has finished and the command is watching for changes.
|
|
22712
21127
|
* May be used to display additional relevant data to the user.
|
|
@@ -23326,7 +21741,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23326
21741
|
class RushSession {
|
|
23327
21742
|
constructor(options) {
|
|
23328
21743
|
this._cloudBuildCacheProviderFactories = new Map();
|
|
23329
|
-
this._cobuildLockProviderFactories = new Map();
|
|
23330
21744
|
this._options = options;
|
|
23331
21745
|
this.hooks = new _RushLifeCycle__WEBPACK_IMPORTED_MODULE_1__.RushLifecycleHooks();
|
|
23332
21746
|
}
|
|
@@ -23354,15 +21768,6 @@ class RushSession {
|
|
|
23354
21768
|
getCloudBuildCacheProviderFactory(cacheProviderName) {
|
|
23355
21769
|
return this._cloudBuildCacheProviderFactories.get(cacheProviderName);
|
|
23356
21770
|
}
|
|
23357
|
-
registerCobuildLockProviderFactory(cobuildLockProviderName, factory) {
|
|
23358
|
-
if (this._cobuildLockProviderFactories.has(cobuildLockProviderName)) {
|
|
23359
|
-
throw new Error(`A cobuild lock provider factory for ${cobuildLockProviderName} has already been registered`);
|
|
23360
|
-
}
|
|
23361
|
-
this._cobuildLockProviderFactories.set(cobuildLockProviderName, factory);
|
|
23362
|
-
}
|
|
23363
|
-
getCobuildLockProviderFactory(cobuildLockProviderName) {
|
|
23364
|
-
return this._cobuildLockProviderFactories.get(cobuildLockProviderName);
|
|
23365
|
-
}
|
|
23366
21771
|
}
|
|
23367
21772
|
//# sourceMappingURL=RushSession.js.map
|
|
23368
21773
|
|
|
@@ -23816,7 +22221,6 @@ class OverlappingPathAnalyzer {
|
|
|
23816
22221
|
__webpack_require__.r(__webpack_exports__);
|
|
23817
22222
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23818
22223
|
/* harmony export */ "assetsFolderPath": () => (/* binding */ assetsFolderPath),
|
|
23819
|
-
/* harmony export */ "createLinksScriptFilename": () => (/* binding */ createLinksScriptFilename),
|
|
23820
22224
|
/* harmony export */ "installRunRushPnpmScriptFilename": () => (/* binding */ installRunRushPnpmScriptFilename),
|
|
23821
22225
|
/* harmony export */ "installRunRushScriptFilename": () => (/* binding */ installRunRushScriptFilename),
|
|
23822
22226
|
/* harmony export */ "installRunRushxScriptFilename": () => (/* binding */ installRunRushxScriptFilename),
|
|
@@ -23824,8 +22228,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23824
22228
|
/* harmony export */ "pnpmfileShimFilename": () => (/* binding */ pnpmfileShimFilename),
|
|
23825
22229
|
/* harmony export */ "rushLibFolderRootPath": () => (/* binding */ rushLibFolderRootPath),
|
|
23826
22230
|
/* harmony export */ "scriptsFolderName": () => (/* binding */ scriptsFolderName),
|
|
23827
|
-
/* harmony export */ "scriptsFolderPath": () => (/* binding */ scriptsFolderPath)
|
|
23828
|
-
/* harmony export */ "splitWorkspacePnpmfileShimFilename": () => (/* binding */ splitWorkspacePnpmfileShimFilename)
|
|
22231
|
+
/* harmony export */ "scriptsFolderPath": () => (/* binding */ scriptsFolderPath)
|
|
23829
22232
|
/* harmony export */ });
|
|
23830
22233
|
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @rushstack/node-core-library */ 132939);
|
|
23831
22234
|
/* harmony import */ var _rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_rushstack_node_core_library__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -23845,12 +22248,10 @@ const assetsFolderPath = `${rushLibFolderRootPath}/assets`;
|
|
|
23845
22248
|
*/
|
|
23846
22249
|
const scriptsFolderName = 'scripts';
|
|
23847
22250
|
const pnpmfileShimFilename = 'PnpmfileShim.js';
|
|
23848
|
-
const splitWorkspacePnpmfileShimFilename = 'SplitWorkspaceGlobalPnpmfileShim.js';
|
|
23849
22251
|
const installRunScriptFilename = 'install-run.js';
|
|
23850
22252
|
const installRunRushScriptFilename = 'install-run-rush.js';
|
|
23851
22253
|
const installRunRushxScriptFilename = 'install-run-rushx.js';
|
|
23852
22254
|
const installRunRushPnpmScriptFilename = 'install-run-rush-pnpm.js';
|
|
23853
|
-
const createLinksScriptFilename = 'create-links.js';
|
|
23854
22255
|
/**
|
|
23855
22256
|
* The path to the scripts folder in rush-lib/dist.
|
|
23856
22257
|
*/
|
|
@@ -24840,18 +23241,11 @@ function _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath) {
|
|
|
24840
23241
|
* @returns
|
|
24841
23242
|
* The text of the the synced .npmrc, if one exists. If one does not exist, then undefined is returned.
|
|
24842
23243
|
*/
|
|
24843
|
-
function syncNpmrc(sourceNpmrcFolder, targetNpmrcFolder, useNpmrcPublish,
|
|
23244
|
+
function syncNpmrc(sourceNpmrcFolder, targetNpmrcFolder, useNpmrcPublish, logger = {
|
|
24844
23245
|
info: console.log,
|
|
24845
23246
|
error: console.error
|
|
24846
23247
|
}) {
|
|
24847
|
-
|
|
24848
|
-
if (useNpmrcPublish) {
|
|
24849
|
-
resolvedSourceNpmrcFilename = '.npmrc-publish';
|
|
24850
|
-
}
|
|
24851
|
-
if (sourceNpmrcFilename) {
|
|
24852
|
-
resolvedSourceNpmrcFilename = sourceNpmrcFilename;
|
|
24853
|
-
}
|
|
24854
|
-
const sourceNpmrcPath = path__WEBPACK_IMPORTED_MODULE_1__.join(sourceNpmrcFolder, resolvedSourceNpmrcFilename);
|
|
23248
|
+
const sourceNpmrcPath = path__WEBPACK_IMPORTED_MODULE_1__.join(sourceNpmrcFolder, !useNpmrcPublish ? '.npmrc' : '.npmrc-publish');
|
|
24855
23249
|
const targetNpmrcPath = path__WEBPACK_IMPORTED_MODULE_1__.join(targetNpmrcFolder, '.npmrc');
|
|
24856
23250
|
try {
|
|
24857
23251
|
if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath)) {
|
|
@@ -24921,16 +23315,6 @@ module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#
|
|
|
24921
23315
|
|
|
24922
23316
|
/***/ }),
|
|
24923
23317
|
|
|
24924
|
-
/***/ 222518:
|
|
24925
|
-
/*!************************************************!*\
|
|
24926
|
-
!*** ./lib-esnext/schemas/cobuild.schema.json ***!
|
|
24927
|
-
\************************************************/
|
|
24928
|
-
/***/ ((module) => {
|
|
24929
|
-
|
|
24930
|
-
module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"Configuration for Rush\'s cobuild.","description":"For use with the Rush tool, this file provides configuration options for cobuild feature. See http://rushjs.io for details.","definitions":{"anything":{"type":["array","boolean","integer","number","object","string"],"items":{"$ref":"#/definitions/anything"}}},"type":"object","allOf":[{"type":"object","additionalProperties":false,"required":["cobuildEnabled","cobuildLockProvider"],"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"},"cobuildEnabled":{"description":"Set this to true to enable the cobuild feature.","type":"boolean"},"cobuildLockProvider":{"description":"Specify the cobuild lock provider to use","type":"string"}}}]}');
|
|
24931
|
-
|
|
24932
|
-
/***/ }),
|
|
24933
|
-
|
|
24934
23318
|
/***/ 703450:
|
|
24935
23319
|
/*!*****************************************************!*\
|
|
24936
23320
|
!*** ./lib-esnext/schemas/command-line.schema.json ***!
|
|
@@ -24977,7 +23361,7 @@ module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#
|
|
|
24977
23361
|
\****************************************************/
|
|
24978
23362
|
/***/ ((module) => {
|
|
24979
23363
|
|
|
24980
|
-
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"},"
|
|
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}');
|
|
24981
23365
|
|
|
24982
23366
|
/***/ }),
|
|
24983
23367
|
|
|
@@ -25047,7 +23431,7 @@ module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#
|
|
|
25047
23431
|
\*********************************************/
|
|
25048
23432
|
/***/ ((module) => {
|
|
25049
23433
|
|
|
25050
|
-
module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"Rush main config File","description":"The main configuration file for the Rush multi-project build tool. See http://rushjs.io for details.","type":"object","definitions":{"environmentVariables":{"description":"Environment variables for the package manager","type":"object","additionalProperties":{"type":"object","properties":{"value":{"type":"string"},"override":{"type":"boolean"}},"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"},"npmVersion":{"description":"If specified, selects NPM as the package manager and specifies the deterministic version to be installed by Rush.","type":"string","pattern":"^[0-9]+\\\\.[0-9]+\\\\.[0-9a-zA-Z.+\\\\-]+$"},"pnpmVersion":{"description":"If specified, selects PNPM as the package manager and specifies the deterministic version to be installed by Rush.","type":"string","pattern":"^[0-9]+\\\\.[0-9]+\\\\.[0-9a-zA-Z.+\\\\-]+$"},"yarnVersion":{"description":"If specified, selects Yarn as the package manager and specifies the deterministic version to be installed by Rush.","type":"string","pattern":"^[0-9]+\\\\.[0-9]+\\\\.[0-9a-zA-Z.+\\\\-]+$"},"rushVersion":{"description":"The version of the Rush tool that will be used to build this repository.","type":"string","pattern":"^[0-9]+\\\\.[0-9]+\\\\.[0-9a-zA-Z.+\\\\-]+$"},"nodeSupportedVersionRange":{"description":"A node-semver expression (e.g. \\">=1.2.3 <2.0.0\\", see https://github.com/npm/node-semver) indicating which versions of Node.js can safely be used to build this repository. If omitted, no validation is performed.","type":"string"},"nodeSupportedVersionInstructions":{"description":"If specified, when a rush command fails due to an unsupported node version, this additional instructional message is printed below the failure message.","type":"string"},"suppressNodeLtsWarning":{"description":"Rush normally prints a warning if it detects a pre-LTS Node.js version. If you are testing pre-LTS versions in preparation for supporting the first LTS version, you can use this setting to disable Rush\'s warning.","type":"boolean"},"projectFolderMinDepth":{"description":"The minimum folder depth for the projectFolder field. The default value is 1, i.e. no slashes in the path name.","type":"number"},"ensureConsistentVersions":{"description":"If true, consistent version specifiers for dependencies will be enforced (i.e. \\"rush check\\" is run before some commands).","type":"boolean"},"hotfixChangeEnabled":{"description":"Allows creation of hotfix changes. This feature is experimental so it is disabled by default. If this is set, \\"rush change\\" only allows a \\"hotfix\\" change type to be specified. This change type will be used when publishing subsequent changes from the monorepo.","type":"boolean"},"npmOptions":{"description":"Options that are only used when the NPM package manager is selected.","type":"object","properties":{"environmentVariables":{"$ref":"#/definitions/environmentVariables"}},"additionalProperties":false},"pnpmOptions":{"description":"Options that are only used when the PNPM pacakge manager is selected.","type":"object","properties":{"pnpmStore":{"description":"Specifies the location of the PNPM store. There are two possible values:\\n\\n\\"local\\" - use the \\"pnpm-store\\" folder in the current configured temp folder: \\"common/temp/pnpm-store\\" by default.\\n\\"global\\" - use PNPM\'s global store, which has the benefit of being shared across multiple repo folders, but the disadvantage of less isolation for builds (e.g. bugs or incompatibilities when two repos use different releases of PNPM)\\n\\nIn all cases, the store path will be overridden by the environment variable RUSH_PNPM_STORE_PATH.\\n\\nThe default value is \\"local\\".","type":"string","enum":["local","global"]},"strictPeerDependencies":{"description":"If true, then the installation will fail if there is a missing or invalid peer dependency in the tree, which is an invalid state that can cause build failures or incompatible dependency versions. (For historical reasons, JavaScript package managers generally do not treat this invalid state as an error.) This is done via the \\"--strict-peer-dependencies\\" flag in PNPM version < 7.0.0 and via the \\"--no-strict-peer-dependencies\\" flag in PNPM >= 7.0.0. The default value is false.","type":"boolean"},"resolutionStrategy":{"description":"(Deprecated) Configures the strategy used to select versions during installation. This feature requires PNPM version 3.1 or newer. It corresponds to the \\"--resolution-strategy\\" command-line option for PNPM. Possible values are \\"fast\\" and \\"fewer-dependencies\\". PNPM\'s default is \\"fast\\", but this may be incompatible with certain packages, for example the \\"@types\\" packages from DefinitelyTyped. Rush\'s default is \\"fewer-dependencies\\", which causes PNPM to avoid installing a newer version if an already installed version can be reused; this is more similar to NPM\'s algorithm.","type":"string","enum":["fewer-dependencies","fast"]},"environmentVariables":{"$ref":"#/definitions/environmentVariables"},"preventManualShrinkwrapChanges":{"description":"If true, then \\"rush install\\" will report an error if manual modifications were made to the PNPM shrinkwrap file without running `rush update` afterwards. To temporarily disable this validation when invoking \\"rush install\\", use the \\"--bypassPolicy\\" command-line parameter. The default value is false.","type":"boolean"},"useWorkspaces":{"description":"If true, then Rush will use the workspaces feature to install and link packages when invoking PNPM. The default value is false.","type":"boolean"}},"additionalProperties":false},"yarnOptions":{"description":"Options that are only used when the Yarn pacakge manager is selected.","type":"object","properties":{"ignoreEngines":{"description":"If true, then Rush will add the \\"--ignore-engines\\" option when invoking Yarn. * This allows \\"rush install\\" to succeed if there are dependencies with engines defined in package.json which do not match the current environment. The default value is false.","type":"boolean"},"environmentVariables":{"$ref":"#/definitions/environmentVariables"}},"additionalProperties":false},"projectFolderMaxDepth":{"description":"The maximum folder depth for the projectFolder field. The default value is 2, i.e. a single slash in the path name.","type":"number"},"allowMostlyStandardPackageNames":{"description":"Today the npmjs.com registry enforces fairly strict naming rules for packages, but in the early days there was no standard and hardly any enforcement. A few large legacy projects are still using nonstandard package names, and private registries sometimes allow it. Set \\"allowMostlyStandardPackageNames\\" to true to relax Rush\'s enforcement of package names. This allows upper case letters and in the future may relax other rules, however we want to minimize these exceptions. Many popular tools use certain punctuation characters as delimiters, based on the assumption that they will never appear in a package name; thus if we relax the rules too much it is likely to cause very confusing malfunctions. The default value is false.","type":"boolean"},"approvedPackagesPolicy":{"description":"Controls a package review workflow driven by the two config files \\"browser-approved-packages.json\\" and \\"nonbrowser-approved-packages.json\\"","type":"object","properties":{"reviewCategories":{"description":"A list of category names that can be applied to each project, and then referenced in \\"browser-approved-packages.json\\" and \\"nonbrowser-approved-packages.json\\"","type":"array","items":{"type":"string"}},"ignoredNpmScopes":{"description":"A list of NPM package scopes that will be excluded from review (e.g. \\"@types\\")","type":"array","items":{"type":"string","pattern":"^@"}}},"additionalProperties":false},"gitPolicy":{"description":"If the project is stored in a Git repository, additional settings related to Git","type":"object","properties":{"allowedEmailRegExps":{"description":"A list of regular expressions describing allowable e-mail patterns for Git commits. They are case-insensitive anchored JavaScript RegExps. Example: \\".*@example\\\\.com\\"","type":"array","items":{"type":"string"}},"sampleEmail":{"description":"An example valid e-mail address for \\"Mr. Example\\" that conforms to one of the allowedEmailRegExps. Example: \\"mr-example@contoso\\\\.com\\"","type":"string"},"versionBumpCommitMessage":{"description":"The commit message to use when committing changes during \\"rush publish\\". Defaults to \\"Bump versions [skip ci]\\"","type":"string"},"changeLogUpdateCommitMessage":{"description":"The commit message to use when committing change log files \\"rush version\\". Defaults to \\"Update changelogs [skip ci]\\"","type":"string"},"changefilesCommitMessage":{"description":"The commit message to use when commiting change files made by \\"rush change\\". Defaults to \\"Rush change\\"","type":"string"},"tagSeparator":{"description":"The separator between package name and version in git tag. Defaults to \\"_\\"","type":"string"}},"additionalProperties":false},"variants":{"description":"Defines the list of installation variants for this repository. For more details about this feature, see this article: https://rushjs.io/pages/advanced/installation_variants/","type":"array","items":{"type":"object","properties":{"variantName":{"description":"The name of the variant. Maps to common/rush/variants/{name} under the repository root.","type":"string"},"description":{"description":"","type":"string"}},"required":["variantName","description"]}},"repository":{"description":"The repository location","type":"object","properties":{"url":{"type":"string","description":"The remote url of the repository. If a value is provided, \\"rush change\\" will use it to find the right remote to compare against."},"urls":{"description":"All allowed remote urls of the repository. If a value is provided, \\"rush change\\" will use one of these to find the right remote to compare against. Specifying multiple URLs is useful if a GitHub repository is renamed or for \\"<projectName>.visualstudio.com\\" vs \\"dev.azure.com/<projectName>\\" URLs.","type":"array","items":{"type":"string"}},"defaultBranch":{"description":"The default branch name. This tells \\"rush change\\" which remote branch to compare against. The default value is \\"main\\"","type":"string"},"defaultRemote":{"description":"The default remote. This tells \\"rush change\\" which remote to compare against if the remote URL is not set or if a remote matching the provided remote URL is not found.","type":"string"}},"additionalProperties":false},"telemetryEnabled":{"description":"Indicates whether telemetry data should be collected and stored in the Rush temp folder during Rush runs.","type":"boolean"},"allowedProjectTags":{"description":"This is an optional, but recommended, list of allowed tags that can be applied to Rush projects using the \\"tags\\" setting in this file. This list is useful for preventing mistakes such as misspelling, and it also provides a centralized place to document your tags. If \\"allowedProjectTags\\" list is not specified, then any valid tag is allowed. A tag name must be one or more words separated by hyphens or slashes, where a word may contain lowercase ASCII letters, digits, \\".\\", and \\"@\\" characters.","type":"array","items":{"type":"string","pattern":"^[a-z0-9.@]+([-/][a-z0-9.@]+)*$"}},"projects":{"description":"A list of projects managed by this tool.","type":"array","items":{"type":"object","properties":{"packageName":{"description":"The NPM package name of the project.","type":"string"},"projectFolder":{"description":"The path to the project folder relative to the Rush config file.","type":"string"},"reviewCategory":{"description":"An optional category for usage in the \\"browser-approved-packages.json\\" and \\"nonbrowser-approved-packages.json\\" files. Only strings from reviewCategories are allowed here.","type":"string"},"cyclicDependencyProjects":{"description":"(Deprecated) This field was renamed to \\"decoupledLocalDependencies\\".","type":"array","items":{"type":"string"}},"decoupledLocalDependencies":{"description":"A list of local projects that appear as devDependencies for this project, but cannot be locally linked because it would create a cyclic dependency; instead, the last published version will be installed in the Common folder.","type":"array","items":{"type":"string"}},"shouldPublish":{"description":"A flag indicating that changes to this project will be published to npm, which affects the Rush change and publish workflows.","type":"boolean"},"skipRushCheck":{"description":"If true, then this project will be ignored by the \\"rush check\\" command. The default value is false.","type":"boolean"},"versionPolicyName":{"description":"An optional version policy associated with the project. Version policies are defined in \\"version-policies.json\\" file.","type":"string"},"publishFolder":{"description":"Facilitates postprocessing of a project\'s files prior to publishing. If specified, the \\"publishFolder\\" is the relative path to a subfolder of the project folder. The \\"rush publish\\" command will publish the subfolder instead of the project folder. The subfolder must contain its own package.json file, which is typically a build output.","type":"string"},"tags":{"description":"An optional set of custom tags that can be used to select this project. For example, adding \\"my-custom-tag\\" will allow this project to be selected by the command \\"rush list --only tag:my-custom-tag\\". The tag name must be one or more words separated by hyphens or slashes, where a word may contain lowercase ASCII letters, digits, \\".\\", and \\"@\\" characters.","type":"array","items":{"type":"string","pattern":"^[a-z0-9.@]+([-/][a-z0-9.@]+)*$"}},"splitWorkspace":{"description":"If true, then this project will be split out into a separate workspace folder. The default value is false.","type":"boolean"}},"additionalProperties":false,"required":["packageName","projectFolder"]}},"eventHooks":{"description":"Hooks are customized script actions that Rush executes when specific events occur.","type":"object","properties":{"preRushInstall":{"description":"The list of scripts to run before the Rush installation starts.","type":"array","items":{"type":"string"}},"postRushInstall":{"description":"The list of scripts to run after the Rush installation finishes.","type":"array","items":{"type":"string"}},"preRushBuild":{"description":"The list of scripts to run before the Rush build command starts.","type":"array","items":{"type":"string"}},"postRushBuild":{"description":"The list of scripts to run after the Rush build command finishes.","type":"array","items":{"type":"string"}}},"additionalProperties":false}},"additionalProperties":false,"required":["rushVersion","projects"]}');
|
|
23434
|
+
module.exports = JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"Rush main config File","description":"The main configuration file for the Rush multi-project build tool. See http://rushjs.io for details.","type":"object","definitions":{"environmentVariables":{"description":"Environment variables for the package manager","type":"object","additionalProperties":{"type":"object","properties":{"value":{"type":"string"},"override":{"type":"boolean"}},"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"},"npmVersion":{"description":"If specified, selects NPM as the package manager and specifies the deterministic version to be installed by Rush.","type":"string","pattern":"^[0-9]+\\\\.[0-9]+\\\\.[0-9a-zA-Z.+\\\\-]+$"},"pnpmVersion":{"description":"If specified, selects PNPM as the package manager and specifies the deterministic version to be installed by Rush.","type":"string","pattern":"^[0-9]+\\\\.[0-9]+\\\\.[0-9a-zA-Z.+\\\\-]+$"},"yarnVersion":{"description":"If specified, selects Yarn as the package manager and specifies the deterministic version to be installed by Rush.","type":"string","pattern":"^[0-9]+\\\\.[0-9]+\\\\.[0-9a-zA-Z.+\\\\-]+$"},"rushVersion":{"description":"The version of the Rush tool that will be used to build this repository.","type":"string","pattern":"^[0-9]+\\\\.[0-9]+\\\\.[0-9a-zA-Z.+\\\\-]+$"},"nodeSupportedVersionRange":{"description":"A node-semver expression (e.g. \\">=1.2.3 <2.0.0\\", see https://github.com/npm/node-semver) indicating which versions of Node.js can safely be used to build this repository. If omitted, no validation is performed.","type":"string"},"nodeSupportedVersionInstructions":{"description":"If specified, when a rush command fails due to an unsupported node version, this additional instructional message is printed below the failure message.","type":"string"},"suppressNodeLtsWarning":{"description":"Rush normally prints a warning if it detects a pre-LTS Node.js version. If you are testing pre-LTS versions in preparation for supporting the first LTS version, you can use this setting to disable Rush\'s warning.","type":"boolean"},"projectFolderMinDepth":{"description":"The minimum folder depth for the projectFolder field. The default value is 1, i.e. no slashes in the path name.","type":"number"},"ensureConsistentVersions":{"description":"If true, consistent version specifiers for dependencies will be enforced (i.e. \\"rush check\\" is run before some commands).","type":"boolean"},"hotfixChangeEnabled":{"description":"Allows creation of hotfix changes. This feature is experimental so it is disabled by default. If this is set, \\"rush change\\" only allows a \\"hotfix\\" change type to be specified. This change type will be used when publishing subsequent changes from the monorepo.","type":"boolean"},"npmOptions":{"description":"Options that are only used when the NPM package manager is selected.","type":"object","properties":{"environmentVariables":{"$ref":"#/definitions/environmentVariables"}},"additionalProperties":false},"pnpmOptions":{"description":"Options that are only used when the PNPM pacakge manager is selected.","type":"object","properties":{"pnpmStore":{"description":"Specifies the location of the PNPM store. There are two possible values:\\n\\n\\"local\\" - use the \\"pnpm-store\\" folder in the current configured temp folder: \\"common/temp/pnpm-store\\" by default.\\n\\"global\\" - use PNPM\'s global store, which has the benefit of being shared across multiple repo folders, but the disadvantage of less isolation for builds (e.g. bugs or incompatibilities when two repos use different releases of PNPM)\\n\\nIn all cases, the store path will be overridden by the environment variable RUSH_PNPM_STORE_PATH.\\n\\nThe default value is \\"local\\".","type":"string","enum":["local","global"]},"strictPeerDependencies":{"description":"If true, then the installation will fail if there is a missing or invalid peer dependency in the tree, which is an invalid state that can cause build failures or incompatible dependency versions. (For historical reasons, JavaScript package managers generally do not treat this invalid state as an error.) This is done via the \\"--strict-peer-dependencies\\" flag in PNPM version < 7.0.0 and via the \\"--no-strict-peer-dependencies\\" flag in PNPM >= 7.0.0. The default value is false.","type":"boolean"},"resolutionStrategy":{"description":"(Deprecated) Configures the strategy used to select versions during installation. This feature requires PNPM version 3.1 or newer. It corresponds to the \\"--resolution-strategy\\" command-line option for PNPM. Possible values are \\"fast\\" and \\"fewer-dependencies\\". PNPM\'s default is \\"fast\\", but this may be incompatible with certain packages, for example the \\"@types\\" packages from DefinitelyTyped. Rush\'s default is \\"fewer-dependencies\\", which causes PNPM to avoid installing a newer version if an already installed version can be reused; this is more similar to NPM\'s algorithm.","type":"string","enum":["fewer-dependencies","fast"]},"environmentVariables":{"$ref":"#/definitions/environmentVariables"},"preventManualShrinkwrapChanges":{"description":"If true, then \\"rush install\\" will report an error if manual modifications were made to the PNPM shrinkwrap file without running `rush update` afterwards. To temporarily disable this validation when invoking \\"rush install\\", use the \\"--bypassPolicy\\" command-line parameter. The default value is false.","type":"boolean"},"useWorkspaces":{"description":"If true, then Rush will use the workspaces feature to install and link packages when invoking PNPM. The default value is false.","type":"boolean"}},"additionalProperties":false},"yarnOptions":{"description":"Options that are only used when the Yarn pacakge manager is selected.","type":"object","properties":{"ignoreEngines":{"description":"If true, then Rush will add the \\"--ignore-engines\\" option when invoking Yarn. * This allows \\"rush install\\" to succeed if there are dependencies with engines defined in package.json which do not match the current environment. The default value is false.","type":"boolean"},"environmentVariables":{"$ref":"#/definitions/environmentVariables"}},"additionalProperties":false},"projectFolderMaxDepth":{"description":"The maximum folder depth for the projectFolder field. The default value is 2, i.e. a single slash in the path name.","type":"number"},"allowMostlyStandardPackageNames":{"description":"Today the npmjs.com registry enforces fairly strict naming rules for packages, but in the early days there was no standard and hardly any enforcement. A few large legacy projects are still using nonstandard package names, and private registries sometimes allow it. Set \\"allowMostlyStandardPackageNames\\" to true to relax Rush\'s enforcement of package names. This allows upper case letters and in the future may relax other rules, however we want to minimize these exceptions. Many popular tools use certain punctuation characters as delimiters, based on the assumption that they will never appear in a package name; thus if we relax the rules too much it is likely to cause very confusing malfunctions. The default value is false.","type":"boolean"},"approvedPackagesPolicy":{"description":"Controls a package review workflow driven by the two config files \\"browser-approved-packages.json\\" and \\"nonbrowser-approved-packages.json\\"","type":"object","properties":{"reviewCategories":{"description":"A list of category names that can be applied to each project, and then referenced in \\"browser-approved-packages.json\\" and \\"nonbrowser-approved-packages.json\\"","type":"array","items":{"type":"string"}},"ignoredNpmScopes":{"description":"A list of NPM package scopes that will be excluded from review (e.g. \\"@types\\")","type":"array","items":{"type":"string","pattern":"^@"}}},"additionalProperties":false},"gitPolicy":{"description":"If the project is stored in a Git repository, additional settings related to Git","type":"object","properties":{"allowedEmailRegExps":{"description":"A list of regular expressions describing allowable e-mail patterns for Git commits. They are case-insensitive anchored JavaScript RegExps. Example: \\".*@example\\\\.com\\"","type":"array","items":{"type":"string"}},"sampleEmail":{"description":"An example valid e-mail address for \\"Mr. Example\\" that conforms to one of the allowedEmailRegExps. Example: \\"mr-example@contoso\\\\.com\\"","type":"string"},"versionBumpCommitMessage":{"description":"The commit message to use when committing changes during \\"rush publish\\". Defaults to \\"Bump versions [skip ci]\\"","type":"string"},"changeLogUpdateCommitMessage":{"description":"The commit message to use when committing change log files \\"rush version\\". Defaults to \\"Update changelogs [skip ci]\\"","type":"string"},"changefilesCommitMessage":{"description":"The commit message to use when commiting change files made by \\"rush change\\". Defaults to \\"Rush change\\"","type":"string"},"tagSeparator":{"description":"The separator between package name and version in git tag. Defaults to \\"_\\"","type":"string"}},"additionalProperties":false},"variants":{"description":"Defines the list of installation variants for this repository. For more details about this feature, see this article: https://rushjs.io/pages/advanced/installation_variants/","type":"array","items":{"type":"object","properties":{"variantName":{"description":"The name of the variant. Maps to common/rush/variants/{name} under the repository root.","type":"string"},"description":{"description":"","type":"string"}},"required":["variantName","description"]}},"repository":{"description":"The repository location","type":"object","properties":{"url":{"type":"string","description":"The remote url of the repository. If a value is provided, \\"rush change\\" will use it to find the right remote to compare against."},"urls":{"description":"All allowed remote urls of the repository. If a value is provided, \\"rush change\\" will use one of these to find the right remote to compare against. Specifying multiple URLs is useful if a GitHub repository is renamed or for \\"<projectName>.visualstudio.com\\" vs \\"dev.azure.com/<projectName>\\" URLs.","type":"array","items":{"type":"string"}},"defaultBranch":{"description":"The default branch name. This tells \\"rush change\\" which remote branch to compare against. The default value is \\"main\\"","type":"string"},"defaultRemote":{"description":"The default remote. This tells \\"rush change\\" which remote to compare against if the remote URL is not set or if a remote matching the provided remote URL is not found.","type":"string"}},"additionalProperties":false},"telemetryEnabled":{"description":"Indicates whether telemetry data should be collected and stored in the Rush temp folder during Rush runs.","type":"boolean"},"allowedProjectTags":{"description":"This is an optional, but recommended, list of allowed tags that can be applied to Rush projects using the \\"tags\\" setting in this file. This list is useful for preventing mistakes such as misspelling, and it also provides a centralized place to document your tags. If \\"allowedProjectTags\\" list is not specified, then any valid tag is allowed. A tag name must be one or more words separated by hyphens or slashes, where a word may contain lowercase ASCII letters, digits, \\".\\", and \\"@\\" characters.","type":"array","items":{"type":"string","pattern":"^[a-z0-9.@]+([-/][a-z0-9.@]+)*$"}},"projects":{"description":"A list of projects managed by this tool.","type":"array","items":{"type":"object","properties":{"packageName":{"description":"The NPM package name of the project.","type":"string"},"projectFolder":{"description":"The path to the project folder relative to the Rush config file.","type":"string"},"reviewCategory":{"description":"An optional category for usage in the \\"browser-approved-packages.json\\" and \\"nonbrowser-approved-packages.json\\" files. Only strings from reviewCategories are allowed here.","type":"string"},"cyclicDependencyProjects":{"description":"(Deprecated) This field was renamed to \\"decoupledLocalDependencies\\".","type":"array","items":{"type":"string"}},"decoupledLocalDependencies":{"description":"A list of local projects that appear as devDependencies for this project, but cannot be locally linked because it would create a cyclic dependency; instead, the last published version will be installed in the Common folder.","type":"array","items":{"type":"string"}},"shouldPublish":{"description":"A flag indicating that changes to this project will be published to npm, which affects the Rush change and publish workflows.","type":"boolean"},"skipRushCheck":{"description":"If true, then this project will be ignored by the \\"rush check\\" command. The default value is false.","type":"boolean"},"versionPolicyName":{"description":"An optional version policy associated with the project. Version policies are defined in \\"version-policies.json\\" file.","type":"string"},"publishFolder":{"description":"Facilitates postprocessing of a project\'s files prior to publishing. If specified, the \\"publishFolder\\" is the relative path to a subfolder of the project folder. The \\"rush publish\\" command will publish the subfolder instead of the project folder. The subfolder must contain its own package.json file, which is typically a build output.","type":"string"},"tags":{"description":"An optional set of custom tags that can be used to select this project. For example, adding \\"my-custom-tag\\" will allow this project to be selected by the command \\"rush list --only tag:my-custom-tag\\". The tag name must be one or more words separated by hyphens or slashes, where a word may contain lowercase ASCII letters, digits, \\".\\", and \\"@\\" characters.","type":"array","items":{"type":"string","pattern":"^[a-z0-9.@]+([-/][a-z0-9.@]+)*$"}}},"additionalProperties":false,"required":["packageName","projectFolder"]}},"eventHooks":{"description":"Hooks are customized script actions that Rush executes when specific events occur.","type":"object","properties":{"preRushInstall":{"description":"The list of scripts to run before the Rush installation starts.","type":"array","items":{"type":"string"}},"postRushInstall":{"description":"The list of scripts to run after the Rush installation finishes.","type":"array","items":{"type":"string"}},"preRushBuild":{"description":"The list of scripts to run before the Rush build command starts.","type":"array","items":{"type":"string"}},"postRushBuild":{"description":"The list of scripts to run after the Rush build command finishes.","type":"array","items":{"type":"string"}}},"additionalProperties":false}},"additionalProperties":false,"required":["rushVersion","projects"]}');
|
|
25051
23435
|
|
|
25052
23436
|
/***/ }),
|
|
25053
23437
|
|