@rushstack/rush-sdk 5.166.0 → 5.167.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rush-lib.d.ts +4 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/logic/pnpm/PnpmOptionsConfiguration.d.ts +4 -0
- package/lib/utilities/Utilities.d.ts +7 -1
- package/lib/utilities/npmrcUtilities.d.ts +5 -2
- package/lib-shim/index.js +39 -33
- package/lib-shim/index.js.map +1 -1
- package/lib-shim/loader.js +18 -12
- package/lib-shim/loader.js.map +1 -1
- package/package.json +11 -11
package/dist/rush-lib.d.ts
CHANGED
|
@@ -3592,6 +3592,10 @@ export declare class PnpmOptionsConfiguration extends PackageManagerOptionsConfi
|
|
|
3592
3592
|
* Updates patchedDependencies field of the PNPM options in the common/config/rush/pnpm-config.json file.
|
|
3593
3593
|
*/
|
|
3594
3594
|
updateGlobalPatchedDependencies(patchedDependencies: Record<string, string> | undefined): void;
|
|
3595
|
+
/**
|
|
3596
|
+
* Updates globalOnlyBuiltDependencies field of the PNPM options in the common/config/rush/pnpm-config.json file.
|
|
3597
|
+
*/
|
|
3598
|
+
updateGlobalOnlyBuiltDependencies(onlyBuiltDependencies: string[] | undefined): void;
|
|
3595
3599
|
}
|
|
3596
3600
|
|
|
3597
3601
|
/**
|
package/dist/tsdoc-metadata.json
CHANGED
|
@@ -427,5 +427,9 @@ export declare class PnpmOptionsConfiguration extends PackageManagerOptionsConfi
|
|
|
427
427
|
* Updates patchedDependencies field of the PNPM options in the common/config/rush/pnpm-config.json file.
|
|
428
428
|
*/
|
|
429
429
|
updateGlobalPatchedDependencies(patchedDependencies: Record<string, string> | undefined): void;
|
|
430
|
+
/**
|
|
431
|
+
* Updates globalOnlyBuiltDependencies field of the PNPM options in the common/config/rush/pnpm-config.json file.
|
|
432
|
+
*/
|
|
433
|
+
updateGlobalOnlyBuiltDependencies(onlyBuiltDependencies: string[] | undefined): void;
|
|
430
434
|
}
|
|
431
435
|
//# sourceMappingURL=PnpmOptionsConfiguration.d.ts.map
|
|
@@ -34,6 +34,12 @@ export interface IInstallPackageInDirectoryOptions {
|
|
|
34
34
|
maxInstallAttempts: number;
|
|
35
35
|
commonRushConfigFolder: string | undefined;
|
|
36
36
|
suppressOutput?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Whether to filter npm-incompatible properties from .npmrc.
|
|
39
|
+
* This should be true when the .npmrc is configured for a different package manager (pnpm/yarn)
|
|
40
|
+
* but npm is being used to install packages.
|
|
41
|
+
*/
|
|
42
|
+
filterNpmIncompatibleProperties?: boolean;
|
|
37
43
|
}
|
|
38
44
|
export interface ILifecycleCommandOptions {
|
|
39
45
|
/**
|
|
@@ -159,7 +165,7 @@ export declare class Utilities {
|
|
|
159
165
|
/**
|
|
160
166
|
* Installs a package by name and version in the specified directory.
|
|
161
167
|
*/
|
|
162
|
-
static installPackageInDirectoryAsync({ packageName, version, tempPackageTitle, commonRushConfigFolder, maxInstallAttempts, suppressOutput, directory }: IInstallPackageInDirectoryOptions): Promise<void>;
|
|
168
|
+
static installPackageInDirectoryAsync({ packageName, version, tempPackageTitle, commonRushConfigFolder, maxInstallAttempts, suppressOutput, directory, filterNpmIncompatibleProperties }: IInstallPackageInDirectoryOptions): Promise<void>;
|
|
163
169
|
/**
|
|
164
170
|
* Copies the file "sourcePath" to "destinationPath", overwriting the target file location.
|
|
165
171
|
* If the source file does not exist, then the target file is deleted.
|
|
@@ -7,9 +7,10 @@ export interface ILogger {
|
|
|
7
7
|
* @param npmrcFileLines The npmrc file's lines
|
|
8
8
|
* @param env The environment variables object
|
|
9
9
|
* @param supportEnvVarFallbackSyntax Whether to support fallback values in the form of `${VAR_NAME:-fallback}`
|
|
10
|
-
* @
|
|
10
|
+
* @param filterNpmIncompatibleProperties Whether to filter out properties that npm doesn't understand
|
|
11
|
+
* @returns An array of processed npmrc file lines with undefined environment variables and npm-incompatible properties commented out
|
|
11
12
|
*/
|
|
12
|
-
export declare function trimNpmrcFileLines(npmrcFileLines: string[], env: NodeJS.ProcessEnv, supportEnvVarFallbackSyntax: boolean): string[];
|
|
13
|
+
export declare function trimNpmrcFileLines(npmrcFileLines: string[], env: NodeJS.ProcessEnv, supportEnvVarFallbackSyntax: boolean, filterNpmIncompatibleProperties?: boolean): string[];
|
|
13
14
|
/**
|
|
14
15
|
* syncNpmrc() copies the .npmrc file to the target folder, and also trims unusable lines from the .npmrc file.
|
|
15
16
|
* If the source .npmrc file not exist, then syncNpmrc() will delete an .npmrc that is found in the target folder.
|
|
@@ -28,6 +29,8 @@ export interface ISyncNpmrcOptions {
|
|
|
28
29
|
linesToPrepend?: string[];
|
|
29
30
|
linesToAppend?: string[];
|
|
30
31
|
createIfMissing?: boolean;
|
|
32
|
+
filterNpmIncompatibleProperties?: boolean;
|
|
33
|
+
env?: NodeJS.ProcessEnv;
|
|
31
34
|
}
|
|
32
35
|
export declare function syncNpmrc(options: ISyncNpmrcOptions): string | undefined;
|
|
33
36
|
export declare function isVariableSetInNpmrcFile(sourceNpmrcFolder: string, variableKey: string, supportEnvVarFallbackSyntax: boolean): boolean;
|
package/lib-shim/index.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
/******/ "use strict";
|
|
3
3
|
/******/ var __webpack_modules__ = ({
|
|
4
4
|
|
|
5
|
-
/***/ "../../common/temp/default/node_modules/.pnpm/true-case-path@2.2.1/node_modules/true-case-path/index.js"
|
|
5
|
+
/***/ "../../common/temp/default/node_modules/.pnpm/true-case-path@2.2.1/node_modules/true-case-path/index.js"
|
|
6
6
|
/*!**************************************************************************************************************!*\
|
|
7
7
|
!*** ../../common/temp/default/node_modules/.pnpm/true-case-path@2.2.1/node_modules/true-case-path/index.js ***!
|
|
8
8
|
\**************************************************************************************************************/
|
|
9
|
-
|
|
9
|
+
(module, __unused_webpack_exports, __webpack_require__) {
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -104,13 +104,13 @@ async function iterateAsync(basePath, filePath, segments) {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
|
|
107
|
-
/***/ }
|
|
107
|
+
/***/ },
|
|
108
108
|
|
|
109
|
-
/***/ "../rush-lib/lib-esnext/api/RushGlobalFolder.js"
|
|
109
|
+
/***/ "../rush-lib/lib-esnext/api/RushGlobalFolder.js"
|
|
110
110
|
/*!******************************************************************!*\
|
|
111
111
|
!*** ../rush-lib/lib-esnext/api/RushGlobalFolder.js + 2 modules ***!
|
|
112
112
|
\******************************************************************/
|
|
113
|
-
|
|
113
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
114
114
|
|
|
115
115
|
// ESM COMPAT FLAG
|
|
116
116
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -768,13 +768,13 @@ class RushGlobalFolder {
|
|
|
768
768
|
}
|
|
769
769
|
//# sourceMappingURL=RushGlobalFolder.js.map
|
|
770
770
|
|
|
771
|
-
/***/ }
|
|
771
|
+
/***/ },
|
|
772
772
|
|
|
773
|
-
/***/ "./lib-commonjs/helpers.js"
|
|
773
|
+
/***/ "./lib-commonjs/helpers.js"
|
|
774
774
|
/*!*********************************!*\
|
|
775
775
|
!*** ./lib-commonjs/helpers.js ***!
|
|
776
776
|
\*********************************/
|
|
777
|
-
|
|
777
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
778
778
|
|
|
779
779
|
|
|
780
780
|
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
@@ -870,13 +870,13 @@ function requireRushLibUnderFolderPath(folderPath) {
|
|
|
870
870
|
}
|
|
871
871
|
//# sourceMappingURL=helpers.js.map
|
|
872
872
|
|
|
873
|
-
/***/ }
|
|
873
|
+
/***/ },
|
|
874
874
|
|
|
875
|
-
/***/ "./lib-commonjs/index.js"
|
|
875
|
+
/***/ "./lib-commonjs/index.js"
|
|
876
876
|
/*!*******************************!*\
|
|
877
877
|
!*** ./lib-commonjs/index.js ***!
|
|
878
878
|
\*******************************/
|
|
879
|
-
|
|
879
|
+
(module, exports, __webpack_require__) {
|
|
880
880
|
|
|
881
881
|
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
882
882
|
|
|
@@ -1096,77 +1096,77 @@ function _rushSdk_loadInternalModule(srcImportPath) {
|
|
|
1096
1096
|
}
|
|
1097
1097
|
//# sourceMappingURL=index.js.map
|
|
1098
1098
|
|
|
1099
|
-
/***/ }
|
|
1099
|
+
/***/ },
|
|
1100
1100
|
|
|
1101
|
-
/***/ "@rushstack/node-core-library"
|
|
1101
|
+
/***/ "@rushstack/node-core-library"
|
|
1102
1102
|
/*!***********************************************!*\
|
|
1103
1103
|
!*** external "@rushstack/node-core-library" ***!
|
|
1104
1104
|
\***********************************************/
|
|
1105
|
-
|
|
1105
|
+
(module) {
|
|
1106
1106
|
|
|
1107
1107
|
module.exports = require("@rushstack/node-core-library");
|
|
1108
1108
|
|
|
1109
|
-
/***/ }
|
|
1109
|
+
/***/ },
|
|
1110
1110
|
|
|
1111
|
-
/***/ "@rushstack/terminal"
|
|
1111
|
+
/***/ "@rushstack/terminal"
|
|
1112
1112
|
/*!**************************************!*\
|
|
1113
1113
|
!*** external "@rushstack/terminal" ***!
|
|
1114
1114
|
\**************************************/
|
|
1115
|
-
|
|
1115
|
+
(module) {
|
|
1116
1116
|
|
|
1117
1117
|
module.exports = require("@rushstack/terminal");
|
|
1118
1118
|
|
|
1119
|
-
/***/ }
|
|
1119
|
+
/***/ },
|
|
1120
1120
|
|
|
1121
|
-
/***/ "fs"
|
|
1121
|
+
/***/ "fs"
|
|
1122
1122
|
/*!*********************!*\
|
|
1123
1123
|
!*** external "fs" ***!
|
|
1124
1124
|
\*********************/
|
|
1125
|
-
|
|
1125
|
+
(module) {
|
|
1126
1126
|
|
|
1127
1127
|
module.exports = require("fs");
|
|
1128
1128
|
|
|
1129
|
-
/***/ }
|
|
1129
|
+
/***/ },
|
|
1130
1130
|
|
|
1131
|
-
/***/ "node:path"
|
|
1131
|
+
/***/ "node:path"
|
|
1132
1132
|
/*!****************************!*\
|
|
1133
1133
|
!*** external "node:path" ***!
|
|
1134
1134
|
\****************************/
|
|
1135
|
-
|
|
1135
|
+
(module) {
|
|
1136
1136
|
|
|
1137
1137
|
module.exports = require("node:path");
|
|
1138
1138
|
|
|
1139
|
-
/***/ }
|
|
1139
|
+
/***/ },
|
|
1140
1140
|
|
|
1141
|
-
/***/ "os"
|
|
1141
|
+
/***/ "os"
|
|
1142
1142
|
/*!*********************!*\
|
|
1143
1143
|
!*** external "os" ***!
|
|
1144
1144
|
\*********************/
|
|
1145
|
-
|
|
1145
|
+
(module) {
|
|
1146
1146
|
|
|
1147
1147
|
module.exports = require("os");
|
|
1148
1148
|
|
|
1149
|
-
/***/ }
|
|
1149
|
+
/***/ },
|
|
1150
1150
|
|
|
1151
|
-
/***/ "path"
|
|
1151
|
+
/***/ "path"
|
|
1152
1152
|
/*!***********************!*\
|
|
1153
1153
|
!*** external "path" ***!
|
|
1154
1154
|
\***********************/
|
|
1155
|
-
|
|
1155
|
+
(module) {
|
|
1156
1156
|
|
|
1157
1157
|
module.exports = require("path");
|
|
1158
1158
|
|
|
1159
|
-
/***/ }
|
|
1159
|
+
/***/ },
|
|
1160
1160
|
|
|
1161
|
-
/***/ "util"
|
|
1161
|
+
/***/ "util"
|
|
1162
1162
|
/*!***********************!*\
|
|
1163
1163
|
!*** external "util" ***!
|
|
1164
1164
|
\***********************/
|
|
1165
|
-
|
|
1165
|
+
(module) {
|
|
1166
1166
|
|
|
1167
1167
|
module.exports = require("util");
|
|
1168
1168
|
|
|
1169
|
-
/***/ }
|
|
1169
|
+
/***/ }
|
|
1170
1170
|
|
|
1171
1171
|
/******/ });
|
|
1172
1172
|
/************************************************************************/
|
|
@@ -1180,6 +1180,12 @@ module.exports = require("util");
|
|
|
1180
1180
|
/******/ if (cachedModule !== undefined) {
|
|
1181
1181
|
/******/ return cachedModule.exports;
|
|
1182
1182
|
/******/ }
|
|
1183
|
+
/******/ // Check if module exists (development only)
|
|
1184
|
+
/******/ if (__webpack_modules__[moduleId] === undefined) {
|
|
1185
|
+
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
1186
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
1187
|
+
/******/ throw e;
|
|
1188
|
+
/******/ }
|
|
1183
1189
|
/******/ // Create a new module (and put it into the cache)
|
|
1184
1190
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
1185
1191
|
/******/ id: moduleId,
|
package/lib-shim/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","mappings":";;;;;;;;;;AAAY;;AAEZ,QAAQ,iCAAiC,EAAE,mBAAO,CAAC,cAAI;AACvD,QAAQ,WAAW,EAAE,mBAAO,CAAC,cAAI;AACjC,QAAQ,wBAAwB,EAAE,mBAAO,CAAC,kBAAM;AAChD,QAAQ,kBAAkB,EAAE,mBAAO,CAAC,kBAAM;;AAE1C;AACA;AACA;;AAEA;AACA,gCAAgC,aAAa;AAC7C,oCAAoC,YAAY;AAChD;;AAEA;AACA;AACA;;AAEA;AACA,+BAA+B;AAC/B;;AAEA;AACA;AACA,QAAQ,8BAA8B;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;;AAEA,yBAAyB,MAAM;AAC/B;AACA;AACA;AACA;AACA,6EAA6E,SAAS;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AC7FA;AACA;AACO;AACA;AACP;AACA;AACA;AACA,uBAAuB,4BAA4B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8C;;AClBA;AACA;AACkC;AACgB;AACW;AAC7D;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wEAAwE;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,8DAA8D;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6DAA6D;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,UAAU;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,+BAA+B;AACtF;AACA;AACA;AACA,oDAAoD,mEAAmE;AACvH,mBAAmB,yDAAyD;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,MAAM,iCAAiC,KAAK;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAAc;AACnC,2EAA2E,uBAAQ;AACnF,2BAA2B,yBAAU;AACrC;AACA;AACA,oDAAoD,uBAAQ;AAC5D;AACA;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C,oCAAoC,wBAAS;AAC7C;AACA,kDAAkD,mCAAgB;AAClE,+BAA+B,wBAAS;AACxC;AACA,8BAA8B,OAAO,EAAE,uBAAQ,CAAC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oD;;AC9kBA;AACA;AACkC;AACkB;AACkB;AACtE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE;AACA;AACA;AACA;AACA,wBAAwB,wBAAS,CAAC,uBAAI;AACtC;AACA;AACA;AACA;AACA,gCAAgC,wBAAS,oBAAoB,sBAAsB;AACnF;AACA;AACA,4C;;;;;;;;;;AC3Ba;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,GAAG,kCAAkC,GAAG,qBAAqB;AAC/E,+BAA+B;AAC/B,gBAAgB;AAChB,qCAAqC;AACrC,0BAA0B,mBAAO,CAAC,4BAAW;AAC7C,4BAA4B,mBAAO,CAAC,kEAA8B;AAClE,qBAAqB;AACrB,kCAAkC;AAClC,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAuB;AACtC;AACA;AACA;AACA;AACA,eAAe,OAAuB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,mC;;;;;;;;;;;AC5Fa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mCAAmC;AACnC,0BAA0B,mBAAO,CAAC,4BAAW;AAC7C,4BAA4B,mBAAO,CAAC,kEAA8B;AAClE,mBAAmB,mBAAO,CAAC,gDAAqB;AAChD,2BAA2B,mBAAO,CAAC,2GAAqD;AACxF,kBAAkB,mBAAO,CAAC,4CAAW;AACrC;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,yBAAyB;AAClF;AACA;AACA;AACA;AACA;AACA,gEAAgE,yBAAyB;AACzF;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,yBAAyB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,yBAAyB,mBAAmB,sCAAsC;AACnI;AACA;AACA;AACA;AACA;AACA,wDAAwD,yBAAyB,kBAAkB,qCAAqC;AACxI;AACA;AACA;AACA;AACA,gDAAgD,yBAAyB,mBAAmB,qCAAqC;AACjI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA,qDAAqD,yBAAyB;AAC9E;AACA;AACA,yDAAyD,kCAAkC,QAAQ,YAAY;AAC/G,uFAAuF,kCAAkC;AACzH;AACA;AACA;AACA,wDAAwD,yBAAyB,2BAA2B,UAAU;AACtH;AACA;AACA;AACA;AACA,gDAAgD,yBAAyB;AACzE;AACA;AACA,kDAAkD,aAAa,2CAA2C,YAAY;AACtH;AACA;AACA,6DAA6D,yBAAyB;AACtF;AACA;AACA;AACA;AACA;AACA,uDAAuD,aAAa;AACpE;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,+CAA+C,yBAAyB;AACxE;AACA;AACA,iEAAiE,yBAAyB;AAC1F;AACA;AACA;AACA;AACA,qCAAqC,+BAA+B;AACpE,2CAA2C,yBAAyB;AACpE;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sBAAsB;AAC9D;AACA;AACA;AACA,iC;;;;;;;;;;ACvNA,yD;;;;;;;;;;ACAA,gD;;;;;;;;;;ACAA,+B;;;;;;;;;;ACAA,sC;;;;;;;;;;ACAA,+B;;;;;;;;;;ACAA,iC;;;;;;;;;;ACAA,iC;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;WCNA;WACA;WACA;WACA;WACA,E;;;;;UEJA;UACA;UACA;UACA","sources":["webpack://@rushstack/rush-sdk/../../common/temp/default/node_modules/.pnpm/true-case-path@2.2.1/node_modules/true-case-path/index.js","webpack://@rushstack/rush-sdk/../rush-lib/lib-esnext/utilities/executionUtilities.js","webpack://@rushstack/rush-sdk/../rush-lib/lib-esnext/api/EnvironmentConfiguration.js","webpack://@rushstack/rush-sdk/../rush-lib/lib-esnext/api/RushGlobalFolder.js","webpack://@rushstack/rush-sdk/./lib-commonjs/helpers.js","webpack://@rushstack/rush-sdk/./lib-commonjs/index.js","webpack://@rushstack/rush-sdk/external commonjs \"@rushstack/node-core-library\"","webpack://@rushstack/rush-sdk/external commonjs \"@rushstack/terminal\"","webpack://@rushstack/rush-sdk/external node-commonjs \"fs\"","webpack://@rushstack/rush-sdk/external node-commonjs \"node:path\"","webpack://@rushstack/rush-sdk/external node-commonjs \"os\"","webpack://@rushstack/rush-sdk/external node-commonjs \"path\"","webpack://@rushstack/rush-sdk/external node-commonjs \"util\"","webpack://@rushstack/rush-sdk/webpack/bootstrap","webpack://@rushstack/rush-sdk/webpack/runtime/define property getters","webpack://@rushstack/rush-sdk/webpack/runtime/hasOwnProperty shorthand","webpack://@rushstack/rush-sdk/webpack/runtime/make namespace object","webpack://@rushstack/rush-sdk/webpack/runtime/node module decorator","webpack://@rushstack/rush-sdk/webpack/before-startup","webpack://@rushstack/rush-sdk/webpack/startup","webpack://@rushstack/rush-sdk/webpack/after-startup"],"sourcesContent":["'use strict'\n\nconst { readdir: _readdir, readdirSync } = require('fs')\nconst { platform } = require('os')\nconst { isAbsolute, normalize } = require('path')\nconst { promisify: pify } = require('util')\n\nconst readdir = pify(_readdir)\nconst isWindows = platform() === 'win32'\nconst delimiter = isWindows ? '\\\\' : '/'\n\nmodule.exports = {\n trueCasePath: _trueCasePath({ sync: false }),\n trueCasePathSync: _trueCasePath({ sync: true })\n}\n\nfunction getRelevantFilePathSegments(filePath) {\n return filePath.split(delimiter).filter((s) => s !== '')\n}\n\nfunction escapeString(str) {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n}\n\nfunction matchCaseInsensitive(fileOrDirectory, directoryContents, filePath) {\n const caseInsensitiveRegex = new RegExp(\n `^${escapeString(fileOrDirectory)}$`,\n 'i'\n )\n for (const file of directoryContents) {\n if (caseInsensitiveRegex.test(file)) return file\n }\n throw new Error(\n `[true-case-path]: Called with ${filePath}, but no matching file exists`\n )\n}\n\nfunction _trueCasePath({ sync }) {\n return (filePath, basePath) => {\n if (basePath) {\n if (!isAbsolute(basePath)) {\n throw new Error(\n `[true-case-path]: basePath argument must be absolute. Received \"${basePath}\"`\n )\n }\n basePath = normalize(basePath)\n }\n filePath = normalize(filePath)\n const segments = getRelevantFilePathSegments(filePath)\n if (isAbsolute(filePath)) {\n if (basePath) {\n throw new Error(\n '[true-case-path]: filePath must be relative when used with basePath'\n )\n }\n basePath = isWindows\n ? segments.shift().toUpperCase() // drive letter\n : ''\n } else if (!basePath) {\n basePath = process.cwd()\n }\n return sync\n ? iterateSync(basePath, filePath, segments)\n : iterateAsync(basePath, filePath, segments)\n }\n}\n\nfunction iterateSync(basePath, filePath, segments) {\n return segments.reduce(\n (realPath, fileOrDirectory) =>\n realPath +\n delimiter +\n matchCaseInsensitive(\n fileOrDirectory,\n readdirSync(realPath + delimiter),\n filePath\n ),\n basePath\n )\n}\n\nasync function iterateAsync(basePath, filePath, segments) {\n return await segments.reduce(\n async (realPathPromise, fileOrDirectory) =>\n (await realPathPromise) +\n delimiter +\n matchCaseInsensitive(\n fileOrDirectory,\n await readdir((await realPathPromise) + delimiter),\n filePath\n ),\n basePath\n )\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nexport const IS_WINDOWS = process.platform === 'win32';\nexport function escapeArgumentIfNeeded(command, isWindows = IS_WINDOWS) {\n if (command.includes(' ')) {\n if (isWindows) {\n // Windows: use double quotes and escape internal double quotes\n return `\"${command.replace(/\"/g, '\"\"')}\"`;\n }\n else {\n // Unix: use JSON.stringify for proper escaping\n return JSON.stringify(command);\n }\n }\n else {\n return command;\n }\n}\n//# sourceMappingURL=executionUtilities.js.map","// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nimport * as path from 'node:path';\nimport { trueCasePathSync } from 'true-case-path';\nimport { IS_WINDOWS } from '../utilities/executionUtilities';\n/**\n * Names of environment variables used by Rush.\n * @beta\n */\n// eslint-disable-next-line @typescript-eslint/typedef\nexport const EnvironmentVariableNames = {\n /**\n * This variable overrides the temporary folder used by Rush.\n * The default value is \"common/temp\" under the repository root.\n *\n * @remarks This environment variable is not compatible with workspace installs. If attempting\n * to move the PNPM store path, see the `RUSH_PNPM_STORE_PATH` environment variable.\n */\n RUSH_TEMP_FOLDER: 'RUSH_TEMP_FOLDER',\n /**\n * This variable overrides the version of Rush that will be installed by\n * the version selector. The default value is determined by the \"rushVersion\"\n * field from rush.json.\n */\n RUSH_PREVIEW_VERSION: 'RUSH_PREVIEW_VERSION',\n /**\n * If this variable is set to \"1\", Rush will not fail the build when running a version\n * of Node that does not match the criteria specified in the \"nodeSupportedVersionRange\"\n * field from rush.json.\n */\n RUSH_ALLOW_UNSUPPORTED_NODEJS: 'RUSH_ALLOW_UNSUPPORTED_NODEJS',\n /**\n * Setting this environment variable overrides the value of `allowWarningsInSuccessfulBuild`\n * in the `command-line.json` configuration file. Specify `1` to allow warnings in a successful build,\n * or `0` to disallow them. (See the comments in the command-line.json file for more information).\n */\n RUSH_ALLOW_WARNINGS_IN_SUCCESSFUL_BUILD: 'RUSH_ALLOW_WARNINGS_IN_SUCCESSFUL_BUILD',\n /**\n * This variable selects a specific installation variant for Rush to use when installing\n * and linking package dependencies.\n * For more information, see the command-line help for the `--variant` parameter\n * and this article: https://rushjs.io/pages/advanced/installation_variants/\n */\n RUSH_VARIANT: 'RUSH_VARIANT',\n /**\n * Specifies the maximum number of concurrent processes to launch during a build.\n * For more information, see the command-line help for the `--parallelism` parameter for \"rush build\".\n */\n RUSH_PARALLELISM: 'RUSH_PARALLELISM',\n /**\n * If this variable is set to \"1\", Rush will create symlinks with absolute paths instead\n * of relative paths. This can be necessary when a repository is moved during a build or\n * if parts of a repository are moved into a sandbox.\n */\n RUSH_ABSOLUTE_SYMLINKS: 'RUSH_ABSOLUTE_SYMLINKS',\n /**\n * When using PNPM as the package manager, this variable can be used to configure the path that\n * PNPM will use as the store directory.\n *\n * If a relative path is used, then the store path will be resolved relative to the process's\n * current working directory. An absolute path is recommended.\n */\n RUSH_PNPM_STORE_PATH: 'RUSH_PNPM_STORE_PATH',\n /**\n * When using PNPM as the package manager, this variable can be used to control whether or not PNPM\n * validates the integrity of the PNPM store during installation. The value of this environment variable must be\n * `1` (for true) or `0` (for false). If not specified, defaults to the value in .npmrc.\n */\n RUSH_PNPM_VERIFY_STORE_INTEGRITY: 'RUSH_PNPM_VERIFY_STORE_INTEGRITY',\n /**\n * This environment variable can be used to specify the `--target-folder` parameter\n * for the \"rush deploy\" command.\n */\n RUSH_DEPLOY_TARGET_FOLDER: 'RUSH_DEPLOY_TARGET_FOLDER',\n /**\n * Overrides the location of the `~/.rush` global folder where Rush stores temporary files.\n *\n * @remarks\n *\n * Most of the temporary files created by Rush are stored separately for each monorepo working folder,\n * to avoid issues of concurrency and compatibility between tool versions. However, a small set\n * of files (e.g. installations of the `@microsoft/rush-lib` engine and the package manager) are stored\n * in a global folder to speed up installations. The default location is `~/.rush` on POSIX-like\n * operating systems or `C:\\Users\\YourName` on Windows.\n *\n * Use `RUSH_GLOBAL_FOLDER` to specify a different folder path. This is useful for example if a Windows\n * group policy forbids executing scripts installed in a user's home directory.\n *\n * POSIX is a registered trademark of the Institute of Electrical and Electronic Engineers, Inc.\n */\n RUSH_GLOBAL_FOLDER: 'RUSH_GLOBAL_FOLDER',\n /**\n * Provides a credential for a remote build cache, if configured. This credential overrides any cached credentials.\n *\n * @remarks\n * Setting this environment variable overrides whatever credential has been saved in the\n * local cloud cache credentials using `rush update-cloud-credentials`.\n *\n *\n * If Azure Blob Storage is used to store cache entries, this must be a SAS token serialized as query\n * parameters.\n *\n * For information on SAS tokens, see here: https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview\n */\n RUSH_BUILD_CACHE_CREDENTIAL: 'RUSH_BUILD_CACHE_CREDENTIAL',\n /**\n * Setting this environment variable overrides the value of `buildCacheEnabled` in the `build-cache.json`\n * configuration file.\n *\n * @remarks\n * Specify `1` to enable the build cache or `0` to disable it.\n *\n * If there is no build cache configured, then this environment variable is ignored.\n */\n RUSH_BUILD_CACHE_ENABLED: 'RUSH_BUILD_CACHE_ENABLED',\n /**\n * Overrides the value of `isCacheWriteAllowed` in the `build-cache.json` configuration file. The value of this\n * environment variable must be `1` (for true) or `0` (for false). If there is no build cache configured, then\n * this environment variable is ignored.\n */\n RUSH_BUILD_CACHE_WRITE_ALLOWED: 'RUSH_BUILD_CACHE_WRITE_ALLOWED',\n /**\n * Set this environment variable to a JSON string to override the build cache configuration that normally lives\n * at `common/config/rush/build-cache.json`.\n *\n * This is useful for testing purposes, or for OSS repos that are have a local-only cache, but can have\n * a different cache configuration in CI/CD pipelines.\n *\n * @remarks\n * This is similar to {@link EnvironmentVariableNames.RUSH_BUILD_CACHE_OVERRIDE_JSON_FILE_PATH}, but it allows you to specify\n * a JSON string instead of a file path. The two environment variables are mutually exclusive, meaning you can\n * only use one of them at a time.\n */\n RUSH_BUILD_CACHE_OVERRIDE_JSON: 'RUSH_BUILD_CACHE_OVERRIDE_JSON',\n /**\n * Set this environment variable to the path to a `build-cache.json` file to override the build cache configuration\n * that normally lives at `common/config/rush/build-cache.json`.\n *\n * This is useful for testing purposes, or for OSS repos that are have a local-only cache, but can have\n * a different cache configuration in CI/CD pipelines.\n *\n * @remarks\n * This is similar to {@link EnvironmentVariableNames.RUSH_BUILD_CACHE_OVERRIDE_JSON}, but it allows you to specify\n * a file path instead of a JSON string. The two environment variables are mutually exclusive, meaning you can\n * only use one of them at a time.\n */\n RUSH_BUILD_CACHE_OVERRIDE_JSON_FILE_PATH: 'RUSH_BUILD_CACHE_OVERRIDE_JSON_FILE_PATH',\n /**\n * Setting this environment variable opts into running with cobuilds. The context id should be the same across\n * multiple VMs, but changed when it is a new round of cobuilds.\n *\n * e.g. `Build.BuildNumber` in Azure DevOps Pipeline.\n *\n * @remarks\n * If there is no cobuild configured, then this environment variable is ignored.\n */\n RUSH_COBUILD_CONTEXT_ID: 'RUSH_COBUILD_CONTEXT_ID',\n /**\n * Explicitly specifies a name for each participating cobuild runner.\n *\n * Setting this environment variable opts into running with cobuilds.\n *\n * @remarks\n * This environment variable is optional, if it is not provided, a random id is used.\n *\n * If there is no cobuild configured, then this environment variable is ignored.\n */\n RUSH_COBUILD_RUNNER_ID: 'RUSH_COBUILD_RUNNER_ID',\n /**\n * If this variable is set to \"1\", When getting distributed builds, Rush will automatically handle the leaf project\n * with build cache \"disabled\" by writing to the cache in a special \"log files only mode\". This is useful when you\n * want to use Cobuilds to improve the performance in CI validations and the leaf projects have not enabled cache.\n */\n RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED: 'RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED',\n /**\n * Explicitly specifies the path for the Git binary that is invoked by certain Rush operations.\n */\n RUSH_GIT_BINARY_PATH: 'RUSH_GIT_BINARY_PATH',\n /**\n * Explicitly specifies the path for the `tar` binary that is invoked by certain Rush operations.\n */\n RUSH_TAR_BINARY_PATH: 'RUSH_TAR_BINARY_PATH',\n /**\n * Internal variable used by `rushx` when recursively invoking another `rushx` process, to avoid\n * nesting event hooks.\n */\n _RUSH_RECURSIVE_RUSHX_CALL: '_RUSH_RECURSIVE_RUSHX_CALL',\n /**\n * Internal variable that explicitly specifies the path for the version of `@microsoft/rush-lib` being executed.\n * Will be set upon loading Rush.\n */\n _RUSH_LIB_PATH: '_RUSH_LIB_PATH',\n /**\n * When Rush executes shell scripts, it sometimes changes the working directory to be a project folder or\n * the repository root folder. The original working directory (where the Rush command was invoked) is assigned\n * to the the child process's `RUSH_INVOKED_FOLDER` environment variable, in case it is needed by the script.\n *\n * @remarks\n * The `RUSH_INVOKED_FOLDER` variable is the same idea as the `INIT_CWD` variable that package managers\n * assign when they execute lifecycle scripts.\n */\n RUSH_INVOKED_FOLDER: 'RUSH_INVOKED_FOLDER',\n /**\n * When running a hook script, this environment variable communicates the original arguments\n * passed to the `rush` or `rushx` command.\n *\n * @remarks\n * Unlike `RUSH_INVOKED_FOLDER`, the `RUSH_INVOKED_ARGS` variable is only available for hook scripts.\n * Other lifecycle scripts should not make assumptions about Rush's command line syntax\n * if Rush did not explicitly pass along command-line parameters to their process.\n */\n RUSH_INVOKED_ARGS: 'RUSH_INVOKED_ARGS'\n};\n/**\n * Provides Rush-specific environment variable data. All Rush environment variables must start with \"RUSH_\". This class\n * is designed to be used by RushConfiguration.\n * @beta\n *\n * @remarks\n * Initialize will throw if any unknown parameters are present.\n */\nexport class EnvironmentConfiguration {\n /**\n * If true, the environment configuration has been validated and initialized.\n */\n static get hasBeenValidated() {\n return EnvironmentConfiguration._hasBeenValidated;\n }\n /**\n * An override for the common/temp folder path.\n */\n static get rushTempFolderOverride() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._rushTempFolderOverride;\n }\n /**\n * If \"1\", create symlinks with absolute paths instead of relative paths.\n * See {@link EnvironmentVariableNames.RUSH_ABSOLUTE_SYMLINKS}\n */\n static get absoluteSymlinks() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._absoluteSymlinks;\n }\n /**\n * If this environment variable is set to \"1\", the Node.js version check will print a warning\n * instead of causing a hard error if the environment's Node.js version doesn't match the\n * version specifier in `rush.json`'s \"nodeSupportedVersionRange\" property.\n *\n * See {@link EnvironmentVariableNames.RUSH_ALLOW_UNSUPPORTED_NODEJS}.\n */\n static get allowUnsupportedNodeVersion() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._allowUnsupportedNodeVersion;\n }\n /**\n * Setting this environment variable overrides the value of `allowWarningsInSuccessfulBuild`\n * in the `command-line.json` configuration file. Specify `1` to allow warnings in a successful build,\n * or `0` to disallow them. (See the comments in the command-line.json file for more information).\n */\n static get allowWarningsInSuccessfulBuild() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._allowWarningsInSuccessfulBuild;\n }\n /**\n * An override for the PNPM store path, if `pnpmStore` configuration is set to 'path'\n * See {@link EnvironmentVariableNames.RUSH_PNPM_STORE_PATH}\n */\n static get pnpmStorePathOverride() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._pnpmStorePathOverride;\n }\n /**\n * If specified, enables or disables integrity verification of the pnpm store during install.\n * See {@link EnvironmentVariableNames.RUSH_PNPM_VERIFY_STORE_INTEGRITY}\n */\n static get pnpmVerifyStoreIntegrity() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._pnpmVerifyStoreIntegrity;\n }\n /**\n * Overrides the location of the `~/.rush` global folder where Rush stores temporary files.\n * See {@link EnvironmentVariableNames.RUSH_GLOBAL_FOLDER}\n */\n static get rushGlobalFolderOverride() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._rushGlobalFolderOverride;\n }\n /**\n * Provides a credential for reading from and writing to a remote build cache, if configured.\n * See {@link EnvironmentVariableNames.RUSH_BUILD_CACHE_CREDENTIAL}\n */\n static get buildCacheCredential() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._buildCacheCredential;\n }\n /**\n * If set, enables or disables the cloud build cache feature.\n * See {@link EnvironmentVariableNames.RUSH_BUILD_CACHE_ENABLED}\n */\n static get buildCacheEnabled() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._buildCacheEnabled;\n }\n /**\n * If set, enables or disables writing to the cloud build cache.\n * See {@link EnvironmentVariableNames.RUSH_BUILD_CACHE_WRITE_ALLOWED}\n */\n static get buildCacheWriteAllowed() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._buildCacheWriteAllowed;\n }\n /**\n * If set, overrides the build cache configuration that normally lives at `common/config/rush/build-cache.json`.\n * See {@link EnvironmentVariableNames.RUSH_BUILD_CACHE_OVERRIDE_JSON}\n */\n static get buildCacheOverrideJson() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._buildCacheOverrideJson;\n }\n /**\n * If set, overrides the build cache configuration that normally lives at `common/config/rush/build-cache.json`.\n * See {@link EnvironmentVariableNames.RUSH_BUILD_CACHE_OVERRIDE_JSON_FILE_PATH}\n */\n static get buildCacheOverrideJsonFilePath() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._buildCacheOverrideJsonFilePath;\n }\n /**\n * Provides a determined cobuild context id if configured\n * See {@link EnvironmentVariableNames.RUSH_COBUILD_CONTEXT_ID}\n */\n static get cobuildContextId() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._cobuildContextId;\n }\n /**\n * Provides a determined cobuild runner id if configured\n * See {@link EnvironmentVariableNames.RUSH_COBUILD_RUNNER_ID}\n */\n static get cobuildRunnerId() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._cobuildRunnerId;\n }\n /**\n * If set, enables or disables the cobuild leaf project log only feature.\n * See {@link EnvironmentVariableNames.RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED}\n */\n static get cobuildLeafProjectLogOnlyAllowed() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._cobuildLeafProjectLogOnlyAllowed;\n }\n /**\n * Allows the git binary path to be explicitly provided.\n * See {@link EnvironmentVariableNames.RUSH_GIT_BINARY_PATH}\n */\n static get gitBinaryPath() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._gitBinaryPath;\n }\n /**\n * Allows the tar binary path to be explicitly provided.\n * See {@link EnvironmentVariableNames.RUSH_TAR_BINARY_PATH}\n */\n static get tarBinaryPath() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._tarBinaryPath;\n }\n /**\n * The front-end RushVersionSelector relies on `RUSH_GLOBAL_FOLDER`, so its value must be read before\n * `EnvironmentConfiguration` is initialized (and actually before the correct version of `EnvironmentConfiguration`\n * is even installed). Thus we need to read this environment variable differently from all the others.\n * @internal\n */\n static _getRushGlobalFolderOverride(processEnv) {\n const value = processEnv[EnvironmentVariableNames.RUSH_GLOBAL_FOLDER];\n if (value) {\n const normalizedValue = EnvironmentConfiguration._normalizeDeepestParentFolderPath(value);\n return normalizedValue;\n }\n }\n /**\n * Reads and validates environment variables. If any are invalid, this function will throw.\n */\n static validate(options = {}) {\n var _a, _b, _c;\n EnvironmentConfiguration.reset();\n const unknownEnvVariables = [];\n for (const envVarName in process.env) {\n if (process.env.hasOwnProperty(envVarName) && envVarName.match(/^RUSH_/i)) {\n const value = process.env[envVarName];\n // Environment variables are only case-insensitive on Windows\n const normalizedEnvVarName = IS_WINDOWS ? envVarName.toUpperCase() : envVarName;\n switch (normalizedEnvVarName) {\n case EnvironmentVariableNames.RUSH_TEMP_FOLDER: {\n EnvironmentConfiguration._rushTempFolderOverride =\n value && !options.doNotNormalizePaths\n ? EnvironmentConfiguration._normalizeDeepestParentFolderPath(value) || value\n : value;\n break;\n }\n case EnvironmentVariableNames.RUSH_ABSOLUTE_SYMLINKS: {\n EnvironmentConfiguration._absoluteSymlinks =\n (_a = EnvironmentConfiguration.parseBooleanEnvironmentVariable(EnvironmentVariableNames.RUSH_ABSOLUTE_SYMLINKS, value)) !== null && _a !== void 0 ? _a : false;\n break;\n }\n case EnvironmentVariableNames.RUSH_ALLOW_UNSUPPORTED_NODEJS: {\n if (value === 'true' || value === 'false') {\n // Small, undocumented acceptance of old \"true\" and \"false\" values for\n // users of RUSH_ALLOW_UNSUPPORTED_NODEJS in rush pre-v5.46.\n EnvironmentConfiguration._allowUnsupportedNodeVersion = value === 'true';\n }\n else {\n EnvironmentConfiguration._allowUnsupportedNodeVersion =\n (_b = EnvironmentConfiguration.parseBooleanEnvironmentVariable(EnvironmentVariableNames.RUSH_ALLOW_UNSUPPORTED_NODEJS, value)) !== null && _b !== void 0 ? _b : false;\n }\n break;\n }\n case EnvironmentVariableNames.RUSH_ALLOW_WARNINGS_IN_SUCCESSFUL_BUILD: {\n EnvironmentConfiguration._allowWarningsInSuccessfulBuild =\n (_c = EnvironmentConfiguration.parseBooleanEnvironmentVariable(EnvironmentVariableNames.RUSH_ALLOW_WARNINGS_IN_SUCCESSFUL_BUILD, value)) !== null && _c !== void 0 ? _c : false;\n break;\n }\n case EnvironmentVariableNames.RUSH_PNPM_STORE_PATH: {\n EnvironmentConfiguration._pnpmStorePathOverride =\n value && !options.doNotNormalizePaths\n ? EnvironmentConfiguration._normalizeDeepestParentFolderPath(value) || value\n : value;\n break;\n }\n case EnvironmentVariableNames.RUSH_PNPM_VERIFY_STORE_INTEGRITY: {\n EnvironmentConfiguration._pnpmVerifyStoreIntegrity =\n value === '1' ? true : value === '0' ? false : undefined;\n break;\n }\n case EnvironmentVariableNames.RUSH_GLOBAL_FOLDER: {\n // Handled specially below\n break;\n }\n case EnvironmentVariableNames.RUSH_BUILD_CACHE_CREDENTIAL: {\n EnvironmentConfiguration._buildCacheCredential = value;\n break;\n }\n case EnvironmentVariableNames.RUSH_BUILD_CACHE_ENABLED: {\n EnvironmentConfiguration._buildCacheEnabled =\n EnvironmentConfiguration.parseBooleanEnvironmentVariable(EnvironmentVariableNames.RUSH_BUILD_CACHE_ENABLED, value);\n break;\n }\n case EnvironmentVariableNames.RUSH_BUILD_CACHE_WRITE_ALLOWED: {\n EnvironmentConfiguration._buildCacheWriteAllowed =\n EnvironmentConfiguration.parseBooleanEnvironmentVariable(EnvironmentVariableNames.RUSH_BUILD_CACHE_WRITE_ALLOWED, value);\n break;\n }\n case EnvironmentVariableNames.RUSH_BUILD_CACHE_OVERRIDE_JSON: {\n EnvironmentConfiguration._buildCacheOverrideJson = value;\n break;\n }\n case EnvironmentVariableNames.RUSH_BUILD_CACHE_OVERRIDE_JSON_FILE_PATH: {\n EnvironmentConfiguration._buildCacheOverrideJsonFilePath = value;\n break;\n }\n case EnvironmentVariableNames.RUSH_COBUILD_CONTEXT_ID: {\n EnvironmentConfiguration._cobuildContextId = value;\n break;\n }\n case EnvironmentVariableNames.RUSH_COBUILD_RUNNER_ID: {\n EnvironmentConfiguration._cobuildRunnerId = value;\n break;\n }\n case EnvironmentVariableNames.RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED: {\n EnvironmentConfiguration._cobuildLeafProjectLogOnlyAllowed =\n EnvironmentConfiguration.parseBooleanEnvironmentVariable(EnvironmentVariableNames.RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED, value);\n break;\n }\n case EnvironmentVariableNames.RUSH_GIT_BINARY_PATH: {\n EnvironmentConfiguration._gitBinaryPath = value;\n break;\n }\n case EnvironmentVariableNames.RUSH_TAR_BINARY_PATH: {\n EnvironmentConfiguration._tarBinaryPath = value;\n break;\n }\n case EnvironmentVariableNames.RUSH_PARALLELISM:\n case EnvironmentVariableNames.RUSH_PREVIEW_VERSION:\n case EnvironmentVariableNames.RUSH_VARIANT:\n case EnvironmentVariableNames.RUSH_DEPLOY_TARGET_FOLDER:\n // Handled by @microsoft/rush front end\n break;\n case EnvironmentVariableNames.RUSH_INVOKED_FOLDER:\n case EnvironmentVariableNames.RUSH_INVOKED_ARGS:\n case EnvironmentVariableNames._RUSH_LIB_PATH:\n // Assigned by Rush itself\n break;\n case EnvironmentVariableNames._RUSH_RECURSIVE_RUSHX_CALL:\n // Assigned/read internally by RushXCommandLine\n break;\n default:\n unknownEnvVariables.push(envVarName);\n break;\n }\n }\n }\n // This strictness intends to catch mistakes where variables are misspelled or not used correctly.\n if (unknownEnvVariables.length > 0) {\n throw new Error('The following environment variables were found with the \"RUSH_\" prefix, but they are not ' +\n `recognized by this version of Rush: ${unknownEnvVariables.join(', ')}`);\n }\n if (EnvironmentConfiguration._buildCacheOverrideJsonFilePath &&\n EnvironmentConfiguration._buildCacheOverrideJson) {\n throw new Error(`Environment variable ${EnvironmentVariableNames.RUSH_BUILD_CACHE_OVERRIDE_JSON_FILE_PATH} and ` +\n `${EnvironmentVariableNames.RUSH_BUILD_CACHE_OVERRIDE_JSON} are mutually exclusive. ` +\n `Only one may be specified.`);\n }\n // See doc comment for EnvironmentConfiguration._getRushGlobalFolderOverride().\n EnvironmentConfiguration._rushGlobalFolderOverride =\n EnvironmentConfiguration._getRushGlobalFolderOverride(process.env);\n EnvironmentConfiguration._hasBeenValidated = true;\n }\n /**\n * Resets EnvironmentConfiguration into an un-initialized state.\n */\n static reset() {\n EnvironmentConfiguration._rushTempFolderOverride = undefined;\n EnvironmentConfiguration._hasBeenValidated = false;\n }\n static _ensureValidated() {\n if (!EnvironmentConfiguration._hasBeenValidated) {\n EnvironmentConfiguration.validate();\n }\n }\n static parseBooleanEnvironmentVariable(name, value) {\n if (value === '' || value === undefined) {\n return undefined;\n }\n else if (value === '0') {\n return false;\n }\n else if (value === '1') {\n return true;\n }\n else {\n throw new Error(`Invalid value \"${value}\" for the environment variable ${name}. Valid choices are 0 or 1.`);\n }\n }\n /**\n * Given a path to a folder (that may or may not exist), normalize the path, including casing,\n * to the first existing parent folder in the path.\n *\n * If no existing path can be found (for example, if the root is a volume that doesn't exist),\n * this function returns undefined.\n *\n * @example\n * If the following path exists on disk: `C:\\Folder1\\folder2\\`\n * _normalizeFirstExistingFolderPath('c:\\\\folder1\\\\folder2\\\\temp\\\\subfolder')\n * returns 'C:\\\\Folder1\\\\folder2\\\\temp\\\\subfolder'\n */\n static _normalizeDeepestParentFolderPath(folderPath) {\n folderPath = path.normalize(folderPath);\n const endsWithSlash = folderPath.charAt(folderPath.length - 1) === path.sep;\n const parsedPath = path.parse(folderPath);\n const pathRoot = parsedPath.root;\n const pathWithoutRoot = parsedPath.dir.substr(pathRoot.length);\n const pathParts = [...pathWithoutRoot.split(path.sep), parsedPath.name].filter((part) => !!part);\n // Starting with all path sections, and eliminating one from the end during each loop iteration,\n // run trueCasePathSync. If trueCasePathSync returns without exception, we've found a subset\n // of the path that exists and we've now gotten the correct casing.\n //\n // Once we've found a parent folder that exists, append the path sections that didn't exist.\n for (let i = pathParts.length; i >= 0; i--) {\n const constructedPath = path.join(pathRoot, ...pathParts.slice(0, i));\n try {\n const normalizedConstructedPath = trueCasePathSync(constructedPath);\n const result = path.join(normalizedConstructedPath, ...pathParts.slice(i));\n if (endsWithSlash) {\n return `${result}${path.sep}`;\n }\n else {\n return result;\n }\n }\n catch (e) {\n // This path doesn't exist, continue to the next subpath\n }\n }\n return undefined;\n }\n}\nEnvironmentConfiguration._hasBeenValidated = false;\nEnvironmentConfiguration._absoluteSymlinks = false;\nEnvironmentConfiguration._allowUnsupportedNodeVersion = false;\nEnvironmentConfiguration._allowWarningsInSuccessfulBuild = false;\n//# sourceMappingURL=EnvironmentConfiguration.js.map","// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nimport * as path from 'node:path';\nimport { User } from '@rushstack/node-core-library';\nimport { EnvironmentConfiguration } from './EnvironmentConfiguration';\n/**\n * This class provides global folders that are used for rush's internal install locations.\n *\n * @internal\n */\nexport class RushGlobalFolder {\n constructor() {\n // Because RushGlobalFolder is used by the front-end VersionSelector before EnvironmentConfiguration\n // is initialized, we need to read it using a special internal API.\n const rushGlobalFolderOverride = EnvironmentConfiguration._getRushGlobalFolderOverride(process.env);\n if (rushGlobalFolderOverride !== undefined) {\n this.path = rushGlobalFolderOverride;\n }\n else {\n this.path = path.join(User.getHomeFolder(), '.rush');\n }\n const normalizedNodeVersion = process.version.match(/^[a-z0-9\\-\\.]+$/i)\n ? process.version\n : 'unknown-version';\n this.nodeSpecificPath = path.join(this.path, `node-${normalizedNodeVersion}`);\n }\n}\n//# sourceMappingURL=RushGlobalFolder.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sdkContext = exports.RUSH_LIB_PATH_ENV_VAR_NAME = exports.RUSH_LIB_NAME = void 0;\nexports.tryFindRushJsonLocation = tryFindRushJsonLocation;\nexports._require = _require;\nexports.requireRushLibUnderFolderPath = requireRushLibUnderFolderPath;\nconst path = __importStar(require(\"node:path\"));\nconst node_core_library_1 = require(\"@rushstack/node-core-library\");\nexports.RUSH_LIB_NAME = '@microsoft/rush-lib';\nexports.RUSH_LIB_PATH_ENV_VAR_NAME = '_RUSH_LIB_PATH';\nexports.sdkContext = {\n rushLibModule: undefined\n};\n/**\n * Find the rush.json location and return the path, or undefined if a rush.json can't be found.\n *\n * @privateRemarks\n * Keep this in sync with `RushConfiguration.tryFindRushJsonLocation`.\n */\nfunction tryFindRushJsonLocation(startingFolder) {\n let currentFolder = startingFolder;\n // Look upwards at parent folders until we find a folder containing rush.json\n for (let i = 0; i < 10; ++i) {\n const rushJsonFilename = path.join(currentFolder, 'rush.json');\n if (node_core_library_1.FileSystem.exists(rushJsonFilename)) {\n return rushJsonFilename;\n }\n const parentFolder = path.dirname(currentFolder);\n if (parentFolder === currentFolder) {\n break;\n }\n currentFolder = parentFolder;\n }\n return undefined;\n}\nfunction _require(moduleName) {\n if (typeof __non_webpack_require__ === 'function') {\n // If this library has been bundled with Webpack, we need to call the real `require` function\n // that doesn't get turned into a `__webpack_require__` statement.\n // `__non_webpack_require__` is a Webpack macro that gets turned into a `require` statement\n // during bundling.\n return __non_webpack_require__(moduleName);\n }\n else {\n return require(moduleName);\n }\n}\n/**\n * Require `@microsoft/rush-lib` under the specified folder path.\n */\nfunction requireRushLibUnderFolderPath(folderPath) {\n const rushLibModulePath = node_core_library_1.Import.resolveModule({\n modulePath: exports.RUSH_LIB_NAME,\n baseFolderPath: folderPath\n });\n return _require(rushLibModulePath);\n}\n//# sourceMappingURL=helpers.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._rushSdk_loadInternalModule = _rushSdk_loadInternalModule;\nconst path = __importStar(require(\"node:path\"));\nconst node_core_library_1 = require(\"@rushstack/node-core-library\");\nconst terminal_1 = require(\"@rushstack/terminal\");\nconst RushGlobalFolder_1 = require(\"@microsoft/rush-lib/lib-esnext/api/RushGlobalFolder\");\nconst helpers_1 = require(\"./helpers\");\nconst verboseEnabled = typeof process !== 'undefined' &&\n (process.env.RUSH_SDK_DEBUG === '1' || process.env._RUSH_SDK_DEBUG === '1');\nconst terminal = new terminal_1.Terminal(new terminal_1.ConsoleTerminalProvider({\n verboseEnabled\n}));\nlet errorMessage = '';\n// SCENARIO 1: Rush's PluginManager has initialized \"rush-sdk\" with Rush's own instance of rush-lib.\n// The Rush host process will assign \"global.___rush___rushLibModule\" before loading the plugin.\nif (helpers_1.sdkContext.rushLibModule === undefined) {\n helpers_1.sdkContext.rushLibModule =\n global.___rush___rushLibModule ||\n global.___rush___rushLibModuleFromEnvironment ||\n global.___rush___rushLibModuleFromRushGlobalFolder ||\n global.___rush___rushLibModuleFromInstallAndRunRush;\n}\n// SCENARIO 2: The project importing \"rush-sdk\" has installed its own instance of \"rush-lib\"\n// as a package.json dependency. For example, this is used by the Jest tests for Rush plugins.\nif (helpers_1.sdkContext.rushLibModule === undefined) {\n const importingPath = (_a = module === null || module === void 0 ? void 0 : module.parent) === null || _a === void 0 ? void 0 : _a.filename;\n if (importingPath) {\n const callerPackageFolder = node_core_library_1.PackageJsonLookup.instance.tryGetPackageFolderFor(importingPath);\n if (callerPackageFolder !== undefined) {\n const callerPackageJson = (0, helpers_1._require)(path.join(callerPackageFolder, 'package.json'));\n // Does the caller properly declare a dependency on rush-lib?\n if ((callerPackageJson.dependencies && callerPackageJson.dependencies[helpers_1.RUSH_LIB_NAME] !== undefined) ||\n (callerPackageJson.devDependencies &&\n callerPackageJson.devDependencies[helpers_1.RUSH_LIB_NAME] !== undefined) ||\n (callerPackageJson.peerDependencies &&\n callerPackageJson.peerDependencies[helpers_1.RUSH_LIB_NAME] !== undefined)) {\n // Try to resolve rush-lib from the caller's folder\n terminal.writeVerboseLine(`Try to load ${helpers_1.RUSH_LIB_NAME} from caller package`);\n try {\n helpers_1.sdkContext.rushLibModule = (0, helpers_1.requireRushLibUnderFolderPath)(callerPackageFolder);\n }\n catch (error) {\n // If we fail to resolve it, ignore the error\n terminal.writeVerboseLine(`Failed to load ${helpers_1.RUSH_LIB_NAME} from caller package`);\n }\n // If two different libraries invoke `rush-sdk`, and one of them provides \"rush-lib\"\n // then the first version to be loaded wins. We do not support side-by-side instances of \"rush-lib\".\n if (helpers_1.sdkContext.rushLibModule !== undefined) {\n // to track which scenario is active and how it got initialized.\n global.___rush___rushLibModule = helpers_1.sdkContext.rushLibModule;\n terminal.writeVerboseLine(`Loaded ${helpers_1.RUSH_LIB_NAME} from caller`);\n }\n }\n }\n }\n}\n// SCENARIO 3: A tool or script has been invoked as a child process by an instance of \"rush-lib\" and can use the\n// version that invoked it. In this case, use process.env._RUSH_LIB_PATH to find \"rush-lib\".\nif (helpers_1.sdkContext.rushLibModule === undefined) {\n const rushLibPath = process.env[helpers_1.RUSH_LIB_PATH_ENV_VAR_NAME];\n if (rushLibPath) {\n terminal.writeVerboseLine(`Try to load ${helpers_1.RUSH_LIB_NAME} from process.env.${helpers_1.RUSH_LIB_PATH_ENV_VAR_NAME} from caller package`);\n try {\n helpers_1.sdkContext.rushLibModule = (0, helpers_1._require)(rushLibPath);\n }\n catch (error) {\n // Log this as a warning, since it is unexpected to define an incorrect value of the variable.\n terminal.writeWarningLine(`Failed to load ${helpers_1.RUSH_LIB_NAME} via process.env.${helpers_1.RUSH_LIB_PATH_ENV_VAR_NAME}`);\n }\n if (helpers_1.sdkContext.rushLibModule !== undefined) {\n // to track which scenario is active and how it got initialized.\n global.___rush___rushLibModuleFromEnvironment = helpers_1.sdkContext.rushLibModule;\n terminal.writeVerboseLine(`Loaded ${helpers_1.RUSH_LIB_NAME} from process.env.${helpers_1.RUSH_LIB_PATH_ENV_VAR_NAME}`);\n }\n }\n}\n// SCENARIO 4: A standalone tool or script depends on \"rush-sdk\", and is meant to be used inside a monorepo folder.\n// In this case, we can first load the rush-lib version in rush global folder. If the expected version is not installed,\n// using install-run-rush.js to obtain the appropriate rush-lib version for the monorepo.\nif (helpers_1.sdkContext.rushLibModule === undefined) {\n try {\n const rushJsonPath = (0, helpers_1.tryFindRushJsonLocation)(process.cwd());\n if (!rushJsonPath) {\n throw new Error('Unable to find rush.json in the current folder or its parent folders.\\n' +\n 'This tool is meant to be invoked from a working directory inside a Rush repository.');\n }\n const monorepoRoot = path.dirname(rushJsonPath);\n const rushJson = node_core_library_1.JsonFile.load(rushJsonPath);\n const { rushVersion } = rushJson;\n try {\n terminal.writeVerboseLine(`Try to load ${helpers_1.RUSH_LIB_NAME} from rush global folder`);\n const rushGlobalFolder = new RushGlobalFolder_1.RushGlobalFolder();\n // The path needs to keep align with the logic inside RushVersionSelector\n const expectedGlobalRushInstalledFolder = `${rushGlobalFolder.nodeSpecificPath}/rush-${rushVersion}`;\n terminal.writeVerboseLine(`The expected global rush installed folder is \"${expectedGlobalRushInstalledFolder}\"`);\n helpers_1.sdkContext.rushLibModule = (0, helpers_1.requireRushLibUnderFolderPath)(expectedGlobalRushInstalledFolder);\n }\n catch (e) {\n terminal.writeVerboseLine(`Failed to load ${helpers_1.RUSH_LIB_NAME} from rush global folder: ${e.message}`);\n }\n if (helpers_1.sdkContext.rushLibModule !== undefined) {\n // to track which scenario is active and how it got initialized.\n global.___rush___rushLibModuleFromRushGlobalFolder = helpers_1.sdkContext.rushLibModule;\n terminal.writeVerboseLine(`Loaded ${helpers_1.RUSH_LIB_NAME} installed from rush global folder`);\n }\n else {\n const installRunNodeModuleFolder = `${monorepoRoot}/common/temp/install-run/@microsoft+rush@${rushVersion}`;\n try {\n // First, try to load the version of \"rush-lib\" that was installed by install-run-rush.js\n terminal.writeVerboseLine(`Trying to load ${helpers_1.RUSH_LIB_NAME} installed by install-run-rush`);\n helpers_1.sdkContext.rushLibModule = (0, helpers_1.requireRushLibUnderFolderPath)(installRunNodeModuleFolder);\n }\n catch (e1) {\n let installAndRunRushStderrContent = '';\n try {\n const installAndRunRushJSPath = `${monorepoRoot}/common/scripts/install-run-rush.js`;\n terminal.writeLine('The Rush engine has not been installed yet. Invoking install-run-rush.js...');\n const installAndRunRushProcess = node_core_library_1.Executable.spawnSync('node', [installAndRunRushJSPath, '--help'], {\n stdio: 'pipe'\n });\n installAndRunRushStderrContent = installAndRunRushProcess.stderr;\n if (installAndRunRushProcess.status !== 0) {\n throw new Error(`The ${helpers_1.RUSH_LIB_NAME} package failed to install`);\n }\n // Retry to load \"rush-lib\" after install-run-rush run\n terminal.writeVerboseLine(`Trying to load ${helpers_1.RUSH_LIB_NAME} installed by install-run-rush a second time`);\n helpers_1.sdkContext.rushLibModule = (0, helpers_1.requireRushLibUnderFolderPath)(installRunNodeModuleFolder);\n }\n catch (e2) {\n // eslint-disable-next-line no-console\n console.error(`${installAndRunRushStderrContent}`);\n throw new Error(`The ${helpers_1.RUSH_LIB_NAME} package failed to load`);\n }\n }\n if (helpers_1.sdkContext.rushLibModule !== undefined) {\n // to track which scenario is active and how it got initialized.\n global.___rush___rushLibModuleFromInstallAndRunRush = helpers_1.sdkContext.rushLibModule;\n terminal.writeVerboseLine(`Loaded ${helpers_1.RUSH_LIB_NAME} installed by install-run-rush`);\n }\n }\n }\n catch (e) {\n // no-catch\n errorMessage = e.message;\n }\n}\nif (helpers_1.sdkContext.rushLibModule === undefined) {\n // This error indicates that a project is trying to import \"@rushstack/rush-sdk\", but the Rush engine\n // instance cannot be found. If you are writing Jest tests for a Rush plugin, add \"@microsoft/rush-lib\"\n // to the devDependencies for your project.\n // eslint-disable-next-line no-console\n console.error(`Error: The @rushstack/rush-sdk package was not able to load the Rush engine:\n${errorMessage}\n`);\n process.exit(1);\n}\n// Based on TypeScript's __exportStar()\nfor (const property in helpers_1.sdkContext.rushLibModule) {\n if (property !== 'default' && !exports.hasOwnProperty(property)) {\n const rushLibModuleForClosure = helpers_1.sdkContext.rushLibModule;\n // Based on TypeScript's __createBinding()\n Object.defineProperty(exports, property, {\n enumerable: true,\n get: function () {\n return rushLibModuleForClosure[property];\n }\n });\n }\n}\n/**\n * Used by the .js stubs for path-based imports of `@microsoft/rush-lib` internal APIs.\n */\nfunction _rushSdk_loadInternalModule(srcImportPath) {\n if (!exports._RushInternals) {\n throw new Error(`Rush version ${exports.Rush.version} does not support internal API imports via rush-sdk`);\n }\n return exports._RushInternals.loadModule(srcImportPath);\n}\n//# sourceMappingURL=index.js.map","module.exports = require(\"@rushstack/node-core-library\");","module.exports = require(\"@rushstack/terminal\");","module.exports = require(\"fs\");","module.exports = require(\"node:path\");","module.exports = require(\"os\");","module.exports = require(\"path\");","module.exports = require(\"util\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./lib-commonjs/index.js\");\n",""],"names":[],"ignoreList":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"index.js","mappings":";;;;;;;;;;AAAY;;AAEZ,QAAQ,iCAAiC,EAAE,mBAAO,CAAC,cAAI;AACvD,QAAQ,WAAW,EAAE,mBAAO,CAAC,cAAI;AACjC,QAAQ,wBAAwB,EAAE,mBAAO,CAAC,kBAAM;AAChD,QAAQ,kBAAkB,EAAE,mBAAO,CAAC,kBAAM;;AAE1C;AACA;AACA;;AAEA;AACA,gCAAgC,aAAa;AAC7C,oCAAoC,YAAY;AAChD;;AAEA;AACA;AACA;;AAEA;AACA,+BAA+B;AAC/B;;AAEA;AACA;AACA,QAAQ,8BAA8B;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;;AAEA,yBAAyB,MAAM;AAC/B;AACA;AACA;AACA;AACA,6EAA6E,SAAS;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AC7FA;AACA;AACO;AACA;AACP;AACA;AACA;AACA,uBAAuB,4BAA4B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8C;;AClBA;AACA;AACkC;AACgB;AACW;AAC7D;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wEAAwE;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,8DAA8D;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6DAA6D;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,UAAU;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,+BAA+B;AACtF;AACA;AACA;AACA,oDAAoD,mEAAmE;AACvH,mBAAmB,yDAAyD;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,MAAM,iCAAiC,KAAK;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAAc;AACnC,2EAA2E,uBAAQ;AACnF,2BAA2B,yBAAU;AACrC;AACA;AACA,oDAAoD,uBAAQ;AAC5D;AACA;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C,oCAAoC,wBAAS;AAC7C;AACA,kDAAkD,mCAAgB;AAClE,+BAA+B,wBAAS;AACxC;AACA,8BAA8B,OAAO,EAAE,uBAAQ,CAAC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oD;;AC9kBA;AACA;AACkC;AACkB;AACkB;AACtE;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE;AACA;AACA;AACA;AACA,wBAAwB,wBAAS,CAAC,uBAAI;AACtC;AACA;AACA;AACA;AACA,gCAAgC,wBAAS,oBAAoB,sBAAsB;AACnF;AACA;AACA,4C;;;;;;;;;;AC3Ba;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,GAAG,kCAAkC,GAAG,qBAAqB;AAC/E,+BAA+B;AAC/B,gBAAgB;AAChB,qCAAqC;AACrC,0BAA0B,mBAAO,CAAC,4BAAW;AAC7C,4BAA4B,mBAAO,CAAC,kEAA8B;AAClE,qBAAqB;AACrB,kCAAkC;AAClC,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAuB;AACtC;AACA;AACA;AACA;AACA,eAAe,OAAuB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,mC;;;;;;;;;;;AC5Fa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mCAAmC;AACnC,0BAA0B,mBAAO,CAAC,4BAAW;AAC7C,4BAA4B,mBAAO,CAAC,kEAA8B;AAClE,mBAAmB,mBAAO,CAAC,gDAAqB;AAChD,2BAA2B,mBAAO,CAAC,2GAAqD;AACxF,kBAAkB,mBAAO,CAAC,4CAAW;AACrC;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,yBAAyB;AAClF;AACA;AACA;AACA;AACA;AACA,gEAAgE,yBAAyB;AACzF;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,yBAAyB;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,yBAAyB,mBAAmB,sCAAsC;AACnI;AACA;AACA;AACA;AACA;AACA,wDAAwD,yBAAyB,kBAAkB,qCAAqC;AACxI;AACA;AACA;AACA;AACA,gDAAgD,yBAAyB,mBAAmB,qCAAqC;AACjI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA,qDAAqD,yBAAyB;AAC9E;AACA;AACA,yDAAyD,kCAAkC,QAAQ,YAAY;AAC/G,uFAAuF,kCAAkC;AACzH;AACA;AACA;AACA,wDAAwD,yBAAyB,2BAA2B,UAAU;AACtH;AACA;AACA;AACA;AACA,gDAAgD,yBAAyB;AACzE;AACA;AACA,kDAAkD,aAAa,2CAA2C,YAAY;AACtH;AACA;AACA,6DAA6D,yBAAyB;AACtF;AACA;AACA;AACA;AACA;AACA,uDAAuD,aAAa;AACpE;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,+CAA+C,yBAAyB;AACxE;AACA;AACA,iEAAiE,yBAAyB;AAC1F;AACA;AACA;AACA;AACA,qCAAqC,+BAA+B;AACpE,2CAA2C,yBAAyB;AACpE;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sBAAsB;AAC9D;AACA;AACA;AACA,iC;;;;;;;;;;ACvNA,yD;;;;;;;;;;ACAA,gD;;;;;;;;;;ACAA,+B;;;;;;;;;;ACAA,sC;;;;;;;;;;ACAA,+B;;;;;;;;;;ACAA,iC;;;;;;;;;;ACAA,iC;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WC/BA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;WCNA;WACA;WACA;WACA;WACA,E;;;;;UEJA;UACA;UACA;UACA","sources":["webpack://@rushstack/rush-sdk/../../common/temp/default/node_modules/.pnpm/true-case-path@2.2.1/node_modules/true-case-path/index.js","webpack://@rushstack/rush-sdk/../rush-lib/lib-esnext/utilities/executionUtilities.js","webpack://@rushstack/rush-sdk/../rush-lib/lib-esnext/api/EnvironmentConfiguration.js","webpack://@rushstack/rush-sdk/../rush-lib/lib-esnext/api/RushGlobalFolder.js","webpack://@rushstack/rush-sdk/./lib-commonjs/helpers.js","webpack://@rushstack/rush-sdk/./lib-commonjs/index.js","webpack://@rushstack/rush-sdk/external commonjs \"@rushstack/node-core-library\"","webpack://@rushstack/rush-sdk/external commonjs \"@rushstack/terminal\"","webpack://@rushstack/rush-sdk/external node-commonjs \"fs\"","webpack://@rushstack/rush-sdk/external node-commonjs \"node:path\"","webpack://@rushstack/rush-sdk/external node-commonjs \"os\"","webpack://@rushstack/rush-sdk/external node-commonjs \"path\"","webpack://@rushstack/rush-sdk/external node-commonjs \"util\"","webpack://@rushstack/rush-sdk/webpack/bootstrap","webpack://@rushstack/rush-sdk/webpack/runtime/define property getters","webpack://@rushstack/rush-sdk/webpack/runtime/hasOwnProperty shorthand","webpack://@rushstack/rush-sdk/webpack/runtime/make namespace object","webpack://@rushstack/rush-sdk/webpack/runtime/node module decorator","webpack://@rushstack/rush-sdk/webpack/before-startup","webpack://@rushstack/rush-sdk/webpack/startup","webpack://@rushstack/rush-sdk/webpack/after-startup"],"sourcesContent":["'use strict'\n\nconst { readdir: _readdir, readdirSync } = require('fs')\nconst { platform } = require('os')\nconst { isAbsolute, normalize } = require('path')\nconst { promisify: pify } = require('util')\n\nconst readdir = pify(_readdir)\nconst isWindows = platform() === 'win32'\nconst delimiter = isWindows ? '\\\\' : '/'\n\nmodule.exports = {\n trueCasePath: _trueCasePath({ sync: false }),\n trueCasePathSync: _trueCasePath({ sync: true })\n}\n\nfunction getRelevantFilePathSegments(filePath) {\n return filePath.split(delimiter).filter((s) => s !== '')\n}\n\nfunction escapeString(str) {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n}\n\nfunction matchCaseInsensitive(fileOrDirectory, directoryContents, filePath) {\n const caseInsensitiveRegex = new RegExp(\n `^${escapeString(fileOrDirectory)}$`,\n 'i'\n )\n for (const file of directoryContents) {\n if (caseInsensitiveRegex.test(file)) return file\n }\n throw new Error(\n `[true-case-path]: Called with ${filePath}, but no matching file exists`\n )\n}\n\nfunction _trueCasePath({ sync }) {\n return (filePath, basePath) => {\n if (basePath) {\n if (!isAbsolute(basePath)) {\n throw new Error(\n `[true-case-path]: basePath argument must be absolute. Received \"${basePath}\"`\n )\n }\n basePath = normalize(basePath)\n }\n filePath = normalize(filePath)\n const segments = getRelevantFilePathSegments(filePath)\n if (isAbsolute(filePath)) {\n if (basePath) {\n throw new Error(\n '[true-case-path]: filePath must be relative when used with basePath'\n )\n }\n basePath = isWindows\n ? segments.shift().toUpperCase() // drive letter\n : ''\n } else if (!basePath) {\n basePath = process.cwd()\n }\n return sync\n ? iterateSync(basePath, filePath, segments)\n : iterateAsync(basePath, filePath, segments)\n }\n}\n\nfunction iterateSync(basePath, filePath, segments) {\n return segments.reduce(\n (realPath, fileOrDirectory) =>\n realPath +\n delimiter +\n matchCaseInsensitive(\n fileOrDirectory,\n readdirSync(realPath + delimiter),\n filePath\n ),\n basePath\n )\n}\n\nasync function iterateAsync(basePath, filePath, segments) {\n return await segments.reduce(\n async (realPathPromise, fileOrDirectory) =>\n (await realPathPromise) +\n delimiter +\n matchCaseInsensitive(\n fileOrDirectory,\n await readdir((await realPathPromise) + delimiter),\n filePath\n ),\n basePath\n )\n}\n","// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nexport const IS_WINDOWS = process.platform === 'win32';\nexport function escapeArgumentIfNeeded(command, isWindows = IS_WINDOWS) {\n if (command.includes(' ')) {\n if (isWindows) {\n // Windows: use double quotes and escape internal double quotes\n return `\"${command.replace(/\"/g, '\"\"')}\"`;\n }\n else {\n // Unix: use JSON.stringify for proper escaping\n return JSON.stringify(command);\n }\n }\n else {\n return command;\n }\n}\n//# sourceMappingURL=executionUtilities.js.map","// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nimport * as path from 'node:path';\nimport { trueCasePathSync } from 'true-case-path';\nimport { IS_WINDOWS } from '../utilities/executionUtilities';\n/**\n * Names of environment variables used by Rush.\n * @beta\n */\n// eslint-disable-next-line @typescript-eslint/typedef\nexport const EnvironmentVariableNames = {\n /**\n * This variable overrides the temporary folder used by Rush.\n * The default value is \"common/temp\" under the repository root.\n *\n * @remarks This environment variable is not compatible with workspace installs. If attempting\n * to move the PNPM store path, see the `RUSH_PNPM_STORE_PATH` environment variable.\n */\n RUSH_TEMP_FOLDER: 'RUSH_TEMP_FOLDER',\n /**\n * This variable overrides the version of Rush that will be installed by\n * the version selector. The default value is determined by the \"rushVersion\"\n * field from rush.json.\n */\n RUSH_PREVIEW_VERSION: 'RUSH_PREVIEW_VERSION',\n /**\n * If this variable is set to \"1\", Rush will not fail the build when running a version\n * of Node that does not match the criteria specified in the \"nodeSupportedVersionRange\"\n * field from rush.json.\n */\n RUSH_ALLOW_UNSUPPORTED_NODEJS: 'RUSH_ALLOW_UNSUPPORTED_NODEJS',\n /**\n * Setting this environment variable overrides the value of `allowWarningsInSuccessfulBuild`\n * in the `command-line.json` configuration file. Specify `1` to allow warnings in a successful build,\n * or `0` to disallow them. (See the comments in the command-line.json file for more information).\n */\n RUSH_ALLOW_WARNINGS_IN_SUCCESSFUL_BUILD: 'RUSH_ALLOW_WARNINGS_IN_SUCCESSFUL_BUILD',\n /**\n * This variable selects a specific installation variant for Rush to use when installing\n * and linking package dependencies.\n * For more information, see the command-line help for the `--variant` parameter\n * and this article: https://rushjs.io/pages/advanced/installation_variants/\n */\n RUSH_VARIANT: 'RUSH_VARIANT',\n /**\n * Specifies the maximum number of concurrent processes to launch during a build.\n * For more information, see the command-line help for the `--parallelism` parameter for \"rush build\".\n */\n RUSH_PARALLELISM: 'RUSH_PARALLELISM',\n /**\n * If this variable is set to \"1\", Rush will create symlinks with absolute paths instead\n * of relative paths. This can be necessary when a repository is moved during a build or\n * if parts of a repository are moved into a sandbox.\n */\n RUSH_ABSOLUTE_SYMLINKS: 'RUSH_ABSOLUTE_SYMLINKS',\n /**\n * When using PNPM as the package manager, this variable can be used to configure the path that\n * PNPM will use as the store directory.\n *\n * If a relative path is used, then the store path will be resolved relative to the process's\n * current working directory. An absolute path is recommended.\n */\n RUSH_PNPM_STORE_PATH: 'RUSH_PNPM_STORE_PATH',\n /**\n * When using PNPM as the package manager, this variable can be used to control whether or not PNPM\n * validates the integrity of the PNPM store during installation. The value of this environment variable must be\n * `1` (for true) or `0` (for false). If not specified, defaults to the value in .npmrc.\n */\n RUSH_PNPM_VERIFY_STORE_INTEGRITY: 'RUSH_PNPM_VERIFY_STORE_INTEGRITY',\n /**\n * This environment variable can be used to specify the `--target-folder` parameter\n * for the \"rush deploy\" command.\n */\n RUSH_DEPLOY_TARGET_FOLDER: 'RUSH_DEPLOY_TARGET_FOLDER',\n /**\n * Overrides the location of the `~/.rush` global folder where Rush stores temporary files.\n *\n * @remarks\n *\n * Most of the temporary files created by Rush are stored separately for each monorepo working folder,\n * to avoid issues of concurrency and compatibility between tool versions. However, a small set\n * of files (e.g. installations of the `@microsoft/rush-lib` engine and the package manager) are stored\n * in a global folder to speed up installations. The default location is `~/.rush` on POSIX-like\n * operating systems or `C:\\Users\\YourName` on Windows.\n *\n * Use `RUSH_GLOBAL_FOLDER` to specify a different folder path. This is useful for example if a Windows\n * group policy forbids executing scripts installed in a user's home directory.\n *\n * POSIX is a registered trademark of the Institute of Electrical and Electronic Engineers, Inc.\n */\n RUSH_GLOBAL_FOLDER: 'RUSH_GLOBAL_FOLDER',\n /**\n * Provides a credential for a remote build cache, if configured. This credential overrides any cached credentials.\n *\n * @remarks\n * Setting this environment variable overrides whatever credential has been saved in the\n * local cloud cache credentials using `rush update-cloud-credentials`.\n *\n *\n * If Azure Blob Storage is used to store cache entries, this must be a SAS token serialized as query\n * parameters.\n *\n * For information on SAS tokens, see here: https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview\n */\n RUSH_BUILD_CACHE_CREDENTIAL: 'RUSH_BUILD_CACHE_CREDENTIAL',\n /**\n * Setting this environment variable overrides the value of `buildCacheEnabled` in the `build-cache.json`\n * configuration file.\n *\n * @remarks\n * Specify `1` to enable the build cache or `0` to disable it.\n *\n * If there is no build cache configured, then this environment variable is ignored.\n */\n RUSH_BUILD_CACHE_ENABLED: 'RUSH_BUILD_CACHE_ENABLED',\n /**\n * Overrides the value of `isCacheWriteAllowed` in the `build-cache.json` configuration file. The value of this\n * environment variable must be `1` (for true) or `0` (for false). If there is no build cache configured, then\n * this environment variable is ignored.\n */\n RUSH_BUILD_CACHE_WRITE_ALLOWED: 'RUSH_BUILD_CACHE_WRITE_ALLOWED',\n /**\n * Set this environment variable to a JSON string to override the build cache configuration that normally lives\n * at `common/config/rush/build-cache.json`.\n *\n * This is useful for testing purposes, or for OSS repos that are have a local-only cache, but can have\n * a different cache configuration in CI/CD pipelines.\n *\n * @remarks\n * This is similar to {@link EnvironmentVariableNames.RUSH_BUILD_CACHE_OVERRIDE_JSON_FILE_PATH}, but it allows you to specify\n * a JSON string instead of a file path. The two environment variables are mutually exclusive, meaning you can\n * only use one of them at a time.\n */\n RUSH_BUILD_CACHE_OVERRIDE_JSON: 'RUSH_BUILD_CACHE_OVERRIDE_JSON',\n /**\n * Set this environment variable to the path to a `build-cache.json` file to override the build cache configuration\n * that normally lives at `common/config/rush/build-cache.json`.\n *\n * This is useful for testing purposes, or for OSS repos that are have a local-only cache, but can have\n * a different cache configuration in CI/CD pipelines.\n *\n * @remarks\n * This is similar to {@link EnvironmentVariableNames.RUSH_BUILD_CACHE_OVERRIDE_JSON}, but it allows you to specify\n * a file path instead of a JSON string. The two environment variables are mutually exclusive, meaning you can\n * only use one of them at a time.\n */\n RUSH_BUILD_CACHE_OVERRIDE_JSON_FILE_PATH: 'RUSH_BUILD_CACHE_OVERRIDE_JSON_FILE_PATH',\n /**\n * Setting this environment variable opts into running with cobuilds. The context id should be the same across\n * multiple VMs, but changed when it is a new round of cobuilds.\n *\n * e.g. `Build.BuildNumber` in Azure DevOps Pipeline.\n *\n * @remarks\n * If there is no cobuild configured, then this environment variable is ignored.\n */\n RUSH_COBUILD_CONTEXT_ID: 'RUSH_COBUILD_CONTEXT_ID',\n /**\n * Explicitly specifies a name for each participating cobuild runner.\n *\n * Setting this environment variable opts into running with cobuilds.\n *\n * @remarks\n * This environment variable is optional, if it is not provided, a random id is used.\n *\n * If there is no cobuild configured, then this environment variable is ignored.\n */\n RUSH_COBUILD_RUNNER_ID: 'RUSH_COBUILD_RUNNER_ID',\n /**\n * If this variable is set to \"1\", When getting distributed builds, Rush will automatically handle the leaf project\n * with build cache \"disabled\" by writing to the cache in a special \"log files only mode\". This is useful when you\n * want to use Cobuilds to improve the performance in CI validations and the leaf projects have not enabled cache.\n */\n RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED: 'RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED',\n /**\n * Explicitly specifies the path for the Git binary that is invoked by certain Rush operations.\n */\n RUSH_GIT_BINARY_PATH: 'RUSH_GIT_BINARY_PATH',\n /**\n * Explicitly specifies the path for the `tar` binary that is invoked by certain Rush operations.\n */\n RUSH_TAR_BINARY_PATH: 'RUSH_TAR_BINARY_PATH',\n /**\n * Internal variable used by `rushx` when recursively invoking another `rushx` process, to avoid\n * nesting event hooks.\n */\n _RUSH_RECURSIVE_RUSHX_CALL: '_RUSH_RECURSIVE_RUSHX_CALL',\n /**\n * Internal variable that explicitly specifies the path for the version of `@microsoft/rush-lib` being executed.\n * Will be set upon loading Rush.\n */\n _RUSH_LIB_PATH: '_RUSH_LIB_PATH',\n /**\n * When Rush executes shell scripts, it sometimes changes the working directory to be a project folder or\n * the repository root folder. The original working directory (where the Rush command was invoked) is assigned\n * to the the child process's `RUSH_INVOKED_FOLDER` environment variable, in case it is needed by the script.\n *\n * @remarks\n * The `RUSH_INVOKED_FOLDER` variable is the same idea as the `INIT_CWD` variable that package managers\n * assign when they execute lifecycle scripts.\n */\n RUSH_INVOKED_FOLDER: 'RUSH_INVOKED_FOLDER',\n /**\n * When running a hook script, this environment variable communicates the original arguments\n * passed to the `rush` or `rushx` command.\n *\n * @remarks\n * Unlike `RUSH_INVOKED_FOLDER`, the `RUSH_INVOKED_ARGS` variable is only available for hook scripts.\n * Other lifecycle scripts should not make assumptions about Rush's command line syntax\n * if Rush did not explicitly pass along command-line parameters to their process.\n */\n RUSH_INVOKED_ARGS: 'RUSH_INVOKED_ARGS'\n};\n/**\n * Provides Rush-specific environment variable data. All Rush environment variables must start with \"RUSH_\". This class\n * is designed to be used by RushConfiguration.\n * @beta\n *\n * @remarks\n * Initialize will throw if any unknown parameters are present.\n */\nexport class EnvironmentConfiguration {\n /**\n * If true, the environment configuration has been validated and initialized.\n */\n static get hasBeenValidated() {\n return EnvironmentConfiguration._hasBeenValidated;\n }\n /**\n * An override for the common/temp folder path.\n */\n static get rushTempFolderOverride() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._rushTempFolderOverride;\n }\n /**\n * If \"1\", create symlinks with absolute paths instead of relative paths.\n * See {@link EnvironmentVariableNames.RUSH_ABSOLUTE_SYMLINKS}\n */\n static get absoluteSymlinks() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._absoluteSymlinks;\n }\n /**\n * If this environment variable is set to \"1\", the Node.js version check will print a warning\n * instead of causing a hard error if the environment's Node.js version doesn't match the\n * version specifier in `rush.json`'s \"nodeSupportedVersionRange\" property.\n *\n * See {@link EnvironmentVariableNames.RUSH_ALLOW_UNSUPPORTED_NODEJS}.\n */\n static get allowUnsupportedNodeVersion() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._allowUnsupportedNodeVersion;\n }\n /**\n * Setting this environment variable overrides the value of `allowWarningsInSuccessfulBuild`\n * in the `command-line.json` configuration file. Specify `1` to allow warnings in a successful build,\n * or `0` to disallow them. (See the comments in the command-line.json file for more information).\n */\n static get allowWarningsInSuccessfulBuild() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._allowWarningsInSuccessfulBuild;\n }\n /**\n * An override for the PNPM store path, if `pnpmStore` configuration is set to 'path'\n * See {@link EnvironmentVariableNames.RUSH_PNPM_STORE_PATH}\n */\n static get pnpmStorePathOverride() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._pnpmStorePathOverride;\n }\n /**\n * If specified, enables or disables integrity verification of the pnpm store during install.\n * See {@link EnvironmentVariableNames.RUSH_PNPM_VERIFY_STORE_INTEGRITY}\n */\n static get pnpmVerifyStoreIntegrity() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._pnpmVerifyStoreIntegrity;\n }\n /**\n * Overrides the location of the `~/.rush` global folder where Rush stores temporary files.\n * See {@link EnvironmentVariableNames.RUSH_GLOBAL_FOLDER}\n */\n static get rushGlobalFolderOverride() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._rushGlobalFolderOverride;\n }\n /**\n * Provides a credential for reading from and writing to a remote build cache, if configured.\n * See {@link EnvironmentVariableNames.RUSH_BUILD_CACHE_CREDENTIAL}\n */\n static get buildCacheCredential() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._buildCacheCredential;\n }\n /**\n * If set, enables or disables the cloud build cache feature.\n * See {@link EnvironmentVariableNames.RUSH_BUILD_CACHE_ENABLED}\n */\n static get buildCacheEnabled() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._buildCacheEnabled;\n }\n /**\n * If set, enables or disables writing to the cloud build cache.\n * See {@link EnvironmentVariableNames.RUSH_BUILD_CACHE_WRITE_ALLOWED}\n */\n static get buildCacheWriteAllowed() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._buildCacheWriteAllowed;\n }\n /**\n * If set, overrides the build cache configuration that normally lives at `common/config/rush/build-cache.json`.\n * See {@link EnvironmentVariableNames.RUSH_BUILD_CACHE_OVERRIDE_JSON}\n */\n static get buildCacheOverrideJson() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._buildCacheOverrideJson;\n }\n /**\n * If set, overrides the build cache configuration that normally lives at `common/config/rush/build-cache.json`.\n * See {@link EnvironmentVariableNames.RUSH_BUILD_CACHE_OVERRIDE_JSON_FILE_PATH}\n */\n static get buildCacheOverrideJsonFilePath() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._buildCacheOverrideJsonFilePath;\n }\n /**\n * Provides a determined cobuild context id if configured\n * See {@link EnvironmentVariableNames.RUSH_COBUILD_CONTEXT_ID}\n */\n static get cobuildContextId() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._cobuildContextId;\n }\n /**\n * Provides a determined cobuild runner id if configured\n * See {@link EnvironmentVariableNames.RUSH_COBUILD_RUNNER_ID}\n */\n static get cobuildRunnerId() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._cobuildRunnerId;\n }\n /**\n * If set, enables or disables the cobuild leaf project log only feature.\n * See {@link EnvironmentVariableNames.RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED}\n */\n static get cobuildLeafProjectLogOnlyAllowed() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._cobuildLeafProjectLogOnlyAllowed;\n }\n /**\n * Allows the git binary path to be explicitly provided.\n * See {@link EnvironmentVariableNames.RUSH_GIT_BINARY_PATH}\n */\n static get gitBinaryPath() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._gitBinaryPath;\n }\n /**\n * Allows the tar binary path to be explicitly provided.\n * See {@link EnvironmentVariableNames.RUSH_TAR_BINARY_PATH}\n */\n static get tarBinaryPath() {\n EnvironmentConfiguration._ensureValidated();\n return EnvironmentConfiguration._tarBinaryPath;\n }\n /**\n * The front-end RushVersionSelector relies on `RUSH_GLOBAL_FOLDER`, so its value must be read before\n * `EnvironmentConfiguration` is initialized (and actually before the correct version of `EnvironmentConfiguration`\n * is even installed). Thus we need to read this environment variable differently from all the others.\n * @internal\n */\n static _getRushGlobalFolderOverride(processEnv) {\n const value = processEnv[EnvironmentVariableNames.RUSH_GLOBAL_FOLDER];\n if (value) {\n const normalizedValue = EnvironmentConfiguration._normalizeDeepestParentFolderPath(value);\n return normalizedValue;\n }\n }\n /**\n * Reads and validates environment variables. If any are invalid, this function will throw.\n */\n static validate(options = {}) {\n var _a, _b, _c;\n EnvironmentConfiguration.reset();\n const unknownEnvVariables = [];\n for (const envVarName in process.env) {\n if (process.env.hasOwnProperty(envVarName) && envVarName.match(/^RUSH_/i)) {\n const value = process.env[envVarName];\n // Environment variables are only case-insensitive on Windows\n const normalizedEnvVarName = IS_WINDOWS ? envVarName.toUpperCase() : envVarName;\n switch (normalizedEnvVarName) {\n case EnvironmentVariableNames.RUSH_TEMP_FOLDER: {\n EnvironmentConfiguration._rushTempFolderOverride =\n value && !options.doNotNormalizePaths\n ? EnvironmentConfiguration._normalizeDeepestParentFolderPath(value) || value\n : value;\n break;\n }\n case EnvironmentVariableNames.RUSH_ABSOLUTE_SYMLINKS: {\n EnvironmentConfiguration._absoluteSymlinks =\n (_a = EnvironmentConfiguration.parseBooleanEnvironmentVariable(EnvironmentVariableNames.RUSH_ABSOLUTE_SYMLINKS, value)) !== null && _a !== void 0 ? _a : false;\n break;\n }\n case EnvironmentVariableNames.RUSH_ALLOW_UNSUPPORTED_NODEJS: {\n if (value === 'true' || value === 'false') {\n // Small, undocumented acceptance of old \"true\" and \"false\" values for\n // users of RUSH_ALLOW_UNSUPPORTED_NODEJS in rush pre-v5.46.\n EnvironmentConfiguration._allowUnsupportedNodeVersion = value === 'true';\n }\n else {\n EnvironmentConfiguration._allowUnsupportedNodeVersion =\n (_b = EnvironmentConfiguration.parseBooleanEnvironmentVariable(EnvironmentVariableNames.RUSH_ALLOW_UNSUPPORTED_NODEJS, value)) !== null && _b !== void 0 ? _b : false;\n }\n break;\n }\n case EnvironmentVariableNames.RUSH_ALLOW_WARNINGS_IN_SUCCESSFUL_BUILD: {\n EnvironmentConfiguration._allowWarningsInSuccessfulBuild =\n (_c = EnvironmentConfiguration.parseBooleanEnvironmentVariable(EnvironmentVariableNames.RUSH_ALLOW_WARNINGS_IN_SUCCESSFUL_BUILD, value)) !== null && _c !== void 0 ? _c : false;\n break;\n }\n case EnvironmentVariableNames.RUSH_PNPM_STORE_PATH: {\n EnvironmentConfiguration._pnpmStorePathOverride =\n value && !options.doNotNormalizePaths\n ? EnvironmentConfiguration._normalizeDeepestParentFolderPath(value) || value\n : value;\n break;\n }\n case EnvironmentVariableNames.RUSH_PNPM_VERIFY_STORE_INTEGRITY: {\n EnvironmentConfiguration._pnpmVerifyStoreIntegrity =\n value === '1' ? true : value === '0' ? false : undefined;\n break;\n }\n case EnvironmentVariableNames.RUSH_GLOBAL_FOLDER: {\n // Handled specially below\n break;\n }\n case EnvironmentVariableNames.RUSH_BUILD_CACHE_CREDENTIAL: {\n EnvironmentConfiguration._buildCacheCredential = value;\n break;\n }\n case EnvironmentVariableNames.RUSH_BUILD_CACHE_ENABLED: {\n EnvironmentConfiguration._buildCacheEnabled =\n EnvironmentConfiguration.parseBooleanEnvironmentVariable(EnvironmentVariableNames.RUSH_BUILD_CACHE_ENABLED, value);\n break;\n }\n case EnvironmentVariableNames.RUSH_BUILD_CACHE_WRITE_ALLOWED: {\n EnvironmentConfiguration._buildCacheWriteAllowed =\n EnvironmentConfiguration.parseBooleanEnvironmentVariable(EnvironmentVariableNames.RUSH_BUILD_CACHE_WRITE_ALLOWED, value);\n break;\n }\n case EnvironmentVariableNames.RUSH_BUILD_CACHE_OVERRIDE_JSON: {\n EnvironmentConfiguration._buildCacheOverrideJson = value;\n break;\n }\n case EnvironmentVariableNames.RUSH_BUILD_CACHE_OVERRIDE_JSON_FILE_PATH: {\n EnvironmentConfiguration._buildCacheOverrideJsonFilePath = value;\n break;\n }\n case EnvironmentVariableNames.RUSH_COBUILD_CONTEXT_ID: {\n EnvironmentConfiguration._cobuildContextId = value;\n break;\n }\n case EnvironmentVariableNames.RUSH_COBUILD_RUNNER_ID: {\n EnvironmentConfiguration._cobuildRunnerId = value;\n break;\n }\n case EnvironmentVariableNames.RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED: {\n EnvironmentConfiguration._cobuildLeafProjectLogOnlyAllowed =\n EnvironmentConfiguration.parseBooleanEnvironmentVariable(EnvironmentVariableNames.RUSH_COBUILD_LEAF_PROJECT_LOG_ONLY_ALLOWED, value);\n break;\n }\n case EnvironmentVariableNames.RUSH_GIT_BINARY_PATH: {\n EnvironmentConfiguration._gitBinaryPath = value;\n break;\n }\n case EnvironmentVariableNames.RUSH_TAR_BINARY_PATH: {\n EnvironmentConfiguration._tarBinaryPath = value;\n break;\n }\n case EnvironmentVariableNames.RUSH_PARALLELISM:\n case EnvironmentVariableNames.RUSH_PREVIEW_VERSION:\n case EnvironmentVariableNames.RUSH_VARIANT:\n case EnvironmentVariableNames.RUSH_DEPLOY_TARGET_FOLDER:\n // Handled by @microsoft/rush front end\n break;\n case EnvironmentVariableNames.RUSH_INVOKED_FOLDER:\n case EnvironmentVariableNames.RUSH_INVOKED_ARGS:\n case EnvironmentVariableNames._RUSH_LIB_PATH:\n // Assigned by Rush itself\n break;\n case EnvironmentVariableNames._RUSH_RECURSIVE_RUSHX_CALL:\n // Assigned/read internally by RushXCommandLine\n break;\n default:\n unknownEnvVariables.push(envVarName);\n break;\n }\n }\n }\n // This strictness intends to catch mistakes where variables are misspelled or not used correctly.\n if (unknownEnvVariables.length > 0) {\n throw new Error('The following environment variables were found with the \"RUSH_\" prefix, but they are not ' +\n `recognized by this version of Rush: ${unknownEnvVariables.join(', ')}`);\n }\n if (EnvironmentConfiguration._buildCacheOverrideJsonFilePath &&\n EnvironmentConfiguration._buildCacheOverrideJson) {\n throw new Error(`Environment variable ${EnvironmentVariableNames.RUSH_BUILD_CACHE_OVERRIDE_JSON_FILE_PATH} and ` +\n `${EnvironmentVariableNames.RUSH_BUILD_CACHE_OVERRIDE_JSON} are mutually exclusive. ` +\n `Only one may be specified.`);\n }\n // See doc comment for EnvironmentConfiguration._getRushGlobalFolderOverride().\n EnvironmentConfiguration._rushGlobalFolderOverride =\n EnvironmentConfiguration._getRushGlobalFolderOverride(process.env);\n EnvironmentConfiguration._hasBeenValidated = true;\n }\n /**\n * Resets EnvironmentConfiguration into an un-initialized state.\n */\n static reset() {\n EnvironmentConfiguration._rushTempFolderOverride = undefined;\n EnvironmentConfiguration._hasBeenValidated = false;\n }\n static _ensureValidated() {\n if (!EnvironmentConfiguration._hasBeenValidated) {\n EnvironmentConfiguration.validate();\n }\n }\n static parseBooleanEnvironmentVariable(name, value) {\n if (value === '' || value === undefined) {\n return undefined;\n }\n else if (value === '0') {\n return false;\n }\n else if (value === '1') {\n return true;\n }\n else {\n throw new Error(`Invalid value \"${value}\" for the environment variable ${name}. Valid choices are 0 or 1.`);\n }\n }\n /**\n * Given a path to a folder (that may or may not exist), normalize the path, including casing,\n * to the first existing parent folder in the path.\n *\n * If no existing path can be found (for example, if the root is a volume that doesn't exist),\n * this function returns undefined.\n *\n * @example\n * If the following path exists on disk: `C:\\Folder1\\folder2\\`\n * _normalizeFirstExistingFolderPath('c:\\\\folder1\\\\folder2\\\\temp\\\\subfolder')\n * returns 'C:\\\\Folder1\\\\folder2\\\\temp\\\\subfolder'\n */\n static _normalizeDeepestParentFolderPath(folderPath) {\n folderPath = path.normalize(folderPath);\n const endsWithSlash = folderPath.charAt(folderPath.length - 1) === path.sep;\n const parsedPath = path.parse(folderPath);\n const pathRoot = parsedPath.root;\n const pathWithoutRoot = parsedPath.dir.substr(pathRoot.length);\n const pathParts = [...pathWithoutRoot.split(path.sep), parsedPath.name].filter((part) => !!part);\n // Starting with all path sections, and eliminating one from the end during each loop iteration,\n // run trueCasePathSync. If trueCasePathSync returns without exception, we've found a subset\n // of the path that exists and we've now gotten the correct casing.\n //\n // Once we've found a parent folder that exists, append the path sections that didn't exist.\n for (let i = pathParts.length; i >= 0; i--) {\n const constructedPath = path.join(pathRoot, ...pathParts.slice(0, i));\n try {\n const normalizedConstructedPath = trueCasePathSync(constructedPath);\n const result = path.join(normalizedConstructedPath, ...pathParts.slice(i));\n if (endsWithSlash) {\n return `${result}${path.sep}`;\n }\n else {\n return result;\n }\n }\n catch (e) {\n // This path doesn't exist, continue to the next subpath\n }\n }\n return undefined;\n }\n}\nEnvironmentConfiguration._hasBeenValidated = false;\nEnvironmentConfiguration._absoluteSymlinks = false;\nEnvironmentConfiguration._allowUnsupportedNodeVersion = false;\nEnvironmentConfiguration._allowWarningsInSuccessfulBuild = false;\n//# sourceMappingURL=EnvironmentConfiguration.js.map","// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nimport * as path from 'node:path';\nimport { User } from '@rushstack/node-core-library';\nimport { EnvironmentConfiguration } from './EnvironmentConfiguration';\n/**\n * This class provides global folders that are used for rush's internal install locations.\n *\n * @internal\n */\nexport class RushGlobalFolder {\n constructor() {\n // Because RushGlobalFolder is used by the front-end VersionSelector before EnvironmentConfiguration\n // is initialized, we need to read it using a special internal API.\n const rushGlobalFolderOverride = EnvironmentConfiguration._getRushGlobalFolderOverride(process.env);\n if (rushGlobalFolderOverride !== undefined) {\n this.path = rushGlobalFolderOverride;\n }\n else {\n this.path = path.join(User.getHomeFolder(), '.rush');\n }\n const normalizedNodeVersion = process.version.match(/^[a-z0-9\\-\\.]+$/i)\n ? process.version\n : 'unknown-version';\n this.nodeSpecificPath = path.join(this.path, `node-${normalizedNodeVersion}`);\n }\n}\n//# sourceMappingURL=RushGlobalFolder.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sdkContext = exports.RUSH_LIB_PATH_ENV_VAR_NAME = exports.RUSH_LIB_NAME = void 0;\nexports.tryFindRushJsonLocation = tryFindRushJsonLocation;\nexports._require = _require;\nexports.requireRushLibUnderFolderPath = requireRushLibUnderFolderPath;\nconst path = __importStar(require(\"node:path\"));\nconst node_core_library_1 = require(\"@rushstack/node-core-library\");\nexports.RUSH_LIB_NAME = '@microsoft/rush-lib';\nexports.RUSH_LIB_PATH_ENV_VAR_NAME = '_RUSH_LIB_PATH';\nexports.sdkContext = {\n rushLibModule: undefined\n};\n/**\n * Find the rush.json location and return the path, or undefined if a rush.json can't be found.\n *\n * @privateRemarks\n * Keep this in sync with `RushConfiguration.tryFindRushJsonLocation`.\n */\nfunction tryFindRushJsonLocation(startingFolder) {\n let currentFolder = startingFolder;\n // Look upwards at parent folders until we find a folder containing rush.json\n for (let i = 0; i < 10; ++i) {\n const rushJsonFilename = path.join(currentFolder, 'rush.json');\n if (node_core_library_1.FileSystem.exists(rushJsonFilename)) {\n return rushJsonFilename;\n }\n const parentFolder = path.dirname(currentFolder);\n if (parentFolder === currentFolder) {\n break;\n }\n currentFolder = parentFolder;\n }\n return undefined;\n}\nfunction _require(moduleName) {\n if (typeof __non_webpack_require__ === 'function') {\n // If this library has been bundled with Webpack, we need to call the real `require` function\n // that doesn't get turned into a `__webpack_require__` statement.\n // `__non_webpack_require__` is a Webpack macro that gets turned into a `require` statement\n // during bundling.\n return __non_webpack_require__(moduleName);\n }\n else {\n return require(moduleName);\n }\n}\n/**\n * Require `@microsoft/rush-lib` under the specified folder path.\n */\nfunction requireRushLibUnderFolderPath(folderPath) {\n const rushLibModulePath = node_core_library_1.Import.resolveModule({\n modulePath: exports.RUSH_LIB_NAME,\n baseFolderPath: folderPath\n });\n return _require(rushLibModulePath);\n}\n//# sourceMappingURL=helpers.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._rushSdk_loadInternalModule = _rushSdk_loadInternalModule;\nconst path = __importStar(require(\"node:path\"));\nconst node_core_library_1 = require(\"@rushstack/node-core-library\");\nconst terminal_1 = require(\"@rushstack/terminal\");\nconst RushGlobalFolder_1 = require(\"@microsoft/rush-lib/lib-esnext/api/RushGlobalFolder\");\nconst helpers_1 = require(\"./helpers\");\nconst verboseEnabled = typeof process !== 'undefined' &&\n (process.env.RUSH_SDK_DEBUG === '1' || process.env._RUSH_SDK_DEBUG === '1');\nconst terminal = new terminal_1.Terminal(new terminal_1.ConsoleTerminalProvider({\n verboseEnabled\n}));\nlet errorMessage = '';\n// SCENARIO 1: Rush's PluginManager has initialized \"rush-sdk\" with Rush's own instance of rush-lib.\n// The Rush host process will assign \"global.___rush___rushLibModule\" before loading the plugin.\nif (helpers_1.sdkContext.rushLibModule === undefined) {\n helpers_1.sdkContext.rushLibModule =\n global.___rush___rushLibModule ||\n global.___rush___rushLibModuleFromEnvironment ||\n global.___rush___rushLibModuleFromRushGlobalFolder ||\n global.___rush___rushLibModuleFromInstallAndRunRush;\n}\n// SCENARIO 2: The project importing \"rush-sdk\" has installed its own instance of \"rush-lib\"\n// as a package.json dependency. For example, this is used by the Jest tests for Rush plugins.\nif (helpers_1.sdkContext.rushLibModule === undefined) {\n const importingPath = (_a = module === null || module === void 0 ? void 0 : module.parent) === null || _a === void 0 ? void 0 : _a.filename;\n if (importingPath) {\n const callerPackageFolder = node_core_library_1.PackageJsonLookup.instance.tryGetPackageFolderFor(importingPath);\n if (callerPackageFolder !== undefined) {\n const callerPackageJson = (0, helpers_1._require)(path.join(callerPackageFolder, 'package.json'));\n // Does the caller properly declare a dependency on rush-lib?\n if ((callerPackageJson.dependencies && callerPackageJson.dependencies[helpers_1.RUSH_LIB_NAME] !== undefined) ||\n (callerPackageJson.devDependencies &&\n callerPackageJson.devDependencies[helpers_1.RUSH_LIB_NAME] !== undefined) ||\n (callerPackageJson.peerDependencies &&\n callerPackageJson.peerDependencies[helpers_1.RUSH_LIB_NAME] !== undefined)) {\n // Try to resolve rush-lib from the caller's folder\n terminal.writeVerboseLine(`Try to load ${helpers_1.RUSH_LIB_NAME} from caller package`);\n try {\n helpers_1.sdkContext.rushLibModule = (0, helpers_1.requireRushLibUnderFolderPath)(callerPackageFolder);\n }\n catch (error) {\n // If we fail to resolve it, ignore the error\n terminal.writeVerboseLine(`Failed to load ${helpers_1.RUSH_LIB_NAME} from caller package`);\n }\n // If two different libraries invoke `rush-sdk`, and one of them provides \"rush-lib\"\n // then the first version to be loaded wins. We do not support side-by-side instances of \"rush-lib\".\n if (helpers_1.sdkContext.rushLibModule !== undefined) {\n // to track which scenario is active and how it got initialized.\n global.___rush___rushLibModule = helpers_1.sdkContext.rushLibModule;\n terminal.writeVerboseLine(`Loaded ${helpers_1.RUSH_LIB_NAME} from caller`);\n }\n }\n }\n }\n}\n// SCENARIO 3: A tool or script has been invoked as a child process by an instance of \"rush-lib\" and can use the\n// version that invoked it. In this case, use process.env._RUSH_LIB_PATH to find \"rush-lib\".\nif (helpers_1.sdkContext.rushLibModule === undefined) {\n const rushLibPath = process.env[helpers_1.RUSH_LIB_PATH_ENV_VAR_NAME];\n if (rushLibPath) {\n terminal.writeVerboseLine(`Try to load ${helpers_1.RUSH_LIB_NAME} from process.env.${helpers_1.RUSH_LIB_PATH_ENV_VAR_NAME} from caller package`);\n try {\n helpers_1.sdkContext.rushLibModule = (0, helpers_1._require)(rushLibPath);\n }\n catch (error) {\n // Log this as a warning, since it is unexpected to define an incorrect value of the variable.\n terminal.writeWarningLine(`Failed to load ${helpers_1.RUSH_LIB_NAME} via process.env.${helpers_1.RUSH_LIB_PATH_ENV_VAR_NAME}`);\n }\n if (helpers_1.sdkContext.rushLibModule !== undefined) {\n // to track which scenario is active and how it got initialized.\n global.___rush___rushLibModuleFromEnvironment = helpers_1.sdkContext.rushLibModule;\n terminal.writeVerboseLine(`Loaded ${helpers_1.RUSH_LIB_NAME} from process.env.${helpers_1.RUSH_LIB_PATH_ENV_VAR_NAME}`);\n }\n }\n}\n// SCENARIO 4: A standalone tool or script depends on \"rush-sdk\", and is meant to be used inside a monorepo folder.\n// In this case, we can first load the rush-lib version in rush global folder. If the expected version is not installed,\n// using install-run-rush.js to obtain the appropriate rush-lib version for the monorepo.\nif (helpers_1.sdkContext.rushLibModule === undefined) {\n try {\n const rushJsonPath = (0, helpers_1.tryFindRushJsonLocation)(process.cwd());\n if (!rushJsonPath) {\n throw new Error('Unable to find rush.json in the current folder or its parent folders.\\n' +\n 'This tool is meant to be invoked from a working directory inside a Rush repository.');\n }\n const monorepoRoot = path.dirname(rushJsonPath);\n const rushJson = node_core_library_1.JsonFile.load(rushJsonPath);\n const { rushVersion } = rushJson;\n try {\n terminal.writeVerboseLine(`Try to load ${helpers_1.RUSH_LIB_NAME} from rush global folder`);\n const rushGlobalFolder = new RushGlobalFolder_1.RushGlobalFolder();\n // The path needs to keep align with the logic inside RushVersionSelector\n const expectedGlobalRushInstalledFolder = `${rushGlobalFolder.nodeSpecificPath}/rush-${rushVersion}`;\n terminal.writeVerboseLine(`The expected global rush installed folder is \"${expectedGlobalRushInstalledFolder}\"`);\n helpers_1.sdkContext.rushLibModule = (0, helpers_1.requireRushLibUnderFolderPath)(expectedGlobalRushInstalledFolder);\n }\n catch (e) {\n terminal.writeVerboseLine(`Failed to load ${helpers_1.RUSH_LIB_NAME} from rush global folder: ${e.message}`);\n }\n if (helpers_1.sdkContext.rushLibModule !== undefined) {\n // to track which scenario is active and how it got initialized.\n global.___rush___rushLibModuleFromRushGlobalFolder = helpers_1.sdkContext.rushLibModule;\n terminal.writeVerboseLine(`Loaded ${helpers_1.RUSH_LIB_NAME} installed from rush global folder`);\n }\n else {\n const installRunNodeModuleFolder = `${monorepoRoot}/common/temp/install-run/@microsoft+rush@${rushVersion}`;\n try {\n // First, try to load the version of \"rush-lib\" that was installed by install-run-rush.js\n terminal.writeVerboseLine(`Trying to load ${helpers_1.RUSH_LIB_NAME} installed by install-run-rush`);\n helpers_1.sdkContext.rushLibModule = (0, helpers_1.requireRushLibUnderFolderPath)(installRunNodeModuleFolder);\n }\n catch (e1) {\n let installAndRunRushStderrContent = '';\n try {\n const installAndRunRushJSPath = `${monorepoRoot}/common/scripts/install-run-rush.js`;\n terminal.writeLine('The Rush engine has not been installed yet. Invoking install-run-rush.js...');\n const installAndRunRushProcess = node_core_library_1.Executable.spawnSync('node', [installAndRunRushJSPath, '--help'], {\n stdio: 'pipe'\n });\n installAndRunRushStderrContent = installAndRunRushProcess.stderr;\n if (installAndRunRushProcess.status !== 0) {\n throw new Error(`The ${helpers_1.RUSH_LIB_NAME} package failed to install`);\n }\n // Retry to load \"rush-lib\" after install-run-rush run\n terminal.writeVerboseLine(`Trying to load ${helpers_1.RUSH_LIB_NAME} installed by install-run-rush a second time`);\n helpers_1.sdkContext.rushLibModule = (0, helpers_1.requireRushLibUnderFolderPath)(installRunNodeModuleFolder);\n }\n catch (e2) {\n // eslint-disable-next-line no-console\n console.error(`${installAndRunRushStderrContent}`);\n throw new Error(`The ${helpers_1.RUSH_LIB_NAME} package failed to load`);\n }\n }\n if (helpers_1.sdkContext.rushLibModule !== undefined) {\n // to track which scenario is active and how it got initialized.\n global.___rush___rushLibModuleFromInstallAndRunRush = helpers_1.sdkContext.rushLibModule;\n terminal.writeVerboseLine(`Loaded ${helpers_1.RUSH_LIB_NAME} installed by install-run-rush`);\n }\n }\n }\n catch (e) {\n // no-catch\n errorMessage = e.message;\n }\n}\nif (helpers_1.sdkContext.rushLibModule === undefined) {\n // This error indicates that a project is trying to import \"@rushstack/rush-sdk\", but the Rush engine\n // instance cannot be found. If you are writing Jest tests for a Rush plugin, add \"@microsoft/rush-lib\"\n // to the devDependencies for your project.\n // eslint-disable-next-line no-console\n console.error(`Error: The @rushstack/rush-sdk package was not able to load the Rush engine:\n${errorMessage}\n`);\n process.exit(1);\n}\n// Based on TypeScript's __exportStar()\nfor (const property in helpers_1.sdkContext.rushLibModule) {\n if (property !== 'default' && !exports.hasOwnProperty(property)) {\n const rushLibModuleForClosure = helpers_1.sdkContext.rushLibModule;\n // Based on TypeScript's __createBinding()\n Object.defineProperty(exports, property, {\n enumerable: true,\n get: function () {\n return rushLibModuleForClosure[property];\n }\n });\n }\n}\n/**\n * Used by the .js stubs for path-based imports of `@microsoft/rush-lib` internal APIs.\n */\nfunction _rushSdk_loadInternalModule(srcImportPath) {\n if (!exports._RushInternals) {\n throw new Error(`Rush version ${exports.Rush.version} does not support internal API imports via rush-sdk`);\n }\n return exports._RushInternals.loadModule(srcImportPath);\n}\n//# sourceMappingURL=index.js.map","module.exports = require(\"@rushstack/node-core-library\");","module.exports = require(\"@rushstack/terminal\");","module.exports = require(\"fs\");","module.exports = require(\"node:path\");","module.exports = require(\"os\");","module.exports = require(\"path\");","module.exports = require(\"util\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Check if module exists (development only)\n\tif (__webpack_modules__[moduleId] === undefined) {\n\t\tvar e = new Error(\"Cannot find module '\" + moduleId + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./lib-commonjs/index.js\");\n",""],"names":[],"ignoreList":[],"sourceRoot":""}
|
package/lib-shim/loader.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
/******/ "use strict";
|
|
3
3
|
/******/ var __webpack_modules__ = ({
|
|
4
4
|
|
|
5
|
-
/***/ "./lib-commonjs/helpers.js"
|
|
5
|
+
/***/ "./lib-commonjs/helpers.js"
|
|
6
6
|
/*!*********************************!*\
|
|
7
7
|
!*** ./lib-commonjs/helpers.js ***!
|
|
8
8
|
\*********************************/
|
|
9
|
-
|
|
9
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
@@ -102,13 +102,13 @@ function requireRushLibUnderFolderPath(folderPath) {
|
|
|
102
102
|
}
|
|
103
103
|
//# sourceMappingURL=helpers.js.map
|
|
104
104
|
|
|
105
|
-
/***/ }
|
|
105
|
+
/***/ },
|
|
106
106
|
|
|
107
|
-
/***/ "./lib-commonjs/loader.js"
|
|
107
|
+
/***/ "./lib-commonjs/loader.js"
|
|
108
108
|
/*!********************************!*\
|
|
109
109
|
!*** ./lib-commonjs/loader.js ***!
|
|
110
110
|
\********************************/
|
|
111
|
-
|
|
111
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
112
112
|
|
|
113
113
|
|
|
114
114
|
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
@@ -314,27 +314,27 @@ class RushSdkLoader {
|
|
|
314
314
|
exports.RushSdkLoader = RushSdkLoader;
|
|
315
315
|
//# sourceMappingURL=loader.js.map
|
|
316
316
|
|
|
317
|
-
/***/ }
|
|
317
|
+
/***/ },
|
|
318
318
|
|
|
319
|
-
/***/ "@rushstack/node-core-library"
|
|
319
|
+
/***/ "@rushstack/node-core-library"
|
|
320
320
|
/*!***********************************************!*\
|
|
321
321
|
!*** external "@rushstack/node-core-library" ***!
|
|
322
322
|
\***********************************************/
|
|
323
|
-
|
|
323
|
+
(module) {
|
|
324
324
|
|
|
325
325
|
module.exports = require("@rushstack/node-core-library");
|
|
326
326
|
|
|
327
|
-
/***/ }
|
|
327
|
+
/***/ },
|
|
328
328
|
|
|
329
|
-
/***/ "node:path"
|
|
329
|
+
/***/ "node:path"
|
|
330
330
|
/*!****************************!*\
|
|
331
331
|
!*** external "node:path" ***!
|
|
332
332
|
\****************************/
|
|
333
|
-
|
|
333
|
+
(module) {
|
|
334
334
|
|
|
335
335
|
module.exports = require("node:path");
|
|
336
336
|
|
|
337
|
-
/***/ }
|
|
337
|
+
/***/ }
|
|
338
338
|
|
|
339
339
|
/******/ });
|
|
340
340
|
/************************************************************************/
|
|
@@ -348,6 +348,12 @@ module.exports = require("node:path");
|
|
|
348
348
|
/******/ if (cachedModule !== undefined) {
|
|
349
349
|
/******/ return cachedModule.exports;
|
|
350
350
|
/******/ }
|
|
351
|
+
/******/ // Check if module exists (development only)
|
|
352
|
+
/******/ if (__webpack_modules__[moduleId] === undefined) {
|
|
353
|
+
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
354
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
355
|
+
/******/ throw e;
|
|
356
|
+
/******/ }
|
|
351
357
|
/******/ // Create a new module (and put it into the cache)
|
|
352
358
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
353
359
|
/******/ // no module.id needed
|
package/lib-shim/loader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.js","mappings":";;;;;;;;;;AAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,GAAG,kCAAkC,GAAG,qBAAqB;AAC/E,+BAA+B;AAC/B,gBAAgB;AAChB,qCAAqC;AACrC,0BAA0B,mBAAO,CAAC,4BAAW;AAC7C,4BAA4B,mBAAO,CAAC,kEAA8B;AAClE,qBAAqB;AACrB,kCAAkC;AAClC,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAuB;AACtC;AACA;AACA;AACA;AACA,eAAe,OAAuB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,mC;;;;;;;;;;AC5Fa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB;AACA,0BAA0B,mBAAO,CAAC,4BAAW;AAC7C,4BAA4B,mBAAO,CAAC,kEAA8B;AAClE,kBAAkB,mBAAO,CAAC,4CAAW;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,8BAA8B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA,oBAAoB,cAAc;AAClC,kHAAkH,YAAY;AAC9H;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,yBAAyB;AAC9E,yBAAyB;AACzB;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,+CAA+C,yBAAyB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,yBAAyB;AAClF,6BAA6B;AAC7B;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,+BAA+B;AACpE,2CAA2C,yBAAyB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,yBAAyB;AACrE,yBAAyB;AACzB;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,kC;;;;;;;;;;AC1MA,yD;;;;;;;;;;ACAA,sC;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack://@rushstack/rush-sdk/./lib-commonjs/helpers.js","webpack://@rushstack/rush-sdk/./lib-commonjs/loader.js","webpack://@rushstack/rush-sdk/external commonjs \"@rushstack/node-core-library\"","webpack://@rushstack/rush-sdk/external node-commonjs \"node:path\"","webpack://@rushstack/rush-sdk/webpack/bootstrap","webpack://@rushstack/rush-sdk/webpack/before-startup","webpack://@rushstack/rush-sdk/webpack/startup","webpack://@rushstack/rush-sdk/webpack/after-startup"],"sourcesContent":["\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sdkContext = exports.RUSH_LIB_PATH_ENV_VAR_NAME = exports.RUSH_LIB_NAME = void 0;\nexports.tryFindRushJsonLocation = tryFindRushJsonLocation;\nexports._require = _require;\nexports.requireRushLibUnderFolderPath = requireRushLibUnderFolderPath;\nconst path = __importStar(require(\"node:path\"));\nconst node_core_library_1 = require(\"@rushstack/node-core-library\");\nexports.RUSH_LIB_NAME = '@microsoft/rush-lib';\nexports.RUSH_LIB_PATH_ENV_VAR_NAME = '_RUSH_LIB_PATH';\nexports.sdkContext = {\n rushLibModule: undefined\n};\n/**\n * Find the rush.json location and return the path, or undefined if a rush.json can't be found.\n *\n * @privateRemarks\n * Keep this in sync with `RushConfiguration.tryFindRushJsonLocation`.\n */\nfunction tryFindRushJsonLocation(startingFolder) {\n let currentFolder = startingFolder;\n // Look upwards at parent folders until we find a folder containing rush.json\n for (let i = 0; i < 10; ++i) {\n const rushJsonFilename = path.join(currentFolder, 'rush.json');\n if (node_core_library_1.FileSystem.exists(rushJsonFilename)) {\n return rushJsonFilename;\n }\n const parentFolder = path.dirname(currentFolder);\n if (parentFolder === currentFolder) {\n break;\n }\n currentFolder = parentFolder;\n }\n return undefined;\n}\nfunction _require(moduleName) {\n if (typeof __non_webpack_require__ === 'function') {\n // If this library has been bundled with Webpack, we need to call the real `require` function\n // that doesn't get turned into a `__webpack_require__` statement.\n // `__non_webpack_require__` is a Webpack macro that gets turned into a `require` statement\n // during bundling.\n return __non_webpack_require__(moduleName);\n }\n else {\n return require(moduleName);\n }\n}\n/**\n * Require `@microsoft/rush-lib` under the specified folder path.\n */\nfunction requireRushLibUnderFolderPath(folderPath) {\n const rushLibModulePath = node_core_library_1.Import.resolveModule({\n modulePath: exports.RUSH_LIB_NAME,\n baseFolderPath: folderPath\n });\n return _require(rushLibModulePath);\n}\n//# sourceMappingURL=helpers.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RushSdkLoader = void 0;\n/// <reference types=\"node\" preserve=\"true\" />\nconst path = __importStar(require(\"node:path\"));\nconst node_core_library_1 = require(\"@rushstack/node-core-library\");\nconst helpers_1 = require(\"./helpers\");\n/**\n * Exposes operations that control how the `@microsoft/rush-lib` engine is\n * located and loaded.\n * @public\n */\nclass RushSdkLoader {\n /**\n * Throws an \"AbortError\" exception if abortSignal.aborted is true.\n */\n static _checkForCancel(abortSignal, onNotifyEvent, progressPercent) {\n if (!(abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted)) {\n return;\n }\n if (onNotifyEvent) {\n onNotifyEvent({\n logMessage: {\n kind: 'info',\n text: `The operation was canceled`\n },\n progressPercent\n });\n }\n const error = new Error('The operation was canceled');\n error.name = 'AbortError';\n throw error;\n }\n /**\n * Returns true if the Rush engine has already been loaded.\n */\n static get isLoaded() {\n return helpers_1.sdkContext.rushLibModule !== undefined;\n }\n /**\n * Manually load the Rush engine based on rush.json found for `rushJsonSearchFolder`.\n * Throws an exception if {@link RushSdkLoader.isLoaded} is already `true`.\n *\n * @remarks\n * This API supports an callback that can be used display a progress bar,\n * log of operations, and allow the operation to be canceled prematurely.\n */\n static async loadAsync(options) {\n // SCENARIO 5: The rush-lib engine is loaded manually using rushSdkLoader.loadAsync().\n var _a, _b;\n if (!options) {\n options = {};\n }\n if (RushSdkLoader.isLoaded) {\n throw new Error('RushSdkLoader.loadAsync() failed because the Rush engine has already been loaded');\n }\n const onNotifyEvent = options.onNotifyEvent;\n let progressPercent = undefined;\n const abortSignal = options.abortSignal;\n try {\n const rushJsonSearchFolder = (_a = options.rushJsonSearchFolder) !== null && _a !== void 0 ? _a : process.cwd();\n if (onNotifyEvent) {\n onNotifyEvent({\n logMessage: {\n kind: 'debug',\n text: `Searching for rush.json starting from: ` + rushJsonSearchFolder\n },\n progressPercent\n });\n }\n const rushJsonPath = (0, helpers_1.tryFindRushJsonLocation)(rushJsonSearchFolder);\n if (!rushJsonPath) {\n throw new Error('Unable to find rush.json in the specified folder or its parent folders:\\n' +\n `${rushJsonSearchFolder}\\n`);\n }\n const monorepoRoot = path.dirname(rushJsonPath);\n const rushJson = await node_core_library_1.JsonFile.loadAsync(rushJsonPath);\n const { rushVersion } = rushJson;\n const installRunNodeModuleFolder = path.join(monorepoRoot, `common/temp/install-run/@microsoft+rush@${rushVersion}`);\n try {\n // First, try to load the version of \"rush-lib\" that was installed by install-run-rush.js\n if (onNotifyEvent) {\n onNotifyEvent({\n logMessage: {\n kind: 'info',\n text: `Trying to load ${helpers_1.RUSH_LIB_NAME} installed by install-run-rush`\n },\n progressPercent\n });\n }\n helpers_1.sdkContext.rushLibModule = (0, helpers_1.requireRushLibUnderFolderPath)(installRunNodeModuleFolder);\n }\n catch (e1) {\n let installAndRunRushStderrContent = '';\n try {\n const installAndRunRushJSPath = path.join(monorepoRoot, 'common/scripts/install-run-rush.js');\n if (onNotifyEvent) {\n onNotifyEvent({\n logMessage: {\n kind: 'info',\n text: 'The Rush engine has not been installed yet. Invoking install-run-rush.js...'\n },\n progressPercent\n });\n }\n // Start the installation\n progressPercent = 0;\n const installAndRunRushProcess = node_core_library_1.Executable.spawnSync('node', [installAndRunRushJSPath, '--help'], {\n stdio: 'pipe'\n });\n installAndRunRushStderrContent = installAndRunRushProcess.stderr;\n if (installAndRunRushProcess.status !== 0) {\n throw new Error(`The ${helpers_1.RUSH_LIB_NAME} package failed to install`);\n }\n if (abortSignal) {\n RushSdkLoader._checkForCancel(abortSignal, onNotifyEvent, progressPercent);\n }\n // TODO: Implement incremental progress updates\n progressPercent = 90;\n // Retry to load \"rush-lib\" after install-run-rush run\n if (onNotifyEvent) {\n onNotifyEvent({\n logMessage: {\n kind: 'debug',\n text: `Trying to load ${helpers_1.RUSH_LIB_NAME} installed by install-run-rush a second time`\n },\n progressPercent\n });\n }\n helpers_1.sdkContext.rushLibModule = (0, helpers_1.requireRushLibUnderFolderPath)(installRunNodeModuleFolder);\n progressPercent = 100;\n }\n catch (e2) {\n // eslint-disable-next-line no-console\n console.error(`${installAndRunRushStderrContent}`);\n throw new Error(`The ${helpers_1.RUSH_LIB_NAME} package failed to load`);\n }\n }\n if (helpers_1.sdkContext.rushLibModule !== undefined) {\n // to track which scenario is active and how it got initialized.\n global.___rush___rushLibModuleFromInstallAndRunRush = helpers_1.sdkContext.rushLibModule;\n if (onNotifyEvent) {\n onNotifyEvent({\n logMessage: {\n kind: 'debug',\n text: `Loaded ${helpers_1.RUSH_LIB_NAME} installed by install-run-rush`\n },\n progressPercent\n });\n }\n }\n }\n catch (e) {\n if (onNotifyEvent) {\n onNotifyEvent({\n logMessage: {\n kind: 'info',\n text: 'The operation failed: ' + ((_b = e.message) !== null && _b !== void 0 ? _b : 'An unknown error occurred')\n },\n progressPercent\n });\n }\n throw e;\n }\n }\n}\nexports.RushSdkLoader = RushSdkLoader;\n//# sourceMappingURL=loader.js.map","module.exports = require(\"@rushstack/node-core-library\");","module.exports = require(\"node:path\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./lib-commonjs/loader.js\");\n",""],"names":[],"ignoreList":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"loader.js","mappings":";;;;;;;;;;AAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,GAAG,kCAAkC,GAAG,qBAAqB;AAC/E,+BAA+B;AAC/B,gBAAgB;AAChB,qCAAqC;AACrC,0BAA0B,mBAAO,CAAC,4BAAW;AAC7C,4BAA4B,mBAAO,CAAC,kEAA8B;AAClE,qBAAqB;AACrB,kCAAkC;AAClC,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAuB;AACtC;AACA;AACA;AACA;AACA,eAAe,OAAuB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,mC;;;;;;;;;;AC5Fa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA,0CAA0C,4BAA4B;AACtE,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA,CAAC;AACD,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB;AACA,0BAA0B,mBAAO,CAAC,4BAAW;AAC7C,4BAA4B,mBAAO,CAAC,kEAA8B;AAClE,kBAAkB,mBAAO,CAAC,4CAAW;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,8BAA8B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA,oBAAoB,cAAc;AAClC,kHAAkH,YAAY;AAC9H;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,yBAAyB;AAC9E,yBAAyB;AACzB;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,+CAA+C,yBAAyB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,yBAAyB;AAClF,6BAA6B;AAC7B;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,+BAA+B;AACpE,2CAA2C,yBAAyB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,yBAAyB;AACrE,yBAAyB;AACzB;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,kC;;;;;;;;;;AC1MA,yD;;;;;;;;;;ACAA,sC;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UE5BA;UACA;UACA;UACA","sources":["webpack://@rushstack/rush-sdk/./lib-commonjs/helpers.js","webpack://@rushstack/rush-sdk/./lib-commonjs/loader.js","webpack://@rushstack/rush-sdk/external commonjs \"@rushstack/node-core-library\"","webpack://@rushstack/rush-sdk/external node-commonjs \"node:path\"","webpack://@rushstack/rush-sdk/webpack/bootstrap","webpack://@rushstack/rush-sdk/webpack/before-startup","webpack://@rushstack/rush-sdk/webpack/startup","webpack://@rushstack/rush-sdk/webpack/after-startup"],"sourcesContent":["\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sdkContext = exports.RUSH_LIB_PATH_ENV_VAR_NAME = exports.RUSH_LIB_NAME = void 0;\nexports.tryFindRushJsonLocation = tryFindRushJsonLocation;\nexports._require = _require;\nexports.requireRushLibUnderFolderPath = requireRushLibUnderFolderPath;\nconst path = __importStar(require(\"node:path\"));\nconst node_core_library_1 = require(\"@rushstack/node-core-library\");\nexports.RUSH_LIB_NAME = '@microsoft/rush-lib';\nexports.RUSH_LIB_PATH_ENV_VAR_NAME = '_RUSH_LIB_PATH';\nexports.sdkContext = {\n rushLibModule: undefined\n};\n/**\n * Find the rush.json location and return the path, or undefined if a rush.json can't be found.\n *\n * @privateRemarks\n * Keep this in sync with `RushConfiguration.tryFindRushJsonLocation`.\n */\nfunction tryFindRushJsonLocation(startingFolder) {\n let currentFolder = startingFolder;\n // Look upwards at parent folders until we find a folder containing rush.json\n for (let i = 0; i < 10; ++i) {\n const rushJsonFilename = path.join(currentFolder, 'rush.json');\n if (node_core_library_1.FileSystem.exists(rushJsonFilename)) {\n return rushJsonFilename;\n }\n const parentFolder = path.dirname(currentFolder);\n if (parentFolder === currentFolder) {\n break;\n }\n currentFolder = parentFolder;\n }\n return undefined;\n}\nfunction _require(moduleName) {\n if (typeof __non_webpack_require__ === 'function') {\n // If this library has been bundled with Webpack, we need to call the real `require` function\n // that doesn't get turned into a `__webpack_require__` statement.\n // `__non_webpack_require__` is a Webpack macro that gets turned into a `require` statement\n // during bundling.\n return __non_webpack_require__(moduleName);\n }\n else {\n return require(moduleName);\n }\n}\n/**\n * Require `@microsoft/rush-lib` under the specified folder path.\n */\nfunction requireRushLibUnderFolderPath(folderPath) {\n const rushLibModulePath = node_core_library_1.Import.resolveModule({\n modulePath: exports.RUSH_LIB_NAME,\n baseFolderPath: folderPath\n });\n return _require(rushLibModulePath);\n}\n//# sourceMappingURL=helpers.js.map","\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RushSdkLoader = void 0;\n/// <reference types=\"node\" preserve=\"true\" />\nconst path = __importStar(require(\"node:path\"));\nconst node_core_library_1 = require(\"@rushstack/node-core-library\");\nconst helpers_1 = require(\"./helpers\");\n/**\n * Exposes operations that control how the `@microsoft/rush-lib` engine is\n * located and loaded.\n * @public\n */\nclass RushSdkLoader {\n /**\n * Throws an \"AbortError\" exception if abortSignal.aborted is true.\n */\n static _checkForCancel(abortSignal, onNotifyEvent, progressPercent) {\n if (!(abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted)) {\n return;\n }\n if (onNotifyEvent) {\n onNotifyEvent({\n logMessage: {\n kind: 'info',\n text: `The operation was canceled`\n },\n progressPercent\n });\n }\n const error = new Error('The operation was canceled');\n error.name = 'AbortError';\n throw error;\n }\n /**\n * Returns true if the Rush engine has already been loaded.\n */\n static get isLoaded() {\n return helpers_1.sdkContext.rushLibModule !== undefined;\n }\n /**\n * Manually load the Rush engine based on rush.json found for `rushJsonSearchFolder`.\n * Throws an exception if {@link RushSdkLoader.isLoaded} is already `true`.\n *\n * @remarks\n * This API supports an callback that can be used display a progress bar,\n * log of operations, and allow the operation to be canceled prematurely.\n */\n static async loadAsync(options) {\n // SCENARIO 5: The rush-lib engine is loaded manually using rushSdkLoader.loadAsync().\n var _a, _b;\n if (!options) {\n options = {};\n }\n if (RushSdkLoader.isLoaded) {\n throw new Error('RushSdkLoader.loadAsync() failed because the Rush engine has already been loaded');\n }\n const onNotifyEvent = options.onNotifyEvent;\n let progressPercent = undefined;\n const abortSignal = options.abortSignal;\n try {\n const rushJsonSearchFolder = (_a = options.rushJsonSearchFolder) !== null && _a !== void 0 ? _a : process.cwd();\n if (onNotifyEvent) {\n onNotifyEvent({\n logMessage: {\n kind: 'debug',\n text: `Searching for rush.json starting from: ` + rushJsonSearchFolder\n },\n progressPercent\n });\n }\n const rushJsonPath = (0, helpers_1.tryFindRushJsonLocation)(rushJsonSearchFolder);\n if (!rushJsonPath) {\n throw new Error('Unable to find rush.json in the specified folder or its parent folders:\\n' +\n `${rushJsonSearchFolder}\\n`);\n }\n const monorepoRoot = path.dirname(rushJsonPath);\n const rushJson = await node_core_library_1.JsonFile.loadAsync(rushJsonPath);\n const { rushVersion } = rushJson;\n const installRunNodeModuleFolder = path.join(monorepoRoot, `common/temp/install-run/@microsoft+rush@${rushVersion}`);\n try {\n // First, try to load the version of \"rush-lib\" that was installed by install-run-rush.js\n if (onNotifyEvent) {\n onNotifyEvent({\n logMessage: {\n kind: 'info',\n text: `Trying to load ${helpers_1.RUSH_LIB_NAME} installed by install-run-rush`\n },\n progressPercent\n });\n }\n helpers_1.sdkContext.rushLibModule = (0, helpers_1.requireRushLibUnderFolderPath)(installRunNodeModuleFolder);\n }\n catch (e1) {\n let installAndRunRushStderrContent = '';\n try {\n const installAndRunRushJSPath = path.join(monorepoRoot, 'common/scripts/install-run-rush.js');\n if (onNotifyEvent) {\n onNotifyEvent({\n logMessage: {\n kind: 'info',\n text: 'The Rush engine has not been installed yet. Invoking install-run-rush.js...'\n },\n progressPercent\n });\n }\n // Start the installation\n progressPercent = 0;\n const installAndRunRushProcess = node_core_library_1.Executable.spawnSync('node', [installAndRunRushJSPath, '--help'], {\n stdio: 'pipe'\n });\n installAndRunRushStderrContent = installAndRunRushProcess.stderr;\n if (installAndRunRushProcess.status !== 0) {\n throw new Error(`The ${helpers_1.RUSH_LIB_NAME} package failed to install`);\n }\n if (abortSignal) {\n RushSdkLoader._checkForCancel(abortSignal, onNotifyEvent, progressPercent);\n }\n // TODO: Implement incremental progress updates\n progressPercent = 90;\n // Retry to load \"rush-lib\" after install-run-rush run\n if (onNotifyEvent) {\n onNotifyEvent({\n logMessage: {\n kind: 'debug',\n text: `Trying to load ${helpers_1.RUSH_LIB_NAME} installed by install-run-rush a second time`\n },\n progressPercent\n });\n }\n helpers_1.sdkContext.rushLibModule = (0, helpers_1.requireRushLibUnderFolderPath)(installRunNodeModuleFolder);\n progressPercent = 100;\n }\n catch (e2) {\n // eslint-disable-next-line no-console\n console.error(`${installAndRunRushStderrContent}`);\n throw new Error(`The ${helpers_1.RUSH_LIB_NAME} package failed to load`);\n }\n }\n if (helpers_1.sdkContext.rushLibModule !== undefined) {\n // to track which scenario is active and how it got initialized.\n global.___rush___rushLibModuleFromInstallAndRunRush = helpers_1.sdkContext.rushLibModule;\n if (onNotifyEvent) {\n onNotifyEvent({\n logMessage: {\n kind: 'debug',\n text: `Loaded ${helpers_1.RUSH_LIB_NAME} installed by install-run-rush`\n },\n progressPercent\n });\n }\n }\n }\n catch (e) {\n if (onNotifyEvent) {\n onNotifyEvent({\n logMessage: {\n kind: 'info',\n text: 'The operation failed: ' + ((_b = e.message) !== null && _b !== void 0 ? _b : 'An unknown error occurred')\n },\n progressPercent\n });\n }\n throw e;\n }\n }\n}\nexports.RushSdkLoader = RushSdkLoader;\n//# sourceMappingURL=loader.js.map","module.exports = require(\"@rushstack/node-core-library\");","module.exports = require(\"node:path\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Check if module exists (development only)\n\tif (__webpack_modules__[moduleId] === undefined) {\n\t\tvar e = new Error(\"Cannot find module '\" + moduleId + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./lib-commonjs/loader.js\");\n",""],"names":[],"ignoreList":[],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/rush-sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.167.0",
|
|
4
4
|
"description": "An API for interacting with the Rush engine",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,23 +36,23 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@pnpm/lockfile.types-900": "npm:@pnpm/lockfile.types@~900.0.0",
|
|
38
38
|
"tapable": "2.2.1",
|
|
39
|
-
"@rushstack/
|
|
40
|
-
"@rushstack/
|
|
41
|
-
"@rushstack/lookup-by-path": "0.8.12",
|
|
39
|
+
"@rushstack/lookup-by-path": "0.8.15",
|
|
40
|
+
"@rushstack/credential-cache": "0.1.10",
|
|
42
41
|
"@rushstack/node-core-library": "5.19.1",
|
|
42
|
+
"@rushstack/package-deps-hash": "4.6.7",
|
|
43
43
|
"@rushstack/terminal": "0.21.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/semver": "7.5.0",
|
|
47
47
|
"@types/webpack-env": "1.18.8",
|
|
48
48
|
"eslint": "~9.37.0",
|
|
49
|
-
"webpack": "~5.
|
|
50
|
-
"@microsoft/rush-lib": "5.
|
|
51
|
-
"@rushstack/heft
|
|
52
|
-
"@rushstack/
|
|
53
|
-
"@rushstack/ts-command-line": "5.
|
|
54
|
-
"@rushstack/
|
|
55
|
-
"@rushstack/
|
|
49
|
+
"webpack": "~5.104.1",
|
|
50
|
+
"@microsoft/rush-lib": "5.167.0",
|
|
51
|
+
"@rushstack/heft": "1.1.13",
|
|
52
|
+
"@rushstack/stream-collator": "4.1.125",
|
|
53
|
+
"@rushstack/ts-command-line": "5.2.0",
|
|
54
|
+
"@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.124",
|
|
55
|
+
"@rushstack/heft-webpack5-plugin": "1.2.13",
|
|
56
56
|
"local-node-rig": "1.0.0"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|