@angular/cli 12.2.3 → 12.2.7
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/commands/new.md +1 -1
- package/package.json +11 -11
- package/utilities/color.js +25 -2
package/commands/new.md
CHANGED
|
@@ -11,6 +11,6 @@ All prompts can safely be allowed to default.
|
|
|
11
11
|
|
|
12
12
|
- Subsequent applications that you generate in the workspace reside in the `projects/` subfolder.
|
|
13
13
|
|
|
14
|
-
If you plan to have multiple applications in the workspace, you can create an empty workspace by setting the `--
|
|
14
|
+
If you plan to have multiple applications in the workspace, you can create an empty workspace by setting the `--create-application` option to false.
|
|
15
15
|
You can then use `ng generate application` to create an initial application.
|
|
16
16
|
This allows a workspace name different from the initial app name, and ensures that all applications reside in the `/projects` subfolder, matching the structure of the configuration file.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/cli",
|
|
3
|
-
"version": "12.2.
|
|
3
|
+
"version": "12.2.7",
|
|
4
4
|
"description": "CLI tool for Angular",
|
|
5
5
|
"main": "lib/cli/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/angular/angular-cli",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@angular-devkit/architect": "0.1202.
|
|
32
|
-
"@angular-devkit/core": "12.2.
|
|
33
|
-
"@angular-devkit/schematics": "12.2.
|
|
34
|
-
"@schematics/angular": "12.2.
|
|
31
|
+
"@angular-devkit/architect": "0.1202.7",
|
|
32
|
+
"@angular-devkit/core": "12.2.7",
|
|
33
|
+
"@angular-devkit/schematics": "12.2.7",
|
|
34
|
+
"@schematics/angular": "12.2.7",
|
|
35
35
|
"@yarnpkg/lockfile": "1.1.0",
|
|
36
36
|
"ansi-colors": "4.1.1",
|
|
37
37
|
"debug": "4.3.2",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"ng-update": {
|
|
52
52
|
"migrations": "@schematics/angular/migrations/migration-collection.json",
|
|
53
53
|
"packageGroup": {
|
|
54
|
-
"@angular/cli": "12.2.
|
|
55
|
-
"@angular-devkit/architect": "0.1202.
|
|
56
|
-
"@angular-devkit/build-angular": "12.2.
|
|
57
|
-
"@angular-devkit/build-webpack": "0.1202.
|
|
58
|
-
"@angular-devkit/core": "12.2.
|
|
59
|
-
"@angular-devkit/schematics": "12.2.
|
|
54
|
+
"@angular/cli": "12.2.7",
|
|
55
|
+
"@angular-devkit/architect": "0.1202.7",
|
|
56
|
+
"@angular-devkit/build-angular": "12.2.7",
|
|
57
|
+
"@angular-devkit/build-webpack": "0.1202.7",
|
|
58
|
+
"@angular-devkit/core": "12.2.7",
|
|
59
|
+
"@angular-devkit/schematics": "12.2.7"
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"engines": {
|
package/utilities/color.js
CHANGED
|
@@ -29,7 +29,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.colors = exports.removeColor = void 0;
|
|
30
30
|
const ansiColors = __importStar(require("ansi-colors"));
|
|
31
31
|
const tty_1 = require("tty");
|
|
32
|
-
|
|
32
|
+
function supportColor() {
|
|
33
|
+
if (process.env.FORCE_COLOR !== undefined) {
|
|
34
|
+
// 2 colors: FORCE_COLOR = 0 (Disables colors), depth 1
|
|
35
|
+
// 16 colors: FORCE_COLOR = 1, depth 4
|
|
36
|
+
// 256 colors: FORCE_COLOR = 2, depth 8
|
|
37
|
+
// 16,777,216 colors: FORCE_COLOR = 3, depth 16
|
|
38
|
+
// See: https://nodejs.org/dist/latest-v12.x/docs/api/tty.html#tty_writestream_getcolordepth_env
|
|
39
|
+
// and https://github.com/nodejs/node/blob/b9f36062d7b5c5039498e98d2f2c180dca2a7065/lib/internal/tty.js#L106;
|
|
40
|
+
switch (process.env.FORCE_COLOR) {
|
|
41
|
+
case '':
|
|
42
|
+
case 'true':
|
|
43
|
+
case '1':
|
|
44
|
+
case '2':
|
|
45
|
+
case '3':
|
|
46
|
+
return true;
|
|
47
|
+
default:
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (process.stdout instanceof tty_1.WriteStream) {
|
|
52
|
+
return process.stdout.getColorDepth() > 1;
|
|
53
|
+
}
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
33
56
|
function removeColor(text) {
|
|
34
57
|
// This has been created because when colors.enabled is false unstyle doesn't work
|
|
35
58
|
// see: https://github.com/doowb/ansi-colors/blob/a4794363369d7b4d1872d248fc43a12761640d8e/index.js#L38
|
|
@@ -40,4 +63,4 @@ exports.removeColor = removeColor;
|
|
|
40
63
|
// Create function is not defined in the typings. See: https://github.com/doowb/ansi-colors/pull/44
|
|
41
64
|
const colors = ansiColors.create();
|
|
42
65
|
exports.colors = colors;
|
|
43
|
-
colors.enabled =
|
|
66
|
+
colors.enabled = supportColor();
|