@microsoft/rush 5.110.0 → 5.110.2

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/LICENSE CHANGED
@@ -1,24 +1,24 @@
1
- @microsoft/rush
2
-
3
- Copyright (c) Microsoft Corporation. All rights reserved.
4
-
5
- MIT License
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining
8
- a copy of this software and associated documentation files (the
9
- "Software"), to deal in the Software without restriction, including
10
- without limitation the rights to use, copy, modify, merge, publish,
11
- distribute, sublicense, and/or sell copies of the Software, and to
12
- permit persons to whom the Software is furnished to do so, subject to
13
- the following conditions:
14
-
15
- The above copyright notice and this permission notice shall be
16
- included in all copies or substantial portions of the Software.
17
-
18
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
22
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1
+ @microsoft/rush
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ MIT License
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining
8
+ a copy of this software and associated documentation files (the
9
+ "Software"), to deal in the Software without restriction, including
10
+ without limitation the rights to use, copy, modify, merge, publish,
11
+ distribute, sublicense, and/or sell copies of the Software, and to
12
+ permit persons to whom the Software is furnished to do so, subject to
13
+ the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be
16
+ included in all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
22
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24
24
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,77 +1,77 @@
1
- # @microsoft/rush
2
-
3
-
4
- ![rush](https://github.com/microsoft/rushstack/blob/main/common/wiki-images/rush-logo.png?raw=true)
5
- <br />
6
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; https://rushjs.io
7
-
8
- <!-- ------------------------------------------------------------------ -->
9
- <!-- Text below this line should stay in sync with the web site content -->
10
- <!-- ------------------------------------------------------------------ -->
11
-
12
- **Rush** makes life easier for JavaScript developers who build and publish many NPM packages at once. If you're looking to consolidate all your projects into a single repo, you came to the right place! Rush is a fast, professional solution for managing this scenario. It gives you:
13
-
14
- - **A single NPM install:** In one step, Rush installs all the dependencies for all your projects into a common folder. This is not just a "package.json" file at the root of your repo (which might set you up to accidentally `require()` a sibling's dependencies). Instead, Rush uses symlinks to reconstruct an accurate "node_modules" folder for each project, without any of the limitations or glitches that seem to plague other approaches.
15
-
16
- ⏵ **This algorithm supports the [PNPM, NPM, and Yarn](https://rushjs.io/pages/maintainer/package_managers/) package managers.**
17
-
18
- - **Automatic local linking:** Inside a Rush repo, all your projects are automatically symlinked to each other. When you make a change, you can see the downstream effects without publishing anything, and without any `npm link` headaches. If you don't want certain projects to get linked, that's supported, too.
19
-
20
- - **Fast builds:** Rush detects your dependency graph and builds your projects in the right order. If two packages don't directly depend on each other, Rush parallelizes their build as separate Node.js processes (and shows live console output in a [readable order](https://www.npmjs.com/package/@rushstack/stream-collator)). In practice this multi-process approach can yield more significant speedups than all those async functions in your single-threaded Gulpfile.
21
-
22
- - **Subset and incremental builds:** If you only plan to work with a few projects from your repo, `rush rebuild --to <project>` does a clean build of just your upstream dependencies. After you make changes, `rush rebuild --from <project>` does a clean build of only the affected downstream projects. And if your toolchain is [package-deps-hash](https://www.npmjs.com/package/@rushstack/package-deps-hash) enabled, `rush build` delivers a powerful cross-project incremental build (that also supports subset builds).
23
-
24
- - **Cyclic dependencies:** If you have hammers that build hammer-factory-factories, Rush has you covered! When a package indirectly depends on an older version of itself, projects in the cycle use the last published version, whereas other projects still get the latest bits.
25
-
26
- - **Bulk publishing:** When it's time to do a release, Rush can detect which packages have changes, automatically bump all the appropriate version numbers, and run `npm publish` in each folder. If you like, configure your server to automatically run `rush publish` every hour.
27
-
28
- - **Changelog tracking:** Whenever a PR is created, you can require developers to provide a major/minor/patch log entry for the affected projects. During publishing, these changes will be automatically aggregated into a nicely formatted [CHANGELOG.md](https://github.com/microsoft/rushstack/blob/main/libraries/node-core-library/CHANGELOG.md) file.
29
-
30
- - **Enterprise policies:** Want to review new libraries before developers add them to package.json, but avoid hassling people about already approved cases? Want to enforce that all your projects depend on the same library version numbers? Are unprofessional personal e-mail addresses accidentally showing up in your company's Git history? Rush can help maintain a consistent ecosystem when you've got many developers and many projects in the mix.
31
-
32
- - **Lots more!** Rush was created by the platform team for [Microsoft SharePoint](http://aka.ms/spfx). We build hundreds of production NPM packages every day, from internal and public Git repositories, for third party SDKs and live services with millions of users. If there's an important package management problem that needs solvin', it's likely to end up as a feature for Rush.
33
-
34
-
35
- # 3 Minute Demo
36
-
37
- See Rush in action! From your shell, install the tool like this:
38
- ```
39
- $ npm install -g @microsoft/rush
40
- ```
41
-
42
- For command-line help, do this:
43
- ```
44
- $ rush -h
45
- ```
46
-
47
- To see Rush build some real projects, try running these commands: :-)
48
- ```
49
- $ git clone https://github.com/microsoft/rushstack
50
- $ cd rushstack
51
- $ rush install
52
- $ rush install # <-- instantaneous!
53
- $ rush rebuild
54
- $ rush build # <-- instantaneous!
55
- ```
56
- _(If you don't have a GitHub account set up, you can use `rush install --bypass-policy`.)_
57
-
58
-
59
- <!-- ------------------------------------------------------------------ -->
60
- <!-- Text above this line should stay in sync with the web site content -->
61
- <!-- ------------------------------------------------------------------ -->
62
-
63
- ## Getting Started
64
-
65
- For more details and support resources, please visit: https://rushjs.io
66
-
67
- ## Links
68
-
69
- - [CHANGELOG.md](
70
- https://github.com/microsoft/rushstack/blob/main/apps/rush/CHANGELOG.md) - Find
71
- out what's new in the latest version
72
- - [UPGRADING.md](
73
- https://github.com/microsoft/rushstack/blob/main/apps/rush/UPGRADING.md) - Instructions
74
- for migrating existing projects to use a newer version of Rush
75
- - [API Reference](https://api.rushstack.io/pages/rush-lib/)
76
-
77
- Rush is part of the [Rush Stack](https://rushstack.io/) family of projects.
1
+ # @microsoft/rush
2
+
3
+
4
+ ![rush](https://github.com/microsoft/rushstack/blob/main/common/wiki-images/rush-logo.png?raw=true)
5
+ <br />
6
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; https://rushjs.io
7
+
8
+ <!-- ------------------------------------------------------------------ -->
9
+ <!-- Text below this line should stay in sync with the web site content -->
10
+ <!-- ------------------------------------------------------------------ -->
11
+
12
+ **Rush** makes life easier for JavaScript developers who build and publish many NPM packages at once. If you're looking to consolidate all your projects into a single repo, you came to the right place! Rush is a fast, professional solution for managing this scenario. It gives you:
13
+
14
+ - **A single NPM install:** In one step, Rush installs all the dependencies for all your projects into a common folder. This is not just a "package.json" file at the root of your repo (which might set you up to accidentally `require()` a sibling's dependencies). Instead, Rush uses symlinks to reconstruct an accurate "node_modules" folder for each project, without any of the limitations or glitches that seem to plague other approaches.
15
+
16
+ ⏵ **This algorithm supports the [PNPM, NPM, and Yarn](https://rushjs.io/pages/maintainer/package_managers/) package managers.**
17
+
18
+ - **Automatic local linking:** Inside a Rush repo, all your projects are automatically symlinked to each other. When you make a change, you can see the downstream effects without publishing anything, and without any `npm link` headaches. If you don't want certain projects to get linked, that's supported, too.
19
+
20
+ - **Fast builds:** Rush detects your dependency graph and builds your projects in the right order. If two packages don't directly depend on each other, Rush parallelizes their build as separate Node.js processes (and shows live console output in a [readable order](https://www.npmjs.com/package/@rushstack/stream-collator)). In practice this multi-process approach can yield more significant speedups than all those async functions in your single-threaded Gulpfile.
21
+
22
+ - **Subset and incremental builds:** If you only plan to work with a few projects from your repo, `rush rebuild --to <project>` does a clean build of just your upstream dependencies. After you make changes, `rush rebuild --from <project>` does a clean build of only the affected downstream projects. And if your toolchain is [package-deps-hash](https://www.npmjs.com/package/@rushstack/package-deps-hash) enabled, `rush build` delivers a powerful cross-project incremental build (that also supports subset builds).
23
+
24
+ - **Cyclic dependencies:** If you have hammers that build hammer-factory-factories, Rush has you covered! When a package indirectly depends on an older version of itself, projects in the cycle use the last published version, whereas other projects still get the latest bits.
25
+
26
+ - **Bulk publishing:** When it's time to do a release, Rush can detect which packages have changes, automatically bump all the appropriate version numbers, and run `npm publish` in each folder. If you like, configure your server to automatically run `rush publish` every hour.
27
+
28
+ - **Changelog tracking:** Whenever a PR is created, you can require developers to provide a major/minor/patch log entry for the affected projects. During publishing, these changes will be automatically aggregated into a nicely formatted [CHANGELOG.md](https://github.com/microsoft/rushstack/blob/main/libraries/node-core-library/CHANGELOG.md) file.
29
+
30
+ - **Enterprise policies:** Want to review new libraries before developers add them to package.json, but avoid hassling people about already approved cases? Want to enforce that all your projects depend on the same library version numbers? Are unprofessional personal e-mail addresses accidentally showing up in your company's Git history? Rush can help maintain a consistent ecosystem when you've got many developers and many projects in the mix.
31
+
32
+ - **Lots more!** Rush was created by the platform team for [Microsoft SharePoint](http://aka.ms/spfx). We build hundreds of production NPM packages every day, from internal and public Git repositories, for third party SDKs and live services with millions of users. If there's an important package management problem that needs solvin', it's likely to end up as a feature for Rush.
33
+
34
+
35
+ # 3 Minute Demo
36
+
37
+ See Rush in action! From your shell, install the tool like this:
38
+ ```
39
+ $ npm install -g @microsoft/rush
40
+ ```
41
+
42
+ For command-line help, do this:
43
+ ```
44
+ $ rush -h
45
+ ```
46
+
47
+ To see Rush build some real projects, try running these commands: :-)
48
+ ```
49
+ $ git clone https://github.com/microsoft/rushstack
50
+ $ cd rushstack
51
+ $ rush install
52
+ $ rush install # <-- instantaneous!
53
+ $ rush rebuild
54
+ $ rush build # <-- instantaneous!
55
+ ```
56
+ _(If you don't have a GitHub account set up, you can use `rush install --bypass-policy`.)_
57
+
58
+
59
+ <!-- ------------------------------------------------------------------ -->
60
+ <!-- Text above this line should stay in sync with the web site content -->
61
+ <!-- ------------------------------------------------------------------ -->
62
+
63
+ ## Getting Started
64
+
65
+ For more details and support resources, please visit: https://rushjs.io
66
+
67
+ ## Links
68
+
69
+ - [CHANGELOG.md](
70
+ https://github.com/microsoft/rushstack/blob/main/apps/rush/CHANGELOG.md) - Find
71
+ out what's new in the latest version
72
+ - [UPGRADING.md](
73
+ https://github.com/microsoft/rushstack/blob/main/apps/rush/UPGRADING.md) - Instructions
74
+ for migrating existing projects to use a newer version of Rush
75
+ - [API Reference](https://api.rushstack.io/pages/rush-lib/)
76
+
77
+ Rush is part of the [Rush Stack](https://rushstack.io/) family of projects.
package/bin/rush CHANGED
@@ -1,2 +1,2 @@
1
- #!/usr/bin/env node
2
- require('../lib/start.js');
1
+ #!/usr/bin/env node
2
+ require('../lib/start.js');
package/bin/rush-pnpm CHANGED
@@ -1,2 +1,2 @@
1
- #!/usr/bin/env node
2
- require('../lib/start.js');
1
+ #!/usr/bin/env node
2
+ require('../lib/start.js');
package/bin/rushx CHANGED
@@ -1,2 +1,2 @@
1
- #!/usr/bin/env node
2
- require('../lib/start.js');
1
+ #!/usr/bin/env node
2
+ require('../lib/start.js');
@@ -1 +1 @@
1
- {"version":3,"file":"MinimalRushConfiguration.js","sourceRoot":"","sources":["../src/MinimalRushConfiguration.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,2CAA6B;AAE7B,oEAAwD;AACxD,kDAAwD;AACxD,+EAA4E;AAC5E,6FAA0F;AAO1F;;;GAGG;AACH,MAAa,wBAAwB;IAInC,YAAoB,4BAA2D,EAAE,gBAAwB;QACvG,IAAI,CAAC,YAAY;YACf,4BAA4B,CAAC,WAAW,IAAI,4BAA4B,CAAC,kBAAkB,CAAC;QAC9F,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,IAAI,CACtC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAC9B,6BAAa,CAAC,gBAAgB,EAC9B,QAAQ,EACR,MAAM,CACP,CAAC;IACJ,CAAC;IAEM,MAAM,CAAC,uBAAuB;QACnC,MAAM,gBAAgB,GAAuB,4BAAiB,CAAC,uBAAuB,CAAC;YACrF,WAAW,EAAE,CAAC,6CAAqB,CAAC,2BAA2B,EAAE;SAClE,CAAC,CAAC;QACH,IAAI,gBAAgB,EAAE;YACpB,OAAO,wBAAwB,CAAC,0BAA0B,CAAC,gBAAgB,CAAC,CAAC;SAC9E;aAAM;YACL,OAAO,SAAS,CAAC;SAClB;IACH,CAAC;IAEO,MAAM,CAAC,0BAA0B,CAAC,gBAAwB;QAChE,IAAI;YACF,MAAM,4BAA4B,GAAkC,4BAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACpG,OAAO,IAAI,wBAAwB,CAAC,4BAA4B,EAAE,gBAAgB,CAAC,CAAC;SACrF;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,SAAS,CAAC;SAClB;IACH,CAAC;IAED;;;;OAIG;IACH,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED;;;;;;;OAOG;IACH,IAAW,sBAAsB;QAC/B,OAAO,IAAI,CAAC,uBAAuB,CAAC;IACtC,CAAC;CACF;AAvDD,4DAuDC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport * as path from 'path';\r\n\r\nimport { JsonFile } from '@rushstack/node-core-library';\r\nimport { RushConfiguration } from '@microsoft/rush-lib';\r\nimport { RushConstants } from '@microsoft/rush-lib/lib/logic/RushConstants';\r\nimport { RushCommandLineParser } from '@microsoft/rush-lib/lib/cli/RushCommandLineParser';\r\n\r\ninterface IMinimalRushConfigurationJson {\r\n rushMinimumVersion: string;\r\n rushVersion?: string;\r\n}\r\n\r\n/**\r\n * Represents a minimal subset of the rush.json configuration file. It provides the information necessary to\r\n * decide which version of Rush should be installed/used.\r\n */\r\nexport class MinimalRushConfiguration {\r\n private _rushVersion: string;\r\n private _commonRushConfigFolder: string;\r\n\r\n private constructor(minimalRushConfigurationJson: IMinimalRushConfigurationJson, rushJsonFilename: string) {\r\n this._rushVersion =\r\n minimalRushConfigurationJson.rushVersion || minimalRushConfigurationJson.rushMinimumVersion;\r\n this._commonRushConfigFolder = path.join(\r\n path.dirname(rushJsonFilename),\r\n RushConstants.commonFolderName,\r\n 'config',\r\n 'rush'\r\n );\r\n }\r\n\r\n public static loadFromDefaultLocation(): MinimalRushConfiguration | undefined {\r\n const rushJsonLocation: string | undefined = RushConfiguration.tryFindRushJsonLocation({\r\n showVerbose: !RushCommandLineParser.shouldRestrictConsoleOutput()\r\n });\r\n if (rushJsonLocation) {\r\n return MinimalRushConfiguration._loadFromConfigurationFile(rushJsonLocation);\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n private static _loadFromConfigurationFile(rushJsonFilename: string): MinimalRushConfiguration | undefined {\r\n try {\r\n const minimalRushConfigurationJson: IMinimalRushConfigurationJson = JsonFile.load(rushJsonFilename);\r\n return new MinimalRushConfiguration(minimalRushConfigurationJson, rushJsonFilename);\r\n } catch (e) {\r\n return undefined;\r\n }\r\n }\r\n\r\n /**\r\n * The version of rush specified by the rushVersion property of the rush.json configuration file. If the\r\n * rushVersion property is not specified, this falls back to the rushMinimumVersion property. This should be\r\n * a semver style version number like \"4.0.0\"\r\n */\r\n public get rushVersion(): string {\r\n return this._rushVersion;\r\n }\r\n\r\n /**\r\n * The folder where Rush's additional config files are stored. This folder is always a\r\n * subfolder called \"config\\rush\" inside the common folder. (The \"common\\config\" folder\r\n * is reserved for configuration files used by other tools.) To avoid confusion or mistakes,\r\n * Rush will report an error if this this folder contains any unrecognized files.\r\n *\r\n * Example: \"C:\\MyRepo\\common\\config\\rush\"\r\n */\r\n public get commonRushConfigFolder(): string {\r\n return this._commonRushConfigFolder;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"MinimalRushConfiguration.js","sourceRoot":"","sources":["../src/MinimalRushConfiguration.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,2CAA6B;AAE7B,oEAAwD;AACxD,kDAAwD;AACxD,+EAA4E;AAC5E,6FAA0F;AAO1F;;;GAGG;AACH,MAAa,wBAAwB;IAInC,YAAoB,4BAA2D,EAAE,gBAAwB;QACvG,IAAI,CAAC,YAAY;YACf,4BAA4B,CAAC,WAAW,IAAI,4BAA4B,CAAC,kBAAkB,CAAC;QAC9F,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,IAAI,CACtC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAC9B,6BAAa,CAAC,gBAAgB,EAC9B,QAAQ,EACR,MAAM,CACP,CAAC;IACJ,CAAC;IAEM,MAAM,CAAC,uBAAuB;QACnC,MAAM,gBAAgB,GAAuB,4BAAiB,CAAC,uBAAuB,CAAC;YACrF,WAAW,EAAE,CAAC,6CAAqB,CAAC,2BAA2B,EAAE;SAClE,CAAC,CAAC;QACH,IAAI,gBAAgB,EAAE;YACpB,OAAO,wBAAwB,CAAC,0BAA0B,CAAC,gBAAgB,CAAC,CAAC;SAC9E;aAAM;YACL,OAAO,SAAS,CAAC;SAClB;IACH,CAAC;IAEO,MAAM,CAAC,0BAA0B,CAAC,gBAAwB;QAChE,IAAI;YACF,MAAM,4BAA4B,GAAkC,4BAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACpG,OAAO,IAAI,wBAAwB,CAAC,4BAA4B,EAAE,gBAAgB,CAAC,CAAC;SACrF;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,SAAS,CAAC;SAClB;IACH,CAAC;IAED;;;;OAIG;IACH,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED;;;;;;;OAOG;IACH,IAAW,sBAAsB;QAC/B,OAAO,IAAI,CAAC,uBAAuB,CAAC;IACtC,CAAC;CACF;AAvDD,4DAuDC","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';\n\nimport { JsonFile } from '@rushstack/node-core-library';\nimport { RushConfiguration } from '@microsoft/rush-lib';\nimport { RushConstants } from '@microsoft/rush-lib/lib/logic/RushConstants';\nimport { RushCommandLineParser } from '@microsoft/rush-lib/lib/cli/RushCommandLineParser';\n\ninterface IMinimalRushConfigurationJson {\n rushMinimumVersion: string;\n rushVersion?: string;\n}\n\n/**\n * Represents a minimal subset of the rush.json configuration file. It provides the information necessary to\n * decide which version of Rush should be installed/used.\n */\nexport class MinimalRushConfiguration {\n private _rushVersion: string;\n private _commonRushConfigFolder: string;\n\n private constructor(minimalRushConfigurationJson: IMinimalRushConfigurationJson, rushJsonFilename: string) {\n this._rushVersion =\n minimalRushConfigurationJson.rushVersion || minimalRushConfigurationJson.rushMinimumVersion;\n this._commonRushConfigFolder = path.join(\n path.dirname(rushJsonFilename),\n RushConstants.commonFolderName,\n 'config',\n 'rush'\n );\n }\n\n public static loadFromDefaultLocation(): MinimalRushConfiguration | undefined {\n const rushJsonLocation: string | undefined = RushConfiguration.tryFindRushJsonLocation({\n showVerbose: !RushCommandLineParser.shouldRestrictConsoleOutput()\n });\n if (rushJsonLocation) {\n return MinimalRushConfiguration._loadFromConfigurationFile(rushJsonLocation);\n } else {\n return undefined;\n }\n }\n\n private static _loadFromConfigurationFile(rushJsonFilename: string): MinimalRushConfiguration | undefined {\n try {\n const minimalRushConfigurationJson: IMinimalRushConfigurationJson = JsonFile.load(rushJsonFilename);\n return new MinimalRushConfiguration(minimalRushConfigurationJson, rushJsonFilename);\n } catch (e) {\n return undefined;\n }\n }\n\n /**\n * The version of rush specified by the rushVersion property of the rush.json configuration file. If the\n * rushVersion property is not specified, this falls back to the rushMinimumVersion property. This should be\n * a semver style version number like \"4.0.0\"\n */\n public get rushVersion(): string {\n return this._rushVersion;\n }\n\n /**\n * The folder where Rush's additional config files are stored. This folder is always a\n * subfolder called \"config\\rush\" inside the common folder. (The \"common\\config\" folder\n * is reserved for configuration files used by other tools.) To avoid confusion or mistakes,\n * Rush will report an error if this this folder contains any unrecognized files.\n *\n * Example: \"C:\\MyRepo\\common\\config\\rush\"\n */\n public get commonRushConfigFolder(): string {\n return this._commonRushConfigFolder;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RushCommandSelector.js","sourceRoot":"","sources":["../src/RushCommandSelector.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,uDAAiC;AACjC,2CAA6B;AAK7B;;;;;;GAMG;AACH,MAAa,mBAAmB;IACvB,MAAM,CAAC,sBAAsB,CAAC,OAAe;QAClD,MAAM,WAAW,GAAgB,mBAAmB,CAAC,eAAe,EAAE,CAAC;QACvE,IAAI,WAAW,KAAK,MAAM,IAAI,WAAW,KAAK,SAAS,EAAE;YACvD,mBAAmB,CAAC,cAAc,CAChC,yCAAyC,OAAO,+BAA+B,WAAW,UAAU,CACrG,CAAC;SACH;IACH,CAAC;IAEM,MAAM,CAAC,OAAO,CACnB,eAAuB;IACvB,8DAA8D;IAC9D,eAAoB,EACpB,OAA+B;QAE/B,MAAM,IAAI,GAAwB,eAAe,CAAC,IAAI,CAAC;QAEvD,IAAI,CAAC,IAAI,EAAE;YACT,2EAA2E;YAC3E,mBAAmB,CAAC,cAA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;YACD,IAAI,QAAQ,KAAK,WAAW,EAAE;gBAC5B,OAAO,WAAW,CAAC;aACpB;YACD,IAAI,QAAQ,KAAK,OAAO,EAAE;gBACxB,OAAO,OAAO,CAAC;aAChB;SACF;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAxED,kDAwEC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport colors from 'colors/safe';\r\nimport * as path from 'path';\r\nimport type * as rushLib from '@microsoft/rush-lib';\r\n\r\ntype CommandName = 'rush' | 'rush-pnpm' | 'rushx' | undefined;\r\n\r\n/**\r\n * Both \"rush\" and \"rushx\" share the same src/start.ts entry point. This makes it\r\n * a little easier for them to share all the same startup checks and version selector\r\n * logic. RushCommandSelector looks at argv to determine whether we're doing \"rush\"\r\n * or \"rushx\" behavior, and then invokes the appropriate entry point in the selected\r\n * @microsoft/rush-lib.\r\n */\r\nexport class RushCommandSelector {\r\n public static failIfNotInvokedAsRush(version: string): void {\r\n const commandName: CommandName = RushCommandSelector._getCommandName();\r\n if (commandName !== 'rush' && commandName !== undefined) {\r\n RushCommandSelector._failWithError(\r\n `This repository is using Rush version ${version} which does not support the ${commandName} command`\r\n );\r\n }\r\n }\r\n\r\n public static execute(\r\n launcherVersion: string,\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n selectedRushLib: any,\r\n options: rushLib.ILaunchOptions\r\n ): void {\r\n const Rush: typeof rushLib.Rush = selectedRushLib.Rush;\r\n\r\n if (!Rush) {\r\n // This should be impossible unless we somehow loaded an unexpected version\r\n RushCommandSelector._failWithError(`Unable to find the \"Rush\" entry point in @microsoft/rush-lib`);\r\n }\r\n\r\n const commandName: CommandName = RushCommandSelector._getCommandName();\r\n\r\n if (commandName === 'rush-pnpm') {\r\n if (!Rush.launchRushPnpm) {\r\n RushCommandSelector._failWithError(\r\n `This repository is using Rush version ${Rush.version}` +\r\n ` which does not support the \"rush-pnpm\" command`\r\n );\r\n }\r\n Rush.launchRushPnpm(launcherVersion, {\r\n isManaged: options.isManaged,\r\n alreadyReportedNodeTooNewError: options.alreadyReportedNodeTooNewError\r\n });\r\n } else if (commandName === 'rushx') {\r\n if (!Rush.launchRushX) {\r\n RushCommandSelector._failWithError(\r\n `This repository is using Rush version ${Rush.version}` +\r\n ` which does not support the \"rushx\" command`\r\n );\r\n }\r\n Rush.launchRushX(launcherVersion, options);\r\n } else {\r\n Rush.launch(launcherVersion, options);\r\n }\r\n }\r\n\r\n private static _failWithError(message: string): never {\r\n console.log(colors.red(message));\r\n return process.exit(1);\r\n }\r\n\r\n private static _getCommandName(): CommandName {\r\n if (process.argv.length >= 2) {\r\n // Example:\r\n // argv[0]: \"C:\\\\Program Files\\\\nodejs\\\\node.exe\"\r\n // argv[1]: \"C:\\\\Program Files\\\\nodejs\\\\node_modules\\\\@microsoft\\\\rush\\\\bin\\\\rushx\"\r\n const basename: string = path.basename(process.argv[1]).toUpperCase();\r\n if (basename === 'RUSH') {\r\n return 'rush';\r\n }\r\n if (basename === 'RUSH-PNPM') {\r\n return 'rush-pnpm';\r\n }\r\n if (basename === 'RUSHX') {\r\n return 'rushx';\r\n }\r\n }\r\n return undefined;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"RushCommandSelector.js","sourceRoot":"","sources":["../src/RushCommandSelector.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,uDAAiC;AACjC,2CAA6B;AAK7B;;;;;;GAMG;AACH,MAAa,mBAAmB;IACvB,MAAM,CAAC,sBAAsB,CAAC,OAAe;QAClD,MAAM,WAAW,GAAgB,mBAAmB,CAAC,eAAe,EAAE,CAAC;QACvE,IAAI,WAAW,KAAK,MAAM,IAAI,WAAW,KAAK,SAAS,EAAE;YACvD,mBAAmB,CAAC,cAAc,CAChC,yCAAyC,OAAO,+BAA+B,WAAW,UAAU,CACrG,CAAC;SACH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;YACX,iDAAiD;YACjD,mFAAmF;YACnF,MAAM,QAAQ,GAAW,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;YACtE,IAAI,QAAQ,KAAK,MAAM,EAAE;gBACvB,OAAO,MAAM,CAAC;aACf;YACD,IAAI,QAAQ,KAAK,WAAW,EAAE;gBAC5B,OAAO,WAAW,CAAC;aACpB;YACD,IAAI,QAAQ,KAAK,OAAO,EAAE;gBACxB,OAAO,OAAO,CAAC;aAChB;SACF;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAxED,kDAwEC","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 colors from 'colors/safe';\nimport * as path from 'path';\nimport type * as rushLib from '@microsoft/rush-lib';\n\ntype CommandName = 'rush' | 'rush-pnpm' | 'rushx' | undefined;\n\n/**\n * Both \"rush\" and \"rushx\" share the same src/start.ts entry point. This makes it\n * a little easier for them to share all the same startup checks and version selector\n * logic. RushCommandSelector looks at argv to determine whether we're doing \"rush\"\n * or \"rushx\" behavior, and then invokes the appropriate entry point in the selected\n * @microsoft/rush-lib.\n */\nexport class RushCommandSelector {\n public static failIfNotInvokedAsRush(version: string): void {\n const commandName: CommandName = RushCommandSelector._getCommandName();\n if (commandName !== 'rush' && commandName !== undefined) {\n RushCommandSelector._failWithError(\n `This repository is using Rush version ${version} which does not support the ${commandName} command`\n );\n }\n }\n\n public static execute(\n launcherVersion: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n selectedRushLib: any,\n options: rushLib.ILaunchOptions\n ): void {\n const Rush: typeof rushLib.Rush = selectedRushLib.Rush;\n\n if (!Rush) {\n // This should be impossible unless we somehow loaded an unexpected version\n RushCommandSelector._failWithError(`Unable to find the \"Rush\" entry point in @microsoft/rush-lib`);\n }\n\n const commandName: CommandName = RushCommandSelector._getCommandName();\n\n if (commandName === 'rush-pnpm') {\n if (!Rush.launchRushPnpm) {\n RushCommandSelector._failWithError(\n `This repository is using Rush version ${Rush.version}` +\n ` which does not support the \"rush-pnpm\" command`\n );\n }\n Rush.launchRushPnpm(launcherVersion, {\n isManaged: options.isManaged,\n alreadyReportedNodeTooNewError: options.alreadyReportedNodeTooNewError\n });\n } else if (commandName === 'rushx') {\n if (!Rush.launchRushX) {\n RushCommandSelector._failWithError(\n `This repository is using Rush version ${Rush.version}` +\n ` which does not support the \"rushx\" command`\n );\n }\n Rush.launchRushX(launcherVersion, options);\n } else {\n Rush.launch(launcherVersion, options);\n }\n }\n\n private static _failWithError(message: string): never {\n console.log(colors.red(message));\n return process.exit(1);\n }\n\n private static _getCommandName(): CommandName {\n if (process.argv.length >= 2) {\n // Example:\n // argv[0]: \"C:\\\\Program Files\\\\nodejs\\\\node.exe\"\n // argv[1]: \"C:\\\\Program Files\\\\nodejs\\\\node_modules\\\\@microsoft\\\\rush\\\\bin\\\\rushx\"\n const basename: string = path.basename(process.argv[1]).toUpperCase();\n if (basename === 'RUSH') {\n return 'rush';\n }\n if (basename === 'RUSH-PNPM') {\n return 'rush-pnpm';\n }\n if (basename === 'RUSHX') {\n return 'rushx';\n }\n }\n return undefined;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RushVersionSelector.js","sourceRoot":"","sources":["../src/RushVersionSelector.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,2CAA6B;AAC7B,+CAAiC;AAEjC,oEAAwD;AACxD,2EAAwE;AACxE,kDAA+F;AAE/F,+DAA4D;AAG5D,MAAM,oBAAoB,GAAW,CAAC,CAAC;AAEvC,MAAa,mBAAmB;IAI9B,YAAmB,qBAA6B;QAC9C,IAAI,CAAC,iBAAiB,GAAG,IAAI,4BAAiB,EAAE,CAAC;QACjD,IAAI,CAAC,sBAAsB,GAAG,qBAAqB,CAAC;IACtD,CAAC;IAEM,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C,CAAC,CAAC,SAAS;oBACxF,cAAc,EAAE,IAAI;iBACrB,CAAC,CAAC;gBAEH,OAAO,CAAC,GAAG,CAAC,uCAAuC,OAAO,OAAO,gBAAgB,GAAG,CAAC,CAAC;gBAEtF,+DAA+D;gBAC/D,aAAa,CAAC,MAAM,EAAE,CAAC;gBAEvB,IAAI,CAAC,OAAO,EAAE,CAAC;aAChB;SACF;QAED,IAAI,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE;YAChC,0FAA0F;YAC1F,6CAA6C;YAC7C,yCAAmB,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;YACpD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;SAC3F;aAAM,IAAI,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE;YACtC,0FAA0F;YAC1F,6CAA6C;YAC7C,yCAAmB,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;YACpD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;SAC5F;aAAM;YACL,uFAAuF;YACvF,MAAM,iBAAiB,GAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAC7C,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,KAAK,EACL,OAAO,CACR,CAAC,CAAC;YACH,yCAAmB,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,iBAAiB,EAAE,cAAc,CAAC,CAAC;SAC7F;IACH,CAAC;CACF;AAjFD,kDAiFC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport * as path from 'path';\r\nimport * as semver from 'semver';\r\n\r\nimport { LockFile } from '@rushstack/node-core-library';\r\nimport { Utilities } from '@microsoft/rush-lib/lib/utilities/Utilities';\r\nimport { _LastInstallFlag, _RushGlobalFolder, type ILaunchOptions } from '@microsoft/rush-lib';\r\n\r\nimport { RushCommandSelector } from './RushCommandSelector';\r\nimport type { MinimalRushConfiguration } from './MinimalRushConfiguration';\r\n\r\nconst MAX_INSTALL_ATTEMPTS: number = 3;\r\n\r\nexport class RushVersionSelector {\r\n private _rushGlobalFolder: _RushGlobalFolder;\r\n private _currentPackageVersion: string;\r\n\r\n public constructor(currentPackageVersion: string) {\r\n this._rushGlobalFolder = new _RushGlobalFolder();\r\n this._currentPackageVersion = currentPackageVersion;\r\n }\r\n\r\n public async ensureRushVersionInstalledAsync(\r\n version: string,\r\n configuration: MinimalRushConfiguration | undefined,\r\n executeOptions: ILaunchOptions\r\n ): Promise<void> {\r\n const isLegacyRushVersion: boolean = semver.lt(version, '4.0.0');\r\n const expectedRushPath: string = path.join(this._rushGlobalFolder.nodeSpecificPath, `rush-${version}`);\r\n\r\n const installMarker: _LastInstallFlag = new _LastInstallFlag(expectedRushPath, {\r\n node: process.versions.node\r\n });\r\n\r\n if (!installMarker.isValid()) {\r\n // Need to install Rush\r\n console.log(`Rush version ${version} is not currently installed. Installing...`);\r\n\r\n const resourceName: string = `rush-${version}`;\r\n\r\n console.log(`Trying to acquire lock for ${resourceName}`);\r\n\r\n const lock: LockFile = await LockFile.acquire(expectedRushPath, resourceName);\r\n if (installMarker.isValid()) {\r\n console.log('Another process performed the installation.');\r\n } else {\r\n Utilities.installPackageInDirectory({\r\n directory: expectedRushPath,\r\n packageName: isLegacyRushVersion ? '@microsoft/rush' : '@microsoft/rush-lib',\r\n version: version,\r\n tempPackageTitle: 'rush-local-install',\r\n maxInstallAttempts: MAX_INSTALL_ATTEMPTS,\r\n // This is using a local configuration to install a package in a shared global location.\r\n // Generally that's a bad practice, but in this case if we can successfully install\r\n // the package at all, we can reasonably assume it's good for all the repositories.\r\n // In particular, we'll assume that two different NPM registries cannot have two\r\n // different implementations of the same version of the same package.\r\n // This was needed for: https://github.com/microsoft/rushstack/issues/691\r\n commonRushConfigFolder: configuration ? configuration.commonRushConfigFolder : undefined,\r\n suppressOutput: true\r\n });\r\n\r\n console.log(`Successfully installed Rush version ${version} in ${expectedRushPath}.`);\r\n\r\n // If we've made it here without exception, write the flag file\r\n installMarker.create();\r\n\r\n lock.release();\r\n }\r\n }\r\n\r\n if (semver.lt(version, '3.0.20')) {\r\n // In old versions, requiring the entry point invoked the command-line parser immediately,\r\n // so fail if \"rushx\" or \"rush-pnpm\" was used\r\n RushCommandSelector.failIfNotInvokedAsRush(version);\r\n require(path.join(expectedRushPath, 'node_modules', '@microsoft', 'rush', 'lib', 'rush'));\r\n } else if (semver.lt(version, '4.0.0')) {\r\n // In old versions, requiring the entry point invoked the command-line parser immediately,\r\n // so fail if \"rushx\" or \"rush-pnpm\" was used\r\n RushCommandSelector.failIfNotInvokedAsRush(version);\r\n require(path.join(expectedRushPath, 'node_modules', '@microsoft', 'rush', 'lib', 'start'));\r\n } else {\r\n // For newer rush-lib, RushCommandSelector can test whether \"rushx\" is supported or not\r\n const rushCliEntrypoint: {} = require(path.join(\r\n expectedRushPath,\r\n 'node_modules',\r\n '@microsoft',\r\n 'rush-lib',\r\n 'lib',\r\n 'index'\r\n ));\r\n RushCommandSelector.execute(this._currentPackageVersion, rushCliEntrypoint, executeOptions);\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"RushVersionSelector.js","sourceRoot":"","sources":["../src/RushVersionSelector.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,2CAA6B;AAC7B,+CAAiC;AAEjC,oEAAwD;AACxD,2EAAwE;AACxE,kDAA+F;AAE/F,+DAA4D;AAG5D,MAAM,oBAAoB,GAAW,CAAC,CAAC;AAEvC,MAAa,mBAAmB;IAI9B,YAAmB,qBAA6B;QAC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FC","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 * as semver from 'semver';\n\nimport { LockFile } from '@rushstack/node-core-library';\nimport { Utilities } from '@microsoft/rush-lib/lib/utilities/Utilities';\nimport { _LastInstallFlag, _RushGlobalFolder, type ILaunchOptions } from '@microsoft/rush-lib';\n\nimport { RushCommandSelector } from './RushCommandSelector';\nimport type { MinimalRushConfiguration } from './MinimalRushConfiguration';\n\nconst MAX_INSTALL_ATTEMPTS: number = 3;\n\nexport class RushVersionSelector {\n private _rushGlobalFolder: _RushGlobalFolder;\n private _currentPackageVersion: string;\n\n public constructor(currentPackageVersion: string) {\n this._rushGlobalFolder = new _RushGlobalFolder();\n this._currentPackageVersion = currentPackageVersion;\n }\n\n public async ensureRushVersionInstalledAsync(\n version: string,\n configuration: MinimalRushConfiguration | undefined,\n executeOptions: ILaunchOptions\n ): Promise<void> {\n const isLegacyRushVersion: boolean = semver.lt(version, '4.0.0');\n const expectedRushPath: string = path.join(this._rushGlobalFolder.nodeSpecificPath, `rush-${version}`);\n\n const installMarker: _LastInstallFlag = new _LastInstallFlag(expectedRushPath, {\n node: process.versions.node\n });\n\n if (!installMarker.isValid()) {\n // Need to install Rush\n console.log(`Rush version ${version} is not currently installed. Installing...`);\n\n const resourceName: string = `rush-${version}`;\n\n console.log(`Trying to acquire lock for ${resourceName}`);\n\n const lock: LockFile = await LockFile.acquire(expectedRushPath, resourceName);\n if (installMarker.isValid()) {\n console.log('Another process performed the installation.');\n } else {\n Utilities.installPackageInDirectory({\n directory: expectedRushPath,\n packageName: isLegacyRushVersion ? '@microsoft/rush' : '@microsoft/rush-lib',\n version: version,\n tempPackageTitle: 'rush-local-install',\n maxInstallAttempts: MAX_INSTALL_ATTEMPTS,\n // This is using a local configuration to install a package in a shared global location.\n // Generally that's a bad practice, but in this case if we can successfully install\n // the package at all, we can reasonably assume it's good for all the repositories.\n // In particular, we'll assume that two different NPM registries cannot have two\n // different implementations of the same version of the same package.\n // This was needed for: https://github.com/microsoft/rushstack/issues/691\n commonRushConfigFolder: configuration ? configuration.commonRushConfigFolder : undefined,\n suppressOutput: true\n });\n\n console.log(`Successfully installed Rush version ${version} in ${expectedRushPath}.`);\n\n // If we've made it here without exception, write the flag file\n installMarker.create();\n\n lock.release();\n }\n }\n\n if (semver.lt(version, '3.0.20')) {\n // In old versions, requiring the entry point invoked the command-line parser immediately,\n // so fail if \"rushx\" or \"rush-pnpm\" was used\n RushCommandSelector.failIfNotInvokedAsRush(version);\n require(path.join(expectedRushPath, 'node_modules', '@microsoft', 'rush', 'lib', 'rush'));\n } else if (semver.lt(version, '4.0.0')) {\n // In old versions, requiring the entry point invoked the command-line parser immediately,\n // so fail if \"rushx\" or \"rush-pnpm\" was used\n RushCommandSelector.failIfNotInvokedAsRush(version);\n require(path.join(expectedRushPath, 'node_modules', '@microsoft', 'rush', 'lib', 'start'));\n } else {\n // For newer rush-lib, RushCommandSelector can test whether \"rushx\" is supported or not\n const rushCliEntrypoint: {} = require(path.join(\n expectedRushPath,\n 'node_modules',\n '@microsoft',\n 'rush-lib',\n 'lib',\n 'index'\n ));\n RushCommandSelector.execute(this._currentPackageVersion, rushCliEntrypoint, executeOptions);\n }\n }\n}\n"]}
package/lib/start.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"start.js","sourceRoot":"","sources":["../src/start.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3D,+FAA+F;AAC/F,gGAAgG;AAChG,yFAAyF;AACzF,oCAAoC;AACpC,2FAAwF;AAExF,IAAI,yCAAmB,CAAC,gCAAgC,EAAE,EAAE;IAC1D,+FAA+F;IAC/F,kFAAkF;IAClF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CACjB;AAED,MAAM,8BAA8B,GAAY,yCAAmB,CAAC,sBAAsB,CAAC;IACzF,SAAS,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,CAAC,IAAI,EAAE,EAAE,CAAC,cAAM,CAAC,KAAK,CAAC,cAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACtF;KAAM,IAAI,aAAa,EAAE;IACxB,iBAAiB,GAAG,aAAa,CAAC,WAAW,CAAC;CAC/C;AAED,gGAAgG;AAChG,iBAAiB;AACjB,IAAI,iBAAiB,IAAI,MAAM,CAAC,EAAE,CAAC,iBAAiB,EAAE,cAAc,CAAC,EAAE;IACrE,OAAO,OAAO,CAAC,GAAG,CAAC,mCAAwB,CAAC,oBAAoB,CAAC,CAAC;CACnE;AAED,wFAAwF;AACxF,MAAM,SAAS,GAAY,CAAC,CAAC,aAAa,CAAC;AAE3C,MAAM,gBAAgB,GAAsB,IAAI,2CAAuB,EAAE,CAAC;AAE1E,MAAM,aAAa,GAA2B,EAAE,SAAS,EAAE,8BAA8B,EAAE,gBAAgB,EAAE,CAAC;AAE9G,6GAA6G;AAC7G,aAAa;AACb,IAAI,iBAAiB,IAAI,iBAAiB,KAAK,qBAAqB,EAAE;IACpE,MAAM,eAAe,GAAwB,IAAI,yCAAmB,CAAC,qBAAqB,CAAC,CAAC;IAC5F,eAAe;SACZ,+BAA+B,CAAC,iBAAiB,EAAE,aAAa,EAAE,aAAa,CAAC;SAChF,KAAK,CAAC,CAAC,KAAY,EAAE,EAAE;QACtB,OAAO,CAAC,GAAG,CAAC,cAAM,CAAC,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;CACN;KAAM;IACL,iEAAiE;IACjE,yCAAmB,CAAC,OAAO,CAAC,qBAAqB,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;CAC5E","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\n// We're using a path-based import here to minimize the amount of code that is evaluated before\r\n// we check to see if the Node.js version is too old. If, for whatever reason, Rush crashes with\r\n// an old Node.js version when evaluating one of the more complex imports, we'll at least\r\n// shown a meaningful error message.\r\nimport { NodeJsCompatibility } from '@microsoft/rush-lib/lib/logic/NodeJsCompatibility';\r\n\r\nif (NodeJsCompatibility.reportAncientIncompatibleVersion()) {\r\n // The Node.js version is known to have serious incompatibilities. In that situation, the user\r\n // should downgrade Rush to an older release that supported their Node.js version.\r\n process.exit(1);\r\n}\r\n\r\nconst alreadyReportedNodeTooNewError: boolean = NodeJsCompatibility.warnAboutVersionTooNew({\r\n isRushLib: false,\r\n alreadyReportedNodeTooNewError: false\r\n});\r\n\r\nimport colors from 'colors/safe';\r\nimport * as os from 'os';\r\nimport * as semver from 'semver';\r\n\r\nimport {\r\n ConsoleTerminalProvider,\r\n Text,\r\n PackageJsonLookup,\r\n type ITerminalProvider\r\n} from '@rushstack/node-core-library';\r\nimport { EnvironmentVariableNames } from '@microsoft/rush-lib';\r\nimport * as rushLib from '@microsoft/rush-lib';\r\n\r\nimport { RushCommandSelector } from './RushCommandSelector';\r\nimport { RushVersionSelector } from './RushVersionSelector';\r\nimport { MinimalRushConfiguration } from './MinimalRushConfiguration';\r\n\r\n// Load the configuration\r\nconst configuration: MinimalRushConfiguration | undefined =\r\n MinimalRushConfiguration.loadFromDefaultLocation();\r\n\r\nconst currentPackageVersion: string = PackageJsonLookup.loadOwnPackageJson(__dirname).version;\r\n\r\nlet rushVersionToLoad: string | undefined = undefined;\r\n\r\nconst previewVersion: string | undefined = process.env[EnvironmentVariableNames.RUSH_PREVIEW_VERSION];\r\n\r\nif (previewVersion) {\r\n if (!semver.valid(previewVersion, false)) {\r\n console.error(\r\n colors.red(`Invalid value for RUSH_PREVIEW_VERSION environment variable: \"${previewVersion}\"`)\r\n );\r\n process.exit(1);\r\n }\r\n\r\n rushVersionToLoad = previewVersion;\r\n\r\n const lines: string[] = [];\r\n lines.push(\r\n `*********************************************************************`,\r\n `* WARNING! THE \"RUSH_PREVIEW_VERSION\" ENVIRONMENT VARIABLE IS SET. *`,\r\n `* *`,\r\n `* You are previewing Rush version: ${Text.padEnd(previewVersion, 25)} *`\r\n );\r\n\r\n if (configuration) {\r\n lines.push(`* The rush.json configuration asks for: ${Text.padEnd(configuration.rushVersion, 25)} *`);\r\n }\r\n\r\n lines.push(\r\n `* *`,\r\n `* To restore the normal behavior, unset the RUSH_PREVIEW_VERSION *`,\r\n `* environment variable. *`,\r\n `*********************************************************************`\r\n );\r\n\r\n console.error(lines.map((line) => colors.black(colors.bgYellow(line))).join(os.EOL));\r\n} else if (configuration) {\r\n rushVersionToLoad = configuration.rushVersion;\r\n}\r\n\r\n// If we are previewing an older Rush that doesn't understand the RUSH_PREVIEW_VERSION variable,\r\n// then unset it.\r\nif (rushVersionToLoad && semver.lt(rushVersionToLoad, '5.0.0-dev.18')) {\r\n delete process.env[EnvironmentVariableNames.RUSH_PREVIEW_VERSION];\r\n}\r\n\r\n// Rush is \"managed\" if its version and configuration are dictated by a repo's rush.json\r\nconst isManaged: boolean = !!configuration;\r\n\r\nconst terminalProvider: ITerminalProvider = new ConsoleTerminalProvider();\r\n\r\nconst launchOptions: rushLib.ILaunchOptions = { isManaged, alreadyReportedNodeTooNewError, terminalProvider };\r\n\r\n// If we're inside a repo folder, and it's requesting a different version, then use the RushVersionManager to\r\n// install it\r\nif (rushVersionToLoad && rushVersionToLoad !== currentPackageVersion) {\r\n const versionSelector: RushVersionSelector = new RushVersionSelector(currentPackageVersion);\r\n versionSelector\r\n .ensureRushVersionInstalledAsync(rushVersionToLoad, configuration, launchOptions)\r\n .catch((error: Error) => {\r\n console.log(colors.red('Error: ' + error.message));\r\n });\r\n} else {\r\n // Otherwise invoke the rush-lib that came with this rush package\r\n RushCommandSelector.execute(currentPackageVersion, rushLib, launchOptions);\r\n}\r\n"]}
1
+ {"version":3,"file":"start.js","sourceRoot":"","sources":["../src/start.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;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AC,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;CACN;KAAM;IACL,iEAAiE;IACjE,yCAAmB,CAAC,OAAO,CAAC,qBAAqB,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;CAC5E","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n// We're using a path-based import here to minimize the amount of code that is evaluated before\n// we check to see if the Node.js version is too old. If, for whatever reason, Rush crashes with\n// an old Node.js version when evaluating one of the more complex imports, we'll at least\n// shown a meaningful error message.\nimport { NodeJsCompatibility } from '@microsoft/rush-lib/lib/logic/NodeJsCompatibility';\n\nif (NodeJsCompatibility.reportAncientIncompatibleVersion()) {\n // The Node.js version is known to have serious incompatibilities. In that situation, the user\n // should downgrade Rush to an older release that supported their Node.js version.\n process.exit(1);\n}\n\nconst alreadyReportedNodeTooNewError: boolean = NodeJsCompatibility.warnAboutVersionTooNew({\n isRushLib: false,\n alreadyReportedNodeTooNewError: false\n});\n\nimport colors from 'colors/safe';\nimport * as os from 'os';\nimport * as semver from 'semver';\n\nimport {\n ConsoleTerminalProvider,\n Text,\n PackageJsonLookup,\n type ITerminalProvider\n} from '@rushstack/node-core-library';\nimport { EnvironmentVariableNames } from '@microsoft/rush-lib';\nimport * as rushLib from '@microsoft/rush-lib';\n\nimport { RushCommandSelector } from './RushCommandSelector';\nimport { RushVersionSelector } from './RushVersionSelector';\nimport { MinimalRushConfiguration } from './MinimalRushConfiguration';\n\n// Load the configuration\nconst configuration: MinimalRushConfiguration | undefined =\n MinimalRushConfiguration.loadFromDefaultLocation();\n\nconst currentPackageVersion: string = PackageJsonLookup.loadOwnPackageJson(__dirname).version;\n\nlet rushVersionToLoad: string | undefined = undefined;\n\nconst previewVersion: string | undefined = process.env[EnvironmentVariableNames.RUSH_PREVIEW_VERSION];\n\nif (previewVersion) {\n if (!semver.valid(previewVersion, false)) {\n console.error(\n colors.red(`Invalid value for RUSH_PREVIEW_VERSION environment variable: \"${previewVersion}\"`)\n );\n process.exit(1);\n }\n\n rushVersionToLoad = previewVersion;\n\n const lines: string[] = [];\n lines.push(\n `*********************************************************************`,\n `* WARNING! THE \"RUSH_PREVIEW_VERSION\" ENVIRONMENT VARIABLE IS SET. *`,\n `* *`,\n `* You are previewing Rush version: ${Text.padEnd(previewVersion, 25)} *`\n );\n\n if (configuration) {\n lines.push(`* The rush.json configuration asks for: ${Text.padEnd(configuration.rushVersion, 25)} *`);\n }\n\n lines.push(\n `* *`,\n `* To restore the normal behavior, unset the RUSH_PREVIEW_VERSION *`,\n `* environment variable. *`,\n `*********************************************************************`\n );\n\n console.error(lines.map((line) => colors.black(colors.bgYellow(line))).join(os.EOL));\n} else if (configuration) {\n rushVersionToLoad = configuration.rushVersion;\n}\n\n// If we are previewing an older Rush that doesn't understand the RUSH_PREVIEW_VERSION variable,\n// then unset it.\nif (rushVersionToLoad && semver.lt(rushVersionToLoad, '5.0.0-dev.18')) {\n delete process.env[EnvironmentVariableNames.RUSH_PREVIEW_VERSION];\n}\n\n// Rush is \"managed\" if its version and configuration are dictated by a repo's rush.json\nconst isManaged: boolean = !!configuration;\n\nconst terminalProvider: ITerminalProvider = new ConsoleTerminalProvider();\n\nconst launchOptions: rushLib.ILaunchOptions = { isManaged, alreadyReportedNodeTooNewError, terminalProvider };\n\n// If we're inside a repo folder, and it's requesting a different version, then use the RushVersionManager to\n// install it\nif (rushVersionToLoad && rushVersionToLoad !== currentPackageVersion) {\n const versionSelector: RushVersionSelector = new RushVersionSelector(currentPackageVersion);\n versionSelector\n .ensureRushVersionInstalledAsync(rushVersionToLoad, configuration, launchOptions)\n .catch((error: Error) => {\n console.log(colors.red('Error: ' + error.message));\n });\n} else {\n // Otherwise invoke the rush-lib that came with this rush package\n RushCommandSelector.execute(currentPackageVersion, rushLib, launchOptions);\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/rush",
3
- "version": "5.110.0",
3
+ "version": "5.110.2",
4
4
  "description": "A professional solution for consolidating all your JavaScript projects in one Git repo",
5
5
  "keywords": [
6
6
  "install",
@@ -32,17 +32,17 @@
32
32
  "dependencies": {
33
33
  "colors": "~1.2.1",
34
34
  "semver": "~7.5.4",
35
- "@microsoft/rush-lib": "5.110.0",
35
+ "@microsoft/rush-lib": "5.110.2",
36
36
  "@rushstack/node-core-library": "3.61.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/heft-jest": "1.0.1",
40
40
  "@types/semver": "7.5.0",
41
- "@rushstack/heft": "0.63.0",
41
+ "@rushstack/heft": "0.63.2",
42
42
  "local-node-rig": "1.0.0",
43
- "@rushstack/rush-amazon-s3-build-cache-plugin": "5.110.0",
44
- "@rushstack/rush-azure-storage-build-cache-plugin": "5.110.0",
45
- "@rushstack/rush-http-build-cache-plugin": "5.110.0"
43
+ "@rushstack/rush-amazon-s3-build-cache-plugin": "5.110.2",
44
+ "@rushstack/rush-azure-storage-build-cache-plugin": "5.110.2",
45
+ "@rushstack/rush-http-build-cache-plugin": "5.110.2"
46
46
  },
47
47
  "scripts": {
48
48
  "build": "heft build --clean",