@rushstack/rush-sdk 5.91.0 → 5.92.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 (361) hide show
  1. package/README.md +46 -11
  2. package/dist/rush-lib.d.ts +18 -0
  3. package/lib/api/ApprovedPackagesConfiguration.d.ts +74 -0
  4. package/lib/api/ApprovedPackagesConfiguration.js +1 -0
  5. package/lib/api/ApprovedPackagesPolicy.d.ts +54 -0
  6. package/lib/api/ApprovedPackagesPolicy.js +1 -0
  7. package/lib/api/BuildCacheConfiguration.d.ts +77 -0
  8. package/lib/api/BuildCacheConfiguration.js +1 -0
  9. package/lib/api/ChangeFile.d.ts +42 -0
  10. package/lib/api/ChangeFile.js +1 -0
  11. package/lib/api/ChangeManagement.d.ts +85 -0
  12. package/lib/api/ChangeManagement.js +1 -0
  13. package/lib/api/ChangeManager.d.ts +16 -0
  14. package/lib/api/ChangeManager.js +1 -0
  15. package/lib/api/Changelog.d.ts +74 -0
  16. package/lib/api/Changelog.js +1 -0
  17. package/lib/api/CommandLineConfiguration.d.ts +161 -0
  18. package/lib/api/CommandLineConfiguration.js +1 -0
  19. package/lib/api/CommandLineJson.d.ts +251 -0
  20. package/lib/api/CommandLineJson.js +1 -0
  21. package/lib/api/CommonVersionsConfiguration.d.ts +96 -0
  22. package/lib/api/CommonVersionsConfiguration.js +1 -0
  23. package/lib/api/EnvironmentConfiguration.d.ts +258 -0
  24. package/lib/api/EnvironmentConfiguration.js +1 -0
  25. package/lib/api/EventHooks.d.ts +42 -0
  26. package/lib/api/EventHooks.js +1 -0
  27. package/lib/api/ExperimentsConfiguration.d.ts +62 -0
  28. package/lib/api/ExperimentsConfiguration.js +1 -0
  29. package/lib/api/LastInstallFlag.d.ts +73 -0
  30. package/lib/api/LastInstallFlag.js +1 -0
  31. package/lib/api/LastLinkFlag.d.ts +41 -0
  32. package/lib/api/LastLinkFlag.js +1 -0
  33. package/lib/api/PackageJsonEditor.d.ts +79 -0
  34. package/lib/api/PackageJsonEditor.js +1 -0
  35. package/lib/api/PackageNameParsers.d.ts +18 -0
  36. package/lib/api/PackageNameParsers.js +1 -0
  37. package/lib/api/Rush.d.ts +91 -0
  38. package/lib/api/Rush.js +1 -0
  39. package/lib/api/RushConfiguration.d.ts +595 -0
  40. package/lib/api/RushConfiguration.js +1 -0
  41. package/lib/api/RushConfigurationProject.d.ts +217 -0
  42. package/lib/api/RushConfigurationProject.js +1 -0
  43. package/lib/api/RushGlobalFolder.d.ts +32 -0
  44. package/lib/api/RushGlobalFolder.js +1 -0
  45. package/lib/api/RushInternals.d.ts +15 -0
  46. package/lib/api/RushInternals.js +1 -0
  47. package/lib/api/RushPluginsConfiguration.d.ts +21 -0
  48. package/lib/api/RushPluginsConfiguration.js +1 -0
  49. package/lib/api/RushProjectConfiguration.d.ts +117 -0
  50. package/lib/api/RushProjectConfiguration.js +1 -0
  51. package/lib/api/RushUserConfiguration.d.ts +16 -0
  52. package/lib/api/RushUserConfiguration.js +1 -0
  53. package/lib/api/SaveCallbackPackageJsonEditor.d.ts +14 -0
  54. package/lib/api/SaveCallbackPackageJsonEditor.js +1 -0
  55. package/lib/api/Variants.d.ts +11 -0
  56. package/lib/api/Variants.js +1 -0
  57. package/lib/api/VersionPolicy.d.ts +203 -0
  58. package/lib/api/VersionPolicy.js +1 -0
  59. package/lib/api/VersionPolicyConfiguration.d.ts +75 -0
  60. package/lib/api/VersionPolicyConfiguration.js +1 -0
  61. package/lib/api/packageManager/NpmPackageManager.d.ts +9 -0
  62. package/lib/api/packageManager/NpmPackageManager.js +1 -0
  63. package/lib/api/packageManager/PackageManager.d.ts +29 -0
  64. package/lib/api/packageManager/PackageManager.js +1 -0
  65. package/lib/api/packageManager/PnpmPackageManager.d.ts +17 -0
  66. package/lib/api/packageManager/PnpmPackageManager.js +1 -0
  67. package/lib/api/packageManager/YarnPackageManager.d.ts +9 -0
  68. package/lib/api/packageManager/YarnPackageManager.js +1 -0
  69. package/lib/cli/CommandLineMigrationAdvisor.d.ts +5 -0
  70. package/lib/cli/CommandLineMigrationAdvisor.js +1 -0
  71. package/lib/cli/RushCommandLineParser.d.ts +49 -0
  72. package/lib/cli/RushCommandLineParser.js +1 -0
  73. package/lib/cli/RushPnpmCommandLine.d.ts +7 -0
  74. package/lib/cli/RushPnpmCommandLine.js +1 -0
  75. package/lib/cli/RushPnpmCommandLineParser.d.ts +26 -0
  76. package/lib/cli/RushPnpmCommandLineParser.js +1 -0
  77. package/lib/cli/RushStartupBanner.d.ts +7 -0
  78. package/lib/cli/RushStartupBanner.js +1 -0
  79. package/lib/cli/RushXCommandLine.d.ts +17 -0
  80. package/lib/cli/RushXCommandLine.js +1 -0
  81. package/lib/cli/actions/AddAction.d.ts +15 -0
  82. package/lib/cli/actions/AddAction.js +1 -0
  83. package/lib/cli/actions/BaseAddAndRemoveAction.d.ts +36 -0
  84. package/lib/cli/actions/BaseAddAndRemoveAction.js +1 -0
  85. package/lib/cli/actions/BaseInstallAction.d.ts +23 -0
  86. package/lib/cli/actions/BaseInstallAction.js +1 -0
  87. package/lib/cli/actions/BaseRushAction.d.ts +55 -0
  88. package/lib/cli/actions/BaseRushAction.js +1 -0
  89. package/lib/cli/actions/ChangeAction.d.ts +65 -0
  90. package/lib/cli/actions/ChangeAction.js +1 -0
  91. package/lib/cli/actions/CheckAction.d.ts +10 -0
  92. package/lib/cli/actions/CheckAction.js +1 -0
  93. package/lib/cli/actions/DeployAction.d.ts +12 -0
  94. package/lib/cli/actions/DeployAction.js +1 -0
  95. package/lib/cli/actions/InitAction.d.ts +16 -0
  96. package/lib/cli/actions/InitAction.js +1 -0
  97. package/lib/cli/actions/InitAutoinstallerAction.d.ts +8 -0
  98. package/lib/cli/actions/InitAutoinstallerAction.js +1 -0
  99. package/lib/cli/actions/InitDeployAction.d.ts +9 -0
  100. package/lib/cli/actions/InitDeployAction.js +1 -0
  101. package/lib/cli/actions/InstallAction.d.ts +9 -0
  102. package/lib/cli/actions/InstallAction.js +1 -0
  103. package/lib/cli/actions/LinkAction.d.ts +8 -0
  104. package/lib/cli/actions/LinkAction.js +1 -0
  105. package/lib/cli/actions/ListAction.d.ts +54 -0
  106. package/lib/cli/actions/ListAction.js +1 -0
  107. package/lib/cli/actions/PublishAction.d.ts +49 -0
  108. package/lib/cli/actions/PublishAction.js +1 -0
  109. package/lib/cli/actions/PurgeAction.d.ts +8 -0
  110. package/lib/cli/actions/PurgeAction.js +1 -0
  111. package/lib/cli/actions/RemoveAction.d.ts +13 -0
  112. package/lib/cli/actions/RemoveAction.js +1 -0
  113. package/lib/cli/actions/ScanAction.d.ts +23 -0
  114. package/lib/cli/actions/ScanAction.js +1 -0
  115. package/lib/cli/actions/SetupAction.d.ts +7 -0
  116. package/lib/cli/actions/SetupAction.js +1 -0
  117. package/lib/cli/actions/UnlinkAction.d.ts +7 -0
  118. package/lib/cli/actions/UnlinkAction.js +1 -0
  119. package/lib/cli/actions/UpdateAction.d.ts +11 -0
  120. package/lib/cli/actions/UpdateAction.js +1 -0
  121. package/lib/cli/actions/UpdateAutoinstallerAction.d.ts +8 -0
  122. package/lib/cli/actions/UpdateAutoinstallerAction.js +1 -0
  123. package/lib/cli/actions/UpdateCloudCredentialsAction.d.ts +10 -0
  124. package/lib/cli/actions/UpdateCloudCredentialsAction.js +1 -0
  125. package/lib/cli/actions/UpgradeInteractiveAction.d.ts +9 -0
  126. package/lib/cli/actions/UpgradeInteractiveAction.js +1 -0
  127. package/lib/cli/actions/VersionAction.d.ts +22 -0
  128. package/lib/cli/actions/VersionAction.js +1 -0
  129. package/lib/cli/parsing/ParseParallelism.d.ts +6 -0
  130. package/lib/cli/parsing/ParseParallelism.js +1 -0
  131. package/lib/cli/parsing/SelectionParameterSet.d.ts +51 -0
  132. package/lib/cli/parsing/SelectionParameterSet.js +1 -0
  133. package/lib/cli/scriptActions/BaseScriptAction.d.ts +28 -0
  134. package/lib/cli/scriptActions/BaseScriptAction.js +1 -0
  135. package/lib/cli/scriptActions/GlobalScriptAction.d.ts +30 -0
  136. package/lib/cli/scriptActions/GlobalScriptAction.js +1 -0
  137. package/lib/cli/scriptActions/PhasedScriptAction.d.ts +65 -0
  138. package/lib/cli/scriptActions/PhasedScriptAction.js +1 -0
  139. package/lib/index.d.ts +51 -1
  140. package/lib/index.js +1 -190
  141. package/lib/logic/Autoinstaller.d.ts +21 -0
  142. package/lib/logic/Autoinstaller.js +1 -0
  143. package/lib/logic/ChangeFiles.d.ts +33 -0
  144. package/lib/logic/ChangeFiles.js +1 -0
  145. package/lib/logic/ChangeManager.d.ts +39 -0
  146. package/lib/logic/ChangeManager.js +1 -0
  147. package/lib/logic/ChangelogGenerator.d.ts +46 -0
  148. package/lib/logic/ChangelogGenerator.js +1 -0
  149. package/lib/logic/CredentialCache.d.ts +36 -0
  150. package/lib/logic/CredentialCache.js +1 -0
  151. package/lib/logic/DependencyAnalyzer.d.ts +34 -0
  152. package/lib/logic/DependencyAnalyzer.js +1 -0
  153. package/lib/logic/DependencySpecifier.d.ts +70 -0
  154. package/lib/logic/DependencySpecifier.js +1 -0
  155. package/lib/logic/EventHooksManager.d.ts +10 -0
  156. package/lib/logic/EventHooksManager.js +1 -0
  157. package/lib/logic/Git.d.ts +103 -0
  158. package/lib/logic/Git.js +1 -0
  159. package/lib/logic/GitStatusParser.d.ts +42 -0
  160. package/lib/logic/GitStatusParser.js +1 -0
  161. package/lib/logic/JsonSchemaUrls.d.ts +8 -0
  162. package/lib/logic/JsonSchemaUrls.js +1 -0
  163. package/lib/logic/LookupByPath.d.ts +86 -0
  164. package/lib/logic/LookupByPath.js +1 -0
  165. package/lib/logic/NodeJsCompatibility.d.ts +42 -0
  166. package/lib/logic/NodeJsCompatibility.js +1 -0
  167. package/lib/logic/PackageJsonUpdaterTypes.d.ts +75 -0
  168. package/lib/logic/PackageJsonUpdaterTypes.js +1 -0
  169. package/lib/logic/PrereleaseToken.d.ts +12 -0
  170. package/lib/logic/PrereleaseToken.js +1 -0
  171. package/lib/logic/ProjectChangeAnalyzer.d.ts +81 -0
  172. package/lib/logic/ProjectChangeAnalyzer.js +1 -0
  173. package/lib/logic/ProjectCommandSet.d.ts +13 -0
  174. package/lib/logic/ProjectCommandSet.js +1 -0
  175. package/lib/logic/PublishGit.d.ts +19 -0
  176. package/lib/logic/PublishGit.js +1 -0
  177. package/lib/logic/PublishUtilities.d.ts +71 -0
  178. package/lib/logic/PublishUtilities.js +1 -0
  179. package/lib/logic/PurgeManager.d.ts +29 -0
  180. package/lib/logic/PurgeManager.js +1 -0
  181. package/lib/logic/RepoStateFile.d.ts +55 -0
  182. package/lib/logic/RepoStateFile.js +1 -0
  183. package/lib/logic/RushConstants.d.ts +219 -0
  184. package/lib/logic/RushConstants.js +1 -0
  185. package/lib/logic/Selection.d.ts +39 -0
  186. package/lib/logic/Selection.js +1 -0
  187. package/lib/logic/SetupChecks.d.ts +22 -0
  188. package/lib/logic/SetupChecks.js +1 -0
  189. package/lib/logic/ShrinkwrapFileFactory.d.ts +8 -0
  190. package/lib/logic/ShrinkwrapFileFactory.js +1 -0
  191. package/lib/logic/StandardScriptUpdater.d.ts +26 -0
  192. package/lib/logic/StandardScriptUpdater.js +1 -0
  193. package/lib/logic/Telemetry.d.ts +123 -0
  194. package/lib/logic/Telemetry.js +1 -0
  195. package/lib/logic/UnlinkManager.d.ts +24 -0
  196. package/lib/logic/UnlinkManager.js +1 -0
  197. package/lib/logic/base/BaseInstallManagerTypes.d.ts +65 -0
  198. package/lib/logic/base/BaseInstallManagerTypes.js +1 -0
  199. package/lib/logic/base/BasePackageManagerOptionsConfiguration.d.ts +50 -0
  200. package/lib/logic/base/BasePackageManagerOptionsConfiguration.js +1 -0
  201. package/lib/logic/base/BaseProjectShrinkwrapFile.d.ts +36 -0
  202. package/lib/logic/base/BaseProjectShrinkwrapFile.js +1 -0
  203. package/lib/logic/base/BaseShrinkwrapFile.d.ts +92 -0
  204. package/lib/logic/base/BaseShrinkwrapFile.js +1 -0
  205. package/lib/logic/buildCache/CacheEntryId.d.ts +28 -0
  206. package/lib/logic/buildCache/CacheEntryId.js +1 -0
  207. package/lib/logic/buildCache/FileSystemBuildCacheProvider.d.ts +40 -0
  208. package/lib/logic/buildCache/FileSystemBuildCacheProvider.js +1 -0
  209. package/lib/logic/buildCache/ICloudBuildCacheProvider.d.ts +14 -0
  210. package/lib/logic/buildCache/ICloudBuildCacheProvider.js +1 -0
  211. package/lib/logic/buildCache/ProjectBuildCache.d.ts +46 -0
  212. package/lib/logic/buildCache/ProjectBuildCache.js +1 -0
  213. package/lib/logic/buildCache/getHashesForGlobsAsync.d.ts +3 -0
  214. package/lib/logic/buildCache/getHashesForGlobsAsync.js +1 -0
  215. package/lib/logic/deploy/DeployScenarioConfiguration.d.ts +39 -0
  216. package/lib/logic/deploy/DeployScenarioConfiguration.js +1 -0
  217. package/lib/logic/installManager/InstallHelpers.d.ts +16 -0
  218. package/lib/logic/installManager/InstallHelpers.js +1 -0
  219. package/lib/logic/npm/NpmOptionsConfiguration.d.ts +21 -0
  220. package/lib/logic/npm/NpmOptionsConfiguration.js +1 -0
  221. package/lib/logic/npm/NpmShrinkwrapFile.d.ts +29 -0
  222. package/lib/logic/npm/NpmShrinkwrapFile.js +1 -0
  223. package/lib/logic/operations/AsyncOperationQueue.d.ts +47 -0
  224. package/lib/logic/operations/AsyncOperationQueue.js +1 -0
  225. package/lib/logic/operations/IOperationExecutionResult.d.ts +49 -0
  226. package/lib/logic/operations/IOperationExecutionResult.js +1 -0
  227. package/lib/logic/operations/IOperationRunner.d.ts +77 -0
  228. package/lib/logic/operations/IOperationRunner.js +1 -0
  229. package/lib/logic/operations/NullOperationRunner.d.ts +35 -0
  230. package/lib/logic/operations/NullOperationRunner.js +1 -0
  231. package/lib/logic/operations/Operation.d.ts +80 -0
  232. package/lib/logic/operations/Operation.js +1 -0
  233. package/lib/logic/operations/OperationError.d.ts +11 -0
  234. package/lib/logic/operations/OperationError.js +1 -0
  235. package/lib/logic/operations/OperationExecutionManager.d.ts +42 -0
  236. package/lib/logic/operations/OperationExecutionManager.js +1 -0
  237. package/lib/logic/operations/OperationExecutionRecord.d.ts +82 -0
  238. package/lib/logic/operations/OperationExecutionRecord.js +1 -0
  239. package/lib/logic/operations/OperationMetadataManager.d.ts +48 -0
  240. package/lib/logic/operations/OperationMetadataManager.js +1 -0
  241. package/lib/logic/operations/OperationResultSummarizerPlugin.d.ts +17 -0
  242. package/lib/logic/operations/OperationResultSummarizerPlugin.js +1 -0
  243. package/lib/logic/operations/OperationStateFile.d.ts +39 -0
  244. package/lib/logic/operations/OperationStateFile.js +1 -0
  245. package/lib/logic/operations/OperationStatus.d.ts +43 -0
  246. package/lib/logic/operations/OperationStatus.js +1 -0
  247. package/lib/logic/operations/PhasedOperationPlugin.d.ts +9 -0
  248. package/lib/logic/operations/PhasedOperationPlugin.js +1 -0
  249. package/lib/logic/operations/ProjectLogWritable.d.ts +17 -0
  250. package/lib/logic/operations/ProjectLogWritable.js +1 -0
  251. package/lib/logic/operations/ShellOperationRunner.d.ts +87 -0
  252. package/lib/logic/operations/ShellOperationRunner.js +1 -0
  253. package/lib/logic/operations/ShellOperationRunnerPlugin.d.ts +8 -0
  254. package/lib/logic/operations/ShellOperationRunnerPlugin.js +1 -0
  255. package/lib/logic/pnpm/IPnpmfile.d.ts +54 -0
  256. package/lib/logic/pnpm/IPnpmfile.js +1 -0
  257. package/lib/logic/pnpm/PnpmOptionsConfiguration.d.ts +242 -0
  258. package/lib/logic/pnpm/PnpmOptionsConfiguration.js +1 -0
  259. package/lib/logic/pnpm/PnpmProjectShrinkwrapFile.d.ts +26 -0
  260. package/lib/logic/pnpm/PnpmProjectShrinkwrapFile.js +1 -0
  261. package/lib/logic/pnpm/PnpmShrinkwrapFile.d.ts +207 -0
  262. package/lib/logic/pnpm/PnpmShrinkwrapFile.js +1 -0
  263. package/lib/logic/pnpm/PnpmYamlCommon.d.ts +8 -0
  264. package/lib/logic/pnpm/PnpmYamlCommon.js +1 -0
  265. package/lib/logic/pnpm/PnpmfileConfiguration.d.ts +28 -0
  266. package/lib/logic/pnpm/PnpmfileConfiguration.js +1 -0
  267. package/lib/logic/pnpm/PnpmfileShim.d.ts +3 -0
  268. package/lib/logic/pnpm/PnpmfileShim.js +1 -0
  269. package/lib/logic/policy/GitEmailPolicy.d.ts +6 -0
  270. package/lib/logic/policy/GitEmailPolicy.js +1 -0
  271. package/lib/logic/policy/PolicyValidator.d.ts +10 -0
  272. package/lib/logic/policy/PolicyValidator.js +1 -0
  273. package/lib/logic/policy/ShrinkwrapFilePolicy.d.ts +13 -0
  274. package/lib/logic/policy/ShrinkwrapFilePolicy.js +1 -0
  275. package/lib/logic/selectors/GitChangedProjectSelectorParser.d.ts +23 -0
  276. package/lib/logic/selectors/GitChangedProjectSelectorParser.js +1 -0
  277. package/lib/logic/selectors/ISelectorParser.d.ts +11 -0
  278. package/lib/logic/selectors/ISelectorParser.js +1 -0
  279. package/lib/logic/selectors/NamedProjectSelectorParser.d.ts +10 -0
  280. package/lib/logic/selectors/NamedProjectSelectorParser.js +1 -0
  281. package/lib/logic/selectors/TagProjectSelectorParser.d.ts +10 -0
  282. package/lib/logic/selectors/TagProjectSelectorParser.js +1 -0
  283. package/lib/logic/selectors/VersionPolicyProjectSelectorParser.d.ts +10 -0
  284. package/lib/logic/selectors/VersionPolicyProjectSelectorParser.js +1 -0
  285. package/lib/logic/setup/ArtifactoryConfiguration.d.ts +38 -0
  286. package/lib/logic/setup/ArtifactoryConfiguration.js +1 -0
  287. package/lib/logic/setup/KeyboardLoop.d.ts +27 -0
  288. package/lib/logic/setup/KeyboardLoop.js +1 -0
  289. package/lib/logic/setup/SetupPackageRegistry.d.ts +72 -0
  290. package/lib/logic/setup/SetupPackageRegistry.js +1 -0
  291. package/lib/logic/setup/TerminalInput.d.ts +22 -0
  292. package/lib/logic/setup/TerminalInput.js +1 -0
  293. package/lib/logic/versionMismatch/VersionMismatchFinder.d.ts +49 -0
  294. package/lib/logic/versionMismatch/VersionMismatchFinder.js +1 -0
  295. package/lib/logic/versionMismatch/VersionMismatchFinderCommonVersions.d.ts +16 -0
  296. package/lib/logic/versionMismatch/VersionMismatchFinderCommonVersions.js +1 -0
  297. package/lib/logic/versionMismatch/VersionMismatchFinderEntity.d.ts +20 -0
  298. package/lib/logic/versionMismatch/VersionMismatchFinderEntity.js +1 -0
  299. package/lib/logic/versionMismatch/VersionMismatchFinderProject.d.ts +16 -0
  300. package/lib/logic/versionMismatch/VersionMismatchFinderProject.js +1 -0
  301. package/lib/logic/yarn/YarnOptionsConfiguration.d.ts +37 -0
  302. package/lib/logic/yarn/YarnOptionsConfiguration.js +1 -0
  303. package/lib/logic/yarn/YarnShrinkwrapFile.d.ts +55 -0
  304. package/lib/logic/yarn/YarnShrinkwrapFile.js +1 -0
  305. package/lib/pluginFramework/IRushPlugin.d.ts +9 -0
  306. package/lib/pluginFramework/IRushPlugin.js +1 -0
  307. package/lib/pluginFramework/PhasedCommandHooks.d.ts +93 -0
  308. package/lib/pluginFramework/PhasedCommandHooks.js +1 -0
  309. package/lib/pluginFramework/PluginLoader/AutoinstallerPluginLoader.d.ts +27 -0
  310. package/lib/pluginFramework/PluginLoader/AutoinstallerPluginLoader.js +1 -0
  311. package/lib/pluginFramework/PluginLoader/BuiltInPluginLoader.d.ts +17 -0
  312. package/lib/pluginFramework/PluginLoader/BuiltInPluginLoader.js +1 -0
  313. package/lib/pluginFramework/PluginLoader/PluginLoaderBase.d.ts +47 -0
  314. package/lib/pluginFramework/PluginLoader/PluginLoaderBase.js +1 -0
  315. package/lib/pluginFramework/PluginLoader/RushSdk.d.ts +5 -0
  316. package/lib/pluginFramework/PluginLoader/RushSdk.js +1 -0
  317. package/lib/pluginFramework/PluginManager.d.ts +47 -0
  318. package/lib/pluginFramework/PluginManager.js +1 -0
  319. package/lib/pluginFramework/RushLifeCycle.d.ts +66 -0
  320. package/lib/pluginFramework/RushLifeCycle.js +1 -0
  321. package/lib/pluginFramework/RushSession.d.ts +30 -0
  322. package/lib/pluginFramework/RushSession.js +1 -0
  323. package/lib/pluginFramework/logging/Logger.d.ts +40 -0
  324. package/lib/pluginFramework/logging/Logger.js +1 -0
  325. package/lib/start-pnpm.d.ts +2 -0
  326. package/lib/start-pnpm.js +1 -0
  327. package/lib/start.d.ts +2 -0
  328. package/lib/start.js +1 -0
  329. package/lib/startx.d.ts +2 -0
  330. package/lib/startx.js +1 -0
  331. package/lib/utilities/AsyncRecycler.d.ts +38 -0
  332. package/lib/utilities/AsyncRecycler.js +1 -0
  333. package/lib/utilities/CollatedTerminalProvider.d.ts +18 -0
  334. package/lib/utilities/CollatedTerminalProvider.js +1 -0
  335. package/lib/utilities/Npm.d.ts +6 -0
  336. package/lib/utilities/Npm.js +1 -0
  337. package/lib/utilities/OverlappingPathAnalyzer.d.ts +9 -0
  338. package/lib/utilities/OverlappingPathAnalyzer.js +1 -0
  339. package/lib/utilities/PathConstants.d.ts +23 -0
  340. package/lib/utilities/PathConstants.js +1 -0
  341. package/lib/utilities/Stopwatch.d.ts +75 -0
  342. package/lib/utilities/Stopwatch.js +1 -0
  343. package/lib/utilities/TarExecutable.d.ts +32 -0
  344. package/lib/utilities/TarExecutable.js +1 -0
  345. package/lib/utilities/Utilities.d.ts +189 -0
  346. package/lib/utilities/Utilities.js +1 -0
  347. package/lib/utilities/WebClient.d.ts +49 -0
  348. package/lib/utilities/WebClient.js +1 -0
  349. package/lib/utilities/npmrcUtilities.d.ts +15 -0
  350. package/lib/utilities/npmrcUtilities.js +1 -0
  351. package/lib-shim/generate-stubs.d.ts +2 -0
  352. package/lib-shim/generate-stubs.d.ts.map +1 -0
  353. package/lib-shim/generate-stubs.js +82 -0
  354. package/lib-shim/generate-stubs.js.map +1 -0
  355. package/lib-shim/index.d.ts +5 -0
  356. package/lib-shim/index.d.ts.map +1 -0
  357. package/lib-shim/index.js +201 -0
  358. package/lib-shim/index.js.map +1 -0
  359. package/package.json +4 -4
  360. package/lib/index.d.ts.map +0 -1
  361. package/lib/index.js.map +0 -1
