@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.
Files changed (52) hide show
  1. package/dist/rush-lib.d.ts +33 -12
  2. package/dist/tsdoc-metadata.json +1 -1
  3. package/lib/api/CommandLineConfiguration.d.ts +2 -1
  4. package/lib/cli/RushCommandLineParser.d.ts +1 -0
  5. package/lib/cli/actions/AlertAction.d.ts +0 -1
  6. package/lib/cli/actions/BaseAutoinstallerAction.d.ts +0 -2
  7. package/lib/cli/actions/BaseHotlinkPackageAction.d.ts +10 -0
  8. package/lib/cli/actions/BaseHotlinkPackageAction.js +1 -0
  9. package/lib/cli/actions/BaseInstallAction.d.ts +0 -2
  10. package/lib/cli/actions/BaseRushAction.d.ts +6 -4
  11. package/lib/cli/actions/BridgePackageAction.d.ts +11 -0
  12. package/lib/cli/actions/BridgePackageAction.js +1 -0
  13. package/lib/cli/actions/ChangeAction.d.ts +0 -1
  14. package/lib/cli/actions/CheckAction.d.ts +0 -1
  15. package/lib/cli/actions/LinkPackageAction.d.ts +11 -0
  16. package/lib/cli/actions/LinkPackageAction.js +1 -0
  17. package/lib/cli/actions/RemoveAction.d.ts +0 -1
  18. package/lib/cli/scriptActions/PhasedScriptAction.d.ts +1 -0
  19. package/lib/index.d.ts +1 -0
  20. package/lib/logic/InteractiveUpgrader.d.ts +1 -0
  21. package/lib/logic/PackageJsonUpdater.d.ts +5 -5
  22. package/lib/logic/RushConstants.d.ts +13 -0
  23. package/lib/logic/base/BaseLinkManager.d.ts +3 -3
  24. package/lib/logic/buildCache/FileSystemBuildCacheProvider.d.ts +0 -2
  25. package/lib/logic/buildCache/ICloudBuildCacheProvider.d.ts +0 -2
  26. package/lib/logic/installManager/InstallHelpers.d.ts +0 -1
  27. package/lib/logic/npm/NpmLinkManager.d.ts +1 -1
  28. package/lib/logic/operations/CacheableOperationPlugin.d.ts +0 -1
  29. package/lib/logic/operations/DebugHashesPlugin.d.ts +8 -0
  30. package/lib/logic/operations/DebugHashesPlugin.js +1 -0
  31. package/lib/logic/operations/IOperationExecutionResult.d.ts +10 -0
  32. package/lib/logic/operations/IOperationRunner.d.ts +1 -1
  33. package/lib/logic/operations/Operation.d.ts +9 -9
  34. package/lib/logic/operations/OperationExecutionManager.d.ts +2 -2
  35. package/lib/logic/operations/OperationExecutionRecord.d.ts +7 -9
  36. package/lib/logic/operations/OperationMetadataManager.d.ts +0 -4
  37. package/lib/logic/operations/ShellOperationRunner.d.ts +5 -1
  38. package/lib/logic/setup/KeyboardLoop.d.ts +0 -2
  39. package/lib/utilities/HotlinkManager.d.ts +19 -0
  40. package/lib/utilities/HotlinkManager.js +1 -0
  41. package/lib/utilities/InteractiveUpgradeUI.d.ts +1 -1
  42. package/lib/utilities/RushAlerts.d.ts +3 -3
  43. package/lib/utilities/Utilities.d.ts +0 -1
  44. package/lib/utilities/WebClient.d.ts +0 -3
  45. package/lib/utilities/actionNameConstants.d.ts +4 -0
  46. package/lib/utilities/actionNameConstants.js +1 -0
  47. package/lib/utilities/npmrcUtilities.d.ts +0 -1
  48. package/lib-shim/index.js +63 -23
  49. package/lib-shim/index.js.map +1 -1
  50. package/lib-shim/loader.js +39 -18
  51. package/lib-shim/loader.js.map +1 -1
  52. package/package.json +14 -13
