@rushstack/rush-sdk 5.90.2-pr3954.0 → 5.90.2-pr3964.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 +11 -46
- package/dist/rush-lib.d.ts +0 -18
- package/lib/index.d.ts +1 -51
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +190 -1
- package/lib/index.js.map +1 -0
- package/package.json +3 -3
- package/lib/api/ApprovedPackagesConfiguration.d.ts +0 -74
- package/lib/api/ApprovedPackagesConfiguration.js +0 -1
- package/lib/api/ApprovedPackagesPolicy.d.ts +0 -54
- package/lib/api/ApprovedPackagesPolicy.js +0 -1
- package/lib/api/BuildCacheConfiguration.d.ts +0 -77
- package/lib/api/BuildCacheConfiguration.js +0 -1
- package/lib/api/ChangeFile.d.ts +0 -42
- package/lib/api/ChangeFile.js +0 -1
- package/lib/api/ChangeManagement.d.ts +0 -85
- package/lib/api/ChangeManagement.js +0 -1
- package/lib/api/ChangeManager.d.ts +0 -16
- package/lib/api/ChangeManager.js +0 -1
- package/lib/api/Changelog.d.ts +0 -74
- package/lib/api/Changelog.js +0 -1
- package/lib/api/CommandLineConfiguration.d.ts +0 -161
- package/lib/api/CommandLineConfiguration.js +0 -1
- package/lib/api/CommandLineJson.d.ts +0 -251
- package/lib/api/CommandLineJson.js +0 -1
- package/lib/api/CommonVersionsConfiguration.d.ts +0 -96
- package/lib/api/CommonVersionsConfiguration.js +0 -1
- package/lib/api/EnvironmentConfiguration.d.ts +0 -258
- package/lib/api/EnvironmentConfiguration.js +0 -1
- package/lib/api/EventHooks.d.ts +0 -42
- package/lib/api/EventHooks.js +0 -1
- package/lib/api/ExperimentsConfiguration.d.ts +0 -62
- package/lib/api/ExperimentsConfiguration.js +0 -1
- package/lib/api/LastInstallFlag.d.ts +0 -73
- package/lib/api/LastInstallFlag.js +0 -1
- package/lib/api/LastLinkFlag.d.ts +0 -41
- package/lib/api/LastLinkFlag.js +0 -1
- package/lib/api/PackageJsonEditor.d.ts +0 -79
- package/lib/api/PackageJsonEditor.js +0 -1
- package/lib/api/PackageNameParsers.d.ts +0 -18
- package/lib/api/PackageNameParsers.js +0 -1
- package/lib/api/Rush.d.ts +0 -91
- package/lib/api/Rush.js +0 -1
- package/lib/api/RushConfiguration.d.ts +0 -595
- package/lib/api/RushConfiguration.js +0 -1
- package/lib/api/RushConfigurationProject.d.ts +0 -217
- package/lib/api/RushConfigurationProject.js +0 -1
- package/lib/api/RushGlobalFolder.d.ts +0 -32
- package/lib/api/RushGlobalFolder.js +0 -1
- package/lib/api/RushInternals.d.ts +0 -15
- package/lib/api/RushInternals.js +0 -1
- package/lib/api/RushPluginsConfiguration.d.ts +0 -21
- package/lib/api/RushPluginsConfiguration.js +0 -1
- package/lib/api/RushProjectConfiguration.d.ts +0 -117
- package/lib/api/RushProjectConfiguration.js +0 -1
- package/lib/api/RushUserConfiguration.d.ts +0 -16
- package/lib/api/RushUserConfiguration.js +0 -1
- package/lib/api/SaveCallbackPackageJsonEditor.d.ts +0 -14
- package/lib/api/SaveCallbackPackageJsonEditor.js +0 -1
- package/lib/api/Variants.d.ts +0 -11
- package/lib/api/Variants.js +0 -1
- package/lib/api/VersionPolicy.d.ts +0 -203
- package/lib/api/VersionPolicy.js +0 -1
- package/lib/api/VersionPolicyConfiguration.d.ts +0 -75
- package/lib/api/VersionPolicyConfiguration.js +0 -1
- package/lib/api/packageManager/NpmPackageManager.d.ts +0 -9
- package/lib/api/packageManager/NpmPackageManager.js +0 -1
- package/lib/api/packageManager/PackageManager.d.ts +0 -29
- package/lib/api/packageManager/PackageManager.js +0 -1
- package/lib/api/packageManager/PnpmPackageManager.d.ts +0 -17
- package/lib/api/packageManager/PnpmPackageManager.js +0 -1
- package/lib/api/packageManager/YarnPackageManager.d.ts +0 -9
- package/lib/api/packageManager/YarnPackageManager.js +0 -1
- package/lib/cli/CommandLineMigrationAdvisor.d.ts +0 -5
- package/lib/cli/CommandLineMigrationAdvisor.js +0 -1
- package/lib/cli/RushCommandLineParser.d.ts +0 -49
- package/lib/cli/RushCommandLineParser.js +0 -1
- package/lib/cli/RushPnpmCommandLine.d.ts +0 -7
- package/lib/cli/RushPnpmCommandLine.js +0 -1
- package/lib/cli/RushPnpmCommandLineParser.d.ts +0 -26
- package/lib/cli/RushPnpmCommandLineParser.js +0 -1
- package/lib/cli/RushStartupBanner.d.ts +0 -7
- package/lib/cli/RushStartupBanner.js +0 -1
- package/lib/cli/RushXCommandLine.d.ts +0 -17
- package/lib/cli/RushXCommandLine.js +0 -1
- package/lib/cli/actions/AddAction.d.ts +0 -15
- package/lib/cli/actions/AddAction.js +0 -1
- package/lib/cli/actions/BaseAddAndRemoveAction.d.ts +0 -36
- package/lib/cli/actions/BaseAddAndRemoveAction.js +0 -1
- package/lib/cli/actions/BaseInstallAction.d.ts +0 -23
- package/lib/cli/actions/BaseInstallAction.js +0 -1
- package/lib/cli/actions/BaseRushAction.d.ts +0 -55
- package/lib/cli/actions/BaseRushAction.js +0 -1
- package/lib/cli/actions/ChangeAction.d.ts +0 -65
- package/lib/cli/actions/ChangeAction.js +0 -1
- package/lib/cli/actions/CheckAction.d.ts +0 -10
- package/lib/cli/actions/CheckAction.js +0 -1
- package/lib/cli/actions/DeployAction.d.ts +0 -12
- package/lib/cli/actions/DeployAction.js +0 -1
- package/lib/cli/actions/InitAction.d.ts +0 -16
- package/lib/cli/actions/InitAction.js +0 -1
- package/lib/cli/actions/InitAutoinstallerAction.d.ts +0 -8
- package/lib/cli/actions/InitAutoinstallerAction.js +0 -1
- package/lib/cli/actions/InitDeployAction.d.ts +0 -9
- package/lib/cli/actions/InitDeployAction.js +0 -1
- package/lib/cli/actions/InstallAction.d.ts +0 -9
- package/lib/cli/actions/InstallAction.js +0 -1
- package/lib/cli/actions/LinkAction.d.ts +0 -8
- package/lib/cli/actions/LinkAction.js +0 -1
- package/lib/cli/actions/ListAction.d.ts +0 -54
- package/lib/cli/actions/ListAction.js +0 -1
- package/lib/cli/actions/PublishAction.d.ts +0 -49
- package/lib/cli/actions/PublishAction.js +0 -1
- package/lib/cli/actions/PurgeAction.d.ts +0 -8
- package/lib/cli/actions/PurgeAction.js +0 -1
- package/lib/cli/actions/RemoveAction.d.ts +0 -13
- package/lib/cli/actions/RemoveAction.js +0 -1
- package/lib/cli/actions/ScanAction.d.ts +0 -23
- package/lib/cli/actions/ScanAction.js +0 -1
- package/lib/cli/actions/SetupAction.d.ts +0 -7
- package/lib/cli/actions/SetupAction.js +0 -1
- package/lib/cli/actions/UnlinkAction.d.ts +0 -7
- package/lib/cli/actions/UnlinkAction.js +0 -1
- package/lib/cli/actions/UpdateAction.d.ts +0 -11
- package/lib/cli/actions/UpdateAction.js +0 -1
- package/lib/cli/actions/UpdateAutoinstallerAction.d.ts +0 -8
- package/lib/cli/actions/UpdateAutoinstallerAction.js +0 -1
- package/lib/cli/actions/UpdateCloudCredentialsAction.d.ts +0 -10
- package/lib/cli/actions/UpdateCloudCredentialsAction.js +0 -1
- package/lib/cli/actions/UpgradeInteractiveAction.d.ts +0 -9
- package/lib/cli/actions/UpgradeInteractiveAction.js +0 -1
- package/lib/cli/actions/VersionAction.d.ts +0 -22
- package/lib/cli/actions/VersionAction.js +0 -1
- package/lib/cli/parsing/ParseParallelism.d.ts +0 -6
- package/lib/cli/parsing/ParseParallelism.js +0 -1
- package/lib/cli/parsing/SelectionParameterSet.d.ts +0 -51
- package/lib/cli/parsing/SelectionParameterSet.js +0 -1
- package/lib/cli/scriptActions/BaseScriptAction.d.ts +0 -28
- package/lib/cli/scriptActions/BaseScriptAction.js +0 -1
- package/lib/cli/scriptActions/GlobalScriptAction.d.ts +0 -30
- package/lib/cli/scriptActions/GlobalScriptAction.js +0 -1
- package/lib/cli/scriptActions/PhasedScriptAction.d.ts +0 -65
- package/lib/cli/scriptActions/PhasedScriptAction.js +0 -1
- package/lib/logic/Autoinstaller.d.ts +0 -21
- package/lib/logic/Autoinstaller.js +0 -1
- package/lib/logic/ChangeFiles.d.ts +0 -33
- package/lib/logic/ChangeFiles.js +0 -1
- package/lib/logic/ChangeManager.d.ts +0 -39
- package/lib/logic/ChangeManager.js +0 -1
- package/lib/logic/ChangelogGenerator.d.ts +0 -46
- package/lib/logic/ChangelogGenerator.js +0 -1
- package/lib/logic/CredentialCache.d.ts +0 -36
- package/lib/logic/CredentialCache.js +0 -1
- package/lib/logic/DependencyAnalyzer.d.ts +0 -34
- package/lib/logic/DependencyAnalyzer.js +0 -1
- package/lib/logic/DependencySpecifier.d.ts +0 -70
- package/lib/logic/DependencySpecifier.js +0 -1
- package/lib/logic/EventHooksManager.d.ts +0 -10
- package/lib/logic/EventHooksManager.js +0 -1
- package/lib/logic/Git.d.ts +0 -103
- package/lib/logic/Git.js +0 -1
- package/lib/logic/GitStatusParser.d.ts +0 -42
- package/lib/logic/GitStatusParser.js +0 -1
- package/lib/logic/JsonSchemaUrls.d.ts +0 -8
- package/lib/logic/JsonSchemaUrls.js +0 -1
- package/lib/logic/LookupByPath.d.ts +0 -86
- package/lib/logic/LookupByPath.js +0 -1
- package/lib/logic/NodeJsCompatibility.d.ts +0 -42
- package/lib/logic/NodeJsCompatibility.js +0 -1
- package/lib/logic/PackageJsonUpdaterTypes.d.ts +0 -75
- package/lib/logic/PackageJsonUpdaterTypes.js +0 -1
- package/lib/logic/PrereleaseToken.d.ts +0 -12
- package/lib/logic/PrereleaseToken.js +0 -1
- package/lib/logic/ProjectChangeAnalyzer.d.ts +0 -81
- package/lib/logic/ProjectChangeAnalyzer.js +0 -1
- package/lib/logic/ProjectCommandSet.d.ts +0 -13
- package/lib/logic/ProjectCommandSet.js +0 -1
- package/lib/logic/PublishGit.d.ts +0 -19
- package/lib/logic/PublishGit.js +0 -1
- package/lib/logic/PublishUtilities.d.ts +0 -71
- package/lib/logic/PublishUtilities.js +0 -1
- package/lib/logic/PurgeManager.d.ts +0 -29
- package/lib/logic/PurgeManager.js +0 -1
- package/lib/logic/RepoStateFile.d.ts +0 -55
- package/lib/logic/RepoStateFile.js +0 -1
- package/lib/logic/RushConstants.d.ts +0 -219
- package/lib/logic/RushConstants.js +0 -1
- package/lib/logic/Selection.d.ts +0 -39
- package/lib/logic/Selection.js +0 -1
- package/lib/logic/SetupChecks.d.ts +0 -22
- package/lib/logic/SetupChecks.js +0 -1
- package/lib/logic/ShrinkwrapFileFactory.d.ts +0 -8
- package/lib/logic/ShrinkwrapFileFactory.js +0 -1
- package/lib/logic/StandardScriptUpdater.d.ts +0 -26
- package/lib/logic/StandardScriptUpdater.js +0 -1
- package/lib/logic/Telemetry.d.ts +0 -123
- package/lib/logic/Telemetry.js +0 -1
- package/lib/logic/UnlinkManager.d.ts +0 -24
- package/lib/logic/UnlinkManager.js +0 -1
- package/lib/logic/base/BaseInstallManagerTypes.d.ts +0 -65
- package/lib/logic/base/BaseInstallManagerTypes.js +0 -1
- package/lib/logic/base/BasePackageManagerOptionsConfiguration.d.ts +0 -50
- package/lib/logic/base/BasePackageManagerOptionsConfiguration.js +0 -1
- package/lib/logic/base/BaseProjectShrinkwrapFile.d.ts +0 -36
- package/lib/logic/base/BaseProjectShrinkwrapFile.js +0 -1
- package/lib/logic/base/BaseShrinkwrapFile.d.ts +0 -92
- package/lib/logic/base/BaseShrinkwrapFile.js +0 -1
- package/lib/logic/buildCache/CacheEntryId.d.ts +0 -28
- package/lib/logic/buildCache/CacheEntryId.js +0 -1
- package/lib/logic/buildCache/FileSystemBuildCacheProvider.d.ts +0 -40
- package/lib/logic/buildCache/FileSystemBuildCacheProvider.js +0 -1
- package/lib/logic/buildCache/ICloudBuildCacheProvider.d.ts +0 -14
- package/lib/logic/buildCache/ICloudBuildCacheProvider.js +0 -1
- package/lib/logic/buildCache/ProjectBuildCache.d.ts +0 -46
- package/lib/logic/buildCache/ProjectBuildCache.js +0 -1
- package/lib/logic/buildCache/getHashesForGlobsAsync.d.ts +0 -3
- package/lib/logic/buildCache/getHashesForGlobsAsync.js +0 -1
- package/lib/logic/deploy/DeployScenarioConfiguration.d.ts +0 -39
- package/lib/logic/deploy/DeployScenarioConfiguration.js +0 -1
- package/lib/logic/installManager/InstallHelpers.d.ts +0 -16
- package/lib/logic/installManager/InstallHelpers.js +0 -1
- package/lib/logic/npm/NpmOptionsConfiguration.d.ts +0 -21
- package/lib/logic/npm/NpmOptionsConfiguration.js +0 -1
- package/lib/logic/npm/NpmShrinkwrapFile.d.ts +0 -29
- package/lib/logic/npm/NpmShrinkwrapFile.js +0 -1
- package/lib/logic/operations/AsyncOperationQueue.d.ts +0 -47
- package/lib/logic/operations/AsyncOperationQueue.js +0 -1
- package/lib/logic/operations/IOperationExecutionResult.d.ts +0 -49
- package/lib/logic/operations/IOperationExecutionResult.js +0 -1
- package/lib/logic/operations/IOperationRunner.d.ts +0 -77
- package/lib/logic/operations/IOperationRunner.js +0 -1
- package/lib/logic/operations/NullOperationRunner.d.ts +0 -35
- package/lib/logic/operations/NullOperationRunner.js +0 -1
- package/lib/logic/operations/Operation.d.ts +0 -80
- package/lib/logic/operations/Operation.js +0 -1
- package/lib/logic/operations/OperationError.d.ts +0 -11
- package/lib/logic/operations/OperationError.js +0 -1
- package/lib/logic/operations/OperationExecutionManager.d.ts +0 -42
- package/lib/logic/operations/OperationExecutionManager.js +0 -1
- package/lib/logic/operations/OperationExecutionRecord.d.ts +0 -82
- package/lib/logic/operations/OperationExecutionRecord.js +0 -1
- package/lib/logic/operations/OperationMetadataManager.d.ts +0 -48
- package/lib/logic/operations/OperationMetadataManager.js +0 -1
- package/lib/logic/operations/OperationResultSummarizerPlugin.d.ts +0 -17
- package/lib/logic/operations/OperationResultSummarizerPlugin.js +0 -1
- package/lib/logic/operations/OperationStateFile.d.ts +0 -39
- package/lib/logic/operations/OperationStateFile.js +0 -1
- package/lib/logic/operations/OperationStatus.d.ts +0 -43
- package/lib/logic/operations/OperationStatus.js +0 -1
- package/lib/logic/operations/PhasedOperationPlugin.d.ts +0 -9
- package/lib/logic/operations/PhasedOperationPlugin.js +0 -1
- package/lib/logic/operations/ProjectLogWritable.d.ts +0 -17
- package/lib/logic/operations/ProjectLogWritable.js +0 -1
- package/lib/logic/operations/ShellOperationRunner.d.ts +0 -87
- package/lib/logic/operations/ShellOperationRunner.js +0 -1
- package/lib/logic/operations/ShellOperationRunnerPlugin.d.ts +0 -8
- package/lib/logic/operations/ShellOperationRunnerPlugin.js +0 -1
- package/lib/logic/pnpm/IPnpmfile.d.ts +0 -54
- package/lib/logic/pnpm/IPnpmfile.js +0 -1
- package/lib/logic/pnpm/PnpmOptionsConfiguration.d.ts +0 -242
- package/lib/logic/pnpm/PnpmOptionsConfiguration.js +0 -1
- package/lib/logic/pnpm/PnpmProjectShrinkwrapFile.d.ts +0 -26
- package/lib/logic/pnpm/PnpmProjectShrinkwrapFile.js +0 -1
- package/lib/logic/pnpm/PnpmShrinkwrapFile.d.ts +0 -207
- package/lib/logic/pnpm/PnpmShrinkwrapFile.js +0 -1
- package/lib/logic/pnpm/PnpmYamlCommon.d.ts +0 -8
- package/lib/logic/pnpm/PnpmYamlCommon.js +0 -1
- package/lib/logic/pnpm/PnpmfileConfiguration.d.ts +0 -28
- package/lib/logic/pnpm/PnpmfileConfiguration.js +0 -1
- package/lib/logic/pnpm/PnpmfileShim.d.ts +0 -3
- package/lib/logic/pnpm/PnpmfileShim.js +0 -1
- package/lib/logic/policy/GitEmailPolicy.d.ts +0 -6
- package/lib/logic/policy/GitEmailPolicy.js +0 -1
- package/lib/logic/policy/PolicyValidator.d.ts +0 -10
- package/lib/logic/policy/PolicyValidator.js +0 -1
- package/lib/logic/policy/ShrinkwrapFilePolicy.d.ts +0 -13
- package/lib/logic/policy/ShrinkwrapFilePolicy.js +0 -1
- package/lib/logic/selectors/GitChangedProjectSelectorParser.d.ts +0 -23
- package/lib/logic/selectors/GitChangedProjectSelectorParser.js +0 -1
- package/lib/logic/selectors/ISelectorParser.d.ts +0 -11
- package/lib/logic/selectors/ISelectorParser.js +0 -1
- package/lib/logic/selectors/NamedProjectSelectorParser.d.ts +0 -10
- package/lib/logic/selectors/NamedProjectSelectorParser.js +0 -1
- package/lib/logic/selectors/TagProjectSelectorParser.d.ts +0 -10
- package/lib/logic/selectors/TagProjectSelectorParser.js +0 -1
- package/lib/logic/selectors/VersionPolicyProjectSelectorParser.d.ts +0 -10
- package/lib/logic/selectors/VersionPolicyProjectSelectorParser.js +0 -1
- package/lib/logic/setup/ArtifactoryConfiguration.d.ts +0 -38
- package/lib/logic/setup/ArtifactoryConfiguration.js +0 -1
- package/lib/logic/setup/KeyboardLoop.d.ts +0 -27
- package/lib/logic/setup/KeyboardLoop.js +0 -1
- package/lib/logic/setup/SetupPackageRegistry.d.ts +0 -72
- package/lib/logic/setup/SetupPackageRegistry.js +0 -1
- package/lib/logic/setup/TerminalInput.d.ts +0 -22
- package/lib/logic/setup/TerminalInput.js +0 -1
- package/lib/logic/versionMismatch/VersionMismatchFinder.d.ts +0 -49
- package/lib/logic/versionMismatch/VersionMismatchFinder.js +0 -1
- package/lib/logic/versionMismatch/VersionMismatchFinderCommonVersions.d.ts +0 -16
- package/lib/logic/versionMismatch/VersionMismatchFinderCommonVersions.js +0 -1
- package/lib/logic/versionMismatch/VersionMismatchFinderEntity.d.ts +0 -20
- package/lib/logic/versionMismatch/VersionMismatchFinderEntity.js +0 -1
- package/lib/logic/versionMismatch/VersionMismatchFinderProject.d.ts +0 -16
- package/lib/logic/versionMismatch/VersionMismatchFinderProject.js +0 -1
- package/lib/logic/yarn/YarnOptionsConfiguration.d.ts +0 -37
- package/lib/logic/yarn/YarnOptionsConfiguration.js +0 -1
- package/lib/logic/yarn/YarnShrinkwrapFile.d.ts +0 -55
- package/lib/logic/yarn/YarnShrinkwrapFile.js +0 -1
- package/lib/pluginFramework/IRushPlugin.d.ts +0 -9
- package/lib/pluginFramework/IRushPlugin.js +0 -1
- package/lib/pluginFramework/PhasedCommandHooks.d.ts +0 -93
- package/lib/pluginFramework/PhasedCommandHooks.js +0 -1
- package/lib/pluginFramework/PluginLoader/AutoinstallerPluginLoader.d.ts +0 -27
- package/lib/pluginFramework/PluginLoader/AutoinstallerPluginLoader.js +0 -1
- package/lib/pluginFramework/PluginLoader/BuiltInPluginLoader.d.ts +0 -17
- package/lib/pluginFramework/PluginLoader/BuiltInPluginLoader.js +0 -1
- package/lib/pluginFramework/PluginLoader/PluginLoaderBase.d.ts +0 -47
- package/lib/pluginFramework/PluginLoader/PluginLoaderBase.js +0 -1
- package/lib/pluginFramework/PluginLoader/RushSdk.d.ts +0 -5
- package/lib/pluginFramework/PluginLoader/RushSdk.js +0 -1
- package/lib/pluginFramework/PluginManager.d.ts +0 -47
- package/lib/pluginFramework/PluginManager.js +0 -1
- package/lib/pluginFramework/RushLifeCycle.d.ts +0 -66
- package/lib/pluginFramework/RushLifeCycle.js +0 -1
- package/lib/pluginFramework/RushSession.d.ts +0 -30
- package/lib/pluginFramework/RushSession.js +0 -1
- package/lib/pluginFramework/logging/Logger.d.ts +0 -40
- package/lib/pluginFramework/logging/Logger.js +0 -1
- package/lib/start-pnpm.d.ts +0 -2
- package/lib/start-pnpm.js +0 -1
- package/lib/start.d.ts +0 -2
- package/lib/start.js +0 -1
- package/lib/startx.d.ts +0 -2
- package/lib/startx.js +0 -1
- package/lib/utilities/AsyncRecycler.d.ts +0 -38
- package/lib/utilities/AsyncRecycler.js +0 -1
- package/lib/utilities/CollatedTerminalProvider.d.ts +0 -18
- package/lib/utilities/CollatedTerminalProvider.js +0 -1
- package/lib/utilities/Npm.d.ts +0 -6
- package/lib/utilities/Npm.js +0 -1
- package/lib/utilities/OverlappingPathAnalyzer.d.ts +0 -9
- package/lib/utilities/OverlappingPathAnalyzer.js +0 -1
- package/lib/utilities/PathConstants.d.ts +0 -23
- package/lib/utilities/PathConstants.js +0 -1
- package/lib/utilities/Stopwatch.d.ts +0 -75
- package/lib/utilities/Stopwatch.js +0 -1
- package/lib/utilities/TarExecutable.d.ts +0 -32
- package/lib/utilities/TarExecutable.js +0 -1
- package/lib/utilities/Utilities.d.ts +0 -189
- package/lib/utilities/Utilities.js +0 -1
- package/lib/utilities/WebClient.d.ts +0 -49
- package/lib/utilities/WebClient.js +0 -1
- package/lib/utilities/npmrcUtilities.d.ts +0 -15
- package/lib/utilities/npmrcUtilities.js +0 -1
- package/lib-shim/generate-stubs.d.ts +0 -2
- package/lib-shim/generate-stubs.d.ts.map +0 -1
- package/lib-shim/generate-stubs.js +0 -82
- package/lib-shim/generate-stubs.js.map +0 -1
- package/lib-shim/index.d.ts +0 -5
- package/lib-shim/index.d.ts.map +0 -1
- package/lib-shim/index.js +0 -201
- package/lib-shim/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,64 +1,29 @@
|
|
|
1
1
|
## @rushstack/rush-sdk
|
|
2
2
|
|
|
3
|
-
This is a companion package for the Rush tool.
|
|
3
|
+
This is a companion package for the Rush tool. See the [@microsoft/rush](https://www.npmjs.com/package/@microsoft/rush) package for details.
|
|
4
4
|
|
|
5
|
-
⚠
|
|
5
|
+
⚠ ***THIS PACKAGE IS EXPERIMENTAL*** ⚠
|
|
6
6
|
|
|
7
|
-
The **@rushstack/rush-sdk** package acts as a lightweight proxy for accessing the APIs of the **@microsoft/rush-lib** engine.
|
|
7
|
+
The **@rushstack/rush-sdk** package acts as a lightweight proxy for accessing the APIs of the **@microsoft/rush-lib** engine. It is intended to support three different use cases:
|
|
8
8
|
|
|
9
|
-
1. Rush plugins should import from **@rushstack/rush-sdk** instead of **@microsoft/rush-lib**.
|
|
9
|
+
1. Rush plugins should import from **@rushstack/rush-sdk** instead of **@microsoft/rush-lib**. This gives plugins full access to Rush APIs while avoiding a redundant installation of those packages. At runtime, the APIs will be bound to the correct `rushVersion` from **rush.json**, and guaranteed to be the same **@microsoft/rush-lib** module instance as the plugin host.
|
|
10
10
|
|
|
11
|
-
2. When authoring unit tests for a Rush plugin, developers should add **@microsoft/rush-lib** to their **package.json** `devDependencies`.
|
|
11
|
+
2. When authoring unit tests for a Rush plugin, developers should add **@microsoft/rush-lib** to their **package.json** `devDependencies`. In this context, **@rushstack/rush-sdk** will resolve to that instance for testing purposes.
|
|
12
12
|
|
|
13
|
-
3. For scripts and tools that are designed to be used in a Rush monorepo, in the future **@rushstack/rush-sdk** will automatically invoke **install-run-rush.js** and load the local installation.
|
|
13
|
+
3. For scripts and tools that are designed to be used in a Rush monorepo, in the future **@rushstack/rush-sdk** will automatically invoke **install-run-rush.js** and load the local installation. This ensures that tools load a compatible version of the Rush engine for the given branch. Once this is implemented, **@rushstack/rush-sdk** can replace **@microsoft/rush-lib** entirely as the official API interface, with the latter serving as the underlying implementation.
|
|
14
14
|
|
|
15
|
-
The **@rushstack/rush-sdk** API declarations are identical to the corresponding version of **@microsoft/rush-lib**.
|
|
16
|
-
|
|
17
|
-
## Importing internal APIs
|
|
18
|
-
|
|
19
|
-
Backwards compatibility is only guaranteed for the APIs marked as `@public` in the official `rush-lib.d.ts` entry point.
|
|
20
|
-
However, sometimes it is expedient for a script to import internal modules from `@microsoft/rush-lib` to access
|
|
21
|
-
unofficial APIs. This practice faces a technical challenge that `@microsoft/rush-lib` is bundled using Webpack.
|
|
22
|
-
The `@rushstack/rush-sdk` package provides stub files that import the corresponding internal module from the
|
|
23
|
-
Webpack bundle, via the `@rushstack/webpack-deep-imports-plugin` mechanism.
|
|
24
|
-
|
|
25
|
-
> **WARNING:** If the loaded `rush-lib` package has a different version from `rush-sdk`, there is
|
|
26
|
-
> no guarantee that the corresponding path will exist or have the same type signature.
|
|
27
|
-
> Access internal APIs at your own risk. If you find an internal API to be useful, we recommend
|
|
28
|
-
> that you create a GitHub issue proposing to make it public.
|
|
29
|
-
|
|
30
|
-
Example 1: Conventional import of a public API:
|
|
31
|
-
|
|
32
|
-
```ts
|
|
33
|
-
// THIS IS THE RECOMMENDED PRACTICE:
|
|
34
|
-
import { RushConfiguration } from '@rushstack/rush-sdk';
|
|
35
|
-
const config = RushConfiguration.loadFromDefaultLocation();
|
|
36
|
-
console.log(config.commonFolder);
|
|
37
|
-
```
|
|
38
15
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
```ts
|
|
42
|
-
// WARNING: INTERNAL APIS MAY CHANGE AT ANY TIME -- USE THIS AT YOUR OWN RISK:
|
|
43
|
-
|
|
44
|
-
// Important: Since we're calling an internal API, we need to use the unbundled .d.ts files
|
|
45
|
-
// instead of the normal .d.ts rollup
|
|
46
|
-
import { RushConfiguration } from '@rushstack/rush-sdk/lib/';
|
|
47
|
-
const config = RushConfiguration.loadFromDefaultLocation();
|
|
48
|
-
console.log(config.commonFolder);
|
|
49
|
-
|
|
50
|
-
// Load an internal module from the Webpack bundle using a path-based import of a stub file:
|
|
51
|
-
import { GitEmailPolicy } from '@rushstack/rush-sdk/lib/logic/policy/GitEmailPolicy';
|
|
52
|
-
console.log(GitEmailPolicy.getEmailExampleLines(config));
|
|
53
|
-
```
|
|
16
|
+
The **@rushstack/rush-sdk** API declarations are identical to the corresponding version of **@microsoft/rush-lib**.
|
|
54
17
|
|
|
55
18
|
## Debugging
|
|
56
19
|
|
|
57
|
-
Verbose logging can be
|
|
20
|
+
Verbose logging can be turn on by set environment variable `RUSH_SDK_DEBUG` to `1`
|
|
21
|
+
|
|
58
22
|
|
|
59
23
|
## Links
|
|
60
24
|
|
|
61
|
-
- [CHANGELOG.md](
|
|
25
|
+
- [CHANGELOG.md](
|
|
26
|
+
https://github.com/microsoft/rushstack/blob/main/apps/rush/CHANGELOG.md) - Find
|
|
62
27
|
out what's new in the latest version
|
|
63
28
|
- [API Reference](https://api.rushstack.io/pages/rush-lib/)
|
|
64
29
|
|
package/dist/rush-lib.d.ts
CHANGED
|
@@ -2500,7 +2500,6 @@ export declare class RepoStateFile {
|
|
|
2500
2500
|
*/
|
|
2501
2501
|
export declare class Rush {
|
|
2502
2502
|
private static __rushLibPackageJson;
|
|
2503
|
-
private static __rushLibPackageFolder;
|
|
2504
2503
|
/**
|
|
2505
2504
|
* This API is used by the `@microsoft/rush` front end to launch the "rush" command-line.
|
|
2506
2505
|
* Third-party tools should not use this API. Instead, they should execute the "rush" binary
|
|
@@ -2534,8 +2533,6 @@ export declare class Rush {
|
|
|
2534
2533
|
* @internal
|
|
2535
2534
|
*/
|
|
2536
2535
|
static get _rushLibPackageJson(): IPackageJson;
|
|
2537
|
-
static get _rushLibPackageFolder(): string;
|
|
2538
|
-
private static _ensureOwnPackageJsonIsLoaded;
|
|
2539
2536
|
/**
|
|
2540
2537
|
* Assign the `RUSH_INVOKED_FOLDER` environment variable during startup. This is only applied when
|
|
2541
2538
|
* Rush is invoked via the CLI, not via the `@microsoft/rush-lib` automation API.
|
|
@@ -3444,21 +3441,6 @@ export declare class _RushGlobalFolder {
|
|
|
3444
3441
|
constructor();
|
|
3445
3442
|
}
|
|
3446
3443
|
|
|
3447
|
-
/**
|
|
3448
|
-
* Used by rush-sdk to access internals of rush-lib.
|
|
3449
|
-
* @internal
|
|
3450
|
-
*/
|
|
3451
|
-
export declare class _RushInternals {
|
|
3452
|
-
/**
|
|
3453
|
-
* Used by rush-sdk to load an internal API specified by its module path.
|
|
3454
|
-
*
|
|
3455
|
-
* @param srcImportPath - The module path to load. For example, to refer to `src/api/ChangeFile.ts`,
|
|
3456
|
-
* the `srcImportPath` would be `"api/ChangeFile"`.
|
|
3457
|
-
* @returns the module object as would be returned by `require()`
|
|
3458
|
-
*/
|
|
3459
|
-
static loadModule(srcImportPath: string): unknown;
|
|
3460
|
-
}
|
|
3461
|
-
|
|
3462
3444
|
/**
|
|
3463
3445
|
* Hooks into the lifecycle of the Rush process invocation that plugins may tap into.
|
|
3464
3446
|
*
|
package/lib/index.d.ts
CHANGED
|
@@ -1,52 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* A library for writing scripts that interact with the {@link https://rushjs.io/ | Rush} tool.
|
|
3
|
-
* @packageDocumentation
|
|
4
|
-
*/
|
|
5
|
-
export { ApprovedPackagesPolicy } from './api/ApprovedPackagesPolicy';
|
|
6
|
-
export { RushConfiguration, ITryFindRushJsonLocationOptions } from './api/RushConfiguration';
|
|
7
|
-
export { IPackageManagerOptionsJsonBase, IConfigurationEnvironment, IConfigurationEnvironmentVariable, PackageManagerOptionsConfigurationBase } from './logic/base/BasePackageManagerOptionsConfiguration';
|
|
8
|
-
export { INpmOptionsJson as _INpmOptionsJson, NpmOptionsConfiguration } from './logic/npm/NpmOptionsConfiguration';
|
|
9
|
-
export { IYarnOptionsJson as _IYarnOptionsJson, YarnOptionsConfiguration } from './logic/yarn/YarnOptionsConfiguration';
|
|
10
|
-
export { IPnpmOptionsJson as _IPnpmOptionsJson, PnpmStoreOptions, PnpmOptionsConfiguration } from './logic/pnpm/PnpmOptionsConfiguration';
|
|
11
|
-
export { BuildCacheConfiguration } from './api/BuildCacheConfiguration';
|
|
12
|
-
export { GetCacheEntryIdFunction, IGenerateCacheEntryIdOptions } from './logic/buildCache/CacheEntryId';
|
|
13
|
-
export { FileSystemBuildCacheProvider, IFileSystemBuildCacheProviderOptions } from './logic/buildCache/FileSystemBuildCacheProvider';
|
|
14
|
-
export { IPhase } from './api/CommandLineConfiguration';
|
|
15
|
-
export { EnvironmentConfiguration, EnvironmentVariableNames, IEnvironmentConfigurationInitializeOptions } from './api/EnvironmentConfiguration';
|
|
16
|
-
export { RushConstants } from './logic/RushConstants';
|
|
17
|
-
export { PackageManagerName, PackageManager } from './api/packageManager/PackageManager';
|
|
18
|
-
export { RushConfigurationProject } from './api/RushConfigurationProject';
|
|
19
|
-
export { RushUserConfiguration } from './api/RushUserConfiguration';
|
|
20
|
-
export { RushGlobalFolder as _RushGlobalFolder } from './api/RushGlobalFolder';
|
|
21
|
-
export { ApprovedPackagesItem, ApprovedPackagesConfiguration } from './api/ApprovedPackagesConfiguration';
|
|
22
|
-
export { CommonVersionsConfiguration } from './api/CommonVersionsConfiguration';
|
|
23
|
-
export { PackageJsonEditor, PackageJsonDependency, DependencyType } from './api/PackageJsonEditor';
|
|
24
|
-
export { RepoStateFile } from './logic/RepoStateFile';
|
|
25
|
-
export { LookupByPath } from './logic/LookupByPath';
|
|
26
|
-
export { EventHooks, Event } from './api/EventHooks';
|
|
27
|
-
export { ChangeManager } from './api/ChangeManager';
|
|
28
|
-
export { LastInstallFlag as _LastInstallFlag, ILockfileValidityCheckOptions as _ILockfileValidityCheckOptions } from './api/LastInstallFlag';
|
|
29
|
-
export { VersionPolicyDefinitionName, BumpType, LockStepVersionPolicy, IndividualVersionPolicy, VersionPolicy } from './api/VersionPolicy';
|
|
30
|
-
export { VersionPolicyConfiguration } from './api/VersionPolicyConfiguration';
|
|
31
|
-
export { ILaunchOptions, Rush } from './api/Rush';
|
|
32
|
-
export { RushInternals as _RushInternals } from './api/RushInternals';
|
|
33
|
-
export { ExperimentsConfiguration, IExperimentsJson } from './api/ExperimentsConfiguration';
|
|
34
|
-
export { ProjectChangeAnalyzer, IGetChangedProjectsOptions } from './logic/ProjectChangeAnalyzer';
|
|
35
|
-
export { IOperationRunner, IOperationRunnerContext } from './logic/operations/IOperationRunner';
|
|
36
|
-
export { IExecutionResult, IOperationExecutionResult } from './logic/operations/IOperationExecutionResult';
|
|
37
|
-
export { IOperationOptions, Operation } from './logic/operations/Operation';
|
|
38
|
-
export { OperationStatus } from './logic/operations/OperationStatus';
|
|
39
|
-
export { RushSession, IRushSessionOptions, CloudBuildCacheProviderFactory } from './pluginFramework/RushSession';
|
|
40
|
-
export { IRushCommand, IGlobalCommand, IPhasedCommand, RushLifecycleHooks } from './pluginFramework/RushLifeCycle';
|
|
41
|
-
export { ICreateOperationsContext, PhasedCommandHooks } from './pluginFramework/PhasedCommandHooks';
|
|
42
|
-
export { IRushPlugin } from './pluginFramework/IRushPlugin';
|
|
43
|
-
export { IBuiltInPluginConfiguration as _IBuiltInPluginConfiguration } from './pluginFramework/PluginLoader/BuiltInPluginLoader';
|
|
44
|
-
export { IRushPluginConfigurationBase as _IRushPluginConfigurationBase } from './api/RushPluginsConfiguration';
|
|
45
|
-
export { ILogger } from './pluginFramework/logging/Logger';
|
|
46
|
-
export { ICloudBuildCacheProvider } from './logic/buildCache/ICloudBuildCacheProvider';
|
|
47
|
-
export { ICredentialCacheOptions, ICredentialCacheEntry, CredentialCache } from './logic/CredentialCache';
|
|
48
|
-
export type { ITelemetryData, ITelemetryMachineInfo, ITelemetryOperationResult } from './logic/Telemetry';
|
|
49
|
-
export { IStopwatchResult } from './utilities/Stopwatch';
|
|
50
|
-
export { OperationStateFile as _OperationStateFile, IOperationStateFileOptions as _IOperationStateFileOptions, IOperationStateJson as _IOperationStateJson } from './logic/operations/OperationStateFile';
|
|
51
|
-
export { OperationMetadataManager as _OperationMetadataManager, IOperationMetadataManagerOptions as _IOperationMetadataManagerOptions, IOperationMetaData as _IOperationMetadata } from './logic/operations/OperationMetadataManager';
|
|
1
|
+
export {};
|
|
52
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/lib/index.js
CHANGED
|
@@ -1 +1,190 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
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
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,2CAA6B;AAC7B,oEAUsC;AAGtC,MAAM,aAAa,GAAW,qBAAqB,CAAC;AAEpD,MAAM,cAAc,GAAY,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ACnB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport * as path from 'path';\nimport {\n JsonFile,\n JsonObject,\n Import,\n IPackageJson,\n PackageJsonLookup,\n Executable,\n FileSystem,\n Terminal,\n ConsoleTerminalProvider\n} from '@rushstack/node-core-library';\nimport type { SpawnSyncReturns } from 'child_process';\n\nconst RUSH_LIB_NAME: string = '@microsoft/rush-lib';\n\nconst verboseEnabled: boolean = typeof process !== 'undefined' && process.env.RUSH_SDK_DEBUG === '1';\nconst terminal: Terminal = new Terminal(\n new ConsoleTerminalProvider({\n verboseEnabled\n })\n);\n\ntype RushLibModuleType = Record<string, unknown>;\ndeclare const global: NodeJS.Global &\n typeof globalThis & {\n ___rush___rushLibModule?: RushLibModuleType;\n ___rush___rushLibModuleFromInstallAndRunRush?: RushLibModuleType;\n };\n\nfunction _require<TResult>(moduleName: string): TResult {\n if (typeof __non_webpack_require__ === 'function') {\n // If this library has been bundled with Webpack, we need to call the real `require` function\n // that doesn't get turned into a `__webpack_require__` statement.\n // `__non_webpack_require__` is a Webpack macro that gets turned into a `require` statement\n // during bundling.\n return __non_webpack_require__(moduleName);\n } else {\n return require(moduleName);\n }\n}\n\n// SCENARIO 1: Rush's PluginManager has initialized \"rush-sdk\" with Rush's own instance of rush-lib.\n// The Rush host process will assign \"global.___rush___rushLibModule\" before loading the plugin.\nlet rushLibModule: RushLibModuleType | undefined =\n global.___rush___rushLibModule || global.___rush___rushLibModuleFromInstallAndRunRush;\nlet errorMessage: string = '';\n\n// SCENARIO 2: The project importing \"rush-sdk\" has installed its own instance of \"rush-lib\"\n// as a package.json dependency. For example, this is used by the Jest tests for Rush plugins.\nif (rushLibModule === undefined) {\n const importingPath: string | null | undefined = module?.parent?.filename;\n if (importingPath) {\n const callerPackageFolder: string | undefined =\n PackageJsonLookup.instance.tryGetPackageFolderFor(importingPath);\n\n if (callerPackageFolder !== undefined) {\n const callerPackageJson: IPackageJson = _require(path.join(callerPackageFolder, 'package.json'));\n\n // Does the caller properly declare a dependency on rush-lib?\n if (\n (callerPackageJson.dependencies && callerPackageJson.dependencies[RUSH_LIB_NAME] !== undefined) ||\n (callerPackageJson.devDependencies &&\n callerPackageJson.devDependencies[RUSH_LIB_NAME] !== undefined) ||\n (callerPackageJson.peerDependencies &&\n callerPackageJson.peerDependencies[RUSH_LIB_NAME] !== undefined)\n ) {\n // Try to resolve rush-lib from the caller's folder\n terminal.writeVerboseLine(`Try to load ${RUSH_LIB_NAME} from caller package`);\n try {\n rushLibModule = requireRushLibUnderFolderPath(callerPackageFolder);\n } catch (error) {\n // If we fail to resolve it, ignore the error\n terminal.writeVerboseLine(`Failed to load ${RUSH_LIB_NAME} from caller package`);\n }\n\n // If two different libraries invoke `rush-sdk`, and one of them provides \"rush-lib\"\n // then the first version to be loaded wins. We do not support side-by-side instances of \"rush-lib\".\n if (rushLibModule !== undefined) {\n // to track which scenario is active and how it got initialized.\n global.___rush___rushLibModule = rushLibModule;\n terminal.writeVerboseLine(`Loaded ${RUSH_LIB_NAME} from caller`);\n }\n }\n }\n }\n}\n\n// SCENARIO 3: A tool or script depends on \"rush-sdk\", and is meant to be used inside a monorepo folder.\n// In this case, we can use install-run-rush.js to obtain the appropriate rush-lib version for the monorepo.\nif (rushLibModule === undefined) {\n try {\n const rushJsonPath: string | undefined = tryFindRushJsonLocation(process.cwd());\n if (!rushJsonPath) {\n throw new Error(\n 'Unable to find rush.json in the current folder or its parent folders.\\n' +\n 'This tool is meant to be invoked from a working directory inside a Rush repository.'\n );\n }\n const monorepoRoot: string = path.dirname(rushJsonPath);\n\n const rushJson: JsonObject = JsonFile.load(rushJsonPath);\n const { rushVersion } = rushJson;\n\n const installRunNodeModuleFolder: string = path.join(\n monorepoRoot,\n `common/temp/install-run/@microsoft+rush@${rushVersion}`\n );\n\n try {\n // First, try to load the version of \"rush-lib\" that was installed by install-run-rush.js\n terminal.writeVerboseLine(`Trying to load ${RUSH_LIB_NAME} installed by install-run-rush`);\n rushLibModule = requireRushLibUnderFolderPath(installRunNodeModuleFolder);\n } catch (e) {\n let installAndRunRushStderrContent: string = '';\n try {\n const installAndRunRushJSPath: string = path.join(monorepoRoot, 'common/scripts/install-run-rush.js');\n\n terminal.writeLine('The Rush engine has not been installed yet. Invoking install-run-rush.js...');\n\n const installAndRuhRushProcess: SpawnSyncReturns<string> = Executable.spawnSync(\n 'node',\n [installAndRunRushJSPath, '--help'],\n {\n stdio: 'pipe'\n }\n );\n\n installAndRunRushStderrContent = installAndRuhRushProcess.stderr;\n if (installAndRuhRushProcess.status !== 0) {\n throw new Error(`The ${RUSH_LIB_NAME} package failed to install`);\n }\n\n // Retry to load \"rush-lib\" after install-run-rush run\n terminal.writeVerboseLine(\n `Trying to load ${RUSH_LIB_NAME} installed by install-run-rush a second time`\n );\n rushLibModule = requireRushLibUnderFolderPath(installRunNodeModuleFolder);\n } catch (e) {\n console.error(`${installAndRunRushStderrContent}`);\n throw new Error(`The ${RUSH_LIB_NAME} package failed to load`);\n }\n }\n\n if (rushLibModule !== undefined) {\n // to track which scenario is active and how it got initialized.\n global.___rush___rushLibModuleFromInstallAndRunRush = rushLibModule;\n terminal.writeVerboseLine(`Loaded ${RUSH_LIB_NAME} installed by install-run-rush`);\n }\n } catch (e) {\n // no-catch\n errorMessage = (e as Error).message;\n }\n}\n\nif (rushLibModule === undefined) {\n // This error indicates that a project is trying to import \"@rushstack/rush-sdk\", but the Rush engine\n // instance cannot be found. If you are writing Jest tests for a Rush plugin, add \"@microsoft/rush-lib\"\n // to the devDependencies for your project.\n console.error(`Error: The @rushstack/rush-sdk package was not able to load the Rush engine:\n${errorMessage}\n`);\n process.exit(1);\n}\n\n// Based on TypeScript's __exportStar()\nfor (const property in rushLibModule) {\n if (property !== 'default' && !exports.hasOwnProperty(property)) {\n const rushLibModuleForClosure: RushLibModuleType = rushLibModule;\n\n // Based on TypeScript's __createBinding()\n Object.defineProperty(exports, property, {\n enumerable: true,\n get: function () {\n return rushLibModuleForClosure[property];\n }\n });\n }\n}\n\n/**\n * Require `@microsoft/rush-lib` under the specified folder path.\n */\nfunction requireRushLibUnderFolderPath(folderPath: string): RushLibModuleType {\n const rushLibModulePath: string = Import.resolveModule({\n modulePath: RUSH_LIB_NAME,\n baseFolderPath: folderPath\n });\n\n return _require(rushLibModulePath);\n}\n\n/**\n * Find the rush.json location and return the path, or undefined if a rush.json can't be found.\n *\n * @privateRemarks\n * Keep this in sync with `RushConfiguration.tryFindRushJsonLocation`.\n */\nfunction tryFindRushJsonLocation(startingFolder: string): string | undefined {\n let currentFolder: string = startingFolder;\n\n // Look upwards at parent folders until we find a folder containing rush.json\n for (let i: number = 0; i < 10; ++i) {\n const rushJsonFilename: string = path.join(currentFolder, 'rush.json');\n\n if (FileSystem.exists(rushJsonFilename)) {\n return rushJsonFilename;\n }\n\n const parentFolder: string = path.dirname(currentFolder);\n if (parentFolder === currentFolder) {\n break;\n }\n\n currentFolder = parentFolder;\n }\n\n return undefined;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/rush-sdk",
|
|
3
|
-
"version": "5.90.2-
|
|
3
|
+
"version": "5.90.2-pr3964.0",
|
|
4
4
|
"description": "An API for interacting with the Rush engine",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"directory": "apps/rush-sdk"
|
|
9
9
|
},
|
|
10
10
|
"homepage": "https://rushjs.io",
|
|
11
|
-
"main": "lib
|
|
11
|
+
"main": "lib/index.js",
|
|
12
12
|
"typings": "dist/rush-lib.d.ts",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@types/heft-jest": "1.0.1",
|
|
21
21
|
"@types/semver": "7.3.5",
|
|
22
22
|
"@types/webpack-env": "1.18.0",
|
|
23
|
-
"@microsoft/rush-lib": "5.90.2-
|
|
23
|
+
"@microsoft/rush-lib": "5.90.2-pr3964.0",
|
|
24
24
|
"@rushstack/eslint-config": "3.2.0",
|
|
25
25
|
"@rushstack/heft": "0.49.7",
|
|
26
26
|
"@rushstack/heft-node-rig": "1.12.4",
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Part of IApprovedPackagesJson.
|
|
3
|
-
*/
|
|
4
|
-
export interface IApprovedPackagesItemJson {
|
|
5
|
-
name: string;
|
|
6
|
-
allowedCategories: string[];
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* This represents the JSON data structure for the "browser-approved-packages.json"
|
|
10
|
-
* and "nonbrowser-approved-packages.json" configuration files. See "approved-packages.schema.json"
|
|
11
|
-
* for documentation.
|
|
12
|
-
*/
|
|
13
|
-
export interface IApprovedPackagesJson {
|
|
14
|
-
$schema?: string;
|
|
15
|
-
packages: IApprovedPackagesItemJson[];
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* An item returned by ApprovedPackagesConfiguration
|
|
19
|
-
* @public
|
|
20
|
-
*/
|
|
21
|
-
export declare class ApprovedPackagesItem {
|
|
22
|
-
/**
|
|
23
|
-
* The NPM package name
|
|
24
|
-
*/
|
|
25
|
-
packageName: string;
|
|
26
|
-
/**
|
|
27
|
-
* The project categories that are allowed to use this package.
|
|
28
|
-
*/
|
|
29
|
-
allowedCategories: Set<string>;
|
|
30
|
-
/**
|
|
31
|
-
* @internal
|
|
32
|
-
*/
|
|
33
|
-
constructor(packageName: string);
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* This represents the JSON file specified via the "approvedPackagesFile" option in rush.json.
|
|
37
|
-
* @public
|
|
38
|
-
*/
|
|
39
|
-
export declare class ApprovedPackagesConfiguration {
|
|
40
|
-
private static _jsonSchema;
|
|
41
|
-
items: ApprovedPackagesItem[];
|
|
42
|
-
private _itemsByName;
|
|
43
|
-
private _loadedJson;
|
|
44
|
-
private _jsonFilename;
|
|
45
|
-
constructor(jsonFilename: string);
|
|
46
|
-
/**
|
|
47
|
-
* Clears all the settings, returning to an empty state.
|
|
48
|
-
*/
|
|
49
|
-
clear(): void;
|
|
50
|
-
getItemByName(packageName: string): ApprovedPackagesItem | undefined;
|
|
51
|
-
addOrUpdatePackage(packageName: string, reviewCategory: string): boolean;
|
|
52
|
-
/**
|
|
53
|
-
* If the file exists, calls loadFromFile().
|
|
54
|
-
*/
|
|
55
|
-
tryLoadFromFile(approvedPackagesPolicyEnabled: boolean): boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Loads the configuration data from the filename that was passed to the constructor.
|
|
58
|
-
*/
|
|
59
|
-
loadFromFile(): void;
|
|
60
|
-
/**
|
|
61
|
-
* Loads the configuration data to the filename that was passed to the constructor.
|
|
62
|
-
*/
|
|
63
|
-
saveToFile(): void;
|
|
64
|
-
/**
|
|
65
|
-
* Helper function only used by the constructor when loading the file.
|
|
66
|
-
*/
|
|
67
|
-
private _addItemJson;
|
|
68
|
-
/**
|
|
69
|
-
* Helper function that adds an already created ApprovedPackagesItem to the
|
|
70
|
-
* list and set.
|
|
71
|
-
*/
|
|
72
|
-
private _addItem;
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=ApprovedPackagesConfiguration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("api/ApprovedPackagesConfiguration");
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { ApprovedPackagesConfiguration } from './ApprovedPackagesConfiguration';
|
|
2
|
-
import { RushConfiguration, IRushConfigurationJson } from './RushConfiguration';
|
|
3
|
-
/**
|
|
4
|
-
* This is a helper object for RushConfiguration.
|
|
5
|
-
* It exposes the "approvedPackagesPolicy" feature from rush.json.
|
|
6
|
-
* @public
|
|
7
|
-
*/
|
|
8
|
-
export declare class ApprovedPackagesPolicy {
|
|
9
|
-
/**
|
|
10
|
-
* Whether the feature is enabled. The feature is enabled if the "approvedPackagesPolicy"
|
|
11
|
-
* field is assigned in rush.json.
|
|
12
|
-
*/
|
|
13
|
-
readonly enabled: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* A list of NPM package scopes that will be excluded from review (e.g. `@types`)
|
|
16
|
-
*/
|
|
17
|
-
readonly ignoredNpmScopes: ReadonlySet<string>;
|
|
18
|
-
/**
|
|
19
|
-
* A list of category names that are valid for usage as the RushConfigurationProject.reviewCategory field.
|
|
20
|
-
* This array will never be undefined.
|
|
21
|
-
*/
|
|
22
|
-
readonly reviewCategories: ReadonlySet<string>;
|
|
23
|
-
/**
|
|
24
|
-
* Packages approved for usage in a web browser. This is the stricter of the two types, so by default
|
|
25
|
-
* all new packages are added to this file.
|
|
26
|
-
*
|
|
27
|
-
* @remarks
|
|
28
|
-
*
|
|
29
|
-
* This is part of an optional approval workflow, whose purpose is to review any new dependencies
|
|
30
|
-
* that are introduced (e.g. maybe a legal review is required, or maybe we are trying to minimize bloat).
|
|
31
|
-
* When Rush discovers a new dependency has been added to package.json, it will update the file.
|
|
32
|
-
* The intent is that the file will be stored in Git and tracked by a branch policy that notifies
|
|
33
|
-
* reviewers when a PR attempts to modify the file.
|
|
34
|
-
*
|
|
35
|
-
* Example filename: `C:\MyRepo\common\config\rush\browser-approved-packages.json`
|
|
36
|
-
*/
|
|
37
|
-
readonly browserApprovedPackages: ApprovedPackagesConfiguration;
|
|
38
|
-
/**
|
|
39
|
-
* Packages approved for usage everywhere *except* in a web browser.
|
|
40
|
-
*
|
|
41
|
-
* @remarks
|
|
42
|
-
*
|
|
43
|
-
* This is part of an optional approval workflow, whose purpose is to review any new dependencies
|
|
44
|
-
* that are introduced (e.g. maybe a legal review is required, or maybe we are trying to minimize bloat).
|
|
45
|
-
* The intent is that the file will be stored in Git and tracked by a branch policy that notifies
|
|
46
|
-
* reviewers when a PR attempts to modify the file.
|
|
47
|
-
*
|
|
48
|
-
* Example filename: `C:\MyRepo\common\config\rush\browser-approved-packages.json`
|
|
49
|
-
*/
|
|
50
|
-
readonly nonbrowserApprovedPackages: ApprovedPackagesConfiguration;
|
|
51
|
-
/** @internal */
|
|
52
|
-
constructor(rushConfiguration: RushConfiguration, rushConfigurationJson: IRushConfigurationJson);
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=ApprovedPackagesPolicy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("api/ApprovedPackagesPolicy");
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { JsonObject, ITerminal } from '@rushstack/node-core-library';
|
|
2
|
-
import { RushConfiguration } from './RushConfiguration';
|
|
3
|
-
import { FileSystemBuildCacheProvider } from '../logic/buildCache/FileSystemBuildCacheProvider';
|
|
4
|
-
import { ICloudBuildCacheProvider } from '../logic/buildCache/ICloudBuildCacheProvider';
|
|
5
|
-
import { GetCacheEntryIdFunction } from '../logic/buildCache/CacheEntryId';
|
|
6
|
-
import type { RushSession } from '../pluginFramework/RushSession';
|
|
7
|
-
/**
|
|
8
|
-
* Describes the file structure for the "common/config/rush/build-cache.json" config file.
|
|
9
|
-
*/
|
|
10
|
-
export interface IBaseBuildCacheJson {
|
|
11
|
-
buildCacheEnabled: boolean;
|
|
12
|
-
cacheProvider: string;
|
|
13
|
-
cacheEntryNamePattern?: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* @public
|
|
17
|
-
*/
|
|
18
|
-
export interface ILocalBuildCacheJson extends IBaseBuildCacheJson {
|
|
19
|
-
readonly cacheProvider: 'local-only';
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* @beta
|
|
23
|
-
*/
|
|
24
|
-
export interface ICloudBuildCacheJson extends IBaseBuildCacheJson {
|
|
25
|
-
readonly cacheProvider: string;
|
|
26
|
-
[otherConfigKey: string]: JsonObject;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* @beta
|
|
30
|
-
*/
|
|
31
|
-
export declare type IBuildCacheJson = ICloudBuildCacheJson | ILocalBuildCacheJson;
|
|
32
|
-
/**
|
|
33
|
-
* Use this class to load and save the "common/config/rush/build-cache.json" config file.
|
|
34
|
-
* This file provides configuration options for cached project build output.
|
|
35
|
-
* @beta
|
|
36
|
-
*/
|
|
37
|
-
export declare class BuildCacheConfiguration {
|
|
38
|
-
private static _jsonSchema;
|
|
39
|
-
/**
|
|
40
|
-
* Indicates whether the build cache feature is enabled.
|
|
41
|
-
* Typically it is enabled in the build-cache.json config file.
|
|
42
|
-
*/
|
|
43
|
-
readonly buildCacheEnabled: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Indicates whether or not writing to the cache is enabled.
|
|
46
|
-
*/
|
|
47
|
-
cacheWriteEnabled: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Method to calculate the cache entry id for a project, phase, and project state.
|
|
50
|
-
*/
|
|
51
|
-
readonly getCacheEntryId: GetCacheEntryIdFunction;
|
|
52
|
-
/**
|
|
53
|
-
* The provider for interacting with the local build cache.
|
|
54
|
-
*/
|
|
55
|
-
readonly localCacheProvider: FileSystemBuildCacheProvider;
|
|
56
|
-
/**
|
|
57
|
-
* The provider for interacting with the cloud build cache, if configured.
|
|
58
|
-
*/
|
|
59
|
-
readonly cloudCacheProvider: ICloudBuildCacheProvider | undefined;
|
|
60
|
-
private constructor();
|
|
61
|
-
/**
|
|
62
|
-
* Attempts to load the build-cache.json data from the standard file path `common/config/rush/build-cache.json`.
|
|
63
|
-
* If the file has not been created yet, then undefined is returned.
|
|
64
|
-
*/
|
|
65
|
-
static tryLoadAsync(terminal: ITerminal, rushConfiguration: RushConfiguration, rushSession: RushSession): Promise<BuildCacheConfiguration | undefined>;
|
|
66
|
-
/**
|
|
67
|
-
* Loads the build-cache.json data from the standard file path `common/config/rush/build-cache.json`.
|
|
68
|
-
* If the file has not been created yet, or if the feature is not enabled, then an error is reported.
|
|
69
|
-
*/
|
|
70
|
-
static loadAndRequireEnabledAsync(terminal: ITerminal, rushConfiguration: RushConfiguration, rushSession: RushSession): Promise<BuildCacheConfiguration>;
|
|
71
|
-
/**
|
|
72
|
-
* Gets the absolute path to the build-cache.json file in the specified rush workspace.
|
|
73
|
-
*/
|
|
74
|
-
static getBuildCacheConfigFilePath(rushConfiguration: RushConfiguration): string;
|
|
75
|
-
private static _loadAsync;
|
|
76
|
-
}
|
|
77
|
-
//# sourceMappingURL=BuildCacheConfiguration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("api/BuildCacheConfiguration");
|