@angular-devkit/core 10.1.0-next.0 → 10.1.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -144,7 +144,7 @@ import { workspaces } from '@angular-devkit/core';
|
|
|
144
144
|
|
|
145
145
|
async function demonstrate() {
|
|
146
146
|
const host = workspaces.createWorkspaceHost(new NodeJsSyncHost());
|
|
147
|
-
const workspace = await workspaces.readWorkspace('path/to/workspace/directory/', host);
|
|
147
|
+
const { workspace } = await workspaces.readWorkspace('path/to/workspace/directory/', host);
|
|
148
148
|
|
|
149
149
|
const project = workspace.projects.get('my-app');
|
|
150
150
|
if (!project) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/core",
|
|
3
|
-
"version": "10.1.0-next.
|
|
3
|
+
"version": "10.1.0-next.4",
|
|
4
4
|
"description": "Angular DevKit - Core Utility Library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"typings": "src/index.d.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"ajv": "6.12.3",
|
|
17
17
|
"fast-json-stable-stringify": "2.1.0",
|
|
18
18
|
"magic-string": "0.25.7",
|
|
19
|
-
"rxjs": "6.6.
|
|
19
|
+
"rxjs": "6.6.2",
|
|
20
20
|
"source-map": "0.7.3"
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
|
@@ -200,7 +200,7 @@ class SimpleScheduler {
|
|
|
200
200
|
* Create the job.
|
|
201
201
|
* @private
|
|
202
202
|
*/
|
|
203
|
-
_createJob(name, argument, handler, inboundBus, outboundBus
|
|
203
|
+
_createJob(name, argument, handler, inboundBus, outboundBus) {
|
|
204
204
|
const schemaRegistry = this._schemaRegistry;
|
|
205
205
|
const channelsSubject = new Map();
|
|
206
206
|
const channels = new Map();
|
|
@@ -367,7 +367,7 @@ class SimpleScheduler {
|
|
|
367
367
|
return handler(argument, context);
|
|
368
368
|
})).subscribe(subscriber);
|
|
369
369
|
}))));
|
|
370
|
-
return this._createJob(name, argument, handler, inboundBus, outboundBus
|
|
370
|
+
return this._createJob(name, argument, handler, inboundBus, outboundBus);
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
exports.SimpleScheduler = SimpleScheduler;
|
|
@@ -38,7 +38,6 @@ var strategy;
|
|
|
38
38
|
*/
|
|
39
39
|
function reuse(replayMessages = false) {
|
|
40
40
|
let inboundBus = new rxjs_1.Subject();
|
|
41
|
-
let runContext = null;
|
|
42
41
|
let run = null;
|
|
43
42
|
let state = null;
|
|
44
43
|
return (handler, options) => {
|
|
@@ -61,7 +60,6 @@ var strategy;
|
|
|
61
60
|
inboundBus = new rxjs_1.Subject();
|
|
62
61
|
run = null;
|
|
63
62
|
}), replayMessages ? operators_1.shareReplay() : operators_1.share());
|
|
64
|
-
runContext = context;
|
|
65
63
|
return run;
|
|
66
64
|
};
|
|
67
65
|
return Object.assign(newHandler, handler, options || {});
|
package/src/terminal/caps.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import Socket = NodeJS.Socket;
|
|
3
2
|
export interface StreamCapabilities {
|
|
4
3
|
readable: boolean;
|
|
5
4
|
writable: boolean;
|
|
@@ -28,4 +27,4 @@ export interface StreamCapabilities {
|
|
|
28
27
|
*/
|
|
29
28
|
columns: number | null;
|
|
30
29
|
}
|
|
31
|
-
export declare function getCapabilities(stream:
|
|
30
|
+
export declare function getCapabilities(stream: NodeJS.WriteStream, isTerminalStream?: boolean): StreamCapabilities;
|
package/src/terminal/text.js
CHANGED
|
@@ -10,31 +10,31 @@ exports.bgWhite = exports.bgCyan = exports.bgMagenta = exports.bgBlue = exports.
|
|
|
10
10
|
*/
|
|
11
11
|
const caps = require("./caps");
|
|
12
12
|
const colors_1 = require("./colors");
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
exports.reset =
|
|
16
|
-
exports.bold =
|
|
17
|
-
exports.dim =
|
|
18
|
-
exports.italic =
|
|
19
|
-
exports.underline =
|
|
20
|
-
exports.inverse =
|
|
21
|
-
exports.hidden =
|
|
22
|
-
exports.strikethrough =
|
|
23
|
-
exports.black =
|
|
24
|
-
exports.red =
|
|
25
|
-
exports.green =
|
|
26
|
-
exports.yellow =
|
|
27
|
-
exports.blue =
|
|
28
|
-
exports.magenta =
|
|
29
|
-
exports.cyan =
|
|
30
|
-
exports.white =
|
|
31
|
-
exports.grey =
|
|
32
|
-
exports.gray =
|
|
33
|
-
exports.bgBlack =
|
|
34
|
-
exports.bgRed =
|
|
35
|
-
exports.bgGreen =
|
|
36
|
-
exports.bgYellow =
|
|
37
|
-
exports.bgBlue =
|
|
38
|
-
exports.bgMagenta =
|
|
39
|
-
exports.bgCyan =
|
|
40
|
-
exports.bgWhite =
|
|
13
|
+
const supportColors = typeof process === 'object' ? caps.getCapabilities(process.stdout).colors : false;
|
|
14
|
+
const identityFn = (x) => x;
|
|
15
|
+
exports.reset = supportColors ? colors_1.colors.reset : identityFn;
|
|
16
|
+
exports.bold = supportColors ? colors_1.colors.bold : identityFn;
|
|
17
|
+
exports.dim = supportColors ? colors_1.colors.dim : identityFn;
|
|
18
|
+
exports.italic = supportColors ? colors_1.colors.italic : identityFn;
|
|
19
|
+
exports.underline = supportColors ? colors_1.colors.underline : identityFn;
|
|
20
|
+
exports.inverse = supportColors ? colors_1.colors.inverse : identityFn;
|
|
21
|
+
exports.hidden = supportColors ? colors_1.colors.hidden : identityFn;
|
|
22
|
+
exports.strikethrough = supportColors ? colors_1.colors.strikethrough : identityFn;
|
|
23
|
+
exports.black = supportColors ? colors_1.colors.black : identityFn;
|
|
24
|
+
exports.red = supportColors ? colors_1.colors.red : identityFn;
|
|
25
|
+
exports.green = supportColors ? colors_1.colors.green : identityFn;
|
|
26
|
+
exports.yellow = supportColors ? colors_1.colors.yellow : identityFn;
|
|
27
|
+
exports.blue = supportColors ? colors_1.colors.blue : identityFn;
|
|
28
|
+
exports.magenta = supportColors ? colors_1.colors.magenta : identityFn;
|
|
29
|
+
exports.cyan = supportColors ? colors_1.colors.cyan : identityFn;
|
|
30
|
+
exports.white = supportColors ? colors_1.colors.white : identityFn;
|
|
31
|
+
exports.grey = supportColors ? colors_1.colors.gray : identityFn;
|
|
32
|
+
exports.gray = supportColors ? colors_1.colors.gray : identityFn;
|
|
33
|
+
exports.bgBlack = supportColors ? colors_1.colors.bgBlack : identityFn;
|
|
34
|
+
exports.bgRed = supportColors ? colors_1.colors.bgRed : identityFn;
|
|
35
|
+
exports.bgGreen = supportColors ? colors_1.colors.bgGreen : identityFn;
|
|
36
|
+
exports.bgYellow = supportColors ? colors_1.colors.bgYellow : identityFn;
|
|
37
|
+
exports.bgBlue = supportColors ? colors_1.colors.bgBlue : identityFn;
|
|
38
|
+
exports.bgMagenta = supportColors ? colors_1.colors.bgMagenta : identityFn;
|
|
39
|
+
exports.bgCyan = supportColors ? colors_1.colors.bgCyan : identityFn;
|
|
40
|
+
exports.bgWhite = supportColors ? colors_1.colors.bgWhite : identityFn;
|