@rushstack/rush-sdk 5.143.0-pr5009.0 → 5.143.0-pr5009.1
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/lib/logic/ApprovedPackagesChecker.d.ts +23 -0
- package/lib/logic/ApprovedPackagesChecker.js +1 -0
- package/lib/logic/InstallManagerFactory.d.ts +9 -0
- package/lib/logic/InstallManagerFactory.js +1 -0
- package/lib/logic/InteractiveUpgrader.d.ts +17 -0
- package/lib/logic/InteractiveUpgrader.js +1 -0
- package/lib/logic/LinkManagerFactory.d.ts +6 -0
- package/lib/logic/LinkManagerFactory.js +1 -0
- package/lib/logic/PackageJsonUpdater.d.ts +131 -0
- package/lib/logic/PackageJsonUpdater.js +1 -0
- package/lib/logic/PackageLookup.d.ts +8 -0
- package/lib/logic/PackageLookup.js +1 -0
- package/lib/logic/ProjectImpactGraphGenerator.d.ts +51 -0
- package/lib/logic/ProjectImpactGraphGenerator.js +1 -0
- package/lib/logic/ProjectWatcher.d.ts +78 -0
- package/lib/logic/ProjectWatcher.js +1 -0
- package/lib/logic/TempProjectHelper.d.ts +19 -0
- package/lib/logic/TempProjectHelper.js +1 -0
- package/lib/logic/VersionManager.d.ts +48 -0
- package/lib/logic/VersionManager.js +1 -0
- package/lib/logic/base/BaseInstallManager.d.ts +57 -0
- package/lib/logic/base/BaseInstallManager.js +1 -0
- package/lib/logic/base/BaseLinkManager.d.ts +35 -0
- package/lib/logic/base/BaseLinkManager.js +1 -0
- package/lib/logic/base/BasePackage.d.ts +113 -0
- package/lib/logic/base/BasePackage.js +1 -0
- package/lib/logic/base/BaseWorkspaceFile.d.ts +31 -0
- package/lib/logic/base/BaseWorkspaceFile.js +1 -0
- package/lib/logic/installManager/RushInstallManager.d.ts +77 -0
- package/lib/logic/installManager/RushInstallManager.js +1 -0
- package/lib/logic/installManager/WorkspaceInstallManager.d.ts +46 -0
- package/lib/logic/installManager/WorkspaceInstallManager.js +1 -0
- package/lib/logic/installManager/doBasicInstallAsync.d.ts +17 -0
- package/lib/logic/installManager/doBasicInstallAsync.js +1 -0
- package/lib/logic/npm/NpmLinkManager.d.ts +12 -0
- package/lib/logic/npm/NpmLinkManager.js +1 -0
- package/lib/logic/npm/NpmPackage.d.ts +86 -0
- package/lib/logic/npm/NpmPackage.js +1 -0
- package/lib/logic/operations/BuildPlanPlugin.d.ts +8 -0
- package/lib/logic/operations/BuildPlanPlugin.js +1 -0
- package/lib/logic/operations/ConsoleTimelinePlugin.d.ts +26 -0
- package/lib/logic/operations/ConsoleTimelinePlugin.js +1 -0
- package/lib/logic/operations/IPCOperationRunner.d.ts +34 -0
- package/lib/logic/operations/IPCOperationRunner.js +1 -0
- package/lib/logic/operations/IPCOperationRunnerPlugin.d.ts +8 -0
- package/lib/logic/operations/IPCOperationRunnerPlugin.js +1 -0
- package/lib/logic/operations/PnpmSyncCopyOperationPlugin.d.ts +8 -0
- package/lib/logic/operations/PnpmSyncCopyOperationPlugin.js +1 -0
- package/lib/logic/pnpm/PnpmLinkManager.d.ts +18 -0
- package/lib/logic/pnpm/PnpmLinkManager.js +1 -0
- package/lib/logic/pnpm/PnpmWorkspaceFile.d.ts +18 -0
- package/lib/logic/pnpm/PnpmWorkspaceFile.js +1 -0
- package/lib/utilities/InteractiveUpgradeUI.d.ts +22 -0
- package/lib/utilities/InteractiveUpgradeUI.js +1 -0
- package/lib/utilities/WebClient.d.ts +56 -0
- package/lib/utilities/WebClient.js +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
2
|
+
export declare class ApprovedPackagesChecker {
|
|
3
|
+
private readonly _rushConfiguration;
|
|
4
|
+
private _approvedPackagesPolicy;
|
|
5
|
+
private _filesAreOutOfDate;
|
|
6
|
+
constructor(rushConfiguration: RushConfiguration);
|
|
7
|
+
/**
|
|
8
|
+
* If true, the files on disk are out of date.
|
|
9
|
+
*/
|
|
10
|
+
get approvedPackagesFilesAreOutOfDate(): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Examines the current dependencies for the projects specified in RushConfiguration,
|
|
13
|
+
* and then adds them to the 'browser-approved-packages.json' and
|
|
14
|
+
* 'nonbrowser-approved-packages.json' config files. If these files don't exist,
|
|
15
|
+
* they will be created.
|
|
16
|
+
*
|
|
17
|
+
* If the "approvedPackagesPolicy" feature is not enabled, then no action is taken.
|
|
18
|
+
*/
|
|
19
|
+
rewriteConfigFiles(): void;
|
|
20
|
+
private _updateApprovedPackagesPolicy;
|
|
21
|
+
private _collectDependencies;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=ApprovedPackagesChecker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/ApprovedPackagesChecker");
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PurgeManager } from './PurgeManager';
|
|
2
|
+
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
3
|
+
import type { RushGlobalFolder } from '../api/RushGlobalFolder';
|
|
4
|
+
import type { BaseInstallManager } from './base/BaseInstallManager';
|
|
5
|
+
import type { IInstallManagerOptions } from './base/BaseInstallManagerTypes';
|
|
6
|
+
export declare class InstallManagerFactory {
|
|
7
|
+
static getInstallManagerAsync(rushConfiguration: RushConfiguration, rushGlobalFolder: RushGlobalFolder, purgeManager: PurgeManager, options: IInstallManagerOptions): Promise<BaseInstallManager>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=InstallManagerFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/InstallManagerFactory");
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
2
|
+
import { type IDepsToUpgradeAnswers } from '../utilities/InteractiveUpgradeUI';
|
|
3
|
+
import type { RushConfigurationProject } from '../api/RushConfigurationProject';
|
|
4
|
+
interface IUpgradeInteractiveDeps {
|
|
5
|
+
projects: RushConfigurationProject[];
|
|
6
|
+
depsToUpgrade: IDepsToUpgradeAnswers;
|
|
7
|
+
}
|
|
8
|
+
export declare class InteractiveUpgrader {
|
|
9
|
+
private readonly _rushConfiguration;
|
|
10
|
+
constructor(rushConfiguration: RushConfiguration);
|
|
11
|
+
upgradeAsync(): Promise<IUpgradeInteractiveDeps>;
|
|
12
|
+
private _getUserSelectedDependenciesToUpgradeAsync;
|
|
13
|
+
private _getUserSelectedProjectForUpgradeAsync;
|
|
14
|
+
private _getPackageDependenciesStatusAsync;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=InteractiveUpgrader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/InteractiveUpgrader");
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
2
|
+
import type { BaseLinkManager } from './base/BaseLinkManager';
|
|
3
|
+
export declare class LinkManagerFactory {
|
|
4
|
+
static getLinkManager(rushConfiguration: RushConfiguration): BaseLinkManager;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=LinkManagerFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/LinkManagerFactory");
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/// <reference path="../../src/npm-check-typings.d.ts" />
|
|
2
|
+
import type * as NpmCheck from 'npm-check';
|
|
3
|
+
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
4
|
+
import { DependencyType } from '../api/PackageJsonEditor';
|
|
5
|
+
import type { RushGlobalFolder } from '../api/RushGlobalFolder';
|
|
6
|
+
import type { RushConfigurationProject } from '../api/RushConfigurationProject';
|
|
7
|
+
import type { VersionMismatchFinderEntity } from './versionMismatch/VersionMismatchFinderEntity';
|
|
8
|
+
import { type IPackageJsonUpdaterRushBaseUpdateOptions } from './PackageJsonUpdaterTypes';
|
|
9
|
+
/**
|
|
10
|
+
* Options for adding a dependency to a particular project.
|
|
11
|
+
*/
|
|
12
|
+
export interface IPackageJsonUpdaterRushUpgradeOptions {
|
|
13
|
+
/**
|
|
14
|
+
* The projects whose package.jsons should get updated
|
|
15
|
+
*/
|
|
16
|
+
projects: RushConfigurationProject[];
|
|
17
|
+
/**
|
|
18
|
+
* The dependencies to be added.
|
|
19
|
+
*/
|
|
20
|
+
packagesToAdd: NpmCheck.INpmCheckPackage[];
|
|
21
|
+
/**
|
|
22
|
+
* If specified, other packages that use this dependency will also have their package.json's updated.
|
|
23
|
+
*/
|
|
24
|
+
updateOtherPackages: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* If specified, "rush update" will not be run after updating the package.json file(s).
|
|
27
|
+
*/
|
|
28
|
+
skipUpdate: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* If specified, "rush update" will be run in debug mode.
|
|
31
|
+
*/
|
|
32
|
+
debugInstall: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The variant to consider when performing installations and validating shrinkwrap updates.
|
|
35
|
+
*/
|
|
36
|
+
variant: string | undefined;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Configuration options for adding or updating a dependency in single project
|
|
40
|
+
* or removing a dependency from a particular project
|
|
41
|
+
*/
|
|
42
|
+
export interface IBaseUpdateProjectOptions {
|
|
43
|
+
/**
|
|
44
|
+
* The project which will have its package.json updated
|
|
45
|
+
*/
|
|
46
|
+
project: VersionMismatchFinderEntity;
|
|
47
|
+
/**
|
|
48
|
+
* Map of packages to update
|
|
49
|
+
* Its key is the name of the dependency to be added or updated in the project
|
|
50
|
+
* Its value is the new SemVer specifier that should be added to the project's package.json
|
|
51
|
+
* If trying to remove this packages, value can be empty string
|
|
52
|
+
*/
|
|
53
|
+
dependenciesToAddOrUpdateOrRemove: Record<string, string>;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Configuration options for adding or updating a dependency in a single project
|
|
57
|
+
*/
|
|
58
|
+
export interface IUpdateProjectOptions extends IBaseUpdateProjectOptions {
|
|
59
|
+
/**
|
|
60
|
+
* The type of dependency that should be updated. If left empty, this will be auto-detected.
|
|
61
|
+
* If it cannot be auto-detected an exception will be thrown.
|
|
62
|
+
*/
|
|
63
|
+
dependencyType?: DependencyType;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Configuration options for removing dependencies from a single project
|
|
67
|
+
*/
|
|
68
|
+
export interface IRemoveProjectOptions extends IBaseUpdateProjectOptions {
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A helper class for managing the dependencies of various package.json files.
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
export declare class PackageJsonUpdater {
|
|
75
|
+
private _rushConfiguration;
|
|
76
|
+
private _rushGlobalFolder;
|
|
77
|
+
private readonly _terminalProvider;
|
|
78
|
+
private readonly _terminal;
|
|
79
|
+
constructor(rushConfiguration: RushConfiguration, rushGlobalFolder: RushGlobalFolder);
|
|
80
|
+
/**
|
|
81
|
+
* Upgrade dependencies to a particular project, or across specified projects. This is the core business logic for
|
|
82
|
+
* "rush upgrade-interactive".
|
|
83
|
+
*/
|
|
84
|
+
doRushUpgradeAsync(options: IPackageJsonUpdaterRushUpgradeOptions): Promise<void>;
|
|
85
|
+
doRushUpdateAsync(options: IPackageJsonUpdaterRushBaseUpdateOptions): Promise<void>;
|
|
86
|
+
private _doUpdateAsync;
|
|
87
|
+
/**
|
|
88
|
+
* Adds a dependency to a particular project. The core business logic for "rush add".
|
|
89
|
+
*/
|
|
90
|
+
private _doRushAddAsync;
|
|
91
|
+
private _updateProjectsAsync;
|
|
92
|
+
private _getUpdates;
|
|
93
|
+
/**
|
|
94
|
+
* Remove a dependency from a particular project. The core business logic for "rush remove".
|
|
95
|
+
*/
|
|
96
|
+
private _doRushRemoveAsync;
|
|
97
|
+
/**
|
|
98
|
+
* Updates several projects' package.json files
|
|
99
|
+
*/
|
|
100
|
+
updateProjects(projectUpdates: IUpdateProjectOptions[]): void;
|
|
101
|
+
/**
|
|
102
|
+
* Updates a single project's package.json file
|
|
103
|
+
*/
|
|
104
|
+
updateProject(options: IUpdateProjectOptions): void;
|
|
105
|
+
removePackageFromProject(options: IRemoveProjectOptions): void;
|
|
106
|
+
/**
|
|
107
|
+
* Selects an appropriate version number for a particular package, given an optional initial SemVer spec.
|
|
108
|
+
* If ensureConsistentVersions, tries to pick a version that will be consistent.
|
|
109
|
+
* Otherwise, will choose the latest semver matching the initialSpec and append the proper range style.
|
|
110
|
+
* @param projects - the projects which will have their package.json's updated
|
|
111
|
+
* @param packageName - the name of the package to be used
|
|
112
|
+
* @param initialSpec - a semver pattern that should be used to find the latest version matching the spec
|
|
113
|
+
* @param implicitlyPreferredVersion - the implicitly preferred (aka common/primary) version of the package in use
|
|
114
|
+
* @param rangeStyle - if this version is selected by querying registry, then this range specifier is prepended to
|
|
115
|
+
* the selected version.
|
|
116
|
+
*/
|
|
117
|
+
private _getNormalizedVersionSpecAsync;
|
|
118
|
+
private _collectAllDownstreamDependencies;
|
|
119
|
+
/**
|
|
120
|
+
* Given a package name, this function returns a {@see RushConfigurationProject} if the package is a project
|
|
121
|
+
* in the local Rush repo and is not marked as cyclic for any of the projects.
|
|
122
|
+
*
|
|
123
|
+
* @remarks
|
|
124
|
+
* This function throws an error if adding the discovered local project as a dependency
|
|
125
|
+
* would create a dependency cycle, or if it would be added to multiple projects.
|
|
126
|
+
*/
|
|
127
|
+
private _tryGetLocalProject;
|
|
128
|
+
private _cheaplyDetectSemVerRangeStyle;
|
|
129
|
+
private _normalizeDepsToUpgrade;
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=PackageJsonUpdater.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/PackageJsonUpdater");
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BasePackage } from './base/BasePackage';
|
|
2
|
+
export declare class PackageLookup {
|
|
3
|
+
private _packageMap;
|
|
4
|
+
constructor();
|
|
5
|
+
loadTree(root: BasePackage): void;
|
|
6
|
+
getPackage(nameAndVersion: string): BasePackage | undefined;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=PackageLookup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/PackageLookup");
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
2
|
+
import { type ITerminal } from '@rushstack/terminal';
|
|
3
|
+
/**
|
|
4
|
+
* Project property configuration
|
|
5
|
+
*/
|
|
6
|
+
export interface IProjectImpactGraphProjectConfiguration {
|
|
7
|
+
includedGlobs: string[];
|
|
8
|
+
excludedGlobs?: string[];
|
|
9
|
+
dependentProjects: string[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The schema of `project-impact-graph.yaml`
|
|
13
|
+
*/
|
|
14
|
+
export interface IProjectImpactGraphFile {
|
|
15
|
+
globalExcludedGlobs: string[];
|
|
16
|
+
projects: Record<string, IProjectImpactGraphProjectConfiguration>;
|
|
17
|
+
}
|
|
18
|
+
export declare class ProjectImpactGraphGenerator {
|
|
19
|
+
private readonly _terminal;
|
|
20
|
+
/**
|
|
21
|
+
* The Rush configuration
|
|
22
|
+
*/
|
|
23
|
+
private readonly _rushConfiguration;
|
|
24
|
+
/**
|
|
25
|
+
* Full path of repository root
|
|
26
|
+
*/
|
|
27
|
+
private readonly _repositoryRoot;
|
|
28
|
+
/**
|
|
29
|
+
* Full path to `project-impact-graph.yaml`
|
|
30
|
+
*/
|
|
31
|
+
private readonly _projectImpactGraphFilePath;
|
|
32
|
+
/**
|
|
33
|
+
* Get repositoryRoot and load projects within the rush.json
|
|
34
|
+
*/
|
|
35
|
+
constructor(terminal: ITerminal, rushConfiguration: RushConfiguration);
|
|
36
|
+
/**
|
|
37
|
+
* Load global excluded globs
|
|
38
|
+
*/
|
|
39
|
+
private _loadGlobalExcludedGlobsAsync;
|
|
40
|
+
/**
|
|
41
|
+
* Load project excluded globs
|
|
42
|
+
* @param projectRootRelativePath - project root relative path
|
|
43
|
+
*/
|
|
44
|
+
private _tryLoadProjectExcludedGlobsAsync;
|
|
45
|
+
/**
|
|
46
|
+
* Core Logic: generate project-impact-graph.yaml
|
|
47
|
+
*/
|
|
48
|
+
generateAsync(): Promise<void>;
|
|
49
|
+
validateAsync(): Promise<boolean>;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=ProjectImpactGraphGenerator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/ProjectImpactGraphGenerator");
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { type ITerminal } from '@rushstack/terminal';
|
|
2
|
+
import type { IInputsSnapshot, GetInputsSnapshotAsyncFn } from './incremental/InputsSnapshot';
|
|
3
|
+
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
4
|
+
import type { RushConfigurationProject } from '../api/RushConfigurationProject';
|
|
5
|
+
export interface IProjectWatcherOptions {
|
|
6
|
+
getInputsSnapshotAsync: GetInputsSnapshotAsyncFn;
|
|
7
|
+
debounceMs?: number;
|
|
8
|
+
rushConfiguration: RushConfiguration;
|
|
9
|
+
projectsToWatch: ReadonlySet<RushConfigurationProject>;
|
|
10
|
+
terminal: ITerminal;
|
|
11
|
+
initialSnapshot?: IInputsSnapshot | undefined;
|
|
12
|
+
}
|
|
13
|
+
export interface IProjectChangeResult {
|
|
14
|
+
/**
|
|
15
|
+
* The set of projects that have changed since the last iteration
|
|
16
|
+
*/
|
|
17
|
+
changedProjects: ReadonlySet<RushConfigurationProject>;
|
|
18
|
+
/**
|
|
19
|
+
* Contains the git hashes for all tracked files in the repo
|
|
20
|
+
*/
|
|
21
|
+
inputsSnapshot: IInputsSnapshot;
|
|
22
|
+
}
|
|
23
|
+
export interface IPromptGeneratorFunction {
|
|
24
|
+
(isPaused: boolean): Iterable<string>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* This class is for incrementally watching a set of projects in the repository for changes.
|
|
28
|
+
*
|
|
29
|
+
* We are manually using fs.watch() instead of `chokidar` because all we want from the file system watcher is a boolean
|
|
30
|
+
* signal indicating that "at least 1 file in a watched project changed". We then defer to getInputsSnapshotAsync (which
|
|
31
|
+
* is responsible for change detection in all incremental builds) to determine what actually chanaged.
|
|
32
|
+
*
|
|
33
|
+
* Calling `waitForChange()` will return a promise that resolves when the package-deps of one or
|
|
34
|
+
* more projects differ from the value the previous time it was invoked. The first time will always resolve with the full selection.
|
|
35
|
+
*/
|
|
36
|
+
export declare class ProjectWatcher {
|
|
37
|
+
private readonly _getInputsSnapshotAsync;
|
|
38
|
+
private readonly _debounceMs;
|
|
39
|
+
private readonly _repoRoot;
|
|
40
|
+
private readonly _rushConfiguration;
|
|
41
|
+
private readonly _projectsToWatch;
|
|
42
|
+
private readonly _terminal;
|
|
43
|
+
private _initialSnapshot;
|
|
44
|
+
private _previousSnapshot;
|
|
45
|
+
private _forceChangedProjects;
|
|
46
|
+
private _resolveIfChanged;
|
|
47
|
+
private _getPromptLines;
|
|
48
|
+
private _renderedStatusLines;
|
|
49
|
+
isPaused: boolean;
|
|
50
|
+
constructor(options: IProjectWatcherOptions);
|
|
51
|
+
pause(): void;
|
|
52
|
+
resume(): void;
|
|
53
|
+
invalidateProject(project: RushConfigurationProject, reason: string): boolean;
|
|
54
|
+
invalidateAll(reason: string): void;
|
|
55
|
+
clearStatus(): void;
|
|
56
|
+
setPromptGenerator(promptGenerator: IPromptGeneratorFunction): void;
|
|
57
|
+
/**
|
|
58
|
+
* Waits for a change to the package-deps of one or more of the selected projects, since the previous invocation.
|
|
59
|
+
* Will return immediately the first time it is invoked, since no state has been recorded.
|
|
60
|
+
* If no change is currently present, watches the source tree of all selected projects for file changes.
|
|
61
|
+
* `waitForChange` is not allowed to be called multiple times concurrently.
|
|
62
|
+
*/
|
|
63
|
+
waitForChangeAsync(onWatchingFiles?: () => void): Promise<IProjectChangeResult>;
|
|
64
|
+
private _setStatus;
|
|
65
|
+
/**
|
|
66
|
+
* Determines which, if any, projects (within the selection) have new hashes for files that are not in .gitignore
|
|
67
|
+
*/
|
|
68
|
+
private _computeChangedAsync;
|
|
69
|
+
private _commitChanges;
|
|
70
|
+
/**
|
|
71
|
+
* Tests for inequality of the passed Maps. Order invariant.
|
|
72
|
+
*
|
|
73
|
+
* @returns `true` if the maps are different, `false` otherwise
|
|
74
|
+
*/
|
|
75
|
+
private static _haveProjectDepsChanged;
|
|
76
|
+
private static _enumeratePathsToWatch;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=ProjectWatcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/ProjectWatcher");
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { RushConfigurationProject } from '../api/RushConfigurationProject';
|
|
2
|
+
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
3
|
+
import type { Subspace } from '../api/Subspace';
|
|
4
|
+
export declare class TempProjectHelper {
|
|
5
|
+
private _rushConfiguration;
|
|
6
|
+
private _subspace;
|
|
7
|
+
constructor(rushConfiguration: RushConfiguration, subspace: Subspace);
|
|
8
|
+
/**
|
|
9
|
+
* Deletes the existing tarball and creates a tarball for the given rush project
|
|
10
|
+
*/
|
|
11
|
+
createTempProjectTarball(rushProject: RushConfigurationProject): void;
|
|
12
|
+
/**
|
|
13
|
+
* Gets the path to the tarball
|
|
14
|
+
* Example: "C:\MyRepo\common\temp\projects\my-project-2.tgz"
|
|
15
|
+
*/
|
|
16
|
+
getTarballFilePath(project: RushConfigurationProject): string;
|
|
17
|
+
getTempProjectFolder(rushProject: RushConfigurationProject): string;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=TempProjectHelper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/TempProjectHelper");
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type IPackageJson } from '@rushstack/node-core-library';
|
|
2
|
+
import { type BumpType } from '../api/VersionPolicy';
|
|
3
|
+
import { ChangeFile } from '../api/ChangeFile';
|
|
4
|
+
import { RushConfiguration } from '../api/RushConfiguration';
|
|
5
|
+
import type { VersionPolicyConfiguration } from '../api/VersionPolicyConfiguration';
|
|
6
|
+
export declare class VersionManager {
|
|
7
|
+
private _rushConfiguration;
|
|
8
|
+
private _userEmail;
|
|
9
|
+
private _versionPolicyConfiguration;
|
|
10
|
+
readonly updatedProjects: Map<string, IPackageJson>;
|
|
11
|
+
readonly changeFiles: Map<string, ChangeFile>;
|
|
12
|
+
constructor(rushConfiguration: RushConfiguration, userEmail: string, versionPolicyConfiguration: VersionPolicyConfiguration);
|
|
13
|
+
/**
|
|
14
|
+
* Ensures project versions follow the provided version policy. If version policy is not
|
|
15
|
+
* provided, all projects will have their version checked according to the associated version policy.
|
|
16
|
+
* package.json files will be updated if needed.
|
|
17
|
+
* This method does not commit changes.
|
|
18
|
+
* @param versionPolicyName -- version policy name
|
|
19
|
+
* @param shouldCommit -- should update files to disk
|
|
20
|
+
* @param force -- update even when project version is higher than policy version.
|
|
21
|
+
*/
|
|
22
|
+
ensure(versionPolicyName?: string, shouldCommit?: boolean, force?: boolean): void;
|
|
23
|
+
/**
|
|
24
|
+
* Bumps versions following version policies.
|
|
25
|
+
*
|
|
26
|
+
* @param lockStepVersionPolicyName - a specified lock step version policy name. Without this value,
|
|
27
|
+
* versions for all lock step policies and all individual policies will be bumped.
|
|
28
|
+
* With this value, only the specified lock step policy will be bumped along with all individual policies.
|
|
29
|
+
* @param bumpType - overrides the default bump type and only works for lock step policy
|
|
30
|
+
* @param identifier - overrides the prerelease identifier and only works for lock step policy
|
|
31
|
+
* @param shouldCommit - whether the changes will be written to disk
|
|
32
|
+
*/
|
|
33
|
+
bumpAsync(lockStepVersionPolicyName?: string, bumpType?: BumpType, identifier?: string, shouldCommit?: boolean): Promise<void>;
|
|
34
|
+
private _ensure;
|
|
35
|
+
private _getManuallyVersionedProjects;
|
|
36
|
+
private _updateVersionsByPolicy;
|
|
37
|
+
private _isPrerelease;
|
|
38
|
+
private _addChangeInfo;
|
|
39
|
+
private _updateDependencies;
|
|
40
|
+
private _updateProjectAllDependencies;
|
|
41
|
+
private _updateProjectDependencies;
|
|
42
|
+
private _shouldTrackDependencyChange;
|
|
43
|
+
private _trackDependencyChange;
|
|
44
|
+
private _addChange;
|
|
45
|
+
private _updatePackageJsonFiles;
|
|
46
|
+
private _createChangeInfo;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=VersionManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("logic/VersionManager");
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type ITerminal } from '@rushstack/terminal';
|
|
2
|
+
import type { AsyncRecycler } from '../../utilities/AsyncRecycler';
|
|
3
|
+
import type { BaseShrinkwrapFile } from './BaseShrinkwrapFile';
|
|
4
|
+
import { type LastInstallFlag } from '../../api/LastInstallFlag';
|
|
5
|
+
import type { PurgeManager } from '../PurgeManager';
|
|
6
|
+
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
7
|
+
import type { RushGlobalFolder } from '../../api/RushGlobalFolder';
|
|
8
|
+
import type { IInstallManagerOptions } from './BaseInstallManagerTypes';
|
|
9
|
+
import type { Subspace } from '../../api/Subspace';
|
|
10
|
+
import { ProjectImpactGraphGenerator } from '../ProjectImpactGraphGenerator';
|
|
11
|
+
/**
|
|
12
|
+
* Pnpm don't support --ignore-compatibility-db, so use --config.ignoreCompatibilityDb for now.
|
|
13
|
+
*/
|
|
14
|
+
export declare const pnpmIgnoreCompatibilityDbParameter: string;
|
|
15
|
+
/**
|
|
16
|
+
* This class implements common logic between "rush install" and "rush update".
|
|
17
|
+
*/
|
|
18
|
+
export declare abstract class BaseInstallManager {
|
|
19
|
+
private readonly _commonTempLinkFlag;
|
|
20
|
+
private _npmSetupValidated;
|
|
21
|
+
private _syncNpmrcAlreadyCalled;
|
|
22
|
+
protected readonly _terminal: ITerminal;
|
|
23
|
+
protected readonly rushConfiguration: RushConfiguration;
|
|
24
|
+
protected readonly rushGlobalFolder: RushGlobalFolder;
|
|
25
|
+
protected readonly installRecycler: AsyncRecycler;
|
|
26
|
+
protected readonly options: IInstallManagerOptions;
|
|
27
|
+
protected readonly subspaceInstallFlags: Map<string, LastInstallFlag>;
|
|
28
|
+
constructor(rushConfiguration: RushConfiguration, rushGlobalFolder: RushGlobalFolder, purgeManager: PurgeManager, options: IInstallManagerOptions);
|
|
29
|
+
doInstallAsync(): Promise<void>;
|
|
30
|
+
protected abstract prepareCommonTempAsync(subspace: Subspace, shrinkwrapFile: BaseShrinkwrapFile | undefined): Promise<{
|
|
31
|
+
shrinkwrapIsUpToDate: boolean;
|
|
32
|
+
shrinkwrapWarnings: string[];
|
|
33
|
+
}>;
|
|
34
|
+
protected abstract installAsync(cleanInstall: boolean, subspace: Subspace): Promise<void>;
|
|
35
|
+
protected abstract postInstallAsync(subspace: Subspace): Promise<void>;
|
|
36
|
+
protected canSkipInstallAsync(lastModifiedDate: Date, subspace: Subspace, variant: string | undefined): Promise<boolean>;
|
|
37
|
+
protected prepareAsync(subspace: Subspace, variant: string | undefined, projectImpactGraphGenerator: ProjectImpactGraphGenerator | undefined): Promise<{
|
|
38
|
+
shrinkwrapIsUpToDate: boolean;
|
|
39
|
+
npmrcHash: string | undefined;
|
|
40
|
+
projectImpactGraphIsUpToDate: boolean;
|
|
41
|
+
variantIsUpToDate: boolean;
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Git hooks are only installed if the repo opts in by including files in /common/git-hooks
|
|
45
|
+
*/
|
|
46
|
+
private _installGitHooksAsync;
|
|
47
|
+
/**
|
|
48
|
+
* Used when invoking the NPM tool. Appends the common configuration options
|
|
49
|
+
* to the command-line.
|
|
50
|
+
*/
|
|
51
|
+
protected pushConfigurationArgs(args: string[], options: IInstallManagerOptions, subspace: Subspace): void;
|
|
52
|
+
private _checkIfReleaseIsPublishedAsync;
|
|
53
|
+
private _queryIfReleaseIsPublishedAsync;
|
|
54
|
+
private _syncTempShrinkwrap;
|
|
55
|
+
protected validateNpmSetupAsync(): Promise<void>;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=BaseInstallManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/base/BaseInstallManager");
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type IFileSystemCreateLinkOptions } from '@rushstack/node-core-library';
|
|
2
|
+
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
3
|
+
import type { BasePackage } from './BasePackage';
|
|
4
|
+
export declare enum SymlinkKind {
|
|
5
|
+
File = 0,
|
|
6
|
+
Directory = 1
|
|
7
|
+
}
|
|
8
|
+
export interface IBaseLinkManagerCreateSymlinkOptions extends IFileSystemCreateLinkOptions {
|
|
9
|
+
symlinkKind: SymlinkKind;
|
|
10
|
+
}
|
|
11
|
+
export declare abstract class BaseLinkManager {
|
|
12
|
+
protected _rushConfiguration: RushConfiguration;
|
|
13
|
+
constructor(rushConfiguration: RushConfiguration);
|
|
14
|
+
static _createSymlink(options: IBaseLinkManagerCreateSymlinkOptions): void;
|
|
15
|
+
/**
|
|
16
|
+
* For a Package object that represents a top-level Rush project folder
|
|
17
|
+
* (i.e. with source code that we will be building), this clears out its
|
|
18
|
+
* node_modules folder and then recursively creates all the symlinked folders.
|
|
19
|
+
*/
|
|
20
|
+
protected static _createSymlinksForTopLevelProject(localPackage: BasePackage): void;
|
|
21
|
+
/**
|
|
22
|
+
* This is a helper function used by createSymlinksForTopLevelProject().
|
|
23
|
+
* It will recursively creates symlinked folders corresponding to each of the
|
|
24
|
+
* Package objects in the provided tree.
|
|
25
|
+
*/
|
|
26
|
+
private static _createSymlinksForDependencies;
|
|
27
|
+
/**
|
|
28
|
+
* Creates node_modules symlinks for all Rush projects defined in the RushConfiguration.
|
|
29
|
+
* @param force - Normally the operation will be skipped if the links are already up to date;
|
|
30
|
+
* if true, this option forces the links to be recreated.
|
|
31
|
+
*/
|
|
32
|
+
createSymlinksForProjectsAsync(force: boolean): Promise<void>;
|
|
33
|
+
protected abstract _linkProjectsAsync(): Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=BaseLinkManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/base/BaseLinkManager");
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { type IPackageJson } from '@rushstack/node-core-library';
|
|
2
|
+
/**
|
|
3
|
+
* The type of dependency; used by IPackageDependency.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum PackageDependencyKind {
|
|
6
|
+
Normal = 0,
|
|
7
|
+
/**
|
|
8
|
+
* The dependency was listed in the optionalDependencies section of package.json.
|
|
9
|
+
*/
|
|
10
|
+
Optional = 1,
|
|
11
|
+
/**
|
|
12
|
+
* The dependency should be a symlink to a project that is locally built by Rush..
|
|
13
|
+
*/
|
|
14
|
+
LocalLink = 2
|
|
15
|
+
}
|
|
16
|
+
export interface IPackageDependency {
|
|
17
|
+
/**
|
|
18
|
+
* The name of the dependency
|
|
19
|
+
*/
|
|
20
|
+
name: string;
|
|
21
|
+
/**
|
|
22
|
+
* The requested version, which may be a pattern such as "^1.2.3"
|
|
23
|
+
*/
|
|
24
|
+
versionRange: string;
|
|
25
|
+
/**
|
|
26
|
+
* The kind of dependency
|
|
27
|
+
*/
|
|
28
|
+
kind: PackageDependencyKind;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Represents a "@rush-temp" scoped package, which has our additional custom field
|
|
32
|
+
* for tracking the dependency graph.
|
|
33
|
+
*/
|
|
34
|
+
export interface IRushTempPackageJson extends IPackageJson {
|
|
35
|
+
/**
|
|
36
|
+
* An extra setting written into package.json for temp packages, to track
|
|
37
|
+
* references to locally built projects.
|
|
38
|
+
*/
|
|
39
|
+
rushDependencies?: {
|
|
40
|
+
[key: string]: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Represents an NPM package being processed by the linking algorithm.
|
|
45
|
+
*/
|
|
46
|
+
export declare class BasePackage {
|
|
47
|
+
/**
|
|
48
|
+
* The "name" field from package.json
|
|
49
|
+
*/
|
|
50
|
+
name: string;
|
|
51
|
+
/**
|
|
52
|
+
* The package.json name can differ from the installation folder name, in the case of an NPM package alias
|
|
53
|
+
* such as this:
|
|
54
|
+
*
|
|
55
|
+
* ```
|
|
56
|
+
* "dependencies": {
|
|
57
|
+
* "@alias-scope/alias-name": "npm:target-name@^1.2.3"
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* In this case the folder will be `node_modules/@alias-scope/alias-name`
|
|
62
|
+
* instead of `node_modules/target-name`.
|
|
63
|
+
*/
|
|
64
|
+
installedName: string;
|
|
65
|
+
/**
|
|
66
|
+
* The "version" field from package.json. This is expensive to read
|
|
67
|
+
* because we have to open the package.json file. Only when DEBUG=true
|
|
68
|
+
*/
|
|
69
|
+
version: string | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* The absolute path to the folder that contains package.json.
|
|
72
|
+
*/
|
|
73
|
+
folderPath: string;
|
|
74
|
+
/**
|
|
75
|
+
* The parent package, or undefined if this is the root of the tree.
|
|
76
|
+
*/
|
|
77
|
+
parent: BasePackage | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* The raw package.json information for this Package
|
|
80
|
+
*/
|
|
81
|
+
packageJson: IRushTempPackageJson | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* If this is a local path that we are planning to symlink to a target folder,
|
|
84
|
+
* then symlinkTargetFolderPath keeps track of the intended target.
|
|
85
|
+
*/
|
|
86
|
+
symlinkTargetFolderPath: string | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Packages that were placed in node_modules subfolders of this package.
|
|
89
|
+
* The child packages are not necessarily dependencies of this package.
|
|
90
|
+
*/
|
|
91
|
+
children: BasePackage[];
|
|
92
|
+
private _childrenByName;
|
|
93
|
+
protected constructor(name: string, version: string | undefined, folderPath: string, packageJson: IRushTempPackageJson | undefined);
|
|
94
|
+
/**
|
|
95
|
+
* Used by link managers, creates a virtual Package object that represents symbolic links
|
|
96
|
+
* which will be created later
|
|
97
|
+
*/
|
|
98
|
+
static createLinkedPackage(name: string, version: string | undefined, folderPath: string, packageJson?: IRushTempPackageJson): BasePackage;
|
|
99
|
+
/**
|
|
100
|
+
* Used by "npm link" to simulate a temp project that is missing from the common/node_modules
|
|
101
|
+
* folder (e.g. because it was added after the shrinkwrap file was regenerated).
|
|
102
|
+
* @param packageJsonFilename - Filename of the source package.json
|
|
103
|
+
* Example: `C:\MyRepo\common\temp\projects\project1\package.json`
|
|
104
|
+
* @param targetFolderName - Filename where it should have been installed
|
|
105
|
+
* Example: `C:\MyRepo\common\temp\node_modules\@rush-temp\project1`
|
|
106
|
+
*/
|
|
107
|
+
static createVirtualTempPackage(packageJsonFilename: string, installFolderName: string): BasePackage;
|
|
108
|
+
get nameAndVersion(): string;
|
|
109
|
+
addChild<T extends BasePackage>(child: T): void;
|
|
110
|
+
getChildByName(childPackageName: string): BasePackage | undefined;
|
|
111
|
+
printTree(indent?: string): void;
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=BasePackage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/base/BasePackage");
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface IWorkspaceFileSaveOptions {
|
|
2
|
+
/**
|
|
3
|
+
* If there is an existing file, and the contents have not changed, then
|
|
4
|
+
* don't write anything; this preserves the old timestamp.
|
|
5
|
+
*/
|
|
6
|
+
onlyIfChanged?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Creates the folder recursively using FileSystem.ensureFolder()
|
|
9
|
+
* Defaults to false.
|
|
10
|
+
*/
|
|
11
|
+
ensureFolderExists?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* This class is a parser for pnpm's pnpm-workspace.yaml file format.
|
|
15
|
+
*/
|
|
16
|
+
export declare abstract class BaseWorkspaceFile {
|
|
17
|
+
protected _alreadyWarnedSpecs: Set<string>;
|
|
18
|
+
/**
|
|
19
|
+
* Serializes and saves the workspace file to specified location
|
|
20
|
+
*/
|
|
21
|
+
save(filePath: string, options: IWorkspaceFileSaveOptions): void;
|
|
22
|
+
/**
|
|
23
|
+
* Adds a package path to the workspace file.
|
|
24
|
+
*
|
|
25
|
+
* @virtual
|
|
26
|
+
*/
|
|
27
|
+
abstract addPackage(packagePath: string): void;
|
|
28
|
+
/** @virtual */
|
|
29
|
+
protected abstract serialize(): string;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=BaseWorkspaceFile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/base/BaseWorkspaceFile");
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { BaseInstallManager } from '../base/BaseInstallManager';
|
|
2
|
+
import type { IInstallManagerOptions } from '../base/BaseInstallManagerTypes';
|
|
3
|
+
import type { BaseShrinkwrapFile } from '../base/BaseShrinkwrapFile';
|
|
4
|
+
import type { RushGlobalFolder } from '../../api/RushGlobalFolder';
|
|
5
|
+
import type { RushConfiguration } from '../..';
|
|
6
|
+
import type { PurgeManager } from '../PurgeManager';
|
|
7
|
+
import type { Subspace } from '../../api/Subspace';
|
|
8
|
+
/**
|
|
9
|
+
* The "noMtime" flag is new in tar@4.4.1 and not available yet for \@types/tar.
|
|
10
|
+
* As a temporary workaround, augment the type.
|
|
11
|
+
*/
|
|
12
|
+
declare module 'tar' {
|
|
13
|
+
interface CreateOptions {
|
|
14
|
+
/**
|
|
15
|
+
* "Set to true to omit writing mtime values for entries. Note that this prevents using other
|
|
16
|
+
* mtime-based features like tar.update or the keepNewer option with the resulting tar archive."
|
|
17
|
+
*/
|
|
18
|
+
noMtime?: boolean;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* This class implements common logic between "rush install" and "rush update".
|
|
23
|
+
*/
|
|
24
|
+
export declare class RushInstallManager extends BaseInstallManager {
|
|
25
|
+
private _tempProjectHelper;
|
|
26
|
+
constructor(rushConfiguration: RushConfiguration, rushGlobalFolder: RushGlobalFolder, purgeManager: PurgeManager, options: IInstallManagerOptions);
|
|
27
|
+
/**
|
|
28
|
+
* Regenerates the common/package.json and all temp_modules projects.
|
|
29
|
+
* If shrinkwrapFile is provided, this function also validates whether it contains
|
|
30
|
+
* everything we need to install and returns true if so; in all other cases,
|
|
31
|
+
* the return value is false.
|
|
32
|
+
*
|
|
33
|
+
* @override
|
|
34
|
+
*/
|
|
35
|
+
prepareCommonTempAsync(subspace: Subspace, shrinkwrapFile: BaseShrinkwrapFile | undefined): Promise<{
|
|
36
|
+
shrinkwrapIsUpToDate: boolean;
|
|
37
|
+
shrinkwrapWarnings: string[];
|
|
38
|
+
}>;
|
|
39
|
+
private _revertWorkspaceNotation;
|
|
40
|
+
private _validateRushProjectTarballIntegrityAsync;
|
|
41
|
+
/**
|
|
42
|
+
* Check whether or not the install is already valid, and therefore can be skipped.
|
|
43
|
+
*
|
|
44
|
+
* @override
|
|
45
|
+
*/
|
|
46
|
+
protected canSkipInstallAsync(lastModifiedDate: Date, subspace: Subspace, variant: string | undefined): Promise<boolean>;
|
|
47
|
+
/**
|
|
48
|
+
* Runs "npm/pnpm/yarn install" in the "common/temp" folder.
|
|
49
|
+
*
|
|
50
|
+
* @override
|
|
51
|
+
*/
|
|
52
|
+
protected installAsync(cleanInstall: boolean, subspace: Subspace): Promise<void>;
|
|
53
|
+
protected postInstallAsync(subspace: Subspace): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* This is a workaround for a bug introduced in NPM 5 (and still unfixed as of NPM 5.5.1):
|
|
56
|
+
* https://github.com/npm/npm/issues/19006
|
|
57
|
+
*
|
|
58
|
+
* The regression is that "npm install" sets the package.json "version" field for the
|
|
59
|
+
* @rush-temp projects to a value like "file:projects/example.tgz", when it should be "0.0.0".
|
|
60
|
+
* This causes linking to fail later, when read-package-tree tries to parse the bad version.
|
|
61
|
+
* The error looks like this:
|
|
62
|
+
*
|
|
63
|
+
* ERROR: Failed to parse package.json for foo: Invalid version: "file:projects/example.tgz"
|
|
64
|
+
*
|
|
65
|
+
* Our workaround is to rewrite the package.json files for each of the @rush-temp projects
|
|
66
|
+
* in the node_modules folder, after "npm install" completes.
|
|
67
|
+
*/
|
|
68
|
+
private _fixupNpm5RegressionAsync;
|
|
69
|
+
/**
|
|
70
|
+
* Checks for temp projects that exist in the shrinkwrap file, but don't exist
|
|
71
|
+
* in rush.json. This might occur, e.g. if a project was recently deleted or renamed.
|
|
72
|
+
*
|
|
73
|
+
* @returns true if orphans were found, or false if everything is okay
|
|
74
|
+
*/
|
|
75
|
+
private _findMissingTempProjects;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=RushInstallManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/installManager/RushInstallManager");
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BaseInstallManager } from '../base/BaseInstallManager';
|
|
2
|
+
import type { IInstallManagerOptions } from '../base/BaseInstallManagerTypes';
|
|
3
|
+
import type { BaseShrinkwrapFile } from '../base/BaseShrinkwrapFile';
|
|
4
|
+
import type { PnpmShrinkwrapFile } from '../pnpm/PnpmShrinkwrapFile';
|
|
5
|
+
import type { Subspace } from '../../api/Subspace';
|
|
6
|
+
export interface IPnpmModules {
|
|
7
|
+
hoistedDependencies: {
|
|
8
|
+
[dep in string]: {
|
|
9
|
+
[depPath in string]: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* This class implements common logic between "rush install" and "rush update".
|
|
15
|
+
*/
|
|
16
|
+
export declare class WorkspaceInstallManager extends BaseInstallManager {
|
|
17
|
+
/**
|
|
18
|
+
* @override
|
|
19
|
+
*/
|
|
20
|
+
doInstallAsync(): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Regenerates the common/temp/package.json and related workspace files.
|
|
23
|
+
* If shrinkwrapFile is provided, this function also validates whether it contains
|
|
24
|
+
* everything we need to install and returns true if so; in all other cases,
|
|
25
|
+
* the return value is false.
|
|
26
|
+
*
|
|
27
|
+
* @override
|
|
28
|
+
*/
|
|
29
|
+
protected prepareCommonTempAsync(subspace: Subspace, shrinkwrapFile: (PnpmShrinkwrapFile & BaseShrinkwrapFile) | undefined): Promise<{
|
|
30
|
+
shrinkwrapIsUpToDate: boolean;
|
|
31
|
+
shrinkwrapWarnings: string[];
|
|
32
|
+
}>;
|
|
33
|
+
private _getPackageExtensionChecksum;
|
|
34
|
+
protected canSkipInstallAsync(lastModifiedDate: Date, subspace: Subspace, variant: string | undefined): Promise<boolean>;
|
|
35
|
+
/**
|
|
36
|
+
* Runs "pnpm install" in the common folder.
|
|
37
|
+
*/
|
|
38
|
+
protected installAsync(cleanInstall: boolean, subspace: Subspace): Promise<void>;
|
|
39
|
+
protected postInstallAsync(subspace: Subspace): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Used when invoking the NPM tool. Appends the common configuration options
|
|
42
|
+
* to the command-line.
|
|
43
|
+
*/
|
|
44
|
+
protected pushConfigurationArgs(args: string[], options: IInstallManagerOptions, subspace: Subspace): void;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=WorkspaceInstallManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/installManager/WorkspaceInstallManager");
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ITerminal } from '@rushstack/terminal';
|
|
2
|
+
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
3
|
+
import type { RushGlobalFolder } from '../../api/RushGlobalFolder';
|
|
4
|
+
import type { IInstallManagerOptions } from '../base/BaseInstallManagerTypes';
|
|
5
|
+
import type { Subspace } from '../../api/Subspace';
|
|
6
|
+
export interface IRunInstallOptions {
|
|
7
|
+
afterInstallAsync?: IInstallManagerOptions['afterInstallAsync'];
|
|
8
|
+
beforeInstallAsync?: IInstallManagerOptions['beforeInstallAsync'];
|
|
9
|
+
rushConfiguration: RushConfiguration;
|
|
10
|
+
rushGlobalFolder: RushGlobalFolder;
|
|
11
|
+
isDebug: boolean;
|
|
12
|
+
terminal: ITerminal;
|
|
13
|
+
variant: string | undefined;
|
|
14
|
+
subspace: Subspace;
|
|
15
|
+
}
|
|
16
|
+
export declare function doBasicInstallAsync(options: IRunInstallOptions): Promise<void>;
|
|
17
|
+
//# sourceMappingURL=doBasicInstallAsync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/installManager/doBasicInstallAsync");
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseLinkManager } from '../base/BaseLinkManager';
|
|
2
|
+
export declare class NpmLinkManager extends BaseLinkManager {
|
|
3
|
+
protected _linkProjectsAsync(): Promise<void>;
|
|
4
|
+
/**
|
|
5
|
+
* This is called once for each local project from Rush.json.
|
|
6
|
+
* @param project The local project that we will create symlinks for
|
|
7
|
+
* @param commonRootPackage The common/temp/package.json package
|
|
8
|
+
* @param commonPackageLookup A dictionary for finding packages under common/temp/node_modules
|
|
9
|
+
*/
|
|
10
|
+
private _linkProject;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=NpmLinkManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/npm/NpmLinkManager");
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type readPackageTree from 'read-package-tree';
|
|
2
|
+
import { BasePackage } from '../base/BasePackage';
|
|
3
|
+
/**
|
|
4
|
+
* Used by the linking algorithm when doing NPM package resolution.
|
|
5
|
+
*/
|
|
6
|
+
export interface IResolveOrCreateResult {
|
|
7
|
+
found: BasePackage | undefined;
|
|
8
|
+
parentForCreate: BasePackage | undefined;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The type of dependency; used by IPackageDependency.
|
|
12
|
+
*/
|
|
13
|
+
export declare enum PackageDependencyKind {
|
|
14
|
+
Normal = 0,
|
|
15
|
+
/**
|
|
16
|
+
* The dependency was listed in the optionalDependencies section of package.json.
|
|
17
|
+
*/
|
|
18
|
+
Optional = 1,
|
|
19
|
+
/**
|
|
20
|
+
* The dependency should be a symlink to a project that is locally built by Rush..
|
|
21
|
+
*/
|
|
22
|
+
LocalLink = 2
|
|
23
|
+
}
|
|
24
|
+
export interface IPackageDependency {
|
|
25
|
+
/**
|
|
26
|
+
* The name of the dependency
|
|
27
|
+
*/
|
|
28
|
+
name: string;
|
|
29
|
+
/**
|
|
30
|
+
* The requested version, which may be a pattern such as "^1.2.3"
|
|
31
|
+
*/
|
|
32
|
+
versionRange: string;
|
|
33
|
+
/**
|
|
34
|
+
* The kind of dependency
|
|
35
|
+
*/
|
|
36
|
+
kind: PackageDependencyKind;
|
|
37
|
+
}
|
|
38
|
+
export declare class NpmPackage extends BasePackage {
|
|
39
|
+
/**
|
|
40
|
+
* Names of packages that we explicitly depend on. The actual dependency
|
|
41
|
+
* package may be found in this.children, or possibly in this.children of
|
|
42
|
+
* one of the parents.
|
|
43
|
+
* If a dependency is listed in the "optionalDependencies" section of package.json
|
|
44
|
+
* then its name here will be prepended with a "?" character, which means that Rush
|
|
45
|
+
* will not report an error if the module cannot be found in the Common folder.
|
|
46
|
+
*/
|
|
47
|
+
dependencies: IPackageDependency[];
|
|
48
|
+
private constructor();
|
|
49
|
+
/**
|
|
50
|
+
* Used by "npm link" when creating a Package object that represents symbolic links to be created.
|
|
51
|
+
*/
|
|
52
|
+
static createLinkedNpmPackage(name: string, version: string | undefined, dependencies: IPackageDependency[], folderPath: string): NpmPackage;
|
|
53
|
+
/**
|
|
54
|
+
* Used by "npm link" to simulate a temp project that is missing from the common/node_modules
|
|
55
|
+
* folder (e.g. because it was added after the shrinkwrap file was regenerated).
|
|
56
|
+
* @param packageJsonFilename - Filename of the source package.json
|
|
57
|
+
* Example: `C:\MyRepo\common\temp\projects\project1\package.json`
|
|
58
|
+
* @param targetFolderName - Filename where it should have been installed
|
|
59
|
+
* Example: `C:\MyRepo\common\temp\node_modules\@rush-temp\project1`
|
|
60
|
+
*/
|
|
61
|
+
static createVirtualTempPackage(packageJsonFilename: string, installFolderName: string): NpmPackage;
|
|
62
|
+
/**
|
|
63
|
+
* Recursive constructs a tree of NpmPackage objects using information returned
|
|
64
|
+
* by the "read-package-tree" library.
|
|
65
|
+
*/
|
|
66
|
+
static createFromNpm(npmPackage: readPackageTree.Node): NpmPackage;
|
|
67
|
+
/**
|
|
68
|
+
* Searches the node_modules hierarchy for the nearest matching package with the
|
|
69
|
+
* given name. Note that the nearest match may have an incompatible version.
|
|
70
|
+
* If a match is found, then the "found" result will not be undefined.
|
|
71
|
+
* In either case, the parentForCreate result indicates where the missing
|
|
72
|
+
* dependency can be added, i.e. if the requested dependency was not found
|
|
73
|
+
* or was found with an incompatible version.
|
|
74
|
+
*
|
|
75
|
+
* "cyclicSubtreeRoot" is a special optional parameter that specifies a different
|
|
76
|
+
* root for the tree; the decoupledLocalDependencies feature uses this to isolate
|
|
77
|
+
* certain devDependencies in their own subtree.
|
|
78
|
+
*/
|
|
79
|
+
resolveOrCreate(dependencyName: string, cyclicSubtreeRoot?: NpmPackage): IResolveOrCreateResult;
|
|
80
|
+
/**
|
|
81
|
+
* Searches the node_modules hierarchy for the nearest matching package with the
|
|
82
|
+
* given name. If no match is found, then undefined is returned.
|
|
83
|
+
*/
|
|
84
|
+
resolve(dependencyName: string): NpmPackage | undefined;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=NpmPackage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/npm/NpmPackage");
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ITerminal } from '@rushstack/terminal';
|
|
2
|
+
import type { IPhasedCommandPlugin, PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
|
|
3
|
+
export declare class BuildPlanPlugin implements IPhasedCommandPlugin {
|
|
4
|
+
private readonly _terminal;
|
|
5
|
+
constructor(terminal: ITerminal);
|
|
6
|
+
apply(hooks: PhasedCommandHooks): void;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=BuildPlanPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/operations/BuildPlanPlugin");
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ITerminal } from '@rushstack/terminal';
|
|
2
|
+
import type { IPhasedCommandPlugin, PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
|
|
3
|
+
import type { IExecutionResult } from './IOperationExecutionResult';
|
|
4
|
+
import type { CobuildConfiguration } from '../../api/CobuildConfiguration';
|
|
5
|
+
/**
|
|
6
|
+
* Phased command plugin that emits a timeline to the console.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ConsoleTimelinePlugin implements IPhasedCommandPlugin {
|
|
9
|
+
private readonly _terminal;
|
|
10
|
+
constructor(terminal: ITerminal);
|
|
11
|
+
apply(hooks: PhasedCommandHooks): void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export interface IPrintTimelineParameters {
|
|
17
|
+
terminal: ITerminal;
|
|
18
|
+
result: IExecutionResult;
|
|
19
|
+
cobuildConfiguration: CobuildConfiguration | undefined;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Print a more detailed timeline and analysis of CPU usage for the build.
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare function _printTimeline({ terminal, result, cobuildConfiguration }: IPrintTimelineParameters): void;
|
|
26
|
+
//# sourceMappingURL=ConsoleTimelinePlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/operations/ConsoleTimelinePlugin");
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { IPhase } from '../../api/CommandLineConfiguration';
|
|
2
|
+
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
3
|
+
import type { IOperationRunner, IOperationRunnerContext } from './IOperationRunner';
|
|
4
|
+
import { OperationStatus } from './OperationStatus';
|
|
5
|
+
export interface IIPCOperationRunnerOptions {
|
|
6
|
+
phase: IPhase;
|
|
7
|
+
project: RushConfigurationProject;
|
|
8
|
+
name: string;
|
|
9
|
+
shellCommand: string;
|
|
10
|
+
persist: boolean;
|
|
11
|
+
requestRun: (requestor?: string) => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Runner that hosts a long-lived process to which it communicates via IPC.
|
|
15
|
+
*/
|
|
16
|
+
export declare class IPCOperationRunner implements IOperationRunner {
|
|
17
|
+
readonly name: string;
|
|
18
|
+
readonly cacheable: boolean;
|
|
19
|
+
readonly reportTiming: boolean;
|
|
20
|
+
readonly silent: boolean;
|
|
21
|
+
readonly warningsAreAllowed: boolean;
|
|
22
|
+
private readonly _rushConfiguration;
|
|
23
|
+
private readonly _shellCommand;
|
|
24
|
+
private readonly _workingDirectory;
|
|
25
|
+
private readonly _persist;
|
|
26
|
+
private readonly _requestRun;
|
|
27
|
+
private _ipcProcess;
|
|
28
|
+
private _processReadyPromise;
|
|
29
|
+
constructor(options: IIPCOperationRunnerOptions);
|
|
30
|
+
executeAsync(context: IOperationRunnerContext): Promise<OperationStatus>;
|
|
31
|
+
getConfigHash(): string;
|
|
32
|
+
shutdownAsync(): Promise<void>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=IPCOperationRunner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/operations/IPCOperationRunner");
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IPhasedCommandPlugin, PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
|
|
2
|
+
/**
|
|
3
|
+
* Plugin that implements compatible phases via IPC to a long-lived watch process.
|
|
4
|
+
*/
|
|
5
|
+
export declare class IPCOperationRunnerPlugin implements IPhasedCommandPlugin {
|
|
6
|
+
apply(hooks: PhasedCommandHooks): void;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=IPCOperationRunnerPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/operations/IPCOperationRunnerPlugin");
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ITerminal } from '@rushstack/terminal';
|
|
2
|
+
import type { IPhasedCommandPlugin, PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
|
|
3
|
+
export declare class PnpmSyncCopyOperationPlugin implements IPhasedCommandPlugin {
|
|
4
|
+
private readonly _terminal;
|
|
5
|
+
constructor(terminal: ITerminal);
|
|
6
|
+
apply(hooks: PhasedCommandHooks): void;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=PnpmSyncCopyOperationPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/operations/PnpmSyncCopyOperationPlugin");
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseLinkManager } from '../base/BaseLinkManager';
|
|
2
|
+
export declare class PnpmLinkManager extends BaseLinkManager {
|
|
3
|
+
private readonly _pnpmVersion;
|
|
4
|
+
/**
|
|
5
|
+
* @override
|
|
6
|
+
*/
|
|
7
|
+
createSymlinksForProjectsAsync(force: boolean): Promise<void>;
|
|
8
|
+
protected _linkProjectsAsync(): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* This is called once for each local project from Rush.json.
|
|
11
|
+
* @param project The local project that we will create symlinks for
|
|
12
|
+
* @param rushLinkJson The common/temp/rush-link.json output file
|
|
13
|
+
*/
|
|
14
|
+
private _linkProjectAsync;
|
|
15
|
+
private _getPathToLocalInstallationAsync;
|
|
16
|
+
private _createLocalPackageForDependency;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=PnpmLinkManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/pnpm/PnpmLinkManager");
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseWorkspaceFile } from '../base/BaseWorkspaceFile';
|
|
2
|
+
export declare class PnpmWorkspaceFile extends BaseWorkspaceFile {
|
|
3
|
+
/**
|
|
4
|
+
* The filename of the workspace file.
|
|
5
|
+
*/
|
|
6
|
+
readonly workspaceFilename: string;
|
|
7
|
+
private _workspacePackages;
|
|
8
|
+
/**
|
|
9
|
+
* The PNPM workspace file is used to specify the location of workspaces relative to the root
|
|
10
|
+
* of your PNPM install.
|
|
11
|
+
*/
|
|
12
|
+
constructor(workspaceYamlFilename: string);
|
|
13
|
+
/** @override */
|
|
14
|
+
addPackage(packagePath: string): void;
|
|
15
|
+
/** @override */
|
|
16
|
+
protected serialize(): string;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=PnpmWorkspaceFile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../../lib-shim/index")._rushSdk_loadInternalModule("logic/pnpm/PnpmWorkspaceFile");
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference path="../../src/npm-check-typings.d.ts" />
|
|
2
|
+
import type * as NpmCheck from 'npm-check';
|
|
3
|
+
export interface IUIGroup {
|
|
4
|
+
title: string;
|
|
5
|
+
bgColor?: string;
|
|
6
|
+
filter: {
|
|
7
|
+
mismatch?: boolean;
|
|
8
|
+
bump?: undefined | 'major' | 'minor' | 'patch' | 'nonSemver';
|
|
9
|
+
notInstalled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface IDepsToUpgradeAnswers {
|
|
13
|
+
packages: NpmCheck.INpmCheckPackage[];
|
|
14
|
+
}
|
|
15
|
+
export interface IUpgradeInteractiveDepChoice {
|
|
16
|
+
value: NpmCheck.INpmCheckPackage;
|
|
17
|
+
name: string | string[];
|
|
18
|
+
short: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const UI_GROUPS: IUIGroup[];
|
|
21
|
+
export declare const upgradeInteractive: (pkgs: NpmCheck.INpmCheckPackage[]) => Promise<IDepsToUpgradeAnswers>;
|
|
22
|
+
//# sourceMappingURL=InteractiveUpgradeUI.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("utilities/InteractiveUpgradeUI");
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import * as fetch from 'node-fetch';
|
|
3
|
+
/**
|
|
4
|
+
* For use with {@link WebClient}.
|
|
5
|
+
*/
|
|
6
|
+
export type WebClientResponse = fetch.Response;
|
|
7
|
+
/**
|
|
8
|
+
* For use with {@link WebClient}.
|
|
9
|
+
*/
|
|
10
|
+
export type WebClientHeaders = fetch.Headers;
|
|
11
|
+
export declare const WebClientHeaders: typeof fetch.Headers;
|
|
12
|
+
/**
|
|
13
|
+
* For use with {@link WebClient}.
|
|
14
|
+
*/
|
|
15
|
+
export interface IWebFetchOptionsBase {
|
|
16
|
+
timeoutMs?: number;
|
|
17
|
+
headers?: WebClientHeaders | Record<string, string>;
|
|
18
|
+
redirect?: fetch.RequestInit['redirect'];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* For use with {@link WebClient}.
|
|
22
|
+
*/
|
|
23
|
+
export interface IGetFetchOptions extends IWebFetchOptionsBase {
|
|
24
|
+
verb: 'GET' | never;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* For use with {@link WebClient}.
|
|
28
|
+
*/
|
|
29
|
+
export interface IFetchOptionsWithBody extends IWebFetchOptionsBase {
|
|
30
|
+
verb: 'PUT' | 'POST' | 'PATCH';
|
|
31
|
+
body?: Buffer;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* For use with {@link WebClient}.
|
|
35
|
+
*/
|
|
36
|
+
export declare enum WebClientProxy {
|
|
37
|
+
None = 0,
|
|
38
|
+
Detect = 1,
|
|
39
|
+
Fiddler = 2
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A helper for issuing HTTP requests.
|
|
43
|
+
*/
|
|
44
|
+
export declare class WebClient {
|
|
45
|
+
private static _requestFn;
|
|
46
|
+
readonly standardHeaders: fetch.Headers;
|
|
47
|
+
accept: string | undefined;
|
|
48
|
+
userAgent: string | undefined;
|
|
49
|
+
proxy: WebClientProxy;
|
|
50
|
+
static mockRequestFn(fn: typeof fetch.default): void;
|
|
51
|
+
static resetMockRequestFn(): void;
|
|
52
|
+
static mergeHeaders(target: fetch.Headers, source: fetch.Headers | Record<string, string>): void;
|
|
53
|
+
addBasicAuthHeader(userName: string, password: string): void;
|
|
54
|
+
fetchAsync(url: string, options?: IGetFetchOptions | IFetchOptionsWithBody): Promise<WebClientResponse>;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=WebClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../../lib-shim/index")._rushSdk_loadInternalModule("utilities/WebClient");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/rush-sdk",
|
|
3
|
-
"version": "5.143.0-pr5009.
|
|
3
|
+
"version": "5.143.0-pr5009.1",
|
|
4
4
|
"description": "An API for interacting with the Rush engine",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -38,18 +38,18 @@
|
|
|
38
38
|
"tapable": "2.2.1",
|
|
39
39
|
"@rushstack/lookup-by-path": "0.4.5",
|
|
40
40
|
"@rushstack/package-deps-hash": "4.2.10",
|
|
41
|
-
"@rushstack/
|
|
42
|
-
"@rushstack/
|
|
41
|
+
"@rushstack/node-core-library": "5.10.0",
|
|
42
|
+
"@rushstack/terminal": "0.14.3"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/semver": "7.5.0",
|
|
46
46
|
"@types/webpack-env": "1.18.0",
|
|
47
47
|
"webpack": "~5.95.0",
|
|
48
|
+
"@microsoft/rush-lib": "5.143.0-pr5009.1",
|
|
48
49
|
"@rushstack/heft": "0.68.9",
|
|
49
|
-
"@microsoft/rush-lib": "5.143.0-pr5009.0",
|
|
50
50
|
"local-node-rig": "1.0.0",
|
|
51
|
-
"@rushstack/heft-webpack5-plugin": "0.11.7",
|
|
52
51
|
"@rushstack/stream-collator": "4.1.77",
|
|
52
|
+
"@rushstack/heft-webpack5-plugin": "0.11.7",
|
|
53
53
|
"@rushstack/ts-command-line": "4.23.1",
|
|
54
54
|
"@rushstack/webpack-preserve-dynamic-require-plugin": "0.11.76"
|
|
55
55
|
},
|