@rushstack/rush-sdk 5.113.4 → 5.114.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/dist/rush-lib.d.ts +32 -3
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/api/BuildCacheConfiguration.d.ts +2 -1
- package/lib/api/CobuildConfiguration.d.ts +1 -1
- package/lib/api/CustomTipsConfiguration.d.ts +1 -1
- package/lib/api/ExperimentsConfiguration.d.ts +16 -0
- package/lib/api/Rush.d.ts +2 -1
- package/lib/api/RushProjectConfiguration.d.ts +1 -1
- package/lib/cli/RushPnpmCommandLineParser.d.ts +1 -1
- package/lib/cli/RushXCommandLine.d.ts +2 -2
- package/lib/cli/actions/BaseInstallAction.d.ts +1 -1
- package/lib/cli/parsing/SelectionParameterSet.d.ts +1 -1
- package/lib/logic/Git.d.ts +1 -1
- package/lib/logic/ProjectChangeAnalyzer.d.ts +1 -1
- package/lib/logic/RushConstants.d.ts +13 -0
- package/lib/logic/buildCache/FileSystemBuildCacheProvider.d.ts +1 -1
- package/lib/logic/buildCache/ICloudBuildCacheProvider.d.ts +1 -1
- package/lib/logic/buildCache/ProjectBuildCache.d.ts +1 -1
- package/lib/logic/deploy/DeployScenarioConfiguration.d.ts +1 -1
- package/lib/logic/operations/CacheableOperationPlugin.d.ts +1 -1
- package/lib/logic/operations/LegacySkipPlugin.d.ts +1 -1
- package/lib/logic/operations/OperationMetadataManager.d.ts +1 -1
- package/lib/logic/operations/OperationResultSummarizerPlugin.d.ts +1 -1
- package/lib/logic/operations/ValidateOperationsPlugin.d.ts +1 -1
- package/lib/logic/pnpm/PnpmShrinkwrapFile.d.ts +5 -1
- package/lib/logic/selectors/ISelectorParser.d.ts +1 -1
- package/lib/logic/versionMismatch/VersionMismatchFinder.d.ts +1 -1
- package/lib/pluginFramework/PluginLoader/PluginLoaderBase.d.ts +2 -1
- package/lib/pluginFramework/PluginManager.d.ts +1 -1
- package/lib/pluginFramework/RushSession.d.ts +1 -1
- package/lib/pluginFramework/logging/Logger.d.ts +1 -1
- package/lib/utilities/CollatedTerminalProvider.d.ts +1 -1
- package/lib/utilities/NullTerminalProvider.d.ts +1 -1
- package/lib/utilities/TarExecutable.d.ts +1 -1
- package/lib-shim/index.d.ts.map +1 -1
- package/lib-shim/index.js +2 -1
- package/lib-shim/index.js.map +1 -1
- package/package.json +8 -8
package/dist/rush-lib.d.ts
CHANGED
|
@@ -13,13 +13,13 @@ import type { CollatedWriter } from '@rushstack/stream-collator';
|
|
|
13
13
|
import type { CommandLineParameter } from '@rushstack/ts-command-line';
|
|
14
14
|
import { HookMap } from 'tapable';
|
|
15
15
|
import { IPackageJson } from '@rushstack/node-core-library';
|
|
16
|
-
import { ITerminal } from '@rushstack/
|
|
17
|
-
import { ITerminalProvider } from '@rushstack/
|
|
16
|
+
import { ITerminal } from '@rushstack/terminal';
|
|
17
|
+
import type { ITerminalProvider } from '@rushstack/terminal';
|
|
18
18
|
import { JsonObject } from '@rushstack/node-core-library';
|
|
19
19
|
import { PackageNameParser } from '@rushstack/node-core-library';
|
|
20
20
|
import type { StdioSummarizer } from '@rushstack/terminal';
|
|
21
21
|
import { SyncHook } from 'tapable';
|
|
22
|
-
import { Terminal } from '@rushstack/
|
|
22
|
+
import { Terminal } from '@rushstack/terminal';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* This represents the JSON file specified via the "approvedPackagesFile" option in rush.json.
|
|
@@ -1333,6 +1333,22 @@ export declare interface IExperimentsJson {
|
|
|
1333
1333
|
* If true, Rush will not allow node_modules in the repo folder or in parent folders.
|
|
1334
1334
|
*/
|
|
1335
1335
|
forbidPhantomResolvableNodeModulesFolders?: boolean;
|
|
1336
|
+
/**
|
|
1337
|
+
* (UNDER DEVELOPMENT) For certain installation problems involving peer dependencies, PNPM cannot
|
|
1338
|
+
* correctly satisfy versioning requirements without installing duplicate copies of a package inside the
|
|
1339
|
+
* node_modules folder. This poses a problem for "workspace:*" dependencies, as they are normally
|
|
1340
|
+
* installed by making a symlink to the local project source folder. PNPM's "injected dependencies"
|
|
1341
|
+
* feature provides a model for copying the local project folder into node_modules, however copying
|
|
1342
|
+
* must occur AFTER the dependency project is built and BEFORE the consuming project starts to build.
|
|
1343
|
+
* The "pnpm-sync" tool manages this operation; see its documentation for details.
|
|
1344
|
+
* Enable this experiment if you want "rush" and "rushx" commands to resync injected dependencies
|
|
1345
|
+
* by invoking "pnpm-sync" during the build.
|
|
1346
|
+
*/
|
|
1347
|
+
usePnpmSyncForInjectedDependencies?: boolean;
|
|
1348
|
+
/**
|
|
1349
|
+
* If set to true, Rush will generate a `project-impact-graph.yaml` file in the repository root during `rush update`.
|
|
1350
|
+
*/
|
|
1351
|
+
generateProjectImpactGraphDuringRushUpdate?: boolean;
|
|
1336
1352
|
}
|
|
1337
1353
|
|
|
1338
1354
|
/**
|
|
@@ -4061,6 +4077,11 @@ export declare class RushConstants {
|
|
|
4061
4077
|
* Example: `C:\MyRepo\common\temp\patches`
|
|
4062
4078
|
*/
|
|
4063
4079
|
static readonly pnpmPatchesFolderName: string;
|
|
4080
|
+
/**
|
|
4081
|
+
* The folder name under `/common/temp` used to store checked-in patches.
|
|
4082
|
+
* Example: `C:\MyRepo\common\pnpm-patches`
|
|
4083
|
+
*/
|
|
4084
|
+
static readonly pnpmPatchesCommonFolderName: string;
|
|
4064
4085
|
/**
|
|
4065
4086
|
* The filename ("shrinkwrap.yaml") used to store state for pnpm
|
|
4066
4087
|
*/
|
|
@@ -4217,6 +4238,14 @@ export declare class RushConstants {
|
|
|
4217
4238
|
* The name of the parameter that can be used to bypass policies.
|
|
4218
4239
|
*/
|
|
4219
4240
|
static readonly bypassPolicyFlagLongName: '--bypass-policy';
|
|
4241
|
+
/**
|
|
4242
|
+
* Merge Queue ignore configuration file.
|
|
4243
|
+
*/
|
|
4244
|
+
static readonly mergeQueueIgnoreFileName: string;
|
|
4245
|
+
/**
|
|
4246
|
+
* The filename ("project-impact-graph.yaml") for the project impact graph file.
|
|
4247
|
+
*/
|
|
4248
|
+
static readonly projectImpactGraphFilename: string;
|
|
4220
4249
|
}
|
|
4221
4250
|
|
|
4222
4251
|
/**
|
package/dist/tsdoc-metadata.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type JsonObject
|
|
1
|
+
import { type JsonObject } from '@rushstack/node-core-library';
|
|
2
|
+
import type { ITerminal } from '@rushstack/terminal';
|
|
2
3
|
import type { RushConfiguration } from './RushConfiguration';
|
|
3
4
|
import { FileSystemBuildCacheProvider } from '../logic/buildCache/FileSystemBuildCacheProvider';
|
|
4
5
|
import type { ICloudBuildCacheProvider } from '../logic/buildCache/ICloudBuildCacheProvider';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ITerminal } from '@rushstack/terminal';
|
|
2
2
|
import type { CobuildLockProviderFactory, RushSession } from '../pluginFramework/RushSession';
|
|
3
3
|
import type { ICobuildLockProvider } from '../logic/cobuild/ICobuildLockProvider';
|
|
4
4
|
import type { RushConfiguration } from './RushConfiguration';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ITerminal } from '@rushstack/
|
|
1
|
+
import { type ITerminal } from '@rushstack/terminal';
|
|
2
2
|
/**
|
|
3
3
|
* This interface represents the raw custom-tips.json file which allows repo maintainers
|
|
4
4
|
* to configure extra details to be printed alongside certain Rush messages.
|
|
@@ -59,6 +59,22 @@ export interface IExperimentsJson {
|
|
|
59
59
|
* If true, Rush will not allow node_modules in the repo folder or in parent folders.
|
|
60
60
|
*/
|
|
61
61
|
forbidPhantomResolvableNodeModulesFolders?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* (UNDER DEVELOPMENT) For certain installation problems involving peer dependencies, PNPM cannot
|
|
64
|
+
* correctly satisfy versioning requirements without installing duplicate copies of a package inside the
|
|
65
|
+
* node_modules folder. This poses a problem for "workspace:*" dependencies, as they are normally
|
|
66
|
+
* installed by making a symlink to the local project source folder. PNPM's "injected dependencies"
|
|
67
|
+
* feature provides a model for copying the local project folder into node_modules, however copying
|
|
68
|
+
* must occur AFTER the dependency project is built and BEFORE the consuming project starts to build.
|
|
69
|
+
* The "pnpm-sync" tool manages this operation; see its documentation for details.
|
|
70
|
+
* Enable this experiment if you want "rush" and "rushx" commands to resync injected dependencies
|
|
71
|
+
* by invoking "pnpm-sync" during the build.
|
|
72
|
+
*/
|
|
73
|
+
usePnpmSyncForInjectedDependencies?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* If set to true, Rush will generate a `project-impact-graph.yaml` file in the repository root during `rush update`.
|
|
76
|
+
*/
|
|
77
|
+
generateProjectImpactGraphDuringRushUpdate?: boolean;
|
|
62
78
|
}
|
|
63
79
|
/**
|
|
64
80
|
* Use this class to load the "common/config/rush/experiments.json" config file.
|
package/lib/api/Rush.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type IPackageJson
|
|
1
|
+
import { type IPackageJson } from '@rushstack/node-core-library';
|
|
2
|
+
import type { ITerminalProvider } from '@rushstack/terminal';
|
|
2
3
|
import '../utilities/SetRushLibPath';
|
|
3
4
|
import type { IBuiltInPluginConfiguration } from '../pluginFramework/PluginLoader/BuiltInPluginLoader';
|
|
4
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ITerminalProvider } from '@rushstack/
|
|
1
|
+
import { type ITerminalProvider } from '@rushstack/terminal';
|
|
2
2
|
import type { IBuiltInPluginConfiguration } from '../pluginFramework/PluginLoader/BuiltInPluginLoader';
|
|
3
3
|
/**
|
|
4
4
|
* Options for RushPnpmCommandLineParser
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ILaunchOptions } from '../api/Rush';
|
|
2
2
|
export declare class RushXCommandLine {
|
|
3
|
-
static
|
|
4
|
-
private static
|
|
3
|
+
static launchRushXAsync(launcherVersion: string, options: ILaunchOptions): Promise<void>;
|
|
4
|
+
private static _launchRushXInternalAsync;
|
|
5
5
|
private static _parseCommandLineArguments;
|
|
6
6
|
private static _showUsage;
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CommandLineFlagParameter, CommandLineIntegerParameter, CommandLineStringParameter } from '@rushstack/ts-command-line';
|
|
2
|
-
import { type ITerminal } from '@rushstack/
|
|
2
|
+
import { type ITerminal } from '@rushstack/terminal';
|
|
3
3
|
import { BaseRushAction, type IBaseRushActionOptions } from './BaseRushAction';
|
|
4
4
|
import type { IInstallManagerOptions } from '../../logic/base/BaseInstallManagerTypes';
|
|
5
5
|
import type { SelectionParameterSet } from '../parsing/SelectionParameterSet';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ITerminal } from '@rushstack/terminal';
|
|
2
2
|
import type { CommandLineParameterProvider } from '@rushstack/ts-command-line';
|
|
3
3
|
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
4
4
|
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
package/lib/logic/Git.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import gitInfo from 'git-repo-info';
|
|
2
|
-
import {
|
|
2
|
+
import type { ITerminal } from '@rushstack/terminal';
|
|
3
3
|
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
4
4
|
import { type IGitStatusEntry } from './GitStatusParser';
|
|
5
5
|
export declare const DEFAULT_GIT_TAG_SEPARATOR: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ITerminal } from '@rushstack/terminal';
|
|
2
2
|
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
3
3
|
import type { RushConfigurationProject } from '../api/RushConfigurationProject';
|
|
4
4
|
/**
|
|
@@ -85,6 +85,11 @@ export declare class RushConstants {
|
|
|
85
85
|
* Example: `C:\MyRepo\common\temp\patches`
|
|
86
86
|
*/
|
|
87
87
|
static readonly pnpmPatchesFolderName: string;
|
|
88
|
+
/**
|
|
89
|
+
* The folder name under `/common/temp` used to store checked-in patches.
|
|
90
|
+
* Example: `C:\MyRepo\common\pnpm-patches`
|
|
91
|
+
*/
|
|
92
|
+
static readonly pnpmPatchesCommonFolderName: string;
|
|
88
93
|
/**
|
|
89
94
|
* The filename ("shrinkwrap.yaml") used to store state for pnpm
|
|
90
95
|
*/
|
|
@@ -241,5 +246,13 @@ export declare class RushConstants {
|
|
|
241
246
|
* The name of the parameter that can be used to bypass policies.
|
|
242
247
|
*/
|
|
243
248
|
static readonly bypassPolicyFlagLongName: '--bypass-policy';
|
|
249
|
+
/**
|
|
250
|
+
* Merge Queue ignore configuration file.
|
|
251
|
+
*/
|
|
252
|
+
static readonly mergeQueueIgnoreFileName: string;
|
|
253
|
+
/**
|
|
254
|
+
* The filename ("project-impact-graph.yaml") for the project impact graph file.
|
|
255
|
+
*/
|
|
256
|
+
static readonly projectImpactGraphFilename: string;
|
|
244
257
|
}
|
|
245
258
|
//# sourceMappingURL=RushConstants.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import {
|
|
2
|
+
import type { ITerminal } from '@rushstack/terminal';
|
|
3
3
|
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
4
4
|
import type { RushUserConfiguration } from '../../api/RushUserConfiguration';
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ITerminal } from '@rushstack/terminal';
|
|
2
2
|
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
3
3
|
import type { ProjectChangeAnalyzer } from '../ProjectChangeAnalyzer';
|
|
4
4
|
import type { BuildCacheConfiguration } from '../../api/BuildCacheConfiguration';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ITerminal } from '@rushstack/
|
|
1
|
+
import { type ITerminal } from '@rushstack/terminal';
|
|
2
2
|
import { CobuildLock } from '../cobuild/CobuildLock';
|
|
3
3
|
import { ProjectBuildCache } from '../buildCache/ProjectBuildCache';
|
|
4
4
|
import type { IOperationSettings } from '../../api/RushProjectConfiguration';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ITerminal } from '@rushstack/terminal';
|
|
2
2
|
import { OperationStateFile } from './OperationStateFile';
|
|
3
3
|
import type { IPhase } from '../../api/CommandLineConfiguration';
|
|
4
4
|
import type { RushConfigurationProject } from '../../api/RushConfigurationProject';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ITerminal } from '@rushstack/terminal';
|
|
2
2
|
import type { IPhasedCommandPlugin, PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
|
|
3
3
|
import type { IExecutionResult } from './IOperationExecutionResult';
|
|
4
4
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IPhasedCommandPlugin, PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
|
|
2
|
-
import type { ITerminal } from '@rushstack/
|
|
2
|
+
import type { ITerminal } from '@rushstack/terminal';
|
|
3
3
|
/**
|
|
4
4
|
* Core phased command plugin that provides the functionality for generating a base operation graph
|
|
5
5
|
* from the set of selected projects and phases.
|
|
@@ -105,6 +105,9 @@ export interface IPnpmShrinkwrapYaml {
|
|
|
105
105
|
[dependency: string]: string;
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
+
export interface ILoadFromFileOptions {
|
|
109
|
+
withCaching?: boolean;
|
|
110
|
+
}
|
|
108
111
|
/**
|
|
109
112
|
* Given an encoded "dependency key" from the PNPM shrinkwrap file, this parses it into an equivalent
|
|
110
113
|
* DependencySpecifier.
|
|
@@ -114,6 +117,7 @@ export interface IPnpmShrinkwrapYaml {
|
|
|
114
117
|
export declare function parsePnpmDependencyKey(dependencyName: string, versionSpecifier: IPnpmVersionSpecifier): DependencySpecifier | undefined;
|
|
115
118
|
export declare function normalizePnpmVersionSpecifier(versionSpecifier: IPnpmVersionSpecifier): string;
|
|
116
119
|
export declare class PnpmShrinkwrapFile extends BaseShrinkwrapFile {
|
|
120
|
+
private static _cacheByLockfilePath;
|
|
117
121
|
readonly shrinkwrapFileMajorVersion: number;
|
|
118
122
|
readonly isWorkspaceCompatible: boolean;
|
|
119
123
|
readonly registry: string;
|
|
@@ -126,7 +130,7 @@ export declare class PnpmShrinkwrapFile extends BaseShrinkwrapFile {
|
|
|
126
130
|
private readonly _integrities;
|
|
127
131
|
private _pnpmfileConfiguration;
|
|
128
132
|
private constructor();
|
|
129
|
-
static loadFromFile(
|
|
133
|
+
static loadFromFile(shrinkwrapYamlFilePath: string, { withCaching }?: ILoadFromFileOptions): PnpmShrinkwrapFile | undefined;
|
|
130
134
|
static loadFromString(shrinkwrapContent: string): PnpmShrinkwrapFile;
|
|
131
135
|
getShrinkwrapHash(experimentsConfig?: IExperimentsJson): string;
|
|
132
136
|
/** @override */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ITerminal } from '@rushstack/terminal';
|
|
2
2
|
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
3
3
|
import type { VersionMismatchFinderEntity } from './VersionMismatchFinderEntity';
|
|
4
4
|
import type { Subspace } from '../../api/Subspace';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type JsonObject, JsonSchema } from '@rushstack/node-core-library';
|
|
2
|
+
import type { ITerminal } from '@rushstack/terminal';
|
|
2
3
|
import { CommandLineConfiguration } from '../../api/CommandLineConfiguration';
|
|
3
4
|
import type { RushConfiguration } from '../../api/RushConfiguration';
|
|
4
5
|
import type { IRushPluginConfigurationBase } from '../../api/RushPluginsConfiguration';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ITerminal } from '@rushstack/terminal';
|
|
2
2
|
import type { CommandLineConfiguration } from '../api/CommandLineConfiguration';
|
|
3
3
|
import type { RushConfiguration } from '../api/RushConfiguration';
|
|
4
4
|
import { type IBuiltInPluginConfiguration } from './PluginLoader/BuiltInPluginLoader';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ITerminalProvider } from '@rushstack/terminal';
|
|
2
2
|
import { type ILogger } from './logging/Logger';
|
|
3
3
|
import { RushLifecycleHooks } from './RushLifeCycle';
|
|
4
4
|
import type { IBuildCacheJson } from '../api/BuildCacheConfiguration';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ITerminalProvider, TerminalProviderSeverity } from '@rushstack/node-core-library';
|
|
2
1
|
import type { CollatedTerminal } from '@rushstack/stream-collator';
|
|
2
|
+
import { type ITerminalProvider, TerminalProviderSeverity } from '@rushstack/terminal';
|
|
3
3
|
export interface ICollatedTerminalProviderOptions {
|
|
4
4
|
debugEnabled: boolean;
|
|
5
5
|
}
|
package/lib-shim/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA8MA;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAO1E"}
|
package/lib-shim/index.js
CHANGED
|
@@ -29,9 +29,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports._rushSdk_loadInternalModule = void 0;
|
|
30
30
|
const path = __importStar(require("path"));
|
|
31
31
|
const node_core_library_1 = require("@rushstack/node-core-library");
|
|
32
|
+
const terminal_1 = require("@rushstack/terminal");
|
|
32
33
|
const helpers_1 = require("./helpers");
|
|
33
34
|
const verboseEnabled = typeof process !== 'undefined' && process.env.RUSH_SDK_DEBUG === '1';
|
|
34
|
-
const terminal = new
|
|
35
|
+
const terminal = new terminal_1.Terminal(new terminal_1.ConsoleTerminalProvider({
|
|
35
36
|
verboseEnabled
|
|
36
37
|
}));
|
|
37
38
|
let errorMessage = '';
|
package/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AC3C,sCAAsC;IACtC,OAAO,CAAC,KAAK,CAAC;EACd,YAAY;CACb,CAAC,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,uCAAuC;AACvC,KAAK,MAAM,QAAQ,IAAI,oBAAU,CAAC,aAAa,EAAE,CAAC;IAChD,IAAI,QAAQ,KAAK,SAAS,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC;QAChE,MAAM,uBAAuB,GAAsB,oBAAU,CAAC,aAAa,CAAC;QAE5E,0CAA0C;QAC1C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE;YACvC,UAAU,EAAE,IAAI;YAChB,GAAG,EAAE;gBACH,OAAO,uBAAuB,CAAC,QAAQ,CAAC,CAAC;YAC3C,CAAC;SACF,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,2BAA2B,CAAC,aAAqB;IAC/D,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CACb,gBAAgB,OAAO,CAAC,IAAI,CAAC,OAAO,qDAAqD,CAC1F,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAC1D,CAAC;AAPD,kEAOC","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 type JsonObject,\n type IPackageJson,\n PackageJsonLookup,\n Executable,\n Terminal,\n ConsoleTerminalProvider\n} from '@rushstack/node-core-library';\nimport type { SpawnSyncReturns } from 'child_process';\nimport {\n RUSH_LIB_NAME,\n RUSH_LIB_PATH_ENV_VAR_NAME,\n type RushLibModuleType,\n _require,\n requireRushLibUnderFolderPath,\n tryFindRushJsonLocation,\n sdkContext\n} from './helpers';\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\ndeclare const global: typeof globalThis & {\n ___rush___rushLibModule?: RushLibModuleType;\n ___rush___rushLibModuleFromEnvironment?: RushLibModuleType;\n ___rush___rushLibModuleFromInstallAndRunRush?: RushLibModuleType;\n};\n\nlet errorMessage: string = '';\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.\nif (sdkContext.rushLibModule === undefined) {\n sdkContext.rushLibModule =\n global.___rush___rushLibModule ||\n global.___rush___rushLibModuleFromEnvironment ||\n global.___rush___rushLibModuleFromInstallAndRunRush;\n}\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 (sdkContext.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 sdkContext.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 (sdkContext.rushLibModule !== undefined) {\n // to track which scenario is active and how it got initialized.\n global.___rush___rushLibModule = sdkContext.rushLibModule;\n terminal.writeVerboseLine(`Loaded ${RUSH_LIB_NAME} from caller`);\n }\n }\n }\n }\n}\n\n// SCENARIO 3: A tool or script has been invoked as a child process by an instance of \"rush-lib\" and can use the\n// version that invoked it. In this case, use process.env._RUSH_LIB_PATH to find \"rush-lib\".\nif (sdkContext.rushLibModule === undefined) {\n const rushLibPath: string | undefined = process.env[RUSH_LIB_PATH_ENV_VAR_NAME];\n if (rushLibPath) {\n terminal.writeVerboseLine(\n `Try to load ${RUSH_LIB_NAME} from process.env.${RUSH_LIB_PATH_ENV_VAR_NAME} from caller package`\n );\n try {\n sdkContext.rushLibModule = _require(rushLibPath);\n } catch (error) {\n // Log this as a warning, since it is unexpected to define an incorrect value of the variable.\n terminal.writeWarningLine(\n `Failed to load ${RUSH_LIB_NAME} via process.env.${RUSH_LIB_PATH_ENV_VAR_NAME}`\n );\n }\n\n if (sdkContext.rushLibModule !== undefined) {\n // to track which scenario is active and how it got initialized.\n global.___rush___rushLibModuleFromEnvironment = sdkContext.rushLibModule;\n terminal.writeVerboseLine(`Loaded ${RUSH_LIB_NAME} from process.env.${RUSH_LIB_PATH_ENV_VAR_NAME}`);\n }\n }\n}\n\n// SCENARIO 4: A standalone 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 (sdkContext.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 sdkContext.rushLibModule = requireRushLibUnderFolderPath(installRunNodeModuleFolder);\n } catch (e1) {\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 installAndRunRushProcess: SpawnSyncReturns<string> = Executable.spawnSync(\n 'node',\n [installAndRunRushJSPath, '--help'],\n {\n stdio: 'pipe'\n }\n );\n\n installAndRunRushStderrContent = installAndRunRushProcess.stderr;\n if (installAndRunRushProcess.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 sdkContext.rushLibModule = requireRushLibUnderFolderPath(installRunNodeModuleFolder);\n } catch (e2) {\n // eslint-disable-next-line no-console\n console.error(`${installAndRunRushStderrContent}`);\n throw new Error(`The ${RUSH_LIB_NAME} package failed to load`);\n }\n }\n\n if (sdkContext.rushLibModule !== undefined) {\n // to track which scenario is active and how it got initialized.\n global.___rush___rushLibModuleFromInstallAndRunRush = sdkContext.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 (sdkContext.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 // eslint-disable-next-line no-console\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 sdkContext.rushLibModule) {\n if (property !== 'default' && !exports.hasOwnProperty(property)) {\n const rushLibModuleForClosure: RushLibModuleType = sdkContext.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 * Used by the .js stubs for path-based imports of `@microsoft/rush-lib` internal APIs.\n */\nexport function _rushSdk_loadInternalModule(srcImportPath: string): unknown {\n if (!exports._RushInternals) {\n throw new Error(\n `Rush version ${exports.Rush.version} does not support internal API imports via rush-sdk`\n );\n }\n return exports._RushInternals.loadModule(srcImportPath);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,2CAA6B;AAC7B,oEAMsC;AACtC,kDAAwE;AAExE,uCAQmB;AAEnB,MAAM,cAAc,GAAY,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,GAAG,CAAC;AACrG,MAAM,QAAQ,GAAa,IAAI,mBAAQ,CACrC,IAAI,kCAAuB,CAAC;IAC1B,cAAc;CACf,CAAC,CACH,CAAC;AAQF,IAAI,YAAY,GAAW,EAAE,CAAC;AAE9B,qGAAqG;AACrG,gGAAgG;AAChG,IAAI,oBAAU,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;IAC3C,oBAAU,CAAC,aAAa;QACtB,MAAM,CAAC,uBAAuB;YAC9B,MAAM,CAAC,sCAAsC;YAC7C,MAAM,CAAC,4CAA4C,CAAC;AACxD,CAAC;AAED,6FAA6F;AAC7F,+FAA+F;AAC/F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AAC,IAAI,CAAC,OAAO,qDAAqD,CAC1F,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAC1D,CAAC;AAPD,kEAOC","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 type JsonObject,\n type IPackageJson,\n PackageJsonLookup,\n Executable\n} from '@rushstack/node-core-library';\nimport { Terminal, ConsoleTerminalProvider } from '@rushstack/terminal';\nimport type { SpawnSyncReturns } from 'child_process';\nimport {\n RUSH_LIB_NAME,\n RUSH_LIB_PATH_ENV_VAR_NAME,\n type RushLibModuleType,\n _require,\n requireRushLibUnderFolderPath,\n tryFindRushJsonLocation,\n sdkContext\n} from './helpers';\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\ndeclare const global: typeof globalThis & {\n ___rush___rushLibModule?: RushLibModuleType;\n ___rush___rushLibModuleFromEnvironment?: RushLibModuleType;\n ___rush___rushLibModuleFromInstallAndRunRush?: RushLibModuleType;\n};\n\nlet errorMessage: string = '';\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.\nif (sdkContext.rushLibModule === undefined) {\n sdkContext.rushLibModule =\n global.___rush___rushLibModule ||\n global.___rush___rushLibModuleFromEnvironment ||\n global.___rush___rushLibModuleFromInstallAndRunRush;\n}\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 (sdkContext.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 sdkContext.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 (sdkContext.rushLibModule !== undefined) {\n // to track which scenario is active and how it got initialized.\n global.___rush___rushLibModule = sdkContext.rushLibModule;\n terminal.writeVerboseLine(`Loaded ${RUSH_LIB_NAME} from caller`);\n }\n }\n }\n }\n}\n\n// SCENARIO 3: A tool or script has been invoked as a child process by an instance of \"rush-lib\" and can use the\n// version that invoked it. In this case, use process.env._RUSH_LIB_PATH to find \"rush-lib\".\nif (sdkContext.rushLibModule === undefined) {\n const rushLibPath: string | undefined = process.env[RUSH_LIB_PATH_ENV_VAR_NAME];\n if (rushLibPath) {\n terminal.writeVerboseLine(\n `Try to load ${RUSH_LIB_NAME} from process.env.${RUSH_LIB_PATH_ENV_VAR_NAME} from caller package`\n );\n try {\n sdkContext.rushLibModule = _require(rushLibPath);\n } catch (error) {\n // Log this as a warning, since it is unexpected to define an incorrect value of the variable.\n terminal.writeWarningLine(\n `Failed to load ${RUSH_LIB_NAME} via process.env.${RUSH_LIB_PATH_ENV_VAR_NAME}`\n );\n }\n\n if (sdkContext.rushLibModule !== undefined) {\n // to track which scenario is active and how it got initialized.\n global.___rush___rushLibModuleFromEnvironment = sdkContext.rushLibModule;\n terminal.writeVerboseLine(`Loaded ${RUSH_LIB_NAME} from process.env.${RUSH_LIB_PATH_ENV_VAR_NAME}`);\n }\n }\n}\n\n// SCENARIO 4: A standalone 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 (sdkContext.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 sdkContext.rushLibModule = requireRushLibUnderFolderPath(installRunNodeModuleFolder);\n } catch (e1) {\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 installAndRunRushProcess: SpawnSyncReturns<string> = Executable.spawnSync(\n 'node',\n [installAndRunRushJSPath, '--help'],\n {\n stdio: 'pipe'\n }\n );\n\n installAndRunRushStderrContent = installAndRunRushProcess.stderr;\n if (installAndRunRushProcess.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 sdkContext.rushLibModule = requireRushLibUnderFolderPath(installRunNodeModuleFolder);\n } catch (e2) {\n // eslint-disable-next-line no-console\n console.error(`${installAndRunRushStderrContent}`);\n throw new Error(`The ${RUSH_LIB_NAME} package failed to load`);\n }\n }\n\n if (sdkContext.rushLibModule !== undefined) {\n // to track which scenario is active and how it got initialized.\n global.___rush___rushLibModuleFromInstallAndRunRush = sdkContext.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 (sdkContext.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 // eslint-disable-next-line no-console\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 sdkContext.rushLibModule) {\n if (property !== 'default' && !exports.hasOwnProperty(property)) {\n const rushLibModuleForClosure: RushLibModuleType = sdkContext.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 * Used by the .js stubs for path-based imports of `@microsoft/rush-lib` internal APIs.\n */\nexport function _rushSdk_loadInternalModule(srcImportPath: string): unknown {\n if (!exports._RushInternals) {\n throw new Error(\n `Rush version ${exports.Rush.version} does not support internal API imports via rush-sdk`\n );\n }\n return exports._RushInternals.loadModule(srcImportPath);\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rushstack/rush-sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.114.1",
|
|
4
4
|
"description": "An API for interacting with the Rush engine",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@types/node-fetch": "2.6.2",
|
|
27
27
|
"tapable": "2.2.1",
|
|
28
|
-
"@rushstack/node-core-library": "
|
|
28
|
+
"@rushstack/node-core-library": "4.0.1",
|
|
29
|
+
"@rushstack/terminal": "0.8.1"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
31
32
|
"@types/semver": "7.5.0",
|
|
32
33
|
"@types/webpack-env": "1.18.0",
|
|
33
|
-
"@
|
|
34
|
-
"
|
|
35
|
-
"@
|
|
36
|
-
"@rushstack/
|
|
37
|
-
"
|
|
38
|
-
"@rushstack/terminal": "0.7.20"
|
|
34
|
+
"@microsoft/rush-lib": "5.114.1",
|
|
35
|
+
"@rushstack/ts-command-line": "4.17.2",
|
|
36
|
+
"@rushstack/stream-collator": "4.1.29",
|
|
37
|
+
"@rushstack/heft": "0.65.2",
|
|
38
|
+
"local-node-rig": "1.0.0"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "heft build --clean",
|