@@ -0,0 +1,19 @@
1
+ import { type ITerminal } from '@rushstack/terminal';
2
+ import type { RushConfiguration } from '../api/RushConfiguration';
3
+ import type { RushConfigurationProject } from '../api/RushConfigurationProject';
4
+ import type { Subspace } from '../api/Subspace';
5
+ export declare class HotlinkManager {
6
+ private _linksBySubspaceName;
7
+ private readonly _rushLinkStateFilePath;
8
+ private constructor();
9
+ hasAnyHotlinksInSubspace(subspaceName: string): boolean;
10
+ private _hardLinkToLinkedPackageAsync;
11
+ private _modifyAndSaveLinkStateAsync;
12
+ purgeLinksAsync(terminal: ITerminal, subspaceName: string): Promise<boolean>;
13
+ private _getLinkedPackageInfoAsync;
14
+ private _getPackagePathsMatchingNameAndVersionAsync;
15
+ bridgePackageAsync(terminal: ITerminal, subspace: Subspace, linkedPackagePath: string, version: string): Promise<void>;
16
+ linkPackageAsync(terminal: ITerminal, consumerPackage: RushConfigurationProject, linkedPackagePath: string): Promise<void>;
17
+ static loadFromRushConfiguration(rushConfiguration: RushConfiguration): HotlinkManager;
18
+ }
19
+ //# sourceMappingURL=HotlinkManager.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("utilities/HotlinkManager");
@@ -1,4 +1,4 @@
1
- /// <reference path="../../src/npm-check-typings.d.ts" />
1
+ /// <reference path="../../src/npm-check-typings.d.ts" preserve="true" />
2
2
  import type * as NpmCheck from 'npm-check';
