@angular-devkit/build-angular 0.1101.1 → 0.1101.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/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/build-angular",
|
|
3
|
-
"version": "0.1101.
|
|
3
|
+
"version": "0.1101.2",
|
|
4
4
|
"description": "Angular Webpack Build Facade",
|
|
5
5
|
"experimental": true,
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"typings": "src/index.d.ts",
|
|
8
8
|
"builders": "builders.json",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@angular-devkit/architect": "0.1101.
|
|
11
|
-
"@angular-devkit/build-optimizer": "0.1101.
|
|
12
|
-
"@angular-devkit/build-webpack": "0.1101.
|
|
13
|
-
"@angular-devkit/core": "11.1.
|
|
10
|
+
"@angular-devkit/architect": "0.1101.2",
|
|
11
|
+
"@angular-devkit/build-optimizer": "0.1101.2",
|
|
12
|
+
"@angular-devkit/build-webpack": "0.1101.2",
|
|
13
|
+
"@angular-devkit/core": "11.1.2",
|
|
14
14
|
"@babel/core": "7.12.10",
|
|
15
15
|
"@babel/generator": "7.12.11",
|
|
16
16
|
"@babel/plugin-transform-runtime": "7.12.10",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@babel/runtime": "7.12.5",
|
|
19
19
|
"@babel/template": "7.12.7",
|
|
20
20
|
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
|
|
21
|
-
"@ngtools/webpack": "11.1.
|
|
21
|
+
"@ngtools/webpack": "11.1.2",
|
|
22
22
|
"ansi-colors": "4.1.1",
|
|
23
23
|
"autoprefixer": "10.2.1",
|
|
24
24
|
"babel-loader": "8.2.2",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"file-loader": "6.2.0",
|
|
35
35
|
"find-cache-dir": "3.3.1",
|
|
36
36
|
"glob": "7.1.6",
|
|
37
|
+
"https-proxy-agent": "5.0.0",
|
|
37
38
|
"inquirer": "7.3.3",
|
|
38
39
|
"jest-worker": "26.6.2",
|
|
39
40
|
"karma-source-map-support": "1.4.0",
|
package/src/browser/schema.d.ts
CHANGED
|
@@ -329,7 +329,8 @@ export declare type Localize = string[] | boolean;
|
|
|
329
329
|
export declare type OptimizationUnion = boolean | OptimizationClass;
|
|
330
330
|
export interface OptimizationClass {
|
|
331
331
|
/**
|
|
332
|
-
* Enables optimization for fonts. This requires internet access.
|
|
332
|
+
* Enables optimization for fonts. This option requires internet access. `HTTPS_PROXY`
|
|
333
|
+
* environment variable can be used to specify a proxy server.
|
|
333
334
|
*/
|
|
334
335
|
fonts?: FontsUnion;
|
|
335
336
|
/**
|
|
@@ -342,13 +343,15 @@ export interface OptimizationClass {
|
|
|
342
343
|
styles?: StylesUnion;
|
|
343
344
|
}
|
|
344
345
|
/**
|
|
345
|
-
* Enables optimization for fonts. This requires internet access.
|
|
346
|
+
* Enables optimization for fonts. This option requires internet access. `HTTPS_PROXY`
|
|
347
|
+
* environment variable can be used to specify a proxy server.
|
|
346
348
|
*/
|
|
347
349
|
export declare type FontsUnion = boolean | FontsClass;
|
|
348
350
|
export interface FontsClass {
|
|
349
351
|
/**
|
|
350
352
|
* Reduce render blocking requests by inlining external Google fonts and icons CSS
|
|
351
|
-
* definitions in the application's HTML index file. This requires internet access.
|
|
353
|
+
* definitions in the application's HTML index file. This option requires internet access.
|
|
354
|
+
* `HTTPS_PROXY` environment variable can be used to specify a proxy server.
|
|
352
355
|
*/
|
|
353
356
|
inline?: boolean;
|
|
354
357
|
}
|
package/src/browser/schema.json
CHANGED
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
]
|
|
96
96
|
},
|
|
97
97
|
"fonts": {
|
|
98
|
-
"description": "Enables optimization for fonts. This requires internet access.",
|
|
98
|
+
"description": "Enables optimization for fonts. This option requires internet access. `HTTPS_PROXY` environment variable can be used to specify a proxy server.",
|
|
99
99
|
"default": true,
|
|
100
100
|
"oneOf": [
|
|
101
101
|
{
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"properties": {
|
|
104
104
|
"inline": {
|
|
105
105
|
"type": "boolean",
|
|
106
|
-
"description": "Reduce render blocking requests by inlining external Google fonts and icons CSS definitions in the application's HTML index file. This requires internet access.",
|
|
106
|
+
"description": "Reduce render blocking requests by inlining external Google fonts and icons CSS definitions in the application's HTML index file. This option requires internet access. `HTTPS_PROXY` environment variable can be used to specify a proxy server.",
|
|
107
107
|
"default": true
|
|
108
108
|
}
|
|
109
109
|
},
|
|
@@ -10,6 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.InlineFontsProcessor = void 0;
|
|
11
11
|
const cacache = require("cacache");
|
|
12
12
|
const https = require("https");
|
|
13
|
+
const proxyAgent = require("https-proxy-agent");
|
|
13
14
|
const url_1 = require("url");
|
|
14
15
|
const cache_path_1 = require("../cache-path");
|
|
15
16
|
const environment_options_1 = require("../environment-options");
|
|
@@ -69,6 +70,7 @@ class InlineFontsProcessor {
|
|
|
69
70
|
return transformedContent;
|
|
70
71
|
}
|
|
71
72
|
async getResponse(url, userAgent) {
|
|
73
|
+
var _a;
|
|
72
74
|
const key = `${packageVersion}|${url}|${userAgent}`;
|
|
73
75
|
if (cacheFontsPath) {
|
|
74
76
|
const entry = await cacache.get.info(cacheFontsPath, key);
|
|
@@ -76,9 +78,16 @@ class InlineFontsProcessor {
|
|
|
76
78
|
return fs_1.readFile(entry.path, 'utf8');
|
|
77
79
|
}
|
|
78
80
|
}
|
|
81
|
+
let agent;
|
|
82
|
+
const httpsProxy = (_a = process.env.HTTPS_PROXY) !== null && _a !== void 0 ? _a : process.env.https_proxy;
|
|
83
|
+
if (httpsProxy) {
|
|
84
|
+
agent = proxyAgent(httpsProxy);
|
|
85
|
+
}
|
|
79
86
|
const data = await new Promise((resolve, reject) => {
|
|
80
87
|
let rawResponse = '';
|
|
81
88
|
https.get(url, {
|
|
89
|
+
agent,
|
|
90
|
+
rejectUnauthorized: false,
|
|
82
91
|
headers: {
|
|
83
92
|
'user-agent': userAgent,
|
|
84
93
|
},
|