@@ -0,0 +1,47 @@
1
+ import { ITerminal } from '@rushstack/node-core-library';
2
+ import { CommandLineConfiguration } from '../api/CommandLineConfiguration';
3
+ import { RushConfiguration } from '../api/RushConfiguration';
4
+ import { IBuiltInPluginConfiguration } from './PluginLoader/BuiltInPluginLoader';
5
+ import { AutoinstallerPluginLoader } from './PluginLoader/AutoinstallerPluginLoader';
6
+ import { RushSession } from './RushSession';
7
+ import { PluginLoaderBase } from './PluginLoader/PluginLoaderBase';
8
+ export interface IPluginManagerOptions {
9
+ terminal: ITerminal;
10
+ rushConfiguration: RushConfiguration;
11
+ rushSession: RushSession;
12
+ builtInPluginConfigurations: IBuiltInPluginConfiguration[];
13
+ restrictConsoleOutput: boolean;
14
+ }
15
+ export interface ICustomCommandLineConfigurationInfo {
16
+ commandLineConfiguration: CommandLineConfiguration;
17
+ pluginLoader: PluginLoaderBase;
18
+ }
19
+ export declare class PluginManager {
20
+ private readonly _terminal;
21
+ private readonly _rushConfiguration;
22
+ private readonly _rushSession;
23
+ private readonly _restrictConsoleOutput;
24
+ private readonly _builtInPluginLoaders;
25
+ private readonly _autoinstallerPluginLoaders;
26
+ private readonly _installedAutoinstallerNames;
27
+ private readonly _loadedPluginNames;
28
+ private _error;
29
+ constructor(options: IPluginManagerOptions);
30
+ /**
31
+ * If an error occurs while attempting to load plugins, it will be saved in this property.
32
+ * Rush will attempt to continue and will report the error later by `BaseRushAction._throwPluginErrorIfNeed()`
33
+ * (unless we are invoking a command that is used to fix plugin problems).
34
+ */
35
+ get error(): Error | undefined;
36
+ updateAsync(): Promise<void>;
37
+ reinitializeAllPluginsForCommandAsync(commandName: string): Promise<void>;
38
+ _preparePluginAutoinstallersAsync(pluginLoaders: AutoinstallerPluginLoader[]): Promise<void>;
39
+ tryInitializeUnassociatedPluginsAsync(): Promise<void>;
40
+ tryInitializeAssociatedCommandPluginsAsync(commandName: string): Promise<void>;
41
+ tryGetCustomCommandLineConfigurationInfos(): ICustomCommandLineConfigurationInfo[];
42
+ private _initializePlugins;
43
+ private _getUnassociatedPluginLoaders;
44
+ private _getPluginLoadersForCommand;
45
+ private _applyPlugin;
46
+ }
47
+ //# sourceMappingURL=PluginManager.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("pluginFramework/PluginManager");
@@ -0,0 +1,66 @@
1
+ import { AsyncParallelHook, AsyncSeriesHook, HookMap } from 'tapable';
2
+ import type { ITelemetryData } from '../logic/Telemetry';
3
+ import type { PhasedCommandHooks } from './PhasedCommandHooks';
4
+ /**
5
+ * Information about the currently executing command provided to plugins.
6
+ * @beta
7
+ */
8
+ export interface IRushCommand {
9
+ /**
10
+ * The name of this command, as seen on the command line
11
+ */
12
+ readonly actionName: string;
13
+ }
14
+ /**
15
+ * Information about the currently executing global script command (as defined in command-line.json) provided to plugins.
16
+ * @beta
17
+ */
18
+ export interface IGlobalCommand extends IRushCommand {
19
+ }
20
+ /**
21
+ * Information about the currently executing phased script command (as defined in command-line.json, or default "build" or "rebuild") provided to plugins.
22
+ * @beta
23
+ */
24
+ export interface IPhasedCommand extends IRushCommand {
25
+ /**
26
+ * Hooks into the execution of the current phased command
27
+ * @alpha
28
+ */
29
+ readonly hooks: PhasedCommandHooks;
30
+ }
31
+ /**
32
+ * Hooks into the lifecycle of the Rush process invocation that plugins may tap into.
33
+ *
34
+ * @beta
35
+ */
36
+ export declare class RushLifecycleHooks {
37
+ /**
38
+ * The hook to run before executing any Rush CLI Command.
39
+ */
40
+ initialize: AsyncSeriesHook<IRushCommand>;
41
+ /**
42
+ * The hook to run before executing any global Rush CLI Command (defined in command-line.json).
43
+ */
44
+ runAnyGlobalCustomCommand: AsyncSeriesHook<IGlobalCommand>;
45
+ /**
46
+ * A hook map to allow plugins to hook specific named global commands (defined in command-line.json) before execution.
47
+ */
48
+ runGlobalCustomCommand: HookMap<AsyncSeriesHook<IGlobalCommand>>;
49
+ /**
50
+ * The hook to run before executing any phased Rush CLI Command (defined in command-line.json, or the default "build" or "rebuild").
51
+ */
52
+ runAnyPhasedCommand: AsyncSeriesHook<IPhasedCommand>;
53
+ /**
54
+ * A hook map to allow plugins to hook specific named phased commands (defined in command-line.json) before execution.
55
+ */
56
+ runPhasedCommand: HookMap<AsyncSeriesHook<IPhasedCommand>>;
57
+ /**
58
+ * The hook to run between preparing the common/temp folder and invoking the package manager during "rush install" or "rush update".
59
+ */
60
+ beforeInstall: AsyncSeriesHook<IGlobalCommand>;
61
+ /**
62
+ * A hook to allow plugins to hook custom logic to process telemetry data.
63
+ */
64
+ flushTelemetry: AsyncParallelHook<[ReadonlyArray<ITelemetryData>]>;
65
+ }
66
+ //# sourceMappingURL=RushLifeCycle.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("pluginFramework/RushLifeCycle");
@@ -0,0 +1,30 @@
1
+ import { ITerminalProvider } from '@rushstack/node-core-library';
2
+ import { IBuildCacheJson } from '../api/BuildCacheConfiguration';
3
+ import { ICloudBuildCacheProvider } from '../logic/buildCache/ICloudBuildCacheProvider';
4
+ import { ILogger } from './logging/Logger';
5
+ import { RushLifecycleHooks } from './RushLifeCycle';
6
+ /**
7
+ * @beta
8
+ */
9
+ export interface IRushSessionOptions {
10
+ terminalProvider: ITerminalProvider;
11
+ getIsDebugMode: () => boolean;
12
+ }
13
+ /**
14
+ * @beta
15
+ */
16
+ export declare type CloudBuildCacheProviderFactory = (buildCacheJson: IBuildCacheJson) => ICloudBuildCacheProvider;
17
+ /**
18
+ * @beta
19
+ */
20
+ export declare class RushSession {
21
+ private readonly _options;
22
+ private readonly _cloudBuildCacheProviderFactories;
23
+ readonly hooks: RushLifecycleHooks;
24
+ constructor(options: IRushSessionOptions);
25
+ getLogger(name: string): ILogger;
26
+ get terminalProvider(): ITerminalProvider;
27
+ registerCloudBuildCacheProviderFactory(cacheProviderName: string, factory: CloudBuildCacheProviderFactory): void;
28
+ getCloudBuildCacheProviderFactory(cacheProviderName: string): CloudBuildCacheProviderFactory | undefined;
29
+ }
30
+ //# sourceMappingURL=RushSession.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("pluginFramework/RushSession");
@@ -0,0 +1,40 @@
1
+ import { ITerminalProvider, Terminal } from '@rushstack/node-core-library';
2
+ /**
3
+ * @beta
4
+ */
5
+ export interface ILogger {
6
+ readonly terminal: Terminal;
7
+ /**
8
+ * Call this function to emit an error to the Rush runtime.
9
+ */
10
+ emitError(error: Error): void;
11
+ /**
12
+ * Call this function to emit a warning to the Rush runtime.
13
+ */
14
+ emitWarning(warning: Error): void;
15
+ }
16
+ export interface ILoggerOptions {
17
+ loggerName: string;
18
+ terminalProvider: ITerminalProvider;
19
+ getShouldPrintStacks: () => boolean;
20
+ }
21
+ export declare class Logger implements ILogger {
22
+ private readonly _options;
23
+ private readonly _errors;
24
+ private readonly _warnings;
25
+ readonly terminal: Terminal;
26
+ constructor(options: ILoggerOptions);
27
+ get errors(): ReadonlyArray<Error>;
28
+ get warnings(): ReadonlyArray<Error>;
29
+ static getErrorMessage(error: Error): string;
30
+ /**
31
+ * {@inheritdoc ILogger.emitError}
32
+ */
33
+ emitError(error: Error): void;
34
+ /**
35
+ * {@inheritdoc ILogger.emitWarning}
36
+ */
37
+ emitWarning(warning: Error): void;
38
+ private get _shouldPrintStacks();
39
+ }
40
+ //# sourceMappingURL=Logger.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("pluginFramework/logging/Logger");
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=start-pnpm.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../lib-shim/index")._rushSdk_loadInternalModule("start-pnpm");
package/lib/start.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=start.d.ts.map
package/lib/start.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require("../lib-shim/index")._rushSdk_loadInternalModule("start");
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=startx.d.ts.map
package/lib/startx.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require("../lib-shim/index")._rushSdk_loadInternalModule("startx");
@@ -0,0 +1,38 @@
1
+ /**
2
+ * For deleting large folders, AsyncRecycler is significantly faster than Utilities.dangerouslyDeletePath().
3
+ * It works by moving one or more folders into a temporary "recycler" folder, and then launches a separate
4
+ * background process to recursively delete that folder.
5
+ */
6
+ export declare class AsyncRecycler {
7
+ private _movedFolderCount;
8
+ private _deleting;
9
+ private _prefix;
10
+ /**
11
+ * The full path of the recycler folder.
12
+ * Example: `C:\MyRepo\common\rush-recycler`
13
+ */
14
+ readonly recyclerFolder: string;
15
+ constructor(recyclerFolder: string);
16
+ /**
17
+ * Synchronously moves the specified folder into the recycler folder. If the specified folder
18
+ * does not exist, then no operation is performed. After calling this function one or more times,
19
+ * deleteAll() must be called to actually delete the contents of the recycler folder.
20
+ */
21
+ moveFolder(folderPath: string): void;
22
+ /**
23
+ * This deletes all items under the specified folder, except for the items in the membersToExclude.
24
+ * To be conservative, a case-insensitive comparison is used for membersToExclude.
25
+ * The membersToExclude must be file/folder names that would match readdir() results.
26
+ */
27
+ moveAllItemsInFolder(folderPath: string, membersToExclude?: ReadonlyArray<string>): void;
28
+ /**
29
+ * Starts an asynchronous process to delete the recycler folder. Deleting will continue
30
+ * even if the current Node.js process is killed.
31
+ *
32
+ * NOTE: To avoid spawning multiple instances of the same command, moveFolder()
33
+ * MUST NOT be called again after deleteAll() has started.
34
+ */
35
+ deleteAll(): void;
36
+ private _renameOrRecurseInFolder;
37
+ }
38
+ //# sourceMappingURL=AsyncRecycler.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("utilities/AsyncRecycler");
@@ -0,0 +1,18 @@
1
+ import { ITerminalProvider, TerminalProviderSeverity } from '@rushstack/node-core-library';
2
+ import { CollatedTerminal } from '@rushstack/stream-collator';
3
+ export interface ICollatedTerminalProviderOptions {
4
+ debugEnabled: boolean;
5
+ }
6
+ export declare class CollatedTerminalProvider implements ITerminalProvider {
7
+ private readonly _collatedTerminal;
8
+ private _hasErrors;
9
+ private _hasWarnings;
10
+ private _debugEnabled;
11
+ readonly supportsColor: boolean;
12
+ readonly eolCharacter: string;
13
+ get hasErrors(): boolean;
14
+ get hasWarnings(): boolean;
15
+ constructor(collatedTerminal: CollatedTerminal, options?: Partial<ICollatedTerminalProviderOptions>);
16
+ write(data: string, severity: TerminalProviderSeverity): void;
17
+ }
18
+ //# sourceMappingURL=CollatedTerminalProvider.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("utilities/CollatedTerminalProvider");
@@ -0,0 +1,6 @@
1
+ export declare class Npm {
2
+ static publishedVersions(packageName: string, cwd: string, env: {
3
+ [key: string]: string | undefined;
4
+ }, extraArgs?: string[]): string[];
5
+ }
6
+ //# sourceMappingURL=Npm.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("utilities/Npm");
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This is a tool for determining if a set of paths overlap. For example 'lib' and 'lib/x' overlap,
3
+ * 'lib/x' and 'lib/y' do not.
4
+ */
5
+ export declare class OverlappingPathAnalyzer<TLabel> {
6
+ private readonly _root;
7
+ addPathAndGetFirstEncounteredLabels(path: string, label: TLabel): TLabel[] | undefined;
8
+ }
9
+ //# sourceMappingURL=OverlappingPathAnalyzer.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("utilities/OverlappingPathAnalyzer");
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The currently-executing rush-lib package's root folder path.
3
+ */
4
+ export declare const rushLibFolderRootPath: string;
5
+ /**
6
+ * The path to the assets folder in rush-lib.
7
+ */
8
+ export declare const assetsFolderPath: string;
9
+ /**
10
+ * The folder name ("scripts") where the scripts in rush-lib are built.
11
+ */
12
+ export declare const scriptsFolderName: string;
13
+ export declare const pnpmfileShimFilename: string;
14
+ export declare const installRunScriptFilename: string;
15
+ export declare const installRunRushScriptFilename: string;
16
+ export declare const installRunRushxScriptFilename: string;
17
+ export declare const installRunRushPnpmScriptFilename: string;
18
+ export declare const createLinksScriptFilename: string;
19
+ /**
20
+ * The path to the scripts folder in rush-lib/dist.
21
+ */
22
+ export declare const scriptsFolderPath: string;
23
+ //# sourceMappingURL=PathConstants.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("utilities/PathConstants");
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Used with the Stopwatch class.
3
+ */
4
+ export declare enum StopwatchState {
5
+ Stopped = 1,
6
+ Started = 2
7
+ }
8
+ /**
9
+ * Represents a readonly view of a `Stopwatch`.
10
+ * @beta
11
+ */
12
+ export interface IStopwatchResult {
13
+ /**
14
+ * Displays how long the stopwatch has been executing in a human readable format.
15
+ */
16
+ toString(): string;
17
+ /**
18
+ * Get the duration in seconds.
19
+ */
20
+ get duration(): number;
21
+ /**
22
+ * Return the start time of the most recent stopwatch run.
23
+ */
24
+ get startTime(): number | undefined;
25
+ /**
26
+ * Return the end time of the most recent stopwatch run.
27
+ */
28
+ get endTime(): number | undefined;
29
+ }
30
+ /**
31
+ * Represents a typical timer/stopwatch which keeps track
32
+ * of elapsed time in between two events.
33
+ */
34
+ export declare class Stopwatch implements IStopwatchResult {
35
+ private _startTime;
36
+ private _endTime;
37
+ private _state;
38
+ private _getTime;
39
+ constructor(getTime?: () => number);
40
+ /**
41
+ * Static helper function which creates a stopwatch which is immediately started
42
+ */
43
+ static start(): Stopwatch;
44
+ get state(): StopwatchState;
45
+ /**
46
+ * Starts the stopwatch. Note that if end() has been called,
47
+ * reset() should be called before calling start() again.
48
+ */
49
+ start(): Stopwatch;
50
+ /**
51
+ * Stops executing the stopwatch and saves the current timestamp
52
+ */
53
+ stop(): Stopwatch;
54
+ /**
55
+ * Resets all values of the stopwatch back to the original
56
+ */
57
+ reset(): Stopwatch;
58
+ /**
59
+ * Displays how long the stopwatch has been executing in a human readable format.
60
+ */
61
+ toString(): string;
62
+ /**
63
+ * Get the duration in seconds.
64
+ */
65
+ get duration(): number;
66
+ /**
67
+ * Return the start time of the most recent stopwatch run.
68
+ */
69
+ get startTime(): number | undefined;
70
+ /**
71
+ * Return the end time of the most recent stopwatch run.
72
+ */
73
+ get endTime(): number | undefined;
74
+ }
75
+ //# sourceMappingURL=Stopwatch.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("utilities/Stopwatch");
@@ -0,0 +1,32 @@
1
+ import { ITerminal } from '@rushstack/node-core-library';
2
+ import { RushConfigurationProject } from '../api/RushConfigurationProject';
3
+ export interface ITarOptionsBase {
4
+ logFilePath: string;
5
+ }
6
+ export interface IUntarOptions extends ITarOptionsBase {
7
+ archivePath: string;
8
+ outputFolderPath: string;
9
+ }
10
+ export interface ICreateArchiveOptions extends ITarOptionsBase {
11
+ archivePath: string;
12
+ paths: string[];
13
+ project: RushConfigurationProject;
14
+ }
15
+ export declare class TarExecutable {
16
+ private _tarExecutablePath;
17
+ private constructor();
18
+ static tryInitializeAsync(terminal: ITerminal): Promise<TarExecutable | undefined>;
19
+ /**
20
+ * @returns
21
+ * The "tar" exit code
22
+ */
23
+ tryUntarAsync(options: IUntarOptions): Promise<number>;
24
+ /**
25
+ * @returns
26
+ * The "tar" exit code
27
+ */
28
+ tryCreateArchiveFromProjectPathsAsync(options: ICreateArchiveOptions): Promise<number>;
29
+ private _spawnTarWithLoggingAsync;
30
+ private static _tryFindTarExecutablePathAsync;
31
+ }
32
+ //# sourceMappingURL=TarExecutable.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("utilities/TarExecutable");
@@ -0,0 +1,189 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ /// <reference types="node" />
4
+ import * as child_process from 'child_process';
5
+ import type * as stream from 'stream';
6
+ import { RushConfiguration } from '../api/RushConfiguration';
7
+ import { syncNpmrc } from './npmrcUtilities';
8
+ export declare type UNINITIALIZED = 'UNINITIALIZED';
9
+ export declare const UNINITIALIZED: UNINITIALIZED;
10
+ export interface IEnvironment {
11
+ [environmentVariableName: string]: string | undefined;
12
+ }
13
+ /**
14
+ * Options for Utilities.executeCommand().
15
+ */
16
+ export interface IExecuteCommandOptions {
17
+ command: string;
18
+ args: string[];
19
+ workingDirectory: string;
20
+ environment?: IEnvironment;
21
+ suppressOutput?: boolean;
22
+ keepEnvironment?: boolean;
23
+ }
24
+ /**
25
+ * Options for Utilities.installPackageInDirectory().
26
+ */
27
+ export interface IInstallPackageInDirectoryOptions {
28
+ directory: string;
29
+ packageName: string;
30
+ version: string;
31
+ tempPackageTitle: string;
32
+ maxInstallAttempts: number;
33
+ commonRushConfigFolder: string | undefined;
34
+ suppressOutput?: boolean;
35
+ }
36
+ export interface ILifecycleCommandOptions {
37
+ /**
38
+ * The rush configuration, if the command is running in a rush repo.
39
+ */
40
+ rushConfiguration: RushConfiguration | undefined;
41
+ /**
42
+ * Working directory for running the command
43
+ */
44
+ workingDirectory: string;
45
+ /**
46
+ * The folder containing a local .npmrc, which will be used for the INIT_CWD environment variable
47
+ */
48
+ initCwd: string;
49
+ /**
50
+ * If true, suppress the process's output, but if there is a nonzero exit code then print stderr
51
+ */
52
+ handleOutput: boolean;
53
+ /**
54
+ * Options for what should be added to the PATH variable
55
+ */
56
+ environmentPathOptions: IEnvironmentPathOptions;
57
+ }
58
+ export interface IEnvironmentPathOptions {
59
+ /**
60
+ * If true, include <project root>/node_modules/.bin in the PATH. If both this and
61
+ * {@link IEnvironmentPathOptions.includeRepoBin} are set, this path will take precedence.
62
+ */
63
+ includeProjectBin?: boolean;
64
+ /**
65
+ * If true, include <repo root>/common/temp/node_modules/.bin in the PATH.
66
+ */
67
+ includeRepoBin?: boolean;
68
+ /**
69
+ * Additional folders to be prepended to the search PATH.
70
+ */
71
+ additionalPathFolders?: string[] | undefined;
72
+ }
73
+ export interface IDisposable {
74
+ dispose(): void;
75
+ }
76
+ export declare class Utilities {
77
+ static syncNpmrc: typeof syncNpmrc;
78
+ /**
79
+ * Get the user's home directory. On windows this looks something like "C:\users\username\" and on UNIX
80
+ * this looks something like "/home/username/"
81
+ */
82
+ static getHomeFolder(): string;
83
+ /**
84
+ * Node.js equivalent of performance.now().
85
+ */
86
+ static getTimeInMs(): number;
87
+ /**
88
+ * Returns the values from a Set<T>
89
+ */
90
+ static getSetAsArray<T>(set: Set<T> | ReadonlySet<T>): T[];
91
+ /**
92
+ * Retries a function until a timeout is reached. The function is expected to throw if it failed and
93
+ * should be retried.
94
+ */
95
+ static retryUntilTimeout<TResult>(fn: () => TResult, maxWaitTimeMs: number, getTimeoutError: (innerError: Error) => Error, fnName: string): TResult;
96
+ /**
97
+ * Creates the specified folder by calling FileSystem.ensureFolder(), but using a
98
+ * retry loop to recover from temporary locks that may be held by other processes.
99
+ * If the folder already exists, no error occurs.
100
+ */
101
+ static createFolderWithRetry(folderName: string): void;
102
+ /**
103
+ * Determines if the path points to a file and that it exists.
104
+ */
105
+ static fileExists(filePath: string): boolean;
106
+ /**
107
+ * Determines if a path points to a directory and that it exists.
108
+ */
109
+ static directoryExists(directoryPath: string): boolean;
110
+ /**
111
+ * BE VERY CAREFUL CALLING THIS FUNCTION!
112
+ * If you specify the wrong folderPath (e.g. "/"), it could potentially delete your entire
113
+ * hard disk.
114
+ */
115
+ static dangerouslyDeletePath(folderPath: string): void;
116
+ /**
117
+ * Attempts to delete a file. If it does not exist, or the path is not a file, it no-ops.
118
+ */
119
+ static deleteFile(filePath: string): void;
120
+ static isFileTimestampCurrent(dateToCompare: Date, inputFilenames: string[]): boolean;
121
+ /**
122
+ * Executes the command with the specified command-line parameters, and waits for it to complete.
123
+ * The current directory will be set to the specified workingDirectory.
124
+ */
125
+ static executeCommand(options: IExecuteCommandOptions): void;
126
+ /**
127
+ * Executes the command with the specified command-line parameters, and waits for it to complete.
128
+ * The current directory will be set to the specified workingDirectory.
129
+ */
130
+ static executeCommandAndCaptureOutput(command: string, args: string[], workingDirectory: string, environment?: IEnvironment, keepEnvironment?: boolean): string;
131
+ /**
132
+ * Attempts to run Utilities.executeCommand() up to maxAttempts times before giving up.
133
+ */
134
+ static executeCommandWithRetry(options: IExecuteCommandOptions, maxAttempts: number, retryCallback?: () => void): void;
135
+ /**
136
+ * Executes the command using cmd if running on windows, or using sh if running on a non-windows OS.
137
+ * @param command - the command to run on shell
138
+ * @param options - options for how the command should be run
139
+ */
140
+ static executeLifecycleCommand(command: string, options: ILifecycleCommandOptions): number;
141
+ /**
142
+ * Executes the command using cmd if running on windows, or using sh if running on a non-windows OS.
143
+ * @param command - the command to run on shell
144
+ * @param options - options for how the command should be run
145
+ */
146
+ static executeLifecycleCommandAsync(command: string, options: ILifecycleCommandOptions): child_process.ChildProcess;
147
+ /**
148
+ * For strings passed to a shell command, this adds appropriate escaping
149
+ * to avoid misinterpretation of spaces or special characters.
150
+ *
151
+ * Example: 'hello there' --> '"hello there"'
152
+ */
153
+ static escapeShellParameter(parameter: string): string;
154
+ /**
155
+ * Installs a package by name and version in the specified directory.
156
+ */
157
+ static installPackageInDirectory(options: IInstallPackageInDirectoryOptions): void;
158
+ /**
159
+ * Copies the file "sourcePath" to "destinationPath", overwriting the target file location.
160
+ * If the source file does not exist, then the target file is deleted.
161
+ */
162
+ static syncFile(sourcePath: string, destinationPath: string): void;
163
+ static getRushConfigNotFoundError(): Error;
164
+ static usingAsync<TDisposable extends IDisposable>(getDisposableAsync: () => Promise<TDisposable> | IDisposable, doActionAsync: (disposable: TDisposable) => Promise<void> | void): Promise<void>;
165
+ static readStreamToBufferAsync(stream: stream.Readable): Promise<Buffer>;
166
+ private static _executeLifecycleCommandInternal;
167
+ /**
168
+ * Returns a process.env environment suitable for executing lifecycle scripts.
169
+ * @param initialEnvironment - an existing environment to copy instead of process.env
170
+ *
171
+ * @remarks
172
+ * Rush._assignRushInvokedFolder() assigns the `RUSH_INVOKED_FOLDER` variable globally
173
+ * via the parent process's environment.
174
+ */
175
+ private static _createEnvironmentForRushCommand;
176
+ /**
177
+ * Prepend the node_modules/.bin folder under the specified folder to the specified PATH variable. For example,
178
+ * if `rootDirectory` is "/foobar" and `existingPath` is "/bin", this function will return
179
+ * "/foobar/node_modules/.bin:/bin"
180
+ */
181
+ private static _prependNodeModulesBinToPath;
182
+ /**
183
+ * Executes the command with the specified command-line parameters, and waits for it to complete.
184
+ * The current directory will be set to the specified workingDirectory.
185
+ */
186
+ private static _executeCommandInternal;
187
+ private static _processResult;
188
+ }
189
+ //# sourceMappingURL=Utilities.d.ts.map
@@ -0,0 +1 @@
1
+ module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("utilities/Utilities");