@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.
- package/README.md +46 -11
- package/dist/rush-lib.d.ts +18 -0
- package/lib/api/ApprovedPackagesConfiguration.d.ts +74 -0
- package/lib/api/ApprovedPackagesConfiguration.js +1 -0
- package/lib/api/ApprovedPackagesPolicy.d.ts +54 -0
- package/lib/api/ApprovedPackagesPolicy.js +1 -0
- package/lib/api/BuildCacheConfiguration.d.ts +77 -0
- package/lib/api/BuildCacheConfiguration.js +1 -0
- package/lib/api/ChangeFile.d.ts +42 -0
- package/lib/api/ChangeFile.js +1 -0
- package/lib/api/ChangeManagement.d.ts +85 -0
- package/lib/api/ChangeManagement.js +1 -0
- package/lib/api/ChangeManager.d.ts +16 -0
- package/lib/api/ChangeManager.js +1 -0
- package/lib/api/Changelog.d.ts +74 -0
- package/lib/api/Changelog.js +1 -0
- package/lib/api/CommandLineConfiguration.d.ts +161 -0
- package/lib/api/CommandLineConfiguration.js +1 -0
- package/lib/api/CommandLineJson.d.ts +251 -0
- package/lib/api/CommandLineJson.js +1 -0
- package/lib/api/CommonVersionsConfiguration.d.ts +96 -0
- package/lib/api/CommonVersionsConfiguration.js +1 -0
- package/lib/api/EnvironmentConfiguration.d.ts +258 -0
- package/lib/api/EnvironmentConfiguration.js +1 -0
- package/lib/api/EventHooks.d.ts +42 -0
- package/lib/api/EventHooks.js +1 -0
- package/lib/api/ExperimentsConfiguration.d.ts +62 -0
- package/lib/api/ExperimentsConfiguration.js +1 -0
- package/lib/api/LastInstallFlag.d.ts +73 -0
- package/lib/api/LastInstallFlag.js +1 -0
- package/lib/api/LastLinkFlag.d.ts +41 -0
- package/lib/api/LastLinkFlag.js +1 -0
- package/lib/api/PackageJsonEditor.d.ts +79 -0
- package/lib/api/PackageJsonEditor.js +1 -0
- package/lib/api/PackageNameParsers.d.ts +18 -0
- package/lib/api/PackageNameParsers.js +1 -0
- package/lib/api/Rush.d.ts +91 -0
- package/lib/api/Rush.js +1 -0
- package/lib/api/RushConfiguration.d.ts +595 -0
- package/lib/api/RushConfiguration.js +1 -0
- package/lib/api/RushConfigurationProject.d.ts +217 -0
- package/lib/api/RushConfigurationProject.js +1 -0
- package/lib/api/RushGlobalFolder.d.ts +32 -0
- package/lib/api/RushGlobalFolder.js +1 -0
- package/lib/api/RushInternals.d.ts +15 -0
- package/lib/api/RushInternals.js +1 -0
- package/lib/api/RushPluginsConfiguration.d.ts +21 -0
- package/lib/api/RushPluginsConfiguration.js +1 -0
- package/lib/api/RushProjectConfiguration.d.ts +117 -0
- package/lib/api/RushProjectConfiguration.js +1 -0
- package/lib/api/RushUserConfiguration.d.ts +16 -0
- package/lib/api/RushUserConfiguration.js +1 -0
- package/lib/api/SaveCallbackPackageJsonEditor.d.ts +14 -0
- package/lib/api/SaveCallbackPackageJsonEditor.js +1 -0
- package/lib/api/Variants.d.ts +11 -0
- package/lib/api/Variants.js +1 -0
- package/lib/api/VersionPolicy.d.ts +203 -0
- package/lib/api/VersionPolicy.js +1 -0
- package/lib/api/VersionPolicyConfiguration.d.ts +75 -0
- package/lib/api/VersionPolicyConfiguration.js +1 -0
- package/lib/api/packageManager/NpmPackageManager.d.ts +9 -0
- package/lib/api/packageManager/NpmPackageManager.js +1 -0
- package/lib/api/packageManager/PackageManager.d.ts +29 -0
- package/lib/api/packageManager/PackageManager.js +1 -0
- package/lib/api/packageManager/PnpmPackageManager.d.ts +17 -0
- package/lib/api/packageManager/PnpmPackageManager.js +1 -0
- package/lib/api/packageManager/YarnPackageManager.d.ts +9 -0
- package/lib/api/packageManager/YarnPackageManager.js +1 -0
- package/lib/cli/CommandLineMigrationAdvisor.d.ts +5 -0
- package/lib/cli/CommandLineMigrationAdvisor.js +1 -0
- package/lib/cli/RushCommandLineParser.d.ts +49 -0
- package/lib/cli/RushCommandLineParser.js +1 -0
- package/lib/cli/RushPnpmCommandLine.d.ts +7 -0
- package/lib/cli/RushPnpmCommandLine.js +1 -0
- package/lib/cli/RushPnpmCommandLineParser.d.ts +26 -0
- package/lib/cli/RushPnpmCommandLineParser.js +1 -0
- package/lib/cli/RushStartupBanner.d.ts +7 -0
- package/lib/cli/RushStartupBanner.js +1 -0
- package/lib/cli/RushXCommandLine.d.ts +17 -0
- package/lib/cli/RushXCommandLine.js +1 -0
- package/lib/cli/actions/AddAction.d.ts +15 -0
- package/lib/cli/actions/AddAction.js +1 -0
- package/lib/cli/actions/BaseAddAndRemoveAction.d.ts +36 -0
- package/lib/cli/actions/BaseAddAndRemoveAction.js +1 -0
- package/lib/cli/actions/BaseInstallAction.d.ts +23 -0
- package/lib/cli/actions/BaseInstallAction.js +1 -0
- package/lib/cli/actions/BaseRushAction.d.ts +55 -0
- package/lib/cli/actions/BaseRushAction.js +1 -0
- package/lib/cli/actions/ChangeAction.d.ts +65 -0
- package/lib/cli/actions/ChangeAction.js +1 -0
- package/lib/cli/actions/CheckAction.d.ts +10 -0
- package/lib/cli/actions/CheckAction.js +1 -0
- package/lib/cli/actions/DeployAction.d.ts +12 -0
- package/lib/cli/actions/DeployAction.js +1 -0
- package/lib/cli/actions/InitAction.d.ts +16 -0
- package/lib/cli/actions/InitAction.js +1 -0
- package/lib/cli/actions/InitAutoinstallerAction.d.ts +8 -0
- package/lib/cli/actions/InitAutoinstallerAction.js +1 -0
- package/lib/cli/actions/InitDeployAction.d.ts +9 -0
- package/lib/cli/actions/InitDeployAction.js +1 -0
- package/lib/cli/actions/InstallAction.d.ts +9 -0
- package/lib/cli/actions/InstallAction.js +1 -0
- package/lib/cli/actions/LinkAction.d.ts +8 -0
- package/lib/cli/actions/LinkAction.js +1 -0
- package/lib/cli/actions/ListAction.d.ts +54 -0
- package/lib/cli/actions/ListAction.js +1 -0
- package/lib/cli/actions/PublishAction.d.ts +49 -0
- package/lib/cli/actions/PublishAction.js +1 -0
- package/lib/cli/actions/PurgeAction.d.ts +8 -0
- package/lib/cli/actions/PurgeAction.js +1 -0
- package/lib/cli/actions/RemoveAction.d.ts +13 -0
- package/lib/cli/actions/RemoveAction.js +1 -0
- package/lib/cli/actions/ScanAction.d.ts +23 -0
- package/lib/cli/actions/ScanAction.js +1 -0
- package/lib/cli/actions/SetupAction.d.ts +7 -0
- package/lib/cli/actions/SetupAction.js +1 -0
- package/lib/cli/actions/UnlinkAction.d.ts +7 -0
- package/lib/cli/actions/UnlinkAction.js +1 -0
- package/lib/cli/actions/UpdateAction.d.ts +11 -0
- package/lib/cli/actions/UpdateAction.js +1 -0
- package/lib/cli/actions/UpdateAutoinstallerAction.d.ts +8 -0
- package/lib/cli/actions/UpdateAutoinstallerAction.js +1 -0
- package/lib/cli/actions/UpdateCloudCredentialsAction.d.ts +10 -0
- package/lib/cli/actions/UpdateCloudCredentialsAction.js +1 -0
- package/lib/cli/actions/UpgradeInteractiveAction.d.ts +9 -0
- package/lib/cli/actions/UpgradeInteractiveAction.js +1 -0
- package/lib/cli/actions/VersionAction.d.ts +22 -0
- package/lib/cli/actions/VersionAction.js +1 -0
- package/lib/cli/parsing/ParseParallelism.d.ts +6 -0
- package/lib/cli/parsing/ParseParallelism.js +1 -0
- package/lib/cli/parsing/SelectionParameterSet.d.ts +51 -0
- package/lib/cli/parsing/SelectionParameterSet.js +1 -0
- package/lib/cli/scriptActions/BaseScriptAction.d.ts +28 -0
- package/lib/cli/scriptActions/BaseScriptAction.js +1 -0
- package/lib/cli/scriptActions/GlobalScriptAction.d.ts +30 -0
- package/lib/cli/scriptActions/GlobalScriptAction.js +1 -0
- package/lib/cli/scriptActions/PhasedScriptAction.d.ts +65 -0
- package/lib/cli/scriptActions/PhasedScriptAction.js +1 -0
- package/lib/index.d.ts +51 -1
- package/lib/index.js +1 -190
- package/lib/logic/Autoinstaller.d.ts +21 -0
- package/lib/logic/Autoinstaller.js +1 -0
- package/lib/logic/ChangeFiles.d.ts +33 -0
- package/lib/logic/ChangeFiles.js +1 -0
- package/lib/logic/ChangeManager.d.ts +39 -0
- package/lib/logic/ChangeManager.js +1 -0
- package/lib/logic/ChangelogGenerator.d.ts +46 -0
- package/lib/logic/ChangelogGenerator.js +1 -0
- package/lib/logic/CredentialCache.d.ts +36 -0
- package/lib/logic/CredentialCache.js +1 -0
- package/lib/logic/DependencyAnalyzer.d.ts +34 -0
- package/lib/logic/DependencyAnalyzer.js +1 -0
- package/lib/logic/DependencySpecifier.d.ts +70 -0
- package/lib/logic/DependencySpecifier.js +1 -0
- package/lib/logic/EventHooksManager.d.ts +10 -0
- package/lib/logic/EventHooksManager.js +1 -0
- package/lib/logic/Git.d.ts +103 -0
- package/lib/logic/Git.js +1 -0
- package/lib/logic/GitStatusParser.d.ts +42 -0
- package/lib/logic/GitStatusParser.js +1 -0
- package/lib/logic/JsonSchemaUrls.d.ts +8 -0
- package/lib/logic/JsonSchemaUrls.js +1 -0
- package/lib/logic/LookupByPath.d.ts +86 -0
- package/lib/logic/LookupByPath.js +1 -0
- package/lib/logic/NodeJsCompatibility.d.ts +42 -0
- package/lib/logic/NodeJsCompatibility.js +1 -0
- package/lib/logic/PackageJsonUpdaterTypes.d.ts +75 -0
- package/lib/logic/PackageJsonUpdaterTypes.js +1 -0
- package/lib/logic/PrereleaseToken.d.ts +12 -0
- package/lib/logic/PrereleaseToken.js +1 -0
- package/lib/logic/ProjectChangeAnalyzer.d.ts +81 -0
- package/lib/logic/ProjectChangeAnalyzer.js +1 -0
- package/lib/logic/ProjectCommandSet.d.ts +13 -0
- package/lib/logic/ProjectCommandSet.js +1 -0
- package/lib/logic/PublishGit.d.ts +19 -0
- package/lib/logic/PublishGit.js +1 -0
- package/lib/logic/PublishUtilities.d.ts +71 -0
- package/lib/logic/PublishUtilities.js +1 -0
- package/lib/logic/PurgeManager.d.ts +29 -0
- package/lib/logic/PurgeManager.js +1 -0
- package/lib/logic/RepoStateFile.d.ts +55 -0
- package/lib/logic/RepoStateFile.js +1 -0
- package/lib/logic/RushConstants.d.ts +219 -0
- package/lib/logic/RushConstants.js +1 -0
- package/lib/logic/Selection.d.ts +39 -0
- package/lib/logic/Selection.js +1 -0
- package/lib/logic/SetupChecks.d.ts +22 -0
- package/lib/logic/SetupChecks.js +1 -0
- package/lib/logic/ShrinkwrapFileFactory.d.ts +8 -0
- package/lib/logic/ShrinkwrapFileFactory.js +1 -0
- package/lib/logic/StandardScriptUpdater.d.ts +26 -0
- package/lib/logic/StandardScriptUpdater.js +1 -0
- package/lib/logic/Telemetry.d.ts +123 -0
- package/lib/logic/Telemetry.js +1 -0
- package/lib/logic/UnlinkManager.d.ts +24 -0
- package/lib/logic/UnlinkManager.js +1 -0
- package/lib/logic/base/BaseInstallManagerTypes.d.ts +65 -0
- package/lib/logic/base/BaseInstallManagerTypes.js +1 -0
- package/lib/logic/base/BasePackageManagerOptionsConfiguration.d.ts +50 -0
- package/lib/logic/base/BasePackageManagerOptionsConfiguration.js +1 -0
- package/lib/logic/base/BaseProjectShrinkwrapFile.d.ts +36 -0
- package/lib/logic/base/BaseProjectShrinkwrapFile.js +1 -0
- package/lib/logic/base/BaseShrinkwrapFile.d.ts +92 -0
- package/lib/logic/base/BaseShrinkwrapFile.js +1 -0
- package/lib/logic/buildCache/CacheEntryId.d.ts +28 -0
- package/lib/logic/buildCache/CacheEntryId.js +1 -0
- package/lib/logic/buildCache/FileSystemBuildCacheProvider.d.ts +40 -0
- package/lib/logic/buildCache/FileSystemBuildCacheProvider.js +1 -0
- package/lib/logic/buildCache/ICloudBuildCacheProvider.d.ts +14 -0
- package/lib/logic/buildCache/ICloudBuildCacheProvider.js +1 -0
- package/lib/logic/buildCache/ProjectBuildCache.d.ts +46 -0
- package/lib/logic/buildCache/ProjectBuildCache.js +1 -0
- package/lib/logic/buildCache/getHashesForGlobsAsync.d.ts +3 -0
- package/lib/logic/buildCache/getHashesForGlobsAsync.js +1 -0
- package/lib/logic/deploy/DeployScenarioConfiguration.d.ts +39 -0
- package/lib/logic/deploy/DeployScenarioConfiguration.js +1 -0
- package/lib/logic/installManager/InstallHelpers.d.ts +16 -0
- package/lib/logic/installManager/InstallHelpers.js +1 -0
- package/lib/logic/npm/NpmOptionsConfiguration.d.ts +21 -0
- package/lib/logic/npm/NpmOptionsConfiguration.js +1 -0
- package/lib/logic/npm/NpmShrinkwrapFile.d.ts +29 -0
- package/lib/logic/npm/NpmShrinkwrapFile.js +1 -0
- package/lib/logic/operations/AsyncOperationQueue.d.ts +47 -0
- package/lib/logic/operations/AsyncOperationQueue.js +1 -0
- package/lib/logic/operations/IOperationExecutionResult.d.ts +49 -0
- package/lib/logic/operations/IOperationExecutionResult.js +1 -0
- package/lib/logic/operations/IOperationRunner.d.ts +77 -0
- package/lib/logic/operations/IOperationRunner.js +1 -0
- package/lib/logic/operations/NullOperationRunner.d.ts +35 -0
- package/lib/logic/operations/NullOperationRunner.js +1 -0
- package/lib/logic/operations/Operation.d.ts +80 -0
- package/lib/logic/operations/Operation.js +1 -0
- package/lib/logic/operations/OperationError.d.ts +11 -0
- package/lib/logic/operations/OperationError.js +1 -0
- package/lib/logic/operations/OperationExecutionManager.d.ts +42 -0
- package/lib/logic/operations/OperationExecutionManager.js +1 -0
- package/lib/logic/operations/OperationExecutionRecord.d.ts +82 -0
- package/lib/logic/operations/OperationExecutionRecord.js +1 -0
- package/lib/logic/operations/OperationMetadataManager.d.ts +48 -0
- package/lib/logic/operations/OperationMetadataManager.js +1 -0
- package/lib/logic/operations/OperationResultSummarizerPlugin.d.ts +17 -0
- package/lib/logic/operations/OperationResultSummarizerPlugin.js +1 -0
- package/lib/logic/operations/OperationStateFile.d.ts +39 -0
- package/lib/logic/operations/OperationStateFile.js +1 -0
- package/lib/logic/operations/OperationStatus.d.ts +43 -0
- package/lib/logic/operations/OperationStatus.js +1 -0
- package/lib/logic/operations/PhasedOperationPlugin.d.ts +9 -0
- package/lib/logic/operations/PhasedOperationPlugin.js +1 -0
- package/lib/logic/operations/ProjectLogWritable.d.ts +17 -0
- package/lib/logic/operations/ProjectLogWritable.js +1 -0
- package/lib/logic/operations/ShellOperationRunner.d.ts +87 -0
- package/lib/logic/operations/ShellOperationRunner.js +1 -0
- package/lib/logic/operations/ShellOperationRunnerPlugin.d.ts +8 -0
- package/lib/logic/operations/ShellOperationRunnerPlugin.js +1 -0
- package/lib/logic/pnpm/IPnpmfile.d.ts +54 -0
- package/lib/logic/pnpm/IPnpmfile.js +1 -0
- package/lib/logic/pnpm/PnpmOptionsConfiguration.d.ts +242 -0
- package/lib/logic/pnpm/PnpmOptionsConfiguration.js +1 -0
- package/lib/logic/pnpm/PnpmProjectShrinkwrapFile.d.ts +26 -0
- package/lib/logic/pnpm/PnpmProjectShrinkwrapFile.js +1 -0
- package/lib/logic/pnpm/PnpmShrinkwrapFile.d.ts +207 -0
- package/lib/logic/pnpm/PnpmShrinkwrapFile.js +1 -0
- package/lib/logic/pnpm/PnpmYamlCommon.d.ts +8 -0
- package/lib/logic/pnpm/PnpmYamlCommon.js +1 -0
- package/lib/logic/pnpm/PnpmfileConfiguration.d.ts +28 -0
- package/lib/logic/pnpm/PnpmfileConfiguration.js +1 -0
- package/lib/logic/pnpm/PnpmfileShim.d.ts +3 -0
- package/lib/logic/pnpm/PnpmfileShim.js +1 -0
- package/lib/logic/policy/GitEmailPolicy.d.ts +6 -0
- package/lib/logic/policy/GitEmailPolicy.js +1 -0
- package/lib/logic/policy/PolicyValidator.d.ts +10 -0
- package/lib/logic/policy/PolicyValidator.js +1 -0
- package/lib/logic/policy/ShrinkwrapFilePolicy.d.ts +13 -0
- package/lib/logic/policy/ShrinkwrapFilePolicy.js +1 -0
- package/lib/logic/selectors/GitChangedProjectSelectorParser.d.ts +23 -0
- package/lib/logic/selectors/GitChangedProjectSelectorParser.js +1 -0
- package/lib/logic/selectors/ISelectorParser.d.ts +11 -0
- package/lib/logic/selectors/ISelectorParser.js +1 -0
- package/lib/logic/selectors/NamedProjectSelectorParser.d.ts +10 -0
- package/lib/logic/selectors/NamedProjectSelectorParser.js +1 -0
- package/lib/logic/selectors/TagProjectSelectorParser.d.ts +10 -0
- package/lib/logic/selectors/TagProjectSelectorParser.js +1 -0
- package/lib/logic/selectors/VersionPolicyProjectSelectorParser.d.ts +10 -0
- package/lib/logic/selectors/VersionPolicyProjectSelectorParser.js +1 -0
- package/lib/logic/setup/ArtifactoryConfiguration.d.ts +38 -0
- package/lib/logic/setup/ArtifactoryConfiguration.js +1 -0
- package/lib/logic/setup/KeyboardLoop.d.ts +27 -0
- package/lib/logic/setup/KeyboardLoop.js +1 -0
- package/lib/logic/setup/SetupPackageRegistry.d.ts +72 -0
- package/lib/logic/setup/SetupPackageRegistry.js +1 -0
- package/lib/logic/setup/TerminalInput.d.ts +22 -0
- package/lib/logic/setup/TerminalInput.js +1 -0
- package/lib/logic/versionMismatch/VersionMismatchFinder.d.ts +49 -0
- package/lib/logic/versionMismatch/VersionMismatchFinder.js +1 -0
- package/lib/logic/versionMismatch/VersionMismatchFinderCommonVersions.d.ts +16 -0
- package/lib/logic/versionMismatch/VersionMismatchFinderCommonVersions.js +1 -0
- package/lib/logic/versionMismatch/VersionMismatchFinderEntity.d.ts +20 -0
- package/lib/logic/versionMismatch/VersionMismatchFinderEntity.js +1 -0
- package/lib/logic/versionMismatch/VersionMismatchFinderProject.d.ts +16 -0
- package/lib/logic/versionMismatch/VersionMismatchFinderProject.js +1 -0
- package/lib/logic/yarn/YarnOptionsConfiguration.d.ts +37 -0
- package/lib/logic/yarn/YarnOptionsConfiguration.js +1 -0
- package/lib/logic/yarn/YarnShrinkwrapFile.d.ts +55 -0
- package/lib/logic/yarn/YarnShrinkwrapFile.js +1 -0
- package/lib/pluginFramework/IRushPlugin.d.ts +9 -0
- package/lib/pluginFramework/IRushPlugin.js +1 -0
- package/lib/pluginFramework/PhasedCommandHooks.d.ts +93 -0
- package/lib/pluginFramework/PhasedCommandHooks.js +1 -0
- package/lib/pluginFramework/PluginLoader/AutoinstallerPluginLoader.d.ts +27 -0
- package/lib/pluginFramework/PluginLoader/AutoinstallerPluginLoader.js +1 -0
- package/lib/pluginFramework/PluginLoader/BuiltInPluginLoader.d.ts +17 -0
- package/lib/pluginFramework/PluginLoader/BuiltInPluginLoader.js +1 -0
- package/lib/pluginFramework/PluginLoader/PluginLoaderBase.d.ts +47 -0
- package/lib/pluginFramework/PluginLoader/PluginLoaderBase.js +1 -0
- package/lib/pluginFramework/PluginLoader/RushSdk.d.ts +5 -0
- package/lib/pluginFramework/PluginLoader/RushSdk.js +1 -0
- package/lib/pluginFramework/PluginManager.d.ts +47 -0
- package/lib/pluginFramework/PluginManager.js +1 -0
- package/lib/pluginFramework/RushLifeCycle.d.ts +66 -0
- package/lib/pluginFramework/RushLifeCycle.js +1 -0
- package/lib/pluginFramework/RushSession.d.ts +30 -0
- package/lib/pluginFramework/RushSession.js +1 -0
- package/lib/pluginFramework/logging/Logger.d.ts +40 -0
- package/lib/pluginFramework/logging/Logger.js +1 -0
- package/lib/start-pnpm.d.ts +2 -0
- package/lib/start-pnpm.js +1 -0
- package/lib/start.d.ts +2 -0
- package/lib/start.js +1 -0
- package/lib/startx.d.ts +2 -0
- package/lib/startx.js +1 -0
- package/lib/utilities/AsyncRecycler.d.ts +38 -0
- package/lib/utilities/AsyncRecycler.js +1 -0
- package/lib/utilities/CollatedTerminalProvider.d.ts +18 -0
- package/lib/utilities/CollatedTerminalProvider.js +1 -0
- package/lib/utilities/Npm.d.ts +6 -0
- package/lib/utilities/Npm.js +1 -0
- package/lib/utilities/OverlappingPathAnalyzer.d.ts +9 -0
- package/lib/utilities/OverlappingPathAnalyzer.js +1 -0
- package/lib/utilities/PathConstants.d.ts +23 -0
- package/lib/utilities/PathConstants.js +1 -0
- package/lib/utilities/Stopwatch.d.ts +75 -0
- package/lib/utilities/Stopwatch.js +1 -0
- package/lib/utilities/TarExecutable.d.ts +32 -0
- package/lib/utilities/TarExecutable.js +1 -0
- package/lib/utilities/Utilities.d.ts +189 -0
- package/lib/utilities/Utilities.js +1 -0
- package/lib/utilities/WebClient.d.ts +49 -0
- package/lib/utilities/WebClient.js +1 -0
- package/lib/utilities/npmrcUtilities.d.ts +15 -0
- package/lib/utilities/npmrcUtilities.js +1 -0
- package/lib-shim/generate-stubs.d.ts +2 -0
- package/lib-shim/generate-stubs.d.ts.map +1 -0
- package/lib-shim/generate-stubs.js +82 -0
- package/lib-shim/generate-stubs.js.map +1 -0
- package/lib-shim/index.d.ts +5 -0
- package/lib-shim/index.d.ts.map +1 -0
- package/lib-shim/index.js +201 -0
- package/lib-shim/index.js.map +1 -0
- package/package.json +4 -4
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
package/lib/index.js
CHANGED
|
@@ -1,190 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
-
// See LICENSE in the project root for license information.
|
|
4
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
-
if (k2 === undefined) k2 = k;
|
|
6
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
-
}
|
|
10
|
-
Object.defineProperty(o, k2, desc);
|
|
11
|
-
}) : (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
o[k2] = m[k];
|
|
14
|
-
}));
|
|
15
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
-
}) : function(o, v) {
|
|
18
|
-
o["default"] = v;
|
|
19
|
-
});
|
|
20
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
-
if (mod && mod.__esModule) return mod;
|
|
22
|
-
var result = {};
|
|
23
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
-
__setModuleDefault(result, mod);
|
|
25
|
-
return result;
|
|
26
|
-
};
|
|
27
|
-
var _a;
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const path = __importStar(require("path"));
|
|
30
|
-
const node_core_library_1 = require("@rushstack/node-core-library");
|
|
31
|
-
const RUSH_LIB_NAME = '@microsoft/rush-lib';
|
|
32
|
-
const verboseEnabled = typeof process !== 'undefined' && process.env.RUSH_SDK_DEBUG === '1';
|
|
33
|
-
const terminal = new node_core_library_1.Terminal(new node_core_library_1.ConsoleTerminalProvider({
|
|
34
|
-
verboseEnabled
|
|
35
|
-
}));
|
|
36
|
-
function _require(moduleName) {
|
|
37
|
-
if (typeof __non_webpack_require__ === 'function') {
|
|
38
|
-
// If this library has been bundled with Webpack, we need to call the real `require` function
|
|
39
|
-
// that doesn't get turned into a `__webpack_require__` statement.
|
|
40
|
-
// `__non_webpack_require__` is a Webpack macro that gets turned into a `require` statement
|
|
41
|
-
// during bundling.
|
|
42
|
-
return __non_webpack_require__(moduleName);
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
return require(moduleName);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
// SCENARIO 1: Rush's PluginManager has initialized "rush-sdk" with Rush's own instance of rush-lib.
|
|
49
|
-
// The Rush host process will assign "global.___rush___rushLibModule" before loading the plugin.
|
|
50
|
-
let rushLibModule = global.___rush___rushLibModule || global.___rush___rushLibModuleFromInstallAndRunRush;
|
|
51
|
-
let errorMessage = '';
|
|
52
|
-
// SCENARIO 2: The project importing "rush-sdk" has installed its own instance of "rush-lib"
|
|
53
|
-
// as a package.json dependency. For example, this is used by the Jest tests for Rush plugins.
|
|
54
|
-
if (rushLibModule === undefined) {
|
|
55
|
-
const importingPath = (_a = module === null || module === void 0 ? void 0 : module.parent) === null || _a === void 0 ? void 0 : _a.filename;
|
|
56
|
-
if (importingPath) {
|
|
57
|
-
const callerPackageFolder = node_core_library_1.PackageJsonLookup.instance.tryGetPackageFolderFor(importingPath);
|
|
58
|
-
if (callerPackageFolder !== undefined) {
|
|
59
|
-
const callerPackageJson = _require(path.join(callerPackageFolder, 'package.json'));
|
|
60
|
-
// Does the caller properly declare a dependency on rush-lib?
|
|
61
|
-
if ((callerPackageJson.dependencies && callerPackageJson.dependencies[RUSH_LIB_NAME] !== undefined) ||
|
|
62
|
-
(callerPackageJson.devDependencies &&
|
|
63
|
-
callerPackageJson.devDependencies[RUSH_LIB_NAME] !== undefined) ||
|
|
64
|
-
(callerPackageJson.peerDependencies &&
|
|
65
|
-
callerPackageJson.peerDependencies[RUSH_LIB_NAME] !== undefined)) {
|
|
66
|
-
// Try to resolve rush-lib from the caller's folder
|
|
67
|
-
terminal.writeVerboseLine(`Try to load ${RUSH_LIB_NAME} from caller package`);
|
|
68
|
-
try {
|
|
69
|
-
rushLibModule = requireRushLibUnderFolderPath(callerPackageFolder);
|
|
70
|
-
}
|
|
71
|
-
catch (error) {
|
|
72
|
-
// If we fail to resolve it, ignore the error
|
|
73
|
-
terminal.writeVerboseLine(`Failed to load ${RUSH_LIB_NAME} from caller package`);
|
|
74
|
-
}
|
|
75
|
-
// If two different libraries invoke `rush-sdk`, and one of them provides "rush-lib"
|
|
76
|
-
// then the first version to be loaded wins. We do not support side-by-side instances of "rush-lib".
|
|
77
|
-
if (rushLibModule !== undefined) {
|
|
78
|
-
// to track which scenario is active and how it got initialized.
|
|
79
|
-
global.___rush___rushLibModule = rushLibModule;
|
|
80
|
-
terminal.writeVerboseLine(`Loaded ${RUSH_LIB_NAME} from caller`);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
// SCENARIO 3: A tool or script depends on "rush-sdk", and is meant to be used inside a monorepo folder.
|
|
87
|
-
// In this case, we can use install-run-rush.js to obtain the appropriate rush-lib version for the monorepo.
|
|
88
|
-
if (rushLibModule === undefined) {
|
|
89
|
-
try {
|
|
90
|
-
const rushJsonPath = tryFindRushJsonLocation(process.cwd());
|
|
91
|
-
if (!rushJsonPath) {
|
|
92
|
-
throw new Error('Unable to find rush.json in the current folder or its parent folders.\n' +
|
|
93
|
-
'This tool is meant to be invoked from a working directory inside a Rush repository.');
|
|
94
|
-
}
|
|
95
|
-
const monorepoRoot = path.dirname(rushJsonPath);
|
|
96
|
-
const rushJson = node_core_library_1.JsonFile.load(rushJsonPath);
|
|
97
|
-
const { rushVersion } = rushJson;
|
|
98
|
-
const installRunNodeModuleFolder = path.join(monorepoRoot, `common/temp/install-run/@microsoft+rush@${rushVersion}`);
|
|
99
|
-
try {
|
|
100
|
-
// First, try to load the version of "rush-lib" that was installed by install-run-rush.js
|
|
101
|
-
terminal.writeVerboseLine(`Trying to load ${RUSH_LIB_NAME} installed by install-run-rush`);
|
|
102
|
-
rushLibModule = requireRushLibUnderFolderPath(installRunNodeModuleFolder);
|
|
103
|
-
}
|
|
104
|
-
catch (e) {
|
|
105
|
-
let installAndRunRushStderrContent = '';
|
|
106
|
-
try {
|
|
107
|
-
const installAndRunRushJSPath = path.join(monorepoRoot, 'common/scripts/install-run-rush.js');
|
|
108
|
-
terminal.writeLine('The Rush engine has not been installed yet. Invoking install-run-rush.js...');
|
|
109
|
-
const installAndRuhRushProcess = node_core_library_1.Executable.spawnSync('node', [installAndRunRushJSPath, '--help'], {
|
|
110
|
-
stdio: 'pipe'
|
|
111
|
-
});
|
|
112
|
-
installAndRunRushStderrContent = installAndRuhRushProcess.stderr;
|
|
113
|
-
if (installAndRuhRushProcess.status !== 0) {
|
|
114
|
-
throw new Error(`The ${RUSH_LIB_NAME} package failed to install`);
|
|
115
|
-
}
|
|
116
|
-
// Retry to load "rush-lib" after install-run-rush run
|
|
117
|
-
terminal.writeVerboseLine(`Trying to load ${RUSH_LIB_NAME} installed by install-run-rush a second time`);
|
|
118
|
-
rushLibModule = requireRushLibUnderFolderPath(installRunNodeModuleFolder);
|
|
119
|
-
}
|
|
120
|
-
catch (e) {
|
|
121
|
-
console.error(`${installAndRunRushStderrContent}`);
|
|
122
|
-
throw new Error(`The ${RUSH_LIB_NAME} package failed to load`);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
if (rushLibModule !== undefined) {
|
|
126
|
-
// to track which scenario is active and how it got initialized.
|
|
127
|
-
global.___rush___rushLibModuleFromInstallAndRunRush = rushLibModule;
|
|
128
|
-
terminal.writeVerboseLine(`Loaded ${RUSH_LIB_NAME} installed by install-run-rush`);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
catch (e) {
|
|
132
|
-
// no-catch
|
|
133
|
-
errorMessage = e.message;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
if (rushLibModule === undefined) {
|
|
137
|
-
// This error indicates that a project is trying to import "@rushstack/rush-sdk", but the Rush engine
|
|
138
|
-
// instance cannot be found. If you are writing Jest tests for a Rush plugin, add "@microsoft/rush-lib"
|
|
139
|
-
// to the devDependencies for your project.
|
|
140
|
-
console.error(`Error: The @rushstack/rush-sdk package was not able to load the Rush engine:
|
|
141
|
-
${errorMessage}
|
|
142
|
-
`);
|
|
143
|
-
process.exit(1);
|
|
144
|
-
}
|
|
145
|
-
// Based on TypeScript's __exportStar()
|
|
146
|
-
for (const property in rushLibModule) {
|
|
147
|
-
if (property !== 'default' && !exports.hasOwnProperty(property)) {
|
|
148
|
-
const rushLibModuleForClosure = rushLibModule;
|
|
149
|
-
// Based on TypeScript's __createBinding()
|
|
150
|
-
Object.defineProperty(exports, property, {
|
|
151
|
-
enumerable: true,
|
|
152
|
-
get: function () {
|
|
153
|
-
return rushLibModuleForClosure[property];
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Require `@microsoft/rush-lib` under the specified folder path.
|
|
160
|
-
*/
|
|
161
|
-
function requireRushLibUnderFolderPath(folderPath) {
|
|
162
|
-
const rushLibModulePath = node_core_library_1.Import.resolveModule({
|
|
163
|
-
modulePath: RUSH_LIB_NAME,
|
|
164
|
-
baseFolderPath: folderPath
|
|
165
|
-
});
|
|
166
|
-
return _require(rushLibModulePath);
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Find the rush.json location and return the path, or undefined if a rush.json can't be found.
|
|
170
|
-
*
|
|
171
|
-
* @privateRemarks
|
|
172
|
-
* Keep this in sync with `RushConfiguration.tryFindRushJsonLocation`.
|
|
173
|
-
*/
|
|
174
|
-
function tryFindRushJsonLocation(startingFolder) {
|
|
175
|
-
let currentFolder = startingFolder;
|
|
176
|
-
// Look upwards at parent folders until we find a folder containing rush.json
|
|
177
|
-
for (let i = 0; i < 10; ++i) {
|
|
178
|
-
const rushJsonFilename = path.join(currentFolder, 'rush.json');
|
|
179
|
-
if (node_core_library_1.FileSystem.exists(rushJsonFilename)) {
|
|
180
|
-
return rushJsonFilename;
|
|
181
|
-
}
|
|
182
|
-
const parentFolder = path.dirname(currentFolder);
|
|
183
|
-
if (parentFolder === currentFolder) {
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
186
|
-
currentFolder = parentFolder;
|
|
187
|
-
}
|
|
188
|
-
return undefined;
|
|
189
|
-
}
|
|
190
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
module.exports = require("../lib-shim/index")._rushSdk_loadInternalModule("index");
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { RushConfiguration } from '../api/RushConfiguration';
|
|
2
|
+
interface IAutoinstallerOptions {
|
|
3
|
+
autoinstallerName: string;
|
|
4
|
+
rushConfiguration: RushConfiguration;
|
|
5
|
+
restrictConsoleOutput?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare class Autoinstaller {
|
|
8
|
+
readonly name: string;
|
|
9
|
+
private readonly _rushConfiguration;
|
|
10
|
+
private readonly _restrictConsoleOutput;
|
|
11
|
+
constructor(options: IAutoinstallerOptions);
|
|
12
|
+
get folderFullPath(): string;
|
|
13
|
+
get shrinkwrapFilePath(): string;
|
|
14
|
+
get packageJsonPath(): string;
|
|
15
|
+
static validateName(autoinstallerName: string): void;
|
|
16
|
+
prepareAsync(): Promise<void>;
|
|
17
|
+
update(): void;
|
|
18
|
+
private _logIfConsoleOutputIsNotRestricted;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=Autoinstaller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/Autoinstaller");
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { IChangelog } from '../api/Changelog';
|
|
2
|
+
import { RushConfiguration } from '../api/RushConfiguration';
|
|
3
|
+
/**
|
|
4
|
+
* This class represents the collection of change files existing in the repo and provides operations
|
|
5
|
+
* for those change files.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ChangeFiles {
|
|
8
|
+
/**
|
|
9
|
+
* Change file path relative to changes folder.
|
|
10
|
+
*/
|
|
11
|
+
private _files;
|
|
12
|
+
private _changesPath;
|
|
13
|
+
constructor(changesPath: string);
|
|
14
|
+
/**
|
|
15
|
+
* Validate if the newly added change files match the changed packages.
|
|
16
|
+
*/
|
|
17
|
+
static validate(newChangeFilePaths: string[], changedPackages: string[], rushConfiguration: RushConfiguration): void;
|
|
18
|
+
static getChangeComments(newChangeFilePaths: string[]): Map<string, string[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Get the array of absolute paths of change files.
|
|
21
|
+
*/
|
|
22
|
+
getFiles(): string[];
|
|
23
|
+
/**
|
|
24
|
+
* Get the path of changes folder.
|
|
25
|
+
*/
|
|
26
|
+
getChangesPath(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Delete all change files
|
|
29
|
+
*/
|
|
30
|
+
deleteAll(shouldDelete: boolean, updatedChangelogs?: IChangelog[]): number;
|
|
31
|
+
private _deleteFiles;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=ChangeFiles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/ChangeFiles");
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IPackageJson } from '@rushstack/node-core-library';
|
|
2
|
+
import { IChangeInfo } from '../api/ChangeManagement';
|
|
3
|
+
import { RushConfiguration } from '../api/RushConfiguration';
|
|
4
|
+
import { RushConfigurationProject } from '../api/RushConfigurationProject';
|
|
5
|
+
import { VersionPolicyConfiguration } from '../api/VersionPolicyConfiguration';
|
|
6
|
+
import { PrereleaseToken } from './PrereleaseToken';
|
|
7
|
+
/**
|
|
8
|
+
* The class manages change files and controls how changes logged by change files
|
|
9
|
+
* can be applied to package.json and change logs.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ChangeManager {
|
|
12
|
+
private _prereleaseToken;
|
|
13
|
+
private _orderedChanges;
|
|
14
|
+
private _allPackages;
|
|
15
|
+
private _allChanges;
|
|
16
|
+
private _changeFiles;
|
|
17
|
+
private _rushConfiguration;
|
|
18
|
+
private _projectsToExclude;
|
|
19
|
+
constructor(rushConfiguration: RushConfiguration, projectsToExclude?: Set<string> | undefined);
|
|
20
|
+
/**
|
|
21
|
+
* Load changes from change files
|
|
22
|
+
* @param changesPath - location of change files
|
|
23
|
+
* @param prereleaseToken - prerelease token
|
|
24
|
+
* @param includeCommitDetails - whether commit details need to be included in changes
|
|
25
|
+
*/
|
|
26
|
+
load(changesPath: string, prereleaseToken?: PrereleaseToken, includeCommitDetails?: boolean): void;
|
|
27
|
+
hasChanges(): boolean;
|
|
28
|
+
get packageChanges(): IChangeInfo[];
|
|
29
|
+
get allPackages(): Map<string, RushConfigurationProject>;
|
|
30
|
+
validateChanges(versionConfig: VersionPolicyConfiguration): void;
|
|
31
|
+
/**
|
|
32
|
+
* Apply changes to package.json
|
|
33
|
+
* @param shouldCommit - If the value is true, package.json will be updated.
|
|
34
|
+
* If the value is false, package.json and change logs will not be updated. It will only do a dry-run.
|
|
35
|
+
*/
|
|
36
|
+
apply(shouldCommit: boolean): Map<string, IPackageJson> | undefined;
|
|
37
|
+
updateChangelog(shouldCommit: boolean): void;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=ChangeManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/ChangeManager");
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { JsonSchema } from '@rushstack/node-core-library';
|
|
2
|
+
import { IChangeRequests } from './PublishUtilities';
|
|
3
|
+
import { IChangeInfo } from '../api/ChangeManagement';
|
|
4
|
+
import { IChangelog } from '../api/Changelog';
|
|
5
|
+
import { RushConfigurationProject } from '../api/RushConfigurationProject';
|
|
6
|
+
import { RushConfiguration } from '../api/RushConfiguration';
|
|
7
|
+
export declare class ChangelogGenerator {
|
|
8
|
+
/**
|
|
9
|
+
* The JSON Schema for Changelog file (changelog.schema.json).
|
|
10
|
+
*/
|
|
11
|
+
static readonly jsonSchema: JsonSchema;
|
|
12
|
+
/**
|
|
13
|
+
* Updates the appropriate changelogs with the given changes.
|
|
14
|
+
*/
|
|
15
|
+
static updateChangelogs(allChanges: IChangeRequests, allProjects: Map<string, RushConfigurationProject>, rushConfiguration: RushConfiguration, shouldCommit: boolean): IChangelog[];
|
|
16
|
+
/**
|
|
17
|
+
* Fully regenerate the markdown files based on the current json files.
|
|
18
|
+
*/
|
|
19
|
+
static regenerateChangelogs(allProjects: Map<string, RushConfigurationProject>, rushConfiguration: RushConfiguration): void;
|
|
20
|
+
/**
|
|
21
|
+
* Updates an individual changelog for a single project.
|
|
22
|
+
*/
|
|
23
|
+
static updateIndividualChangelog(change: IChangeInfo, projectFolder: string, shouldCommit: boolean, rushConfiguration: RushConfiguration, isLockstepped?: boolean, isMain?: boolean): IChangelog | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Loads the changelog json from disk, or creates a new one if there isn't one.
|
|
26
|
+
*/
|
|
27
|
+
private static _getChangelog;
|
|
28
|
+
/**
|
|
29
|
+
* Translates the given changelog json object into a markdown string.
|
|
30
|
+
*/
|
|
31
|
+
private static _translateToMarkdown;
|
|
32
|
+
/**
|
|
33
|
+
* Helper to return the comments string to be appends to the markdown content.
|
|
34
|
+
*/
|
|
35
|
+
private static _getChangeComments;
|
|
36
|
+
/**
|
|
37
|
+
* Changelogs should only be generated for publishable projects.
|
|
38
|
+
* Do not update changelog or delete the change files for prerelease. Save them for the official release.
|
|
39
|
+
* Unless the package is a hotfix, in which case do delete the change files.
|
|
40
|
+
*
|
|
41
|
+
* @param project
|
|
42
|
+
* @param allChanges
|
|
43
|
+
*/
|
|
44
|
+
private static _shouldUpdateChangeLog;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=ChangelogGenerator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/ChangelogGenerator");
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @beta
|
|
3
|
+
*/
|
|
4
|
+
export interface ICredentialCacheEntry {
|
|
5
|
+
expires?: Date;
|
|
6
|
+
credential: string;
|
|
7
|
+
credentialMetadata?: object;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @beta
|
|
11
|
+
*/
|
|
12
|
+
export interface ICredentialCacheOptions {
|
|
13
|
+
supportEditing: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @beta
|
|
17
|
+
*/
|
|
18
|
+
export declare class CredentialCache {
|
|
19
|
+
private readonly _cacheFilePath;
|
|
20
|
+
private readonly _cacheEntries;
|
|
21
|
+
private _modified;
|
|
22
|
+
private _disposed;
|
|
23
|
+
private _supportsEditing;
|
|
24
|
+
private readonly _lockfile;
|
|
25
|
+
private constructor();
|
|
26
|
+
static initializeAsync(options: ICredentialCacheOptions): Promise<CredentialCache>;
|
|
27
|
+
static usingAsync(options: ICredentialCacheOptions, doActionAsync: (credentialCache: CredentialCache) => Promise<void> | void): Promise<void>;
|
|
28
|
+
setCacheEntry(cacheId: string, entry: ICredentialCacheEntry): void;
|
|
29
|
+
tryGetCacheEntry(cacheId: string): ICredentialCacheEntry | undefined;
|
|
30
|
+
deleteCacheEntry(cacheId: string): void;
|
|
31
|
+
trimExpiredEntries(): void;
|
|
32
|
+
saveIfModifiedAsync(): Promise<void>;
|
|
33
|
+
dispose(): void;
|
|
34
|
+
private _validate;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=CredentialCache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/CredentialCache");
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CommonVersionsConfiguration } from '../api/CommonVersionsConfiguration';
|
|
2
|
+
import { RushConfiguration } from '../api/RushConfiguration';
|
|
3
|
+
export interface IDependencyAnalysis {
|
|
4
|
+
/**
|
|
5
|
+
* The common versions configuration from the repo's rush configuration.
|
|
6
|
+
*/
|
|
7
|
+
commonVersionsConfiguration: CommonVersionsConfiguration;
|
|
8
|
+
/**
|
|
9
|
+
* A map of all direct dependencies that only have a single semantic version specifier,
|
|
10
|
+
* unless the variant has the {@link CommonVersionsConfiguration.implicitlyPreferredVersions} option
|
|
11
|
+
* set to `false`.
|
|
12
|
+
*/
|
|
13
|
+
implicitlyPreferredVersionByPackageName: Map<string, string>;
|
|
14
|
+
/**
|
|
15
|
+
* A map of dependency name to the set of version specifiers used in the repo.
|
|
16
|
+
*/
|
|
17
|
+
allVersionsByPackageName: Map<string, Set<string>>;
|
|
18
|
+
}
|
|
19
|
+
export declare class DependencyAnalyzer {
|
|
20
|
+
private static _dependencyAnalyzerByRushConfiguration;
|
|
21
|
+
private _rushConfiguration;
|
|
22
|
+
private _analysisByVariant;
|
|
23
|
+
private constructor();
|
|
24
|
+
static forRushConfiguration(rushConfiguration: RushConfiguration): DependencyAnalyzer;
|
|
25
|
+
getAnalysis(variant?: string): IDependencyAnalysis;
|
|
26
|
+
/**
|
|
27
|
+
* Generates the {@link IDependencyAnalysis} for a variant.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* The result of this function is not cached.
|
|
31
|
+
*/
|
|
32
|
+
private _getAnalysisInternal;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=DependencyAnalyzer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/DependencyAnalyzer");
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The parsed format of a provided version specifier.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum DependencySpecifierType {
|
|
5
|
+
/**
|
|
6
|
+
* A git repository
|
|
7
|
+
*/
|
|
8
|
+
Git = "Git",
|
|
9
|
+
/**
|
|
10
|
+
* A tagged version, e.g. "example@latest"
|
|
11
|
+
*/
|
|
12
|
+
Tag = "Tag",
|
|
13
|
+
/**
|
|
14
|
+
* A specific version number, e.g. "example@1.2.3"
|
|
15
|
+
*/
|
|
16
|
+
Version = "Version",
|
|
17
|
+
/**
|
|
18
|
+
* A version range, e.g. "example@2.x"
|
|
19
|
+
*/
|
|
20
|
+
Range = "Range",
|
|
21
|
+
/**
|
|
22
|
+
* A local .tar.gz, .tar or .tgz file
|
|
23
|
+
*/
|
|
24
|
+
File = "File",
|
|
25
|
+
/**
|
|
26
|
+
* A local directory
|
|
27
|
+
*/
|
|
28
|
+
Directory = "Directory",
|
|
29
|
+
/**
|
|
30
|
+
* An HTTP url to a .tar.gz, .tar or .tgz file
|
|
31
|
+
*/
|
|
32
|
+
Remote = "Remote",
|
|
33
|
+
/**
|
|
34
|
+
* A package alias, e.g. "npm:other-package@^1.2.3"
|
|
35
|
+
*/
|
|
36
|
+
Alias = "Alias",
|
|
37
|
+
/**
|
|
38
|
+
* A package specified using workspace protocol, e.g. "workspace:^1.2.3"
|
|
39
|
+
*/
|
|
40
|
+
Workspace = "Workspace"
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* An NPM "version specifier" is a string that can appear as a package.json "dependencies" value.
|
|
44
|
+
* Example version specifiers: `^1.2.3`, `file:./blah.tgz`, `npm:other-package@~1.2.3`, and so forth.
|
|
45
|
+
* A "dependency specifier" is the version specifier information, combined with the dependency package name.
|
|
46
|
+
*/
|
|
47
|
+
export declare class DependencySpecifier {
|
|
48
|
+
/**
|
|
49
|
+
* The dependency package name, i.e. the key from a "dependencies" key/value table.
|
|
50
|
+
*/
|
|
51
|
+
readonly packageName: string;
|
|
52
|
+
/**
|
|
53
|
+
* The dependency version specifier, i.e. the value from a "dependencies" key/value table.
|
|
54
|
+
* Example values: `^1.2.3`, `file:./blah.tgz`, `npm:other-package@~1.2.3`
|
|
55
|
+
*/
|
|
56
|
+
readonly versionSpecifier: string;
|
|
57
|
+
/**
|
|
58
|
+
* The type of the `versionSpecifier`.
|
|
59
|
+
*/
|
|
60
|
+
readonly specifierType: DependencySpecifierType;
|
|
61
|
+
/**
|
|
62
|
+
* If `specifierType` is `alias`, then this is the parsed target dependency.
|
|
63
|
+
* For example, if version specifier i `"npm:other-package@^1.2.3"` then this is the parsed object for
|
|
64
|
+
* `other-package@^1.2.3`.
|
|
65
|
+
*/
|
|
66
|
+
readonly aliasTarget: DependencySpecifier | undefined;
|
|
67
|
+
constructor(packageName: string, versionSpecifier: string);
|
|
68
|
+
static getDependencySpecifierType(specifierType: string): DependencySpecifierType;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=DependencySpecifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/DependencySpecifier");
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Event } from '../api/EventHooks';
|
|
2
|
+
import { RushConfiguration } from '../api/RushConfiguration';
|
|
3
|
+
export declare class EventHooksManager {
|
|
4
|
+
private _rushConfiguration;
|
|
5
|
+
private _eventHooks;
|
|
6
|
+
private _commonTempFolder;
|
|
7
|
+
constructor(rushConfiguration: RushConfiguration);
|
|
8
|
+
handle(event: Event, isDebug: boolean, ignoreHooks: boolean): void;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=EventHooksManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/EventHooksManager");
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import gitInfo from 'git-repo-info';
|
|
2
|
+
import { ITerminal } from '@rushstack/node-core-library';
|
|
3
|
+
import { RushConfiguration } from '../api/RushConfiguration';
|
|
4
|
+
import { IGitStatusEntry } from './GitStatusParser';
|
|
5
|
+
export declare const DEFAULT_GIT_TAG_SEPARATOR: string;
|
|
6
|
+
export interface IGetBlobOptions {
|
|
7
|
+
blobSpec: string;
|
|
8
|
+
repositoryRoot: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class Git {
|
|
11
|
+
private readonly _rushConfiguration;
|
|
12
|
+
private _checkedGitPath;
|
|
13
|
+
private _gitPath;
|
|
14
|
+
private _checkedGitInfo;
|
|
15
|
+
private _gitInfo;
|
|
16
|
+
private _gitEmailResult;
|
|
17
|
+
private _gitHooksPath;
|
|
18
|
+
constructor(rushConfiguration: RushConfiguration);
|
|
19
|
+
/**
|
|
20
|
+
* Returns the path to the Git binary if found. Otherwise, return undefined.
|
|
21
|
+
*/
|
|
22
|
+
get gitPath(): string | undefined;
|
|
23
|
+
getGitPathOrThrow(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Returns true if the Git binary can be found.
|
|
26
|
+
*/
|
|
27
|
+
isGitPresent(): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Returns true if the Git binary was found and the current path is under a Git working tree.
|
|
30
|
+
* @param repoInfo - If provided, do the check based on this Git repo info. If not provided,
|
|
31
|
+
* the result of `this.getGitInfo()` is used.
|
|
32
|
+
*/
|
|
33
|
+
isPathUnderGitWorkingTree(repoInfo?: gitInfo.GitRepoInfo): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* If a Git email address is configured and is nonempty, this returns it.
|
|
36
|
+
* Otherwise, undefined is returned.
|
|
37
|
+
*/
|
|
38
|
+
tryGetGitEmail(): string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* If a Git email address is configured and is nonempty, this returns it.
|
|
41
|
+
* Otherwise, configuration instructions are printed to the console,
|
|
42
|
+
* and AlreadyReportedError is thrown.
|
|
43
|
+
*/
|
|
44
|
+
getGitEmail(): string;
|
|
45
|
+
/**
|
|
46
|
+
* Get the folder where Git hooks should go for the current working tree.
|
|
47
|
+
* Returns undefined if the current path is not under a Git working tree.
|
|
48
|
+
*/
|
|
49
|
+
getHooksFolder(): string | undefined;
|
|
50
|
+
isHooksPathDefault(): boolean;
|
|
51
|
+
getConfigHooksPath(): string;
|
|
52
|
+
/**
|
|
53
|
+
* Get information about the current Git working tree.
|
|
54
|
+
* Returns undefined if rush.json is not under a Git working tree.
|
|
55
|
+
*/
|
|
56
|
+
getGitInfo(): Readonly<gitInfo.GitRepoInfo> | undefined;
|
|
57
|
+
getMergeBase(targetBranch: string, terminal: ITerminal, shouldFetch?: boolean): string;
|
|
58
|
+
getBlobContent({ blobSpec, repositoryRoot }: IGetBlobOptions): string;
|
|
59
|
+
/**
|
|
60
|
+
* @param pathPrefix - An optional path prefix "git diff"s should be filtered by.
|
|
61
|
+
* @returns
|
|
62
|
+
* An array of paths of repo-root-relative paths of files that are different from
|
|
63
|
+
* those in the provided {@param targetBranch}. If a {@param pathPrefix} is provided,
|
|
64
|
+
* this function only returns results under the that path.
|
|
65
|
+
*/
|
|
66
|
+
getChangedFiles(targetBranch: string, terminal: ITerminal, skipFetch?: boolean, pathPrefix?: string): string[];
|
|
67
|
+
/**
|
|
68
|
+
* Gets the remote default branch that maps to the provided repository url.
|
|
69
|
+
* This method is used by 'Rush change' to find the default remote branch to compare against.
|
|
70
|
+
* If repository url is not provided or if there is no match, returns the default remote's
|
|
71
|
+
* default branch 'origin/main'.
|
|
72
|
+
* If there are more than one matches, returns the first remote's default branch.
|
|
73
|
+
*
|
|
74
|
+
* @param rushConfiguration - rush configuration
|
|
75
|
+
*/
|
|
76
|
+
getRemoteDefaultBranch(): string;
|
|
77
|
+
hasUncommittedChanges(): boolean;
|
|
78
|
+
hasUnstagedChanges(): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* The list of files changed but not committed
|
|
81
|
+
*/
|
|
82
|
+
getUncommittedChanges(): ReadonlyArray<string>;
|
|
83
|
+
getTagSeparator(): string;
|
|
84
|
+
getGitStatus(): Iterable<IGitStatusEntry>;
|
|
85
|
+
/**
|
|
86
|
+
* Git remotes can use different URL syntaxes; this converts them all to a normalized HTTPS
|
|
87
|
+
* representation for matching purposes. IF THE INPUT IS NOT ALREADY HTTPS, THE OUTPUT IS
|
|
88
|
+
* NOT NECESSARILY A VALID GIT URL.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* `git@github.com:ExampleOrg/ExampleProject.git` --> `https://github.com/ExampleOrg/ExampleProject`
|
|
92
|
+
*/
|
|
93
|
+
static normalizeGitUrlForComparison(gitUrl: string): string;
|
|
94
|
+
private _tryGetGitEmail;
|
|
95
|
+
private _tryGetGitHooksPath;
|
|
96
|
+
private _tryFetchRemoteBranch;
|
|
97
|
+
private _fetchRemoteBranch;
|
|
98
|
+
/**
|
|
99
|
+
* @internal
|
|
100
|
+
*/
|
|
101
|
+
_executeGitCommandAndCaptureOutput(gitPath: string, args: string[], repositoryRoot?: string): string;
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=Git.d.ts.map
|
package/lib/logic/Git.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/Git");
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export interface IGitStatusEntryBase {
|
|
2
|
+
kind: 'untracked' | 'changed' | 'unmerged' | 'renamed' | 'copied';
|
|
3
|
+
path: string;
|
|
4
|
+
}
|
|
5
|
+
export interface IUntrackedGitStatusEntry extends IGitStatusEntryBase {
|
|
6
|
+
kind: 'untracked';
|
|
7
|
+
}
|
|
8
|
+
export declare type GitStatusChangeType = 'added' | 'deleted' | 'modified' | 'renamed' | 'copied' | 'type-changed';
|
|
9
|
+
export interface IChangedGitStatusEntryFields {
|
|
10
|
+
stagedChangeType: GitStatusChangeType | undefined;
|
|
11
|
+
unstagedChangeType: GitStatusChangeType | undefined;
|
|
12
|
+
isInSubmodule: boolean;
|
|
13
|
+
headFileMode: string;
|
|
14
|
+
indexFileMode: string;
|
|
15
|
+
worktreeFileMode: string;
|
|
16
|
+
headObjectName: string;
|
|
17
|
+
indexObjectName: string;
|
|
18
|
+
}
|
|
19
|
+
export interface IChangedGitStatusEntry extends IGitStatusEntryBase, IChangedGitStatusEntryFields {
|
|
20
|
+
kind: 'changed';
|
|
21
|
+
}
|
|
22
|
+
export interface IRenamedOrCopiedGitStatusEntry extends IGitStatusEntryBase, IChangedGitStatusEntryFields {
|
|
23
|
+
kind: 'renamed' | 'copied';
|
|
24
|
+
renameOrCopyScore: number;
|
|
25
|
+
originalPath: string;
|
|
26
|
+
}
|
|
27
|
+
export interface IUnmergedGitStatusEntry extends IGitStatusEntryBase {
|
|
28
|
+
kind: 'unmerged';
|
|
29
|
+
stagedChangeType: GitStatusChangeType | undefined;
|
|
30
|
+
unstagedChangeType: GitStatusChangeType | undefined;
|
|
31
|
+
isInSubmodule: boolean;
|
|
32
|
+
stage1FileMode: string;
|
|
33
|
+
stage2FileMode: string;
|
|
34
|
+
stage3FileMode: string;
|
|
35
|
+
worktreeFileMode: string;
|
|
36
|
+
stage1ObjectName: string;
|
|
37
|
+
stage2ObjectName: string;
|
|
38
|
+
stage3ObjectName: string;
|
|
39
|
+
}
|
|
40
|
+
export declare type IGitStatusEntry = IUntrackedGitStatusEntry | IChangedGitStatusEntry | IRenamedOrCopiedGitStatusEntry | IUnmergedGitStatusEntry;
|
|
41
|
+
export declare function parseGitStatus(gitStatusOutput: string): Iterable<IGitStatusEntry>;
|
|
42
|
+
//# sourceMappingURL=GitStatusParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/GitStatusParser");
|