@rushstack/rush-sdk 5.150.0 → 5.152.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 +33 -12
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/api/CommandLineConfiguration.d.ts +2 -1
- package/lib/cli/RushCommandLineParser.d.ts +1 -0
- package/lib/cli/actions/AlertAction.d.ts +0 -1
- package/lib/cli/actions/BaseAutoinstallerAction.d.ts +0 -2
- package/lib/cli/actions/BaseHotlinkPackageAction.d.ts +10 -0
- package/lib/cli/actions/BaseHotlinkPackageAction.js +1 -0
- package/lib/cli/actions/BaseInstallAction.d.ts +0 -2
- package/lib/cli/actions/BaseRushAction.d.ts +6 -4
- package/lib/cli/actions/BridgePackageAction.d.ts +11 -0
- package/lib/cli/actions/BridgePackageAction.js +1 -0
- package/lib/cli/actions/ChangeAction.d.ts +0 -1
- package/lib/cli/actions/CheckAction.d.ts +0 -1
- package/lib/cli/actions/LinkPackageAction.d.ts +11 -0
- package/lib/cli/actions/LinkPackageAction.js +1 -0
- package/lib/cli/actions/RemoveAction.d.ts +0 -1
- package/lib/cli/scriptActions/PhasedScriptAction.d.ts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/logic/InteractiveUpgrader.d.ts +1 -0
- package/lib/logic/PackageJsonUpdater.d.ts +5 -5
- package/lib/logic/RushConstants.d.ts +13 -0
- package/lib/logic/base/BaseLinkManager.d.ts +3 -3
- package/lib/logic/buildCache/FileSystemBuildCacheProvider.d.ts +0 -2
- package/lib/logic/buildCache/ICloudBuildCacheProvider.d.ts +0 -2
- package/lib/logic/installManager/InstallHelpers.d.ts +0 -1
- package/lib/logic/npm/NpmLinkManager.d.ts +1 -1
- package/lib/logic/operations/CacheableOperationPlugin.d.ts +0 -1
- package/lib/logic/operations/DebugHashesPlugin.d.ts +8 -0
- package/lib/logic/operations/DebugHashesPlugin.js +1 -0
- package/lib/logic/operations/IOperationExecutionResult.d.ts +10 -0
- package/lib/logic/operations/IOperationRunner.d.ts +1 -1
- package/lib/logic/operations/Operation.d.ts +9 -9
- package/lib/logic/operations/OperationExecutionManager.d.ts +2 -2
- package/lib/logic/operations/OperationExecutionRecord.d.ts +7 -9
- package/lib/logic/operations/OperationMetadataManager.d.ts +0 -4
- package/lib/logic/operations/ShellOperationRunner.d.ts +5 -1
- package/lib/logic/setup/KeyboardLoop.d.ts +0 -2
- package/lib/utilities/HotlinkManager.d.ts +19 -0
- package/lib/utilities/HotlinkManager.js +1 -0
- package/lib/utilities/InteractiveUpgradeUI.d.ts +1 -1
- package/lib/utilities/RushAlerts.d.ts +3 -3
- package/lib/utilities/Utilities.d.ts +0 -1
- package/lib/utilities/WebClient.d.ts +0 -3
- package/lib/utilities/actionNameConstants.d.ts +4 -0
- package/lib/utilities/actionNameConstants.js +1 -0
- package/lib/utilities/npmrcUtilities.d.ts +0 -1
- package/lib-shim/index.js +63 -23
- package/lib-shim/index.js.map +1 -1
- package/lib-shim/loader.js +39 -18
- package/lib-shim/loader.js.map +1 -1
- package/package.json +14 -13
package/lib-shim/loader.js
CHANGED
|
@@ -27,15 +27,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
27
27
|
}) : function(o, v) {
|
|
28
28
|
o["default"] = v;
|
|
29
29
|
});
|
|
30
|
-
var __importStar = (this && this.__importStar) || function (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
};
|
|
30
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
31
|
+
var ownKeys = function(o) {
|
|
32
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
33
|
+
var ar = [];
|
|
34
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
35
|
+
return ar;
|
|
36
|
+
};
|
|
37
|
+
return ownKeys(o);
|
|
38
|
+
};
|
|
39
|
+
return function (mod) {
|
|
40
|
+
if (mod && mod.__esModule) return mod;
|
|
41
|
+
var result = {};
|
|
42
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
43
|
+
__setModuleDefault(result, mod);
|
|
44
|
+
return result;
|
|
45
|
+
};
|
|
46
|
+
})();
|
|
37
47
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
38
|
-
exports.
|
|
48
|
+
exports.sdkContext = exports.RUSH_LIB_PATH_ENV_VAR_NAME = exports.RUSH_LIB_NAME = void 0;
|
|
49
|
+
exports.tryFindRushJsonLocation = tryFindRushJsonLocation;
|
|
50
|
+
exports._require = _require;
|
|
51
|
+
exports.requireRushLibUnderFolderPath = requireRushLibUnderFolderPath;
|
|
39
52
|
const path = __importStar(__webpack_require__(/*! path */ "path"));
|
|
40
53
|
const node_core_library_1 = __webpack_require__(/*! @rushstack/node-core-library */ "@rushstack/node-core-library");
|
|
41
54
|
exports.RUSH_LIB_NAME = '@microsoft/rush-lib';
|
|
@@ -65,7 +78,6 @@ function tryFindRushJsonLocation(startingFolder) {
|
|
|
65
78
|
}
|
|
66
79
|
return undefined;
|
|
67
80
|
}
|
|
68
|
-
exports.tryFindRushJsonLocation = tryFindRushJsonLocation;
|
|
69
81
|
function _require(moduleName) {
|
|
70
82
|
if (typeof require === 'function') {
|
|
71
83
|
// If this library has been bundled with Webpack, we need to call the real `require` function
|
|
@@ -78,7 +90,6 @@ function _require(moduleName) {
|
|
|
78
90
|
return require(moduleName);
|
|
79
91
|
}
|
|
80
92
|
}
|
|
81
|
-
exports._require = _require;
|
|
82
93
|
/**
|
|
83
94
|
* Require `@microsoft/rush-lib` under the specified folder path.
|
|
84
95
|
*/
|
|
@@ -89,7 +100,6 @@ function requireRushLibUnderFolderPath(folderPath) {
|
|
|
89
100
|
});
|
|
90
101
|
return _require(rushLibModulePath);
|
|
91
102
|
}
|
|
92
|
-
exports.requireRushLibUnderFolderPath = requireRushLibUnderFolderPath;
|
|
93
103
|
//# sourceMappingURL=helpers.js.map
|
|
94
104
|
|
|
95
105
|
/***/ }),
|
|
@@ -119,15 +129,26 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
119
129
|
}) : function(o, v) {
|
|
120
130
|
o["default"] = v;
|
|
121
131
|
});
|
|
122
|
-
var __importStar = (this && this.__importStar) || function (
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
};
|
|
132
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
133
|
+
var ownKeys = function(o) {
|
|
134
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
135
|
+
var ar = [];
|
|
136
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
137
|
+
return ar;
|
|
138
|
+
};
|
|
139
|
+
return ownKeys(o);
|
|
140
|
+
};
|
|
141
|
+
return function (mod) {
|
|
142
|
+
if (mod && mod.__esModule) return mod;
|
|
143
|
+
var result = {};
|
|
144
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
145
|
+
__setModuleDefault(result, mod);
|
|
146
|
+
return result;
|
|
147
|
+
};
|
|
148
|
+
})();
|
|
129
149
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
130
150
|
exports.RushSdkLoader = void 0;
|
|
151
|
+
/// <reference types="node" preserve="true" />
|
|
131
152
|
const path = __importStar(__webpack_require__(/*! path */ "path"));
|
|
132
153
|
const node_core_library_1 = __webpack_require__(/*! @rushstack/node-core-library */ "@rushstack/node-core-library");
|
|
133
154
|
const helpers_1 = __webpack_require__(/*! ./helpers */ "./lib-commonjs/helpers.js");
|
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,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qCAAqC,GAAG,gBAAgB,GAAG,+BAA+B,GAAG,kBAAkB,GAAG,kCAAkC,GAAG,qBAAqB;AAC5K,0BAA0B,mBAAO,CAAC,kBAAM;AACxC,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,+BAA+B;AAC/B;AACA,eAAe,OAAuB;AACtC;AACA;AACA;AACA;AACA,eAAe,OAAuB;AACtC;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,qCAAqC;AACrC;;;;;;;;;;AClFa;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,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB,0BAA0B,mBAAO,CAAC,kBAAM;AACxC,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;;;;;;;;;;AC/LA;;;;;;;;;;ACAA;;;;;;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 \"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 (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.requireRushLibUnderFolderPath = exports._require = exports.tryFindRushJsonLocation = exports.sdkContext = exports.RUSH_LIB_PATH_ENV_VAR_NAME = exports.RUSH_LIB_NAME = void 0;\nconst path = __importStar(require(\"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}\nexports.tryFindRushJsonLocation = tryFindRushJsonLocation;\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}\nexports._require = _require;\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}\nexports.requireRushLibUnderFolderPath = requireRushLibUnderFolderPath;\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 (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RushSdkLoader = void 0;\nconst path = __importStar(require(\"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(\"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":[],"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,kBAAM;AACxC,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;;;;;;;;;;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,kBAAM;AACxC,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;;;;;;;;;;AC1MA;;;;;;;;;;ACAA;;;;;;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 \"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(\"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(\"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(\"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":[],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/rush-sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.152.0",
|
|
4
4
|
"description": "An API for interacting with the Rush engine",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"./lib/*": {
|
|
23
23
|
"types": "./lib/*.d.ts",
|
|
24
24
|
"default": "./lib/*.js"
|
|
25
|
-
}
|
|
25
|
+
},
|
|
26
|
+
"./package.json": "./package.json"
|
|
26
27
|
},
|
|
27
28
|
"typesVersions": {
|
|
28
29
|
"*": {
|
|
@@ -35,22 +36,22 @@
|
|
|
35
36
|
"dependencies": {
|
|
36
37
|
"@pnpm/lockfile.types": "~1.0.3",
|
|
37
38
|
"tapable": "2.2.1",
|
|
38
|
-
"@rushstack/
|
|
39
|
-
"@rushstack/
|
|
40
|
-
"@rushstack/package-deps-hash": "4.3.
|
|
41
|
-
"@rushstack/
|
|
39
|
+
"@rushstack/lookup-by-path": "0.5.16",
|
|
40
|
+
"@rushstack/terminal": "0.15.2",
|
|
41
|
+
"@rushstack/package-deps-hash": "4.3.17",
|
|
42
|
+
"@rushstack/node-core-library": "5.13.0"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
45
|
"@types/semver": "7.5.0",
|
|
45
46
|
"@types/webpack-env": "1.18.8",
|
|
46
|
-
"webpack": "~5.
|
|
47
|
-
"@microsoft/rush-lib": "5.
|
|
48
|
-
"@rushstack/heft": "0.
|
|
49
|
-
"@rushstack/stream-collator": "4.1.88",
|
|
47
|
+
"webpack": "~5.98.0",
|
|
48
|
+
"@microsoft/rush-lib": "5.152.0",
|
|
49
|
+
"@rushstack/heft": "0.71.2",
|
|
50
50
|
"local-node-rig": "1.0.0",
|
|
51
|
-
"@rushstack/
|
|
52
|
-
"@rushstack/
|
|
53
|
-
"@rushstack/
|
|
51
|
+
"@rushstack/stream-collator": "4.1.95",
|
|
52
|
+
"@rushstack/heft-webpack5-plugin": "0.11.25",
|
|
53
|
+
"@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.94",
|
|
54
|
+
"@rushstack/ts-command-line": "4.23.7"
|
|
54
55
|
},
|
|
55
56
|
"scripts": {
|
|
56
57
|
"build": "heft build --clean",
|