3
3
  export interface IUIGroup {
4
4
  title: string;
@@ -1,7 +1,7 @@
1
- import { type Terminal } from '@rushstack/terminal';
1
+ import { type ITerminal } from '@rushstack/terminal';
2
2
  import type { RushConfiguration } from '../api/RushConfiguration';
3
3
  export interface IRushAlertsOptions {
4
- terminal: Terminal;
4
+ terminal: ITerminal;
5
5
  rushJsonFolder: string;
6
6
  rushAlertsConfig: IRushAlertsConfig | undefined;
7
7
  rushAlertsState: IRushAlertsState | undefined;
@@ -53,7 +53,7 @@ export declare class RushAlerts {
53
53
  static readonly alertDisplayIntervalDurations: Map<AlertDisplayInterval, number>;
54
54
  static readonly alertTriggerActions: string[];
55
55
  constructor(options: IRushAlertsOptions);
56
- static loadFromConfigurationAsync(rushConfiguration: RushConfiguration, terminal: Terminal): Promise<RushAlerts>;
56
+ static loadFromConfigurationAsync(rushConfiguration: RushConfiguration, terminal: ITerminal): Promise<RushAlerts>;
57
57
  private _ensureAlertStateIsUpToDate;
58
58
  printAlertsAsync(): Promise<void>;
59
59
  printAllAlertsAsync(): Promise<void>;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import * as child_process from 'child_process';
3
2
  import { type IWaitForExitResult } from '@rushstack/node-core-library';
4
3
  import type { RushConfiguration } from '../api/RushConfiguration';
@@ -1,6 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- /// <reference types="node" />
4
1
  import { type RequestOptions } from 'node:https';
5
2
  /**
6
3
  * For use with {@link WebClient}.
@@ -0,0 +1,4 @@
1
+ export declare const PURGE_ACTION_NAME: 'purge';
2
+ export declare const LINK_PACKAGE_ACTION_NAME: 'link-package';
3
+ export declare const BRIDGE_PACKAGE_ACTION_NAME: 'bridge-package';
4
+ //# sourceMappingURL=actionNameConstants.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("utilities/actionNameConstants");
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  export interface ILogger {
3
2
  info: (string: string) => void;
4
3
  error: (string: string) => void;
package/lib-shim/index.js CHANGED
@@ -269,9 +269,12 @@ function syncNpmrc(options) {
269
269
  if (!external_fs_.existsSync(targetNpmrcFolder)) {
270
270
  external_fs_.mkdirSync(targetNpmrcFolder, { recursive: true });
271
271
  }
272
- return _copyAndTrimNpmrcFile(Object.assign({ sourceNpmrcPath,
272
+ return _copyAndTrimNpmrcFile({
273
+ sourceNpmrcPath,
273
274
  targetNpmrcPath,
274
- logger }, options));
275
+ logger,
276
+ ...options
277
+ });
275
278
  }
276
279
  else if (external_fs_.existsSync(targetNpmrcPath)) {
277
280
  // If the source .npmrc doesn't exist and there is one in the target, delete the one in the target
@@ -915,6 +918,10 @@ RushConstants.pnpmfileV6Filename = '.pnpmfile.cjs';
915
918
  * The filename (".modules.yaml") used by pnpm to specify configurations in the node_modules directory
916
919
  */
917
920
  RushConstants.pnpmModulesFilename = '.modules.yaml';
921
+ /**
922
+ * The folder name (".pnpm") used by pnpm to store the code of the dependencies for this subspace
923
+ */
924
+ RushConstants.pnpmVirtualStoreFolderName = '.pnpm';
918
925
  /**
919
926
  * The filename ("global-pnpmfile.cjs") used to add custom configuration to subspaces
920
927
  */
@@ -1108,6 +1115,15 @@ RushConstants.rushAlertsConfigFilename = 'rush-alerts.json';
1108
1115
  * The filename for the file that tracks which variant is currently installed.
1109
1116
  */
1110
1117
  RushConstants.currentVariantsFilename = 'current-variants.json';
1118
+ /**
1119
+ * The filename ("rush-hotlink-state.json") used to store information about packages connected via
1120
+ * "rush link-package" and "rush bridge-package" commands.
1121
+ */
1122
+ RushConstants.rushHotlinkStateFilename = 'rush-hotlink-state.json';
1123
+ /**
1124
+ * The filename ("pnpm-sync.json") used to store the state of the pnpm sync command.
1125
+ */
1126
+ RushConstants.pnpmSyncFilename = '.pnpm-sync.json';
1111
1127
  //# sourceMappingURL=RushConstants.js.map
1112
1128
  ;// ../rush-lib/lib-esnext/utilities/Utilities.js
1113
1129
  // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
@@ -1493,7 +1509,12 @@ class Utilities {
1493
1509
  const environment = Utilities._createEnvironmentForRushCommand({
1494
1510
  initCwd: options.initCwd,
1495
1511
  initialEnvironment: options.initialEnvironment,
1496
- pathOptions: Object.assign(Object.assign({}, options.environmentPathOptions), { rushJsonFolder: (_a = options.rushConfiguration) === null || _a === void 0 ? void 0 : _a.rushJsonFolder, projectRoot: options.workingDirectory, commonTempFolder: options.rushConfiguration ? options.rushConfiguration.commonTempFolder : undefined })
1512
+ pathOptions: {
1513
+ ...options.environmentPathOptions,
1514
+ rushJsonFolder: (_a = options.rushConfiguration) === null || _a === void 0 ? void 0 : _a.rushJsonFolder,
1515
+ projectRoot: options.workingDirectory,
1516
+ commonTempFolder: options.rushConfiguration ? options.rushConfiguration.commonTempFolder : undefined
1517
+ }
1497
1518
  });
1498
1519
  const stdio = options.handleOutput ? ['pipe', 'pipe', 'pipe'] : [0, 1, 2];
1499
1520
  if (options.ipc) {
@@ -1707,15 +1728,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
1707
1728
  }) : function(o, v) {
1708
1729
  o["default"] = v;
1709
1730
  });
1710
- var __importStar = (this && this.__importStar) || function (mod) {
1711
- if (mod && mod.__esModule) return mod;
1712
- var result = {};
1713
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1714
- __setModuleDefault(result, mod);
1715
- return result;
1716
- };
1731
+ var __importStar = (this && this.__importStar) || (function () {
1732
+ var ownKeys = function(o) {
1733
+ ownKeys = Object.getOwnPropertyNames || function (o) {
1734
+ var ar = [];
1735
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
1736
+ return ar;
1737
+ };
1738
+ return ownKeys(o);
1739
+ };
1740
+ return function (mod) {
1741
+ if (mod && mod.__esModule) return mod;
1742
+ var result = {};
1743
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
1744
+ __setModuleDefault(result, mod);
1745
+ return result;
1746
+ };
1747
+ })();
1717
1748
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1718
- exports.requireRushLibUnderFolderPath = exports._require = exports.tryFindRushJsonLocation = exports.sdkContext = exports.RUSH_LIB_PATH_ENV_VAR_NAME = exports.RUSH_LIB_NAME = void 0;
1749
+ exports.sdkContext = exports.RUSH_LIB_PATH_ENV_VAR_NAME = exports.RUSH_LIB_NAME = void 0;
1750
+ exports.tryFindRushJsonLocation = tryFindRushJsonLocation;
1751
+ exports._require = _require;
1752
+ exports.requireRushLibUnderFolderPath = requireRushLibUnderFolderPath;
1719
1753
  const path = __importStar(__webpack_require__(/*! path */ "path"));
1720
1754
  const node_core_library_1 = __webpack_require__(/*! @rushstack/node-core-library */ "@rushstack/node-core-library");
1721
1755
  exports.RUSH_LIB_NAME = '@microsoft/rush-lib';
@@ -1745,7 +1779,6 @@ function tryFindRushJsonLocation(startingFolder) {
1745
1779
  }
1746
1780
  return undefined;
1747
1781
  }
1748
- exports.tryFindRushJsonLocation = tryFindRushJsonLocation;
1749
1782
  function _require(moduleName) {
1750
1783
  if (typeof require === 'function') {
1751
1784
  // If this library has been bundled with Webpack, we need to call the real `require` function
@@ -1758,7 +1791,6 @@ function _require(moduleName) {
1758
1791
  return require(moduleName);
1759
1792
  }
1760
1793
  }
1761
- exports._require = _require;
1762
1794
  /**
1763
1795
  * Require `@microsoft/rush-lib` under the specified folder path.
1764
1796
  */
@@ -1769,7 +1801,6 @@ function requireRushLibUnderFolderPath(folderPath) {
1769
1801
  });
1770
1802
  return _require(rushLibModulePath);
1771
1803
  }
1772
- exports.requireRushLibUnderFolderPath = requireRushLibUnderFolderPath;
1773
1804
  //# sourceMappingURL=helpers.js.map
1774
1805
 
1775
1806
  /***/ }),
@@ -1800,16 +1831,26 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
1800
1831
  }) : function(o, v) {
1801
1832
  o["default"] = v;
1802
1833
  });
1803
- var __importStar = (this && this.__importStar) || function (mod) {
1804
- if (mod && mod.__esModule) return mod;
1805
- var result = {};
1806
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1807
- __setModuleDefault(result, mod);
1808
- return result;
1809
- };
1834
+ var __importStar = (this && this.__importStar) || (function () {
1835
+ var ownKeys = function(o) {
1836
+ ownKeys = Object.getOwnPropertyNames || function (o) {
1837
+ var ar = [];
1838
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
1839
+ return ar;
1840
+ };
1841
+ return ownKeys(o);
1842
+ };
1843
+ return function (mod) {
1844
+ if (mod && mod.__esModule) return mod;
1845
+ var result = {};
1846
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
1847
+ __setModuleDefault(result, mod);
1848
+ return result;
1849
+ };
1850
+ })();
1810
1851
  var _a;
1811
1852
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1812
- exports._rushSdk_loadInternalModule = void 0;
1853
+ exports._rushSdk_loadInternalModule = _rushSdk_loadInternalModule;
1813
1854
  const path = __importStar(__webpack_require__(/*! path */ "path"));
1814
1855
  const node_core_library_1 = __webpack_require__(/*! @rushstack/node-core-library */ "@rushstack/node-core-library");
1815
1856
  const terminal_1 = __webpack_require__(/*! @rushstack/terminal */ "@rushstack/terminal");
@@ -1986,7 +2027,6 @@ function _rushSdk_loadInternalModule(srcImportPath) {
1986
2027
  }
1987
2028
  return exports._RushInternals.loadModule(srcImportPath);
1988
2029
  }
1989
- exports._rushSdk_loadInternalModule = _rushSdk_loadInternalModule;
1990
2030
  //# sourceMappingURL=index.js.map
1991
2031
 
1992
2032
  /***/ }),